@trpc/client 11.0.0-next-alpha.154 → 11.0.0-next-alpha.155
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.d.ts +2 -2
- package/dist/TRPCClientError.d.ts.map +1 -1
- package/dist/bundle-analysis.json +40 -40
- package/dist/createTRPCClient.d.ts +5 -5
- package/dist/createTRPCClient.d.ts.map +1 -1
- package/dist/createTRPCUntypedClient.d.ts +3 -2
- package/dist/createTRPCUntypedClient.d.ts.map +1 -1
- package/dist/getFetch.d.ts +1 -1
- package/dist/getFetch.d.ts.map +1 -1
- package/dist/internals/TRPCUntypedClient.d.ts +3 -3
- package/dist/internals/TRPCUntypedClient.d.ts.map +1 -1
- package/dist/internals/dataLoader.d.ts +1 -1
- package/dist/internals/dataLoader.d.ts.map +1 -1
- package/dist/internals/getAbortController.d.ts +2 -2
- package/dist/internals/getAbortController.d.ts.map +1 -1
- package/dist/links/HTTPBatchLinkOptions.d.ts +3 -3
- package/dist/links/HTTPBatchLinkOptions.d.ts.map +1 -1
- package/dist/links/httpBatchLink.d.ts +1 -1
- package/dist/links/httpBatchLink.d.ts.map +1 -1
- package/dist/links/httpBatchStreamLink.d.ts +2 -2
- package/dist/links/httpBatchStreamLink.d.ts.map +1 -1
- package/dist/links/httpFormDataLink.d.ts.map +1 -1
- package/dist/links/httpLink.d.ts +3 -3
- package/dist/links/httpLink.d.ts.map +1 -1
- package/dist/links/internals/createChain.d.ts +2 -2
- package/dist/links/internals/createChain.d.ts.map +1 -1
- package/dist/links/internals/createHTTPBatchLink.d.ts +4 -4
- package/dist/links/internals/createHTTPBatchLink.d.ts.map +1 -1
- package/dist/links/internals/dedupeLink.d.ts +2 -2
- package/dist/links/internals/dedupeLink.d.ts.map +1 -1
- package/dist/links/internals/getTextDecoder.d.ts +1 -1
- package/dist/links/internals/getTextDecoder.d.ts.map +1 -1
- package/dist/links/internals/httpUtils.d.ts +5 -5
- package/dist/links/internals/httpUtils.d.ts.map +1 -1
- package/dist/links/internals/parseJSONStream.d.ts +4 -4
- package/dist/links/internals/parseJSONStream.d.ts.map +1 -1
- package/dist/links/internals/retryLink.d.ts +2 -2
- package/dist/links/internals/retryLink.d.ts.map +1 -1
- package/dist/links/loggerLink.d.ts +3 -3
- package/dist/links/loggerLink.d.ts.map +1 -1
- package/dist/links/splitLink.d.ts +2 -2
- package/dist/links/splitLink.d.ts.map +1 -1
- package/dist/links/types.d.ts +5 -5
- package/dist/links/types.d.ts.map +1 -1
- package/dist/links/wsLink.d.ts +4 -4
- package/dist/links/wsLink.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/TRPCClientError.ts +3 -4
- package/src/createTRPCClient.ts +8 -11
- package/src/createTRPCUntypedClient.ts +3 -5
- package/src/getFetch.ts +1 -1
- package/src/internals/TRPCUntypedClient.ts +4 -5
- package/src/internals/dataLoader.ts +1 -1
- package/src/internals/getAbortController.ts +2 -2
- package/src/links/HTTPBatchLinkOptions.ts +3 -3
- package/src/links/httpBatchLink.ts +5 -7
- package/src/links/httpBatchStreamLink.ts +6 -8
- package/src/links/httpFormDataLink.ts +2 -1
- package/src/links/httpLink.ts +6 -4
- package/src/links/internals/createChain.ts +6 -2
- package/src/links/internals/createHTTPBatchLink.ts +10 -9
- package/src/links/internals/dedupeLink.ts +4 -3
- package/src/links/internals/getTextDecoder.ts +1 -1
- package/src/links/internals/httpUtils.ts +9 -5
- package/src/links/internals/parseJSONStream.ts +6 -11
- package/src/links/internals/retryLink.ts +4 -3
- package/src/links/loggerLink.ts +3 -3
- package/src/links/splitLink.ts +2 -2
- package/src/links/types.ts +5 -5
- package/src/links/wsLink.ts +5 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DefaultErrorShape, inferErrorShape, Maybe, TRPCInferrable } from '@trpc/core';
|
|
2
|
-
import { TRPCErrorResponse } from '@trpc/core/rpc';
|
|
1
|
+
import type { DefaultErrorShape, inferErrorShape, Maybe, TRPCInferrable } from '@trpc/core';
|
|
2
|
+
import type { TRPCErrorResponse } from '@trpc/core/rpc';
|
|
3
3
|
export interface TRPCClientErrorBase<TShape extends DefaultErrorShape> {
|
|
4
4
|
readonly message: string;
|
|
5
5
|
readonly shape: Maybe<TShape>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TRPCClientError.d.ts","sourceRoot":"","sources":["../src/TRPCClientError.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"TRPCClientError.d.ts","sourceRoot":"","sources":["../src/TRPCClientError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EACf,KAAK,EACL,cAAc,EACf,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,WAAW,mBAAmB,CAAC,MAAM,SAAS,iBAAiB;IACnE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;CACtC;AACD,MAAM,MAAM,mBAAmB,CAAC,WAAW,SAAS,cAAc,IAChE,mBAAmB,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC;AAsBpD,qBAAa,eAAe,CAAC,kBAAkB,SAAS,cAAc,CACpE,SAAQ,KACR,YAAW,mBAAmB,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC;IAInE,SAAyB,KAAK,oBAAC;IAC/B,SAAgB,KAAK,EAAE,KAAK,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAClE,SAAgB,IAAI,EAAE,KAAK,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IAEzE;;;OAGG;IACI,IAAI,sCAAC;gBAGV,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE;QACL,MAAM,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC;QACvE,KAAK,CAAC,EAAE,KAAK,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChC;WAkBW,IAAI,CAAC,kBAAkB,SAAS,cAAc,EAC1D,MAAM,EAAE,KAAK,GAAG,iBAAiB,CAAC,GAAG,CAAC,EACtC,IAAI,GAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAO,GAC5C,eAAe,CAAC,kBAAkB,CAAC;CA+BvC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"bundleSize": 47808,
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 27.
|
|
3
|
+
"bundleOrigSize": 66326,
|
|
4
|
+
"bundleReduction": 27.92,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/links/wsLink.ts",
|
|
8
8
|
"size": 11967,
|
|
9
|
-
"origSize":
|
|
9
|
+
"origSize": 13356,
|
|
10
10
|
"renderedExports": [
|
|
11
11
|
"createWSClient",
|
|
12
12
|
"wsLink"
|
|
@@ -14,24 +14,24 @@
|
|
|
14
14
|
"removedExports": [],
|
|
15
15
|
"dependents": [],
|
|
16
16
|
"percent": 25.03,
|
|
17
|
-
"reduction": 10
|
|
17
|
+
"reduction": 10.4
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"id": "/src/links/loggerLink.ts",
|
|
21
21
|
"size": 5235,
|
|
22
|
-
"origSize":
|
|
22
|
+
"origSize": 6459,
|
|
23
23
|
"renderedExports": [
|
|
24
24
|
"loggerLink"
|
|
25
25
|
],
|
|
26
26
|
"removedExports": [],
|
|
27
27
|
"dependents": [],
|
|
28
28
|
"percent": 10.95,
|
|
29
|
-
"reduction": 18.
|
|
29
|
+
"reduction": 18.95
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
"id": "/src/internals/dataLoader.ts",
|
|
33
33
|
"size": 4409,
|
|
34
|
-
"origSize":
|
|
34
|
+
"origSize": 4766,
|
|
35
35
|
"renderedExports": [
|
|
36
36
|
"dataLoader"
|
|
37
37
|
],
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"/src/links/internals/createHTTPBatchLink.ts"
|
|
41
41
|
],
|
|
42
42
|
"percent": 9.22,
|
|
43
|
-
"reduction": 7.
|
|
43
|
+
"reduction": 7.49
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"id": "/src/links/internals/parseJSONStream.ts",
|
|
47
47
|
"size": 4007,
|
|
48
|
-
"origSize":
|
|
48
|
+
"origSize": 4967,
|
|
49
49
|
"renderedExports": [
|
|
50
50
|
"parseJSONStream",
|
|
51
51
|
"streamingJsonHttpRequester"
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
"/src/links/httpBatchStreamLink.ts"
|
|
56
56
|
],
|
|
57
57
|
"percent": 8.38,
|
|
58
|
-
"reduction":
|
|
58
|
+
"reduction": 19.33
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"id": "/src/internals/TRPCUntypedClient.ts",
|
|
62
62
|
"size": 3250,
|
|
63
|
-
"origSize":
|
|
63
|
+
"origSize": 6176,
|
|
64
64
|
"renderedExports": [
|
|
65
65
|
"TRPCUntypedClient"
|
|
66
66
|
],
|
|
@@ -70,12 +70,12 @@
|
|
|
70
70
|
"/src/createTRPCClient.ts"
|
|
71
71
|
],
|
|
72
72
|
"percent": 6.8,
|
|
73
|
-
"reduction":
|
|
73
|
+
"reduction": 47.38
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
"id": "/src/links/internals/httpUtils.ts",
|
|
77
77
|
"size": 3243,
|
|
78
|
-
"origSize":
|
|
78
|
+
"origSize": 5299,
|
|
79
79
|
"renderedExports": [
|
|
80
80
|
"resolveHTTPLinkOptions",
|
|
81
81
|
"getUrl",
|
|
@@ -93,12 +93,12 @@
|
|
|
93
93
|
"/src/links/httpBatchLink.ts"
|
|
94
94
|
],
|
|
95
95
|
"percent": 6.78,
|
|
96
|
-
"reduction": 38.
|
|
96
|
+
"reduction": 38.8
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
"id": "/src/links/internals/createHTTPBatchLink.ts",
|
|
100
100
|
"size": 2912,
|
|
101
|
-
"origSize":
|
|
101
|
+
"origSize": 3534,
|
|
102
102
|
"renderedExports": [
|
|
103
103
|
"createHTTPBatchLink"
|
|
104
104
|
],
|
|
@@ -108,12 +108,12 @@
|
|
|
108
108
|
"/src/links/httpBatchLink.ts"
|
|
109
109
|
],
|
|
110
110
|
"percent": 6.09,
|
|
111
|
-
"reduction":
|
|
111
|
+
"reduction": 17.6
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
"id": "/src/links/httpLink.ts",
|
|
115
115
|
"size": 2172,
|
|
116
|
-
"origSize":
|
|
116
|
+
"origSize": 2554,
|
|
117
117
|
"renderedExports": [
|
|
118
118
|
"httpLinkFactory",
|
|
119
119
|
"httpLink"
|
|
@@ -123,12 +123,12 @@
|
|
|
123
123
|
"/src/links/httpFormDataLink.ts"
|
|
124
124
|
],
|
|
125
125
|
"percent": 4.54,
|
|
126
|
-
"reduction":
|
|
126
|
+
"reduction": 14.96
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
"id": "/src/TRPCClientError.ts",
|
|
130
130
|
"size": 1809,
|
|
131
|
-
"origSize":
|
|
131
|
+
"origSize": 3261,
|
|
132
132
|
"renderedExports": [
|
|
133
133
|
"TRPCClientError"
|
|
134
134
|
],
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"/src/links/internals/createHTTPBatchLink.ts"
|
|
143
143
|
],
|
|
144
144
|
"percent": 3.78,
|
|
145
|
-
"reduction":
|
|
145
|
+
"reduction": 44.53
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
148
|
"id": "/src/shared/transformResult.ts",
|
|
@@ -164,31 +164,31 @@
|
|
|
164
164
|
{
|
|
165
165
|
"id": "/src/links/httpBatchStreamLink.ts",
|
|
166
166
|
"size": 1309,
|
|
167
|
-
"origSize":
|
|
167
|
+
"origSize": 2041,
|
|
168
168
|
"renderedExports": [
|
|
169
169
|
"unstable_httpBatchStreamLink"
|
|
170
170
|
],
|
|
171
171
|
"removedExports": [],
|
|
172
172
|
"dependents": [],
|
|
173
173
|
"percent": 2.74,
|
|
174
|
-
"reduction":
|
|
174
|
+
"reduction": 35.86
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
177
|
"id": "/src/links/httpBatchLink.ts",
|
|
178
178
|
"size": 1185,
|
|
179
|
-
"origSize":
|
|
179
|
+
"origSize": 1430,
|
|
180
180
|
"renderedExports": [
|
|
181
181
|
"httpBatchLink"
|
|
182
182
|
],
|
|
183
183
|
"removedExports": [],
|
|
184
184
|
"dependents": [],
|
|
185
185
|
"percent": 2.48,
|
|
186
|
-
"reduction": 13
|
|
186
|
+
"reduction": 17.13
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
189
|
"id": "/src/createTRPCClient.ts",
|
|
190
190
|
"size": 1150,
|
|
191
|
-
"origSize":
|
|
191
|
+
"origSize": 4356,
|
|
192
192
|
"renderedExports": [
|
|
193
193
|
"clientCallTypeToProcedureType",
|
|
194
194
|
"createTRPCClientProxy",
|
|
@@ -200,24 +200,24 @@
|
|
|
200
200
|
"/src/index.ts"
|
|
201
201
|
],
|
|
202
202
|
"percent": 2.41,
|
|
203
|
-
"reduction": 73.
|
|
203
|
+
"reduction": 73.6
|
|
204
204
|
},
|
|
205
205
|
{
|
|
206
206
|
"id": "/src/links/httpFormDataLink.ts",
|
|
207
207
|
"size": 709,
|
|
208
|
-
"origSize":
|
|
208
|
+
"origSize": 772,
|
|
209
209
|
"renderedExports": [
|
|
210
210
|
"experimental_formDataLink"
|
|
211
211
|
],
|
|
212
212
|
"removedExports": [],
|
|
213
213
|
"dependents": [],
|
|
214
214
|
"percent": 1.48,
|
|
215
|
-
"reduction":
|
|
215
|
+
"reduction": 8.16
|
|
216
216
|
},
|
|
217
217
|
{
|
|
218
218
|
"id": "/src/links/internals/createChain.ts",
|
|
219
219
|
"size": 690,
|
|
220
|
-
"origSize":
|
|
220
|
+
"origSize": 994,
|
|
221
221
|
"renderedExports": [
|
|
222
222
|
"createChain"
|
|
223
223
|
],
|
|
@@ -227,24 +227,24 @@
|
|
|
227
227
|
"/src/links/splitLink.ts"
|
|
228
228
|
],
|
|
229
229
|
"percent": 1.44,
|
|
230
|
-
"reduction":
|
|
230
|
+
"reduction": 30.58
|
|
231
231
|
},
|
|
232
232
|
{
|
|
233
233
|
"id": "/src/links/splitLink.ts",
|
|
234
234
|
"size": 598,
|
|
235
|
-
"origSize":
|
|
235
|
+
"origSize": 1076,
|
|
236
236
|
"renderedExports": [
|
|
237
237
|
"splitLink"
|
|
238
238
|
],
|
|
239
239
|
"removedExports": [],
|
|
240
240
|
"dependents": [],
|
|
241
241
|
"percent": 1.25,
|
|
242
|
-
"reduction":
|
|
242
|
+
"reduction": 44.42
|
|
243
243
|
},
|
|
244
244
|
{
|
|
245
245
|
"id": "/src/links/internals/getTextDecoder.ts",
|
|
246
246
|
"size": 553,
|
|
247
|
-
"origSize":
|
|
247
|
+
"origSize": 634,
|
|
248
248
|
"renderedExports": [
|
|
249
249
|
"getTextDecoder"
|
|
250
250
|
],
|
|
@@ -253,12 +253,12 @@
|
|
|
253
253
|
"/src/links/httpBatchStreamLink.ts"
|
|
254
254
|
],
|
|
255
255
|
"percent": 1.16,
|
|
256
|
-
"reduction": 12.
|
|
256
|
+
"reduction": 12.78
|
|
257
257
|
},
|
|
258
258
|
{
|
|
259
259
|
"id": "/src/internals/getAbortController.ts",
|
|
260
260
|
"size": 542,
|
|
261
|
-
"origSize":
|
|
261
|
+
"origSize": 680,
|
|
262
262
|
"renderedExports": [
|
|
263
263
|
"getAbortController"
|
|
264
264
|
],
|
|
@@ -267,12 +267,12 @@
|
|
|
267
267
|
"/src/links/internals/httpUtils.ts"
|
|
268
268
|
],
|
|
269
269
|
"percent": 1.13,
|
|
270
|
-
"reduction":
|
|
270
|
+
"reduction": 20.29
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
273
|
"id": "/src/getFetch.ts",
|
|
274
274
|
"size": 428,
|
|
275
|
-
"origSize":
|
|
275
|
+
"origSize": 644,
|
|
276
276
|
"renderedExports": [
|
|
277
277
|
"getFetch"
|
|
278
278
|
],
|
|
@@ -282,12 +282,12 @@
|
|
|
282
282
|
"/src/links/internals/httpUtils.ts"
|
|
283
283
|
],
|
|
284
284
|
"percent": 0.9,
|
|
285
|
-
"reduction": 33.
|
|
285
|
+
"reduction": 33.54
|
|
286
286
|
},
|
|
287
287
|
{
|
|
288
288
|
"id": "/src/createTRPCUntypedClient.ts",
|
|
289
289
|
"size": 82,
|
|
290
|
-
"origSize":
|
|
290
|
+
"origSize": 544,
|
|
291
291
|
"renderedExports": [
|
|
292
292
|
"createTRPCUntypedClient"
|
|
293
293
|
],
|
|
@@ -296,7 +296,7 @@
|
|
|
296
296
|
"/src/index.ts"
|
|
297
297
|
],
|
|
298
298
|
"percent": 0.17,
|
|
299
|
-
"reduction":
|
|
299
|
+
"reduction": 84.93
|
|
300
300
|
},
|
|
301
301
|
{
|
|
302
302
|
"id": "/src/index.ts",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootConfig, AnyRouter, AnySubscriptionProcedure, ProcedureArgs, ProcedureRouterRecord, ProcedureType } from '@trpc/core';
|
|
2
|
-
import { inferTransformedProcedureOutput, inferTransformedSubscriptionOutput, IntersectionError } from '@trpc/core';
|
|
1
|
+
import type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnyRootConfig, AnyRouter, AnySubscriptionProcedure, inferTransformedProcedureOutput, inferTransformedSubscriptionOutput, IntersectionError, ProcedureArgs, ProcedureRouterRecord, ProcedureType } from '@trpc/core';
|
|
3
2
|
import type { Unsubscribable } from '@trpc/core/observable';
|
|
4
|
-
import { CreateTRPCClientOptions } from './createTRPCUntypedClient';
|
|
5
|
-
import { TRPCSubscriptionObserver,
|
|
6
|
-
import {
|
|
3
|
+
import type { CreateTRPCClientOptions } from './createTRPCUntypedClient';
|
|
4
|
+
import type { TRPCSubscriptionObserver, UntypedClientProperties } from './internals/TRPCUntypedClient';
|
|
5
|
+
import { TRPCUntypedClient } from './internals/TRPCUntypedClient';
|
|
6
|
+
import type { TRPCClientError } from './TRPCClientError';
|
|
7
7
|
/**
|
|
8
8
|
* @public
|
|
9
9
|
**/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTRPCClient.d.ts","sourceRoot":"","sources":["../src/createTRPCClient.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,wBAAwB,EACxB
|
|
1
|
+
{"version":3,"file":"createTRPCClient.d.ts","sourceRoot":"","sources":["../src/createTRPCClient.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,wBAAwB,EACxB,+BAA+B,EAC/B,kCAAkC,EAClC,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,aAAa,EACd,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EACV,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,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
+
import type { AnyRouter } from '@trpc/core';
|
|
2
|
+
import type { CreateTRPCClientOptions } from './internals/TRPCUntypedClient';
|
|
3
|
+
import { TRPCUntypedClient } from './internals/TRPCUntypedClient';
|
|
3
4
|
export declare function createTRPCUntypedClient<TRouter extends AnyRouter>(opts: CreateTRPCClientOptions<TRouter>): TRPCUntypedClient<TRouter>;
|
|
4
5
|
export type { CreateTRPCClientOptions, TRPCRequestOptions, } from './internals/TRPCUntypedClient';
|
|
5
6
|
export { TRPCUntypedClient } from './internals/TRPCUntypedClient';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTRPCUntypedClient.d.ts","sourceRoot":"","sources":["../src/createTRPCUntypedClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"createTRPCUntypedClient.d.ts","sourceRoot":"","sources":["../src/createTRPCUntypedClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,wBAAgB,uBAAuB,CAAC,OAAO,SAAS,SAAS,EAC/D,IAAI,EAAE,uBAAuB,CAAC,OAAO,CAAC,GACrC,iBAAiB,CAAC,OAAO,CAAC,CAE5B;AAED,YAAY,EACV,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC"}
|
package/dist/getFetch.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FetchEsque, NativeFetchEsque } from './internals/types';
|
|
1
|
+
import type { FetchEsque, NativeFetchEsque } from './internals/types';
|
|
2
2
|
export declare function getFetch(customFetchImpl?: FetchEsque | NativeFetchEsque): FetchEsque;
|
|
3
3
|
//# sourceMappingURL=getFetch.d.ts.map
|
package/dist/getFetch.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFetch.d.ts","sourceRoot":"","sources":["../src/getFetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"getFetch.d.ts","sourceRoot":"","sources":["../src/getFetch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAMtE,wBAAgB,QAAQ,CACtB,eAAe,CAAC,EAAE,UAAU,GAAG,gBAAgB,GAC9C,UAAU,CAcZ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AnyRouter, CombinedDataTransformer, DataTransformerOptions, DefaultDataTransformer } from '@trpc/core';
|
|
2
|
-
import { Unsubscribable } from '@trpc/core/observable';
|
|
3
|
-
import { OperationContext, TRPCClientRuntime, TRPCLink } from '../links/types';
|
|
1
|
+
import type { AnyRouter, CombinedDataTransformer, DataTransformerOptions, DefaultDataTransformer } from '@trpc/core';
|
|
2
|
+
import type { Unsubscribable } from '@trpc/core/observable';
|
|
3
|
+
import type { OperationContext, TRPCClientRuntime, TRPCLink } from '../links/types';
|
|
4
4
|
import { TRPCClientError } from '../TRPCClientError';
|
|
5
5
|
type CreateTRPCClientBaseOptions<TRouter extends AnyRouter> = TRouter['_def']['_config']['transformer'] extends DefaultDataTransformer ? {
|
|
6
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TRPCUntypedClient.d.ts","sourceRoot":"","sources":["../../src/internals/TRPCUntypedClient.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"TRPCUntypedClient.d.ts","sourceRoot":"","sources":["../../src/internals/TRPCUntypedClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV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B;AAChB,MAAM,MAAM,uBAAuB,CAAC,OAAO,SAAS,SAAS,IACzD,2BAA2B,CAAC,OAAO,CAAC,GAAG;IACrC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;CAC5B,CAAC;AAEN,gBAAgB;AAChB,MAAM,MAAM,uBAAuB,GAC/B,UAAU,GACV,OAAO,GACP,UAAU,GACV,OAAO,GACP,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,cAAc,CAAC;AAEnB,qBAAa,iBAAiB,CAAC,OAAO,SAAS,SAAS;IACtD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA6B;IACnD,SAAgB,OAAO,EAAE,iBAAiB,CAAC;IAC3C,OAAO,CAAC,SAAS,CAAS;gBAEd,IAAI,EAAE,uBAAuB,CAAC,OAAO,CAAC;IAyClD,OAAO,CAAC,QAAQ;IAuBhB,OAAO,CAAC,gBAAgB;IAyBjB,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,kBAAkB;IAS9D,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,kBAAkB;IASjE,YAAY,CACjB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,OAAO,CACX,wBAAwB,CAAC,OAAO,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC,CAC9D,GACC,kBAAkB,GACnB,cAAc;CAyBlB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CancelFn, PromiseAndCancel } from '../links/types';
|
|
1
|
+
import type { CancelFn, PromiseAndCancel } from '../links/types';
|
|
2
2
|
type BatchLoader<TKey, TValue> = {
|
|
3
3
|
validate: (keys: TKey[]) => boolean;
|
|
4
4
|
fetch: (keys: TKey[], unitResolver: (index: number, value: NonNullable<TValue>) => void) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataLoader.d.ts","sourceRoot":"","sources":["../../src/internals/dataLoader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"dataLoader.d.ts","sourceRoot":"","sources":["../../src/internals/dataLoader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAajE,KAAK,WAAW,CAAC,IAAI,EAAE,MAAM,IAAI;IAC/B,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,OAAO,CAAC;IACpC,KAAK,EAAE,CACL,IAAI,EAAE,IAAI,EAAE,EACZ,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,IAAI,KAC9D;QACH,OAAO,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;QAC3B,MAAM,EAAE,QAAQ,CAAC;KAClB,CAAC;CACH,CAAC;AAWF;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EACrC,WAAW,EAAE,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC;gBAqGnB,IAAI,KAAG,iBAAiB,MAAM,CAAC;EAsCnD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Maybe } from '@trpc/core';
|
|
2
|
-
import { AbortControllerEsque } from './types';
|
|
1
|
+
import type { Maybe } from '@trpc/core';
|
|
2
|
+
import type { AbortControllerEsque } from './types';
|
|
3
3
|
export declare function getAbortController(customAbortControllerImpl: Maybe<AbortControllerEsque>): AbortControllerEsque | null;
|
|
4
4
|
//# sourceMappingURL=getAbortController.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAbortController.d.ts","sourceRoot":"","sources":["../../src/internals/getAbortController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"getAbortController.d.ts","sourceRoot":"","sources":["../../src/internals/getAbortController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,wBAAgB,kBAAkB,CAChC,yBAAyB,EAAE,KAAK,CAAC,oBAAoB,CAAC,GACrD,oBAAoB,GAAG,IAAI,CAe7B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NonEmptyArray } from '../internals/types';
|
|
2
|
-
import { HTTPLinkBaseOptions } from './internals/httpUtils';
|
|
3
|
-
import { HTTPHeaders, Operation } from './types';
|
|
1
|
+
import type { NonEmptyArray } from '../internals/types';
|
|
2
|
+
import type { HTTPLinkBaseOptions } from './internals/httpUtils';
|
|
3
|
+
import type { HTTPHeaders, Operation } from './types';
|
|
4
4
|
export interface HTTPBatchLinkOptions extends HTTPLinkBaseOptions {
|
|
5
5
|
maxURLLength?: number;
|
|
6
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTTPBatchLinkOptions.d.ts","sourceRoot":"","sources":["../../src/links/HTTPBatchLinkOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"HTTPBatchLinkOptions.d.ts","sourceRoot":"","sources":["../../src/links/HTTPBatchLinkOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEtD,MAAM,WAAW,oBAAqB,SAAQ,mBAAmB;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EACJ,WAAW,GACX,CAAC,CAAC,IAAI,EAAE;QACN,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;KAClC,KAAK,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;CAC/C"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { HTTPBatchLinkOptions } from './HTTPBatchLinkOptions';
|
|
1
|
+
import type { HTTPBatchLinkOptions } from './HTTPBatchLinkOptions';
|
|
2
2
|
export declare const httpBatchLink: <TRouter extends import("@trpc/core").AnyRouter>(opts: HTTPBatchLinkOptions) => import("./types").TRPCLink<TRouter>;
|
|
3
3
|
//# sourceMappingURL=httpBatchLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpBatchLink.d.ts","sourceRoot":"","sources":["../../src/links/httpBatchLink.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"httpBatchLink.d.ts","sourceRoot":"","sources":["../../src/links/httpBatchLink.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AA8CnE,eAAO,MAAM,aAAa,qHAAsC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HTTPBatchLinkOptions } from './HTTPBatchLinkOptions';
|
|
2
|
-
import { TextDecoderEsque } from './internals/streamingUtils';
|
|
1
|
+
import type { HTTPBatchLinkOptions } from './HTTPBatchLinkOptions';
|
|
2
|
+
import type { TextDecoderEsque } from './internals/streamingUtils';
|
|
3
3
|
export interface HTTPBatchStreamLinkOptions extends HTTPBatchLinkOptions {
|
|
4
4
|
/**
|
|
5
5
|
* Will default to the webAPI `TextDecoder`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpBatchStreamLink.d.ts","sourceRoot":"","sources":["../../src/links/httpBatchStreamLink.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"httpBatchStreamLink.d.ts","sourceRoot":"","sources":["../../src/links/httpBatchStreamLink.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAKnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAGnE,MAAM,WAAW,0BAA2B,SAAQ,oBAAoB;IACtE;;;;OAIG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC;CAChC;AA6CD,eAAO,MAAM,4BAA4B,2HACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpFormDataLink.d.ts","sourceRoot":"","sources":["../../src/links/httpFormDataLink.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"httpFormDataLink.d.ts","sourceRoot":"","sources":["../../src/links/httpFormDataLink.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,yBAAyB,qIAEpC,CAAC"}
|
package/dist/links/httpLink.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AnyRouter } from '@trpc/core';
|
|
2
|
-
import { HTTPLinkBaseOptions, Requester } from './internals/httpUtils';
|
|
3
|
-
import { HTTPHeaders, Operation, TRPCLink } from './types';
|
|
1
|
+
import type { AnyRouter } from '@trpc/core';
|
|
2
|
+
import type { HTTPLinkBaseOptions, Requester } from './internals/httpUtils';
|
|
3
|
+
import type { HTTPHeaders, Operation, TRPCLink } from './types';
|
|
4
4
|
export interface HTTPLinkOptions extends HTTPLinkBaseOptions {
|
|
5
5
|
/**
|
|
6
6
|
* Headers to be set on outgoing requests or a callback that of said headers
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpLink.d.ts","sourceRoot":"","sources":["../../src/links/httpLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"httpLink.d.ts","sourceRoot":"","sources":["../../src/links/httpLink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAI5C,OAAO,KAAK,EACV,mBAAmB,EAEnB,SAAS,EACV,MAAM,uBAAuB,CAAC;AAK/B,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEhE,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC1D;;;OAGG;IACH,OAAO,CAAC,EACJ,WAAW,GACX,CAAC,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,SAAS,CAAA;KAAE,KAAK,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;CACvE;AAED,wBAAgB,eAAe,CAAC,WAAW,EAAE;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE,qCAE3D,eAAe,uBAuDxB;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,oCA5DX,eAAe,sBA4DgD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnyRouter } from '@trpc/core';
|
|
2
|
-
import { Operation, OperationLink, OperationResultObservable } from '../types';
|
|
1
|
+
import type { AnyRouter } from '@trpc/core';
|
|
2
|
+
import type { Operation, OperationLink, OperationResultObservable } from '../types';
|
|
3
3
|
/** @internal */
|
|
4
4
|
export declare function createChain<TRouter extends AnyRouter, TInput = unknown, TOutput = unknown>(opts: {
|
|
5
5
|
links: OperationLink<TRouter, TInput, TOutput>[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createChain.d.ts","sourceRoot":"","sources":["../../../src/links/internals/createChain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"createChain.d.ts","sourceRoot":"","sources":["../../../src/links/internals/createChain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,yBAAyB,EAC1B,MAAM,UAAU,CAAC;AAElB,gBAAgB;AAChB,wBAAgB,WAAW,CACzB,OAAO,SAAS,SAAS,EACzB,MAAM,GAAG,OAAO,EAChB,OAAO,GAAG,OAAO,EACjB,IAAI,EAAE;IACN,KAAK,EAAE,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;IACjD,EAAE,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;CACvB,GAAG,yBAAyB,CAAC,OAAO,EAAE,OAAO,CAAC,CAuB9C"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AnyRouter, ProcedureType } from '@trpc/core';
|
|
2
|
-
import { HTTPBatchLinkOptions } from '../HTTPBatchLinkOptions';
|
|
3
|
-
import { CancelFn, Operation, TRPCClientRuntime, TRPCLink } from '../types';
|
|
4
|
-
import { HTTPResult, ResolvedHTTPLinkOptions } from './httpUtils';
|
|
1
|
+
import type { AnyRouter, ProcedureType } from '@trpc/core';
|
|
2
|
+
import type { HTTPBatchLinkOptions } from '../HTTPBatchLinkOptions';
|
|
3
|
+
import type { CancelFn, Operation, TRPCClientRuntime, TRPCLink } from '../types';
|
|
4
|
+
import type { HTTPResult, ResolvedHTTPLinkOptions } from './httpUtils';
|
|
5
5
|
/**
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createHTTPBatchLink.d.ts","sourceRoot":"","sources":["../../../src/links/internals/createHTTPBatchLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"createHTTPBatchLink.d.ts","sourceRoot":"","sources":["../../../src/links/internals/createHTTPBatchLink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAK3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EACV,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACT,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAGvE;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,QAAQ,SAAS,oBAAoB,IAAI,CAC/D,aAAa,EAAE,uBAAuB,GAAG;IACvC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,QAAQ,CAAC;CAChB,KACE,CACH,QAAQ,EAAE,SAAS,EAAE,EACrB,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,UAAU,CAAC,KAAK,IAAI,KAClE;IACH,OAAO,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;IAC/B,MAAM,EAAE,QAAQ,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,SAAS,oBAAoB,EACvE,SAAS,EAAE,WAAW,CAAC,QAAQ,CAAC,qCAGxB,QAAQ,uBAsFjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dedupeLink.d.ts","sourceRoot":"","sources":["../../../src/links/internals/dedupeLink.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"dedupeLink.d.ts","sourceRoot":"","sources":["../../../src/links/internals/dedupeLink.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAG5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC;;GAEG;AACH,wBAAgB,UAAU,CACxB,OAAO,SAAS,SAAS,GAAG,SAAS,KAClC,QAAQ,CAAC,OAAO,CAAC,CA2CrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTextDecoder.d.ts","sourceRoot":"","sources":["../../../src/links/internals/getTextDecoder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"getTextDecoder.d.ts","sourceRoot":"","sources":["../../../src/links/internals/getTextDecoder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,wBAAgB,cAAc,CAC5B,iBAAiB,CAAC,EAAE,gBAAgB,GACnC,gBAAgB,CAelB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ProcedureType } from '@trpc/core';
|
|
2
|
-
import { TRPCResponse } from '@trpc/core/rpc';
|
|
3
|
-
import { AbortControllerEsque, AbortControllerInstanceEsque, FetchEsque, RequestInitEsque, ResponseEsque } from '../../internals/types';
|
|
4
|
-
import { TextDecoderEsque } from '../internals/streamingUtils';
|
|
5
|
-
import { HTTPHeaders, PromiseAndCancel, TRPCClientRuntime } from '../types';
|
|
1
|
+
import type { ProcedureType } from '@trpc/core';
|
|
2
|
+
import type { TRPCResponse } from '@trpc/core/rpc';
|
|
3
|
+
import type { AbortControllerEsque, AbortControllerInstanceEsque, FetchEsque, RequestInitEsque, ResponseEsque } from '../../internals/types';
|
|
4
|
+
import type { TextDecoderEsque } from '../internals/streamingUtils';
|
|
5
|
+
import type { HTTPHeaders, PromiseAndCancel, TRPCClientRuntime } from '../types';
|
|
6
6
|
/**
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpUtils.d.ts","sourceRoot":"","sources":["../../../src/links/internals/httpUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"httpUtils.d.ts","sourceRoot":"","sources":["../../../src/links/internals/httpUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGnD,OAAO,KAAK,EACV,oBAAoB,EACpB,4BAA4B,EAC5B,UAAU,EACV,gBAAgB,EAChB,aAAa,EACd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;OAEG;IACH,eAAe,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;CAC/C;AAED,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,eAAe,EAAE,oBAAoB,GAAG,IAAI,CAAC;CAC9C;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,mBAAmB,GACxB,uBAAuB,CAMzB;AAiBD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE;QACJ,QAAQ,EAAE,aAAa,CAAC;QACxB,YAAY,CAAC,EAAE,OAAO,CAAC;KACxB,CAAC;CACH;AAED,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,iBAAiB,CAAC;CAC5B,GAAG,CAAC;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,MAAM,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<reference types="node" />
|
|
2
|
-
import { WebReadableStreamEsque } from '../../internals/types';
|
|
3
|
-
import { HTTPHeaders } from '../types';
|
|
4
|
-
import { HTTPBaseRequestOptions, HTTPResult } from './httpUtils';
|
|
5
|
-
import { TextDecoderEsque } from './streamingUtils';
|
|
2
|
+
import type { WebReadableStreamEsque } from '../../internals/types';
|
|
3
|
+
import type { HTTPHeaders } from '../types';
|
|
4
|
+
import type { HTTPBaseRequestOptions, HTTPResult } from './httpUtils';
|
|
5
|
+
import type { TextDecoderEsque } from './streamingUtils';
|
|
6
6
|
/**
|
|
7
7
|
* @internal
|
|
8
8
|
* @description Take a stream of bytes and call `onLine` with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseJSONStream.d.ts","sourceRoot":"","sources":["../../../src/links/internals/parseJSONStream.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"parseJSONStream.d.ts","sourceRoot":"","sources":["../../../src/links/internals/parseJSONStream.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,IAAI,EAAE;IACnD;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC,cAAc,GAAG,sBAAsB,CAAC;IAC/D;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD;;OAEG;IACH,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAClC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,WAAW,EAAE,gBAAgB,CAAC;CAC/B,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBhB;AAwED,eAAO,MAAM,0BAA0B,SAC/B,sBAAsB,GAAG;IAC7B,OAAO,EAAE,MAAM,WAAW,GAAG,QAAQ,WAAW,CAAC,CAAC;IAClD,WAAW,EAAE,gBAAgB,CAAC;CAC/B,oBACiB,MAAM,OAAO,UAAU,KAAK,IAAI;;;CA8BnD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retryLink.d.ts","sourceRoot":"","sources":["../../../src/links/internals/retryLink.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"retryLink.d.ts","sourceRoot":"","sources":["../../../src/links/internals/retryLink.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAG5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,SAAS,SAAS,GAAG,SAAS,EAAE,IAAI,EAAE;IACrE,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,QAAQ,CAAC,OAAO,CAAC,CAwCpB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference lib="dom.iterable" />
|
|
2
|
-
import { AnyRouter } from '@trpc/core';
|
|
3
|
-
import { TRPCClientError } from '../TRPCClientError';
|
|
4
|
-
import { Operation, OperationResultEnvelope, TRPCLink } from './types';
|
|
2
|
+
import type { AnyRouter } from '@trpc/core';
|
|
3
|
+
import type { TRPCClientError } from '../TRPCClientError';
|
|
4
|
+
import type { Operation, OperationResultEnvelope, TRPCLink } from './types';
|
|
5
5
|
type ConsoleEsque = {
|
|
6
6
|
log: (...args: any[]) => void;
|
|
7
7
|
error: (...args: any[]) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loggerLink.d.ts","sourceRoot":"","sources":["../../src/links/loggerLink.ts"],"names":[],"mappings":";AAOA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"loggerLink.d.ts","sourceRoot":"","sources":["../../src/links/loggerLink.ts"],"names":[],"mappings":";AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,uBAAuB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE5E,KAAK,YAAY,GAAG;IAClB,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC9B,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;CACjC,CAAC;AAEF,KAAK,eAAe,CAAC,OAAO,SAAS,SAAS,IAC1C;IACE,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,uBAAuB,CAAC,OAAO,CAAC,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;CACrE,GACD,CAAC,SAAS,GAAG;IACX,SAAS,EAAE,IAAI,CAAC;CACjB,CAAC,CAAC;AACP,KAAK,SAAS,CAAC,OAAO,SAAS,SAAS,IAAI,CAC1C,IAAI,EAAE,eAAe,CAAC,OAAO,CAAC,KAC3B,OAAO,CAAC;AAEb,KAAK,mBAAmB,CAAC,OAAO,SAAS,SAAS,IAAI,SAAS,GAC7D,CACI;IACE;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,uBAAuB,CAAC,OAAO,CAAC,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;IACpE,SAAS,EAAE,MAAM,CAAC;CACnB,GACD;IACE;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;CACjB,CACJ,CAAC;AAEJ,KAAK,YAAY,CAAC,OAAO,SAAS,SAAS,IAAI,CAC7C,IAAI,EAAE,mBAAmB,CAAC,OAAO,CAAC,KAC/B,IAAI,CAAC;AAEV,MAAM,WAAW,iBAAiB,CAAC,OAAO,SAAS,SAAS;IAC1D,MAAM,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAC7B;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CAC5B;AAsID;;GAEG;AACH,wBAAgB,UAAU,CAAC,OAAO,SAAS,SAAS,GAAG,SAAS,EAC9D,IAAI,GAAE,iBAAiB,CAAC,OAAO,CAAM,GACpC,QAAQ,CAAC,OAAO,CAAC,CA6CnB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnyRouter } from '@trpc/core';
|
|
2
|
-
import { Operation, TRPCLink } from './types';
|
|
1
|
+
import type { AnyRouter } from '@trpc/core';
|
|
2
|
+
import type { Operation, TRPCLink } from './types';
|
|
3
3
|
export declare function splitLink<TRouter extends AnyRouter = AnyRouter>(opts: {
|
|
4
4
|
condition: (op: Operation) => boolean;
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"splitLink.d.ts","sourceRoot":"","sources":["../../src/links/splitLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"splitLink.d.ts","sourceRoot":"","sources":["../../src/links/splitLink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAG5C,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKnD,wBAAgB,SAAS,CAAC,OAAO,SAAS,SAAS,GAAG,SAAS,EAAE,IAAI,EAAE;IACrE,SAAS,EAAE,CAAC,EAAE,EAAE,SAAS,KAAK,OAAO,CAAC;IACtC;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;IAC9C;;OAEG;IACH,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;CAChD,GAAG,QAAQ,CAAC,OAAO,CAAC,CAWpB"}
|
package/dist/links/types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AnyRouter, CombinedDataTransformer, DataTransformer } from '@trpc/core';
|
|
2
|
-
import { Observable, Observer } from '@trpc/core/observable';
|
|
3
|
-
import { TRPCResultMessage, TRPCSuccessResponse } from '@trpc/core/rpc';
|
|
4
|
-
import { ResponseEsque } from '../internals/types';
|
|
5
|
-
import { TRPCClientError } from '../TRPCClientError';
|
|
1
|
+
import type { AnyRouter, CombinedDataTransformer, DataTransformer } from '@trpc/core';
|
|
2
|
+
import type { Observable, Observer } from '@trpc/core/observable';
|
|
3
|
+
import type { TRPCResultMessage, TRPCSuccessResponse } from '@trpc/core/rpc';
|
|
4
|
+
import type { ResponseEsque } from '../internals/types';
|
|
5
|
+
import type { TRPCClientError } from '../TRPCClientError';
|
|
6
6
|
/**
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/links/types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/links/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,uBAAuB,EACvB,eAAe,EAChB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,M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B,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB,CAAC,OAAO;IAC9C,MAAM,EACF,iBAAiB,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,GACpC,mBAAmB,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC3C,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,CACnC,OAAO,SAAS,SAAS,EACzB,OAAO,IACL,UAAU,CAAC,uBAAuB,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,uBAAuB,CACjC,OAAO,SAAS,SAAS,EACzB,OAAO,IACL,QAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;AAEzE;;GAEG;AACH,MAAM,MAAM,aAAa,CACvB,OAAO,SAAS,SAAS,EACzB,MAAM,GAAG,OAAO,EAChB,OAAO,GAAG,OAAO,IACf,CAAC,IAAI,EAAE;IACT,EAAE,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACtB,IAAI,EAAE,CAAC,EAAE,EAAE,SAAS,CAAC,MAAM,CAAC,KAAK,yBAAyB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;CAC9E,KAAK,yBAAyB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,QAAQ,CAAC,OAAO,SAAS,SAAS,IAAI,CAChD,IAAI,EAAE,iBAAiB,KACpB,aAAa,CAAC,OAAO,CAAC,CAAC"}
|
package/dist/links/wsLink.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AnyRouter, inferRouterError, MaybePromise } from '@trpc/core';
|
|
2
|
-
import { Observer, UnsubscribeFn } from '@trpc/core/observable';
|
|
3
|
-
import { TRPCResponseMessage } from '@trpc/core/rpc';
|
|
1
|
+
import type { AnyRouter, inferRouterError, MaybePromise } from '@trpc/core';
|
|
2
|
+
import type { Observer, UnsubscribeFn } from '@trpc/core/observable';
|
|
3
|
+
import type { TRPCResponseMessage } from '@trpc/core/rpc';
|
|
4
4
|
import { TRPCClientError } from '../TRPCClientError';
|
|
5
|
-
import { Operation, TRPCLink } from './types';
|
|
5
|
+
import type { Operation, TRPCLink } from './types';
|
|
6
6
|
type WSCallbackResult<TRouter extends AnyRouter, TOutput> = TRPCResponseMessage<TOutput, inferRouterError<TRouter>>;
|
|
7
7
|
type WSCallbackObserver<TRouter extends AnyRouter, TOutput> = Observer<WSCallbackResult<TRouter, TOutput>, TRPCClientError<TRouter>>;
|
|
8
8
|
declare const exponentialBackoff: (attemptIndex: number) => number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wsLink.d.ts","sourceRoot":"","sources":["../../src/links/wsLink.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"wsLink.d.ts","sourceRoot":"","sources":["../../src/links/wsLink.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,gBAAgB,EAChB,YAAY,EAEb,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,KAAK,EAKV,mBAAmB,EACpB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAInD,KAAK,gBAAgB,CAAC,OAAO,SAAS,SAAS,EAAE,OAAO,IAAI,mBAAmB,CAC7E,OAAO,EACP,gBAAgB,CAAC,OAAO,CAAC,CAC1B,CAAC;AAEF,KAAK,kBAAkB,CAAC,OAAO,SAAS,SAAS,EAAE,OAAO,IAAI,QAAQ,CACpE,gBAAgB,CAAC,OAAO,EAA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149c63",
|
|
4
4
|
"description": "The tRPC client library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"!**/*.test.*"
|
|
77
77
|
],
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@trpc/core": "11.0.0-next-alpha.
|
|
79
|
+
"@trpc/core": "11.0.0-next-alpha.155+b93149c63"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@testing-library/dom": "^9.0.0",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"funding": [
|
|
97
97
|
"https://trpc.io/sponsor"
|
|
98
98
|
],
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "b93149c63192bc113ef45f43188fbd993df39027"
|
|
100
100
|
}
|
package/src/TRPCClientError.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
DefaultErrorShape,
|
|
3
|
-
getCauseFromUnknown,
|
|
4
3
|
inferErrorShape,
|
|
5
|
-
isObject,
|
|
6
4
|
Maybe,
|
|
7
5
|
TRPCInferrable,
|
|
8
6
|
} from '@trpc/core';
|
|
9
|
-
import {
|
|
7
|
+
import { getCauseFromUnknown, isObject } from '@trpc/core';
|
|
8
|
+
import type { TRPCErrorResponse } from '@trpc/core/rpc';
|
|
10
9
|
|
|
11
10
|
export interface TRPCClientErrorBase<TShape extends DefaultErrorShape> {
|
|
12
11
|
readonly message: string;
|
package/src/createTRPCClient.ts
CHANGED
|
@@ -6,25 +6,22 @@ import type {
|
|
|
6
6
|
AnyRootConfig,
|
|
7
7
|
AnyRouter,
|
|
8
8
|
AnySubscriptionProcedure,
|
|
9
|
-
ProcedureArgs,
|
|
10
|
-
ProcedureRouterRecord,
|
|
11
|
-
ProcedureType,
|
|
12
|
-
} from '@trpc/core';
|
|
13
|
-
import {
|
|
14
|
-
createFlatProxy,
|
|
15
|
-
createRecursiveProxy,
|
|
16
9
|
inferTransformedProcedureOutput,
|
|
17
10
|
inferTransformedSubscriptionOutput,
|
|
18
11
|
IntersectionError,
|
|
12
|
+
ProcedureArgs,
|
|
13
|
+
ProcedureRouterRecord,
|
|
14
|
+
ProcedureType,
|
|
19
15
|
} from '@trpc/core';
|
|
16
|
+
import { createFlatProxy, createRecursiveProxy } from '@trpc/core';
|
|
20
17
|
import type { Unsubscribable } from '@trpc/core/observable';
|
|
21
|
-
import { CreateTRPCClientOptions } from './createTRPCUntypedClient';
|
|
22
|
-
import {
|
|
18
|
+
import type { CreateTRPCClientOptions } from './createTRPCUntypedClient';
|
|
19
|
+
import type {
|
|
23
20
|
TRPCSubscriptionObserver,
|
|
24
|
-
TRPCUntypedClient,
|
|
25
21
|
UntypedClientProperties,
|
|
26
22
|
} from './internals/TRPCUntypedClient';
|
|
27
|
-
import {
|
|
23
|
+
import { TRPCUntypedClient } from './internals/TRPCUntypedClient';
|
|
24
|
+
import type { TRPCClientError } from './TRPCClientError';
|
|
28
25
|
|
|
29
26
|
/**
|
|
30
27
|
* @public
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { AnyRouter } from '@trpc/core';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
TRPCUntypedClient,
|
|
5
|
-
} from './internals/TRPCUntypedClient';
|
|
1
|
+
import type { AnyRouter } from '@trpc/core';
|
|
2
|
+
import type { CreateTRPCClientOptions } from './internals/TRPCUntypedClient';
|
|
3
|
+
import { TRPCUntypedClient } from './internals/TRPCUntypedClient';
|
|
6
4
|
|
|
7
5
|
export function createTRPCUntypedClient<TRouter extends AnyRouter>(
|
|
8
6
|
opts: CreateTRPCClientOptions<TRouter>,
|
package/src/getFetch.ts
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
AnyRouter,
|
|
3
3
|
CombinedDataTransformer,
|
|
4
4
|
DataTransformerOptions,
|
|
5
5
|
DefaultDataTransformer,
|
|
6
6
|
} from '@trpc/core';
|
|
7
|
-
import {
|
|
7
|
+
import type {
|
|
8
8
|
inferObservableValue,
|
|
9
|
-
observableToPromise,
|
|
10
|
-
share,
|
|
11
9
|
Unsubscribable,
|
|
12
10
|
} from '@trpc/core/observable';
|
|
11
|
+
import { observableToPromise, share } from '@trpc/core/observable';
|
|
13
12
|
import { createChain } from '../links/internals/createChain';
|
|
14
|
-
import {
|
|
13
|
+
import type {
|
|
15
14
|
OperationContext,
|
|
16
15
|
OperationLink,
|
|
17
16
|
TRPCClientRuntime,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Maybe } from '@trpc/core';
|
|
2
|
-
import { AbortControllerEsque } from './types';
|
|
1
|
+
import type { Maybe } from '@trpc/core';
|
|
2
|
+
import type { AbortControllerEsque } from './types';
|
|
3
3
|
|
|
4
4
|
export function getAbortController(
|
|
5
5
|
customAbortControllerImpl: Maybe<AbortControllerEsque>,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { NonEmptyArray } from '../internals/types';
|
|
2
|
-
import { HTTPLinkBaseOptions } from './internals/httpUtils';
|
|
3
|
-
import { HTTPHeaders, Operation } from './types';
|
|
1
|
+
import type { NonEmptyArray } from '../internals/types';
|
|
2
|
+
import type { HTTPLinkBaseOptions } from './internals/httpUtils';
|
|
3
|
+
import type { HTTPHeaders, Operation } from './types';
|
|
4
4
|
|
|
5
5
|
export interface HTTPBatchLinkOptions extends HTTPLinkBaseOptions {
|
|
6
6
|
maxURLLength?: number;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { NonEmptyArray } from '../internals/types';
|
|
2
|
-
import { HTTPBatchLinkOptions } from './HTTPBatchLinkOptions';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
RequesterFn,
|
|
6
|
-
} from './internals/createHTTPBatchLink';
|
|
1
|
+
import type { NonEmptyArray } from '../internals/types';
|
|
2
|
+
import type { HTTPBatchLinkOptions } from './HTTPBatchLinkOptions';
|
|
3
|
+
import type { RequesterFn } from './internals/createHTTPBatchLink';
|
|
4
|
+
import { createHTTPBatchLink } from './internals/createHTTPBatchLink';
|
|
7
5
|
import { jsonHttpRequester } from './internals/httpUtils';
|
|
8
|
-
import { Operation } from './types';
|
|
6
|
+
import type { Operation } from './types';
|
|
9
7
|
|
|
10
8
|
const batchRequester: RequesterFn<HTTPBatchLinkOptions> = (requesterOpts) => {
|
|
11
9
|
return (batchOps) => {
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import { NonEmptyArray } from '../internals/types';
|
|
2
|
-
import { HTTPBatchLinkOptions } from './HTTPBatchLinkOptions';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
RequesterFn,
|
|
6
|
-
} from './internals/createHTTPBatchLink';
|
|
1
|
+
import type { NonEmptyArray } from '../internals/types';
|
|
2
|
+
import type { HTTPBatchLinkOptions } from './HTTPBatchLinkOptions';
|
|
3
|
+
import type { RequesterFn } from './internals/createHTTPBatchLink';
|
|
4
|
+
import { createHTTPBatchLink } from './internals/createHTTPBatchLink';
|
|
7
5
|
import { getTextDecoder } from './internals/getTextDecoder';
|
|
8
6
|
import { streamingJsonHttpRequester } from './internals/parseJSONStream';
|
|
9
|
-
import { TextDecoderEsque } from './internals/streamingUtils';
|
|
10
|
-
import { Operation } from './types';
|
|
7
|
+
import type { TextDecoderEsque } from './internals/streamingUtils';
|
|
8
|
+
import type { Operation } from './types';
|
|
11
9
|
|
|
12
10
|
export interface HTTPBatchStreamLinkOptions extends HTTPBatchLinkOptions {
|
|
13
11
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { httpLinkFactory } from './httpLink';
|
|
2
|
-
import {
|
|
2
|
+
import type { Requester } from './internals/httpUtils';
|
|
3
|
+
import { httpRequest } from './internals/httpUtils';
|
|
3
4
|
|
|
4
5
|
const formDataRequester: Requester = (opts) => {
|
|
5
6
|
if (opts.type !== 'mutation') {
|
package/src/links/httpLink.ts
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { AnyRouter } from '@trpc/core';
|
|
1
|
+
import type { AnyRouter } from '@trpc/core';
|
|
2
2
|
import { observable } from '@trpc/core/observable';
|
|
3
3
|
import { transformResult } from '../shared/transformResult';
|
|
4
4
|
import { TRPCClientError } from '../TRPCClientError';
|
|
5
|
-
import {
|
|
5
|
+
import type {
|
|
6
6
|
HTTPLinkBaseOptions,
|
|
7
7
|
HTTPResult,
|
|
8
|
-
jsonHttpRequester,
|
|
9
8
|
Requester,
|
|
9
|
+
} from './internals/httpUtils';
|
|
10
|
+
import {
|
|
11
|
+
jsonHttpRequester,
|
|
10
12
|
resolveHTTPLinkOptions,
|
|
11
13
|
} from './internals/httpUtils';
|
|
12
|
-
import { HTTPHeaders, Operation, TRPCLink } from './types';
|
|
14
|
+
import type { HTTPHeaders, Operation, TRPCLink } from './types';
|
|
13
15
|
|
|
14
16
|
export interface HTTPLinkOptions extends HTTPLinkBaseOptions {
|
|
15
17
|
/**
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { AnyRouter } from '@trpc/core';
|
|
1
|
+
import type { AnyRouter } from '@trpc/core';
|
|
2
2
|
import { observable } from '@trpc/core/observable';
|
|
3
|
-
import {
|
|
3
|
+
import type {
|
|
4
|
+
Operation,
|
|
5
|
+
OperationLink,
|
|
6
|
+
OperationResultObservable,
|
|
7
|
+
} from '../types';
|
|
4
8
|
|
|
5
9
|
/** @internal */
|
|
6
10
|
export function createChain<
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { AnyRouter, ProcedureType } from '@trpc/core';
|
|
1
|
+
import type { AnyRouter, ProcedureType } from '@trpc/core';
|
|
2
2
|
import { observable } from '@trpc/core/observable';
|
|
3
3
|
import { dataLoader } from '../../internals/dataLoader';
|
|
4
4
|
import { transformResult } from '../../shared/transformResult';
|
|
5
5
|
import { TRPCClientError } from '../../TRPCClientError';
|
|
6
|
-
import { HTTPBatchLinkOptions } from '../HTTPBatchLinkOptions';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} from './httpUtils';
|
|
6
|
+
import type { HTTPBatchLinkOptions } from '../HTTPBatchLinkOptions';
|
|
7
|
+
import type {
|
|
8
|
+
CancelFn,
|
|
9
|
+
Operation,
|
|
10
|
+
TRPCClientRuntime,
|
|
11
|
+
TRPCLink,
|
|
12
|
+
} from '../types';
|
|
13
|
+
import type { HTTPResult, ResolvedHTTPLinkOptions } from './httpUtils';
|
|
14
|
+
import { getUrl, resolveHTTPLinkOptions } from './httpUtils';
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* @internal
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/* istanbul ignore file -- @preserve */
|
|
2
2
|
// We're not actually exporting this link
|
|
3
|
-
import { AnyRouter } from '@trpc/core';
|
|
4
|
-
import { Observable
|
|
5
|
-
import {
|
|
3
|
+
import type { AnyRouter } from '@trpc/core';
|
|
4
|
+
import type { Observable } from '@trpc/core/observable';
|
|
5
|
+
import { observable, share } from '@trpc/core/observable';
|
|
6
|
+
import type { TRPCLink } from '../types';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* @internal used for testing
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ProcedureType } from '@trpc/core';
|
|
2
|
-
import { TRPCResponse } from '@trpc/core/rpc';
|
|
1
|
+
import type { ProcedureType } from '@trpc/core';
|
|
2
|
+
import type { TRPCResponse } from '@trpc/core/rpc';
|
|
3
3
|
import { getFetch } from '../../getFetch';
|
|
4
4
|
import { getAbortController } from '../../internals/getAbortController';
|
|
5
|
-
import {
|
|
5
|
+
import type {
|
|
6
6
|
AbortControllerEsque,
|
|
7
7
|
AbortControllerInstanceEsque,
|
|
8
8
|
FetchEsque,
|
|
@@ -10,8 +10,12 @@ import {
|
|
|
10
10
|
ResponseEsque,
|
|
11
11
|
} from '../../internals/types';
|
|
12
12
|
import { TRPCClientError } from '../../TRPCClientError';
|
|
13
|
-
import { TextDecoderEsque } from '../internals/streamingUtils';
|
|
14
|
-
import {
|
|
13
|
+
import type { TextDecoderEsque } from '../internals/streamingUtils';
|
|
14
|
+
import type {
|
|
15
|
+
HTTPHeaders,
|
|
16
|
+
PromiseAndCancel,
|
|
17
|
+
TRPCClientRuntime,
|
|
18
|
+
} from '../types';
|
|
15
19
|
|
|
16
20
|
/**
|
|
17
21
|
* @internal
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
// Stream parsing adapted from https://www.loginradius.com/blog/engineering/guest-post/http-streaming-with-nodejs-and-fetch-api/
|
|
2
|
-
import { TRPCResponse } from '@trpc/core/rpc';
|
|
3
|
-
import { WebReadableStreamEsque } from '../../internals/types';
|
|
4
|
-
import { HTTPHeaders } from '../types';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
getUrl,
|
|
9
|
-
HTTPBaseRequestOptions,
|
|
10
|
-
HTTPResult,
|
|
11
|
-
} from './httpUtils';
|
|
12
|
-
import { TextDecoderEsque } from './streamingUtils';
|
|
2
|
+
import type { TRPCResponse } from '@trpc/core/rpc';
|
|
3
|
+
import type { WebReadableStreamEsque } from '../../internals/types';
|
|
4
|
+
import type { HTTPHeaders } from '../types';
|
|
5
|
+
import type { HTTPBaseRequestOptions, HTTPResult } from './httpUtils';
|
|
6
|
+
import { fetchHTTPResponse, getBody, getUrl } from './httpUtils';
|
|
7
|
+
import type { TextDecoderEsque } from './streamingUtils';
|
|
13
8
|
|
|
14
9
|
/**
|
|
15
10
|
* @internal
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/* istanbul ignore file -- @preserve */
|
|
2
2
|
// We're not actually exporting this link
|
|
3
|
-
import { AnyRouter } from '@trpc/core';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import type { AnyRouter } from '@trpc/core';
|
|
4
|
+
import type { Unsubscribable } from '@trpc/core/observable';
|
|
5
|
+
import { observable } from '@trpc/core/observable';
|
|
6
|
+
import type { TRPCLink } from '../types';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* @internal used for testing
|
package/src/links/loggerLink.ts
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
// Using triple-slash directive makes sure that it will be available,
|
|
6
6
|
// even if end-user `tsconfig.json` omits it in the `lib` array.
|
|
7
7
|
|
|
8
|
-
import { AnyRouter } from '@trpc/core';
|
|
8
|
+
import type { AnyRouter } from '@trpc/core';
|
|
9
9
|
import { observable, tap } from '@trpc/core/observable';
|
|
10
|
-
import { TRPCClientError } from '../TRPCClientError';
|
|
11
|
-
import { Operation, OperationResultEnvelope, TRPCLink } from './types';
|
|
10
|
+
import type { TRPCClientError } from '../TRPCClientError';
|
|
11
|
+
import type { Operation, OperationResultEnvelope, TRPCLink } from './types';
|
|
12
12
|
|
|
13
13
|
type ConsoleEsque = {
|
|
14
14
|
log: (...args: any[]) => void;
|
package/src/links/splitLink.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AnyRouter } from '@trpc/core';
|
|
1
|
+
import type { AnyRouter } from '@trpc/core';
|
|
2
2
|
import { observable } from '@trpc/core/observable';
|
|
3
3
|
import { createChain } from './internals/createChain';
|
|
4
|
-
import { Operation, TRPCLink } from './types';
|
|
4
|
+
import type { Operation, TRPCLink } from './types';
|
|
5
5
|
|
|
6
6
|
function asArray<TType>(value: TType | TType[]) {
|
|
7
7
|
return Array.isArray(value) ? value : [value];
|
package/src/links/types.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
AnyRouter,
|
|
3
3
|
CombinedDataTransformer,
|
|
4
4
|
DataTransformer,
|
|
5
5
|
} from '@trpc/core';
|
|
6
|
-
import { Observable, Observer } from '@trpc/core/observable';
|
|
7
|
-
import { TRPCResultMessage, TRPCSuccessResponse } from '@trpc/core/rpc';
|
|
8
|
-
import { ResponseEsque } from '../internals/types';
|
|
9
|
-
import { TRPCClientError } from '../TRPCClientError';
|
|
6
|
+
import type { Observable, Observer } from '@trpc/core/observable';
|
|
7
|
+
import type { TRPCResultMessage, TRPCSuccessResponse } from '@trpc/core/rpc';
|
|
8
|
+
import type { ResponseEsque } from '../internals/types';
|
|
9
|
+
import type { TRPCClientError } from '../TRPCClientError';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @internal
|
package/src/links/wsLink.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
AnyRouter,
|
|
3
3
|
inferRouterError,
|
|
4
4
|
MaybePromise,
|
|
5
5
|
ProcedureType,
|
|
6
6
|
} from '@trpc/core';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import type { Observer, UnsubscribeFn } from '@trpc/core/observable';
|
|
8
|
+
import { observable } from '@trpc/core/observable';
|
|
9
|
+
import type {
|
|
9
10
|
TRPCClientIncomingMessage,
|
|
10
11
|
TRPCClientIncomingRequest,
|
|
11
12
|
TRPCClientOutgoingMessage,
|
|
@@ -14,7 +15,7 @@ import {
|
|
|
14
15
|
} from '@trpc/core/rpc';
|
|
15
16
|
import { transformResult } from '../shared/transformResult';
|
|
16
17
|
import { TRPCClientError } from '../TRPCClientError';
|
|
17
|
-
import { Operation, TRPCLink } from './types';
|
|
18
|
+
import type { Operation, TRPCLink } from './types';
|
|
18
19
|
|
|
19
20
|
const run = <TResult>(fn: () => TResult): TResult => fn();
|
|
20
21
|
|