@trpc/server 11.0.0-rc.802 → 11.0.0-rc.804

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.
@@ -1,4 +1,7 @@
1
1
  export { nextAppDirCaller as experimental_nextAppDirCaller } from './next-app-dir/nextAppDirCaller';
2
2
  export { redirect as experimental_redirect } from './next-app-dir/redirect';
3
3
  export { notFound as experimental_notFound } from './next-app-dir/notFound';
4
+ export {
5
+ /** @internal */
6
+ rethrowNextErrors, } from './next-app-dir/rethrowNextErrors';
4
7
  //# sourceMappingURL=next-app-dir.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"next-app-dir.d.ts","sourceRoot":"","sources":["../../src/adapters/next-app-dir.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,IAAI,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AACpG,OAAO,EAAE,QAAQ,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,QAAQ,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"next-app-dir.d.ts","sourceRoot":"","sources":["../../src/adapters/next-app-dir.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,IAAI,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AACpG,OAAO,EAAE,QAAQ,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,QAAQ,IAAI,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO;AACL,gBAAgB;AAChB,iBAAiB,GAClB,MAAM,kCAAkC,CAAC"}
@@ -3,9 +3,11 @@
3
3
  var nextAppDirCaller = require('./next-app-dir/nextAppDirCaller.js');
4
4
  var redirect = require('./next-app-dir/redirect.js');
5
5
  var notFound = require('./next-app-dir/notFound.js');
6
+ var rethrowNextErrors = require('./next-app-dir/rethrowNextErrors.js');
6
7
 
7
8
 
8
9
 
9
10
  exports.experimental_nextAppDirCaller = nextAppDirCaller.nextAppDirCaller;
10
11
  exports.experimental_redirect = redirect.redirect;
11
12
  exports.experimental_notFound = notFound.notFound;
13
+ exports.rethrowNextErrors = rethrowNextErrors.rethrowNextErrors;
@@ -1,3 +1,4 @@
1
1
  export { nextAppDirCaller as experimental_nextAppDirCaller } from './next-app-dir/nextAppDirCaller.mjs';
2
2
  export { redirect as experimental_redirect } from './next-app-dir/redirect.mjs';
3
3
  export { notFound as experimental_notFound } from './next-app-dir/notFound.mjs';
4
+ export { rethrowNextErrors } from './next-app-dir/rethrowNextErrors.mjs';
@@ -1,7 +1,7 @@
1
1
  {
2
- "bundleSize": 198987,
3
- "bundleOrigSize": 230694,
4
- "bundleReduction": 13.74,
2
+ "bundleSize": 199060,
3
+ "bundleOrigSize": 230855,
4
+ "bundleReduction": 13.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": 10.6,
17
+ "percent": 10.59,
18
18
  "reduction": 0
19
19
  },
20
20
  {
@@ -30,7 +30,7 @@
30
30
  "dependents": [
31
31
  "/src/adapters/fastify/fastifyTRPCPlugin.ts"
32
32
  ],
33
- "percent": 10.13,
33
+ "percent": 10.12,
34
34
  "reduction": 0
35
35
  },
36
36
  {
@@ -291,9 +291,9 @@
291
291
  "removedExports": [],
292
292
  "dependents": [
293
293
  "/src/unstable-core-do-not-import.ts",
294
- "/src/unstable-core-do-not-import/http/resolveResponse.ts",
295
294
  "/src/unstable-core-do-not-import/router.ts",
296
- "/src/unstable-core-do-not-import/initTRPC.ts"
295
+ "/src/unstable-core-do-not-import/initTRPC.ts",
296
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts"
297
297
  ],
298
298
  "percent": 1.38,
299
299
  "reduction": 45.98
@@ -353,13 +353,13 @@
353
353
  "removedExports": [],
354
354
  "dependents": [
355
355
  "/src/unstable-core-do-not-import.ts",
356
- "/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
357
- "/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
358
- "/src/unstable-core-do-not-import/http/resolveResponse.ts",
359
356
  "/src/unstable-core-do-not-import/error/TRPCError.ts",
360
357
  "/src/unstable-core-do-not-import/router.ts",
361
358
  "/src/unstable-core-do-not-import/transformer.ts",
362
359
  "/src/unstable-core-do-not-import/middleware.ts",
360
+ "/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
361
+ "/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
362
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
363
363
  "/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
364
364
  "/src/unstable-core-do-not-import/http/contentType.ts",
365
365
  "/src/unstable-core-do-not-import/http/abortError.ts",
@@ -372,8 +372,8 @@
372
372
  },
373
373
  {
374
374
  "id": "/src/unstable-core-do-not-import/error/TRPCError.ts",
375
- "size": 2356,
376
- "origSize": 2152,
375
+ "size": 2429,
376
+ "origSize": 2221,
377
377
  "renderedExports": [
378
378
  "getCauseFromUnknown",
379
379
  "getTRPCErrorFromUnknown",
@@ -382,15 +382,15 @@
382
382
  "removedExports": [],
383
383
  "dependents": [
384
384
  "/src/unstable-core-do-not-import.ts",
385
- "/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
386
- "/src/unstable-core-do-not-import/http/resolveResponse.ts",
387
385
  "/src/unstable-core-do-not-import/router.ts",
388
386
  "/src/unstable-core-do-not-import/middleware.ts",
387
+ "/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
388
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts",
389
389
  "/src/unstable-core-do-not-import/http/contentType.ts",
390
390
  "/src/unstable-core-do-not-import/procedureBuilder.ts",
391
391
  "/src/unstable-core-do-not-import/stream/sse.ts"
392
392
  ],
393
- "percent": 1.18,
393
+ "percent": 1.22,
394
394
  "reduction": 0
395
395
  },
396
396
  {
@@ -432,6 +432,7 @@
432
432
  ],
433
433
  "removedExports": [],
434
434
  "dependents": [
435
+ "/src/adapters/next-app-dir.ts",
435
436
  "/src/adapters/next-app-dir/nextAppDirCaller.ts"
436
437
  ],
437
438
  "percent": 1.07,
@@ -452,8 +453,8 @@
452
453
  "removedExports": [],
453
454
  "dependents": [
454
455
  "/src/unstable-core-do-not-import.ts",
455
- "/src/unstable-core-do-not-import/http/resolveResponse.ts",
456
- "/src/unstable-core-do-not-import/error/getErrorShape.ts"
456
+ "/src/unstable-core-do-not-import/error/getErrorShape.ts",
457
+ "/src/unstable-core-do-not-import/http/resolveResponse.ts"
457
458
  ],
458
459
  "percent": 1.05,
459
460
  "reduction": 18.54
@@ -860,31 +861,31 @@
860
861
  "reduction": 93.9
861
862
  },
862
863
  {
863
- "id": "/src/http.ts",
864
+ "id": "/src/index.ts",
864
865
  "size": 0,
865
- "origSize": 37,
866
+ "origSize": 32,
866
867
  "renderedExports": [],
867
868
  "removedExports": [],
868
- "dependents": [
869
- "/src/adapters/ws.ts"
870
- ],
869
+ "dependents": [],
871
870
  "percent": 0,
872
871
  "reduction": 100
873
872
  },
874
873
  {
875
- "id": "/src/index.ts",
874
+ "id": "/src/http.ts",
876
875
  "size": 0,
877
- "origSize": 32,
876
+ "origSize": 37,
878
877
  "renderedExports": [],
879
878
  "removedExports": [],
880
- "dependents": [],
879
+ "dependents": [
880
+ "/src/adapters/ws.ts"
881
+ ],
881
882
  "percent": 0,
882
883
  "reduction": 100
883
884
  },
884
885
  {
885
- "id": "/src/rpc.ts",
886
+ "id": "/src/shared.ts",
886
887
  "size": 0,
887
- "origSize": 36,
888
+ "origSize": 653,
888
889
  "renderedExports": [],
889
890
  "removedExports": [],
890
891
  "dependents": [],
@@ -892,9 +893,9 @@
892
893
  "reduction": 100
893
894
  },
894
895
  {
895
- "id": "/src/shared.ts",
896
+ "id": "/src/rpc.ts",
896
897
  "size": 0,
897
- "origSize": 653,
898
+ "origSize": 36,
898
899
  "renderedExports": [],
899
900
  "removedExports": [],
900
901
  "dependents": [],
@@ -908,8 +909,8 @@
908
909
  "renderedExports": [],
909
910
  "removedExports": [],
910
911
  "dependents": [
911
- "/src/adapters/next.ts",
912
912
  "/src/adapters/express.ts",
913
+ "/src/adapters/next.ts",
913
914
  "/src/adapters/standalone.ts",
914
915
  "/src/adapters/ws.ts",
915
916
  "/src/adapters/node-http/nodeHTTPRequestHandler.ts",
@@ -922,7 +923,7 @@
922
923
  {
923
924
  "id": "/src/adapters/next-app-dir.ts",
924
925
  "size": 0,
925
- "origSize": 255,
926
+ "origSize": 347,
926
927
  "renderedExports": [],
927
928
  "removedExports": [],
928
929
  "dependents": [],
@@ -941,16 +942,6 @@
941
942
  "percent": 0,
942
943
  "reduction": 100
943
944
  },
944
- {
945
- "id": "/src/adapters/fetch/index.ts",
946
- "size": 0,
947
- "origSize": 64,
948
- "renderedExports": [],
949
- "removedExports": [],
950
- "dependents": [],
951
- "percent": 0,
952
- "reduction": 100
953
- },
954
945
  {
955
946
  "id": "/src/adapters/fastify/index.ts",
956
947
  "size": 0,
@@ -968,14 +959,24 @@
968
959
  "renderedExports": [],
969
960
  "removedExports": [],
970
961
  "dependents": [
971
- "/src/adapters/next.ts",
972
962
  "/src/adapters/express.ts",
963
+ "/src/adapters/next.ts",
973
964
  "/src/adapters/standalone.ts",
974
965
  "/src/adapters/ws.ts",
975
966
  "/src/adapters/fastify/fastifyRequestHandler.ts"
976
967
  ],
977
968
  "percent": 0,
978
969
  "reduction": 100
970
+ },
971
+ {
972
+ "id": "/src/adapters/fetch/index.ts",
973
+ "size": 0,
974
+ "origSize": 64,
975
+ "renderedExports": [],
976
+ "removedExports": [],
977
+ "dependents": [],
978
+ "percent": 0,
979
+ "reduction": 100
979
980
  }
980
981
  ],
981
982
  "moduleCount": 63
@@ -1 +1 @@
1
- {"version":3,"file":"TRPCError.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/error/TRPCError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAMxD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS,CAyBrE;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,CAoBjE;AAED,qBAAa,SAAU,SAAQ,KAAK;IAGlC,SAAyB,KAAK,CAAC,EAAE,KAAK,CAAC;IACvC,SAAgB,IAAI,4XAAC;gBAET,IAAI,EAAE;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,mBAAmB,CAAC;QAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;CAgBF"}
1
+ {"version":3,"file":"TRPCError.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/error/TRPCError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAMxD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS,CA0BrE;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,CAoBjE;AAED,qBAAa,SAAU,SAAQ,KAAK;IAGlC,SAAyB,KAAK,CAAC,EAAE,KAAK,CAAC;IACvC,SAAgB,IAAI,4XAAC;gBAET,IAAI,EAAE;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,mBAAmB,CAAC;QAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB;CAgBF"}
@@ -27,6 +27,7 @@ function getCauseFromUnknown(cause) {
27
27
  }
28
28
  // Primitive types just get wrapped in an error
29
29
  if (type !== 'object') {
30
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
30
31
  return new Error(String(cause));
31
32
  }
32
33
  // If it's an object, we'll create a synthetic error
@@ -25,6 +25,7 @@ function getCauseFromUnknown(cause) {
25
25
  }
26
26
  // Primitive types just get wrapped in an error
27
27
  if (type !== 'object') {
28
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
28
29
  return new Error(String(cause));
29
30
  }
30
31
  // If it's an object, we'll create a synthetic error
@@ -2,7 +2,7 @@ import { defaultFormatter } from './error/formatter.mjs';
2
2
  import { createMiddlewareFactory } from './middleware.mjs';
3
3
  import { createBuilder } from './procedureBuilder.mjs';
4
4
  import { isServerDefault } from './rootConfig.mjs';
5
- import { createRouterFactory, mergeRouters, createCallerFactory } from './router.mjs';
5
+ import { createCallerFactory, mergeRouters, createRouterFactory } from './router.mjs';
6
6
  import { getDataTransformer, defaultTransformer } from './transformer.mjs';
7
7
 
8
8
  class TRPCBuilder {
@@ -1,5 +1,5 @@
1
1
  import { TRPCError, getTRPCErrorFromUnknown } from './error/TRPCError.mjs';
2
- import { createInputMiddleware, createOutputMiddleware, middlewareMarker } from './middleware.mjs';
2
+ import { createOutputMiddleware, createInputMiddleware, middlewareMarker } from './middleware.mjs';
3
3
  import { getParseFn } from './parser.mjs';
4
4
  import { mergeWithoutOverrides } from './utils.mjs';
5
5
 
@@ -2,7 +2,7 @@ import { createRecursiveProxy } from './createProxy.mjs';
2
2
  import { defaultFormatter } from './error/formatter.mjs';
3
3
  import { TRPCError, getTRPCErrorFromUnknown } from './error/TRPCError.mjs';
4
4
  import { defaultTransformer } from './transformer.mjs';
5
- import { mergeWithoutOverrides, isObject, omitPrototype, isFunction } from './utils.mjs';
5
+ import { mergeWithoutOverrides, omitPrototype, isObject, isFunction } from './utils.mjs';
6
6
 
7
7
  const lazySymbol = Symbol('lazy');
8
8
  function once(fn) {
@@ -1,7 +1,7 @@
1
1
  import { Unpromise } from '../../vendor/unpromise/unpromise.mjs';
2
2
  import { getTRPCErrorFromUnknown } from '../error/TRPCError.mjs';
3
3
  import { isAbortError } from '../http/abortError.mjs';
4
- import { run, identity } from '../utils.mjs';
4
+ import { identity, run } from '../utils.mjs';
5
5
  import { isTrackedEnvelope } from './tracked.mjs';
6
6
  import { takeWithGrace, withMaxDuration } from './utils/asyncIterable.mjs';
7
7
  import { makeAsyncResource } from './utils/disposable.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trpc/server",
3
- "version": "11.0.0-rc.802+1eccc1171",
3
+ "version": "11.0.0-rc.804+ab12d16b0",
4
4
  "description": "The tRPC server library",
5
5
  "author": "KATT",
6
6
  "license": "MIT",
@@ -122,12 +122,12 @@
122
122
  "@types/aws-lambda": "^8.10.137",
123
123
  "@types/express": "^5.0.0",
124
124
  "@types/hash-sum": "^1.0.0",
125
- "@types/node": "^22.9.0",
125
+ "@types/node": "^22.13.5",
126
126
  "@types/react": "^19.0.0",
127
127
  "@types/react-dom": "^19.0.0",
128
128
  "@types/ws": "^8.2.0",
129
129
  "devalue": "^5.0.0",
130
- "eslint": "^9.13.0",
130
+ "eslint": "^9.21.0",
131
131
  "express": "^5.0.0",
132
132
  "fastify": "^4.16.0",
133
133
  "fastify-plugin": "^5.0.0",
@@ -136,15 +136,15 @@
136
136
  "next": "^15.1.3",
137
137
  "react": "^19.0.0",
138
138
  "react-dom": "^19.0.0",
139
- "rollup": "^4.24.4",
139
+ "rollup": "^4.34.8",
140
140
  "superjson": "^1.12.4",
141
141
  "superstruct": "^2.0.0",
142
- "tsx": "^4.0.0",
142
+ "tsx": "^4.19.3",
143
143
  "typescript": "^5.7.2",
144
144
  "valibot": "1.0.0-rc.1",
145
145
  "ws": "^8.0.0",
146
146
  "yup": "^1.0.0",
147
- "zod": "^3.0.0"
147
+ "zod": "^3.24.2"
148
148
  },
149
149
  "funding": [
150
150
  "https://trpc.io/sponsor"
@@ -152,5 +152,5 @@
152
152
  "peerDependencies": {
153
153
  "typescript": ">=5.7.2"
154
154
  },
155
- "gitHead": "1eccc1171fba8b1bdb4d8acd83ab37d1e0a98b22"
155
+ "gitHead": "ab12d16b010a304c980482545c910d0477125e8b"
156
156
  }
@@ -1,3 +1,7 @@
1
1
  export { nextAppDirCaller as experimental_nextAppDirCaller } from './next-app-dir/nextAppDirCaller';
2
2
  export { redirect as experimental_redirect } from './next-app-dir/redirect';
3
3
  export { notFound as experimental_notFound } from './next-app-dir/notFound';
4
+ export {
5
+ /** @internal */
6
+ rethrowNextErrors,
7
+ } from './next-app-dir/rethrowNextErrors';
@@ -16,6 +16,7 @@ export function getCauseFromUnknown(cause: unknown): Error | undefined {
16
16
 
17
17
  // Primitive types just get wrapped in an error
18
18
  if (type !== 'object') {
19
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
19
20
  return new Error(String(cause));
20
21
  }
21
22