zod 3.26.0-canary.20250616T185210 → 3.26.0-canary.20250618T044324
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/cjs/v3/locales/en.js +2 -0
- package/dist/cjs/v4/classic/schemas.js +12 -5
- package/dist/cjs/v4/core/api.js +17 -0
- package/dist/cjs/v4/core/checks.js +20 -17
- package/dist/cjs/v4/core/schemas.js +16 -2
- package/dist/cjs/v4/mini/schemas.js +11 -2
- package/dist/esm/v3/locales/en.js +2 -0
- package/dist/esm/v4/classic/schemas.js +9 -3
- package/dist/esm/v4/core/api.js +16 -0
- package/dist/esm/v4/core/checks.js +20 -17
- package/dist/esm/v4/core/schemas.js +14 -0
- package/dist/esm/v4/mini/schemas.js +8 -0
- package/dist/types/v4/classic/schemas.d.ts +9 -4
- package/dist/types/v4/core/api.d.ts +3 -0
- package/dist/types/v4/core/checks.d.ts +2 -2
- package/dist/types/v4/core/schemas.d.ts +18 -8
- package/dist/types/v4/mini/schemas.d.ts +9 -4
- package/package.json +1 -1
|
@@ -69,6 +69,8 @@ const errorMap = (issue, _ctx) => {
|
|
|
69
69
|
message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
|
|
70
70
|
else if (issue.type === "number")
|
|
71
71
|
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
|
|
72
|
+
else if (issue.type === "bigint")
|
|
73
|
+
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
|
|
72
74
|
else if (issue.type === "date")
|
|
73
75
|
message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
|
|
74
76
|
else
|
|
@@ -23,8 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
27
|
-
exports.stringbool = exports.ZodCustom = exports.ZodPromise = exports.ZodLazy = exports.ZodTemplateLiteral = exports.ZodReadonly = exports.ZodPipe = exports.ZodNaN = exports.ZodCatch = exports.ZodSuccess = exports.ZodNonOptional = exports.ZodPrefault = exports.ZodDefault = exports.ZodNullable = void 0;
|
|
26
|
+
exports.ZodTransform = exports.ZodFile = exports.ZodLiteral = exports.ZodEnum = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodUnion = exports.ZodObject = exports.ZodArray = exports.ZodDate = exports.ZodVoid = exports.ZodNever = exports.ZodUnknown = exports.ZodAny = exports.ZodNull = exports.ZodUndefined = exports.ZodSymbol = exports.ZodBigIntFormat = exports.ZodBigInt = exports.ZodBoolean = exports.ZodNumberFormat = exports.ZodNumber = exports.ZodCustomStringFormat = exports.ZodJWT = exports.ZodE164 = exports.ZodBase64URL = exports.ZodBase64 = exports.ZodCIDRv6 = exports.ZodCIDRv4 = exports.ZodIPv6 = exports.ZodIPv4 = exports.ZodKSUID = exports.ZodXID = exports.ZodULID = exports.ZodCUID2 = exports.ZodCUID = exports.ZodNanoID = exports.ZodEmoji = exports.ZodURL = exports.ZodUUID = exports.ZodGUID = exports.ZodEmail = exports.ZodStringFormat = exports.ZodString = exports._ZodString = exports.ZodType = void 0;
|
|
27
|
+
exports.stringbool = exports.ZodCustom = exports.ZodPromise = exports.ZodLazy = exports.ZodTemplateLiteral = exports.ZodReadonly = exports.ZodPipe = exports.ZodNaN = exports.ZodCatch = exports.ZodSuccess = exports.ZodNonOptional = exports.ZodPrefault = exports.ZodDefault = exports.ZodNullable = exports.ZodOptional = void 0;
|
|
28
28
|
exports.string = string;
|
|
29
29
|
exports.email = email;
|
|
30
30
|
exports.guid = guid;
|
|
@@ -48,6 +48,7 @@ exports.base64 = base64;
|
|
|
48
48
|
exports.base64url = base64url;
|
|
49
49
|
exports.e164 = e164;
|
|
50
50
|
exports.jwt = jwt;
|
|
51
|
+
exports.stringFormat = stringFormat;
|
|
51
52
|
exports.number = number;
|
|
52
53
|
exports.int = int;
|
|
53
54
|
exports.float32 = float32;
|
|
@@ -407,6 +408,14 @@ exports.ZodJWT = core.$constructor("ZodJWT", (inst, def) => {
|
|
|
407
408
|
function jwt(params) {
|
|
408
409
|
return core._jwt(exports.ZodJWT, params);
|
|
409
410
|
}
|
|
411
|
+
exports.ZodCustomStringFormat = core.$constructor("ZodCustomStringFormat", (inst, def) => {
|
|
412
|
+
// ZodStringFormat.init(inst, def);
|
|
413
|
+
core.$ZodCustomStringFormat.init(inst, def);
|
|
414
|
+
exports.ZodStringFormat.init(inst, def);
|
|
415
|
+
});
|
|
416
|
+
function stringFormat(format, fnOrRegex, _params = {}) {
|
|
417
|
+
return core._stringFormat(exports.ZodCustomStringFormat, format, fnOrRegex, _params);
|
|
418
|
+
}
|
|
410
419
|
exports.ZodNumber = core.$constructor("ZodNumber", (inst, def) => {
|
|
411
420
|
core.$ZodNumber.init(inst, def);
|
|
412
421
|
exports.ZodType.init(inst, def);
|
|
@@ -582,9 +591,7 @@ function keyof(schema) {
|
|
|
582
591
|
exports.ZodObject = core.$constructor("ZodObject", (inst, def) => {
|
|
583
592
|
core.$ZodObject.init(inst, def);
|
|
584
593
|
exports.ZodType.init(inst, def);
|
|
585
|
-
core_1.util.defineLazy(inst, "shape", () =>
|
|
586
|
-
return Object.fromEntries(Object.entries(inst._zod.def.shape));
|
|
587
|
-
});
|
|
594
|
+
core_1.util.defineLazy(inst, "shape", () => def.shape);
|
|
588
595
|
inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
|
|
589
596
|
inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall: catchall });
|
|
590
597
|
inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
|
package/dist/cjs/v4/core/api.js
CHANGED
|
@@ -136,6 +136,7 @@ exports._promise = _promise;
|
|
|
136
136
|
exports._custom = _custom;
|
|
137
137
|
exports._refine = _refine;
|
|
138
138
|
exports._stringbool = _stringbool;
|
|
139
|
+
exports._stringFormat = _stringFormat;
|
|
139
140
|
const checks = __importStar(require("./checks.js"));
|
|
140
141
|
const schemas = __importStar(require("./schemas.js"));
|
|
141
142
|
const util = __importStar(require("./util.js"));
|
|
@@ -1019,3 +1020,19 @@ function _stringbool(Classes, _params) {
|
|
|
1019
1020
|
});
|
|
1020
1021
|
return outerPipe;
|
|
1021
1022
|
}
|
|
1023
|
+
function _stringFormat(Class, format, fnOrRegex, _params = {}) {
|
|
1024
|
+
const params = util.normalizeParams(_params);
|
|
1025
|
+
const def = {
|
|
1026
|
+
...util.normalizeParams(_params),
|
|
1027
|
+
check: "string_format",
|
|
1028
|
+
type: "string",
|
|
1029
|
+
format,
|
|
1030
|
+
fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
|
|
1031
|
+
...params,
|
|
1032
|
+
};
|
|
1033
|
+
if (fnOrRegex instanceof RegExp) {
|
|
1034
|
+
def.pattern = fnOrRegex;
|
|
1035
|
+
}
|
|
1036
|
+
const inst = new Class(def);
|
|
1037
|
+
return inst;
|
|
1038
|
+
}
|
|
@@ -403,7 +403,9 @@ exports.$ZodCheckLengthEquals = core.$constructor("$ZodCheckLengthEquals", (inst
|
|
|
403
403
|
const tooBig = length > def.length;
|
|
404
404
|
payload.issues.push({
|
|
405
405
|
origin,
|
|
406
|
-
...(tooBig
|
|
406
|
+
...(tooBig
|
|
407
|
+
? { code: "too_big", maximum: def.length, exact: true }
|
|
408
|
+
: { code: "too_small", minimum: def.length, exact: true }),
|
|
407
409
|
input: payload.value,
|
|
408
410
|
inst,
|
|
409
411
|
continue: !def.abort,
|
|
@@ -411,7 +413,7 @@ exports.$ZodCheckLengthEquals = core.$constructor("$ZodCheckLengthEquals", (inst
|
|
|
411
413
|
};
|
|
412
414
|
});
|
|
413
415
|
exports.$ZodCheckStringFormat = core.$constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
414
|
-
var _a;
|
|
416
|
+
var _a, _b;
|
|
415
417
|
exports.$ZodCheck.init(inst, def);
|
|
416
418
|
inst._zod.onattach.push((inst) => {
|
|
417
419
|
const bag = inst._zod.bag;
|
|
@@ -421,22 +423,23 @@ exports.$ZodCheckStringFormat = core.$constructor("$ZodCheckStringFormat", (inst
|
|
|
421
423
|
bag.patterns.add(def.pattern);
|
|
422
424
|
}
|
|
423
425
|
});
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
426
|
+
if (def.pattern)
|
|
427
|
+
(_a = inst._zod).check ?? (_a.check = (payload) => {
|
|
428
|
+
def.pattern.lastIndex = 0;
|
|
429
|
+
if (def.pattern.test(payload.value))
|
|
430
|
+
return;
|
|
431
|
+
payload.issues.push({
|
|
432
|
+
origin: "string",
|
|
433
|
+
code: "invalid_format",
|
|
434
|
+
format: def.format,
|
|
435
|
+
input: payload.value,
|
|
436
|
+
...(def.pattern ? { pattern: def.pattern.toString() } : {}),
|
|
437
|
+
inst,
|
|
438
|
+
continue: !def.abort,
|
|
439
|
+
});
|
|
438
440
|
});
|
|
439
|
-
|
|
441
|
+
else
|
|
442
|
+
(_b = inst._zod).check ?? (_b.check = () => { });
|
|
440
443
|
});
|
|
441
444
|
exports.$ZodCheckRegex = core.$constructor("$ZodCheckRegex", (inst, def) => {
|
|
442
445
|
exports.$ZodCheckStringFormat.init(inst, def);
|
|
@@ -23,8 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.$
|
|
27
|
-
exports.$ZodCustom = exports.$ZodLazy = exports.$ZodPromise = exports.$ZodTemplateLiteral = exports.$ZodReadonly = exports.$ZodPipe = exports.$ZodNaN = exports.$ZodCatch = exports.$ZodSuccess = exports.$ZodNonOptional = exports.$ZodPrefault = exports.$ZodDefault = exports.$ZodNullable = exports.$ZodOptional = exports.$ZodTransform = exports.$ZodFile = exports.$ZodLiteral = void 0;
|
|
26
|
+
exports.$ZodSet = exports.$ZodMap = exports.$ZodRecord = exports.$ZodTuple = exports.$ZodIntersection = exports.$ZodDiscriminatedUnion = exports.$ZodUnion = exports.$ZodObject = exports.$ZodArray = exports.$ZodDate = exports.$ZodVoid = exports.$ZodNever = exports.$ZodUnknown = exports.$ZodAny = exports.$ZodNull = exports.$ZodUndefined = exports.$ZodSymbol = exports.$ZodBigIntFormat = exports.$ZodBigInt = exports.$ZodBoolean = exports.$ZodNumberFormat = exports.$ZodNumber = exports.$ZodCustomStringFormat = exports.$ZodJWT = exports.$ZodE164 = exports.$ZodBase64URL = exports.$ZodBase64 = exports.$ZodCIDRv6 = exports.$ZodCIDRv4 = exports.$ZodIPv6 = exports.$ZodIPv4 = exports.$ZodISODuration = exports.$ZodISOTime = exports.$ZodISODate = exports.$ZodISODateTime = exports.$ZodKSUID = exports.$ZodXID = exports.$ZodULID = exports.$ZodCUID2 = exports.$ZodCUID = exports.$ZodNanoID = exports.$ZodEmoji = exports.$ZodURL = exports.$ZodEmail = exports.$ZodUUID = exports.$ZodGUID = exports.$ZodStringFormat = exports.$ZodString = exports.clone = exports.$ZodType = void 0;
|
|
27
|
+
exports.$ZodCustom = exports.$ZodLazy = exports.$ZodPromise = exports.$ZodTemplateLiteral = exports.$ZodReadonly = exports.$ZodPipe = exports.$ZodNaN = exports.$ZodCatch = exports.$ZodSuccess = exports.$ZodNonOptional = exports.$ZodPrefault = exports.$ZodDefault = exports.$ZodNullable = exports.$ZodOptional = exports.$ZodTransform = exports.$ZodFile = exports.$ZodLiteral = exports.$ZodEnum = void 0;
|
|
28
28
|
exports.isValidBase64 = isValidBase64;
|
|
29
29
|
exports.isValidBase64URL = isValidBase64URL;
|
|
30
30
|
exports.isValidJWT = isValidJWT;
|
|
@@ -434,6 +434,20 @@ exports.$ZodJWT = core.$constructor("$ZodJWT", (inst, def) => {
|
|
|
434
434
|
});
|
|
435
435
|
};
|
|
436
436
|
});
|
|
437
|
+
exports.$ZodCustomStringFormat = core.$constructor("$ZodCustomStringFormat", (inst, def) => {
|
|
438
|
+
exports.$ZodStringFormat.init(inst, def);
|
|
439
|
+
inst._zod.check = (payload) => {
|
|
440
|
+
if (def.fn(payload.value))
|
|
441
|
+
return;
|
|
442
|
+
payload.issues.push({
|
|
443
|
+
code: "invalid_format",
|
|
444
|
+
format: def.format,
|
|
445
|
+
input: payload.value,
|
|
446
|
+
inst,
|
|
447
|
+
continue: !def.abort,
|
|
448
|
+
});
|
|
449
|
+
};
|
|
450
|
+
});
|
|
437
451
|
exports.$ZodNumber = core.$constructor("$ZodNumber", (inst, def) => {
|
|
438
452
|
exports.$ZodType.init(inst, def);
|
|
439
453
|
inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;
|
|
@@ -23,8 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
27
|
-
exports.stringbool = exports.ZodMiniCustom = exports.ZodMiniPromise = exports.ZodMiniLazy = exports.ZodMiniTemplateLiteral = exports.ZodMiniReadonly = exports.ZodMiniPipe = exports.ZodMiniNaN = exports.ZodMiniCatch = exports.ZodMiniSuccess = exports.ZodMiniNonOptional = exports.ZodMiniPrefault = exports.ZodMiniDefault = void 0;
|
|
26
|
+
exports.ZodMiniOptional = exports.ZodMiniTransform = exports.ZodMiniFile = exports.ZodMiniLiteral = exports.ZodMiniEnum = exports.ZodMiniSet = exports.ZodMiniMap = exports.ZodMiniRecord = exports.ZodMiniTuple = exports.ZodMiniIntersection = exports.ZodMiniDiscriminatedUnion = exports.ZodMiniUnion = exports.ZodMiniObject = exports.ZodMiniArray = exports.ZodMiniDate = exports.ZodMiniVoid = exports.ZodMiniNever = exports.ZodMiniUnknown = exports.ZodMiniAny = exports.ZodMiniNull = exports.ZodMiniUndefined = exports.ZodMiniSymbol = exports.ZodMiniBigIntFormat = exports.ZodMiniBigInt = exports.ZodMiniBoolean = exports.ZodMiniNumberFormat = exports.ZodMiniNumber = exports.ZodMiniCustomStringFormat = exports.ZodMiniJWT = exports.ZodMiniE164 = exports.ZodMiniBase64URL = exports.ZodMiniBase64 = exports.ZodMiniCIDRv6 = exports.ZodMiniCIDRv4 = exports.ZodMiniIPv6 = exports.ZodMiniIPv4 = exports.ZodMiniKSUID = exports.ZodMiniXID = exports.ZodMiniULID = exports.ZodMiniCUID2 = exports.ZodMiniCUID = exports.ZodMiniNanoID = exports.ZodMiniEmoji = exports.ZodMiniURL = exports.ZodMiniUUID = exports.ZodMiniGUID = exports.ZodMiniEmail = exports.ZodMiniStringFormat = exports.ZodMiniString = exports.ZodMiniType = void 0;
|
|
27
|
+
exports.stringbool = exports.ZodMiniCustom = exports.ZodMiniPromise = exports.ZodMiniLazy = exports.ZodMiniTemplateLiteral = exports.ZodMiniReadonly = exports.ZodMiniPipe = exports.ZodMiniNaN = exports.ZodMiniCatch = exports.ZodMiniSuccess = exports.ZodMiniNonOptional = exports.ZodMiniPrefault = exports.ZodMiniDefault = exports.ZodMiniNullable = void 0;
|
|
28
28
|
exports.string = string;
|
|
29
29
|
exports.email = email;
|
|
30
30
|
exports.guid = guid;
|
|
@@ -48,6 +48,7 @@ exports.base64 = base64;
|
|
|
48
48
|
exports.base64url = base64url;
|
|
49
49
|
exports.e164 = e164;
|
|
50
50
|
exports.jwt = jwt;
|
|
51
|
+
exports.stringFormat = stringFormat;
|
|
51
52
|
exports.number = number;
|
|
52
53
|
exports.int = int;
|
|
53
54
|
exports.float32 = float32;
|
|
@@ -295,6 +296,13 @@ exports.ZodMiniJWT = core.$constructor("ZodMiniJWT", (inst, def) => {
|
|
|
295
296
|
function jwt(params) {
|
|
296
297
|
return core._jwt(exports.ZodMiniJWT, params);
|
|
297
298
|
}
|
|
299
|
+
exports.ZodMiniCustomStringFormat = core.$constructor("ZodMiniCustomStringFormat", (inst, def) => {
|
|
300
|
+
core.$ZodCustomStringFormat.init(inst, def);
|
|
301
|
+
exports.ZodMiniStringFormat.init(inst, def);
|
|
302
|
+
});
|
|
303
|
+
function stringFormat(format, fnOrRegex, _params = {}) {
|
|
304
|
+
return core._stringFormat(exports.ZodMiniCustomStringFormat, format, fnOrRegex, _params);
|
|
305
|
+
}
|
|
298
306
|
exports.ZodMiniNumber = core.$constructor("ZodMiniNumber", (inst, def) => {
|
|
299
307
|
core.$ZodNumber.init(inst, def);
|
|
300
308
|
exports.ZodMiniType.init(inst, def);
|
|
@@ -427,6 +435,7 @@ function keyof(schema) {
|
|
|
427
435
|
exports.ZodMiniObject = core.$constructor("ZodMiniObject", (inst, def) => {
|
|
428
436
|
core.$ZodObject.init(inst, def);
|
|
429
437
|
exports.ZodMiniType.init(inst, def);
|
|
438
|
+
core_1.util.defineLazy(inst, "shape", () => def.shape);
|
|
430
439
|
});
|
|
431
440
|
function object(shape, params) {
|
|
432
441
|
const def = {
|
|
@@ -67,6 +67,8 @@ const errorMap = (issue, _ctx) => {
|
|
|
67
67
|
message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
|
|
68
68
|
else if (issue.type === "number")
|
|
69
69
|
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
|
|
70
|
+
else if (issue.type === "bigint")
|
|
71
|
+
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
|
|
70
72
|
else if (issue.type === "date")
|
|
71
73
|
message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
|
|
72
74
|
else
|
|
@@ -300,6 +300,14 @@ export const ZodJWT = /*@__PURE__*/ core.$constructor("ZodJWT", (inst, def) => {
|
|
|
300
300
|
export function jwt(params) {
|
|
301
301
|
return core._jwt(ZodJWT, params);
|
|
302
302
|
}
|
|
303
|
+
export const ZodCustomStringFormat = /*@__PURE__*/ core.$constructor("ZodCustomStringFormat", (inst, def) => {
|
|
304
|
+
// ZodStringFormat.init(inst, def);
|
|
305
|
+
core.$ZodCustomStringFormat.init(inst, def);
|
|
306
|
+
ZodStringFormat.init(inst, def);
|
|
307
|
+
});
|
|
308
|
+
export function stringFormat(format, fnOrRegex, _params = {}) {
|
|
309
|
+
return core._stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);
|
|
310
|
+
}
|
|
303
311
|
export const ZodNumber = /*@__PURE__*/ core.$constructor("ZodNumber", (inst, def) => {
|
|
304
312
|
core.$ZodNumber.init(inst, def);
|
|
305
313
|
ZodType.init(inst, def);
|
|
@@ -478,9 +486,7 @@ export function keyof(schema) {
|
|
|
478
486
|
export const ZodObject = /*@__PURE__*/ core.$constructor("ZodObject", (inst, def) => {
|
|
479
487
|
core.$ZodObject.init(inst, def);
|
|
480
488
|
ZodType.init(inst, def);
|
|
481
|
-
util.defineLazy(inst, "shape", () =>
|
|
482
|
-
return Object.fromEntries(Object.entries(inst._zod.def.shape));
|
|
483
|
-
});
|
|
489
|
+
util.defineLazy(inst, "shape", () => def.shape);
|
|
484
490
|
inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
|
|
485
491
|
inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall: catchall });
|
|
486
492
|
inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
|
package/dist/esm/v4/core/api.js
CHANGED
|
@@ -887,3 +887,19 @@ export function _stringbool(Classes, _params) {
|
|
|
887
887
|
});
|
|
888
888
|
return outerPipe;
|
|
889
889
|
}
|
|
890
|
+
export function _stringFormat(Class, format, fnOrRegex, _params = {}) {
|
|
891
|
+
const params = util.normalizeParams(_params);
|
|
892
|
+
const def = {
|
|
893
|
+
...util.normalizeParams(_params),
|
|
894
|
+
check: "string_format",
|
|
895
|
+
type: "string",
|
|
896
|
+
format,
|
|
897
|
+
fn: typeof fnOrRegex === "function" ? fnOrRegex : (val) => fnOrRegex.test(val),
|
|
898
|
+
...params,
|
|
899
|
+
};
|
|
900
|
+
if (fnOrRegex instanceof RegExp) {
|
|
901
|
+
def.pattern = fnOrRegex;
|
|
902
|
+
}
|
|
903
|
+
const inst = new Class(def);
|
|
904
|
+
return inst;
|
|
905
|
+
}
|
|
@@ -377,7 +377,9 @@ export const $ZodCheckLengthEquals = /*@__PURE__*/ core.$constructor("$ZodCheckL
|
|
|
377
377
|
const tooBig = length > def.length;
|
|
378
378
|
payload.issues.push({
|
|
379
379
|
origin,
|
|
380
|
-
...(tooBig
|
|
380
|
+
...(tooBig
|
|
381
|
+
? { code: "too_big", maximum: def.length, exact: true }
|
|
382
|
+
: { code: "too_small", minimum: def.length, exact: true }),
|
|
381
383
|
input: payload.value,
|
|
382
384
|
inst,
|
|
383
385
|
continue: !def.abort,
|
|
@@ -385,7 +387,7 @@ export const $ZodCheckLengthEquals = /*@__PURE__*/ core.$constructor("$ZodCheckL
|
|
|
385
387
|
};
|
|
386
388
|
});
|
|
387
389
|
export const $ZodCheckStringFormat = /*@__PURE__*/ core.$constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
388
|
-
var _a;
|
|
390
|
+
var _a, _b;
|
|
389
391
|
$ZodCheck.init(inst, def);
|
|
390
392
|
inst._zod.onattach.push((inst) => {
|
|
391
393
|
const bag = inst._zod.bag;
|
|
@@ -395,22 +397,23 @@ export const $ZodCheckStringFormat = /*@__PURE__*/ core.$constructor("$ZodCheckS
|
|
|
395
397
|
bag.patterns.add(def.pattern);
|
|
396
398
|
}
|
|
397
399
|
});
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
400
|
+
if (def.pattern)
|
|
401
|
+
(_a = inst._zod).check ?? (_a.check = (payload) => {
|
|
402
|
+
def.pattern.lastIndex = 0;
|
|
403
|
+
if (def.pattern.test(payload.value))
|
|
404
|
+
return;
|
|
405
|
+
payload.issues.push({
|
|
406
|
+
origin: "string",
|
|
407
|
+
code: "invalid_format",
|
|
408
|
+
format: def.format,
|
|
409
|
+
input: payload.value,
|
|
410
|
+
...(def.pattern ? { pattern: def.pattern.toString() } : {}),
|
|
411
|
+
inst,
|
|
412
|
+
continue: !def.abort,
|
|
413
|
+
});
|
|
412
414
|
});
|
|
413
|
-
|
|
415
|
+
else
|
|
416
|
+
(_b = inst._zod).check ?? (_b.check = () => { });
|
|
414
417
|
});
|
|
415
418
|
export const $ZodCheckRegex = /*@__PURE__*/ core.$constructor("$ZodCheckRegex", (inst, def) => {
|
|
416
419
|
$ZodCheckStringFormat.init(inst, def);
|
|
@@ -403,6 +403,20 @@ export const $ZodJWT = /*@__PURE__*/ core.$constructor("$ZodJWT", (inst, def) =>
|
|
|
403
403
|
});
|
|
404
404
|
};
|
|
405
405
|
});
|
|
406
|
+
export const $ZodCustomStringFormat = /*@__PURE__*/ core.$constructor("$ZodCustomStringFormat", (inst, def) => {
|
|
407
|
+
$ZodStringFormat.init(inst, def);
|
|
408
|
+
inst._zod.check = (payload) => {
|
|
409
|
+
if (def.fn(payload.value))
|
|
410
|
+
return;
|
|
411
|
+
payload.issues.push({
|
|
412
|
+
code: "invalid_format",
|
|
413
|
+
format: def.format,
|
|
414
|
+
input: payload.value,
|
|
415
|
+
inst,
|
|
416
|
+
continue: !def.abort,
|
|
417
|
+
});
|
|
418
|
+
};
|
|
419
|
+
});
|
|
406
420
|
export const $ZodNumber = /*@__PURE__*/ core.$constructor("$ZodNumber", (inst, def) => {
|
|
407
421
|
$ZodType.init(inst, def);
|
|
408
422
|
inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;
|
|
@@ -183,6 +183,13 @@ export const ZodMiniJWT = /*@__PURE__*/ core.$constructor("ZodMiniJWT", (inst, d
|
|
|
183
183
|
export function jwt(params) {
|
|
184
184
|
return core._jwt(ZodMiniJWT, params);
|
|
185
185
|
}
|
|
186
|
+
export const ZodMiniCustomStringFormat = /*@__PURE__*/ core.$constructor("ZodMiniCustomStringFormat", (inst, def) => {
|
|
187
|
+
core.$ZodCustomStringFormat.init(inst, def);
|
|
188
|
+
ZodMiniStringFormat.init(inst, def);
|
|
189
|
+
});
|
|
190
|
+
export function stringFormat(format, fnOrRegex, _params = {}) {
|
|
191
|
+
return core._stringFormat(ZodMiniCustomStringFormat, format, fnOrRegex, _params);
|
|
192
|
+
}
|
|
186
193
|
export const ZodMiniNumber = /*@__PURE__*/ core.$constructor("ZodMiniNumber", (inst, def) => {
|
|
187
194
|
core.$ZodNumber.init(inst, def);
|
|
188
195
|
ZodMiniType.init(inst, def);
|
|
@@ -318,6 +325,7 @@ export function keyof(schema) {
|
|
|
318
325
|
export const ZodMiniObject = /*@__PURE__*/ core.$constructor("ZodMiniObject", (inst, def) => {
|
|
319
326
|
core.$ZodObject.init(inst, def);
|
|
320
327
|
ZodMiniType.init(inst, def);
|
|
328
|
+
util.defineLazy(inst, "shape", () => def.shape);
|
|
321
329
|
});
|
|
322
330
|
export function object(shape, params) {
|
|
323
331
|
const def = {
|
|
@@ -151,7 +151,7 @@ export interface ZodString extends _ZodString<core.$ZodStringInternals<string>>
|
|
|
151
151
|
}
|
|
152
152
|
export declare const ZodString: core.$constructor<ZodString>;
|
|
153
153
|
export declare function string(params?: string | core.$ZodStringParams): ZodString;
|
|
154
|
-
export interface ZodStringFormat<Format extends
|
|
154
|
+
export interface ZodStringFormat<Format extends string = string> extends _ZodString<core.$ZodStringFormatInternals<Format>> {
|
|
155
155
|
}
|
|
156
156
|
export declare const ZodStringFormat: core.$constructor<ZodStringFormat>;
|
|
157
157
|
export interface ZodEmail extends ZodStringFormat<"email"> {
|
|
@@ -252,6 +252,11 @@ export interface ZodJWT extends ZodStringFormat<"jwt"> {
|
|
|
252
252
|
}
|
|
253
253
|
export declare const ZodJWT: core.$constructor<ZodJWT>;
|
|
254
254
|
export declare function jwt(params?: string | core.$ZodJWTParams): ZodJWT;
|
|
255
|
+
export interface ZodCustomStringFormat<Format extends string = string> extends ZodStringFormat<Format>, core.$ZodCustomStringFormat<Format> {
|
|
256
|
+
_zod: core.$ZodCustomStringFormatInternals<Format>;
|
|
257
|
+
}
|
|
258
|
+
export declare const ZodCustomStringFormat: core.$constructor<ZodCustomStringFormat>;
|
|
259
|
+
export declare function stringFormat<Format extends string>(format: Format, fnOrRegex: ((arg: string) => util.MaybeAsync<unknown>) | RegExp, _params?: string | core.$ZodStringFormatParams): ZodCustomStringFormat<Format>;
|
|
255
260
|
export interface _ZodNumber<Internals extends core.$ZodNumberInternals = core.$ZodNumberInternals> extends _ZodType<Internals> {
|
|
256
261
|
gt(value: number, params?: string | core.$ZodCheckGreaterThanParams): this;
|
|
257
262
|
/** Identical to .min() */
|
|
@@ -392,10 +397,10 @@ export interface ZodArray<T extends core.SomeType = core.$ZodType> extends _ZodT
|
|
|
392
397
|
}
|
|
393
398
|
export declare const ZodArray: core.$constructor<ZodArray>;
|
|
394
399
|
export declare function array<T extends core.SomeType>(element: T, params?: string | core.$ZodArrayParams): ZodArray<T>;
|
|
395
|
-
export declare function keyof<T extends ZodObject>(schema: T): ZodLiteral<keyof T["_zod"]["output"]
|
|
400
|
+
export declare function keyof<T extends ZodObject>(schema: T): ZodLiteral<Exclude<keyof T["_zod"]["output"], symbol>>;
|
|
396
401
|
export interface ZodObject<
|
|
397
402
|
/** @ts-ignore Cast variance */
|
|
398
|
-
out Shape extends core.$ZodShape = core.$ZodLooseShape, out Config extends core.$ZodObjectConfig = core.$
|
|
403
|
+
out Shape extends core.$ZodShape = core.$ZodLooseShape, out Config extends core.$ZodObjectConfig = core.$strip> extends _ZodType<core.$ZodObjectInternals<Shape, Config>>, core.$ZodObject<Shape, Config> {
|
|
399
404
|
shape: Shape;
|
|
400
405
|
keyof(): ZodEnum<util.ToEnum<keyof Shape & string>>;
|
|
401
406
|
/** Define a schema to validate all unrecognized keys. This overrides the existing strict/loose behavior. */
|
|
@@ -505,7 +510,7 @@ export { _enum as enum };
|
|
|
505
510
|
* ```
|
|
506
511
|
*/
|
|
507
512
|
export declare function nativeEnum<T extends util.EnumLike>(entries: T, params?: string | core.$ZodEnumParams): ZodEnum<T>;
|
|
508
|
-
export interface ZodLiteral<T extends util.
|
|
513
|
+
export interface ZodLiteral<T extends util.Literal = util.Literal> extends _ZodType<core.$ZodLiteralInternals<T>>, core.$ZodLiteral<T> {
|
|
509
514
|
values: Set<T>;
|
|
510
515
|
/** @legacy Use `.values` instead. Accessing this property will throw an error if the literal accepts multiple values. */
|
|
511
516
|
value: T;
|
|
@@ -19,6 +19,8 @@ export type CheckTypeParams<T extends schemas.$ZodType & checks.$ZodCheck = sche
|
|
|
19
19
|
export type $ZodStringParams = TypeParams<schemas.$ZodString<string>, "coerce">;
|
|
20
20
|
export declare function _string<T extends schemas.$ZodString>(Class: util.SchemaClass<T>, params?: string | $ZodStringParams): T;
|
|
21
21
|
export declare function _coercedString<T extends schemas.$ZodString>(Class: util.SchemaClass<T>, params?: string | $ZodStringParams): T;
|
|
22
|
+
export type $ZodStringFormatParams = CheckTypeParams<schemas.$ZodStringFormat, "format" | "coerce">;
|
|
23
|
+
export type $ZodCheckStringFormatParams = CheckParams<checks.$ZodCheckStringFormat, "format">;
|
|
22
24
|
export type $ZodEmailParams = StringFormatParams<schemas.$ZodEmail>;
|
|
23
25
|
export type $ZodCheckEmailParams = CheckStringFormatParams<schemas.$ZodEmail>;
|
|
24
26
|
export declare function _email<T extends schemas.$ZodEmail>(Class: util.SchemaClass<T>, params?: string | $ZodEmailParams | $ZodCheckEmailParams): T;
|
|
@@ -279,3 +281,4 @@ export declare function _stringbool(Classes: {
|
|
|
279
281
|
Transform?: typeof schemas.$ZodTransform;
|
|
280
282
|
String?: typeof schemas.$ZodString;
|
|
281
283
|
}, _params?: string | $ZodStringBoolParams): schemas.$ZodPipe<schemas.$ZodPipe<schemas.$ZodString, schemas.$ZodTransform<boolean, string>>, schemas.$ZodBoolean<boolean>>;
|
|
284
|
+
export declare function _stringFormat<Format extends string>(Class: typeof schemas.$ZodCustomStringFormat, format: Format, fnOrRegex: ((arg: string) => util.MaybeAsync<unknown>) | RegExp, _params?: string | $ZodStringFormatParams): schemas.$ZodCustomStringFormat<Format>;
|
|
@@ -157,7 +157,7 @@ export interface $ZodCheckLengthEquals<T extends util.HasLength = util.HasLength
|
|
|
157
157
|
}
|
|
158
158
|
export declare const $ZodCheckLengthEquals: core.$constructor<$ZodCheckLengthEquals>;
|
|
159
159
|
export type $ZodStringFormats = "email" | "url" | "emoji" | "uuid" | "guid" | "nanoid" | "cuid" | "cuid2" | "ulid" | "xid" | "ksuid" | "datetime" | "date" | "time" | "duration" | "ipv4" | "ipv6" | "cidrv4" | "cidrv6" | "base64" | "base64url" | "json_string" | "e164" | "lowercase" | "uppercase" | "regex" | "jwt" | "starts_with" | "ends_with" | "includes";
|
|
160
|
-
export interface $ZodCheckStringFormatDef<Format extends
|
|
160
|
+
export interface $ZodCheckStringFormatDef<Format extends string = string> extends $ZodCheckDef {
|
|
161
161
|
check: "string_format";
|
|
162
162
|
format: Format;
|
|
163
163
|
pattern?: RegExp | undefined;
|
|
@@ -274,4 +274,4 @@ export interface $ZodCheckOverwrite<T = unknown> extends $ZodCheck<T> {
|
|
|
274
274
|
}
|
|
275
275
|
export declare const $ZodCheckOverwrite: core.$constructor<$ZodCheckOverwrite>;
|
|
276
276
|
export type $ZodChecks = $ZodCheckLessThan | $ZodCheckGreaterThan | $ZodCheckMultipleOf | $ZodCheckNumberFormat | $ZodCheckBigIntFormat | $ZodCheckMaxSize | $ZodCheckMinSize | $ZodCheckSizeEquals | $ZodCheckMaxLength | $ZodCheckMinLength | $ZodCheckLengthEquals | $ZodCheckStringFormat | $ZodCheckProperty | $ZodCheckMimeType | $ZodCheckOverwrite;
|
|
277
|
-
export type $ZodStringFormatChecks = $ZodCheckRegex | $ZodCheckLowerCase | $ZodCheckUpperCase | $ZodCheckIncludes | $ZodCheckStartsWith | $ZodCheckEndsWith | schemas.$
|
|
277
|
+
export type $ZodStringFormatChecks = $ZodCheckRegex | $ZodCheckLowerCase | $ZodCheckUpperCase | $ZodCheckIncludes | $ZodCheckStartsWith | $ZodCheckEndsWith | schemas.$ZodStringFormatTypes;
|
|
@@ -111,12 +111,12 @@ export interface $ZodStringInternals<Input> extends $ZodTypeInternals<string, In
|
|
|
111
111
|
export interface $ZodString<Input = unknown> extends _$ZodType<$ZodStringInternals<Input>> {
|
|
112
112
|
}
|
|
113
113
|
export declare const $ZodString: core.$constructor<$ZodString>;
|
|
114
|
-
export interface $ZodStringFormatDef<Format extends
|
|
114
|
+
export interface $ZodStringFormatDef<Format extends string = string> extends $ZodStringDef, checks.$ZodCheckStringFormatDef<Format> {
|
|
115
115
|
}
|
|
116
|
-
export interface $ZodStringFormatInternals<Format extends
|
|
116
|
+
export interface $ZodStringFormatInternals<Format extends string = string> extends $ZodStringInternals<string>, checks.$ZodCheckStringFormatInternals {
|
|
117
117
|
def: $ZodStringFormatDef<Format>;
|
|
118
118
|
}
|
|
119
|
-
export interface $ZodStringFormat<Format extends
|
|
119
|
+
export interface $ZodStringFormat<Format extends string = string> extends $ZodType {
|
|
120
120
|
_zod: $ZodStringFormatInternals<Format>;
|
|
121
121
|
}
|
|
122
122
|
export declare const $ZodStringFormat: core.$constructor<$ZodStringFormat>;
|
|
@@ -328,6 +328,16 @@ export interface $ZodJWT extends $ZodType {
|
|
|
328
328
|
_zod: $ZodJWTInternals;
|
|
329
329
|
}
|
|
330
330
|
export declare const $ZodJWT: core.$constructor<$ZodJWT>;
|
|
331
|
+
export interface $ZodCustomStringFormatDef<Format extends string = string> extends $ZodStringFormatDef<Format> {
|
|
332
|
+
fn: (val: string) => unknown;
|
|
333
|
+
}
|
|
334
|
+
export interface $ZodCustomStringFormatInternals<Format extends string = string> extends $ZodStringFormatInternals<Format> {
|
|
335
|
+
def: $ZodCustomStringFormatDef<Format>;
|
|
336
|
+
}
|
|
337
|
+
export interface $ZodCustomStringFormat<Format extends string = string> extends $ZodStringFormat<Format> {
|
|
338
|
+
_zod: $ZodCustomStringFormatInternals<Format>;
|
|
339
|
+
}
|
|
340
|
+
export declare const $ZodCustomStringFormat: core.$constructor<$ZodCustomStringFormat>;
|
|
331
341
|
export interface $ZodNumberDef extends $ZodTypeDef {
|
|
332
342
|
type: "number";
|
|
333
343
|
coerce?: boolean;
|
|
@@ -718,17 +728,17 @@ export interface $ZodEnum<T extends util.EnumLike = util.EnumLike> extends $ZodT
|
|
|
718
728
|
_zod: $ZodEnumInternals<T>;
|
|
719
729
|
}
|
|
720
730
|
export declare const $ZodEnum: core.$constructor<$ZodEnum>;
|
|
721
|
-
export interface $ZodLiteralDef extends $ZodTypeDef {
|
|
731
|
+
export interface $ZodLiteralDef<T extends util.Literal> extends $ZodTypeDef {
|
|
722
732
|
type: "literal";
|
|
723
|
-
values:
|
|
733
|
+
values: T[];
|
|
724
734
|
}
|
|
725
|
-
export interface $ZodLiteralInternals<T extends util.
|
|
726
|
-
def: $ZodLiteralDef
|
|
735
|
+
export interface $ZodLiteralInternals<T extends util.Literal = util.Literal> extends $ZodTypeInternals<T, T> {
|
|
736
|
+
def: $ZodLiteralDef<T>;
|
|
727
737
|
values: Set<T>;
|
|
728
738
|
pattern: RegExp;
|
|
729
739
|
isst: errors.$ZodIssueInvalidValue;
|
|
730
740
|
}
|
|
731
|
-
export interface $ZodLiteral<T extends util.
|
|
741
|
+
export interface $ZodLiteral<T extends util.Literal = util.Literal> extends $ZodType {
|
|
732
742
|
_zod: $ZodLiteralInternals<T>;
|
|
733
743
|
}
|
|
734
744
|
export declare const $ZodLiteral: core.$constructor<$ZodLiteral>;
|
|
@@ -24,7 +24,7 @@ export interface ZodMiniString<Input = unknown> extends _ZodMiniString<core.$Zod
|
|
|
24
24
|
}
|
|
25
25
|
export declare const ZodMiniString: core.$constructor<ZodMiniString>;
|
|
26
26
|
export declare function string(params?: string | core.$ZodStringParams): ZodMiniString<string>;
|
|
27
|
-
export interface ZodMiniStringFormat<Format extends
|
|
27
|
+
export interface ZodMiniStringFormat<Format extends string = string> extends _ZodMiniString<core.$ZodStringFormatInternals<Format>>, core.$ZodStringFormat<Format> {
|
|
28
28
|
}
|
|
29
29
|
export declare const ZodMiniStringFormat: core.$constructor<ZodMiniStringFormat>;
|
|
30
30
|
export interface ZodMiniEmail extends _ZodMiniString<core.$ZodEmailInternals> {
|
|
@@ -106,6 +106,11 @@ export interface ZodMiniJWT extends _ZodMiniString<core.$ZodJWTInternals> {
|
|
|
106
106
|
}
|
|
107
107
|
export declare const ZodMiniJWT: core.$constructor<ZodMiniJWT>;
|
|
108
108
|
export declare function jwt(params?: string | core.$ZodJWTParams): ZodMiniJWT;
|
|
109
|
+
export interface ZodMiniCustomStringFormat<Format extends string = string> extends ZodMiniStringFormat<Format>, core.$ZodCustomStringFormat<Format> {
|
|
110
|
+
_zod: core.$ZodCustomStringFormatInternals<Format>;
|
|
111
|
+
}
|
|
112
|
+
export declare const ZodMiniCustomStringFormat: core.$constructor<ZodMiniCustomStringFormat>;
|
|
113
|
+
export declare function stringFormat<Format extends string>(format: Format, fnOrRegex: ((arg: string) => util.MaybeAsync<unknown>) | RegExp, _params?: string | core.$ZodStringFormatParams): ZodMiniCustomStringFormat<Format>;
|
|
109
114
|
interface _ZodMiniNumber<T extends core.$ZodNumberInternals<unknown> = core.$ZodNumberInternals<unknown>> extends _ZodMiniType<T>, core.$ZodNumber<T["input"]> {
|
|
110
115
|
_zod: T;
|
|
111
116
|
}
|
|
@@ -173,10 +178,10 @@ export interface ZodMiniArray<T extends SomeType = core.$ZodType> extends _ZodMi
|
|
|
173
178
|
}
|
|
174
179
|
export declare const ZodMiniArray: core.$constructor<ZodMiniArray>;
|
|
175
180
|
export declare function array<T extends SomeType>(element: T, params?: string | core.$ZodArrayParams): ZodMiniArray<T>;
|
|
176
|
-
export declare function keyof<T extends ZodMiniObject>(schema: T): ZodMiniLiteral<keyof T["shape"]
|
|
181
|
+
export declare function keyof<T extends ZodMiniObject>(schema: T): ZodMiniLiteral<Exclude<keyof T["shape"], symbol>>;
|
|
177
182
|
export interface ZodMiniObject<
|
|
178
183
|
/** @ts-ignore Cast variance */
|
|
179
|
-
out Shape extends core.$ZodShape = core.$ZodShape, out Config extends core.$ZodObjectConfig = core.$
|
|
184
|
+
out Shape extends core.$ZodShape = core.$ZodShape, out Config extends core.$ZodObjectConfig = core.$strip> extends ZodMiniType<any, any, core.$ZodObjectInternals<Shape, Config>>, core.$ZodObject<Shape, Config> {
|
|
180
185
|
shape: Shape;
|
|
181
186
|
}
|
|
182
187
|
export declare const ZodMiniObject: core.$constructor<ZodMiniObject>;
|
|
@@ -252,7 +257,7 @@ export { _enum as enum };
|
|
|
252
257
|
* ```
|
|
253
258
|
*/
|
|
254
259
|
export declare function nativeEnum<T extends util.EnumLike>(entries: T, params?: string | core.$ZodEnumParams): ZodMiniEnum<T>;
|
|
255
|
-
export interface ZodMiniLiteral<T extends util.
|
|
260
|
+
export interface ZodMiniLiteral<T extends util.Literal = util.Literal> extends _ZodMiniType<core.$ZodLiteralInternals<T>> {
|
|
256
261
|
}
|
|
257
262
|
export declare const ZodMiniLiteral: core.$constructor<ZodMiniLiteral>;
|
|
258
263
|
export declare function literal<const T extends ReadonlyArray<util.Literal>>(value: T, params?: string | core.$ZodLiteralParams): ZodMiniLiteral<T[number]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zod",
|
|
3
|
-
"version": "3.26.0-canary.
|
|
3
|
+
"version": "3.26.0-canary.20250618T044324",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "Colin McDonnell <zod@colinhacks.com>",
|
|
6
6
|
"description": "TypeScript-first schema declaration and validation library with static type inference",
|