@oxog/vld 2.0.3 → 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 +33 -1
- package/README.md +101 -37
- package/dist/chunks/errors-core-BeiFUtZM.js +81 -0
- package/dist/chunks/{index-DO8CFMxD.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-50JV_Mfj.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 +1471 -10336
- 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 -7353
- 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 +1186 -835
- package/dist/index.js +1046 -367
- 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 +16 -6
- 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 +150 -6
- 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 -39
- package/dist/validators/index.js +35 -515
- 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 +56 -27
- 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 +15 -10
- 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 +7 -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-Dhzri_T-.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 +114 -30
- package/dist/chunks/bigint-CRS0QVsy.js +0 -1854
- package/dist/chunks/bigint-CRS0QVsy.js.map +0 -1
- package/dist/chunks/date-50JV_Mfj.js.map +0 -1
- package/dist/chunks/index-DO8CFMxD.js.map +0 -1
- package/dist/chunks/json-Cp4WO0M9.js +0 -2021
- package/dist/chunks/json-Cp4WO0M9.js.map +0 -1
- package/dist/chunks/unknown-Dhzri_T-.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/json-schema.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/promise.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,53 @@
|
|
|
1
|
+
import type { LocaleMessages } from '../../locales/types.js';
|
|
2
|
+
export declare const ar: () => LocaleMessages;
|
|
3
|
+
export declare const az: () => LocaleMessages;
|
|
4
|
+
export declare const be: () => LocaleMessages;
|
|
5
|
+
export declare const bg: () => LocaleMessages;
|
|
6
|
+
export declare const ca: () => LocaleMessages;
|
|
7
|
+
export declare const cs: () => LocaleMessages;
|
|
8
|
+
export declare const da: () => LocaleMessages;
|
|
9
|
+
export declare const de: () => LocaleMessages;
|
|
10
|
+
export declare const el: () => LocaleMessages;
|
|
11
|
+
export declare const en: () => LocaleMessages;
|
|
12
|
+
export declare const eo: () => LocaleMessages;
|
|
13
|
+
export declare const es: () => LocaleMessages;
|
|
14
|
+
export declare const fa: () => LocaleMessages;
|
|
15
|
+
export declare const fi: () => LocaleMessages;
|
|
16
|
+
export declare const fr: () => LocaleMessages;
|
|
17
|
+
export declare const frCA: () => LocaleMessages;
|
|
18
|
+
export declare const he: () => LocaleMessages;
|
|
19
|
+
export declare const hr: () => LocaleMessages;
|
|
20
|
+
export declare const hu: () => LocaleMessages;
|
|
21
|
+
export declare const hy: () => LocaleMessages;
|
|
22
|
+
export declare const id: () => LocaleMessages;
|
|
23
|
+
export declare const is: () => LocaleMessages;
|
|
24
|
+
export declare const it: () => LocaleMessages;
|
|
25
|
+
export declare const ja: () => LocaleMessages;
|
|
26
|
+
export declare const ka: () => LocaleMessages;
|
|
27
|
+
export declare const kh: () => LocaleMessages;
|
|
28
|
+
export declare const km: () => LocaleMessages;
|
|
29
|
+
export declare const ko: () => LocaleMessages;
|
|
30
|
+
export declare const lt: () => LocaleMessages;
|
|
31
|
+
export declare const mk: () => LocaleMessages;
|
|
32
|
+
export declare const ms: () => LocaleMessages;
|
|
33
|
+
export declare const nl: () => LocaleMessages;
|
|
34
|
+
export declare const no: () => LocaleMessages;
|
|
35
|
+
export declare const ota: () => LocaleMessages;
|
|
36
|
+
export declare const pl: () => LocaleMessages;
|
|
37
|
+
export declare const ps: () => LocaleMessages;
|
|
38
|
+
export declare const pt: () => LocaleMessages;
|
|
39
|
+
export declare const ro: () => LocaleMessages;
|
|
40
|
+
export declare const ru: () => LocaleMessages;
|
|
41
|
+
export declare const sl: () => LocaleMessages;
|
|
42
|
+
export declare const sv: () => LocaleMessages;
|
|
43
|
+
export declare const ta: () => LocaleMessages;
|
|
44
|
+
export declare const th: () => LocaleMessages;
|
|
45
|
+
export declare const tr: () => LocaleMessages;
|
|
46
|
+
export declare const ua: () => LocaleMessages;
|
|
47
|
+
export declare const uk: () => LocaleMessages;
|
|
48
|
+
export declare const ur: () => LocaleMessages;
|
|
49
|
+
export declare const uz: () => LocaleMessages;
|
|
50
|
+
export declare const vi: () => LocaleMessages;
|
|
51
|
+
export declare const yo: () => LocaleMessages;
|
|
52
|
+
export declare const zhCN: () => LocaleMessages;
|
|
53
|
+
export declare const zhTW: () => LocaleMessages;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ar as ar$1 } from '../../locales/ar.js';
|
|
2
|
+
import { da as da$1 } from '../../locales/da.js';
|
|
3
|
+
import { de as de$1 } from '../../locales/de.js';
|
|
4
|
+
import { en as en$1 } from '../../locales/en.js';
|
|
5
|
+
import { es as es$1 } from '../../locales/es.js';
|
|
6
|
+
import { fi as fi$1 } from '../../locales/fi.js';
|
|
7
|
+
import { fr as fr$1 } from '../../locales/fr.js';
|
|
8
|
+
import { id as id$1 } from '../../locales/id.js';
|
|
9
|
+
import { it as it$1 } from '../../locales/it.js';
|
|
10
|
+
import { ja as ja$1 } from '../../locales/ja.js';
|
|
11
|
+
import { ko as ko$1 } from '../../locales/ko.js';
|
|
12
|
+
import { nl as nl$1 } from '../../locales/nl.js';
|
|
13
|
+
import { no as no$1 } from '../../locales/no.js';
|
|
14
|
+
import { pl as pl$1 } from '../../locales/pl.js';
|
|
15
|
+
import { pt as pt$1 } from '../../locales/pt.js';
|
|
16
|
+
import { ru as ru$1 } from '../../locales/ru.js';
|
|
17
|
+
import { sv as sv$1 } from '../../locales/sv.js';
|
|
18
|
+
import { th as th$1 } from '../../locales/th.js';
|
|
19
|
+
import { tr as tr$1 } from '../../locales/tr.js';
|
|
20
|
+
import { vi as vi$1 } from '../../locales/vi.js';
|
|
21
|
+
import { zh } from '../../locales/zh.js';
|
|
22
|
+
|
|
23
|
+
const fallback = () => en$1;
|
|
24
|
+
const ar = () => ar$1;
|
|
25
|
+
const az = fallback;
|
|
26
|
+
const be = fallback;
|
|
27
|
+
const bg = fallback;
|
|
28
|
+
const ca = fallback;
|
|
29
|
+
const cs = fallback;
|
|
30
|
+
const da = () => da$1;
|
|
31
|
+
const de = () => de$1;
|
|
32
|
+
const el = fallback;
|
|
33
|
+
const en = () => en$1;
|
|
34
|
+
const eo = fallback;
|
|
35
|
+
const es = () => es$1;
|
|
36
|
+
const fa = fallback;
|
|
37
|
+
const fi = () => fi$1;
|
|
38
|
+
const fr = () => fr$1;
|
|
39
|
+
const frCA = () => fr$1;
|
|
40
|
+
const he = fallback;
|
|
41
|
+
const hr = fallback;
|
|
42
|
+
const hu = fallback;
|
|
43
|
+
const hy = fallback;
|
|
44
|
+
const id = () => id$1;
|
|
45
|
+
const is = fallback;
|
|
46
|
+
const it = () => it$1;
|
|
47
|
+
const ja = () => ja$1;
|
|
48
|
+
const ka = fallback;
|
|
49
|
+
const kh = fallback;
|
|
50
|
+
const km = fallback;
|
|
51
|
+
const ko = () => ko$1;
|
|
52
|
+
const lt = fallback;
|
|
53
|
+
const mk = fallback;
|
|
54
|
+
const ms = fallback;
|
|
55
|
+
const nl = () => nl$1;
|
|
56
|
+
const no = () => no$1;
|
|
57
|
+
const ota = fallback;
|
|
58
|
+
const pl = () => pl$1;
|
|
59
|
+
const ps = fallback;
|
|
60
|
+
const pt = () => pt$1;
|
|
61
|
+
const ro = fallback;
|
|
62
|
+
const ru = () => ru$1;
|
|
63
|
+
const sl = fallback;
|
|
64
|
+
const sv = () => sv$1;
|
|
65
|
+
const ta = fallback;
|
|
66
|
+
const th = () => th$1;
|
|
67
|
+
const tr = () => tr$1;
|
|
68
|
+
const ua = fallback;
|
|
69
|
+
const uk = fallback;
|
|
70
|
+
const ur = fallback;
|
|
71
|
+
const uz = fallback;
|
|
72
|
+
const vi = () => vi$1;
|
|
73
|
+
const yo = fallback;
|
|
74
|
+
const zhCN = () => zh;
|
|
75
|
+
const zhTW = () => zh;
|
|
76
|
+
|
|
77
|
+
export { ar, az, be, bg, ca, cs, da, de, el, en, eo, es, fa, fi, fr, frCA, he, hr, hu, hy, id, is, it, ja, ka, kh, km, ko, lt, mk, ms, nl, no, ota, pl, ps, pt, ro, ru, sl, sv, ta, th, tr, ua, uk, ur, uz, vi, yo, zhCN, zhTW };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export { _default, catchall, extend, maximum, merge, minimum, omit, partial, pick, required, safeExtend } from '../../v4-mini/index.js';
|
|
2
|
+
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';
|
|
3
|
+
export { Err, Ok, ResultUtils, all, failure, flatMap, fromNullable, isErr, isOk, isResult, mapErr, match, success, tryCatch, tryCatchAsync, unwrap, unwrapOr } from '../../compat/result.js';
|
|
4
|
+
export { VldBase, VldMeta, VldBrand as ZodBranded, VldCatch as ZodCatch, VldDefault as ZodDefault, VldExactOptional as ZodExactOptional, VldMeta as ZodMeta, VldBrand as ZodMiniBrand, VldCatch as ZodMiniCatch, VldDefault as ZodMiniDefault, VldExactOptional as ZodMiniExactOptional, VldRefine as ZodMiniNonOptional, VldNullable as ZodMiniNullable, VldOptional as ZodMiniOptional, VldPipe as ZodMiniPipe, VldPrefault as ZodMiniPrefault, VldReadonly as ZodMiniReadonly, VldTransform as ZodMiniTransform, VldBase as ZodMiniType, 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 VldError, V as ZodError, V as ZodRealError } from '../../chunks/errors-core-BeiFUtZM.js';
|
|
6
|
+
export { VldIntersection, VldIntersection as ZodIntersection, VldIntersection as ZodMiniIntersection } from '../../validators/intersection.js';
|
|
7
|
+
export { VldAny as ZodAny, VldAny as ZodMiniAny } from '../../validators/any.js';
|
|
8
|
+
export { VldArray as ZodArray, VldArray as ZodMiniArray } from '../../validators/array.js';
|
|
9
|
+
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 ZodMiniBase64, VldStringFormat as ZodMiniBase64URL, VldStringFormat as ZodMiniCIDRv4, VldStringFormat as ZodMiniCIDRv6, VldStringFormat as ZodMiniCUID, VldStringFormat as ZodMiniCUID2, VldStringFormat as ZodMiniCustomStringFormat, VldStringFormat as ZodMiniE164, VldStringFormat as ZodMiniEmail, VldStringFormat as ZodMiniEmoji, VldStringFormat as ZodMiniGUID, VldStringFormat as ZodMiniIPv4, VldStringFormat as ZodMiniIPv6, VldStringFormat as ZodMiniISODate, VldStringFormat as ZodMiniISODateTime, VldStringFormat as ZodMiniISODuration, VldStringFormat as ZodMiniISOTime, VldStringFormat as ZodMiniJWT, VldStringFormat as ZodMiniKSUID, VldStringFormat as ZodMiniMAC, VldStringFormat as ZodMiniNanoID, VldStringFormat as ZodMiniStringFormat, VldStringFormat as ZodMiniULID, VldStringFormat as ZodMiniURL, VldStringFormat as ZodMiniUUID, VldStringFormat as ZodMiniXID, VldStringFormat as ZodNanoID, VldStringFormat as ZodStringFormat, VldStringFormat as ZodULID, VldStringFormat as ZodURL, VldStringFormat as ZodUUID, VldStringFormat as ZodXID } from '../../validators/string-formats.js';
|
|
10
|
+
export { VldBigInt as ZodBigInt, VldBigInt as ZodBigIntFormat, VldBigInt as ZodMiniBigInt, VldBigInt as ZodMiniBigIntFormat } from '../../validators/bigint.js';
|
|
11
|
+
export { VldBoolean as ZodBoolean, VldBoolean as ZodMiniBoolean } from '../../validators/boolean.js';
|
|
12
|
+
export { VldCodec as ZodCodec, VldCodec as ZodMiniCodec } from '../../validators/codec.js';
|
|
13
|
+
export { VldCustom as ZodCustom, VldCustom as ZodMiniCustom, VldCustom as ZodMiniSuccess, VldCustom as ZodSuccess } from '../../validators/custom.js';
|
|
14
|
+
export { VldDate as ZodDate, VldDate as ZodMiniDate } from '../../validators/date.js';
|
|
15
|
+
export { VldDiscriminatedUnion as ZodDiscriminatedUnion, VldDiscriminatedUnion as ZodMiniDiscriminatedUnion } from '../../validators/discriminated-union.js';
|
|
16
|
+
export { VldEnum as ZodEnum, VldEnum as ZodMiniEnum } from '../../validators/enum.js';
|
|
17
|
+
export { VldFile as ZodFile, VldFile as ZodMiniFile } from '../../validators/file.js';
|
|
18
|
+
export { VldFunction as ZodFunction, VldFunction as ZodMiniFunction } from '../../validators/function.js';
|
|
19
|
+
export { VldJson as ZodJSON } from '../../validators/json.js';
|
|
20
|
+
export { VldLazy as ZodLazy, VldLazy as ZodMiniLazy } from '../../validators/lazy.js';
|
|
21
|
+
export { VldLiteral as ZodLiteral, VldLiteral as ZodMiniLiteral } from '../../validators/literal.js';
|
|
22
|
+
export { VldMap as ZodMap, VldMap as ZodMiniMap } from '../../validators/map.js';
|
|
23
|
+
export { VldNan as ZodMiniNaN, VldNan as ZodNaN } from '../../validators/nan.js';
|
|
24
|
+
export { VldNever as ZodMiniNever, VldNever as ZodNever } from '../../validators/never.js';
|
|
25
|
+
export { VldNull as ZodMiniNull, VldNull as ZodNull } from '../../validators/null.js';
|
|
26
|
+
export { VldNumber as ZodMiniNumber, VldNumber as ZodMiniNumberFormat, VldNumber as ZodNumber, VldNumber as ZodNumberFormat } from '../../validators/number.js';
|
|
27
|
+
export { VldObject as ZodMiniObject, VldObject as ZodObject } from '../../validators/object.js';
|
|
28
|
+
export { VldPromise as ZodMiniPromise, VldPromise as ZodPromise } from '../../validators/promise.js';
|
|
29
|
+
export { VldRecord as ZodMiniRecord, VldRecord as ZodRecord } from '../../validators/record.js';
|
|
30
|
+
export { VldSet as ZodMiniSet, VldSet as ZodSet } from '../../validators/set.js';
|
|
31
|
+
export { V as ZodMiniString, V as ZodString } from '../../chunks/string-BJRQod3t.js';
|
|
32
|
+
export { VldSymbol as ZodMiniSymbol, VldSymbol as ZodSymbol } from '../../validators/symbol.js';
|
|
33
|
+
export { VldTemplateLiteral as ZodMiniTemplateLiteral, VldTemplateLiteral as ZodTemplateLiteral } from '../../validators/template-literal.js';
|
|
34
|
+
export { VldTuple as ZodMiniTuple, VldTuple as ZodTuple } from '../../validators/tuple.js';
|
|
35
|
+
export { VldUndefined as ZodMiniUndefined, VldUndefined as ZodUndefined } from '../../validators/undefined.js';
|
|
36
|
+
export { VldUnion as ZodMiniUnion, VldUnion as ZodUnion } from '../../validators/union.js';
|
|
37
|
+
export { VldUnknown as ZodMiniUnknown, VldUnknown as ZodUnknown } from '../../validators/unknown.js';
|
|
38
|
+
export { VldVoid as ZodMiniVoid, VldVoid as ZodVoid } from '../../validators/void.js';
|
|
39
|
+
export { VldXor as ZodMiniXor, VldXor as ZodXor } from '../../validators/xor.js';
|
|
40
|
+
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';
|
|
41
|
+
export { blue, bold, createTheme, cyan, dim, gray, green, grey, italic, magenta, default as pigment, red, strip, supportsColor, underline, vldTheme, white, yellow } from '../../pigment.js';
|
|
42
|
+
export { createEmitter, createEventBus, withEmitter } from '../../compat/emitter.js';
|
|
43
|
+
export { createVldKernel, definePlugin, getVldKernel, resetVldKernel, usePlugin } from '../../kernel.js';
|
|
44
|
+
export { flattenError, prettifyError, prettifyErrorColored, prettifyErrorPlain, treeifyError } from '../../errors.js';
|
|
45
|
+
export { getLocale, getMessages, getSupportedLocales, isLocaleLoaded, isLocaleSupported, registerLocale, setLocale } from '../../locales/runtime.js';
|
|
46
|
+
export { globalRegistry, registry } from '../../registry.js';
|
|
47
|
+
export { s as setLocaleAsync } from '../../chunks/index-BvH403Yy.js';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export * from '../index.js';
|
|
2
|
+
export { default } from '../index.js';
|
|
3
|
+
export { ZodAny as ZodMiniAny, ZodArray as ZodMiniArray, ZodBase64 as ZodMiniBase64, ZodBase64URL as ZodMiniBase64URL, ZodBigInt as ZodMiniBigInt, ZodBigIntFormat as ZodMiniBigIntFormat, ZodBoolean as ZodMiniBoolean, ZodBranded as ZodMiniBrand, ZodCIDRv4 as ZodMiniCIDRv4, ZodCIDRv6 as ZodMiniCIDRv6, ZodCUID as ZodMiniCUID, ZodCUID2 as ZodMiniCUID2, ZodCatch as ZodMiniCatch, ZodCodec as ZodMiniCodec, ZodCustom as ZodMiniCustom, ZodCustomStringFormat as ZodMiniCustomStringFormat, ZodDate as ZodMiniDate, ZodDefault as ZodMiniDefault, ZodDiscriminatedUnion as ZodMiniDiscriminatedUnion, ZodE164 as ZodMiniE164, ZodEmail as ZodMiniEmail, ZodEmoji as ZodMiniEmoji, ZodEnum as ZodMiniEnum, ZodExactOptional as ZodMiniExactOptional, ZodFile as ZodMiniFile, ZodFunction as ZodMiniFunction, ZodGUID as ZodMiniGUID, ZodIPv4 as ZodMiniIPv4, ZodIPv6 as ZodMiniIPv6, ZodISODate as ZodMiniISODate, ZodISODateTime as ZodMiniISODateTime, ZodISODuration as ZodMiniISODuration, ZodISOTime as ZodMiniISOTime, ZodIntersection as ZodMiniIntersection, ZodJWT as ZodMiniJWT, ZodKSUID as ZodMiniKSUID, ZodLazy as ZodMiniLazy, ZodLiteral as ZodMiniLiteral, ZodMAC as ZodMiniMAC, ZodMap as ZodMiniMap, ZodNaN as ZodMiniNaN, ZodNanoID as ZodMiniNanoID, ZodNever as ZodMiniNever, ZodNonOptional as ZodMiniNonOptional, ZodNull as ZodMiniNull, ZodNullable as ZodMiniNullable, ZodNumber as ZodMiniNumber, ZodNumberFormat as ZodMiniNumberFormat, ZodObject as ZodMiniObject, ZodOptional as ZodMiniOptional, ZodPipe as ZodMiniPipe, ZodPrefault as ZodMiniPrefault, ZodPromise as ZodMiniPromise, ZodReadonly as ZodMiniReadonly, ZodRecord as ZodMiniRecord, ZodSet as ZodMiniSet, ZodString as ZodMiniString, ZodStringFormat as ZodMiniStringFormat, ZodSuccess as ZodMiniSuccess, ZodSymbol as ZodMiniSymbol, ZodTemplateLiteral as ZodMiniTemplateLiteral, ZodTransform as ZodMiniTransform, ZodTuple as ZodMiniTuple, ZodType as ZodMiniType, ZodULID as ZodMiniULID, ZodURL as ZodMiniURL, ZodUUID as ZodMiniUUID, ZodUndefined as ZodMiniUndefined, ZodUnion as ZodMiniUnion, ZodUnknown as ZodMiniUnknown, ZodVoid as ZodMiniVoid, ZodXID as ZodMiniXID, ZodXor as ZodMiniXor } from '../index.js';
|
|
4
|
+
import type { VldBase } from '../validators/base.js';
|
|
5
|
+
import type { VldObject } from '../validators/object.js';
|
|
6
|
+
type ObjectShape = Record<string, VldBase<any, any>>;
|
|
7
|
+
type ObjectMask = Record<string, boolean>;
|
|
8
|
+
type ConstraintParam = string | {
|
|
9
|
+
message?: string;
|
|
10
|
+
error?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const pick: <T extends Record<string, any>>(schema: VldObject<T>, mask: ObjectMask) => VldObject<any>;
|
|
13
|
+
export declare const omit: <T extends Record<string, any>>(schema: VldObject<T>, mask: ObjectMask) => VldObject<any>;
|
|
14
|
+
export declare const partial: <T extends Record<string, any>>(schema: VldObject<T>) => VldObject<any>;
|
|
15
|
+
export declare const required: <T extends Record<string, any>>(schema: VldObject<T>) => VldObject<any>;
|
|
16
|
+
export declare const extend: <T extends Record<string, any>>(schema: VldObject<T>, shape: ObjectShape) => VldObject<any>;
|
|
17
|
+
export declare const safeExtend: <T extends Record<string, any>>(schema: VldObject<T>, shape: ObjectShape) => VldObject<any>;
|
|
18
|
+
export declare const merge: <T extends Record<string, any>, U extends Record<string, any>>(schema: VldObject<T>, other: VldObject<U> | ObjectShape) => VldObject<any>;
|
|
19
|
+
export declare const catchall: <T extends Record<string, any>>(schema: VldObject<T>, catchallSchema: VldBase<any, any>) => VldObject<any>;
|
|
20
|
+
export declare const _default: <TInput, TOutput>(schema: VldBase<TInput, TOutput>, defaultValue: TOutput | (() => TOutput)) => import("../index.js").ZodDefault<TInput, TOutput>;
|
|
21
|
+
export declare const minimum: (value: number, params?: ConstraintParam) => VldBase<unknown, number>;
|
|
22
|
+
export declare const maximum: (value: number, params?: ConstraintParam) => VldBase<unknown, number>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { number } from '../index.js';
|
|
2
|
+
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, 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';
|
|
3
|
+
export { Err, Ok, ResultUtils, all, failure, flatMap, fromNullable, isErr, isOk, isResult, mapErr, match, success, tryCatch, tryCatchAsync, unwrap, unwrapOr } from '../compat/result.js';
|
|
4
|
+
export { VldBase, VldMeta, VldBrand as ZodBranded, VldCatch as ZodCatch, VldDefault as ZodDefault, VldExactOptional as ZodExactOptional, VldMeta as ZodMeta, VldBrand as ZodMiniBrand, VldCatch as ZodMiniCatch, VldDefault as ZodMiniDefault, VldExactOptional as ZodMiniExactOptional, VldRefine as ZodMiniNonOptional, VldNullable as ZodMiniNullable, VldOptional as ZodMiniOptional, VldPipe as ZodMiniPipe, VldPrefault as ZodMiniPrefault, VldReadonly as ZodMiniReadonly, VldTransform as ZodMiniTransform, VldBase as ZodMiniType, 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 VldError, V as ZodError, V as ZodRealError } from '../chunks/errors-core-BeiFUtZM.js';
|
|
6
|
+
export { VldIntersection, VldIntersection as ZodIntersection, VldIntersection as ZodMiniIntersection } from '../validators/intersection.js';
|
|
7
|
+
export { VldAny as ZodAny, VldAny as ZodMiniAny } from '../validators/any.js';
|
|
8
|
+
export { VldArray as ZodArray, VldArray as ZodMiniArray } from '../validators/array.js';
|
|
9
|
+
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 ZodMiniBase64, VldStringFormat as ZodMiniBase64URL, VldStringFormat as ZodMiniCIDRv4, VldStringFormat as ZodMiniCIDRv6, VldStringFormat as ZodMiniCUID, VldStringFormat as ZodMiniCUID2, VldStringFormat as ZodMiniCustomStringFormat, VldStringFormat as ZodMiniE164, VldStringFormat as ZodMiniEmail, VldStringFormat as ZodMiniEmoji, VldStringFormat as ZodMiniGUID, VldStringFormat as ZodMiniIPv4, VldStringFormat as ZodMiniIPv6, VldStringFormat as ZodMiniISODate, VldStringFormat as ZodMiniISODateTime, VldStringFormat as ZodMiniISODuration, VldStringFormat as ZodMiniISOTime, VldStringFormat as ZodMiniJWT, VldStringFormat as ZodMiniKSUID, VldStringFormat as ZodMiniMAC, VldStringFormat as ZodMiniNanoID, VldStringFormat as ZodMiniStringFormat, VldStringFormat as ZodMiniULID, VldStringFormat as ZodMiniURL, VldStringFormat as ZodMiniUUID, VldStringFormat as ZodMiniXID, VldStringFormat as ZodNanoID, VldStringFormat as ZodStringFormat, VldStringFormat as ZodULID, VldStringFormat as ZodURL, VldStringFormat as ZodUUID, VldStringFormat as ZodXID } from '../validators/string-formats.js';
|
|
10
|
+
export { VldBigInt as ZodBigInt, VldBigInt as ZodBigIntFormat, VldBigInt as ZodMiniBigInt, VldBigInt as ZodMiniBigIntFormat } from '../validators/bigint.js';
|
|
11
|
+
export { VldBoolean as ZodBoolean, VldBoolean as ZodMiniBoolean } from '../validators/boolean.js';
|
|
12
|
+
export { VldCodec as ZodCodec, VldCodec as ZodMiniCodec } from '../validators/codec.js';
|
|
13
|
+
export { VldCustom as ZodCustom, VldCustom as ZodMiniCustom, VldCustom as ZodMiniSuccess, VldCustom as ZodSuccess } from '../validators/custom.js';
|
|
14
|
+
export { VldDate as ZodDate, VldDate as ZodMiniDate } from '../validators/date.js';
|
|
15
|
+
export { VldDiscriminatedUnion as ZodDiscriminatedUnion, VldDiscriminatedUnion as ZodMiniDiscriminatedUnion } from '../validators/discriminated-union.js';
|
|
16
|
+
export { VldEnum as ZodEnum, VldEnum as ZodMiniEnum } from '../validators/enum.js';
|
|
17
|
+
export { VldFile as ZodFile, VldFile as ZodMiniFile } from '../validators/file.js';
|
|
18
|
+
export { VldFunction as ZodFunction, VldFunction as ZodMiniFunction } from '../validators/function.js';
|
|
19
|
+
export { VldJson as ZodJSON } from '../validators/json.js';
|
|
20
|
+
export { VldLazy as ZodLazy, VldLazy as ZodMiniLazy } from '../validators/lazy.js';
|
|
21
|
+
export { VldLiteral as ZodLiteral, VldLiteral as ZodMiniLiteral } from '../validators/literal.js';
|
|
22
|
+
export { VldMap as ZodMap, VldMap as ZodMiniMap } from '../validators/map.js';
|
|
23
|
+
export { VldNan as ZodMiniNaN, VldNan as ZodNaN } from '../validators/nan.js';
|
|
24
|
+
export { VldNever as ZodMiniNever, VldNever as ZodNever } from '../validators/never.js';
|
|
25
|
+
export { VldNull as ZodMiniNull, VldNull as ZodNull } from '../validators/null.js';
|
|
26
|
+
export { VldNumber as ZodMiniNumber, VldNumber as ZodMiniNumberFormat, VldNumber as ZodNumber, VldNumber as ZodNumberFormat } from '../validators/number.js';
|
|
27
|
+
export { VldObject as ZodMiniObject, VldObject as ZodObject } from '../validators/object.js';
|
|
28
|
+
export { VldPromise as ZodMiniPromise, VldPromise as ZodPromise } from '../validators/promise.js';
|
|
29
|
+
export { VldRecord as ZodMiniRecord, VldRecord as ZodRecord } from '../validators/record.js';
|
|
30
|
+
export { VldSet as ZodMiniSet, VldSet as ZodSet } from '../validators/set.js';
|
|
31
|
+
export { V as ZodMiniString, V as ZodString } from '../chunks/string-BJRQod3t.js';
|
|
32
|
+
export { VldSymbol as ZodMiniSymbol, VldSymbol as ZodSymbol } from '../validators/symbol.js';
|
|
33
|
+
export { VldTemplateLiteral as ZodMiniTemplateLiteral, VldTemplateLiteral as ZodTemplateLiteral } from '../validators/template-literal.js';
|
|
34
|
+
export { VldTuple as ZodMiniTuple, VldTuple as ZodTuple } from '../validators/tuple.js';
|
|
35
|
+
export { VldUndefined as ZodMiniUndefined, VldUndefined as ZodUndefined } from '../validators/undefined.js';
|
|
36
|
+
export { VldUnion as ZodMiniUnion, VldUnion as ZodUnion } from '../validators/union.js';
|
|
37
|
+
export { VldUnknown as ZodMiniUnknown, VldUnknown as ZodUnknown } from '../validators/unknown.js';
|
|
38
|
+
export { VldVoid as ZodMiniVoid, VldVoid as ZodVoid } from '../validators/void.js';
|
|
39
|
+
export { VldXor as ZodMiniXor, VldXor as ZodXor } from '../validators/xor.js';
|
|
40
|
+
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';
|
|
41
|
+
export { blue, bold, createTheme, cyan, dim, gray, green, grey, italic, magenta, default as pigment, red, strip, supportsColor, underline, vldTheme, white, yellow } from '../pigment.js';
|
|
42
|
+
export { createEmitter, createEventBus, withEmitter } from '../compat/emitter.js';
|
|
43
|
+
export { createVldKernel, definePlugin, getVldKernel, resetVldKernel, usePlugin } from '../kernel.js';
|
|
44
|
+
export { flattenError, prettifyError, prettifyErrorColored, prettifyErrorPlain, treeifyError } from '../errors.js';
|
|
45
|
+
export { getLocale, getMessages, getSupportedLocales, isLocaleLoaded, isLocaleSupported, registerLocale, setLocale } from '../locales/runtime.js';
|
|
46
|
+
export { globalRegistry, registry } from '../registry.js';
|
|
47
|
+
export { s as setLocaleAsync } from '../chunks/index-BvH403Yy.js';
|
|
48
|
+
|
|
49
|
+
function maskKeys(mask) {
|
|
50
|
+
return Object.keys(mask).filter((key) => mask[key]);
|
|
51
|
+
}
|
|
52
|
+
function constraintMessage(params) {
|
|
53
|
+
return typeof params === 'string' ? params : params?.message || params?.error;
|
|
54
|
+
}
|
|
55
|
+
const pick = (schema, mask) => schema.pick(...maskKeys(mask));
|
|
56
|
+
const omit = (schema, mask) => schema.omit(...maskKeys(mask));
|
|
57
|
+
const partial = (schema) => schema.partial();
|
|
58
|
+
const required = (schema) => schema.required();
|
|
59
|
+
const extend = (schema, shape) => schema.extend(shape);
|
|
60
|
+
const safeExtend = (schema, shape) => schema.safeExtend(shape);
|
|
61
|
+
const merge = (schema, other) => other && typeof other.parse === 'function'
|
|
62
|
+
? schema.merge(other)
|
|
63
|
+
: schema.extend(other);
|
|
64
|
+
const catchall = (schema, catchallSchema) => schema.catchall(catchallSchema);
|
|
65
|
+
const _default = (schema, defaultValue) => schema.default(typeof defaultValue === 'function' ? defaultValue() : defaultValue);
|
|
66
|
+
const minimum = (value, params) => {
|
|
67
|
+
const message = constraintMessage(params);
|
|
68
|
+
return number().min(value, message);
|
|
69
|
+
};
|
|
70
|
+
const maximum = (value, params) => {
|
|
71
|
+
const message = constraintMessage(params);
|
|
72
|
+
return number().max(value, message);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export { _default, catchall, extend, maximum, merge, minimum, number, omit, partial, pick, required, safeExtend };
|
package/dist/validators/any.d.ts
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import { VldBase, ParseResult } from './base';
|
|
1
|
+
import { VldBase, ParseResult } from './base.js';
|
|
2
2
|
/**
|
|
3
3
|
* Validator that accepts any value
|
|
4
4
|
*/
|
|
5
5
|
export declare class VldAny extends VldBase<any, any> {
|
|
6
|
+
private constructor();
|
|
6
7
|
/**
|
|
7
8
|
* Create a new any validator
|
|
8
9
|
*/
|
|
9
10
|
static create(): VldAny;
|
|
11
|
+
/**
|
|
12
|
+
* Returns true because any accepts every input without checks.
|
|
13
|
+
* Used by composite validators for passthrough fast paths.
|
|
14
|
+
*/
|
|
15
|
+
get isSimple(): boolean;
|
|
10
16
|
/**
|
|
11
17
|
* Parse any value (always succeeds)
|
|
12
18
|
*/
|
|
@@ -16,4 +22,3 @@ export declare class VldAny extends VldBase<any, any> {
|
|
|
16
22
|
*/
|
|
17
23
|
safeParse(value: unknown): ParseResult<any>;
|
|
18
24
|
}
|
|
19
|
-
//# sourceMappingURL=any.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { VldBase, VLD_VALIDATOR_TYPES } from './base.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Validator that accepts any value
|
|
5
|
+
*/
|
|
6
|
+
class VldAny extends VldBase {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(VLD_VALIDATOR_TYPES.ANY);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Create a new any validator
|
|
12
|
+
*/
|
|
13
|
+
static create() {
|
|
14
|
+
return new VldAny();
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns true because any accepts every input without checks.
|
|
18
|
+
* Used by composite validators for passthrough fast paths.
|
|
19
|
+
*/
|
|
20
|
+
get isSimple() {
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Parse any value (always succeeds)
|
|
25
|
+
*/
|
|
26
|
+
parse(value) {
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Safely parse any value (always succeeds)
|
|
31
|
+
*/
|
|
32
|
+
safeParse(value) {
|
|
33
|
+
return { success: true, data: value };
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { VldAny };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { VldBase, ParseResult } from './base';
|
|
1
|
+
import { VldBase, ParseResult } from './base.js';
|
|
2
2
|
/**
|
|
3
3
|
* Immutable array validator with chainable methods
|
|
4
4
|
*/
|
|
5
5
|
export declare class VldArray<T> extends VldBase<unknown[], T[]> {
|
|
6
6
|
private readonly config;
|
|
7
|
+
private readonly _simpleItemMode;
|
|
7
8
|
/**
|
|
8
9
|
* Private constructor to enforce immutability
|
|
9
10
|
*/
|
|
10
11
|
private constructor();
|
|
12
|
+
private getSimpleItemMode;
|
|
11
13
|
/**
|
|
12
14
|
* Create a new array validator
|
|
13
15
|
*/
|
|
@@ -16,6 +18,12 @@ export declare class VldArray<T> extends VldBase<unknown[], T[]> {
|
|
|
16
18
|
* Parse and validate an array value
|
|
17
19
|
*/
|
|
18
20
|
parse(value: unknown): T[];
|
|
21
|
+
/**
|
|
22
|
+
* Parse a value that has already passed the array type guard.
|
|
23
|
+
* @internal Used by object validators to avoid duplicate hot-path checks.
|
|
24
|
+
*/
|
|
25
|
+
parseKnownArray(value: unknown[]): T[];
|
|
26
|
+
private parseArrayValue;
|
|
19
27
|
/**
|
|
20
28
|
* Safely parse and validate an array value
|
|
21
29
|
*/
|
|
@@ -57,4 +65,3 @@ export declare class VldArray<T> extends VldBase<unknown[], T[]> {
|
|
|
57
65
|
*/
|
|
58
66
|
between(min: number, max: number, message?: string): VldArray<T>;
|
|
59
67
|
}
|
|
60
|
-
//# sourceMappingURL=array.d.ts.map
|