@trpc/server 11.0.0-alpha-tmp-subscription-connection-state.488 → 11.0.0-alpha-tmp-subscription-connection-state.489
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/@trpc/server/index.d.ts +5 -1
- package/dist/@trpc/server/index.d.ts.map +1 -1
- package/dist/adapters/ws.d.ts.map +1 -1
- package/dist/adapters/ws.js +36 -6
- package/dist/adapters/ws.mjs +37 -7
- package/dist/bundle-analysis.json +102 -87
- package/dist/index.js +3 -2
- package/dist/index.mjs +1 -1
- package/dist/unstable-core-do-not-import/clientish/serialize.d.ts +1 -1
- package/dist/unstable-core-do-not-import/clientish/serialize.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/http/resolveResponse.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/http/resolveResponse.js +13 -2
- package/dist/unstable-core-do-not-import/http/resolveResponse.mjs +13 -2
- package/dist/unstable-core-do-not-import/procedureBuilder.d.ts +2 -2
- package/dist/unstable-core-do-not-import/procedureBuilder.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/rootConfig.d.ts +1 -1
- package/dist/unstable-core-do-not-import/rootConfig.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/rpc/envelopes.d.ts +8 -0
- package/dist/unstable-core-do-not-import/rpc/envelopes.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/rpc/parseTRPCMessage.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/rpc/parseTRPCMessage.js +6 -2
- package/dist/unstable-core-do-not-import/rpc/parseTRPCMessage.mjs +6 -2
- package/dist/unstable-core-do-not-import/stream/jsonl.d.ts +7 -3
- package/dist/unstable-core-do-not-import/stream/jsonl.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/stream/jsonl.js +5 -4
- package/dist/unstable-core-do-not-import/stream/jsonl.mjs +5 -4
- package/dist/unstable-core-do-not-import/stream/sse.d.ts +12 -30
- package/dist/unstable-core-do-not-import/stream/sse.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/stream/sse.js +29 -23
- package/dist/unstable-core-do-not-import/stream/sse.mjs +30 -22
- package/dist/unstable-core-do-not-import/stream/tracked.d.ts +31 -0
- package/dist/unstable-core-do-not-import/stream/tracked.d.ts.map +1 -0
- package/dist/unstable-core-do-not-import/stream/tracked.js +29 -0
- package/dist/unstable-core-do-not-import/stream/tracked.mjs +25 -0
- package/dist/unstable-core-do-not-import/transformer.d.ts +1 -0
- package/dist/unstable-core-do-not-import/transformer.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import.d.ts +1 -0
- package/dist/unstable-core-do-not-import.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import.js +4 -2
- package/dist/unstable-core-do-not-import.mjs +2 -1
- package/package.json +7 -7
- package/src/@trpc/server/index.ts +4 -0
- package/src/adapters/ws.ts +42 -6
- package/src/unstable-core-do-not-import/clientish/serialize.ts +1 -1
- package/src/unstable-core-do-not-import/http/resolveResponse.ts +13 -1
- package/src/unstable-core-do-not-import/procedureBuilder.ts +2 -2
- package/src/unstable-core-do-not-import/rootConfig.ts +4 -1
- package/src/unstable-core-do-not-import/rpc/envelopes.ts +18 -2
- package/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts +5 -1
- package/src/unstable-core-do-not-import/stream/jsonl.ts +14 -6
- package/src/unstable-core-do-not-import/stream/sse.ts +59 -68
- package/src/unstable-core-do-not-import/stream/tracked.ts +55 -0
- package/src/unstable-core-do-not-import.ts +1 -0
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction":
|
|
2
|
+
"bundleSize": 134783,
|
|
3
|
+
"bundleOrigSize": 183711,
|
|
4
|
+
"bundleReduction": 26.63,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
|
-
"id": "/src/unstable-core-do-not-import/
|
|
8
|
-
"size":
|
|
9
|
-
"origSize":
|
|
7
|
+
"id": "/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
8
|
+
"size": 17762,
|
|
9
|
+
"origSize": 16670,
|
|
10
10
|
"renderedExports": [
|
|
11
|
-
"
|
|
12
|
-
"jsonlStreamProducer",
|
|
13
|
-
"jsonlStreamConsumer"
|
|
11
|
+
"resolveResponse"
|
|
14
12
|
],
|
|
15
13
|
"removedExports": [],
|
|
16
14
|
"dependents": [
|
|
17
|
-
"/src/unstable-core-do-not-import.ts"
|
|
18
|
-
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
15
|
+
"/src/unstable-core-do-not-import.ts"
|
|
19
16
|
],
|
|
20
|
-
"percent": 13.
|
|
21
|
-
"reduction":
|
|
17
|
+
"percent": 13.18,
|
|
18
|
+
"reduction": 0
|
|
22
19
|
},
|
|
23
20
|
{
|
|
24
|
-
"id": "/src/unstable-core-do-not-import/
|
|
25
|
-
"size":
|
|
26
|
-
"origSize":
|
|
21
|
+
"id": "/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
22
|
+
"size": 17400,
|
|
23
|
+
"origSize": 18243,
|
|
27
24
|
"renderedExports": [
|
|
28
|
-
"
|
|
25
|
+
"isPromise",
|
|
26
|
+
"jsonlStreamProducer",
|
|
27
|
+
"jsonlStreamConsumer"
|
|
29
28
|
],
|
|
30
29
|
"removedExports": [],
|
|
31
30
|
"dependents": [
|
|
32
|
-
"/src/unstable-core-do-not-import.ts"
|
|
31
|
+
"/src/unstable-core-do-not-import.ts",
|
|
32
|
+
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
33
33
|
],
|
|
34
|
-
"percent":
|
|
35
|
-
"reduction":
|
|
34
|
+
"percent": 12.91,
|
|
35
|
+
"reduction": 4.62
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"id": "/src/adapters/ws.ts",
|
|
39
|
-
"size":
|
|
40
|
-
"origSize":
|
|
39
|
+
"size": 15730,
|
|
40
|
+
"origSize": 14665,
|
|
41
41
|
"renderedExports": [
|
|
42
42
|
"getWSConnectionHandler",
|
|
43
43
|
"applyWSSHandler"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"dependents": [
|
|
47
47
|
"/src/adapters/fastify/fastifyTRPCPlugin.ts"
|
|
48
48
|
],
|
|
49
|
-
"percent":
|
|
49
|
+
"percent": 11.67,
|
|
50
50
|
"reduction": 0
|
|
51
51
|
},
|
|
52
52
|
{
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"/src/unstable-core-do-not-import.ts",
|
|
62
62
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
63
63
|
],
|
|
64
|
-
"percent": 5.
|
|
64
|
+
"percent": 5.7,
|
|
65
65
|
"reduction": 0
|
|
66
66
|
},
|
|
67
67
|
{
|
|
@@ -79,13 +79,13 @@
|
|
|
79
79
|
"/src/unstable-core-do-not-import.ts",
|
|
80
80
|
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
81
81
|
],
|
|
82
|
-
"percent": 4.
|
|
82
|
+
"percent": 4.73,
|
|
83
83
|
"reduction": 39.77
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
86
|
"id": "/src/unstable-core-do-not-import/procedureBuilder.ts",
|
|
87
87
|
"size": 6326,
|
|
88
|
-
"origSize":
|
|
88
|
+
"origSize": 15849,
|
|
89
89
|
"renderedExports": [
|
|
90
90
|
"createBuilder"
|
|
91
91
|
],
|
|
@@ -94,16 +94,14 @@
|
|
|
94
94
|
"/src/unstable-core-do-not-import.ts",
|
|
95
95
|
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
96
96
|
],
|
|
97
|
-
"percent": 4.
|
|
98
|
-
"reduction": 60.
|
|
97
|
+
"percent": 4.69,
|
|
98
|
+
"reduction": 60.09
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
101
|
"id": "/src/unstable-core-do-not-import/stream/sse.ts",
|
|
102
|
-
"size":
|
|
103
|
-
"origSize":
|
|
102
|
+
"size": 5910,
|
|
103
|
+
"origSize": 6971,
|
|
104
104
|
"renderedExports": [
|
|
105
|
-
"sse",
|
|
106
|
-
"isSSEMessageEnvelope",
|
|
107
105
|
"sseStreamProducer",
|
|
108
106
|
"sseStreamConsumer",
|
|
109
107
|
"sseHeaders"
|
|
@@ -113,8 +111,8 @@
|
|
|
113
111
|
"/src/unstable-core-do-not-import.ts",
|
|
114
112
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
115
113
|
],
|
|
116
|
-
"percent": 4.
|
|
117
|
-
"reduction":
|
|
114
|
+
"percent": 4.38,
|
|
115
|
+
"reduction": 15.22
|
|
118
116
|
},
|
|
119
117
|
{
|
|
120
118
|
"id": "/src/adapters/aws-lambda/getPlanner.ts",
|
|
@@ -127,7 +125,7 @@
|
|
|
127
125
|
"dependents": [
|
|
128
126
|
"/src/adapters/aws-lambda/index.ts"
|
|
129
127
|
],
|
|
130
|
-
"percent": 4.
|
|
128
|
+
"percent": 4.02,
|
|
131
129
|
"reduction": 11.38
|
|
132
130
|
},
|
|
133
131
|
{
|
|
@@ -147,7 +145,7 @@
|
|
|
147
145
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
148
146
|
"/src/observable/operators.ts"
|
|
149
147
|
],
|
|
150
|
-
"percent": 3.
|
|
148
|
+
"percent": 3.05,
|
|
151
149
|
"reduction": 0
|
|
152
150
|
},
|
|
153
151
|
{
|
|
@@ -161,7 +159,7 @@
|
|
|
161
159
|
"dependents": [
|
|
162
160
|
"/src/adapters/next-app-dir.ts"
|
|
163
161
|
],
|
|
164
|
-
"percent": 2.
|
|
162
|
+
"percent": 2.33,
|
|
165
163
|
"reduction": 23.5
|
|
166
164
|
},
|
|
167
165
|
{
|
|
@@ -177,7 +175,7 @@
|
|
|
177
175
|
"dependents": [
|
|
178
176
|
"/src/observable/index.ts"
|
|
179
177
|
],
|
|
180
|
-
"percent": 2.
|
|
178
|
+
"percent": 2.04,
|
|
181
179
|
"reduction": 0
|
|
182
180
|
},
|
|
183
181
|
{
|
|
@@ -197,7 +195,7 @@
|
|
|
197
195
|
"/src/unstable-core-do-not-import/router.ts",
|
|
198
196
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
199
197
|
],
|
|
200
|
-
"percent": 2.
|
|
198
|
+
"percent": 2.04,
|
|
201
199
|
"reduction": 45.94
|
|
202
200
|
},
|
|
203
201
|
{
|
|
@@ -211,7 +209,7 @@
|
|
|
211
209
|
"dependents": [
|
|
212
210
|
"/src/adapters/node-http/index.ts"
|
|
213
211
|
],
|
|
214
|
-
"percent": 2.
|
|
212
|
+
"percent": 2.03,
|
|
215
213
|
"reduction": 6.79
|
|
216
214
|
},
|
|
217
215
|
{
|
|
@@ -225,7 +223,7 @@
|
|
|
225
223
|
"dependents": [
|
|
226
224
|
"/src/unstable-core-do-not-import.ts"
|
|
227
225
|
],
|
|
228
|
-
"percent": 2.
|
|
226
|
+
"percent": 2.01,
|
|
229
227
|
"reduction": 40.91
|
|
230
228
|
},
|
|
231
229
|
{
|
|
@@ -245,7 +243,7 @@
|
|
|
245
243
|
"/src/unstable-core-do-not-import/initTRPC.ts",
|
|
246
244
|
"/src/unstable-core-do-not-import/procedureBuilder.ts"
|
|
247
245
|
],
|
|
248
|
-
"percent":
|
|
246
|
+
"percent": 1.95,
|
|
249
247
|
"reduction": 55.5
|
|
250
248
|
},
|
|
251
249
|
{
|
|
@@ -261,7 +259,7 @@
|
|
|
261
259
|
"/src/unstable-core-do-not-import.ts",
|
|
262
260
|
"/src/unstable-core-do-not-import/router.ts"
|
|
263
261
|
],
|
|
264
|
-
"percent": 1.
|
|
262
|
+
"percent": 1.73,
|
|
265
263
|
"reduction": 0
|
|
266
264
|
},
|
|
267
265
|
{
|
|
@@ -275,7 +273,7 @@
|
|
|
275
273
|
"dependents": [
|
|
276
274
|
"/src/adapters/fetch/index.ts"
|
|
277
275
|
],
|
|
278
|
-
"percent": 1.
|
|
276
|
+
"percent": 1.67,
|
|
279
277
|
"reduction": 2.17
|
|
280
278
|
},
|
|
281
279
|
{
|
|
@@ -290,7 +288,7 @@
|
|
|
290
288
|
"/src/adapters/node-http/index.ts",
|
|
291
289
|
"/src/adapters/node-http/nodeHTTPRequestHandler.ts"
|
|
292
290
|
],
|
|
293
|
-
"percent": 1.
|
|
291
|
+
"percent": 1.63,
|
|
294
292
|
"reduction": 13.79
|
|
295
293
|
},
|
|
296
294
|
{
|
|
@@ -304,7 +302,7 @@
|
|
|
304
302
|
"dependents": [
|
|
305
303
|
"/src/adapters/next-app-dir/nextAppDirCaller.ts"
|
|
306
304
|
],
|
|
307
|
-
"percent": 1.
|
|
305
|
+
"percent": 1.52,
|
|
308
306
|
"reduction": 5.79
|
|
309
307
|
},
|
|
310
308
|
{
|
|
@@ -319,42 +317,42 @@
|
|
|
319
317
|
"removedExports": [],
|
|
320
318
|
"dependents": [
|
|
321
319
|
"/src/unstable-core-do-not-import.ts",
|
|
322
|
-
"/src/unstable-core-do-not-import/stream/sse.ts",
|
|
323
320
|
"/src/unstable-core-do-not-import/middleware.ts",
|
|
324
321
|
"/src/unstable-core-do-not-import/router.ts",
|
|
325
322
|
"/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
|
|
326
323
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
327
324
|
"/src/unstable-core-do-not-import/http/contentType.ts",
|
|
328
325
|
"/src/unstable-core-do-not-import/procedureBuilder.ts",
|
|
329
|
-
"/src/unstable-core-do-not-import/stream/jsonl.ts"
|
|
326
|
+
"/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
327
|
+
"/src/unstable-core-do-not-import/stream/sse.ts"
|
|
330
328
|
],
|
|
331
|
-
"percent": 1.
|
|
329
|
+
"percent": 1.29,
|
|
332
330
|
"reduction": 19.47
|
|
333
331
|
},
|
|
334
332
|
{
|
|
335
|
-
"id": "/src/unstable-core-do-not-import/rpc/
|
|
336
|
-
"size":
|
|
337
|
-
"origSize":
|
|
333
|
+
"id": "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
334
|
+
"size": 1699,
|
|
335
|
+
"origSize": 2105,
|
|
338
336
|
"renderedExports": [
|
|
339
|
-
"
|
|
340
|
-
"TRPC_ERROR_CODES_BY_NUMBER"
|
|
337
|
+
"parseTRPCMessage"
|
|
341
338
|
],
|
|
342
339
|
"removedExports": [],
|
|
343
340
|
"dependents": [],
|
|
344
|
-
"percent": 1.
|
|
345
|
-
"reduction":
|
|
341
|
+
"percent": 1.26,
|
|
342
|
+
"reduction": 19.29
|
|
346
343
|
},
|
|
347
344
|
{
|
|
348
|
-
"id": "/src/unstable-core-do-not-import/rpc/
|
|
349
|
-
"size":
|
|
350
|
-
"origSize":
|
|
345
|
+
"id": "/src/unstable-core-do-not-import/rpc/codes.ts",
|
|
346
|
+
"size": 1611,
|
|
347
|
+
"origSize": 2221,
|
|
351
348
|
"renderedExports": [
|
|
352
|
-
"
|
|
349
|
+
"TRPC_ERROR_CODES_BY_KEY",
|
|
350
|
+
"TRPC_ERROR_CODES_BY_NUMBER"
|
|
353
351
|
],
|
|
354
352
|
"removedExports": [],
|
|
355
353
|
"dependents": [],
|
|
356
354
|
"percent": 1.2,
|
|
357
|
-
"reduction":
|
|
355
|
+
"reduction": 27.47
|
|
358
356
|
},
|
|
359
357
|
{
|
|
360
358
|
"id": "/src/adapters/next.ts",
|
|
@@ -365,7 +363,7 @@
|
|
|
365
363
|
],
|
|
366
364
|
"removedExports": [],
|
|
367
365
|
"dependents": [],
|
|
368
|
-
"percent": 1.
|
|
366
|
+
"percent": 1.14,
|
|
369
367
|
"reduction": 26.94
|
|
370
368
|
},
|
|
371
369
|
{
|
|
@@ -379,7 +377,7 @@
|
|
|
379
377
|
"dependents": [
|
|
380
378
|
"/src/adapters/fastify/index.ts"
|
|
381
379
|
],
|
|
382
|
-
"percent": 1.
|
|
380
|
+
"percent": 1.11,
|
|
383
381
|
"reduction": 34.7
|
|
384
382
|
},
|
|
385
383
|
{
|
|
@@ -396,7 +394,7 @@
|
|
|
396
394
|
"/src/unstable-core-do-not-import/error/getErrorShape.ts",
|
|
397
395
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
398
396
|
],
|
|
399
|
-
"percent": 1.
|
|
397
|
+
"percent": 1.01,
|
|
400
398
|
"reduction": 17.52
|
|
401
399
|
},
|
|
402
400
|
{
|
|
@@ -416,7 +414,6 @@
|
|
|
416
414
|
"dependents": [
|
|
417
415
|
"/src/unstable-core-do-not-import.ts",
|
|
418
416
|
"/src/unstable-core-do-not-import/error/TRPCError.ts",
|
|
419
|
-
"/src/unstable-core-do-not-import/stream/sse.ts",
|
|
420
417
|
"/src/unstable-core-do-not-import/transformer.ts",
|
|
421
418
|
"/src/unstable-core-do-not-import/middleware.ts",
|
|
422
419
|
"/src/unstable-core-do-not-import/router.ts",
|
|
@@ -426,9 +423,10 @@
|
|
|
426
423
|
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
427
424
|
"/src/unstable-core-do-not-import/http/contentType.ts",
|
|
428
425
|
"/src/unstable-core-do-not-import/procedureBuilder.ts",
|
|
429
|
-
"/src/unstable-core-do-not-import/stream/jsonl.ts"
|
|
426
|
+
"/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
427
|
+
"/src/unstable-core-do-not-import/stream/sse.ts"
|
|
430
428
|
],
|
|
431
|
-
"percent": 0.
|
|
429
|
+
"percent": 0.89,
|
|
432
430
|
"reduction": 28.12
|
|
433
431
|
},
|
|
434
432
|
{
|
|
@@ -443,7 +441,7 @@
|
|
|
443
441
|
"/src/adapters/fastify/index.ts",
|
|
444
442
|
"/src/adapters/fastify/fastifyTRPCPlugin.ts"
|
|
445
443
|
],
|
|
446
|
-
"percent": 0.
|
|
444
|
+
"percent": 0.84,
|
|
447
445
|
"reduction": 47.59
|
|
448
446
|
},
|
|
449
447
|
{
|
|
@@ -459,7 +457,7 @@
|
|
|
459
457
|
"/src/unstable-core-do-not-import.ts",
|
|
460
458
|
"/src/unstable-core-do-not-import/http/contentType.ts"
|
|
461
459
|
],
|
|
462
|
-
"percent": 0.
|
|
460
|
+
"percent": 0.82,
|
|
463
461
|
"reduction": 15.08
|
|
464
462
|
},
|
|
465
463
|
{
|
|
@@ -473,7 +471,7 @@
|
|
|
473
471
|
"dependents": [
|
|
474
472
|
"/src/unstable-core-do-not-import.ts"
|
|
475
473
|
],
|
|
476
|
-
"percent": 0.
|
|
474
|
+
"percent": 0.79,
|
|
477
475
|
"reduction": 0
|
|
478
476
|
},
|
|
479
477
|
{
|
|
@@ -488,7 +486,7 @@
|
|
|
488
486
|
"/src/unstable-core-do-not-import.ts",
|
|
489
487
|
"/src/unstable-core-do-not-import/procedureBuilder.ts"
|
|
490
488
|
],
|
|
491
|
-
"percent": 0.
|
|
489
|
+
"percent": 0.77,
|
|
492
490
|
"reduction": 58.57
|
|
493
491
|
},
|
|
494
492
|
{
|
|
@@ -505,7 +503,7 @@
|
|
|
505
503
|
"/src/adapters/next-app-dir/nextAppDirCaller.ts",
|
|
506
504
|
"/src/adapters/next-app-dir/rethrowNextErrors.ts"
|
|
507
505
|
],
|
|
508
|
-
"percent": 0.
|
|
506
|
+
"percent": 0.73,
|
|
509
507
|
"reduction": 13.65
|
|
510
508
|
},
|
|
511
509
|
{
|
|
@@ -519,13 +517,30 @@
|
|
|
519
517
|
"removedExports": [],
|
|
520
518
|
"dependents": [
|
|
521
519
|
"/src/unstable-core-do-not-import.ts",
|
|
522
|
-
"/src/unstable-core-do-not-import/stream/sse.ts",
|
|
523
520
|
"/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
521
|
+
"/src/unstable-core-do-not-import/stream/sse.ts",
|
|
524
522
|
"/src/unstable-core-do-not-import/stream/utils/createReadableStream.ts"
|
|
525
523
|
],
|
|
526
|
-
"percent": 0.
|
|
524
|
+
"percent": 0.73,
|
|
527
525
|
"reduction": 15.69
|
|
528
526
|
},
|
|
527
|
+
{
|
|
528
|
+
"id": "/src/unstable-core-do-not-import/stream/tracked.ts",
|
|
529
|
+
"size": 797,
|
|
530
|
+
"origSize": 1440,
|
|
531
|
+
"renderedExports": [
|
|
532
|
+
"sse",
|
|
533
|
+
"isTrackedEnvelope",
|
|
534
|
+
"tracked"
|
|
535
|
+
],
|
|
536
|
+
"removedExports": [],
|
|
537
|
+
"dependents": [
|
|
538
|
+
"/src/unstable-core-do-not-import.ts",
|
|
539
|
+
"/src/unstable-core-do-not-import/stream/sse.ts"
|
|
540
|
+
],
|
|
541
|
+
"percent": 0.59,
|
|
542
|
+
"reduction": 44.65
|
|
543
|
+
},
|
|
529
544
|
{
|
|
530
545
|
"id": "/src/adapters/aws-lambda/index.ts",
|
|
531
546
|
"size": 759,
|
|
@@ -535,7 +550,7 @@
|
|
|
535
550
|
],
|
|
536
551
|
"removedExports": [],
|
|
537
552
|
"dependents": [],
|
|
538
|
-
"percent": 0.
|
|
553
|
+
"percent": 0.56,
|
|
539
554
|
"reduction": 66.9
|
|
540
555
|
},
|
|
541
556
|
{
|
|
@@ -549,7 +564,7 @@
|
|
|
549
564
|
"dependents": [
|
|
550
565
|
"/src/unstable-core-do-not-import.ts"
|
|
551
566
|
],
|
|
552
|
-
"percent": 0.
|
|
567
|
+
"percent": 0.49,
|
|
553
568
|
"reduction": 0.6
|
|
554
569
|
},
|
|
555
570
|
{
|
|
@@ -564,7 +579,7 @@
|
|
|
564
579
|
"/src/unstable-core-do-not-import.ts",
|
|
565
580
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
566
581
|
],
|
|
567
|
-
"percent": 0.
|
|
582
|
+
"percent": 0.46,
|
|
568
583
|
"reduction": 43.49
|
|
569
584
|
},
|
|
570
585
|
{
|
|
@@ -576,10 +591,10 @@
|
|
|
576
591
|
],
|
|
577
592
|
"removedExports": [],
|
|
578
593
|
"dependents": [
|
|
579
|
-
"/src/unstable-core-do-not-import/stream/
|
|
580
|
-
"/src/unstable-core-do-not-import/stream/
|
|
594
|
+
"/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
595
|
+
"/src/unstable-core-do-not-import/stream/sse.ts"
|
|
581
596
|
],
|
|
582
|
-
"percent": 0.
|
|
597
|
+
"percent": 0.43,
|
|
583
598
|
"reduction": 17.15
|
|
584
599
|
},
|
|
585
600
|
{
|
|
@@ -598,7 +613,7 @@
|
|
|
598
613
|
{
|
|
599
614
|
"id": "/src/unstable-core-do-not-import/rootConfig.ts",
|
|
600
615
|
"size": 343,
|
|
601
|
-
"origSize":
|
|
616
|
+
"origSize": 3270,
|
|
602
617
|
"renderedExports": [
|
|
603
618
|
"isServerDefault"
|
|
604
619
|
],
|
|
@@ -607,8 +622,8 @@
|
|
|
607
622
|
"/src/unstable-core-do-not-import.ts",
|
|
608
623
|
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
609
624
|
],
|
|
610
|
-
"percent": 0.
|
|
611
|
-
"reduction": 89.
|
|
625
|
+
"percent": 0.25,
|
|
626
|
+
"reduction": 89.51
|
|
612
627
|
},
|
|
613
628
|
{
|
|
614
629
|
"id": "/src/adapters/express.ts",
|
|
@@ -647,7 +662,7 @@
|
|
|
647
662
|
"dependents": [
|
|
648
663
|
"/src/unstable-core-do-not-import.ts"
|
|
649
664
|
],
|
|
650
|
-
"percent": 0.
|
|
665
|
+
"percent": 0.16,
|
|
651
666
|
"reduction": 94.55
|
|
652
667
|
},
|
|
653
668
|
{
|
|
@@ -661,7 +676,7 @@
|
|
|
661
676
|
"dependents": [
|
|
662
677
|
"/src/adapters/next-app-dir.ts"
|
|
663
678
|
],
|
|
664
|
-
"percent": 0.
|
|
679
|
+
"percent": 0.16,
|
|
665
680
|
"reduction": 36.26
|
|
666
681
|
},
|
|
667
682
|
{
|
|
@@ -754,7 +769,7 @@
|
|
|
754
769
|
{
|
|
755
770
|
"id": "/src/unstable-core-do-not-import.ts",
|
|
756
771
|
"size": 0,
|
|
757
|
-
"origSize":
|
|
772
|
+
"origSize": 2306,
|
|
758
773
|
"renderedExports": [],
|
|
759
774
|
"removedExports": [],
|
|
760
775
|
"dependents": [
|
|
@@ -822,5 +837,5 @@
|
|
|
822
837
|
"reduction": 100
|
|
823
838
|
}
|
|
824
839
|
],
|
|
825
|
-
"moduleCount":
|
|
840
|
+
"moduleCount": 56
|
|
826
841
|
}
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var createProxy = require('./unstable-core-do-not-import/createProxy.js');
|
|
4
4
|
var getErrorShape = require('./unstable-core-do-not-import/error/getErrorShape.js');
|
|
5
5
|
var TRPCError = require('./unstable-core-do-not-import/error/TRPCError.js');
|
|
6
|
-
var
|
|
6
|
+
var tracked = require('./unstable-core-do-not-import/stream/tracked.js');
|
|
7
7
|
var transformer = require('./unstable-core-do-not-import/transformer.js');
|
|
8
8
|
var initTRPC = require('./unstable-core-do-not-import/initTRPC.js');
|
|
9
9
|
var middleware = require('./unstable-core-do-not-import/middleware.js');
|
|
@@ -16,7 +16,8 @@ exports.createTRPCFlatProxy = createProxy.createFlatProxy;
|
|
|
16
16
|
exports.getErrorShape = getErrorShape.getErrorShape;
|
|
17
17
|
exports.TRPCError = TRPCError.TRPCError;
|
|
18
18
|
exports.getTRPCErrorFromUnknown = TRPCError.getTRPCErrorFromUnknown;
|
|
19
|
-
exports.sse =
|
|
19
|
+
exports.sse = tracked.sse;
|
|
20
|
+
exports.tracked = tracked.tracked;
|
|
20
21
|
exports.transformTRPCResponse = transformer.transformTRPCResponse;
|
|
21
22
|
exports.initTRPC = initTRPC.initTRPC;
|
|
22
23
|
exports.experimental_standaloneMiddleware = middleware.experimental_standaloneMiddleware;
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { createFlatProxy as createTRPCFlatProxy } from './unstable-core-do-not-import/createProxy.mjs';
|
|
2
2
|
export { getErrorShape } from './unstable-core-do-not-import/error/getErrorShape.mjs';
|
|
3
3
|
export { TRPCError, getTRPCErrorFromUnknown } from './unstable-core-do-not-import/error/TRPCError.mjs';
|
|
4
|
-
export { sse } from './unstable-core-do-not-import/stream/
|
|
4
|
+
export { sse, tracked } from './unstable-core-do-not-import/stream/tracked.mjs';
|
|
5
5
|
export { transformTRPCResponse } from './unstable-core-do-not-import/transformer.mjs';
|
|
6
6
|
export { initTRPC } from './unstable-core-do-not-import/initTRPC.mjs';
|
|
7
7
|
export { experimental_standaloneMiddleware, experimental_standaloneMiddleware as experimental_trpcMiddleware } from './unstable-core-do-not-import/middleware.mjs';
|
|
@@ -7,7 +7,7 @@ type NonJsonPrimitive = Function | symbol | undefined;
|
|
|
7
7
|
type IsAny<T> = 0 extends T & 1 ? true : false;
|
|
8
8
|
type JsonReturnable = JsonPrimitive | undefined;
|
|
9
9
|
type IsRecord<T extends object> = keyof WithoutIndexSignature<T> extends never ? true : false;
|
|
10
|
-
export type Serialize<T> = IsAny<T> extends true ? any : unknown extends T ? unknown : T extends
|
|
10
|
+
export type Serialize<T> = IsAny<T> extends true ? any : unknown extends T ? unknown : T extends AsyncGenerator<infer $T, infer $Return, infer $Next> ? AsyncGenerator<Serialize<$T>, Serialize<$Return>, Serialize<$Next>> : T extends JsonReturnable ? T : T extends Map<any, any> | Set<any> ? object : T extends NonJsonPrimitive ? never : T extends {
|
|
11
11
|
toJSON(): infer U;
|
|
12
12
|
} ? U : T extends [] ? [] : T extends [unknown, ...unknown[]] ? SerializeTuple<T> : T extends readonly (infer U)[] ? (U extends NonJsonPrimitive ? null : Serialize<U>)[] : T extends object ? IsRecord<T> extends true ? Record<keyof T, Serialize<T[keyof T]>> : Simplify<SerializeObject<UndefinedToOptional<T>>> : never;
|
|
13
13
|
/** JSON serialize [tuples](https://www.typescriptlang.org/docs/handbook/2/objects.html#tuple-types) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/clientish/serialize.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEhE;;GAEG;AACH,KAAK,aAAa,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S,CACV;CACF,CAAC;AAEF;;;GAGG;AACH,KAAK,eAAe,CAAC,CAAC,SAAS,MAAM,IAAI;KACtC,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC;CACtE,CAAC;AAEF;;GAEG;AACH,KAAK,mBAAmB,CAAC,CAAC,SAAS,MAAM,IAEvC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,GAEzE,CAAC,0BAA0B,SAAS,IAAI,GACpC,oBAAoB,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,GACnE,iBAAiB,CAAC,CAAC,CAAC,SAAS,IAAI,GACjC,oBAAoB,CAAC,CAAC,CAAC,GACvB,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveResponse.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/http/resolveResponse.ts"],"names":[],"mappings":"AAMA,OAAO,EAA2B,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAAO,EACL,KAAK,SAAS,EAGf,MAAM,WAAW,CAAC;AAQnB,OAAO,KAAK,EACV,sBAAsB,EACtB,kCAAkC,EAEnC,MAAM,SAAS,CAAC;AA0BjB,UAAU,yBAAyB,CAAC,OAAO,SAAS,SAAS,CAC3D,SAAQ,sBAAsB,CAAC,OAAO,EAAE,OAAO,CAAC;IAChD,aAAa,EAAE,kCAAkC,CAAC,OAAO,CAAC,CAAC;IAC3D,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;CACzB;AAyID,wBAAsB,eAAe,CAAC,OAAO,SAAS,SAAS,EAC7D,IAAI,EAAE,yBAAyB,CAAC,OAAO,CAAC,GACvC,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"resolveResponse.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/http/resolveResponse.ts"],"names":[],"mappings":"AAMA,OAAO,EAA2B,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAAO,EACL,KAAK,SAAS,EAGf,MAAM,WAAW,CAAC;AAQnB,OAAO,KAAK,EACV,sBAAsB,EACtB,kCAAkC,EAEnC,MAAM,SAAS,CAAC;AA0BjB,UAAU,yBAAyB,CAAC,OAAO,SAAS,SAAS,CAC3D,SAAQ,sBAAsB,CAAC,OAAO,EAAE,OAAO,CAAC;IAChD,aAAa,EAAE,kCAAkC,CAAC,OAAO,CAAC,CAAC;IAC3D,GAAG,EAAE,OAAO,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;CACzB;AAyID,wBAAsB,eAAe,CAAC,OAAO,SAAS,SAAS,EAC7D,IAAI,EAAE,yBAAyB,CAAC,OAAO,CAAC,GACvC,OAAO,CAAC,QAAQ,CAAC,CA6ZnB"}
|
|
@@ -284,9 +284,20 @@ async function resolveResponse(opts) {
|
|
|
284
284
|
}
|
|
285
285
|
const dataAsIterable = observable.isObservable(data) ? observable.observableToAsyncIterable(data) : data;
|
|
286
286
|
const stream = sse.sseStreamProducer({
|
|
287
|
-
...
|
|
287
|
+
...config.experimental?.sseSubscriptions,
|
|
288
288
|
data: dataAsIterable,
|
|
289
|
-
serialize: (v)=>config.transformer.output.serialize(v)
|
|
289
|
+
serialize: (v)=>config.transformer.output.serialize(v),
|
|
290
|
+
formatError (errorOpts) {
|
|
291
|
+
const shape = getErrorShape.getErrorShape({
|
|
292
|
+
config,
|
|
293
|
+
ctx,
|
|
294
|
+
error: TRPCError.getTRPCErrorFromUnknown(errorOpts.error),
|
|
295
|
+
input: call?.result(),
|
|
296
|
+
path: call?.path,
|
|
297
|
+
type: call?.procedure?._def.type ?? 'unknown'
|
|
298
|
+
});
|
|
299
|
+
return shape;
|
|
300
|
+
}
|
|
290
301
|
});
|
|
291
302
|
for (const [key, value] of Object.entries(sse.sseHeaders)){
|
|
292
303
|
headers.set(key, value);
|
|
@@ -282,9 +282,20 @@ async function resolveResponse(opts) {
|
|
|
282
282
|
}
|
|
283
283
|
const dataAsIterable = isObservable(data) ? observableToAsyncIterable(data) : data;
|
|
284
284
|
const stream = sseStreamProducer({
|
|
285
|
-
...
|
|
285
|
+
...config.experimental?.sseSubscriptions,
|
|
286
286
|
data: dataAsIterable,
|
|
287
|
-
serialize: (v)=>config.transformer.output.serialize(v)
|
|
287
|
+
serialize: (v)=>config.transformer.output.serialize(v),
|
|
288
|
+
formatError (errorOpts) {
|
|
289
|
+
const shape = getErrorShape({
|
|
290
|
+
config,
|
|
291
|
+
ctx,
|
|
292
|
+
error: getTRPCErrorFromUnknown(errorOpts.error),
|
|
293
|
+
input: call?.result(),
|
|
294
|
+
path: call?.path,
|
|
295
|
+
type: call?.procedure?._def.type ?? 'unknown'
|
|
296
|
+
});
|
|
297
|
+
return shape;
|
|
298
|
+
}
|
|
288
299
|
});
|
|
289
300
|
for (const [key, value] of Object.entries(sseHeaders)){
|
|
290
301
|
headers.set(key, value);
|
|
@@ -2,12 +2,12 @@ import type { inferObservableValue } from '../observable';
|
|
|
2
2
|
import type { AnyMiddlewareFunction, MiddlewareBuilder, MiddlewareFunction } from './middleware';
|
|
3
3
|
import type { inferParser, Parser } from './parser';
|
|
4
4
|
import type { AnyProcedure, MutationProcedure, ProcedureType, QueryProcedure, SubscriptionProcedure } from './procedure';
|
|
5
|
-
import type {
|
|
5
|
+
import type { inferTrackedOutput } from './stream/tracked';
|
|
6
6
|
import type { GetRawInputFn, MaybePromise, Overwrite, Simplify, TypeError } from './types';
|
|
7
7
|
import type { UnsetMarker } from './utils';
|
|
8
8
|
type IntersectIfDefined<TType, TWith> = TType extends UnsetMarker ? TWith : TWith extends UnsetMarker ? TType : Simplify<TType & TWith>;
|
|
9
9
|
type DefaultValue<TValue, TFallback> = TValue extends UnsetMarker ? TFallback : TValue;
|
|
10
|
-
type inferSubscriptionOutput<TOutput> = TOutput extends AsyncIterable<infer $Output> ?
|
|
10
|
+
type inferSubscriptionOutput<TOutput> = TOutput extends AsyncIterable<infer $Output> ? inferTrackedOutput<$Output> : inferObservableValue<TOutput>;
|
|
11
11
|
export type CallerOverride<TContext> = (opts: {
|
|
12
12
|
args: unknown[];
|
|
13
13
|
invoke: (opts: ProcedureCallOptions<TContext>) => Promise<unknown>;
|