@trpc/server 11.0.0-next-alpha.142 → 11.0.0-next-alpha.147
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/core/parser.d.ts +1 -7
- package/dist/core/parser.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/core/parser.ts +5 -10
package/dist/core/parser.d.ts
CHANGED
|
@@ -2,12 +2,6 @@ export type ParserZodEsque<TInput, TParsedInput> = {
|
|
|
2
2
|
_input: TInput;
|
|
3
3
|
_output: TParsedInput;
|
|
4
4
|
};
|
|
5
|
-
export type ParserValibotEsque<TInput, TParsedInput> = {
|
|
6
|
-
types?: {
|
|
7
|
-
input: TInput;
|
|
8
|
-
output: TParsedInput;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
5
|
export type ParserMyZodEsque<TInput> = {
|
|
12
6
|
parse: (input: any) => TInput;
|
|
13
7
|
};
|
|
@@ -22,7 +16,7 @@ export type ParserScaleEsque<TInput> = {
|
|
|
22
16
|
assert(value: unknown): asserts value is TInput;
|
|
23
17
|
};
|
|
24
18
|
export type ParserWithoutInput<TInput> = ParserCustomValidatorEsque<TInput> | ParserMyZodEsque<TInput> | ParserScaleEsque<TInput> | ParserSuperstructEsque<TInput> | ParserYupEsque<TInput>;
|
|
25
|
-
export type ParserWithInputOutput<TInput, TParsedInput> = ParserZodEsque<TInput, TParsedInput
|
|
19
|
+
export type ParserWithInputOutput<TInput, TParsedInput> = ParserZodEsque<TInput, TParsedInput>;
|
|
26
20
|
export type Parser = ParserWithInputOutput<any, any> | ParserWithoutInput<any>;
|
|
27
21
|
export type inferParser<TParser extends Parser> = TParser extends ParserWithInputOutput<infer $TIn, infer $TOut> ? {
|
|
28
22
|
in: $TIn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/core/parser.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","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O,SAAS,qBAAqB,CAAC,MAAM,IAAI,EAAE,MAAM,KAAK,CAAC,GAC1D;IACE,EAAE,EAAE,IAAI,CAAC;IACT,GAAG,EAAE,KAAK,CAAC;CACZ,GACD,OAAO,SAAS,kBAAkB,CAAC,MAAM,MAAM,CAAC,GAChD;IACE,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;CACb,GACD,KAAK,CAAC"}
|
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.147+8f1174c87",
|
|
4
4
|
"description": "The tRPC server library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
"tslib": "^2.5.0",
|
|
171
171
|
"tsx": "^4.0.0",
|
|
172
172
|
"typescript": "^5.3.3",
|
|
173
|
-
"valibot": "^0.
|
|
173
|
+
"valibot": "^0.25.0",
|
|
174
174
|
"vitest": "^0.32.0",
|
|
175
175
|
"ws": "^8.0.0",
|
|
176
176
|
"yup": "^1.0.0",
|
|
@@ -179,5 +179,5 @@
|
|
|
179
179
|
"funding": [
|
|
180
180
|
"https://trpc.io/sponsor"
|
|
181
181
|
],
|
|
182
|
-
"gitHead": "
|
|
182
|
+
"gitHead": "8f1174c87326aea76ea7ca34f4270b748fd2608b"
|
|
183
183
|
}
|
package/src/core/parser.ts
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
|
+
// zod / @decs/typeschema
|
|
1
2
|
export type ParserZodEsque<TInput, TParsedInput> = {
|
|
2
3
|
_input: TInput;
|
|
3
4
|
_output: TParsedInput;
|
|
4
5
|
};
|
|
5
6
|
|
|
6
|
-
export type ParserValibotEsque<TInput, TParsedInput> = {
|
|
7
|
-
types?: {
|
|
8
|
-
input: TInput;
|
|
9
|
-
output: TParsedInput;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
|
|
13
7
|
export type ParserMyZodEsque<TInput> = {
|
|
14
8
|
parse: (input: any) => TInput;
|
|
15
9
|
};
|
|
@@ -37,9 +31,10 @@ export type ParserWithoutInput<TInput> =
|
|
|
37
31
|
| ParserSuperstructEsque<TInput>
|
|
38
32
|
| ParserYupEsque<TInput>;
|
|
39
33
|
|
|
40
|
-
export type ParserWithInputOutput<TInput, TParsedInput> =
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
export type ParserWithInputOutput<TInput, TParsedInput> = ParserZodEsque<
|
|
35
|
+
TInput,
|
|
36
|
+
TParsedInput
|
|
37
|
+
>;
|
|
43
38
|
|
|
44
39
|
export type Parser = ParserWithInputOutput<any, any> | ParserWithoutInput<any>;
|
|
45
40
|
|