@trpc/server 11.0.0-rc.840 → 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.
@@ -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 as experimental_lazy, callProcedure as callTRPCProcedure, } from '../../unstable-core-do-not-import';
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,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,IAAI,oBAAoB,EAC7C,KAAK,cAAc,IAAI,kBAAkB,EACzC,KAAK,+BAA+B,EACpC,KAAK,kCAAkC,EACvC,KAAK,YAAY,IAAI,gBAAgB,EACrC,KAAK,SAAS,IAAI,aAAa,EAC/B,KAAK,YAAY,IAAI,gBAAgB,EACrC,KAAK,qBAAqB,IAAI,yBAAyB,EACvD,KAAK,uBAAuB,IAAI,2BAA2B,EAC3D,KAAK,aAAa,IAAI,iBAAiB,EACvC,KAAK,oBAAoB,IAAI,wBAAwB,EACrD,KAAK,iBAAiB,IAAI,qBAAqB,EAC/C,KAAK,YAAY,IAAI,gBAAgB,EACrC,KAAK,wBAAwB,IAAI,4BAA4B,EAC7D,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,IAAI,qBAAqB,EAC/C,KAAK,cAAc,IAAI,kBAAkB,EACzC,KAAK,qBAAqB,IAAI,yBAAyB,EACvD,KAAK,WAAW,EAChB,qBAAqB;AACrB;;GAEG;AACH,GAAG,EACH,OAAO,EACP,KAAK,eAAe,EACpB,iBAAiB,EACjB,IAAI,IAAI,iBAAiB,EACzB,aAAa,IAAI,iBAAiB,GACnC,MAAM,mCAAmC,CAAC;AAE3C,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
+ {"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,E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AM,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": 201937,
3
- "bundleOrigSize": 234640,
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": 10167,
86
- "origSize": 14423,
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.51
102
+ "reduction": 29.54
103
103
  },
104
104
  {
105
105
  "id": "/src/unstable-core-do-not-import/stream/utils/mergeAsyncIterables.ts",
@@ -897,9 +897,9 @@
897
897
  "reduction": 100
898
898
  },
899
899
  {
900
- "id": "/src/shared.ts",
900
+ "id": "/src/rpc.ts",
901
901
  "size": 0,
902
- "origSize": 653,
902
+ "origSize": 36,
903
903
  "renderedExports": [],
904
904
  "removedExports": [],
905
905
  "dependents": [],
@@ -907,9 +907,9 @@
907
907
  "reduction": 100
908
908
  },
909
909
  {
910
- "id": "/src/rpc.ts",
910
+ "id": "/src/shared.ts",
911
911
  "size": 0,
912
- "origSize": 36,
912
+ "origSize": 653,
913
913
  "renderedExports": [],
914
914
  "removedExports": [],
915
915
  "dependents": [],
@@ -924,9 +924,9 @@
924
924
  "removedExports": [],
925
925
  "dependents": [
926
926
  "/src/adapters/express.ts",
927
- "/src/adapters/next.ts",
928
927
  "/src/adapters/standalone.ts",
929
928
  "/src/adapters/ws.ts",
929
+ "/src/adapters/next.ts",
930
930
  "/src/adapters/node-http/nodeHTTPRequestHandler.ts",
931
931
  "/src/adapters/next-app-dir/nextAppDirCaller.ts",
932
932
  "/src/adapters/node-http/writeResponse.ts"
@@ -957,9 +957,9 @@
957
957
  "reduction": 100
958
958
  },
959
959
  {
960
- "id": "/src/adapters/fetch/index.ts",
960
+ "id": "/src/adapters/fastify/index.ts",
961
961
  "size": 0,
962
- "origSize": 64,
962
+ "origSize": 78,
963
963
  "renderedExports": [],
964
964
  "removedExports": [],
965
965
  "dependents": [],
@@ -967,9 +967,9 @@
967
967
  "reduction": 100
968
968
  },
969
969
  {
970
- "id": "/src/adapters/fastify/index.ts",
970
+ "id": "/src/adapters/fetch/index.ts",
971
971
  "size": 0,
972
- "origSize": 78,
972
+ "origSize": 64,
973
973
  "renderedExports": [],
974
974
  "removedExports": [],
975
975
  "dependents": [],
@@ -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: `experimental_lazy(() => import('./slow.js').then((m) => m.slowRouter))`");
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: `experimental_lazy(() => import('./slow.js').then((m) => m.slowRouter))`");
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.840+b6c6ddb3e",
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": "b6c6ddb3e5ebc77db3d914f0f9a0f4fbc86fca9c"
155
+ "gitHead": "0244dee8108e808281041838d6c326dacb030bf2"
156
156
  }
@@ -45,6 +45,10 @@ export {
45
45
  tracked,
46
46
  type TrackedEnvelope,
47
47
  isTrackedEnvelope,
48
+ lazy,
49
+ /**
50
+ * @deprecated use {@link lazy} instead
51
+ */
48
52
  lazy as experimental_lazy,
49
53
  callProcedure as callTRPCProcedure,
50
54
  } from '../../unstable-core-do-not-import';
@@ -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: `experimental_lazy(() => import('./slow.js').then((m) => m.slowRouter))`",
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