@trpc/server 11.0.0-rc.843 → 11.0.0-rc.844
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/@trpc/server/index.d.ts +5 -1
- package/dist/@trpc/server/index.d.ts.map +1 -1
- package/dist/bundle-analysis.json +18 -18
- package/dist/index.js +1 -0
- package/dist/index.mjs +1 -1
- package/dist/unstable-core-do-not-import/router.js +1 -1
- package/dist/unstable-core-do-not-import/router.mjs +1 -1
- package/package.json +2 -2
- package/src/@trpc/server/index.ts +4 -0
- package/src/unstable-core-do-not-import/router.ts +1 -1
|
@@ -6,7 +6,11 @@ experimental_standaloneMiddleware, experimental_standaloneMiddleware as experime
|
|
|
6
6
|
/**
|
|
7
7
|
* @deprecated use `tracked(id, data)` instead
|
|
8
8
|
*/
|
|
9
|
-
sse, tracked, type TrackedEnvelope, isTrackedEnvelope, lazy
|
|
9
|
+
sse, tracked, type TrackedEnvelope, isTrackedEnvelope, lazy,
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated use {@link lazy} instead
|
|
12
|
+
*/
|
|
13
|
+
lazy as experimental_lazy, callProcedure as callTRPCProcedure, } from '../../unstable-core-do-not-import';
|
|
10
14
|
export type {
|
|
11
15
|
/**
|
|
12
16
|
* @deprecated use `AnyTRPCProcedure` instead
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/@trpc/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS;AACT;;GAEG;AACH,iCAAiC,EACjC,iCAAiC,IAAI,2BAA2B,EAChE,QAAQ,EAER,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,IAAI,mBAAmB,EACtC,oBAAoB,IAAI,wBAAwB,EAChD,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,oCAAoC,EACzC,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,K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YAAY;AACV;;GAEG;AACH,YAAY;AACZ;;GAEG;AACH,SAAS;AACT;;GAEG;AACH,qBAAqB;AACrB;;GAEG;AACH,uBAAuB;AAEvB;;GAEG;AACH,IAAI;AAEJ;;GAEG;AACH,WAAW;AACX;;GAEG;AACH,aAAa;AACb;;GAEG;AACH,oBAAoB;AAEpB;;GAEG;AACH,iBAAiB;AACjB;;GAEG;AACH,wBAAwB,GACzB,MAAM,mCAAmC,CAAC;AAE3C,OAAO;AACL;;GAEG;AACH,aAAa,GACd,MAAM,mCAAmC,CAAC;AAE3C;;;GAGG;AACH,MAAM,MAAM,oBAAoB,CAAC,SAAS,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,IACxE,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
2
|
+
"bundleSize": 201924,
|
|
3
|
+
"bundleOrigSize": 234627,
|
|
4
4
|
"bundleReduction": 13.94,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
"id": "/src/unstable-core-do-not-import/router.ts",
|
|
85
|
-
"size":
|
|
86
|
-
"origSize":
|
|
85
|
+
"size": 10154,
|
|
86
|
+
"origSize": 14410,
|
|
87
87
|
"renderedExports": [
|
|
88
88
|
"lazy",
|
|
89
89
|
"createRouterFactory",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"/src/unstable-core-do-not-import/http/contentType.ts"
|
|
100
100
|
],
|
|
101
101
|
"percent": 5.03,
|
|
102
|
-
"reduction": 29.
|
|
102
|
+
"reduction": 29.54
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
"id": "/src/unstable-core-do-not-import/stream/utils/mergeAsyncIterables.ts",
|
|
@@ -374,10 +374,10 @@
|
|
|
374
374
|
"/src/unstable-core-do-not-import/router.ts",
|
|
375
375
|
"/src/unstable-core-do-not-import/transformer.ts",
|
|
376
376
|
"/src/unstable-core-do-not-import/middleware.ts",
|
|
377
|
+
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
377
378
|
"/src/unstable-core-do-not-import/http/contentType.ts",
|
|
378
379
|
"/src/unstable-core-do-not-import/http/abortError.ts",
|
|
379
380
|
"/src/unstable-core-do-not-import/procedureBuilder.ts",
|
|
380
|
-
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
381
381
|
"/src/unstable-core-do-not-import/stream/jsonl.ts",
|
|
382
382
|
"/src/unstable-core-do-not-import/stream/sse.ts"
|
|
383
383
|
],
|
|
@@ -896,6 +896,16 @@
|
|
|
896
896
|
"percent": 0,
|
|
897
897
|
"reduction": 100
|
|
898
898
|
},
|
|
899
|
+
{
|
|
900
|
+
"id": "/src/rpc.ts",
|
|
901
|
+
"size": 0,
|
|
902
|
+
"origSize": 36,
|
|
903
|
+
"renderedExports": [],
|
|
904
|
+
"removedExports": [],
|
|
905
|
+
"dependents": [],
|
|
906
|
+
"percent": 0,
|
|
907
|
+
"reduction": 100
|
|
908
|
+
},
|
|
899
909
|
{
|
|
900
910
|
"id": "/src/shared.ts",
|
|
901
911
|
"size": 0,
|
|
@@ -914,9 +924,9 @@
|
|
|
914
924
|
"removedExports": [],
|
|
915
925
|
"dependents": [
|
|
916
926
|
"/src/adapters/express.ts",
|
|
917
|
-
"/src/adapters/next.ts",
|
|
918
927
|
"/src/adapters/standalone.ts",
|
|
919
928
|
"/src/adapters/ws.ts",
|
|
929
|
+
"/src/adapters/next.ts",
|
|
920
930
|
"/src/adapters/node-http/nodeHTTPRequestHandler.ts",
|
|
921
931
|
"/src/adapters/next-app-dir/nextAppDirCaller.ts",
|
|
922
932
|
"/src/adapters/node-http/writeResponse.ts"
|
|
@@ -924,16 +934,6 @@
|
|
|
924
934
|
"percent": 0,
|
|
925
935
|
"reduction": 100
|
|
926
936
|
},
|
|
927
|
-
{
|
|
928
|
-
"id": "/src/rpc.ts",
|
|
929
|
-
"size": 0,
|
|
930
|
-
"origSize": 36,
|
|
931
|
-
"renderedExports": [],
|
|
932
|
-
"removedExports": [],
|
|
933
|
-
"dependents": [],
|
|
934
|
-
"percent": 0,
|
|
935
|
-
"reduction": 100
|
|
936
|
-
},
|
|
937
937
|
{
|
|
938
938
|
"id": "/src/adapters/next-app-dir.ts",
|
|
939
939
|
"size": 0,
|
|
@@ -984,9 +984,9 @@
|
|
|
984
984
|
"removedExports": [],
|
|
985
985
|
"dependents": [
|
|
986
986
|
"/src/adapters/express.ts",
|
|
987
|
-
"/src/adapters/next.ts",
|
|
988
987
|
"/src/adapters/standalone.ts",
|
|
989
988
|
"/src/adapters/ws.ts",
|
|
989
|
+
"/src/adapters/next.ts",
|
|
990
990
|
"/src/adapters/fastify/fastifyRequestHandler.ts"
|
|
991
991
|
],
|
|
992
992
|
"percent": 0,
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,7 @@ exports.TRPCError = TRPCError.TRPCError;
|
|
|
22
22
|
exports.getTRPCErrorFromUnknown = TRPCError.getTRPCErrorFromUnknown;
|
|
23
23
|
exports.callTRPCProcedure = router.callProcedure;
|
|
24
24
|
exports.experimental_lazy = router.lazy;
|
|
25
|
+
exports.lazy = router.lazy;
|
|
25
26
|
exports.isTrackedEnvelope = tracked.isTrackedEnvelope;
|
|
26
27
|
exports.sse = tracked.sse;
|
|
27
28
|
exports.tracked = tracked.tracked;
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { createFlatProxy as createTRPCFlatProxy, createRecursiveProxy as createTRPCRecursiveProxy } from './unstable-core-do-not-import/createProxy.mjs';
|
|
2
2
|
export { getErrorShape } from './unstable-core-do-not-import/error/getErrorShape.mjs';
|
|
3
3
|
export { TRPCError, getTRPCErrorFromUnknown } from './unstable-core-do-not-import/error/TRPCError.mjs';
|
|
4
|
-
export { callProcedure as callTRPCProcedure, lazy as experimental_lazy } from './unstable-core-do-not-import/router.mjs';
|
|
4
|
+
export { callProcedure as callTRPCProcedure, lazy as experimental_lazy, lazy } from './unstable-core-do-not-import/router.mjs';
|
|
5
5
|
import './vendor/unpromise/unpromise.mjs';
|
|
6
6
|
import './unstable-core-do-not-import/stream/utils/disposable.mjs';
|
|
7
7
|
export { isTrackedEnvelope, sse, tracked } from './unstable-core-do-not-import/stream/tracked.mjs';
|
|
@@ -29,7 +29,7 @@ function once(fn) {
|
|
|
29
29
|
}
|
|
30
30
|
const routers = Object.values(mod);
|
|
31
31
|
if (routers.length !== 1 || !isRouter(routers[0])) {
|
|
32
|
-
throw new Error("Invalid router module - either define exactly 1 export or return the router directly.\nExample: `
|
|
32
|
+
throw new Error("Invalid router module - either define exactly 1 export or return the router directly.\nExample: `lazy(() => import('./slow.js').then((m) => m.slowRouter))`");
|
|
33
33
|
}
|
|
34
34
|
return routers[0];
|
|
35
35
|
}
|
|
@@ -27,7 +27,7 @@ function once(fn) {
|
|
|
27
27
|
}
|
|
28
28
|
const routers = Object.values(mod);
|
|
29
29
|
if (routers.length !== 1 || !isRouter(routers[0])) {
|
|
30
|
-
throw new Error("Invalid router module - either define exactly 1 export or return the router directly.\nExample: `
|
|
30
|
+
throw new Error("Invalid router module - either define exactly 1 export or return the router directly.\nExample: `lazy(() => import('./slow.js').then((m) => m.slowRouter))`");
|
|
31
31
|
}
|
|
32
32
|
return routers[0];
|
|
33
33
|
}
|
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.844+0244dee81",
|
|
4
4
|
"description": "The tRPC server library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -152,5 +152,5 @@
|
|
|
152
152
|
"peerDependencies": {
|
|
153
153
|
"typescript": ">=5.7.2"
|
|
154
154
|
},
|
|
155
|
-
"gitHead": "
|
|
155
|
+
"gitHead": "0244dee8108e808281041838d6c326dacb030bf2"
|
|
156
156
|
}
|
|
@@ -117,7 +117,7 @@ export function lazy<TRouter extends AnyRouter>(
|
|
|
117
117
|
|
|
118
118
|
if (routers.length !== 1 || !isRouter(routers[0])) {
|
|
119
119
|
throw new Error(
|
|
120
|
-
"Invalid router module - either define exactly 1 export or return the router directly.\nExample: `
|
|
120
|
+
"Invalid router module - either define exactly 1 export or return the router directly.\nExample: `lazy(() => import('./slow.js').then((m) => m.slowRouter))`",
|
|
121
121
|
);
|
|
122
122
|
}
|
|
123
123
|
|