@orpc/client 1.12.0 → 1.12.2
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 +3 -3
- package/dist/adapters/fetch/index.d.mts +5 -5
- package/dist/adapters/fetch/index.d.ts +5 -5
- package/dist/adapters/fetch/index.mjs +2 -2
- package/dist/adapters/message-port/index.d.mts +6 -6
- package/dist/adapters/message-port/index.d.ts +6 -6
- package/dist/adapters/message-port/index.mjs +2 -2
- package/dist/adapters/standard/index.d.mts +3 -3
- package/dist/adapters/standard/index.d.ts +3 -3
- package/dist/adapters/standard/index.mjs +2 -2
- package/dist/adapters/websocket/index.d.mts +5 -5
- package/dist/adapters/websocket/index.d.ts +5 -5
- package/dist/adapters/websocket/index.mjs +2 -2
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.mjs +2 -2
- package/dist/plugins/index.d.mts +7 -7
- package/dist/plugins/index.d.ts +7 -7
- package/dist/plugins/index.mjs +1 -1
- package/dist/shared/{client.De8SW4Kw.d.ts → client.2jUAqzYU.d.ts} +1 -1
- package/dist/shared/{client.BxV-mzeR.d.ts → client.B3pNRBih.d.ts} +2 -2
- package/dist/shared/{client.D8lMmWVC.d.mts → client.BFAVy68H.d.mts} +2 -2
- package/dist/shared/{client.CPgZaUox.d.mts → client.CpCa3si8.d.mts} +1 -1
- package/dist/shared/{client.D1chOg7U.mjs → client.EX0cvH1U.mjs} +1 -1
- package/dist/shared/{client.sTmBHR3X.mjs → client.J7pEE4Uw.mjs} +1 -1
- package/dist/shared/{client.BH1AYT_p.d.mts → client.i2uoJbEp.d.mts} +2 -2
- package/dist/shared/{client.BH1AYT_p.d.ts → client.i2uoJbEp.d.ts} +2 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<image align="center" src="https://orpc.
|
|
2
|
+
<image align="center" src="https://orpc.dev/logo.webp" width=280 alt="oRPC logo" />
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
5
|
<h1></h1>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
## Documentation
|
|
47
47
|
|
|
48
|
-
You can find the full documentation [here](https://orpc.
|
|
48
|
+
You can find the full documentation [here](https://orpc.dev).
|
|
49
49
|
|
|
50
50
|
## Packages
|
|
51
51
|
|
|
@@ -66,7 +66,7 @@ You can find the full documentation [here](https://orpc.unnoq.com).
|
|
|
66
66
|
|
|
67
67
|
## `@orpc/client`
|
|
68
68
|
|
|
69
|
-
Consume your API on the client with type-safety. Read the [documentation](https://orpc.
|
|
69
|
+
Consume your API on the client with type-safety. Read the [documentation](https://orpc.dev/docs/client/client-side) for more information.
|
|
70
70
|
|
|
71
71
|
```ts
|
|
72
72
|
import { createORPCClient } from '@orpc/client'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Interceptor } from '@orpc/shared';
|
|
2
2
|
import { StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
|
|
3
3
|
import { ToFetchRequestOptions } from '@orpc/standard-server-fetch';
|
|
4
|
-
import { b as ClientContext, c as ClientOptions } from '../../shared/client.
|
|
5
|
-
import { a as StandardLinkPlugin, f as StandardLinkClient } from '../../shared/client.
|
|
6
|
-
import { f as StandardRPCLinkOptions, g as StandardRPCLink } from '../../shared/client.
|
|
4
|
+
import { b as ClientContext, c as ClientOptions } from '../../shared/client.i2uoJbEp.mjs';
|
|
5
|
+
import { a as StandardLinkPlugin, f as StandardLinkClient } from '../../shared/client.CpCa3si8.mjs';
|
|
6
|
+
import { f as StandardRPCLinkOptions, g as StandardRPCLink } from '../../shared/client.BFAVy68H.mjs';
|
|
7
7
|
|
|
8
8
|
interface LinkFetchPlugin<T extends ClientContext> extends StandardLinkPlugin<T> {
|
|
9
9
|
initRuntimeAdapter?(options: LinkFetchClientOptions<T>): void;
|
|
@@ -35,8 +35,8 @@ interface RPCLinkOptions<T extends ClientContext> extends LinkFetchClientOptions
|
|
|
35
35
|
/**
|
|
36
36
|
* The RPC Link communicates with the server using the RPC protocol.
|
|
37
37
|
*
|
|
38
|
-
* @see {@link https://orpc.
|
|
39
|
-
* @see {@link https://orpc.
|
|
38
|
+
* @see {@link https://orpc.dev/docs/client/rpc-link RPC Link Docs}
|
|
39
|
+
* @see {@link https://orpc.dev/docs/advanced/rpc-protocol RPC Protocol Docs}
|
|
40
40
|
*/
|
|
41
41
|
declare class RPCLink<T extends ClientContext> extends StandardRPCLink<T> {
|
|
42
42
|
constructor(options: RPCLinkOptions<T>);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Interceptor } from '@orpc/shared';
|
|
2
2
|
import { StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
|
|
3
3
|
import { ToFetchRequestOptions } from '@orpc/standard-server-fetch';
|
|
4
|
-
import { b as ClientContext, c as ClientOptions } from '../../shared/client.
|
|
5
|
-
import { a as StandardLinkPlugin, f as StandardLinkClient } from '../../shared/client.
|
|
6
|
-
import { f as StandardRPCLinkOptions, g as StandardRPCLink } from '../../shared/client.
|
|
4
|
+
import { b as ClientContext, c as ClientOptions } from '../../shared/client.i2uoJbEp.js';
|
|
5
|
+
import { a as StandardLinkPlugin, f as StandardLinkClient } from '../../shared/client.2jUAqzYU.js';
|
|
6
|
+
import { f as StandardRPCLinkOptions, g as StandardRPCLink } from '../../shared/client.B3pNRBih.js';
|
|
7
7
|
|
|
8
8
|
interface LinkFetchPlugin<T extends ClientContext> extends StandardLinkPlugin<T> {
|
|
9
9
|
initRuntimeAdapter?(options: LinkFetchClientOptions<T>): void;
|
|
@@ -35,8 +35,8 @@ interface RPCLinkOptions<T extends ClientContext> extends LinkFetchClientOptions
|
|
|
35
35
|
/**
|
|
36
36
|
* The RPC Link communicates with the server using the RPC protocol.
|
|
37
37
|
*
|
|
38
|
-
* @see {@link https://orpc.
|
|
39
|
-
* @see {@link https://orpc.
|
|
38
|
+
* @see {@link https://orpc.dev/docs/client/rpc-link RPC Link Docs}
|
|
39
|
+
* @see {@link https://orpc.dev/docs/advanced/rpc-protocol RPC Protocol Docs}
|
|
40
40
|
*/
|
|
41
41
|
declare class RPCLink<T extends ClientContext> extends StandardRPCLink<T> {
|
|
42
42
|
constructor(options: RPCLinkOptions<T>);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { toArray, intercept } from '@orpc/shared';
|
|
2
2
|
import { toFetchRequest, toStandardLazyResponse } from '@orpc/standard-server-fetch';
|
|
3
|
-
import { C as CompositeStandardLinkPlugin, c as StandardRPCLink } from '../../shared/client.
|
|
3
|
+
import { C as CompositeStandardLinkPlugin, c as StandardRPCLink } from '../../shared/client.EX0cvH1U.mjs';
|
|
4
4
|
import '@orpc/standard-server';
|
|
5
|
-
import '../../shared/client.
|
|
5
|
+
import '../../shared/client.J7pEE4Uw.mjs';
|
|
6
6
|
import '../../shared/client.BLtwTQUg.mjs';
|
|
7
7
|
|
|
8
8
|
class CompositeLinkFetchPlugin extends CompositeStandardLinkPlugin {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Value, Promisable } from '@orpc/shared';
|
|
2
2
|
import { StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
|
|
3
3
|
import { DecodedRequestMessage } from '@orpc/standard-server-peer';
|
|
4
|
-
import { b as ClientContext, c as ClientOptions } from '../../shared/client.
|
|
5
|
-
import { f as StandardLinkClient } from '../../shared/client.
|
|
6
|
-
import { f as StandardRPCLinkOptions, g as StandardRPCLink } from '../../shared/client.
|
|
4
|
+
import { b as ClientContext, c as ClientOptions } from '../../shared/client.i2uoJbEp.mjs';
|
|
5
|
+
import { f as StandardLinkClient } from '../../shared/client.CpCa3si8.mjs';
|
|
6
|
+
import { f as StandardRPCLinkOptions, g as StandardRPCLink } from '../../shared/client.BFAVy68H.mjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The message port used by electron in main process
|
|
@@ -54,7 +54,7 @@ interface LinkMessagePortClientOptions {
|
|
|
54
54
|
* }
|
|
55
55
|
* ```
|
|
56
56
|
*
|
|
57
|
-
* @see {@link https://orpc.
|
|
57
|
+
* @see {@link https://orpc.dev/docs/adapters/message-port#transfer Message Port Transfer Docs}
|
|
58
58
|
*/
|
|
59
59
|
experimental_transfer?: Value<Promisable<object[] | null | undefined>, [message: DecodedRequestMessage, port: SupportedMessagePort]>;
|
|
60
60
|
}
|
|
@@ -69,8 +69,8 @@ interface RPCLinkOptions<T extends ClientContext> extends Omit<StandardRPCLinkOp
|
|
|
69
69
|
/**
|
|
70
70
|
* The RPC Link for common message port implementations.
|
|
71
71
|
*
|
|
72
|
-
* @see {@link https://orpc.
|
|
73
|
-
* @see {@link https://orpc.
|
|
72
|
+
* @see {@link https://orpc.dev/docs/client/rpc-link RPC Link Docs}
|
|
73
|
+
* @see {@link https://orpc.dev/docs/adapters/message-port Message Port Adapter Docs}
|
|
74
74
|
*/
|
|
75
75
|
declare class RPCLink<T extends ClientContext> extends StandardRPCLink<T> {
|
|
76
76
|
constructor(options: RPCLinkOptions<T>);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Value, Promisable } from '@orpc/shared';
|
|
2
2
|
import { StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
|
|
3
3
|
import { DecodedRequestMessage } from '@orpc/standard-server-peer';
|
|
4
|
-
import { b as ClientContext, c as ClientOptions } from '../../shared/client.
|
|
5
|
-
import { f as StandardLinkClient } from '../../shared/client.
|
|
6
|
-
import { f as StandardRPCLinkOptions, g as StandardRPCLink } from '../../shared/client.
|
|
4
|
+
import { b as ClientContext, c as ClientOptions } from '../../shared/client.i2uoJbEp.js';
|
|
5
|
+
import { f as StandardLinkClient } from '../../shared/client.2jUAqzYU.js';
|
|
6
|
+
import { f as StandardRPCLinkOptions, g as StandardRPCLink } from '../../shared/client.B3pNRBih.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The message port used by electron in main process
|
|
@@ -54,7 +54,7 @@ interface LinkMessagePortClientOptions {
|
|
|
54
54
|
* }
|
|
55
55
|
* ```
|
|
56
56
|
*
|
|
57
|
-
* @see {@link https://orpc.
|
|
57
|
+
* @see {@link https://orpc.dev/docs/adapters/message-port#transfer Message Port Transfer Docs}
|
|
58
58
|
*/
|
|
59
59
|
experimental_transfer?: Value<Promisable<object[] | null | undefined>, [message: DecodedRequestMessage, port: SupportedMessagePort]>;
|
|
60
60
|
}
|
|
@@ -69,8 +69,8 @@ interface RPCLinkOptions<T extends ClientContext> extends Omit<StandardRPCLinkOp
|
|
|
69
69
|
/**
|
|
70
70
|
* The RPC Link for common message port implementations.
|
|
71
71
|
*
|
|
72
|
-
* @see {@link https://orpc.
|
|
73
|
-
* @see {@link https://orpc.
|
|
72
|
+
* @see {@link https://orpc.dev/docs/client/rpc-link RPC Link Docs}
|
|
73
|
+
* @see {@link https://orpc.dev/docs/adapters/message-port Message Port Adapter Docs}
|
|
74
74
|
*/
|
|
75
75
|
declare class RPCLink<T extends ClientContext> extends StandardRPCLink<T> {
|
|
76
76
|
constructor(options: RPCLinkOptions<T>);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { value, isObject } from '@orpc/shared';
|
|
2
2
|
import { experimental_ClientPeerWithoutCodec, serializeRequestMessage, encodeRequestMessage, deserializeResponseMessage, decodeResponseMessage } from '@orpc/standard-server-peer';
|
|
3
|
-
import { c as StandardRPCLink } from '../../shared/client.
|
|
3
|
+
import { c as StandardRPCLink } from '../../shared/client.EX0cvH1U.mjs';
|
|
4
4
|
import '@orpc/standard-server';
|
|
5
|
-
import '../../shared/client.
|
|
5
|
+
import '../../shared/client.J7pEE4Uw.mjs';
|
|
6
6
|
import '@orpc/standard-server-fetch';
|
|
7
7
|
import '../../shared/client.BLtwTQUg.mjs';
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { C as CompositeStandardLinkPlugin, d as StandardLink, f as StandardLinkClient, S as StandardLinkClientInterceptorOptions, e as StandardLinkCodec, c as StandardLinkInterceptorOptions, b as StandardLinkOptions, a as StandardLinkPlugin } from '../../shared/client.
|
|
2
|
-
export { S as STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES, c as StandardRPCCustomJsonSerializer, b as StandardRPCJsonSerialized, a as StandardRPCJsonSerializedMetaItem, e as StandardRPCJsonSerializer, d as StandardRPCJsonSerializerOptions, g as StandardRPCLink, i as StandardRPCLinkCodec, h as StandardRPCLinkCodecOptions, f as StandardRPCLinkOptions, j as StandardRPCSerializer } from '../../shared/client.
|
|
1
|
+
export { C as CompositeStandardLinkPlugin, d as StandardLink, f as StandardLinkClient, S as StandardLinkClientInterceptorOptions, e as StandardLinkCodec, c as StandardLinkInterceptorOptions, b as StandardLinkOptions, a as StandardLinkPlugin } from '../../shared/client.CpCa3si8.mjs';
|
|
2
|
+
export { S as STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES, c as StandardRPCCustomJsonSerializer, b as StandardRPCJsonSerialized, a as StandardRPCJsonSerializedMetaItem, e as StandardRPCJsonSerializer, d as StandardRPCJsonSerializerOptions, g as StandardRPCLink, i as StandardRPCLinkCodec, h as StandardRPCLinkCodecOptions, f as StandardRPCLinkOptions, j as StandardRPCSerializer } from '../../shared/client.BFAVy68H.mjs';
|
|
3
3
|
import { StandardHeaders } from '@orpc/standard-server';
|
|
4
|
-
import { H as HTTPPath } from '../../shared/client.
|
|
4
|
+
import { H as HTTPPath } from '../../shared/client.i2uoJbEp.mjs';
|
|
5
5
|
import '@orpc/shared';
|
|
6
6
|
|
|
7
7
|
declare function toHttpPath(path: readonly string[]): HTTPPath;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { C as CompositeStandardLinkPlugin, d as StandardLink, f as StandardLinkClient, S as StandardLinkClientInterceptorOptions, e as StandardLinkCodec, c as StandardLinkInterceptorOptions, b as StandardLinkOptions, a as StandardLinkPlugin } from '../../shared/client.
|
|
2
|
-
export { S as STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES, c as StandardRPCCustomJsonSerializer, b as StandardRPCJsonSerialized, a as StandardRPCJsonSerializedMetaItem, e as StandardRPCJsonSerializer, d as StandardRPCJsonSerializerOptions, g as StandardRPCLink, i as StandardRPCLinkCodec, h as StandardRPCLinkCodecOptions, f as StandardRPCLinkOptions, j as StandardRPCSerializer } from '../../shared/client.
|
|
1
|
+
export { C as CompositeStandardLinkPlugin, d as StandardLink, f as StandardLinkClient, S as StandardLinkClientInterceptorOptions, e as StandardLinkCodec, c as StandardLinkInterceptorOptions, b as StandardLinkOptions, a as StandardLinkPlugin } from '../../shared/client.2jUAqzYU.js';
|
|
2
|
+
export { S as STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES, c as StandardRPCCustomJsonSerializer, b as StandardRPCJsonSerialized, a as StandardRPCJsonSerializedMetaItem, e as StandardRPCJsonSerializer, d as StandardRPCJsonSerializerOptions, g as StandardRPCLink, i as StandardRPCLinkCodec, h as StandardRPCLinkCodecOptions, f as StandardRPCLinkOptions, j as StandardRPCSerializer } from '../../shared/client.B3pNRBih.js';
|
|
3
3
|
import { StandardHeaders } from '@orpc/standard-server';
|
|
4
|
-
import { H as HTTPPath } from '../../shared/client.
|
|
4
|
+
import { H as HTTPPath } from '../../shared/client.i2uoJbEp.js';
|
|
5
5
|
import '@orpc/shared';
|
|
6
6
|
|
|
7
7
|
declare function toHttpPath(path: readonly string[]): HTTPPath;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { C as CompositeStandardLinkPlugin, a as STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES, S as StandardLink, b as StandardRPCJsonSerializer, c as StandardRPCLink, d as StandardRPCLinkCodec, e as StandardRPCSerializer, g as getMalformedResponseErrorCode, t as toHttpPath, f as toStandardHeaders } from '../../shared/client.
|
|
1
|
+
export { C as CompositeStandardLinkPlugin, a as STANDARD_RPC_JSON_SERIALIZER_BUILT_IN_TYPES, S as StandardLink, b as StandardRPCJsonSerializer, c as StandardRPCLink, d as StandardRPCLinkCodec, e as StandardRPCSerializer, g as getMalformedResponseErrorCode, t as toHttpPath, f as toStandardHeaders } from '../../shared/client.EX0cvH1U.mjs';
|
|
2
2
|
import '@orpc/shared';
|
|
3
3
|
import '@orpc/standard-server';
|
|
4
|
-
import '../../shared/client.
|
|
4
|
+
import '../../shared/client.J7pEE4Uw.mjs';
|
|
5
5
|
import '@orpc/standard-server-fetch';
|
|
6
6
|
import '../../shared/client.BLtwTQUg.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
|
|
2
|
-
import { b as ClientContext, c as ClientOptions } from '../../shared/client.
|
|
3
|
-
import { f as StandardLinkClient } from '../../shared/client.
|
|
4
|
-
import { f as StandardRPCLinkOptions, g as StandardRPCLink } from '../../shared/client.
|
|
2
|
+
import { b as ClientContext, c as ClientOptions } from '../../shared/client.i2uoJbEp.mjs';
|
|
3
|
+
import { f as StandardLinkClient } from '../../shared/client.CpCa3si8.mjs';
|
|
4
|
+
import { f as StandardRPCLinkOptions, g as StandardRPCLink } from '../../shared/client.BFAVy68H.mjs';
|
|
5
5
|
import '@orpc/shared';
|
|
6
6
|
|
|
7
7
|
interface LinkWebsocketClientOptions {
|
|
@@ -18,8 +18,8 @@ interface RPCLinkOptions<T extends ClientContext> extends Omit<StandardRPCLinkOp
|
|
|
18
18
|
/**
|
|
19
19
|
* The RPC Link communicates with the server using the RPC protocol over WebSocket.
|
|
20
20
|
*
|
|
21
|
-
* @see {@link https://orpc.
|
|
22
|
-
* @see {@link https://orpc.
|
|
21
|
+
* @see {@link https://orpc.dev/docs/client/rpc-link RPC Link Docs}
|
|
22
|
+
* @see {@link https://orpc.dev/docs/adapters/websocket WebSocket Adapter Docs}
|
|
23
23
|
*/
|
|
24
24
|
declare class RPCLink<T extends ClientContext> extends StandardRPCLink<T> {
|
|
25
25
|
constructor(options: RPCLinkOptions<T>);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
|
|
2
|
-
import { b as ClientContext, c as ClientOptions } from '../../shared/client.
|
|
3
|
-
import { f as StandardLinkClient } from '../../shared/client.
|
|
4
|
-
import { f as StandardRPCLinkOptions, g as StandardRPCLink } from '../../shared/client.
|
|
2
|
+
import { b as ClientContext, c as ClientOptions } from '../../shared/client.i2uoJbEp.js';
|
|
3
|
+
import { f as StandardLinkClient } from '../../shared/client.2jUAqzYU.js';
|
|
4
|
+
import { f as StandardRPCLinkOptions, g as StandardRPCLink } from '../../shared/client.B3pNRBih.js';
|
|
5
5
|
import '@orpc/shared';
|
|
6
6
|
|
|
7
7
|
interface LinkWebsocketClientOptions {
|
|
@@ -18,8 +18,8 @@ interface RPCLinkOptions<T extends ClientContext> extends Omit<StandardRPCLinkOp
|
|
|
18
18
|
/**
|
|
19
19
|
* The RPC Link communicates with the server using the RPC protocol over WebSocket.
|
|
20
20
|
*
|
|
21
|
-
* @see {@link https://orpc.
|
|
22
|
-
* @see {@link https://orpc.
|
|
21
|
+
* @see {@link https://orpc.dev/docs/client/rpc-link RPC Link Docs}
|
|
22
|
+
* @see {@link https://orpc.dev/docs/adapters/websocket WebSocket Adapter Docs}
|
|
23
23
|
*/
|
|
24
24
|
declare class RPCLink<T extends ClientContext> extends StandardRPCLink<T> {
|
|
25
25
|
constructor(options: RPCLinkOptions<T>);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { readAsBuffer } from '@orpc/shared';
|
|
2
2
|
import { ClientPeer } from '@orpc/standard-server-peer';
|
|
3
|
-
import { c as StandardRPCLink } from '../../shared/client.
|
|
3
|
+
import { c as StandardRPCLink } from '../../shared/client.EX0cvH1U.mjs';
|
|
4
4
|
import '@orpc/standard-server';
|
|
5
|
-
import '../../shared/client.
|
|
5
|
+
import '../../shared/client.J7pEE4Uw.mjs';
|
|
6
6
|
import '@orpc/standard-server-fetch';
|
|
7
7
|
import '../../shared/client.BLtwTQUg.mjs';
|
|
8
8
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as NestedClient, C as ClientLink, I as InferClientContext, a as ClientPromiseResult, b as ClientContext, F as FriendlyClientOptions, c as ClientOptions, d as Client, e as ClientRest } from './shared/client.
|
|
2
|
-
export { f as HTTPMethod, H as HTTPPath, h as InferClientBodyInputs, j as InferClientBodyOutputs, l as InferClientErrorUnion, k as InferClientErrors, g as InferClientInputs, i as InferClientOutputs } from './shared/client.
|
|
1
|
+
import { N as NestedClient, C as ClientLink, I as InferClientContext, a as ClientPromiseResult, b as ClientContext, F as FriendlyClientOptions, c as ClientOptions, d as Client, e as ClientRest } from './shared/client.i2uoJbEp.mjs';
|
|
2
|
+
export { f as HTTPMethod, H as HTTPPath, h as InferClientBodyInputs, j as InferClientBodyOutputs, l as InferClientErrorUnion, k as InferClientErrors, g as InferClientInputs, i as InferClientOutputs } from './shared/client.i2uoJbEp.mjs';
|
|
3
3
|
import { MaybeOptionalOptions, ThrowableError, OnFinishState, Promisable, AsyncIteratorClass } from '@orpc/shared';
|
|
4
4
|
export { AsyncIteratorClass, EventPublisher, EventPublisherOptions, EventPublisherSubscribeIteratorOptions, Registry, ThrowableError, asyncIteratorToStream as eventIteratorToStream, asyncIteratorToUnproxiedDataStream as eventIteratorToUnproxiedDataStream, onError, onFinish, onStart, onSuccess, streamToAsyncIteratorClass as streamToEventIterator } from '@orpc/shared';
|
|
5
5
|
export { ErrorEvent } from '@orpc/standard-server';
|
|
@@ -13,7 +13,7 @@ interface createORPCClientOptions {
|
|
|
13
13
|
/**
|
|
14
14
|
* Create a oRPC client-side client from a link.
|
|
15
15
|
*
|
|
16
|
-
* @see {@link https://orpc.
|
|
16
|
+
* @see {@link https://orpc.dev/docs/client/client-side Client-side Client Docs}
|
|
17
17
|
*/
|
|
18
18
|
declare function createORPCClient<T extends NestedClient<any>>(link: ClientLink<InferClientContext<T>>, options?: createORPCClientOptions): T;
|
|
19
19
|
|
|
@@ -156,7 +156,7 @@ type SafeResult<TOutput, TError> = [error: null, data: TOutput, isDefined: false
|
|
|
156
156
|
* Works like try/catch, but can infer error types.
|
|
157
157
|
*
|
|
158
158
|
* @info support both tuple `[error, data, isDefined, isSuccess]` and object `{ error, data, isDefined, isSuccess }` styles.
|
|
159
|
-
* @see {@link https://orpc.
|
|
159
|
+
* @see {@link https://orpc.dev/docs/client/error-handling Client Error Handling Docs}
|
|
160
160
|
*/
|
|
161
161
|
declare function safe<TOutput, TError = ThrowableError>(promise: ClientPromiseResult<TOutput, TError>): Promise<SafeResult<TOutput, TError>>;
|
|
162
162
|
declare function resolveFriendlyClientOptions<T extends ClientContext>(options: FriendlyClientOptions<T>): ClientOptions<T>;
|
|
@@ -202,18 +202,18 @@ type SafeClient<T extends NestedClient<any>> = T extends Client<infer UContext,
|
|
|
202
202
|
* const { error, data, isDefined } = await safeClient.doSomething({ id: '123' })
|
|
203
203
|
* ```
|
|
204
204
|
*
|
|
205
|
-
* @see {@link https://orpc.
|
|
205
|
+
* @see {@link https://orpc.dev/docs/client/error-handling#using-createsafeclient Safe Client Docs}
|
|
206
206
|
*/
|
|
207
207
|
declare function createSafeClient<T extends NestedClient<any>>(client: T): SafeClient<T>;
|
|
208
208
|
|
|
209
209
|
declare const ORPC_CLIENT_PACKAGE_NAME = "@orpc/client";
|
|
210
|
-
declare const ORPC_CLIENT_PACKAGE_VERSION = "1.12.
|
|
210
|
+
declare const ORPC_CLIENT_PACKAGE_VERSION = "1.12.2";
|
|
211
211
|
|
|
212
212
|
/**
|
|
213
213
|
* DynamicLink provides a way to dynamically resolve and delegate calls to other ClientLinks
|
|
214
214
|
* based on the request path, input, and context.
|
|
215
215
|
*
|
|
216
|
-
* @see {@link https://orpc.
|
|
216
|
+
* @see {@link https://orpc.dev/docs/client/dynamic-link Dynamic Link Docs}
|
|
217
217
|
*/
|
|
218
218
|
declare class DynamicLink<TClientContext extends ClientContext> implements ClientLink<TClientContext> {
|
|
219
219
|
private readonly linkResolver;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as NestedClient, C as ClientLink, I as InferClientContext, a as ClientPromiseResult, b as ClientContext, F as FriendlyClientOptions, c as ClientOptions, d as Client, e as ClientRest } from './shared/client.
|
|
2
|
-
export { f as HTTPMethod, H as HTTPPath, h as InferClientBodyInputs, j as InferClientBodyOutputs, l as InferClientErrorUnion, k as InferClientErrors, g as InferClientInputs, i as InferClientOutputs } from './shared/client.
|
|
1
|
+
import { N as NestedClient, C as ClientLink, I as InferClientContext, a as ClientPromiseResult, b as ClientContext, F as FriendlyClientOptions, c as ClientOptions, d as Client, e as ClientRest } from './shared/client.i2uoJbEp.js';
|
|
2
|
+
export { f as HTTPMethod, H as HTTPPath, h as InferClientBodyInputs, j as InferClientBodyOutputs, l as InferClientErrorUnion, k as InferClientErrors, g as InferClientInputs, i as InferClientOutputs } from './shared/client.i2uoJbEp.js';
|
|
3
3
|
import { MaybeOptionalOptions, ThrowableError, OnFinishState, Promisable, AsyncIteratorClass } from '@orpc/shared';
|
|
4
4
|
export { AsyncIteratorClass, EventPublisher, EventPublisherOptions, EventPublisherSubscribeIteratorOptions, Registry, ThrowableError, asyncIteratorToStream as eventIteratorToStream, asyncIteratorToUnproxiedDataStream as eventIteratorToUnproxiedDataStream, onError, onFinish, onStart, onSuccess, streamToAsyncIteratorClass as streamToEventIterator } from '@orpc/shared';
|
|
5
5
|
export { ErrorEvent } from '@orpc/standard-server';
|
|
@@ -13,7 +13,7 @@ interface createORPCClientOptions {
|
|
|
13
13
|
/**
|
|
14
14
|
* Create a oRPC client-side client from a link.
|
|
15
15
|
*
|
|
16
|
-
* @see {@link https://orpc.
|
|
16
|
+
* @see {@link https://orpc.dev/docs/client/client-side Client-side Client Docs}
|
|
17
17
|
*/
|
|
18
18
|
declare function createORPCClient<T extends NestedClient<any>>(link: ClientLink<InferClientContext<T>>, options?: createORPCClientOptions): T;
|
|
19
19
|
|
|
@@ -156,7 +156,7 @@ type SafeResult<TOutput, TError> = [error: null, data: TOutput, isDefined: false
|
|
|
156
156
|
* Works like try/catch, but can infer error types.
|
|
157
157
|
*
|
|
158
158
|
* @info support both tuple `[error, data, isDefined, isSuccess]` and object `{ error, data, isDefined, isSuccess }` styles.
|
|
159
|
-
* @see {@link https://orpc.
|
|
159
|
+
* @see {@link https://orpc.dev/docs/client/error-handling Client Error Handling Docs}
|
|
160
160
|
*/
|
|
161
161
|
declare function safe<TOutput, TError = ThrowableError>(promise: ClientPromiseResult<TOutput, TError>): Promise<SafeResult<TOutput, TError>>;
|
|
162
162
|
declare function resolveFriendlyClientOptions<T extends ClientContext>(options: FriendlyClientOptions<T>): ClientOptions<T>;
|
|
@@ -202,18 +202,18 @@ type SafeClient<T extends NestedClient<any>> = T extends Client<infer UContext,
|
|
|
202
202
|
* const { error, data, isDefined } = await safeClient.doSomething({ id: '123' })
|
|
203
203
|
* ```
|
|
204
204
|
*
|
|
205
|
-
* @see {@link https://orpc.
|
|
205
|
+
* @see {@link https://orpc.dev/docs/client/error-handling#using-createsafeclient Safe Client Docs}
|
|
206
206
|
*/
|
|
207
207
|
declare function createSafeClient<T extends NestedClient<any>>(client: T): SafeClient<T>;
|
|
208
208
|
|
|
209
209
|
declare const ORPC_CLIENT_PACKAGE_NAME = "@orpc/client";
|
|
210
|
-
declare const ORPC_CLIENT_PACKAGE_VERSION = "1.12.
|
|
210
|
+
declare const ORPC_CLIENT_PACKAGE_VERSION = "1.12.2";
|
|
211
211
|
|
|
212
212
|
/**
|
|
213
213
|
* DynamicLink provides a way to dynamically resolve and delegate calls to other ClientLinks
|
|
214
214
|
* based on the request path, input, and context.
|
|
215
215
|
*
|
|
216
|
-
* @see {@link https://orpc.
|
|
216
|
+
* @see {@link https://orpc.dev/docs/client/dynamic-link Dynamic Link Docs}
|
|
217
217
|
*/
|
|
218
218
|
declare class DynamicLink<TClientContext extends ClientContext> implements ClientLink<TClientContext> {
|
|
219
219
|
private readonly linkResolver;
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { preventNativeAwait, isTypescriptObject } from '@orpc/shared';
|
|
2
2
|
export { AsyncIteratorClass, EventPublisher, asyncIteratorToStream as eventIteratorToStream, asyncIteratorToUnproxiedDataStream as eventIteratorToUnproxiedDataStream, onError, onFinish, onStart, onSuccess, streamToAsyncIteratorClass as streamToEventIterator } from '@orpc/shared';
|
|
3
|
-
import { i as isDefinedError } from './shared/client.
|
|
4
|
-
export { C as COMMON_ORPC_ERROR_DEFS, c as ORPCError, O as ORPC_CLIENT_PACKAGE_NAME, a as ORPC_CLIENT_PACKAGE_VERSION, g as createORPCErrorFromJson, b as fallbackORPCErrorMessage, f as fallbackORPCErrorStatus, e as isORPCErrorJson, d as isORPCErrorStatus, t as toORPCError } from './shared/client.
|
|
3
|
+
import { i as isDefinedError } from './shared/client.J7pEE4Uw.mjs';
|
|
4
|
+
export { C as COMMON_ORPC_ERROR_DEFS, c as ORPCError, O as ORPC_CLIENT_PACKAGE_NAME, a as ORPC_CLIENT_PACKAGE_VERSION, g as createORPCErrorFromJson, b as fallbackORPCErrorMessage, f as fallbackORPCErrorStatus, e as isORPCErrorJson, d as isORPCErrorStatus, t as toORPCError } from './shared/client.J7pEE4Uw.mjs';
|
|
5
5
|
export { m as mapEventIterator } from './shared/client.BLtwTQUg.mjs';
|
|
6
6
|
export { ErrorEvent } from '@orpc/standard-server';
|
|
7
7
|
|
package/dist/plugins/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Value, Promisable } from '@orpc/shared';
|
|
2
2
|
import { StandardHeaders, StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
|
|
3
3
|
import { BatchResponseMode } from '@orpc/standard-server/batch';
|
|
4
|
-
import { S as StandardLinkClientInterceptorOptions, a as StandardLinkPlugin, b as StandardLinkOptions, c as StandardLinkInterceptorOptions } from '../shared/client.
|
|
5
|
-
import { b as ClientContext } from '../shared/client.
|
|
4
|
+
import { S as StandardLinkClientInterceptorOptions, a as StandardLinkPlugin, b as StandardLinkOptions, c as StandardLinkInterceptorOptions } from '../shared/client.CpCa3si8.mjs';
|
|
5
|
+
import { b as ClientContext } from '../shared/client.i2uoJbEp.mjs';
|
|
6
6
|
|
|
7
7
|
interface BatchLinkPluginGroup<T extends ClientContext> {
|
|
8
8
|
condition(options: StandardLinkClientInterceptorOptions<T>): boolean;
|
|
@@ -62,7 +62,7 @@ interface BatchLinkPluginOptions<T extends ClientContext> {
|
|
|
62
62
|
* The Batch Requests Plugin allows you to combine multiple requests and responses into a single batch,
|
|
63
63
|
* reducing the overhead of sending each one separately.
|
|
64
64
|
*
|
|
65
|
-
* @see {@link https://orpc.
|
|
65
|
+
* @see {@link https://orpc.dev/docs/plugins/batch-requests Batch Requests Plugin Docs}
|
|
66
66
|
*/
|
|
67
67
|
declare class BatchLinkPlugin<T extends ClientContext> implements StandardLinkPlugin<T> {
|
|
68
68
|
#private;
|
|
@@ -103,7 +103,7 @@ interface DedupeRequestsPluginOptions<T extends ClientContext> {
|
|
|
103
103
|
/**
|
|
104
104
|
* Prevents duplicate requests by deduplicating similar ones to reduce server load.
|
|
105
105
|
*
|
|
106
|
-
* @see {@link https://orpc.
|
|
106
|
+
* @see {@link https://orpc.dev/docs/plugins/dedupe-requests Dedupe Requests Plugin}
|
|
107
107
|
*/
|
|
108
108
|
declare class DedupeRequestsPlugin<T extends ClientContext> implements StandardLinkPlugin<T> {
|
|
109
109
|
#private;
|
|
@@ -150,7 +150,7 @@ interface ClientRetryPluginOptions {
|
|
|
150
150
|
/**
|
|
151
151
|
* The Client Retry Plugin enables retrying client calls when errors occur.
|
|
152
152
|
*
|
|
153
|
-
* @see {@link https://orpc.
|
|
153
|
+
* @see {@link https://orpc.dev/docs/plugins/client-retry Client Retry Plugin Docs}
|
|
154
154
|
*/
|
|
155
155
|
declare class ClientRetryPlugin<T extends ClientRetryPluginContext> implements StandardLinkPlugin<T> {
|
|
156
156
|
private readonly defaultRetry;
|
|
@@ -195,7 +195,7 @@ interface RetryAfterPluginOptions<T extends ClientContext> {
|
|
|
195
195
|
* The Retry After Plugin automatically retries requests based on server `Retry-After` headers.
|
|
196
196
|
* This is particularly useful for handling rate limiting and temporary server unavailability.
|
|
197
197
|
*
|
|
198
|
-
* @see {@link https://orpc.
|
|
198
|
+
* @see {@link https://orpc.dev/docs/plugins/retry-after Retry After Plugin Docs}
|
|
199
199
|
*/
|
|
200
200
|
declare class RetryAfterPlugin<T extends ClientContext> implements StandardLinkPlugin<T> {
|
|
201
201
|
private readonly condition;
|
|
@@ -234,7 +234,7 @@ interface SimpleCsrfProtectionLinkPluginOptions<T extends ClientContext> {
|
|
|
234
234
|
* It helps ensure that requests to your procedures originate from JavaScript code,
|
|
235
235
|
* not from other sources like standard HTML forms or direct browser navigation.
|
|
236
236
|
*
|
|
237
|
-
* @see {@link https://orpc.
|
|
237
|
+
* @see {@link https://orpc.dev/docs/plugins/simple-csrf-protection Simple CSRF Protection Plugin Docs}
|
|
238
238
|
*/
|
|
239
239
|
declare class SimpleCsrfProtectionLinkPlugin<T extends ClientContext> implements StandardLinkPlugin<T> {
|
|
240
240
|
private readonly headerName;
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Value, Promisable } from '@orpc/shared';
|
|
2
2
|
import { StandardHeaders, StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
|
|
3
3
|
import { BatchResponseMode } from '@orpc/standard-server/batch';
|
|
4
|
-
import { S as StandardLinkClientInterceptorOptions, a as StandardLinkPlugin, b as StandardLinkOptions, c as StandardLinkInterceptorOptions } from '../shared/client.
|
|
5
|
-
import { b as ClientContext } from '../shared/client.
|
|
4
|
+
import { S as StandardLinkClientInterceptorOptions, a as StandardLinkPlugin, b as StandardLinkOptions, c as StandardLinkInterceptorOptions } from '../shared/client.2jUAqzYU.js';
|
|
5
|
+
import { b as ClientContext } from '../shared/client.i2uoJbEp.js';
|
|
6
6
|
|
|
7
7
|
interface BatchLinkPluginGroup<T extends ClientContext> {
|
|
8
8
|
condition(options: StandardLinkClientInterceptorOptions<T>): boolean;
|
|
@@ -62,7 +62,7 @@ interface BatchLinkPluginOptions<T extends ClientContext> {
|
|
|
62
62
|
* The Batch Requests Plugin allows you to combine multiple requests and responses into a single batch,
|
|
63
63
|
* reducing the overhead of sending each one separately.
|
|
64
64
|
*
|
|
65
|
-
* @see {@link https://orpc.
|
|
65
|
+
* @see {@link https://orpc.dev/docs/plugins/batch-requests Batch Requests Plugin Docs}
|
|
66
66
|
*/
|
|
67
67
|
declare class BatchLinkPlugin<T extends ClientContext> implements StandardLinkPlugin<T> {
|
|
68
68
|
#private;
|
|
@@ -103,7 +103,7 @@ interface DedupeRequestsPluginOptions<T extends ClientContext> {
|
|
|
103
103
|
/**
|
|
104
104
|
* Prevents duplicate requests by deduplicating similar ones to reduce server load.
|
|
105
105
|
*
|
|
106
|
-
* @see {@link https://orpc.
|
|
106
|
+
* @see {@link https://orpc.dev/docs/plugins/dedupe-requests Dedupe Requests Plugin}
|
|
107
107
|
*/
|
|
108
108
|
declare class DedupeRequestsPlugin<T extends ClientContext> implements StandardLinkPlugin<T> {
|
|
109
109
|
#private;
|
|
@@ -150,7 +150,7 @@ interface ClientRetryPluginOptions {
|
|
|
150
150
|
/**
|
|
151
151
|
* The Client Retry Plugin enables retrying client calls when errors occur.
|
|
152
152
|
*
|
|
153
|
-
* @see {@link https://orpc.
|
|
153
|
+
* @see {@link https://orpc.dev/docs/plugins/client-retry Client Retry Plugin Docs}
|
|
154
154
|
*/
|
|
155
155
|
declare class ClientRetryPlugin<T extends ClientRetryPluginContext> implements StandardLinkPlugin<T> {
|
|
156
156
|
private readonly defaultRetry;
|
|
@@ -195,7 +195,7 @@ interface RetryAfterPluginOptions<T extends ClientContext> {
|
|
|
195
195
|
* The Retry After Plugin automatically retries requests based on server `Retry-After` headers.
|
|
196
196
|
* This is particularly useful for handling rate limiting and temporary server unavailability.
|
|
197
197
|
*
|
|
198
|
-
* @see {@link https://orpc.
|
|
198
|
+
* @see {@link https://orpc.dev/docs/plugins/retry-after Retry After Plugin Docs}
|
|
199
199
|
*/
|
|
200
200
|
declare class RetryAfterPlugin<T extends ClientContext> implements StandardLinkPlugin<T> {
|
|
201
201
|
private readonly condition;
|
|
@@ -234,7 +234,7 @@ interface SimpleCsrfProtectionLinkPluginOptions<T extends ClientContext> {
|
|
|
234
234
|
* It helps ensure that requests to your procedures originate from JavaScript code,
|
|
235
235
|
* not from other sources like standard HTML forms or direct browser navigation.
|
|
236
236
|
*
|
|
237
|
-
* @see {@link https://orpc.
|
|
237
|
+
* @see {@link https://orpc.dev/docs/plugins/simple-csrf-protection Simple CSRF Protection Plugin Docs}
|
|
238
238
|
*/
|
|
239
239
|
declare class SimpleCsrfProtectionLinkPlugin<T extends ClientContext> implements StandardLinkPlugin<T> {
|
|
240
240
|
private readonly headerName;
|
package/dist/plugins/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isAsyncIteratorObject, defer, value, splitInHalf, toArray, stringifyJSON, overlayProxy, AsyncIteratorClass } from '@orpc/shared';
|
|
2
2
|
import { toBatchRequest, parseBatchResponse, toBatchAbortSignal } from '@orpc/standard-server/batch';
|
|
3
3
|
import { replicateStandardLazyResponse, getEventMeta, flattenHeader } from '@orpc/standard-server';
|
|
4
|
-
import { C as COMMON_ORPC_ERROR_DEFS } from '../shared/client.
|
|
4
|
+
import { C as COMMON_ORPC_ERROR_DEFS } from '../shared/client.J7pEE4Uw.mjs';
|
|
5
5
|
|
|
6
6
|
class BatchLinkPlugin {
|
|
7
7
|
groups;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Interceptor } from '@orpc/shared';
|
|
2
2
|
import { StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
|
|
3
|
-
import { b as ClientContext, c as ClientOptions, C as ClientLink } from './client.
|
|
3
|
+
import { b as ClientContext, c as ClientOptions, C as ClientLink } from './client.i2uoJbEp.js';
|
|
4
4
|
|
|
5
5
|
interface StandardLinkPlugin<T extends ClientContext> {
|
|
6
6
|
order?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as ClientContext, c as ClientOptions, f as HTTPMethod } from './client.
|
|
2
|
-
import { e as StandardLinkCodec, b as StandardLinkOptions, d as StandardLink, f as StandardLinkClient } from './client.
|
|
1
|
+
import { b as ClientContext, c as ClientOptions, f as HTTPMethod } from './client.i2uoJbEp.js';
|
|
2
|
+
import { e as StandardLinkCodec, b as StandardLinkOptions, d as StandardLink, f as StandardLinkClient } from './client.2jUAqzYU.js';
|
|
3
3
|
import { Segment, Value, Promisable } from '@orpc/shared';
|
|
4
4
|
import { StandardHeaders, StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as ClientContext, c as ClientOptions, f as HTTPMethod } from './client.
|
|
2
|
-
import { e as StandardLinkCodec, b as StandardLinkOptions, d as StandardLink, f as StandardLinkClient } from './client.
|
|
1
|
+
import { b as ClientContext, c as ClientOptions, f as HTTPMethod } from './client.i2uoJbEp.mjs';
|
|
2
|
+
import { e as StandardLinkCodec, b as StandardLinkOptions, d as StandardLink, f as StandardLinkClient } from './client.CpCa3si8.mjs';
|
|
3
3
|
import { Segment, Value, Promisable } from '@orpc/shared';
|
|
4
4
|
import { StandardHeaders, StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Interceptor } from '@orpc/shared';
|
|
2
2
|
import { StandardRequest, StandardLazyResponse } from '@orpc/standard-server';
|
|
3
|
-
import { b as ClientContext, c as ClientOptions, C as ClientLink } from './client.
|
|
3
|
+
import { b as ClientContext, c as ClientOptions, C as ClientLink } from './client.i2uoJbEp.mjs';
|
|
4
4
|
|
|
5
5
|
interface StandardLinkPlugin<T extends ClientContext> {
|
|
6
6
|
order?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { toArray, runWithSpan, ORPC_NAME, isAsyncIteratorObject, asyncIteratorWithSpan, intercept, getGlobalOtelConfig, isObject, value, stringifyJSON } from '@orpc/shared';
|
|
2
2
|
import { mergeStandardHeaders, ErrorEvent } from '@orpc/standard-server';
|
|
3
|
-
import { C as COMMON_ORPC_ERROR_DEFS, d as isORPCErrorStatus, e as isORPCErrorJson, g as createORPCErrorFromJson, c as ORPCError, t as toORPCError } from './client.
|
|
3
|
+
import { C as COMMON_ORPC_ERROR_DEFS, d as isORPCErrorStatus, e as isORPCErrorJson, g as createORPCErrorFromJson, c as ORPCError, t as toORPCError } from './client.J7pEE4Uw.mjs';
|
|
4
4
|
import { toStandardHeaders as toStandardHeaders$1 } from '@orpc/standard-server-fetch';
|
|
5
5
|
import { m as mapEventIterator } from './client.BLtwTQUg.mjs';
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveMaybeOptionalOptions, getConstructor, isObject } from '@orpc/shared';
|
|
2
2
|
|
|
3
3
|
const ORPC_CLIENT_PACKAGE_NAME = "@orpc/client";
|
|
4
|
-
const ORPC_CLIENT_PACKAGE_VERSION = "1.12.
|
|
4
|
+
const ORPC_CLIENT_PACKAGE_VERSION = "1.12.2";
|
|
5
5
|
|
|
6
6
|
const COMMON_ORPC_ERROR_DEFS = {
|
|
7
7
|
BAD_REQUEST: {
|
|
@@ -64,7 +64,7 @@ type InferClientBodyOutputs<T extends NestedClient<any>> = T extends Client<any,
|
|
|
64
64
|
[K in keyof T]: T[K] extends NestedClient<any> ? InferClientBodyOutputs<T[K]> : never;
|
|
65
65
|
};
|
|
66
66
|
/**
|
|
67
|
-
* Recursively infers the **error types** from a client when you use [type-safe errors](https://orpc.
|
|
67
|
+
* Recursively infers the **error types** from a client when you use [type-safe errors](https://orpc.dev/docs/error-handling#type‐safe-error-handling).
|
|
68
68
|
*
|
|
69
69
|
* Produces a nested map where each endpoint's error type is preserved.
|
|
70
70
|
*/
|
|
@@ -72,7 +72,7 @@ type InferClientErrors<T extends NestedClient<any>> = T extends Client<any, any,
|
|
|
72
72
|
[K in keyof T]: T[K] extends NestedClient<any> ? InferClientErrors<T[K]> : never;
|
|
73
73
|
};
|
|
74
74
|
/**
|
|
75
|
-
* Recursively infers a **union of all error types** from a client when you use [type-safe errors](https://orpc.
|
|
75
|
+
* Recursively infers a **union of all error types** from a client when you use [type-safe errors](https://orpc.dev/docs/error-handling#type‐safe-error-handling).
|
|
76
76
|
*
|
|
77
77
|
* Useful when you want to handle all possible errors from any endpoint at once.
|
|
78
78
|
*/
|
|
@@ -64,7 +64,7 @@ type InferClientBodyOutputs<T extends NestedClient<any>> = T extends Client<any,
|
|
|
64
64
|
[K in keyof T]: T[K] extends NestedClient<any> ? InferClientBodyOutputs<T[K]> : never;
|
|
65
65
|
};
|
|
66
66
|
/**
|
|
67
|
-
* Recursively infers the **error types** from a client when you use [type-safe errors](https://orpc.
|
|
67
|
+
* Recursively infers the **error types** from a client when you use [type-safe errors](https://orpc.dev/docs/error-handling#type‐safe-error-handling).
|
|
68
68
|
*
|
|
69
69
|
* Produces a nested map where each endpoint's error type is preserved.
|
|
70
70
|
*/
|
|
@@ -72,7 +72,7 @@ type InferClientErrors<T extends NestedClient<any>> = T extends Client<any, any,
|
|
|
72
72
|
[K in keyof T]: T[K] extends NestedClient<any> ? InferClientErrors<T[K]> : never;
|
|
73
73
|
};
|
|
74
74
|
/**
|
|
75
|
-
* Recursively infers a **union of all error types** from a client when you use [type-safe errors](https://orpc.
|
|
75
|
+
* Recursively infers a **union of all error types** from a client when you use [type-safe errors](https://orpc.dev/docs/error-handling#type‐safe-error-handling).
|
|
76
76
|
*
|
|
77
77
|
* Useful when you want to handle all possible errors from any endpoint at once.
|
|
78
78
|
*/
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/client",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.12.
|
|
4
|
+
"version": "1.12.2",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"homepage": "https://orpc.
|
|
6
|
+
"homepage": "https://orpc.dev",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "git+https://github.com/unnoq/orpc.git",
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"dist"
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@orpc/shared": "1.12.
|
|
53
|
-
"@orpc/standard-server": "1.12.
|
|
54
|
-
"@orpc/standard-server-fetch": "1.12.
|
|
55
|
-
"@orpc/standard-server-peer": "1.12.
|
|
52
|
+
"@orpc/shared": "1.12.2",
|
|
53
|
+
"@orpc/standard-server": "1.12.2",
|
|
54
|
+
"@orpc/standard-server-fetch": "1.12.2",
|
|
55
|
+
"@orpc/standard-server-peer": "1.12.2"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"zod": "^4.1.12"
|