@trpc/client 11.1.3-alpha-tmp-tsdown.24 → 11.1.3-alpha-tmp-tsdown.28
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/dist/{TRPCClientError.js → TRPCClientError-CGgRtttT.cjs} +14 -4
- package/dist/{TRPCClientError.mjs → TRPCClientError-COkhCKf3.mjs} +1 -1
- package/dist/TRPCClientError-COkhCKf3.mjs.map +1 -0
- package/dist/httpBatchLink-CIC9PZ_Z.cjs +267 -0
- package/dist/httpBatchLink-DIfnmmcu.mjs +238 -0
- package/dist/httpBatchLink-DIfnmmcu.mjs.map +1 -0
- package/dist/{links/HTTPBatchLinkOptions.d.mts → httpBatchLink.d-BN2Iw_cK.d.mts} +13 -5
- package/dist/httpBatchLink.d-BN2Iw_cK.d.mts.map +1 -0
- package/dist/{links/HTTPBatchLinkOptions.d.ts → httpBatchLink.d-CLAuJKNV.d.cts} +13 -5
- package/dist/httpBatchLink.d-CLAuJKNV.d.cts.map +1 -0
- package/dist/httpLink-9bpwQ15c.mjs +90 -0
- package/dist/httpLink-9bpwQ15c.mjs.map +1 -0
- package/dist/{links/httpLink.js → httpLink-BbVj_TgM.cjs} +43 -9
- package/dist/{links/httpLink.d.ts → httpLink.d-CTSOARfE.d.mts} +3 -3
- package/dist/httpLink.d-CTSOARfE.d.mts.map +1 -0
- package/dist/httpLink.d-yMKfOlTU.d.cts +23 -0
- package/dist/httpLink.d-yMKfOlTU.d.cts.map +1 -0
- package/dist/{links/internals/httpUtils.mjs → httpUtils-3pbQzhUL.mjs} +13 -4
- package/dist/httpUtils-3pbQzhUL.mjs.map +1 -0
- package/dist/{links/internals/httpUtils.js → httpUtils-Buf6jCgh.cjs} +55 -10
- package/dist/{links/internals/httpUtils.d.ts → httpUtils.d-C8wPxU79.d.mts} +3 -3
- package/dist/httpUtils.d-C8wPxU79.d.mts.map +1 -0
- package/dist/{links/internals/httpUtils.d.mts → httpUtils.d-DNRVGNHs.d.cts} +3 -3
- package/dist/httpUtils.d-DNRVGNHs.d.cts.map +1 -0
- package/dist/index.cjs +731 -0
- package/dist/index.d.cts +197 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +197 -21
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +733 -19
- package/dist/index.mjs.map +1 -0
- package/dist/links/httpBatchLink.cjs +6 -0
- package/dist/links/httpBatchLink.d.cts +6 -0
- package/dist/links/httpBatchLink.d.mts +6 -15
- package/dist/links/httpBatchLink.mjs +5 -93
- package/dist/links/httpLink.cjs +6 -0
- package/dist/links/httpLink.d.cts +6 -0
- package/dist/links/httpLink.d.mts +6 -23
- package/dist/links/httpLink.mjs +5 -78
- package/dist/links/loggerLink.cjs +3 -0
- package/dist/links/loggerLink.d.cts +4 -0
- package/dist/links/loggerLink.d.mts +4 -55
- package/dist/links/loggerLink.mjs +2 -124
- package/dist/links/splitLink.cjs +3 -0
- package/dist/links/splitLink.d.cts +4 -0
- package/dist/links/splitLink.d.mts +4 -20
- package/dist/links/splitLink.mjs +2 -25
- package/dist/links/wsLink/wsLink.cjs +6 -0
- package/dist/links/wsLink/wsLink.d.cts +5 -0
- package/dist/links/wsLink/wsLink.d.mts +5 -14
- package/dist/links/wsLink/wsLink.mjs +4 -32
- package/dist/{links/loggerLink.js → loggerLink-CsDfg5Bb.cjs} +8 -3
- package/dist/loggerLink-PGBSQFcR.mjs +125 -0
- package/dist/loggerLink-PGBSQFcR.mjs.map +1 -0
- package/dist/{links/loggerLink.d.ts → loggerLink.d-CZjK1CXm.d.mts} +2 -3
- package/dist/loggerLink.d-CZjK1CXm.d.mts.map +1 -0
- package/dist/loggerLink.d-DU855urG.d.cts +54 -0
- package/dist/loggerLink.d-DU855urG.d.cts.map +1 -0
- package/dist/splitLink-BMgxggng.cjs +58 -0
- package/dist/{links/internals/createChain.mjs → splitLink-BVblHq4n.mjs} +23 -2
- package/dist/splitLink-BVblHq4n.mjs.map +1 -0
- package/dist/{links/splitLink.d.ts → splitLink.d-BAqgq0NG.d.mts} +2 -2
- package/dist/splitLink.d-BAqgq0NG.d.mts.map +1 -0
- package/dist/splitLink.d-GdevSkGW.d.cts +20 -0
- package/dist/splitLink.d-GdevSkGW.d.cts.map +1 -0
- package/dist/{links/internals/subscriptions.d.mts → subscriptions.d-Ciljg_dH.d.cts} +1 -1
- package/dist/subscriptions.d-Ciljg_dH.d.cts.map +1 -0
- package/dist/{links/internals/subscriptions.d.ts → subscriptions.d-U92STdZl.d.mts} +1 -1
- package/dist/subscriptions.d-U92STdZl.d.mts.map +1 -0
- package/dist/types.d-DXbqQLCC.d.mts +182 -0
- package/dist/types.d-DXbqQLCC.d.mts.map +1 -0
- package/dist/types.d-DqGYG6S_.d.cts +182 -0
- package/dist/types.d-DqGYG6S_.d.cts.map +1 -0
- package/dist/{internals/transformer.js → unstable-internals-CYBH4jbF.cjs} +6 -1
- package/dist/{internals/transformer.mjs → unstable-internals-DU4WecoG.mjs} +1 -1
- package/dist/unstable-internals-DU4WecoG.mjs.map +1 -0
- package/dist/unstable-internals.cjs +3 -0
- package/dist/{internals/transformer.d.mts → unstable-internals.d-DyLd-B0J.d.mts} +1 -1
- package/dist/unstable-internals.d-DyLd-B0J.d.mts.map +1 -0
- package/dist/{internals/transformer.d.ts → unstable-internals.d-kWsZTlQq.d.cts} +1 -1
- package/dist/unstable-internals.d-kWsZTlQq.d.cts.map +1 -0
- package/dist/unstable-internals.d.cts +3 -0
- package/dist/unstable-internals.d.mts +2 -2
- package/dist/unstable-internals.mjs +1 -1
- package/dist/wsLink-DbSHOzlB.mjs +698 -0
- package/dist/wsLink-DbSHOzlB.mjs.map +1 -0
- package/dist/wsLink-DhJ50EC5.cjs +715 -0
- package/dist/wsLink.d-BqO7ltN_.d.mts +194 -0
- package/dist/wsLink.d-BqO7ltN_.d.mts.map +1 -0
- package/dist/wsLink.d-DtZjg09g.d.cts +194 -0
- package/dist/wsLink.d-DtZjg09g.d.cts.map +1 -0
- package/links/httpBatchLink/package.json +1 -1
- package/links/httpLink/package.json +1 -1
- package/links/loggerLink/package.json +1 -1
- package/links/splitLink/package.json +1 -1
- package/links/wsLink/wsLink/package.json +1 -1
- package/package.json +22 -21
- package/unstable-internals/package.json +1 -1
- package/dist/TRPCClientError.d.mts +0 -32
- package/dist/TRPCClientError.d.mts.map +0 -1
- package/dist/TRPCClientError.d.ts +0 -32
- package/dist/TRPCClientError.d.ts.map +0 -1
- package/dist/TRPCClientError.mjs.map +0 -1
- package/dist/_virtual/rolldown_runtime.mjs +0 -27
- package/dist/createTRPCClient.d.mts +0 -69
- package/dist/createTRPCClient.d.mts.map +0 -1
- package/dist/createTRPCClient.d.ts +0 -69
- package/dist/createTRPCClient.d.ts.map +0 -1
- package/dist/createTRPCClient.js +0 -48
- package/dist/createTRPCClient.mjs +0 -45
- package/dist/createTRPCClient.mjs.map +0 -1
- package/dist/createTRPCUntypedClient.d.mts +0 -8
- package/dist/createTRPCUntypedClient.d.mts.map +0 -1
- package/dist/createTRPCUntypedClient.d.ts +0 -8
- package/dist/createTRPCUntypedClient.d.ts.map +0 -1
- package/dist/createTRPCUntypedClient.js +0 -9
- package/dist/createTRPCUntypedClient.mjs +0 -10
- package/dist/createTRPCUntypedClient.mjs.map +0 -1
- package/dist/getFetch.d.mts +0 -9
- package/dist/getFetch.d.mts.map +0 -1
- package/dist/getFetch.d.ts +0 -9
- package/dist/getFetch.d.ts.map +0 -1
- package/dist/getFetch.js +0 -12
- package/dist/getFetch.mjs +0 -12
- package/dist/getFetch.mjs.map +0 -1
- package/dist/index.d.ts +0 -21
- package/dist/index.js +0 -43
- package/dist/internals/TRPCUntypedClient.d.mts +0 -45
- package/dist/internals/TRPCUntypedClient.d.mts.map +0 -1
- package/dist/internals/TRPCUntypedClient.d.ts +0 -45
- package/dist/internals/TRPCUntypedClient.d.ts.map +0 -1
- package/dist/internals/TRPCUntypedClient.js +0 -96
- package/dist/internals/TRPCUntypedClient.mjs +0 -96
- package/dist/internals/TRPCUntypedClient.mjs.map +0 -1
- package/dist/internals/dataLoader.js +0 -106
- package/dist/internals/dataLoader.mjs +0 -106
- package/dist/internals/dataLoader.mjs.map +0 -1
- package/dist/internals/inputWithTrackedEventId.js +0 -13
- package/dist/internals/inputWithTrackedEventId.mjs +0 -13
- package/dist/internals/inputWithTrackedEventId.mjs.map +0 -1
- package/dist/internals/signals.js +0 -46
- package/dist/internals/signals.mjs +0 -44
- package/dist/internals/signals.mjs.map +0 -1
- package/dist/internals/transformer.d.mts.map +0 -1
- package/dist/internals/transformer.d.ts.map +0 -1
- package/dist/internals/transformer.mjs.map +0 -1
- package/dist/internals/types.d.mts +0 -84
- package/dist/internals/types.d.mts.map +0 -1
- package/dist/internals/types.d.ts +0 -84
- package/dist/internals/types.d.ts.map +0 -1
- package/dist/links/HTTPBatchLinkOptions.d.mts.map +0 -1
- package/dist/links/HTTPBatchLinkOptions.d.ts.map +0 -1
- package/dist/links/httpBatchLink.d.mts.map +0 -1
- package/dist/links/httpBatchLink.d.ts +0 -15
- package/dist/links/httpBatchLink.d.ts.map +0 -1
- package/dist/links/httpBatchLink.js +0 -94
- package/dist/links/httpBatchLink.mjs.map +0 -1
- package/dist/links/httpBatchStreamLink.d.mts +0 -19
- package/dist/links/httpBatchStreamLink.d.mts.map +0 -1
- package/dist/links/httpBatchStreamLink.d.ts +0 -19
- package/dist/links/httpBatchStreamLink.d.ts.map +0 -1
- package/dist/links/httpBatchStreamLink.js +0 -126
- package/dist/links/httpBatchStreamLink.mjs +0 -125
- package/dist/links/httpBatchStreamLink.mjs.map +0 -1
- package/dist/links/httpLink.d.mts.map +0 -1
- package/dist/links/httpLink.d.ts.map +0 -1
- package/dist/links/httpLink.mjs.map +0 -1
- package/dist/links/httpSubscriptionLink.d.mts +0 -29
- package/dist/links/httpSubscriptionLink.d.mts.map +0 -1
- package/dist/links/httpSubscriptionLink.d.ts +0 -29
- package/dist/links/httpSubscriptionLink.d.ts.map +0 -1
- package/dist/links/httpSubscriptionLink.js +0 -142
- package/dist/links/httpSubscriptionLink.mjs +0 -141
- package/dist/links/httpSubscriptionLink.mjs.map +0 -1
- package/dist/links/internals/contentTypes.d.mts +0 -9
- package/dist/links/internals/contentTypes.d.mts.map +0 -1
- package/dist/links/internals/contentTypes.d.ts +0 -9
- package/dist/links/internals/contentTypes.d.ts.map +0 -1
- package/dist/links/internals/contentTypes.js +0 -16
- package/dist/links/internals/contentTypes.mjs +0 -14
- package/dist/links/internals/contentTypes.mjs.map +0 -1
- package/dist/links/internals/createChain.js +0 -26
- package/dist/links/internals/createChain.mjs.map +0 -1
- package/dist/links/internals/httpUtils.d.mts.map +0 -1
- package/dist/links/internals/httpUtils.d.ts.map +0 -1
- package/dist/links/internals/httpUtils.mjs.map +0 -1
- package/dist/links/internals/subscriptions.d.mts.map +0 -1
- package/dist/links/internals/subscriptions.d.ts.map +0 -1
- package/dist/links/internals/urlWithConnectionParams.d.mts +0 -24
- package/dist/links/internals/urlWithConnectionParams.d.mts.map +0 -1
- package/dist/links/internals/urlWithConnectionParams.d.ts +0 -24
- package/dist/links/internals/urlWithConnectionParams.d.ts.map +0 -1
- package/dist/links/internals/urlWithConnectionParams.js +0 -12
- package/dist/links/internals/urlWithConnectionParams.mjs +0 -12
- package/dist/links/internals/urlWithConnectionParams.mjs.map +0 -1
- package/dist/links/localLink.d.mts +0 -21
- package/dist/links/localLink.d.mts.map +0 -1
- package/dist/links/localLink.d.ts +0 -21
- package/dist/links/localLink.d.ts.map +0 -1
- package/dist/links/localLink.js +0 -192
- package/dist/links/localLink.mjs +0 -193
- package/dist/links/localLink.mjs.map +0 -1
- package/dist/links/loggerLink.d.mts.map +0 -1
- package/dist/links/loggerLink.d.ts.map +0 -1
- package/dist/links/loggerLink.mjs.map +0 -1
- package/dist/links/retryLink.d.mts +0 -36
- package/dist/links/retryLink.d.mts.map +0 -1
- package/dist/links/retryLink.d.ts +0 -36
- package/dist/links/retryLink.d.ts.map +0 -1
- package/dist/links/retryLink.js +0 -64
- package/dist/links/retryLink.mjs +0 -64
- package/dist/links/retryLink.mjs.map +0 -1
- package/dist/links/splitLink.d.mts.map +0 -1
- package/dist/links/splitLink.d.ts.map +0 -1
- package/dist/links/splitLink.js +0 -26
- package/dist/links/splitLink.mjs.map +0 -1
- package/dist/links/types.d.mts +0 -68
- package/dist/links/types.d.mts.map +0 -1
- package/dist/links/types.d.ts +0 -68
- package/dist/links/types.d.ts.map +0 -1
- package/dist/links/wsLink/createWsClient.d.mts +0 -9
- package/dist/links/wsLink/createWsClient.d.mts.map +0 -1
- package/dist/links/wsLink/createWsClient.d.ts +0 -9
- package/dist/links/wsLink/createWsClient.d.ts.map +0 -1
- package/dist/links/wsLink/createWsClient.js +0 -9
- package/dist/links/wsLink/createWsClient.mjs +0 -10
- package/dist/links/wsLink/createWsClient.mjs.map +0 -1
- package/dist/links/wsLink/wsClient/options.d.mts +0 -69
- package/dist/links/wsLink/wsClient/options.d.mts.map +0 -1
- package/dist/links/wsLink/wsClient/options.d.ts +0 -69
- package/dist/links/wsLink/wsClient/options.d.ts.map +0 -1
- package/dist/links/wsLink/wsClient/options.js +0 -24
- package/dist/links/wsLink/wsClient/options.mjs +0 -22
- package/dist/links/wsLink/wsClient/options.mjs.map +0 -1
- package/dist/links/wsLink/wsClient/requestManager.js +0 -136
- package/dist/links/wsLink/wsClient/requestManager.mjs +0 -137
- package/dist/links/wsLink/wsClient/requestManager.mjs.map +0 -1
- package/dist/links/wsLink/wsClient/utils.js +0 -77
- package/dist/links/wsLink/wsClient/utils.mjs +0 -74
- package/dist/links/wsLink/wsClient/utils.mjs.map +0 -1
- package/dist/links/wsLink/wsClient/wsClient.d.mts +0 -101
- package/dist/links/wsLink/wsClient/wsClient.d.mts.map +0 -1
- package/dist/links/wsLink/wsClient/wsClient.d.ts +0 -101
- package/dist/links/wsLink/wsClient/wsClient.d.ts.map +0 -1
- package/dist/links/wsLink/wsClient/wsClient.js +0 -276
- package/dist/links/wsLink/wsClient/wsClient.mjs +0 -276
- package/dist/links/wsLink/wsClient/wsClient.mjs.map +0 -1
- package/dist/links/wsLink/wsClient/wsConnection.js +0 -165
- package/dist/links/wsLink/wsClient/wsConnection.mjs +0 -164
- package/dist/links/wsLink/wsClient/wsConnection.mjs.map +0 -1
- package/dist/links/wsLink/wsLink.d.mts.map +0 -1
- package/dist/links/wsLink/wsLink.d.ts +0 -14
- package/dist/links/wsLink/wsLink.d.ts.map +0 -1
- package/dist/links/wsLink/wsLink.js +0 -34
- package/dist/links/wsLink/wsLink.mjs.map +0 -1
- package/dist/links.js +0 -11
- package/dist/links.mjs +0 -11
- package/dist/node_modules/.pnpm/@oxc-project_runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js +0 -68
- package/dist/node_modules/.pnpm/@oxc-project_runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.mjs +0 -66
- package/dist/node_modules/.pnpm/@oxc-project_runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.mjs.map +0 -1
- package/dist/unstable-internals.d.ts +0 -3
- package/dist/unstable-internals.js +0 -3
- /package/dist/{_virtual/rolldown_runtime.js → chunk-DWy1uDak.cjs} +0 -0
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.js');
|
|
2
|
-
const require_createChain = require('../links/internals/createChain.js');
|
|
3
|
-
const require_TRPCClientError = require('../TRPCClientError.js');
|
|
4
|
-
const __trpc_server_observable = require_rolldown_runtime.__toESM(require("@trpc/server/observable"));
|
|
5
|
-
|
|
6
|
-
//#region src/internals/TRPCUntypedClient.ts
|
|
7
|
-
var TRPCUntypedClient = class {
|
|
8
|
-
links;
|
|
9
|
-
runtime;
|
|
10
|
-
requestId;
|
|
11
|
-
constructor(opts) {
|
|
12
|
-
this.requestId = 0;
|
|
13
|
-
this.runtime = {};
|
|
14
|
-
this.links = opts.links.map((link) => link(this.runtime));
|
|
15
|
-
}
|
|
16
|
-
$request(opts) {
|
|
17
|
-
const chain$ = require_createChain.createChain({
|
|
18
|
-
links: this.links,
|
|
19
|
-
op: {
|
|
20
|
-
...opts,
|
|
21
|
-
context: opts.context ?? {},
|
|
22
|
-
id: ++this.requestId
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
return chain$.pipe((0, __trpc_server_observable.share)());
|
|
26
|
-
}
|
|
27
|
-
async requestAsPromise(opts) {
|
|
28
|
-
try {
|
|
29
|
-
const req$ = this.$request(opts);
|
|
30
|
-
const envelope = await (0, __trpc_server_observable.observableToPromise)(req$);
|
|
31
|
-
const data = envelope.result.data;
|
|
32
|
-
return data;
|
|
33
|
-
} catch (err) {
|
|
34
|
-
throw require_TRPCClientError.TRPCClientError.from(err);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
query(path, input, opts) {
|
|
38
|
-
return this.requestAsPromise({
|
|
39
|
-
type: "query",
|
|
40
|
-
path,
|
|
41
|
-
input,
|
|
42
|
-
context: opts?.context,
|
|
43
|
-
signal: opts?.signal
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
mutation(path, input, opts) {
|
|
47
|
-
return this.requestAsPromise({
|
|
48
|
-
type: "mutation",
|
|
49
|
-
path,
|
|
50
|
-
input,
|
|
51
|
-
context: opts?.context,
|
|
52
|
-
signal: opts?.signal
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
subscription(path, input, opts) {
|
|
56
|
-
const observable$ = this.$request({
|
|
57
|
-
type: "subscription",
|
|
58
|
-
path,
|
|
59
|
-
input,
|
|
60
|
-
context: opts.context,
|
|
61
|
-
signal: opts.signal
|
|
62
|
-
});
|
|
63
|
-
return observable$.subscribe({
|
|
64
|
-
next(envelope) {
|
|
65
|
-
switch (envelope.result.type) {
|
|
66
|
-
case "state": {
|
|
67
|
-
opts.onConnectionStateChange?.(envelope.result);
|
|
68
|
-
break;
|
|
69
|
-
}
|
|
70
|
-
case "started": {
|
|
71
|
-
opts.onStarted?.({ context: envelope.context });
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
74
|
-
case "stopped": {
|
|
75
|
-
opts.onStopped?.();
|
|
76
|
-
break;
|
|
77
|
-
}
|
|
78
|
-
case "data":
|
|
79
|
-
case void 0: {
|
|
80
|
-
opts.onData?.(envelope.result.data);
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
error(err) {
|
|
86
|
-
opts.onError?.(err);
|
|
87
|
-
},
|
|
88
|
-
complete() {
|
|
89
|
-
opts.onComplete?.();
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
//#endregion
|
|
96
|
-
exports.TRPCUntypedClient = TRPCUntypedClient;
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { createChain } from "../links/internals/createChain.mjs";
|
|
2
|
-
import { TRPCClientError } from "../TRPCClientError.mjs";
|
|
3
|
-
import { observableToPromise, share } from "@trpc/server/observable";
|
|
4
|
-
|
|
5
|
-
//#region src/internals/TRPCUntypedClient.ts
|
|
6
|
-
var TRPCUntypedClient = class {
|
|
7
|
-
links;
|
|
8
|
-
runtime;
|
|
9
|
-
requestId;
|
|
10
|
-
constructor(opts) {
|
|
11
|
-
this.requestId = 0;
|
|
12
|
-
this.runtime = {};
|
|
13
|
-
this.links = opts.links.map((link) => link(this.runtime));
|
|
14
|
-
}
|
|
15
|
-
$request(opts) {
|
|
16
|
-
const chain$ = createChain({
|
|
17
|
-
links: this.links,
|
|
18
|
-
op: {
|
|
19
|
-
...opts,
|
|
20
|
-
context: opts.context ?? {},
|
|
21
|
-
id: ++this.requestId
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
return chain$.pipe(share());
|
|
25
|
-
}
|
|
26
|
-
async requestAsPromise(opts) {
|
|
27
|
-
try {
|
|
28
|
-
const req$ = this.$request(opts);
|
|
29
|
-
const envelope = await observableToPromise(req$);
|
|
30
|
-
const data = envelope.result.data;
|
|
31
|
-
return data;
|
|
32
|
-
} catch (err) {
|
|
33
|
-
throw TRPCClientError.from(err);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
query(path, input, opts) {
|
|
37
|
-
return this.requestAsPromise({
|
|
38
|
-
type: "query",
|
|
39
|
-
path,
|
|
40
|
-
input,
|
|
41
|
-
context: opts?.context,
|
|
42
|
-
signal: opts?.signal
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
mutation(path, input, opts) {
|
|
46
|
-
return this.requestAsPromise({
|
|
47
|
-
type: "mutation",
|
|
48
|
-
path,
|
|
49
|
-
input,
|
|
50
|
-
context: opts?.context,
|
|
51
|
-
signal: opts?.signal
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
subscription(path, input, opts) {
|
|
55
|
-
const observable$ = this.$request({
|
|
56
|
-
type: "subscription",
|
|
57
|
-
path,
|
|
58
|
-
input,
|
|
59
|
-
context: opts.context,
|
|
60
|
-
signal: opts.signal
|
|
61
|
-
});
|
|
62
|
-
return observable$.subscribe({
|
|
63
|
-
next(envelope) {
|
|
64
|
-
switch (envelope.result.type) {
|
|
65
|
-
case "state": {
|
|
66
|
-
opts.onConnectionStateChange?.(envelope.result);
|
|
67
|
-
break;
|
|
68
|
-
}
|
|
69
|
-
case "started": {
|
|
70
|
-
opts.onStarted?.({ context: envelope.context });
|
|
71
|
-
break;
|
|
72
|
-
}
|
|
73
|
-
case "stopped": {
|
|
74
|
-
opts.onStopped?.();
|
|
75
|
-
break;
|
|
76
|
-
}
|
|
77
|
-
case "data":
|
|
78
|
-
case void 0: {
|
|
79
|
-
opts.onData?.(envelope.result.data);
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
error(err) {
|
|
85
|
-
opts.onError?.(err);
|
|
86
|
-
},
|
|
87
|
-
complete() {
|
|
88
|
-
opts.onComplete?.();
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
//#endregion
|
|
95
|
-
export { TRPCUntypedClient };
|
|
96
|
-
//# sourceMappingURL=TRPCUntypedClient.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TRPCUntypedClient.mjs","names":["opts: CreateTRPCClientOptions<TInferrable>","opts: {\n type: TRPCType;\n input: TInput;\n path: string;\n context?: OperationContext;\n signal: Maybe<AbortSignal>;\n }","path: string","input?: unknown","opts?: TRPCRequestOptions","input: unknown","opts: Partial<\n TRPCSubscriptionObserver<unknown, TRPCClientError<AnyRouter>>\n > &\n TRPCRequestOptions"],"sources":["../../src/internals/TRPCUntypedClient.ts"],"sourcesContent":["import type {\n inferObservableValue,\n Unsubscribable,\n} from '@trpc/server/observable';\nimport { observableToPromise, share } from '@trpc/server/observable';\nimport type {\n AnyRouter,\n inferAsyncIterableYield,\n InferrableClientTypes,\n Maybe,\n TypeError,\n} from '@trpc/server/unstable-core-do-not-import';\nimport { createChain } from '../links/internals/createChain';\nimport type { TRPCConnectionState } from '../links/internals/subscriptions';\nimport type {\n OperationContext,\n OperationLink,\n TRPCClientRuntime,\n TRPCLink,\n} from '../links/types';\nimport { TRPCClientError } from '../TRPCClientError';\n\ntype TRPCType = 'mutation' | 'query' | 'subscription';\nexport interface TRPCRequestOptions {\n /**\n * Pass additional context to links\n */\n context?: OperationContext;\n signal?: AbortSignal;\n}\n\nexport interface TRPCSubscriptionObserver<TValue, TError> {\n onStarted: (opts: { context: OperationContext | undefined }) => void;\n onData: (value: inferAsyncIterableYield<TValue>) => void;\n onError: (err: TError) => void;\n onStopped: () => void;\n onComplete: () => void;\n onConnectionStateChange: (state: TRPCConnectionState<TError>) => void;\n}\n\n/** @internal */\nexport type CreateTRPCClientOptions<TRouter extends InferrableClientTypes> = {\n links: TRPCLink<TRouter>[];\n transformer?: TypeError<'The transformer property has moved to httpLink/httpBatchLink/wsLink'>;\n};\n\nexport class TRPCUntypedClient<TInferrable extends InferrableClientTypes> {\n private readonly links: OperationLink<TInferrable>[];\n public readonly runtime: TRPCClientRuntime;\n private requestId: number;\n\n constructor(opts: CreateTRPCClientOptions<TInferrable>) {\n this.requestId = 0;\n\n this.runtime = {};\n\n // Initialize the links\n this.links = opts.links.map((link) => link(this.runtime));\n }\n\n private $request<TInput = unknown, TOutput = unknown>(opts: {\n type: TRPCType;\n input: TInput;\n path: string;\n context?: OperationContext;\n signal: Maybe<AbortSignal>;\n }) {\n const chain$ = createChain<AnyRouter, TInput, TOutput>({\n links: this.links as OperationLink<any, any, any>[],\n op: {\n ...opts,\n context: opts.context ?? {},\n id: ++this.requestId,\n },\n });\n return chain$.pipe(share());\n }\n\n private async requestAsPromise<TInput = unknown, TOutput = unknown>(opts: {\n type: TRPCType;\n input: TInput;\n path: string;\n context?: OperationContext;\n signal: Maybe<AbortSignal>;\n }): Promise<TOutput> {\n try {\n const req$ = this.$request<TInput, TOutput>(opts);\n type TValue = inferObservableValue<typeof req$>;\n\n const envelope = await observableToPromise<TValue>(req$);\n const data = (envelope.result as any).data;\n return data;\n } catch (err) {\n throw TRPCClientError.from(err as Error);\n }\n }\n public query(path: string, input?: unknown, opts?: TRPCRequestOptions) {\n return this.requestAsPromise<unknown, unknown>({\n type: 'query',\n path,\n input,\n context: opts?.context,\n signal: opts?.signal,\n });\n }\n public mutation(path: string, input?: unknown, opts?: TRPCRequestOptions) {\n return this.requestAsPromise<unknown, unknown>({\n type: 'mutation',\n path,\n input,\n context: opts?.context,\n signal: opts?.signal,\n });\n }\n public subscription(\n path: string,\n input: unknown,\n opts: Partial<\n TRPCSubscriptionObserver<unknown, TRPCClientError<AnyRouter>>\n > &\n TRPCRequestOptions,\n ): Unsubscribable {\n const observable$ = this.$request({\n type: 'subscription',\n path,\n input,\n context: opts.context,\n signal: opts.signal,\n });\n return observable$.subscribe({\n next(envelope) {\n switch (envelope.result.type) {\n case 'state': {\n opts.onConnectionStateChange?.(envelope.result);\n break;\n }\n case 'started': {\n opts.onStarted?.({\n context: envelope.context,\n });\n break;\n }\n case 'stopped': {\n opts.onStopped?.();\n break;\n }\n case 'data':\n case undefined: {\n opts.onData?.(envelope.result.data);\n break;\n }\n }\n },\n error(err) {\n opts.onError?.(err);\n },\n complete() {\n opts.onComplete?.();\n },\n });\n }\n}\n"],"mappings":";;;;;AA8CA,IAAa,oBAAb,MAA0E;CACxE,AAAiB;CACjB,AAAgB;CAChB,AAAQ;CAER,YAAYA,MAA4C;AACtD,OAAK,YAAY;AAEjB,OAAK,UAAU,CAAE;AAGjB,OAAK,QAAQ,KAAK,MAAM,IAAI,CAAC,SAAS,KAAK,KAAK,QAAQ,CAAC;CAC1D;CAED,AAAQ,SAA8CC,MAMnD;EACD,MAAM,SAAS,YAAwC;GACrD,OAAO,KAAK;GACZ,IAAI;IACF,GAAG;IACH,SAAS,KAAK,WAAW,CAAE;IAC3B,IAAI,EAAE,KAAK;GACZ;EACF,EAAC;AACF,SAAO,OAAO,KAAK,OAAO,CAAC;CAC5B;CAED,MAAc,iBAAsDA,MAM/C;AACnB,MAAI;GACF,MAAM,OAAO,KAAK,SAA0B,KAAK;GAGjD,MAAM,WAAW,MAAM,oBAA4B,KAAK;GACxD,MAAM,OAAQ,SAAS,OAAe;AACtC,UAAO;EACR,SAAQ,KAAK;AACZ,SAAM,gBAAgB,KAAK,IAAa;EACzC;CACF;CACD,AAAO,MAAMC,MAAcC,OAAiBC,MAA2B;AACrE,SAAO,KAAK,iBAAmC;GAC7C,MAAM;GACN;GACA;GACA,SAAS,MAAM;GACf,QAAQ,MAAM;EACf,EAAC;CACH;CACD,AAAO,SAASF,MAAcC,OAAiBC,MAA2B;AACxE,SAAO,KAAK,iBAAmC;GAC7C,MAAM;GACN;GACA;GACA,SAAS,MAAM;GACf,QAAQ,MAAM;EACf,EAAC;CACH;CACD,AAAO,aACLF,MACAG,OACAC,MAIgB;EAChB,MAAM,cAAc,KAAK,SAAS;GAChC,MAAM;GACN;GACA;GACA,SAAS,KAAK;GACd,QAAQ,KAAK;EACd,EAAC;AACF,SAAO,YAAY,UAAU;GAC3B,KAAK,UAAU;AACb,YAAQ,SAAS,OAAO,MAAxB;KACE,KAAK,SAAS;AACZ,WAAK,0BAA0B,SAAS,OAAO;AAC/C;KACD;KACD,KAAK,WAAW;AACd,WAAK,YAAY,EACf,SAAS,SAAS,QACnB,EAAC;AACF;KACD;KACD,KAAK,WAAW;AACd,WAAK,aAAa;AAClB;KACD;KACD,KAAK;KACL,aAAgB;AACd,WAAK,SAAS,SAAS,OAAO,KAAK;AACnC;KACD;IACF;GACF;GACD,MAAM,KAAK;AACT,SAAK,UAAU,IAAI;GACpB;GACD,WAAW;AACT,SAAK,cAAc;GACpB;EACF,EAAC;CACH;AACF"}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/internals/dataLoader.ts
|
|
3
|
-
/**
|
|
4
|
-
* A function that should never be called unless we messed something up.
|
|
5
|
-
*/
|
|
6
|
-
const throwFatalError = () => {
|
|
7
|
-
throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new");
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* Dataloader that's very inspired by https://github.com/graphql/dataloader
|
|
11
|
-
* Less configuration, no caching, and allows you to cancel requests
|
|
12
|
-
* When cancelling a single fetch the whole batch will be cancelled only when _all_ items are cancelled
|
|
13
|
-
*/
|
|
14
|
-
function dataLoader(batchLoader) {
|
|
15
|
-
let pendingItems = null;
|
|
16
|
-
let dispatchTimer = null;
|
|
17
|
-
const destroyTimerAndPendingItems = () => {
|
|
18
|
-
clearTimeout(dispatchTimer);
|
|
19
|
-
dispatchTimer = null;
|
|
20
|
-
pendingItems = null;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Iterate through the items and split them into groups based on the `batchLoader`'s validate function
|
|
24
|
-
*/
|
|
25
|
-
function groupItems(items) {
|
|
26
|
-
const groupedItems = [[]];
|
|
27
|
-
let index = 0;
|
|
28
|
-
while (true) {
|
|
29
|
-
const item = items[index];
|
|
30
|
-
if (!item) break;
|
|
31
|
-
const lastGroup = groupedItems[groupedItems.length - 1];
|
|
32
|
-
if (item.aborted) {
|
|
33
|
-
item.reject?.(new Error("Aborted"));
|
|
34
|
-
index++;
|
|
35
|
-
continue;
|
|
36
|
-
}
|
|
37
|
-
const isValid = batchLoader.validate(lastGroup.concat(item).map((it) => it.key));
|
|
38
|
-
if (isValid) {
|
|
39
|
-
lastGroup.push(item);
|
|
40
|
-
index++;
|
|
41
|
-
continue;
|
|
42
|
-
}
|
|
43
|
-
if (lastGroup.length === 0) {
|
|
44
|
-
item.reject?.(new Error("Input is too big for a single dispatch"));
|
|
45
|
-
index++;
|
|
46
|
-
continue;
|
|
47
|
-
}
|
|
48
|
-
groupedItems.push([]);
|
|
49
|
-
}
|
|
50
|
-
return groupedItems;
|
|
51
|
-
}
|
|
52
|
-
function dispatch() {
|
|
53
|
-
const groupedItems = groupItems(pendingItems);
|
|
54
|
-
destroyTimerAndPendingItems();
|
|
55
|
-
for (const items of groupedItems) {
|
|
56
|
-
if (!items.length) continue;
|
|
57
|
-
const batch = { items };
|
|
58
|
-
for (const item of items) item.batch = batch;
|
|
59
|
-
const promise = batchLoader.fetch(batch.items.map((_item) => _item.key));
|
|
60
|
-
promise.then(async (result) => {
|
|
61
|
-
await Promise.all(result.map(async (valueOrPromise, index) => {
|
|
62
|
-
const item = batch.items[index];
|
|
63
|
-
try {
|
|
64
|
-
const value = await Promise.resolve(valueOrPromise);
|
|
65
|
-
item.resolve?.(value);
|
|
66
|
-
} catch (cause) {
|
|
67
|
-
item.reject?.(cause);
|
|
68
|
-
}
|
|
69
|
-
item.batch = null;
|
|
70
|
-
item.reject = null;
|
|
71
|
-
item.resolve = null;
|
|
72
|
-
}));
|
|
73
|
-
for (const item of batch.items) {
|
|
74
|
-
item.reject?.(new Error("Missing result"));
|
|
75
|
-
item.batch = null;
|
|
76
|
-
}
|
|
77
|
-
}).catch((cause) => {
|
|
78
|
-
for (const item of batch.items) {
|
|
79
|
-
item.reject?.(cause);
|
|
80
|
-
item.batch = null;
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function load(key) {
|
|
86
|
-
const item = {
|
|
87
|
-
aborted: false,
|
|
88
|
-
key,
|
|
89
|
-
batch: null,
|
|
90
|
-
resolve: throwFatalError,
|
|
91
|
-
reject: throwFatalError
|
|
92
|
-
};
|
|
93
|
-
const promise = new Promise((resolve, reject) => {
|
|
94
|
-
item.reject = reject;
|
|
95
|
-
item.resolve = resolve;
|
|
96
|
-
pendingItems ??= [];
|
|
97
|
-
pendingItems.push(item);
|
|
98
|
-
});
|
|
99
|
-
dispatchTimer ??= setTimeout(dispatch);
|
|
100
|
-
return promise;
|
|
101
|
-
}
|
|
102
|
-
return { load };
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
//#endregion
|
|
106
|
-
exports.dataLoader = dataLoader;
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
//#region src/internals/dataLoader.ts
|
|
2
|
-
/**
|
|
3
|
-
* A function that should never be called unless we messed something up.
|
|
4
|
-
*/
|
|
5
|
-
const throwFatalError = () => {
|
|
6
|
-
throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new");
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* Dataloader that's very inspired by https://github.com/graphql/dataloader
|
|
10
|
-
* Less configuration, no caching, and allows you to cancel requests
|
|
11
|
-
* When cancelling a single fetch the whole batch will be cancelled only when _all_ items are cancelled
|
|
12
|
-
*/
|
|
13
|
-
function dataLoader(batchLoader) {
|
|
14
|
-
let pendingItems = null;
|
|
15
|
-
let dispatchTimer = null;
|
|
16
|
-
const destroyTimerAndPendingItems = () => {
|
|
17
|
-
clearTimeout(dispatchTimer);
|
|
18
|
-
dispatchTimer = null;
|
|
19
|
-
pendingItems = null;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Iterate through the items and split them into groups based on the `batchLoader`'s validate function
|
|
23
|
-
*/
|
|
24
|
-
function groupItems(items) {
|
|
25
|
-
const groupedItems = [[]];
|
|
26
|
-
let index = 0;
|
|
27
|
-
while (true) {
|
|
28
|
-
const item = items[index];
|
|
29
|
-
if (!item) break;
|
|
30
|
-
const lastGroup = groupedItems[groupedItems.length - 1];
|
|
31
|
-
if (item.aborted) {
|
|
32
|
-
item.reject?.(new Error("Aborted"));
|
|
33
|
-
index++;
|
|
34
|
-
continue;
|
|
35
|
-
}
|
|
36
|
-
const isValid = batchLoader.validate(lastGroup.concat(item).map((it) => it.key));
|
|
37
|
-
if (isValid) {
|
|
38
|
-
lastGroup.push(item);
|
|
39
|
-
index++;
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
if (lastGroup.length === 0) {
|
|
43
|
-
item.reject?.(new Error("Input is too big for a single dispatch"));
|
|
44
|
-
index++;
|
|
45
|
-
continue;
|
|
46
|
-
}
|
|
47
|
-
groupedItems.push([]);
|
|
48
|
-
}
|
|
49
|
-
return groupedItems;
|
|
50
|
-
}
|
|
51
|
-
function dispatch() {
|
|
52
|
-
const groupedItems = groupItems(pendingItems);
|
|
53
|
-
destroyTimerAndPendingItems();
|
|
54
|
-
for (const items of groupedItems) {
|
|
55
|
-
if (!items.length) continue;
|
|
56
|
-
const batch = { items };
|
|
57
|
-
for (const item of items) item.batch = batch;
|
|
58
|
-
const promise = batchLoader.fetch(batch.items.map((_item) => _item.key));
|
|
59
|
-
promise.then(async (result) => {
|
|
60
|
-
await Promise.all(result.map(async (valueOrPromise, index) => {
|
|
61
|
-
const item = batch.items[index];
|
|
62
|
-
try {
|
|
63
|
-
const value = await Promise.resolve(valueOrPromise);
|
|
64
|
-
item.resolve?.(value);
|
|
65
|
-
} catch (cause) {
|
|
66
|
-
item.reject?.(cause);
|
|
67
|
-
}
|
|
68
|
-
item.batch = null;
|
|
69
|
-
item.reject = null;
|
|
70
|
-
item.resolve = null;
|
|
71
|
-
}));
|
|
72
|
-
for (const item of batch.items) {
|
|
73
|
-
item.reject?.(new Error("Missing result"));
|
|
74
|
-
item.batch = null;
|
|
75
|
-
}
|
|
76
|
-
}).catch((cause) => {
|
|
77
|
-
for (const item of batch.items) {
|
|
78
|
-
item.reject?.(cause);
|
|
79
|
-
item.batch = null;
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
function load(key) {
|
|
85
|
-
const item = {
|
|
86
|
-
aborted: false,
|
|
87
|
-
key,
|
|
88
|
-
batch: null,
|
|
89
|
-
resolve: throwFatalError,
|
|
90
|
-
reject: throwFatalError
|
|
91
|
-
};
|
|
92
|
-
const promise = new Promise((resolve, reject) => {
|
|
93
|
-
item.reject = reject;
|
|
94
|
-
item.resolve = resolve;
|
|
95
|
-
pendingItems ??= [];
|
|
96
|
-
pendingItems.push(item);
|
|
97
|
-
});
|
|
98
|
-
dispatchTimer ??= setTimeout(dispatch);
|
|
99
|
-
return promise;
|
|
100
|
-
}
|
|
101
|
-
return { load };
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
//#endregion
|
|
105
|
-
export { dataLoader };
|
|
106
|
-
//# sourceMappingURL=dataLoader.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dataLoader.mjs","names":["batchLoader: BatchLoader<TKey, TValue>","pendingItems: BatchItem<TKey, TValue>[] | null","dispatchTimer: ReturnType<typeof setTimeout> | null","items: BatchItem<TKey, TValue>[]","groupedItems: BatchItem<TKey, TValue>[][]","batch: Batch<TKey, TValue>","key: TKey","item: BatchItem<TKey, TValue>"],"sources":["../../src/internals/dataLoader.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\n\ntype BatchItem<TKey, TValue> = {\n aborted: boolean;\n key: TKey;\n resolve: ((value: TValue) => void) | null;\n reject: ((error: Error) => void) | null;\n batch: Batch<TKey, TValue> | null;\n};\ntype Batch<TKey, TValue> = {\n items: BatchItem<TKey, TValue>[];\n};\nexport type BatchLoader<TKey, TValue> = {\n validate: (keys: TKey[]) => boolean;\n fetch: (keys: TKey[]) => Promise<TValue[] | Promise<TValue>[]>;\n};\n\n/**\n * A function that should never be called unless we messed something up.\n */\nconst throwFatalError = () => {\n throw new Error(\n 'Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new',\n );\n};\n\n/**\n * Dataloader that's very inspired by https://github.com/graphql/dataloader\n * Less configuration, no caching, and allows you to cancel requests\n * When cancelling a single fetch the whole batch will be cancelled only when _all_ items are cancelled\n */\nexport function dataLoader<TKey, TValue>(\n batchLoader: BatchLoader<TKey, TValue>,\n) {\n let pendingItems: BatchItem<TKey, TValue>[] | null = null;\n let dispatchTimer: ReturnType<typeof setTimeout> | null = null;\n\n const destroyTimerAndPendingItems = () => {\n clearTimeout(dispatchTimer as any);\n dispatchTimer = null;\n pendingItems = null;\n };\n\n /**\n * Iterate through the items and split them into groups based on the `batchLoader`'s validate function\n */\n function groupItems(items: BatchItem<TKey, TValue>[]) {\n const groupedItems: BatchItem<TKey, TValue>[][] = [[]];\n let index = 0;\n while (true) {\n const item = items[index];\n if (!item) {\n // we're done\n break;\n }\n const lastGroup = groupedItems[groupedItems.length - 1]!;\n\n if (item.aborted) {\n // Item was aborted before it was dispatched\n item.reject?.(new Error('Aborted'));\n index++;\n continue;\n }\n\n const isValid = batchLoader.validate(\n lastGroup.concat(item).map((it) => it.key),\n );\n\n if (isValid) {\n lastGroup.push(item);\n index++;\n continue;\n }\n\n if (lastGroup.length === 0) {\n item.reject?.(new Error('Input is too big for a single dispatch'));\n index++;\n continue;\n }\n // Create new group, next iteration will try to add the item to that\n groupedItems.push([]);\n }\n return groupedItems;\n }\n\n function dispatch() {\n const groupedItems = groupItems(pendingItems!);\n destroyTimerAndPendingItems();\n\n // Create batches for each group of items\n for (const items of groupedItems) {\n if (!items.length) {\n continue;\n }\n const batch: Batch<TKey, TValue> = {\n items,\n };\n for (const item of items) {\n item.batch = batch;\n }\n const promise = batchLoader.fetch(batch.items.map((_item) => _item.key));\n\n promise\n .then(async (result) => {\n await Promise.all(\n result.map(async (valueOrPromise, index) => {\n const item = batch.items[index]!;\n try {\n const value = await Promise.resolve(valueOrPromise);\n\n item.resolve?.(value);\n } catch (cause) {\n item.reject?.(cause as Error);\n }\n\n item.batch = null;\n item.reject = null;\n item.resolve = null;\n }),\n );\n\n for (const item of batch.items) {\n item.reject?.(new Error('Missing result'));\n item.batch = null;\n }\n })\n .catch((cause) => {\n for (const item of batch.items) {\n item.reject?.(cause);\n item.batch = null;\n }\n });\n }\n }\n function load(key: TKey): Promise<TValue> {\n const item: BatchItem<TKey, TValue> = {\n aborted: false,\n key,\n batch: null,\n resolve: throwFatalError,\n reject: throwFatalError,\n };\n\n const promise = new Promise<TValue>((resolve, reject) => {\n item.reject = reject;\n item.resolve = resolve;\n\n pendingItems ??= [];\n pendingItems.push(item);\n });\n\n dispatchTimer ??= setTimeout(dispatch);\n\n return promise;\n }\n\n return {\n load,\n };\n}\n"],"mappings":";;;;AAoBA,MAAM,kBAAkB,MAAM;AAC5B,OAAM,IAAI,MACR;AAEH;;;;;;AAOD,SAAgB,WACdA,aACA;CACA,IAAIC,eAAiD;CACrD,IAAIC,gBAAsD;CAE1D,MAAM,8BAA8B,MAAM;AACxC,eAAa,cAAqB;AAClC,kBAAgB;AAChB,iBAAe;CAChB;;;;CAKD,SAAS,WAAWC,OAAkC;EACpD,MAAMC,eAA4C,CAAC,CAAE,CAAC;EACtD,IAAI,QAAQ;AACZ,SAAO,MAAM;GACX,MAAM,OAAO,MAAM;AACnB,QAAK,KAEH;GAEF,MAAM,YAAY,aAAa,aAAa,SAAS;AAErD,OAAI,KAAK,SAAS;AAEhB,SAAK,SAAS,IAAI,MAAM,WAAW;AACnC;AACA;GACD;GAED,MAAM,UAAU,YAAY,SAC1B,UAAU,OAAO,KAAK,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAC3C;AAED,OAAI,SAAS;AACX,cAAU,KAAK,KAAK;AACpB;AACA;GACD;AAED,OAAI,UAAU,WAAW,GAAG;AAC1B,SAAK,SAAS,IAAI,MAAM,0CAA0C;AAClE;AACA;GACD;AAED,gBAAa,KAAK,CAAE,EAAC;EACtB;AACD,SAAO;CACR;CAED,SAAS,WAAW;EAClB,MAAM,eAAe,WAAW,aAAc;AAC9C,+BAA6B;AAG7B,OAAK,MAAM,SAAS,cAAc;AAChC,QAAK,MAAM,OACT;GAEF,MAAMC,QAA6B,EACjC,MACD;AACD,QAAK,MAAM,QAAQ,MACjB,MAAK,QAAQ;GAEf,MAAM,UAAU,YAAY,MAAM,MAAM,MAAM,IAAI,CAAC,UAAU,MAAM,IAAI,CAAC;AAExE,WACG,KAAK,OAAO,WAAW;AACtB,UAAM,QAAQ,IACZ,OAAO,IAAI,OAAO,gBAAgB,UAAU;KAC1C,MAAM,OAAO,MAAM,MAAM;AACzB,SAAI;MACF,MAAM,QAAQ,MAAM,QAAQ,QAAQ,eAAe;AAEnD,WAAK,UAAU,MAAM;KACtB,SAAQ,OAAO;AACd,WAAK,SAAS,MAAe;KAC9B;AAED,UAAK,QAAQ;AACb,UAAK,SAAS;AACd,UAAK,UAAU;IAChB,EAAC,CACH;AAED,SAAK,MAAM,QAAQ,MAAM,OAAO;AAC9B,UAAK,SAAS,IAAI,MAAM,kBAAkB;AAC1C,UAAK,QAAQ;IACd;GACF,EAAC,CACD,MAAM,CAAC,UAAU;AAChB,SAAK,MAAM,QAAQ,MAAM,OAAO;AAC9B,UAAK,SAAS,MAAM;AACpB,UAAK,QAAQ;IACd;GACF,EAAC;EACL;CACF;CACD,SAAS,KAAKC,KAA4B;EACxC,MAAMC,OAAgC;GACpC,SAAS;GACT;GACA,OAAO;GACP,SAAS;GACT,QAAQ;EACT;EAED,MAAM,UAAU,IAAI,QAAgB,CAAC,SAAS,WAAW;AACvD,QAAK,SAAS;AACd,QAAK,UAAU;AAEf,oBAAiB,CAAE;AACnB,gBAAa,KAAK,KAAK;EACxB;AAED,oBAAkB,WAAW,SAAS;AAEtC,SAAO;CACR;AAED,QAAO,EACL,KACD;AACF"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/internals/inputWithTrackedEventId.ts
|
|
3
|
-
function inputWithTrackedEventId(input, lastEventId) {
|
|
4
|
-
if (!lastEventId) return input;
|
|
5
|
-
if (input != null && typeof input !== "object") return input;
|
|
6
|
-
return {
|
|
7
|
-
...input ?? {},
|
|
8
|
-
lastEventId
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
exports.inputWithTrackedEventId = inputWithTrackedEventId;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
//#region src/internals/inputWithTrackedEventId.ts
|
|
2
|
-
function inputWithTrackedEventId(input, lastEventId) {
|
|
3
|
-
if (!lastEventId) return input;
|
|
4
|
-
if (input != null && typeof input !== "object") return input;
|
|
5
|
-
return {
|
|
6
|
-
...input ?? {},
|
|
7
|
-
lastEventId
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
//#endregion
|
|
12
|
-
export { inputWithTrackedEventId };
|
|
13
|
-
//# sourceMappingURL=inputWithTrackedEventId.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inputWithTrackedEventId.mjs","names":["input: unknown","lastEventId: string | undefined"],"sources":["../../src/internals/inputWithTrackedEventId.ts"],"sourcesContent":["export function inputWithTrackedEventId(\n input: unknown,\n lastEventId: string | undefined,\n) {\n if (!lastEventId) {\n return input;\n }\n if (input != null && typeof input !== 'object') {\n return input;\n }\n return {\n ...(input ?? {}),\n lastEventId,\n };\n}\n"],"mappings":";AAAA,SAAgB,wBACdA,OACAC,aACA;AACA,MAAK,YACH,QAAO;AAET,KAAI,SAAS,eAAe,UAAU,SACpC,QAAO;AAET,QAAO;EACL,GAAI,SAAS,CAAE;EACf;CACD;AACF"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region src/internals/signals.ts
|
|
3
|
-
/**
|
|
4
|
-
* Like `Promise.all()` but for abort signals
|
|
5
|
-
* - When all signals have been aborted, the merged signal will be aborted
|
|
6
|
-
* - If one signal is `null`, no signal will be aborted
|
|
7
|
-
*/
|
|
8
|
-
function allAbortSignals(...signals) {
|
|
9
|
-
const ac = new AbortController();
|
|
10
|
-
const count = signals.length;
|
|
11
|
-
let abortedCount = 0;
|
|
12
|
-
const onAbort = () => {
|
|
13
|
-
if (++abortedCount === count) ac.abort();
|
|
14
|
-
};
|
|
15
|
-
for (const signal of signals) if (signal?.aborted) onAbort();
|
|
16
|
-
else signal?.addEventListener("abort", onAbort, { once: true });
|
|
17
|
-
return ac.signal;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Like `Promise.race` but for abort signals
|
|
21
|
-
*
|
|
22
|
-
* Basically, a ponyfill for
|
|
23
|
-
* [`AbortSignal.any`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/any_static).
|
|
24
|
-
*/
|
|
25
|
-
function raceAbortSignals(...signals) {
|
|
26
|
-
const ac = new AbortController();
|
|
27
|
-
for (const signal of signals) if (signal?.aborted) ac.abort();
|
|
28
|
-
else signal?.addEventListener("abort", () => ac.abort(), { once: true });
|
|
29
|
-
return ac.signal;
|
|
30
|
-
}
|
|
31
|
-
function abortSignalToPromise(signal) {
|
|
32
|
-
return new Promise((_, reject) => {
|
|
33
|
-
if (signal.aborted) {
|
|
34
|
-
reject(signal.reason);
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
signal.addEventListener("abort", () => {
|
|
38
|
-
reject(signal.reason);
|
|
39
|
-
}, { once: true });
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
//#endregion
|
|
44
|
-
exports.abortSignalToPromise = abortSignalToPromise;
|
|
45
|
-
exports.allAbortSignals = allAbortSignals;
|
|
46
|
-
exports.raceAbortSignals = raceAbortSignals;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
//#region src/internals/signals.ts
|
|
2
|
-
/**
|
|
3
|
-
* Like `Promise.all()` but for abort signals
|
|
4
|
-
* - When all signals have been aborted, the merged signal will be aborted
|
|
5
|
-
* - If one signal is `null`, no signal will be aborted
|
|
6
|
-
*/
|
|
7
|
-
function allAbortSignals(...signals) {
|
|
8
|
-
const ac = new AbortController();
|
|
9
|
-
const count = signals.length;
|
|
10
|
-
let abortedCount = 0;
|
|
11
|
-
const onAbort = () => {
|
|
12
|
-
if (++abortedCount === count) ac.abort();
|
|
13
|
-
};
|
|
14
|
-
for (const signal of signals) if (signal?.aborted) onAbort();
|
|
15
|
-
else signal?.addEventListener("abort", onAbort, { once: true });
|
|
16
|
-
return ac.signal;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Like `Promise.race` but for abort signals
|
|
20
|
-
*
|
|
21
|
-
* Basically, a ponyfill for
|
|
22
|
-
* [`AbortSignal.any`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/any_static).
|
|
23
|
-
*/
|
|
24
|
-
function raceAbortSignals(...signals) {
|
|
25
|
-
const ac = new AbortController();
|
|
26
|
-
for (const signal of signals) if (signal?.aborted) ac.abort();
|
|
27
|
-
else signal?.addEventListener("abort", () => ac.abort(), { once: true });
|
|
28
|
-
return ac.signal;
|
|
29
|
-
}
|
|
30
|
-
function abortSignalToPromise(signal) {
|
|
31
|
-
return new Promise((_, reject) => {
|
|
32
|
-
if (signal.aborted) {
|
|
33
|
-
reject(signal.reason);
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
signal.addEventListener("abort", () => {
|
|
37
|
-
reject(signal.reason);
|
|
38
|
-
}, { once: true });
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
//#endregion
|
|
43
|
-
export { abortSignalToPromise, allAbortSignals, raceAbortSignals };
|
|
44
|
-
//# sourceMappingURL=signals.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"signals.mjs","names":["signal: AbortSignal"],"sources":["../../src/internals/signals.ts"],"sourcesContent":["import type { Maybe } from '@trpc/server/unstable-core-do-not-import';\n\n/**\n * Like `Promise.all()` but for abort signals\n * - When all signals have been aborted, the merged signal will be aborted\n * - If one signal is `null`, no signal will be aborted\n */\nexport function allAbortSignals(...signals: Maybe<AbortSignal>[]): AbortSignal {\n const ac = new AbortController();\n\n const count = signals.length;\n\n let abortedCount = 0;\n\n const onAbort = () => {\n if (++abortedCount === count) {\n ac.abort();\n }\n };\n\n for (const signal of signals) {\n if (signal?.aborted) {\n onAbort();\n } else {\n signal?.addEventListener('abort', onAbort, {\n once: true,\n });\n }\n }\n\n return ac.signal;\n}\n\n/**\n * Like `Promise.race` but for abort signals\n *\n * Basically, a ponyfill for\n * [`AbortSignal.any`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal/any_static).\n */\nexport function raceAbortSignals(\n ...signals: Maybe<AbortSignal>[]\n): AbortSignal {\n const ac = new AbortController();\n\n for (const signal of signals) {\n if (signal?.aborted) {\n ac.abort();\n } else {\n signal?.addEventListener('abort', () => ac.abort(), { once: true });\n }\n }\n\n return ac.signal;\n}\n\nexport function abortSignalToPromise(signal: AbortSignal): Promise<never> {\n return new Promise((_, reject) => {\n if (signal.aborted) {\n reject(signal.reason);\n return;\n }\n signal.addEventListener(\n 'abort',\n () => {\n reject(signal.reason);\n },\n { once: true },\n );\n });\n}\n"],"mappings":";;;;;;AAOA,SAAgB,gBAAgB,GAAG,SAA4C;CAC7E,MAAM,KAAK,IAAI;CAEf,MAAM,QAAQ,QAAQ;CAEtB,IAAI,eAAe;CAEnB,MAAM,UAAU,MAAM;AACpB,MAAI,EAAE,iBAAiB,MACrB,IAAG,OAAO;CAEb;AAED,MAAK,MAAM,UAAU,QACnB,KAAI,QAAQ,QACV,UAAS;KAET,SAAQ,iBAAiB,SAAS,SAAS,EACzC,MAAM,KACP,EAAC;AAIN,QAAO,GAAG;AACX;;;;;;;AAQD,SAAgB,iBACd,GAAG,SACU;CACb,MAAM,KAAK,IAAI;AAEf,MAAK,MAAM,UAAU,QACnB,KAAI,QAAQ,QACV,IAAG,OAAO;KAEV,SAAQ,iBAAiB,SAAS,MAAM,GAAG,OAAO,EAAE,EAAE,MAAM,KAAM,EAAC;AAIvE,QAAO,GAAG;AACX;AAED,SAAgB,qBAAqBA,QAAqC;AACxE,QAAO,IAAI,QAAQ,CAAC,GAAG,WAAW;AAChC,MAAI,OAAO,SAAS;AAClB,UAAO,OAAO,OAAO;AACrB;EACD;AACD,SAAO,iBACL,SACA,MAAM;AACJ,UAAO,OAAO,OAAO;EACtB,GACD,EAAE,MAAM,KAAM,EACf;CACF;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformer.d.mts","names":[],"sources":["../../src/internals/transformer.ts"],"sourcesContent":[],"mappings":";;;;;;AAUA;AAIK,KAJO,4BAAA,GAWG;EAEV,WAAA,CAAA,EAZW,sBAmBA;AAMhB,CAAA;KAtBK,oBAAA,GAsByB;EAAA;;;;;AAIP;EAQP,WAAA,EA3BD,sBA2Be;CAAA;KAzBzB,mBAAA,GA2BC;EAAkB;;AAGE;;;;gBAvBV;;;;;KAMJ,iCACI,KAAK,kCACjB,oCACA,uBACA;;;;;;;iBAQY,cAAA,cAEV;;oBACA;;gCAEH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformer.d.ts","names":[],"sources":["../../src/internals/transformer.ts"],"sourcesContent":[],"mappings":";;;;;;AAUA;AAIK,KAJO,4BAAA,GAWG;EAEV,WAAA,CAAA,EAZW,sBAmBA;AAMhB,CAAA;KAtBK,oBAAA,GAsByB;EAAA;;;;;AAIP;EAQP,WAAA,EA3BD,sBA2Be;CAAA;KAzBzB,mBAAA,GA2BC;EAAkB;;AAGE;;;;gBAvBV;;;;;KAMJ,iCACI,KAAK,kCACjB,oCACA,uBACA;;;;;;;iBAQY,cAAA,cAEV;;oBACA;;gCAEH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformer.mjs","names":["transformer:\n | TransformerOptions<{ transformer: false }>['transformer']\n | TransformerOptions<{ transformer: true }>['transformer']\n | undefined"],"sources":["../../src/internals/transformer.ts"],"sourcesContent":["import type {\n AnyClientTypes,\n CombinedDataTransformer,\n DataTransformerOptions,\n TypeError,\n} from '@trpc/server/unstable-core-do-not-import';\n\n/**\n * @internal\n */\nexport type CoercedTransformerParameters = {\n transformer?: DataTransformerOptions;\n};\n\ntype TransformerOptionYes = {\n /**\n * Data transformer\n *\n * You must use the same transformer on the backend and frontend\n * @see https://trpc.io/docs/v11/data-transformers\n **/\n transformer: DataTransformerOptions;\n};\ntype TransformerOptionNo = {\n /**\n * Data transformer\n *\n * You must use the same transformer on the backend and frontend\n * @see https://trpc.io/docs/v11/data-transformers\n **/\n transformer?: TypeError<'You must define a transformer on your your `initTRPC`-object first'>;\n};\n\n/**\n * @internal\n */\nexport type TransformerOptions<\n TRoot extends Pick<AnyClientTypes, 'transformer'>,\n> = TRoot['transformer'] extends true\n ? TransformerOptionYes\n : TransformerOptionNo;\n/**\n * @internal\n */\n\n/**\n * @internal\n */\nexport function getTransformer(\n transformer:\n | TransformerOptions<{ transformer: false }>['transformer']\n | TransformerOptions<{ transformer: true }>['transformer']\n | undefined,\n): CombinedDataTransformer {\n const _transformer =\n transformer as CoercedTransformerParameters['transformer'];\n if (!_transformer) {\n return {\n input: {\n serialize: (data) => data,\n deserialize: (data) => data,\n },\n output: {\n serialize: (data) => data,\n deserialize: (data) => data,\n },\n };\n }\n if ('input' in _transformer) {\n return _transformer;\n }\n return {\n input: _transformer,\n output: _transformer,\n };\n}\n"],"mappings":";;;;;;;AAgDA,SAAgB,eACdA,aAIyB;CACzB,MAAM,eACJ;AACF,MAAK,aACH,QAAO;EACL,OAAO;GACL,WAAW,CAAC,SAAS;GACrB,aAAa,CAAC,SAAS;EACxB;EACD,QAAQ;GACN,WAAW,CAAC,SAAS;GACrB,aAAa,CAAC,SAAS;EACxB;CACF;AAEH,KAAI,WAAW,aACb,QAAO;AAET,QAAO;EACL,OAAO;EACP,QAAQ;CACT;AACF"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
//#region src/internals/types.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* A subset of the standard fetch function type needed by tRPC internally.
|
|
4
|
-
* @see fetch from lib.dom.d.ts
|
|
5
|
-
* @remarks
|
|
6
|
-
* If you need a property that you know exists but doesn't exist on this
|
|
7
|
-
* interface, go ahead and add it.
|
|
8
|
-
*/
|
|
9
|
-
type FetchEsque = (input: RequestInfo | URL | string, init?: RequestInit | RequestInitEsque) => Promise<ResponseEsque>;
|
|
10
|
-
/**
|
|
11
|
-
* A simpler version of the native fetch function's type for packages with
|
|
12
|
-
* their own fetch types, such as undici and node-fetch.
|
|
13
|
-
*/
|
|
14
|
-
type NativeFetchEsque = (url: URL | string, init?: NodeFetchRequestInitEsque) => Promise<ResponseEsque>;
|
|
15
|
-
interface NodeFetchRequestInitEsque {
|
|
16
|
-
body?: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* A subset of the standard RequestInit properties needed by tRPC internally.
|
|
20
|
-
* @see RequestInit from lib.dom.d.ts
|
|
21
|
-
* @remarks
|
|
22
|
-
* If you need a property that you know exists but doesn't exist on this
|
|
23
|
-
* interface, go ahead and add it.
|
|
24
|
-
*/
|
|
25
|
-
interface RequestInitEsque {
|
|
26
|
-
/**
|
|
27
|
-
* Sets the request's body.
|
|
28
|
-
*/
|
|
29
|
-
body?: FormData | string | null | Uint8Array | Blob | File;
|
|
30
|
-
/**
|
|
31
|
-
* Sets the request's associated headers.
|
|
32
|
-
*/
|
|
33
|
-
headers?: [string, string][] | Record<string, string>;
|
|
34
|
-
/**
|
|
35
|
-
* The request's HTTP-style method.
|
|
36
|
-
*/
|
|
37
|
-
method?: string;
|
|
38
|
-
/**
|
|
39
|
-
* Sets the request's signal.
|
|
40
|
-
*/
|
|
41
|
-
signal?: AbortSignal | undefined;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* A subset of the standard ReadableStream properties needed by tRPC internally.
|
|
45
|
-
* @see ReadableStream from lib.dom.d.ts
|
|
46
|
-
*/
|
|
47
|
-
type WebReadableStreamEsque = {
|
|
48
|
-
getReader: () => ReadableStreamDefaultReader<Uint8Array>;
|
|
49
|
-
};
|
|
50
|
-
type NodeJSReadableStreamEsque = {
|
|
51
|
-
on(eventName: string | symbol, listener: (...args: any[]) => void): NodeJSReadableStreamEsque;
|
|
52
|
-
};
|
|
53
|
-
/**
|
|
54
|
-
* A subset of the standard Response properties needed by tRPC internally.
|
|
55
|
-
* @see Response from lib.dom.d.ts
|
|
56
|
-
*/
|
|
57
|
-
interface ResponseEsque {
|
|
58
|
-
readonly body?: NodeJSReadableStreamEsque | WebReadableStreamEsque | null;
|
|
59
|
-
/**
|
|
60
|
-
* @remarks
|
|
61
|
-
* The built-in Response::json() method returns Promise<any>, but
|
|
62
|
-
* that's not as type-safe as unknown. We use unknown because we're
|
|
63
|
-
* more type-safe. You do want more type safety, right? 😉
|
|
64
|
-
*/
|
|
65
|
-
json(): Promise<unknown>;
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* @internal
|
|
69
|
-
*/
|
|
70
|
-
type NonEmptyArray<TItem> = [TItem, ...TItem[]];
|
|
71
|
-
type ClientContext = Record<string, unknown>;
|
|
72
|
-
/**
|
|
73
|
-
* @public
|
|
74
|
-
*/
|
|
75
|
-
interface TRPCProcedureOptions {
|
|
76
|
-
/**
|
|
77
|
-
* Client-side context
|
|
78
|
-
*/
|
|
79
|
-
context?: ClientContext;
|
|
80
|
-
signal?: AbortSignal;
|
|
81
|
-
}
|
|
82
|
-
//#endregion
|
|
83
|
-
export { FetchEsque, NativeFetchEsque, NonEmptyArray, ResponseEsque, TRPCProcedureOptions };
|
|
84
|
-
//# sourceMappingURL=types.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","names":[],"sources":["../../src/internals/types.ts"],"sourcesContent":[],"mappings":";;AAOA;;;;;;AAGa,KAHD,UAAA,GAGC,CAAA,KAAA,EAFJ,WAEI,GAFU,GAEV,GAAA,MAAA,EAAA,IAAA,CAAA,EADJ,WACI,GADU,gBACV,EAAA,GAAR,OAAQ,CAAA,aAAA,CAAA;;AAAD;AAMZ;;AACO,KADK,gBAAA,GACL,CAAA,GAAA,EAAA,GAAA,GAAA,MAAA,EAAA,IAAA,CAAA,EACE,yBADF,EAAA,GAEF,OAFE,CAEM,aAFN,CAAA;AACE,UAGQ,yBAAA,CAHR;EAAyB,IACrB,CAAA,EAAA,MAAA;;AAAD;AAEZ;AAWA;;;;;AAIwD,UAJvC,gBAAA,CAIuC;EAAI;;AAetC;EAOV,IAAA,CAAA,EAtBH,QAsBG,GAAA,MAAA,GAAsB,IAAA,GAtBE,UAsBF,GAtBe,IAsBf,GAtBsB,IAsBtB;EAAA;;;EACY,OAAA,CAAA,EAAA,CAAA,MAAA,EAAA,MAAA,CAAA,EAAA,GAlBb,MAkBa,CAAA,MAAA,EAAA,MAAA,CAAA;EAGlC;AAWZ;;EAA8B,MACZ,CAAA,EAAA,MAAA;EAAyB;;AAO1B;EAML,MAAA,CAAA,EApCD,WAoCc,GAAA,SAAA;;;;AAA0B;AAAI;AAOtC,KApCL,sBAAA,GAoCyB;EAAA,SAAA,EAAA,GAAA,GAnClB,2BAmCkB,CAnCU,UAmCV,CAAA;CAAA;AAK1B,KArCC,yBAAA,GAqCD;EAAW,EAAA,CAAA,SAAA,EAAA,MAAA,GAAA,MAAA,EAAA,QAAA,EAAA,CAAA,GAAA,IAAA,EAAA,GAAA,EAAA,EAAA,GAAA,IAAA,CAAA,EAjCjB,yBAiCiB;;;;;;UA1BL,aAAA;kBACC,4BAA4B;;;;;;;UAOpC;;;;;KAME,wBAAwB,UAAU;KAEzC,aAAA,GAAgB;;;;UAKJ,oBAAA;;;;YAIL;WACD"}
|