@trpc/server 11.0.0-rc.436 → 11.0.0-rc.441
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 +43 -43
- 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 +4 -4
- 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
|
{
|
|
@@ -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
|
{
|
|
@@ -731,9 +731,9 @@
|
|
|
731
731
|
"reduction": 100
|
|
732
732
|
},
|
|
733
733
|
{
|
|
734
|
-
"id": "/src/
|
|
734
|
+
"id": "/src/rpc.ts",
|
|
735
735
|
"size": 0,
|
|
736
|
-
"origSize":
|
|
736
|
+
"origSize": 36,
|
|
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": [],
|
|
@@ -784,16 +784,6 @@
|
|
|
784
784
|
"percent": 0,
|
|
785
785
|
"reduction": 100
|
|
786
786
|
},
|
|
787
|
-
{
|
|
788
|
-
"id": "/src/adapters/fetch/index.ts",
|
|
789
|
-
"size": 0,
|
|
790
|
-
"origSize": 64,
|
|
791
|
-
"renderedExports": [],
|
|
792
|
-
"removedExports": [],
|
|
793
|
-
"dependents": [],
|
|
794
|
-
"percent": 0,
|
|
795
|
-
"reduction": 100
|
|
796
|
-
},
|
|
797
787
|
{
|
|
798
788
|
"id": "/src/adapters/fastify/index.ts",
|
|
799
789
|
"size": 0,
|
|
@@ -818,6 +808,16 @@
|
|
|
818
808
|
],
|
|
819
809
|
"percent": 0,
|
|
820
810
|
"reduction": 100
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
"id": "/src/adapters/fetch/index.ts",
|
|
814
|
+
"size": 0,
|
|
815
|
+
"origSize": 64,
|
|
816
|
+
"renderedExports": [],
|
|
817
|
+
"removedExports": [],
|
|
818
|
+
"dependents": [],
|
|
819
|
+
"percent": 0,
|
|
820
|
+
"reduction": 100
|
|
821
821
|
}
|
|
822
822
|
],
|
|
823
823
|
"moduleCount": 55
|
|
@@ -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.441+0c4a58144",
|
|
4
4
|
"description": "The tRPC server library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
},
|
|
118
118
|
"devDependencies": {
|
|
119
119
|
"@fastify/websocket": "^10.0.1",
|
|
120
|
-
"@tanstack/react-query": "^5.
|
|
120
|
+
"@tanstack/react-query": "^5.49.2",
|
|
121
121
|
"@types/aws-lambda": "^8.10.137",
|
|
122
122
|
"@types/express": "^4.17.17",
|
|
123
123
|
"@types/hash-sum": "^1.0.0",
|
|
@@ -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": "0c4a581449b6cbf187e597dbd7ea29381878f2e8"
|
|
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
|
/**
|