@trpc/server 11.0.0-alpha-tmp-issues-5851-take-two.496 → 11.0.0-alpha-tmp-issues-5851-take-two.499

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,7 +1,7 @@
1
1
  {
2
- "bundleSize": 131370,
3
- "bundleOrigSize": 180752,
4
- "bundleReduction": 27.32,
2
+ "bundleSize": 131453,
3
+ "bundleOrigSize": 180819,
4
+ "bundleReduction": 27.3,
5
5
  "modules": [
6
6
  {
7
7
  "id": "/src/unstable-core-do-not-import/stream/jsonl.ts",
@@ -17,13 +17,13 @@
17
17
  "/src/unstable-core-do-not-import.ts",
18
18
  "/src/unstable-core-do-not-import/http/resolveResponse.ts"
19
19
  ],
20
- "percent": 13.2,
20
+ "percent": 13.19,
21
21
  "reduction": 4.22
22
22
  },
23
23
  {
24
24
  "id": "/src/unstable-core-do-not-import/http/resolveResponse.ts",
25
- "size": 17074,
26
- "origSize": 16227,
25
+ "size": 17157,
26
+ "origSize": 16294,
27
27
  "renderedExports": [
28
28
  "resolveResponse"
29
29
  ],
@@ -31,7 +31,7 @@
31
31
  "dependents": [
32
32
  "/src/unstable-core-do-not-import.ts"
33
33
  ],
34
- "percent": 13,
34
+ "percent": 13.05,
35
35
  "reduction": 0
36
36
  },
37
37
  {
@@ -46,7 +46,7 @@
46
46
  "dependents": [
47
47
  "/src/adapters/fastify/fastifyTRPCPlugin.ts"
48
48
  ],
49
- "percent": 10.98,
49
+ "percent": 10.97,
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.86,
82
+ "percent": 4.85,
83
83
  "reduction": 39.77
84
84
  },
85
85
  {
@@ -94,7 +94,7 @@
94
94
  "/src/unstable-core-do-not-import.ts",
95
95
  "/src/unstable-core-do-not-import/initTRPC.ts"
96
96
  ],
97
- "percent": 4.82,
97
+ "percent": 4.81,
98
98
  "reduction": 60.06
99
99
  },
100
100
  {
@@ -161,7 +161,7 @@
161
161
  "dependents": [
162
162
  "/src/adapters/next-app-dir.ts"
163
163
  ],
164
- "percent": 2.39,
164
+ "percent": 2.38,
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.09,
201
201
  "reduction": 45.94
@@ -319,11 +319,11 @@
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"
@@ -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.98,
400
400
  "reduction": 18.7
@@ -415,17 +415,17 @@
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
- "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
422
418
  "/src/unstable-core-do-not-import/error/TRPCError.ts",
423
419
  "/src/unstable-core-do-not-import/stream/sse.ts",
424
420
  "/src/unstable-core-do-not-import/transformer.ts",
425
421
  "/src/unstable-core-do-not-import/middleware.ts",
426
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",
427
426
  "/src/unstable-core-do-not-import/http/contentType.ts",
428
427
  "/src/unstable-core-do-not-import/procedureBuilder.ts",
428
+ "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
429
429
  "/src/unstable-core-do-not-import/stream/jsonl.ts"
430
430
  ],
431
431
  "percent": 0.91,
@@ -710,34 +710,37 @@
710
710
  "reduction": 93.8
711
711
  },
712
712
  {
713
- "id": "/src/http.ts",
713
+ "id": "/src/index.ts",
714
714
  "size": 0,
715
- "origSize": 37,
715
+ "origSize": 32,
716
716
  "renderedExports": [],
717
717
  "removedExports": [],
718
- "dependents": [
719
- "/src/adapters/ws.ts"
720
- ],
718
+ "dependents": [],
721
719
  "percent": 0,
722
720
  "reduction": 100
723
721
  },
724
722
  {
725
- "id": "/src/rpc.ts",
723
+ "id": "/src/http.ts",
726
724
  "size": 0,
727
- "origSize": 36,
725
+ "origSize": 37,
728
726
  "renderedExports": [],
729
727
  "removedExports": [],
730
- "dependents": [],
728
+ "dependents": [
729
+ "/src/adapters/ws.ts"
730
+ ],
731
731
  "percent": 0,
732
732
  "reduction": 100
733
733
  },
734
734
  {
735
- "id": "/src/index.ts",
735
+ "id": "/src/unstable-core-do-not-import.ts",
736
736
  "size": 0,
737
- "origSize": 32,
737
+ "origSize": 2244,
738
738
  "renderedExports": [],
739
739
  "removedExports": [],
740
- "dependents": [],
740
+ "dependents": [
741
+ "/src/adapters/ws.ts",
742
+ "/src/adapters/next-app-dir/nextAppDirCaller.ts"
743
+ ],
741
744
  "percent": 0,
742
745
  "reduction": 100
743
746
  },
@@ -752,15 +755,12 @@
752
755
  "reduction": 100
753
756
  },
754
757
  {
755
- "id": "/src/unstable-core-do-not-import.ts",
758
+ "id": "/src/rpc.ts",
756
759
  "size": 0,
757
- "origSize": 2244,
760
+ "origSize": 36,
758
761
  "renderedExports": [],
759
762
  "removedExports": [],
760
- "dependents": [
761
- "/src/adapters/ws.ts",
762
- "/src/adapters/next-app-dir/nextAppDirCaller.ts"
763
- ],
763
+ "dependents": [],
764
764
  "percent": 0,
765
765
  "reduction": 100
766
766
  },
@@ -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-alpha-tmp-issues-5851-take-two.496+f0729daa3",
3
+ "version": "11.0.0-alpha-tmp-issues-5851-take-two.499+02e677611",
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": "f0729daa3e95b1f21cd082e04c21377b550f5625"
152
+ "gitHead": "02e67761124670c5ff27d174bfec6cfa5410a5ac"
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
  });