@trpc/client 11.18.1-canary.9 → 11.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/intent.js +0 -0
- package/dist/TRPCClientError-CmHlBkPF.cjs +56 -0
- package/dist/{TRPCClientError-apv8gw59.mjs → TRPCClientError-CxFRO7Js.mjs} +11 -14
- package/dist/TRPCClientError-CxFRO7Js.mjs.map +1 -0
- package/dist/{httpBatchLink-LhidKAPw.mjs → httpBatchLink-BMtWxLJV.mjs} +25 -72
- package/dist/httpBatchLink-BMtWxLJV.mjs.map +1 -0
- package/dist/{httpBatchLink.d-7jyWtY5H.d.cts → httpBatchLink-Br-pzPXf.d.cts} +4 -8
- package/dist/httpBatchLink-Br-pzPXf.d.cts.map +1 -0
- package/dist/{httpBatchLink-BGZRsGNf.cjs → httpBatchLink-DO3WQoxu.cjs} +37 -104
- package/dist/{httpBatchLink.d-p8Y9QM8p.d.mts → httpBatchLink-nvc48L_N.d.mts} +4 -8
- package/dist/httpBatchLink-nvc48L_N.d.mts.map +1 -0
- package/dist/{httpLink.d-CjpPCq4q.d.mts → httpLink-D5FQijY2.d.cts} +4 -7
- package/dist/httpLink-D5FQijY2.d.cts.map +1 -0
- package/dist/{httpLink-B8Iv31Ee.cjs → httpLink-MDJTSlpi.cjs} +39 -38
- package/dist/{httpLink-lG_6juPY.mjs → httpLink-Tm93WWFA.mjs} +17 -14
- package/dist/httpLink-Tm93WWFA.mjs.map +1 -0
- package/dist/{httpLink.d-D5qR9haY.d.cts → httpLink-eSAq8J9S.d.mts} +4 -7
- package/dist/httpLink-eSAq8J9S.d.mts.map +1 -0
- package/dist/{httpUtils.d-BqmeKEGo.d.cts → httpUtils-C37jRVnj.d.mts} +4 -6
- package/dist/httpUtils-C37jRVnj.d.mts.map +1 -0
- package/dist/{httpUtils-pyf5RF99.mjs → httpUtils-CB_100ND.mjs} +51 -14
- package/dist/httpUtils-CB_100ND.mjs.map +1 -0
- package/dist/{httpUtils.d-C5t5to0D.d.mts → httpUtils-CUqAubVD.d.cts} +4 -6
- package/dist/httpUtils-CUqAubVD.d.cts.map +1 -0
- package/dist/{httpUtils-wv2o-njD.cjs → httpUtils-cggqcHz0.cjs} +102 -49
- package/dist/index.cjs +248 -309
- package/dist/index.d.cts +38 -41
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +38 -41
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +212 -272
- package/dist/index.mjs.map +1 -1
- package/dist/links/httpBatchLink.cjs +3 -7
- package/dist/links/httpBatchLink.d.cts +1 -5
- package/dist/links/httpBatchLink.d.mts +1 -5
- package/dist/links/httpBatchLink.mjs +2 -7
- package/dist/links/httpLink.cjs +3 -7
- package/dist/links/httpLink.d.cts +1 -5
- package/dist/links/httpLink.d.mts +1 -5
- package/dist/links/httpLink.mjs +2 -7
- package/dist/links/loggerLink.cjs +113 -4
- package/dist/links/loggerLink.d.cts +1 -3
- package/dist/links/loggerLink.d.mts +1 -3
- package/dist/links/loggerLink.mjs +113 -3
- package/dist/links/loggerLink.mjs.map +1 -0
- package/dist/links/splitLink.cjs +3 -3
- package/dist/links/splitLink.d.cts +1 -3
- package/dist/links/splitLink.d.mts +1 -3
- package/dist/links/splitLink.mjs +2 -3
- package/dist/links/wsLink/wsLink.cjs +3 -6
- package/dist/links/wsLink/wsLink.d.cts +2 -5
- package/dist/links/wsLink/wsLink.d.mts +2 -5
- package/dist/links/wsLink/wsLink.mjs +2 -6
- package/dist/{loggerLink.d-0ABgt7oh.d.mts → loggerLink-2o-uZ3r1.d.cts} +3 -4
- package/dist/loggerLink-2o-uZ3r1.d.cts.map +1 -0
- package/dist/{loggerLink.d-BxSIj5kx.d.cts → loggerLink-CFercTVc.d.mts} +3 -4
- package/dist/loggerLink-CFercTVc.d.mts.map +1 -0
- package/dist/objectSpread2-D-dJi1gK.cjs +73 -0
- package/dist/objectSpread2-weooBxVk.mjs +62 -0
- package/dist/{splitLink-B7Cuf2c_.mjs → splitLink-BZPioDdG.mjs} +6 -11
- package/dist/splitLink-BZPioDdG.mjs.map +1 -0
- package/dist/{splitLink.d-BBFK_mCw.d.cts → splitLink-CJdcmEmS.d.cts} +3 -6
- package/dist/splitLink-CJdcmEmS.d.cts.map +1 -0
- package/dist/{splitLink.d-CkHNg1Se.d.mts → splitLink-CixmF14P.d.mts} +3 -6
- package/dist/splitLink-CixmF14P.d.mts.map +1 -0
- package/dist/{splitLink-BMgxggng.cjs → splitLink-MXnaFlEb.cjs} +17 -24
- package/dist/{subscriptions.d-Ciljg_dH.d.cts → subscriptions-DcqRZc4h.d.cts} +2 -2
- package/dist/subscriptions-DcqRZc4h.d.cts.map +1 -0
- package/dist/{subscriptions.d-Dlr1nWGD.d.mts → subscriptions-DcqRZc4h.d.mts} +2 -2
- package/dist/subscriptions-DcqRZc4h.d.mts.map +1 -0
- package/dist/{types.d-CAr6snH0.d.mts → types-BxbMkv6C.d.cts} +4 -15
- package/dist/types-BxbMkv6C.d.cts.map +1 -0
- package/dist/{types.d-Dmmedc5G.d.cts → types-CAPs7vhA.d.mts} +4 -15
- package/dist/types-CAPs7vhA.d.mts.map +1 -0
- package/dist/{unstable-internals.d-BOmV7EK1.d.mts → unstable-internals-CE8gFBQ9.d.cts} +2 -4
- package/dist/unstable-internals-CE8gFBQ9.d.cts.map +1 -0
- package/dist/{unstable-internals.d-kWsZTlQq.d.cts → unstable-internals-CE8gFBQ9.d.mts} +2 -4
- package/dist/unstable-internals-CE8gFBQ9.d.mts.map +1 -0
- package/dist/unstable-internals.cjs +28 -3
- package/dist/unstable-internals.d.cts +2 -2
- package/dist/unstable-internals.d.mts +2 -2
- package/dist/unstable-internals.mjs +28 -2
- package/dist/unstable-internals.mjs.map +1 -0
- package/dist/{wsLink-DSf4KOdW.mjs → wsLink-Bm5LKL6z.mjs} +73 -94
- package/dist/wsLink-Bm5LKL6z.mjs.map +1 -0
- package/dist/{wsLink-CobRSm6C.cjs → wsLink-CKAsNP9P.cjs} +100 -123
- package/dist/{wsLink.d-pFN64NkG.d.mts → wsLink-DoiyfDgJ.d.cts} +11 -31
- package/dist/wsLink-DoiyfDgJ.d.cts.map +1 -0
- package/dist/{wsLink.d-DzZZZGZQ.d.cts → wsLink-U8pJ7LD2.d.mts} +11 -31
- package/dist/wsLink-U8pJ7LD2.d.mts.map +1 -0
- package/package.json +10 -10
- package/src/getFetch.ts +3 -2
- package/src/links/httpBatchLink.ts +12 -3
- package/src/links/httpBatchStreamLink.ts +7 -8
- package/src/links/httpLink.ts +9 -2
- package/src/links/httpSubscriptionLink.ts +1 -3
- package/src/links/internals/subscriptions.ts +3 -2
- package/src/links/types.ts +1 -2
- package/src/links/wsLink/wsClient/wsClient.ts +8 -1
- package/dist/TRPCClientError-CQrTQLrk.cjs +0 -61
- package/dist/TRPCClientError-apv8gw59.mjs.map +0 -1
- package/dist/chunk-DWy1uDak.cjs +0 -39
- package/dist/httpBatchLink-LhidKAPw.mjs.map +0 -1
- package/dist/httpBatchLink.d-7jyWtY5H.d.cts.map +0 -1
- package/dist/httpBatchLink.d-p8Y9QM8p.d.mts.map +0 -1
- package/dist/httpLink-lG_6juPY.mjs.map +0 -1
- package/dist/httpLink.d-CjpPCq4q.d.mts.map +0 -1
- package/dist/httpLink.d-D5qR9haY.d.cts.map +0 -1
- package/dist/httpUtils-pyf5RF99.mjs.map +0 -1
- package/dist/httpUtils.d-BqmeKEGo.d.cts.map +0 -1
- package/dist/httpUtils.d-C5t5to0D.d.mts.map +0 -1
- package/dist/loggerLink-CuYvRzyH.cjs +0 -123
- package/dist/loggerLink-ineCN1PO.mjs +0 -118
- package/dist/loggerLink-ineCN1PO.mjs.map +0 -1
- package/dist/loggerLink.d-0ABgt7oh.d.mts.map +0 -1
- package/dist/loggerLink.d-BxSIj5kx.d.cts.map +0 -1
- package/dist/objectSpread2-Bsvh_OqM.cjs +0 -100
- package/dist/objectSpread2-BvkFp-_Y.mjs +0 -114
- package/dist/objectSpread2-BvkFp-_Y.mjs.map +0 -1
- package/dist/splitLink-B7Cuf2c_.mjs.map +0 -1
- package/dist/splitLink.d-BBFK_mCw.d.cts.map +0 -1
- package/dist/splitLink.d-CkHNg1Se.d.mts.map +0 -1
- package/dist/subscriptions.d-Ciljg_dH.d.cts.map +0 -1
- package/dist/subscriptions.d-Dlr1nWGD.d.mts.map +0 -1
- package/dist/types.d-CAr6snH0.d.mts.map +0 -1
- package/dist/types.d-Dmmedc5G.d.cts.map +0 -1
- package/dist/unstable-internals-Bg7n9BBj.mjs +0 -29
- package/dist/unstable-internals-Bg7n9BBj.mjs.map +0 -1
- package/dist/unstable-internals-M84gUQCV.cjs +0 -34
- package/dist/unstable-internals.d-BOmV7EK1.d.mts.map +0 -1
- package/dist/unstable-internals.d-kWsZTlQq.d.cts.map +0 -1
- package/dist/wsLink-DSf4KOdW.mjs.map +0 -1
- package/dist/wsLink.d-DzZZZGZQ.d.cts.map +0 -1
- package/dist/wsLink.d-pFN64NkG.d.mts.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,47 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { getTransformer } from "./unstable-internals
|
|
8
|
-
import { loggerLink } from "./loggerLink
|
|
9
|
-
import {
|
|
1
|
+
import { n as createChain, t as splitLink } from "./splitLink-BZPioDdG.mjs";
|
|
2
|
+
import { n as _defineProperty, t as _objectSpread2 } from "./objectSpread2-weooBxVk.mjs";
|
|
3
|
+
import { n as isTRPCClientError, t as TRPCClientError } from "./TRPCClientError-CxFRO7Js.mjs";
|
|
4
|
+
import { c as allAbortSignals, l as raceAbortSignals, n as getBody, o as resolveHTTPLinkOptions, r as getUrl, s as abortSignalToPromise, t as fetchHTTPResponse, u as getFetch } from "./httpUtils-CB_100ND.mjs";
|
|
5
|
+
import { i as isOctetType, n as isFormData, r as isNonJsonSerializable, t as httpLink } from "./httpLink-Tm93WWFA.mjs";
|
|
6
|
+
import { n as dataLoader, t as httpBatchLink } from "./httpBatchLink-BMtWxLJV.mjs";
|
|
7
|
+
import { getTransformer } from "./unstable-internals.mjs";
|
|
8
|
+
import { loggerLink } from "./links/loggerLink.mjs";
|
|
9
|
+
import { i as jsonEncoder, n as createWSClient, r as resultOf, t as wsLink } from "./wsLink-Bm5LKL6z.mjs";
|
|
10
10
|
import { behaviorSubject, observable, observableToPromise, share } from "@trpc/server/observable";
|
|
11
11
|
import { callProcedure, createFlatProxy, createRecursiveProxy, isAbortError, isAsyncIterable, iteratorResource, jsonlStreamConsumer, makeResource, retryableRpcCodes, run, sseStreamConsumer } from "@trpc/server/unstable-core-do-not-import";
|
|
12
12
|
import { getTRPCErrorFromUnknown, getTRPCErrorShape, isTrackedEnvelope } from "@trpc/server";
|
|
13
13
|
import { TRPC_ERROR_CODES_BY_KEY } from "@trpc/server/rpc";
|
|
14
|
-
|
|
15
14
|
//#region src/internals/TRPCUntypedClient.ts
|
|
16
|
-
var import_defineProperty = __toESM(require_defineProperty(), 1);
|
|
17
|
-
var import_objectSpread2$4 = __toESM(require_objectSpread2(), 1);
|
|
18
15
|
var TRPCUntypedClient = class {
|
|
19
16
|
constructor(opts) {
|
|
20
|
-
(
|
|
21
|
-
(
|
|
22
|
-
(
|
|
17
|
+
_defineProperty(this, "links", void 0);
|
|
18
|
+
_defineProperty(this, "runtime", void 0);
|
|
19
|
+
_defineProperty(this, "requestId", void 0);
|
|
23
20
|
this.requestId = 0;
|
|
24
21
|
this.runtime = {};
|
|
25
22
|
this.links = opts.links.map((link) => link(this.runtime));
|
|
26
23
|
}
|
|
27
24
|
$request(opts) {
|
|
28
25
|
var _opts$context;
|
|
29
|
-
|
|
26
|
+
return createChain({
|
|
30
27
|
links: this.links,
|
|
31
|
-
op: (
|
|
28
|
+
op: _objectSpread2(_objectSpread2({}, opts), {}, {
|
|
32
29
|
context: (_opts$context = opts.context) !== null && _opts$context !== void 0 ? _opts$context : {},
|
|
33
30
|
id: ++this.requestId
|
|
34
31
|
})
|
|
35
|
-
});
|
|
36
|
-
return chain$.pipe(share());
|
|
32
|
+
}).pipe(share());
|
|
37
33
|
}
|
|
38
34
|
async requestAsPromise(opts) {
|
|
39
|
-
var _this = this;
|
|
40
35
|
try {
|
|
41
|
-
const req$ =
|
|
42
|
-
|
|
43
|
-
const data = envelope.result.data;
|
|
44
|
-
return data;
|
|
36
|
+
const req$ = this.$request(opts);
|
|
37
|
+
return (await observableToPromise(req$)).result.data;
|
|
45
38
|
} catch (err) {
|
|
46
39
|
throw TRPCClientError.from(err);
|
|
47
40
|
}
|
|
@@ -65,37 +58,31 @@ var TRPCUntypedClient = class {
|
|
|
65
58
|
});
|
|
66
59
|
}
|
|
67
60
|
subscription(path, input, opts) {
|
|
68
|
-
|
|
61
|
+
return this.$request({
|
|
69
62
|
type: "subscription",
|
|
70
63
|
path,
|
|
71
64
|
input,
|
|
72
65
|
context: opts.context,
|
|
73
66
|
signal: opts.signal
|
|
74
|
-
})
|
|
75
|
-
return observable$.subscribe({
|
|
67
|
+
}).subscribe({
|
|
76
68
|
next(envelope) {
|
|
77
69
|
switch (envelope.result.type) {
|
|
78
|
-
case "state":
|
|
70
|
+
case "state":
|
|
79
71
|
var _opts$onConnectionSta;
|
|
80
72
|
(_opts$onConnectionSta = opts.onConnectionStateChange) === null || _opts$onConnectionSta === void 0 || _opts$onConnectionSta.call(opts, envelope.result);
|
|
81
73
|
break;
|
|
82
|
-
|
|
83
|
-
case "started": {
|
|
74
|
+
case "started":
|
|
84
75
|
var _opts$onStarted;
|
|
85
76
|
(_opts$onStarted = opts.onStarted) === null || _opts$onStarted === void 0 || _opts$onStarted.call(opts, { context: envelope.context });
|
|
86
77
|
break;
|
|
87
|
-
|
|
88
|
-
case "stopped": {
|
|
78
|
+
case "stopped":
|
|
89
79
|
var _opts$onStopped;
|
|
90
80
|
(_opts$onStopped = opts.onStopped) === null || _opts$onStopped === void 0 || _opts$onStopped.call(opts);
|
|
91
81
|
break;
|
|
92
|
-
}
|
|
93
82
|
case "data":
|
|
94
|
-
case void 0:
|
|
83
|
+
case void 0:
|
|
95
84
|
var _opts$onData;
|
|
96
85
|
(_opts$onData = opts.onData) === null || _opts$onData === void 0 || _opts$onData.call(opts, envelope.result.data);
|
|
97
|
-
break;
|
|
98
|
-
}
|
|
99
86
|
}
|
|
100
87
|
},
|
|
101
88
|
error(err) {
|
|
@@ -109,13 +96,11 @@ var TRPCUntypedClient = class {
|
|
|
109
96
|
});
|
|
110
97
|
}
|
|
111
98
|
};
|
|
112
|
-
|
|
113
99
|
//#endregion
|
|
114
100
|
//#region src/createTRPCUntypedClient.ts
|
|
115
101
|
function createTRPCUntypedClient(opts) {
|
|
116
102
|
return new TRPCUntypedClient(opts);
|
|
117
103
|
}
|
|
118
|
-
|
|
119
104
|
//#endregion
|
|
120
105
|
//#region src/createTRPCClient.ts
|
|
121
106
|
const untypedClientSymbol = Symbol.for("trpc_untypedClient");
|
|
@@ -144,9 +129,7 @@ function createTRPCClientProxy(client) {
|
|
|
144
129
|
});
|
|
145
130
|
}
|
|
146
131
|
function createTRPCClient(opts) {
|
|
147
|
-
|
|
148
|
-
const proxy = createTRPCClientProxy(client);
|
|
149
|
-
return proxy;
|
|
132
|
+
return createTRPCClientProxy(new TRPCUntypedClient(opts));
|
|
150
133
|
}
|
|
151
134
|
/**
|
|
152
135
|
* Get an untyped client from a proxy client
|
|
@@ -155,10 +138,8 @@ function createTRPCClient(opts) {
|
|
|
155
138
|
function getUntypedClient(client) {
|
|
156
139
|
return client[untypedClientSymbol];
|
|
157
140
|
}
|
|
158
|
-
|
|
159
141
|
//#endregion
|
|
160
142
|
//#region src/links/httpBatchStreamLink.ts
|
|
161
|
-
var import_objectSpread2$3 = __toESM(require_objectSpread2(), 1);
|
|
162
143
|
/**
|
|
163
144
|
* @see https://trpc.io/docs/client/links/httpBatchStreamLink
|
|
164
145
|
*/
|
|
@@ -175,13 +156,12 @@ function httpBatchStreamLink(opts) {
|
|
|
175
156
|
if (batchOps.length > maxItems) return false;
|
|
176
157
|
const path = batchOps.map((op) => op.path).join(",");
|
|
177
158
|
const inputs = batchOps.map((op) => op.input);
|
|
178
|
-
|
|
159
|
+
return getUrl(_objectSpread2(_objectSpread2({}, resolvedOpts), {}, {
|
|
179
160
|
type,
|
|
180
161
|
path,
|
|
181
162
|
inputs,
|
|
182
163
|
signal: null
|
|
183
|
-
}));
|
|
184
|
-
return url.length <= maxURLLength;
|
|
164
|
+
})).length <= maxURLLength;
|
|
185
165
|
},
|
|
186
166
|
async fetch(batchOps) {
|
|
187
167
|
var _opts$streamHeader;
|
|
@@ -189,7 +169,7 @@ function httpBatchStreamLink(opts) {
|
|
|
189
169
|
const inputs = batchOps.map((op) => op.input);
|
|
190
170
|
const batchSignals = allAbortSignals(...batchOps.map((op) => op.signal));
|
|
191
171
|
const abortController = new AbortController();
|
|
192
|
-
const
|
|
172
|
+
const res = await fetchHTTPResponse(_objectSpread2(_objectSpread2({}, resolvedOpts), {}, {
|
|
193
173
|
signal: raceAbortSignals(batchSignals, abortController.signal),
|
|
194
174
|
type,
|
|
195
175
|
contentTypeHeader: "application/json",
|
|
@@ -205,7 +185,6 @@ function httpBatchStreamLink(opts) {
|
|
|
205
185
|
return opts.headers;
|
|
206
186
|
}
|
|
207
187
|
}));
|
|
208
|
-
const res = await responsePromise;
|
|
209
188
|
if (!res.ok) {
|
|
210
189
|
const json = await res.json();
|
|
211
190
|
if ("error" in json) json.error = resolvedOpts.transformer.output.deserialize(json.error);
|
|
@@ -217,13 +196,13 @@ function httpBatchStreamLink(opts) {
|
|
|
217
196
|
const [head] = await jsonlStreamConsumer({
|
|
218
197
|
from: res.body,
|
|
219
198
|
deserialize: (data) => resolvedOpts.transformer.output.deserialize(data),
|
|
220
|
-
formatError(opts
|
|
221
|
-
const error = opts
|
|
199
|
+
formatError(opts) {
|
|
200
|
+
const error = opts.error;
|
|
222
201
|
return TRPCClientError.from({ error });
|
|
223
202
|
},
|
|
224
203
|
abortController
|
|
225
204
|
});
|
|
226
|
-
|
|
205
|
+
return Object.keys(batchOps).map(async (key) => {
|
|
227
206
|
let json = await Promise.resolve(head[key]);
|
|
228
207
|
if ("result" in json) {
|
|
229
208
|
/**
|
|
@@ -238,23 +217,19 @@ function httpBatchStreamLink(opts) {
|
|
|
238
217
|
meta: { response: res }
|
|
239
218
|
};
|
|
240
219
|
});
|
|
241
|
-
return promises;
|
|
242
220
|
}
|
|
243
221
|
};
|
|
244
222
|
};
|
|
245
|
-
const query = dataLoader(batchLoader("query"));
|
|
246
|
-
const mutation = dataLoader(batchLoader("mutation"));
|
|
247
223
|
const loaders = {
|
|
248
|
-
query,
|
|
249
|
-
mutation
|
|
224
|
+
query: dataLoader(batchLoader("query")),
|
|
225
|
+
mutation: dataLoader(batchLoader("mutation"))
|
|
250
226
|
};
|
|
251
227
|
return ({ op }) => {
|
|
252
228
|
return observable((observer) => {
|
|
253
229
|
/* istanbul ignore if -- @preserve */
|
|
254
230
|
if (op.type === "subscription") throw new Error("Subscriptions are unsupported by `httpBatchStreamLink` - use `httpSubscriptionLink` or `wsLink`");
|
|
255
231
|
const ac = new AbortController();
|
|
256
|
-
const
|
|
257
|
-
const promise = loader.load((0, import_objectSpread2$3.default)((0, import_objectSpread2$3.default)({}, op), {}, { signal: raceAbortSignals(op.signal, ac.signal) }));
|
|
232
|
+
const promise = loaders[op.type].load(_objectSpread2(_objectSpread2({}, op), {}, { signal: raceAbortSignals(op.signal, ac.signal) }));
|
|
258
233
|
let isDone = false;
|
|
259
234
|
let _res = void 0;
|
|
260
235
|
promise.then((res) => {
|
|
@@ -287,66 +262,58 @@ function httpBatchStreamLink(opts) {
|
|
|
287
262
|
* @deprecated use {@link httpBatchStreamLink} instead
|
|
288
263
|
*/
|
|
289
264
|
const unstable_httpBatchStreamLink = httpBatchStreamLink;
|
|
290
|
-
|
|
291
265
|
//#endregion
|
|
292
266
|
//#region src/internals/inputWithTrackedEventId.ts
|
|
293
|
-
var import_objectSpread2$2 = __toESM(require_objectSpread2(), 1);
|
|
294
267
|
function inputWithTrackedEventId(input, lastEventId) {
|
|
295
268
|
if (!lastEventId) return input;
|
|
296
269
|
if (input != null && typeof input !== "object") return input;
|
|
297
|
-
return (
|
|
270
|
+
return _objectSpread2(_objectSpread2({}, input !== null && input !== void 0 ? input : {}), {}, { lastEventId });
|
|
298
271
|
}
|
|
299
|
-
|
|
300
272
|
//#endregion
|
|
301
|
-
//#region
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
t = "@@asyncIterator", o = "@@iterator";
|
|
309
|
-
}
|
|
310
|
-
throw new TypeError("Object is not async iterable");
|
|
273
|
+
//#region \0@oxc-project+runtime@0.149.0/helpers/esm/asyncIterator.js
|
|
274
|
+
function _asyncIterator(r) {
|
|
275
|
+
var n, t, o, e = 2;
|
|
276
|
+
for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) {
|
|
277
|
+
if (t && null != (n = r[t])) return n.call(r);
|
|
278
|
+
if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r));
|
|
279
|
+
t = "@@asyncIterator", o = "@@iterator";
|
|
311
280
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
this.s = r$1, this.n = r$1.next;
|
|
325
|
-
}, AsyncFromSyncIterator.prototype = {
|
|
326
|
-
s: null,
|
|
327
|
-
n: null,
|
|
328
|
-
next: function next() {
|
|
329
|
-
return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
|
|
330
|
-
},
|
|
331
|
-
"return": function _return(r$1) {
|
|
332
|
-
var n = this.s["return"];
|
|
333
|
-
return void 0 === n ? Promise.resolve({
|
|
334
|
-
value: r$1,
|
|
335
|
-
done: !0
|
|
336
|
-
}) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
|
|
337
|
-
},
|
|
338
|
-
"throw": function _throw(r$1) {
|
|
339
|
-
var n = this.s["return"];
|
|
340
|
-
return void 0 === n ? Promise.reject(r$1) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
|
|
341
|
-
}
|
|
342
|
-
}, new AsyncFromSyncIterator(r);
|
|
281
|
+
throw new TypeError("Object is not async iterable");
|
|
282
|
+
}
|
|
283
|
+
function AsyncFromSyncIterator(r) {
|
|
284
|
+
function AsyncFromSyncIteratorContinuation(r) {
|
|
285
|
+
if (Object(r) !== r) return Promise.reject(/* @__PURE__ */ new TypeError(r + " is not an object."));
|
|
286
|
+
var n = r.done;
|
|
287
|
+
return Promise.resolve(r.value).then(function(r) {
|
|
288
|
+
return {
|
|
289
|
+
value: r,
|
|
290
|
+
done: n
|
|
291
|
+
};
|
|
292
|
+
});
|
|
343
293
|
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
294
|
+
return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) {
|
|
295
|
+
this.s = r, this.n = r.next;
|
|
296
|
+
}, AsyncFromSyncIterator.prototype = {
|
|
297
|
+
s: null,
|
|
298
|
+
n: null,
|
|
299
|
+
next: function next() {
|
|
300
|
+
return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
|
|
301
|
+
},
|
|
302
|
+
"return": function _return(r) {
|
|
303
|
+
var n = this.s["return"];
|
|
304
|
+
return void 0 === n ? Promise.resolve({
|
|
305
|
+
value: r,
|
|
306
|
+
done: !0
|
|
307
|
+
}) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
|
|
308
|
+
},
|
|
309
|
+
"throw": function _throw(r) {
|
|
310
|
+
var n = this.s["return"];
|
|
311
|
+
return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
|
|
312
|
+
}
|
|
313
|
+
}, new AsyncFromSyncIterator(r);
|
|
314
|
+
}
|
|
347
315
|
//#endregion
|
|
348
316
|
//#region src/links/httpSubscriptionLink.ts
|
|
349
|
-
var import_asyncIterator = __toESM(require_asyncIterator(), 1);
|
|
350
317
|
async function urlWithConnectionParams(opts) {
|
|
351
318
|
let url = await resultOf(opts.url);
|
|
352
319
|
if (opts.connectionParams) {
|
|
@@ -398,7 +365,7 @@ function httpSubscriptionLink(opts) {
|
|
|
398
365
|
var _didIteratorError = false;
|
|
399
366
|
var _iteratorError;
|
|
400
367
|
try {
|
|
401
|
-
for (var _iterator = (
|
|
368
|
+
for (var _iterator = _asyncIterator(eventSourceStream), _step; _iteratorAbruptCompletion = !(_step = await _iterator.next()).done; _iteratorAbruptCompletion = false) {
|
|
402
369
|
const chunk = _step.value;
|
|
403
370
|
switch (chunk.type) {
|
|
404
371
|
case "ping": break;
|
|
@@ -417,7 +384,7 @@ function httpSubscriptionLink(opts) {
|
|
|
417
384
|
context: { eventSource: chunk.eventSource }
|
|
418
385
|
});
|
|
419
386
|
break;
|
|
420
|
-
case "connected":
|
|
387
|
+
case "connected":
|
|
421
388
|
observer.next({
|
|
422
389
|
result: { type: "started" },
|
|
423
390
|
context: { eventSource: chunk.eventSource }
|
|
@@ -428,7 +395,6 @@ function httpSubscriptionLink(opts) {
|
|
|
428
395
|
error: null
|
|
429
396
|
});
|
|
430
397
|
break;
|
|
431
|
-
}
|
|
432
398
|
case "serialized-error": {
|
|
433
399
|
const error = TRPCClientError.from({ error: chunk.error });
|
|
434
400
|
if (retryableRpcCodes.includes(chunk.error.code)) {
|
|
@@ -492,10 +458,9 @@ function httpSubscriptionLink(opts) {
|
|
|
492
458
|
* @deprecated use {@link httpSubscriptionLink} instead
|
|
493
459
|
*/
|
|
494
460
|
const unstable_httpSubscriptionLink = httpSubscriptionLink;
|
|
495
|
-
|
|
496
461
|
//#endregion
|
|
497
462
|
//#region src/links/retryLink.ts
|
|
498
|
-
|
|
463
|
+
/* istanbul ignore file -- @preserve */
|
|
499
464
|
/**
|
|
500
465
|
* @see https://trpc.io/docs/v11/client/links/retryLink
|
|
501
466
|
*/
|
|
@@ -510,19 +475,18 @@ function retryLink(opts) {
|
|
|
510
475
|
function opWithLastEventId() {
|
|
511
476
|
const op = callOpts.op;
|
|
512
477
|
if (!lastEventId) return op;
|
|
513
|
-
return (
|
|
478
|
+
return _objectSpread2(_objectSpread2({}, op), {}, { input: inputWithTrackedEventId(op.input, lastEventId) });
|
|
514
479
|
}
|
|
515
480
|
function attempt(attempts) {
|
|
516
481
|
const op = opWithLastEventId();
|
|
517
482
|
next$ = callOpts.next(op).subscribe({
|
|
518
483
|
error(error) {
|
|
519
484
|
var _opts$retryDelayMs, _opts$retryDelayMs2;
|
|
520
|
-
|
|
485
|
+
if (!opts.retry({
|
|
521
486
|
op,
|
|
522
487
|
attempts,
|
|
523
488
|
error
|
|
524
|
-
})
|
|
525
|
-
if (!shouldRetry) {
|
|
489
|
+
})) {
|
|
526
490
|
observer.error(error);
|
|
527
491
|
return;
|
|
528
492
|
}
|
|
@@ -550,163 +514,140 @@ function retryLink(opts) {
|
|
|
550
514
|
};
|
|
551
515
|
};
|
|
552
516
|
}
|
|
553
|
-
|
|
554
517
|
//#endregion
|
|
555
|
-
//#region
|
|
556
|
-
|
|
557
|
-
function
|
|
558
|
-
var
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
if (
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
return Promise.reject(r$2);
|
|
573
|
-
}
|
|
574
|
-
}), n.push({
|
|
575
|
-
v: e$1,
|
|
576
|
-
d: o,
|
|
577
|
-
a: r$1
|
|
578
|
-
});
|
|
579
|
-
} else r$1 && n.push({
|
|
580
|
-
d: e$1,
|
|
581
|
-
a: r$1
|
|
582
|
-
});
|
|
583
|
-
return e$1;
|
|
584
|
-
}
|
|
585
|
-
return {
|
|
586
|
-
e,
|
|
587
|
-
u: using.bind(null, !1),
|
|
588
|
-
a: using.bind(null, !0),
|
|
589
|
-
d: function d() {
|
|
590
|
-
var o, t = this.e, s = 0;
|
|
591
|
-
function next() {
|
|
592
|
-
for (; o = n.pop();) try {
|
|
593
|
-
if (!o.a && 1 === s) return s = 0, n.push(o), Promise.resolve().then(next);
|
|
594
|
-
if (o.d) {
|
|
595
|
-
var r$1 = o.d.call(o.v);
|
|
596
|
-
if (o.a) return s |= 2, Promise.resolve(r$1).then(next, err);
|
|
597
|
-
} else s |= 1;
|
|
598
|
-
} catch (r$2) {
|
|
599
|
-
return err(r$2);
|
|
600
|
-
}
|
|
601
|
-
if (1 === s) return t !== e ? Promise.reject(t) : Promise.resolve();
|
|
602
|
-
if (t !== e) throw t;
|
|
518
|
+
//#region \0@oxc-project+runtime@0.149.0/helpers/esm/usingCtx.js
|
|
519
|
+
function _usingCtx() {
|
|
520
|
+
var r = "function" == typeof SuppressedError ? SuppressedError : function(r, e) {
|
|
521
|
+
var n = Error();
|
|
522
|
+
return n.name = "SuppressedError", n.error = r, n.suppressed = e, n;
|
|
523
|
+
}, e = {}, n = [];
|
|
524
|
+
function using(r, e) {
|
|
525
|
+
if (null != e) {
|
|
526
|
+
if (Object(e) !== e) throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");
|
|
527
|
+
if (r) var o = e[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")];
|
|
528
|
+
if (void 0 === o && (o = e[Symbol.dispose || Symbol["for"]("Symbol.dispose")], r)) var t = o;
|
|
529
|
+
if ("function" != typeof o) throw new TypeError("Object is not disposable.");
|
|
530
|
+
t && (o = function o() {
|
|
531
|
+
try {
|
|
532
|
+
t.call(e);
|
|
533
|
+
} catch (r) {
|
|
534
|
+
return Promise.reject(r);
|
|
603
535
|
}
|
|
604
|
-
|
|
605
|
-
|
|
536
|
+
}), n.push({
|
|
537
|
+
v: e,
|
|
538
|
+
d: o,
|
|
539
|
+
a: r
|
|
540
|
+
});
|
|
541
|
+
} else r && n.push({
|
|
542
|
+
d: e,
|
|
543
|
+
a: r
|
|
544
|
+
});
|
|
545
|
+
return e;
|
|
546
|
+
}
|
|
547
|
+
return {
|
|
548
|
+
e,
|
|
549
|
+
u: using.bind(null, !1),
|
|
550
|
+
a: using.bind(null, !0),
|
|
551
|
+
d: function d() {
|
|
552
|
+
var o, t = this.e, s = 0;
|
|
553
|
+
function next() {
|
|
554
|
+
for (; o = n.pop();) try {
|
|
555
|
+
if (!o.a && 1 === s) return s = 0, n.push(o), Promise.resolve().then(next);
|
|
556
|
+
if (o.d) {
|
|
557
|
+
var r = o.d.call(o.v);
|
|
558
|
+
if (o.a) return s |= 2, Promise.resolve(r).then(next, err);
|
|
559
|
+
} else s |= 1;
|
|
560
|
+
} catch (r) {
|
|
561
|
+
return err(r);
|
|
606
562
|
}
|
|
607
|
-
return
|
|
563
|
+
if (1 === s) return t !== e ? Promise.reject(t) : Promise.resolve();
|
|
564
|
+
if (t !== e) throw t;
|
|
608
565
|
}
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
566
|
+
function err(n) {
|
|
567
|
+
return t = t !== e ? new r(n, t) : n, next();
|
|
568
|
+
}
|
|
569
|
+
return next();
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
}
|
|
614
573
|
//#endregion
|
|
615
|
-
//#region
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
}
|
|
620
|
-
module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
621
|
-
} });
|
|
622
|
-
|
|
574
|
+
//#region \0@oxc-project+runtime@0.149.0/helpers/esm/OverloadYield.js
|
|
575
|
+
function _OverloadYield(e, d) {
|
|
576
|
+
this.v = e, this.k = d;
|
|
577
|
+
}
|
|
623
578
|
//#endregion
|
|
624
|
-
//#region
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
return new OverloadYield$1(e, 0);
|
|
629
|
-
}
|
|
630
|
-
module.exports = _awaitAsyncGenerator$1, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
631
|
-
} });
|
|
632
|
-
|
|
579
|
+
//#region \0@oxc-project+runtime@0.149.0/helpers/esm/awaitAsyncGenerator.js
|
|
580
|
+
function _awaitAsyncGenerator(e) {
|
|
581
|
+
return new _OverloadYield(e, 0);
|
|
582
|
+
}
|
|
633
583
|
//#endregion
|
|
634
|
-
//#region
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
function
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
if (
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
} catch (e$1) {
|
|
658
|
-
settle("throw", e$1);
|
|
659
|
-
}
|
|
584
|
+
//#region \0@oxc-project+runtime@0.149.0/helpers/esm/wrapAsyncGenerator.js
|
|
585
|
+
function _wrapAsyncGenerator(e) {
|
|
586
|
+
return function() {
|
|
587
|
+
return new AsyncGenerator(e.apply(this, arguments));
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
function AsyncGenerator(e) {
|
|
591
|
+
var r, t;
|
|
592
|
+
function resume(r, t) {
|
|
593
|
+
try {
|
|
594
|
+
var n = e[r](t), o = n.value, u = o instanceof _OverloadYield;
|
|
595
|
+
Promise.resolve(u ? o.v : o).then(function(t) {
|
|
596
|
+
if (u) {
|
|
597
|
+
var i = "return" === r ? "return" : "next";
|
|
598
|
+
if (!o.k || t.done) return resume(i, t);
|
|
599
|
+
t = e[i](t).value;
|
|
600
|
+
}
|
|
601
|
+
settle(n.done ? "return" : "normal", t);
|
|
602
|
+
}, function(e) {
|
|
603
|
+
resume("throw", e);
|
|
604
|
+
});
|
|
605
|
+
} catch (e) {
|
|
606
|
+
settle("throw", e);
|
|
660
607
|
}
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
done: !0
|
|
667
|
-
});
|
|
668
|
-
break;
|
|
669
|
-
case "throw":
|
|
670
|
-
r.reject(n);
|
|
671
|
-
break;
|
|
672
|
-
default: r.resolve({
|
|
608
|
+
}
|
|
609
|
+
function settle(e, n) {
|
|
610
|
+
switch (e) {
|
|
611
|
+
case "return":
|
|
612
|
+
r.resolve({
|
|
673
613
|
value: n,
|
|
674
|
-
done: !
|
|
614
|
+
done: !0
|
|
675
615
|
});
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
arg: n,
|
|
684
|
-
resolve: o,
|
|
685
|
-
reject: u,
|
|
686
|
-
next: null
|
|
687
|
-
};
|
|
688
|
-
t ? t = t.next = i : (r = t = i, resume(e$1, n));
|
|
616
|
+
break;
|
|
617
|
+
case "throw":
|
|
618
|
+
r.reject(n);
|
|
619
|
+
break;
|
|
620
|
+
default: r.resolve({
|
|
621
|
+
value: n,
|
|
622
|
+
done: !1
|
|
689
623
|
});
|
|
690
|
-
}
|
|
624
|
+
}
|
|
625
|
+
(r = r.next) ? resume(r.key, r.arg) : t = null;
|
|
691
626
|
}
|
|
692
|
-
|
|
693
|
-
return
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
}
|
|
703
|
-
|
|
627
|
+
this._invoke = function(e, n) {
|
|
628
|
+
return new Promise(function(o, u) {
|
|
629
|
+
var i = {
|
|
630
|
+
key: e,
|
|
631
|
+
arg: n,
|
|
632
|
+
resolve: o,
|
|
633
|
+
reject: u,
|
|
634
|
+
next: null
|
|
635
|
+
};
|
|
636
|
+
t ? t = t.next = i : (r = t = i, resume(e, n));
|
|
637
|
+
});
|
|
638
|
+
}, "function" != typeof e["return"] && (this["return"] = void 0);
|
|
639
|
+
}
|
|
640
|
+
AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function() {
|
|
641
|
+
return this;
|
|
642
|
+
}, AsyncGenerator.prototype.next = function(e) {
|
|
643
|
+
return this._invoke("next", e);
|
|
644
|
+
}, AsyncGenerator.prototype["throw"] = function(e) {
|
|
645
|
+
return this._invoke("throw", e);
|
|
646
|
+
}, AsyncGenerator.prototype["return"] = function(e) {
|
|
647
|
+
return this._invoke("return", e);
|
|
648
|
+
};
|
|
704
649
|
//#endregion
|
|
705
650
|
//#region src/links/localLink.ts
|
|
706
|
-
var import_usingCtx = __toESM(require_usingCtx(), 1);
|
|
707
|
-
var import_awaitAsyncGenerator = __toESM(require_awaitAsyncGenerator(), 1);
|
|
708
|
-
var import_wrapAsyncGenerator = __toESM(require_wrapAsyncGenerator(), 1);
|
|
709
|
-
var import_objectSpread2 = __toESM(require_objectSpread2(), 1);
|
|
710
651
|
/**
|
|
711
652
|
* localLink is a terminating link that allows you to make tRPC procedure calls directly in your application without going through HTTP.
|
|
712
653
|
*
|
|
@@ -718,8 +659,7 @@ function unstable_localLink(opts) {
|
|
|
718
659
|
if (opts.transformer) return chunk;
|
|
719
660
|
if (chunk === void 0) return chunk;
|
|
720
661
|
const serialized = JSON.stringify(transformer.input.serialize(chunk));
|
|
721
|
-
|
|
722
|
-
return deserialized;
|
|
662
|
+
return JSON.parse(transformer.output.deserialize(serialized));
|
|
723
663
|
};
|
|
724
664
|
return () => ({ op }) => observable((observer) => {
|
|
725
665
|
let ctx = void 0;
|
|
@@ -775,16 +715,16 @@ function unstable_localLink(opts) {
|
|
|
775
715
|
observer.complete();
|
|
776
716
|
break;
|
|
777
717
|
}
|
|
778
|
-
observer.next({ result: { data: (
|
|
718
|
+
observer.next({ result: { data: _wrapAsyncGenerator(function* () {
|
|
779
719
|
try {
|
|
780
|
-
var _usingCtx$1 = (
|
|
720
|
+
var _usingCtx$1 = _usingCtx();
|
|
781
721
|
const iterator = _usingCtx$1.a(iteratorResource(result));
|
|
782
|
-
|
|
722
|
+
_usingCtx$1.u(makeResource({}, () => {
|
|
783
723
|
observer.complete();
|
|
784
724
|
}));
|
|
785
725
|
try {
|
|
786
726
|
while (true) {
|
|
787
|
-
const res = yield (
|
|
727
|
+
const res = yield _awaitAsyncGenerator(Promise.race([iterator.next(), signalPromise]));
|
|
788
728
|
if (res.done) return transformChunk(res.value);
|
|
789
729
|
yield transformChunk(res.value);
|
|
790
730
|
}
|
|
@@ -795,13 +735,13 @@ function unstable_localLink(opts) {
|
|
|
795
735
|
} catch (_) {
|
|
796
736
|
_usingCtx$1.e = _;
|
|
797
737
|
} finally {
|
|
798
|
-
yield (
|
|
738
|
+
yield _awaitAsyncGenerator(_usingCtx$1.d());
|
|
799
739
|
}
|
|
800
740
|
})() } });
|
|
801
741
|
break;
|
|
802
742
|
}
|
|
803
743
|
case "subscription": try {
|
|
804
|
-
var _usingCtx3 = (
|
|
744
|
+
var _usingCtx3 = _usingCtx();
|
|
805
745
|
const connectionState = behaviorSubject({
|
|
806
746
|
type: "state",
|
|
807
747
|
state: "connecting",
|
|
@@ -811,7 +751,7 @@ function unstable_localLink(opts) {
|
|
|
811
751
|
observer.next({ result: state });
|
|
812
752
|
} });
|
|
813
753
|
let lastEventId = void 0;
|
|
814
|
-
|
|
754
|
+
_usingCtx3.u(makeResource({}, async () => {
|
|
815
755
|
observer.complete();
|
|
816
756
|
connectionState.next({
|
|
817
757
|
type: "state",
|
|
@@ -821,7 +761,7 @@ function unstable_localLink(opts) {
|
|
|
821
761
|
connectionSub.unsubscribe();
|
|
822
762
|
}));
|
|
823
763
|
while (true) try {
|
|
824
|
-
var _usingCtx4 = (
|
|
764
|
+
var _usingCtx4 = _usingCtx();
|
|
825
765
|
const result = await runProcedure(inputWithTrackedEventId(op.input, lastEventId));
|
|
826
766
|
if (!isAsyncIterable(result)) throw new Error("Expected an async iterable");
|
|
827
767
|
const iterator = _usingCtx4.a(iteratorResource(result));
|
|
@@ -859,7 +799,7 @@ function unstable_localLink(opts) {
|
|
|
859
799
|
}
|
|
860
800
|
};
|
|
861
801
|
} else chunk = { data: res.value };
|
|
862
|
-
observer.next({ result: (
|
|
802
|
+
observer.next({ result: _objectSpread2(_objectSpread2({}, chunk), {}, { data: transformChunk(chunk.data) }) });
|
|
863
803
|
}
|
|
864
804
|
} catch (_) {
|
|
865
805
|
_usingCtx4.e = _;
|
|
@@ -886,7 +826,7 @@ function unstable_localLink(opts) {
|
|
|
886
826
|
* @deprecated Renamed to `unstable_localLink`. This alias will be removed in a future major release.
|
|
887
827
|
*/
|
|
888
828
|
const experimental_localLink = unstable_localLink;
|
|
889
|
-
|
|
890
829
|
//#endregion
|
|
891
|
-
export { TRPCClientError, TRPCUntypedClient, clientCallTypeToProcedureType, createTRPCClient,
|
|
830
|
+
export { TRPCClientError, TRPCUntypedClient, clientCallTypeToProcedureType, createTRPCClient, createTRPCClient as createTRPCProxyClient, createTRPCClientProxy, createTRPCUntypedClient, createWSClient, experimental_localLink, getFetch, getUntypedClient, httpBatchLink, httpBatchStreamLink, httpLink, httpSubscriptionLink, isFormData, isNonJsonSerializable, isOctetType, isTRPCClientError, jsonEncoder, loggerLink, retryLink, splitLink, unstable_httpBatchStreamLink, unstable_httpSubscriptionLink, unstable_localLink, wsLink };
|
|
831
|
+
|
|
892
832
|
//# sourceMappingURL=index.mjs.map
|