github unnoq/orpc v1.6.0

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

Durable Event Iterator docs

Durable Event Iterator allows you to use Event Iterator by separating the streaming to a different service that provides durable event streams, automatic reconnections, recovery of missing events, and more.

Note

Only support Cloudflare Websocket Hibernation for now

  const onMessageProcedure = base.handler(({ context }) => {
    return new DurableEventIterator<ChatRoom>('some-room', {
      signingKey: 'secret-key', // Replace with your actual signing key
    })
  })

oRPC features now support tRPC docs

By converting a tRPC router to an oRPC router, you can utilize most oRPC features, including OpenAPI specification generation and request handling.

import {
  experimental_ORPCMeta as ORPCMeta,
  experimental_toORPCRouter as toORPCRouter
} from '@orpc/trpc'

export const t = initTRPC.context<Context>().meta<ORPCMeta>().create()

const orpcRouter = toORPCRouter(trpcRouter)

   🚨 Breaking Changes

Note

Only effect experimental features

  • server: Improve hibernation naming conventions  -  by @unnoq in #686 (add5a)
  • standard-server-peer: Use string instead of number for unique ID  -  by @unnoq in #682 (b683b)

   🚀 Features

  • durable-event-iterator: Implement event iterator with Cloudflare hibernation and more  -  by @unnoq in #668 (ce855)
  • server: Enhance call util to support signal and lastEventId options  -  by @unnoq in #687 (57b0b)
  • trpc: Trpc router to orpc router  -  by @unnoq in #699 (cf357)
  • zod: Place null at the end when converting ZodNullable  -  by @soonoo in #672 (8be95)

   🐞 Bug Fixes

  • server: Prevent reference issues in ResponseHeadersPlugin  -  by @unnoq in #693 (a1531)
    View changes on GitHub

Don't miss a new orpc release

NewReleases is sending notifications on new releases.