@trpc/server 11.0.0-rc.589 → 11.0.0-rc.591

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.
Files changed (37) hide show
  1. package/dist/bundle-analysis.json +154 -147
  2. package/dist/unstable-core-do-not-import/http/getHTTPStatusCode.d.ts +6 -1
  3. package/dist/unstable-core-do-not-import/http/getHTTPStatusCode.d.ts.map +1 -1
  4. package/dist/unstable-core-do-not-import/http/getHTTPStatusCode.js +27 -0
  5. package/dist/unstable-core-do-not-import/http/getHTTPStatusCode.mjs +24 -1
  6. package/dist/unstable-core-do-not-import/http/resolveResponse.d.ts.map +1 -1
  7. package/dist/unstable-core-do-not-import/http/resolveResponse.js +30 -16
  8. package/dist/unstable-core-do-not-import/http/resolveResponse.mjs +31 -17
  9. package/dist/unstable-core-do-not-import/rpc/codes.d.ts +2 -9
  10. package/dist/unstable-core-do-not-import/rpc/codes.d.ts.map +1 -1
  11. package/dist/unstable-core-do-not-import/stream/sse.d.ts +1 -0
  12. package/dist/unstable-core-do-not-import/stream/sse.d.ts.map +1 -1
  13. package/dist/unstable-core-do-not-import/stream/sse.js +3 -2
  14. package/dist/unstable-core-do-not-import/stream/sse.mjs +3 -2
  15. package/dist/unstable-core-do-not-import/stream/utils/asyncIterable.d.ts +2 -1
  16. package/dist/unstable-core-do-not-import/stream/utils/asyncIterable.d.ts.map +1 -1
  17. package/dist/unstable-core-do-not-import/stream/utils/asyncIterable.js +2 -2
  18. package/dist/unstable-core-do-not-import/stream/utils/asyncIterable.mjs +2 -2
  19. package/dist/unstable-core-do-not-import/stream/utils/promiseTimer.js +1 -1
  20. package/dist/unstable-core-do-not-import/stream/utils/promiseTimer.mjs +1 -1
  21. package/dist/unstable-core-do-not-import/types.d.ts +6 -0
  22. package/dist/unstable-core-do-not-import/types.d.ts.map +1 -1
  23. package/dist/unstable-core-do-not-import/utils.d.ts +13 -0
  24. package/dist/unstable-core-do-not-import/utils.d.ts.map +1 -1
  25. package/dist/unstable-core-do-not-import/utils.js +41 -0
  26. package/dist/unstable-core-do-not-import/utils.mjs +39 -1
  27. package/dist/unstable-core-do-not-import.js +7 -0
  28. package/dist/unstable-core-do-not-import.mjs +2 -2
  29. package/package.json +2 -2
  30. package/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts +35 -3
  31. package/src/unstable-core-do-not-import/http/resolveResponse.ts +39 -21
  32. package/src/unstable-core-do-not-import/rpc/codes.ts +2 -10
  33. package/src/unstable-core-do-not-import/stream/sse.ts +14 -4
  34. package/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts +3 -2
  35. package/src/unstable-core-do-not-import/stream/utils/promiseTimer.ts +1 -1
  36. package/src/unstable-core-do-not-import/types.ts +11 -0
  37. package/src/unstable-core-do-not-import/utils.ts +48 -0
@@ -1,12 +1,12 @@
1
1
  {
2
- "bundleSize": 144960,
3
- "bundleOrigSize": 191903,
4
- "bundleReduction": 24.46,
2
+ "bundleSize": 147652,
3
+ "bundleOrigSize": 194596,
4
+ "bundleReduction": 24.12,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/unstable-core-do-not-import/http/resolveResponse.ts",
8
- "size": 18439,
9
- "origSize": 17070,
8
+ "size": 19166,
9
+ "origSize": 17764,
10
10
  "renderedExports": [
11
11
  "resolveResponse"
12
12
  ],
@@ -14,7 +14,7 @@
14
14
  "dependents": [
15
15
  "/src/unstable-core-do-not-import.ts"
16
16
  ],
17
- "percent": 12.72,
17
+ "percent": 12.98,
18
18
  "reduction": 0
19
19
  },
20
20
  {
@@ -31,7 +31,7 @@
31
31
  "/src/unstable-core-do-not-import.ts",
32
32
  "/src/unstable-core-do-not-import/http/resolveResponse.ts"
33
33
  ],
34
- "percent": 12.12,
34
+ "percent": 11.9,
35
35
  "reduction": 4.86
36
36
  },
37
37
  {
@@ -47,13 +47,13 @@
47
47
  "dependents": [
48
48
  "/src/adapters/fastify/fastifyTRPCPlugin.ts"
49
49
  ],
50
- "percent": 11.23,
50
+ "percent": 11.03,
51
51
  "reduction": 0
52
52
  },
53
53
  {
54
54
  "id": "/src/unstable-core-do-not-import/stream/sse.ts",
55
- "size": 9006,
56
- "origSize": 10511,
55
+ "size": 9093,
56
+ "origSize": 10673,
57
57
  "renderedExports": [
58
58
  "sseStreamProducer",
59
59
  "sseStreamConsumer",
@@ -64,8 +64,8 @@
64
64
  "/src/unstable-core-do-not-import.ts",
65
65
  "/src/unstable-core-do-not-import/http/resolveResponse.ts"
66
66
  ],
67
- "percent": 6.21,
68
- "reduction": 14.32
67
+ "percent": 6.16,
68
+ "reduction": 14.8
69
69
  },
70
70
  {
71
71
  "id": "/src/unstable-core-do-not-import/http/contentType.ts",
@@ -79,7 +79,7 @@
79
79
  "/src/unstable-core-do-not-import.ts",
80
80
  "/src/unstable-core-do-not-import/http/resolveResponse.ts"
81
81
  ],
82
- "percent": 5.3,
82
+ "percent": 5.21,
83
83
  "reduction": 0
84
84
  },
85
85
  {
@@ -97,7 +97,7 @@
97
97
  "/src/unstable-core-do-not-import.ts",
98
98
  "/src/unstable-core-do-not-import/initTRPC.ts"
99
99
  ],
100
- "percent": 4.43,
100
+ "percent": 4.35,
101
101
  "reduction": 40.09
102
102
  },
103
103
  {
@@ -112,7 +112,7 @@
112
112
  "/src/unstable-core-do-not-import.ts",
113
113
  "/src/unstable-core-do-not-import/initTRPC.ts"
114
114
  ],
115
- "percent": 4,
115
+ "percent": 3.92,
116
116
  "reduction": 64.74
117
117
  },
118
118
  {
@@ -126,7 +126,7 @@
126
126
  "dependents": [
127
127
  "/src/adapters/aws-lambda/index.ts"
128
128
  ],
129
- "percent": 3.74,
129
+ "percent": 3.67,
130
130
  "reduction": 11.38
131
131
  },
132
132
  {
@@ -145,7 +145,7 @@
145
145
  "/src/unstable-core-do-not-import/http/resolveResponse.ts",
146
146
  "/src/observable/operators.ts"
147
147
  ],
148
- "percent": 3.09,
148
+ "percent": 3.03,
149
149
  "reduction": 0
150
150
  },
151
151
  {
@@ -160,7 +160,7 @@
160
160
  "dependents": [
161
161
  "/src/adapters/node-http/index.ts"
162
162
  ],
163
- "percent": 3.08,
163
+ "percent": 3.02,
164
164
  "reduction": 2.49
165
165
  },
166
166
  {
@@ -174,7 +174,7 @@
174
174
  "dependents": [
175
175
  "/src/adapters/next-app-dir.ts"
176
176
  ],
177
- "percent": 2.22,
177
+ "percent": 2.18,
178
178
  "reduction": 22.57
179
179
  },
180
180
  {
@@ -190,7 +190,7 @@
190
190
  "dependents": [
191
191
  "/src/observable/index.ts"
192
192
  ],
193
- "percent": 1.9,
193
+ "percent": 1.87,
194
194
  "reduction": 0
195
195
  },
196
196
  {
@@ -206,11 +206,11 @@
206
206
  "removedExports": [],
207
207
  "dependents": [
208
208
  "/src/unstable-core-do-not-import.ts",
209
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
209
210
  "/src/unstable-core-do-not-import/initTRPC.ts",
210
- "/src/unstable-core-do-not-import/router.ts",
211
- "/src/unstable-core-do-not-import/http/resolveResponse.ts"
211
+ "/src/unstable-core-do-not-import/router.ts"
212
212
  ],
213
- "percent": 1.89,
213
+ "percent": 1.86,
214
214
  "reduction": 45.94
215
215
  },
216
216
  {
@@ -224,7 +224,7 @@
224
224
  "dependents": [
225
225
  "/src/unstable-core-do-not-import.ts"
226
226
  ],
227
- "percent": 1.86,
227
+ "percent": 1.83,
228
228
  "reduction": 40.98
229
229
  },
230
230
  {
@@ -244,9 +244,47 @@
244
244
  "/src/unstable-core-do-not-import/initTRPC.ts",
245
245
  "/src/unstable-core-do-not-import/procedureBuilder.ts"
246
246
  ],
247
- "percent": 1.81,
247
+ "percent": 1.78,
248
248
  "reduction": 55.78
249
249
  },
250
+ {
251
+ "id": "/src/unstable-core-do-not-import/utils.ts",
252
+ "size": 2494,
253
+ "origSize": 3008,
254
+ "renderedExports": [
255
+ "unsetMarker",
256
+ "mergeWithoutOverrides",
257
+ "isObject",
258
+ "isFunction",
259
+ "omitPrototype",
260
+ "isAsyncIterable",
261
+ "run",
262
+ "noop",
263
+ "identity",
264
+ "assert",
265
+ "sleep",
266
+ "abortSignalsAnyPonyfill"
267
+ ],
268
+ "removedExports": [],
269
+ "dependents": [
270
+ "/src/unstable-core-do-not-import.ts",
271
+ "/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
272
+ "/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
273
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
274
+ "/src/unstable-core-do-not-import/error/TRPCError.ts",
275
+ "/src/unstable-core-do-not-import/transformer.ts",
276
+ "/src/unstable-core-do-not-import/middleware.ts",
277
+ "/src/unstable-core-do-not-import/router.ts",
278
+ "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
279
+ "/src/unstable-core-do-not-import/http/contentType.ts",
280
+ "/src/unstable-core-do-not-import/procedureBuilder.ts",
281
+ "/src/unstable-core-do-not-import/stream/jsonl.ts",
282
+ "/src/unstable-core-do-not-import/stream/sse.ts",
283
+ "/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts"
284
+ ],
285
+ "percent": 1.69,
286
+ "reduction": 17.09
287
+ },
250
288
  {
251
289
  "id": "/src/unstable-core-do-not-import/createProxy.ts",
252
290
  "size": 2329,
@@ -260,7 +298,7 @@
260
298
  "/src/unstable-core-do-not-import.ts",
261
299
  "/src/unstable-core-do-not-import/router.ts"
262
300
  ],
263
- "percent": 1.61,
301
+ "percent": 1.58,
264
302
  "reduction": 0
265
303
  },
266
304
  {
@@ -274,7 +312,7 @@
274
312
  "dependents": [
275
313
  "/src/adapters/fetch/index.ts"
276
314
  ],
277
- "percent": 1.56,
315
+ "percent": 1.53,
278
316
  "reduction": 2.17
279
317
  },
280
318
  {
@@ -289,9 +327,30 @@
289
327
  "/src/adapters/node-http/index.ts",
290
328
  "/src/adapters/node-http/nodeHTTPRequestHandler.ts"
291
329
  ],
292
- "percent": 1.52,
330
+ "percent": 1.49,
293
331
  "reduction": 14.72
294
332
  },
333
+ {
334
+ "id": "/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
335
+ "size": 2087,
336
+ "origSize": 2562,
337
+ "renderedExports": [
338
+ "JSONRPC2_TO_HTTP_CODE",
339
+ "HTTP_CODE_TO_JSONRPC2",
340
+ "getStatusCodeFromKey",
341
+ "getStatusKeyFromCode",
342
+ "getHTTPStatusCode",
343
+ "getHTTPStatusCodeFromError"
344
+ ],
345
+ "removedExports": [],
346
+ "dependents": [
347
+ "/src/unstable-core-do-not-import.ts",
348
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
349
+ "/src/unstable-core-do-not-import/error/getErrorShape.ts"
350
+ ],
351
+ "percent": 1.41,
352
+ "reduction": 18.54
353
+ },
295
354
  {
296
355
  "id": "/src/adapters/next-app-dir/rethrowNextErrors.ts",
297
356
  "size": 2050,
@@ -303,7 +362,7 @@
303
362
  "dependents": [
304
363
  "/src/adapters/next-app-dir/nextAppDirCaller.ts"
305
364
  ],
306
- "percent": 1.41,
365
+ "percent": 1.39,
307
366
  "reduction": 5.79
308
367
  },
309
368
  {
@@ -317,7 +376,7 @@
317
376
  "dependents": [
318
377
  "/src/adapters/fastify/index.ts"
319
378
  ],
320
- "percent": 1.23,
379
+ "percent": 1.2,
321
380
  "reduction": 29.88
322
381
  },
323
382
  {
@@ -332,17 +391,17 @@
332
391
  "removedExports": [],
333
392
  "dependents": [
334
393
  "/src/unstable-core-do-not-import.ts",
335
- "/src/unstable-core-do-not-import/middleware.ts",
336
- "/src/unstable-core-do-not-import/router.ts",
337
394
  "/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
338
395
  "/src/unstable-core-do-not-import/http/resolveResponse.ts",
339
396
  "/src/unstable-core-do-not-import/http/toURL.ts",
397
+ "/src/unstable-core-do-not-import/middleware.ts",
398
+ "/src/unstable-core-do-not-import/router.ts",
340
399
  "/src/unstable-core-do-not-import/http/contentType.ts",
341
400
  "/src/unstable-core-do-not-import/procedureBuilder.ts",
342
401
  "/src/unstable-core-do-not-import/stream/jsonl.ts",
343
402
  "/src/unstable-core-do-not-import/stream/sse.ts"
344
403
  ],
345
- "percent": 1.2,
404
+ "percent": 1.17,
346
405
  "reduction": 19.47
347
406
  },
348
407
  {
@@ -354,26 +413,13 @@
354
413
  ],
355
414
  "removedExports": [],
356
415
  "dependents": [],
357
- "percent": 1.17,
416
+ "percent": 1.15,
358
417
  "reduction": 19.29
359
418
  },
360
- {
361
- "id": "/src/unstable-core-do-not-import/rpc/codes.ts",
362
- "size": 1611,
363
- "origSize": 2221,
364
- "renderedExports": [
365
- "TRPC_ERROR_CODES_BY_KEY",
366
- "TRPC_ERROR_CODES_BY_NUMBER"
367
- ],
368
- "removedExports": [],
369
- "dependents": [],
370
- "percent": 1.11,
371
- "reduction": 27.47
372
- },
373
419
  {
374
420
  "id": "/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts",
375
- "size": 1609,
376
- "origSize": 1671,
421
+ "size": 1655,
422
+ "origSize": 1735,
377
423
  "renderedExports": [
378
424
  "withCancel",
379
425
  "takeWithGrace"
@@ -382,25 +428,21 @@
382
428
  "dependents": [
383
429
  "/src/unstable-core-do-not-import/stream/sse.ts"
384
430
  ],
385
- "percent": 1.11,
386
- "reduction": 3.71
431
+ "percent": 1.12,
432
+ "reduction": 4.61
387
433
  },
388
434
  {
389
- "id": "/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
390
- "size": 1438,
391
- "origSize": 1727,
435
+ "id": "/src/unstable-core-do-not-import/rpc/codes.ts",
436
+ "size": 1611,
437
+ "origSize": 1960,
392
438
  "renderedExports": [
393
- "getHTTPStatusCode",
394
- "getHTTPStatusCodeFromError"
439
+ "TRPC_ERROR_CODES_BY_KEY",
440
+ "TRPC_ERROR_CODES_BY_NUMBER"
395
441
  ],
396
442
  "removedExports": [],
397
- "dependents": [
398
- "/src/unstable-core-do-not-import.ts",
399
- "/src/unstable-core-do-not-import/error/getErrorShape.ts",
400
- "/src/unstable-core-do-not-import/http/resolveResponse.ts"
401
- ],
402
- "percent": 0.99,
403
- "reduction": 16.73
443
+ "dependents": [],
444
+ "percent": 1.09,
445
+ "reduction": 17.81
404
446
  },
405
447
  {
406
448
  "id": "/src/adapters/next.ts",
@@ -411,43 +453,8 @@
411
453
  ],
412
454
  "removedExports": [],
413
455
  "dependents": [],
414
- "percent": 0.91,
415
- "reduction": 35.1
416
- },
417
- {
418
- "id": "/src/unstable-core-do-not-import/utils.ts",
419
- "size": 1311,
420
- "origSize": 1809,
421
- "renderedExports": [
422
- "unsetMarker",
423
- "mergeWithoutOverrides",
424
- "isObject",
425
- "isFunction",
426
- "omitPrototype",
427
- "isAsyncIterable",
428
- "run",
429
- "noop",
430
- "identity"
431
- ],
432
- "removedExports": [],
433
- "dependents": [
434
- "/src/unstable-core-do-not-import.ts",
435
- "/src/unstable-core-do-not-import/error/TRPCError.ts",
436
- "/src/unstable-core-do-not-import/transformer.ts",
437
- "/src/unstable-core-do-not-import/middleware.ts",
438
- "/src/unstable-core-do-not-import/router.ts",
439
- "/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
440
- "/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
441
- "/src/unstable-core-do-not-import/http/resolveResponse.ts",
442
- "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
443
- "/src/unstable-core-do-not-import/http/contentType.ts",
444
- "/src/unstable-core-do-not-import/procedureBuilder.ts",
445
- "/src/unstable-core-do-not-import/stream/jsonl.ts",
446
- "/src/unstable-core-do-not-import/stream/sse.ts",
447
- "/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts"
448
- ],
449
456
  "percent": 0.9,
450
- "reduction": 27.53
457
+ "reduction": 35.1
451
458
  },
452
459
  {
453
460
  "id": "/src/unstable-core-do-not-import/parser.ts",
@@ -461,7 +468,7 @@
461
468
  "/src/unstable-core-do-not-import.ts",
462
469
  "/src/unstable-core-do-not-import/procedureBuilder.ts"
463
470
  ],
464
- "percent": 0.89,
471
+ "percent": 0.88,
465
472
  "reduction": 55.21
466
473
  },
467
474
  {
@@ -476,7 +483,7 @@
476
483
  "/src/adapters/fastify/index.ts",
477
484
  "/src/adapters/fastify/fastifyTRPCPlugin.ts"
478
485
  ],
479
- "percent": 0.78,
486
+ "percent": 0.77,
480
487
  "reduction": 47.59
481
488
  },
482
489
  {
@@ -492,7 +499,7 @@
492
499
  "/src/unstable-core-do-not-import.ts",
493
500
  "/src/unstable-core-do-not-import/http/contentType.ts"
494
501
  ],
495
- "percent": 0.76,
502
+ "percent": 0.75,
496
503
  "reduction": 15.08
497
504
  },
498
505
  {
@@ -506,7 +513,7 @@
506
513
  "dependents": [
507
514
  "/src/unstable-core-do-not-import.ts"
508
515
  ],
509
- "percent": 0.73,
516
+ "percent": 0.72,
510
517
  "reduction": 0
511
518
  },
512
519
  {
@@ -523,7 +530,7 @@
523
530
  "/src/adapters/next-app-dir/nextAppDirCaller.ts",
524
531
  "/src/adapters/next-app-dir/rethrowNextErrors.ts"
525
532
  ],
526
- "percent": 0.68,
533
+ "percent": 0.67,
527
534
  "reduction": 13.65
528
535
  },
529
536
  {
@@ -538,7 +545,7 @@
538
545
  "dependents": [
539
546
  "/src/unstable-core-do-not-import/stream/sse.ts"
540
547
  ],
541
- "percent": 0.63,
548
+ "percent": 0.61,
542
549
  "reduction": 10.89
543
550
  },
544
551
  {
@@ -550,7 +557,7 @@
550
557
  ],
551
558
  "removedExports": [],
552
559
  "dependents": [],
553
- "percent": 0.59,
560
+ "percent": 0.58,
554
561
  "reduction": 34.73
555
562
  },
556
563
  {
@@ -567,7 +574,7 @@
567
574
  "/src/unstable-core-do-not-import.ts",
568
575
  "/src/unstable-core-do-not-import/stream/sse.ts"
569
576
  ],
570
- "percent": 0.54,
577
+ "percent": 0.53,
571
578
  "reduction": 44.37
572
579
  },
573
580
  {
@@ -579,7 +586,7 @@
579
586
  ],
580
587
  "removedExports": [],
581
588
  "dependents": [],
582
- "percent": 0.52,
589
+ "percent": 0.51,
583
590
  "reduction": 66.9
584
591
  },
585
592
  {
@@ -595,7 +602,7 @@
595
602
  "/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts",
596
603
  "/src/unstable-core-do-not-import/stream/utils/withPing.ts"
597
604
  ],
598
- "percent": 0.52,
605
+ "percent": 0.51,
599
606
  "reduction": 10.56
600
607
  },
601
608
  {
@@ -624,7 +631,7 @@
624
631
  "/src/unstable-core-do-not-import/stream/jsonl.ts",
625
632
  "/src/unstable-core-do-not-import/stream/sse.ts"
626
633
  ],
627
- "percent": 0.49,
634
+ "percent": 0.48,
628
635
  "reduction": 21.32
629
636
  },
630
637
  {
@@ -638,7 +645,7 @@
638
645
  "dependents": [
639
646
  "/src/unstable-core-do-not-import.ts"
640
647
  ],
641
- "percent": 0.46,
648
+ "percent": 0.45,
642
649
  "reduction": 0.6
643
650
  },
644
651
  {
@@ -653,37 +660,37 @@
653
660
  "/src/unstable-core-do-not-import.ts",
654
661
  "/src/unstable-core-do-not-import/http/resolveResponse.ts"
655
662
  ],
656
- "percent": 0.43,
663
+ "percent": 0.42,
657
664
  "reduction": 43.49
658
665
  },
659
666
  {
660
- "id": "/src/unstable-core-do-not-import/rootConfig.ts",
667
+ "id": "/src/unstable-core-do-not-import/http/toURL.ts",
661
668
  "size": 343,
662
- "origSize": 3267,
669
+ "origSize": 377,
663
670
  "renderedExports": [
664
- "isServerDefault"
671
+ "toURL"
665
672
  ],
666
673
  "removedExports": [],
667
674
  "dependents": [
668
- "/src/unstable-core-do-not-import.ts",
669
- "/src/unstable-core-do-not-import/initTRPC.ts"
675
+ "/src/unstable-core-do-not-import.ts"
670
676
  ],
671
- "percent": 0.24,
672
- "reduction": 89.5
677
+ "percent": 0.23,
678
+ "reduction": 9.02
673
679
  },
674
680
  {
675
- "id": "/src/unstable-core-do-not-import/http/toURL.ts",
681
+ "id": "/src/unstable-core-do-not-import/rootConfig.ts",
676
682
  "size": 343,
677
- "origSize": 377,
683
+ "origSize": 3267,
678
684
  "renderedExports": [
679
- "toURL"
685
+ "isServerDefault"
680
686
  ],
681
687
  "removedExports": [],
682
688
  "dependents": [
683
- "/src/unstable-core-do-not-import.ts"
689
+ "/src/unstable-core-do-not-import.ts",
690
+ "/src/unstable-core-do-not-import/initTRPC.ts"
684
691
  ],
685
- "percent": 0.24,
686
- "reduction": 9.02
692
+ "percent": 0.23,
693
+ "reduction": 89.5
687
694
  },
688
695
  {
689
696
  "id": "/src/unstable-core-do-not-import/stream/utils/createDeferred.ts",
@@ -763,25 +770,25 @@
763
770
  "reduction": 93.8
764
771
  },
765
772
  {
766
- "id": "/src/index.ts",
773
+ "id": "/src/http.ts",
767
774
  "size": 0,
768
- "origSize": 32,
775
+ "origSize": 37,
769
776
  "renderedExports": [],
770
777
  "removedExports": [],
771
- "dependents": [],
778
+ "dependents": [
779
+ "/src/adapters/ws.ts",
780
+ "/src/adapters/node-http/incomingMessageToRequest.ts"
781
+ ],
772
782
  "percent": 0,
773
783
  "reduction": 100
774
784
  },
775
785
  {
776
- "id": "/src/http.ts",
786
+ "id": "/src/index.ts",
777
787
  "size": 0,
778
- "origSize": 37,
788
+ "origSize": 32,
779
789
  "renderedExports": [],
780
790
  "removedExports": [],
781
- "dependents": [
782
- "/src/adapters/ws.ts",
783
- "/src/adapters/node-http/incomingMessageToRequest.ts"
784
- ],
791
+ "dependents": [],
785
792
  "percent": 0,
786
793
  "reduction": 100
787
794
  },
@@ -813,9 +820,9 @@
813
820
  "removedExports": [],
814
821
  "dependents": [
815
822
  "/src/adapters/express.ts",
816
- "/src/adapters/ws.ts",
817
- "/src/adapters/standalone.ts",
818
823
  "/src/adapters/next.ts",
824
+ "/src/adapters/standalone.ts",
825
+ "/src/adapters/ws.ts",
819
826
  "/src/adapters/node-http/nodeHTTPRequestHandler.ts",
820
827
  "/src/adapters/next-app-dir/nextAppDirCaller.ts"
821
828
  ],
@@ -855,27 +862,27 @@
855
862
  "reduction": 100
856
863
  },
857
864
  {
858
- "id": "/src/adapters/node-http/index.ts",
865
+ "id": "/src/adapters/fetch/index.ts",
859
866
  "size": 0,
860
- "origSize": 111,
867
+ "origSize": 64,
861
868
  "renderedExports": [],
862
869
  "removedExports": [],
863
- "dependents": [
864
- "/src/adapters/express.ts",
865
- "/src/adapters/standalone.ts",
866
- "/src/adapters/next.ts",
867
- "/src/adapters/fastify/fastifyRequestHandler.ts"
868
- ],
870
+ "dependents": [],
869
871
  "percent": 0,
870
872
  "reduction": 100
871
873
  },
872
874
  {
873
- "id": "/src/adapters/fetch/index.ts",
875
+ "id": "/src/adapters/node-http/index.ts",
874
876
  "size": 0,
875
- "origSize": 64,
877
+ "origSize": 111,
876
878
  "renderedExports": [],
877
879
  "removedExports": [],
878
- "dependents": [],
880
+ "dependents": [
881
+ "/src/adapters/express.ts",
882
+ "/src/adapters/next.ts",
883
+ "/src/adapters/standalone.ts",
884
+ "/src/adapters/fastify/fastifyRequestHandler.ts"
885
+ ],
879
886
  "percent": 0,
880
887
  "reduction": 100
881
888
  }
@@ -1,5 +1,10 @@
1
1
  import type { TRPCError } from '../error/TRPCError';
2
- import type { TRPCResponse } from '../rpc';
2
+ import type { TRPC_ERROR_CODES_BY_KEY, TRPCResponse } from '../rpc';
3
+ import type { InvertKeyValue, ValueOf } from '../types';
4
+ export declare const JSONRPC2_TO_HTTP_CODE: Record<keyof typeof TRPC_ERROR_CODES_BY_KEY, number>;
5
+ export declare const HTTP_CODE_TO_JSONRPC2: InvertKeyValue<typeof JSONRPC2_TO_HTTP_CODE>;
6
+ export declare function getStatusCodeFromKey(code: keyof typeof TRPC_ERROR_CODES_BY_KEY): number;
7
+ export declare function getStatusKeyFromCode(code: keyof typeof HTTP_CODE_TO_JSONRPC2): ValueOf<typeof HTTP_CODE_TO_JSONRPC2>;
3
8
  export declare function getHTTPStatusCode(json: TRPCResponse | TRPCResponse[]): number;
4
9
  export declare function getHTTPStatusCodeFromError(error: TRPCError): number;
5
10
  //# sourceMappingURL=getHTTPStatusCode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getHTTPStatusCode.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/http/getHTTPStatusCode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAA2B,YAAY,EAAE,MAAM,QAAQ,CAAC;AAiCpE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,YAAY,EAAE,GAAG,MAAM,CAuB7E;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,SAAS,UAE1D"}
1
+ {"version":3,"file":"getHTTPStatusCode.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/http/getHTTPStatusCode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEpE,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGxD,eAAO,MAAM,qBAAqB,EAAE,MAAM,CACxC,MAAM,OAAO,uBAAuB,EACpC,MAAM,CAqBP,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAChD,OAAO,qBAAqB,CAoBpB,CAAC;AAEX,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,OAAO,uBAAuB,UAG3C;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,OAAO,qBAAqB,GACvC,OAAO,CAAC,OAAO,qBAAqB,CAAC,CAEvC;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,YAAY,EAAE,UAuBpE;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,SAAS,UAE1D"}