@trpc/server 11.0.0-alpha-tmp-issues-6554.823 → 11.0.0-alpha-tmp-02-12-response-types-idea.847

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 (33) hide show
  1. package/dist/adapters/fetch/types.d.ts +8 -2
  2. package/dist/adapters/fetch/types.d.ts.map +1 -1
  3. package/dist/adapters/next-app-dir/redirect.d.ts.map +1 -1
  4. package/dist/adapters/next-app-dir/rethrowNextErrors.d.ts.map +1 -1
  5. package/dist/adapters/node-http/nodeHTTPRequestHandler.d.ts.map +1 -1
  6. package/dist/adapters/ws.d.ts.map +1 -1
  7. package/dist/bundle-analysis.json +92 -92
  8. package/dist/unstable-core-do-not-import/clientish/inference.d.ts +1 -1
  9. package/dist/unstable-core-do-not-import/clientish/inference.d.ts.map +1 -1
  10. package/dist/unstable-core-do-not-import/createProxy.d.ts.map +1 -1
  11. package/dist/unstable-core-do-not-import/http/resolveResponse.d.ts.map +1 -1
  12. package/dist/unstable-core-do-not-import/http/resolveResponse.js +20 -1
  13. package/dist/unstable-core-do-not-import/http/resolveResponse.mjs +20 -1
  14. package/dist/unstable-core-do-not-import/initTRPC.d.ts.map +1 -1
  15. package/dist/unstable-core-do-not-import/initTRPC.js +1 -0
  16. package/dist/unstable-core-do-not-import/initTRPC.mjs +1 -0
  17. package/dist/unstable-core-do-not-import/procedureBuilder.d.ts +4 -2
  18. package/dist/unstable-core-do-not-import/procedureBuilder.d.ts.map +1 -1
  19. package/dist/unstable-core-do-not-import/procedureBuilder.js +9 -3
  20. package/dist/unstable-core-do-not-import/procedureBuilder.mjs +9 -3
  21. package/dist/unstable-core-do-not-import/rootConfig.d.ts +3 -1
  22. package/dist/unstable-core-do-not-import/rootConfig.d.ts.map +1 -1
  23. package/dist/unstable-core-do-not-import/router.d.ts.map +1 -1
  24. package/dist/unstable-core-do-not-import/transformer.d.ts +1 -1
  25. package/dist/unstable-core-do-not-import/utils.d.ts.map +1 -1
  26. package/package.json +50 -185
  27. package/src/adapters/fetch/types.ts +8 -2
  28. package/src/unstable-core-do-not-import/clientish/inference.ts +8 -3
  29. package/src/unstable-core-do-not-import/http/resolveResponse.ts +31 -4
  30. package/src/unstable-core-do-not-import/initTRPC.ts +1 -0
  31. package/src/unstable-core-do-not-import/procedureBuilder.ts +15 -2
  32. package/src/unstable-core-do-not-import/rootConfig.ts +3 -1
  33. /package/dist/node_modules/.pnpm/{@rollup_plugin-typescript@12.1.2_rollup@4.34.8_tslib@2.8.1_typescript@5.7.2 → @rollup_plugin-typescript@12.1.2_rollup@4.34.8_tslib@2.8.1_typescript@5.8.2}/node_modules/tslib/tslib.es6.js +0 -0
@@ -9,11 +9,17 @@
9
9
  */
10
10
  import type { AnyRouter, CreateContextCallback, inferRouterContext } from '../../@trpc/server';
11
11
  import type { HTTPBaseHandlerOptions, TRPCRequestInfo } from '../../@trpc/server/http';
12
- export type FetchCreateContextFnOptions = {
12
+ export interface FetchCreateContextFnOptions {
13
13
  req: Request;
14
+ /**
15
+ * Used for setting headers on the `Response`
16
+ */
14
17
  resHeaders: Headers;
18
+ /**
19
+ * Info about the request
20
+ */
15
21
  info: TRPCRequestInfo;
16
- };
22
+ }
17
23
  export type FetchCreateContextFn<TRouter extends AnyRouter> = (opts: FetchCreateContextFnOptions) => inferRouterContext<TRouter> | Promise<inferRouterContext<TRouter>>;
18
24
  export type FetchCreateContextOption<TRouter extends AnyRouter> = CreateContextCallback<inferRouterContext<TRouter>, FetchCreateContextFn<TRouter>>;
19
25
  export type FetchHandlerOptions<TRouter extends AnyRouter> = FetchCreateContextOption<TRouter> & HTTPBaseHandlerOptions<TRouter, Request> & {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/adapters/fetch/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,SAAS,EACT,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAE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;gBACT,GAAG,EAAE,GAAG,GAAG,MAAM,EAAE,YAAY,CAAC,EAAE,YAAY;CAS3D;AAED;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,QAAS,GAAG,GAAG,MAAM,iBAAiB,YAAY,KAEP,SAC/D,CAAC"}
1
+ {"version":3,"file":"redirect.d.ts","sourceRoot":"","sources":["../../../src/adapters/next-app-dir/redirect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,SAAS;IAC9C,SAAgB,IAAI,8CAAC;gBACT,GAAG,EAAE,GAAG,GAAG,MAAM,EAAE,YAAY,CAAC,EAAE,YAAY;CAS3D;AAED;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAI,KAAK,GAAG,GAAG,MAAM,EAAE,eAAe,YAAY,KAEP,SAC/D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"rethrowNextErrors.d.ts","sourceRoot":"","sources":["../../../src/adapters/next-app-dir/rethrowNextErrors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAyCpD;;GAEG;AACH,eAAO,MAAM,iBAAiB,UAAW,SAAS,SAsBjD,CAAC"}
1
+ {"version":3,"file":"rethrowNextErrors.d.ts","sourceRoot":"","sources":["../../../src/adapters/next-app-dir/rethrowNextErrors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAyCpD;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,OAAO,SAAS,SAsBjD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"nodeHTTPRequestHandler.d.ts","sourceRoot":"","sources":["../../../src/adapters/node-http/nodeHTTPRequestHandler.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,oBAAoB,CAAC;AAM5B,OAAO,KAAK,EACV,eAAe,EACf,6BAA6B,EAC7B,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAGjB;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,SAAS,SAAS,EACzB,QAAQ,SAAS,eAAe,EAChC,SAAS,SAAS,gBAAgB,EAClC,IAAI,EAAE,6BAA6B,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,WAClD,OAAO,UA6BvB;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,SAAS,SAAS,EACzB,QAAQ,SAAS,eAAe,EAChC,SAAS,SAAS,gBAAgB,EAClC,IAAI,EAAE,6BAA6B,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,iBA6ClE"}
1
+ {"version":3,"file":"nodeHTTPRequestHandler.d.ts","sourceRoot":"","sources":["../../../src/adapters/node-http/nodeHTTPRequestHandler.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAGL,KAAK,SAAS,EACf,MAAM,oBAAoB,CAAC;AAM5B,OAAO,KAAK,EACV,eAAe,EACf,6BAA6B,EAC7B,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAGjB;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,SAAS,SAAS,EACzB,QAAQ,SAAS,eAAe,EAChC,SAAS,SAAS,gBAAgB,EAClC,IAAI,EAAE,6BAA6B,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,IACzD,OAAO,OAAO,UA6BvB;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,OAAO,SAAS,SAAS,EACzB,QAAQ,SAAS,eAAe,EAChC,SAAS,SAAS,gBAAgB,EAClC,IAAI,EAAE,6BAA6B,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,iBA6ClE"}
@@ -1 +1 @@
1
- {"version":3,"file":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C3B,kBAAkB,CAAC,OAAO,CAAC,CAC5B,CAAC;AAEN;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,OAAO,SAAS,SAAS,IACrD,0BAA0B,CAAC,OAAO,CAAC,GAAG;IACpC,GAAG,EAAE,EAAE,CAAC,eAAe,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE;QACV;;;WAGG;QACH,OAAO,EAAE,OAAO,CAAC;QACjB;;;WAGG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB;;;WAGG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC;AAGJ,wBAAgB,sBAAsB,CAAC,OAAO,SAAS,SAAS,EAC9D,IAAI,EAAE,iBAAiB,CAAC,OAAO,CAAC,IAKlB,QAAQ,EAAE,CAAC,SAAS,EAAE,KAAK,eAAe,mBAmYzD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,EAAE,CAAC,SAAS,EACpB,MAAM,SAAS,EACf,UAAU,SAAQ,QAiCnB;AAED,wBAAgB,eAAe,CAAC,OAAO,SAAS,SAAS,EACvD,IAAI,EAAE,iBAAiB,CAAC,OAAO,CAAC;;EAwCjC"}
@@ -1,12 +1,12 @@
1
1
  {
2
- "bundleSize": 201851,
3
- "bundleOrigSize": 233664,
4
- "bundleReduction": 13.61,
2
+ "bundleSize": 203075,
3
+ "bundleOrigSize": 234991,
4
+ "bundleReduction": 13.58,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/unstable-core-do-not-import/http/resolveResponse.ts",
8
- "size": 21089,
9
- "origSize": 19447,
8
+ "size": 22092,
9
+ "origSize": 20303,
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": 10.45,
17
+ "percent": 10.88,
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": 9.98,
33
+ "percent": 9.92,
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.88,
50
+ "percent": 9.82,
51
51
  "reduction": 0
52
52
  },
53
53
  {
@@ -64,7 +64,7 @@
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.42,
67
+ "percent": 6.38,
68
68
  "reduction": 0
69
69
  },
70
70
  {
@@ -77,7 +77,7 @@
77
77
  ],
78
78
  "removedExports": [],
79
79
  "dependents": [],
80
- "percent": 6.02,
80
+ "percent": 5.98,
81
81
  "reduction": 11.62
82
82
  },
83
83
  {
@@ -98,7 +98,7 @@
98
98
  "/src/unstable-core-do-not-import/initTRPC.ts",
99
99
  "/src/unstable-core-do-not-import/http/contentType.ts"
100
100
  ],
101
- "percent": 5.04,
101
+ "percent": 5.01,
102
102
  "reduction": 29.51
103
103
  },
104
104
  {
@@ -112,7 +112,7 @@
112
112
  "dependents": [
113
113
  "/src/unstable-core-do-not-import/stream/jsonl.ts"
114
114
  ],
115
- "percent": 4.02,
115
+ "percent": 4,
116
116
  "reduction": 0
117
117
  },
118
118
  {
@@ -127,13 +127,13 @@
127
127
  "/src/unstable-core-do-not-import.ts",
128
128
  "/src/unstable-core-do-not-import/http/resolveResponse.ts"
129
129
  ],
130
- "percent": 3.9,
130
+ "percent": 3.88,
131
131
  "reduction": 0.83
132
132
  },
133
133
  {
134
134
  "id": "/src/unstable-core-do-not-import/procedureBuilder.ts",
135
- "size": 5825,
136
- "origSize": 16584,
135
+ "size": 6013,
136
+ "origSize": 16997,
137
137
  "renderedExports": [
138
138
  "createBuilder"
139
139
  ],
@@ -142,8 +142,8 @@
142
142
  "/src/unstable-core-do-not-import.ts",
143
143
  "/src/unstable-core-do-not-import/initTRPC.ts"
144
144
  ],
145
- "percent": 2.89,
146
- "reduction": 64.88
145
+ "percent": 2.96,
146
+ "reduction": 64.62
147
147
  },
148
148
  {
149
149
  "id": "/src/unstable-core-do-not-import/stream/utils/asyncIterable.ts",
@@ -162,7 +162,7 @@
162
162
  "/src/unstable-core-do-not-import/stream/sse.ts",
163
163
  "/src/unstable-core-do-not-import/stream/utils/withPing.ts"
164
164
  ],
165
- "percent": 2.83,
165
+ "percent": 2.81,
166
166
  "reduction": 0
167
167
  },
168
168
  {
@@ -176,7 +176,7 @@
176
176
  "dependents": [
177
177
  "/src/adapters/aws-lambda/index.ts"
178
178
  ],
179
- "percent": 2.68,
179
+ "percent": 2.66,
180
180
  "reduction": 12.47
181
181
  },
182
182
  {
@@ -196,7 +196,7 @@
196
196
  "/src/observable/operators.ts",
197
197
  "/src/observable/behaviorSubject.ts"
198
198
  ],
199
- "percent": 2.4,
199
+ "percent": 2.38,
200
200
  "reduction": 0
201
201
  },
202
202
  {
@@ -212,7 +212,7 @@
212
212
  "/src/unstable-core-do-not-import/stream/jsonl.ts",
213
213
  "/src/unstable-core-do-not-import/stream/sse.ts"
214
214
  ],
215
- "percent": 2.2,
215
+ "percent": 2.19,
216
216
  "reduction": 0
217
217
  },
218
218
  {
@@ -228,7 +228,7 @@
228
228
  "/src/adapters/node-http/index.ts",
229
229
  "/src/adapters/node-http/nodeHTTPRequestHandler.ts"
230
230
  ],
231
- "percent": 2.01,
231
+ "percent": 1.99,
232
232
  "reduction": 6.81
233
233
  },
234
234
  {
@@ -246,7 +246,7 @@
246
246
  "dependents": [
247
247
  "/src/observable/index.ts"
248
248
  ],
249
- "percent": 1.94,
249
+ "percent": 1.93,
250
250
  "reduction": 1.66
251
251
  },
252
252
  {
@@ -260,7 +260,7 @@
260
260
  "dependents": [
261
261
  "/src/adapters/next-app-dir.ts"
262
262
  ],
263
- "percent": 1.61,
263
+ "percent": 1.6,
264
264
  "reduction": 22.52
265
265
  },
266
266
  {
@@ -274,7 +274,7 @@
274
274
  "dependents": [
275
275
  "/src/adapters/aws-lambda/getPlanner.ts"
276
276
  ],
277
- "percent": 1.39,
277
+ "percent": 1.38,
278
278
  "reduction": 0
279
279
  },
280
280
  {
@@ -289,7 +289,7 @@
289
289
  "dependents": [
290
290
  "/src/adapters/node-http/index.ts"
291
291
  ],
292
- "percent": 1.36,
292
+ "percent": 1.35,
293
293
  "reduction": 16.3
294
294
  },
295
295
  {
@@ -305,17 +305,17 @@
305
305
  "removedExports": [],
306
306
  "dependents": [
307
307
  "/src/unstable-core-do-not-import.ts",
308
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
308
309
  "/src/unstable-core-do-not-import/router.ts",
309
- "/src/unstable-core-do-not-import/initTRPC.ts",
310
- "/src/unstable-core-do-not-import/http/resolveResponse.ts"
310
+ "/src/unstable-core-do-not-import/initTRPC.ts"
311
311
  ],
312
- "percent": 1.36,
312
+ "percent": 1.35,
313
313
  "reduction": 45.98
314
314
  },
315
315
  {
316
316
  "id": "/src/unstable-core-do-not-import/initTRPC.ts",
317
- "size": 2664,
318
- "origSize": 4501,
317
+ "size": 2697,
318
+ "origSize": 4526,
319
319
  "renderedExports": [
320
320
  "initTRPC"
321
321
  ],
@@ -323,8 +323,8 @@
323
323
  "dependents": [
324
324
  "/src/unstable-core-do-not-import.ts"
325
325
  ],
326
- "percent": 1.32,
327
- "reduction": 40.81
326
+ "percent": 1.33,
327
+ "reduction": 40.41
328
328
  },
329
329
  {
330
330
  "id": "/src/unstable-core-do-not-import/middleware.ts",
@@ -343,7 +343,7 @@
343
343
  "/src/unstable-core-do-not-import/initTRPC.ts",
344
344
  "/src/unstable-core-do-not-import/procedureBuilder.ts"
345
345
  ],
346
- "percent": 1.3,
346
+ "percent": 1.29,
347
347
  "reduction": 55.79
348
348
  },
349
349
  {
@@ -367,21 +367,21 @@
367
367
  "removedExports": [],
368
368
  "dependents": [
369
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",
370
373
  "/src/unstable-core-do-not-import/error/TRPCError.ts",
371
374
  "/src/unstable-core-do-not-import/router.ts",
372
375
  "/src/unstable-core-do-not-import/transformer.ts",
373
376
  "/src/unstable-core-do-not-import/middleware.ts",
374
- "/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
375
- "/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
376
- "/src/unstable-core-do-not-import/http/resolveResponse.ts",
377
- "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
378
377
  "/src/unstable-core-do-not-import/http/contentType.ts",
379
378
  "/src/unstable-core-do-not-import/http/abortError.ts",
380
379
  "/src/unstable-core-do-not-import/procedureBuilder.ts",
380
+ "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
381
381
  "/src/unstable-core-do-not-import/stream/jsonl.ts",
382
382
  "/src/unstable-core-do-not-import/stream/sse.ts"
383
383
  ],
384
- "percent": 1.22,
384
+ "percent": 1.21,
385
385
  "reduction": 17.51
386
386
  },
387
387
  {
@@ -396,10 +396,10 @@
396
396
  "removedExports": [],
397
397
  "dependents": [
398
398
  "/src/unstable-core-do-not-import.ts",
399
- "/src/unstable-core-do-not-import/router.ts",
400
- "/src/unstable-core-do-not-import/middleware.ts",
401
399
  "/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
402
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
403
  "/src/unstable-core-do-not-import/http/contentType.ts",
404
404
  "/src/unstable-core-do-not-import/procedureBuilder.ts",
405
405
  "/src/unstable-core-do-not-import/stream/sse.ts"
@@ -434,7 +434,7 @@
434
434
  "dependents": [
435
435
  "/src/adapters/fetch/index.ts"
436
436
  ],
437
- "percent": 1.11,
437
+ "percent": 1.1,
438
438
  "reduction": 2.48
439
439
  },
440
440
  {
@@ -449,7 +449,7 @@
449
449
  "/src/adapters/next-app-dir.ts",
450
450
  "/src/adapters/next-app-dir/nextAppDirCaller.ts"
451
451
  ],
452
- "percent": 1.05,
452
+ "percent": 1.04,
453
453
  "reduction": 5.4
454
454
  },
455
455
  {
@@ -467,8 +467,8 @@
467
467
  "removedExports": [],
468
468
  "dependents": [
469
469
  "/src/unstable-core-do-not-import.ts",
470
- "/src/unstable-core-do-not-import/error/getErrorShape.ts",
471
- "/src/unstable-core-do-not-import/http/resolveResponse.ts"
470
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
471
+ "/src/unstable-core-do-not-import/error/getErrorShape.ts"
472
472
  ],
473
473
  "percent": 1.03,
474
474
  "reduction": 18.54
@@ -519,7 +519,7 @@
519
519
  "/src/unstable-core-do-not-import/stream/utils/mergeAsyncIterables.ts",
520
520
  "/src/unstable-core-do-not-import/stream/utils/timerResource.ts"
521
521
  ],
522
- "percent": 0.87,
522
+ "percent": 0.86,
523
523
  "reduction": 4.41
524
524
  },
525
525
  {
@@ -531,7 +531,7 @@
531
531
  ],
532
532
  "removedExports": [],
533
533
  "dependents": [],
534
- "percent": 0.84,
534
+ "percent": 0.83,
535
535
  "reduction": 19.62
536
536
  },
537
537
  {
@@ -544,7 +544,7 @@
544
544
  ],
545
545
  "removedExports": [],
546
546
  "dependents": [],
547
- "percent": 0.8,
547
+ "percent": 0.79,
548
548
  "reduction": 17.81
549
549
  },
550
550
  {
@@ -559,7 +559,7 @@
559
559
  "/src/unstable-core-do-not-import.ts",
560
560
  "/src/unstable-core-do-not-import/procedureBuilder.ts"
561
561
  ],
562
- "percent": 0.8,
562
+ "percent": 0.79,
563
563
  "reduction": 54.01
564
564
  },
565
565
  {
@@ -571,7 +571,7 @@
571
571
  ],
572
572
  "removedExports": [],
573
573
  "dependents": [],
574
- "percent": 0.66,
574
+ "percent": 0.65,
575
575
  "reduction": 35.1
576
576
  },
577
577
  {
@@ -588,7 +588,7 @@
588
588
  "/src/adapters/next-app-dir/nextAppDirCaller.ts",
589
589
  "/src/adapters/next-app-dir/rethrowNextErrors.ts"
590
590
  ],
591
- "percent": 0.66,
591
+ "percent": 0.65,
592
592
  "reduction": 0
593
593
  },
594
594
  {
@@ -603,7 +603,7 @@
603
603
  "/src/adapters/fastify/index.ts",
604
604
  "/src/adapters/fastify/fastifyTRPCPlugin.ts"
605
605
  ],
606
- "percent": 0.57,
606
+ "percent": 0.56,
607
607
  "reduction": 47.55
608
608
  },
609
609
  {
@@ -619,7 +619,7 @@
619
619
  "/src/unstable-core-do-not-import.ts",
620
620
  "/src/unstable-core-do-not-import/http/contentType.ts"
621
621
  ],
622
- "percent": 0.55,
622
+ "percent": 0.54,
623
623
  "reduction": 15.08
624
624
  },
625
625
  {
@@ -633,7 +633,7 @@
633
633
  "dependents": [
634
634
  "/src/unstable-core-do-not-import.ts"
635
635
  ],
636
- "percent": 0.53,
636
+ "percent": 0.52,
637
637
  "reduction": 0
638
638
  },
639
639
  {
@@ -690,7 +690,7 @@
690
690
  "/src/unstable-core-do-not-import.ts",
691
691
  "/src/unstable-core-do-not-import/stream/sse.ts"
692
692
  ],
693
- "percent": 0.39,
693
+ "percent": 0.38,
694
694
  "reduction": 44.13
695
695
  },
696
696
  {
@@ -702,7 +702,7 @@
702
702
  ],
703
703
  "removedExports": [],
704
704
  "dependents": [],
705
- "percent": 0.38,
705
+ "percent": 0.37,
706
706
  "reduction": 66.61
707
707
  },
708
708
  {
@@ -770,7 +770,7 @@
770
770
  {
771
771
  "id": "/src/unstable-core-do-not-import/rootConfig.ts",
772
772
  "size": 343,
773
- "origSize": 3318,
773
+ "origSize": 3351,
774
774
  "renderedExports": [
775
775
  "isServerDefault"
776
776
  ],
@@ -780,7 +780,7 @@
780
780
  "/src/unstable-core-do-not-import/initTRPC.ts"
781
781
  ],
782
782
  "percent": 0.17,
783
- "reduction": 89.66
783
+ "reduction": 89.76
784
784
  },
785
785
  {
786
786
  "id": "/src/unstable-core-do-not-import/stream/utils/createDeferred.ts",
@@ -875,34 +875,42 @@
875
875
  "reduction": 93.9
876
876
  },
877
877
  {
878
- "id": "/src/index.ts",
878
+ "id": "/src/http.ts",
879
879
  "size": 0,
880
- "origSize": 32,
880
+ "origSize": 37,
881
881
  "renderedExports": [],
882
882
  "removedExports": [],
883
- "dependents": [],
883
+ "dependents": [
884
+ "/src/adapters/ws.ts"
885
+ ],
884
886
  "percent": 0,
885
887
  "reduction": 100
886
888
  },
887
889
  {
888
- "id": "/src/http.ts",
890
+ "id": "/src/index.ts",
889
891
  "size": 0,
890
- "origSize": 37,
892
+ "origSize": 32,
891
893
  "renderedExports": [],
892
894
  "removedExports": [],
893
- "dependents": [
894
- "/src/adapters/ws.ts"
895
- ],
895
+ "dependents": [],
896
896
  "percent": 0,
897
897
  "reduction": 100
898
898
  },
899
899
  {
900
- "id": "/src/shared.ts",
900
+ "id": "/src/unstable-core-do-not-import.ts",
901
901
  "size": 0,
902
- "origSize": 653,
902
+ "origSize": 2584,
903
903
  "renderedExports": [],
904
904
  "removedExports": [],
905
- "dependents": [],
905
+ "dependents": [
906
+ "/src/adapters/express.ts",
907
+ "/src/adapters/standalone.ts",
908
+ "/src/adapters/ws.ts",
909
+ "/src/adapters/next.ts",
910
+ "/src/adapters/node-http/nodeHTTPRequestHandler.ts",
911
+ "/src/adapters/next-app-dir/nextAppDirCaller.ts",
912
+ "/src/adapters/node-http/writeResponse.ts"
913
+ ],
906
914
  "percent": 0,
907
915
  "reduction": 100
908
916
  },
@@ -917,20 +925,12 @@
917
925
  "reduction": 100
918
926
  },
919
927
  {
920
- "id": "/src/unstable-core-do-not-import.ts",
928
+ "id": "/src/shared.ts",
921
929
  "size": 0,
922
- "origSize": 2584,
930
+ "origSize": 653,
923
931
  "renderedExports": [],
924
932
  "removedExports": [],
925
- "dependents": [
926
- "/src/adapters/express.ts",
927
- "/src/adapters/next.ts",
928
- "/src/adapters/ws.ts",
929
- "/src/adapters/standalone.ts",
930
- "/src/adapters/node-http/nodeHTTPRequestHandler.ts",
931
- "/src/adapters/next-app-dir/nextAppDirCaller.ts",
932
- "/src/adapters/node-http/writeResponse.ts"
933
- ],
933
+ "dependents": [],
934
934
  "percent": 0,
935
935
  "reduction": 100
936
936
  },
@@ -966,16 +966,6 @@
966
966
  "percent": 0,
967
967
  "reduction": 100
968
968
  },
969
- {
970
- "id": "/src/adapters/fetch/index.ts",
971
- "size": 0,
972
- "origSize": 64,
973
- "renderedExports": [],
974
- "removedExports": [],
975
- "dependents": [],
976
- "percent": 0,
977
- "reduction": 100
978
- },
979
969
  {
980
970
  "id": "/src/adapters/node-http/index.ts",
981
971
  "size": 0,
@@ -984,13 +974,23 @@
984
974
  "removedExports": [],
985
975
  "dependents": [
986
976
  "/src/adapters/express.ts",
987
- "/src/adapters/next.ts",
988
- "/src/adapters/ws.ts",
989
977
  "/src/adapters/standalone.ts",
978
+ "/src/adapters/ws.ts",
979
+ "/src/adapters/next.ts",
990
980
  "/src/adapters/fastify/fastifyRequestHandler.ts"
991
981
  ],
992
982
  "percent": 0,
993
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
994
  }
995
995
  ],
996
996
  "moduleCount": 64
@@ -6,7 +6,7 @@ import type { Serialize } from './serialize';
6
6
  /**
7
7
  * @internal
8
8
  */
9
- export type inferTransformedProcedureOutput<TInferrable extends InferrableClientTypes, TProcedure extends AnyProcedure> = inferClientTypes<TInferrable>['transformer'] extends false ? Serialize<inferProcedureOutput<TProcedure>> : inferProcedureOutput<TProcedure>;
9
+ export type inferTransformedProcedureOutput<TInferrable extends InferrableClientTypes, TProcedure extends AnyProcedure> = inferProcedureOutput<TProcedure> extends infer $Output ? $Output extends Response ? $Output : inferClientTypes<TInferrable>['transformer'] extends false ? Serialize<$Output> : $Output : inferProcedureOutput<TProcedure>;
10
10
  /** @internal */
11
11
  export type inferTransformedSubscriptionOutput<TInferrable extends InferrableClientTypes, TProcedure extends AnyProcedure> = inferClientTypes<TInferrable>['transformer'] extends false ? Serialize<inferObservableValue<inferProcedureOutput<TProcedure>>> : inferObservableValue<inferProcedureOutput<TProcedure>>;
12
12
  export type GetInferenceHelpers<TType extends 'input' | 'output', TRoot extends AnyClientTypes, TRecord extends RouterRecord> = {
@@ -1 +1 @@
1
- {"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/clientish/inference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACtB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AAEH,MAAM,MAAM,+BAA+B,CACzC,WAAW,SAAS,qBAAqB,EACzC,UAAU,SAAS,YAAY,IAC7B,gBAAgB,CAAC,WAAW,CAAC,CAAC,aAAa,CAAC,SAAS,KAAK,GAC1D,SAAS,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC,GAC3C,oBAAoB,CAAC,UAAU,CAAC,CAAC;AACrC,gBAAgB;AAEhB,MAAM,MAAM,kCAAkC,CAC5C,WAAW,SAAS,qBAAqB,EACzC,UAAU,SAAS,YAAY,IAC7B,gBAAgB,CAAC,WAAW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AAM,CAAC,GACzC,KAAK,GACT,KAAK;CACV,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,OAAO,SAAS,SAAS,IAAI,mBAAmB,CAC5E,OAAO,EACP,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EACpC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAC1B,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,OAAO,SAAS,SAAS,IAAI,mBAAmB,CAC7E,QAAQ,EACR,OAAO,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,EACpC,OAAO,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAC1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"createProxy.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/createProxy.ts"],"names":[],"mappings":"AAAA,UAAU,oBAAoB;IAC5B,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,IAAI,EAAE,SAAS,OAAO,EAAE,CAAC;CAC1B;AACD,KAAK,aAAa,GAAG,CAAC,IAAI,EAAE,oBAAoB,KAAK,OAAO,CAAC;AAqD7D;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,KAAK,sBAC9B,aAAa,KACtB,KAAqE,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,KAAK,YACzB,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,GAAG,KACnC,KAWF,CAAC"}
1
+ {"version":3,"file":"createProxy.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/createProxy.ts"],"names":[],"mappings":"AAAA,UAAU,oBAAoB;IAC5B,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,IAAI,EAAE,SAAS,OAAO,EAAE,CAAC;CAC1B;AACD,KAAK,aAAa,GAAG,CAAC,IAAI,EAAE,oBAAoB,KAAK,OAAO,CAAC;AAqD7D;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,KAAK,GAAG,OAAO,EAClD,UAAU,aAAa,KACtB,KAAqE,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,KAAK,EACnC,UAAU,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,GAAG,KACnC,KAWF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolveResponse.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/http/resolveResponse.ts"],"names":[],"mappings":"AAMA,OAAO,EAA2B,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAAO,EACL,KAAK,SAAS,EAGf,MAAM,WAAW,CAAC;AAQnB,OAAO,KAAK,EACV,sBAAsB,EACtB,kCAAkC,EAEnC,MAAM,SAAS,CAAC;AA+BjB,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,CAqfnB"}
1
+ {"version":3,"file":"resolveResponse.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/http/resolveResponse.ts"],"names":[],"mappings":"AAMA,OAAO,EAA2B,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAAO,EACL,KAAK,SAAS,EAGf,MAAM,WAAW,CAAC;AAQnB,OAAO,KAAK,EACV,sBAAsB,EACtB,kCAAkC,EAEnC,MAAM,SAAS,CAAC;AA+BjB,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,CAghBnB"}
@@ -255,6 +255,12 @@ async function resolveResponse(opts) {
255
255
  type: proc._def.type,
256
256
  signal: opts.req.signal
257
257
  });
258
+ if (info.isBatchCall && data instanceof Response) {
259
+ throw new TRPCError.TRPCError({
260
+ code: 'BAD_REQUEST',
261
+ message: 'This procedure cannot be batched - use httpLink instead'
262
+ });
263
+ }
258
264
  return [
259
265
  undefined,
260
266
  {
@@ -280,8 +286,21 @@ async function resolveResponse(opts) {
280
286
  });
281
287
  // ----------- response handlers -----------
282
288
  if (!info.isBatchCall) {
283
- const [call] = info.calls;
289
+ const call = info.calls[0];
284
290
  const [error, result] = await rpcCalls[0];
291
+ if (!error && result?.data instanceof Response) {
292
+ const response = result.data;
293
+ if (!config.experimental?.outputResponse) {
294
+ throw new Error('You need to activate outputResponse in the root config to use this feature - e.g. `initTRPC.create({ experimental: { outputResponse: true } })`');
295
+ }
296
+ const headers = new Headers(response.headers);
297
+ headers.set('trpc-response-output', '1');
298
+ return new Response(response.body, {
299
+ status: response.status,
300
+ statusText: response.statusText,
301
+ headers
302
+ });
303
+ }
285
304
  switch(info.type){
286
305
  case 'unknown':
287
306
  case 'mutation':