github unnoq/orpc v0.27.0

latest releases: v1.8.6, v1.8.5, v1.8.4...
8 months ago

🚨 Breaking Changes Alert 🚨

  • The CompositeHandler has been removed. Instead, we recommend using separate base paths for each handler.
  • Handlers will no longer automatically handle cases where no procedure matches. You are now responsible for returning a 404response or falling back to other routes.
  • Official Adapters for Next.js and Hono.js
if (url.pathname.startsWith('/api')) {
   const { matched, response } = await openapiHandler.handle(request, {
     prefix: '/api'
   })
 
   if (matched) {
     return response
   }
}
 
if (url.pathname.startsWith('/rpc')) {
  const { matched, response } = await orpcHandler.handle(request, {
    prefix: '/rpc'
  })
 
  if (matched) {
    return response
  }
}

return new Response('Not Found', { status: 404 })

   🚨 Breaking Changes

  • server, openapi: Rewrite ORPCHandler, OpenAPIHandler  -  by @unnoq in #74 (911bd)

   🚀 Features

    View changes on GitHub

Don't miss a new orpc release

NewReleases is sending notifications on new releases.