v0.4.0
This release brings in a few exciting changes and improvements to the SDK:
- The SDK now supports Spin KV allowing for data persistence.
- A new handler function signature that enables building responses by chaining:
import { Handler, HttpRequest, HttpResponse } from "spin-sdk"
export const handler: Handler = async function (request: HttpRequest, response: ResponseObject): Promise<void> {
response.status(200).header("content-type", "text/html").body("Chaining works")
}
- More flexible types on fetch and response allowing for usage of
strings
. - Addition of more cryptography functions:
timingSafeEqual
crypto.verify
- Add Redis
execute
command to allow running arbitrary Redis commands. - Addition of
setTimeout
.
See below for the full list of changes.
What's Changed
- add note to update templates by @karthik2804 in #109
- Make JS/TS templates match main repo. by @calebschoepp in #111
- add minimal
setTimeout
implementation by @dicej in #112 - Add string and uint8array to fetch body by @karthik2804 in #113
- make return type flexible by @karthik2804 in #115
- Add the toJson method URL and allow usage in fetch by @karthik2804 in #117
- add crypto.verify and timingSafeEqual by @karthik2804 in #120
- fix ci for checksum job by @karthik2804 in #121
- add new handler signature
handler(req, res)
by @karthik2804 in #116 - use canary spin to run tests by @karthik2804 in #124
- add support for Spin KV by @karthik2804 in #125
- Add support for redis
execute
by @karthik2804 in #123 - add .spin to gitignore in templates by @karthik2804 in #126
- version bump to v0.4.0 by @karthik2804 in #127
- bump template versions by @karthik2804 in #128
New Contributors
- @calebschoepp made their first contribution in #111
Full Changelog: v0.3.0...v0.4.0