@trpc/server 11.2.1-canary.0 → 11.2.1-canary.3
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 +1 -1
- package/dist/@trpc/server/index.d.ts.map +1 -1
- package/dist/adapters/aws-lambda/index.js +1 -0
- package/dist/adapters/aws-lambda/index.mjs +1 -0
- package/dist/adapters/express.js +1 -0
- package/dist/adapters/express.mjs +1 -0
- package/dist/adapters/fastify/fastifyRequestHandler.js +1 -0
- package/dist/adapters/fastify/fastifyRequestHandler.mjs +1 -0
- package/dist/adapters/fetch/fetchRequestHandler.js +1 -0
- package/dist/adapters/fetch/fetchRequestHandler.mjs +1 -0
- package/dist/adapters/next-app-dir/nextAppDirCaller.js +1 -0
- package/dist/adapters/next-app-dir/nextAppDirCaller.mjs +1 -0
- package/dist/adapters/next-app-dir/notFound.js +1 -0
- package/dist/adapters/next-app-dir/notFound.mjs +1 -0
- package/dist/adapters/next-app-dir/redirect.js +1 -0
- package/dist/adapters/next-app-dir/redirect.mjs +1 -0
- package/dist/adapters/next.js +1 -0
- package/dist/adapters/next.mjs +1 -0
- package/dist/adapters/node-http/incomingMessageToRequest.js +1 -0
- package/dist/adapters/node-http/incomingMessageToRequest.mjs +1 -0
- package/dist/adapters/node-http/nodeHTTPRequestHandler.js +1 -0
- package/dist/adapters/node-http/nodeHTTPRequestHandler.mjs +1 -0
- package/dist/adapters/node-http/writeResponse.js +1 -0
- package/dist/adapters/node-http/writeResponse.mjs +1 -0
- package/dist/adapters/standalone.js +1 -0
- package/dist/adapters/standalone.mjs +1 -0
- package/dist/adapters/ws.js +1 -0
- package/dist/adapters/ws.mjs +1 -0
- package/dist/bundle-analysis.json +30 -29
- package/dist/http.js +1 -0
- package/dist/http.mjs +1 -0
- package/dist/index.js +2 -0
- package/dist/index.mjs +2 -1
- package/dist/shared.js +1 -0
- package/dist/shared.mjs +1 -0
- package/dist/unstable-core-do-not-import/rpc/codes.d.ts +5 -0
- package/dist/unstable-core-do-not-import/rpc/codes.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import/rpc/codes.js +10 -0
- package/dist/unstable-core-do-not-import/rpc/codes.mjs +10 -1
- package/dist/unstable-core-do-not-import/rpc/index.d.ts +1 -1
- package/dist/unstable-core-do-not-import/rpc/index.d.ts.map +1 -1
- package/dist/unstable-core-do-not-import.js +1 -0
- package/dist/unstable-core-do-not-import.mjs +1 -1
- package/package.json +2 -2
- package/src/@trpc/server/index.ts +1 -0
- package/src/unstable-core-do-not-import/rpc/codes.ts +11 -0
- package/src/unstable-core-do-not-import/rpc/index.ts +5 -1
|
@@ -56,7 +56,7 @@ export {
|
|
|
56
56
|
/**
|
|
57
57
|
* @deprecated use `getTRPCErrorShape` instead
|
|
58
58
|
*/
|
|
59
|
-
getErrorShape, } from '../../unstable-core-do-not-import';
|
|
59
|
+
getErrorShape, getErrorShape as getTRPCErrorShape, } from '../../unstable-core-do-not-import';
|
|
60
60
|
/**
|
|
61
61
|
* @deprecated
|
|
62
62
|
* Use `Awaited<ReturnType<typeof myFunction>>` 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;AACJ;;GAEG;AACH,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,
|
|
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;AACJ;;GAEG;AACH,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,EACb,aAAa,IAAI,iBAAiB,GACnC,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,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
require('../../unstable-core-do-not-import/rpc/codes.js');
|
|
3
4
|
var resolveResponse = require('../../unstable-core-do-not-import/http/resolveResponse.js');
|
|
4
5
|
require('../../unstable-core-do-not-import/rootConfig.js');
|
|
5
6
|
require('../../vendor/unpromise/unpromise.js');
|
package/dist/adapters/express.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
require('../../unstable-core-do-not-import/rpc/codes.js');
|
|
3
4
|
var resolveResponse = require('../../unstable-core-do-not-import/http/resolveResponse.js');
|
|
4
5
|
require('../../unstable-core-do-not-import/rootConfig.js');
|
|
5
6
|
require('../../vendor/unpromise/unpromise.js');
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
require('../../unstable-core-do-not-import/rpc/codes.js');
|
|
3
4
|
var resolveResponse = require('../../unstable-core-do-not-import/http/resolveResponse.js');
|
|
4
5
|
require('../../unstable-core-do-not-import/rootConfig.js');
|
|
5
6
|
require('../../vendor/unpromise/unpromise.js');
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
require('../../unstable-core-do-not-import/rpc/codes.js');
|
|
3
4
|
var TRPCError = require('../../unstable-core-do-not-import/error/TRPCError.js');
|
|
4
5
|
var formDataToObject = require('../../unstable-core-do-not-import/http/formDataToObject.js');
|
|
5
6
|
require('../../vendor/unpromise/unpromise.js');
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '../../unstable-core-do-not-import/rpc/codes.mjs';
|
|
1
2
|
import { TRPCError, getTRPCErrorFromUnknown } from '../../unstable-core-do-not-import/error/TRPCError.mjs';
|
|
2
3
|
import { formDataToObject } from '../../unstable-core-do-not-import/http/formDataToObject.mjs';
|
|
3
4
|
import '../../vendor/unpromise/unpromise.mjs';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
require('../../unstable-core-do-not-import/rpc/codes.js');
|
|
3
4
|
var TRPCError = require('../../unstable-core-do-not-import/error/TRPCError.js');
|
|
4
5
|
require('../../vendor/unpromise/unpromise.js');
|
|
5
6
|
require('../../unstable-core-do-not-import/stream/utils/disposable.js');
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
require('../../unstable-core-do-not-import/rpc/codes.js');
|
|
3
4
|
var TRPCError = require('../../unstable-core-do-not-import/error/TRPCError.js');
|
|
4
5
|
require('../../vendor/unpromise/unpromise.js');
|
|
5
6
|
require('../../unstable-core-do-not-import/stream/utils/disposable.js');
|
package/dist/adapters/next.js
CHANGED
package/dist/adapters/next.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
require('../../unstable-core-do-not-import/rpc/codes.js');
|
|
3
4
|
var TRPCError = require('../../unstable-core-do-not-import/error/TRPCError.js');
|
|
4
5
|
require('../../vendor/unpromise/unpromise.js');
|
|
5
6
|
require('../../unstable-core-do-not-import/stream/utils/disposable.js');
|
|
@@ -4,6 +4,7 @@ var getErrorShape = require('../../unstable-core-do-not-import/error/getErrorSha
|
|
|
4
4
|
var TRPCError = require('../../unstable-core-do-not-import/error/TRPCError.js');
|
|
5
5
|
var transformer = require('../../unstable-core-do-not-import/transformer.js');
|
|
6
6
|
var utils = require('../../unstable-core-do-not-import/utils.js');
|
|
7
|
+
require('../../unstable-core-do-not-import/rpc/codes.js');
|
|
7
8
|
var resolveResponse = require('../../unstable-core-do-not-import/http/resolveResponse.js');
|
|
8
9
|
require('../../unstable-core-do-not-import/rootConfig.js');
|
|
9
10
|
require('../../vendor/unpromise/unpromise.js');
|
|
@@ -2,6 +2,7 @@ import { getErrorShape } from '../../unstable-core-do-not-import/error/getErrorS
|
|
|
2
2
|
import { getTRPCErrorFromUnknown } from '../../unstable-core-do-not-import/error/TRPCError.mjs';
|
|
3
3
|
import { transformTRPCResponse } from '../../unstable-core-do-not-import/transformer.mjs';
|
|
4
4
|
import { run } from '../../unstable-core-do-not-import/utils.mjs';
|
|
5
|
+
import '../../unstable-core-do-not-import/rpc/codes.mjs';
|
|
5
6
|
import { resolveResponse } from '../../unstable-core-do-not-import/http/resolveResponse.mjs';
|
|
6
7
|
import '../../unstable-core-do-not-import/rootConfig.mjs';
|
|
7
8
|
import '../../vendor/unpromise/unpromise.mjs';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
require('../../unstable-core-do-not-import/rpc/codes.js');
|
|
3
4
|
var abortError = require('../../unstable-core-do-not-import/http/abortError.js');
|
|
4
5
|
require('../../vendor/unpromise/unpromise.js');
|
|
5
6
|
require('../../unstable-core-do-not-import/stream/utils/disposable.js');
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var http = require('node:http');
|
|
4
|
+
require('../unstable-core-do-not-import/rpc/codes.js');
|
|
4
5
|
var utils = require('../unstable-core-do-not-import/utils.js');
|
|
5
6
|
require('../vendor/unpromise/unpromise.js');
|
|
6
7
|
require('../unstable-core-do-not-import/stream/utils/disposable.js');
|
package/dist/adapters/ws.js
CHANGED
|
@@ -5,6 +5,7 @@ var TRPCError = require('../unstable-core-do-not-import/error/TRPCError.js');
|
|
|
5
5
|
var router = require('../unstable-core-do-not-import/router.js');
|
|
6
6
|
var utils = require('../unstable-core-do-not-import/utils.js');
|
|
7
7
|
var parseConnectionParams = require('../unstable-core-do-not-import/http/parseConnectionParams.js');
|
|
8
|
+
require('../unstable-core-do-not-import/rpc/codes.js');
|
|
8
9
|
var parseTRPCMessage = require('../unstable-core-do-not-import/rpc/parseTRPCMessage.js');
|
|
9
10
|
var observable = require('../observable/observable.js');
|
|
10
11
|
var asyncIterable = require('../unstable-core-do-not-import/stream/utils/asyncIterable.js');
|
package/dist/adapters/ws.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import { TRPCError, getTRPCErrorFromUnknown } from '../unstable-core-do-not-impo
|
|
|
3
3
|
import { callProcedure } from '../unstable-core-do-not-import/router.mjs';
|
|
4
4
|
import { run, isObject, isAsyncIterable } from '../unstable-core-do-not-import/utils.mjs';
|
|
5
5
|
import { parseConnectionParamsFromUnknown } from '../unstable-core-do-not-import/http/parseConnectionParams.mjs';
|
|
6
|
+
import '../unstable-core-do-not-import/rpc/codes.mjs';
|
|
6
7
|
import { parseTRPCMessage } from '../unstable-core-do-not-import/rpc/parseTRPCMessage.mjs';
|
|
7
8
|
import { isObservable, observableToAsyncIterable } from '../observable/observable.mjs';
|
|
8
9
|
import { iteratorResource } from '../unstable-core-do-not-import/stream/utils/asyncIterable.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 13.
|
|
2
|
+
"bundleSize": 204591,
|
|
3
|
+
"bundleOrigSize": 237707,
|
|
4
|
+
"bundleReduction": 13.93,
|
|
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.31,
|
|
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.1,
|
|
34
34
|
"reduction": 0
|
|
35
35
|
},
|
|
36
36
|
{
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"/src/unstable-core-do-not-import.ts",
|
|
48
48
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
49
49
|
],
|
|
50
|
-
"percent": 9.
|
|
50
|
+
"percent": 9.75,
|
|
51
51
|
"reduction": 0
|
|
52
52
|
},
|
|
53
53
|
{
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"/src/unstable-core-do-not-import.ts",
|
|
65
65
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
66
66
|
],
|
|
67
|
-
"percent": 6.
|
|
67
|
+
"percent": 6.33,
|
|
68
68
|
"reduction": 0
|
|
69
69
|
},
|
|
70
70
|
{
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
],
|
|
78
78
|
"removedExports": [],
|
|
79
79
|
"dependents": [],
|
|
80
|
-
"percent": 5.
|
|
80
|
+
"percent": 5.94,
|
|
81
81
|
"reduction": 11.62
|
|
82
82
|
},
|
|
83
83
|
{
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"/src/unstable-core-do-not-import/initTRPC.ts",
|
|
99
99
|
"/src/unstable-core-do-not-import/http/contentType.ts"
|
|
100
100
|
],
|
|
101
|
-
"percent": 4.
|
|
101
|
+
"percent": 4.96,
|
|
102
102
|
"reduction": 29.54
|
|
103
103
|
},
|
|
104
104
|
{
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"dependents": [
|
|
113
113
|
"/src/unstable-core-do-not-import/stream/jsonl.ts"
|
|
114
114
|
],
|
|
115
|
-
"percent": 3.
|
|
115
|
+
"percent": 3.97,
|
|
116
116
|
"reduction": 0
|
|
117
117
|
},
|
|
118
118
|
{
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"/src/unstable-core-do-not-import.ts",
|
|
128
128
|
"/src/unstable-core-do-not-import/http/resolveResponse.ts"
|
|
129
129
|
],
|
|
130
|
-
"percent": 3.
|
|
130
|
+
"percent": 3.81,
|
|
131
131
|
"reduction": 1.14
|
|
132
132
|
},
|
|
133
133
|
{
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
"/src/observable/operators.ts",
|
|
197
197
|
"/src/observable/behaviorSubject.ts"
|
|
198
198
|
],
|
|
199
|
-
"percent": 2.
|
|
199
|
+
"percent": 2.36,
|
|
200
200
|
"reduction": 0
|
|
201
201
|
},
|
|
202
202
|
{
|
|
@@ -473,6 +473,20 @@
|
|
|
473
473
|
"percent": 1.04,
|
|
474
474
|
"reduction": 5.4
|
|
475
475
|
},
|
|
476
|
+
{
|
|
477
|
+
"id": "/src/unstable-core-do-not-import/rpc/codes.ts",
|
|
478
|
+
"size": 2037,
|
|
479
|
+
"origSize": 2416,
|
|
480
|
+
"renderedExports": [
|
|
481
|
+
"TRPC_ERROR_CODES_BY_KEY",
|
|
482
|
+
"TRPC_ERROR_CODES_BY_NUMBER",
|
|
483
|
+
"retryableRpcCodes"
|
|
484
|
+
],
|
|
485
|
+
"removedExports": [],
|
|
486
|
+
"dependents": [],
|
|
487
|
+
"percent": 1,
|
|
488
|
+
"reduction": 15.69
|
|
489
|
+
},
|
|
476
490
|
{
|
|
477
491
|
"id": "/src/adapters/node-http/writeResponse.ts",
|
|
478
492
|
"size": 2025,
|
|
@@ -562,19 +576,6 @@
|
|
|
562
576
|
"percent": 0.82,
|
|
563
577
|
"reduction": 48.16
|
|
564
578
|
},
|
|
565
|
-
{
|
|
566
|
-
"id": "/src/unstable-core-do-not-import/rpc/codes.ts",
|
|
567
|
-
"size": 1675,
|
|
568
|
-
"origSize": 2027,
|
|
569
|
-
"renderedExports": [
|
|
570
|
-
"TRPC_ERROR_CODES_BY_KEY",
|
|
571
|
-
"TRPC_ERROR_CODES_BY_NUMBER"
|
|
572
|
-
],
|
|
573
|
-
"removedExports": [],
|
|
574
|
-
"dependents": [],
|
|
575
|
-
"percent": 0.82,
|
|
576
|
-
"reduction": 17.37
|
|
577
|
-
},
|
|
578
579
|
{
|
|
579
580
|
"id": "/src/adapters/next.ts",
|
|
580
581
|
"size": 1326,
|
|
@@ -958,9 +959,9 @@
|
|
|
958
959
|
"reduction": 100
|
|
959
960
|
},
|
|
960
961
|
{
|
|
961
|
-
"id": "/src/adapters/
|
|
962
|
+
"id": "/src/adapters/fetch/index.ts",
|
|
962
963
|
"size": 0,
|
|
963
|
-
"origSize":
|
|
964
|
+
"origSize": 64,
|
|
964
965
|
"renderedExports": [],
|
|
965
966
|
"removedExports": [],
|
|
966
967
|
"dependents": [],
|
|
@@ -968,9 +969,9 @@
|
|
|
968
969
|
"reduction": 100
|
|
969
970
|
},
|
|
970
971
|
{
|
|
971
|
-
"id": "/src/adapters/
|
|
972
|
+
"id": "/src/adapters/fastify/index.ts",
|
|
972
973
|
"size": 0,
|
|
973
|
-
"origSize":
|
|
974
|
+
"origSize": 78,
|
|
974
975
|
"renderedExports": [],
|
|
975
976
|
"removedExports": [],
|
|
976
977
|
"dependents": [],
|
package/dist/http.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var getHTTPStatusCode = require('./unstable-core-do-not-import/http/getHTTPStatusCode.js');
|
|
4
|
+
require('./unstable-core-do-not-import/rpc/codes.js');
|
|
4
5
|
var parseConnectionParams = require('./unstable-core-do-not-import/http/parseConnectionParams.js');
|
|
5
6
|
var contentTypeParsers = require('./unstable-core-do-not-import/http/contentTypeParsers.js');
|
|
6
7
|
var resolveResponse = require('./unstable-core-do-not-import/http/resolveResponse.js');
|
package/dist/http.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { getHTTPStatusCode, getHTTPStatusCodeFromError } from './unstable-core-do-not-import/http/getHTTPStatusCode.mjs';
|
|
2
|
+
import './unstable-core-do-not-import/rpc/codes.mjs';
|
|
2
3
|
export { parseConnectionParamsFromString, parseConnectionParamsFromUnknown } from './unstable-core-do-not-import/http/parseConnectionParams.mjs';
|
|
3
4
|
export { octetInputParser } from './unstable-core-do-not-import/http/contentTypeParsers.mjs';
|
|
4
5
|
export { resolveResponse } from './unstable-core-do-not-import/http/resolveResponse.mjs';
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ var createProxy = require('./unstable-core-do-not-import/createProxy.js');
|
|
|
4
4
|
var getErrorShape = require('./unstable-core-do-not-import/error/getErrorShape.js');
|
|
5
5
|
var TRPCError = require('./unstable-core-do-not-import/error/TRPCError.js');
|
|
6
6
|
var router = require('./unstable-core-do-not-import/router.js');
|
|
7
|
+
require('./unstable-core-do-not-import/rpc/codes.js');
|
|
7
8
|
require('./vendor/unpromise/unpromise.js');
|
|
8
9
|
require('./unstable-core-do-not-import/stream/utils/disposable.js');
|
|
9
10
|
var tracked = require('./unstable-core-do-not-import/stream/tracked.js');
|
|
@@ -18,6 +19,7 @@ require('./unstable-core-do-not-import/rootConfig.js');
|
|
|
18
19
|
exports.createTRPCFlatProxy = createProxy.createFlatProxy;
|
|
19
20
|
exports.createTRPCRecursiveProxy = createProxy.createRecursiveProxy;
|
|
20
21
|
exports.getErrorShape = getErrorShape.getErrorShape;
|
|
22
|
+
exports.getTRPCErrorShape = getErrorShape.getErrorShape;
|
|
21
23
|
exports.TRPCError = TRPCError.TRPCError;
|
|
22
24
|
exports.getTRPCErrorFromUnknown = TRPCError.getTRPCErrorFromUnknown;
|
|
23
25
|
exports.callTRPCProcedure = router.callProcedure;
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { createFlatProxy as createTRPCFlatProxy, createRecursiveProxy as createTRPCRecursiveProxy } from './unstable-core-do-not-import/createProxy.mjs';
|
|
2
|
-
export { getErrorShape } from './unstable-core-do-not-import/error/getErrorShape.mjs';
|
|
2
|
+
export { getErrorShape, getErrorShape as getTRPCErrorShape } from './unstable-core-do-not-import/error/getErrorShape.mjs';
|
|
3
3
|
export { TRPCError, getTRPCErrorFromUnknown } from './unstable-core-do-not-import/error/TRPCError.mjs';
|
|
4
4
|
export { callProcedure as callTRPCProcedure, lazy as experimental_lazy, lazy } from './unstable-core-do-not-import/router.mjs';
|
|
5
|
+
import './unstable-core-do-not-import/rpc/codes.mjs';
|
|
5
6
|
import './vendor/unpromise/unpromise.mjs';
|
|
6
7
|
import './unstable-core-do-not-import/stream/utils/disposable.mjs';
|
|
7
8
|
export { isTrackedEnvelope, sse, tracked } from './unstable-core-do-not-import/stream/tracked.mjs';
|
package/dist/shared.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var createProxy = require('./unstable-core-do-not-import/createProxy.js');
|
|
4
4
|
var getErrorShape = require('./unstable-core-do-not-import/error/getErrorShape.js');
|
|
5
|
+
require('./unstable-core-do-not-import/rpc/codes.js');
|
|
5
6
|
require('./vendor/unpromise/unpromise.js');
|
|
6
7
|
require('./unstable-core-do-not-import/stream/utils/disposable.js');
|
|
7
8
|
require('./unstable-core-do-not-import/rootConfig.js');
|
package/dist/shared.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { createFlatProxy } from './unstable-core-do-not-import/createProxy.mjs';
|
|
2
2
|
export { getErrorShape } from './unstable-core-do-not-import/error/getErrorShape.mjs';
|
|
3
|
+
import './unstable-core-do-not-import/rpc/codes.mjs';
|
|
3
4
|
import './vendor/unpromise/unpromise.mjs';
|
|
4
5
|
import './unstable-core-do-not-import/stream/utils/disposable.mjs';
|
|
5
6
|
import './unstable-core-do-not-import/rootConfig.mjs';
|
|
@@ -37,4 +37,9 @@ export declare const TRPC_ERROR_CODES_BY_KEY: {
|
|
|
37
37
|
export declare const TRPC_ERROR_CODES_BY_NUMBER: InvertKeyValue<typeof TRPC_ERROR_CODES_BY_KEY>;
|
|
38
38
|
export type TRPC_ERROR_CODE_NUMBER = ValueOf<typeof TRPC_ERROR_CODES_BY_KEY>;
|
|
39
39
|
export type TRPC_ERROR_CODE_KEY = keyof typeof TRPC_ERROR_CODES_BY_KEY;
|
|
40
|
+
/**
|
|
41
|
+
* tRPC error codes that are considered retryable
|
|
42
|
+
* With out of the box SSE, the client will reconnect when these errors are encountered
|
|
43
|
+
*/
|
|
44
|
+
export declare const retryableRpcCodes: TRPC_ERROR_CODE_NUMBER[];
|
|
40
45
|
//# sourceMappingURL=codes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/rpc/codes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAIxD;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;IAClC;;;OAGG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;;CAwBK,CAAC;AAGX,eAAO,MAAM,0BAA0B,EAAE,cAAc,CACrD,OAAO,uBAAuB,CAkB/B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC7E,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/rpc/codes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAIxD;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;IAClC;;;OAGG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;;CAwBK,CAAC;AAGX,eAAO,MAAM,0BAA0B,EAAE,cAAc,CACrD,OAAO,uBAAuB,CAkB/B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC7E,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,uBAAuB,CAAC;AAEvE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,sBAAsB,EAKrD,CAAC"}
|
|
@@ -54,6 +54,16 @@ const TRPC_ERROR_CODES_BY_NUMBER = {
|
|
|
54
54
|
[-32029]: 'TOO_MANY_REQUESTS',
|
|
55
55
|
[-32099]: 'CLIENT_CLOSED_REQUEST'
|
|
56
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* tRPC error codes that are considered retryable
|
|
59
|
+
* With out of the box SSE, the client will reconnect when these errors are encountered
|
|
60
|
+
*/ const retryableRpcCodes = [
|
|
61
|
+
TRPC_ERROR_CODES_BY_KEY.BAD_GATEWAY,
|
|
62
|
+
TRPC_ERROR_CODES_BY_KEY.SERVICE_UNAVAILABLE,
|
|
63
|
+
TRPC_ERROR_CODES_BY_KEY.GATEWAY_TIMEOUT,
|
|
64
|
+
TRPC_ERROR_CODES_BY_KEY.INTERNAL_SERVER_ERROR
|
|
65
|
+
];
|
|
57
66
|
|
|
58
67
|
exports.TRPC_ERROR_CODES_BY_KEY = TRPC_ERROR_CODES_BY_KEY;
|
|
59
68
|
exports.TRPC_ERROR_CODES_BY_NUMBER = TRPC_ERROR_CODES_BY_NUMBER;
|
|
69
|
+
exports.retryableRpcCodes = retryableRpcCodes;
|
|
@@ -52,5 +52,14 @@ const TRPC_ERROR_CODES_BY_NUMBER = {
|
|
|
52
52
|
[-32029]: 'TOO_MANY_REQUESTS',
|
|
53
53
|
[-32099]: 'CLIENT_CLOSED_REQUEST'
|
|
54
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* tRPC error codes that are considered retryable
|
|
57
|
+
* With out of the box SSE, the client will reconnect when these errors are encountered
|
|
58
|
+
*/ const retryableRpcCodes = [
|
|
59
|
+
TRPC_ERROR_CODES_BY_KEY.BAD_GATEWAY,
|
|
60
|
+
TRPC_ERROR_CODES_BY_KEY.SERVICE_UNAVAILABLE,
|
|
61
|
+
TRPC_ERROR_CODES_BY_KEY.GATEWAY_TIMEOUT,
|
|
62
|
+
TRPC_ERROR_CODES_BY_KEY.INTERNAL_SERVER_ERROR
|
|
63
|
+
];
|
|
55
64
|
|
|
56
|
-
export { TRPC_ERROR_CODES_BY_KEY, TRPC_ERROR_CODES_BY_NUMBER };
|
|
65
|
+
export { TRPC_ERROR_CODES_BY_KEY, TRPC_ERROR_CODES_BY_NUMBER, retryableRpcCodes };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { TRPC_ERROR_CODES_BY_KEY, TRPC_ERROR_CODES_BY_NUMBER } from './codes';
|
|
1
|
+
export { TRPC_ERROR_CODES_BY_KEY, TRPC_ERROR_CODES_BY_NUMBER, retryableRpcCodes, } from './codes';
|
|
2
2
|
export type { TRPC_ERROR_CODE_KEY, TRPC_ERROR_CODE_NUMBER } from './codes';
|
|
3
3
|
export type { JSONRPC2, TRPCClientIncomingMessage, TRPCClientIncomingRequest, TRPCClientOutgoingMessage, TRPCClientOutgoingRequest, TRPCErrorResponse, TRPCErrorShape, TRPCReconnectNotification, TRPCRequest, TRPCRequestMessage, TRPCResponse, TRPCResponseMessage, TRPCResult, TRPCResultMessage, TRPCSubscriptionStopNotification, TRPCSuccessResponse, TRPCConnectionParamsMessage, } from './envelopes';
|
|
4
4
|
export { parseTRPCMessage } from './parseTRPCMessage';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/rpc/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/unstable-core-do-not-import/rpc/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,iBAAiB,GAClB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAC3E,YAAY,EACV,QAAQ,EACR,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,EACzB,iBAAiB,EACjB,cAAc,EACd,yBAAyB,EACzB,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,UAAU,EACV,iBAAiB,EACjB,gCAAgC,EAChC,mBAAmB,EACnB,2BAA2B,GAC5B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -72,6 +72,7 @@ exports.lazy = router.lazy;
|
|
|
72
72
|
exports.mergeRouters = router.mergeRouters;
|
|
73
73
|
exports.TRPC_ERROR_CODES_BY_KEY = codes.TRPC_ERROR_CODES_BY_KEY;
|
|
74
74
|
exports.TRPC_ERROR_CODES_BY_NUMBER = codes.TRPC_ERROR_CODES_BY_NUMBER;
|
|
75
|
+
exports.retryableRpcCodes = codes.retryableRpcCodes;
|
|
75
76
|
exports.parseTRPCMessage = parseTRPCMessage.parseTRPCMessage;
|
|
76
77
|
exports.isPromise = jsonl.isPromise;
|
|
77
78
|
exports.jsonlStreamConsumer = jsonl.jsonlStreamConsumer;
|
|
@@ -16,7 +16,7 @@ export { procedureTypes } from './unstable-core-do-not-import/procedure.mjs';
|
|
|
16
16
|
export { createBuilder } from './unstable-core-do-not-import/procedureBuilder.mjs';
|
|
17
17
|
export { isServerDefault } from './unstable-core-do-not-import/rootConfig.mjs';
|
|
18
18
|
export { callProcedure, createCallerFactory, createRouterFactory, getProcedureAtPath, lazy, mergeRouters } from './unstable-core-do-not-import/router.mjs';
|
|
19
|
-
export { TRPC_ERROR_CODES_BY_KEY, TRPC_ERROR_CODES_BY_NUMBER } from './unstable-core-do-not-import/rpc/codes.mjs';
|
|
19
|
+
export { TRPC_ERROR_CODES_BY_KEY, TRPC_ERROR_CODES_BY_NUMBER, retryableRpcCodes } from './unstable-core-do-not-import/rpc/codes.mjs';
|
|
20
20
|
export { parseTRPCMessage } from './unstable-core-do-not-import/rpc/parseTRPCMessage.mjs';
|
|
21
21
|
export { isPromise, jsonlStreamConsumer, jsonlStreamProducer } from './unstable-core-do-not-import/stream/jsonl.mjs';
|
|
22
22
|
export { sseHeaders, sseStreamConsumer, sseStreamProducer } from './unstable-core-do-not-import/stream/sse.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/server",
|
|
3
|
-
"version": "11.2.1-canary.
|
|
3
|
+
"version": "11.2.1-canary.3+46afe6590",
|
|
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": "46afe65907644bafaf7e60910db41a58dfa350fb"
|
|
156
156
|
}
|
|
@@ -66,3 +66,14 @@ export const TRPC_ERROR_CODES_BY_NUMBER: InvertKeyValue<
|
|
|
66
66
|
|
|
67
67
|
export type TRPC_ERROR_CODE_NUMBER = ValueOf<typeof TRPC_ERROR_CODES_BY_KEY>;
|
|
68
68
|
export type TRPC_ERROR_CODE_KEY = keyof typeof TRPC_ERROR_CODES_BY_KEY;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* tRPC error codes that are considered retryable
|
|
72
|
+
* With out of the box SSE, the client will reconnect when these errors are encountered
|
|
73
|
+
*/
|
|
74
|
+
export const retryableRpcCodes: TRPC_ERROR_CODE_NUMBER[] = [
|
|
75
|
+
TRPC_ERROR_CODES_BY_KEY.BAD_GATEWAY,
|
|
76
|
+
TRPC_ERROR_CODES_BY_KEY.SERVICE_UNAVAILABLE,
|
|
77
|
+
TRPC_ERROR_CODES_BY_KEY.GATEWAY_TIMEOUT,
|
|
78
|
+
TRPC_ERROR_CODES_BY_KEY.INTERNAL_SERVER_ERROR,
|
|
79
|
+
];
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {
|
|
2
|
+
TRPC_ERROR_CODES_BY_KEY,
|
|
3
|
+
TRPC_ERROR_CODES_BY_NUMBER,
|
|
4
|
+
retryableRpcCodes,
|
|
5
|
+
} from './codes';
|
|
2
6
|
export type { TRPC_ERROR_CODE_KEY, TRPC_ERROR_CODE_NUMBER } from './codes';
|
|
3
7
|
export type {
|
|
4
8
|
JSONRPC2,
|