@trpc/server 10.28.0 → 10.28.1
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/{TRPCError-61026c9a.js → TRPCError-7c3909ea.js} +47 -47
- package/dist/adapters/aws-lambda/index.d.ts +9 -9
- package/dist/adapters/aws-lambda/index.d.ts.map +1 -1
- package/dist/adapters/aws-lambda/utils.d.ts +37 -37
- package/dist/adapters/aws-lambda/utils.d.ts.map +1 -1
- package/dist/adapters/express.d.ts +5 -5
- package/dist/adapters/express.d.ts.map +1 -1
- package/dist/adapters/fastify/fastifyRequestHandler.d.ts +12 -12
- package/dist/adapters/fastify/fastifyRequestHandler.d.ts.map +1 -1
- package/dist/adapters/fastify/fastifyTRPCPlugin.d.ts +11 -11
- package/dist/adapters/fastify/fastifyTRPCPlugin.d.ts.map +1 -1
- package/dist/adapters/fastify/index.d.ts +2 -2
- package/dist/adapters/fetch/fetchRequestHandler.d.ts +7 -7
- package/dist/adapters/fetch/fetchRequestHandler.d.ts.map +1 -1
- package/dist/adapters/fetch/index.d.ts +2 -2
- package/dist/adapters/fetch/types.d.ts +19 -19
- package/dist/adapters/fetch/types.d.ts.map +1 -1
- package/dist/adapters/lambda/index.d.ts +11 -11
- package/dist/adapters/lambda/index.d.ts.map +1 -1
- package/dist/adapters/next.d.ts +5 -5
- package/dist/adapters/next.d.ts.map +1 -1
- package/dist/adapters/node-http/content-type/form-data/fileUploadHandler.d.ts +69 -69
- package/dist/adapters/node-http/content-type/form-data/fileUploadHandler.d.ts.map +1 -1
- package/dist/adapters/node-http/content-type/form-data/index.d.ts +23 -23
- package/dist/adapters/node-http/content-type/form-data/index.js +1 -3
- package/dist/adapters/node-http/content-type/form-data/index.mjs +1 -3
- package/dist/adapters/node-http/content-type/form-data/memoryUploadHandler.d.ts +30 -30
- package/dist/adapters/node-http/content-type/form-data/memoryUploadHandler.d.ts.map +1 -1
- package/dist/adapters/node-http/content-type/form-data/streamSlice.d.ts +10 -10
- package/dist/adapters/node-http/content-type/form-data/uploadHandler.d.ts +40 -39
- package/dist/adapters/node-http/content-type/form-data/uploadHandler.d.ts.map +1 -1
- package/dist/adapters/node-http/content-type/json/getPostBody.d.ts +6 -6
- package/dist/adapters/node-http/content-type/json/index.d.ts +1 -1
- package/dist/adapters/node-http/index.d.ts +2 -2
- package/dist/adapters/node-http/internals/contentType.d.ts +8 -8
- package/dist/adapters/node-http/nodeHTTPRequestHandler.d.ts +3 -3
- package/dist/adapters/node-http/types.d.ts +63 -63
- package/dist/adapters/node-http/types.d.ts.map +1 -1
- package/dist/adapters/standalone.d.ts +13 -13
- package/dist/adapters/standalone.d.ts.map +1 -1
- package/dist/adapters/ws.d.ts +21 -21
- package/dist/adapters/ws.d.ts.map +1 -1
- package/dist/{codes-b3c262d8.js → codes-1c9ad84e.js} +44 -44
- package/dist/{config-1a5a494d.js → config-54786004.js} +168 -168
- package/dist/{contentType-f27e4bfc.js → contentType-24c44bba.js} +2 -2
- package/dist/{contentType-a75c990c.js → contentType-7354963c.js} +54 -54
- package/dist/core/index.d.ts +8 -8
- package/dist/core/initTRPC.d.ts +104 -104
- package/dist/core/initTRPC.d.ts.map +1 -1
- package/dist/core/internals/config.d.ts +74 -74
- package/dist/core/internals/config.d.ts.map +1 -1
- package/dist/core/internals/getParseFn.d.ts +8 -8
- package/dist/core/internals/getParseFn.d.ts.map +1 -1
- package/dist/core/internals/mergeRouters.d.ts +17 -17
- package/dist/core/internals/mergeRouters.d.ts.map +1 -1
- package/dist/core/internals/mergeWithoutOverrides.d.ts +4 -4
- package/dist/core/internals/omitPrototype.d.ts +5 -5
- package/dist/core/internals/procedureBuilder.d.ts +115 -115
- package/dist/core/internals/procedureBuilder.d.ts.map +1 -1
- package/dist/core/internals/utils.d.ts +51 -51
- package/dist/core/internals/utils.d.ts.map +1 -1
- package/dist/core/middleware.d.ts +127 -127
- package/dist/core/middleware.d.ts.map +1 -1
- package/dist/core/parser.d.ts +27 -27
- package/dist/core/parser.d.ts.map +1 -1
- package/dist/core/procedure.d.ts +72 -72
- package/dist/core/procedure.d.ts.map +1 -1
- package/dist/core/router.d.ts +111 -111
- package/dist/core/router.d.ts.map +1 -1
- package/dist/core/types.d.ts +28 -28
- package/dist/core/types.d.ts.map +1 -1
- package/dist/deprecated/internals/middlewares.d.ts +51 -51
- package/dist/deprecated/internals/middlewares.d.ts.map +1 -1
- package/dist/deprecated/internals/procedure.d.ts +95 -95
- package/dist/deprecated/internals/procedure.d.ts.map +1 -1
- package/dist/deprecated/interop.d.ts +43 -43
- package/dist/deprecated/interop.d.ts.map +1 -1
- package/dist/deprecated/router.d.ts +203 -203
- package/dist/deprecated/router.d.ts.map +1 -1
- package/dist/error/TRPCError.d.ts +11 -11
- package/dist/error/formatter.d.ts +32 -32
- package/dist/error/formatter.d.ts.map +1 -1
- package/dist/error/utils.d.ts +5 -5
- package/dist/http/contentType.d.ts +28 -28
- package/dist/http/contentType.d.ts.map +1 -1
- package/dist/http/getHTTPStatusCode.d.ts +23 -23
- package/dist/http/getHTTPStatusCode.d.ts.map +1 -1
- package/dist/http/index.d.ts +3 -3
- package/dist/http/internals/types.d.ts +24 -24
- package/dist/http/internals/types.d.ts.map +1 -1
- package/dist/http/resolveHTTPResponse.d.ts +16 -16
- package/dist/http/types.d.ts +24 -24
- package/dist/{index-6d5795e9.js → index-ca9a128e.js} +88 -88
- package/dist/index.d.ts +6 -6
- package/dist/internals/invert.d.ts +11 -11
- package/dist/internals/invert.d.ts.map +1 -1
- package/dist/internals/types.d.ts +25 -25
- package/dist/internals/types.d.ts.map +1 -1
- package/dist/internals.d.ts +9 -9
- package/dist/{nodeHTTPRequestHandler-e424955c.js → nodeHTTPRequestHandler-bd47641d.js} +62 -62
- package/dist/observable/index.d.ts +4 -4
- package/dist/observable/internals/identity.d.ts +1 -1
- package/dist/observable/internals/observableToPromise.d.ts +9 -9
- package/dist/observable/internals/pipe.d.ts +3 -3
- package/dist/observable/observable.d.ts +4 -4
- package/dist/observable/observable.d.ts.map +1 -1
- package/dist/observable/operators/index.d.ts +3 -3
- package/dist/observable/operators/map.d.ts +2 -2
- package/dist/observable/operators/share.d.ts +5 -5
- package/dist/observable/operators/tap.d.ts +2 -2
- package/dist/observable/types.d.ts +28 -28
- package/dist/observable/types.d.ts.map +1 -1
- package/dist/{observable-a1c2103f.js → observable-15588f28.js} +76 -76
- package/dist/{resolveHTTPResponse-4e05c4f8.js → resolveHTTPResponse-ba557d3e.js} +162 -162
- package/dist/rpc/codes.d.ts +52 -52
- package/dist/rpc/codes.d.ts.map +1 -1
- package/dist/rpc/envelopes.d.ts +98 -98
- package/dist/rpc/envelopes.d.ts.map +1 -1
- package/dist/rpc/index.d.ts +2 -2
- package/dist/shared/createProxy/index.d.ts +18 -18
- package/dist/shared/createProxy/index.d.ts.map +1 -1
- package/dist/shared/getErrorShape.d.ts +14 -14
- package/dist/shared/index.d.ts +5 -5
- package/dist/shared/internal/serialize.d.ts +29 -29
- package/dist/shared/internal/serialize.d.ts.map +1 -1
- package/dist/shared/jsonify.d.ts +9 -9
- package/dist/shared/jsonify.d.ts.map +1 -1
- package/dist/shared/transformTRPCResponse.d.ts +8 -8
- package/dist/shared/transformTRPCResponse.d.ts.map +1 -1
- package/dist/subscription.d.ts +12 -12
- package/dist/{transformTRPCResponse-64a4fd96.js → transformTRPCResponse-7fcbe472.js} +48 -48
- package/dist/transformer.d.ts +73 -73
- package/dist/transformer.d.ts.map +1 -1
- package/dist/types.d.ts +77 -77
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/adapters/node-http/content-type/form-data/fileUploadHandler.ts +3 -3
- package/src/adapters/node-http/content-type/form-data/uploadHandler.ts +3 -1
|
@@ -1,166 +1,166 @@
|
|
|
1
|
-
import { b as callProcedure } from './config-
|
|
2
|
-
import { T as TRPCError, a as getTRPCErrorFromUnknown } from './TRPCError-
|
|
3
|
-
import { g as getErrorShape, t as transformTRPCResponse } from './transformTRPCResponse-
|
|
4
|
-
import { g as getJsonContentTypeInputs } from './contentType-
|
|
5
|
-
import { b as getHTTPStatusCode } from './index-
|
|
1
|
+
import { b as callProcedure } from './config-54786004.js';
|
|
2
|
+
import { T as TRPCError, a as getTRPCErrorFromUnknown } from './TRPCError-7c3909ea.js';
|
|
3
|
+
import { g as getErrorShape, t as transformTRPCResponse } from './transformTRPCResponse-7fcbe472.js';
|
|
4
|
+
import { g as getJsonContentTypeInputs } from './contentType-7354963c.js';
|
|
5
|
+
import { b as getHTTPStatusCode } from './index-ca9a128e.js';
|
|
6
6
|
|
|
7
|
-
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
8
|
-
const HTTP_METHOD_PROCEDURE_TYPE_MAP = {
|
|
9
|
-
GET: 'query',
|
|
10
|
-
POST: 'mutation',
|
|
11
|
-
};
|
|
12
|
-
const fallbackContentTypeHandler = {
|
|
13
|
-
getInputs: getJsonContentTypeInputs,
|
|
14
|
-
};
|
|
15
|
-
async function resolveHTTPResponse(opts) {
|
|
16
|
-
const { router, req } = opts;
|
|
17
|
-
const contentTypeHandler = opts.contentTypeHandler ?? fallbackContentTypeHandler;
|
|
18
|
-
const batchingEnabled = opts.batching?.enabled ?? true;
|
|
19
|
-
if (req.method === 'HEAD') {
|
|
20
|
-
// can be used for lambda warmup
|
|
21
|
-
return {
|
|
22
|
-
status: 204,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
const type = HTTP_METHOD_PROCEDURE_TYPE_MAP[req.method] ?? 'unknown';
|
|
26
|
-
let ctx = undefined;
|
|
27
|
-
let paths = undefined;
|
|
28
|
-
const isBatchCall = !!req.query.get('batch');
|
|
29
|
-
function endResponse(untransformedJSON, errors) {
|
|
30
|
-
let status = getHTTPStatusCode(untransformedJSON);
|
|
31
|
-
const headers = {
|
|
32
|
-
'Content-Type': 'application/json',
|
|
33
|
-
};
|
|
34
|
-
const meta = opts.responseMeta?.({
|
|
35
|
-
ctx,
|
|
36
|
-
paths,
|
|
37
|
-
type,
|
|
38
|
-
data: Array.isArray(untransformedJSON)
|
|
39
|
-
? untransformedJSON
|
|
40
|
-
: [untransformedJSON],
|
|
41
|
-
errors,
|
|
42
|
-
}) ?? {};
|
|
43
|
-
for (const [key, value] of Object.entries(meta.headers ?? {})) {
|
|
44
|
-
headers[key] = value;
|
|
45
|
-
}
|
|
46
|
-
if (meta.status) {
|
|
47
|
-
status = meta.status;
|
|
48
|
-
}
|
|
49
|
-
const transformedJSON = transformTRPCResponse(router._def._config, untransformedJSON);
|
|
50
|
-
const body = JSON.stringify(transformedJSON);
|
|
51
|
-
return {
|
|
52
|
-
body,
|
|
53
|
-
status,
|
|
54
|
-
headers,
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
try {
|
|
58
|
-
if (opts.error) {
|
|
59
|
-
throw opts.error;
|
|
60
|
-
}
|
|
61
|
-
if (isBatchCall && !batchingEnabled) {
|
|
62
|
-
throw new Error(`Batching is not enabled on the server`);
|
|
63
|
-
}
|
|
64
|
-
/* istanbul ignore if -- @preserve */
|
|
65
|
-
if (type === 'subscription') {
|
|
66
|
-
throw new TRPCError({
|
|
67
|
-
message: 'Subscriptions should use wsLink',
|
|
68
|
-
code: 'METHOD_NOT_SUPPORTED',
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
if (type === 'unknown') {
|
|
72
|
-
throw new TRPCError({
|
|
73
|
-
message: `Unexpected request method ${req.method}`,
|
|
74
|
-
code: 'METHOD_NOT_SUPPORTED',
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
const inputs = await contentTypeHandler.getInputs({
|
|
78
|
-
isBatchCall,
|
|
79
|
-
req,
|
|
80
|
-
router,
|
|
81
|
-
preprocessedBody: opts.preprocessedBody ?? false,
|
|
82
|
-
});
|
|
83
|
-
paths = isBatchCall ? opts.path.split(',') : [opts.path];
|
|
84
|
-
ctx = await opts.createContext();
|
|
85
|
-
const rawResults = await Promise.all(paths.map(async (path, index) => {
|
|
86
|
-
const input = inputs[index];
|
|
87
|
-
try {
|
|
88
|
-
const output = await callProcedure({
|
|
89
|
-
procedures: router._def.procedures,
|
|
90
|
-
path,
|
|
91
|
-
rawInput: input,
|
|
92
|
-
ctx,
|
|
93
|
-
type,
|
|
94
|
-
});
|
|
95
|
-
return {
|
|
96
|
-
input,
|
|
97
|
-
path,
|
|
98
|
-
data: output,
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
catch (cause) {
|
|
102
|
-
const error = getTRPCErrorFromUnknown(cause);
|
|
103
|
-
opts.onError?.({ error, path, input, ctx, type: type, req });
|
|
104
|
-
return {
|
|
105
|
-
input,
|
|
106
|
-
path,
|
|
107
|
-
error,
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
}));
|
|
111
|
-
const errors = rawResults.flatMap((obj) => (obj.error ? [obj.error] : []));
|
|
112
|
-
const resultEnvelopes = rawResults.map((obj) => {
|
|
113
|
-
const { path, input } = obj;
|
|
114
|
-
if (obj.error) {
|
|
115
|
-
return {
|
|
116
|
-
error: getErrorShape({
|
|
117
|
-
config: router._def._config,
|
|
118
|
-
error: obj.error,
|
|
119
|
-
type,
|
|
120
|
-
path,
|
|
121
|
-
input,
|
|
122
|
-
ctx,
|
|
123
|
-
}),
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
else {
|
|
127
|
-
return {
|
|
128
|
-
result: {
|
|
129
|
-
data: obj.data,
|
|
130
|
-
},
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
const result = isBatchCall ? resultEnvelopes : resultEnvelopes[0];
|
|
135
|
-
return endResponse(result, errors);
|
|
136
|
-
}
|
|
137
|
-
catch (cause) {
|
|
138
|
-
// we get here if
|
|
139
|
-
// - batching is called when it's not enabled
|
|
140
|
-
// - `createContext()` throws
|
|
141
|
-
// - post body is too large
|
|
142
|
-
// - input deserialization fails
|
|
143
|
-
// - `errorFormatter` return value is malformed
|
|
144
|
-
const error = getTRPCErrorFromUnknown(cause);
|
|
145
|
-
opts.onError?.({
|
|
146
|
-
error,
|
|
147
|
-
path: undefined,
|
|
148
|
-
input: undefined,
|
|
149
|
-
ctx,
|
|
150
|
-
type: type,
|
|
151
|
-
req,
|
|
152
|
-
});
|
|
153
|
-
return endResponse({
|
|
154
|
-
error: getErrorShape({
|
|
155
|
-
config: router._def._config,
|
|
156
|
-
error,
|
|
157
|
-
type,
|
|
158
|
-
path: undefined,
|
|
159
|
-
input: undefined,
|
|
160
|
-
ctx,
|
|
161
|
-
}),
|
|
162
|
-
}, [error]);
|
|
163
|
-
}
|
|
7
|
+
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
8
|
+
const HTTP_METHOD_PROCEDURE_TYPE_MAP = {
|
|
9
|
+
GET: 'query',
|
|
10
|
+
POST: 'mutation',
|
|
11
|
+
};
|
|
12
|
+
const fallbackContentTypeHandler = {
|
|
13
|
+
getInputs: getJsonContentTypeInputs,
|
|
14
|
+
};
|
|
15
|
+
async function resolveHTTPResponse(opts) {
|
|
16
|
+
const { router, req } = opts;
|
|
17
|
+
const contentTypeHandler = opts.contentTypeHandler ?? fallbackContentTypeHandler;
|
|
18
|
+
const batchingEnabled = opts.batching?.enabled ?? true;
|
|
19
|
+
if (req.method === 'HEAD') {
|
|
20
|
+
// can be used for lambda warmup
|
|
21
|
+
return {
|
|
22
|
+
status: 204,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
const type = HTTP_METHOD_PROCEDURE_TYPE_MAP[req.method] ?? 'unknown';
|
|
26
|
+
let ctx = undefined;
|
|
27
|
+
let paths = undefined;
|
|
28
|
+
const isBatchCall = !!req.query.get('batch');
|
|
29
|
+
function endResponse(untransformedJSON, errors) {
|
|
30
|
+
let status = getHTTPStatusCode(untransformedJSON);
|
|
31
|
+
const headers = {
|
|
32
|
+
'Content-Type': 'application/json',
|
|
33
|
+
};
|
|
34
|
+
const meta = opts.responseMeta?.({
|
|
35
|
+
ctx,
|
|
36
|
+
paths,
|
|
37
|
+
type,
|
|
38
|
+
data: Array.isArray(untransformedJSON)
|
|
39
|
+
? untransformedJSON
|
|
40
|
+
: [untransformedJSON],
|
|
41
|
+
errors,
|
|
42
|
+
}) ?? {};
|
|
43
|
+
for (const [key, value] of Object.entries(meta.headers ?? {})) {
|
|
44
|
+
headers[key] = value;
|
|
45
|
+
}
|
|
46
|
+
if (meta.status) {
|
|
47
|
+
status = meta.status;
|
|
48
|
+
}
|
|
49
|
+
const transformedJSON = transformTRPCResponse(router._def._config, untransformedJSON);
|
|
50
|
+
const body = JSON.stringify(transformedJSON);
|
|
51
|
+
return {
|
|
52
|
+
body,
|
|
53
|
+
status,
|
|
54
|
+
headers,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
if (opts.error) {
|
|
59
|
+
throw opts.error;
|
|
60
|
+
}
|
|
61
|
+
if (isBatchCall && !batchingEnabled) {
|
|
62
|
+
throw new Error(`Batching is not enabled on the server`);
|
|
63
|
+
}
|
|
64
|
+
/* istanbul ignore if -- @preserve */
|
|
65
|
+
if (type === 'subscription') {
|
|
66
|
+
throw new TRPCError({
|
|
67
|
+
message: 'Subscriptions should use wsLink',
|
|
68
|
+
code: 'METHOD_NOT_SUPPORTED',
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
if (type === 'unknown') {
|
|
72
|
+
throw new TRPCError({
|
|
73
|
+
message: `Unexpected request method ${req.method}`,
|
|
74
|
+
code: 'METHOD_NOT_SUPPORTED',
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
const inputs = await contentTypeHandler.getInputs({
|
|
78
|
+
isBatchCall,
|
|
79
|
+
req,
|
|
80
|
+
router,
|
|
81
|
+
preprocessedBody: opts.preprocessedBody ?? false,
|
|
82
|
+
});
|
|
83
|
+
paths = isBatchCall ? opts.path.split(',') : [opts.path];
|
|
84
|
+
ctx = await opts.createContext();
|
|
85
|
+
const rawResults = await Promise.all(paths.map(async (path, index) => {
|
|
86
|
+
const input = inputs[index];
|
|
87
|
+
try {
|
|
88
|
+
const output = await callProcedure({
|
|
89
|
+
procedures: router._def.procedures,
|
|
90
|
+
path,
|
|
91
|
+
rawInput: input,
|
|
92
|
+
ctx,
|
|
93
|
+
type,
|
|
94
|
+
});
|
|
95
|
+
return {
|
|
96
|
+
input,
|
|
97
|
+
path,
|
|
98
|
+
data: output,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
catch (cause) {
|
|
102
|
+
const error = getTRPCErrorFromUnknown(cause);
|
|
103
|
+
opts.onError?.({ error, path, input, ctx, type: type, req });
|
|
104
|
+
return {
|
|
105
|
+
input,
|
|
106
|
+
path,
|
|
107
|
+
error,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
}));
|
|
111
|
+
const errors = rawResults.flatMap((obj) => (obj.error ? [obj.error] : []));
|
|
112
|
+
const resultEnvelopes = rawResults.map((obj) => {
|
|
113
|
+
const { path, input } = obj;
|
|
114
|
+
if (obj.error) {
|
|
115
|
+
return {
|
|
116
|
+
error: getErrorShape({
|
|
117
|
+
config: router._def._config,
|
|
118
|
+
error: obj.error,
|
|
119
|
+
type,
|
|
120
|
+
path,
|
|
121
|
+
input,
|
|
122
|
+
ctx,
|
|
123
|
+
}),
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
return {
|
|
128
|
+
result: {
|
|
129
|
+
data: obj.data,
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
const result = isBatchCall ? resultEnvelopes : resultEnvelopes[0];
|
|
135
|
+
return endResponse(result, errors);
|
|
136
|
+
}
|
|
137
|
+
catch (cause) {
|
|
138
|
+
// we get here if
|
|
139
|
+
// - batching is called when it's not enabled
|
|
140
|
+
// - `createContext()` throws
|
|
141
|
+
// - post body is too large
|
|
142
|
+
// - input deserialization fails
|
|
143
|
+
// - `errorFormatter` return value is malformed
|
|
144
|
+
const error = getTRPCErrorFromUnknown(cause);
|
|
145
|
+
opts.onError?.({
|
|
146
|
+
error,
|
|
147
|
+
path: undefined,
|
|
148
|
+
input: undefined,
|
|
149
|
+
ctx,
|
|
150
|
+
type: type,
|
|
151
|
+
req,
|
|
152
|
+
});
|
|
153
|
+
return endResponse({
|
|
154
|
+
error: getErrorShape({
|
|
155
|
+
config: router._def._config,
|
|
156
|
+
error,
|
|
157
|
+
type,
|
|
158
|
+
path: undefined,
|
|
159
|
+
input: undefined,
|
|
160
|
+
ctx,
|
|
161
|
+
}),
|
|
162
|
+
}, [error]);
|
|
163
|
+
}
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
export { resolveHTTPResponse as r };
|
package/dist/rpc/codes.d.ts
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* JSON-RPC 2.0 Error codes
|
|
3
|
-
*
|
|
4
|
-
* `-32000` to `-32099` are reserved for implementation-defined server-errors.
|
|
5
|
-
* For tRPC we're copying the last digits of HTTP 4XX errors.
|
|
6
|
-
*/
|
|
7
|
-
export declare const TRPC_ERROR_CODES_BY_KEY: {
|
|
8
|
-
/**
|
|
9
|
-
* Invalid JSON was received by the server.
|
|
10
|
-
* An error occurred on the server while parsing the JSON text.
|
|
11
|
-
*/
|
|
12
|
-
readonly PARSE_ERROR: -32700;
|
|
13
|
-
/**
|
|
14
|
-
* The JSON sent is not a valid Request object.
|
|
15
|
-
*/
|
|
16
|
-
readonly BAD_REQUEST: -32600;
|
|
17
|
-
/**
|
|
18
|
-
* Internal JSON-RPC error.
|
|
19
|
-
*/
|
|
20
|
-
readonly INTERNAL_SERVER_ERROR: -32603;
|
|
21
|
-
readonly UNAUTHORIZED: -32001;
|
|
22
|
-
readonly FORBIDDEN: -32003;
|
|
23
|
-
readonly NOT_FOUND: -32004;
|
|
24
|
-
readonly METHOD_NOT_SUPPORTED: -32005;
|
|
25
|
-
readonly TIMEOUT: -32008;
|
|
26
|
-
readonly CONFLICT: -32009;
|
|
27
|
-
readonly PRECONDITION_FAILED: -32012;
|
|
28
|
-
readonly PAYLOAD_TOO_LARGE: -32013;
|
|
29
|
-
readonly UNPROCESSABLE_CONTENT: -32022;
|
|
30
|
-
readonly TOO_MANY_REQUESTS: -32029;
|
|
31
|
-
readonly CLIENT_CLOSED_REQUEST: -32099;
|
|
32
|
-
};
|
|
33
|
-
export declare const TRPC_ERROR_CODES_BY_NUMBER: {
|
|
34
|
-
[-32700]: "PARSE_ERROR";
|
|
35
|
-
[-32600]: "BAD_REQUEST";
|
|
36
|
-
[-32603]: "INTERNAL_SERVER_ERROR";
|
|
37
|
-
[-32001]: "UNAUTHORIZED";
|
|
38
|
-
[-32003]: "FORBIDDEN";
|
|
39
|
-
[-32004]: "NOT_FOUND";
|
|
40
|
-
[-32005]: "METHOD_NOT_SUPPORTED";
|
|
41
|
-
[-32008]: "TIMEOUT";
|
|
42
|
-
[-32009]: "CONFLICT";
|
|
43
|
-
[-32012]: "PRECONDITION_FAILED";
|
|
44
|
-
[-32013]: "PAYLOAD_TOO_LARGE";
|
|
45
|
-
[-32022]: "UNPROCESSABLE_CONTENT";
|
|
46
|
-
[-32029]: "TOO_MANY_REQUESTS";
|
|
47
|
-
[-32099]: "CLIENT_CLOSED_REQUEST";
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
export
|
|
51
|
-
export
|
|
52
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* JSON-RPC 2.0 Error codes
|
|
3
|
+
*
|
|
4
|
+
* `-32000` to `-32099` are reserved for implementation-defined server-errors.
|
|
5
|
+
* For tRPC we're copying the last digits of HTTP 4XX errors.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TRPC_ERROR_CODES_BY_KEY: {
|
|
8
|
+
/**
|
|
9
|
+
* Invalid JSON was received by the server.
|
|
10
|
+
* An error occurred on the server while parsing the JSON text.
|
|
11
|
+
*/
|
|
12
|
+
readonly PARSE_ERROR: -32700;
|
|
13
|
+
/**
|
|
14
|
+
* The JSON sent is not a valid Request object.
|
|
15
|
+
*/
|
|
16
|
+
readonly BAD_REQUEST: -32600;
|
|
17
|
+
/**
|
|
18
|
+
* Internal JSON-RPC error.
|
|
19
|
+
*/
|
|
20
|
+
readonly INTERNAL_SERVER_ERROR: -32603;
|
|
21
|
+
readonly UNAUTHORIZED: -32001;
|
|
22
|
+
readonly FORBIDDEN: -32003;
|
|
23
|
+
readonly NOT_FOUND: -32004;
|
|
24
|
+
readonly METHOD_NOT_SUPPORTED: -32005;
|
|
25
|
+
readonly TIMEOUT: -32008;
|
|
26
|
+
readonly CONFLICT: -32009;
|
|
27
|
+
readonly PRECONDITION_FAILED: -32012;
|
|
28
|
+
readonly PAYLOAD_TOO_LARGE: -32013;
|
|
29
|
+
readonly UNPROCESSABLE_CONTENT: -32022;
|
|
30
|
+
readonly TOO_MANY_REQUESTS: -32029;
|
|
31
|
+
readonly CLIENT_CLOSED_REQUEST: -32099;
|
|
32
|
+
};
|
|
33
|
+
export declare const TRPC_ERROR_CODES_BY_NUMBER: {
|
|
34
|
+
[-32700]: "PARSE_ERROR";
|
|
35
|
+
[-32600]: "BAD_REQUEST";
|
|
36
|
+
[-32603]: "INTERNAL_SERVER_ERROR";
|
|
37
|
+
[-32001]: "UNAUTHORIZED";
|
|
38
|
+
[-32003]: "FORBIDDEN";
|
|
39
|
+
[-32004]: "NOT_FOUND";
|
|
40
|
+
[-32005]: "METHOD_NOT_SUPPORTED";
|
|
41
|
+
[-32008]: "TIMEOUT";
|
|
42
|
+
[-32009]: "CONFLICT";
|
|
43
|
+
[-32012]: "PRECONDITION_FAILED";
|
|
44
|
+
[-32013]: "PAYLOAD_TOO_LARGE";
|
|
45
|
+
[-32022]: "UNPROCESSABLE_CONTENT";
|
|
46
|
+
[-32029]: "TOO_MANY_REQUESTS";
|
|
47
|
+
[-32099]: "CLIENT_CLOSED_REQUEST";
|
|
48
|
+
};
|
|
49
|
+
type ValueOf<TObj> = TObj[keyof TObj];
|
|
50
|
+
export type TRPC_ERROR_CODE_NUMBER = ValueOf<typeof TRPC_ERROR_CODES_BY_KEY>;
|
|
51
|
+
export type TRPC_ERROR_CODE_KEY = keyof typeof TRPC_ERROR_CODES_BY_KEY;
|
|
52
|
+
export {};
|
|
53
53
|
//# sourceMappingURL=codes.d.ts.map
|
package/dist/rpc/codes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../../src/rpc/codes.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;IAClC;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;;;;;;;;;CAcK,CAAC;AAEX,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;CAAkC,CAAC;AAC1E,
|
|
1
|
+
{"version":3,"file":"codes.d.ts","sourceRoot":"","sources":["../../src/rpc/codes.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;IAClC;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;;;;;;;;;CAcK,CAAC;AAEX,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;CAAkC,CAAC;AAC1E,KAAK,OAAO,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC;AAEtC,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC7E,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,uBAAuB,CAAC"}
|
package/dist/rpc/envelopes.d.ts
CHANGED
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
import { ProcedureType } from '../deprecated/router';
|
|
2
|
-
import { TRPC_ERROR_CODE_NUMBER } from './codes';
|
|
3
|
-
/**
|
|
4
|
-
* Error response
|
|
5
|
-
*/
|
|
6
|
-
export interface TRPCErrorShape<TCode extends number = TRPC_ERROR_CODE_NUMBER, TData extends Record<string, unknown> = Record<string, unknown>> {
|
|
7
|
-
code: TCode;
|
|
8
|
-
message: string;
|
|
9
|
-
data: TData;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* JSON-RPC 2.0 Specification
|
|
13
|
-
*/
|
|
14
|
-
export declare namespace JSONRPC2 {
|
|
15
|
-
type RequestId = number | string | null;
|
|
16
|
-
/**
|
|
17
|
-
* All requests/responses extends this shape
|
|
18
|
-
*/
|
|
19
|
-
interface BaseEnvelope {
|
|
20
|
-
id?: RequestId;
|
|
21
|
-
jsonrpc?: '2.0';
|
|
22
|
-
}
|
|
23
|
-
interface BaseRequest<TMethod extends string = string> extends BaseEnvelope {
|
|
24
|
-
method: TMethod;
|
|
25
|
-
}
|
|
26
|
-
interface Request<TMethod extends string = string, TParams = unknown> extends BaseRequest<TMethod> {
|
|
27
|
-
params: TParams;
|
|
28
|
-
}
|
|
29
|
-
interface ResultResponse<TResult = unknown> extends BaseEnvelope {
|
|
30
|
-
result: TResult;
|
|
31
|
-
}
|
|
32
|
-
interface ErrorResponse<TError extends TRPCErrorShape = TRPCErrorShape> extends BaseEnvelope {
|
|
33
|
-
error: TError;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
export interface TRPCRequest extends JSONRPC2.Request<ProcedureType, {
|
|
37
|
-
path: string;
|
|
38
|
-
input: unknown;
|
|
39
|
-
}> {
|
|
40
|
-
}
|
|
41
|
-
export interface TRPCResult<TData = unknown> {
|
|
42
|
-
data: TData;
|
|
43
|
-
}
|
|
44
|
-
export interface TRPCSuccessResponse<TData> extends JSONRPC2.ResultResponse<TRPCResult<TData> & {
|
|
45
|
-
type?: 'data';
|
|
46
|
-
}> {
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* @deprecated use `TRPCSuccessResponse` instead
|
|
50
|
-
*/
|
|
51
|
-
export
|
|
52
|
-
export interface TRPCErrorResponse<TError extends TRPCErrorShape = TRPCErrorShape> extends JSONRPC2.ErrorResponse<TError> {
|
|
53
|
-
}
|
|
54
|
-
export
|
|
55
|
-
export
|
|
56
|
-
id: JSONRPC2.RequestId;
|
|
57
|
-
} & TRPCRequest;
|
|
58
|
-
/**
|
|
59
|
-
* The client asked the server to unsubscribe
|
|
60
|
-
*/
|
|
61
|
-
export interface TRPCSubscriptionStopNotification extends JSONRPC2.BaseRequest<'subscription.stop'> {
|
|
62
|
-
id: null;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* The client's outgoing request types
|
|
66
|
-
*/
|
|
67
|
-
export
|
|
68
|
-
/**
|
|
69
|
-
* The client's sent messages shape
|
|
70
|
-
*/
|
|
71
|
-
export
|
|
72
|
-
id: JSONRPC2.RequestId;
|
|
73
|
-
} & JSONRPC2.BaseRequest<'subscription.stop'>);
|
|
74
|
-
export interface TRPCResultMessage<TData> extends JSONRPC2.ResultResponse<(TRPCResult<TData> & {
|
|
75
|
-
type: 'data';
|
|
76
|
-
}) | {
|
|
77
|
-
type: 'started';
|
|
78
|
-
} | {
|
|
79
|
-
type: 'stopped';
|
|
80
|
-
}> {
|
|
81
|
-
}
|
|
82
|
-
export
|
|
83
|
-
id: JSONRPC2.RequestId;
|
|
84
|
-
} & (TRPCResultMessage<TData> | TRPCErrorResponse<TError>);
|
|
85
|
-
/**
|
|
86
|
-
* The server asked the client to reconnect - useful when restarting/redeploying service
|
|
87
|
-
*/
|
|
88
|
-
export interface TRPCReconnectNotification extends JSONRPC2.BaseRequest<'reconnect'> {
|
|
89
|
-
id: JSONRPC2.RequestId;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* The client's incoming request types
|
|
93
|
-
*/
|
|
94
|
-
export
|
|
95
|
-
/**
|
|
96
|
-
* The client's received messages shape
|
|
97
|
-
*/
|
|
98
|
-
export
|
|
1
|
+
import { ProcedureType } from '../deprecated/router';
|
|
2
|
+
import { TRPC_ERROR_CODE_NUMBER } from './codes';
|
|
3
|
+
/**
|
|
4
|
+
* Error response
|
|
5
|
+
*/
|
|
6
|
+
export interface TRPCErrorShape<TCode extends number = TRPC_ERROR_CODE_NUMBER, TData extends Record<string, unknown> = Record<string, unknown>> {
|
|
7
|
+
code: TCode;
|
|
8
|
+
message: string;
|
|
9
|
+
data: TData;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* JSON-RPC 2.0 Specification
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace JSONRPC2 {
|
|
15
|
+
type RequestId = number | string | null;
|
|
16
|
+
/**
|
|
17
|
+
* All requests/responses extends this shape
|
|
18
|
+
*/
|
|
19
|
+
interface BaseEnvelope {
|
|
20
|
+
id?: RequestId;
|
|
21
|
+
jsonrpc?: '2.0';
|
|
22
|
+
}
|
|
23
|
+
interface BaseRequest<TMethod extends string = string> extends BaseEnvelope {
|
|
24
|
+
method: TMethod;
|
|
25
|
+
}
|
|
26
|
+
interface Request<TMethod extends string = string, TParams = unknown> extends BaseRequest<TMethod> {
|
|
27
|
+
params: TParams;
|
|
28
|
+
}
|
|
29
|
+
interface ResultResponse<TResult = unknown> extends BaseEnvelope {
|
|
30
|
+
result: TResult;
|
|
31
|
+
}
|
|
32
|
+
interface ErrorResponse<TError extends TRPCErrorShape = TRPCErrorShape> extends BaseEnvelope {
|
|
33
|
+
error: TError;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export interface TRPCRequest extends JSONRPC2.Request<ProcedureType, {
|
|
37
|
+
path: string;
|
|
38
|
+
input: unknown;
|
|
39
|
+
}> {
|
|
40
|
+
}
|
|
41
|
+
export interface TRPCResult<TData = unknown> {
|
|
42
|
+
data: TData;
|
|
43
|
+
}
|
|
44
|
+
export interface TRPCSuccessResponse<TData> extends JSONRPC2.ResultResponse<TRPCResult<TData> & {
|
|
45
|
+
type?: 'data';
|
|
46
|
+
}> {
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated use `TRPCSuccessResponse` instead
|
|
50
|
+
*/
|
|
51
|
+
export type TRPCResultResponse<TData = unknown> = TRPCSuccessResponse<TData>;
|
|
52
|
+
export interface TRPCErrorResponse<TError extends TRPCErrorShape = TRPCErrorShape> extends JSONRPC2.ErrorResponse<TError> {
|
|
53
|
+
}
|
|
54
|
+
export type TRPCResponse<TData = unknown, TError extends TRPCErrorShape = TRPCErrorShape> = TRPCSuccessResponse<TData> | TRPCErrorResponse<TError>;
|
|
55
|
+
export type TRPCRequestMessage = {
|
|
56
|
+
id: JSONRPC2.RequestId;
|
|
57
|
+
} & TRPCRequest;
|
|
58
|
+
/**
|
|
59
|
+
* The client asked the server to unsubscribe
|
|
60
|
+
*/
|
|
61
|
+
export interface TRPCSubscriptionStopNotification extends JSONRPC2.BaseRequest<'subscription.stop'> {
|
|
62
|
+
id: null;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The client's outgoing request types
|
|
66
|
+
*/
|
|
67
|
+
export type TRPCClientOutgoingRequest = TRPCSubscriptionStopNotification;
|
|
68
|
+
/**
|
|
69
|
+
* The client's sent messages shape
|
|
70
|
+
*/
|
|
71
|
+
export type TRPCClientOutgoingMessage = TRPCRequestMessage | ({
|
|
72
|
+
id: JSONRPC2.RequestId;
|
|
73
|
+
} & JSONRPC2.BaseRequest<'subscription.stop'>);
|
|
74
|
+
export interface TRPCResultMessage<TData> extends JSONRPC2.ResultResponse<(TRPCResult<TData> & {
|
|
75
|
+
type: 'data';
|
|
76
|
+
}) | {
|
|
77
|
+
type: 'started';
|
|
78
|
+
} | {
|
|
79
|
+
type: 'stopped';
|
|
80
|
+
}> {
|
|
81
|
+
}
|
|
82
|
+
export type TRPCResponseMessage<TData = unknown, TError extends TRPCErrorShape = TRPCErrorShape> = {
|
|
83
|
+
id: JSONRPC2.RequestId;
|
|
84
|
+
} & (TRPCResultMessage<TData> | TRPCErrorResponse<TError>);
|
|
85
|
+
/**
|
|
86
|
+
* The server asked the client to reconnect - useful when restarting/redeploying service
|
|
87
|
+
*/
|
|
88
|
+
export interface TRPCReconnectNotification extends JSONRPC2.BaseRequest<'reconnect'> {
|
|
89
|
+
id: JSONRPC2.RequestId;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The client's incoming request types
|
|
93
|
+
*/
|
|
94
|
+
export type TRPCClientIncomingRequest = TRPCReconnectNotification;
|
|
95
|
+
/**
|
|
96
|
+
* The client's received messages shape
|
|
97
|
+
*/
|
|
98
|
+
export type TRPCClientIncomingMessage<TResult = unknown, TError extends TRPCErrorShape = TRPCErrorShape> = TRPCResponseMessage<TResult, TError> | TRPCClientIncomingRequest;
|
|
99
99
|
//# sourceMappingURL=envelopes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"envelopes.d.ts","sourceRoot":"","sources":["../../src/rpc/envelopes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,cAAc,CAC7B,KAAK,SAAS,MAAM,GAAG,sBAAsB,EAC7C,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAE/D,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,KAAK,CAAC;CACb;AAED;;GAEG;AACH,yBAAiB,QAAQ,CAAC;IACxB,KAAY,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAE/C;;OAEG;IACH,UAAiB,YAAY;QAC3B,EAAE,CAAC,EAAE,SAAS,CAAC;QACf,OAAO,CAAC,EAAE,KAAK,CAAC;KACjB;IAED,UAAiB,WAAW,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,CAC1D,SAAQ,YAAY;QACpB,MAAM,EAAE,OAAO,CAAC;KACjB;IAED,UAAiB,OAAO,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM,EAAE,OAAO,GAAG,OAAO,CACzE,SAAQ,WAAW,CAAC,OAAO,CAAC;QAC5B,MAAM,EAAE,OAAO,CAAC;KACjB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AO,GAAG,OAAO,EACjB,MAAM,SAAS,cAAc,GAAG,cAAc,IAC5C,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,yBAAyB,CAAC"}
|
package/dist/rpc/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './codes';
|
|
2
|
-
export * from './envelopes';
|
|
1
|
+
export * from './codes';
|
|
2
|
+
export * from './envelopes';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|