@trpc/server 11.0.0-rc.802 → 11.0.0-rc.806
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/adapters/next-app-dir.d.ts +3 -0
- package/dist/adapters/next-app-dir.d.ts.map +1 -1
- package/dist/adapters/next-app-dir.js +2 -0
- package/dist/adapters/next-app-dir.mjs +1 -0
- package/dist/bundle-analysis.json +21 -20
- package/dist/unstable-core-do-not-import/error/TRPCError.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/error/TRPCError.js +1 -0
- package/dist/unstable-core-do-not-import/error/TRPCError.mjs +1 -0
- package/dist/unstable-core-do-not-import/initTRPC.mjs +1 -1
- package/dist/unstable-core-do-not-import/procedureBuilder.mjs +1 -1
- package/dist/unstable-core-do-not-import/router.mjs +1 -1
- package/dist/unstable-core-do-not-import/stream/sse.mjs +1 -1
- package/package.json +7 -7
- package/src/adapters/next-app-dir.ts +4 -0
- package/src/unstable-core-do-not-import/error/TRPCError.ts +1 -0
- /package/dist/node_modules/.pnpm/{@rollup_plugin-typescript@12.1.1_rollup@4.27.4_tslib@2.8.1_typescript@5.7.2 → @rollup_plugin-typescript@12.1.2_rollup@4.34.8_tslib@2.8.1_typescript@5.7.2}/node_modules/tslib/tslib.es6.js +0 -0
|
@@ -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":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 13.
|
|
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.
|
|
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.
|
|
33
|
+
"percent": 10.12,
|
|
34
34
|
"reduction": 0
|
|
35
35
|
},
|
|
36
36
|
{
|
|
@@ -356,11 +356,11 @@
|
|
|
356
356
|
"/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts",
|
|
357
357
|
"/src/unstable-core-do-not-import/http/parseConnectionParams.ts",
|
|
358
358
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts",
|
|
359
|
+
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts",
|
|
359
360
|
"/src/unstable-core-do-not-import/error/TRPCError.ts",
|
|
360
361
|
"/src/unstable-core-do-not-import/router.ts",
|
|
361
362
|
"/src/unstable-core-do-not-import/transformer.ts",
|
|
362
363
|
"/src/unstable-core-do-not-import/middleware.ts",
|
|
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",
|
|
366
366
|
"/src/unstable-core-do-not-import/procedureBuilder.ts",
|
|
@@ -372,8 +372,8 @@
|
|
|
372
372
|
},
|
|
373
373
|
{
|
|
374
374
|
"id": "/src/unstable-core-do-not-import/error/TRPCError.ts",
|
|
375
|
-
"size":
|
|
376
|
-
"origSize":
|
|
375
|
+
"size": 2429,
|
|
376
|
+
"origSize": 2221,
|
|
377
377
|
"renderedExports": [
|
|
378
378
|
"getCauseFromUnknown",
|
|
379
379
|
"getTRPCErrorFromUnknown",
|
|
@@ -390,7 +390,7 @@
|
|
|
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.
|
|
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,
|
|
@@ -872,9 +873,9 @@
|
|
|
872
873
|
"reduction": 100
|
|
873
874
|
},
|
|
874
875
|
{
|
|
875
|
-
"id": "/src/
|
|
876
|
+
"id": "/src/rpc.ts",
|
|
876
877
|
"size": 0,
|
|
877
|
-
"origSize":
|
|
878
|
+
"origSize": 36,
|
|
878
879
|
"renderedExports": [],
|
|
879
880
|
"removedExports": [],
|
|
880
881
|
"dependents": [],
|
|
@@ -882,9 +883,9 @@
|
|
|
882
883
|
"reduction": 100
|
|
883
884
|
},
|
|
884
885
|
{
|
|
885
|
-
"id": "/src/
|
|
886
|
+
"id": "/src/index.ts",
|
|
886
887
|
"size": 0,
|
|
887
|
-
"origSize":
|
|
888
|
+
"origSize": 32,
|
|
888
889
|
"renderedExports": [],
|
|
889
890
|
"removedExports": [],
|
|
890
891
|
"dependents": [],
|
|
@@ -908,9 +909,9 @@
|
|
|
908
909
|
"renderedExports": [],
|
|
909
910
|
"removedExports": [],
|
|
910
911
|
"dependents": [
|
|
911
|
-
"/src/adapters/next.ts",
|
|
912
912
|
"/src/adapters/express.ts",
|
|
913
913
|
"/src/adapters/standalone.ts",
|
|
914
|
+
"/src/adapters/next.ts",
|
|
914
915
|
"/src/adapters/ws.ts",
|
|
915
916
|
"/src/adapters/node-http/nodeHTTPRequestHandler.ts",
|
|
916
917
|
"/src/adapters/next-app-dir/nextAppDirCaller.ts",
|
|
@@ -922,7 +923,7 @@
|
|
|
922
923
|
{
|
|
923
924
|
"id": "/src/adapters/next-app-dir.ts",
|
|
924
925
|
"size": 0,
|
|
925
|
-
"origSize":
|
|
926
|
+
"origSize": 347,
|
|
926
927
|
"renderedExports": [],
|
|
927
928
|
"removedExports": [],
|
|
928
929
|
"dependents": [],
|
|
@@ -942,9 +943,9 @@
|
|
|
942
943
|
"reduction": 100
|
|
943
944
|
},
|
|
944
945
|
{
|
|
945
|
-
"id": "/src/adapters/
|
|
946
|
+
"id": "/src/adapters/fastify/index.ts",
|
|
946
947
|
"size": 0,
|
|
947
|
-
"origSize":
|
|
948
|
+
"origSize": 78,
|
|
948
949
|
"renderedExports": [],
|
|
949
950
|
"removedExports": [],
|
|
950
951
|
"dependents": [],
|
|
@@ -952,9 +953,9 @@
|
|
|
952
953
|
"reduction": 100
|
|
953
954
|
},
|
|
954
955
|
{
|
|
955
|
-
"id": "/src/adapters/
|
|
956
|
+
"id": "/src/adapters/fetch/index.ts",
|
|
956
957
|
"size": 0,
|
|
957
|
-
"origSize":
|
|
958
|
+
"origSize": 64,
|
|
958
959
|
"renderedExports": [],
|
|
959
960
|
"removedExports": [],
|
|
960
961
|
"dependents": [],
|
|
@@ -968,9 +969,9 @@
|
|
|
968
969
|
"renderedExports": [],
|
|
969
970
|
"removedExports": [],
|
|
970
971
|
"dependents": [
|
|
971
|
-
"/src/adapters/next.ts",
|
|
972
972
|
"/src/adapters/express.ts",
|
|
973
973
|
"/src/adapters/standalone.ts",
|
|
974
|
+
"/src/adapters/next.ts",
|
|
974
975
|
"/src/adapters/ws.ts",
|
|
975
976
|
"/src/adapters/fastify/fastifyRequestHandler.ts"
|
|
976
977
|
],
|
|
@@ -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,
|
|
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 {
|
|
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 {
|
|
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,
|
|
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 {
|
|
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.
|
|
3
|
+
"version": "11.0.0-rc.806+c16467cd1",
|
|
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.
|
|
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.
|
|
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.
|
|
139
|
+
"rollup": "^4.34.8",
|
|
140
140
|
"superjson": "^1.12.4",
|
|
141
141
|
"superstruct": "^2.0.0",
|
|
142
|
-
"tsx": "^4.
|
|
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.
|
|
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": "
|
|
155
|
+
"gitHead": "c16467cd1b5156dfa8a3ad4acace14f3306c66be"
|
|
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
|
|