@trpc/server 11.0.0-next-alpha.133 → 11.0.0-next-alpha.139
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/bundle-analysis.json +21 -21
- package/dist/core/index.d.ts +0 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/initTRPC.d.ts +2 -41
- package/dist/core/initTRPC.d.ts.map +1 -1
- package/dist/core/internals/procedureBuilder.d.ts +46 -60
- package/dist/core/internals/procedureBuilder.d.ts.map +1 -1
- package/dist/core/internals/utils.d.ts +1 -9
- package/dist/core/internals/utils.d.ts.map +1 -1
- package/dist/core/middleware.d.ts +33 -85
- package/dist/core/middleware.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{procedureBuilder-0ee77d9c.js → procedureBuilder-416387b5.js} +10 -9
- package/dist/{procedureBuilder-88b211d2.mjs → procedureBuilder-5431b157.mjs} +10 -9
- package/dist/{procedureBuilder-c990500b.js → procedureBuilder-e77bab71.js} +11 -13
- package/dist/unstableInternalsExport.js +1 -1
- package/dist/unstableInternalsExport.mjs +1 -1
- package/package.json +2 -2
- package/src/core/index.ts +0 -1
- package/src/core/initTRPC.ts +8 -2
- package/src/core/internals/procedureBuilder.ts +173 -104
- package/src/core/internals/utils.ts +1 -14
- package/src/core/middleware.ts +114 -163
- package/dist/core/internals/builderTypes.d.ts +0 -14
- package/dist/core/internals/builderTypes.d.ts.map +0 -1
- package/src/core/internals/builderTypes.ts +0 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../src/core/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../src/core/middleware.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;GAEG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,KAAK,EAAE,QAAQ,GAAG,OAAO,0KA8B1E;AAED,eAAO,MAAM,iCAAiC;;;YAIlC,OAAO;;;;;;;;;;;;;;;CAQjB,CAAC;AAMH;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,yBA4BnE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,OAAO,CAAC,yBAwBtE"}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var router = require('./router-6e6a40b3.js');
|
|
6
6
|
var TRPCError = require('./TRPCError-0b220715.js');
|
|
7
|
-
var procedureBuilder = require('./procedureBuilder-
|
|
7
|
+
var procedureBuilder = require('./procedureBuilder-416387b5.js');
|
|
8
8
|
var index = require('./index-a496f86b.js');
|
|
9
9
|
var config = require('./config-774dae36.js');
|
|
10
10
|
require('./getCauseFromUnknown-d535264a.js');
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { d as defaultFormatter, g as getDataTransformer, a as defaultTransformer, c as createRouterFactory } from './router-accbd60f.mjs';
|
|
2
2
|
export { b as callProcedure, a as defaultTransformer, g as getDataTransformer } from './router-accbd60f.mjs';
|
|
3
3
|
export { T as TRPCError, g as getTRPCErrorFromUnknown } from './TRPCError-7e8e2a1b.mjs';
|
|
4
|
-
import { c as createBuilder, a as createMiddlewareFactory, m as mergeRouters } from './procedureBuilder-
|
|
5
|
-
export { b as createInputMiddleware, d as createOutputMiddleware, e as experimental_standaloneMiddleware } from './procedureBuilder-
|
|
4
|
+
import { c as createBuilder, a as createMiddlewareFactory, m as mergeRouters } from './procedureBuilder-5431b157.mjs';
|
|
5
|
+
export { b as createInputMiddleware, d as createOutputMiddleware, e as experimental_standaloneMiddleware } from './procedureBuilder-5431b157.mjs';
|
|
6
6
|
import { c as createFlatProxy } from './index-a9e3e610.mjs';
|
|
7
7
|
import { i as isServerDefault } from './config-50853f49.mjs';
|
|
8
8
|
import './getCauseFromUnknown-2d66414a.mjs';
|
|
@@ -37,7 +37,7 @@ function isPlainObject(obj) {
|
|
|
37
37
|
* @internal
|
|
38
38
|
* Please note, `trpc-openapi` uses this function.
|
|
39
39
|
*/ function createInputMiddleware(parse) {
|
|
40
|
-
const inputMiddleware = async (opts)
|
|
40
|
+
const inputMiddleware = async function inputValidatorMiddleware(opts) {
|
|
41
41
|
let parsedInput;
|
|
42
42
|
const rawInput = await opts.getRawInput();
|
|
43
43
|
try {
|
|
@@ -63,7 +63,7 @@ function isPlainObject(obj) {
|
|
|
63
63
|
/**
|
|
64
64
|
* @internal
|
|
65
65
|
*/ function createOutputMiddleware(parse) {
|
|
66
|
-
const outputMiddleware = async ({ next })
|
|
66
|
+
const outputMiddleware = async function outputValidatorMiddleware({ next }) {
|
|
67
67
|
const result = await next();
|
|
68
68
|
if (!result.ok) {
|
|
69
69
|
// pass through failures without validating
|
|
@@ -199,7 +199,7 @@ function createBuilder(initDef = {}) {
|
|
|
199
199
|
middlewares: [],
|
|
200
200
|
...initDef
|
|
201
201
|
};
|
|
202
|
-
|
|
202
|
+
const builder = {
|
|
203
203
|
_def,
|
|
204
204
|
input (input) {
|
|
205
205
|
const parser = getParseFn(input);
|
|
@@ -213,17 +213,17 @@ function createBuilder(initDef = {}) {
|
|
|
213
213
|
});
|
|
214
214
|
},
|
|
215
215
|
output (output) {
|
|
216
|
-
const
|
|
216
|
+
const parser = getParseFn(output);
|
|
217
217
|
return createNewBuilder(_def, {
|
|
218
218
|
output,
|
|
219
219
|
middlewares: [
|
|
220
|
-
createOutputMiddleware(
|
|
220
|
+
createOutputMiddleware(parser)
|
|
221
221
|
]
|
|
222
222
|
});
|
|
223
223
|
},
|
|
224
224
|
meta (meta) {
|
|
225
225
|
return createNewBuilder(_def, {
|
|
226
|
-
meta
|
|
226
|
+
meta
|
|
227
227
|
});
|
|
228
228
|
},
|
|
229
229
|
use (middlewareBuilderOrFn) {
|
|
@@ -254,6 +254,7 @@ function createBuilder(initDef = {}) {
|
|
|
254
254
|
}, resolver);
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
|
+
return builder;
|
|
257
258
|
}
|
|
258
259
|
function createResolver(_def, resolver) {
|
|
259
260
|
const finalBuilder = createNewBuilder(_def, {
|
|
@@ -289,10 +290,10 @@ function createProcedureCaller(_def) {
|
|
|
289
290
|
throw new Error(codeblock);
|
|
290
291
|
}
|
|
291
292
|
// run the middlewares recursively with the resolver as the last one
|
|
292
|
-
|
|
293
|
+
async function callRecursive(callOpts = {
|
|
293
294
|
index: 0,
|
|
294
295
|
ctx: opts.ctx
|
|
295
|
-
})
|
|
296
|
+
}) {
|
|
296
297
|
try {
|
|
297
298
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
298
299
|
const middleware = _def.middlewares[callOpts.index];
|
|
@@ -324,7 +325,7 @@ function createProcedureCaller(_def) {
|
|
|
324
325
|
marker: middlewareMarker
|
|
325
326
|
};
|
|
326
327
|
}
|
|
327
|
-
}
|
|
328
|
+
}
|
|
328
329
|
// there's always at least one "next" since we wrap this.resolver in a middleware
|
|
329
330
|
const result = await callRecursive();
|
|
330
331
|
if (!result) {
|
|
@@ -35,7 +35,7 @@ function isPlainObject(obj) {
|
|
|
35
35
|
* @internal
|
|
36
36
|
* Please note, `trpc-openapi` uses this function.
|
|
37
37
|
*/ function createInputMiddleware(parse) {
|
|
38
|
-
const inputMiddleware = async (opts)
|
|
38
|
+
const inputMiddleware = async function inputValidatorMiddleware(opts) {
|
|
39
39
|
let parsedInput;
|
|
40
40
|
const rawInput = await opts.getRawInput();
|
|
41
41
|
try {
|
|
@@ -61,7 +61,7 @@ function isPlainObject(obj) {
|
|
|
61
61
|
/**
|
|
62
62
|
* @internal
|
|
63
63
|
*/ function createOutputMiddleware(parse) {
|
|
64
|
-
const outputMiddleware = async ({ next })
|
|
64
|
+
const outputMiddleware = async function outputValidatorMiddleware({ next }) {
|
|
65
65
|
const result = await next();
|
|
66
66
|
if (!result.ok) {
|
|
67
67
|
// pass through failures without validating
|
|
@@ -197,7 +197,7 @@ function createBuilder(initDef = {}) {
|
|
|
197
197
|
middlewares: [],
|
|
198
198
|
...initDef
|
|
199
199
|
};
|
|
200
|
-
|
|
200
|
+
const builder = {
|
|
201
201
|
_def,
|
|
202
202
|
input (input) {
|
|
203
203
|
const parser = getParseFn(input);
|
|
@@ -211,17 +211,17 @@ function createBuilder(initDef = {}) {
|
|
|
211
211
|
});
|
|
212
212
|
},
|
|
213
213
|
output (output) {
|
|
214
|
-
const
|
|
214
|
+
const parser = getParseFn(output);
|
|
215
215
|
return createNewBuilder(_def, {
|
|
216
216
|
output,
|
|
217
217
|
middlewares: [
|
|
218
|
-
createOutputMiddleware(
|
|
218
|
+
createOutputMiddleware(parser)
|
|
219
219
|
]
|
|
220
220
|
});
|
|
221
221
|
},
|
|
222
222
|
meta (meta) {
|
|
223
223
|
return createNewBuilder(_def, {
|
|
224
|
-
meta
|
|
224
|
+
meta
|
|
225
225
|
});
|
|
226
226
|
},
|
|
227
227
|
use (middlewareBuilderOrFn) {
|
|
@@ -252,6 +252,7 @@ function createBuilder(initDef = {}) {
|
|
|
252
252
|
}, resolver);
|
|
253
253
|
}
|
|
254
254
|
};
|
|
255
|
+
return builder;
|
|
255
256
|
}
|
|
256
257
|
function createResolver(_def, resolver) {
|
|
257
258
|
const finalBuilder = createNewBuilder(_def, {
|
|
@@ -287,10 +288,10 @@ function createProcedureCaller(_def) {
|
|
|
287
288
|
throw new Error(codeblock);
|
|
288
289
|
}
|
|
289
290
|
// run the middlewares recursively with the resolver as the last one
|
|
290
|
-
|
|
291
|
+
async function callRecursive(callOpts = {
|
|
291
292
|
index: 0,
|
|
292
293
|
ctx: opts.ctx
|
|
293
|
-
})
|
|
294
|
+
}) {
|
|
294
295
|
try {
|
|
295
296
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
296
297
|
const middleware = _def.middlewares[callOpts.index];
|
|
@@ -322,7 +323,7 @@ function createProcedureCaller(_def) {
|
|
|
322
323
|
marker: middlewareMarker
|
|
323
324
|
};
|
|
324
325
|
}
|
|
325
|
-
}
|
|
326
|
+
}
|
|
326
327
|
// there's always at least one "next" since we wrap this.resolver in a middleware
|
|
327
328
|
const result = await callRecursive();
|
|
328
329
|
if (!result) {
|
|
@@ -12,10 +12,7 @@ function createMiddlewareFactory() {
|
|
|
12
12
|
const pipedMiddleware = '_middlewares' in middlewareBuilderOrFn
|
|
13
13
|
? middlewareBuilderOrFn._middlewares
|
|
14
14
|
: [middlewareBuilderOrFn];
|
|
15
|
-
return createMiddlewareInner([
|
|
16
|
-
...middlewares,
|
|
17
|
-
...pipedMiddleware,
|
|
18
|
-
]);
|
|
15
|
+
return createMiddlewareInner([...middlewares, ...pipedMiddleware]);
|
|
19
16
|
},
|
|
20
17
|
};
|
|
21
18
|
}
|
|
@@ -35,7 +32,7 @@ function isPlainObject(obj) {
|
|
|
35
32
|
* Please note, `trpc-openapi` uses this function.
|
|
36
33
|
*/
|
|
37
34
|
function createInputMiddleware(parse) {
|
|
38
|
-
const inputMiddleware = async (opts)
|
|
35
|
+
const inputMiddleware = async function inputValidatorMiddleware(opts) {
|
|
39
36
|
let parsedInput;
|
|
40
37
|
const rawInput = await opts.getRawInput();
|
|
41
38
|
try {
|
|
@@ -63,7 +60,7 @@ function createInputMiddleware(parse) {
|
|
|
63
60
|
* @internal
|
|
64
61
|
*/
|
|
65
62
|
function createOutputMiddleware(parse) {
|
|
66
|
-
const outputMiddleware = async ({ next })
|
|
63
|
+
const outputMiddleware = async function outputValidatorMiddleware({ next }) {
|
|
67
64
|
const result = await next();
|
|
68
65
|
if (!result.ok) {
|
|
69
66
|
// pass through failures without validating
|
|
@@ -198,7 +195,7 @@ function createBuilder(initDef = {}) {
|
|
|
198
195
|
middlewares: [],
|
|
199
196
|
...initDef,
|
|
200
197
|
};
|
|
201
|
-
|
|
198
|
+
const builder = {
|
|
202
199
|
_def,
|
|
203
200
|
input(input) {
|
|
204
201
|
const parser = getParseFn(input);
|
|
@@ -208,15 +205,15 @@ function createBuilder(initDef = {}) {
|
|
|
208
205
|
});
|
|
209
206
|
},
|
|
210
207
|
output(output) {
|
|
211
|
-
const
|
|
208
|
+
const parser = getParseFn(output);
|
|
212
209
|
return createNewBuilder(_def, {
|
|
213
210
|
output,
|
|
214
|
-
middlewares: [createOutputMiddleware(
|
|
211
|
+
middlewares: [createOutputMiddleware(parser)],
|
|
215
212
|
});
|
|
216
213
|
},
|
|
217
214
|
meta(meta) {
|
|
218
215
|
return createNewBuilder(_def, {
|
|
219
|
-
meta
|
|
216
|
+
meta,
|
|
220
217
|
});
|
|
221
218
|
},
|
|
222
219
|
use(middlewareBuilderOrFn) {
|
|
@@ -238,6 +235,7 @@ function createBuilder(initDef = {}) {
|
|
|
238
235
|
return createResolver({ ..._def, type: 'subscription' }, resolver);
|
|
239
236
|
},
|
|
240
237
|
};
|
|
238
|
+
return builder;
|
|
241
239
|
}
|
|
242
240
|
function createResolver(_def, resolver) {
|
|
243
241
|
const finalBuilder = createNewBuilder(_def, {
|
|
@@ -273,10 +271,10 @@ function createProcedureCaller(_def) {
|
|
|
273
271
|
throw new Error(codeblock);
|
|
274
272
|
}
|
|
275
273
|
// run the middlewares recursively with the resolver as the last one
|
|
276
|
-
|
|
274
|
+
async function callRecursive(callOpts = {
|
|
277
275
|
index: 0,
|
|
278
276
|
ctx: opts.ctx,
|
|
279
|
-
})
|
|
277
|
+
}) {
|
|
280
278
|
try {
|
|
281
279
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
282
280
|
const middleware = _def.middlewares[callOpts.index];
|
|
@@ -312,7 +310,7 @@ function createProcedureCaller(_def) {
|
|
|
312
310
|
marker: middlewareMarker,
|
|
313
311
|
};
|
|
314
312
|
}
|
|
315
|
-
}
|
|
313
|
+
}
|
|
316
314
|
// there's always at least one "next" since we wrap this.resolver in a middleware
|
|
317
315
|
const result = await callRecursive();
|
|
318
316
|
if (!result) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var procedureBuilder = require('./procedureBuilder-
|
|
5
|
+
var procedureBuilder = require('./procedureBuilder-416387b5.js');
|
|
6
6
|
require('./router-6e6a40b3.js');
|
|
7
7
|
require('./TRPCError-0b220715.js');
|
|
8
8
|
require('./getCauseFromUnknown-d535264a.js');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as createBuilder, m as mergeRouters, f as middlewareMarker, u as unsetMarker } from './procedureBuilder-
|
|
1
|
+
export { c as createBuilder, m as mergeRouters, f as middlewareMarker, u as unsetMarker } from './procedureBuilder-5431b157.mjs';
|
|
2
2
|
import './router-accbd60f.mjs';
|
|
3
3
|
import './TRPCError-7e8e2a1b.mjs';
|
|
4
4
|
import './getCauseFromUnknown-2d66414a.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/server",
|
|
3
|
-
"version": "11.0.0-next-alpha.
|
|
3
|
+
"version": "11.0.0-next-alpha.139+eb0fec433",
|
|
4
4
|
"description": "The tRPC server library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -179,5 +179,5 @@
|
|
|
179
179
|
"funding": [
|
|
180
180
|
"https://trpc.io/sponsor"
|
|
181
181
|
],
|
|
182
|
-
"gitHead": "
|
|
182
|
+
"gitHead": "eb0fec433c3a47db1fc37341f9b2127bd7ddb5a9"
|
|
183
183
|
}
|
package/src/core/index.ts
CHANGED
package/src/core/initTRPC.ts
CHANGED
|
@@ -151,13 +151,19 @@ function createTRPCInner<TParams extends PartialRootConfigTypes>() {
|
|
|
151
151
|
/**
|
|
152
152
|
* Builder object for creating procedures
|
|
153
153
|
*/
|
|
154
|
-
procedure: createBuilder
|
|
154
|
+
procedure: createBuilder<
|
|
155
|
+
$Config['$types']['ctx'],
|
|
156
|
+
$Config['$types']['meta']
|
|
157
|
+
>({
|
|
155
158
|
meta: runtime?.defaultMeta,
|
|
156
159
|
}),
|
|
157
160
|
/**
|
|
158
161
|
* Create reusable middlewares
|
|
159
162
|
*/
|
|
160
|
-
middleware: createMiddlewareFactory
|
|
163
|
+
middleware: createMiddlewareFactory<
|
|
164
|
+
$Config['$types']['ctx'],
|
|
165
|
+
$Config['$types']['meta']
|
|
166
|
+
>(),
|
|
161
167
|
/**
|
|
162
168
|
* Create a router
|
|
163
169
|
*/
|