@trpc/server 11.0.0-next-beta.315 → 11.0.0-next-beta.316
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 +34 -34
- package/dist/unstable-core-do-not-import/http/resolveHTTPResponse.js +4 -1
- package/dist/unstable-core-do-not-import/http/resolveHTTPResponse.mjs +4 -1
- package/dist/unstable-core-do-not-import/http/types.d.ts +1 -2
- package/dist/unstable-core-do-not-import/http/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts +4 -1
- package/src/unstable-core-do-not-import/http/types.ts +1 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 37.
|
|
2
|
+
"bundleSize": 92466,
|
|
3
|
+
"bundleOrigSize": 147751,
|
|
4
|
+
"bundleReduction": 37.42,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/adapters/ws.ts",
|
|
@@ -15,20 +15,20 @@
|
|
|
15
15
|
"dependents": [
|
|
16
16
|
"/src/adapters/fastify/fastifyTRPCPlugin.ts"
|
|
17
17
|
],
|
|
18
|
-
"percent": 11
|
|
18
|
+
"percent": 11,
|
|
19
19
|
"reduction": 0
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"id": "/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts",
|
|
23
|
-
"size":
|
|
24
|
-
"origSize":
|
|
23
|
+
"size": 9477,
|
|
24
|
+
"origSize": 11975,
|
|
25
25
|
"renderedExports": [
|
|
26
26
|
"resolveHTTPResponse"
|
|
27
27
|
],
|
|
28
28
|
"removedExports": [],
|
|
29
29
|
"dependents": [],
|
|
30
|
-
"percent": 10.
|
|
31
|
-
"reduction":
|
|
30
|
+
"percent": 10.25,
|
|
31
|
+
"reduction": 20.86
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"id": "/src/unstable-core-do-not-import/router.ts",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"removedExports": [],
|
|
44
44
|
"dependents": [
|
|
45
45
|
"/src/unstable-core-do-not-import.ts",
|
|
46
|
-
"/src/unstable-core-do-not-import/
|
|
47
|
-
"/src/unstable-core-do-not-import/
|
|
46
|
+
"/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts",
|
|
47
|
+
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
48
48
|
],
|
|
49
|
-
"percent": 6.
|
|
49
|
+
"percent": 6.56,
|
|
50
50
|
"reduction": 38.58
|
|
51
51
|
},
|
|
52
52
|
{
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"/src/unstable-core-do-not-import.ts",
|
|
63
63
|
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
64
64
|
],
|
|
65
|
-
"percent": 6.
|
|
65
|
+
"percent": 6.17,
|
|
66
66
|
"reduction": 58.57
|
|
67
67
|
},
|
|
68
68
|
{
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"dependents": [
|
|
79
79
|
"/src/adapters/node-http/content-type/form-data/index.ts"
|
|
80
80
|
],
|
|
81
|
-
"percent": 5.
|
|
81
|
+
"percent": 5.38,
|
|
82
82
|
"reduction": 36.77
|
|
83
83
|
},
|
|
84
84
|
{
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"dependents": [
|
|
107
107
|
"/src/adapters/node-http/index.ts"
|
|
108
108
|
],
|
|
109
|
-
"percent": 4.
|
|
109
|
+
"percent": 4.25,
|
|
110
110
|
"reduction": 13.56
|
|
111
111
|
},
|
|
112
112
|
{
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"/src/observable/index.ts",
|
|
157
157
|
"/src/observable/operators.ts"
|
|
158
158
|
],
|
|
159
|
-
"percent": 3.
|
|
159
|
+
"percent": 3.38,
|
|
160
160
|
"reduction": 0.67
|
|
161
161
|
},
|
|
162
162
|
{
|
|
@@ -188,9 +188,9 @@
|
|
|
188
188
|
"removedExports": [],
|
|
189
189
|
"dependents": [
|
|
190
190
|
"/src/unstable-core-do-not-import.ts",
|
|
191
|
+
"/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts",
|
|
191
192
|
"/src/unstable-core-do-not-import/router.ts",
|
|
192
|
-
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
193
|
-
"/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts"
|
|
193
|
+
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
194
194
|
],
|
|
195
195
|
"percent": 2.97,
|
|
196
196
|
"reduction": 45.94
|
|
@@ -253,7 +253,7 @@
|
|
|
253
253
|
],
|
|
254
254
|
"removedExports": [],
|
|
255
255
|
"dependents": [],
|
|
256
|
-
"percent": 2.
|
|
256
|
+
"percent": 2.64,
|
|
257
257
|
"reduction": 32.42
|
|
258
258
|
},
|
|
259
259
|
{
|
|
@@ -268,13 +268,13 @@
|
|
|
268
268
|
"removedExports": [],
|
|
269
269
|
"dependents": [
|
|
270
270
|
"/src/unstable-core-do-not-import.ts",
|
|
271
|
-
"/src/unstable-core-do-not-import/router.ts",
|
|
272
|
-
"/src/unstable-core-do-not-import/middleware.ts",
|
|
273
271
|
"/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts",
|
|
274
272
|
"/src/unstable-core-do-not-import/http/contentType.ts",
|
|
273
|
+
"/src/unstable-core-do-not-import/router.ts",
|
|
274
|
+
"/src/unstable-core-do-not-import/middleware.ts",
|
|
275
275
|
"/src/unstable-core-do-not-import/procedureBuilder.ts"
|
|
276
276
|
],
|
|
277
|
-
"percent": 1.
|
|
277
|
+
"percent": 1.87,
|
|
278
278
|
"reduction": 19.47
|
|
279
279
|
},
|
|
280
280
|
{
|
|
@@ -397,8 +397,8 @@
|
|
|
397
397
|
],
|
|
398
398
|
"removedExports": [],
|
|
399
399
|
"dependents": [
|
|
400
|
-
"/src/unstable-core-do-not-import/
|
|
401
|
-
"/src/unstable-core-do-not-import/
|
|
400
|
+
"/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts",
|
|
401
|
+
"/src/unstable-core-do-not-import/error/getErrorShape.ts"
|
|
402
402
|
],
|
|
403
403
|
"percent": 1.37,
|
|
404
404
|
"reduction": 22.76
|
|
@@ -430,11 +430,11 @@
|
|
|
430
430
|
"removedExports": [],
|
|
431
431
|
"dependents": [
|
|
432
432
|
"/src/unstable-core-do-not-import.ts",
|
|
433
|
+
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
433
434
|
"/src/unstable-core-do-not-import/error/TRPCError.ts",
|
|
434
435
|
"/src/unstable-core-do-not-import/router.ts",
|
|
435
436
|
"/src/unstable-core-do-not-import/transformer.ts",
|
|
436
437
|
"/src/unstable-core-do-not-import/middleware.ts",
|
|
437
|
-
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
438
438
|
"/src/unstable-core-do-not-import/procedureBuilder.ts"
|
|
439
439
|
],
|
|
440
440
|
"percent": 0.88,
|
|
@@ -628,9 +628,9 @@
|
|
|
628
628
|
"reduction": 93.8
|
|
629
629
|
},
|
|
630
630
|
{
|
|
631
|
-
"id": "/src/
|
|
631
|
+
"id": "/src/http.ts",
|
|
632
632
|
"size": 0,
|
|
633
|
-
"origSize":
|
|
633
|
+
"origSize": 37,
|
|
634
634
|
"renderedExports": [],
|
|
635
635
|
"removedExports": [],
|
|
636
636
|
"dependents": [],
|
|
@@ -638,9 +638,9 @@
|
|
|
638
638
|
"reduction": 100
|
|
639
639
|
},
|
|
640
640
|
{
|
|
641
|
-
"id": "/src/
|
|
641
|
+
"id": "/src/rpc.ts",
|
|
642
642
|
"size": 0,
|
|
643
|
-
"origSize":
|
|
643
|
+
"origSize": 36,
|
|
644
644
|
"renderedExports": [],
|
|
645
645
|
"removedExports": [],
|
|
646
646
|
"dependents": [],
|
|
@@ -648,9 +648,9 @@
|
|
|
648
648
|
"reduction": 100
|
|
649
649
|
},
|
|
650
650
|
{
|
|
651
|
-
"id": "/src/
|
|
651
|
+
"id": "/src/index.ts",
|
|
652
652
|
"size": 0,
|
|
653
|
-
"origSize":
|
|
653
|
+
"origSize": 32,
|
|
654
654
|
"renderedExports": [],
|
|
655
655
|
"removedExports": [],
|
|
656
656
|
"dependents": [],
|
|
@@ -658,9 +658,9 @@
|
|
|
658
658
|
"reduction": 100
|
|
659
659
|
},
|
|
660
660
|
{
|
|
661
|
-
"id": "/src/
|
|
661
|
+
"id": "/src/shared.ts",
|
|
662
662
|
"size": 0,
|
|
663
|
-
"origSize":
|
|
663
|
+
"origSize": 653,
|
|
664
664
|
"renderedExports": [],
|
|
665
665
|
"removedExports": [],
|
|
666
666
|
"dependents": [],
|
|
@@ -668,9 +668,9 @@
|
|
|
668
668
|
"reduction": 100
|
|
669
669
|
},
|
|
670
670
|
{
|
|
671
|
-
"id": "/src/
|
|
671
|
+
"id": "/src/unstable-core-do-not-import.ts",
|
|
672
672
|
"size": 0,
|
|
673
|
-
"origSize":
|
|
673
|
+
"origSize": 1552,
|
|
674
674
|
"renderedExports": [],
|
|
675
675
|
"removedExports": [],
|
|
676
676
|
"dependents": [],
|
|
@@ -100,7 +100,10 @@ async function resolveHTTPResponse(opts) {
|
|
|
100
100
|
throw opts.error;
|
|
101
101
|
}
|
|
102
102
|
if (isBatchCall && !allowBatching) {
|
|
103
|
-
throw new
|
|
103
|
+
throw new TRPCError.TRPCError({
|
|
104
|
+
code: 'BAD_REQUEST',
|
|
105
|
+
message: `Batching is not enabled on the server`
|
|
106
|
+
});
|
|
104
107
|
}
|
|
105
108
|
/* istanbul ignore if -- @preserve */ if (type === 'subscription') {
|
|
106
109
|
throw new TRPCError.TRPCError({
|
|
@@ -98,7 +98,10 @@ async function resolveHTTPResponse(opts) {
|
|
|
98
98
|
throw opts.error;
|
|
99
99
|
}
|
|
100
100
|
if (isBatchCall && !allowBatching) {
|
|
101
|
-
throw new
|
|
101
|
+
throw new TRPCError({
|
|
102
|
+
code: 'BAD_REQUEST',
|
|
103
|
+
message: `Batching is not enabled on the server`
|
|
104
|
+
});
|
|
102
105
|
}
|
|
103
106
|
/* istanbul ignore if -- @preserve */ if (type === 'subscription') {
|
|
104
107
|
throw new TRPCError({
|
|
@@ -89,11 +89,10 @@ export type OnErrorFunction<TRouter extends AnyRouter, TRequest> = (opts: {
|
|
|
89
89
|
export interface BaseHandlerOptions<TRouter extends AnyRouter, TRequest> {
|
|
90
90
|
onError?: OnErrorFunction<TRouter, TRequest>;
|
|
91
91
|
/**
|
|
92
|
-
* @deprecated use `allowBatching` instead
|
|
92
|
+
* @deprecated use `allowBatching` instead, this will be removed in v12
|
|
93
93
|
*/
|
|
94
94
|
batching?: {
|
|
95
95
|
/**
|
|
96
|
-
* @deprecated use `allowBatching` instead, will be removed in v12
|
|
97
96
|
* @default true
|
|
98
97
|
*/
|
|
99
98
|
enabled: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/http/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EACV,SAAS,EACT,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAErC,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC;AAElD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,aAAa,GAAG,CAAC,cAAc,EAA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ACH,MAAM,MAAM,eAAe,GAAG;IAC5B,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,aAAa,EAAE,CAAC;CACxB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,kCAAkC,CAAC,OAAO,SAAS,SAAS,IACtE,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,KAAK,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;AAE5E;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,OAAO,SAAS,SAAS,EAAE,QAAQ,IAAI,CAAC,IAAI,EAAE;IACxE,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,EAAE,aAAa,GAAG,SAAS,CAAC;IAChC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,GAAG,EAAE,QAAQ,CAAC;IACd,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,kBAAkB,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;CAC9C,KAAK,IAAI,CAAC;AAEX;;;GAGG;AACH,MAAM,WAAW,kBAAkB,CAAC,OAAO,SAAS,SAAS,EAAE,QAAQ;IACrE,OAAO,CAAC,EAAE,eAAe,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC7C;;OAEG;IACH,QAAQ,CAAC,EAAE;QACT;;WAEG;QACH,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC;IACF,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/server",
|
|
3
|
-
"version": "11.0.0-next-beta.
|
|
3
|
+
"version": "11.0.0-next-beta.316+dcae8bd89",
|
|
4
4
|
"description": "The tRPC server library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -156,5 +156,5 @@
|
|
|
156
156
|
"funding": [
|
|
157
157
|
"https://trpc.io/sponsor"
|
|
158
158
|
],
|
|
159
|
-
"gitHead": "
|
|
159
|
+
"gitHead": "dcae8bd8929c36149514ffeac2c31205e01ed0bb"
|
|
160
160
|
}
|
|
@@ -253,7 +253,10 @@ export async function resolveHTTPResponse<
|
|
|
253
253
|
throw opts.error;
|
|
254
254
|
}
|
|
255
255
|
if (isBatchCall && !allowBatching) {
|
|
256
|
-
throw new
|
|
256
|
+
throw new TRPCError({
|
|
257
|
+
code: 'BAD_REQUEST',
|
|
258
|
+
message: `Batching is not enabled on the server`,
|
|
259
|
+
});
|
|
257
260
|
}
|
|
258
261
|
/* istanbul ignore if -- @preserve */
|
|
259
262
|
if (type === 'subscription') {
|
|
@@ -105,11 +105,10 @@ export type OnErrorFunction<TRouter extends AnyRouter, TRequest> = (opts: {
|
|
|
105
105
|
export interface BaseHandlerOptions<TRouter extends AnyRouter, TRequest> {
|
|
106
106
|
onError?: OnErrorFunction<TRouter, TRequest>;
|
|
107
107
|
/**
|
|
108
|
-
* @deprecated use `allowBatching` instead
|
|
108
|
+
* @deprecated use `allowBatching` instead, this will be removed in v12
|
|
109
109
|
*/
|
|
110
110
|
batching?: {
|
|
111
111
|
/**
|
|
112
|
-
* @deprecated use `allowBatching` instead, will be removed in v12
|
|
113
112
|
* @default true
|
|
114
113
|
*/
|
|
115
114
|
enabled: boolean;
|