@trpc/server 11.0.0-rc.632 → 11.0.0-rc.633

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 (30) hide show
  1. package/dist/adapters/node-http/writeResponse.d.ts.map +1 -1
  2. package/dist/adapters/node-http/writeResponse.js +0 -5
  3. package/dist/adapters/node-http/writeResponse.mjs +0 -5
  4. package/dist/adapters/ws.js +1 -1
  5. package/dist/adapters/ws.mjs +1 -1
  6. package/dist/bundle-analysis.json +82 -82
  7. package/dist/index.js +1 -1
  8. package/dist/index.mjs +1 -1
  9. package/dist/unstable-core-do-not-import/http/resolveResponse.d.ts.map +1 -1
  10. package/dist/unstable-core-do-not-import/http/resolveResponse.js +3 -3
  11. package/dist/unstable-core-do-not-import/http/resolveResponse.mjs +3 -3
  12. package/dist/unstable-core-do-not-import/initTRPC.js +2 -2
  13. package/dist/unstable-core-do-not-import/initTRPC.mjs +2 -2
  14. package/dist/unstable-core-do-not-import/rootConfig.d.ts +14 -14
  15. package/dist/unstable-core-do-not-import/rootConfig.d.ts.map +1 -1
  16. package/dist/unstable-core-do-not-import/rpc/envelopes.d.ts +7 -10
  17. package/dist/unstable-core-do-not-import/rpc/envelopes.d.ts.map +1 -1
  18. package/dist/unstable-core-do-not-import/stream/sse.d.ts +11 -1
  19. package/dist/unstable-core-do-not-import/stream/sse.d.ts.map +1 -1
  20. package/dist/unstable-core-do-not-import/stream/sse.js +129 -65
  21. package/dist/unstable-core-do-not-import/stream/sse.mjs +129 -65
  22. package/dist/unstable-core-do-not-import/transformer.d.ts +1 -4
  23. package/dist/unstable-core-do-not-import/transformer.d.ts.map +1 -1
  24. package/package.json +2 -2
  25. package/src/adapters/node-http/writeResponse.ts +0 -5
  26. package/src/unstable-core-do-not-import/http/resolveResponse.ts +3 -4
  27. package/src/unstable-core-do-not-import/initTRPC.ts +1 -1
  28. package/src/unstable-core-do-not-import/rootConfig.ts +17 -17
  29. package/src/unstable-core-do-not-import/rpc/envelopes.ts +7 -12
  30. package/src/unstable-core-do-not-import/stream/sse.ts +155 -67
@@ -1 +1 @@
1
- {"version":3,"file":"writeResponse.d.ts","sourceRoot":"","sources":["../../../src/adapters/node-http/writeResponse.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAyBhD;;GAEG;AAEH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAC5C,GAAG,EAAE,gBAAgB,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;CACrC,iBAyBA;AACD;;GAEG;AAEH,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,gBAAgB,CAAC;CAC/B,iBA0BA"}
1
+ {"version":3,"file":"writeResponse.d.ts","sourceRoot":"","sources":["../../../src/adapters/node-http/writeResponse.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAyBhD;;GAEG;AAEH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE;IAC5C,GAAG,EAAE,gBAAgB,CAAC;IACtB,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;CACrC,iBAoBA;AACD;;GAEG;AAEH,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,gBAAgB,CAAC;CAC/B,iBA0BA"}
@@ -35,11 +35,6 @@ async function writeResponseBodyChunk(res, chunk) {
35
35
  async write (chunk) {
36
36
  await writeResponseBodyChunk(res, chunk);
37
37
  res.flush?.();
38
- },
39
- abort () {
40
- if (!res.headersSent) {
41
- res.statusCode = 500;
42
- }
43
38
  }
44
39
  });
45
40
  await opts.body.pipeTo(writableStream, {
@@ -33,11 +33,6 @@ async function writeResponseBodyChunk(res, chunk) {
33
33
  async write (chunk) {
34
34
  await writeResponseBodyChunk(res, chunk);
35
35
  res.flush?.();
36
- },
37
- abort () {
38
- if (!res.headersSent) {
39
- res.statusCode = 500;
40
- }
41
36
  }
42
37
  });
43
38
  await opts.body.pipeTo(writableStream, {
@@ -6,8 +6,8 @@ var utils = require('../unstable-core-do-not-import/utils.js');
6
6
  var parseConnectionParams = require('../unstable-core-do-not-import/http/parseConnectionParams.js');
7
7
  var parseTRPCMessage = require('../unstable-core-do-not-import/rpc/parseTRPCMessage.js');
8
8
  var observable = require('../observable/observable.js');
9
- var tracked = require('../unstable-core-do-not-import/stream/tracked.js');
10
9
  var unpromise = require('../vendor/unpromise/unpromise.js');
10
+ var tracked = require('../unstable-core-do-not-import/stream/tracked.js');
11
11
  require('../unstable-core-do-not-import/stream/utils/disposablePromiseTimer.js');
12
12
  var transformer = require('../unstable-core-do-not-import/transformer.js');
13
13
  require('../unstable-core-do-not-import/rootConfig.js');
@@ -4,8 +4,8 @@ import { run, isObject, isAsyncIterable } from '../unstable-core-do-not-import/u
4
4
  import { parseConnectionParamsFromUnknown } from '../unstable-core-do-not-import/http/parseConnectionParams.mjs';
5
5
  import { parseTRPCMessage } from '../unstable-core-do-not-import/rpc/parseTRPCMessage.mjs';
6
6
  import { isObservable, observableToAsyncIterable } from '../observable/observable.mjs';
7
- import { isTrackedEnvelope } from '../unstable-core-do-not-import/stream/tracked.mjs';
8
7
  import { Unpromise } from '../vendor/unpromise/unpromise.mjs';
8
+ import { isTrackedEnvelope } from '../unstable-core-do-not-import/stream/tracked.mjs';
9
9
  import '../unstable-core-do-not-import/stream/utils/disposablePromiseTimer.mjs';
10
10
  import { transformTRPCResponse } from '../unstable-core-do-not-import/transformer.mjs';
11
11
  import '../unstable-core-do-not-import/rootConfig.mjs';
@@ -1,12 +1,12 @@
1
1
  {
2
- "bundleSize": 165268,
3
- "bundleOrigSize": 216393,
4
- "bundleReduction": 23.63,
2
+ "bundleSize": 167567,
3
+ "bundleOrigSize": 218715,
4
+ "bundleReduction": 23.39,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/unstable-core-do-not-import/http/resolveResponse.ts",
8
- "size": 21597,
9
- "origSize": 19889,
8
+ "size": 21503,
9
+ "origSize": 19791,
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": 13.07,
17
+ "percent": 12.83,
18
18
  "reduction": 0
19
19
  },
20
20
  {
@@ -30,7 +30,7 @@
30
30
  "dependents": [
31
31
  "/src/adapters/fastify/fastifyTRPCPlugin.ts"
32
32
  ],
33
- "percent": 10.15,
33
+ "percent": 10.01,
34
34
  "reduction": 0
35
35
  },
36
36
  {
@@ -47,7 +47,7 @@
47
47
  "/src/unstable-core-do-not-import.ts",
48
48
  "/src/unstable-core-do-not-import/http/resolveResponse.ts"
49
49
  ],
50
- "percent": 9.48,
50
+ "percent": 9.35,
51
51
  "reduction": 6.09
52
52
  },
53
53
  {
@@ -60,40 +60,40 @@
60
60
  ],
61
61
  "removedExports": [],
62
62
  "dependents": [],
63
- "percent": 7.14,
63
+ "percent": 7.05,
64
64
  "reduction": 14.14
65
65
  },
66
66
  {
67
- "id": "/src/unstable-core-do-not-import/http/contentType.ts",
68
- "size": 7685,
69
- "origSize": 7608,
67
+ "id": "/src/unstable-core-do-not-import/stream/sse.ts",
68
+ "size": 9727,
69
+ "origSize": 12040,
70
70
  "renderedExports": [
71
- "getRequestInfo"
71
+ "sseStreamProducer",
72
+ "sseStreamConsumer",
73
+ "sseHeaders"
72
74
  ],
73
75
  "removedExports": [],
74
76
  "dependents": [
75
77
  "/src/unstable-core-do-not-import.ts",
76
78
  "/src/unstable-core-do-not-import/http/resolveResponse.ts"
77
79
  ],
78
- "percent": 4.65,
79
- "reduction": 0
80
+ "percent": 5.8,
81
+ "reduction": 19.21
80
82
  },
81
83
  {
82
- "id": "/src/unstable-core-do-not-import/stream/sse.ts",
83
- "size": 7165,
84
- "origSize": 9496,
84
+ "id": "/src/unstable-core-do-not-import/http/contentType.ts",
85
+ "size": 7685,
86
+ "origSize": 7608,
85
87
  "renderedExports": [
86
- "sseStreamProducer",
87
- "sseStreamConsumer",
88
- "sseHeaders"
88
+ "getRequestInfo"
89
89
  ],
90
90
  "removedExports": [],
91
91
  "dependents": [
92
92
  "/src/unstable-core-do-not-import.ts",
93
93
  "/src/unstable-core-do-not-import/http/resolveResponse.ts"
94
94
  ],
95
- "percent": 4.34,
96
- "reduction": 24.55
95
+ "percent": 4.59,
96
+ "reduction": 0
97
97
  },
98
98
  {
99
99
  "id": "/src/unstable-core-do-not-import/router.ts",
@@ -110,7 +110,7 @@
110
110
  "/src/unstable-core-do-not-import.ts",
111
111
  "/src/unstable-core-do-not-import/initTRPC.ts"
112
112
  ],
113
- "percent": 3.88,
113
+ "percent": 3.83,
114
114
  "reduction": 39.89
115
115
  },
116
116
  {
@@ -125,7 +125,7 @@
125
125
  "/src/unstable-core-do-not-import.ts",
126
126
  "/src/unstable-core-do-not-import/initTRPC.ts"
127
127
  ],
128
- "percent": 3.51,
128
+ "percent": 3.46,
129
129
  "reduction": 64.97
130
130
  },
131
131
  {
@@ -139,7 +139,7 @@
139
139
  "dependents": [
140
140
  "/src/adapters/aws-lambda/index.ts"
141
141
  ],
142
- "percent": 3.28,
142
+ "percent": 3.23,
143
143
  "reduction": 11.51
144
144
  },
145
145
  {
@@ -159,7 +159,7 @@
159
159
  "/src/observable/operators.ts",
160
160
  "/src/observable/behaviorSubject.ts"
161
161
  ],
162
- "percent": 2.71,
162
+ "percent": 2.67,
163
163
  "reduction": 0
164
164
  },
165
165
  {
@@ -177,7 +177,7 @@
177
177
  "dependents": [
178
178
  "/src/observable/index.ts"
179
179
  ],
180
- "percent": 2.37,
180
+ "percent": 2.33,
181
181
  "reduction": 1.66
182
182
  },
183
183
  {
@@ -193,7 +193,7 @@
193
193
  "/src/adapters/node-http/index.ts",
194
194
  "/src/adapters/node-http/nodeHTTPRequestHandler.ts"
195
195
  ],
196
- "percent": 2.32,
196
+ "percent": 2.29,
197
197
  "reduction": 11.87
198
198
  },
199
199
  {
@@ -207,7 +207,7 @@
207
207
  "dependents": [
208
208
  "/src/adapters/next-app-dir.ts"
209
209
  ],
210
- "percent": 1.96,
210
+ "percent": 1.94,
211
211
  "reduction": 22.52
212
212
  },
213
213
  {
@@ -222,7 +222,7 @@
222
222
  "dependents": [
223
223
  "/src/unstable-core-do-not-import/stream/sse.ts"
224
224
  ],
225
- "percent": 1.68,
225
+ "percent": 1.66,
226
226
  "reduction": 3.48
227
227
  },
228
228
  {
@@ -237,7 +237,7 @@
237
237
  "dependents": [
238
238
  "/src/adapters/node-http/index.ts"
239
239
  ],
240
- "percent": 1.66,
240
+ "percent": 1.64,
241
241
  "reduction": 16.3
242
242
  },
243
243
  {
@@ -257,13 +257,13 @@
257
257
  "/src/unstable-core-do-not-import/initTRPC.ts",
258
258
  "/src/unstable-core-do-not-import/router.ts"
259
259
  ],
260
- "percent": 1.66,
260
+ "percent": 1.63,
261
261
  "reduction": 45.98
262
262
  },
263
263
  {
264
264
  "id": "/src/unstable-core-do-not-import/initTRPC.ts",
265
- "size": 2695,
266
- "origSize": 4532,
265
+ "size": 2664,
266
+ "origSize": 4501,
267
267
  "renderedExports": [
268
268
  "initTRPC"
269
269
  ],
@@ -271,8 +271,8 @@
271
271
  "dependents": [
272
272
  "/src/unstable-core-do-not-import.ts"
273
273
  ],
274
- "percent": 1.63,
275
- "reduction": 40.53
274
+ "percent": 1.59,
275
+ "reduction": 40.81
276
276
  },
277
277
  {
278
278
  "id": "/src/unstable-core-do-not-import/middleware.ts",
@@ -291,7 +291,7 @@
291
291
  "/src/unstable-core-do-not-import/initTRPC.ts",
292
292
  "/src/unstable-core-do-not-import/procedureBuilder.ts"
293
293
  ],
294
- "percent": 1.59,
294
+ "percent": 1.57,
295
295
  "reduction": 55.79
296
296
  },
297
297
  {
@@ -329,7 +329,7 @@
329
329
  "/src/unstable-core-do-not-import/stream/jsonl.ts",
330
330
  "/src/unstable-core-do-not-import/stream/sse.ts"
331
331
  ],
332
- "percent": 1.49,
332
+ "percent": 1.47,
333
333
  "reduction": 17.51
334
334
  },
335
335
  {
@@ -345,7 +345,7 @@
345
345
  "/src/unstable-core-do-not-import.ts",
346
346
  "/src/unstable-core-do-not-import/router.ts"
347
347
  ],
348
- "percent": 1.41,
348
+ "percent": 1.39,
349
349
  "reduction": 0
350
350
  },
351
351
  {
@@ -359,7 +359,7 @@
359
359
  "dependents": [
360
360
  "/src/adapters/fetch/index.ts"
361
361
  ],
362
- "percent": 1.36,
362
+ "percent": 1.34,
363
363
  "reduction": 2.48
364
364
  },
365
365
  {
@@ -373,7 +373,7 @@
373
373
  "dependents": [
374
374
  "/src/adapters/next-app-dir/nextAppDirCaller.ts"
375
375
  ],
376
- "percent": 1.28,
376
+ "percent": 1.27,
377
377
  "reduction": 5.53
378
378
  },
379
379
  {
@@ -394,23 +394,8 @@
394
394
  "/src/unstable-core-do-not-import/http/resolveResponse.ts",
395
395
  "/src/unstable-core-do-not-import/error/getErrorShape.ts"
396
396
  ],
397
- "percent": 1.26,
398
- "reduction": 18.54
399
- },
400
- {
401
- "id": "/src/adapters/node-http/writeResponse.ts",
402
- "size": 2068,
403
- "origSize": 2110,
404
- "renderedExports": [
405
- "writeResponseBody",
406
- "writeResponse"
407
- ],
408
- "removedExports": [],
409
- "dependents": [
410
- "/src/adapters/node-http/nodeHTTPRequestHandler.ts"
411
- ],
412
397
  "percent": 1.25,
413
- "reduction": 1.99
398
+ "reduction": 18.54
414
399
  },
415
400
  {
416
401
  "id": "/src/unstable-core-do-not-import/error/TRPCError.ts",
@@ -432,9 +417,24 @@
432
417
  "/src/unstable-core-do-not-import/procedureBuilder.ts",
433
418
  "/src/unstable-core-do-not-import/stream/sse.ts"
434
419
  ],
435
- "percent": 1.25,
420
+ "percent": 1.23,
436
421
  "reduction": 4.23
437
422
  },
423
+ {
424
+ "id": "/src/adapters/node-http/writeResponse.ts",
425
+ "size": 1930,
426
+ "origSize": 2011,
427
+ "renderedExports": [
428
+ "writeResponseBody",
429
+ "writeResponse"
430
+ ],
431
+ "removedExports": [],
432
+ "dependents": [
433
+ "/src/adapters/node-http/nodeHTTPRequestHandler.ts"
434
+ ],
435
+ "percent": 1.15,
436
+ "reduction": 4.03
437
+ },
438
438
  {
439
439
  "id": "/src/unstable-core-do-not-import/stream/utils/withRefCount.ts",
440
440
  "size": 1860,
@@ -446,7 +446,7 @@
446
446
  "dependents": [
447
447
  "/src/unstable-core-do-not-import/stream/jsonl.ts"
448
448
  ],
449
- "percent": 1.13,
449
+ "percent": 1.11,
450
450
  "reduction": 27.46
451
451
  },
452
452
  {
@@ -460,7 +460,7 @@
460
460
  "dependents": [
461
461
  "/src/adapters/fastify/index.ts"
462
462
  ],
463
- "percent": 1.08,
463
+ "percent": 1.06,
464
464
  "reduction": 30.2
465
465
  },
466
466
  {
@@ -472,7 +472,7 @@
472
472
  ],
473
473
  "removedExports": [],
474
474
  "dependents": [],
475
- "percent": 1.02,
475
+ "percent": 1.01,
476
476
  "reduction": 19.62
477
477
  },
478
478
  {
@@ -485,7 +485,7 @@
485
485
  ],
486
486
  "removedExports": [],
487
487
  "dependents": [],
488
- "percent": 0.97,
488
+ "percent": 0.96,
489
489
  "reduction": 17.81
490
490
  },
491
491
  {
@@ -497,7 +497,7 @@
497
497
  ],
498
498
  "removedExports": [],
499
499
  "dependents": [],
500
- "percent": 0.8,
500
+ "percent": 0.79,
501
501
  "reduction": 35.1
502
502
  },
503
503
  {
@@ -512,7 +512,7 @@
512
512
  "/src/unstable-core-do-not-import.ts",
513
513
  "/src/unstable-core-do-not-import/procedureBuilder.ts"
514
514
  ],
515
- "percent": 0.78,
515
+ "percent": 0.77,
516
516
  "reduction": 55.37
517
517
  },
518
518
  {
@@ -527,7 +527,7 @@
527
527
  "dependents": [
528
528
  "/src/unstable-core-do-not-import/stream/sse.ts"
529
529
  ],
530
- "percent": 0.72,
530
+ "percent": 0.71,
531
531
  "reduction": 10.04
532
532
  },
533
533
  {
@@ -542,7 +542,7 @@
542
542
  "/src/adapters/fastify/index.ts",
543
543
  "/src/adapters/fastify/fastifyTRPCPlugin.ts"
544
544
  ],
545
- "percent": 0.69,
545
+ "percent": 0.68,
546
546
  "reduction": 47.29
547
547
  },
548
548
  {
@@ -558,7 +558,7 @@
558
558
  "/src/unstable-core-do-not-import.ts",
559
559
  "/src/unstable-core-do-not-import/http/contentType.ts"
560
560
  ],
561
- "percent": 0.67,
561
+ "percent": 0.66,
562
562
  "reduction": 15.08
563
563
  },
564
564
  {
@@ -572,7 +572,7 @@
572
572
  "dependents": [
573
573
  "/src/unstable-core-do-not-import.ts"
574
574
  ],
575
- "percent": 0.64,
575
+ "percent": 0.63,
576
576
  "reduction": 0
577
577
  },
578
578
  {
@@ -589,7 +589,7 @@
589
589
  "/src/adapters/next-app-dir/nextAppDirCaller.ts",
590
590
  "/src/adapters/next-app-dir/rethrowNextErrors.ts"
591
591
  ],
592
- "percent": 0.62,
592
+ "percent": 0.61,
593
593
  "reduction": 9.97
594
594
  },
595
595
  {
@@ -603,7 +603,7 @@
603
603
  "dependents": [
604
604
  "/src/observable/index.ts"
605
605
  ],
606
- "percent": 0.59,
606
+ "percent": 0.58,
607
607
  "reduction": 32.89
608
608
  },
609
609
  {
@@ -615,7 +615,7 @@
615
615
  ],
616
616
  "removedExports": [],
617
617
  "dependents": [],
618
- "percent": 0.52,
618
+ "percent": 0.51,
619
619
  "reduction": 34.73
620
620
  },
621
621
  {
@@ -657,7 +657,7 @@
657
657
  ],
658
658
  "removedExports": [],
659
659
  "dependents": [],
660
- "percent": 0.46,
660
+ "percent": 0.45,
661
661
  "reduction": 66.61
662
662
  },
663
663
  {
@@ -673,7 +673,7 @@
673
673
  "/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts",
674
674
  "/src/unstable-core-do-not-import/stream/utils/withPing.ts"
675
675
  ],
676
- "percent": 0.4,
676
+ "percent": 0.39,
677
677
  "reduction": 0
678
678
  },
679
679
  {
@@ -688,7 +688,7 @@
688
688
  "/src/unstable-core-do-not-import.ts",
689
689
  "/src/unstable-core-do-not-import/http/resolveResponse.ts"
690
690
  ],
691
- "percent": 0.38,
691
+ "percent": 0.37,
692
692
  "reduction": 43.85
693
693
  },
694
694
  {
@@ -709,7 +709,7 @@
709
709
  {
710
710
  "id": "/src/unstable-core-do-not-import/rootConfig.ts",
711
711
  "size": 343,
712
- "origSize": 3267,
712
+ "origSize": 3273,
713
713
  "renderedExports": [
714
714
  "isServerDefault"
715
715
  ],
@@ -718,8 +718,8 @@
718
718
  "/src/unstable-core-do-not-import.ts",
719
719
  "/src/unstable-core-do-not-import/initTRPC.ts"
720
720
  ],
721
- "percent": 0.21,
722
- "reduction": 89.5
721
+ "percent": 0.2,
722
+ "reduction": 89.52
723
723
  },
724
724
  {
725
725
  "id": "/src/unstable-core-do-not-import/stream/utils/createDeferred.ts",
@@ -733,7 +733,7 @@
733
733
  "/src/unstable-core-do-not-import.ts",
734
734
  "/src/unstable-core-do-not-import/stream/jsonl.ts"
735
735
  ],
736
- "percent": 0.19,
736
+ "percent": 0.18,
737
737
  "reduction": 25.9
738
738
  },
739
739
  {
@@ -808,7 +808,7 @@
808
808
  "/src/unstable-core-do-not-import.ts",
809
809
  "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts"
810
810
  ],
811
- "percent": 0.05,
811
+ "percent": 0.04,
812
812
  "reduction": 97.19
813
813
  },
814
814
  {
@@ -878,8 +878,8 @@
878
878
  "dependents": [
879
879
  "/src/adapters/express.ts",
880
880
  "/src/adapters/next.ts",
881
- "/src/adapters/standalone.ts",
882
881
  "/src/adapters/ws.ts",
882
+ "/src/adapters/standalone.ts",
883
883
  "/src/adapters/node-http/nodeHTTPRequestHandler.ts",
884
884
  "/src/adapters/next-app-dir/nextAppDirCaller.ts",
885
885
  "/src/adapters/node-http/writeResponse.ts"
@@ -938,8 +938,8 @@
938
938
  "dependents": [
939
939
  "/src/adapters/express.ts",
940
940
  "/src/adapters/next.ts",
941
- "/src/adapters/standalone.ts",
942
941
  "/src/adapters/ws.ts",
942
+ "/src/adapters/standalone.ts",
943
943
  "/src/adapters/fastify/fastifyRequestHandler.ts"
944
944
  ],
945
945
  "percent": 0,
package/dist/index.js CHANGED
@@ -3,8 +3,8 @@
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 tracked = require('./unstable-core-do-not-import/stream/tracked.js');
7
6
  require('./vendor/unpromise/unpromise.js');
7
+ var tracked = require('./unstable-core-do-not-import/stream/tracked.js');
8
8
  require('./unstable-core-do-not-import/stream/utils/disposablePromiseTimer.js');
9
9
  var transformer = require('./unstable-core-do-not-import/transformer.js');
10
10
  var initTRPC = require('./unstable-core-do-not-import/initTRPC.js');
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
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 { isTrackedEnvelope, sse, tracked } from './unstable-core-do-not-import/stream/tracked.mjs';
5
4
  import './vendor/unpromise/unpromise.mjs';
5
+ export { isTrackedEnvelope, sse, tracked } from './unstable-core-do-not-import/stream/tracked.mjs';
6
6
  import './unstable-core-do-not-import/stream/utils/disposablePromiseTimer.mjs';
7
7
  export { transformTRPCResponse } from './unstable-core-do-not-import/transformer.mjs';
8
8
  export { initTRPC } from './unstable-core-do-not-import/initTRPC.mjs';
@@ -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;AAanB,OAAO,KAAK,EACV,sBAAsB,EACtB,kCAAkC,EAEnC,MAAM,SAAS,CAAC;AAqCjB,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;AA2ID,wBAAsB,eAAe,CAAC,OAAO,SAAS,SAAS,EAC7D,IAAI,EAAE,yBAAyB,CAAC,OAAO,CAAC,GACvC,OAAO,CAAC,QAAQ,CAAC,CAyfnB"}
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;AAanB,OAAO,KAAK,EACV,sBAAsB,EACtB,kCAAkC,EAEnC,MAAM,SAAS,CAAC;AAqCjB,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;AA2ID,wBAAsB,eAAe,CAAC,OAAO,SAAS,SAAS,EAC7D,IAAI,EAAE,yBAAyB,CAAC,OAAO,CAAC,GACvC,OAAO,CAAC,QAAQ,CAAC,CAwfnB"}
@@ -208,8 +208,8 @@ async function resolveResponse(opts) {
208
208
  /**
209
209
  * @deprecated
210
210
  */ const isStreamCall = req.headers.get('trpc-accept') === 'application/jsonl';
211
- const experimentalIterablesAndDeferreds = router._def._config.experimental?.iterablesAndDeferreds ?? true;
212
- const experimentalSSE = router._def._config.experimental?.sseSubscriptions?.enabled ?? true;
211
+ const experimentalIterablesAndDeferreds = config.iterablesAndDeferreds ?? true;
212
+ const experimentalSSE = config.sse?.enabled ?? true;
213
213
  try {
214
214
  const [infoError, info] = infoTuple;
215
215
  if (infoError) {
@@ -360,7 +360,7 @@ async function resolveResponse(opts) {
360
360
  return dataAsIterable;
361
361
  });
362
362
  const stream = sse.sseStreamProducer({
363
- ...config.experimental?.sseSubscriptions,
363
+ ...config.sse,
364
364
  data: iterable,
365
365
  abortCtrl: result?.abortCtrl ?? new AbortController(),
366
366
  serialize: (v)=>config.transformer.output.serialize(v),
@@ -206,8 +206,8 @@ async function resolveResponse(opts) {
206
206
  /**
207
207
  * @deprecated
208
208
  */ const isStreamCall = req.headers.get('trpc-accept') === 'application/jsonl';
209
- const experimentalIterablesAndDeferreds = router._def._config.experimental?.iterablesAndDeferreds ?? true;
210
- const experimentalSSE = router._def._config.experimental?.sseSubscriptions?.enabled ?? true;
209
+ const experimentalIterablesAndDeferreds = config.iterablesAndDeferreds ?? true;
210
+ const experimentalSSE = config.sse?.enabled ?? true;
211
211
  try {
212
212
  const [infoError, info] = infoTuple;
213
213
  if (infoError) {
@@ -358,7 +358,7 @@ async function resolveResponse(opts) {
358
358
  return dataAsIterable;
359
359
  });
360
360
  const stream = sseStreamProducer({
361
- ...config.experimental?.sseSubscriptions,
361
+ ...config.sse,
362
362
  data: iterable,
363
363
  abortCtrl: result?.abortCtrl ?? new AbortController(),
364
364
  serialize: (v)=>config.transformer.output.serialize(v),
@@ -25,6 +25,7 @@ class TRPCBuilder {
25
25
  * @see https://trpc.io/docs/v11/server/routers#initialize-trpc
26
26
  */ create(opts) {
27
27
  const config = {
28
+ ...opts,
28
29
  transformer: transformer.getDataTransformer(opts?.transformer ?? transformer.defaultTransformer),
29
30
  isDev: opts?.isDev ?? // eslint-disable-next-line @typescript-eslint/dot-notation
30
31
  globalThis.process?.env['NODE_ENV'] !== 'production',
@@ -34,8 +35,7 @@ class TRPCBuilder {
34
35
  /**
35
36
  * These are just types, they can't be used at runtime
36
37
  * @internal
37
- */ $types: null,
38
- experimental: opts?.experimental ?? {}
38
+ */ $types: null
39
39
  };
40
40
  {
41
41
  // Server check
@@ -23,6 +23,7 @@ class TRPCBuilder {
23
23
  * @see https://trpc.io/docs/v11/server/routers#initialize-trpc
24
24
  */ create(opts) {
25
25
  const config = {
26
+ ...opts,
26
27
  transformer: getDataTransformer(opts?.transformer ?? defaultTransformer),
27
28
  isDev: opts?.isDev ?? // eslint-disable-next-line @typescript-eslint/dot-notation
28
29
  globalThis.process?.env['NODE_ENV'] !== 'production',
@@ -32,8 +33,7 @@ class TRPCBuilder {
32
33
  /**
33
34
  * These are just types, they can't be used at runtime
34
35
  * @internal
35
- */ $types: null,
36
- experimental: opts?.experimental ?? {}
36
+ */ $types: null
37
37
  };
38
38
  {
39
39
  // Server check