@trpc/server 11.0.0-rc.449 → 11.0.0-rc.452

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.
@@ -1,12 +1,12 @@
1
1
  {
2
- "bundleSize": 129790,
3
- "bundleOrigSize": 179497,
4
- "bundleReduction": 27.69,
2
+ "bundleSize": 129873,
3
+ "bundleOrigSize": 179564,
4
+ "bundleReduction": 27.67,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/unstable-core-do-not-import/http/resolveResponse.ts",
8
- "size": 17074,
9
- "origSize": 16227,
8
+ "size": 17157,
9
+ "origSize": 16294,
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.16,
17
+ "percent": 13.21,
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.08,
34
+ "percent": 12.07,
35
35
  "reduction": 6.72
36
36
  },
37
37
  {
@@ -46,7 +46,7 @@
46
46
  "dependents": [
47
47
  "/src/adapters/fastify/fastifyTRPCPlugin.ts"
48
48
  ],
49
- "percent": 11,
49
+ "percent": 10.99,
50
50
  "reduction": 0
51
51
  },
52
52
  {
@@ -79,7 +79,7 @@
79
79
  "/src/unstable-core-do-not-import.ts",
80
80
  "/src/unstable-core-do-not-import/initTRPC.ts"
81
81
  ],
82
- "percent": 4.92,
82
+ "percent": 4.91,
83
83
  "reduction": 39.77
84
84
  },
85
85
  {
@@ -161,7 +161,7 @@
161
161
  "dependents": [
162
162
  "/src/adapters/next-app-dir.ts"
163
163
  ],
164
- "percent": 2.42,
164
+ "percent": 2.41,
165
165
  "reduction": 23.5
166
166
  },
167
167
  {
@@ -193,9 +193,9 @@
193
193
  "removedExports": [],
194
194
  "dependents": [
195
195
  "/src/unstable-core-do-not-import.ts",
196
- "/src/unstable-core-do-not-import/http/resolveResponse.ts",
197
196
  "/src/unstable-core-do-not-import/initTRPC.ts",
198
- "/src/unstable-core-do-not-import/router.ts"
197
+ "/src/unstable-core-do-not-import/router.ts",
198
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts"
199
199
  ],
200
200
  "percent": 2.11,
201
201
  "reduction": 45.94
@@ -319,16 +319,16 @@
319
319
  "removedExports": [],
320
320
  "dependents": [
321
321
  "/src/unstable-core-do-not-import.ts",
322
- "/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
323
- "/src/unstable-core-do-not-import/http/resolveResponse.ts",
324
322
  "/src/unstable-core-do-not-import/stream/sse.ts",
325
323
  "/src/unstable-core-do-not-import/middleware.ts",
326
324
  "/src/unstable-core-do-not-import/router.ts",
325
+ "/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
326
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
327
327
  "/src/unstable-core-do-not-import/http/contentType.ts",
328
328
  "/src/unstable-core-do-not-import/procedureBuilder.ts",
329
329
  "/src/unstable-core-do-not-import/stream/jsonl.ts"
330
330
  ],
331
- "percent": 1.34,
331
+ "percent": 1.33,
332
332
  "reduction": 19.47
333
333
  },
334
334
  {
@@ -379,7 +379,7 @@
379
379
  "dependents": [
380
380
  "/src/adapters/fastify/index.ts"
381
381
  ],
382
- "percent": 1.16,
382
+ "percent": 1.15,
383
383
  "reduction": 34.7
384
384
  },
385
385
  {
@@ -393,8 +393,8 @@
393
393
  "removedExports": [],
394
394
  "dependents": [
395
395
  "/src/unstable-core-do-not-import.ts",
396
- "/src/unstable-core-do-not-import/http/resolveResponse.ts",
397
- "/src/unstable-core-do-not-import/error/getErrorShape.ts"
396
+ "/src/unstable-core-do-not-import/error/getErrorShape.ts",
397
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts"
398
398
  ],
399
399
  "percent": 0.99,
400
400
  "reduction": 18.7
@@ -415,14 +415,14 @@
415
415
  "removedExports": [],
416
416
  "dependents": [
417
417
  "/src/unstable-core-do-not-import.ts",
418
- "/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
419
- "/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
420
- "/src/unstable-core-do-not-import/http/resolveResponse.ts",
421
418
  "/src/unstable-core-do-not-import/error/TRPCError.ts",
422
419
  "/src/unstable-core-do-not-import/stream/sse.ts",
423
420
  "/src/unstable-core-do-not-import/transformer.ts",
424
421
  "/src/unstable-core-do-not-import/middleware.ts",
425
422
  "/src/unstable-core-do-not-import/router.ts",
423
+ "/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
424
+ "/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
425
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
426
426
  "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
427
427
  "/src/unstable-core-do-not-import/http/contentType.ts",
428
428
  "/src/unstable-core-do-not-import/procedureBuilder.ts",
@@ -709,24 +709,24 @@
709
709
  "reduction": 93.8
710
710
  },
711
711
  {
712
- "id": "/src/http.ts",
712
+ "id": "/src/index.ts",
713
713
  "size": 0,
714
- "origSize": 37,
714
+ "origSize": 32,
715
715
  "renderedExports": [],
716
716
  "removedExports": [],
717
- "dependents": [
718
- "/src/adapters/ws.ts"
719
- ],
717
+ "dependents": [],
720
718
  "percent": 0,
721
719
  "reduction": 100
722
720
  },
723
721
  {
724
- "id": "/src/index.ts",
722
+ "id": "/src/http.ts",
725
723
  "size": 0,
726
- "origSize": 32,
724
+ "origSize": 37,
727
725
  "renderedExports": [],
728
726
  "removedExports": [],
729
- "dependents": [],
727
+ "dependents": [
728
+ "/src/adapters/ws.ts"
729
+ ],
730
730
  "percent": 0,
731
731
  "reduction": 100
732
732
  },
@@ -812,8 +812,8 @@
812
812
  "renderedExports": [],
813
813
  "removedExports": [],
814
814
  "dependents": [
815
- "/src/adapters/next.ts",
816
815
  "/src/adapters/express.ts",
816
+ "/src/adapters/next.ts",
817
817
  "/src/adapters/standalone.ts",
818
818
  "/src/adapters/fastify/fastifyRequestHandler.ts"
819
819
  ],
@@ -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;AA0BjB,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;AAyID,wBAAsB,eAAe,CAAC,OAAO,SAAS,SAAS,EAC7D,IAAI,EAAE,yBAAyB,CAAC,OAAO,CAAC,GACvC,OAAO,CAAC,QAAQ,CAAC,CAgZnB"}
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;AA0BjB,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;AAyID,wBAAsB,eAAe,CAAC,OAAO,SAAS,SAAS,EAC7D,IAAI,EAAE,yBAAyB,CAAC,OAAO,CAAC,GACvC,OAAO,CAAC,QAAQ,CAAC,CAiZnB"}
@@ -284,6 +284,7 @@ async function resolveResponse(opts) {
284
284
  }
285
285
  const dataAsIterable = observable.isObservable(data) ? observable.observableToAsyncIterable(data) : data;
286
286
  const stream = sse.sseStreamProducer({
287
+ ...router._def._config.experimental?.sseSubscriptions,
287
288
  data: dataAsIterable,
288
289
  serialize: (v)=>config.transformer.output.serialize(v)
289
290
  });
@@ -282,6 +282,7 @@ async function resolveResponse(opts) {
282
282
  }
283
283
  const dataAsIterable = isObservable(data) ? observableToAsyncIterable(data) : data;
284
284
  const stream = sseStreamProducer({
285
+ ...router._def._config.experimental?.sseSubscriptions,
285
286
  data: dataAsIterable,
286
287
  serialize: (v)=>config.transformer.output.serialize(v)
287
288
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/server",
3
- "version": "11.0.0-rc.449+42acce6ac",
3
+ "version": "11.0.0-rc.452+8f18c400c",
4
4
  "description": "The tRPC server library",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -149,5 +149,5 @@
149
149
  "funding": [
150
150
  "https://trpc.io/sponsor"
151
151
  ],
152
- "gitHead": "42acce6ac165dd489ebc11721e1c4dd15f4d8b7a"
152
+ "gitHead": "8f18c400cbb76a66b5897032e59d17a8770f0667"
153
153
  }
@@ -380,6 +380,7 @@ export async function resolveResponse<TRouter extends AnyRouter>(
380
380
  ? observableToAsyncIterable(data)
381
381
  : data;
382
382
  const stream = sseStreamProducer({
383
+ ...router._def._config.experimental?.sseSubscriptions,
383
384
  data: dataAsIterable,
384
385
  serialize: (v) => config.transformer.output.serialize(v),
385
386
  });