@oxog/vld 2.0.2 → 2.1.0
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/CHANGELOG.md +75 -1
- package/LICENSE +20 -20
- package/README.md +101 -37
- package/dist/chunks/errors-core-BeiFUtZM.js +81 -0
- package/dist/chunks/{index-CETyGkrv.js → index-0R2ntSud.js} +16 -402
- package/dist/chunks/index-BvH403Yy.js +88 -0
- package/dist/chunks/security-B0Pd_vSY.js +35 -0
- package/dist/chunks/string-BJRQod3t.js +530 -0
- package/dist/cjs/chunks/errors-core-DWxLFs2f.cjs +83 -0
- package/dist/cjs/chunks/index-BkI37108.cjs +538 -0
- package/dist/cjs/chunks/index-Cc3bjUMX.cjs +91 -0
- package/dist/cjs/chunks/security-Dc3Jh13T.cjs +37 -0
- package/dist/cjs/chunks/string-BKZrc4hs.cjs +533 -0
- package/dist/cjs/cli/bin.cjs +506 -0
- package/dist/cjs/cli/index.cjs +209 -0
- package/dist/cjs/codecs/index.cjs +45 -0
- package/dist/{chunks/date-ODue_rtq.js → cjs/coercion/index.cjs} +185 -103
- package/dist/cjs/compat/emitter.cjs +184 -0
- package/dist/cjs/compat/result.cjs +189 -0
- package/dist/cjs/errors.cjs +6 -213
- package/dist/cjs/index.cjs +1558 -9647
- package/dist/cjs/kernel.cjs +415 -0
- package/dist/cjs/locales/af.cjs +108 -0
- package/dist/cjs/locales/ar.cjs +108 -0
- package/dist/cjs/locales/bn.cjs +108 -0
- package/dist/cjs/locales/da.cjs +108 -0
- package/dist/cjs/locales/de.cjs +108 -0
- package/dist/cjs/locales/en.cjs +108 -0
- package/dist/cjs/locales/es-MX.cjs +107 -0
- package/dist/cjs/locales/es.cjs +96 -0
- package/dist/cjs/locales/fi.cjs +108 -0
- package/dist/cjs/locales/fr.cjs +96 -0
- package/dist/cjs/locales/hi.cjs +108 -0
- package/dist/cjs/locales/id.cjs +108 -0
- package/dist/cjs/locales/index.cjs +41 -2875
- package/dist/cjs/locales/it.cjs +108 -0
- package/dist/cjs/locales/ja.cjs +108 -0
- package/dist/cjs/locales/ko.cjs +108 -0
- package/dist/cjs/locales/lazy.cjs +42 -3023
- package/dist/cjs/locales/nl.cjs +108 -0
- package/dist/cjs/locales/no.cjs +108 -0
- package/dist/cjs/locales/pl.cjs +108 -0
- package/dist/cjs/locales/pt-BR.cjs +108 -0
- package/dist/cjs/locales/pt.cjs +108 -0
- package/dist/cjs/locales/ru.cjs +108 -0
- package/dist/cjs/locales/runtime.cjs +51 -0
- package/dist/cjs/locales/sv.cjs +108 -0
- package/dist/cjs/locales/sw.cjs +108 -0
- package/dist/cjs/locales/th.cjs +108 -0
- package/dist/cjs/locales/tr.cjs +108 -0
- package/dist/cjs/locales/vi.cjs +108 -0
- package/dist/cjs/locales/zh.cjs +108 -0
- package/dist/cjs/mini.cjs +121 -7208
- package/dist/cjs/pigment.cjs +207 -0
- package/dist/cjs/plugins/index.cjs +12 -0
- package/dist/cjs/registry.cjs +37 -0
- package/dist/cjs/v3/index.cjs +425 -0
- package/dist/cjs/v4/core/index.cjs +894 -0
- package/dist/cjs/v4/index.cjs +425 -0
- package/dist/cjs/v4/locales/index.cjs +130 -0
- package/dist/cjs/v4/mini/index.cjs +509 -0
- package/dist/cjs/v4-mini/index.cjs +532 -0
- package/dist/cjs/validators/any.cjs +40 -0
- package/dist/cjs/validators/array.cjs +283 -0
- package/dist/cjs/validators/base.cjs +887 -0
- package/dist/cjs/validators/base64.cjs +73 -0
- package/dist/cjs/validators/bigint.cjs +232 -0
- package/dist/cjs/validators/boolean.cjs +146 -0
- package/dist/cjs/validators/codec.cjs +205 -0
- package/dist/cjs/validators/custom.cjs +71 -0
- package/dist/cjs/validators/date.cjs +278 -0
- package/dist/cjs/validators/discriminated-union.cjs +130 -0
- package/dist/cjs/validators/enum.cjs +154 -0
- package/dist/cjs/validators/file.cjs +130 -0
- package/dist/cjs/validators/function.cjs +63 -0
- package/dist/cjs/validators/hex.cjs +70 -0
- package/dist/cjs/validators/index.cjs +123 -0
- package/dist/cjs/validators/intersection.cjs +120 -0
- package/dist/cjs/validators/json.cjs +70 -0
- package/dist/cjs/validators/lazy.cjs +53 -0
- package/dist/cjs/validators/literal.cjs +64 -0
- package/dist/cjs/validators/map.cjs +218 -0
- package/dist/cjs/validators/nan.cjs +41 -0
- package/dist/cjs/validators/never.cjs +36 -0
- package/dist/cjs/validators/null.cjs +43 -0
- package/dist/cjs/validators/number.cjs +427 -0
- package/dist/cjs/validators/object.cjs +868 -0
- package/dist/cjs/validators/promise.cjs +115 -0
- package/dist/cjs/validators/record.cjs +262 -0
- package/dist/cjs/validators/set.cjs +203 -0
- package/dist/cjs/validators/string-bool.cjs +124 -0
- package/dist/cjs/validators/string-formats.cjs +168 -0
- package/dist/cjs/validators/string.cjs +12 -0
- package/dist/cjs/validators/symbol.cjs +62 -0
- package/dist/cjs/validators/template-literal.cjs +108 -0
- package/dist/cjs/validators/tuple.cjs +187 -0
- package/dist/cjs/validators/uint8array.cjs +106 -0
- package/dist/cjs/validators/undefined.cjs +43 -0
- package/dist/cjs/validators/union.cjs +191 -0
- package/dist/cjs/validators/unknown.cjs +40 -0
- package/dist/cjs/validators/void.cjs +48 -0
- package/dist/cjs/validators/xor.cjs +69 -0
- package/dist/cli/bin.d.ts +0 -1
- package/dist/cli/bin.js +407 -0
- package/dist/cli/commands/benchmark.d.ts +1 -2
- package/dist/cli/commands/validate.d.ts +1 -2
- package/dist/cli/index.d.ts +0 -1
- package/dist/cli/index.js +205 -0
- package/dist/codecs/index.d.ts +21 -4
- package/dist/codecs/index.js +11 -4
- package/dist/coercion/bigint.d.ts +2 -3
- package/dist/coercion/boolean.d.ts +3 -3
- package/dist/coercion/date.d.ts +3 -3
- package/dist/coercion/index.d.ts +5 -6
- package/dist/coercion/index.js +473 -5
- package/dist/coercion/number.d.ts +2 -3
- package/dist/coercion/string.d.ts +2 -3
- package/dist/compat/emitter.d.ts +0 -1
- package/dist/compat/emitter.js +0 -1
- package/dist/compat/index.d.ts +4 -5
- package/dist/compat/result.d.ts +1 -2
- package/dist/compat/result.js +0 -1
- package/dist/errors-core.d.ts +39 -0
- package/dist/errors.d.ts +4 -54
- package/dist/errors.js +4 -68
- package/dist/events.d.ts +3 -4
- package/dist/index.d.ts +1195 -600
- package/dist/index.js +1262 -44
- package/dist/kernel.d.ts +2 -3
- package/dist/kernel.js +10 -6
- package/dist/locales/af.d.ts +1 -2
- package/dist/locales/af.js +0 -1
- package/dist/locales/ar.d.ts +1 -2
- package/dist/locales/ar.js +0 -1
- package/dist/locales/bn.d.ts +1 -2
- package/dist/locales/bn.js +0 -1
- package/dist/locales/da.d.ts +1 -2
- package/dist/locales/da.js +0 -1
- package/dist/locales/de.d.ts +1 -2
- package/dist/locales/de.js +0 -1
- package/dist/locales/en.d.ts +1 -2
- package/dist/locales/en.js +0 -1
- package/dist/locales/es-MX.d.ts +1 -2
- package/dist/locales/es-MX.js +0 -1
- package/dist/locales/es.d.ts +1 -2
- package/dist/locales/es.js +0 -1
- package/dist/locales/fi.d.ts +1 -2
- package/dist/locales/fi.js +0 -1
- package/dist/locales/fr.d.ts +1 -2
- package/dist/locales/fr.js +0 -1
- package/dist/locales/hi.d.ts +1 -2
- package/dist/locales/hi.js +0 -1
- package/dist/locales/id.d.ts +1 -2
- package/dist/locales/id.js +0 -1
- package/dist/locales/index.d.ts +10 -15
- package/dist/locales/index.js +28 -2
- package/dist/locales/it.d.ts +1 -2
- package/dist/locales/it.js +0 -1
- package/dist/locales/ja.d.ts +1 -2
- package/dist/locales/ja.js +0 -1
- package/dist/locales/ko.d.ts +1 -2
- package/dist/locales/ko.js +0 -1
- package/dist/locales/lazy.d.ts +4 -26
- package/dist/locales/lazy.js +12 -55
- package/dist/locales/nl.d.ts +1 -2
- package/dist/locales/nl.js +0 -1
- package/dist/locales/no.d.ts +1 -2
- package/dist/locales/no.js +0 -1
- package/dist/locales/pl.d.ts +1 -2
- package/dist/locales/pl.js +0 -1
- package/dist/locales/pt-BR.d.ts +1 -2
- package/dist/locales/pt-BR.js +0 -1
- package/dist/locales/pt.d.ts +1 -2
- package/dist/locales/pt.js +0 -1
- package/dist/locales/ru.d.ts +1 -2
- package/dist/locales/ru.js +0 -1
- package/dist/locales/runtime.d.ts +10 -0
- package/dist/locales/runtime.js +41 -0
- package/dist/locales/sv.d.ts +1 -2
- package/dist/locales/sv.js +0 -1
- package/dist/locales/sw.d.ts +1 -2
- package/dist/locales/sw.js +0 -1
- package/dist/locales/th.d.ts +1 -2
- package/dist/locales/th.js +0 -1
- package/dist/locales/tr.d.ts +1 -2
- package/dist/locales/tr.js +0 -1
- package/dist/locales/types.d.ts +0 -1
- package/dist/locales/vi.d.ts +1 -2
- package/dist/locales/vi.js +0 -1
- package/dist/locales/zh.d.ts +1 -2
- package/dist/locales/zh.js +0 -1
- package/dist/logger.d.ts +0 -1
- package/dist/mini.d.ts +64 -65
- package/dist/mini.js +31 -7
- package/dist/pigment.d.ts +0 -1
- package/dist/pigment.js +6 -4
- package/dist/plugins/index.d.ts +2 -3
- package/dist/plugins/index.js +1 -0
- package/dist/plugins/types.d.ts +4 -5
- package/dist/registry.d.ts +23 -0
- package/dist/registry.js +34 -0
- package/dist/utils/codec-utils.d.ts +0 -1
- package/dist/utils/deep-merge.d.ts +0 -1
- package/dist/utils/ip-validation.d.ts +0 -1
- package/dist/utils/json-schema.d.ts +77 -0
- package/dist/utils/security.d.ts +2 -6
- package/dist/v3/index.d.ts +2 -0
- package/dist/v3/index.js +46 -0
- package/dist/v4/core/index.d.ts +260 -0
- package/dist/v4/core/index.js +277 -0
- package/dist/v4/index.d.ts +4 -0
- package/dist/v4/index.js +50 -0
- package/dist/v4/locales/index.d.ts +53 -0
- package/dist/v4/locales/index.js +77 -0
- package/dist/v4/mini/index.d.ts +2 -0
- package/dist/v4/mini/index.js +47 -0
- package/dist/v4-mini/index.d.ts +22 -0
- package/dist/v4-mini/index.js +75 -0
- package/dist/validators/any.d.ts +7 -2
- package/dist/validators/any.js +37 -0
- package/dist/validators/array.d.ts +9 -2
- package/dist/validators/array.js +279 -0
- package/dist/validators/base.d.ts +228 -5
- package/dist/validators/base.js +868 -0
- package/dist/validators/base64.d.ts +1 -2
- package/dist/validators/base64.js +68 -0
- package/dist/validators/bigint.d.ts +21 -3
- package/dist/validators/bigint.js +228 -0
- package/dist/validators/boolean.d.ts +13 -4
- package/dist/validators/boolean.js +142 -0
- package/dist/validators/codec.d.ts +9 -2
- package/dist/validators/codec.js +200 -0
- package/dist/validators/custom.d.ts +15 -2
- package/dist/validators/custom.js +67 -0
- package/dist/validators/date.d.ts +19 -3
- package/dist/validators/date.js +274 -0
- package/dist/validators/discriminated-union.d.ts +4 -3
- package/dist/validators/discriminated-union.js +123 -0
- package/dist/validators/enum.d.ts +10 -7
- package/dist/validators/enum.js +150 -0
- package/dist/validators/file.d.ts +7 -2
- package/dist/validators/file.js +125 -0
- package/dist/validators/function.d.ts +11 -5
- package/dist/validators/function.js +58 -0
- package/dist/validators/hex.d.ts +1 -2
- package/dist/validators/hex.js +65 -0
- package/dist/validators/index.d.ts +38 -38
- package/dist/validators/index.js +35 -5
- package/dist/validators/intersection.d.ts +1 -2
- package/dist/validators/intersection.js +116 -0
- package/dist/validators/json.d.ts +1 -2
- package/dist/validators/json.js +66 -0
- package/dist/validators/lazy.d.ts +5 -9
- package/dist/validators/lazy.js +50 -0
- package/dist/validators/literal.d.ts +2 -2
- package/dist/validators/literal.js +60 -0
- package/dist/validators/map.d.ts +15 -2
- package/dist/validators/map.js +214 -0
- package/dist/validators/nan.d.ts +2 -3
- package/dist/validators/nan.js +38 -0
- package/dist/validators/never.d.ts +1 -2
- package/dist/validators/never.js +32 -0
- package/dist/validators/null.d.ts +3 -3
- package/dist/validators/null.js +40 -0
- package/dist/validators/number.d.ts +80 -21
- package/dist/validators/number.js +423 -0
- package/dist/validators/object.d.ts +30 -9
- package/dist/validators/object.js +864 -0
- package/dist/validators/promise.d.ts +58 -0
- package/dist/validators/promise.js +111 -0
- package/dist/validators/record.d.ts +11 -2
- package/dist/validators/record.js +258 -0
- package/dist/validators/set.d.ts +11 -2
- package/dist/validators/set.js +199 -0
- package/dist/validators/string-bool.d.ts +7 -10
- package/dist/validators/string-bool.js +120 -0
- package/dist/validators/string-formats.d.ts +13 -4
- package/dist/validators/string-formats.js +135 -0
- package/dist/validators/string.d.ts +39 -18
- package/dist/validators/string.js +4 -0
- package/dist/validators/symbol.d.ts +8 -3
- package/dist/validators/symbol.js +58 -0
- package/dist/validators/template-literal.d.ts +1 -2
- package/dist/validators/template-literal.js +103 -0
- package/dist/validators/tuple.d.ts +15 -2
- package/dist/validators/tuple.js +183 -0
- package/dist/validators/uint8array.d.ts +3 -4
- package/dist/validators/uint8array.js +101 -0
- package/dist/validators/undefined.d.ts +3 -3
- package/dist/validators/undefined.js +40 -0
- package/dist/validators/union.d.ts +7 -4
- package/dist/validators/union.js +187 -0
- package/dist/validators/unknown.d.ts +7 -2
- package/dist/{chunks/unknown-SLIH1VCf.js → validators/unknown.js} +12 -3
- package/dist/validators/void.d.ts +3 -2
- package/dist/validators/void.js +44 -0
- package/dist/validators/xor.d.ts +2 -3
- package/dist/validators/xor.js +66 -0
- package/package.json +116 -31
- package/dist/chunks/bigint-DgsCr2dC.js +0 -1709
- package/dist/chunks/bigint-DgsCr2dC.js.map +0 -1
- package/dist/chunks/date-ODue_rtq.js.map +0 -1
- package/dist/chunks/index-BZqWZvVe.js +0 -426
- package/dist/chunks/index-BZqWZvVe.js.map +0 -1
- package/dist/chunks/index-CETyGkrv.js.map +0 -1
- package/dist/chunks/json-o20GFhTh.js +0 -2021
- package/dist/chunks/json-o20GFhTh.js.map +0 -1
- package/dist/chunks/unknown-SLIH1VCf.js.map +0 -1
- package/dist/cjs/errors.cjs.map +0 -1
- package/dist/cjs/index.cjs.map +0 -1
- package/dist/cjs/locales/index.cjs.map +0 -1
- package/dist/cjs/locales/lazy.cjs.map +0 -1
- package/dist/cjs/mini.cjs.map +0 -1
- package/dist/cli/bin.d.ts.map +0 -1
- package/dist/cli/commands/benchmark.d.ts.map +0 -1
- package/dist/cli/commands/validate.d.ts.map +0 -1
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/codecs/index.d.ts.map +0 -1
- package/dist/codecs/index.js.map +0 -1
- package/dist/coercion/bigint.d.ts.map +0 -1
- package/dist/coercion/boolean.d.ts.map +0 -1
- package/dist/coercion/date.d.ts.map +0 -1
- package/dist/coercion/index.d.ts.map +0 -1
- package/dist/coercion/index.js.map +0 -1
- package/dist/coercion/number.d.ts.map +0 -1
- package/dist/coercion/string.d.ts.map +0 -1
- package/dist/compat/emitter.d.ts.map +0 -1
- package/dist/compat/emitter.js.map +0 -1
- package/dist/compat/index.d.ts.map +0 -1
- package/dist/compat/result.d.ts.map +0 -1
- package/dist/compat/result.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/events.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/kernel.d.ts.map +0 -1
- package/dist/kernel.js.map +0 -1
- package/dist/locales/af.d.ts.map +0 -1
- package/dist/locales/af.js.map +0 -1
- package/dist/locales/ar.d.ts.map +0 -1
- package/dist/locales/ar.js.map +0 -1
- package/dist/locales/backup-en.d.ts +0 -3
- package/dist/locales/backup-en.d.ts.map +0 -1
- package/dist/locales/bn.d.ts.map +0 -1
- package/dist/locales/bn.js.map +0 -1
- package/dist/locales/da.d.ts.map +0 -1
- package/dist/locales/da.js.map +0 -1
- package/dist/locales/de.d.ts.map +0 -1
- package/dist/locales/de.js.map +0 -1
- package/dist/locales/en.d.ts.map +0 -1
- package/dist/locales/en.js.map +0 -1
- package/dist/locales/es-MX.d.ts.map +0 -1
- package/dist/locales/es-MX.js.map +0 -1
- package/dist/locales/es.d.ts.map +0 -1
- package/dist/locales/es.js.map +0 -1
- package/dist/locales/fi.d.ts.map +0 -1
- package/dist/locales/fi.js.map +0 -1
- package/dist/locales/fr.d.ts.map +0 -1
- package/dist/locales/fr.js.map +0 -1
- package/dist/locales/hi.d.ts.map +0 -1
- package/dist/locales/hi.js.map +0 -1
- package/dist/locales/id.d.ts.map +0 -1
- package/dist/locales/id.js.map +0 -1
- package/dist/locales/index.d.ts.map +0 -1
- package/dist/locales/index.js.map +0 -1
- package/dist/locales/it.d.ts.map +0 -1
- package/dist/locales/it.js.map +0 -1
- package/dist/locales/ja.d.ts.map +0 -1
- package/dist/locales/ja.js.map +0 -1
- package/dist/locales/ko.d.ts.map +0 -1
- package/dist/locales/ko.js.map +0 -1
- package/dist/locales/lazy.d.ts.map +0 -1
- package/dist/locales/lazy.js.map +0 -1
- package/dist/locales/nl.d.ts.map +0 -1
- package/dist/locales/nl.js.map +0 -1
- package/dist/locales/no.d.ts.map +0 -1
- package/dist/locales/no.js.map +0 -1
- package/dist/locales/pl.d.ts.map +0 -1
- package/dist/locales/pl.js.map +0 -1
- package/dist/locales/pt-BR.d.ts.map +0 -1
- package/dist/locales/pt-BR.js.map +0 -1
- package/dist/locales/pt.d.ts.map +0 -1
- package/dist/locales/pt.js.map +0 -1
- package/dist/locales/ru.d.ts.map +0 -1
- package/dist/locales/ru.js.map +0 -1
- package/dist/locales/sv.d.ts.map +0 -1
- package/dist/locales/sv.js.map +0 -1
- package/dist/locales/sw.d.ts.map +0 -1
- package/dist/locales/sw.js.map +0 -1
- package/dist/locales/th.d.ts.map +0 -1
- package/dist/locales/th.js.map +0 -1
- package/dist/locales/tr.d.ts.map +0 -1
- package/dist/locales/tr.js.map +0 -1
- package/dist/locales/types.d.ts.map +0 -1
- package/dist/locales/vi.d.ts.map +0 -1
- package/dist/locales/vi.js.map +0 -1
- package/dist/locales/zh.d.ts.map +0 -1
- package/dist/locales/zh.js.map +0 -1
- package/dist/logger.d.ts.map +0 -1
- package/dist/mini.d.ts.map +0 -1
- package/dist/mini.js.map +0 -1
- package/dist/pigment.d.ts.map +0 -1
- package/dist/pigment.js.map +0 -1
- package/dist/plugins/index.d.ts.map +0 -1
- package/dist/plugins/types.d.ts.map +0 -1
- package/dist/utils/codec-utils.d.ts.map +0 -1
- package/dist/utils/deep-merge.d.ts.map +0 -1
- package/dist/utils/ip-validation.d.ts.map +0 -1
- package/dist/utils/security.d.ts.map +0 -1
- package/dist/validators/any.d.ts.map +0 -1
- package/dist/validators/array.d.ts.map +0 -1
- package/dist/validators/base.d.ts.map +0 -1
- package/dist/validators/base64.d.ts.map +0 -1
- package/dist/validators/bigint.d.ts.map +0 -1
- package/dist/validators/boolean.d.ts.map +0 -1
- package/dist/validators/codec.d.ts.map +0 -1
- package/dist/validators/custom.d.ts.map +0 -1
- package/dist/validators/date.d.ts.map +0 -1
- package/dist/validators/discriminated-union.d.ts.map +0 -1
- package/dist/validators/enum.d.ts.map +0 -1
- package/dist/validators/file.d.ts.map +0 -1
- package/dist/validators/function.d.ts.map +0 -1
- package/dist/validators/hex.d.ts.map +0 -1
- package/dist/validators/index.d.ts.map +0 -1
- package/dist/validators/index.js.map +0 -1
- package/dist/validators/intersection.d.ts.map +0 -1
- package/dist/validators/json.d.ts.map +0 -1
- package/dist/validators/lazy.d.ts.map +0 -1
- package/dist/validators/literal.d.ts.map +0 -1
- package/dist/validators/map.d.ts.map +0 -1
- package/dist/validators/nan.d.ts.map +0 -1
- package/dist/validators/never.d.ts.map +0 -1
- package/dist/validators/null.d.ts.map +0 -1
- package/dist/validators/number.d.ts.map +0 -1
- package/dist/validators/object.d.ts.map +0 -1
- package/dist/validators/record.d.ts.map +0 -1
- package/dist/validators/set.d.ts.map +0 -1
- package/dist/validators/string-bool.d.ts.map +0 -1
- package/dist/validators/string-formats.d.ts.map +0 -1
- package/dist/validators/string.d.ts.map +0 -1
- package/dist/validators/symbol.d.ts.map +0 -1
- package/dist/validators/template-literal.d.ts.map +0 -1
- package/dist/validators/tuple.d.ts.map +0 -1
- package/dist/validators/uint8array.d.ts.map +0 -1
- package/dist/validators/undefined.d.ts.map +0 -1
- package/dist/validators/union.d.ts.map +0 -1
- package/dist/validators/unknown.d.ts.map +0 -1
- package/dist/validators/void.d.ts.map +0 -1
- package/dist/validators/xor.d.ts.map +0 -1
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
export * from '../../index.js';
|
|
2
|
+
export { core as default, core, util, ZodIssueCode } from '../../index.js';
|
|
3
|
+
export { VldError as $ZodError, VldError as $ZodRealError } from '../../errors.js';
|
|
4
|
+
export { VldBase as $ZodType, VldCatch as $ZodCatch, VldDefault as $ZodDefault, VldNullable as $ZodNullable, VldOptional as $ZodOptional, VldPipe as $ZodPipe, VldPrefault as $ZodPrefault, VldReadonly as $ZodReadonly, VldTransform as $ZodTransform } from '../../validators/base.js';
|
|
5
|
+
export { VldString as $ZodString } from '../../validators/string.js';
|
|
6
|
+
export { VldNumber as $ZodNumber } from '../../validators/number.js';
|
|
7
|
+
export { VldBoolean as $ZodBoolean } from '../../validators/boolean.js';
|
|
8
|
+
export { VldBigInt as $ZodBigInt } from '../../validators/bigint.js';
|
|
9
|
+
export { VldSymbol as $ZodSymbol } from '../../validators/symbol.js';
|
|
10
|
+
export { VldUndefined as $ZodUndefined } from '../../validators/undefined.js';
|
|
11
|
+
export { VldNull as $ZodNull } from '../../validators/null.js';
|
|
12
|
+
export { VldAny as $ZodAny } from '../../validators/any.js';
|
|
13
|
+
export { VldUnknown as $ZodUnknown } from '../../validators/unknown.js';
|
|
14
|
+
export { VldNever as $ZodNever } from '../../validators/never.js';
|
|
15
|
+
export { VldVoid as $ZodVoid } from '../../validators/void.js';
|
|
16
|
+
export { VldDate as $ZodDate } from '../../validators/date.js';
|
|
17
|
+
export { VldArray as $ZodArray } from '../../validators/array.js';
|
|
18
|
+
export { VldObject as $ZodObject } from '../../validators/object.js';
|
|
19
|
+
export { VldUnion as $ZodUnion } from '../../validators/union.js';
|
|
20
|
+
export { VldIntersection as $ZodIntersection } from '../../validators/intersection.js';
|
|
21
|
+
export { VldTuple as $ZodTuple } from '../../validators/tuple.js';
|
|
22
|
+
export { VldRecord as $ZodRecord } from '../../validators/record.js';
|
|
23
|
+
export { VldMap as $ZodMap } from '../../validators/map.js';
|
|
24
|
+
export { VldSet as $ZodSet } from '../../validators/set.js';
|
|
25
|
+
export { VldEnum as $ZodEnum } from '../../validators/enum.js';
|
|
26
|
+
export { VldLiteral as $ZodLiteral } from '../../validators/literal.js';
|
|
27
|
+
export { VldFile as $ZodFile } from '../../validators/file.js';
|
|
28
|
+
export { VldLazy as $ZodLazy } from '../../validators/lazy.js';
|
|
29
|
+
export { VldPromise as $ZodPromise } from '../../validators/promise.js';
|
|
30
|
+
export { VldCustom as $ZodCustom } from '../../validators/custom.js';
|
|
31
|
+
export { VldBase64 as $ZodBase64, VldBase64 as $ZodBase64URL } from '../../validators/base64.js';
|
|
32
|
+
export { VldCodec as $ZodCodec } from '../../validators/codec.js';
|
|
33
|
+
export { VldDiscriminatedUnion as $ZodDiscriminatedUnion } from '../../validators/discriminated-union.js';
|
|
34
|
+
export { VldFunction as $ZodFunction } from '../../validators/function.js';
|
|
35
|
+
export { VldJson as $ZodSuccess } from '../../validators/json.js';
|
|
36
|
+
export { VldNan as $ZodNaN } from '../../validators/nan.js';
|
|
37
|
+
export { VldTemplateLiteral as $ZodTemplateLiteral } from '../../validators/template-literal.js';
|
|
38
|
+
export { VldXor as $ZodXor } from '../../validators/xor.js';
|
|
39
|
+
export { VldExactOptional as $ZodExactOptional, VldPreprocess as $ZodPreprocess, VldRefine as $ZodNonOptional } from '../../validators/base.js';
|
|
40
|
+
export { VldStringFormat as $ZodBigIntFormat, VldStringFormat as $ZodCIDRv4, VldStringFormat as $ZodCIDRv6, VldStringFormat as $ZodCUID, VldStringFormat as $ZodCUID2, VldStringFormat as $ZodCustomStringFormat, VldStringFormat as $ZodE164, VldStringFormat as $ZodEmail, VldStringFormat as $ZodEmoji, VldStringFormat as $ZodGUID, VldStringFormat as $ZodIPv4, VldStringFormat as $ZodIPv6, VldStringFormat as $ZodISODate, VldStringFormat as $ZodISODateTime, VldStringFormat as $ZodISODuration, VldStringFormat as $ZodISOTime, VldStringFormat as $ZodJWT, VldStringFormat as $ZodKSUID, VldStringFormat as $ZodMAC, VldStringFormat as $ZodNanoID, VldStringFormat as $ZodNumberFormat, VldStringFormat as $ZodStringFormat, VldStringFormat as $ZodULID, VldStringFormat as $ZodURL, VldStringFormat as $ZodUUID, VldStringFormat as $ZodXID } from '../../validators/string-formats.js';
|
|
41
|
+
export { registry as $ZodRegistry } from '../../registry.js';
|
|
42
|
+
import * as root from '../../index.js';
|
|
43
|
+
import type { VldBase } from '../../validators/base.js';
|
|
44
|
+
type AnySchema = VldBase<any, any>;
|
|
45
|
+
type Params = string | {
|
|
46
|
+
message?: string;
|
|
47
|
+
error?: string;
|
|
48
|
+
};
|
|
49
|
+
export declare class $ZodAsyncError extends Error {
|
|
50
|
+
}
|
|
51
|
+
export declare class $ZodEncodeError extends Error {
|
|
52
|
+
}
|
|
53
|
+
export declare class $ZodCheck {
|
|
54
|
+
}
|
|
55
|
+
export declare class $ZodCheckBigIntFormat extends $ZodCheck {
|
|
56
|
+
}
|
|
57
|
+
export declare class $ZodCheckEndsWith extends $ZodCheck {
|
|
58
|
+
}
|
|
59
|
+
export declare class $ZodCheckGreaterThan extends $ZodCheck {
|
|
60
|
+
}
|
|
61
|
+
export declare class $ZodCheckIncludes extends $ZodCheck {
|
|
62
|
+
}
|
|
63
|
+
export declare class $ZodCheckLengthEquals extends $ZodCheck {
|
|
64
|
+
}
|
|
65
|
+
export declare class $ZodCheckLessThan extends $ZodCheck {
|
|
66
|
+
}
|
|
67
|
+
export declare class $ZodCheckLowerCase extends $ZodCheck {
|
|
68
|
+
}
|
|
69
|
+
export declare class $ZodCheckMaxLength extends $ZodCheck {
|
|
70
|
+
}
|
|
71
|
+
export declare class $ZodCheckMaxSize extends $ZodCheck {
|
|
72
|
+
}
|
|
73
|
+
export declare class $ZodCheckMimeType extends $ZodCheck {
|
|
74
|
+
}
|
|
75
|
+
export declare class $ZodCheckMinLength extends $ZodCheck {
|
|
76
|
+
}
|
|
77
|
+
export declare class $ZodCheckMinSize extends $ZodCheck {
|
|
78
|
+
}
|
|
79
|
+
export declare class $ZodCheckMultipleOf extends $ZodCheck {
|
|
80
|
+
}
|
|
81
|
+
export declare class $ZodCheckNumberFormat extends $ZodCheck {
|
|
82
|
+
}
|
|
83
|
+
export declare class $ZodCheckOverwrite extends $ZodCheck {
|
|
84
|
+
}
|
|
85
|
+
export declare class $ZodCheckProperty extends $ZodCheck {
|
|
86
|
+
}
|
|
87
|
+
export declare class $ZodCheckRegex extends $ZodCheck {
|
|
88
|
+
}
|
|
89
|
+
export declare class $ZodCheckSizeEquals extends $ZodCheck {
|
|
90
|
+
}
|
|
91
|
+
export declare class $ZodCheckStartsWith extends $ZodCheck {
|
|
92
|
+
}
|
|
93
|
+
export declare class $ZodCheckStringFormat extends $ZodCheck {
|
|
94
|
+
}
|
|
95
|
+
export declare class $ZodCheckUpperCase extends $ZodCheck {
|
|
96
|
+
}
|
|
97
|
+
export declare const $ZodObjectJIT: typeof root.ZodObject;
|
|
98
|
+
export declare class Doc {
|
|
99
|
+
}
|
|
100
|
+
export declare const JSONSchema: {};
|
|
101
|
+
export declare class JSONSchemaGenerator {
|
|
102
|
+
}
|
|
103
|
+
export declare const globalConfig: {};
|
|
104
|
+
export declare const version: {
|
|
105
|
+
major: number;
|
|
106
|
+
minor: number;
|
|
107
|
+
patch: number;
|
|
108
|
+
};
|
|
109
|
+
export declare const $constructor: (name: string, initializer?: (instance: unknown, def: unknown) => void) => {
|
|
110
|
+
new (def?: unknown): {};
|
|
111
|
+
displayName: string;
|
|
112
|
+
};
|
|
113
|
+
export declare const _parse: <T>(schema: VldBase<unknown, T>, value: unknown) => T;
|
|
114
|
+
export declare const _default: (...args: unknown[]) => root.ZodDefault<any, any>;
|
|
115
|
+
export declare const _safeParse: <T>(schema: VldBase<unknown, T>, value: unknown) => root.ParseResult<T>;
|
|
116
|
+
export declare const _parseAsync: <T>(schema: VldBase<unknown, T>, value: unknown) => Promise<T>;
|
|
117
|
+
export declare const _safeParseAsync: <T>(schema: VldBase<unknown, T>, value: unknown) => Promise<root.ParseResult<T>>;
|
|
118
|
+
export declare const _encode: <TInput, TOutput>(schema: VldBase<TInput, TOutput>, value: unknown) => TInput | TOutput;
|
|
119
|
+
export declare const _safeEncode: <TInput, TOutput>(schema: VldBase<TInput, TOutput>, value: unknown) => root.ParseResult<TInput | TOutput>;
|
|
120
|
+
export declare const _decode: <T>(schema: VldBase<unknown, T>, value: unknown) => T;
|
|
121
|
+
export declare const _safeDecode: <T>(schema: VldBase<unknown, T>, value: unknown) => root.ParseResult<T>;
|
|
122
|
+
export declare const _encodeAsync: <TInput, TOutput>(schema: VldBase<TInput, TOutput>, value: unknown) => Promise<TInput | TOutput>;
|
|
123
|
+
export declare const _safeEncodeAsync: <TInput, TOutput>(schema: VldBase<TInput, TOutput>, value: unknown) => Promise<root.ParseResult<TInput | TOutput>>;
|
|
124
|
+
export declare const _decodeAsync: <T>(schema: VldBase<unknown, T>, value: unknown) => Promise<T>;
|
|
125
|
+
export declare const _safeDecodeAsync: <T>(schema: VldBase<unknown, T>, value: unknown) => Promise<root.ParseResult<T>>;
|
|
126
|
+
export declare const _string: (..._args: unknown[]) => root.ZodString;
|
|
127
|
+
export declare const _number: (..._args: unknown[]) => root.ZodNumber;
|
|
128
|
+
export declare const _boolean: (..._args: unknown[]) => root.ZodBoolean;
|
|
129
|
+
export declare const _bigint: (..._args: unknown[]) => root.ZodBigInt;
|
|
130
|
+
export declare const _symbol: (..._args: unknown[]) => root.ZodSymbol;
|
|
131
|
+
export declare const _undefined: (..._args: unknown[]) => root.ZodUndefined;
|
|
132
|
+
export declare const _null: (..._args: unknown[]) => root.ZodNull;
|
|
133
|
+
export declare const _any: (..._args: unknown[]) => root.ZodAny;
|
|
134
|
+
export declare const _unknown: (..._args: unknown[]) => root.ZodUnknown;
|
|
135
|
+
export declare const _never: (..._args: unknown[]) => root.ZodNever;
|
|
136
|
+
export declare const _void: (..._args: unknown[]) => root.ZodVoid;
|
|
137
|
+
export declare const _date: (..._args: unknown[]) => root.ZodDate;
|
|
138
|
+
export declare const _array: (...args: unknown[]) => root.ZodArray<any>;
|
|
139
|
+
export declare const _object: (...args: unknown[]) => root.ZodObject<{
|
|
140
|
+
[x: string]: /*elided*/ any;
|
|
141
|
+
}>;
|
|
142
|
+
export declare const _union: (...args: unknown[]) => root.ZodUnion<AnySchema[]>;
|
|
143
|
+
export declare const _intersection: (...args: unknown[]) => root.VldIntersection<any, any>;
|
|
144
|
+
export declare const _tuple: (...args: unknown[]) => root.ZodTuple<AnySchema[]>;
|
|
145
|
+
export declare const _record: (...args: unknown[]) => root.ZodRecord<any>;
|
|
146
|
+
export declare const _map: (...args: unknown[]) => root.ZodMap<any, any>;
|
|
147
|
+
export declare const _set: (...args: unknown[]) => root.ZodSet<any>;
|
|
148
|
+
export declare const _enum: (...args: unknown[]) => root.ZodEnum<any>;
|
|
149
|
+
export declare const _nativeEnum: (...args: unknown[]) => root.ZodEnum<any>;
|
|
150
|
+
export declare const _literal: (...args: unknown[]) => root.ZodLiteral<any>;
|
|
151
|
+
export declare const _file: (..._args: unknown[]) => root.ZodFile;
|
|
152
|
+
export declare const _lazy: (...args: unknown[]) => root.ZodLazy<unknown, any>;
|
|
153
|
+
export declare const _promise: (...args: unknown[]) => root.ZodPromise<any>;
|
|
154
|
+
export declare const _optional: (...args: unknown[]) => root.ZodOptional<unknown, any>;
|
|
155
|
+
export declare const _nullable: (...args: unknown[]) => root.ZodNullable<unknown, any>;
|
|
156
|
+
export declare const _nonoptional: (...args: unknown[]) => root.ZodNonOptional<unknown, any, any>;
|
|
157
|
+
export declare const _readonly: (...args: unknown[]) => root.ZodReadonly<unknown, any>;
|
|
158
|
+
export declare const _templateLiteral: (...args: unknown[]) => root.ZodTemplateLiteral;
|
|
159
|
+
export declare const _stringbool: (...args: unknown[]) => import("../../validators/index.js").VldStringBool;
|
|
160
|
+
export declare const _nan: (..._args: unknown[]) => root.ZodNaN;
|
|
161
|
+
export declare const _email: (options?: {
|
|
162
|
+
pattern?: RegExp;
|
|
163
|
+
}) => root.ZodBase64;
|
|
164
|
+
export declare const _guid: () => root.ZodBase64;
|
|
165
|
+
export declare const _uuid: (options?: {
|
|
166
|
+
version?: "v4" | "v6" | "v7";
|
|
167
|
+
}) => root.ZodBase64;
|
|
168
|
+
export declare const _uuidv4: () => root.ZodBase64;
|
|
169
|
+
export declare const _uuidv6: () => root.ZodBase64;
|
|
170
|
+
export declare const _uuidv7: () => root.ZodBase64;
|
|
171
|
+
export declare const _url: () => root.ZodString;
|
|
172
|
+
export declare const _emoji: () => root.ZodBase64;
|
|
173
|
+
export declare const _nanoid: () => root.ZodBase64;
|
|
174
|
+
export declare const _cuid: () => root.ZodBase64;
|
|
175
|
+
export declare const _cuid2: () => root.ZodBase64;
|
|
176
|
+
export declare const _ulid: () => root.ZodBase64;
|
|
177
|
+
export declare const _xid: () => root.ZodBase64;
|
|
178
|
+
export declare const _ksuid: () => root.ZodBase64;
|
|
179
|
+
export declare const _ipv4: () => root.ZodBase64;
|
|
180
|
+
export declare const _ipv6: () => root.ZodBase64;
|
|
181
|
+
export declare const _cidrv4: () => root.ZodBase64;
|
|
182
|
+
export declare const _cidrv6: () => root.ZodBase64;
|
|
183
|
+
export declare const _base64: () => root.ZodBase64;
|
|
184
|
+
export declare const _base64url: () => root.ZodBase64;
|
|
185
|
+
export declare const _e164: () => root.ZodBase64;
|
|
186
|
+
export declare const _jwt: () => root.ZodBase64;
|
|
187
|
+
export declare const _isoDateTime: () => root.ZodBase64;
|
|
188
|
+
export declare const _isoDate: () => root.ZodBase64;
|
|
189
|
+
export declare const _isoTime: () => root.ZodBase64;
|
|
190
|
+
export declare const _isoDuration: () => root.ZodBase64;
|
|
191
|
+
export declare const _mac: () => root.ZodBase64;
|
|
192
|
+
export declare const _mime: (types: string | string[], message?: string) => root.ZodFile;
|
|
193
|
+
export declare const _stringFormat: (name: string, validator: ((val: string) => boolean) | RegExp) => root.ZodBase64;
|
|
194
|
+
export declare const _min: (value: number, params?: Params) => root.ZodNumber;
|
|
195
|
+
export declare const _max: (value: number, params?: Params) => root.ZodNumber;
|
|
196
|
+
export declare const _gt: (value: number, params?: Params) => root.ZodNumber;
|
|
197
|
+
export declare const _gte: (value: number, params?: Params) => root.ZodNumber;
|
|
198
|
+
export declare const _lt: (value: number, params?: Params) => root.ZodNumber;
|
|
199
|
+
export declare const _lte: (value: number, params?: Params) => root.ZodNumber;
|
|
200
|
+
export declare const _int: () => root.ZodNumber;
|
|
201
|
+
export declare const _int32: () => root.ZodNumber;
|
|
202
|
+
export declare const _uint32: () => root.ZodNumber;
|
|
203
|
+
export declare const _int64: () => root.ZodNumber;
|
|
204
|
+
export declare const _uint64: () => root.ZodNumber;
|
|
205
|
+
export declare const _float32: () => root.ZodNumber;
|
|
206
|
+
export declare const _float64: () => root.ZodNumber;
|
|
207
|
+
export declare const _positive: (message?: import("../../validators/base.js").ErrorParam) => root.ZodNumber;
|
|
208
|
+
export declare const _negative: (message?: import("../../validators/base.js").ErrorParam) => root.ZodNumber;
|
|
209
|
+
export declare const _nonpositive: (message?: import("../../validators/base.js").ErrorParam) => root.ZodNumber;
|
|
210
|
+
export declare const _nonnegative: (message?: import("../../validators/base.js").ErrorParam) => root.ZodNumber;
|
|
211
|
+
export declare const _multipleOf: (value: number, message?: import("../../validators/base.js").ErrorParam) => root.ZodNumber;
|
|
212
|
+
export declare const _minLength: (value: number, message?: import("../../validators/base.js").ErrorParam) => root.ZodString;
|
|
213
|
+
export declare const _maxLength: (value: number, message?: import("../../validators/base.js").ErrorParam) => root.ZodString;
|
|
214
|
+
export declare const _length: (value: number, message?: import("../../validators/base.js").ErrorParam) => root.ZodString;
|
|
215
|
+
export declare const _size: (value: number, message?: import("../../validators/base.js").ErrorParam) => root.ZodString;
|
|
216
|
+
export declare const _minSize: (value: number, message?: import("../../validators/base.js").ErrorParam) => root.ZodString;
|
|
217
|
+
export declare const _maxSize: (value: number, message?: import("../../validators/base.js").ErrorParam) => root.ZodString;
|
|
218
|
+
export declare const _regex: (pattern: RegExp, message?: import("../../validators/base.js").ErrorParam) => root.ZodString;
|
|
219
|
+
export declare const _startsWith: (value: string, message?: import("../../validators/base.js").ErrorParam) => root.ZodString;
|
|
220
|
+
export declare const _endsWith: (value: string, message?: import("../../validators/base.js").ErrorParam) => root.ZodString;
|
|
221
|
+
export declare const _includes: (value: string, message?: import("../../validators/base.js").ErrorParam) => root.ZodString;
|
|
222
|
+
export declare const _lowercase: () => root.ZodString;
|
|
223
|
+
export declare const _uppercase: () => root.ZodString;
|
|
224
|
+
export declare const _trim: () => root.ZodString;
|
|
225
|
+
export declare const _normalize: (form?: "NFC" | "NFD" | "NFKC" | "NFKD" | (string & {})) => root.ZodTransform<string, string, string>;
|
|
226
|
+
export declare const _slugify: () => root.ZodTransform<string, string, string>;
|
|
227
|
+
export declare const _toLowerCase: () => root.ZodString;
|
|
228
|
+
export declare const _toUpperCase: () => root.ZodString;
|
|
229
|
+
export declare const _check: (...args: unknown[]) => root.VldBase<unknown, unknown>;
|
|
230
|
+
export declare const _custom: (...args: unknown[]) => root.ZodCustom<unknown>;
|
|
231
|
+
export declare const _refine: (...args: unknown[]) => root.VldBase<unknown, unknown>;
|
|
232
|
+
export declare const _superRefine: (...args: unknown[]) => root.VldBase<unknown, any>;
|
|
233
|
+
export declare const _transform: (...args: unknown[]) => root.VldBase<unknown, unknown> | root.ZodTransform<unknown, unknown, unknown>;
|
|
234
|
+
export declare const _overwrite: (...args: unknown[]) => root.VldBase<unknown, unknown>;
|
|
235
|
+
export declare const _pipe: (...args: unknown[]) => root.ZodPipe<any, any, any>;
|
|
236
|
+
export declare const _catch: (...args: unknown[]) => root.ZodCatch<unknown, any>;
|
|
237
|
+
export declare const _success: (...args: unknown[]) => root.Ok<any>;
|
|
238
|
+
export declare const _property: (...args: unknown[]) => root.VldBase<unknown, {
|
|
239
|
+
[x: string]: any;
|
|
240
|
+
}>;
|
|
241
|
+
export declare const _coercedString: () => import("../../coercion/index.js").VldCoerceString;
|
|
242
|
+
export declare const _coercedNumber: () => import("../../coercion/index.js").VldCoerceNumber;
|
|
243
|
+
export declare const _coercedBoolean: () => import("../../coercion/index.js").VldCoerceBoolean;
|
|
244
|
+
export declare const _coercedBigint: () => import("../../coercion/index.js").VldCoerceBigInt;
|
|
245
|
+
export declare const _coercedDate: () => import("../../coercion/index.js").VldCoerceDate;
|
|
246
|
+
export declare const _codec: (...args: unknown[]) => root.ZodCodec<any, any>;
|
|
247
|
+
export declare const _function: (..._args: unknown[]) => root.ZodFunction;
|
|
248
|
+
export declare const _discriminatedUnion: (...args: unknown[]) => root.ZodDiscriminatedUnion<any, any>;
|
|
249
|
+
export declare const _xor: (...args: unknown[]) => root.ZodXor<any>;
|
|
250
|
+
export declare const createToJSONSchemaMethod: () => typeof root.toJSONSchema;
|
|
251
|
+
export declare const createStandardJSONSchemaMethod: () => typeof root.toJSONSchema;
|
|
252
|
+
export declare const extractDefs: () => {};
|
|
253
|
+
export declare const finalize: (schema: unknown) => unknown;
|
|
254
|
+
export declare const initializeContext: () => {};
|
|
255
|
+
export declare const process: (schema: unknown) => unknown;
|
|
256
|
+
export declare const toDotPath: (path: readonly (string | number)[]) => string;
|
|
257
|
+
export declare const isValidBase64: (value: string) => boolean;
|
|
258
|
+
export declare const isValidBase64URL: (value: string) => boolean;
|
|
259
|
+
export declare const isValidJWT: (value: string) => boolean;
|
|
260
|
+
export declare const _checkInternal: () => never;
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { base64, base64url, cidrv4, cidrv6, coerce, cuid, cuid2, decode, decodeAsync, e164, email, emoji, encode, encodeAsync, endsWith, float32, float64, guid, includes, int, int32, int64, ipv4, ipv6, iso, jwt, ksuid, length, lowercase, mac, maxLength, maxSize, mime, minLength, minSize, multipleOf, nanoid, negative, nonnegative, nonpositive, normalize, parse, parseAsync, positive, regex, safeDecode, safeDecodeAsync, safeEncode, safeEncodeAsync, safeParse, safeParseAsync, size, slugify, startsWith, stringFormat, toLowerCase, toUpperCase, trim, uint32, uint64, ulid, uppercase, url, uuid, uuidv4, uuidv6, uuidv7, xid, toJSONSchema, any, array, bigint, boolean, catch as catchFactory, check, codec, custom, date, discriminatedUnion, enum as enumFactory, nativeEnum, file, _function as functionFactory, number, intersection, lazy, literal, map, nan, never as neverFactory, nonoptional, null as nullFactory, nullable, object, optional, overwrite, pipe, promise, property, readonly, record, refine, set, string, stringbool, superRefine, symbol, templateLiteral, transform, tuple, undefined as undefinedFactory, union, unknown, void as voidFactory, xor } from '../../index.js';
|
|
2
|
+
export { $brand, $input, $output, NEVER, TimePrecision, ZodFirstPartyTypeKind, ZodIssueCode, _ZodString, base64Bytes, clone, config, core, createLogger, createNoOpLogger, core as default, describe, disableLogging, enableDebug, exactOptional, formatError, fromJSONSchema, getErrorMap, getLogger, gt, gte, hash, hex, hexBytes, hostname, httpUrl, initLogger, instanceof, json, keyof, locales, looseObject, looseRecord, lt, lte, mapSchema, meta, nullish, partialRecord, prefault, preprocess, regexes, setErrorMap, setLogLevel, strictObject, uint8Array, util, default as v, z } from '../../index.js';
|
|
3
|
+
export { flattenError, prettifyError, prettifyErrorColored, prettifyErrorPlain, treeifyError } from '../../errors.js';
|
|
4
|
+
export { VldCatch as $ZodCatch, VldDefault as $ZodDefault, VldExactOptional as $ZodExactOptional, VldRefine as $ZodNonOptional, VldNullable as $ZodNullable, VldOptional as $ZodOptional, VldPipe as $ZodPipe, VldPrefault as $ZodPrefault, VldPreprocess as $ZodPreprocess, VldReadonly as $ZodReadonly, VldTransform as $ZodTransform, VldBase as $ZodType, VldBase, VldMeta, VldBrand as ZodBranded, VldCatch as ZodCatch, VldDefault as ZodDefault, VldExactOptional as ZodExactOptional, VldMeta as ZodMeta, VldRefine as ZodNonOptional, VldNullable as ZodNullable, VldOptional as ZodOptional, VldPipe as ZodPipe, VldPrefault as ZodPrefault, VldPreprocess as ZodPreprocess, VldReadonly as ZodReadonly, VldTransform as ZodTransform, VldBase as ZodType } from '../../validators/base.js';
|
|
5
|
+
export { V as $ZodString, V as ZodString } from '../../chunks/string-BJRQod3t.js';
|
|
6
|
+
export { VldNumber as $ZodNumber, VldNumber as ZodNumber, VldNumber as ZodNumberFormat } from '../../validators/number.js';
|
|
7
|
+
export { VldBoolean as $ZodBoolean, VldBoolean as ZodBoolean } from '../../validators/boolean.js';
|
|
8
|
+
export { VldBigInt as $ZodBigInt, VldBigInt as ZodBigInt, VldBigInt as ZodBigIntFormat } from '../../validators/bigint.js';
|
|
9
|
+
export { VldSymbol as $ZodSymbol, VldSymbol as ZodSymbol } from '../../validators/symbol.js';
|
|
10
|
+
export { VldUndefined as $ZodUndefined, VldUndefined as ZodUndefined } from '../../validators/undefined.js';
|
|
11
|
+
export { VldNull as $ZodNull, VldNull as ZodNull } from '../../validators/null.js';
|
|
12
|
+
export { VldAny as $ZodAny, VldAny as ZodAny } from '../../validators/any.js';
|
|
13
|
+
export { VldUnknown as $ZodUnknown, VldUnknown as ZodUnknown } from '../../validators/unknown.js';
|
|
14
|
+
export { VldNever as $ZodNever, VldNever as ZodNever } from '../../validators/never.js';
|
|
15
|
+
export { VldVoid as $ZodVoid, VldVoid as ZodVoid } from '../../validators/void.js';
|
|
16
|
+
export { VldDate as $ZodDate, VldDate as ZodDate } from '../../validators/date.js';
|
|
17
|
+
export { VldArray as $ZodArray, VldArray as ZodArray } from '../../validators/array.js';
|
|
18
|
+
import { VldObject } from '../../validators/object.js';
|
|
19
|
+
export { VldUnion as $ZodUnion, VldUnion as ZodUnion } from '../../validators/union.js';
|
|
20
|
+
export { VldIntersection as $ZodIntersection, VldIntersection, VldIntersection as ZodIntersection } from '../../validators/intersection.js';
|
|
21
|
+
export { VldTuple as $ZodTuple, VldTuple as ZodTuple } from '../../validators/tuple.js';
|
|
22
|
+
export { VldRecord as $ZodRecord, VldRecord as ZodRecord } from '../../validators/record.js';
|
|
23
|
+
export { VldMap as $ZodMap, VldMap as ZodMap } from '../../validators/map.js';
|
|
24
|
+
export { VldSet as $ZodSet, VldSet as ZodSet } from '../../validators/set.js';
|
|
25
|
+
export { VldEnum as $ZodEnum, VldEnum as ZodEnum } from '../../validators/enum.js';
|
|
26
|
+
export { VldLiteral as $ZodLiteral, VldLiteral as ZodLiteral } from '../../validators/literal.js';
|
|
27
|
+
export { VldFile as $ZodFile, VldFile as ZodFile } from '../../validators/file.js';
|
|
28
|
+
export { VldLazy as $ZodLazy, VldLazy as ZodLazy } from '../../validators/lazy.js';
|
|
29
|
+
export { VldPromise as $ZodPromise, VldPromise as ZodPromise } from '../../validators/promise.js';
|
|
30
|
+
export { VldCustom as $ZodCustom, VldCustom as ZodCustom, VldCustom as ZodSuccess } from '../../validators/custom.js';
|
|
31
|
+
export { VldBase64 as $ZodBase64, VldBase64 as $ZodBase64URL } from '../../validators/base64.js';
|
|
32
|
+
export { VldCodec as $ZodCodec, VldCodec as ZodCodec } from '../../validators/codec.js';
|
|
33
|
+
export { VldDiscriminatedUnion as $ZodDiscriminatedUnion, VldDiscriminatedUnion as ZodDiscriminatedUnion } from '../../validators/discriminated-union.js';
|
|
34
|
+
export { VldFunction as $ZodFunction, VldFunction as ZodFunction } from '../../validators/function.js';
|
|
35
|
+
export { VldJson as $ZodSuccess, VldJson as ZodJSON } from '../../validators/json.js';
|
|
36
|
+
export { VldNan as $ZodNaN, VldNan as ZodNaN } from '../../validators/nan.js';
|
|
37
|
+
export { VldTemplateLiteral as $ZodTemplateLiteral, VldTemplateLiteral as ZodTemplateLiteral } from '../../validators/template-literal.js';
|
|
38
|
+
export { VldXor as $ZodXor, VldXor as ZodXor } from '../../validators/xor.js';
|
|
39
|
+
export { VldStringFormat as $ZodBigIntFormat, VldStringFormat as $ZodCIDRv4, VldStringFormat as $ZodCIDRv6, VldStringFormat as $ZodCUID, VldStringFormat as $ZodCUID2, VldStringFormat as $ZodCustomStringFormat, VldStringFormat as $ZodE164, VldStringFormat as $ZodEmail, VldStringFormat as $ZodEmoji, VldStringFormat as $ZodGUID, VldStringFormat as $ZodIPv4, VldStringFormat as $ZodIPv6, VldStringFormat as $ZodISODate, VldStringFormat as $ZodISODateTime, VldStringFormat as $ZodISODuration, VldStringFormat as $ZodISOTime, VldStringFormat as $ZodJWT, VldStringFormat as $ZodKSUID, VldStringFormat as $ZodMAC, VldStringFormat as $ZodNanoID, VldStringFormat as $ZodNumberFormat, VldStringFormat as $ZodStringFormat, VldStringFormat as $ZodULID, VldStringFormat as $ZodURL, VldStringFormat as $ZodUUID, VldStringFormat as $ZodXID, VldStringFormat as ZodBase64, VldStringFormat as ZodBase64URL, VldStringFormat as ZodCIDRv4, VldStringFormat as ZodCIDRv6, VldStringFormat as ZodCUID, VldStringFormat as ZodCUID2, VldStringFormat as ZodCustomStringFormat, VldStringFormat as ZodE164, VldStringFormat as ZodEmail, VldStringFormat as ZodEmoji, VldStringFormat as ZodGUID, VldStringFormat as ZodIPv4, VldStringFormat as ZodIPv6, VldStringFormat as ZodISODate, VldStringFormat as ZodISODateTime, VldStringFormat as ZodISODuration, VldStringFormat as ZodISOTime, VldStringFormat as ZodJWT, VldStringFormat as ZodKSUID, VldStringFormat as ZodMAC, VldStringFormat as ZodNanoID, VldStringFormat as ZodStringFormat, VldStringFormat as ZodULID, VldStringFormat as ZodURL, VldStringFormat as ZodUUID, VldStringFormat as ZodXID } from '../../validators/string-formats.js';
|
|
40
|
+
export { registry as $ZodRegistry, globalRegistry, registry } from '../../registry.js';
|
|
41
|
+
import { success } from '../../compat/result.js';
|
|
42
|
+
export { Err, Ok, ResultUtils, all, failure, flatMap, fromNullable, isErr, isOk, isResult, mapErr, match, tryCatch, tryCatchAsync, unwrap, unwrapOr } from '../../compat/result.js';
|
|
43
|
+
export { V as $ZodError, V as $ZodRealError, V as VldError, V as ZodError, V as ZodRealError } from '../../chunks/errors-core-BeiFUtZM.js';
|
|
44
|
+
export { b as base64Json, a as base64ToBytes, c as base64ToUint8Array, d as base64UrlToBytes, e as base64urlToBytes, f as bytesToUtf8, g as epochMillisToDate, h as epochSecondsToDate, i as hexLowerToBytes, j as hexToBytes, k as hexToUint8Array, l as invertCodec, m as isoDatetimeToDate, n as jsonCodec, o as jwtPayload, p as numberToBigInt, s as stringToBigInt, q as stringToBoolean, r as stringToHttpURL, t as stringToInt, u as stringToNumber, v as stringToURL, w as stringToUint8Array, x as uint8ArrayToBase64, y as uint8ArrayToBase64Url, z as uint8ArrayToHex, A as uint8ArrayToString, B as uriComponent, C as utf8ToBytes } from '../../chunks/index-0R2ntSud.js';
|
|
45
|
+
export { blue, bold, createTheme, cyan, dim, gray, green, grey, italic, magenta, default as pigment, red, strip, supportsColor, underline, vldTheme, white, yellow } from '../../pigment.js';
|
|
46
|
+
export { createEmitter, createEventBus, withEmitter } from '../../compat/emitter.js';
|
|
47
|
+
export { createVldKernel, definePlugin, getVldKernel, resetVldKernel, usePlugin } from '../../kernel.js';
|
|
48
|
+
export { getLocale, getMessages, getSupportedLocales, isLocaleLoaded, isLocaleSupported, registerLocale, setLocale } from '../../locales/runtime.js';
|
|
49
|
+
export { s as setLocaleAsync } from '../../chunks/index-BvH403Yy.js';
|
|
50
|
+
|
|
51
|
+
const messageFromParams = (params) => typeof params === 'string' ? params : params?.message || params?.error;
|
|
52
|
+
const hasClassArg = (args) => typeof args[0] === 'function' && args.length > 1;
|
|
53
|
+
const schemaArg = (args, directIndex = 0) => args[hasClassArg(args) ? directIndex + 1 : directIndex];
|
|
54
|
+
const valueArg = (args, directIndex = 0) => args[hasClassArg(args) ? directIndex + 1 : directIndex];
|
|
55
|
+
const schemaArrayArg = (args, directIndex = 0) => {
|
|
56
|
+
const value = valueArg(args, directIndex);
|
|
57
|
+
return Array.isArray(value) ? value : args.slice(directIndex);
|
|
58
|
+
};
|
|
59
|
+
const unsupportedCoreFactory = (name) => () => {
|
|
60
|
+
throw new Error(`${name} is an internal Zod core compatibility placeholder`);
|
|
61
|
+
};
|
|
62
|
+
class $ZodAsyncError extends Error {
|
|
63
|
+
}
|
|
64
|
+
class $ZodEncodeError extends Error {
|
|
65
|
+
}
|
|
66
|
+
class $ZodCheck {
|
|
67
|
+
}
|
|
68
|
+
class $ZodCheckBigIntFormat extends $ZodCheck {
|
|
69
|
+
}
|
|
70
|
+
class $ZodCheckEndsWith extends $ZodCheck {
|
|
71
|
+
}
|
|
72
|
+
class $ZodCheckGreaterThan extends $ZodCheck {
|
|
73
|
+
}
|
|
74
|
+
class $ZodCheckIncludes extends $ZodCheck {
|
|
75
|
+
}
|
|
76
|
+
class $ZodCheckLengthEquals extends $ZodCheck {
|
|
77
|
+
}
|
|
78
|
+
class $ZodCheckLessThan extends $ZodCheck {
|
|
79
|
+
}
|
|
80
|
+
class $ZodCheckLowerCase extends $ZodCheck {
|
|
81
|
+
}
|
|
82
|
+
class $ZodCheckMaxLength extends $ZodCheck {
|
|
83
|
+
}
|
|
84
|
+
class $ZodCheckMaxSize extends $ZodCheck {
|
|
85
|
+
}
|
|
86
|
+
class $ZodCheckMimeType extends $ZodCheck {
|
|
87
|
+
}
|
|
88
|
+
class $ZodCheckMinLength extends $ZodCheck {
|
|
89
|
+
}
|
|
90
|
+
class $ZodCheckMinSize extends $ZodCheck {
|
|
91
|
+
}
|
|
92
|
+
class $ZodCheckMultipleOf extends $ZodCheck {
|
|
93
|
+
}
|
|
94
|
+
class $ZodCheckNumberFormat extends $ZodCheck {
|
|
95
|
+
}
|
|
96
|
+
class $ZodCheckOverwrite extends $ZodCheck {
|
|
97
|
+
}
|
|
98
|
+
class $ZodCheckProperty extends $ZodCheck {
|
|
99
|
+
}
|
|
100
|
+
class $ZodCheckRegex extends $ZodCheck {
|
|
101
|
+
}
|
|
102
|
+
class $ZodCheckSizeEquals extends $ZodCheck {
|
|
103
|
+
}
|
|
104
|
+
class $ZodCheckStartsWith extends $ZodCheck {
|
|
105
|
+
}
|
|
106
|
+
class $ZodCheckStringFormat extends $ZodCheck {
|
|
107
|
+
}
|
|
108
|
+
class $ZodCheckUpperCase extends $ZodCheck {
|
|
109
|
+
}
|
|
110
|
+
const $ZodObjectJIT = VldObject;
|
|
111
|
+
class Doc {
|
|
112
|
+
}
|
|
113
|
+
const JSONSchema = {};
|
|
114
|
+
class JSONSchemaGenerator {
|
|
115
|
+
}
|
|
116
|
+
const globalConfig = {};
|
|
117
|
+
const version = { major: 4, minor: 4, patch: 3 };
|
|
118
|
+
const $constructor = (name, initializer) => { var _a; return _a = class {
|
|
119
|
+
constructor(def) {
|
|
120
|
+
Object.defineProperty(this, '_zod', { value: { def }, enumerable: false });
|
|
121
|
+
initializer?.(this, def);
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
_a.displayName = name,
|
|
125
|
+
_a; };
|
|
126
|
+
const _parse = parse;
|
|
127
|
+
const _default = (...args) => {
|
|
128
|
+
const schema = schemaArg(args);
|
|
129
|
+
const defaultValue = valueArg(args, 1);
|
|
130
|
+
return schema.default(typeof defaultValue === 'function' ? defaultValue() : defaultValue);
|
|
131
|
+
};
|
|
132
|
+
const _safeParse = safeParse;
|
|
133
|
+
const _parseAsync = parseAsync;
|
|
134
|
+
const _safeParseAsync = safeParseAsync;
|
|
135
|
+
const _encode = encode;
|
|
136
|
+
const _safeEncode = safeEncode;
|
|
137
|
+
const _decode = decode;
|
|
138
|
+
const _safeDecode = safeDecode;
|
|
139
|
+
const _encodeAsync = encodeAsync;
|
|
140
|
+
const _safeEncodeAsync = safeEncodeAsync;
|
|
141
|
+
const _decodeAsync = decodeAsync;
|
|
142
|
+
const _safeDecodeAsync = safeDecodeAsync;
|
|
143
|
+
const _string = (..._args) => string();
|
|
144
|
+
const _number = (..._args) => number();
|
|
145
|
+
const _boolean = (..._args) => boolean();
|
|
146
|
+
const _bigint = (..._args) => bigint();
|
|
147
|
+
const _symbol = (..._args) => symbol();
|
|
148
|
+
const _undefined = (..._args) => undefinedFactory();
|
|
149
|
+
const _null = (..._args) => nullFactory();
|
|
150
|
+
const _any = (..._args) => any();
|
|
151
|
+
const _unknown = (..._args) => unknown();
|
|
152
|
+
const _never = (..._args) => neverFactory();
|
|
153
|
+
const _void = (..._args) => voidFactory();
|
|
154
|
+
const _date = (..._args) => date();
|
|
155
|
+
const _array = (...args) => array(schemaArg(args));
|
|
156
|
+
const _object = (...args) => object(valueArg(args));
|
|
157
|
+
const _union = (...args) => union(...schemaArrayArg(args));
|
|
158
|
+
const _intersection = (...args) => intersection(schemaArg(args), schemaArg(args, 1));
|
|
159
|
+
const _tuple = (...args) => tuple(...schemaArrayArg(args));
|
|
160
|
+
const _record = (...args) => record(schemaArg(args, hasClassArg(args) ? 1 : 0));
|
|
161
|
+
const _map = (...args) => map(schemaArg(args), schemaArg(args, 1));
|
|
162
|
+
const _set = (...args) => set(schemaArg(args));
|
|
163
|
+
const _enum = (...args) => {
|
|
164
|
+
const values = valueArg(args);
|
|
165
|
+
if (Array.isArray(values)) {
|
|
166
|
+
return enumFactory(...values);
|
|
167
|
+
}
|
|
168
|
+
return nativeEnum(values);
|
|
169
|
+
};
|
|
170
|
+
const _nativeEnum = (...args) => nativeEnum(valueArg(args));
|
|
171
|
+
const _literal = (...args) => literal(valueArg(args));
|
|
172
|
+
const _file = (..._args) => file();
|
|
173
|
+
const _lazy = (...args) => lazy(valueArg(args));
|
|
174
|
+
const _promise = (...args) => promise(schemaArg(args));
|
|
175
|
+
const _optional = (...args) => optional(schemaArg(args));
|
|
176
|
+
const _nullable = (...args) => nullable(schemaArg(args));
|
|
177
|
+
const _nonoptional = (...args) => nonoptional(schemaArg(args));
|
|
178
|
+
const _readonly = (...args) => readonly(schemaArg(args));
|
|
179
|
+
const _templateLiteral = (...args) => templateLiteral(...schemaArrayArg(args));
|
|
180
|
+
const _stringbool = (...args) => stringbool(valueArg(args));
|
|
181
|
+
const _nan = (..._args) => nan();
|
|
182
|
+
const _email = email;
|
|
183
|
+
const _guid = guid;
|
|
184
|
+
const _uuid = uuid;
|
|
185
|
+
const _uuidv4 = uuidv4;
|
|
186
|
+
const _uuidv6 = uuidv6;
|
|
187
|
+
const _uuidv7 = uuidv7;
|
|
188
|
+
const _url = url;
|
|
189
|
+
const _emoji = emoji;
|
|
190
|
+
const _nanoid = nanoid;
|
|
191
|
+
const _cuid = cuid;
|
|
192
|
+
const _cuid2 = cuid2;
|
|
193
|
+
const _ulid = ulid;
|
|
194
|
+
const _xid = xid;
|
|
195
|
+
const _ksuid = ksuid;
|
|
196
|
+
const _ipv4 = ipv4;
|
|
197
|
+
const _ipv6 = ipv6;
|
|
198
|
+
const _cidrv4 = cidrv4;
|
|
199
|
+
const _cidrv6 = cidrv6;
|
|
200
|
+
const _base64 = base64;
|
|
201
|
+
const _base64url = base64url;
|
|
202
|
+
const _e164 = e164;
|
|
203
|
+
const _jwt = jwt;
|
|
204
|
+
const _isoDateTime = iso.dateTime;
|
|
205
|
+
const _isoDate = iso.date;
|
|
206
|
+
const _isoTime = iso.time;
|
|
207
|
+
const _isoDuration = iso.duration;
|
|
208
|
+
const _mac = mac;
|
|
209
|
+
const _mime = mime;
|
|
210
|
+
const _stringFormat = stringFormat;
|
|
211
|
+
const _min = (value, params) => number().min(value, messageFromParams(params));
|
|
212
|
+
const _max = (value, params) => number().max(value, messageFromParams(params));
|
|
213
|
+
const _gt = (value, params) => number().gt(value, messageFromParams(params));
|
|
214
|
+
const _gte = (value, params) => number().gte(value, messageFromParams(params));
|
|
215
|
+
const _lt = (value, params) => number().lt(value, messageFromParams(params));
|
|
216
|
+
const _lte = (value, params) => number().lte(value, messageFromParams(params));
|
|
217
|
+
const _int = int;
|
|
218
|
+
const _int32 = int32;
|
|
219
|
+
const _uint32 = uint32;
|
|
220
|
+
const _int64 = int64;
|
|
221
|
+
const _uint64 = uint64;
|
|
222
|
+
const _float32 = float32;
|
|
223
|
+
const _float64 = float64;
|
|
224
|
+
const _positive = positive;
|
|
225
|
+
const _negative = negative;
|
|
226
|
+
const _nonpositive = nonpositive;
|
|
227
|
+
const _nonnegative = nonnegative;
|
|
228
|
+
const _multipleOf = multipleOf;
|
|
229
|
+
const _minLength = minLength;
|
|
230
|
+
const _maxLength = maxLength;
|
|
231
|
+
const _length = length;
|
|
232
|
+
const _size = size;
|
|
233
|
+
const _minSize = minSize;
|
|
234
|
+
const _maxSize = maxSize;
|
|
235
|
+
const _regex = regex;
|
|
236
|
+
const _startsWith = startsWith;
|
|
237
|
+
const _endsWith = endsWith;
|
|
238
|
+
const _includes = includes;
|
|
239
|
+
const _lowercase = lowercase;
|
|
240
|
+
const _uppercase = uppercase;
|
|
241
|
+
const _trim = trim;
|
|
242
|
+
const _normalize = normalize;
|
|
243
|
+
const _slugify = slugify;
|
|
244
|
+
const _toLowerCase = toLowerCase;
|
|
245
|
+
const _toUpperCase = toUpperCase;
|
|
246
|
+
const _check = (...args) => check(valueArg(args));
|
|
247
|
+
const _custom = (...args) => custom(valueArg(args));
|
|
248
|
+
const _refine = (...args) => refine(valueArg(args), valueArg(args, 1));
|
|
249
|
+
const _superRefine = (...args) => superRefine(schemaArg(args), valueArg(args, 1));
|
|
250
|
+
const _transform = (...args) => transform(valueArg(args));
|
|
251
|
+
const _overwrite = (...args) => overwrite(valueArg(args));
|
|
252
|
+
const _pipe = (...args) => pipe(schemaArg(args), schemaArg(args, 1));
|
|
253
|
+
const _catch = (...args) => catchFactory(schemaArg(args), valueArg(args, 1));
|
|
254
|
+
const _success = (...args) => success(valueArg(args));
|
|
255
|
+
const _property = (...args) => property(valueArg(args), schemaArg(args, 1), valueArg(args, 2));
|
|
256
|
+
const _coercedString = coerce.string;
|
|
257
|
+
const _coercedNumber = coerce.number;
|
|
258
|
+
const _coercedBoolean = coerce.boolean;
|
|
259
|
+
const _coercedBigint = coerce.bigint;
|
|
260
|
+
const _coercedDate = coerce.date;
|
|
261
|
+
const _codec = (...args) => codec(schemaArg(args), schemaArg(args, 1), valueArg(args, 2));
|
|
262
|
+
const _function = (..._args) => functionFactory();
|
|
263
|
+
const _discriminatedUnion = (...args) => discriminatedUnion(valueArg(args), ...schemaArrayArg(args, 1));
|
|
264
|
+
const _xor = (...args) => xor(...schemaArrayArg(args));
|
|
265
|
+
const createToJSONSchemaMethod = () => toJSONSchema;
|
|
266
|
+
const createStandardJSONSchemaMethod = () => toJSONSchema;
|
|
267
|
+
const extractDefs = () => ({});
|
|
268
|
+
const finalize = (schema) => schema;
|
|
269
|
+
const initializeContext = () => ({});
|
|
270
|
+
const process = (schema) => schema;
|
|
271
|
+
const toDotPath = (path) => path.map(String).join('.');
|
|
272
|
+
const isValidBase64 = (value) => base64().safeParse(value).success;
|
|
273
|
+
const isValidBase64URL = (value) => base64url().safeParse(value).success;
|
|
274
|
+
const isValidJWT = (value) => jwt().safeParse(value).success;
|
|
275
|
+
const _checkInternal = unsupportedCoreFactory('_checkInternal');
|
|
276
|
+
|
|
277
|
+
export { $ZodAsyncError, $ZodCheck, $ZodCheckBigIntFormat, $ZodCheckEndsWith, $ZodCheckGreaterThan, $ZodCheckIncludes, $ZodCheckLengthEquals, $ZodCheckLessThan, $ZodCheckLowerCase, $ZodCheckMaxLength, $ZodCheckMaxSize, $ZodCheckMimeType, $ZodCheckMinLength, $ZodCheckMinSize, $ZodCheckMultipleOf, $ZodCheckNumberFormat, $ZodCheckOverwrite, $ZodCheckProperty, $ZodCheckRegex, $ZodCheckSizeEquals, $ZodCheckStartsWith, $ZodCheckStringFormat, $ZodCheckUpperCase, $ZodEncodeError, VldObject as $ZodObject, $ZodObjectJIT, $constructor, Doc, JSONSchema, JSONSchemaGenerator, VldObject as ZodObject, _any, _array, _base64, _base64url, _bigint, _boolean, _catch, _check, _checkInternal, _cidrv4, _cidrv6, _codec, _coercedBigint, _coercedBoolean, _coercedDate, _coercedNumber, _coercedString, _cuid, _cuid2, _custom, _date, _decode, _decodeAsync, _default, _discriminatedUnion, _e164, _email, _emoji, _encode, _encodeAsync, _endsWith, _enum, _file, _float32, _float64, _function, _gt, _gte, _guid, _includes, _int, _int32, _int64, _intersection, _ipv4, _ipv6, _isoDate, _isoDateTime, _isoDuration, _isoTime, _jwt, _ksuid, _lazy, _length, _literal, _lowercase, _lt, _lte, _mac, _map, _max, _maxLength, _maxSize, _mime, _min, _minLength, _minSize, _multipleOf, _nan, _nanoid, _nativeEnum, _negative, _never, _nonnegative, _nonoptional, _nonpositive, _normalize, _null, _nullable, _number, _object, _optional, _overwrite, _parse, _parseAsync, _pipe, _positive, _promise, _property, _readonly, _record, _refine, _regex, _safeDecode, _safeDecodeAsync, _safeEncode, _safeEncodeAsync, _safeParse, _safeParseAsync, _set, _size, _slugify, _startsWith, _string, _stringFormat, _stringbool, _success, _superRefine, _symbol, _templateLiteral, _toLowerCase, _toUpperCase, _transform, _trim, _tuple, _uint32, _uint64, _ulid, _undefined, _union, _unknown, _uppercase, _url, _uuid, _uuidv4, _uuidv6, _uuidv7, _void, _xid, _xor, any, array, base64, base64url, bigint, boolean, catchFactory as catch, check, cidrv4, cidrv6, codec, coerce, createStandardJSONSchemaMethod, createToJSONSchemaMethod, cuid, cuid2, custom, date, decode, decodeAsync, discriminatedUnion, e164, email, emoji, encode, encodeAsync, endsWith, enumFactory as enum, extractDefs, file, finalize, float32, float64, functionFactory as function, globalConfig, guid, includes, initializeContext, int, int32, int64, intersection, ipv4, ipv6, isValidBase64, isValidBase64URL, isValidJWT, iso, jwt, ksuid, lazy, length, literal, lowercase, mac, map, maxLength, maxSize, mime, minLength, minSize, multipleOf, nan, nanoid, nativeEnum, negative, neverFactory as never, nonnegative, nonoptional, nonpositive, normalize, nullFactory as null, nullable, number, object, optional, overwrite, parse, parseAsync, pipe, positive, process, promise, property, readonly, record, refine, regex, safeDecode, safeDecodeAsync, safeEncode, safeEncodeAsync, safeParse, safeParseAsync, set, size, slugify, startsWith, string, stringFormat, stringbool, success, superRefine, symbol, templateLiteral, toDotPath, toJSONSchema, toLowerCase, toUpperCase, transform, trim, tuple, uint32, uint64, ulid, undefinedFactory as undefined, union, unknown, uppercase, url, uuid, uuidv4, uuidv6, uuidv7, version, voidFactory as void, xid, xor };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export * from '../index.js';
|
|
2
|
+
export { default } from '../index.js';
|
|
3
|
+
import type { VldBase } from '../validators/base.js';
|
|
4
|
+
export declare const _default: <TInput, TOutput>(schema: VldBase<TInput, TOutput>, defaultValue: TOutput | (() => TOutput)) => import("../index.js").ZodDefault<TInput, TOutput>;
|
package/dist/v4/index.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export { $brand, $input, $output, NEVER, TimePrecision, ZodFirstPartyTypeKind, ZodIssueCode, _ZodString, _function, any, array, base64, base64Bytes, base64url, bigint, boolean, catch, check, cidrv4, cidrv6, clone, codec, coerce, config, core, createLogger, createNoOpLogger, cuid, cuid2, custom, date, decode, decodeAsync, default, describe, disableLogging, discriminatedUnion, e164, email, emoji, enableDebug, encode, encodeAsync, endsWith, enum, exactOptional, file, float32, float64, formatError, fromJSONSchema, _function as function, getErrorMap, getLogger, gt, gte, guid, hash, hex, hexBytes, hostname, httpUrl, includes, initLogger, instanceof, int, int32, int64, intersection, ipv4, ipv6, iso, json, jwt, keyof, ksuid, lazy, length, literal, locales, looseObject, looseRecord, lowercase, lt, lte, mac, map, mapSchema, maxLength, maxSize, meta, mime, minLength, minSize, multipleOf, nan, nanoid, nativeEnum, negative, never, nonnegative, nonoptional, nonpositive, normalize, null, nullable, nullish, number, object, optional, overwrite, parse, parseAsync, partialRecord, pipe, positive, prefault, preprocess, promise, property, readonly, record, refine, regex, regexes, safeDecode, safeDecodeAsync, safeEncode, safeEncodeAsync, safeParse, safeParseAsync, set, setErrorMap, setLogLevel, size, slugify, startsWith, strictObject, string, stringFormat, stringbool, superRefine, symbol, templateLiteral, toJSONSchema, toLowerCase, toUpperCase, transform, trim, tuple, uint32, uint64, uint8Array, ulid, undefined, union, unknown, uppercase, url, util, uuid, uuidv4, uuidv6, uuidv7, default as v, void, xid, xor, z } from '../index.js';
|
|
2
|
+
export { Err, Ok, ResultUtils, all, failure, flatMap, fromNullable, isErr, isOk, isResult, mapErr, match, success, tryCatch, tryCatchAsync, unwrap, unwrapOr } from '../compat/result.js';
|
|
3
|
+
export { VldBase, VldMeta, VldBrand as ZodBranded, VldCatch as ZodCatch, VldDefault as ZodDefault, VldExactOptional as ZodExactOptional, VldMeta as ZodMeta, VldRefine as ZodNonOptional, VldNullable as ZodNullable, VldOptional as ZodOptional, VldPipe as ZodPipe, VldPrefault as ZodPrefault, VldPreprocess as ZodPreprocess, VldReadonly as ZodReadonly, VldTransform as ZodTransform, VldBase as ZodType } from '../validators/base.js';
|
|
4
|
+
export { V as VldError, V as ZodError, V as ZodRealError } from '../chunks/errors-core-BeiFUtZM.js';
|
|
5
|
+
export { VldIntersection, VldIntersection as ZodIntersection } from '../validators/intersection.js';
|
|
6
|
+
export { VldAny as ZodAny } from '../validators/any.js';
|
|
7
|
+
export { VldArray as ZodArray } from '../validators/array.js';
|
|
8
|
+
export { VldStringFormat as ZodBase64, VldStringFormat as ZodBase64URL, VldStringFormat as ZodCIDRv4, VldStringFormat as ZodCIDRv6, VldStringFormat as ZodCUID, VldStringFormat as ZodCUID2, VldStringFormat as ZodCustomStringFormat, VldStringFormat as ZodE164, VldStringFormat as ZodEmail, VldStringFormat as ZodEmoji, VldStringFormat as ZodGUID, VldStringFormat as ZodIPv4, VldStringFormat as ZodIPv6, VldStringFormat as ZodISODate, VldStringFormat as ZodISODateTime, VldStringFormat as ZodISODuration, VldStringFormat as ZodISOTime, VldStringFormat as ZodJWT, VldStringFormat as ZodKSUID, VldStringFormat as ZodMAC, VldStringFormat as ZodNanoID, VldStringFormat as ZodStringFormat, VldStringFormat as ZodULID, VldStringFormat as ZodURL, VldStringFormat as ZodUUID, VldStringFormat as ZodXID } from '../validators/string-formats.js';
|
|
9
|
+
export { VldBigInt as ZodBigInt, VldBigInt as ZodBigIntFormat } from '../validators/bigint.js';
|
|
10
|
+
export { VldBoolean as ZodBoolean } from '../validators/boolean.js';
|
|
11
|
+
export { VldCodec as ZodCodec } from '../validators/codec.js';
|
|
12
|
+
export { VldCustom as ZodCustom, VldCustom as ZodSuccess } from '../validators/custom.js';
|
|
13
|
+
export { VldDate as ZodDate } from '../validators/date.js';
|
|
14
|
+
export { VldDiscriminatedUnion as ZodDiscriminatedUnion } from '../validators/discriminated-union.js';
|
|
15
|
+
export { VldEnum as ZodEnum } from '../validators/enum.js';
|
|
16
|
+
export { VldFile as ZodFile } from '../validators/file.js';
|
|
17
|
+
export { VldFunction as ZodFunction } from '../validators/function.js';
|
|
18
|
+
export { VldJson as ZodJSON } from '../validators/json.js';
|
|
19
|
+
export { VldLazy as ZodLazy } from '../validators/lazy.js';
|
|
20
|
+
export { VldLiteral as ZodLiteral } from '../validators/literal.js';
|
|
21
|
+
export { VldMap as ZodMap } from '../validators/map.js';
|
|
22
|
+
export { VldNan as ZodNaN } from '../validators/nan.js';
|
|
23
|
+
export { VldNever as ZodNever } from '../validators/never.js';
|
|
24
|
+
export { VldNull as ZodNull } from '../validators/null.js';
|
|
25
|
+
export { VldNumber as ZodNumber, VldNumber as ZodNumberFormat } from '../validators/number.js';
|
|
26
|
+
export { VldObject as ZodObject } from '../validators/object.js';
|
|
27
|
+
export { VldPromise as ZodPromise } from '../validators/promise.js';
|
|
28
|
+
export { VldRecord as ZodRecord } from '../validators/record.js';
|
|
29
|
+
export { VldSet as ZodSet } from '../validators/set.js';
|
|
30
|
+
export { V as ZodString } from '../chunks/string-BJRQod3t.js';
|
|
31
|
+
export { VldSymbol as ZodSymbol } from '../validators/symbol.js';
|
|
32
|
+
export { VldTemplateLiteral as ZodTemplateLiteral } from '../validators/template-literal.js';
|
|
33
|
+
export { VldTuple as ZodTuple } from '../validators/tuple.js';
|
|
34
|
+
export { VldUndefined as ZodUndefined } from '../validators/undefined.js';
|
|
35
|
+
export { VldUnion as ZodUnion } from '../validators/union.js';
|
|
36
|
+
export { VldUnknown as ZodUnknown } from '../validators/unknown.js';
|
|
37
|
+
export { VldVoid as ZodVoid } from '../validators/void.js';
|
|
38
|
+
export { VldXor as ZodXor } from '../validators/xor.js';
|
|
39
|
+
export { b as base64Json, a as base64ToBytes, c as base64ToUint8Array, d as base64UrlToBytes, e as base64urlToBytes, f as bytesToUtf8, g as epochMillisToDate, h as epochSecondsToDate, i as hexLowerToBytes, j as hexToBytes, k as hexToUint8Array, l as invertCodec, m as isoDatetimeToDate, n as jsonCodec, o as jwtPayload, p as numberToBigInt, s as stringToBigInt, q as stringToBoolean, r as stringToHttpURL, t as stringToInt, u as stringToNumber, v as stringToURL, w as stringToUint8Array, x as uint8ArrayToBase64, y as uint8ArrayToBase64Url, z as uint8ArrayToHex, A as uint8ArrayToString, B as uriComponent, C as utf8ToBytes } from '../chunks/index-0R2ntSud.js';
|
|
40
|
+
export { blue, bold, createTheme, cyan, dim, gray, green, grey, italic, magenta, default as pigment, red, strip, supportsColor, underline, vldTheme, white, yellow } from '../pigment.js';
|
|
41
|
+
export { createEmitter, createEventBus, withEmitter } from '../compat/emitter.js';
|
|
42
|
+
export { createVldKernel, definePlugin, getVldKernel, resetVldKernel, usePlugin } from '../kernel.js';
|
|
43
|
+
export { flattenError, prettifyError, prettifyErrorColored, prettifyErrorPlain, treeifyError } from '../errors.js';
|
|
44
|
+
export { getLocale, getMessages, getSupportedLocales, isLocaleLoaded, isLocaleSupported, registerLocale, setLocale } from '../locales/runtime.js';
|
|
45
|
+
export { globalRegistry, registry } from '../registry.js';
|
|
46
|
+
export { s as setLocaleAsync } from '../chunks/index-BvH403Yy.js';
|
|
47
|
+
|
|
48
|
+
const _default = (schema, defaultValue) => schema.default(typeof defaultValue === 'function' ? defaultValue() : defaultValue);
|
|
49
|
+
|
|
50
|
+
export { _default };
|