@trpc/server 11.0.0-rc.593 → 11.0.0-rc.601

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 (38) hide show
  1. package/dist/adapters/ws.d.ts.map +1 -1
  2. package/dist/adapters/ws.js +10 -2
  3. package/dist/adapters/ws.mjs +10 -2
  4. package/dist/bundle-analysis.json +108 -95
  5. package/dist/unstable-core-do-not-import/procedureBuilder.d.ts +1 -1
  6. package/dist/unstable-core-do-not-import/procedureBuilder.d.ts.map +1 -1
  7. package/dist/unstable-core-do-not-import/stream/jsonl.d.ts.map +1 -1
  8. package/dist/unstable-core-do-not-import/stream/jsonl.js +3 -2
  9. package/dist/unstable-core-do-not-import/stream/jsonl.mjs +3 -2
  10. package/dist/unstable-core-do-not-import/stream/sse.d.ts.map +1 -1
  11. package/dist/unstable-core-do-not-import/stream/sse.js +9 -2
  12. package/dist/unstable-core-do-not-import/stream/sse.mjs +9 -2
  13. package/dist/unstable-core-do-not-import/stream/utils/asyncIterable.d.ts.map +1 -1
  14. package/dist/unstable-core-do-not-import/stream/utils/asyncIterable.js +11 -2
  15. package/dist/unstable-core-do-not-import/stream/utils/asyncIterable.mjs +11 -2
  16. package/dist/unstable-core-do-not-import/stream/utils/withPing.d.ts.map +1 -1
  17. package/dist/unstable-core-do-not-import/stream/utils/withPing.js +6 -2
  18. package/dist/unstable-core-do-not-import/stream/utils/withPing.mjs +6 -2
  19. package/dist/vendor/unpromise/index.d.ts +3 -0
  20. package/dist/vendor/unpromise/index.d.ts.map +1 -0
  21. package/dist/vendor/unpromise/types.d.ts +28 -0
  22. package/dist/vendor/unpromise/types.d.ts.map +1 -0
  23. package/dist/vendor/unpromise/unpromise.d.ts +121 -0
  24. package/dist/vendor/unpromise/unpromise.d.ts.map +1 -0
  25. package/dist/vendor/unpromise/unpromise.js +274 -0
  26. package/dist/vendor/unpromise/unpromise.mjs +271 -0
  27. package/package.json +4 -4
  28. package/src/adapters/ws.ts +17 -2
  29. package/src/unstable-core-do-not-import/procedureBuilder.ts +1 -1
  30. package/src/unstable-core-do-not-import/stream/jsonl.ts +3 -2
  31. package/src/unstable-core-do-not-import/stream/sse.ts +13 -2
  32. package/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts +11 -2
  33. package/src/unstable-core-do-not-import/stream/utils/withPing.ts +6 -2
  34. package/src/vendor/unpromise/ATTRIBUTION.txt +1 -0
  35. package/src/vendor/unpromise/LICENSE +20 -0
  36. package/src/vendor/unpromise/index.ts +7 -0
  37. package/src/vendor/unpromise/types.ts +55 -0
  38. package/src/vendor/unpromise/unpromise.ts +378 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ws.d.ts","sourceRoot":"","sources":["../../src/adapters/ws.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,EACV,SAAS,EACT,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AASzB,OAAO,EAAS,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAatE,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAQlE;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,8BAA8B,CACpE,eAAe,EACf,EAAE,CAAC,SAAS,CACb,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kBAAkB,CAAC,OAAO,SAAS,SAAS,IAAI,CAC1D,IAAI,EAAE,yBAAyB,KAC5B,YAAY,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;AAE/C,MAAM,MAAM,0BAA0B,CAAC,OAAO,SAAS,SAAS,IAC9D,kBAAkB,CAAC,OAAO,EAAE,eAAe,CAAC,GAC1C,qBAAqB,CACnB,kBAAkB,CAAC,OAAO,CAAC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
@@ -6,6 +6,7 @@ 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 unpromise = require('../vendor/unpromise/unpromise.js');
9
10
  var tracked = require('../unstable-core-do-not-import/stream/tracked.js');
10
11
  var transformer = require('../unstable-core-do-not-import/transformer.js');
11
12
  var toURL = require('../unstable-core-do-not-import/http/toURL.js');
@@ -161,8 +162,12 @@ function getWSConnectionHandler(opts) {
161
162
  abortController.signal.onabort = ()=>resolve('abort');
162
163
  });
163
164
  utils.run(async ()=>{
165
+ // We need those declarations outside the loop for garbage collection reasons. If they
166
+ // were declared inside, they would not be freed until the next value is present.
167
+ let next;
168
+ let result;
164
169
  while(true){
165
- const next = await Promise.race([
170
+ next = await unpromise.Unpromise.race([
166
171
  iterator.next().catch(TRPCError.getTRPCErrorFromUnknown),
167
172
  abortPromise
168
173
  ]);
@@ -197,7 +202,7 @@ function getWSConnectionHandler(opts) {
197
202
  if (next.done) {
198
203
  break;
199
204
  }
200
- const result = {
205
+ result = {
201
206
  type: 'data',
202
207
  data: next.value
203
208
  };
@@ -214,6 +219,9 @@ function getWSConnectionHandler(opts) {
214
219
  jsonrpc,
215
220
  result
216
221
  });
222
+ // free up references for garbage collection
223
+ next = null;
224
+ result = null;
217
225
  }
218
226
  await iterator.return?.();
219
227
  respond({
@@ -4,6 +4,7 @@ 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 { Unpromise } from '../vendor/unpromise/unpromise.mjs';
7
8
  import { isTrackedEnvelope } from '../unstable-core-do-not-import/stream/tracked.mjs';
8
9
  import { transformTRPCResponse } from '../unstable-core-do-not-import/transformer.mjs';
9
10
  import { toURL } from '../unstable-core-do-not-import/http/toURL.mjs';
@@ -159,8 +160,12 @@ function getWSConnectionHandler(opts) {
159
160
  abortController.signal.onabort = ()=>resolve('abort');
160
161
  });
161
162
  run(async ()=>{
163
+ // We need those declarations outside the loop for garbage collection reasons. If they
164
+ // were declared inside, they would not be freed until the next value is present.
165
+ let next;
166
+ let result;
162
167
  while(true){
163
- const next = await Promise.race([
168
+ next = await Unpromise.race([
164
169
  iterator.next().catch(getTRPCErrorFromUnknown),
165
170
  abortPromise
166
171
  ]);
@@ -195,7 +200,7 @@ function getWSConnectionHandler(opts) {
195
200
  if (next.done) {
196
201
  break;
197
202
  }
198
- const result = {
203
+ result = {
199
204
  type: 'data',
200
205
  data: next.value
201
206
  };
@@ -212,6 +217,9 @@ function getWSConnectionHandler(opts) {
212
217
  jsonrpc,
213
218
  result
214
219
  });
220
+ // free up references for garbage collection
221
+ next = null;
222
+ result = null;
215
223
  }
216
224
  await iterator.return?.();
217
225
  respond({
@@ -1,7 +1,7 @@
1
1
  {
2
- "bundleSize": 150109,
3
- "bundleOrigSize": 198306,
4
- "bundleReduction": 24.3,
2
+ "bundleSize": 163125,
3
+ "bundleOrigSize": 213790,
4
+ "bundleReduction": 23.7,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/unstable-core-do-not-import/http/resolveResponse.ts",
@@ -14,13 +14,13 @@
14
14
  "dependents": [
15
15
  "/src/unstable-core-do-not-import.ts"
16
16
  ],
17
- "percent": 14.42,
17
+ "percent": 13.27,
18
18
  "reduction": 0
19
19
  },
20
20
  {
21
21
  "id": "/src/unstable-core-do-not-import/stream/jsonl.ts",
22
- "size": 17567,
23
- "origSize": 18465,
22
+ "size": 17591,
23
+ "origSize": 18521,
24
24
  "renderedExports": [
25
25
  "isPromise",
26
26
  "jsonlStreamProducer",
@@ -31,13 +31,13 @@
31
31
  "/src/unstable-core-do-not-import.ts",
32
32
  "/src/unstable-core-do-not-import/http/resolveResponse.ts"
33
33
  ],
34
- "percent": 11.7,
35
- "reduction": 4.86
34
+ "percent": 10.78,
35
+ "reduction": 5.02
36
36
  },
37
37
  {
38
38
  "id": "/src/adapters/ws.ts",
39
- "size": 16285,
40
- "origSize": 15212,
39
+ "size": 16701,
40
+ "origSize": 15769,
41
41
  "renderedExports": [
42
42
  "getWSConnectionHandler",
43
43
  "handleKeepAlive",
@@ -47,9 +47,22 @@
47
47
  "dependents": [
48
48
  "/src/adapters/fastify/fastifyTRPCPlugin.ts"
49
49
  ],
50
- "percent": 10.85,
50
+ "percent": 10.24,
51
51
  "reduction": 0
52
52
  },
53
+ {
54
+ "id": "/src/vendor/unpromise/unpromise.ts",
55
+ "size": 11734,
56
+ "origSize": 13857,
57
+ "renderedExports": [
58
+ "Unpromise",
59
+ "resolveSelfTuple"
60
+ ],
61
+ "removedExports": [],
62
+ "dependents": [],
63
+ "percent": 7.19,
64
+ "reduction": 15.32
65
+ },
53
66
  {
54
67
  "id": "/src/unstable-core-do-not-import/http/contentType.ts",
55
68
  "size": 7688,
@@ -62,13 +75,13 @@
62
75
  "/src/unstable-core-do-not-import.ts",
63
76
  "/src/unstable-core-do-not-import/http/resolveResponse.ts"
64
77
  ],
65
- "percent": 5.12,
78
+ "percent": 4.71,
66
79
  "reduction": 0
67
80
  },
68
81
  {
69
82
  "id": "/src/unstable-core-do-not-import/stream/sse.ts",
70
- "size": 6981,
71
- "origSize": 9374,
83
+ "size": 7329,
84
+ "origSize": 9782,
72
85
  "renderedExports": [
73
86
  "sseStreamProducer",
74
87
  "sseStreamConsumer",
@@ -79,8 +92,8 @@
79
92
  "/src/unstable-core-do-not-import.ts",
80
93
  "/src/unstable-core-do-not-import/http/resolveResponse.ts"
81
94
  ],
82
- "percent": 4.65,
83
- "reduction": 25.53
95
+ "percent": 4.49,
96
+ "reduction": 25.08
84
97
  },
85
98
  {
86
99
  "id": "/src/unstable-core-do-not-import/router.ts",
@@ -97,13 +110,13 @@
97
110
  "/src/unstable-core-do-not-import.ts",
98
111
  "/src/unstable-core-do-not-import/initTRPC.ts"
99
112
  ],
100
- "percent": 4.28,
113
+ "percent": 3.94,
101
114
  "reduction": 40.09
102
115
  },
103
116
  {
104
117
  "id": "/src/unstable-core-do-not-import/procedureBuilder.ts",
105
118
  "size": 5795,
106
- "origSize": 16437,
119
+ "origSize": 16436,
107
120
  "renderedExports": [
108
121
  "createBuilder"
109
122
  ],
@@ -112,7 +125,7 @@
112
125
  "/src/unstable-core-do-not-import.ts",
113
126
  "/src/unstable-core-do-not-import/initTRPC.ts"
114
127
  ],
115
- "percent": 3.86,
128
+ "percent": 3.55,
116
129
  "reduction": 64.74
117
130
  },
118
131
  {
@@ -126,7 +139,7 @@
126
139
  "dependents": [
127
140
  "/src/adapters/aws-lambda/index.ts"
128
141
  ],
129
- "percent": 3.61,
142
+ "percent": 3.32,
130
143
  "reduction": 11.38
131
144
  },
132
145
  {
@@ -146,7 +159,7 @@
146
159
  "/src/observable/operators.ts",
147
160
  "/src/observable/behaviorSubject.ts"
148
161
  ],
149
- "percent": 2.98,
162
+ "percent": 2.75,
150
163
  "reduction": 0
151
164
  },
152
165
  {
@@ -161,7 +174,7 @@
161
174
  "dependents": [
162
175
  "/src/adapters/node-http/index.ts"
163
176
  ],
164
- "percent": 2.97,
177
+ "percent": 2.74,
165
178
  "reduction": 2.49
166
179
  },
167
180
  {
@@ -179,7 +192,7 @@
179
192
  "dependents": [
180
193
  "/src/observable/index.ts"
181
194
  ],
182
- "percent": 2.6,
195
+ "percent": 2.4,
183
196
  "reduction": 1.66
184
197
  },
185
198
  {
@@ -193,7 +206,7 @@
193
206
  "dependents": [
194
207
  "/src/adapters/next-app-dir.ts"
195
208
  ],
196
- "percent": 2.15,
209
+ "percent": 1.97,
197
210
  "reduction": 22.57
198
211
  },
199
212
  {
@@ -213,7 +226,7 @@
213
226
  "/src/unstable-core-do-not-import/initTRPC.ts",
214
227
  "/src/unstable-core-do-not-import/router.ts"
215
228
  ],
216
- "percent": 1.83,
229
+ "percent": 1.68,
217
230
  "reduction": 45.94
218
231
  },
219
232
  {
@@ -227,7 +240,7 @@
227
240
  "dependents": [
228
241
  "/src/unstable-core-do-not-import.ts"
229
242
  ],
230
- "percent": 1.8,
243
+ "percent": 1.65,
231
244
  "reduction": 40.98
232
245
  },
233
246
  {
@@ -247,7 +260,7 @@
247
260
  "/src/unstable-core-do-not-import/initTRPC.ts",
248
261
  "/src/unstable-core-do-not-import/procedureBuilder.ts"
249
262
  ],
250
- "percent": 1.75,
263
+ "percent": 1.61,
251
264
  "reduction": 55.78
252
265
  },
253
266
  {
@@ -274,18 +287,18 @@
274
287
  "/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
275
288
  "/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
276
289
  "/src/unstable-core-do-not-import/http/resolveResponse.ts",
290
+ "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
277
291
  "/src/unstable-core-do-not-import/error/TRPCError.ts",
278
292
  "/src/unstable-core-do-not-import/transformer.ts",
279
293
  "/src/unstable-core-do-not-import/middleware.ts",
280
294
  "/src/unstable-core-do-not-import/router.ts",
281
- "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
282
295
  "/src/unstable-core-do-not-import/http/contentType.ts",
283
296
  "/src/unstable-core-do-not-import/procedureBuilder.ts",
284
297
  "/src/unstable-core-do-not-import/stream/jsonl.ts",
285
298
  "/src/unstable-core-do-not-import/stream/sse.ts",
286
299
  "/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts"
287
300
  ],
288
- "percent": 1.64,
301
+ "percent": 1.51,
289
302
  "reduction": 17.51
290
303
  },
291
304
  {
@@ -301,7 +314,7 @@
301
314
  "/src/unstable-core-do-not-import.ts",
302
315
  "/src/unstable-core-do-not-import/router.ts"
303
316
  ],
304
- "percent": 1.55,
317
+ "percent": 1.43,
305
318
  "reduction": 0
306
319
  },
307
320
  {
@@ -315,7 +328,7 @@
315
328
  "dependents": [
316
329
  "/src/adapters/fetch/index.ts"
317
330
  ],
318
- "percent": 1.5,
331
+ "percent": 1.38,
319
332
  "reduction": 2.17
320
333
  },
321
334
  {
@@ -330,7 +343,7 @@
330
343
  "/src/adapters/node-http/index.ts",
331
344
  "/src/adapters/node-http/nodeHTTPRequestHandler.ts"
332
345
  ],
333
- "percent": 1.47,
346
+ "percent": 1.35,
334
347
  "reduction": 14.72
335
348
  },
336
349
  {
@@ -351,7 +364,7 @@
351
364
  "/src/unstable-core-do-not-import/http/resolveResponse.ts",
352
365
  "/src/unstable-core-do-not-import/error/getErrorShape.ts"
353
366
  ],
354
- "percent": 1.39,
367
+ "percent": 1.28,
355
368
  "reduction": 18.54
356
369
  },
357
370
  {
@@ -365,9 +378,24 @@
365
378
  "dependents": [
366
379
  "/src/adapters/next-app-dir/nextAppDirCaller.ts"
367
380
  ],
368
- "percent": 1.37,
381
+ "percent": 1.26,
369
382
  "reduction": 5.79
370
383
  },
384
+ {
385
+ "id": "/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts",
386
+ "size": 1999,
387
+ "origSize": 2147,
388
+ "renderedExports": [
389
+ "withCancel",
390
+ "takeWithGrace"
391
+ ],
392
+ "removedExports": [],
393
+ "dependents": [
394
+ "/src/unstable-core-do-not-import/stream/sse.ts"
395
+ ],
396
+ "percent": 1.23,
397
+ "reduction": 6.89
398
+ },
371
399
  {
372
400
  "id": "/src/adapters/fastify/fastifyTRPCPlugin.ts",
373
401
  "size": 1779,
@@ -379,7 +407,7 @@
379
407
  "dependents": [
380
408
  "/src/adapters/fastify/index.ts"
381
409
  ],
382
- "percent": 1.19,
410
+ "percent": 1.09,
383
411
  "reduction": 29.88
384
412
  },
385
413
  {
@@ -404,7 +432,7 @@
404
432
  "/src/unstable-core-do-not-import/stream/jsonl.ts",
405
433
  "/src/unstable-core-do-not-import/stream/sse.ts"
406
434
  ],
407
- "percent": 1.15,
435
+ "percent": 1.06,
408
436
  "reduction": 19.47
409
437
  },
410
438
  {
@@ -416,24 +444,9 @@
416
444
  ],
417
445
  "removedExports": [],
418
446
  "dependents": [],
419
- "percent": 1.13,
447
+ "percent": 1.04,
420
448
  "reduction": 19.29
421
449
  },
422
- {
423
- "id": "/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts",
424
- "size": 1655,
425
- "origSize": 1734,
426
- "renderedExports": [
427
- "withCancel",
428
- "takeWithGrace"
429
- ],
430
- "removedExports": [],
431
- "dependents": [
432
- "/src/unstable-core-do-not-import/stream/sse.ts"
433
- ],
434
- "percent": 1.1,
435
- "reduction": 4.56
436
- },
437
450
  {
438
451
  "id": "/src/unstable-core-do-not-import/rpc/codes.ts",
439
452
  "size": 1611,
@@ -444,7 +457,7 @@
444
457
  ],
445
458
  "removedExports": [],
446
459
  "dependents": [],
447
- "percent": 1.07,
460
+ "percent": 0.99,
448
461
  "reduction": 17.81
449
462
  },
450
463
  {
@@ -456,7 +469,7 @@
456
469
  ],
457
470
  "removedExports": [],
458
471
  "dependents": [],
459
- "percent": 0.88,
472
+ "percent": 0.81,
460
473
  "reduction": 35.1
461
474
  },
462
475
  {
@@ -471,7 +484,7 @@
471
484
  "/src/unstable-core-do-not-import.ts",
472
485
  "/src/unstable-core-do-not-import/procedureBuilder.ts"
473
486
  ],
474
- "percent": 0.86,
487
+ "percent": 0.8,
475
488
  "reduction": 55.21
476
489
  },
477
490
  {
@@ -486,7 +499,7 @@
486
499
  "/src/adapters/fastify/index.ts",
487
500
  "/src/adapters/fastify/fastifyTRPCPlugin.ts"
488
501
  ],
489
- "percent": 0.75,
502
+ "percent": 0.69,
490
503
  "reduction": 47.59
491
504
  },
492
505
  {
@@ -502,7 +515,7 @@
502
515
  "/src/unstable-core-do-not-import.ts",
503
516
  "/src/unstable-core-do-not-import/http/contentType.ts"
504
517
  ],
505
- "percent": 0.74,
518
+ "percent": 0.68,
506
519
  "reduction": 15.08
507
520
  },
508
521
  {
@@ -516,9 +529,24 @@
516
529
  "dependents": [
517
530
  "/src/unstable-core-do-not-import.ts"
518
531
  ],
519
- "percent": 0.71,
532
+ "percent": 0.65,
520
533
  "reduction": 0
521
534
  },
535
+ {
536
+ "id": "/src/unstable-core-do-not-import/stream/utils/withPing.ts",
537
+ "size": 1058,
538
+ "origSize": 1213,
539
+ "renderedExports": [
540
+ "PING_SYM",
541
+ "withPing"
542
+ ],
543
+ "removedExports": [],
544
+ "dependents": [
545
+ "/src/unstable-core-do-not-import/stream/sse.ts"
546
+ ],
547
+ "percent": 0.65,
548
+ "reduction": 12.78
549
+ },
522
550
  {
523
551
  "id": "/src/adapters/next-app-dir/redirect.ts",
524
552
  "size": 987,
@@ -533,7 +561,7 @@
533
561
  "/src/adapters/next-app-dir/nextAppDirCaller.ts",
534
562
  "/src/adapters/next-app-dir/rethrowNextErrors.ts"
535
563
  ],
536
- "percent": 0.66,
564
+ "percent": 0.61,
537
565
  "reduction": 13.65
538
566
  },
539
567
  {
@@ -547,24 +575,9 @@
547
575
  "dependents": [
548
576
  "/src/observable/index.ts"
549
577
  ],
550
- "percent": 0.64,
578
+ "percent": 0.59,
551
579
  "reduction": 32.89
552
580
  },
553
- {
554
- "id": "/src/unstable-core-do-not-import/stream/utils/withPing.ts",
555
- "size": 908,
556
- "origSize": 1019,
557
- "renderedExports": [
558
- "PING_SYM",
559
- "withPing"
560
- ],
561
- "removedExports": [],
562
- "dependents": [
563
- "/src/unstable-core-do-not-import/stream/sse.ts"
564
- ],
565
- "percent": 0.6,
566
- "reduction": 10.89
567
- },
568
581
  {
569
582
  "id": "/src/adapters/express.ts",
570
583
  "size": 859,
@@ -574,7 +587,7 @@
574
587
  ],
575
588
  "removedExports": [],
576
589
  "dependents": [],
577
- "percent": 0.57,
590
+ "percent": 0.53,
578
591
  "reduction": 34.73
579
592
  },
580
593
  {
@@ -591,7 +604,7 @@
591
604
  "/src/unstable-core-do-not-import.ts",
592
605
  "/src/unstable-core-do-not-import/stream/sse.ts"
593
606
  ],
594
- "percent": 0.52,
607
+ "percent": 0.48,
595
608
  "reduction": 44.37
596
609
  },
597
610
  {
@@ -603,7 +616,7 @@
603
616
  ],
604
617
  "removedExports": [],
605
618
  "dependents": [],
606
- "percent": 0.51,
619
+ "percent": 0.47,
607
620
  "reduction": 66.9
608
621
  },
609
622
  {
@@ -619,7 +632,7 @@
619
632
  "/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts",
620
633
  "/src/unstable-core-do-not-import/stream/utils/withPing.ts"
621
634
  ],
622
- "percent": 0.5,
635
+ "percent": 0.46,
623
636
  "reduction": 10.56
624
637
  },
625
638
  {
@@ -632,7 +645,7 @@
632
645
  ],
633
646
  "removedExports": [],
634
647
  "dependents": [],
635
- "percent": 0.5,
648
+ "percent": 0.46,
636
649
  "reduction": 59.78
637
650
  },
638
651
  {
@@ -648,7 +661,7 @@
648
661
  "/src/unstable-core-do-not-import/stream/jsonl.ts",
649
662
  "/src/unstable-core-do-not-import/stream/sse.ts"
650
663
  ],
651
- "percent": 0.47,
664
+ "percent": 0.43,
652
665
  "reduction": 21.32
653
666
  },
654
667
  {
@@ -662,7 +675,7 @@
662
675
  "dependents": [
663
676
  "/src/unstable-core-do-not-import.ts"
664
677
  ],
665
- "percent": 0.44,
678
+ "percent": 0.41,
666
679
  "reduction": 0.6
667
680
  },
668
681
  {
@@ -677,7 +690,7 @@
677
690
  "/src/unstable-core-do-not-import.ts",
678
691
  "/src/unstable-core-do-not-import/http/resolveResponse.ts"
679
692
  ],
680
- "percent": 0.42,
693
+ "percent": 0.38,
681
694
  "reduction": 43.49
682
695
  },
683
696
  {
@@ -691,7 +704,7 @@
691
704
  "dependents": [
692
705
  "/src/unstable-core-do-not-import.ts"
693
706
  ],
694
- "percent": 0.23,
707
+ "percent": 0.21,
695
708
  "reduction": 9.02
696
709
  },
697
710
  {
@@ -706,7 +719,7 @@
706
719
  "/src/unstable-core-do-not-import.ts",
707
720
  "/src/unstable-core-do-not-import/initTRPC.ts"
708
721
  ],
709
- "percent": 0.23,
722
+ "percent": 0.21,
710
723
  "reduction": 89.5
711
724
  },
712
725
  {
@@ -723,7 +736,7 @@
723
736
  "/src/unstable-core-do-not-import/stream/utils/createReadableStream.ts",
724
737
  "/src/unstable-core-do-not-import/stream/utils/promiseTimer.ts"
725
738
  ],
726
- "percent": 0.21,
739
+ "percent": 0.19,
727
740
  "reduction": 25.9
728
741
  },
729
742
  {
@@ -737,7 +750,7 @@
737
750
  "dependents": [
738
751
  "/src/unstable-core-do-not-import.ts"
739
752
  ],
740
- "percent": 0.18,
753
+ "percent": 0.17,
741
754
  "reduction": 68.45
742
755
  },
743
756
  {
@@ -751,7 +764,7 @@
751
764
  "dependents": [
752
765
  "/src/adapters/next-app-dir.ts"
753
766
  ],
754
- "percent": 0.15,
767
+ "percent": 0.13,
755
768
  "reduction": 36.26
756
769
  },
757
770
  {
@@ -799,9 +812,9 @@
799
812
  "reduction": 100
800
813
  },
801
814
  {
802
- "id": "/src/index.ts",
815
+ "id": "/src/rpc.ts",
803
816
  "size": 0,
804
- "origSize": 32,
817
+ "origSize": 36,
805
818
  "renderedExports": [],
806
819
  "removedExports": [],
807
820
  "dependents": [],
@@ -809,9 +822,9 @@
809
822
  "reduction": 100
810
823
  },
811
824
  {
812
- "id": "/src/rpc.ts",
825
+ "id": "/src/index.ts",
813
826
  "size": 0,
814
- "origSize": 36,
827
+ "origSize": 32,
815
828
  "renderedExports": [],
816
829
  "removedExports": [],
817
830
  "dependents": [],
@@ -826,9 +839,9 @@
826
839
  "removedExports": [],
827
840
  "dependents": [
828
841
  "/src/adapters/express.ts",
829
- "/src/adapters/next.ts",
830
842
  "/src/adapters/standalone.ts",
831
843
  "/src/adapters/ws.ts",
844
+ "/src/adapters/next.ts",
832
845
  "/src/adapters/node-http/nodeHTTPRequestHandler.ts",
833
846
  "/src/adapters/next-app-dir/nextAppDirCaller.ts"
834
847
  ],
@@ -895,13 +908,13 @@
895
908
  "removedExports": [],
896
909
  "dependents": [
897
910
  "/src/adapters/express.ts",
898
- "/src/adapters/next.ts",
899
911
  "/src/adapters/standalone.ts",
912
+ "/src/adapters/next.ts",
900
913
  "/src/adapters/fastify/fastifyRequestHandler.ts"
901
914
  ],
902
915
  "percent": 0,
903
916
  "reduction": 100
904
917
  }
905
918
  ],
906
- "moduleCount": 59
919
+ "moduleCount": 60
907
920
  }
@@ -113,7 +113,7 @@ export interface ProcedureBuilder<TContext, TMeta, TContextOverrides, TInputIn,
113
113
  * Subscription procedure
114
114
  * @see https://trpc.io/docs/v11/server/subscriptions
115
115
  */
116
- subscription<$Output extends AsyncGenerator<any, void, any>>(resolver: ProcedureResolver<TContext, TMeta, TContextOverrides, TInputOut, TOutputIn, $Output>): TCaller extends true ? TypeError<'Not implemented'> : SubscriptionProcedure<{
116
+ subscription<$Output extends AsyncIterable<any, void, any>>(resolver: ProcedureResolver<TContext, TMeta, TContextOverrides, TInputOut, TOutputIn, $Output>): TCaller extends true ? TypeError<'Not implemented'> : SubscriptionProcedure<{
117
117
  input: DefaultValue<TInputIn, void>;
118
118
  output: inferSubscriptionOutput<DefaultValue<TOutputOut, $Output>>;
119
119
  }>;