@trpc/server 11.0.0-next-beta.240 → 11.0.0-next-beta.242
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/adapters/node-http/nodeHTTPRequestHandler.d.ts.map +1 -1
- package/dist/adapters/node-http/nodeHTTPRequestHandler.js +2 -0
- package/dist/adapters/node-http/nodeHTTPRequestHandler.mjs +2 -0
- package/dist/adapters/node-http/types.d.ts +3 -3
- package/dist/adapters/node-http/types.d.ts.map +1 -1
- package/dist/bundle-analysis.json +36 -36
- package/dist/unstable-core-do-not-import/error/formatter.d.ts +7 -2
- package/dist/unstable-core-do-not-import/error/formatter.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/http/getHTTPStatusCode.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/http/getHTTPStatusCode.js +2 -2
- package/dist/unstable-core-do-not-import/http/getHTTPStatusCode.mjs +2 -2
- package/dist/unstable-core-do-not-import/http/resolveHTTPResponse.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/http/resolveHTTPResponse.js +43 -51
- package/dist/unstable-core-do-not-import/http/resolveHTTPResponse.mjs +39 -47
- package/dist/unstable-core-do-not-import/index.d.ts +1 -1
- package/dist/unstable-core-do-not-import/index.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/initTRPC.d.ts +14 -8
- package/dist/unstable-core-do-not-import/initTRPC.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/router.d.ts +23 -38
- package/dist/unstable-core-do-not-import/router.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/router.js +3 -3
- package/dist/unstable-core-do-not-import/router.mjs +3 -3
- package/dist/unstable-core-do-not-import/rpc/envelopes.d.ts +1 -1
- package/dist/unstable-core-do-not-import/rpc/envelopes.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/transformer.d.ts +1 -1
- package/package.json +2 -2
- package/src/adapters/node-http/nodeHTTPRequestHandler.ts +4 -2
- package/src/adapters/node-http/types.ts +3 -3
- package/src/unstable-core-do-not-import/error/formatter.ts +7 -7
- package/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts +6 -3
- package/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts +45 -51
- package/src/unstable-core-do-not-import/index.ts +0 -2
- package/src/unstable-core-do-not-import/initTRPC.ts +10 -8
- package/src/unstable-core-do-not-import/router.ts +53 -78
- package/src/unstable-core-do-not-import/rpc/envelopes.ts +1 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeHTTPRequestHandler.d.ts","sourceRoot":"","sources":["../../../src/adapters/node-http/nodeHTTPRequestHandler.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAapD,OAAO,KAAK,EACV,eAAe,EACf,6BAA6B,EAC7B,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAIjB,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,
|
|
1
|
+
{"version":3,"file":"nodeHTTPRequestHandler.d.ts","sourceRoot":"","sources":["../../../src/adapters/node-http/nodeHTTPRequestHandler.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAapD,OAAO,KAAK,EACV,eAAe,EACf,6BAA6B,EAC7B,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAIjB,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,iBA8HlE"}
|
|
@@ -34,11 +34,13 @@ async function nodeHTTPRequestHandler(opts) {
|
|
|
34
34
|
jsonContentTypeHandler
|
|
35
35
|
];
|
|
36
36
|
const contentTypeHandler = contentTypeHandlers.find((handler)=>handler.isMatch({
|
|
37
|
+
// FIXME: no typecasting should be needed here
|
|
37
38
|
...opts,
|
|
38
39
|
query
|
|
39
40
|
})) ?? // fallback to json
|
|
40
41
|
jsonContentTypeHandler;
|
|
41
42
|
const bodyResult = await contentTypeHandler.getBody({
|
|
43
|
+
// FIXME: no typecasting should be needed here
|
|
42
44
|
...opts,
|
|
43
45
|
query
|
|
44
46
|
});
|
|
@@ -32,11 +32,13 @@ async function nodeHTTPRequestHandler(opts) {
|
|
|
32
32
|
jsonContentTypeHandler
|
|
33
33
|
];
|
|
34
34
|
const contentTypeHandler = contentTypeHandlers.find((handler)=>handler.isMatch({
|
|
35
|
+
// FIXME: no typecasting should be needed here
|
|
35
36
|
...opts,
|
|
36
37
|
query
|
|
37
38
|
})) ?? // fallback to json
|
|
38
39
|
jsonContentTypeHandler;
|
|
39
40
|
const bodyResult = await contentTypeHandler.getBody({
|
|
41
|
+
// FIXME: no typecasting should be needed here
|
|
40
42
|
...opts,
|
|
41
43
|
query
|
|
42
44
|
});
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* import type { HTTPBaseHandlerOptions } from '@trpc/server/http'
|
|
9
9
|
* ```
|
|
10
10
|
*/
|
|
11
|
-
import type
|
|
11
|
+
import type * as http from 'http';
|
|
12
12
|
import type { AnyRouter, inferRouterContext } from '../../@trpc/server';
|
|
13
13
|
import type { HTTPBaseHandlerOptions, TRPCRequestInfo } from '../../@trpc/server/http';
|
|
14
14
|
import type { MaybePromise } from '../../unstable-core-do-not-import';
|
|
@@ -16,11 +16,11 @@ import type { NodeHTTPContentTypeHandler } from './internals/contentType';
|
|
|
16
16
|
interface ParsedQs {
|
|
17
17
|
[key: string]: ParsedQs | ParsedQs[] | string[] | string | undefined;
|
|
18
18
|
}
|
|
19
|
-
export type NodeHTTPRequest = IncomingMessage & {
|
|
19
|
+
export type NodeHTTPRequest = http.IncomingMessage & {
|
|
20
20
|
query?: ParsedQs;
|
|
21
21
|
body?: unknown;
|
|
22
22
|
};
|
|
23
|
-
export type NodeHTTPResponse = ServerResponse & {
|
|
23
|
+
export type NodeHTTPResponse = http.ServerResponse & {
|
|
24
24
|
/**
|
|
25
25
|
* Force the partially-compressed response to be flushed to the client.
|
|
26
26
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/adapters/node-http/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/adapters/node-http/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,KAAK,IAAI,MAAM,MAAM,CAAC;AAElC,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAAO,KAAK,EACV,sBAAsB,EACtB,eAAe,EAChB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,UAAU,QAAQ;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAAC;CACtE;AAED,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,GAAG;IACnD,KAAK,CAAC,EAAE,QAAQ,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,cAAc,GAAG;IACnD;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,2BAA2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AM,MAAM,8BAA8B,CAAC,QAAQ,EAAE,SAAS,IAAI;IAChE,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,SAAS,CAAC;IACf,IAAI,EAAE,eAAe,CAAC;CACvB,CAAC;AACF,MAAM,MAAM,uBAAuB,CACjC,OAAO,SAAS,SAAS,EACzB,QAAQ,EACR,SAAS,IACP,CACF,IAAI,EAAE,8BAA8B,CAAC,QAAQ,EAAE,SAAS,CAAC,KACtD,YAAY,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 34.
|
|
2
|
+
"bundleSize": 102517,
|
|
3
|
+
"bundleOrigSize": 156851,
|
|
4
|
+
"bundleReduction": 34.64,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/adapters/ws.ts",
|
|
@@ -14,20 +14,20 @@
|
|
|
14
14
|
"dependents": [
|
|
15
15
|
"/src/adapters/fastify/fastifyTRPCPlugin.ts"
|
|
16
16
|
],
|
|
17
|
-
"percent": 9.
|
|
17
|
+
"percent": 9.63,
|
|
18
18
|
"reduction": 0
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"id": "/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts",
|
|
22
|
-
"size":
|
|
23
|
-
"origSize":
|
|
22
|
+
"size": 9259,
|
|
23
|
+
"origSize": 11799,
|
|
24
24
|
"renderedExports": [
|
|
25
25
|
"resolveHTTPResponse"
|
|
26
26
|
],
|
|
27
27
|
"removedExports": [],
|
|
28
28
|
"dependents": [],
|
|
29
|
-
"percent": 9.
|
|
30
|
-
"reduction":
|
|
29
|
+
"percent": 9.03,
|
|
30
|
+
"reduction": 21.53
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"id": "/home/runner/work/trpc/trpc/node_modules/.pnpm/@web3-storage+multipart-parser@1.0.0/node_modules/@web3-storage/multipart-parser/esm/src/index.js",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
"id": "/src/unstable-core-do-not-import/router.ts",
|
|
50
|
-
"size":
|
|
51
|
-
"origSize":
|
|
50
|
+
"size": 5637,
|
|
51
|
+
"origSize": 9784,
|
|
52
52
|
"renderedExports": [
|
|
53
53
|
"createRouterFactory",
|
|
54
54
|
"callProcedure",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
63
63
|
],
|
|
64
64
|
"percent": 5.5,
|
|
65
|
-
"reduction":
|
|
65
|
+
"reduction": 42.39
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
"id": "/src/unstable-core-do-not-import/procedureBuilder.ts",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"/src/unstable-core-do-not-import/index.ts",
|
|
78
78
|
"/src/unstable-core-do-not-import/initTRPC.ts"
|
|
79
79
|
],
|
|
80
|
-
"percent": 5.
|
|
80
|
+
"percent": 5.46,
|
|
81
81
|
"reduction": 51.52
|
|
82
82
|
},
|
|
83
83
|
{
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"dependents": [
|
|
94
94
|
"/src/adapters/node-http/content-type/form-data/index.ts"
|
|
95
95
|
],
|
|
96
|
-
"percent": 4.
|
|
96
|
+
"percent": 4.85,
|
|
97
97
|
"reduction": 36.77
|
|
98
98
|
},
|
|
99
99
|
{
|
|
@@ -131,13 +131,13 @@
|
|
|
131
131
|
],
|
|
132
132
|
"removedExports": [],
|
|
133
133
|
"dependents": [],
|
|
134
|
-
"percent": 4.
|
|
134
|
+
"percent": 4.3,
|
|
135
135
|
"reduction": 32.87
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
138
|
"id": "/src/adapters/node-http/nodeHTTPRequestHandler.ts",
|
|
139
|
-
"size":
|
|
140
|
-
"origSize":
|
|
139
|
+
"size": 4056,
|
|
140
|
+
"origSize": 4633,
|
|
141
141
|
"renderedExports": [
|
|
142
142
|
"nodeHTTPRequestHandler"
|
|
143
143
|
],
|
|
@@ -145,8 +145,8 @@
|
|
|
145
145
|
"dependents": [
|
|
146
146
|
"/src/adapters/node-http/index.ts"
|
|
147
147
|
],
|
|
148
|
-
"percent": 3.
|
|
149
|
-
"reduction": 12.
|
|
148
|
+
"percent": 3.96,
|
|
149
|
+
"reduction": 12.45
|
|
150
150
|
},
|
|
151
151
|
{
|
|
152
152
|
"id": "/src/adapters/fetch/fetchRequestHandler.ts",
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"dependents": [
|
|
160
160
|
"/src/adapters/fetch/index.ts"
|
|
161
161
|
],
|
|
162
|
-
"percent": 3.
|
|
162
|
+
"percent": 3.46,
|
|
163
163
|
"reduction": 9.42
|
|
164
164
|
},
|
|
165
165
|
{
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
{
|
|
217
217
|
"id": "/src/unstable-core-do-not-import/initTRPC.ts",
|
|
218
218
|
"size": 2879,
|
|
219
|
-
"origSize":
|
|
219
|
+
"origSize": 4716,
|
|
220
220
|
"renderedExports": [
|
|
221
221
|
"initTRPC"
|
|
222
222
|
],
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
"/src/unstable-core-do-not-import/index.ts"
|
|
226
226
|
],
|
|
227
227
|
"percent": 2.81,
|
|
228
|
-
"reduction": 38.
|
|
228
|
+
"reduction": 38.95
|
|
229
229
|
},
|
|
230
230
|
{
|
|
231
231
|
"id": "/src/unstable-core-do-not-import/transformer.ts",
|
|
@@ -400,8 +400,8 @@
|
|
|
400
400
|
},
|
|
401
401
|
{
|
|
402
402
|
"id": "/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
|
|
403
|
-
"size":
|
|
404
|
-
"origSize":
|
|
403
|
+
"size": 1233,
|
|
404
|
+
"origSize": 1608,
|
|
405
405
|
"renderedExports": [
|
|
406
406
|
"getHTTPStatusCode",
|
|
407
407
|
"getHTTPStatusCodeFromError"
|
|
@@ -411,8 +411,8 @@
|
|
|
411
411
|
"/src/unstable-core-do-not-import/http/resolveHTTPResponse.ts",
|
|
412
412
|
"/src/unstable-core-do-not-import/error/getErrorShape.ts"
|
|
413
413
|
],
|
|
414
|
-
"percent": 1.
|
|
415
|
-
"reduction":
|
|
414
|
+
"percent": 1.2,
|
|
415
|
+
"reduction": 23.32
|
|
416
416
|
},
|
|
417
417
|
{
|
|
418
418
|
"id": "/src/adapters/node-http/content-type/json/getPostBody.ts",
|
|
@@ -438,7 +438,7 @@
|
|
|
438
438
|
],
|
|
439
439
|
"removedExports": [],
|
|
440
440
|
"dependents": [],
|
|
441
|
-
"percent":
|
|
441
|
+
"percent": 0.99,
|
|
442
442
|
"reduction": 22.9
|
|
443
443
|
},
|
|
444
444
|
{
|
|
@@ -455,11 +455,11 @@
|
|
|
455
455
|
"dependents": [
|
|
456
456
|
"/src/unstable-core-do-not-import/index.ts",
|
|
457
457
|
"/src/unstable-core-do-not-import/rpc/codes.ts",
|
|
458
|
-
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
459
458
|
"/src/unstable-core-do-not-import/error/TRPCError.ts",
|
|
460
459
|
"/src/unstable-core-do-not-import/middleware.ts",
|
|
461
460
|
"/src/unstable-core-do-not-import/router.ts",
|
|
462
461
|
"/src/unstable-core-do-not-import/transformer.ts",
|
|
462
|
+
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
463
463
|
"/src/unstable-core-do-not-import/procedureBuilder.ts"
|
|
464
464
|
],
|
|
465
465
|
"percent": 0.98,
|
|
@@ -609,7 +609,7 @@
|
|
|
609
609
|
"dependents": [
|
|
610
610
|
"/src/adapters/node-http/nodeHTTPRequestHandler.ts"
|
|
611
611
|
],
|
|
612
|
-
"percent": 0.
|
|
612
|
+
"percent": 0.28,
|
|
613
613
|
"reduction": 35.11
|
|
614
614
|
},
|
|
615
615
|
{
|
|
@@ -645,7 +645,7 @@
|
|
|
645
645
|
{
|
|
646
646
|
"id": "/src/unstable-core-do-not-import/error/formatter.ts",
|
|
647
647
|
"size": 61,
|
|
648
|
-
"origSize":
|
|
648
|
+
"origSize": 984,
|
|
649
649
|
"renderedExports": [
|
|
650
650
|
"defaultFormatter"
|
|
651
651
|
],
|
|
@@ -655,7 +655,7 @@
|
|
|
655
655
|
"/src/unstable-core-do-not-import/router.ts"
|
|
656
656
|
],
|
|
657
657
|
"percent": 0.06,
|
|
658
|
-
"reduction": 93.
|
|
658
|
+
"reduction": 93.8
|
|
659
659
|
},
|
|
660
660
|
{
|
|
661
661
|
"id": "/src/http.ts",
|
|
@@ -668,9 +668,9 @@
|
|
|
668
668
|
"reduction": 100
|
|
669
669
|
},
|
|
670
670
|
{
|
|
671
|
-
"id": "/src/
|
|
671
|
+
"id": "/src/index.ts",
|
|
672
672
|
"size": 0,
|
|
673
|
-
"origSize":
|
|
673
|
+
"origSize": 32,
|
|
674
674
|
"renderedExports": [],
|
|
675
675
|
"removedExports": [],
|
|
676
676
|
"dependents": [],
|
|
@@ -678,9 +678,9 @@
|
|
|
678
678
|
"reduction": 100
|
|
679
679
|
},
|
|
680
680
|
{
|
|
681
|
-
"id": "/src/
|
|
681
|
+
"id": "/src/rpc.ts",
|
|
682
682
|
"size": 0,
|
|
683
|
-
"origSize":
|
|
683
|
+
"origSize": 36,
|
|
684
684
|
"renderedExports": [],
|
|
685
685
|
"removedExports": [],
|
|
686
686
|
"dependents": [],
|
|
@@ -712,7 +712,7 @@
|
|
|
712
712
|
{
|
|
713
713
|
"id": "/src/unstable-core-do-not-import/index.ts",
|
|
714
714
|
"size": 0,
|
|
715
|
-
"origSize":
|
|
715
|
+
"origSize": 2721,
|
|
716
716
|
"renderedExports": [],
|
|
717
717
|
"removedExports": [],
|
|
718
718
|
"dependents": [],
|
|
@@ -746,8 +746,8 @@
|
|
|
746
746
|
"renderedExports": [],
|
|
747
747
|
"removedExports": [],
|
|
748
748
|
"dependents": [
|
|
749
|
-
"/src/adapters/next.ts",
|
|
750
749
|
"/src/adapters/express.ts",
|
|
750
|
+
"/src/adapters/next.ts",
|
|
751
751
|
"/src/adapters/standalone.ts"
|
|
752
752
|
],
|
|
753
753
|
"percent": 0,
|
|
@@ -4,7 +4,7 @@ import type { TRPCError } from './TRPCError';
|
|
|
4
4
|
/**
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export type ErrorFormatter<TContext, TShape extends TRPCErrorShape> = (
|
|
7
|
+
export type ErrorFormatter<TContext, TShape extends TRPCErrorShape> = (opts: {
|
|
8
8
|
error: TRPCError;
|
|
9
9
|
type: ProcedureType | 'unknown';
|
|
10
10
|
path: string | undefined;
|
|
@@ -12,14 +12,19 @@ export type ErrorFormatter<TContext, TShape extends TRPCErrorShape> = (args: {
|
|
|
12
12
|
ctx: TContext | undefined;
|
|
13
13
|
shape: DefaultErrorShape;
|
|
14
14
|
}) => TShape;
|
|
15
|
-
export type ErrorFormatterShape<TType> = TType extends ErrorFormatter<any, infer TShape> ? TShape : DefaultErrorShape;
|
|
16
15
|
/**
|
|
17
16
|
* @internal
|
|
18
17
|
*/
|
|
19
18
|
export type DefaultErrorData = {
|
|
20
19
|
code: TRPC_ERROR_CODE_KEY;
|
|
21
20
|
httpStatus: number;
|
|
21
|
+
/**
|
|
22
|
+
* Path to the procedure that threw the error
|
|
23
|
+
*/
|
|
22
24
|
path?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Stack trace of the error (only in development)
|
|
27
|
+
*/
|
|
23
28
|
stack?: string;
|
|
24
29
|
};
|
|
25
30
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/error/formatter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EACV,mBAAmB,EACnB,sBAAsB,EACtB,cAAc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IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,gBAAgB,CAAC;IACzE,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,sBAAsB,CAAC;CAC9B;AAED,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAC,GAAG,EAAE,GAAG,CAErD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getHTTPStatusCode.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/http/getHTTPStatusCode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getHTTPStatusCode.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/http/getHTTPStatusCode.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAA2B,YAAY,EAAE,MAAM,QAAQ,CAAC;AA4BpE,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,YAAY,EAAE,OAyBpE;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,SAAS,UAE1D"}
|
|
@@ -29,8 +29,8 @@ function getHTTPStatusCode(json) {
|
|
|
29
29
|
const httpStatuses = new Set(arr.map((res)=>{
|
|
30
30
|
if ('error' in res) {
|
|
31
31
|
const data = res.error.data;
|
|
32
|
-
if (typeof data
|
|
33
|
-
return data
|
|
32
|
+
if (typeof data.httpStatus === 'number') {
|
|
33
|
+
return data.httpStatus;
|
|
34
34
|
}
|
|
35
35
|
const code = codes.TRPC_ERROR_CODES_BY_NUMBER[res.error.code];
|
|
36
36
|
return getStatusCodeFromKey(code);
|
|
@@ -27,8 +27,8 @@ function getHTTPStatusCode(json) {
|
|
|
27
27
|
const httpStatuses = new Set(arr.map((res)=>{
|
|
28
28
|
if ('error' in res) {
|
|
29
29
|
const data = res.error.data;
|
|
30
|
-
if (typeof data
|
|
31
|
-
return data
|
|
30
|
+
if (typeof data.httpStatus === 'number') {
|
|
31
|
+
return data.httpStatus;
|
|
32
32
|
}
|
|
33
33
|
const code = TRPC_ERROR_CODES_BY_NUMBER[res.error.code];
|
|
34
34
|
return getStatusCodeFromKey(code);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveHTTPResponse.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/http/resolveHTTPResponse.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAAO,KAAK,EACV,SAAS,EAGV,MAAM,WAAW,CAAC;AAInB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAG5D,OAAO,KAAK,EACV,sBAAsB,EAEtB,WAAW,EACX,YAAY,EACZ,kCAAkC,EAClC,aAAa,EAEd,MAAM,SAAS,CAAC;AAoBjB,UAAU,yBAAyB,CACjC,OAAO,SAAS,SAAS,EACzB,QAAQ,SAAS,WAAW,CAC5B,SAAQ,sBAAsB,CAAC,OAAO,EAAE,QAAQ,CAAC;IACjD,aAAa,EAAE,kCAAkC,CAAC,OAAO,CAAC,CAAC;IAC3D,GAAG,EAAE,QAAQ,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACzB,kBAAkB,CAAC,EAAE,sBAAsB,CAAC,GAAG,CAAC,CAAC;IACjD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;OAMG;IACH,eAAe,EAAE,CACf,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,EACxC,WAAW,EAAE,OAAO,KACjB,IAAI,CAAC;IACV;;;;;;;;OAQG;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CAClD;
|
|
1
|
+
{"version":3,"file":"resolveHTTPResponse.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/http/resolveHTTPResponse.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAExE,OAAO,KAAK,EACV,SAAS,EAGV,MAAM,WAAW,CAAC;AAInB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAG5D,OAAO,KAAK,EACV,sBAAsB,EAEtB,WAAW,EACX,YAAY,EACZ,kCAAkC,EAClC,aAAa,EAEd,MAAM,SAAS,CAAC;AAoBjB,UAAU,yBAAyB,CACjC,OAAO,SAAS,SAAS,EACzB,QAAQ,SAAS,WAAW,CAC5B,SAAQ,sBAAsB,CAAC,OAAO,EAAE,QAAQ,CAAC;IACjD,aAAa,EAAE,kCAAkC,CAAC,OAAO,CAAC,CAAC;IAC3D,GAAG,EAAE,QAAQ,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACzB,kBAAkB,CAAC,EAAE,sBAAsB,CAAC,GAAG,CAAC,CAAC;IACjD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;OAMG;IACH,eAAe,EAAE,CACf,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,EACxC,WAAW,EAAE,OAAO,KACjB,IAAI,CAAC;IACV;;;;;;;;OAQG;IACH,gBAAgB,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;CAClD;AA4GD;;;GAGG;AAEH;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,SAAS,SAAS,EACzB,QAAQ,SAAS,WAAW,EAE5B,IAAI,EAAE,IAAI,CACR,yBAAyB,CAAC,OAAO,EAAE,QAAQ,CAAC,EAC5C,kBAAkB,GAAG,iBAAiB,CACvC,GACA,OAAO,CAAC,YAAY,CAAC,CAAC;AACzB;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,SAAS,SAAS,EACzB,QAAQ,SAAS,WAAW,EAC5B,IAAI,EAAE,yBAAyB,CAAC,OAAO,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -43,43 +43,6 @@ function initResponse(initOpts) {
|
|
|
43
43
|
headers
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
async function inputToProcedureCall(procedureOpts) {
|
|
47
|
-
const { opts , ctx , type , input , path } = procedureOpts;
|
|
48
|
-
try {
|
|
49
|
-
const data = await router.callProcedure({
|
|
50
|
-
procedures: opts.router._def.procedures,
|
|
51
|
-
path,
|
|
52
|
-
getRawInput: async ()=>input,
|
|
53
|
-
ctx,
|
|
54
|
-
type
|
|
55
|
-
});
|
|
56
|
-
return {
|
|
57
|
-
result: {
|
|
58
|
-
data
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
} catch (cause) {
|
|
62
|
-
const error = TRPCError.getTRPCErrorFromUnknown(cause);
|
|
63
|
-
opts.onError?.({
|
|
64
|
-
error,
|
|
65
|
-
path,
|
|
66
|
-
input,
|
|
67
|
-
ctx,
|
|
68
|
-
type: type,
|
|
69
|
-
req: opts.req
|
|
70
|
-
});
|
|
71
|
-
return {
|
|
72
|
-
error: getErrorShape.getErrorShape({
|
|
73
|
-
config: opts.router._def._config,
|
|
74
|
-
error,
|
|
75
|
-
type,
|
|
76
|
-
path,
|
|
77
|
-
input,
|
|
78
|
-
ctx
|
|
79
|
-
})
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
46
|
function caughtErrorToData(cause, errorOpts) {
|
|
84
47
|
const { router , req , onError } = errorOpts.opts;
|
|
85
48
|
const error = TRPCError.getTRPCErrorFromUnknown(cause);
|
|
@@ -111,7 +74,7 @@ function caughtErrorToData(cause, errorOpts) {
|
|
|
111
74
|
}
|
|
112
75
|
// implementation
|
|
113
76
|
async function resolveHTTPResponse(opts) {
|
|
114
|
-
const { router , req , unstable_onHead , unstable_onChunk } = opts;
|
|
77
|
+
const { router: router$1 , req , unstable_onHead , unstable_onChunk } = opts;
|
|
115
78
|
if (req.method === 'HEAD') {
|
|
116
79
|
// can be used for lambda warmup
|
|
117
80
|
const headResponse = {
|
|
@@ -153,7 +116,7 @@ async function resolveHTTPResponse(opts) {
|
|
|
153
116
|
const inputs = await contentTypeHandler.getInputs({
|
|
154
117
|
isBatchCall,
|
|
155
118
|
req,
|
|
156
|
-
router,
|
|
119
|
+
router: router$1,
|
|
157
120
|
preprocessedBody: opts.preprocessedBody ?? false
|
|
158
121
|
});
|
|
159
122
|
paths = isBatchCall ? decodeURIComponent(opts.path).split(',') : [
|
|
@@ -170,13 +133,45 @@ async function resolveHTTPResponse(opts) {
|
|
|
170
133
|
ctx = await opts.createContext({
|
|
171
134
|
info
|
|
172
135
|
});
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
136
|
+
const errors = [];
|
|
137
|
+
const promises = paths.map(async (path, index)=>{
|
|
138
|
+
const input = inputs[index];
|
|
139
|
+
try {
|
|
140
|
+
const data = await router.callProcedure({
|
|
141
|
+
procedures: opts.router._def.procedures,
|
|
142
|
+
path,
|
|
143
|
+
getRawInput: async ()=>input,
|
|
144
|
+
ctx,
|
|
145
|
+
type
|
|
146
|
+
});
|
|
147
|
+
return {
|
|
148
|
+
result: {
|
|
149
|
+
data
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
} catch (cause) {
|
|
153
|
+
const error = TRPCError.getTRPCErrorFromUnknown(cause);
|
|
154
|
+
errors.push(error);
|
|
155
|
+
opts.onError?.({
|
|
156
|
+
error,
|
|
157
|
+
path,
|
|
158
|
+
input,
|
|
159
|
+
ctx,
|
|
160
|
+
type: type,
|
|
161
|
+
req: opts.req
|
|
162
|
+
});
|
|
163
|
+
return {
|
|
164
|
+
error: getErrorShape.getErrorShape({
|
|
165
|
+
config: opts.router._def._config,
|
|
166
|
+
error,
|
|
167
|
+
type,
|
|
168
|
+
path,
|
|
169
|
+
input,
|
|
170
|
+
ctx
|
|
171
|
+
})
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
});
|
|
180
175
|
if (!isStreamCall) {
|
|
181
176
|
/**
|
|
182
177
|
* Non-streaming response:
|
|
@@ -184,9 +179,6 @@ async function resolveHTTPResponse(opts) {
|
|
|
184
179
|
* - create headers with known response body
|
|
185
180
|
* - return a complete HTTPResponse
|
|
186
181
|
*/ const untransformedJSON = await Promise.all(promises);
|
|
187
|
-
const errors = untransformedJSON.flatMap((response)=>'error' in response ? [
|
|
188
|
-
response.error
|
|
189
|
-
] : []);
|
|
190
182
|
const headResponse1 = initResponse({
|
|
191
183
|
ctx,
|
|
192
184
|
paths,
|
|
@@ -198,7 +190,7 @@ async function resolveHTTPResponse(opts) {
|
|
|
198
190
|
unstable_onHead?.(headResponse1, false);
|
|
199
191
|
// return body stuff
|
|
200
192
|
const result = isBatchCall ? untransformedJSON : untransformedJSON[0]; // eslint-disable-line @typescript-eslint/no-non-null-assertion -- `untransformedJSON` should be the length of `paths` which should be at least 1 otherwise there wouldn't be a request at all
|
|
201
|
-
const transformedJSON = transformer.transformTRPCResponse(router._def._config, result);
|
|
193
|
+
const transformedJSON = transformer.transformTRPCResponse(router$1._def._config, result);
|
|
202
194
|
const body = JSON.stringify(transformedJSON);
|
|
203
195
|
unstable_onChunk?.([
|
|
204
196
|
-1,
|
|
@@ -233,7 +225,7 @@ async function resolveHTTPResponse(opts) {
|
|
|
233
225
|
const [index, untransformedJSON1] = await Promise.race(indexedPromises.values());
|
|
234
226
|
indexedPromises.delete(index);
|
|
235
227
|
try {
|
|
236
|
-
const transformedJSON1 = transformer.transformTRPCResponse(router._def._config, untransformedJSON1);
|
|
228
|
+
const transformedJSON1 = transformer.transformTRPCResponse(router$1._def._config, untransformedJSON1);
|
|
237
229
|
const body1 = JSON.stringify(transformedJSON1);
|
|
238
230
|
unstable_onChunk([
|
|
239
231
|
index,
|
|
@@ -41,43 +41,6 @@ function initResponse(initOpts) {
|
|
|
41
41
|
headers
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
async function inputToProcedureCall(procedureOpts) {
|
|
45
|
-
const { opts , ctx , type , input , path } = procedureOpts;
|
|
46
|
-
try {
|
|
47
|
-
const data = await callProcedure({
|
|
48
|
-
procedures: opts.router._def.procedures,
|
|
49
|
-
path,
|
|
50
|
-
getRawInput: async ()=>input,
|
|
51
|
-
ctx,
|
|
52
|
-
type
|
|
53
|
-
});
|
|
54
|
-
return {
|
|
55
|
-
result: {
|
|
56
|
-
data
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
} catch (cause) {
|
|
60
|
-
const error = getTRPCErrorFromUnknown(cause);
|
|
61
|
-
opts.onError?.({
|
|
62
|
-
error,
|
|
63
|
-
path,
|
|
64
|
-
input,
|
|
65
|
-
ctx,
|
|
66
|
-
type: type,
|
|
67
|
-
req: opts.req
|
|
68
|
-
});
|
|
69
|
-
return {
|
|
70
|
-
error: getErrorShape({
|
|
71
|
-
config: opts.router._def._config,
|
|
72
|
-
error,
|
|
73
|
-
type,
|
|
74
|
-
path,
|
|
75
|
-
input,
|
|
76
|
-
ctx
|
|
77
|
-
})
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
44
|
function caughtErrorToData(cause, errorOpts) {
|
|
82
45
|
const { router , req , onError } = errorOpts.opts;
|
|
83
46
|
const error = getTRPCErrorFromUnknown(cause);
|
|
@@ -168,13 +131,45 @@ async function resolveHTTPResponse(opts) {
|
|
|
168
131
|
ctx = await opts.createContext({
|
|
169
132
|
info
|
|
170
133
|
});
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
134
|
+
const errors = [];
|
|
135
|
+
const promises = paths.map(async (path, index)=>{
|
|
136
|
+
const input = inputs[index];
|
|
137
|
+
try {
|
|
138
|
+
const data = await callProcedure({
|
|
139
|
+
procedures: opts.router._def.procedures,
|
|
140
|
+
path,
|
|
141
|
+
getRawInput: async ()=>input,
|
|
142
|
+
ctx,
|
|
143
|
+
type
|
|
144
|
+
});
|
|
145
|
+
return {
|
|
146
|
+
result: {
|
|
147
|
+
data
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
} catch (cause) {
|
|
151
|
+
const error = getTRPCErrorFromUnknown(cause);
|
|
152
|
+
errors.push(error);
|
|
153
|
+
opts.onError?.({
|
|
154
|
+
error,
|
|
155
|
+
path,
|
|
156
|
+
input,
|
|
157
|
+
ctx,
|
|
158
|
+
type: type,
|
|
159
|
+
req: opts.req
|
|
160
|
+
});
|
|
161
|
+
return {
|
|
162
|
+
error: getErrorShape({
|
|
163
|
+
config: opts.router._def._config,
|
|
164
|
+
error,
|
|
165
|
+
type,
|
|
166
|
+
path,
|
|
167
|
+
input,
|
|
168
|
+
ctx
|
|
169
|
+
})
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
});
|
|
178
173
|
if (!isStreamCall) {
|
|
179
174
|
/**
|
|
180
175
|
* Non-streaming response:
|
|
@@ -182,9 +177,6 @@ async function resolveHTTPResponse(opts) {
|
|
|
182
177
|
* - create headers with known response body
|
|
183
178
|
* - return a complete HTTPResponse
|
|
184
179
|
*/ const untransformedJSON = await Promise.all(promises);
|
|
185
|
-
const errors = untransformedJSON.flatMap((response)=>'error' in response ? [
|
|
186
|
-
response.error
|
|
187
|
-
] : []);
|
|
188
180
|
const headResponse1 = initResponse({
|
|
189
181
|
ctx,
|
|
190
182
|
paths,
|
|
@@ -20,7 +20,7 @@ export type { AnyMutationProcedure, AnyProcedure, AnyQueryProcedure, AnySubscrip
|
|
|
20
20
|
export { createBuilder, unsetMarker } from './procedureBuilder';
|
|
21
21
|
export type { ProcedureBuilder } from './procedureBuilder';
|
|
22
22
|
export * from './rootConfig';
|
|
23
|
-
export type { AnyRouter,
|
|
23
|
+
export type { AnyRouter, ProcedureRecord, ProcedureRouterRecord, Router, RouterCaller, createRouterFactory, inferRouterContext, inferRouterError, inferRouterInputs, inferRouterMeta, inferRouterOutputs, } from './router';
|
|
24
24
|
export * from './TRPCInferrable';
|
|
25
25
|
export * from './router';
|
|
26
26
|
export { transformResult, transformTRPCResponse } from './transformer';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,iCAAiC,EACjC,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,YAAY,EACV,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,wBAAwB,EACxB,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,+BAA+B,EAC/B,kCAAkC,GACnC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAChE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,cAAc,cAAc,CAAC;AAC7B,YAAY,EACV,SAAS,EACT,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,iCAAiC,EACjC,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,YAAY,EACV,oBAAoB,EACpB,YAAY,EACZ,iBAAiB,EACjB,wBAAwB,EACxB,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,+BAA+B,EAC/B,kCAAkC,GACnC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAChE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,cAAc,cAAc,CAAC;AAC7B,YAAY,EACV,SAAS,EACT,eAAe,EACf,qBAAqB,EACrB,MAAM,EACN,YAAY,EACZ,mBAAmB,EACnB,kBAAkB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