@trpc/server 11.0.0-rc.436 → 11.0.0-rc.439
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 +36 -36
- package/dist/unstable-core-do-not-import/createProxy.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/createProxy.js +4 -7
- package/dist/unstable-core-do-not-import/createProxy.mjs +4 -7
- package/package.json +3 -3
- package/src/unstable-core-do-not-import/createProxy.ts +1 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 27.
|
|
2
|
+
"bundleSize": 129192,
|
|
3
|
+
"bundleOrigSize": 178852,
|
|
4
|
+
"bundleReduction": 27.77,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"dependents": [
|
|
15
15
|
"/src/unstable-core-do-not-import.ts"
|
|
16
16
|
],
|
|
17
|
-
"percent": 13.
|
|
17
|
+
"percent": 13.22,
|
|
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.14,
|
|
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": 11.05,
|
|
50
50
|
"reduction": 0
|
|
51
51
|
},
|
|
52
52
|
{
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"/src/unstable-core-do-not-import.ts",
|
|
62
62
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
63
63
|
],
|
|
64
|
-
"percent": 5.
|
|
64
|
+
"percent": 5.88,
|
|
65
65
|
"reduction": 0
|
|
66
66
|
},
|
|
67
67
|
{
|
|
@@ -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.
|
|
82
|
+
"percent": 4.94,
|
|
83
83
|
"reduction": 39.72
|
|
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.
|
|
97
|
+
"percent": 4.9,
|
|
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.
|
|
164
|
+
"percent": 2.43,
|
|
165
165
|
"reduction": 22.27
|
|
166
166
|
},
|
|
167
167
|
{
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
"dependents": [
|
|
260
260
|
"/src/adapters/fetch/index.ts"
|
|
261
261
|
],
|
|
262
|
-
"percent": 1.
|
|
262
|
+
"percent": 1.75,
|
|
263
263
|
"reduction": 2.17
|
|
264
264
|
},
|
|
265
265
|
{
|
|
@@ -278,34 +278,34 @@
|
|
|
278
278
|
"reduction": 13.79
|
|
279
279
|
},
|
|
280
280
|
{
|
|
281
|
-
"id": "/src/
|
|
282
|
-
"size":
|
|
283
|
-
"origSize":
|
|
281
|
+
"id": "/src/adapters/next-app-dir/rethrowNextErrors.ts",
|
|
282
|
+
"size": 2050,
|
|
283
|
+
"origSize": 2176,
|
|
284
284
|
"renderedExports": [
|
|
285
|
-
"
|
|
286
|
-
"createFlatProxy"
|
|
285
|
+
"rethrowNextErrors"
|
|
287
286
|
],
|
|
288
287
|
"removedExports": [],
|
|
289
288
|
"dependents": [
|
|
290
|
-
"/src/
|
|
291
|
-
"/src/unstable-core-do-not-import/router.ts"
|
|
289
|
+
"/src/adapters/next-app-dir/nextAppDirCaller.ts"
|
|
292
290
|
],
|
|
293
|
-
"percent": 1.
|
|
294
|
-
"reduction":
|
|
291
|
+
"percent": 1.59,
|
|
292
|
+
"reduction": 5.79
|
|
295
293
|
},
|
|
296
294
|
{
|
|
297
|
-
"id": "/src/
|
|
298
|
-
"size":
|
|
299
|
-
"origSize":
|
|
295
|
+
"id": "/src/unstable-core-do-not-import/createProxy.ts",
|
|
296
|
+
"size": 1982,
|
|
297
|
+
"origSize": 1991,
|
|
300
298
|
"renderedExports": [
|
|
301
|
-
"
|
|
299
|
+
"createRecursiveProxy",
|
|
300
|
+
"createFlatProxy"
|
|
302
301
|
],
|
|
303
302
|
"removedExports": [],
|
|
304
303
|
"dependents": [
|
|
305
|
-
"/src/
|
|
304
|
+
"/src/unstable-core-do-not-import.ts",
|
|
305
|
+
"/src/unstable-core-do-not-import/router.ts"
|
|
306
306
|
],
|
|
307
|
-
"percent": 1.
|
|
308
|
-
"reduction":
|
|
307
|
+
"percent": 1.53,
|
|
308
|
+
"reduction": 0.45
|
|
309
309
|
},
|
|
310
310
|
{
|
|
311
311
|
"id": "/src/unstable-core-do-not-import/error/TRPCError.ts",
|
|
@@ -396,7 +396,7 @@
|
|
|
396
396
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
397
397
|
"/src/unstable-core-do-not-import/error/getErrorShape.ts"
|
|
398
398
|
],
|
|
399
|
-
"percent":
|
|
399
|
+
"percent": 1,
|
|
400
400
|
"reduction": 18.7
|
|
401
401
|
},
|
|
402
402
|
{
|
|
@@ -418,12 +418,12 @@
|
|
|
418
418
|
"/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
|
|
419
419
|
"/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
|
|
420
420
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
421
|
+
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
421
422
|
"/src/unstable-core-do-not-import/error/TRPCError.ts",
|
|
422
423
|
"/src/unstable-core-do-not-import/stream/sse.ts",
|
|
423
424
|
"/src/unstable-core-do-not-import/transformer.ts",
|
|
424
425
|
"/src/unstable-core-do-not-import/middleware.ts",
|
|
425
426
|
"/src/unstable-core-do-not-import/router.ts",
|
|
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",
|
|
429
429
|
"/src/unstable-core-do-not-import/stream/jsonl.ts"
|
|
@@ -578,7 +578,7 @@
|
|
|
578
578
|
"/src/unstable-core-do-not-import/stream/sse.ts",
|
|
579
579
|
"/src/unstable-core-do-not-import/stream/jsonl.ts"
|
|
580
580
|
],
|
|
581
|
-
"percent": 0.
|
|
581
|
+
"percent": 0.45,
|
|
582
582
|
"reduction": 17.15
|
|
583
583
|
},
|
|
584
584
|
{
|
|
@@ -721,9 +721,9 @@
|
|
|
721
721
|
"reduction": 100
|
|
722
722
|
},
|
|
723
723
|
{
|
|
724
|
-
"id": "/src/
|
|
724
|
+
"id": "/src/rpc.ts",
|
|
725
725
|
"size": 0,
|
|
726
|
-
"origSize":
|
|
726
|
+
"origSize": 36,
|
|
727
727
|
"renderedExports": [],
|
|
728
728
|
"removedExports": [],
|
|
729
729
|
"dependents": [],
|
|
@@ -731,9 +731,9 @@
|
|
|
731
731
|
"reduction": 100
|
|
732
732
|
},
|
|
733
733
|
{
|
|
734
|
-
"id": "/src/
|
|
734
|
+
"id": "/src/index.ts",
|
|
735
735
|
"size": 0,
|
|
736
|
-
"origSize":
|
|
736
|
+
"origSize": 32,
|
|
737
737
|
"renderedExports": [],
|
|
738
738
|
"removedExports": [],
|
|
739
739
|
"dependents": [],
|
|
@@ -741,9 +741,9 @@
|
|
|
741
741
|
"reduction": 100
|
|
742
742
|
},
|
|
743
743
|
{
|
|
744
|
-
"id": "/src/
|
|
744
|
+
"id": "/src/shared.ts",
|
|
745
745
|
"size": 0,
|
|
746
|
-
"origSize":
|
|
746
|
+
"origSize": 653,
|
|
747
747
|
"renderedExports": [],
|
|
748
748
|
"removedExports": [],
|
|
749
749
|
"dependents": [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createProxy.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/createProxy.ts"],"names":[],"mappings":"AAAA,UAAU,oBAAoB;IAC5B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,OAAO,EAAE,CAAC;CACjB;AACD,KAAK,aAAa,GAAG,CAAC,IAAI,EAAE,oBAAoB,KAAK,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"createProxy.d.ts","sourceRoot":"","sources":["../../src/unstable-core-do-not-import/createProxy.ts"],"names":[],"mappings":"AAAA,UAAU,oBAAoB;IAC5B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,OAAO,EAAE,CAAC;CACjB;AACD,KAAK,aAAa,GAAG,CAAC,IAAI,EAAE,oBAAoB,KAAK,OAAO,CAAC;AAyC7D;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,KAAK,sBAC9B,aAAa,KACtB,KAAqE,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,eAAe,GAAI,KAAK,YACzB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,KAAK,KAAK,GAAG,KAC5C,KAWF,CAAC"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var _cache, _cacheKey;
|
|
4
3
|
const noop = ()=>{
|
|
5
4
|
// noop
|
|
6
5
|
};
|
|
7
6
|
function createInnerProxy(callback, path, cache) {
|
|
8
|
-
|
|
9
|
-
(_cache = cache)[_cacheKey = cacheKey] ?? (_cache[_cacheKey] = new Proxy(noop, {
|
|
7
|
+
return new Proxy(noop, {
|
|
10
8
|
get (_obj, key) {
|
|
11
9
|
if (typeof key !== 'string' || key === 'then') {
|
|
12
10
|
// special case for if the proxy is accidentally treated
|
|
@@ -16,7 +14,7 @@ function createInnerProxy(callback, path, cache) {
|
|
|
16
14
|
return createInnerProxy(callback, [
|
|
17
15
|
...path,
|
|
18
16
|
key
|
|
19
|
-
]
|
|
17
|
+
]);
|
|
20
18
|
},
|
|
21
19
|
apply (_1, _2, args) {
|
|
22
20
|
const lastOfPath = path[path.length - 1];
|
|
@@ -40,14 +38,13 @@ function createInnerProxy(callback, path, cache) {
|
|
|
40
38
|
}
|
|
41
39
|
return callback(opts);
|
|
42
40
|
}
|
|
43
|
-
})
|
|
44
|
-
return cache[cacheKey];
|
|
41
|
+
});
|
|
45
42
|
}
|
|
46
43
|
/**
|
|
47
44
|
* Creates a proxy that calls the callback with the path and arguments
|
|
48
45
|
*
|
|
49
46
|
* @internal
|
|
50
|
-
*/ const createRecursiveProxy = (callback)=>createInnerProxy(callback, []
|
|
47
|
+
*/ const createRecursiveProxy = (callback)=>createInnerProxy(callback, []);
|
|
51
48
|
/**
|
|
52
49
|
* Used in place of `new Proxy` where each handler will map 1 level deep to another value.
|
|
53
50
|
*
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
var _cache, _cacheKey;
|
|
2
1
|
const noop = ()=>{
|
|
3
2
|
// noop
|
|
4
3
|
};
|
|
5
4
|
function createInnerProxy(callback, path, cache) {
|
|
6
|
-
|
|
7
|
-
(_cache = cache)[_cacheKey = cacheKey] ?? (_cache[_cacheKey] = new Proxy(noop, {
|
|
5
|
+
return new Proxy(noop, {
|
|
8
6
|
get (_obj, key) {
|
|
9
7
|
if (typeof key !== 'string' || key === 'then') {
|
|
10
8
|
// special case for if the proxy is accidentally treated
|
|
@@ -14,7 +12,7 @@ function createInnerProxy(callback, path, cache) {
|
|
|
14
12
|
return createInnerProxy(callback, [
|
|
15
13
|
...path,
|
|
16
14
|
key
|
|
17
|
-
]
|
|
15
|
+
]);
|
|
18
16
|
},
|
|
19
17
|
apply (_1, _2, args) {
|
|
20
18
|
const lastOfPath = path[path.length - 1];
|
|
@@ -38,14 +36,13 @@ function createInnerProxy(callback, path, cache) {
|
|
|
38
36
|
}
|
|
39
37
|
return callback(opts);
|
|
40
38
|
}
|
|
41
|
-
})
|
|
42
|
-
return cache[cacheKey];
|
|
39
|
+
});
|
|
43
40
|
}
|
|
44
41
|
/**
|
|
45
42
|
* Creates a proxy that calls the callback with the path and arguments
|
|
46
43
|
*
|
|
47
44
|
* @internal
|
|
48
|
-
*/ const createRecursiveProxy = (callback)=>createInnerProxy(callback, []
|
|
45
|
+
*/ const createRecursiveProxy = (callback)=>createInnerProxy(callback, []);
|
|
49
46
|
/**
|
|
50
47
|
* Used in place of `new Proxy` where each handler will map 1 level deep to another value.
|
|
51
48
|
*
|
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.439+775af00cc",
|
|
4
4
|
"description": "The tRPC server library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"react-dom": "^18.3.1",
|
|
138
138
|
"rollup": "^4.9.5",
|
|
139
139
|
"superjson": "^1.12.4",
|
|
140
|
-
"superstruct": "^
|
|
140
|
+
"superstruct": "^2.0.0",
|
|
141
141
|
"tslib": "^2.5.0",
|
|
142
142
|
"tsx": "^4.0.0",
|
|
143
143
|
"typescript": "^5.5.0",
|
|
@@ -149,5 +149,5 @@
|
|
|
149
149
|
"funding": [
|
|
150
150
|
"https://trpc.io/sponsor"
|
|
151
151
|
],
|
|
152
|
-
"gitHead": "
|
|
152
|
+
"gitHead": "775af00cc25f1a2397e3f5d7f811f6a8a4b0aa82"
|
|
153
153
|
}
|
|
@@ -13,9 +13,7 @@ function createInnerProxy(
|
|
|
13
13
|
path: string[],
|
|
14
14
|
cache: Record<string, unknown>,
|
|
15
15
|
) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
cache[cacheKey] ??= new Proxy(noop, {
|
|
16
|
+
return new Proxy(noop, {
|
|
19
17
|
get(_obj, key) {
|
|
20
18
|
if (typeof key !== 'string' || key === 'then') {
|
|
21
19
|
// special case for if the proxy is accidentally treated
|
|
@@ -43,8 +41,6 @@ function createInnerProxy(
|
|
|
43
41
|
return callback(opts);
|
|
44
42
|
},
|
|
45
43
|
});
|
|
46
|
-
|
|
47
|
-
return cache[cacheKey];
|
|
48
44
|
}
|
|
49
45
|
|
|
50
46
|
/**
|