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:
timingSafeEqualcrypto.verify
- Add Redis
executecommand 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 https://github.com/fermyon/spin-js-sdk/pull/109
- Make JS/TS templates match main repo. by @calebschoepp in https://github.com/fermyon/spin-js-sdk/pull/111
- add minimal
setTimeoutimplementation by @dicej in https://github.com/fermyon/spin-js-sdk/pull/112 - Add string and uint8array to fetch body by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/113
- make return type flexible by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/115
- Add the toJson method URL and allow usage in fetch by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/117
- add crypto.verify and timingSafeEqual by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/120
- fix ci for checksum job by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/121
- add new handler signature
handler(req, res)by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/116 - use canary spin to run tests by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/124
- add support for Spin KV by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/125
- Add support for redis
executeby @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/123 - add .spin to gitignore in templates by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/126
- version bump to v0.4.0 by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/127
- bump template versions by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/128
New Contributors
- @calebschoepp made their first contribution in https://github.com/fermyon/spin-js-sdk/pull/111
Full Changelog: fermyon/spin-js-sdk@v0.3.0...v0.4.0