@trpc/server 11.1.2 → 11.1.3-canary.10

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.
@@ -0,0 +1,997 @@
1
+ {
2
+ "bundleSize": 202465,
3
+ "bundleOrigSize": 235101,
4
+ "bundleReduction": 13.88,
5
+ "modules": [
6
+ {
7
+ "id": "/src/unstable-core-do-not-import/http/resolveResponse.ts",
8
+ "size": 21089,
9
+ "origSize": 19447,
10
+ "renderedExports": [
11
+ "resolveResponse"
12
+ ],
13
+ "removedExports": [],
14
+ "dependents": [
15
+ "/src/unstable-core-do-not-import.ts"
16
+ ],
17
+ "percent": 10.42,
18
+ "reduction": 0
19
+ },
20
+ {
21
+ "id": "/src/adapters/ws.ts",
22
+ "size": 20656,
23
+ "origSize": 16353,
24
+ "renderedExports": [
25
+ "getWSConnectionHandler",
26
+ "handleKeepAlive",
27
+ "applyWSSHandler"
28
+ ],
29
+ "removedExports": [],
30
+ "dependents": [
31
+ "/src/adapters/fastify/fastifyTRPCPlugin.ts"
32
+ ],
33
+ "percent": 10.2,
34
+ "reduction": 0
35
+ },
36
+ {
37
+ "id": "/src/unstable-core-do-not-import/stream/jsonl.ts",
38
+ "size": 19944,
39
+ "origSize": 16994,
40
+ "renderedExports": [
41
+ "isPromise",
42
+ "jsonlStreamProducer",
43
+ "jsonlStreamConsumer"
44
+ ],
45
+ "removedExports": [],
46
+ "dependents": [
47
+ "/src/unstable-core-do-not-import.ts",
48
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts"
49
+ ],
50
+ "percent": 9.85,
51
+ "reduction": 0
52
+ },
53
+ {
54
+ "id": "/src/unstable-core-do-not-import/stream/sse.ts",
55
+ "size": 12951,
56
+ "origSize": 12706,
57
+ "renderedExports": [
58
+ "sseStreamProducer",
59
+ "sseStreamConsumer",
60
+ "sseHeaders"
61
+ ],
62
+ "removedExports": [],
63
+ "dependents": [
64
+ "/src/unstable-core-do-not-import.ts",
65
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts"
66
+ ],
67
+ "percent": 6.4,
68
+ "reduction": 0
69
+ },
70
+ {
71
+ "id": "/src/vendor/unpromise/unpromise.ts",
72
+ "size": 12153,
73
+ "origSize": 13751,
74
+ "renderedExports": [
75
+ "Unpromise",
76
+ "resolveSelfTuple"
77
+ ],
78
+ "removedExports": [],
79
+ "dependents": [],
80
+ "percent": 6,
81
+ "reduction": 11.62
82
+ },
83
+ {
84
+ "id": "/src/unstable-core-do-not-import/router.ts",
85
+ "size": 10154,
86
+ "origSize": 14410,
87
+ "renderedExports": [
88
+ "lazy",
89
+ "createRouterFactory",
90
+ "getProcedureAtPath",
91
+ "callProcedure",
92
+ "createCallerFactory",
93
+ "mergeRouters"
94
+ ],
95
+ "removedExports": [],
96
+ "dependents": [
97
+ "/src/unstable-core-do-not-import.ts",
98
+ "/src/unstable-core-do-not-import/initTRPC.ts",
99
+ "/src/unstable-core-do-not-import/http/contentType.ts"
100
+ ],
101
+ "percent": 5.02,
102
+ "reduction": 29.54
103
+ },
104
+ {
105
+ "id": "/src/unstable-core-do-not-import/stream/utils/mergeAsyncIterables.ts",
106
+ "size": 8124,
107
+ "origSize": 5148,
108
+ "renderedExports": [
109
+ "mergeAsyncIterables"
110
+ ],
111
+ "removedExports": [],
112
+ "dependents": [
113
+ "/src/unstable-core-do-not-import/stream/jsonl.ts"
114
+ ],
115
+ "percent": 4.01,
116
+ "reduction": 0
117
+ },
118
+ {
119
+ "id": "/src/unstable-core-do-not-import/http/contentType.ts",
120
+ "size": 7793,
121
+ "origSize": 7883,
122
+ "renderedExports": [
123
+ "getRequestInfo"
124
+ ],
125
+ "removedExports": [],
126
+ "dependents": [
127
+ "/src/unstable-core-do-not-import.ts",
128
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts"
129
+ ],
130
+ "percent": 3.85,
131
+ "reduction": 1.14
132
+ },
133
+ {
134
+ "id": "/src/unstable-core-do-not-import/procedureBuilder.ts",
135
+ "size": 5920,
136
+ "origSize": 17569,
137
+ "renderedExports": [
138
+ "createBuilder"
139
+ ],
140
+ "removedExports": [],
141
+ "dependents": [
142
+ "/src/unstable-core-do-not-import.ts",
143
+ "/src/unstable-core-do-not-import/initTRPC.ts"
144
+ ],
145
+ "percent": 2.92,
146
+ "reduction": 66.3
147
+ },
148
+ {
149
+ "id": "/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts",
150
+ "size": 5713,
151
+ "origSize": 2653,
152
+ "renderedExports": [
153
+ "iteratorResource",
154
+ "withMaxDuration",
155
+ "takeWithGrace"
156
+ ],
157
+ "removedExports": [],
158
+ "dependents": [
159
+ "/src/unstable-core-do-not-import.ts",
160
+ "/src/adapters/ws.ts",
161
+ "/src/unstable-core-do-not-import/stream/jsonl.ts",
162
+ "/src/unstable-core-do-not-import/stream/sse.ts",
163
+ "/src/unstable-core-do-not-import/stream/utils/withPing.ts"
164
+ ],
165
+ "percent": 2.82,
166
+ "reduction": 0
167
+ },
168
+ {
169
+ "id": "/src/adapters/aws-lambda/getPlanner.ts",
170
+ "size": 5407,
171
+ "origSize": 6177,
172
+ "renderedExports": [
173
+ "getPlanner"
174
+ ],
175
+ "removedExports": [],
176
+ "dependents": [
177
+ "/src/adapters/aws-lambda/index.ts"
178
+ ],
179
+ "percent": 2.67,
180
+ "reduction": 12.47
181
+ },
182
+ {
183
+ "id": "/src/observable/observable.ts",
184
+ "size": 4836,
185
+ "origSize": 4660,
186
+ "renderedExports": [
187
+ "isObservable",
188
+ "observable",
189
+ "observableToPromise",
190
+ "observableToAsyncIterable"
191
+ ],
192
+ "removedExports": [],
193
+ "dependents": [
194
+ "/src/observable/index.ts",
195
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
196
+ "/src/observable/operators.ts",
197
+ "/src/observable/behaviorSubject.ts"
198
+ ],
199
+ "percent": 2.39,
200
+ "reduction": 0
201
+ },
202
+ {
203
+ "id": "/src/unstable-core-do-not-import/stream/utils/withPing.ts",
204
+ "size": 4441,
205
+ "origSize": 1252,
206
+ "renderedExports": [
207
+ "PING_SYM",
208
+ "withPing"
209
+ ],
210
+ "removedExports": [],
211
+ "dependents": [
212
+ "/src/unstable-core-do-not-import/stream/jsonl.ts",
213
+ "/src/unstable-core-do-not-import/stream/sse.ts"
214
+ ],
215
+ "percent": 2.19,
216
+ "reduction": 0
217
+ },
218
+ {
219
+ "id": "/src/adapters/node-http/incomingMessageToRequest.ts",
220
+ "size": 4049,
221
+ "origSize": 4345,
222
+ "renderedExports": [
223
+ "createURL",
224
+ "incomingMessageToRequest"
225
+ ],
226
+ "removedExports": [],
227
+ "dependents": [
228
+ "/src/adapters/node-http/index.ts",
229
+ "/src/adapters/node-http/nodeHTTPRequestHandler.ts"
230
+ ],
231
+ "percent": 2,
232
+ "reduction": 6.81
233
+ },
234
+ {
235
+ "id": "/src/observable/operators.ts",
236
+ "size": 3910,
237
+ "origSize": 3976,
238
+ "renderedExports": [
239
+ "map",
240
+ "share",
241
+ "tap",
242
+ "distinctUntilChanged",
243
+ "distinctUntilDeepChanged"
244
+ ],
245
+ "removedExports": [],
246
+ "dependents": [
247
+ "/src/observable/index.ts"
248
+ ],
249
+ "percent": 1.93,
250
+ "reduction": 1.66
251
+ },
252
+ {
253
+ "id": "/src/adapters/next-app-dir/nextAppDirCaller.ts",
254
+ "size": 3244,
255
+ "origSize": 4187,
256
+ "renderedExports": [
257
+ "nextAppDirCaller"
258
+ ],
259
+ "removedExports": [],
260
+ "dependents": [
261
+ "/src/adapters/next-app-dir.ts"
262
+ ],
263
+ "percent": 1.6,
264
+ "reduction": 22.52
265
+ },
266
+ {
267
+ "id": "/src/vendor/cookie-es/set-cookie/split.ts",
268
+ "size": 2798,
269
+ "origSize": 2750,
270
+ "renderedExports": [
271
+ "splitSetCookieString"
272
+ ],
273
+ "removedExports": [],
274
+ "dependents": [
275
+ "/src/adapters/aws-lambda/getPlanner.ts"
276
+ ],
277
+ "percent": 1.38,
278
+ "reduction": 0
279
+ },
280
+ {
281
+ "id": "/src/adapters/node-http/nodeHTTPRequestHandler.ts",
282
+ "size": 2742,
283
+ "origSize": 3276,
284
+ "renderedExports": [
285
+ "internal_exceptionHandler",
286
+ "nodeHTTPRequestHandler"
287
+ ],
288
+ "removedExports": [],
289
+ "dependents": [
290
+ "/src/adapters/node-http/index.ts"
291
+ ],
292
+ "percent": 1.35,
293
+ "reduction": 16.3
294
+ },
295
+ {
296
+ "id": "/src/unstable-core-do-not-import/transformer.ts",
297
+ "size": 2739,
298
+ "origSize": 5070,
299
+ "renderedExports": [
300
+ "getDataTransformer",
301
+ "defaultTransformer",
302
+ "transformTRPCResponse",
303
+ "transformResult"
304
+ ],
305
+ "removedExports": [],
306
+ "dependents": [
307
+ "/src/unstable-core-do-not-import.ts",
308
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
309
+ "/src/unstable-core-do-not-import/router.ts",
310
+ "/src/unstable-core-do-not-import/initTRPC.ts"
311
+ ],
312
+ "percent": 1.35,
313
+ "reduction": 45.98
314
+ },
315
+ {
316
+ "id": "/src/unstable-core-do-not-import/initTRPC.ts",
317
+ "size": 2664,
318
+ "origSize": 4501,
319
+ "renderedExports": [
320
+ "initTRPC"
321
+ ],
322
+ "removedExports": [],
323
+ "dependents": [
324
+ "/src/unstable-core-do-not-import.ts"
325
+ ],
326
+ "percent": 1.32,
327
+ "reduction": 40.81
328
+ },
329
+ {
330
+ "id": "/src/unstable-core-do-not-import/middleware.ts",
331
+ "size": 2616,
332
+ "origSize": 5929,
333
+ "renderedExports": [
334
+ "middlewareMarker",
335
+ "createMiddlewareFactory",
336
+ "experimental_standaloneMiddleware",
337
+ "createInputMiddleware",
338
+ "createOutputMiddleware"
339
+ ],
340
+ "removedExports": [],
341
+ "dependents": [
342
+ "/src/unstable-core-do-not-import.ts",
343
+ "/src/unstable-core-do-not-import/initTRPC.ts",
344
+ "/src/unstable-core-do-not-import/procedureBuilder.ts"
345
+ ],
346
+ "percent": 1.29,
347
+ "reduction": 55.88
348
+ },
349
+ {
350
+ "id": "/src/unstable-core-do-not-import/utils.ts",
351
+ "size": 2460,
352
+ "origSize": 2982,
353
+ "renderedExports": [
354
+ "unsetMarker",
355
+ "mergeWithoutOverrides",
356
+ "isObject",
357
+ "isFunction",
358
+ "omitPrototype",
359
+ "isAsyncIterable",
360
+ "run",
361
+ "noop",
362
+ "identity",
363
+ "assert",
364
+ "sleep",
365
+ "abortSignalsAnyPonyfill"
366
+ ],
367
+ "removedExports": [],
368
+ "dependents": [
369
+ "/src/unstable-core-do-not-import.ts",
370
+ "/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
371
+ "/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
372
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
373
+ "/src/unstable-core-do-not-import/error/TRPCError.ts",
374
+ "/src/unstable-core-do-not-import/router.ts",
375
+ "/src/unstable-core-do-not-import/transformer.ts",
376
+ "/src/unstable-core-do-not-import/middleware.ts",
377
+ "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
378
+ "/src/unstable-core-do-not-import/http/contentType.ts",
379
+ "/src/unstable-core-do-not-import/http/abortError.ts",
380
+ "/src/unstable-core-do-not-import/procedureBuilder.ts",
381
+ "/src/unstable-core-do-not-import/stream/jsonl.ts",
382
+ "/src/unstable-core-do-not-import/stream/sse.ts"
383
+ ],
384
+ "percent": 1.22,
385
+ "reduction": 17.51
386
+ },
387
+ {
388
+ "id": "/src/unstable-core-do-not-import/error/TRPCError.ts",
389
+ "size": 2350,
390
+ "origSize": 2143,
391
+ "renderedExports": [
392
+ "getCauseFromUnknown",
393
+ "getTRPCErrorFromUnknown",
394
+ "TRPCError"
395
+ ],
396
+ "removedExports": [],
397
+ "dependents": [
398
+ "/src/unstable-core-do-not-import.ts",
399
+ "/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
400
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
401
+ "/src/unstable-core-do-not-import/router.ts",
402
+ "/src/unstable-core-do-not-import/middleware.ts",
403
+ "/src/unstable-core-do-not-import/http/contentType.ts",
404
+ "/src/unstable-core-do-not-import/procedureBuilder.ts",
405
+ "/src/unstable-core-do-not-import/stream/sse.ts"
406
+ ],
407
+ "percent": 1.16,
408
+ "reduction": 0
409
+ },
410
+ {
411
+ "id": "/src/unstable-core-do-not-import/createProxy.ts",
412
+ "size": 2305,
413
+ "origSize": 2225,
414
+ "renderedExports": [
415
+ "createRecursiveProxy",
416
+ "createFlatProxy"
417
+ ],
418
+ "removedExports": [],
419
+ "dependents": [
420
+ "/src/unstable-core-do-not-import.ts",
421
+ "/src/unstable-core-do-not-import/router.ts"
422
+ ],
423
+ "percent": 1.14,
424
+ "reduction": 0
425
+ },
426
+ {
427
+ "id": "/src/adapters/fetch/fetchRequestHandler.ts",
428
+ "size": 2243,
429
+ "origSize": 2300,
430
+ "renderedExports": [
431
+ "fetchRequestHandler"
432
+ ],
433
+ "removedExports": [],
434
+ "dependents": [
435
+ "/src/adapters/fetch/index.ts"
436
+ ],
437
+ "percent": 1.11,
438
+ "reduction": 2.48
439
+ },
440
+ {
441
+ "id": "/src/adapters/next-app-dir/rethrowNextErrors.ts",
442
+ "size": 2120,
443
+ "origSize": 2241,
444
+ "renderedExports": [
445
+ "rethrowNextErrors"
446
+ ],
447
+ "removedExports": [],
448
+ "dependents": [
449
+ "/src/adapters/next-app-dir.ts",
450
+ "/src/adapters/next-app-dir/nextAppDirCaller.ts"
451
+ ],
452
+ "percent": 1.05,
453
+ "reduction": 5.4
454
+ },
455
+ {
456
+ "id": "/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
457
+ "size": 2087,
458
+ "origSize": 2562,
459
+ "renderedExports": [
460
+ "JSONRPC2_TO_HTTP_CODE",
461
+ "HTTP_CODE_TO_JSONRPC2",
462
+ "getStatusCodeFromKey",
463
+ "getStatusKeyFromCode",
464
+ "getHTTPStatusCode",
465
+ "getHTTPStatusCodeFromError"
466
+ ],
467
+ "removedExports": [],
468
+ "dependents": [
469
+ "/src/unstable-core-do-not-import.ts",
470
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
471
+ "/src/unstable-core-do-not-import/error/getErrorShape.ts"
472
+ ],
473
+ "percent": 1.03,
474
+ "reduction": 18.54
475
+ },
476
+ {
477
+ "id": "/src/adapters/node-http/writeResponse.ts",
478
+ "size": 2025,
479
+ "origSize": 2105,
480
+ "renderedExports": [
481
+ "writeResponseBody",
482
+ "writeResponse"
483
+ ],
484
+ "removedExports": [],
485
+ "dependents": [
486
+ "/src/adapters/node-http/nodeHTTPRequestHandler.ts"
487
+ ],
488
+ "percent": 1,
489
+ "reduction": 3.8
490
+ },
491
+ {
492
+ "id": "/src/unstable-core-do-not-import/parser.ts",
493
+ "size": 1815,
494
+ "origSize": 3704,
495
+ "renderedExports": [
496
+ "getParseFn"
497
+ ],
498
+ "removedExports": [],
499
+ "dependents": [
500
+ "/src/unstable-core-do-not-import.ts",
501
+ "/src/unstable-core-do-not-import/procedureBuilder.ts"
502
+ ],
503
+ "percent": 0.9,
504
+ "reduction": 51
505
+ },
506
+ {
507
+ "id": "/src/adapters/fastify/fastifyTRPCPlugin.ts",
508
+ "size": 1765,
509
+ "origSize": 2534,
510
+ "renderedExports": [
511
+ "fastifyTRPCPlugin"
512
+ ],
513
+ "removedExports": [],
514
+ "dependents": [
515
+ "/src/adapters/fastify/index.ts"
516
+ ],
517
+ "percent": 0.87,
518
+ "reduction": 30.35
519
+ },
520
+ {
521
+ "id": "/src/unstable-core-do-not-import/stream/utils/disposable.ts",
522
+ "size": 1755,
523
+ "origSize": 1836,
524
+ "renderedExports": [
525
+ "makeResource",
526
+ "makeAsyncResource"
527
+ ],
528
+ "removedExports": [],
529
+ "dependents": [
530
+ "/src/unstable-core-do-not-import.ts",
531
+ "/src/unstable-core-do-not-import/stream/jsonl.ts",
532
+ "/src/unstable-core-do-not-import/stream/sse.ts",
533
+ "/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts",
534
+ "/src/unstable-core-do-not-import/stream/utils/mergeAsyncIterables.ts",
535
+ "/src/unstable-core-do-not-import/stream/utils/timerResource.ts"
536
+ ],
537
+ "percent": 0.87,
538
+ "reduction": 4.41
539
+ },
540
+ {
541
+ "id": "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
542
+ "size": 1692,
543
+ "origSize": 2105,
544
+ "renderedExports": [
545
+ "parseTRPCMessage"
546
+ ],
547
+ "removedExports": [],
548
+ "dependents": [],
549
+ "percent": 0.84,
550
+ "reduction": 19.62
551
+ },
552
+ {
553
+ "id": "/src/unstable-core-do-not-import/rpc/codes.ts",
554
+ "size": 1611,
555
+ "origSize": 1960,
556
+ "renderedExports": [
557
+ "TRPC_ERROR_CODES_BY_KEY",
558
+ "TRPC_ERROR_CODES_BY_NUMBER"
559
+ ],
560
+ "removedExports": [],
561
+ "dependents": [],
562
+ "percent": 0.8,
563
+ "reduction": 17.81
564
+ },
565
+ {
566
+ "id": "/src/adapters/next.ts",
567
+ "size": 1326,
568
+ "origSize": 2043,
569
+ "renderedExports": [
570
+ "createNextApiHandler"
571
+ ],
572
+ "removedExports": [],
573
+ "dependents": [],
574
+ "percent": 0.65,
575
+ "reduction": 35.1
576
+ },
577
+ {
578
+ "id": "/src/adapters/next-app-dir/redirect.ts",
579
+ "size": 1326,
580
+ "origSize": 1143,
581
+ "renderedExports": [
582
+ "TRPCRedirectError",
583
+ "redirect"
584
+ ],
585
+ "removedExports": [],
586
+ "dependents": [
587
+ "/src/adapters/next-app-dir.ts",
588
+ "/src/adapters/next-app-dir/nextAppDirCaller.ts",
589
+ "/src/adapters/next-app-dir/rethrowNextErrors.ts"
590
+ ],
591
+ "percent": 0.65,
592
+ "reduction": 0
593
+ },
594
+ {
595
+ "id": "/src/adapters/fastify/fastifyRequestHandler.ts",
596
+ "size": 1146,
597
+ "origSize": 2185,
598
+ "renderedExports": [
599
+ "fastifyRequestHandler"
600
+ ],
601
+ "removedExports": [],
602
+ "dependents": [
603
+ "/src/adapters/fastify/index.ts",
604
+ "/src/adapters/fastify/fastifyTRPCPlugin.ts"
605
+ ],
606
+ "percent": 0.57,
607
+ "reduction": 47.55
608
+ },
609
+ {
610
+ "id": "/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
611
+ "size": 1104,
612
+ "origSize": 1300,
613
+ "renderedExports": [
614
+ "parseConnectionParamsFromUnknown",
615
+ "parseConnectionParamsFromString"
616
+ ],
617
+ "removedExports": [],
618
+ "dependents": [
619
+ "/src/unstable-core-do-not-import.ts",
620
+ "/src/unstable-core-do-not-import/http/contentType.ts"
621
+ ],
622
+ "percent": 0.55,
623
+ "reduction": 15.08
624
+ },
625
+ {
626
+ "id": "/src/unstable-core-do-not-import/http/formDataToObject.ts",
627
+ "size": 1060,
628
+ "origSize": 1047,
629
+ "renderedExports": [
630
+ "formDataToObject"
631
+ ],
632
+ "removedExports": [],
633
+ "dependents": [
634
+ "/src/unstable-core-do-not-import.ts"
635
+ ],
636
+ "percent": 0.52,
637
+ "reduction": 0
638
+ },
639
+ {
640
+ "id": "/src/observable/behaviorSubject.ts",
641
+ "size": 967,
642
+ "origSize": 1441,
643
+ "renderedExports": [
644
+ "behaviorSubject"
645
+ ],
646
+ "removedExports": [],
647
+ "dependents": [
648
+ "/src/observable/index.ts"
649
+ ],
650
+ "percent": 0.48,
651
+ "reduction": 32.89
652
+ },
653
+ {
654
+ "id": "/src/adapters/standalone.ts",
655
+ "size": 958,
656
+ "origSize": 3103,
657
+ "renderedExports": [
658
+ "createHTTPHandler",
659
+ "createHTTPServer",
660
+ "createHTTP2Handler"
661
+ ],
662
+ "removedExports": [],
663
+ "dependents": [],
664
+ "percent": 0.47,
665
+ "reduction": 69.13
666
+ },
667
+ {
668
+ "id": "/src/adapters/express.ts",
669
+ "size": 887,
670
+ "origSize": 1344,
671
+ "renderedExports": [
672
+ "createExpressMiddleware"
673
+ ],
674
+ "removedExports": [],
675
+ "dependents": [],
676
+ "percent": 0.44,
677
+ "reduction": 34
678
+ },
679
+ {
680
+ "id": "/src/unstable-core-do-not-import/stream/tracked.ts",
681
+ "size": 780,
682
+ "origSize": 1396,
683
+ "renderedExports": [
684
+ "sse",
685
+ "isTrackedEnvelope",
686
+ "tracked"
687
+ ],
688
+ "removedExports": [],
689
+ "dependents": [
690
+ "/src/unstable-core-do-not-import.ts",
691
+ "/src/unstable-core-do-not-import/stream/sse.ts"
692
+ ],
693
+ "percent": 0.39,
694
+ "reduction": 44.13
695
+ },
696
+ {
697
+ "id": "/src/adapters/aws-lambda/index.ts",
698
+ "size": 759,
699
+ "origSize": 2273,
700
+ "renderedExports": [
701
+ "awsLambdaRequestHandler"
702
+ ],
703
+ "removedExports": [],
704
+ "dependents": [],
705
+ "percent": 0.37,
706
+ "reduction": 66.61
707
+ },
708
+ {
709
+ "id": "/src/vendor/standard-schema-v1/error.ts",
710
+ "size": 696,
711
+ "origSize": 507,
712
+ "renderedExports": [
713
+ "StandardSchemaV1Error"
714
+ ],
715
+ "removedExports": [],
716
+ "dependents": [
717
+ "/src/unstable-core-do-not-import.ts",
718
+ "/src/unstable-core-do-not-import/parser.ts"
719
+ ],
720
+ "percent": 0.34,
721
+ "reduction": 0
722
+ },
723
+ {
724
+ "id": "/src/unstable-core-do-not-import/stream/utils/readableStreamFrom.ts",
725
+ "size": 651,
726
+ "origSize": 660,
727
+ "renderedExports": [
728
+ "readableStreamFrom"
729
+ ],
730
+ "removedExports": [],
731
+ "dependents": [
732
+ "/src/unstable-core-do-not-import/stream/jsonl.ts",
733
+ "/src/unstable-core-do-not-import/stream/sse.ts"
734
+ ],
735
+ "percent": 0.32,
736
+ "reduction": 1.36
737
+ },
738
+ {
739
+ "id": "/src/unstable-core-do-not-import/error/getErrorShape.ts",
740
+ "size": 621,
741
+ "origSize": 1106,
742
+ "renderedExports": [
743
+ "getErrorShape"
744
+ ],
745
+ "removedExports": [],
746
+ "dependents": [
747
+ "/src/unstable-core-do-not-import.ts",
748
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts"
749
+ ],
750
+ "percent": 0.31,
751
+ "reduction": 43.85
752
+ },
753
+ {
754
+ "id": "/src/unstable-core-do-not-import/stream/utils/timerResource.ts",
755
+ "size": 527,
756
+ "origSize": 659,
757
+ "renderedExports": [
758
+ "disposablePromiseTimerResult",
759
+ "timerResource"
760
+ ],
761
+ "removedExports": [],
762
+ "dependents": [
763
+ "/src/unstable-core-do-not-import/stream/sse.ts",
764
+ "/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts",
765
+ "/src/unstable-core-do-not-import/stream/utils/withPing.ts"
766
+ ],
767
+ "percent": 0.26,
768
+ "reduction": 20.03
769
+ },
770
+ {
771
+ "id": "/src/unstable-core-do-not-import/rootConfig.ts",
772
+ "size": 343,
773
+ "origSize": 3318,
774
+ "renderedExports": [
775
+ "isServerDefault"
776
+ ],
777
+ "removedExports": [],
778
+ "dependents": [
779
+ "/src/unstable-core-do-not-import.ts",
780
+ "/src/unstable-core-do-not-import/initTRPC.ts"
781
+ ],
782
+ "percent": 0.17,
783
+ "reduction": 89.66
784
+ },
785
+ {
786
+ "id": "/src/unstable-core-do-not-import/stream/utils/createDeferred.ts",
787
+ "size": 309,
788
+ "origSize": 424,
789
+ "renderedExports": [
790
+ "createDeferred"
791
+ ],
792
+ "removedExports": [],
793
+ "dependents": [
794
+ "/src/unstable-core-do-not-import.ts",
795
+ "/src/unstable-core-do-not-import/stream/jsonl.ts",
796
+ "/src/unstable-core-do-not-import/stream/utils/mergeAsyncIterables.ts"
797
+ ],
798
+ "percent": 0.15,
799
+ "reduction": 27.12
800
+ },
801
+ {
802
+ "id": "/src/unstable-core-do-not-import/http/contentTypeParsers.ts",
803
+ "size": 277,
804
+ "origSize": 878,
805
+ "renderedExports": [
806
+ "octetInputParser"
807
+ ],
808
+ "removedExports": [],
809
+ "dependents": [
810
+ "/src/unstable-core-do-not-import.ts"
811
+ ],
812
+ "percent": 0.14,
813
+ "reduction": 68.45
814
+ },
815
+ {
816
+ "id": "/src/adapters/next-app-dir/notFound.ts",
817
+ "size": 218,
818
+ "origSize": 342,
819
+ "renderedExports": [
820
+ "notFound"
821
+ ],
822
+ "removedExports": [],
823
+ "dependents": [
824
+ "/src/adapters/next-app-dir.ts"
825
+ ],
826
+ "percent": 0.11,
827
+ "reduction": 36.26
828
+ },
829
+ {
830
+ "id": "/src/unstable-core-do-not-import/http/abortError.ts",
831
+ "size": 204,
832
+ "origSize": 325,
833
+ "renderedExports": [
834
+ "isAbortError",
835
+ "throwAbortError"
836
+ ],
837
+ "removedExports": [],
838
+ "dependents": [
839
+ "/src/unstable-core-do-not-import.ts",
840
+ "/src/unstable-core-do-not-import/stream/sse.ts",
841
+ "/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts"
842
+ ],
843
+ "percent": 0.1,
844
+ "reduction": 37.23
845
+ },
846
+ {
847
+ "id": "/src/unstable-core-do-not-import/procedure.ts",
848
+ "size": 75,
849
+ "origSize": 2473,
850
+ "renderedExports": [
851
+ "procedureTypes"
852
+ ],
853
+ "removedExports": [],
854
+ "dependents": [
855
+ "/src/unstable-core-do-not-import.ts",
856
+ "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts"
857
+ ],
858
+ "percent": 0.04,
859
+ "reduction": 96.97
860
+ },
861
+ {
862
+ "id": "/src/unstable-core-do-not-import/error/formatter.ts",
863
+ "size": 60,
864
+ "origSize": 984,
865
+ "renderedExports": [
866
+ "defaultFormatter"
867
+ ],
868
+ "removedExports": [],
869
+ "dependents": [
870
+ "/src/unstable-core-do-not-import.ts",
871
+ "/src/unstable-core-do-not-import/router.ts",
872
+ "/src/unstable-core-do-not-import/initTRPC.ts"
873
+ ],
874
+ "percent": 0.03,
875
+ "reduction": 93.9
876
+ },
877
+ {
878
+ "id": "/src/http.ts",
879
+ "size": 0,
880
+ "origSize": 37,
881
+ "renderedExports": [],
882
+ "removedExports": [],
883
+ "dependents": [
884
+ "/src/adapters/ws.ts"
885
+ ],
886
+ "percent": 0,
887
+ "reduction": 100
888
+ },
889
+ {
890
+ "id": "/src/index.ts",
891
+ "size": 0,
892
+ "origSize": 32,
893
+ "renderedExports": [],
894
+ "removedExports": [],
895
+ "dependents": [],
896
+ "percent": 0,
897
+ "reduction": 100
898
+ },
899
+ {
900
+ "id": "/src/rpc.ts",
901
+ "size": 0,
902
+ "origSize": 36,
903
+ "renderedExports": [],
904
+ "removedExports": [],
905
+ "dependents": [],
906
+ "percent": 0,
907
+ "reduction": 100
908
+ },
909
+ {
910
+ "id": "/src/unstable-core-do-not-import.ts",
911
+ "size": 0,
912
+ "origSize": 2584,
913
+ "renderedExports": [],
914
+ "removedExports": [],
915
+ "dependents": [
916
+ "/src/adapters/express.ts",
917
+ "/src/adapters/standalone.ts",
918
+ "/src/adapters/next.ts",
919
+ "/src/adapters/ws.ts",
920
+ "/src/adapters/node-http/nodeHTTPRequestHandler.ts",
921
+ "/src/adapters/next-app-dir/nextAppDirCaller.ts",
922
+ "/src/adapters/node-http/writeResponse.ts"
923
+ ],
924
+ "percent": 0,
925
+ "reduction": 100
926
+ },
927
+ {
928
+ "id": "/src/shared.ts",
929
+ "size": 0,
930
+ "origSize": 653,
931
+ "renderedExports": [],
932
+ "removedExports": [],
933
+ "dependents": [],
934
+ "percent": 0,
935
+ "reduction": 100
936
+ },
937
+ {
938
+ "id": "/src/adapters/next-app-dir.ts",
939
+ "size": 0,
940
+ "origSize": 347,
941
+ "renderedExports": [],
942
+ "removedExports": [],
943
+ "dependents": [],
944
+ "percent": 0,
945
+ "reduction": 100
946
+ },
947
+ {
948
+ "id": "/src/observable/index.ts",
949
+ "size": 0,
950
+ "origSize": 474,
951
+ "renderedExports": [],
952
+ "removedExports": [],
953
+ "dependents": [
954
+ "/src/adapters/ws.ts"
955
+ ],
956
+ "percent": 0,
957
+ "reduction": 100
958
+ },
959
+ {
960
+ "id": "/src/adapters/fastify/index.ts",
961
+ "size": 0,
962
+ "origSize": 78,
963
+ "renderedExports": [],
964
+ "removedExports": [],
965
+ "dependents": [],
966
+ "percent": 0,
967
+ "reduction": 100
968
+ },
969
+ {
970
+ "id": "/src/adapters/node-http/index.ts",
971
+ "size": 0,
972
+ "origSize": 111,
973
+ "renderedExports": [],
974
+ "removedExports": [],
975
+ "dependents": [
976
+ "/src/adapters/express.ts",
977
+ "/src/adapters/standalone.ts",
978
+ "/src/adapters/next.ts",
979
+ "/src/adapters/ws.ts",
980
+ "/src/adapters/fastify/fastifyRequestHandler.ts"
981
+ ],
982
+ "percent": 0,
983
+ "reduction": 100
984
+ },
985
+ {
986
+ "id": "/src/adapters/fetch/index.ts",
987
+ "size": 0,
988
+ "origSize": 64,
989
+ "renderedExports": [],
990
+ "removedExports": [],
991
+ "dependents": [],
992
+ "percent": 0,
993
+ "reduction": 100
994
+ }
995
+ ],
996
+ "moduleCount": 64
997
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"TRPCError.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/error/TRPCError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAMxD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS,CA0BrE;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,CAoBjE;AAED,qBAAa,SAAU,SAAQ,KAAK;IAGlC,SAAyB,KAAK,CAAC,EAAE,KAAK,CAAC;IACvC,SAAgB,IAAI,4XAAC;gBAET,IAAI,EAAE;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,mBAAmB,CAAC;QAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;CAgBF"}
1
+ {"version":3,"file":"TRPCError.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/error/TRPCError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAMxD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS,CA0BrE;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,CAoBjE;AAED,qBAAa,SAAU,SAAQ,KAAK;IAGlC,SAAyB,KAAK,CAAC,EAAE,KAAK,CAAC;IACvC,SAAgB,IAAI,4XAAC;gBAET,IAAI,EAAE;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,mBAAmB,CAAC;QAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;CAYF"}
@@ -71,10 +71,7 @@ class TRPCError extends Error {
71
71
  _define_property(this, "cause", void 0), _define_property(this, "code", void 0);
72
72
  this.code = opts.code;
73
73
  this.name = 'TRPCError';
74
- if (!this.cause) {
75
- // < ES2022 / < Node 16.9.0 compatability
76
- this.cause = cause;
77
- }
74
+ this.cause ?? (this.cause = cause);
78
75
  }
79
76
  }
80
77
 
@@ -69,10 +69,7 @@ class TRPCError extends Error {
69
69
  _define_property(this, "cause", void 0), _define_property(this, "code", void 0);
70
70
  this.code = opts.code;
71
71
  this.name = 'TRPCError';
72
- if (!this.cause) {
73
- // < ES2022 / < Node 16.9.0 compatability
74
- this.cause = cause;
75
- }
72
+ this.cause ?? (this.cause = cause);
76
73
  }
77
74
  }
78
75
 
@@ -1 +1 @@
1
- {"version":3,"file":"contentType.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/http/contentType.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAG/D,OAAO,KAAK,EAAoB,eAAe,EAAE,MAAM,SAAS,CAAC;AAEjE,KAAK,qBAAqB,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,EAAE,GAAG,GAAG,IAAI,CAAC;IAChB,YAAY,EAAE,eAAe,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC;CACnB,CAAC;AA+QF,wBAAsB,cAAc,CAClC,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,eAAe,CAAC,CAG1B"}
1
+ {"version":3,"file":"contentType.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/http/contentType.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAG/D,OAAO,KAAK,EAAoB,eAAe,EAAE,MAAM,SAAS,CAAC;AAEjE,KAAK,qBAAqB,GAAG;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,EAAE,GAAG,GAAG,IAAI,CAAC;IAChB,YAAY,EAAE,eAAe,CAAC;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,SAAS,CAAC;CACnB,CAAC;AA8QF,wBAAsB,cAAc,CAClC,IAAI,EAAE,qBAAqB,GAC1B,OAAO,CAAC,eAAe,CAAC,CAG1B"}
@@ -18,19 +18,17 @@ var parseConnectionParams = require('./parseConnectionParams.js');
18
18
  if (value !== utils.unsetMarker) {
19
19
  return value;
20
20
  }
21
- if (promise === null) {
22
- // dedupes promises and catches errors
23
- promise = fn().catch((cause)=>{
24
- if (cause instanceof TRPCError.TRPCError) {
25
- throw cause;
26
- }
27
- throw new TRPCError.TRPCError({
28
- code: 'BAD_REQUEST',
29
- message: cause instanceof Error ? cause.message : 'Invalid input',
30
- cause
31
- });
21
+ // dedupes promises and catches errors
22
+ promise ?? (promise = fn().catch((cause)=>{
23
+ if (cause instanceof TRPCError.TRPCError) {
24
+ throw cause;
25
+ }
26
+ throw new TRPCError.TRPCError({
27
+ code: 'BAD_REQUEST',
28
+ message: cause instanceof Error ? cause.message : 'Invalid input',
29
+ cause
32
30
  });
33
- }
31
+ }));
34
32
  value = await promise;
35
33
  promise = null;
36
34
  return value;
@@ -16,19 +16,17 @@ import { parseConnectionParamsFromString } from './parseConnectionParams.mjs';
16
16
  if (value !== unsetMarker) {
17
17
  return value;
18
18
  }
19
- if (promise === null) {
20
- // dedupes promises and catches errors
21
- promise = fn().catch((cause)=>{
22
- if (cause instanceof TRPCError) {
23
- throw cause;
24
- }
25
- throw new TRPCError({
26
- code: 'BAD_REQUEST',
27
- message: cause instanceof Error ? cause.message : 'Invalid input',
28
- cause
29
- });
19
+ // dedupes promises and catches errors
20
+ promise ?? (promise = fn().catch((cause)=>{
21
+ if (cause instanceof TRPCError) {
22
+ throw cause;
23
+ }
24
+ throw new TRPCError({
25
+ code: 'BAD_REQUEST',
26
+ message: cause instanceof Error ? cause.message : 'Invalid input',
27
+ cause
30
28
  });
31
- }
29
+ }));
32
30
  value = await promise;
33
31
  promise = null;
34
32
  return value;
@@ -42,7 +42,7 @@ export interface HTTPBaseHandlerOptions<TRouter extends AnyRouter, TRequest> ext
42
42
  responseMeta?: ResponseMetaFn<TRouter>;
43
43
  }
44
44
  export type TRPCAcceptHeader = 'application/jsonl';
45
- interface TRPCRequestInfoProcedureCall {
45
+ export interface TRPCRequestInfoProcedureCall {
46
46
  path: string;
47
47
  /**
48
48
  * Read the raw input (deduped and memoized)
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/http/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACd,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAErC;;GAEG;AACH,KAAK,WAAW,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC;AAE3C,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE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,EAAE,QAAQ,CAAC,CAAC;IAC9C;;OAEG;IACH,QAAQ,CAAC,EAAE;QACT;;WAEG;QACH,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;IACF,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB"}
@@ -254,7 +254,7 @@ async function withTimeout(opts) {
254
254
  _es = null;
255
255
  });
256
256
  eventSource.addEventListener('error', (event)=>{
257
- if (eventSource.readyState === EventSource.CLOSED) {
257
+ if (eventSource.readyState === eventSource.CLOSED) {
258
258
  controller.error(event);
259
259
  } else {
260
260
  controller.enqueue({
@@ -252,7 +252,7 @@ async function withTimeout(opts) {
252
252
  _es = null;
253
253
  });
254
254
  eventSource.addEventListener('error', (event)=>{
255
- if (eventSource.readyState === EventSource.CLOSED) {
255
+ if (eventSource.readyState === eventSource.CLOSED) {
256
256
  controller.error(event);
257
257
  } else {
258
258
  controller.enqueue({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/server",
3
- "version": "11.1.2",
3
+ "version": "11.1.3-canary.10+cc2c1e9d2",
4
4
  "description": "The tRPC server library",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -127,13 +127,13 @@
127
127
  "@types/react-dom": "^19.1.1",
128
128
  "@types/ws": "^8.2.0",
129
129
  "devalue": "^5.0.0",
130
- "eslint": "^9.21.0",
130
+ "eslint": "^9.26.0",
131
131
  "express": "^5.0.0",
132
132
  "fastify": "^4.16.0",
133
133
  "fastify-plugin": "^5.0.0",
134
134
  "hash-sum": "^2.0.0",
135
135
  "myzod": "^1.3.1",
136
- "next": "^15.1.7",
136
+ "next": "^15.3.1",
137
137
  "react": "^19.1.0",
138
138
  "react-dom": "^19.1.0",
139
139
  "rollup": "^4.34.8",
@@ -144,7 +144,7 @@
144
144
  "valibot": "1.0.0",
145
145
  "ws": "^8.0.0",
146
146
  "yup": "^1.0.0",
147
- "zod": "^3.24.2"
147
+ "zod": "^3.24.4"
148
148
  },
149
149
  "funding": [
150
150
  "https://trpc.io/sponsor"
@@ -152,5 +152,5 @@
152
152
  "peerDependencies": {
153
153
  "typescript": ">=5.7.2"
154
154
  },
155
- "gitHead": "775a1f19c8b275a481075b11720d9b6b842ab51c"
155
+ "gitHead": "cc2c1e9d2cf7be1ce5b4396992f80c409d23dc6a"
156
156
  }
@@ -548,13 +548,13 @@ export function handleKeepAlive(
548
548
  const scheduleTimeout = () => {
549
549
  timeout = setTimeout(() => {
550
550
  client.terminate();
551
- }, pongWaitMs);
551
+ }, pongWaitMs) as any;
552
552
  };
553
553
  ping = setTimeout(() => {
554
554
  client.send('PING');
555
555
 
556
556
  scheduleTimeout();
557
- }, pingMs);
557
+ }, pingMs) as any;
558
558
  };
559
559
 
560
560
  const onMessage = () => {
@@ -74,10 +74,6 @@ export class TRPCError extends Error {
74
74
 
75
75
  this.code = opts.code;
76
76
  this.name = 'TRPCError';
77
-
78
- if (!this.cause) {
79
- // < ES2022 / < Node 16.9.0 compatability
80
- this.cause = cause;
81
- }
77
+ this.cause ??= cause;
82
78
  }
83
79
  }
@@ -34,19 +34,18 @@ function memo<TReturn>(fn: () => Promise<TReturn>) {
34
34
  if (value !== unsetMarker) {
35
35
  return value;
36
36
  }
37
- if (promise === null) {
38
- // dedupes promises and catches errors
39
- promise = fn().catch((cause) => {
40
- if (cause instanceof TRPCError) {
41
- throw cause;
42
- }
43
- throw new TRPCError({
44
- code: 'BAD_REQUEST',
45
- message: cause instanceof Error ? cause.message : 'Invalid input',
46
- cause,
47
- });
37
+
38
+ // dedupes promises and catches errors
39
+ promise ??= fn().catch((cause) => {
40
+ if (cause instanceof TRPCError) {
41
+ throw cause;
42
+ }
43
+ throw new TRPCError({
44
+ code: 'BAD_REQUEST',
45
+ message: cause instanceof Error ? cause.message : 'Invalid input',
46
+ cause,
48
47
  });
49
- }
48
+ });
50
49
 
51
50
  value = await promise;
52
51
  promise = null;
@@ -57,7 +57,7 @@ export interface HTTPBaseHandlerOptions<TRouter extends AnyRouter, TRequest>
57
57
 
58
58
  export type TRPCAcceptHeader = 'application/jsonl';
59
59
 
60
- interface TRPCRequestInfoProcedureCall {
60
+ export interface TRPCRequestInfoProcedureCall {
61
61
  path: string;
62
62
  /**
63
63
  * Read the raw input (deduped and memoized)
@@ -346,7 +346,7 @@ export function sseStreamConsumer<TConfig extends ConsumerConfig>(
346
346
  _es = null;
347
347
  });
348
348
  eventSource.addEventListener('error', (event) => {
349
- if (eventSource.readyState === EventSource.CLOSED) {
349
+ if (eventSource.readyState === eventSource.CLOSED) {
350
350
  controller.error(event);
351
351
  } else {
352
352
  controller.enqueue({