@orpc/client 2.0.0-beta.42 → 2.0.0-beta.44

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
@@ -17,7 +17,7 @@
17
17
  <img alt="Discord" src="https://img.shields.io/discord/1308966753044398161?color=7389D8&label&logo=discord&logoColor=ffffff" />
18
18
  </a>
19
19
  <a href="https://deepwiki.com/middleapi/orpc">
20
- <img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki">
20
+ <img alt="Ask DeepWiki" src="https://img.shields.io/badge/Ask-DeepWiki-blue" />
21
21
  </a>
22
22
  </div>
23
23
 
@@ -95,14 +95,6 @@ Like what we build over at [middleapi](https://github.com/middleapi)? You can he
95
95
  </tr>
96
96
  </table>
97
97
 
98
- ### Special Sponsors
99
-
100
- <table>
101
- <tr>
102
- <td align="center"><a href="http://twitter.com/rauchg?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Guillermo Rauch"><img src="https://avatars.githubusercontent.com/u/13041?u=1ee8d111657cdd02ff6d253df00978d17ee6d722&amp;v=4" width="279" alt="Guillermo Rauch"/><br />Guillermo Rauch</a></td>
103
- </tr>
104
- </table>
105
-
106
98
  ### Premium Sponsors
107
99
 
108
100
  <table>
@@ -178,7 +170,7 @@ Like what we build over at [middleapi](https://github.com/middleapi)? You can he
178
170
  </tr>
179
171
  </table>
180
172
 
181
- With thanks to [38 past sponsors](https://orpc.dev/sponsors#past-sponsors) who helped get oRPC here.
173
+ With thanks to [39 past sponsors](https://orpc.dev/sponsors#past-sponsors) who helped get oRPC here.
182
174
 
183
175
  ## References
184
176
 
@@ -1,9 +1,9 @@
1
1
  import { value, once } from '@orpc/shared';
2
2
  import { toFetchBody, toFetchHeaders, toStandardLazyResponse } from '@standard-server/fetch';
3
- import { S as StandardLink, R as RPCLinkCodec } from '../../shared/client.Bstqyaro.mjs';
3
+ import { S as StandardLink, R as RPCLinkCodec } from '../../shared/client.B7P_ugvl.mjs';
4
4
  import '@standard-server/core';
5
- import '../../shared/client.DpkGsZt-.mjs';
6
- import '../../shared/client.DD2eNne_.mjs';
5
+ import '../../shared/client.CrHurHrq.mjs';
6
+ import '../../shared/client.BLfXUpyF.mjs';
7
7
 
8
8
  const GET_SUPPORTED_DUPLEX_MODE = once(() => {
9
9
  try {
@@ -55,6 +55,12 @@ class FetchLinkTransport {
55
55
  }
56
56
  const fetch = this.fetch;
57
57
  const response = await fetch(url, init, options, path);
58
+ if (response.type === "opaqueredirect") {
59
+ throw new TypeError("Unexpected redirect response: redirects are not followed.");
60
+ }
61
+ if (response.type === "opaque") {
62
+ throw new TypeError("Unexpected opaque response: the response is unreadable, likely due to a no-cors request.");
63
+ }
58
64
  const standardResponse = toStandardLazyResponse(response);
59
65
  return standardResponse;
60
66
  }
@@ -1,10 +1,10 @@
1
1
  import { value, AbortError } from '@orpc/shared';
2
2
  import { ClientPeer, encodePeerMessage, decodePeerMessage, isServerPeerSendMessage, isPeerMessage } from '@standard-server/peer';
3
- import { S as StandardLink, R as RPCLinkCodec } from '../../shared/client.Bstqyaro.mjs';
3
+ import { S as StandardLink, R as RPCLinkCodec } from '../../shared/client.B7P_ugvl.mjs';
4
4
  import '@standard-server/core';
5
5
  import '@standard-server/fetch';
6
- import '../../shared/client.DpkGsZt-.mjs';
7
- import '../../shared/client.DD2eNne_.mjs';
6
+ import '../../shared/client.CrHurHrq.mjs';
7
+ import '../../shared/client.BLfXUpyF.mjs';
8
8
 
9
9
  function postMessagePortMessage(port, data, transfer) {
10
10
  if (transfer) {
@@ -1,5 +1,5 @@
1
- import { f as StandardLinkCodec, g as StandardLinkCodecDecodedResponse } from '../../shared/client.BjbdW5Rj.mjs';
2
- export { C as CompositeStandardLinkPlugin, a as StandardLink, h as StandardLinkInterceptor, e as StandardLinkInterceptorOptions, b as StandardLinkOptions, c as StandardLinkPlugin, S as StandardLinkTransport, i as StandardLinkTransportInterceptor, d as StandardLinkTransportInterceptorOptions } from '../../shared/client.BjbdW5Rj.mjs';
1
+ import { f as StandardLinkCodec, g as StandardLinkCodecDecodedResponse } from '../../shared/client.BzAY7ZC2.mjs';
2
+ export { C as CompositeStandardLinkPlugin, a as StandardLink, h as StandardLinkInterceptor, e as StandardLinkInterceptorOptions, b as StandardLinkOptions, c as StandardLinkPlugin, S as StandardLinkTransport, i as StandardLinkTransportInterceptor, d as StandardLinkTransportInterceptorOptions } from '../../shared/client.BzAY7ZC2.mjs';
3
3
  import { Value, Promisable, Public } from '@orpc/shared';
4
4
  import { StandardUrl, StandardHeaders, StandardRequest, StandardLazyResponse } from '@standard-server/core';
5
5
  import { ClientContext, ClientOptions } from '../../index.mjs';
@@ -1,5 +1,5 @@
1
- import { f as StandardLinkCodec, g as StandardLinkCodecDecodedResponse } from '../../shared/client.DiHfJmHK.js';
2
- export { C as CompositeStandardLinkPlugin, a as StandardLink, h as StandardLinkInterceptor, e as StandardLinkInterceptorOptions, b as StandardLinkOptions, c as StandardLinkPlugin, S as StandardLinkTransport, i as StandardLinkTransportInterceptor, d as StandardLinkTransportInterceptorOptions } from '../../shared/client.DiHfJmHK.js';
1
+ import { f as StandardLinkCodec, g as StandardLinkCodecDecodedResponse } from '../../shared/client.CHH2CNMj.js';
2
+ export { C as CompositeStandardLinkPlugin, a as StandardLink, h as StandardLinkInterceptor, e as StandardLinkInterceptorOptions, b as StandardLinkOptions, c as StandardLinkPlugin, S as StandardLinkTransport, i as StandardLinkTransportInterceptor, d as StandardLinkTransportInterceptorOptions } from '../../shared/client.CHH2CNMj.js';
3
3
  import { Value, Promisable, Public } from '@orpc/shared';
4
4
  import { StandardUrl, StandardHeaders, StandardRequest, StandardLazyResponse } from '@standard-server/core';
5
5
  import { ClientContext, ClientOptions } from '../../index.js';
@@ -1,6 +1,6 @@
1
- export { C as CompositeStandardLinkPlugin, R as RPCLinkCodec, S as StandardLink } from '../../shared/client.Bstqyaro.mjs';
1
+ export { C as CompositeStandardLinkPlugin, R as RPCLinkCodec, S as StandardLink } from '../../shared/client.B7P_ugvl.mjs';
2
2
  import '@orpc/shared';
3
3
  import '@standard-server/core';
4
4
  import '@standard-server/fetch';
5
- import '../../shared/client.DpkGsZt-.mjs';
6
- import '../../shared/client.DD2eNne_.mjs';
5
+ import '../../shared/client.CrHurHrq.mjs';
6
+ import '../../shared/client.BLfXUpyF.mjs';
@@ -1,10 +1,10 @@
1
1
  import { runWithSignal, AbortError, sleep, promiseWithResolvers, sequential, loadBytes, toStringOrBytes } from '@orpc/shared';
2
2
  import { ClientPeer, encodePeerMessage, decodePeerMessage, isServerPeerSendMessage } from '@standard-server/peer';
3
- import { S as StandardLink, R as RPCLinkCodec } from '../../shared/client.Bstqyaro.mjs';
3
+ import { S as StandardLink, R as RPCLinkCodec } from '../../shared/client.B7P_ugvl.mjs';
4
4
  import '@standard-server/core';
5
5
  import '@standard-server/fetch';
6
- import '../../shared/client.DpkGsZt-.mjs';
7
- import '../../shared/client.DD2eNne_.mjs';
6
+ import '../../shared/client.CrHurHrq.mjs';
7
+ import '../../shared/client.BLfXUpyF.mjs';
8
8
 
9
9
  const WEBSOCKET_CONNECTING = 0;
10
10
  const WEBSOCKET_OPEN = 1;
package/dist/index.d.mts CHANGED
@@ -1,10 +1,9 @@
1
1
  import { WrapAsyncIteratorOptions, AsyncIteratorClass, Interceptor, PromiseWithError, ThrowableError, Promisable } from '@orpc/shared';
2
2
  export { AsyncCleanupFn, AsyncIteratorClass, AsyncIteratorClassNextFn, PromiseWithError as ClientPromiseResult, MaybeOptionalOptions, PromiseWithError, Registry, ThrowableError, asyncIteratorToStream, asyncIteratorToUnproxiedDataStream, consumeAsyncIterator, consumeAsyncIterator as consumeEventIterator, asyncIteratorToStream as eventIteratorToStream, asyncIteratorToUnproxiedDataStream as eventIteratorToUnproxiedDataStream, onAsyncIteratorObjectError, onError, onFinish, onReadableStreamError, onStart, onSuccess, streamToAsyncIteratorObject, streamToAsyncIteratorObject as streamToEventIterator } from '@orpc/shared';
3
- import { C as ClientContext, a as ClientOptions, c as AnyNestedClient, I as InferClientContext, d as InferClientError, e as Client, b as ClientLink, A as AnyORPCError, f as ClientRest, F as FriendlyClientOptions, O as ORPCErrorCode, g as ORPCErrorJSON, h as ORPCError, M as MalformedResponseErrorOptions } from './shared/client.Dw9_40WO.mjs';
4
- export { i as AnyORPCErrorJSON, j as COMMON_ERROR_STATUS_MAP, k as InferClientBodyInputs, l as InferClientBodyOutputs, m as InferClientErrors, n as InferClientInputs, o as InferClientOutputs, p as MalformedResponseError, N as NestedClient, q as ORPCErrorOptions } from './shared/client.Dw9_40WO.mjs';
5
- import { StandardResponse } from '@standard-server/core';
6
- export { ErrorEvent, EventMeta, StandardBody, StandardBodyHint, StandardHeaders, StandardLazyRequest, StandardLazyResponse, StandardMethod, StandardRequest, StandardResponse, StandardUrl, getEventMeta, unwrapEvent, withEventMeta } from '@standard-server/core';
3
+ import { C as ClientContext, a as ClientOptions, c as AnyNestedClient, I as InferClientContext, d as InferClientError, e as Client, b as ClientLink, A as AnyORPCError, f as ClientRest, F as FriendlyClientOptions, O as ORPCErrorCode, g as ORPCErrorJSON, h as ORPCError } from './shared/client.DZHZRyR6.mjs';
4
+ export { i as AnyORPCErrorJSON, j as COMMON_ERROR_STATUS_MAP, k as InferClientBodyInputs, l as InferClientBodyOutputs, m as InferClientErrors, n as InferClientInputs, o as InferClientOutputs, M as MalformedResponseError, p as MalformedResponseErrorOptions, N as NestedClient, q as ORPCErrorOptions } from './shared/client.DZHZRyR6.mjs';
7
5
  export { R as RPCJsonSerialization, a as RPCJsonSerializationMeta, b as RPCJsonSerializer, c as RPCJsonSerializerHandler, d as RPCJsonSerializerOptions, e as RPCSerializer, f as RPCSerializerOptions, g as RPCSerializerSerializeOptions } from './shared/client.BPa_Mmuh.mjs';
6
+ export { ErrorEvent, EventMeta, StandardBody, StandardBodyHint, StandardHeaders, StandardLazyRequest, StandardLazyResponse, StandardMethod, StandardRequest, StandardResponse, StandardUrl, getEventMeta, unwrapEvent, withEventMeta } from '@standard-server/core';
8
7
 
9
8
  declare function wrapAsyncIteratorPreservingEventMeta<TYield, TReturn, TMappedYield = TYield, TMappedReturn = TReturn>(iterator: AsyncIterator<TYield, TReturn>, { mapResult, mapError, ...rest }: WrapAsyncIteratorOptions<TYield, TReturn, TMappedYield, TMappedReturn>): AsyncIteratorClass<TMappedYield, TMappedReturn>;
10
9
 
@@ -132,16 +131,6 @@ declare function isDefinedError<T>(error: T): error is Extract<T, AnyORPCError>;
132
131
  declare function toORPCError<T>(error: T): Extract<T, AnyORPCError> | ORPCError<'INTERNAL_SERVER_ERROR', undefined>;
133
132
  declare function isORPCErrorJson(json: unknown): json is ORPCErrorJSON<ORPCErrorCode, unknown>;
134
133
  declare function createORPCErrorFromJson<TCode extends ORPCErrorCode, TData>(json: ORPCErrorJSON<TCode, TData>, options?: ErrorOptions): ORPCError<TCode, TData>;
135
- /**
136
- * Creates the `MALFORMED_ORPC_RESPONSE` `ORPCError` used when a response
137
- * does not follow the expected oRPC format. Unless overridden via `options.message`,
138
- * the message is inferred from the response body or status. The `cause` is a
139
- * `MalformedResponseError` carrying the resolved response.
140
- *
141
- * @see {@link https://orpc.dev/docs/rpc/link#malformed-responses | RPC Link - Malformed Responses}
142
- * @see {@link https://orpc.dev/docs/openapi/link#malformed-responses | OpenAPI Link - Malformed Responses}
143
- */
144
- declare function createORPCErrorFromMalformedResponse(options: MalformedResponseErrorOptions): ORPCError<'MALFORMED_ORPC_RESPONSE', StandardResponse>;
145
134
  /**
146
135
  * Clones an `ORPCError` while preserving its prototype chain, so instances of
147
136
  * `ORPCError` subclasses remain `instanceof` their class.
@@ -152,5 +141,5 @@ declare function createORPCErrorFromMalformedResponse(options: MalformedResponse
152
141
  */
153
142
  declare function cloneORPCError<T extends AnyORPCError>(error: T): T;
154
143
 
155
- export { AnyNestedClient, AnyORPCError, Client, ClientContext, ClientLink, ClientOptions, ClientRest, DynamicLink, FriendlyClientOptions, InferClientContext, InferClientError, InferClientError as InferClientErrorUnion, MalformedResponseErrorOptions, ORPCError, ORPCErrorCode, ORPCErrorJSON, RECURSIVE_CLIENT_UNWRAP_KEYS, cloneORPCError, createORPCClient, createORPCErrorFromJson, createORPCErrorFromMalformedResponse, createSafeClient, isDefinedError, isORPCErrorJson, resolveClientRest, resolveFriendlyClientOptions, safe, toORPCError, wrapAsyncIteratorPreservingEventMeta };
144
+ export { AnyNestedClient, AnyORPCError, Client, ClientContext, ClientLink, ClientOptions, ClientRest, DynamicLink, FriendlyClientOptions, InferClientContext, InferClientError, InferClientError as InferClientErrorUnion, ORPCError, ORPCErrorCode, ORPCErrorJSON, RECURSIVE_CLIENT_UNWRAP_KEYS, cloneORPCError, createORPCClient, createORPCErrorFromJson, createSafeClient, isDefinedError, isORPCErrorJson, resolveClientRest, resolveFriendlyClientOptions, safe, toORPCError, wrapAsyncIteratorPreservingEventMeta };
156
145
  export type { ORPCClientInterceptor, ORPCClientInterceptorOptions, ORPCClientOptions, ORPCClientScoped, ORPCClientScopedOptions, SafeClient, SafeResult };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,9 @@
1
1
  import { WrapAsyncIteratorOptions, AsyncIteratorClass, Interceptor, PromiseWithError, ThrowableError, Promisable } from '@orpc/shared';
2
2
  export { AsyncCleanupFn, AsyncIteratorClass, AsyncIteratorClassNextFn, PromiseWithError as ClientPromiseResult, MaybeOptionalOptions, PromiseWithError, Registry, ThrowableError, asyncIteratorToStream, asyncIteratorToUnproxiedDataStream, consumeAsyncIterator, consumeAsyncIterator as consumeEventIterator, asyncIteratorToStream as eventIteratorToStream, asyncIteratorToUnproxiedDataStream as eventIteratorToUnproxiedDataStream, onAsyncIteratorObjectError, onError, onFinish, onReadableStreamError, onStart, onSuccess, streamToAsyncIteratorObject, streamToAsyncIteratorObject as streamToEventIterator } from '@orpc/shared';
3
- import { C as ClientContext, a as ClientOptions, c as AnyNestedClient, I as InferClientContext, d as InferClientError, e as Client, b as ClientLink, A as AnyORPCError, f as ClientRest, F as FriendlyClientOptions, O as ORPCErrorCode, g as ORPCErrorJSON, h as ORPCError, M as MalformedResponseErrorOptions } from './shared/client.Dw9_40WO.js';
4
- export { i as AnyORPCErrorJSON, j as COMMON_ERROR_STATUS_MAP, k as InferClientBodyInputs, l as InferClientBodyOutputs, m as InferClientErrors, n as InferClientInputs, o as InferClientOutputs, p as MalformedResponseError, N as NestedClient, q as ORPCErrorOptions } from './shared/client.Dw9_40WO.js';
5
- import { StandardResponse } from '@standard-server/core';
6
- export { ErrorEvent, EventMeta, StandardBody, StandardBodyHint, StandardHeaders, StandardLazyRequest, StandardLazyResponse, StandardMethod, StandardRequest, StandardResponse, StandardUrl, getEventMeta, unwrapEvent, withEventMeta } from '@standard-server/core';
3
+ import { C as ClientContext, a as ClientOptions, c as AnyNestedClient, I as InferClientContext, d as InferClientError, e as Client, b as ClientLink, A as AnyORPCError, f as ClientRest, F as FriendlyClientOptions, O as ORPCErrorCode, g as ORPCErrorJSON, h as ORPCError } from './shared/client.DZHZRyR6.js';
4
+ export { i as AnyORPCErrorJSON, j as COMMON_ERROR_STATUS_MAP, k as InferClientBodyInputs, l as InferClientBodyOutputs, m as InferClientErrors, n as InferClientInputs, o as InferClientOutputs, M as MalformedResponseError, p as MalformedResponseErrorOptions, N as NestedClient, q as ORPCErrorOptions } from './shared/client.DZHZRyR6.js';
7
5
  export { R as RPCJsonSerialization, a as RPCJsonSerializationMeta, b as RPCJsonSerializer, c as RPCJsonSerializerHandler, d as RPCJsonSerializerOptions, e as RPCSerializer, f as RPCSerializerOptions, g as RPCSerializerSerializeOptions } from './shared/client.BPa_Mmuh.js';
6
+ export { ErrorEvent, EventMeta, StandardBody, StandardBodyHint, StandardHeaders, StandardLazyRequest, StandardLazyResponse, StandardMethod, StandardRequest, StandardResponse, StandardUrl, getEventMeta, unwrapEvent, withEventMeta } from '@standard-server/core';
8
7
 
9
8
  declare function wrapAsyncIteratorPreservingEventMeta<TYield, TReturn, TMappedYield = TYield, TMappedReturn = TReturn>(iterator: AsyncIterator<TYield, TReturn>, { mapResult, mapError, ...rest }: WrapAsyncIteratorOptions<TYield, TReturn, TMappedYield, TMappedReturn>): AsyncIteratorClass<TMappedYield, TMappedReturn>;
10
9
 
@@ -132,16 +131,6 @@ declare function isDefinedError<T>(error: T): error is Extract<T, AnyORPCError>;
132
131
  declare function toORPCError<T>(error: T): Extract<T, AnyORPCError> | ORPCError<'INTERNAL_SERVER_ERROR', undefined>;
133
132
  declare function isORPCErrorJson(json: unknown): json is ORPCErrorJSON<ORPCErrorCode, unknown>;
134
133
  declare function createORPCErrorFromJson<TCode extends ORPCErrorCode, TData>(json: ORPCErrorJSON<TCode, TData>, options?: ErrorOptions): ORPCError<TCode, TData>;
135
- /**
136
- * Creates the `MALFORMED_ORPC_RESPONSE` `ORPCError` used when a response
137
- * does not follow the expected oRPC format. Unless overridden via `options.message`,
138
- * the message is inferred from the response body or status. The `cause` is a
139
- * `MalformedResponseError` carrying the resolved response.
140
- *
141
- * @see {@link https://orpc.dev/docs/rpc/link#malformed-responses | RPC Link - Malformed Responses}
142
- * @see {@link https://orpc.dev/docs/openapi/link#malformed-responses | OpenAPI Link - Malformed Responses}
143
- */
144
- declare function createORPCErrorFromMalformedResponse(options: MalformedResponseErrorOptions): ORPCError<'MALFORMED_ORPC_RESPONSE', StandardResponse>;
145
134
  /**
146
135
  * Clones an `ORPCError` while preserving its prototype chain, so instances of
147
136
  * `ORPCError` subclasses remain `instanceof` their class.
@@ -152,5 +141,5 @@ declare function createORPCErrorFromMalformedResponse(options: MalformedResponse
152
141
  */
153
142
  declare function cloneORPCError<T extends AnyORPCError>(error: T): T;
154
143
 
155
- export { AnyNestedClient, AnyORPCError, Client, ClientContext, ClientLink, ClientOptions, ClientRest, DynamicLink, FriendlyClientOptions, InferClientContext, InferClientError, InferClientError as InferClientErrorUnion, MalformedResponseErrorOptions, ORPCError, ORPCErrorCode, ORPCErrorJSON, RECURSIVE_CLIENT_UNWRAP_KEYS, cloneORPCError, createORPCClient, createORPCErrorFromJson, createORPCErrorFromMalformedResponse, createSafeClient, isDefinedError, isORPCErrorJson, resolveClientRest, resolveFriendlyClientOptions, safe, toORPCError, wrapAsyncIteratorPreservingEventMeta };
144
+ export { AnyNestedClient, AnyORPCError, Client, ClientContext, ClientLink, ClientOptions, ClientRest, DynamicLink, FriendlyClientOptions, InferClientContext, InferClientError, InferClientError as InferClientErrorUnion, ORPCError, ORPCErrorCode, ORPCErrorJSON, RECURSIVE_CLIENT_UNWRAP_KEYS, cloneORPCError, createORPCClient, createORPCErrorFromJson, createSafeClient, isDefinedError, isORPCErrorJson, resolveClientRest, resolveFriendlyClientOptions, safe, toORPCError, wrapAsyncIteratorPreservingEventMeta };
156
145
  export type { ORPCClientInterceptor, ORPCClientInterceptorOptions, ORPCClientOptions, ORPCClientScoped, ORPCClientScopedOptions, SafeClient, SafeResult };
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { b as isDefinedError } from './shared/client.DpkGsZt-.mjs';
2
- export { d as RPCJsonSerializer, R as RPCSerializer, e as cloneORPCError, a as createORPCErrorFromJson, c as createORPCErrorFromMalformedResponse, i as isORPCErrorJson, t as toORPCError, w as wrapAsyncIteratorPreservingEventMeta } from './shared/client.DpkGsZt-.mjs';
1
+ import { a as isDefinedError } from './shared/client.BLfXUpyF.mjs';
2
+ export { b as RPCJsonSerializer, R as RPCSerializer, d as cloneORPCError, c as createORPCErrorFromJson, i as isORPCErrorJson, t as toORPCError, w as wrapAsyncIteratorPreservingEventMeta } from './shared/client.BLfXUpyF.mjs';
3
3
  import { toArray, intercept, isTypescriptObject } from '@orpc/shared';
4
4
  export { AsyncIteratorClass, asyncIteratorToStream, asyncIteratorToUnproxiedDataStream, consumeAsyncIterator, consumeAsyncIterator as consumeEventIterator, asyncIteratorToStream as eventIteratorToStream, asyncIteratorToUnproxiedDataStream as eventIteratorToUnproxiedDataStream, onAsyncIteratorObjectError, onError, onFinish, onReadableStreamError, onStart, onSuccess, streamToAsyncIteratorObject, streamToAsyncIteratorObject as streamToEventIterator } from '@orpc/shared';
5
- export { C as COMMON_ERROR_STATUS_MAP, M as MalformedResponseError, O as ORPCError } from './shared/client.DD2eNne_.mjs';
5
+ export { C as COMMON_ERROR_STATUS_MAP, M as MalformedResponseError, O as ORPCError } from './shared/client.CrHurHrq.mjs';
6
6
  export { ErrorEvent, getEventMeta, unwrapEvent, withEventMeta } from '@standard-server/core';
7
7
 
8
8
  const RECURSIVE_CLIENT_UNWRAP_KEYS = /* @__PURE__ */ new Set([
@@ -54,6 +54,7 @@ interface BatchLinkPluginOptions<T extends ClientContext> {
54
54
  wait?: number;
55
55
  /**
56
56
  * The batch response mode.
57
+ * A `buffered` batch still streams once a procedure in it returns a stream.
57
58
  *
58
59
  * @default 'streaming'
59
60
  */
@@ -365,6 +366,9 @@ interface RetryAfterLinkPluginOptions<T extends ClientContext> {
365
366
  * The Retry After Link Plugin automatically retries requests based on server `retry-after` header.
366
367
  * This is particularly useful for handling rate limiting and temporary server unavailability.
367
368
  *
369
+ * @remarks
370
+ * **Note**: Requests with a stream or async iterator body are never retried, since the body cannot be resent.
371
+ *
368
372
  * @see {@link https://orpc.dev/docs/plugins/retry-after | Retry After Plugin}
369
373
  */
370
374
  declare class RetryAfterLinkPlugin<T extends ClientContext> implements StandardLinkPlugin<T> {
@@ -54,6 +54,7 @@ interface BatchLinkPluginOptions<T extends ClientContext> {
54
54
  wait?: number;
55
55
  /**
56
56
  * The batch response mode.
57
+ * A `buffered` batch still streams once a procedure in it returns a stream.
57
58
  *
58
59
  * @default 'streaming'
59
60
  */
@@ -365,6 +366,9 @@ interface RetryAfterLinkPluginOptions<T extends ClientContext> {
365
366
  * The Retry After Link Plugin automatically retries requests based on server `retry-after` header.
366
367
  * This is particularly useful for handling rate limiting and temporary server unavailability.
367
368
  *
369
+ * @remarks
370
+ * **Note**: Requests with a stream or async iterator body are never retried, since the body cannot be resent.
371
+ *
368
372
  * @see {@link https://orpc.dev/docs/plugins/retry-after | Retry After Plugin}
369
373
  */
370
374
  declare class RetryAfterLinkPlugin<T extends ClientContext> implements StandardLinkPlugin<T> {
@@ -2,7 +2,7 @@ import { toArray, value, splitInHalf, promiseWithResolvers, safeEncodeURICompone
2
2
  import { parseStandardUrl, flattenStandardHeader, generateContentDisposition, getEventMeta } from '@standard-server/core';
3
3
  import { ClientPeer, isServerPeerSendMessage, decodePeerMessage } from '@standard-server/peer';
4
4
  import { toFetchHeaders, toStandardBody } from '@standard-server/fetch';
5
- import { C as COMMON_ERROR_STATUS_MAP } from '../shared/client.DD2eNne_.mjs';
5
+ import { C as COMMON_ERROR_STATUS_MAP } from '../shared/client.CrHurHrq.mjs';
6
6
 
7
7
  class BatchLinkPlugin {
8
8
  name = "~batch";
@@ -774,13 +774,14 @@ class RetryLinkPlugin {
774
774
  let lastEventRetry;
775
775
  let callback;
776
776
  let attempt = 1;
777
+ let isIteratorAborted = false;
777
778
  const callNext = async (initialError) => {
778
779
  let currentError = initialError;
779
780
  while (true) {
780
781
  const updatedCallOptions = { ...callOptions, lastEventId };
781
782
  let retryDelayMs = 0;
782
783
  if (currentError) {
783
- if (attempt > maxAttempts) {
784
+ if (isIteratorAborted || attempt > maxAttempts) {
784
785
  throw currentError.error;
785
786
  }
786
787
  const attemptOptions = {
@@ -802,6 +803,9 @@ class RetryLinkPlugin {
802
803
  try {
803
804
  if (currentError) {
804
805
  await sleep(retryDelayMs, { signal: updatedCallOptions.signal });
806
+ if (isIteratorAborted) {
807
+ throw currentError.error;
808
+ }
805
809
  attempt++;
806
810
  }
807
811
  currentError = void 0;
@@ -822,7 +826,6 @@ class RetryLinkPlugin {
822
826
  return output;
823
827
  }
824
828
  let current = output;
825
- let isIteratorAborted = false;
826
829
  return override(() => current, new AsyncIteratorClass(
827
830
  async () => {
828
831
  while (true) {
@@ -874,6 +877,10 @@ class RetryAfterLinkPlugin {
874
877
  }
875
878
  init(options) {
876
879
  const interceptor = async (interceptorOptions) => {
880
+ const { body } = interceptorOptions.request;
881
+ if (body instanceof ReadableStream || isAsyncIteratorObject(body)) {
882
+ return interceptorOptions.next();
883
+ }
877
884
  const startTime = Date.now();
878
885
  let attemptCount = 0;
879
886
  while (true) {
@@ -1,7 +1,8 @@
1
1
  import { sortPlugins, runWithSpan, ORPC_NAME, getTracer, isAsyncIteratorObject, override, traceAsyncIterator, traceReadableStream, intercept, value, pathToHttpPath, stringifyJSON } from '@orpc/shared';
2
2
  import { mergeStandardHeaders, parseStandardUrl } from '@standard-server/core';
3
3
  import { toStandardHeaders } from '@standard-server/fetch';
4
- import { R as RPCSerializer, c as createORPCErrorFromMalformedResponse, i as isORPCErrorJson, a as createORPCErrorFromJson } from './client.DpkGsZt-.mjs';
4
+ import { M as MalformedResponseError } from './client.CrHurHrq.mjs';
5
+ import { R as RPCSerializer, i as isORPCErrorJson, c as createORPCErrorFromJson } from './client.BLfXUpyF.mjs';
5
6
 
6
7
  class CompositeStandardLinkPlugin {
7
8
  name = "~composite";
@@ -30,7 +31,7 @@ class StandardLink {
30
31
  interceptors;
31
32
  transportInterceptors;
32
33
  /**
33
- * @throws ORPCError, transport-level errors (network failures, timeouts, etc.)
34
+ * @throws ORPCError, MalformedResponseError, transport-level errors (network failures, timeouts, etc.)
34
35
  */
35
36
  call(path, input, options) {
36
37
  return runWithSpan(`${ORPC_NAME}.${path.join("/")}`, (span) => {
@@ -140,7 +141,7 @@ class RPCLinkCodec {
140
141
  try {
141
142
  return this.serializer.deserialize(body);
142
143
  } catch (cause) {
143
- throw createORPCErrorFromMalformedResponse({
144
+ throw new MalformedResponseError({
144
145
  message: "Invalid RPC response format.",
145
146
  response: { status: response.status, headers: response.headers, body },
146
147
  cause
@@ -151,10 +152,7 @@ class RPCLinkCodec {
151
152
  if (isORPCErrorJson(deserialized)) {
152
153
  return { kind: "error", error: createORPCErrorFromJson(deserialized) };
153
154
  }
154
- return {
155
- kind: "error",
156
- error: createORPCErrorFromMalformedResponse({ response: { headers: response.headers, status: response.status, body } })
157
- };
155
+ throw new MalformedResponseError({ response: { headers: response.headers, status: response.status, body } });
158
156
  }
159
157
  return { kind: "output", output: deserialized };
160
158
  }
@@ -1,6 +1,6 @@
1
- import { isPlainObject, wrapAsyncIterator, isTypescriptObject, NullProtoObj, copyOnWrite, isAsyncIteratorObject, stringifyJSON } from '@orpc/shared';
1
+ import { isPlainObject, wrapAsyncIterator, isTypescriptObject, NullProtoObj, parseBigIntString, DEFAULT_MAX_BIGINT_DIGITS, copyOnWrite, isAsyncIteratorObject, stringifyJSON } from '@orpc/shared';
2
2
  import { getEventMeta, withEventMeta, ErrorEvent } from '@standard-server/core';
3
- import { O as ORPCError, M as MalformedResponseError, C as COMMON_ERROR_STATUS_MAP } from './client.DD2eNne_.mjs';
3
+ import { O as ORPCError } from './client.CrHurHrq.mjs';
4
4
 
5
5
  function isDefinedError(error) {
6
6
  return error instanceof ORPCError && error.defined;
@@ -26,29 +26,6 @@ function createORPCErrorFromJson(json, options = {}) {
26
26
  error.defined = json.defined;
27
27
  return error;
28
28
  }
29
- function createORPCErrorFromMalformedResponse(options) {
30
- const error = new ORPCError("MALFORMED_ORPC_RESPONSE", {
31
- message: options.message ?? inferMalformedResponseMessage(options.response),
32
- data: options.response
33
- });
34
- error.cause = new MalformedResponseError({ ...options, message: error.message });
35
- return error;
36
- }
37
- const INFERRED_MESSAGE_MIN_LENGTH = 1;
38
- const INFERRED_MESSAGE_MAX_LENGTH = 256;
39
- function isInferableMessage(text) {
40
- return text.length >= INFERRED_MESSAGE_MIN_LENGTH && text.length <= INFERRED_MESSAGE_MAX_LENGTH;
41
- }
42
- function inferMalformedResponseMessage(response) {
43
- if (typeof response.body === "string" && isInferableMessage(response.body)) {
44
- return response.body;
45
- }
46
- if (isPlainObject(response.body) && typeof response.body.message === "string" && isInferableMessage(response.body.message)) {
47
- return response.body.message;
48
- }
49
- const commonCode = Object.entries(COMMON_ERROR_STATUS_MAP).find(([, status]) => status === response.status)?.[0];
50
- return commonCode?.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
51
- }
52
29
  function cloneORPCError(error) {
53
30
  const cloned = new ORPCError(error.code, {
54
31
  message: error.message,
@@ -95,6 +72,16 @@ function assertSerializedType(ok, type, expected) {
95
72
  throw invalidSerializedData(`type "${type}" expects ${expected}.`);
96
73
  }
97
74
  }
75
+ function isWalkable(value) {
76
+ return Array.isArray(value) || isPlainObject(value);
77
+ }
78
+ function walkInto(parent, key, original, restored) {
79
+ const value = parent[key];
80
+ if (!isWalkable(value) || restored?.has(value)) {
81
+ throw invalidSerializedData(`segment "${key}" cannot be walked into.`);
82
+ }
83
+ return value === original ? copyOnWrite(parent, key, original) : value;
84
+ }
98
85
  const DEFAULT_RPC_JSON_SERIALIZER_HANDLERS = {
99
86
  undefined: {
100
87
  condition(data) {
@@ -118,7 +105,11 @@ const DEFAULT_RPC_JSON_SERIALIZER_HANDLERS = {
118
105
  },
119
106
  deserialize(serialized) {
120
107
  assertSerializedType(typeof serialized === "string", "bigint", "a string");
121
- return BigInt(serialized);
108
+ const value = parseBigIntString(serialized, DEFAULT_MAX_BIGINT_DIGITS);
109
+ if (value === void 0) {
110
+ throw invalidSerializedData(`type "bigint" expects a decimal integer string of at most ${DEFAULT_MAX_BIGINT_DIGITS} digits.`);
111
+ }
112
+ return value;
122
113
  },
123
114
  isTerminal: true
124
115
  },
@@ -368,7 +359,7 @@ class RPCJsonSerializer {
368
359
  let preSegment = "json";
369
360
  for (let j = 0; j < segments.length; j++) {
370
361
  original = original[preSegment];
371
- currentRef = copyOnWrite(currentRef, preSegment, original);
362
+ currentRef = walkInto(currentRef, preSegment, original);
372
363
  preSegment = segments[j];
373
364
  if (!Object.hasOwn(currentRef, preSegment)) {
374
365
  throw invalidSerializedData(`segment "${preSegment}" does not exist.`);
@@ -377,25 +368,54 @@ class RPCJsonSerializer {
377
368
  currentRef[preSegment] = blob;
378
369
  }
379
370
  }
380
- if (serialized.meta) {
381
- for (const item of serialized.meta) {
371
+ const meta = serialized.meta;
372
+ if (meta) {
373
+ let restored;
374
+ const chain = meta.length === 1 ? void 0 : [];
375
+ let chainDepth = 0;
376
+ for (const item of meta) {
382
377
  const type = item[0];
383
378
  const handler = this.handlers[type];
384
379
  if (handler === void 0) {
385
380
  throw invalidSerializedData(`type "${type}" is not supported.`);
386
381
  }
382
+ const depth = item.length - 1;
383
+ const shared = Math.min(depth, chainDepth);
384
+ let d = 0;
387
385
  let original = serialized;
388
386
  let currentRef = ref;
389
387
  let preSegment = "json";
390
- for (let i = 1; i < item.length; i++) {
388
+ if (chain !== void 0 && shared > 0) {
389
+ d = 1;
390
+ while (d < shared && chain[3 * d] === item[d]) {
391
+ d++;
392
+ }
393
+ currentRef = chain[3 * d - 2];
394
+ original = chain[3 * d - 1];
395
+ preSegment = item[d];
396
+ if (!Object.hasOwn(currentRef, preSegment)) {
397
+ throw invalidSerializedData(`segment "${preSegment}" does not exist.`);
398
+ }
399
+ }
400
+ while (d < depth) {
391
401
  original = original[preSegment];
392
- currentRef = copyOnWrite(currentRef, preSegment, original);
393
- preSegment = item[i];
402
+ currentRef = walkInto(currentRef, preSegment, original, restored);
403
+ if (chain !== void 0) {
404
+ chain[3 * d] = preSegment;
405
+ chain[3 * d + 1] = currentRef;
406
+ chain[3 * d + 2] = original;
407
+ }
408
+ preSegment = item[++d];
394
409
  if (!Object.hasOwn(currentRef, preSegment)) {
395
410
  throw invalidSerializedData(`segment "${preSegment}" does not exist.`);
396
411
  }
397
412
  }
398
- currentRef[preSegment] = handler.deserialize(currentRef[preSegment]);
413
+ chainDepth = depth;
414
+ const value = handler.deserialize(currentRef[preSegment]);
415
+ currentRef[preSegment] = value;
416
+ if (isWalkable(value)) {
417
+ (restored ??= /* @__PURE__ */ new Set()).add(value);
418
+ }
399
419
  }
400
420
  }
401
421
  return ref.json;
@@ -483,4 +503,4 @@ class RPCSerializer {
483
503
  }
484
504
  }
485
505
 
486
- export { RPCSerializer as R, createORPCErrorFromJson as a, isDefinedError as b, createORPCErrorFromMalformedResponse as c, RPCJsonSerializer as d, cloneORPCError as e, isORPCErrorJson as i, toORPCError as t, wrapAsyncIteratorPreservingEventMeta as w };
506
+ export { RPCSerializer as R, isDefinedError as a, RPCJsonSerializer as b, createORPCErrorFromJson as c, cloneORPCError as d, isORPCErrorJson as i, toORPCError as t, wrapAsyncIteratorPreservingEventMeta as w };
@@ -1,6 +1,6 @@
1
1
  import { Promisable, OrderablePlugin, Interceptor } from '@orpc/shared';
2
2
  import { StandardRequest, StandardLazyResponse } from '@standard-server/core';
3
- import { C as ClientContext, a as ClientOptions, A as AnyORPCError, b as ClientLink } from './client.Dw9_40WO.js';
3
+ import { C as ClientContext, a as ClientOptions, A as AnyORPCError, b as ClientLink } from './client.DZHZRyR6.mjs';
4
4
 
5
5
  type StandardLinkCodecDecodedResponse = {
6
6
  kind: 'output';
@@ -87,7 +87,7 @@ declare class StandardLink<T extends ClientContext> implements ClientLink<T> {
87
87
  private readonly transportInterceptors;
88
88
  constructor(codec: StandardLinkCodec<T>, transport: StandardLinkTransport<T>, options?: StandardLinkOptions<T>);
89
89
  /**
90
- * @throws ORPCError, transport-level errors (network failures, timeouts, etc.)
90
+ * @throws ORPCError, MalformedResponseError, transport-level errors (network failures, timeouts, etc.)
91
91
  */
92
92
  call(path: string[], input: unknown, options: ClientOptions<T>): Promise<unknown>;
93
93
  }
@@ -1,6 +1,6 @@
1
1
  import { Promisable, OrderablePlugin, Interceptor } from '@orpc/shared';
2
2
  import { StandardRequest, StandardLazyResponse } from '@standard-server/core';
3
- import { C as ClientContext, a as ClientOptions, A as AnyORPCError, b as ClientLink } from './client.Dw9_40WO.mjs';
3
+ import { C as ClientContext, a as ClientOptions, A as AnyORPCError, b as ClientLink } from './client.DZHZRyR6.js';
4
4
 
5
5
  type StandardLinkCodecDecodedResponse = {
6
6
  kind: 'output';
@@ -87,7 +87,7 @@ declare class StandardLink<T extends ClientContext> implements ClientLink<T> {
87
87
  private readonly transportInterceptors;
88
88
  constructor(codec: StandardLinkCodec<T>, transport: StandardLinkTransport<T>, options?: StandardLinkOptions<T>);
89
89
  /**
90
- * @throws ORPCError, transport-level errors (network failures, timeouts, etc.)
90
+ * @throws ORPCError, MalformedResponseError, transport-level errors (network failures, timeouts, etc.)
91
91
  */
92
92
  call(path: string[], input: unknown, options: ClientOptions<T>): Promise<unknown>;
93
93
  }
@@ -1,4 +1,4 @@
1
- import { resolveMaybeOptionalOptions, getConstructors } from '@orpc/shared';
1
+ import { resolveMaybeOptionalOptions, getConstructors, isPlainObject } from '@orpc/shared';
2
2
 
3
3
  const COMMON_ERROR_STATUS_MAP = {
4
4
  BAD_REQUEST: 400,
@@ -48,7 +48,7 @@ class ORPCError extends Error {
48
48
  data;
49
49
  constructor(code, ...rest) {
50
50
  const options = resolveMaybeOptionalOptions(rest);
51
- const message = options.message ?? code.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
51
+ const message = options.message ?? codeToMessage(code);
52
52
  super(message, options);
53
53
  this.code = code;
54
54
  this.data = options.data;
@@ -89,9 +89,21 @@ class MalformedResponseError extends Error {
89
89
  name = "MalformedResponseError";
90
90
  response;
91
91
  constructor(options) {
92
- super(options.message, options);
92
+ super(options.message ?? inferMalformedResponseMessage(options.response), options);
93
93
  this.response = options.response;
94
94
  }
95
95
  }
96
+ const INFERRED_MESSAGE_MAX_LENGTH = 256;
97
+ function inferMalformedResponseMessage(response) {
98
+ const candidate = isPlainObject(response.body) ? response.body.message : response.body;
99
+ if (typeof candidate === "string" && candidate.length > 0 && candidate.length <= INFERRED_MESSAGE_MAX_LENGTH) {
100
+ return candidate;
101
+ }
102
+ const commonCode = Object.entries(COMMON_ERROR_STATUS_MAP).find(([, status]) => status === response.status)?.[0];
103
+ return commonCode ? codeToMessage(commonCode) : "Malformed oRPC Response";
104
+ }
105
+ function codeToMessage(code) {
106
+ return code.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
107
+ }
96
108
 
97
109
  export { COMMON_ERROR_STATUS_MAP as C, MalformedResponseError as M, ORPCError as O };
@@ -187,13 +187,20 @@ interface ORPCErrorJSON<TCode extends string, TData> extends Pick<ORPCError<TCod
187
187
  type AnyORPCError = ORPCError<any, any>;
188
188
  type AnyORPCErrorJSON = ORPCErrorJSON<any, any>;
189
189
  interface MalformedResponseErrorOptions extends ErrorOptions {
190
+ /**
191
+ * @default inferred from the response body or status
192
+ */
190
193
  message?: string;
191
194
  response: StandardResponse;
192
195
  }
193
196
  /**
194
- * Error indicating a response does not follow the expected oRPC format, carrying
195
- * the resolved response. Found as the `cause` of a `MALFORMED_ORPC_RESPONSE`
196
- * `ORPCError`.
197
+ * Error thrown by links when a response does not follow the expected oRPC format,
198
+ * for example when a proxy or gateway answers instead of your handler. Carries the
199
+ * resolved response. Unless overridden via `options.message`, the message is
200
+ * inferred from the response body or status.
201
+ *
202
+ * Unlike `ORPCError`, it reaches a handler's callers as a generic `INTERNAL_SERVER_ERROR`
203
+ * when thrown from the handler, so an upstream's response is not sent to them.
197
204
  *
198
205
  * @see {@link https://orpc.dev/docs/rpc/link#malformed-responses | RPC Link - Malformed Responses}
199
206
  * @see {@link https://orpc.dev/docs/openapi/link#malformed-responses | OpenAPI Link - Malformed Responses}
@@ -204,5 +211,5 @@ declare class MalformedResponseError extends Error {
204
211
  constructor(options: MalformedResponseErrorOptions);
205
212
  }
206
213
 
207
- export { ORPCError as h, COMMON_ERROR_STATUS_MAP as j, MalformedResponseError as p };
208
- export type { AnyORPCError as A, ClientContext as C, FriendlyClientOptions as F, InferClientContext as I, MalformedResponseErrorOptions as M, NestedClient as N, ORPCErrorCode as O, ClientOptions as a, ClientLink as b, AnyNestedClient as c, InferClientError as d, Client as e, ClientRest as f, ORPCErrorJSON as g, AnyORPCErrorJSON as i, InferClientBodyInputs as k, InferClientBodyOutputs as l, InferClientErrors as m, InferClientInputs as n, InferClientOutputs as o, ORPCErrorOptions as q };
214
+ export { MalformedResponseError as M, ORPCError as h, COMMON_ERROR_STATUS_MAP as j };
215
+ export type { AnyORPCError as A, ClientContext as C, FriendlyClientOptions as F, InferClientContext as I, NestedClient as N, ORPCErrorCode as O, ClientOptions as a, ClientLink as b, AnyNestedClient as c, InferClientError as d, Client as e, ClientRest as f, ORPCErrorJSON as g, AnyORPCErrorJSON as i, InferClientBodyInputs as k, InferClientBodyOutputs as l, InferClientErrors as m, InferClientInputs as n, InferClientOutputs as o, MalformedResponseErrorOptions as p, ORPCErrorOptions as q };
@@ -187,13 +187,20 @@ interface ORPCErrorJSON<TCode extends string, TData> extends Pick<ORPCError<TCod
187
187
  type AnyORPCError = ORPCError<any, any>;
188
188
  type AnyORPCErrorJSON = ORPCErrorJSON<any, any>;
189
189
  interface MalformedResponseErrorOptions extends ErrorOptions {
190
+ /**
191
+ * @default inferred from the response body or status
192
+ */
190
193
  message?: string;
191
194
  response: StandardResponse;
192
195
  }
193
196
  /**
194
- * Error indicating a response does not follow the expected oRPC format, carrying
195
- * the resolved response. Found as the `cause` of a `MALFORMED_ORPC_RESPONSE`
196
- * `ORPCError`.
197
+ * Error thrown by links when a response does not follow the expected oRPC format,
198
+ * for example when a proxy or gateway answers instead of your handler. Carries the
199
+ * resolved response. Unless overridden via `options.message`, the message is
200
+ * inferred from the response body or status.
201
+ *
202
+ * Unlike `ORPCError`, it reaches a handler's callers as a generic `INTERNAL_SERVER_ERROR`
203
+ * when thrown from the handler, so an upstream's response is not sent to them.
197
204
  *
198
205
  * @see {@link https://orpc.dev/docs/rpc/link#malformed-responses | RPC Link - Malformed Responses}
199
206
  * @see {@link https://orpc.dev/docs/openapi/link#malformed-responses | OpenAPI Link - Malformed Responses}
@@ -204,5 +211,5 @@ declare class MalformedResponseError extends Error {
204
211
  constructor(options: MalformedResponseErrorOptions);
205
212
  }
206
213
 
207
- export { ORPCError as h, COMMON_ERROR_STATUS_MAP as j, MalformedResponseError as p };
208
- export type { AnyORPCError as A, ClientContext as C, FriendlyClientOptions as F, InferClientContext as I, MalformedResponseErrorOptions as M, NestedClient as N, ORPCErrorCode as O, ClientOptions as a, ClientLink as b, AnyNestedClient as c, InferClientError as d, Client as e, ClientRest as f, ORPCErrorJSON as g, AnyORPCErrorJSON as i, InferClientBodyInputs as k, InferClientBodyOutputs as l, InferClientErrors as m, InferClientInputs as n, InferClientOutputs as o, ORPCErrorOptions as q };
214
+ export { MalformedResponseError as M, ORPCError as h, COMMON_ERROR_STATUS_MAP as j };
215
+ export type { AnyORPCError as A, ClientContext as C, FriendlyClientOptions as F, InferClientContext as I, NestedClient as N, ORPCErrorCode as O, ClientOptions as a, ClientLink as b, AnyNestedClient as c, InferClientError as d, Client as e, ClientRest as f, ORPCErrorJSON as g, AnyORPCErrorJSON as i, InferClientBodyInputs as k, InferClientBodyOutputs as l, InferClientErrors as m, InferClientInputs as n, InferClientOutputs as o, MalformedResponseErrorOptions as p, ORPCErrorOptions as q };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/client",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.42",
4
+ "version": "2.0.0-beta.44",
5
5
  "description": "Consume oRPC and OpenAPI APIs with end-to-end type safety over HTTP, WebSocket, or message ports",
6
6
  "license": "MIT",
7
7
  "funding": [
@@ -63,15 +63,15 @@
63
63
  "dist"
64
64
  ],
65
65
  "dependencies": {
66
- "@orpc/shared": "2.0.0-beta.42",
67
- "@standard-server/core": "~0.10.1",
68
- "@standard-server/fetch": "~0.10.1",
69
- "@standard-server/peer": "~0.10.1"
66
+ "@orpc/shared": "2.0.0-beta.44",
67
+ "@standard-server/core": "~0.10.3",
68
+ "@standard-server/fetch": "~0.10.3",
69
+ "@standard-server/peer": "~0.10.3"
70
70
  },
71
71
  "devDependencies": {
72
- "@types/ws": "^8.18.1",
73
- "ws": "^8.21.3",
74
- "zod": "^4.5.4"
72
+ "@types/ws": "^8.18.2",
73
+ "ws": "^8.22.0",
74
+ "zod": "^4.6.5"
75
75
  },
76
76
  "scripts": {
77
77
  "type:check": "tsc -b"