v0.3.0
This release brings in a couple of bugfixes and improvements
- A new inbuilt router (based on itty-router) to provide easy routing in a single component. The new
handleRequestmethod takes in theHttpRequest
import { HandleRequest, HttpRequest, HttpResponse } from "spin-sdk"
const encoder = new TextEncoder()
let router = utils.Router()
router.get("/", () => {return {status: 200, body: encoder.encode("default route").buffer}})
router.get("/home", () => {return {status: 200, body: encoder.encode("home route").buffer}})
export const handleRequest: HandleRequest = async function (request: HttpRequest): Promise<HttpResponse> {
return await router.handle(request)
}- Addition of support for some cryptographic functions
crypto.createHashcrypto.createHmaccrytpo.subtle.digest
See below for the full list of changes.
What's Changed
- add entries method to URLSearchParams by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/91
- remove workarounds for
quickjs-wasm-rscase conversion by @dicej in https://github.com/fermyon/spin-js-sdk/pull/81 - rename build action to release by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/93
- typed options for fetch by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/95
- Bump json5 from 2.2.1 to 2.2.3 in /examples/javascript/simple_ssr by @dependabot in https://github.com/fermyon/spin-js-sdk/pull/94
- fix URLSearchParams.entries and add iterator by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/92
- make headers optional for http response by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/89
- add release process by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/96
- add some cli output while building the js module by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/98
- add router to the SDK by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/99
- add test action by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/97
- add sha256 and sha512 digests by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/101
- add createHmac method by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/102
- enable
Wizer::wasm_bulk_memoryby @dicej in https://github.com/fermyon/spin-js-sdk/pull/105 - update spin to v0.7.1 in tests by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/104
- use user input in
package.jsonwhen usingspin newby @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/106 - prepare for v0.3.0 by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/107
- bump spin sdk version for release by @karthik2804 in https://github.com/fermyon/spin-js-sdk/pull/108
Full Changelog: fermyon/spin-js-sdk@v0.2.0...v0.3.0