zod 4.5.4 → 4.6.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/compile.cjs +19 -0
- package/index.cjs +19 -0
- package/locales/index.cjs +19 -0
- package/mini/index.cjs +19 -0
- package/package.json +8 -7
- package/src/v3/helpers/errorUtil.ts +1 -1
- package/src/v4/classic/checks.ts +0 -1
- package/src/v4/classic/external.ts +2 -0
- package/src/v4/classic/from-json-schema.ts +248 -25
- package/src/v4/classic/schemas.ts +255 -164
- package/src/v4/classic/tests/assignability.test.ts +59 -9
- package/src/v4/classic/tests/bigint.test.ts +6 -0
- package/src/v4/classic/tests/continuability.test.ts +2 -2
- package/src/v4/classic/tests/cyclic-data.test.ts +274 -0
- package/src/v4/classic/tests/discriminated-unions.test.ts +112 -6
- package/src/v4/classic/tests/enum.test.ts +9 -0
- package/src/v4/classic/tests/error.test.ts +130 -1
- package/src/v4/classic/tests/firstparty.test.ts +4 -0
- package/src/v4/classic/tests/from-json-schema.test.ts +157 -0
- package/src/v4/classic/tests/iban.test.ts +81 -0
- package/src/v4/classic/tests/instance-footprint.test.ts +18 -2
- package/src/v4/classic/tests/instanceof.test.ts +27 -7
- package/src/v4/classic/tests/issue-schema.test.ts +88 -56
- package/src/v4/classic/tests/object.test.ts +56 -0
- package/src/v4/classic/tests/optin-ladder.test.ts +3 -2
- package/src/v4/classic/tests/properties.test.ts +225 -0
- package/src/v4/classic/tests/recursive-types.test.ts +46 -1
- package/src/v4/classic/tests/standard-schema.test.ts +19 -0
- package/src/v4/classic/tests/string.test.ts +25 -0
- package/src/v4/classic/tests/template-literal.test.ts +33 -1
- package/src/v4/classic/tests/to-json-schema.test.ts +147 -3
- package/src/v4/classic/tests/validate.test.ts +569 -0
- package/src/v4/core/api.ts +30 -6
- package/src/v4/core/checks.ts +1 -101
- package/src/v4/core/compile.ts +194 -82
- package/src/v4/core/doc.ts +6 -2
- package/src/v4/core/errors.ts +3 -6
- package/src/v4/core/json-schema-generator.ts +2 -2
- package/src/v4/core/json-schema-processors.ts +226 -68
- package/src/v4/core/memoizer.ts +78 -28
- package/src/v4/core/parse.ts +37 -16
- package/src/v4/core/regexes.ts +10 -4
- package/src/v4/core/schemas.ts +350 -113
- package/src/v4/core/tests/cached.test.ts +54 -0
- package/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/src/v4/core/tests/compile.test.ts +222 -2
- package/src/v4/core/tests/email-regex.test.ts +140 -0
- package/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/src/v4/core/to-json-schema.ts +10 -8
- package/src/v4/core/util.ts +222 -147
- package/src/v4/core/versions.ts +2 -2
- package/src/v4/core/visit.ts +11 -0
- package/src/v4/locales/ar.ts +1 -0
- package/src/v4/locales/az.ts +1 -0
- package/src/v4/locales/be.ts +1 -0
- package/src/v4/locales/bg.ts +1 -0
- package/src/v4/locales/bn.ts +1 -0
- package/src/v4/locales/ca.ts +1 -0
- package/src/v4/locales/ckb.ts +1 -0
- package/src/v4/locales/cs.ts +1 -0
- package/src/v4/locales/da.ts +1 -0
- package/src/v4/locales/de.ts +1 -0
- package/src/v4/locales/el.ts +1 -0
- package/src/v4/locales/en.ts +1 -0
- package/src/v4/locales/eo.ts +1 -0
- package/src/v4/locales/es.ts +1 -0
- package/src/v4/locales/fa.ts +1 -0
- package/src/v4/locales/fi.ts +1 -0
- package/src/v4/locales/fr-CA.ts +1 -0
- package/src/v4/locales/fr.ts +1 -0
- package/src/v4/locales/gu.ts +1 -0
- package/src/v4/locales/he.ts +1 -0
- package/src/v4/locales/hi.ts +1 -0
- package/src/v4/locales/hr.ts +1 -0
- package/src/v4/locales/hu.ts +1 -0
- package/src/v4/locales/hy.ts +1 -0
- package/src/v4/locales/id.ts +1 -0
- package/src/v4/locales/index.ts +1 -0
- package/src/v4/locales/is.ts +1 -0
- package/src/v4/locales/it.ts +1 -0
- package/src/v4/locales/ja.ts +1 -0
- package/src/v4/locales/ka.ts +1 -0
- package/src/v4/locales/km.ts +1 -0
- package/src/v4/locales/kn.ts +1 -0
- package/src/v4/locales/ko.ts +1 -0
- package/src/v4/locales/lt.ts +1 -0
- package/src/v4/locales/mk.ts +1 -0
- package/src/v4/locales/ms.ts +1 -0
- package/src/v4/locales/ne.ts +1 -0
- package/src/v4/locales/nl.ts +1 -0
- package/src/v4/locales/nn.ts +1 -0
- package/src/v4/locales/no.ts +1 -0
- package/src/v4/locales/ota.ts +1 -0
- package/src/v4/locales/pl.ts +1 -0
- package/src/v4/locales/ps.ts +1 -0
- package/src/v4/locales/pt-BR.ts +1 -0
- package/src/v4/locales/pt.ts +1 -0
- package/src/v4/locales/ro.ts +1 -0
- package/src/v4/locales/ru.ts +1 -0
- package/src/v4/locales/sk.ts +1 -0
- package/src/v4/locales/sl.ts +1 -0
- package/src/v4/locales/sv.ts +1 -0
- package/src/v4/locales/ta.ts +1 -0
- package/src/v4/locales/tg.ts +134 -0
- package/src/v4/locales/th.ts +1 -0
- package/src/v4/locales/tk.ts +1 -0
- package/src/v4/locales/tr.ts +1 -0
- package/src/v4/locales/uk.ts +1 -0
- package/src/v4/locales/ur.ts +1 -0
- package/src/v4/locales/uz.ts +1 -0
- package/src/v4/locales/vi.ts +1 -0
- package/src/v4/locales/yo.ts +1 -0
- package/src/v4/locales/zh-CN.ts +1 -0
- package/src/v4/locales/zh-TW.ts +1 -0
- package/src/v4/mini/checks.ts +0 -1
- package/src/v4/mini/external.ts +2 -0
- package/src/v4/mini/schemas.ts +38 -2
- package/src/v4/mini/tests/checks.test.ts +1 -1
- package/src/v4/mini/tests/computed.test.ts +11 -17
- package/src/v4/mini/tests/index.test.ts +8 -0
- package/src/v4/mini/tests/recursive-types.test.ts +16 -0
- package/src/v4/mini/tests/string.test.ts +16 -0
- package/v3/ZodError.cjs +19 -0
- package/v3/errors.cjs +19 -0
- package/v3/external.cjs +19 -0
- package/v3/helpers/enumUtil.cjs +19 -0
- package/v3/helpers/errorUtil.cjs +20 -1
- package/v3/helpers/errorUtil.js +1 -1
- package/v3/helpers/parseUtil.cjs +19 -0
- package/v3/helpers/partialUtil.cjs +19 -0
- package/v3/helpers/typeAliases.cjs +19 -0
- package/v3/helpers/util.cjs +19 -0
- package/v3/index.cjs +19 -0
- package/v3/standard-schema.cjs +19 -0
- package/v3/types.cjs +19 -0
- package/v4/classic/checks.cjs +20 -2
- package/v4/classic/checks.d.cts +1 -1
- package/v4/classic/checks.d.ts +1 -1
- package/v4/classic/checks.js +1 -1
- package/v4/classic/coerce.cjs +19 -0
- package/v4/classic/compat.cjs +19 -0
- package/v4/classic/deep-partial.cjs +19 -0
- package/v4/classic/errors.cjs +19 -0
- package/v4/classic/external.cjs +22 -1
- package/v4/classic/external.d.cts +1 -1
- package/v4/classic/external.d.ts +1 -1
- package/v4/classic/external.js +1 -1
- package/v4/classic/from-json-schema.cjs +264 -24
- package/v4/classic/from-json-schema.js +245 -24
- package/v4/classic/in-out.cjs +19 -0
- package/v4/classic/index.cjs +19 -0
- package/v4/classic/iso.cjs +19 -0
- package/v4/classic/parse.cjs +19 -0
- package/v4/classic/schemas.cjs +100 -31
- package/v4/classic/schemas.d.cts +17 -1
- package/v4/classic/schemas.d.ts +17 -1
- package/v4/classic/schemas.js +77 -29
- package/v4/core/api.cjs +37 -2
- package/v4/core/api.d.cts +6 -4
- package/v4/core/api.d.ts +6 -4
- package/v4/core/api.js +17 -2
- package/v4/core/checks.cjs +19 -96
- package/v4/core/checks.d.cts +1 -1
- package/v4/core/checks.d.ts +1 -1
- package/v4/core/checks.js +0 -96
- package/v4/core/compile.cjs +165 -66
- package/v4/core/compile.d.cts +18 -4
- package/v4/core/compile.d.ts +18 -4
- package/v4/core/compile.js +146 -67
- package/v4/core/core.cjs +19 -0
- package/v4/core/doc.cjs +26 -2
- package/v4/core/doc.js +7 -2
- package/v4/core/errors.cjs +21 -5
- package/v4/core/errors.js +2 -5
- package/v4/core/index.cjs +19 -0
- package/v4/core/json-schema-generator.cjs +20 -1
- package/v4/core/json-schema-generator.js +2 -2
- package/v4/core/json-schema-processors.cjs +215 -63
- package/v4/core/json-schema-processors.d.cts +17 -0
- package/v4/core/json-schema-processors.d.ts +17 -0
- package/v4/core/json-schema-processors.js +195 -64
- package/v4/core/json-schema.cjs +19 -0
- package/v4/core/memoizer.cjs +114 -23
- package/v4/core/memoizer.js +72 -23
- package/v4/core/parse.cjs +56 -16
- package/v4/core/parse.js +37 -16
- package/v4/core/regexes.cjs +29 -6
- package/v4/core/regexes.d.cts +2 -0
- package/v4/core/regexes.d.ts +2 -0
- package/v4/core/regexes.js +8 -4
- package/v4/core/registries.cjs +19 -0
- package/v4/core/schemas.cjs +322 -95
- package/v4/core/schemas.d.cts +42 -7
- package/v4/core/schemas.d.ts +42 -7
- package/v4/core/schemas.js +301 -94
- package/v4/core/standard-schema.cjs +19 -0
- package/v4/core/to-json-schema.cjs +29 -7
- package/v4/core/to-json-schema.d.cts +7 -3
- package/v4/core/to-json-schema.d.ts +7 -3
- package/v4/core/to-json-schema.js +8 -7
- package/v4/core/util.cjs +181 -143
- package/v4/core/util.d.cts +25 -4
- package/v4/core/util.d.ts +25 -4
- package/v4/core/util.js +160 -143
- package/v4/core/versions.cjs +21 -2
- package/v4/core/versions.d.cts +1 -1
- package/v4/core/versions.d.ts +1 -1
- package/v4/core/versions.js +2 -2
- package/v4/core/visit.cjs +31 -0
- package/v4/core/visit.js +12 -0
- package/v4/index.cjs +19 -0
- package/v4/locales/ar.cjs +1 -0
- package/v4/locales/ar.js +1 -0
- package/v4/locales/az.cjs +1 -0
- package/v4/locales/az.js +1 -0
- package/v4/locales/be.cjs +1 -0
- package/v4/locales/be.js +1 -0
- package/v4/locales/bg.cjs +1 -0
- package/v4/locales/bg.js +1 -0
- package/v4/locales/bn.cjs +1 -0
- package/v4/locales/bn.js +1 -0
- package/v4/locales/ca.cjs +1 -0
- package/v4/locales/ca.js +1 -0
- package/v4/locales/ckb.cjs +1 -0
- package/v4/locales/ckb.js +1 -0
- package/v4/locales/cs.cjs +1 -0
- package/v4/locales/cs.js +1 -0
- package/v4/locales/da.cjs +1 -0
- package/v4/locales/da.js +1 -0
- package/v4/locales/de.cjs +1 -0
- package/v4/locales/de.js +1 -0
- package/v4/locales/el.cjs +1 -0
- package/v4/locales/el.js +1 -0
- package/v4/locales/en.cjs +1 -0
- package/v4/locales/en.js +1 -0
- package/v4/locales/eo.cjs +1 -0
- package/v4/locales/eo.js +1 -0
- package/v4/locales/es.cjs +1 -0
- package/v4/locales/es.js +1 -0
- package/v4/locales/fa.cjs +1 -0
- package/v4/locales/fa.js +1 -0
- package/v4/locales/fi.cjs +1 -0
- package/v4/locales/fi.js +1 -0
- package/v4/locales/fr-CA.cjs +1 -0
- package/v4/locales/fr-CA.js +1 -0
- package/v4/locales/fr.cjs +1 -0
- package/v4/locales/fr.js +1 -0
- package/v4/locales/gu.cjs +1 -0
- package/v4/locales/gu.js +1 -0
- package/v4/locales/he.cjs +1 -0
- package/v4/locales/he.js +1 -0
- package/v4/locales/hi.cjs +1 -0
- package/v4/locales/hi.js +1 -0
- package/v4/locales/hr.cjs +1 -0
- package/v4/locales/hr.js +1 -0
- package/v4/locales/hu.cjs +1 -0
- package/v4/locales/hu.js +1 -0
- package/v4/locales/hy.cjs +1 -0
- package/v4/locales/hy.js +1 -0
- package/v4/locales/id.cjs +1 -0
- package/v4/locales/id.js +1 -0
- package/v4/locales/index.cjs +22 -1
- package/v4/locales/index.d.cts +1 -0
- package/v4/locales/index.d.ts +1 -0
- package/v4/locales/index.js +1 -0
- package/v4/locales/is.cjs +1 -0
- package/v4/locales/is.js +1 -0
- package/v4/locales/it.cjs +1 -0
- package/v4/locales/it.js +1 -0
- package/v4/locales/ja.cjs +1 -0
- package/v4/locales/ja.js +1 -0
- package/v4/locales/ka.cjs +1 -0
- package/v4/locales/ka.js +1 -0
- package/v4/locales/km.cjs +1 -0
- package/v4/locales/km.js +1 -0
- package/v4/locales/kn.cjs +1 -0
- package/v4/locales/kn.js +1 -0
- package/v4/locales/ko.cjs +1 -0
- package/v4/locales/ko.js +1 -0
- package/v4/locales/lt.cjs +1 -0
- package/v4/locales/lt.js +1 -0
- package/v4/locales/mk.cjs +1 -0
- package/v4/locales/mk.js +1 -0
- package/v4/locales/ms.cjs +1 -0
- package/v4/locales/ms.js +1 -0
- package/v4/locales/ne.cjs +1 -0
- package/v4/locales/ne.js +1 -0
- package/v4/locales/nl.cjs +1 -0
- package/v4/locales/nl.js +1 -0
- package/v4/locales/nn.cjs +1 -0
- package/v4/locales/nn.js +1 -0
- package/v4/locales/no.cjs +1 -0
- package/v4/locales/no.js +1 -0
- package/v4/locales/ota.cjs +1 -0
- package/v4/locales/ota.js +1 -0
- package/v4/locales/pl.cjs +1 -0
- package/v4/locales/pl.js +1 -0
- package/v4/locales/ps.cjs +1 -0
- package/v4/locales/ps.js +1 -0
- package/v4/locales/pt-BR.cjs +1 -0
- package/v4/locales/pt-BR.js +1 -0
- package/v4/locales/pt.cjs +1 -0
- package/v4/locales/pt.js +1 -0
- package/v4/locales/ro.cjs +1 -0
- package/v4/locales/ro.js +1 -0
- package/v4/locales/ru.cjs +1 -0
- package/v4/locales/ru.js +1 -0
- package/v4/locales/sk.cjs +1 -0
- package/v4/locales/sk.js +1 -0
- package/v4/locales/sl.cjs +1 -0
- package/v4/locales/sl.js +1 -0
- package/v4/locales/sv.cjs +1 -0
- package/v4/locales/sv.js +1 -0
- package/v4/locales/ta.cjs +1 -0
- package/v4/locales/ta.js +1 -0
- package/v4/locales/tg.cjs +143 -0
- package/v4/locales/tg.d.cts +5 -0
- package/v4/locales/tg.d.ts +4 -0
- package/v4/locales/tg.js +116 -0
- package/v4/locales/th.cjs +1 -0
- package/v4/locales/th.js +1 -0
- package/v4/locales/tk.cjs +1 -0
- package/v4/locales/tk.js +1 -0
- package/v4/locales/tr.cjs +1 -0
- package/v4/locales/tr.js +1 -0
- package/v4/locales/uk.cjs +1 -0
- package/v4/locales/uk.js +1 -0
- package/v4/locales/ur.cjs +1 -0
- package/v4/locales/ur.js +1 -0
- package/v4/locales/uz.cjs +1 -0
- package/v4/locales/uz.js +1 -0
- package/v4/locales/vi.cjs +1 -0
- package/v4/locales/vi.js +1 -0
- package/v4/locales/yo.cjs +1 -0
- package/v4/locales/yo.js +1 -0
- package/v4/locales/zh-CN.cjs +1 -0
- package/v4/locales/zh-CN.js +1 -0
- package/v4/locales/zh-TW.cjs +1 -0
- package/v4/locales/zh-TW.js +1 -0
- package/v4/mini/checks.cjs +20 -2
- package/v4/mini/checks.d.cts +1 -1
- package/v4/mini/checks.d.ts +1 -1
- package/v4/mini/checks.js +1 -1
- package/v4/mini/coerce.cjs +19 -0
- package/v4/mini/deep-partial.cjs +19 -0
- package/v4/mini/external.cjs +22 -1
- package/v4/mini/external.d.cts +1 -1
- package/v4/mini/external.d.ts +1 -1
- package/v4/mini/external.js +1 -1
- package/v4/mini/in-out.cjs +19 -0
- package/v4/mini/index.cjs +19 -0
- package/v4/mini/iso.cjs +19 -0
- package/v4/mini/parse.cjs +19 -0
- package/v4/mini/schemas.cjs +42 -4
- package/v4/mini/schemas.d.cts +8 -0
- package/v4/mini/schemas.d.ts +8 -0
- package/v4/mini/schemas.js +19 -2
- package/v4-mini/index.cjs +19 -0
package/v4/locales/tk.cjs
CHANGED
package/v4/locales/tk.js
CHANGED
package/v4/locales/tr.cjs
CHANGED
package/v4/locales/tr.js
CHANGED
package/v4/locales/uk.cjs
CHANGED
package/v4/locales/uk.js
CHANGED
package/v4/locales/ur.cjs
CHANGED
package/v4/locales/ur.js
CHANGED
package/v4/locales/uz.cjs
CHANGED
package/v4/locales/uz.js
CHANGED
package/v4/locales/vi.cjs
CHANGED
package/v4/locales/vi.js
CHANGED
package/v4/locales/yo.cjs
CHANGED
package/v4/locales/yo.js
CHANGED
package/v4/locales/zh-CN.cjs
CHANGED
package/v4/locales/zh-CN.js
CHANGED
package/v4/locales/zh-TW.cjs
CHANGED
package/v4/locales/zh-TW.js
CHANGED
package/v4/mini/checks.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toUpperCase = exports.toLowerCase = exports.trim = exports.normalize = exports.overwrite = exports.mime = exports.
|
|
3
|
+
exports.toUpperCase = exports.toLowerCase = exports.trim = exports.normalize = exports.overwrite = exports.mime = exports.property = exports.endsWith = exports.startsWith = exports.includes = exports.uppercase = exports.lowercase = exports.regex = exports.length = exports.minLength = exports.maxLength = exports.size = exports.minSize = exports.maxSize = exports.multipleOf = exports.nonnegative = exports.nonpositive = exports.negative = exports.positive = exports.minimum = exports.gte = exports.gt = exports.maximum = exports.lte = exports.lt = void 0;
|
|
4
4
|
var index_js_1 = require("../core/index.cjs");
|
|
5
5
|
Object.defineProperty(exports, "lt", { enumerable: true, get: function () { return index_js_1._lt; } });
|
|
6
6
|
Object.defineProperty(exports, "lte", { enumerable: true, get: function () { return index_js_1._lte; } });
|
|
@@ -26,10 +26,28 @@ Object.defineProperty(exports, "includes", { enumerable: true, get: function ()
|
|
|
26
26
|
Object.defineProperty(exports, "startsWith", { enumerable: true, get: function () { return index_js_1._startsWith; } });
|
|
27
27
|
Object.defineProperty(exports, "endsWith", { enumerable: true, get: function () { return index_js_1._endsWith; } });
|
|
28
28
|
Object.defineProperty(exports, "property", { enumerable: true, get: function () { return index_js_1._property; } });
|
|
29
|
-
Object.defineProperty(exports, "properties", { enumerable: true, get: function () { return index_js_1._properties; } });
|
|
30
29
|
Object.defineProperty(exports, "mime", { enumerable: true, get: function () { return index_js_1._mime; } });
|
|
31
30
|
Object.defineProperty(exports, "overwrite", { enumerable: true, get: function () { return index_js_1._overwrite; } });
|
|
32
31
|
Object.defineProperty(exports, "normalize", { enumerable: true, get: function () { return index_js_1._normalize; } });
|
|
33
32
|
Object.defineProperty(exports, "trim", { enumerable: true, get: function () { return index_js_1._trim; } });
|
|
34
33
|
Object.defineProperty(exports, "toLowerCase", { enumerable: true, get: function () { return index_js_1._toLowerCase; } });
|
|
35
34
|
Object.defineProperty(exports, "toUpperCase", { enumerable: true, get: function () { return index_js_1._toUpperCase; } });
|
|
35
|
+
|
|
36
|
+
// seal-cjs-exports
|
|
37
|
+
(function () {
|
|
38
|
+
var keys = Object.getOwnPropertyNames(exports);
|
|
39
|
+
for (var i = 0; i < keys.length; i++) {
|
|
40
|
+
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
|
|
41
|
+
if (!desc || !desc.get || !desc.configurable) continue;
|
|
42
|
+
var value;
|
|
43
|
+
try {
|
|
44
|
+
value = desc.get();
|
|
45
|
+
} catch (e) {
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
// a circular require may not have settled this one yet, so leave it live
|
|
49
|
+
if (value === undefined) continue;
|
|
50
|
+
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
|
|
51
|
+
}
|
|
52
|
+
Object.freeze(exports);
|
|
53
|
+
})();
|
package/v4/mini/checks.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { _lt as lt, _lte as lte, _lte as maximum, _gt as gt, _gte as gte, _gte as minimum, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property,
|
|
1
|
+
export { _lt as lt, _lte as lte, _lte as maximum, _gt as gt, _gte as gte, _gte as minimum, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property, _mime as mime, _overwrite as overwrite, _normalize as normalize, _trim as trim, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, } from "../core/index.cjs";
|
package/v4/mini/checks.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { _lt as lt, _lte as lte, _lte as maximum, _gt as gt, _gte as gte, _gte as minimum, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property,
|
|
1
|
+
export { _lt as lt, _lte as lte, _lte as maximum, _gt as gt, _gte as gte, _gte as minimum, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property, _mime as mime, _overwrite as overwrite, _normalize as normalize, _trim as trim, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, } from "../core/index.js";
|
package/v4/mini/checks.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { _lt as lt, _lte as lte, _lte as maximum, _gt as gt, _gte as gte, _gte as minimum, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property,
|
|
1
|
+
export { _lt as lt, _lte as lte, _lte as maximum, _gt as gt, _gte as gte, _gte as minimum, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property, _mime as mime, _overwrite as overwrite, _normalize as normalize, _trim as trim, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, } from "../core/index.js";
|
package/v4/mini/coerce.cjs
CHANGED
|
@@ -50,3 +50,22 @@ function bigint(params) {
|
|
|
50
50
|
function date(params) {
|
|
51
51
|
return core._coercedDate(schemas.ZodMiniDate, params);
|
|
52
52
|
}
|
|
53
|
+
|
|
54
|
+
// seal-cjs-exports
|
|
55
|
+
(function () {
|
|
56
|
+
var keys = Object.getOwnPropertyNames(exports);
|
|
57
|
+
for (var i = 0; i < keys.length; i++) {
|
|
58
|
+
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
|
|
59
|
+
if (!desc || !desc.get || !desc.configurable) continue;
|
|
60
|
+
var value;
|
|
61
|
+
try {
|
|
62
|
+
value = desc.get();
|
|
63
|
+
} catch (e) {
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
// a circular require may not have settled this one yet, so leave it live
|
|
67
|
+
if (value === undefined) continue;
|
|
68
|
+
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
|
|
69
|
+
}
|
|
70
|
+
Object.freeze(exports);
|
|
71
|
+
})();
|
package/v4/mini/deep-partial.cjs
CHANGED
|
@@ -37,3 +37,22 @@ function deepPartial(schema) {
|
|
|
37
37
|
},
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
// seal-cjs-exports
|
|
42
|
+
(function () {
|
|
43
|
+
var keys = Object.getOwnPropertyNames(exports);
|
|
44
|
+
for (var i = 0; i < keys.length; i++) {
|
|
45
|
+
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
|
|
46
|
+
if (!desc || !desc.get || !desc.configurable) continue;
|
|
47
|
+
var value;
|
|
48
|
+
try {
|
|
49
|
+
value = desc.get();
|
|
50
|
+
} catch (e) {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
// a circular require may not have settled this one yet, so leave it live
|
|
54
|
+
if (value === undefined) continue;
|
|
55
|
+
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
|
|
56
|
+
}
|
|
57
|
+
Object.freeze(exports);
|
|
58
|
+
})();
|
package/v4/mini/external.cjs
CHANGED
|
@@ -26,7 +26,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.coerce = exports.ZodMiniISODuration = exports.ZodMiniISOTime = exports.ZodMiniISODate = exports.ZodMiniISODateTime = exports.iso = exports.locales = exports.toJSONSchema = exports.getDiscriminatedOption = exports.ZodCompileUnsupportedError = exports.ZodCompileAsyncError = exports.compile = exports.toZod = exports.NEVER = exports.util = exports.TimePrecision = exports.flattenError = exports.formatError = exports.prettifyError = exports.treeifyError = exports.regexes = exports.clone = exports.$brand = exports.$input = exports.$output = exports.memoizer = exports.config = exports.registry = exports.globalRegistry = exports.output = exports.input = exports.deepPartial = exports.core = void 0;
|
|
29
|
+
exports.coerce = exports.ZodMiniISODuration = exports.ZodMiniISOTime = exports.ZodMiniISODate = exports.ZodMiniISODateTime = exports.iso = exports.locales = exports.toJSONSchema = exports.getDiscriminatedOption = exports.ZodCompileUnsupportedError = exports.ZodCompileAsyncError = exports.withParser = exports.compile = exports.toZod = exports.INVALID = exports.NEVER = exports.util = exports.TimePrecision = exports.flattenError = exports.formatError = exports.prettifyError = exports.treeifyError = exports.regexes = exports.clone = exports.$brand = exports.$input = exports.$output = exports.memoizer = exports.config = exports.registry = exports.globalRegistry = exports.output = exports.input = exports.deepPartial = exports.core = void 0;
|
|
30
30
|
exports.core = __importStar(require("../core/index.cjs"));
|
|
31
31
|
__exportStar(require("./parse.cjs"), exports);
|
|
32
32
|
__exportStar(require("./schemas.cjs"), exports);
|
|
@@ -53,8 +53,10 @@ Object.defineProperty(exports, "flattenError", { enumerable: true, get: function
|
|
|
53
53
|
Object.defineProperty(exports, "TimePrecision", { enumerable: true, get: function () { return index_js_1.TimePrecision; } });
|
|
54
54
|
Object.defineProperty(exports, "util", { enumerable: true, get: function () { return index_js_1.util; } });
|
|
55
55
|
Object.defineProperty(exports, "NEVER", { enumerable: true, get: function () { return index_js_1.NEVER; } });
|
|
56
|
+
Object.defineProperty(exports, "INVALID", { enumerable: true, get: function () { return index_js_1.INVALID; } });
|
|
56
57
|
Object.defineProperty(exports, "toZod", { enumerable: true, get: function () { return index_js_1.toZod; } });
|
|
57
58
|
Object.defineProperty(exports, "compile", { enumerable: true, get: function () { return index_js_1.compile; } });
|
|
59
|
+
Object.defineProperty(exports, "withParser", { enumerable: true, get: function () { return index_js_1.withParser; } });
|
|
58
60
|
Object.defineProperty(exports, "ZodCompileAsyncError", { enumerable: true, get: function () { return index_js_1.ZodCompileAsyncError; } });
|
|
59
61
|
Object.defineProperty(exports, "ZodCompileUnsupportedError", { enumerable: true, get: function () { return index_js_1.ZodCompileUnsupportedError; } });
|
|
60
62
|
Object.defineProperty(exports, "getDiscriminatedOption", { enumerable: true, get: function () { return index_js_1.getDiscriminatedOption; } });
|
|
@@ -72,3 +74,22 @@ Object.defineProperty(exports, "ZodMiniISOTime", { enumerable: true, get: functi
|
|
|
72
74
|
Object.defineProperty(exports, "ZodMiniISODuration", { enumerable: true, get: function () { return iso_js_1.ZodMiniISODuration; } });
|
|
73
75
|
// coerce
|
|
74
76
|
exports.coerce = __importStar(require("./coerce.cjs"));
|
|
77
|
+
|
|
78
|
+
// seal-cjs-exports
|
|
79
|
+
(function () {
|
|
80
|
+
var keys = Object.getOwnPropertyNames(exports);
|
|
81
|
+
for (var i = 0; i < keys.length; i++) {
|
|
82
|
+
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
|
|
83
|
+
if (!desc || !desc.get || !desc.configurable) continue;
|
|
84
|
+
var value;
|
|
85
|
+
try {
|
|
86
|
+
value = desc.get();
|
|
87
|
+
} catch (e) {
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
// a circular require may not have settled this one yet, so leave it live
|
|
91
|
+
if (value === undefined) continue;
|
|
92
|
+
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
|
|
93
|
+
}
|
|
94
|
+
Object.freeze(exports);
|
|
95
|
+
})();
|
package/v4/mini/external.d.cts
CHANGED
|
@@ -7,7 +7,7 @@ export { input, output } from "./in-out.cjs";
|
|
|
7
7
|
export type { infer } from "../core/index.cjs";
|
|
8
8
|
export type { JSONType } from "../core/util.cjs";
|
|
9
9
|
export type { CompileOptions } from "../core/index.cjs";
|
|
10
|
-
export { globalRegistry, registry, config, memoizer, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, toZod, compile, ZodCompileAsyncError, ZodCompileUnsupportedError, getDiscriminatedOption, } from "../core/index.cjs";
|
|
10
|
+
export { globalRegistry, registry, config, memoizer, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, INVALID, toZod, compile, withParser, ZodCompileAsyncError, ZodCompileUnsupportedError, getDiscriminatedOption, } from "../core/index.cjs";
|
|
11
11
|
export { toJSONSchema } from "../core/json-schema-processors.cjs";
|
|
12
12
|
export * as locales from "../locales/index.cjs";
|
|
13
13
|
/** A special constant with type `never` */
|
package/v4/mini/external.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { input, output } from "./in-out.js";
|
|
|
7
7
|
export type { infer } from "../core/index.js";
|
|
8
8
|
export type { JSONType } from "../core/util.js";
|
|
9
9
|
export type { CompileOptions } from "../core/index.js";
|
|
10
|
-
export { globalRegistry, registry, config, memoizer, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, toZod, compile, ZodCompileAsyncError, ZodCompileUnsupportedError, getDiscriminatedOption, } from "../core/index.js";
|
|
10
|
+
export { globalRegistry, registry, config, memoizer, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, INVALID, toZod, compile, withParser, ZodCompileAsyncError, ZodCompileUnsupportedError, getDiscriminatedOption, } from "../core/index.js";
|
|
11
11
|
export { toJSONSchema } from "../core/json-schema-processors.js";
|
|
12
12
|
export * as locales from "../locales/index.js";
|
|
13
13
|
/** A special constant with type `never` */
|
package/v4/mini/external.js
CHANGED
|
@@ -4,7 +4,7 @@ export * from "./schemas.js";
|
|
|
4
4
|
export * from "./checks.js";
|
|
5
5
|
export { deepPartial } from "./deep-partial.js";
|
|
6
6
|
export { input, output } from "./in-out.js";
|
|
7
|
-
export { globalRegistry, registry, config, memoizer, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, toZod, compile, ZodCompileAsyncError, ZodCompileUnsupportedError, getDiscriminatedOption, } from "../core/index.js";
|
|
7
|
+
export { globalRegistry, registry, config, memoizer, $output, $input, $brand, clone, regexes, treeifyError, prettifyError, formatError, flattenError, TimePrecision, util, NEVER, INVALID, toZod, compile, withParser, ZodCompileAsyncError, ZodCompileUnsupportedError, getDiscriminatedOption, } from "../core/index.js";
|
|
8
8
|
export { toJSONSchema } from "../core/json-schema-processors.js";
|
|
9
9
|
export * as locales from "../locales/index.js";
|
|
10
10
|
/** A special constant with type `never` */
|
package/v4/mini/in-out.cjs
CHANGED
|
@@ -61,3 +61,22 @@ function output(schema) {
|
|
|
61
61
|
prefault: (s, rewritten) => (rewritten ? s._zod.def.innerType : s),
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
+
|
|
65
|
+
// seal-cjs-exports
|
|
66
|
+
(function () {
|
|
67
|
+
var keys = Object.getOwnPropertyNames(exports);
|
|
68
|
+
for (var i = 0; i < keys.length; i++) {
|
|
69
|
+
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
|
|
70
|
+
if (!desc || !desc.get || !desc.configurable) continue;
|
|
71
|
+
var value;
|
|
72
|
+
try {
|
|
73
|
+
value = desc.get();
|
|
74
|
+
} catch (e) {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
// a circular require may not have settled this one yet, so leave it live
|
|
78
|
+
if (value === undefined) continue;
|
|
79
|
+
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
|
|
80
|
+
}
|
|
81
|
+
Object.freeze(exports);
|
|
82
|
+
})();
|
package/v4/mini/index.cjs
CHANGED
|
@@ -30,3 +30,22 @@ exports.z = void 0;
|
|
|
30
30
|
const z = __importStar(require("./external.cjs"));
|
|
31
31
|
exports.z = z;
|
|
32
32
|
__exportStar(require("./external.cjs"), exports);
|
|
33
|
+
|
|
34
|
+
// seal-cjs-exports
|
|
35
|
+
(function () {
|
|
36
|
+
var keys = Object.getOwnPropertyNames(exports);
|
|
37
|
+
for (var i = 0; i < keys.length; i++) {
|
|
38
|
+
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
|
|
39
|
+
if (!desc || !desc.get || !desc.configurable) continue;
|
|
40
|
+
var value;
|
|
41
|
+
try {
|
|
42
|
+
value = desc.get();
|
|
43
|
+
} catch (e) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
// a circular require may not have settled this one yet, so leave it live
|
|
47
|
+
if (value === undefined) continue;
|
|
48
|
+
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
|
|
49
|
+
}
|
|
50
|
+
Object.freeze(exports);
|
|
51
|
+
})();
|
package/v4/mini/iso.cjs
CHANGED
|
@@ -62,3 +62,22 @@ exports.ZodMiniISODuration = core.$constructor("ZodMiniISODuration", (inst, def)
|
|
|
62
62
|
function duration(params) {
|
|
63
63
|
return core._isoDuration(exports.ZodMiniISODuration, params);
|
|
64
64
|
}
|
|
65
|
+
|
|
66
|
+
// seal-cjs-exports
|
|
67
|
+
(function () {
|
|
68
|
+
var keys = Object.getOwnPropertyNames(exports);
|
|
69
|
+
for (var i = 0; i < keys.length; i++) {
|
|
70
|
+
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
|
|
71
|
+
if (!desc || !desc.get || !desc.configurable) continue;
|
|
72
|
+
var value;
|
|
73
|
+
try {
|
|
74
|
+
value = desc.get();
|
|
75
|
+
} catch (e) {
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
// a circular require may not have settled this one yet, so leave it live
|
|
79
|
+
if (value === undefined) continue;
|
|
80
|
+
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
|
|
81
|
+
}
|
|
82
|
+
Object.freeze(exports);
|
|
83
|
+
})();
|
package/v4/mini/parse.cjs
CHANGED
|
@@ -16,3 +16,22 @@ Object.defineProperty(exports, "safeEncode", { enumerable: true, get: function (
|
|
|
16
16
|
Object.defineProperty(exports, "safeDecode", { enumerable: true, get: function () { return index_js_1.safeDecode; } });
|
|
17
17
|
Object.defineProperty(exports, "safeEncodeAsync", { enumerable: true, get: function () { return index_js_1.safeEncodeAsync; } });
|
|
18
18
|
Object.defineProperty(exports, "safeDecodeAsync", { enumerable: true, get: function () { return index_js_1.safeDecodeAsync; } });
|
|
19
|
+
|
|
20
|
+
// seal-cjs-exports
|
|
21
|
+
(function () {
|
|
22
|
+
var keys = Object.getOwnPropertyNames(exports);
|
|
23
|
+
for (var i = 0; i < keys.length; i++) {
|
|
24
|
+
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
|
|
25
|
+
if (!desc || !desc.get || !desc.configurable) continue;
|
|
26
|
+
var value;
|
|
27
|
+
try {
|
|
28
|
+
value = desc.get();
|
|
29
|
+
} catch (e) {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
// a circular require may not have settled this one yet, so leave it live
|
|
33
|
+
if (value === undefined) continue;
|
|
34
|
+
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
|
|
35
|
+
}
|
|
36
|
+
Object.freeze(exports);
|
|
37
|
+
})();
|
package/v4/mini/schemas.cjs
CHANGED
|
@@ -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.ZodMiniFunction = exports.stringbool = exports.meta = exports.describe = exports.ZodMiniCustom = exports.ZodMiniPromise = exports.ZodMiniLazy = exports.ZodMiniTemplateLiteral = exports.ZodMiniReadonly = exports.ZodMiniCodec = exports.ZodMiniPipe = exports.ZodMiniNaN = exports.ZodMiniCatch = exports.ZodMiniSuccess = exports.ZodMiniNonOptional = exports.ZodMiniPrefault = exports.ZodMiniDefault = exports.ZodMiniNullable = exports.ZodMiniExactOptional = exports.ZodMiniOptional = exports.ZodMiniTransform = exports.ZodMiniFile = void 0;
|
|
26
|
+
exports.ZodMiniEnum = exports.ZodMiniSet = exports.ZodMiniMap = exports.ZodMiniRecord = exports.ZodMiniTuple = exports.ZodMiniIntersection = exports.ZodMiniDiscriminatedUnion = exports.ZodMiniXor = 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.ZodMiniIBAN = exports.ZodMiniCreditCard = exports.ZodMiniE164 = exports.ZodMiniBase64URL = exports.ZodMiniBase64 = exports.ZodMiniMAC = 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.ZodMiniFunction = exports.stringbool = exports.meta = exports.describe = exports.ZodMiniProperties = exports.ZodMiniCustom = exports.ZodMiniPromise = exports.ZodMiniLazy = exports.ZodMiniTemplateLiteral = exports.ZodMiniReadonly = exports.ZodMiniCodec = exports.ZodMiniPipe = exports.ZodMiniNaN = exports.ZodMiniCatch = exports.ZodMiniSuccess = exports.ZodMiniNonOptional = exports.ZodMiniPrefault = exports.ZodMiniDefault = exports.ZodMiniNullable = exports.ZodMiniExactOptional = exports.ZodMiniOptional = exports.ZodMiniTransform = exports.ZodMiniFile = exports.ZodMiniLiteral = void 0;
|
|
28
28
|
exports.string = string;
|
|
29
29
|
exports.email = email;
|
|
30
30
|
exports.guid = guid;
|
|
@@ -50,6 +50,7 @@ exports.base64 = base64;
|
|
|
50
50
|
exports.base64url = base64url;
|
|
51
51
|
exports.e164 = e164;
|
|
52
52
|
exports.creditCard = creditCard;
|
|
53
|
+
exports.iban = iban;
|
|
53
54
|
exports.jwt = jwt;
|
|
54
55
|
exports.stringFormat = stringFormat;
|
|
55
56
|
exports.hostname = hostname;
|
|
@@ -119,6 +120,7 @@ exports.readonly = readonly;
|
|
|
119
120
|
exports.templateLiteral = templateLiteral;
|
|
120
121
|
exports.lazy = _lazy;
|
|
121
122
|
exports.promise = promise;
|
|
123
|
+
exports.properties = properties;
|
|
122
124
|
exports.check = check;
|
|
123
125
|
exports.custom = custom;
|
|
124
126
|
exports.refine = refine;
|
|
@@ -388,6 +390,14 @@ exports.ZodMiniCreditCard = core.$constructor("ZodMiniCreditCard", (inst, def) =
|
|
|
388
390
|
function creditCard(params) {
|
|
389
391
|
return core._creditCard(exports.ZodMiniCreditCard, params);
|
|
390
392
|
}
|
|
393
|
+
exports.ZodMiniIBAN = core.$constructor("ZodMiniIBAN", (inst, def) => {
|
|
394
|
+
core.$ZodIBAN.init(inst, def);
|
|
395
|
+
exports.ZodMiniStringFormat.init(inst, def);
|
|
396
|
+
});
|
|
397
|
+
// @__NO_SIDE_EFFECTS__
|
|
398
|
+
function iban(params) {
|
|
399
|
+
return core._iban(exports.ZodMiniIBAN, params);
|
|
400
|
+
}
|
|
391
401
|
exports.ZodMiniJWT = core.$constructor("ZodMiniJWT", (inst, def) => {
|
|
392
402
|
core.$ZodJWT.init(inst, def);
|
|
393
403
|
exports.ZodMiniStringFormat.init(inst, def);
|
|
@@ -639,7 +649,8 @@ function required(schema, mask) {
|
|
|
639
649
|
}
|
|
640
650
|
// @__NO_SIDE_EFFECTS__
|
|
641
651
|
function catchall(inst, catchall) {
|
|
642
|
-
|
|
652
|
+
// `mergeDefs` rather than a spread: spreading reads `shape`, and resolving it can mint a whole fresh subtree
|
|
653
|
+
return inst.clone(util.mergeDefs(inst._zod.def, { catchall: catchall }));
|
|
643
654
|
}
|
|
644
655
|
exports.ZodMiniUnion = core.$constructor("ZodMiniUnion", (inst, def) => {
|
|
645
656
|
core.$ZodUnion.init(inst, def);
|
|
@@ -778,7 +789,8 @@ function set(valueType, params) {
|
|
|
778
789
|
exports.ZodMiniEnum = core.$constructor("ZodMiniEnum", (inst, def) => {
|
|
779
790
|
core.$ZodEnum.init(inst, def);
|
|
780
791
|
exports.ZodMiniType.init(inst, def);
|
|
781
|
-
|
|
792
|
+
// reuse the parsed value set so a numeric TS enum's reverse-mapping keys stay out
|
|
793
|
+
inst.options = [...inst._zod.values];
|
|
782
794
|
});
|
|
783
795
|
// @__NO_SIDE_EFFECTS__
|
|
784
796
|
function _enum(values, params) {
|
|
@@ -1033,6 +1045,13 @@ exports.ZodMiniCustom = core.$constructor("ZodMiniCustom", (inst, def) => {
|
|
|
1033
1045
|
core.$ZodCustom.init(inst, def);
|
|
1034
1046
|
exports.ZodMiniType.init(inst, def);
|
|
1035
1047
|
});
|
|
1048
|
+
exports.ZodMiniProperties = core.$constructor("ZodMiniProperties", (inst, def) => {
|
|
1049
|
+
core.$ZodProperties.init(inst, def);
|
|
1050
|
+
exports.ZodMiniType.init(inst, def);
|
|
1051
|
+
});
|
|
1052
|
+
function properties(shape, params) {
|
|
1053
|
+
return core._properties(exports.ZodMiniProperties, shape, params);
|
|
1054
|
+
}
|
|
1036
1055
|
// custom checks
|
|
1037
1056
|
// @__NO_SIDE_EFFECTS__
|
|
1038
1057
|
function check(fn, params) {
|
|
@@ -1109,3 +1128,22 @@ function _function(params) {
|
|
|
1109
1128
|
output: params?.output ?? unknown(),
|
|
1110
1129
|
});
|
|
1111
1130
|
}
|
|
1131
|
+
|
|
1132
|
+
// seal-cjs-exports
|
|
1133
|
+
(function () {
|
|
1134
|
+
var keys = Object.getOwnPropertyNames(exports);
|
|
1135
|
+
for (var i = 0; i < keys.length; i++) {
|
|
1136
|
+
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
|
|
1137
|
+
if (!desc || !desc.get || !desc.configurable) continue;
|
|
1138
|
+
var value;
|
|
1139
|
+
try {
|
|
1140
|
+
value = desc.get();
|
|
1141
|
+
} catch (e) {
|
|
1142
|
+
continue;
|
|
1143
|
+
}
|
|
1144
|
+
// a circular require may not have settled this one yet, so leave it live
|
|
1145
|
+
if (value === undefined) continue;
|
|
1146
|
+
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
|
|
1147
|
+
}
|
|
1148
|
+
Object.freeze(exports);
|
|
1149
|
+
})();
|
package/v4/mini/schemas.d.cts
CHANGED
|
@@ -132,6 +132,10 @@ export interface ZodMiniCreditCard extends _ZodMiniString<core.$ZodCreditCardInt
|
|
|
132
132
|
}
|
|
133
133
|
export declare const ZodMiniCreditCard: core.$constructor<ZodMiniCreditCard>;
|
|
134
134
|
export declare function creditCard(params?: string | core.$ZodCreditCardParams): ZodMiniCreditCard;
|
|
135
|
+
export interface ZodMiniIBAN extends _ZodMiniString<core.$ZodIBANInternals> {
|
|
136
|
+
}
|
|
137
|
+
export declare const ZodMiniIBAN: core.$constructor<ZodMiniIBAN>;
|
|
138
|
+
export declare function iban(params?: string | core.$ZodIBANParams): ZodMiniIBAN;
|
|
135
139
|
export interface ZodMiniJWT extends _ZodMiniString<core.$ZodJWTInternals> {
|
|
136
140
|
}
|
|
137
141
|
export declare const ZodMiniJWT: core.$constructor<ZodMiniJWT>;
|
|
@@ -415,6 +419,10 @@ export declare function promise<T extends SomeType>(innerType: T): ZodMiniPromis
|
|
|
415
419
|
export interface ZodMiniCustom<O = unknown, I = unknown> extends _ZodMiniType<core.$ZodCustomInternals<O, I>> {
|
|
416
420
|
}
|
|
417
421
|
export declare const ZodMiniCustom: core.$constructor<ZodMiniCustom>;
|
|
422
|
+
export interface ZodMiniProperties<Shape extends core.$ZodShape = core.$ZodShape> extends _ZodMiniType<core.$ZodPropertiesInternals<Shape>>, core.$ZodProperties<Shape> {
|
|
423
|
+
}
|
|
424
|
+
export declare const ZodMiniProperties: core.$constructor<ZodMiniProperties>;
|
|
425
|
+
export declare function properties<Shape extends core.$ZodShape>(shape: Shape, params?: string | core.$ZodPropertiesParams): ZodMiniProperties<Shape>;
|
|
418
426
|
export declare function check<O = unknown>(fn: core.CheckFn<O>, params?: string | core.$ZodCustomParams): core.$ZodCheck<O>;
|
|
419
427
|
export declare function custom<O = unknown, I = O>(fn?: (data: O) => unknown, _params?: string | core.$ZodCustomParams | undefined): ZodMiniCustom<O, I>;
|
|
420
428
|
export declare function refine<T>(fn: (arg: NoInfer<T>) => util.MaybeAsync<unknown>, _params?: string | core.$ZodCustomParams): core.$ZodCheck<T>;
|
package/v4/mini/schemas.d.ts
CHANGED
|
@@ -132,6 +132,10 @@ export interface ZodMiniCreditCard extends _ZodMiniString<core.$ZodCreditCardInt
|
|
|
132
132
|
}
|
|
133
133
|
export declare const ZodMiniCreditCard: core.$constructor<ZodMiniCreditCard>;
|
|
134
134
|
export declare function creditCard(params?: string | core.$ZodCreditCardParams): ZodMiniCreditCard;
|
|
135
|
+
export interface ZodMiniIBAN extends _ZodMiniString<core.$ZodIBANInternals> {
|
|
136
|
+
}
|
|
137
|
+
export declare const ZodMiniIBAN: core.$constructor<ZodMiniIBAN>;
|
|
138
|
+
export declare function iban(params?: string | core.$ZodIBANParams): ZodMiniIBAN;
|
|
135
139
|
export interface ZodMiniJWT extends _ZodMiniString<core.$ZodJWTInternals> {
|
|
136
140
|
}
|
|
137
141
|
export declare const ZodMiniJWT: core.$constructor<ZodMiniJWT>;
|
|
@@ -415,6 +419,10 @@ export declare function promise<T extends SomeType>(innerType: T): ZodMiniPromis
|
|
|
415
419
|
export interface ZodMiniCustom<O = unknown, I = unknown> extends _ZodMiniType<core.$ZodCustomInternals<O, I>> {
|
|
416
420
|
}
|
|
417
421
|
export declare const ZodMiniCustom: core.$constructor<ZodMiniCustom>;
|
|
422
|
+
export interface ZodMiniProperties<Shape extends core.$ZodShape = core.$ZodShape> extends _ZodMiniType<core.$ZodPropertiesInternals<Shape>>, core.$ZodProperties<Shape> {
|
|
423
|
+
}
|
|
424
|
+
export declare const ZodMiniProperties: core.$constructor<ZodMiniProperties>;
|
|
425
|
+
export declare function properties<Shape extends core.$ZodShape>(shape: Shape, params?: string | core.$ZodPropertiesParams): ZodMiniProperties<Shape>;
|
|
418
426
|
export declare function check<O = unknown>(fn: core.CheckFn<O>, params?: string | core.$ZodCustomParams): core.$ZodCheck<O>;
|
|
419
427
|
export declare function custom<O = unknown, I = O>(fn?: (data: O) => unknown, _params?: string | core.$ZodCustomParams | undefined): ZodMiniCustom<O, I>;
|
|
420
428
|
export declare function refine<T>(fn: (arg: NoInfer<T>) => util.MaybeAsync<unknown>, _params?: string | core.$ZodCustomParams): core.$ZodCheck<T>;
|