@trpc/server 11.0.0-rc.485 → 11.0.0-rc.489
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.
- package/dist/bundle-analysis.json +35 -35
- package/dist/unstable-core-do-not-import/http/resolveResponse.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/http/resolveResponse.js +3 -0
- package/dist/unstable-core-do-not-import/http/resolveResponse.mjs +3 -0
- package/package.json +3 -3
- package/src/unstable-core-do-not-import/http/resolveResponse.ts +4 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 26.
|
|
2
|
+
"bundleSize": 135619,
|
|
3
|
+
"bundleOrigSize": 184479,
|
|
4
|
+
"bundleReduction": 26.49,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
8
|
-
"size":
|
|
9
|
-
"origSize":
|
|
8
|
+
"size": 17866,
|
|
9
|
+
"origSize": 16731,
|
|
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.
|
|
17
|
+
"percent": 13.17,
|
|
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.
|
|
34
|
+
"percent": 12.95,
|
|
35
35
|
"reduction": 4.31
|
|
36
36
|
},
|
|
37
37
|
{
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"dependents": [
|
|
48
48
|
"/src/adapters/fastify/fastifyTRPCPlugin.ts"
|
|
49
49
|
],
|
|
50
|
-
"percent": 11.
|
|
50
|
+
"percent": 11.6,
|
|
51
51
|
"reduction": 0
|
|
52
52
|
},
|
|
53
53
|
{
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"/src/unstable-core-do-not-import.ts",
|
|
96
96
|
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
97
97
|
],
|
|
98
|
-
"percent": 4.
|
|
98
|
+
"percent": 4.66,
|
|
99
99
|
"reduction": 60.09
|
|
100
100
|
},
|
|
101
101
|
{
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
147
147
|
"/src/observable/operators.ts"
|
|
148
148
|
],
|
|
149
|
-
"percent": 3.
|
|
149
|
+
"percent": 3.03,
|
|
150
150
|
"reduction": 0
|
|
151
151
|
},
|
|
152
152
|
{
|
|
@@ -206,9 +206,9 @@
|
|
|
206
206
|
"removedExports": [],
|
|
207
207
|
"dependents": [
|
|
208
208
|
"/src/unstable-core-do-not-import.ts",
|
|
209
|
-
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
210
209
|
"/src/unstable-core-do-not-import/initTRPC.ts",
|
|
211
|
-
"/src/unstable-core-do-not-import/router.ts"
|
|
210
|
+
"/src/unstable-core-do-not-import/router.ts",
|
|
211
|
+
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
212
212
|
],
|
|
213
213
|
"percent": 2.02,
|
|
214
214
|
"reduction": 45.94
|
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
"dependents": [
|
|
225
225
|
"/src/unstable-core-do-not-import.ts"
|
|
226
226
|
],
|
|
227
|
-
"percent":
|
|
227
|
+
"percent": 1.99,
|
|
228
228
|
"reduction": 40.91
|
|
229
229
|
},
|
|
230
230
|
{
|
|
@@ -332,10 +332,10 @@
|
|
|
332
332
|
"removedExports": [],
|
|
333
333
|
"dependents": [
|
|
334
334
|
"/src/unstable-core-do-not-import.ts",
|
|
335
|
-
"/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
|
|
336
|
-
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
337
335
|
"/src/unstable-core-do-not-import/middleware.ts",
|
|
338
336
|
"/src/unstable-core-do-not-import/router.ts",
|
|
337
|
+
"/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
|
|
338
|
+
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
339
339
|
"/src/unstable-core-do-not-import/http/contentType.ts",
|
|
340
340
|
"/src/unstable-core-do-not-import/procedureBuilder.ts",
|
|
341
341
|
"/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
@@ -392,8 +392,8 @@
|
|
|
392
392
|
"removedExports": [],
|
|
393
393
|
"dependents": [
|
|
394
394
|
"/src/unstable-core-do-not-import.ts",
|
|
395
|
-
"/src/unstable-core-do-not-import/
|
|
396
|
-
"/src/unstable-core-do-not-import/
|
|
395
|
+
"/src/unstable-core-do-not-import/error/getErrorShape.ts",
|
|
396
|
+
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
397
397
|
],
|
|
398
398
|
"percent": 1.01,
|
|
399
399
|
"reduction": 17.52
|
|
@@ -414,13 +414,13 @@
|
|
|
414
414
|
"removedExports": [],
|
|
415
415
|
"dependents": [
|
|
416
416
|
"/src/unstable-core-do-not-import.ts",
|
|
417
|
-
"/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
|
|
418
|
-
"/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
|
|
419
|
-
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
420
417
|
"/src/unstable-core-do-not-import/error/TRPCError.ts",
|
|
421
418
|
"/src/unstable-core-do-not-import/transformer.ts",
|
|
422
419
|
"/src/unstable-core-do-not-import/middleware.ts",
|
|
423
420
|
"/src/unstable-core-do-not-import/router.ts",
|
|
421
|
+
"/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
|
|
422
|
+
"/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
|
|
423
|
+
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
424
424
|
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
425
425
|
"/src/unstable-core-do-not-import/http/contentType.ts",
|
|
426
426
|
"/src/unstable-core-do-not-import/procedureBuilder.ts",
|
|
@@ -442,7 +442,7 @@
|
|
|
442
442
|
"/src/adapters/fastify/index.ts",
|
|
443
443
|
"/src/adapters/fastify/fastifyTRPCPlugin.ts"
|
|
444
444
|
],
|
|
445
|
-
"percent": 0.
|
|
445
|
+
"percent": 0.83,
|
|
446
446
|
"reduction": 47.59
|
|
447
447
|
},
|
|
448
448
|
{
|
|
@@ -522,7 +522,7 @@
|
|
|
522
522
|
"/src/unstable-core-do-not-import/stream/sse.ts",
|
|
523
523
|
"/src/unstable-core-do-not-import/stream/utils/createReadableStream.ts"
|
|
524
524
|
],
|
|
525
|
-
"percent": 0.
|
|
525
|
+
"percent": 0.72,
|
|
526
526
|
"reduction": 15.69
|
|
527
527
|
},
|
|
528
528
|
{
|
|
@@ -723,35 +723,35 @@
|
|
|
723
723
|
"/src/unstable-core-do-not-import/initTRPC.ts",
|
|
724
724
|
"/src/unstable-core-do-not-import/router.ts"
|
|
725
725
|
],
|
|
726
|
-
"percent": 0.
|
|
726
|
+
"percent": 0.04,
|
|
727
727
|
"reduction": 93.8
|
|
728
728
|
},
|
|
729
729
|
{
|
|
730
|
-
"id": "/src/
|
|
730
|
+
"id": "/src/index.ts",
|
|
731
731
|
"size": 0,
|
|
732
|
-
"origSize":
|
|
732
|
+
"origSize": 32,
|
|
733
733
|
"renderedExports": [],
|
|
734
734
|
"removedExports": [],
|
|
735
|
-
"dependents": [
|
|
736
|
-
"/src/adapters/ws.ts"
|
|
737
|
-
],
|
|
735
|
+
"dependents": [],
|
|
738
736
|
"percent": 0,
|
|
739
737
|
"reduction": 100
|
|
740
738
|
},
|
|
741
739
|
{
|
|
742
|
-
"id": "/src/
|
|
740
|
+
"id": "/src/http.ts",
|
|
743
741
|
"size": 0,
|
|
744
|
-
"origSize":
|
|
742
|
+
"origSize": 37,
|
|
745
743
|
"renderedExports": [],
|
|
746
744
|
"removedExports": [],
|
|
747
|
-
"dependents": [
|
|
745
|
+
"dependents": [
|
|
746
|
+
"/src/adapters/ws.ts"
|
|
747
|
+
],
|
|
748
748
|
"percent": 0,
|
|
749
749
|
"reduction": 100
|
|
750
750
|
},
|
|
751
751
|
{
|
|
752
|
-
"id": "/src/
|
|
752
|
+
"id": "/src/rpc.ts",
|
|
753
753
|
"size": 0,
|
|
754
|
-
"origSize":
|
|
754
|
+
"origSize": 36,
|
|
755
755
|
"renderedExports": [],
|
|
756
756
|
"removedExports": [],
|
|
757
757
|
"dependents": [],
|
|
@@ -759,9 +759,9 @@
|
|
|
759
759
|
"reduction": 100
|
|
760
760
|
},
|
|
761
761
|
{
|
|
762
|
-
"id": "/src/
|
|
762
|
+
"id": "/src/shared.ts",
|
|
763
763
|
"size": 0,
|
|
764
|
-
"origSize":
|
|
764
|
+
"origSize": 653,
|
|
765
765
|
"renderedExports": [],
|
|
766
766
|
"removedExports": [],
|
|
767
767
|
"dependents": [],
|
|
@@ -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,
|
|
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,CAianB"}
|
|
@@ -276,6 +276,9 @@ async function resolveResponse(opts) {
|
|
|
276
276
|
message: 'Missing experimental flag "sseSubscriptions"'
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
|
+
if (error) {
|
|
280
|
+
throw error;
|
|
281
|
+
}
|
|
279
282
|
if (!observable.isObservable(data) && !utils.isAsyncIterable(data)) {
|
|
280
283
|
throw new TRPCError.TRPCError({
|
|
281
284
|
message: `Subscription ${call.path} did not return an observable or a AsyncGenerator`,
|
|
@@ -274,6 +274,9 @@ async function resolveResponse(opts) {
|
|
|
274
274
|
message: 'Missing experimental flag "sseSubscriptions"'
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
|
+
if (error) {
|
|
278
|
+
throw error;
|
|
279
|
+
}
|
|
277
280
|
if (!isObservable(data) && !isAsyncIterable(data)) {
|
|
278
281
|
throw new TRPCError({
|
|
279
282
|
message: `Subscription ${call.path} did not return an observable or a AsyncGenerator`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/server",
|
|
3
|
-
"version": "11.0.0-rc.
|
|
3
|
+
"version": "11.0.0-rc.489+6b483e375",
|
|
4
4
|
"description": "The tRPC server library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"tslib": "^2.5.0",
|
|
142
142
|
"tsx": "^4.0.0",
|
|
143
143
|
"typescript": "^5.5.3",
|
|
144
|
-
"valibot": "^0.
|
|
144
|
+
"valibot": "^0.39.0",
|
|
145
145
|
"ws": "^8.0.0",
|
|
146
146
|
"yup": "^1.0.0",
|
|
147
147
|
"zod": "^3.0.0"
|
|
@@ -149,5 +149,5 @@
|
|
|
149
149
|
"funding": [
|
|
150
150
|
"https://trpc.io/sponsor"
|
|
151
151
|
],
|
|
152
|
-
"gitHead": "
|
|
152
|
+
"gitHead": "6b483e3752e666c3fb200f0234c1c8d10c89620e"
|
|
153
153
|
}
|