@orpc/standard-server 1.7.10 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -30,6 +30,7 @@
30
30
  - **🔗 End-to-End Type Safety**: Ensure type-safe inputs, outputs, and errors from client to server.
31
31
  - **📘 First-Class OpenAPI**: Built-in support that fully adheres to the OpenAPI standard.
32
32
  - **📝 Contract-First Development**: Optionally define your API contract before implementation.
33
+ - **🔍 First-Class OpenTelemetry**: Seamlessly integrate with OpenTelemetry for observability.
33
34
  - **⚙️ Framework Integrations**: Seamlessly integrate with TanStack Query (React, Vue, Solid, Svelte, Angular), Pinia Colada, and more.
34
35
  - **🚀 Server Actions**: Fully compatible with React Server Actions on Next.js, TanStack Start, and other platforms.
35
36
  - **🔠 Standard Schema Support**: Works out of the box with Zod, Valibot, ArkType, and other schema validators.
@@ -38,7 +39,6 @@
38
39
  - **📡 SSE & Streaming**: Enjoy full type-safe support for SSE and streaming.
39
40
  - **🌍 Multi-Runtime Support**: Fast and lightweight on Cloudflare, Deno, Bun, Node.js, and beyond.
40
41
  - **🔌 Extendability**: Easily extend functionality with plugins, middleware, and interceptors.
41
- - **🛡️ Reliability**: Well-tested, TypeScript-based, production-ready, and MIT licensed.
42
42
 
43
43
  ## Documentation
44
44
 
@@ -50,6 +50,7 @@ You can find the full documentation [here](https://orpc.unnoq.com).
50
50
  - [@orpc/server](https://www.npmjs.com/package/@orpc/server): Build your API or implement API contract.
51
51
  - [@orpc/client](https://www.npmjs.com/package/@orpc/client): Consume your API on the client with type-safety.
52
52
  - [@orpc/openapi](https://www.npmjs.com/package/@orpc/openapi): Generate OpenAPI specs and handle OpenAPI requests.
53
+ - [@orpc/otel](https://www.npmjs.com/package/@orpc/otel): [OpenTelemetry](https://opentelemetry.io/) integration for observability.
53
54
  - [@orpc/nest](https://www.npmjs.com/package/@orpc/nest): Deeply integrate oRPC with [NestJS](https://nestjs.com/).
54
55
  - [@orpc/react](https://www.npmjs.com/package/@orpc/react): Utilities for integrating oRPC with React and React Server Actions.
55
56
  - [@orpc/tanstack-query](https://www.npmjs.com/package/@orpc/tanstack-query): [TanStack Query](https://tanstack.com/query/latest) integration.
package/dist/index.d.mts CHANGED
@@ -53,15 +53,15 @@ type EventMeta = Partial<Pick<EventMessage, 'retry' | 'id' | 'comments'>>;
53
53
  declare function withEventMeta<T extends object>(container: T, meta: EventMeta): T;
54
54
  declare function getEventMeta(container: unknown): EventMeta | undefined;
55
55
 
56
- interface experimental_HibernationEventIteratorCallback {
56
+ interface HibernationEventIteratorCallback {
57
57
  (id: string): void;
58
58
  }
59
- declare class experimental_HibernationEventIterator<T, TReturn = unknown, TNext = unknown> extends AsyncIteratorClass<T, TReturn, TNext> {
59
+ declare class HibernationEventIterator<T, TReturn = unknown, TNext = unknown> extends AsyncIteratorClass<T, TReturn, TNext> {
60
60
  /**
61
61
  * this property is not transferred to the client, so it should be optional for type safety
62
62
  */
63
- readonly hibernationCallback?: experimental_HibernationEventIteratorCallback;
64
- constructor(hibernationCallback: experimental_HibernationEventIteratorCallback);
63
+ readonly hibernationCallback?: HibernationEventIteratorCallback;
64
+ constructor(hibernationCallback: HibernationEventIteratorCallback);
65
65
  }
66
66
 
67
67
  declare function generateContentDisposition(filename: string): string;
@@ -71,5 +71,5 @@ declare function flattenHeader(header: string | readonly string[] | undefined):
71
71
  declare function replicateStandardLazyResponse(response: StandardLazyResponse, count: number): StandardLazyResponse[];
72
72
  declare function isEventIteratorHeaders(headers: StandardHeaders): boolean;
73
73
 
74
- export { ErrorEvent, EventDecoder, EventDecoderError, EventDecoderStream, EventEncoderError, StandardHeaders, StandardLazyResponse, assertEventComment, assertEventId, assertEventName, assertEventRetry, decodeEventMessage, encodeEventComments, encodeEventData, encodeEventMessage, experimental_HibernationEventIterator, flattenHeader, generateContentDisposition, getEventMeta, getFilenameFromContentDisposition, isEventIteratorHeaders, mergeStandardHeaders, replicateStandardLazyResponse, withEventMeta };
75
- export type { ErrorEventOptions, EventDecoderOptions, EventMessage, EventMeta, experimental_HibernationEventIteratorCallback };
74
+ export { ErrorEvent, EventDecoder, EventDecoderError, EventDecoderStream, EventEncoderError, HibernationEventIterator, StandardHeaders, StandardLazyResponse, assertEventComment, assertEventId, assertEventName, assertEventRetry, decodeEventMessage, encodeEventComments, encodeEventData, encodeEventMessage, flattenHeader, generateContentDisposition, getEventMeta, getFilenameFromContentDisposition, isEventIteratorHeaders, mergeStandardHeaders, replicateStandardLazyResponse, withEventMeta };
75
+ export type { ErrorEventOptions, EventDecoderOptions, EventMessage, EventMeta, HibernationEventIteratorCallback };
package/dist/index.d.ts CHANGED
@@ -53,15 +53,15 @@ type EventMeta = Partial<Pick<EventMessage, 'retry' | 'id' | 'comments'>>;
53
53
  declare function withEventMeta<T extends object>(container: T, meta: EventMeta): T;
54
54
  declare function getEventMeta(container: unknown): EventMeta | undefined;
55
55
 
56
- interface experimental_HibernationEventIteratorCallback {
56
+ interface HibernationEventIteratorCallback {
57
57
  (id: string): void;
58
58
  }
59
- declare class experimental_HibernationEventIterator<T, TReturn = unknown, TNext = unknown> extends AsyncIteratorClass<T, TReturn, TNext> {
59
+ declare class HibernationEventIterator<T, TReturn = unknown, TNext = unknown> extends AsyncIteratorClass<T, TReturn, TNext> {
60
60
  /**
61
61
  * this property is not transferred to the client, so it should be optional for type safety
62
62
  */
63
- readonly hibernationCallback?: experimental_HibernationEventIteratorCallback;
64
- constructor(hibernationCallback: experimental_HibernationEventIteratorCallback);
63
+ readonly hibernationCallback?: HibernationEventIteratorCallback;
64
+ constructor(hibernationCallback: HibernationEventIteratorCallback);
65
65
  }
66
66
 
67
67
  declare function generateContentDisposition(filename: string): string;
@@ -71,5 +71,5 @@ declare function flattenHeader(header: string | readonly string[] | undefined):
71
71
  declare function replicateStandardLazyResponse(response: StandardLazyResponse, count: number): StandardLazyResponse[];
72
72
  declare function isEventIteratorHeaders(headers: StandardHeaders): boolean;
73
73
 
74
- export { ErrorEvent, EventDecoder, EventDecoderError, EventDecoderStream, EventEncoderError, StandardHeaders, StandardLazyResponse, assertEventComment, assertEventId, assertEventName, assertEventRetry, decodeEventMessage, encodeEventComments, encodeEventData, encodeEventMessage, experimental_HibernationEventIterator, flattenHeader, generateContentDisposition, getEventMeta, getFilenameFromContentDisposition, isEventIteratorHeaders, mergeStandardHeaders, replicateStandardLazyResponse, withEventMeta };
75
- export type { ErrorEventOptions, EventDecoderOptions, EventMessage, EventMeta, experimental_HibernationEventIteratorCallback };
74
+ export { ErrorEvent, EventDecoder, EventDecoderError, EventDecoderStream, EventEncoderError, HibernationEventIterator, StandardHeaders, StandardLazyResponse, assertEventComment, assertEventId, assertEventName, assertEventRetry, decodeEventMessage, encodeEventComments, encodeEventData, encodeEventMessage, flattenHeader, generateContentDisposition, getEventMeta, getFilenameFromContentDisposition, isEventIteratorHeaders, mergeStandardHeaders, replicateStandardLazyResponse, withEventMeta };
75
+ export type { ErrorEventOptions, EventDecoderOptions, EventMessage, EventMeta, HibernationEventIteratorCallback };
package/dist/index.mjs CHANGED
@@ -182,7 +182,7 @@ function getEventMeta(container) {
182
182
  return isTypescriptObject(container) ? Reflect.get(container, EVENT_SOURCE_META_SYMBOL) : void 0;
183
183
  }
184
184
 
185
- class experimental_HibernationEventIterator extends AsyncIteratorClass {
185
+ class HibernationEventIterator extends AsyncIteratorClass {
186
186
  /**
187
187
  * this property is not transferred to the client, so it should be optional for type safety
188
188
  */
@@ -266,4 +266,4 @@ function isEventIteratorHeaders(headers) {
266
266
  return Boolean(flattenHeader(headers["content-type"])?.startsWith("text/event-stream") && flattenHeader(headers["content-disposition"]) === void 0);
267
267
  }
268
268
 
269
- export { ErrorEvent, EventDecoder, EventDecoderError, EventDecoderStream, EventEncoderError, assertEventComment, assertEventId, assertEventName, assertEventRetry, decodeEventMessage, encodeEventComments, encodeEventData, encodeEventMessage, experimental_HibernationEventIterator, flattenHeader, generateContentDisposition, getEventMeta, getFilenameFromContentDisposition, isEventIteratorHeaders, mergeStandardHeaders, replicateStandardLazyResponse, withEventMeta };
269
+ export { ErrorEvent, EventDecoder, EventDecoderError, EventDecoderStream, EventEncoderError, HibernationEventIterator, assertEventComment, assertEventId, assertEventName, assertEventRetry, decodeEventMessage, encodeEventComments, encodeEventData, encodeEventMessage, flattenHeader, generateContentDisposition, getEventMeta, getFilenameFromContentDisposition, isEventIteratorHeaders, mergeStandardHeaders, replicateStandardLazyResponse, withEventMeta };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/standard-server",
3
3
  "type": "module",
4
- "version": "1.7.10",
4
+ "version": "1.8.0",
5
5
  "license": "MIT",
6
6
  "homepage": "https://unnoq.com",
7
7
  "repository": {
@@ -28,7 +28,7 @@
28
28
  "dist"
29
29
  ],
30
30
  "dependencies": {
31
- "@orpc/shared": "1.7.10"
31
+ "@orpc/shared": "1.8.0"
32
32
  },
33
33
  "scripts": {
34
34
  "build": "unbuild",