@forklaunch/validator 0.1.0 → 0.1.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/index.d.ts +83 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/interfaces/schemaDefinition.interfaces.d.ts +21 -0
- package/dist/interfaces/schemaDefinition.interfaces.js +3 -0
- package/dist/interfaces/schemaDefinition.interfaces.js.map +1 -0
- package/dist/tests/equality.test.d.ts +0 -0
- package/dist/tests/equality.test.js +2 -0
- package/dist/tests/equality.test.js.map +1 -0
- package/dist/tests/largeSchema.test.d.ts +0 -0
- package/dist/tests/largeSchema.test.js +2 -0
- package/dist/tests/largeSchema.test.js.map +1 -0
- package/dist/tests/typebox/equality.test.d.ts +1 -0
- package/dist/tests/typebox/equality.test.js +85 -0
- package/dist/tests/typebox/equality.test.js.map +1 -0
- package/dist/tests/typebox/largeSchema.test.d.ts +1 -0
- package/dist/tests/typebox/largeSchema.test.js +135 -0
- package/dist/tests/typebox/largeSchema.test.js.map +1 -0
- package/dist/tests/zod/equality.test.d.ts +1 -0
- package/dist/tests/zod/equality.test.js +85 -0
- package/dist/tests/zod/equality.test.js.map +1 -0
- package/dist/tests/zod/largeSchema.test.d.ts +1 -0
- package/dist/tests/zod/largeSchema.test.js +135 -0
- package/dist/tests/zod/largeSchema.test.js.map +1 -0
- package/dist/typebox.d.ts +145 -0
- package/dist/typebox.js +191 -0
- package/dist/typebox.js.map +1 -0
- package/dist/types/schema.types.d.ts +7 -0
- package/dist/types/schema.types.js +3 -0
- package/dist/types/schema.types.js.map +1 -0
- package/dist/types/typebox.schema.types.d.ts +22 -0
- package/dist/types/typebox.schema.types.js +3 -0
- package/dist/types/typebox.schema.types.js.map +1 -0
- package/dist/types/zod.schema.types.d.ts +24 -0
- package/dist/types/zod.schema.types.js +3 -0
- package/dist/types/zod.schema.types.js.map +1 -0
- package/dist/zod.d.ts +145 -0
- package/dist/zod.js +192 -0
- package/dist/zod.js.map +1 -0
- package/package.json +3 -6
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module provides type definitions and utilities for working with schemas using Zod and TypeBox.
|
|
3
|
+
* It includes type mappings and transformations for schema objects, arrays, and resolutions.
|
|
4
|
+
*
|
|
5
|
+
* @module SchemaTypes
|
|
6
|
+
*/
|
|
7
|
+
import { Prettify } from "@forklaunch/common";
|
|
8
|
+
import { IdiomaticSchema } from "./types/schema.types";
|
|
9
|
+
import { TOuterArray, TCatchall, TObject, TObjectShape, TResolve, TSchemaTranslate } from "./types/typebox.schema.types";
|
|
10
|
+
import { ZodOuterArray, ZodCatchall, ZodObject, ZodObjectShape, ZodResolve, ZodSchemaTranslate } from "./types/zod.schema.types";
|
|
11
|
+
import { ZodSchemaDefinition } from "./zod";
|
|
12
|
+
import { TypeboxSchemaDefinition } from "./typebox";
|
|
13
|
+
import { SchemaDefinition } from "./interfaces/schemaDefinition.interfaces";
|
|
14
|
+
/**
|
|
15
|
+
* Type alias for a schema object shape.
|
|
16
|
+
* Resolves to ZodObjectShape for Zod schemas and TObjectShape for TypeBox schemas.
|
|
17
|
+
*
|
|
18
|
+
* @template SD - SchemaDefinition type.
|
|
19
|
+
*/
|
|
20
|
+
type SchemaObjectShape<SD extends SchemaDefinition<any, any, any>> = (SD extends ZodSchemaDefinition ? ZodObjectShape : SD extends TypeboxSchemaDefinition ? TObjectShape : never);
|
|
21
|
+
/**
|
|
22
|
+
* Type alias for a schema object.
|
|
23
|
+
* Resolves to ZodObject for Zod schemas and TObject for TypeBox schemas.
|
|
24
|
+
*
|
|
25
|
+
* @template T - Schema object shape.
|
|
26
|
+
* @template SD - SchemaDefinition type.
|
|
27
|
+
*/
|
|
28
|
+
type SchemaObject<T extends SchemaObjectShape<SD>, SD extends SchemaDefinition<any, any, any>> = (SD extends ZodSchemaDefinition ? ZodObject<T> : SD extends TypeboxSchemaDefinition ? TObject<T> : never);
|
|
29
|
+
/**
|
|
30
|
+
* Type alias for a schema outer array.
|
|
31
|
+
* Resolves to ZodOuterArray for Zod schemas and TOuterArray for TypeBox schemas.
|
|
32
|
+
*
|
|
33
|
+
* @template T - Schema object.
|
|
34
|
+
* @template SD - SchemaDefinition type.
|
|
35
|
+
*/
|
|
36
|
+
type SchemaOuterArray<T extends SchemaObject<SchemaObjectShape<SD>, SD>, SD extends SchemaDefinition<any, any, any>> = (SD extends ZodSchemaDefinition ? ZodOuterArray<T> : SD extends TypeboxSchemaDefinition ? TOuterArray<T> : never);
|
|
37
|
+
/**
|
|
38
|
+
* Type alias for resolving a schema.
|
|
39
|
+
* Resolves to ZodResolve for Zod schemas and TResolve for TypeBox schemas.
|
|
40
|
+
*
|
|
41
|
+
* @template T - Schema type.
|
|
42
|
+
* @template SD - SchemaDefinition type.
|
|
43
|
+
*/
|
|
44
|
+
type SchemaResolve<T, SD extends SchemaDefinition<any, any, any>> = (SD extends ZodSchemaDefinition ? ZodResolve<T> : SD extends TypeboxSchemaDefinition ? TResolve<T> : never);
|
|
45
|
+
/**
|
|
46
|
+
* Type alias for translating a schema.
|
|
47
|
+
* Resolves to ZodSchemaTranslate for Zod schemas and TSchemaTranslate for TypeBox schemas.
|
|
48
|
+
*
|
|
49
|
+
* @template T - Schema type.
|
|
50
|
+
* @template SD - SchemaDefinition type.
|
|
51
|
+
*/
|
|
52
|
+
type SchemaTranslate<T, SD extends SchemaDefinition<any, any, any>> = (SD extends ZodSchemaDefinition ? ZodSchemaTranslate<T> : SD extends TypeboxSchemaDefinition ? TSchemaTranslate<T> : never);
|
|
53
|
+
/**
|
|
54
|
+
* Type alias for prettifying a schema translation.
|
|
55
|
+
* Uses the Prettify utility from @forklaunch/common.
|
|
56
|
+
*
|
|
57
|
+
* @template T - Schema type.
|
|
58
|
+
* @template SD - SchemaDefinition type.
|
|
59
|
+
*/
|
|
60
|
+
type SchemaPrettify<T, SD extends SchemaDefinition<any, any, any>> = Prettify<SchemaTranslate<T, SD>>;
|
|
61
|
+
/**
|
|
62
|
+
* Type alias for a schema catchall type.
|
|
63
|
+
* Resolves to ZodCatchall for Zod schemas and TCatchall for TypeBox schemas.
|
|
64
|
+
*
|
|
65
|
+
* @template SD - SchemaDefinition type.
|
|
66
|
+
*/
|
|
67
|
+
export type SchemaCatchall<SD extends SchemaDefinition<any, any, any>> = (SD extends ZodSchemaDefinition ? ZodCatchall : SD extends TypeboxSchemaDefinition ? TCatchall : never);
|
|
68
|
+
/**
|
|
69
|
+
* Type alias for a valid schema object.
|
|
70
|
+
* Can be a schema object or a schema outer array.
|
|
71
|
+
*
|
|
72
|
+
* @template SD - SchemaDefinition type.
|
|
73
|
+
*/
|
|
74
|
+
export type ValidSchemaObject<SD extends SchemaDefinition<any, any, any>> = SchemaObject<SchemaObjectShape<SD>, SD> | SchemaOuterArray<SchemaObject<SchemaObjectShape<SD>, SD>, SD>;
|
|
75
|
+
/**
|
|
76
|
+
* Type alias for a schema.
|
|
77
|
+
* Applies prettification to the resolved schema.
|
|
78
|
+
*
|
|
79
|
+
* @template T - Valid schema object or idiomatic schema.
|
|
80
|
+
* @template SD - SchemaDefinition type.
|
|
81
|
+
*/
|
|
82
|
+
export type Schema<T extends ValidSchemaObject<SD> | IdiomaticSchema<SchemaCatchall<SD>>, SD extends SchemaDefinition<any, any, any>> = SchemaPrettify<SchemaResolve<T, SD>, SD>;
|
|
83
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This module provides type definitions and utilities for working with schemas using Zod and TypeBox.
|
|
4
|
+
* It includes type mappings and transformations for schema objects, arrays, and resolutions.
|
|
5
|
+
*
|
|
6
|
+
* @module SchemaTypes
|
|
7
|
+
*/
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LiteralSchema } from "../types/schema.types";
|
|
2
|
+
import { SchemaObject } from 'openapi3-ts/oas31';
|
|
3
|
+
export interface SchemaDefinition<UnionContainer, IdiomaticSchema, Catchall> {
|
|
4
|
+
string: unknown;
|
|
5
|
+
number: unknown;
|
|
6
|
+
bigint: unknown;
|
|
7
|
+
boolean: unknown;
|
|
8
|
+
date: unknown;
|
|
9
|
+
symbol: unknown;
|
|
10
|
+
empty: unknown;
|
|
11
|
+
any: unknown;
|
|
12
|
+
unknown: unknown;
|
|
13
|
+
never: unknown;
|
|
14
|
+
schemify<T extends IdiomaticSchema>(schema: T): unknown;
|
|
15
|
+
optional<T extends IdiomaticSchema>(schema: T): unknown;
|
|
16
|
+
array<T extends IdiomaticSchema>(schema: T): unknown;
|
|
17
|
+
union<T extends UnionContainer>(schemas: T): unknown;
|
|
18
|
+
literal<T extends LiteralSchema>(value: T): unknown;
|
|
19
|
+
validate<T extends Catchall>(schema: T, value: unknown): boolean;
|
|
20
|
+
openapi<T extends IdiomaticSchema>(schema: T): SchemaObject;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schemaDefinition.interfaces.js","sourceRoot":"","sources":["../../interfaces/schemaDefinition.interfaces.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equality.test.js","sourceRoot":"","sources":["../../tests/equality.test.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"largeSchema.test.js","sourceRoot":"","sources":["../../tests/largeSchema.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assert<T extends never>(): void;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assert = void 0;
|
|
4
|
+
const typebox_1 = require("../../typebox");
|
|
5
|
+
const one = (0, typebox_1.array)({
|
|
6
|
+
name: {
|
|
7
|
+
j: (0, typebox_1.union)([typebox_1.string, typebox_1.number, typebox_1.date, typebox_1.boolean, typebox_1.bigint, typebox_1.empty, typebox_1.symbol, typebox_1.never]),
|
|
8
|
+
t: (0, typebox_1.optional)((0, typebox_1.union)([(0, typebox_1.array)({
|
|
9
|
+
y: (0, typebox_1.array)(typebox_1.number)
|
|
10
|
+
}), typebox_1.string])),
|
|
11
|
+
m: {
|
|
12
|
+
a: (0, typebox_1.optional)(typebox_1.string),
|
|
13
|
+
b: typebox_1.number,
|
|
14
|
+
c: {
|
|
15
|
+
d: typebox_1.string,
|
|
16
|
+
e: typebox_1.number
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
200: {
|
|
21
|
+
j: typebox_1.string
|
|
22
|
+
},
|
|
23
|
+
m: {
|
|
24
|
+
a: true
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const two = (0, typebox_1.array)({
|
|
28
|
+
name: {
|
|
29
|
+
j: (0, typebox_1.union)([typebox_1.string, typebox_1.number, typebox_1.date, typebox_1.boolean, typebox_1.bigint, typebox_1.empty, typebox_1.symbol, typebox_1.never]),
|
|
30
|
+
t: (0, typebox_1.optional)((0, typebox_1.union)([(0, typebox_1.array)({
|
|
31
|
+
y: (0, typebox_1.array)(typebox_1.number)
|
|
32
|
+
}), typebox_1.string])),
|
|
33
|
+
m: (0, typebox_1.schemify)({
|
|
34
|
+
a: (0, typebox_1.optional)(typebox_1.string),
|
|
35
|
+
b: typebox_1.number,
|
|
36
|
+
c: {
|
|
37
|
+
d: typebox_1.string,
|
|
38
|
+
e: typebox_1.number
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
},
|
|
42
|
+
200: {
|
|
43
|
+
j: typebox_1.string
|
|
44
|
+
},
|
|
45
|
+
m: {
|
|
46
|
+
a: true
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const three = (0, typebox_1.schemify)((0, typebox_1.array)((0, typebox_1.schemify)({
|
|
50
|
+
name: (0, typebox_1.schemify)({
|
|
51
|
+
j: (0, typebox_1.union)([typebox_1.string, typebox_1.number, typebox_1.date, typebox_1.boolean, typebox_1.bigint, typebox_1.empty, typebox_1.symbol, typebox_1.never]),
|
|
52
|
+
t: (0, typebox_1.optional)((0, typebox_1.union)([(0, typebox_1.array)({
|
|
53
|
+
y: (0, typebox_1.array)(typebox_1.number)
|
|
54
|
+
}), typebox_1.string])),
|
|
55
|
+
m: (0, typebox_1.schemify)({
|
|
56
|
+
a: (0, typebox_1.optional)(typebox_1.string),
|
|
57
|
+
b: typebox_1.number,
|
|
58
|
+
c: {
|
|
59
|
+
d: typebox_1.string,
|
|
60
|
+
e: typebox_1.number
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
|
+
}),
|
|
64
|
+
200: (0, typebox_1.schemify)({
|
|
65
|
+
j: typebox_1.string
|
|
66
|
+
}),
|
|
67
|
+
m: (0, typebox_1.schemify)({
|
|
68
|
+
a: true
|
|
69
|
+
})
|
|
70
|
+
})));
|
|
71
|
+
function assert() { }
|
|
72
|
+
exports.assert = assert;
|
|
73
|
+
assert();
|
|
74
|
+
assert();
|
|
75
|
+
assert();
|
|
76
|
+
const shortOne = {
|
|
77
|
+
s: typebox_1.string,
|
|
78
|
+
non: typebox_1.number
|
|
79
|
+
};
|
|
80
|
+
const shortTwo = (0, typebox_1.schemify)({
|
|
81
|
+
s: typebox_1.string,
|
|
82
|
+
non: typebox_1.number
|
|
83
|
+
});
|
|
84
|
+
assert();
|
|
85
|
+
//# sourceMappingURL=equality.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equality.test.js","sourceRoot":"","sources":["../../../tests/typebox/equality.test.ts"],"names":[],"mappings":";;;AACA,2CAAsJ;A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,EAAE,gBAAM;IACT,GAAG,EAAE,gBAAM;CACd,CAAC,CAAA;AAEF,MAAM,EAAgH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const typebox_1 = require("../../typebox");
|
|
4
|
+
const deepOne = {
|
|
5
|
+
s: {
|
|
6
|
+
s: {
|
|
7
|
+
s: {
|
|
8
|
+
s: {
|
|
9
|
+
s: {
|
|
10
|
+
s: {
|
|
11
|
+
s: {
|
|
12
|
+
s: {
|
|
13
|
+
s: {
|
|
14
|
+
s: {
|
|
15
|
+
s: {
|
|
16
|
+
s: {
|
|
17
|
+
s: {
|
|
18
|
+
s: {
|
|
19
|
+
b: "number"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const deepTwo = {
|
|
36
|
+
k: {
|
|
37
|
+
o: typebox_1.number,
|
|
38
|
+
s: {
|
|
39
|
+
s: {
|
|
40
|
+
s: {
|
|
41
|
+
s: {
|
|
42
|
+
s: {
|
|
43
|
+
s: {
|
|
44
|
+
s: {
|
|
45
|
+
s: {
|
|
46
|
+
s: {
|
|
47
|
+
s: {
|
|
48
|
+
s: {
|
|
49
|
+
s: {
|
|
50
|
+
s: {
|
|
51
|
+
b: typebox_1.string
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const deepUnion = (0, typebox_1.union)([deepOne, deepTwo]);
|
|
68
|
+
const realistic = (0, typebox_1.array)({
|
|
69
|
+
level1: {
|
|
70
|
+
name: {
|
|
71
|
+
j: (0, typebox_1.union)([typebox_1.string, typebox_1.number, typebox_1.date, typebox_1.boolean, typebox_1.bigint, typebox_1.empty, typebox_1.symbol, typebox_1.never]),
|
|
72
|
+
t: (0, typebox_1.optional)((0, typebox_1.union)([(0, typebox_1.array)({
|
|
73
|
+
y: (0, typebox_1.array)(typebox_1.number)
|
|
74
|
+
}), typebox_1.string])),
|
|
75
|
+
m: {
|
|
76
|
+
a: (0, typebox_1.optional)(typebox_1.string),
|
|
77
|
+
b: typebox_1.number,
|
|
78
|
+
c: {
|
|
79
|
+
d: typebox_1.string,
|
|
80
|
+
e: typebox_1.number,
|
|
81
|
+
f: {
|
|
82
|
+
g: typebox_1.string,
|
|
83
|
+
h: typebox_1.number,
|
|
84
|
+
i: {
|
|
85
|
+
j: typebox_1.string,
|
|
86
|
+
k: typebox_1.number,
|
|
87
|
+
l: {
|
|
88
|
+
m: typebox_1.boolean,
|
|
89
|
+
n: (0, typebox_1.array)(typebox_1.string),
|
|
90
|
+
o: (0, typebox_1.optional)((0, typebox_1.union)([typebox_1.string, typebox_1.number])),
|
|
91
|
+
p: {
|
|
92
|
+
q: typebox_1.string,
|
|
93
|
+
r: typebox_1.number
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
additionalField1: {
|
|
102
|
+
a: (0, typebox_1.union)([typebox_1.string, typebox_1.boolean, typebox_1.bigint, typebox_1.empty]),
|
|
103
|
+
b: (0, typebox_1.optional)((0, typebox_1.array)(typebox_1.number)),
|
|
104
|
+
c: {
|
|
105
|
+
d: typebox_1.string,
|
|
106
|
+
e: typebox_1.number,
|
|
107
|
+
f: {
|
|
108
|
+
g: typebox_1.string,
|
|
109
|
+
h: typebox_1.number
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
additionalField2: {
|
|
114
|
+
x: typebox_1.string,
|
|
115
|
+
y: (0, typebox_1.union)([typebox_1.string, (0, typebox_1.array)(typebox_1.boolean)]),
|
|
116
|
+
z: {
|
|
117
|
+
a: typebox_1.string,
|
|
118
|
+
b: typebox_1.number
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
code: {
|
|
123
|
+
200: {
|
|
124
|
+
j: typebox_1.string
|
|
125
|
+
},
|
|
126
|
+
404: {
|
|
127
|
+
k: typebox_1.string
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
flag: {
|
|
131
|
+
a: true,
|
|
132
|
+
b: false
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
//# sourceMappingURL=largeSchema.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"largeSchema.test.js","sourceRoot":"","sources":["../../../tests/typebox/largeSchema.test.ts"],"names":[],"mappings":";;AACA,2CAA4I;AAE5I,MAAM,OAAO,GAAG;IACZ,CAAC,EAAE;QACC,CAAC,EAAE;YACC,CAAC,EAAE;gBACC,CAAC,EAAE;oBACC,CAAC,EAAE;wBACC,CAAC,EAAE;4BACC,CAAC,EAAE;gCACC,CAAC,EAAE;oCACC,CAAC,EAAE;wCACC,CAAC,EAAC;4CACE,CAAC,EAAE;gDACC,CAAC,EAAE;oDACC,CAAC,EAAE;wDACC,CAAC,EAAE;4DACC,CAAC,EAAE,QAAiB;yDACvB;qDACJ;iDACJ;6CACJ;yCACJ;qCACJ;iCACJ;6BACJ;yBACJ;qBACJ;iBACJ;aACJ;SACJ;KACJ;CACJ,CAAA;AAGD,MAAM,OAAO,GAAG;IACZ,CAAC,EAAE;QACC,CAAC,EAAE,gBAAM;QACT,CAAC,EAAE;YACC,CAAC,EAAE;gBACC,CAAC,EA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,EAAC,IAAA,eAAK,EAAC,CAAC,gBAAM,EAAE,gBAAM,CAAC,CAAC,CAAC;gCACpC,CAAC,EAAE;oCACC,CAAC,EAAE,gBAAM;oCACT,CAAC,EAAE,gBAAM;iCACZ;6BACJ;yBACJ;qBACJ;iBACJ;aACJ;SACJ;QACD,gBAAgB,EAAE;YACd,CAAC,EAAE,IAAA,eAAK,EAAC,CAAC,gBAAM,EAAE,iBAAO,EAAE,gBAAM,EAAE,eAAK,CAAC,CAAC;YAC1C,CAAC,EAAE,IAAA,kBAAQ,EAAC,IAAA,eAAK,EAAC,gBAAM,CAAC,CAAC;YAC1B,CAAC,EAAE;gBACC,CAAC,EAAE,gBAAM;gBACT,CAAC,EAAE,gBAAM;gBACT,CAAC,EAAE;oBACC,CAAC,EAAE,gBAAM;oBACT,CAAC,EAAE,gBAAM;iBACZ;aACJ;SACJ;QACD,gBAAgB,EAAE;YACd,CAAC,EAAE,gBAAM;YACT,CAAC,EAAE,IAAA,eAAK,EAAC,CAAC,gBAAM,EAAE,IAAA,eAAK,EAAC,iBAAO,CAAC,CAAC,CAAC;YAClC,CAAC,EAAE;gBACC,CAAC,EAAE,gBAAM;gBACT,CAAC,EAAE,gBAAM;aACZ;SACJ;KACJ;IACD,IAAI,EAAE;QACF,GAAG,EAAE;YACD,CAAC,EAAE,gBAAM;SACZ;QACD,GAAG,EAAE;YACD,CAAC,EAAE,gBAAM;SACZ;KACJ;IACD,IAAI,EAAE;QACF,CAAC,EAAE,IAAa;QAChB,CAAC,EAAE,KAAc;KACpB;CACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assert<T extends never>(): void;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.assert = void 0;
|
|
4
|
+
const zod_1 = require("../../zod");
|
|
5
|
+
const one = (0, zod_1.array)({
|
|
6
|
+
name: {
|
|
7
|
+
j: (0, zod_1.union)([zod_1.string, zod_1.number, zod_1.date, zod_1.boolean, zod_1.bigint, zod_1.empty, zod_1.symbol, zod_1.never]),
|
|
8
|
+
t: (0, zod_1.optional)((0, zod_1.union)([(0, zod_1.array)({
|
|
9
|
+
y: (0, zod_1.array)(zod_1.number)
|
|
10
|
+
}), zod_1.string])),
|
|
11
|
+
m: {
|
|
12
|
+
a: (0, zod_1.optional)(zod_1.string),
|
|
13
|
+
b: zod_1.number,
|
|
14
|
+
c: {
|
|
15
|
+
d: zod_1.string,
|
|
16
|
+
e: zod_1.number
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
200: {
|
|
21
|
+
j: zod_1.string
|
|
22
|
+
},
|
|
23
|
+
m: {
|
|
24
|
+
a: true
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const two = (0, zod_1.array)({
|
|
28
|
+
name: {
|
|
29
|
+
j: (0, zod_1.union)([zod_1.string, zod_1.number, zod_1.date, zod_1.boolean, zod_1.bigint, zod_1.empty, zod_1.symbol, zod_1.never]),
|
|
30
|
+
t: (0, zod_1.optional)((0, zod_1.union)([(0, zod_1.array)({
|
|
31
|
+
y: (0, zod_1.array)(zod_1.number)
|
|
32
|
+
}), zod_1.string])),
|
|
33
|
+
m: (0, zod_1.schemify)({
|
|
34
|
+
a: (0, zod_1.optional)(zod_1.string),
|
|
35
|
+
b: zod_1.number,
|
|
36
|
+
c: {
|
|
37
|
+
d: zod_1.string,
|
|
38
|
+
e: zod_1.number
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
},
|
|
42
|
+
200: {
|
|
43
|
+
j: zod_1.string
|
|
44
|
+
},
|
|
45
|
+
m: {
|
|
46
|
+
a: true
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const three = (0, zod_1.schemify)((0, zod_1.array)((0, zod_1.schemify)({
|
|
50
|
+
name: (0, zod_1.schemify)({
|
|
51
|
+
j: (0, zod_1.union)([zod_1.string, zod_1.number, zod_1.date, zod_1.boolean, zod_1.bigint, zod_1.empty, zod_1.symbol, zod_1.never]),
|
|
52
|
+
t: (0, zod_1.optional)((0, zod_1.union)([(0, zod_1.array)({
|
|
53
|
+
y: (0, zod_1.array)(zod_1.number)
|
|
54
|
+
}), zod_1.string])),
|
|
55
|
+
m: (0, zod_1.schemify)({
|
|
56
|
+
a: (0, zod_1.optional)(zod_1.string),
|
|
57
|
+
b: zod_1.number,
|
|
58
|
+
c: {
|
|
59
|
+
d: zod_1.string,
|
|
60
|
+
e: zod_1.number
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
|
+
}),
|
|
64
|
+
200: (0, zod_1.schemify)({
|
|
65
|
+
j: zod_1.string
|
|
66
|
+
}),
|
|
67
|
+
m: (0, zod_1.schemify)({
|
|
68
|
+
a: true
|
|
69
|
+
})
|
|
70
|
+
})));
|
|
71
|
+
function assert() { }
|
|
72
|
+
exports.assert = assert;
|
|
73
|
+
assert();
|
|
74
|
+
assert();
|
|
75
|
+
assert();
|
|
76
|
+
const shortOne = {
|
|
77
|
+
s: zod_1.string,
|
|
78
|
+
non: zod_1.number
|
|
79
|
+
};
|
|
80
|
+
const shortTwo = (0, zod_1.schemify)({
|
|
81
|
+
s: zod_1.string,
|
|
82
|
+
non: zod_1.number
|
|
83
|
+
});
|
|
84
|
+
assert();
|
|
85
|
+
//# sourceMappingURL=equality.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equality.test.js","sourceRoot":"","sources":["../../../tests/zod/equality.test.ts"],"names":[],"mappings":";;;AACA,mCAA8I;AAE9I,MAAM,GAAG,GAAG,IAAA,WAAK,EAAC;IACd,IAAI,EAAE;QACF,CAAC,EAAE,IAAA,WAAK,EAAC,CAAC,YAAM,EAAE,YAAM,EAAE,UAAI,EAAE,aAAO,EAAE,YAAM,EAAE,WAAK,EAAE,YAAM,EAAE,WAAK,CAAC,CAAC;QACvE,CAAC,EAAE,IAAA,cAAQ,EAAC,IAA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K,EAAC,CAAC,YAAM,EAAE,YAAM,EAAE,UAAI,EAAE,aAAO,EAAE,YAAM,EAAE,WAAK,EAAE,YAAM,EAAE,WAAK,CAAC,CAAC;QACvE,CAAC,EAAE,IAAA,cAAQ,EAAC,IAAA,WAAK,EAAC,CAAC,IAAA,WAAK,EAAC;gBACrB,CAAC,EAAE,IAAA,WAAK,EAAC,YAAM,CAAC;aACnB,CAAC,EAAE,YAAM,CAAC,CAAC,CAAC;QACb,CAAC,EAAE,IAAA,cAAQ,EAAC;YACR,CAAC,EAAE,IAAA,cAAQ,EAAC,YAAM,CAAC;YACnB,CAAC,EAAE,YAAM;YACT,CAAC,EAAE;gBACC,CAAC,EAAE,YAAM;gBACT,CAAC,EAAE,YAAM;aACZ;SACJ,CAAC;KACL,CAAC;IACF,GAAG,EAAE,IAAA,cAAQ,EAAC;QACV,CAAC,EAAE,YAAM;KACZ,CAAC;IACF,CAAC,EAAE,IAAA,cAAQ,EAAC;QACR,CAAC,EAAE,IAAa;KACnB,CAAC;CACL,CAAC,CAAC,CAAC,CAAA;AAEJ,SAAgB,MAAM,KAAqB,CAAC;AAA5C,wBAA4C;AAO5C,MAAM,EAAkC,CAAC;AACzC,MAAM,EAAoC,CAAC;AAC3C,MAAM,EAAoC,CAAC;AAE3C,MAAM,QAAQ,GAAG;IACb,CAAC,EAAE,YAAM;IACT,GAAG,EAAE,YAAM;CACd,CAAA;AAED,MAAM,QAAQ,GAAG,IAAA,cAAQ,EAAC;IACtB,CAAC,EAAE,YAAM;IACT,GAAG,EAAE,YAAM;CACd,CAAC,CAAA;AAEF,MAAM,EAAwG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const zod_1 = require("../../zod");
|
|
4
|
+
const deepOne = {
|
|
5
|
+
s: {
|
|
6
|
+
s: {
|
|
7
|
+
s: {
|
|
8
|
+
s: {
|
|
9
|
+
s: {
|
|
10
|
+
s: {
|
|
11
|
+
s: {
|
|
12
|
+
s: {
|
|
13
|
+
s: {
|
|
14
|
+
s: {
|
|
15
|
+
s: {
|
|
16
|
+
s: {
|
|
17
|
+
s: {
|
|
18
|
+
s: {
|
|
19
|
+
b: "number"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const deepTwo = {
|
|
36
|
+
k: {
|
|
37
|
+
o: zod_1.number,
|
|
38
|
+
s: {
|
|
39
|
+
s: {
|
|
40
|
+
s: {
|
|
41
|
+
s: {
|
|
42
|
+
s: {
|
|
43
|
+
s: {
|
|
44
|
+
s: {
|
|
45
|
+
s: {
|
|
46
|
+
s: {
|
|
47
|
+
s: {
|
|
48
|
+
s: {
|
|
49
|
+
s: {
|
|
50
|
+
s: {
|
|
51
|
+
b: zod_1.string
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const deepUnion = (0, zod_1.union)([deepOne, deepTwo]);
|
|
68
|
+
const realistic = (0, zod_1.array)({
|
|
69
|
+
level1: {
|
|
70
|
+
name: {
|
|
71
|
+
j: (0, zod_1.union)([zod_1.string, zod_1.number, zod_1.date, zod_1.boolean, zod_1.bigint, zod_1.empty, zod_1.symbol, zod_1.never]),
|
|
72
|
+
t: (0, zod_1.optional)((0, zod_1.union)([(0, zod_1.array)({
|
|
73
|
+
y: (0, zod_1.array)(zod_1.number)
|
|
74
|
+
}), zod_1.string])),
|
|
75
|
+
m: {
|
|
76
|
+
a: (0, zod_1.optional)(zod_1.string),
|
|
77
|
+
b: zod_1.number,
|
|
78
|
+
c: {
|
|
79
|
+
d: zod_1.string,
|
|
80
|
+
e: zod_1.number,
|
|
81
|
+
f: {
|
|
82
|
+
g: zod_1.string,
|
|
83
|
+
h: zod_1.number,
|
|
84
|
+
i: {
|
|
85
|
+
j: zod_1.string,
|
|
86
|
+
k: zod_1.number,
|
|
87
|
+
l: {
|
|
88
|
+
m: zod_1.boolean,
|
|
89
|
+
n: (0, zod_1.array)(zod_1.string),
|
|
90
|
+
o: (0, zod_1.optional)((0, zod_1.union)([zod_1.string, zod_1.number])),
|
|
91
|
+
p: {
|
|
92
|
+
q: zod_1.string,
|
|
93
|
+
r: zod_1.number
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
additionalField1: {
|
|
102
|
+
a: (0, zod_1.union)([zod_1.string, zod_1.boolean, zod_1.bigint, zod_1.empty]),
|
|
103
|
+
b: (0, zod_1.optional)((0, zod_1.array)(zod_1.number)),
|
|
104
|
+
c: {
|
|
105
|
+
d: zod_1.string,
|
|
106
|
+
e: zod_1.number,
|
|
107
|
+
f: {
|
|
108
|
+
g: zod_1.string,
|
|
109
|
+
h: zod_1.number
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
additionalField2: {
|
|
114
|
+
x: zod_1.string,
|
|
115
|
+
y: (0, zod_1.union)([zod_1.string, (0, zod_1.array)(zod_1.boolean)]),
|
|
116
|
+
z: {
|
|
117
|
+
a: zod_1.string,
|
|
118
|
+
b: zod_1.number
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
code: {
|
|
123
|
+
200: {
|
|
124
|
+
j: zod_1.string
|
|
125
|
+
},
|
|
126
|
+
404: {
|
|
127
|
+
k: zod_1.string
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
flag: {
|
|
131
|
+
a: true,
|
|
132
|
+
b: false
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
//# sourceMappingURL=largeSchema.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"largeSchema.test.js","sourceRoot":"","sources":["../../../tests/zod/largeSchema.test.ts"],"names":[],"mappings":";;AACA,mCAAoI;AAEpI,MAAM,OAAO,GAAG;IACZ,CAAC,EAAE;QACC,CAAC,EAAE;YACC,CAAC,EAAE;gBACC,CAAC,EAAE;oBACC,CAAC,EAAE;wBACC,CAAC,EAAE;4BACC,CAAC,EAAE;gCACC,CAAC,EAAE;oCACC,CAAC,EAAE;wCACC,CAAC,EAAC;4CACE,CAAC,EAAE;gDACC,CAAC,EAAE;oDACC,CAAC,EAAE;wDACC,CAAC,EAAE;4DACC,CAAC,EAAE,QAAiB;yDACvB;qDACJ;iDACJ;6CACJ;yCACJ;qCACJ;iCACJ;6BACJ;yBACJ;qBACJ;iBACJ;aACJ;SACJ;KACJ;CACJ,CAAA;AAGD,MAAM,OAAO,GAAG;IACZ,CAAC,EAAE;QACC,CAAC,EAAE,YAAM;QACT,CAAC,EAAE;YACC,CAAC,EAAE;gBACC,CAAC,EAAE;oBACC,CAAC,EAAE;wBACC,CAAC,EAAE;4BACC,CAAC,EAAE;gCACC,CAAC,EAAE;oCACC,CAAC,EAAE;wCACC,CAAC,EAAC;4CACE,CAAC,EAAE;gDACC,CAAC,EAAE;oDACC,CAAC,EAAE;wDACC,CAAC,EAAE;4DACC,CAAC,EAAE,YAAM;yDACZ;qDACJ;iDACJ;6CACJ;yCACJ;qCACJ;iCACJ;6BACJ;yBACJ;qBACJ;iBACJ;aACJ;SACJ;KACJ;CACJ,CAAA;AAED,MAAM,SAAS,GAAG,IAAA,WAAK,EAAC,CAAC,OAAO,EAAE,OAAO,C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