@orpc/server 0.0.0-next.d53d856 → 0.0.0-next.d53e45e
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 +5 -1
- package/dist/adapters/aws-lambda/index.d.mts +5 -5
- package/dist/adapters/aws-lambda/index.d.ts +5 -5
- package/dist/adapters/aws-lambda/index.mjs +3 -3
- package/dist/adapters/bun-ws/index.d.mts +5 -5
- package/dist/adapters/bun-ws/index.d.ts +5 -5
- package/dist/adapters/bun-ws/index.mjs +2 -2
- package/dist/adapters/crossws/index.d.mts +5 -5
- package/dist/adapters/crossws/index.d.ts +5 -5
- package/dist/adapters/crossws/index.mjs +2 -2
- package/dist/adapters/fetch/index.d.mts +11 -10
- package/dist/adapters/fetch/index.d.ts +11 -10
- package/dist/adapters/fetch/index.mjs +15 -7
- package/dist/adapters/message-port/index.d.mts +5 -5
- package/dist/adapters/message-port/index.d.ts +5 -5
- package/dist/adapters/message-port/index.mjs +2 -2
- package/dist/adapters/node/index.d.mts +11 -10
- package/dist/adapters/node/index.d.ts +11 -10
- package/dist/adapters/node/index.mjs +7 -8
- package/dist/adapters/standard/index.d.mts +6 -6
- package/dist/adapters/standard/index.d.ts +6 -6
- package/dist/adapters/standard/index.mjs +2 -2
- package/dist/adapters/standard-peer/index.d.mts +3 -3
- package/dist/adapters/standard-peer/index.d.ts +3 -3
- package/dist/adapters/websocket/index.d.mts +9 -7
- package/dist/adapters/websocket/index.d.ts +9 -7
- package/dist/adapters/websocket/index.mjs +2 -2
- package/dist/adapters/ws/index.d.mts +5 -5
- package/dist/adapters/ws/index.d.ts +5 -5
- package/dist/adapters/ws/index.mjs +2 -2
- package/dist/helpers/index.d.mts +16 -1
- package/dist/helpers/index.d.ts +16 -1
- package/dist/helpers/index.mjs +11 -1
- package/dist/hibernation/index.d.mts +2 -2
- package/dist/hibernation/index.d.ts +2 -2
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +8 -5
- package/dist/plugins/index.d.mts +5 -2
- package/dist/plugins/index.d.ts +5 -2
- package/dist/plugins/index.mjs +13 -11
- package/dist/shared/{server.CYNGeoCm.d.mts → server.B4BGqy3Y.d.mts} +2 -3
- package/dist/shared/{server.CYNGeoCm.d.ts → server.B4BGqy3Y.d.ts} +2 -3
- package/dist/shared/{server.CYRYFTxo.mjs → server.Bxx6tqNe.mjs} +1 -1
- package/dist/shared/{server.D0H-iaY3.d.ts → server.COL12UTb.d.ts} +3 -3
- package/dist/shared/{server.BEFBl-Cb.d.mts → server.CVKCo60T.d.mts} +2 -2
- package/dist/shared/{server.jMTkVNIb.d.ts → server.Cb6yD7DZ.d.ts} +1 -1
- package/dist/shared/{server.BU4WI18A.d.mts → server.Ck-gOLzq.d.mts} +3 -3
- package/dist/shared/{server.gqRxT-yN.d.mts → server.DBCUJijK.d.mts} +1 -1
- package/dist/shared/{server.B7b2w3_i.d.ts → server.DNtJ-p60.d.ts} +2 -2
- package/dist/shared/{server.Bmh5xd4n.d.ts → server.DPIFWpxG.d.ts} +1 -1
- package/dist/shared/{server.B_fj3X5m.mjs → server.Ds4HPpvH.mjs} +31 -30
- package/dist/shared/{server.DhJj-1X9.d.mts → server.DzV1hr3z.d.mts} +1 -1
- package/dist/shared/{server.BW-nUGgA.mjs → server.TEVCLCFC.mjs} +3 -0
- package/package.json +12 -11
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { C as CompositeStandardHandlerPlugin, S as StandardHandler, a as StandardRPCCodec, b as StandardRPCHandler, c as StandardRPCMatcher } from '../../shared/server.
|
|
1
|
+
export { C as CompositeStandardHandlerPlugin, S as StandardHandler, a as StandardRPCCodec, b as StandardRPCHandler, c as StandardRPCMatcher } from '../../shared/server.Bxx6tqNe.mjs';
|
|
2
2
|
export { r as resolveFriendlyStandardHandleOptions } from '../../shared/server.DZ5BIITo.mjs';
|
|
3
3
|
import '@orpc/client/standard';
|
|
4
4
|
import '@orpc/client';
|
|
5
5
|
import '@orpc/shared';
|
|
6
6
|
import '@orpc/standard-server';
|
|
7
|
-
import '../../shared/server.
|
|
7
|
+
import '../../shared/server.Ds4HPpvH.mjs';
|
|
8
8
|
import '@orpc/contract';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ServerPeer, EncodedMessage, ServerPeerHandleRequestFn } from '@orpc/standard-server-peer';
|
|
2
|
-
import { C as Context } from '../../shared/server.
|
|
3
|
-
import { f as StandardHandler } from '../../shared/server.
|
|
4
|
-
import { F as FriendlyStandardHandleOptions } from '../../shared/server.
|
|
2
|
+
import { C as Context } from '../../shared/server.B4BGqy3Y.mjs';
|
|
3
|
+
import { f as StandardHandler } from '../../shared/server.DBCUJijK.mjs';
|
|
4
|
+
import { F as FriendlyStandardHandleOptions } from '../../shared/server.CVKCo60T.mjs';
|
|
5
5
|
import '@orpc/client';
|
|
6
6
|
import '@orpc/contract';
|
|
7
7
|
import '@orpc/shared';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ServerPeer, EncodedMessage, ServerPeerHandleRequestFn } from '@orpc/standard-server-peer';
|
|
2
|
-
import { C as Context } from '../../shared/server.
|
|
3
|
-
import { f as StandardHandler } from '../../shared/server.
|
|
4
|
-
import { F as FriendlyStandardHandleOptions } from '../../shared/server.
|
|
2
|
+
import { C as Context } from '../../shared/server.B4BGqy3Y.js';
|
|
3
|
+
import { f as StandardHandler } from '../../shared/server.DPIFWpxG.js';
|
|
4
|
+
import { F as FriendlyStandardHandleOptions } from '../../shared/server.DNtJ-p60.js';
|
|
5
5
|
import '@orpc/client';
|
|
6
6
|
import '@orpc/contract';
|
|
7
7
|
import '@orpc/shared';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { MaybeOptionalOptions } from '@orpc/shared';
|
|
2
|
-
import { C as Context, R as Router } from '../../shared/server.
|
|
3
|
-
import { f as StandardHandler } from '../../shared/server.
|
|
2
|
+
import { C as Context, R as Router } from '../../shared/server.B4BGqy3Y.mjs';
|
|
3
|
+
import { f as StandardHandler } from '../../shared/server.DBCUJijK.mjs';
|
|
4
4
|
import { HandleStandardServerPeerMessageOptions } from '../standard-peer/index.mjs';
|
|
5
|
-
import { S as StandardRPCHandlerOptions } from '../../shared/server.
|
|
5
|
+
import { S as StandardRPCHandlerOptions } from '../../shared/server.Ck-gOLzq.mjs';
|
|
6
6
|
import '@orpc/client';
|
|
7
7
|
import '@orpc/contract';
|
|
8
8
|
import '@orpc/standard-server';
|
|
9
9
|
import '@orpc/standard-server-peer';
|
|
10
|
-
import '../../shared/server.
|
|
10
|
+
import '../../shared/server.CVKCo60T.mjs';
|
|
11
11
|
import '@orpc/client/standard';
|
|
12
|
-
import '../../shared/server.
|
|
12
|
+
import '../../shared/server.DzV1hr3z.mjs';
|
|
13
13
|
|
|
14
14
|
type MinimalWebsocket = Pick<WebSocket, 'addEventListener' | 'send'>;
|
|
15
15
|
declare class WebsocketHandler<T extends Context> {
|
|
@@ -40,6 +40,8 @@ declare class WebsocketHandler<T extends Context> {
|
|
|
40
40
|
close(ws: MinimalWebsocket): void;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
interface RPCHandlerOptions<T extends Context> extends StandardRPCHandlerOptions<T> {
|
|
44
|
+
}
|
|
43
45
|
/**
|
|
44
46
|
* RPC Handler for Websocket adapter
|
|
45
47
|
*
|
|
@@ -47,8 +49,8 @@ declare class WebsocketHandler<T extends Context> {
|
|
|
47
49
|
* @see {@link https://orpc.unnoq.com/docs/adapters/websocket Websocket Adapter Docs}
|
|
48
50
|
*/
|
|
49
51
|
declare class RPCHandler<T extends Context> extends WebsocketHandler<T> {
|
|
50
|
-
constructor(router: Router<any, T>, options?: NoInfer<
|
|
52
|
+
constructor(router: Router<any, T>, options?: NoInfer<RPCHandlerOptions<T>>);
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
export { RPCHandler, WebsocketHandler };
|
|
54
|
-
export type { MinimalWebsocket };
|
|
56
|
+
export type { MinimalWebsocket, RPCHandlerOptions };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { MaybeOptionalOptions } from '@orpc/shared';
|
|
2
|
-
import { C as Context, R as Router } from '../../shared/server.
|
|
3
|
-
import { f as StandardHandler } from '../../shared/server.
|
|
2
|
+
import { C as Context, R as Router } from '../../shared/server.B4BGqy3Y.js';
|
|
3
|
+
import { f as StandardHandler } from '../../shared/server.DPIFWpxG.js';
|
|
4
4
|
import { HandleStandardServerPeerMessageOptions } from '../standard-peer/index.js';
|
|
5
|
-
import { S as StandardRPCHandlerOptions } from '../../shared/server.
|
|
5
|
+
import { S as StandardRPCHandlerOptions } from '../../shared/server.COL12UTb.js';
|
|
6
6
|
import '@orpc/client';
|
|
7
7
|
import '@orpc/contract';
|
|
8
8
|
import '@orpc/standard-server';
|
|
9
9
|
import '@orpc/standard-server-peer';
|
|
10
|
-
import '../../shared/server.
|
|
10
|
+
import '../../shared/server.DNtJ-p60.js';
|
|
11
11
|
import '@orpc/client/standard';
|
|
12
|
-
import '../../shared/server.
|
|
12
|
+
import '../../shared/server.Cb6yD7DZ.js';
|
|
13
13
|
|
|
14
14
|
type MinimalWebsocket = Pick<WebSocket, 'addEventListener' | 'send'>;
|
|
15
15
|
declare class WebsocketHandler<T extends Context> {
|
|
@@ -40,6 +40,8 @@ declare class WebsocketHandler<T extends Context> {
|
|
|
40
40
|
close(ws: MinimalWebsocket): void;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
interface RPCHandlerOptions<T extends Context> extends StandardRPCHandlerOptions<T> {
|
|
44
|
+
}
|
|
43
45
|
/**
|
|
44
46
|
* RPC Handler for Websocket adapter
|
|
45
47
|
*
|
|
@@ -47,8 +49,8 @@ declare class WebsocketHandler<T extends Context> {
|
|
|
47
49
|
* @see {@link https://orpc.unnoq.com/docs/adapters/websocket Websocket Adapter Docs}
|
|
48
50
|
*/
|
|
49
51
|
declare class RPCHandler<T extends Context> extends WebsocketHandler<T> {
|
|
50
|
-
constructor(router: Router<any, T>, options?: NoInfer<
|
|
52
|
+
constructor(router: Router<any, T>, options?: NoInfer<RPCHandlerOptions<T>>);
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
export { RPCHandler, WebsocketHandler };
|
|
54
|
-
export type { MinimalWebsocket };
|
|
56
|
+
export type { MinimalWebsocket, RPCHandlerOptions };
|
|
@@ -4,10 +4,10 @@ import { c as createServerPeerHandleRequestFn } from '../../shared/server.UVMTOW
|
|
|
4
4
|
import '@orpc/client';
|
|
5
5
|
import '@orpc/standard-server';
|
|
6
6
|
import '@orpc/contract';
|
|
7
|
-
import { b as StandardRPCHandler } from '../../shared/server.
|
|
7
|
+
import { b as StandardRPCHandler } from '../../shared/server.Bxx6tqNe.mjs';
|
|
8
8
|
import '@orpc/client/standard';
|
|
9
9
|
import '../../shared/server.DZ5BIITo.mjs';
|
|
10
|
-
import '../../shared/server.
|
|
10
|
+
import '../../shared/server.Ds4HPpvH.mjs';
|
|
11
11
|
|
|
12
12
|
class WebsocketHandler {
|
|
13
13
|
#peers = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { MaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { WebSocket } from 'ws';
|
|
3
|
-
import { C as Context, R as Router } from '../../shared/server.
|
|
4
|
-
import { f as StandardHandler } from '../../shared/server.
|
|
3
|
+
import { C as Context, R as Router } from '../../shared/server.B4BGqy3Y.mjs';
|
|
4
|
+
import { f as StandardHandler } from '../../shared/server.DBCUJijK.mjs';
|
|
5
5
|
import { HandleStandardServerPeerMessageOptions } from '../standard-peer/index.mjs';
|
|
6
|
-
import { S as StandardRPCHandlerOptions } from '../../shared/server.
|
|
6
|
+
import { S as StandardRPCHandlerOptions } from '../../shared/server.Ck-gOLzq.mjs';
|
|
7
7
|
import '@orpc/client';
|
|
8
8
|
import '@orpc/contract';
|
|
9
9
|
import '@orpc/standard-server';
|
|
10
10
|
import '@orpc/standard-server-peer';
|
|
11
|
-
import '../../shared/server.
|
|
11
|
+
import '../../shared/server.CVKCo60T.mjs';
|
|
12
12
|
import '@orpc/client/standard';
|
|
13
|
-
import '../../shared/server.
|
|
13
|
+
import '../../shared/server.DzV1hr3z.mjs';
|
|
14
14
|
|
|
15
15
|
declare class WsHandler<T extends Context> {
|
|
16
16
|
private readonly standardHandler;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { MaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { WebSocket } from 'ws';
|
|
3
|
-
import { C as Context, R as Router } from '../../shared/server.
|
|
4
|
-
import { f as StandardHandler } from '../../shared/server.
|
|
3
|
+
import { C as Context, R as Router } from '../../shared/server.B4BGqy3Y.js';
|
|
4
|
+
import { f as StandardHandler } from '../../shared/server.DPIFWpxG.js';
|
|
5
5
|
import { HandleStandardServerPeerMessageOptions } from '../standard-peer/index.js';
|
|
6
|
-
import { S as StandardRPCHandlerOptions } from '../../shared/server.
|
|
6
|
+
import { S as StandardRPCHandlerOptions } from '../../shared/server.COL12UTb.js';
|
|
7
7
|
import '@orpc/client';
|
|
8
8
|
import '@orpc/contract';
|
|
9
9
|
import '@orpc/standard-server';
|
|
10
10
|
import '@orpc/standard-server-peer';
|
|
11
|
-
import '../../shared/server.
|
|
11
|
+
import '../../shared/server.DNtJ-p60.js';
|
|
12
12
|
import '@orpc/client/standard';
|
|
13
|
-
import '../../shared/server.
|
|
13
|
+
import '../../shared/server.Cb6yD7DZ.js';
|
|
14
14
|
|
|
15
15
|
declare class WsHandler<T extends Context> {
|
|
16
16
|
private readonly standardHandler;
|
|
@@ -4,10 +4,10 @@ import { c as createServerPeerHandleRequestFn } from '../../shared/server.UVMTOW
|
|
|
4
4
|
import '@orpc/client';
|
|
5
5
|
import '@orpc/standard-server';
|
|
6
6
|
import '@orpc/contract';
|
|
7
|
-
import { b as StandardRPCHandler } from '../../shared/server.
|
|
7
|
+
import { b as StandardRPCHandler } from '../../shared/server.Bxx6tqNe.mjs';
|
|
8
8
|
import '@orpc/client/standard';
|
|
9
9
|
import '../../shared/server.DZ5BIITo.mjs';
|
|
10
|
-
import '../../shared/server.
|
|
10
|
+
import '../../shared/server.Ds4HPpvH.mjs';
|
|
11
11
|
|
|
12
12
|
class WsHandler {
|
|
13
13
|
constructor(standardHandler) {
|
package/dist/helpers/index.d.mts
CHANGED
|
@@ -129,6 +129,21 @@ declare function sign(value: string, secret: string): Promise<string>;
|
|
|
129
129
|
* ```
|
|
130
130
|
*/
|
|
131
131
|
declare function unsign(signedValue: string | undefined | null, secret: string): Promise<string | undefined>;
|
|
132
|
+
/**
|
|
133
|
+
* Extracts the value part from a signed string without verification.
|
|
134
|
+
*
|
|
135
|
+
* This function simply extracts the original value from a signed string
|
|
136
|
+
* without performing any signature verification. It's useful when you need
|
|
137
|
+
* to access the value quickly without the overhead of cryptographic verification.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```ts
|
|
141
|
+
* const signedValue = "user123.oneQsU0r5dvwQFHFEjjV1uOI_IR3gZfkYHij3TRauVA"
|
|
142
|
+
* const value = getSignedValue(signedValue)
|
|
143
|
+
* expect(value).toEqual("user123")
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
146
|
+
declare function getSignedValue(signedValue: string | undefined | null): string | undefined;
|
|
132
147
|
|
|
133
|
-
export { decodeBase64url, decrypt, deleteCookie, encodeBase64url, encrypt, getCookie, setCookie, sign, unsign };
|
|
148
|
+
export { decodeBase64url, decrypt, deleteCookie, encodeBase64url, encrypt, getCookie, getSignedValue, setCookie, sign, unsign };
|
|
134
149
|
export type { GetCookieOptions, SetCookieOptions };
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -129,6 +129,21 @@ declare function sign(value: string, secret: string): Promise<string>;
|
|
|
129
129
|
* ```
|
|
130
130
|
*/
|
|
131
131
|
declare function unsign(signedValue: string | undefined | null, secret: string): Promise<string | undefined>;
|
|
132
|
+
/**
|
|
133
|
+
* Extracts the value part from a signed string without verification.
|
|
134
|
+
*
|
|
135
|
+
* This function simply extracts the original value from a signed string
|
|
136
|
+
* without performing any signature verification. It's useful when you need
|
|
137
|
+
* to access the value quickly without the overhead of cryptographic verification.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```ts
|
|
141
|
+
* const signedValue = "user123.oneQsU0r5dvwQFHFEjjV1uOI_IR3gZfkYHij3TRauVA"
|
|
142
|
+
* const value = getSignedValue(signedValue)
|
|
143
|
+
* expect(value).toEqual("user123")
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
146
|
+
declare function getSignedValue(signedValue: string | undefined | null): string | undefined;
|
|
132
147
|
|
|
133
|
-
export { decodeBase64url, decrypt, deleteCookie, encodeBase64url, encrypt, getCookie, setCookie, sign, unsign };
|
|
148
|
+
export { decodeBase64url, decrypt, deleteCookie, encodeBase64url, encrypt, getCookie, getSignedValue, setCookie, sign, unsign };
|
|
134
149
|
export type { GetCookieOptions, SetCookieOptions };
|
package/dist/helpers/index.mjs
CHANGED
|
@@ -184,5 +184,15 @@ async function unsign(signedValue, secret) {
|
|
|
184
184
|
);
|
|
185
185
|
return isValid ? value : void 0;
|
|
186
186
|
}
|
|
187
|
+
function getSignedValue(signedValue) {
|
|
188
|
+
if (typeof signedValue !== "string") {
|
|
189
|
+
return void 0;
|
|
190
|
+
}
|
|
191
|
+
const lastDotIndex = signedValue.lastIndexOf(".");
|
|
192
|
+
if (lastDotIndex === -1) {
|
|
193
|
+
return void 0;
|
|
194
|
+
}
|
|
195
|
+
return signedValue.slice(0, lastDotIndex);
|
|
196
|
+
}
|
|
187
197
|
|
|
188
|
-
export { decodeBase64url, decrypt, deleteCookie, encodeBase64url, encrypt, getCookie, setCookie, sign, unsign };
|
|
198
|
+
export { decodeBase64url, decrypt, deleteCookie, encodeBase64url, encrypt, getCookie, getSignedValue, setCookie, sign, unsign };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { StandardRPCJsonSerializerOptions } from '@orpc/client/standard';
|
|
2
|
-
import { g as StandardHandlerPlugin, e as StandardHandlerOptions } from '../shared/server.
|
|
2
|
+
import { g as StandardHandlerPlugin, e as StandardHandlerOptions } from '../shared/server.DBCUJijK.mjs';
|
|
3
3
|
import { HibernationEventIterator } from '@orpc/standard-server';
|
|
4
4
|
export { HibernationEventIterator, HibernationEventIteratorCallback } from '@orpc/standard-server';
|
|
5
|
-
import { C as Context, R as Router } from '../shared/server.
|
|
5
|
+
import { C as Context, R as Router } from '../shared/server.B4BGqy3Y.mjs';
|
|
6
6
|
import '@orpc/client';
|
|
7
7
|
import '@orpc/contract';
|
|
8
8
|
import '@orpc/shared';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { StandardRPCJsonSerializerOptions } from '@orpc/client/standard';
|
|
2
|
-
import { g as StandardHandlerPlugin, e as StandardHandlerOptions } from '../shared/server.
|
|
2
|
+
import { g as StandardHandlerPlugin, e as StandardHandlerOptions } from '../shared/server.DPIFWpxG.js';
|
|
3
3
|
import { HibernationEventIterator } from '@orpc/standard-server';
|
|
4
4
|
export { HibernationEventIterator, HibernationEventIteratorCallback } from '@orpc/standard-server';
|
|
5
|
-
import { C as Context, R as Router } from '../shared/server.
|
|
5
|
+
import { C as Context, R as Router } from '../shared/server.B4BGqy3Y.js';
|
|
6
6
|
import '@orpc/client';
|
|
7
7
|
import '@orpc/contract';
|
|
8
8
|
import '@orpc/shared';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ORPCErrorJSON, ORPCError, Client, ClientContext, HTTPPath, HTTPMethod, ClientOptions, ClientPromiseResult } from '@orpc/client';
|
|
2
2
|
export { ClientContext, HTTPMethod, HTTPPath, ORPCError, isDefinedError, safe } from '@orpc/client';
|
|
3
3
|
import { AnySchema, ErrorMap, InferSchemaInput, InferSchemaOutput, ErrorFromErrorMap, Meta, MergedErrorMap, Route, Schema, ContractRouter, ContractProcedureDef, AnyContractRouter, ContractProcedure, InferContractRouterErrorMap, InferContractRouterMeta, AnyContractProcedure } from '@orpc/contract';
|
|
4
|
-
export { ContractProcedure, ContractProcedureDef, ContractRouter, ErrorMap, ErrorMapItem, InferSchemaInput, InferSchemaOutput, InputStructure, MergedErrorMap, Meta, OutputStructure, Route, Schema, ValidationError, eventIterator, type } from '@orpc/contract';
|
|
4
|
+
export { ContractProcedure, ContractProcedureDef, ContractRouter, ErrorMap, ErrorMapItem, InferSchemaInput, InferSchemaOutput, InputStructure, MergedErrorMap, Meta, OutputStructure, Route, Schema, ValidationError, eventIterator, type, validateORPCError } from '@orpc/contract';
|
|
5
5
|
import { ThrowableError, IntersectPick, MaybeOptionalOptions } from '@orpc/shared';
|
|
6
6
|
export { AsyncIteratorClass, EventPublisher, EventPublisherOptions, EventPublisherSubscribeIteratorOptions, IntersectPick, Registry, ThrowableError, asyncIteratorToStream as eventIteratorToStream, onError, onFinish, onStart, onSuccess, streamToAsyncIteratorClass as streamToEventIterator } from '@orpc/shared';
|
|
7
|
-
import { C as Context, P as Procedure, e as Middleware, O as ORPCErrorConstructorMap, M as MergedInitialContext, f as MergedCurrentContext, g as MapInputMiddleware, h as CreateProcedureClientOptions, i as ProcedureClient, j as ProcedureHandler, R as Router, c as Lazy, a as AnyMiddleware, b as AnyRouter, A as AnyProcedure, L as Lazyable, I as InferRouterInitialContext } from './shared/server.
|
|
8
|
-
export {
|
|
9
|
-
import { E as EnhanceRouterOptions, a as EnhancedRouter } from './shared/server.
|
|
10
|
-
export { A as AccessibleLazyRouter, C as ContractProcedureCallbackOptions, L as LazyTraverseContractProceduresOptions, T as TraverseContractProcedureCallbackOptions, b as TraverseContractProceduresOptions, U as UnlaziedRouter, c as createAccessibleLazyRouter, e as enhanceRouter, g as getRouter, r as resolveContractProcedures, t as traverseContractProcedures, u as unlazyRouter } from './shared/server.
|
|
7
|
+
import { C as Context, P as Procedure, e as Middleware, O as ORPCErrorConstructorMap, M as MergedInitialContext, f as MergedCurrentContext, g as MapInputMiddleware, h as CreateProcedureClientOptions, i as ProcedureClient, j as ProcedureHandler, R as Router, c as Lazy, a as AnyMiddleware, b as AnyRouter, A as AnyProcedure, L as Lazyable, I as InferRouterInitialContext } from './shared/server.B4BGqy3Y.mjs';
|
|
8
|
+
export { H as InferRouterCurrentContexts, G as InferRouterInitialContexts, J as InferRouterInputs, K as InferRouterOutputs, o as LAZY_SYMBOL, p as LazyMeta, w as MiddlewareNextFn, v as MiddlewareNextFnOptions, y as MiddlewareOptions, x as MiddlewareOutputFn, t as MiddlewareResult, l as ORPCErrorConstructorMapItem, k as ORPCErrorConstructorMapItemOptions, d as ProcedureClientInterceptorOptions, D as ProcedureDef, B as ProcedureHandlerOptions, n as createORPCErrorConstructorMap, F as createProcedureClient, s as getLazyMeta, r as isLazy, E as isProcedure, q as lazy, m as mergeCurrentContext, z as middlewareOutputFn, u as unlazy } from './shared/server.B4BGqy3Y.mjs';
|
|
9
|
+
import { E as EnhanceRouterOptions, a as EnhancedRouter } from './shared/server.DzV1hr3z.mjs';
|
|
10
|
+
export { A as AccessibleLazyRouter, C as ContractProcedureCallbackOptions, L as LazyTraverseContractProceduresOptions, T as TraverseContractProcedureCallbackOptions, b as TraverseContractProceduresOptions, U as UnlaziedRouter, c as createAccessibleLazyRouter, e as enhanceRouter, g as getRouter, r as resolveContractProcedures, t as traverseContractProcedures, u as unlazyRouter } from './shared/server.DzV1hr3z.mjs';
|
|
11
11
|
export { getEventMeta, withEventMeta } from '@orpc/standard-server';
|
|
12
12
|
|
|
13
13
|
type ActionableError<T> = T extends ORPCError<infer U, infer V> ? ORPCErrorJSON<U, V> & {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ORPCErrorJSON, ORPCError, Client, ClientContext, HTTPPath, HTTPMethod, ClientOptions, ClientPromiseResult } from '@orpc/client';
|
|
2
2
|
export { ClientContext, HTTPMethod, HTTPPath, ORPCError, isDefinedError, safe } from '@orpc/client';
|
|
3
3
|
import { AnySchema, ErrorMap, InferSchemaInput, InferSchemaOutput, ErrorFromErrorMap, Meta, MergedErrorMap, Route, Schema, ContractRouter, ContractProcedureDef, AnyContractRouter, ContractProcedure, InferContractRouterErrorMap, InferContractRouterMeta, AnyContractProcedure } from '@orpc/contract';
|
|
4
|
-
export { ContractProcedure, ContractProcedureDef, ContractRouter, ErrorMap, ErrorMapItem, InferSchemaInput, InferSchemaOutput, InputStructure, MergedErrorMap, Meta, OutputStructure, Route, Schema, ValidationError, eventIterator, type } from '@orpc/contract';
|
|
4
|
+
export { ContractProcedure, ContractProcedureDef, ContractRouter, ErrorMap, ErrorMapItem, InferSchemaInput, InferSchemaOutput, InputStructure, MergedErrorMap, Meta, OutputStructure, Route, Schema, ValidationError, eventIterator, type, validateORPCError } from '@orpc/contract';
|
|
5
5
|
import { ThrowableError, IntersectPick, MaybeOptionalOptions } from '@orpc/shared';
|
|
6
6
|
export { AsyncIteratorClass, EventPublisher, EventPublisherOptions, EventPublisherSubscribeIteratorOptions, IntersectPick, Registry, ThrowableError, asyncIteratorToStream as eventIteratorToStream, onError, onFinish, onStart, onSuccess, streamToAsyncIteratorClass as streamToEventIterator } from '@orpc/shared';
|
|
7
|
-
import { C as Context, P as Procedure, e as Middleware, O as ORPCErrorConstructorMap, M as MergedInitialContext, f as MergedCurrentContext, g as MapInputMiddleware, h as CreateProcedureClientOptions, i as ProcedureClient, j as ProcedureHandler, R as Router, c as Lazy, a as AnyMiddleware, b as AnyRouter, A as AnyProcedure, L as Lazyable, I as InferRouterInitialContext } from './shared/server.
|
|
8
|
-
export {
|
|
9
|
-
import { E as EnhanceRouterOptions, a as EnhancedRouter } from './shared/server.
|
|
10
|
-
export { A as AccessibleLazyRouter, C as ContractProcedureCallbackOptions, L as LazyTraverseContractProceduresOptions, T as TraverseContractProcedureCallbackOptions, b as TraverseContractProceduresOptions, U as UnlaziedRouter, c as createAccessibleLazyRouter, e as enhanceRouter, g as getRouter, r as resolveContractProcedures, t as traverseContractProcedures, u as unlazyRouter } from './shared/server.
|
|
7
|
+
import { C as Context, P as Procedure, e as Middleware, O as ORPCErrorConstructorMap, M as MergedInitialContext, f as MergedCurrentContext, g as MapInputMiddleware, h as CreateProcedureClientOptions, i as ProcedureClient, j as ProcedureHandler, R as Router, c as Lazy, a as AnyMiddleware, b as AnyRouter, A as AnyProcedure, L as Lazyable, I as InferRouterInitialContext } from './shared/server.B4BGqy3Y.js';
|
|
8
|
+
export { H as InferRouterCurrentContexts, G as InferRouterInitialContexts, J as InferRouterInputs, K as InferRouterOutputs, o as LAZY_SYMBOL, p as LazyMeta, w as MiddlewareNextFn, v as MiddlewareNextFnOptions, y as MiddlewareOptions, x as MiddlewareOutputFn, t as MiddlewareResult, l as ORPCErrorConstructorMapItem, k as ORPCErrorConstructorMapItemOptions, d as ProcedureClientInterceptorOptions, D as ProcedureDef, B as ProcedureHandlerOptions, n as createORPCErrorConstructorMap, F as createProcedureClient, s as getLazyMeta, r as isLazy, E as isProcedure, q as lazy, m as mergeCurrentContext, z as middlewareOutputFn, u as unlazy } from './shared/server.B4BGqy3Y.js';
|
|
9
|
+
import { E as EnhanceRouterOptions, a as EnhancedRouter } from './shared/server.Cb6yD7DZ.js';
|
|
10
|
+
export { A as AccessibleLazyRouter, C as ContractProcedureCallbackOptions, L as LazyTraverseContractProceduresOptions, T as TraverseContractProcedureCallbackOptions, b as TraverseContractProceduresOptions, U as UnlaziedRouter, c as createAccessibleLazyRouter, e as enhanceRouter, g as getRouter, r as resolveContractProcedures, t as traverseContractProcedures, u as unlazyRouter } from './shared/server.Cb6yD7DZ.js';
|
|
11
11
|
export { getEventMeta, withEventMeta } from '@orpc/standard-server';
|
|
12
12
|
|
|
13
13
|
type ActionableError<T> = T extends ORPCError<infer U, infer V> ? ORPCErrorJSON<U, V> & {
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { mergeErrorMap, mergeMeta, mergeRoute, mergePrefix, mergeTags, isContractProcedure, getContractRouter, fallbackContractConfig } from '@orpc/contract';
|
|
2
|
-
export { ValidationError, eventIterator, type } from '@orpc/contract';
|
|
3
|
-
import { P as Procedure, b as addMiddleware, c as createProcedureClient, e as enhanceRouter, l as lazy, s as setHiddenRouterContract, u as unlazy, g as getRouter, i as isProcedure, d as isLazy, f as createAssertedLazyProcedure } from './shared/server.
|
|
4
|
-
export { L as LAZY_SYMBOL, p as call, r as createAccessibleLazyRouter, a as createContractedProcedure, h as createORPCErrorConstructorMap, q as getHiddenRouterContract, j as getLazyMeta, n as isStartWithMiddlewares, m as mergeCurrentContext, o as mergeMiddlewares, k as middlewareOutputFn,
|
|
2
|
+
export { ValidationError, eventIterator, type, validateORPCError } from '@orpc/contract';
|
|
3
|
+
import { P as Procedure, b as addMiddleware, c as createProcedureClient, e as enhanceRouter, l as lazy, s as setHiddenRouterContract, u as unlazy, g as getRouter, i as isProcedure, d as isLazy, f as createAssertedLazyProcedure } from './shared/server.Ds4HPpvH.mjs';
|
|
4
|
+
export { L as LAZY_SYMBOL, p as call, r as createAccessibleLazyRouter, a as createContractedProcedure, h as createORPCErrorConstructorMap, q as getHiddenRouterContract, j as getLazyMeta, n as isStartWithMiddlewares, m as mergeCurrentContext, o as mergeMiddlewares, k as middlewareOutputFn, v as resolveContractProcedures, t as traverseContractProcedures, w as unlazyRouter } from './shared/server.Ds4HPpvH.mjs';
|
|
5
5
|
import { toORPCError } from '@orpc/client';
|
|
6
6
|
export { ORPCError, isDefinedError, safe } from '@orpc/client';
|
|
7
|
-
import { resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
7
|
+
import { isObject, resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
8
8
|
export { AsyncIteratorClass, EventPublisher, asyncIteratorToStream as eventIteratorToStream, onError, onFinish, onStart, onSuccess, streamToAsyncIteratorClass as streamToEventIterator } from '@orpc/shared';
|
|
9
9
|
export { getEventMeta, withEventMeta } from '@orpc/standard-server';
|
|
10
10
|
|
|
@@ -21,7 +21,7 @@ function fallbackConfig(key, value) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
function decorateMiddleware(middleware) {
|
|
24
|
-
const decorated = (...args) => middleware(...args);
|
|
24
|
+
const decorated = ((...args) => middleware(...args));
|
|
25
25
|
decorated.mapInput = (mapInput) => {
|
|
26
26
|
const mapped = decorateMiddleware(
|
|
27
27
|
(options, input, ...rest) => middleware(options, mapInput(input), ...rest)
|
|
@@ -54,6 +54,9 @@ function createActionableClient(client) {
|
|
|
54
54
|
if (error instanceof Error && "digest" in error && typeof error.digest === "string" && error.digest.startsWith("NEXT_")) {
|
|
55
55
|
throw error;
|
|
56
56
|
}
|
|
57
|
+
if (error instanceof Response && "options" in error && isObject(error.options) || isObject(error) && error.isNotFound === true) {
|
|
58
|
+
throw error;
|
|
59
|
+
}
|
|
57
60
|
return [toORPCError(error).toJSON(), void 0];
|
|
58
61
|
}
|
|
59
62
|
};
|
package/dist/plugins/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Value, Promisable } from '@orpc/shared';
|
|
2
2
|
import { StandardRequest, StandardHeaders } from '@orpc/standard-server';
|
|
3
3
|
import { BatchResponseBodyItem } from '@orpc/standard-server/batch';
|
|
4
|
-
import { d as StandardHandlerInterceptorOptions, g as StandardHandlerPlugin, e as StandardHandlerOptions } from '../shared/server.
|
|
5
|
-
import { C as Context, d as ProcedureClientInterceptorOptions } from '../shared/server.
|
|
4
|
+
import { d as StandardHandlerInterceptorOptions, g as StandardHandlerPlugin, e as StandardHandlerOptions } from '../shared/server.DBCUJijK.mjs';
|
|
5
|
+
import { C as Context, d as ProcedureClientInterceptorOptions } from '../shared/server.B4BGqy3Y.mjs';
|
|
6
6
|
import { Meta, ORPCError as ORPCError$1 } from '@orpc/contract';
|
|
7
7
|
import { ORPCError } from '@orpc/client';
|
|
8
8
|
|
|
@@ -160,6 +160,9 @@ interface StrictGetMethodPluginOptions {
|
|
|
160
160
|
*/
|
|
161
161
|
declare class StrictGetMethodPlugin<T extends Context> implements StandardHandlerPlugin<T> {
|
|
162
162
|
private readonly error;
|
|
163
|
+
/**
|
|
164
|
+
* make sure execute before batch plugin to get real method
|
|
165
|
+
*/
|
|
163
166
|
order: number;
|
|
164
167
|
constructor(options?: StrictGetMethodPluginOptions);
|
|
165
168
|
init(options: StandardHandlerOptions<T>): void;
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Value, Promisable } from '@orpc/shared';
|
|
2
2
|
import { StandardRequest, StandardHeaders } from '@orpc/standard-server';
|
|
3
3
|
import { BatchResponseBodyItem } from '@orpc/standard-server/batch';
|
|
4
|
-
import { d as StandardHandlerInterceptorOptions, g as StandardHandlerPlugin, e as StandardHandlerOptions } from '../shared/server.
|
|
5
|
-
import { C as Context, d as ProcedureClientInterceptorOptions } from '../shared/server.
|
|
4
|
+
import { d as StandardHandlerInterceptorOptions, g as StandardHandlerPlugin, e as StandardHandlerOptions } from '../shared/server.DPIFWpxG.js';
|
|
5
|
+
import { C as Context, d as ProcedureClientInterceptorOptions } from '../shared/server.B4BGqy3Y.js';
|
|
6
6
|
import { Meta, ORPCError as ORPCError$1 } from '@orpc/contract';
|
|
7
7
|
import { ORPCError } from '@orpc/client';
|
|
8
8
|
|
|
@@ -160,6 +160,9 @@ interface StrictGetMethodPluginOptions {
|
|
|
160
160
|
*/
|
|
161
161
|
declare class StrictGetMethodPlugin<T extends Context> implements StandardHandlerPlugin<T> {
|
|
162
162
|
private readonly error;
|
|
163
|
+
/**
|
|
164
|
+
* make sure execute before batch plugin to get real method
|
|
165
|
+
*/
|
|
163
166
|
order: number;
|
|
164
167
|
constructor(options?: StrictGetMethodPluginOptions);
|
|
165
168
|
init(options: StandardHandlerOptions<T>): void;
|
package/dist/plugins/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { runWithSpan, value, setSpanError, isAsyncIteratorObject, clone } from '@orpc/shared';
|
|
1
|
+
import { runWithSpan, value, setSpanError, isAsyncIteratorObject, AsyncIteratorClass, clone } from '@orpc/shared';
|
|
2
2
|
import { flattenHeader } from '@orpc/standard-server';
|
|
3
3
|
import { parseBatchRequest, toBatchResponse } from '@orpc/standard-server/batch';
|
|
4
4
|
import { toFetchHeaders } from '@orpc/standard-server-fetch';
|
|
5
5
|
import { ORPCError } from '@orpc/client';
|
|
6
|
-
export { S as StrictGetMethodPlugin } from '../shared/server.
|
|
6
|
+
export { S as StrictGetMethodPlugin } from '../shared/server.TEVCLCFC.mjs';
|
|
7
7
|
import '@orpc/contract';
|
|
8
8
|
|
|
9
9
|
class BatchHandlerPlugin {
|
|
@@ -79,22 +79,24 @@ class BatchHandlerPlugin {
|
|
|
79
79
|
await Promise.race(responses);
|
|
80
80
|
const status = await value(this.successStatus, responses, options2);
|
|
81
81
|
const headers = await value(this.headers, responses, options2);
|
|
82
|
+
const promises = [...responses];
|
|
82
83
|
const response = await toBatchResponse({
|
|
83
84
|
status,
|
|
84
85
|
headers,
|
|
85
86
|
mode,
|
|
86
|
-
body:
|
|
87
|
-
|
|
88
|
-
while (true) {
|
|
87
|
+
body: new AsyncIteratorClass(
|
|
88
|
+
async () => {
|
|
89
89
|
const handling = promises.filter((p) => p !== void 0);
|
|
90
|
-
if (handling.length
|
|
91
|
-
return;
|
|
90
|
+
if (handling.length <= 0) {
|
|
91
|
+
return { done: true, value: void 0 };
|
|
92
92
|
}
|
|
93
|
-
const
|
|
94
|
-
promises[
|
|
95
|
-
|
|
93
|
+
const value2 = await Promise.race(handling);
|
|
94
|
+
promises[value2.index] = void 0;
|
|
95
|
+
return { done: false, value: value2 };
|
|
96
|
+
},
|
|
97
|
+
async () => {
|
|
96
98
|
}
|
|
97
|
-
|
|
99
|
+
)
|
|
98
100
|
});
|
|
99
101
|
return {
|
|
100
102
|
matched: true,
|
|
@@ -13,7 +13,6 @@ type ORPCErrorConstructorMap<T extends ErrorMap> = {
|
|
|
13
13
|
[K in keyof T]: K extends ORPCErrorCode ? T[K] extends ErrorMapItem<infer UInputSchema> ? ORPCErrorConstructorMapItem<K, InferSchemaInput<UInputSchema>> : never : never;
|
|
14
14
|
};
|
|
15
15
|
declare function createORPCErrorConstructorMap<T extends ErrorMap>(errors: T): ORPCErrorConstructorMap<T>;
|
|
16
|
-
declare function validateORPCError(map: ErrorMap, error: ORPCError<any, any>): Promise<ORPCError<string, unknown>>;
|
|
17
16
|
|
|
18
17
|
declare const LAZY_SYMBOL: unique symbol;
|
|
19
18
|
interface LazyMeta {
|
|
@@ -190,5 +189,5 @@ type InferRouterOutputs<T extends AnyRouter> = T extends Procedure<any, any, any
|
|
|
190
189
|
[K in keyof T]: T[K] extends Lazyable<infer U extends AnyRouter> ? InferRouterOutputs<U> : never;
|
|
191
190
|
};
|
|
192
191
|
|
|
193
|
-
export {
|
|
194
|
-
export type { AnyProcedure as A, Context as C,
|
|
192
|
+
export { isProcedure as E, createProcedureClient as F, Procedure as P, mergeCurrentContext as m, createORPCErrorConstructorMap as n, LAZY_SYMBOL as o, lazy as q, isLazy as r, getLazyMeta as s, unlazy as u, middlewareOutputFn as z };
|
|
193
|
+
export type { AnyProcedure as A, ProcedureHandlerOptions as B, Context as C, ProcedureDef as D, InferRouterInitialContexts as G, InferRouterCurrentContexts as H, InferRouterInitialContext as I, InferRouterInputs as J, InferRouterOutputs as K, Lazyable as L, MergedInitialContext as M, ORPCErrorConstructorMap as O, Router as R, AnyMiddleware as a, AnyRouter as b, Lazy as c, ProcedureClientInterceptorOptions as d, Middleware as e, MergedCurrentContext as f, MapInputMiddleware as g, CreateProcedureClientOptions as h, ProcedureClient as i, ProcedureHandler as j, ORPCErrorConstructorMapItemOptions as k, ORPCErrorConstructorMapItem as l, LazyMeta as p, MiddlewareResult as t, MiddlewareNextFnOptions as v, MiddlewareNextFn as w, MiddlewareOutputFn as x, MiddlewareOptions as y };
|
|
@@ -13,7 +13,6 @@ type ORPCErrorConstructorMap<T extends ErrorMap> = {
|
|
|
13
13
|
[K in keyof T]: K extends ORPCErrorCode ? T[K] extends ErrorMapItem<infer UInputSchema> ? ORPCErrorConstructorMapItem<K, InferSchemaInput<UInputSchema>> : never : never;
|
|
14
14
|
};
|
|
15
15
|
declare function createORPCErrorConstructorMap<T extends ErrorMap>(errors: T): ORPCErrorConstructorMap<T>;
|
|
16
|
-
declare function validateORPCError(map: ErrorMap, error: ORPCError<any, any>): Promise<ORPCError<string, unknown>>;
|
|
17
16
|
|
|
18
17
|
declare const LAZY_SYMBOL: unique symbol;
|
|
19
18
|
interface LazyMeta {
|
|
@@ -190,5 +189,5 @@ type InferRouterOutputs<T extends AnyRouter> = T extends Procedure<any, any, any
|
|
|
190
189
|
[K in keyof T]: T[K] extends Lazyable<infer U extends AnyRouter> ? InferRouterOutputs<U> : never;
|
|
191
190
|
};
|
|
192
191
|
|
|
193
|
-
export {
|
|
194
|
-
export type { AnyProcedure as A, Context as C,
|
|
192
|
+
export { isProcedure as E, createProcedureClient as F, Procedure as P, mergeCurrentContext as m, createORPCErrorConstructorMap as n, LAZY_SYMBOL as o, lazy as q, isLazy as r, getLazyMeta as s, unlazy as u, middlewareOutputFn as z };
|
|
193
|
+
export type { AnyProcedure as A, ProcedureHandlerOptions as B, Context as C, ProcedureDef as D, InferRouterInitialContexts as G, InferRouterCurrentContexts as H, InferRouterInitialContext as I, InferRouterInputs as J, InferRouterOutputs as K, Lazyable as L, MergedInitialContext as M, ORPCErrorConstructorMap as O, Router as R, AnyMiddleware as a, AnyRouter as b, Lazy as c, ProcedureClientInterceptorOptions as d, Middleware as e, MergedCurrentContext as f, MapInputMiddleware as g, CreateProcedureClientOptions as h, ProcedureClient as i, ProcedureHandler as j, ORPCErrorConstructorMapItemOptions as k, ORPCErrorConstructorMapItem as l, LazyMeta as p, MiddlewareResult as t, MiddlewareNextFnOptions as v, MiddlewareNextFn as w, MiddlewareOutputFn as x, MiddlewareOptions as y };
|
|
@@ -2,7 +2,7 @@ import { toHttpPath, StandardRPCJsonSerializer, StandardRPCSerializer } from '@o
|
|
|
2
2
|
import { ORPCError, toORPCError } from '@orpc/client';
|
|
3
3
|
import { toArray, intercept, runWithSpan, ORPC_NAME, isAsyncIteratorObject, asyncIteratorWithSpan, setSpanError, parseEmptyableJSON, NullProtoObj, value } from '@orpc/shared';
|
|
4
4
|
import { flattenHeader } from '@orpc/standard-server';
|
|
5
|
-
import { c as createProcedureClient, t as traverseContractProcedures, i as isProcedure, u as unlazy, g as getRouter, a as createContractedProcedure } from './server.
|
|
5
|
+
import { c as createProcedureClient, t as traverseContractProcedures, i as isProcedure, u as unlazy, g as getRouter, a as createContractedProcedure } from './server.Ds4HPpvH.mjs';
|
|
6
6
|
|
|
7
7
|
class CompositeStandardHandlerPlugin {
|
|
8
8
|
plugins;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { StandardRPCJsonSerializerOptions } from '@orpc/client/standard';
|
|
2
|
-
import { b as AnyRouter, C as Context, R as Router } from './server.
|
|
3
|
-
import { i as StandardMatcher, h as StandardMatchResult, e as StandardHandlerOptions, f as StandardHandler } from './server.
|
|
2
|
+
import { b as AnyRouter, C as Context, R as Router } from './server.B4BGqy3Y.js';
|
|
3
|
+
import { i as StandardMatcher, h as StandardMatchResult, e as StandardHandlerOptions, f as StandardHandler } from './server.DPIFWpxG.js';
|
|
4
4
|
import { HTTPPath } from '@orpc/client';
|
|
5
5
|
import { Value } from '@orpc/shared';
|
|
6
|
-
import { T as TraverseContractProcedureCallbackOptions } from './server.
|
|
6
|
+
import { T as TraverseContractProcedureCallbackOptions } from './server.Cb6yD7DZ.js';
|
|
7
7
|
|
|
8
8
|
interface StandardRPCMatcherOptions {
|
|
9
9
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Context } from './server.
|
|
2
|
-
import { b as StandardHandleOptions } from './server.
|
|
1
|
+
import { C as Context } from './server.B4BGqy3Y.mjs';
|
|
2
|
+
import { b as StandardHandleOptions } from './server.DBCUJijK.mjs';
|
|
3
3
|
|
|
4
4
|
type FriendlyStandardHandleOptions<T extends Context> = Omit<StandardHandleOptions<T>, 'context'> & (Record<never, never> extends T ? {
|
|
5
5
|
context?: T;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ErrorMap, EnhanceRouteOptions, MergedErrorMap, AnyContractRouter, AnyContractProcedure } from '@orpc/contract';
|
|
2
|
-
import { a as AnyMiddleware, L as Lazyable, b as AnyRouter, C as Context, c as Lazy, A as AnyProcedure, P as Procedure, M as MergedInitialContext } from './server.
|
|
2
|
+
import { a as AnyMiddleware, L as Lazyable, b as AnyRouter, C as Context, c as Lazy, A as AnyProcedure, P as Procedure, M as MergedInitialContext } from './server.B4BGqy3Y.js';
|
|
3
3
|
|
|
4
4
|
declare function getRouter<T extends Lazyable<AnyRouter | undefined>>(router: T, path: readonly string[]): T extends Lazy<any> ? Lazy<AnyRouter | undefined> : Lazyable<AnyRouter | undefined>;
|
|
5
5
|
type AccessibleLazyRouter<T extends Lazyable<AnyRouter | undefined>> = T extends Lazy<infer U extends AnyRouter | undefined | Lazy<AnyRouter | undefined>> ? AccessibleLazyRouter<U> : T extends AnyProcedure | undefined ? Lazy<T> : Lazy<T> & {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { StandardRPCJsonSerializerOptions } from '@orpc/client/standard';
|
|
2
|
-
import { b as AnyRouter, C as Context, R as Router } from './server.
|
|
3
|
-
import { i as StandardMatcher, h as StandardMatchResult, e as StandardHandlerOptions, f as StandardHandler } from './server.
|
|
2
|
+
import { b as AnyRouter, C as Context, R as Router } from './server.B4BGqy3Y.mjs';
|
|
3
|
+
import { i as StandardMatcher, h as StandardMatchResult, e as StandardHandlerOptions, f as StandardHandler } from './server.DBCUJijK.mjs';
|
|
4
4
|
import { HTTPPath } from '@orpc/client';
|
|
5
5
|
import { Value } from '@orpc/shared';
|
|
6
|
-
import { T as TraverseContractProcedureCallbackOptions } from './server.
|
|
6
|
+
import { T as TraverseContractProcedureCallbackOptions } from './server.DzV1hr3z.mjs';
|
|
7
7
|
|
|
8
8
|
interface StandardRPCMatcherOptions {
|
|
9
9
|
/**
|
|
@@ -2,7 +2,7 @@ import { HTTPPath, ORPCError } from '@orpc/client';
|
|
|
2
2
|
import { Meta } from '@orpc/contract';
|
|
3
3
|
import { Interceptor } from '@orpc/shared';
|
|
4
4
|
import { StandardResponse, StandardLazyRequest } from '@orpc/standard-server';
|
|
5
|
-
import { C as Context, R as Router, b as AnyRouter, A as AnyProcedure, d as ProcedureClientInterceptorOptions } from './server.
|
|
5
|
+
import { C as Context, R as Router, b as AnyRouter, A as AnyProcedure, d as ProcedureClientInterceptorOptions } from './server.B4BGqy3Y.mjs';
|
|
6
6
|
|
|
7
7
|
interface StandardHandlerPlugin<T extends Context> {
|
|
8
8
|
order?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Context } from './server.
|
|
2
|
-
import { b as StandardHandleOptions } from './server.
|
|
1
|
+
import { C as Context } from './server.B4BGqy3Y.js';
|
|
2
|
+
import { b as StandardHandleOptions } from './server.DPIFWpxG.js';
|
|
3
3
|
|
|
4
4
|
type FriendlyStandardHandleOptions<T extends Context> = Omit<StandardHandleOptions<T>, 'context'> & (Record<never, never> extends T ? {
|
|
5
5
|
context?: T;
|
|
@@ -2,7 +2,7 @@ import { HTTPPath, ORPCError } from '@orpc/client';
|
|
|
2
2
|
import { Meta } from '@orpc/contract';
|
|
3
3
|
import { Interceptor } from '@orpc/shared';
|
|
4
4
|
import { StandardResponse, StandardLazyRequest } from '@orpc/standard-server';
|
|
5
|
-
import { C as Context, R as Router, b as AnyRouter, A as AnyProcedure, d as ProcedureClientInterceptorOptions } from './server.
|
|
5
|
+
import { C as Context, R as Router, b as AnyRouter, A as AnyProcedure, d as ProcedureClientInterceptorOptions } from './server.B4BGqy3Y.js';
|
|
6
6
|
|
|
7
7
|
interface StandardHandlerPlugin<T extends Context> {
|
|
8
8
|
order?: number;
|