🚨 Breaking Changes 🚨
Event Iterator Keep Alive
We move configs for Event Iterator Keep Alive from .handle to handler options (define when creating handler)
Rename internal APIs
HandlerPlugin->StandardHandlerPluginClientOptions->FriendlyClientOptionsClientOptionsOut->ClientOptionsClientPlugin->StandardLinkPluginStandardHandleOptions->FriendlyStandardHandleOptions
🚀 Features 🚀
Body Limit Plugin
The Body Limit Plugin restricts the size of the request body.
const handler = new RPCHandler(router, {
plugins: [
new BodyLimitPlugin({
maxBodySize: 1024 * 1024, // 1MB
}),
],
})No need manually check prefix
export async function fetch(request: Request): Promise<Response> {
- const url = new URL(request.url)
-
- if (url.pathname.startsWith('/rpc')) {
const { response } = await handler.handle(request, {
prefix: '/rpc',
context: {} // Provide initial context if needed
})
if (response)
return response
- }
return new Response('Not found', { status: 404 })
}🚨 Breaking Changes
🚀 Features
- client, server:
- server:
🐞 Bug Fixes
- contract, server: Remove redundant
descriptionin .errors - by @unnoq in #284 (3e1c2) - server: ResponseHeadersPlugin context reference issues - by @unnoq in #293 (6d757)