@es-joy/jsoe 0.24.3 → 0.25.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/.claude/settings.local.json +9 -0
- package/.ncurc.cjs +2 -2
- package/CHANGES.md +47 -0
- package/README.md +23 -13
- package/badges/coverage-badge.svg +1 -1
- package/dist/eslint.config.d.ts +3 -0
- package/dist/eslint.config.d.ts.map +1 -0
- package/dist/formatAndTypeChoices.d.ts +28 -30
- package/dist/formatAndTypeChoices.d.ts.map +1 -1
- package/dist/formats/indexedDBKey.d.ts.map +1 -1
- package/dist/formats/schema.d.ts +46 -3
- package/dist/formats/schema.d.ts.map +1 -1
- package/dist/formats/structuredCloning.d.ts +3 -0
- package/dist/formats/structuredCloning.d.ts.map +1 -1
- package/dist/formats.d.ts +24 -6
- package/dist/formats.d.ts.map +1 -1
- package/dist/fundamentalTypes/BooleanObjectType.d.ts.map +1 -1
- package/dist/fundamentalTypes/NumberObjectType.d.ts.map +1 -1
- package/dist/fundamentalTypes/StringObjectType.d.ts.map +1 -1
- package/dist/fundamentalTypes/arrayReferenceType.d.ts.map +1 -1
- package/dist/fundamentalTypes/arrayType.d.ts +7 -0
- package/dist/fundamentalTypes/arrayType.d.ts.map +1 -1
- package/dist/fundamentalTypes/bigintObjectType.d.ts.map +1 -1
- package/dist/fundamentalTypes/bigintType.d.ts +10 -0
- package/dist/fundamentalTypes/bigintType.d.ts.map +1 -1
- package/dist/fundamentalTypes/blobType.d.ts.map +1 -1
- package/dist/fundamentalTypes/booleanType.d.ts.map +1 -1
- package/dist/fundamentalTypes/catchType.d.ts +2 -2
- package/dist/fundamentalTypes/catchType.d.ts.map +1 -1
- package/dist/fundamentalTypes/dateType.d.ts.map +1 -1
- package/dist/fundamentalTypes/domexceptionType.d.ts.map +1 -1
- package/dist/fundamentalTypes/enumType.d.ts +2 -2
- package/dist/fundamentalTypes/enumType.d.ts.map +1 -1
- package/dist/fundamentalTypes/errorType.d.ts.map +1 -1
- package/dist/fundamentalTypes/fileType.d.ts +6 -0
- package/dist/fundamentalTypes/fileType.d.ts.map +1 -1
- package/dist/fundamentalTypes/functionType.d.ts.map +1 -1
- package/dist/fundamentalTypes/literalType.d.ts +3 -2
- package/dist/fundamentalTypes/literalType.d.ts.map +1 -1
- package/dist/fundamentalTypes/looseRecordType.d.ts +6 -0
- package/dist/fundamentalTypes/looseRecordType.d.ts.map +1 -0
- package/dist/fundamentalTypes/nanType.d.ts.map +1 -1
- package/dist/fundamentalTypes/neverType.d.ts +2 -2
- package/dist/fundamentalTypes/neverType.d.ts.map +1 -1
- package/dist/fundamentalTypes/noneditableType.d.ts.map +1 -1
- package/dist/fundamentalTypes/nullType.d.ts.map +1 -1
- package/dist/fundamentalTypes/numberType.d.ts.map +1 -1
- package/dist/fundamentalTypes/promiseType.d.ts.map +1 -1
- package/dist/fundamentalTypes/regexpType.d.ts.map +1 -1
- package/dist/fundamentalTypes/stringType.d.ts.map +1 -1
- package/dist/fundamentalTypes/symbolType.d.ts.map +1 -1
- package/dist/fundamentalTypes/undefinedType.d.ts.map +1 -1
- package/dist/fundamentalTypes/voidType.d.ts +2 -2
- package/dist/fundamentalTypes/voidType.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/rollup.config.d.ts +30 -0
- package/dist/rollup.config.d.ts.map +1 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/src/formatAndTypeChoices.d.ts +108 -0
- package/dist/src/formatAndTypeChoices.d.ts.map +1 -0
- package/dist/src/formats/arbitraryJS.d.ts +4 -0
- package/dist/src/formats/arbitraryJS.d.ts.map +1 -0
- package/dist/src/formats/indexedDBKey.d.ts +4 -0
- package/dist/src/formats/indexedDBKey.d.ts.map +1 -0
- package/dist/src/formats/json.d.ts +4 -0
- package/dist/src/formats/json.d.ts.map +1 -0
- package/dist/src/formats/schema.d.ts +17 -0
- package/dist/src/formats/schema.d.ts.map +1 -0
- package/dist/src/formats/structuredCloning.d.ts +19 -0
- package/dist/src/formats/structuredCloning.d.ts.map +1 -0
- package/dist/src/formats.d.ts +135 -0
- package/dist/src/formats.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/BooleanObjectType.d.ts +8 -0
- package/dist/src/fundamentalTypes/BooleanObjectType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/NumberObjectType.d.ts +6 -0
- package/dist/src/fundamentalTypes/NumberObjectType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/StringObjectType.d.ts +6 -0
- package/dist/src/fundamentalTypes/StringObjectType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/arrayReferenceType.d.ts +8 -0
- package/dist/src/fundamentalTypes/arrayReferenceType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/arrayType.d.ts +29 -0
- package/dist/src/fundamentalTypes/arrayType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/bigintObjectType.d.ts +6 -0
- package/dist/src/fundamentalTypes/bigintObjectType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/bigintType.d.ts +6 -0
- package/dist/src/fundamentalTypes/bigintType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/blobType.d.ts +11 -0
- package/dist/src/fundamentalTypes/blobType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/booleanType.d.ts +8 -0
- package/dist/src/fundamentalTypes/booleanType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/catchType.d.ts +6 -0
- package/dist/src/fundamentalTypes/catchType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/dateType.d.ts +26 -0
- package/dist/src/fundamentalTypes/dateType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/domexceptionType.d.ts +6 -0
- package/dist/src/fundamentalTypes/domexceptionType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/enumType.d.ts +6 -0
- package/dist/src/fundamentalTypes/enumType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/errorType.d.ts +6 -0
- package/dist/src/fundamentalTypes/errorType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/fileType.d.ts +13 -0
- package/dist/src/fundamentalTypes/fileType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/filelistType.d.ts +6 -0
- package/dist/src/fundamentalTypes/filelistType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/functionType.d.ts +7 -0
- package/dist/src/fundamentalTypes/functionType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/literalType.d.ts +6 -0
- package/dist/src/fundamentalTypes/literalType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/mapType.d.ts +6 -0
- package/dist/src/fundamentalTypes/mapType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/nanType.d.ts +6 -0
- package/dist/src/fundamentalTypes/nanType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/neverType.d.ts +6 -0
- package/dist/src/fundamentalTypes/neverType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/noneditableType.d.ts +6 -0
- package/dist/src/fundamentalTypes/noneditableType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/nullType.d.ts +6 -0
- package/dist/src/fundamentalTypes/nullType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/numberType.d.ts +6 -0
- package/dist/src/fundamentalTypes/numberType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/objectReferenceType.d.ts +8 -0
- package/dist/src/fundamentalTypes/objectReferenceType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/objectType.d.ts +6 -0
- package/dist/src/fundamentalTypes/objectType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/promiseType.d.ts +6 -0
- package/dist/src/fundamentalTypes/promiseType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/recordType.d.ts +6 -0
- package/dist/src/fundamentalTypes/recordType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/regexpType.d.ts +8 -0
- package/dist/src/fundamentalTypes/regexpType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/setType.d.ts +6 -0
- package/dist/src/fundamentalTypes/setType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/sparseUndefinedType.d.ts +6 -0
- package/dist/src/fundamentalTypes/sparseUndefinedType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/stringType.d.ts +6 -0
- package/dist/src/fundamentalTypes/stringType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/symbolType.d.ts +8 -0
- package/dist/src/fundamentalTypes/symbolType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/tupleType.d.ts +6 -0
- package/dist/src/fundamentalTypes/tupleType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/undefinedType.d.ts +6 -0
- package/dist/src/fundamentalTypes/undefinedType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/voidType.d.ts +6 -0
- package/dist/src/fundamentalTypes/voidType.d.ts.map +1 -0
- package/dist/src/index.d.ts +12 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/subTypes/blobHTMLType.d.ts +20 -0
- package/dist/src/subTypes/blobHTMLType.d.ts.map +1 -0
- package/dist/src/subTypes/falseType.d.ts +8 -0
- package/dist/src/subTypes/falseType.d.ts.map +1 -0
- package/dist/src/subTypes/trueType.d.ts +8 -0
- package/dist/src/subTypes/trueType.d.ts.map +1 -0
- package/dist/src/superTypes/SpecialNumberType.d.ts +6 -0
- package/dist/src/superTypes/SpecialNumberType.d.ts.map +1 -0
- package/dist/src/superTypes/SpecialRealNumberType.d.ts +6 -0
- package/dist/src/superTypes/SpecialRealNumberType.d.ts.map +1 -0
- package/dist/src/superTypes/buffersourceType.d.ts +8 -0
- package/dist/src/superTypes/buffersourceType.d.ts.map +1 -0
- package/dist/src/superTypes/dommatrixType.d.ts +6 -0
- package/dist/src/superTypes/dommatrixType.d.ts.map +1 -0
- package/dist/src/superTypes/dompointType.d.ts +6 -0
- package/dist/src/superTypes/dompointType.d.ts.map +1 -0
- package/dist/src/superTypes/domrectType.d.ts +6 -0
- package/dist/src/superTypes/domrectType.d.ts.map +1 -0
- package/dist/src/superTypes/errorsSpecialType.d.ts +8 -0
- package/dist/src/superTypes/errorsSpecialType.d.ts.map +1 -0
- package/dist/src/typeChoices.d.ts +140 -0
- package/dist/src/typeChoices.d.ts.map +1 -0
- package/dist/src/types.d.ts +758 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/utils/FileList.d.ts +26 -0
- package/dist/src/utils/FileList.d.ts.map +1 -0
- package/dist/src/utils/dialogs.d.ts +111 -0
- package/dist/src/utils/dialogs.d.ts.map +1 -0
- package/dist/src/utils/jsonPointer.d.ts +46 -0
- package/dist/src/utils/jsonPointer.d.ts.map +1 -0
- package/dist/src/utils/media.d.ts +18 -0
- package/dist/src/utils/media.d.ts.map +1 -0
- package/dist/src/utils/objects.d.ts +16 -0
- package/dist/src/utils/objects.d.ts.map +1 -0
- package/dist/src/utils/templateUtils.d.ts +59 -0
- package/dist/src/utils/templateUtils.d.ts.map +1 -0
- package/dist/src/utils/types.d.ts +2 -0
- package/dist/src/utils/types.d.ts.map +1 -0
- package/dist/src/vendor-imports.d.ts +4 -0
- package/dist/src/vendor-imports.d.ts.map +1 -0
- package/dist/subTypes/blobHTMLType.d.ts.map +1 -1
- package/dist/superTypes/SpecialRealNumberType.d.ts.map +1 -1
- package/dist/superTypes/buffersourceType.d.ts.map +1 -1
- package/dist/superTypes/dommatrixType.d.ts.map +1 -1
- package/dist/superTypes/dompointType.d.ts.map +1 -1
- package/dist/superTypes/domrectType.d.ts.map +1 -1
- package/dist/superTypes/errorsSpecialType.d.ts.map +1 -1
- package/dist/typeChoices.d.ts +21 -87
- package/dist/typeChoices.d.ts.map +1 -1
- package/dist/types.d.ts +90 -64
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/FileList.d.ts +4 -3
- package/dist/utils/FileList.d.ts.map +1 -1
- package/dist/utils/dialogs.d.ts +4 -4
- package/dist/utils/dialogs.d.ts.map +1 -1
- package/dist/utils/media.d.ts.map +1 -1
- package/dist/utils/schemaMeta.d.ts +92 -0
- package/dist/utils/schemaMeta.d.ts.map +1 -0
- package/dist/utils/templateUtils.d.ts +3 -3
- package/dist/utils/templateUtils.d.ts.map +1 -1
- package/dist/utils/timing.d.ts +2 -0
- package/dist/utils/timing.d.ts.map +1 -0
- package/dist/utils/types.d.ts +1 -0
- package/dist/utils/types.d.ts.map +1 -1
- package/dist/vendor-imports.d.ts +3 -1
- package/docs/proposals/schema-meta.md +233 -0
- package/eslint.config.js +51 -4
- package/licenseInfo.json +1 -1
- package/package.json +52 -42
- package/pnpm-workspace.yaml +57 -0
- package/rollup.config.js +20 -18
- package/server.js +3 -3
- package/src/deepEqual.js.map +1 -1
- package/src/formatAndTypeChoices.js +62 -58
- package/src/formats/indexedDBKey.js +3 -4
- package/src/formats/schema.js +824 -475
- package/src/formats/structuredCloning.js +189 -79
- package/src/formats.js +17 -5
- package/src/fundamentalTypes/BooleanObjectType.js +4 -5
- package/src/fundamentalTypes/NumberObjectType.js +4 -4
- package/src/fundamentalTypes/StringObjectType.js +3 -4
- package/src/fundamentalTypes/arrayReferenceType.js +0 -2
- package/src/fundamentalTypes/arrayType.js +624 -389
- package/src/fundamentalTypes/bigintObjectType.js +3 -2
- package/src/fundamentalTypes/bigintType.js +79 -17
- package/src/fundamentalTypes/blobType.js +35 -35
- package/src/fundamentalTypes/booleanType.js +16 -8
- package/src/fundamentalTypes/dateType.js +6 -8
- package/src/fundamentalTypes/domexceptionType.js +5 -4
- package/src/fundamentalTypes/errorType.js +39 -32
- package/src/fundamentalTypes/fileType.js +238 -52
- package/src/fundamentalTypes/functionType.js +61 -41
- package/src/fundamentalTypes/nanType.js +5 -4
- package/src/fundamentalTypes/noneditableType.js +4 -3
- package/src/fundamentalTypes/nullType.js +3 -2
- package/src/fundamentalTypes/numberType.js +72 -20
- package/src/fundamentalTypes/promiseType.js +16 -40
- package/src/fundamentalTypes/regexpType.js +7 -13
- package/src/fundamentalTypes/stringType.js +176 -110
- package/src/fundamentalTypes/symbolType.js +3 -2
- package/src/fundamentalTypes/undefinedType.js +3 -2
- package/src/index.js +6 -5
- package/src/jsoe.css +107 -8
- package/src/subTypes/blobHTMLType.js +23 -10
- package/src/superTypes/SpecialNumberType.js +6 -6
- package/src/superTypes/SpecialRealNumberType.js +10 -9
- package/src/superTypes/buffersourceType.js +86 -75
- package/src/superTypes/dommatrixType.js +6 -5
- package/src/superTypes/dompointType.js +6 -5
- package/src/superTypes/domrectType.js +6 -5
- package/src/superTypes/errorsSpecialType.js +54 -35
- package/src/typeChoices.js +373 -53
- package/src/types.js +157 -97
- package/src/utils/FileList.js +3 -3
- package/src/utils/dialogs.js +5 -7
- package/src/utils/jsonPointer.js +1 -1
- package/src/utils/media.js +1 -0
- package/src/utils/schemaMeta.js +257 -0
- package/src/utils/templateUtils.js +3 -3
- package/src/utils/timing.js +12 -0
- package/src/utils/types.js +19 -0
- package/src/vendor-imports.js +10 -2
- package/tsconfig.json +2 -0
- package/vendor/acorn/dist/acorn.d.mts +46 -5
- package/vendor/acorn/dist/acorn.d.ts +46 -5
- package/vendor/acorn/dist/acorn.js +394 -117
- package/vendor/acorn/dist/acorn.mjs +394 -117
- package/vendor/acorn/dist/bin.js +1 -1
- package/vendor/jamilih/dist/{jml-es.js → jml.mjs} +590 -312
- package/vendor/jamilih/package.json +1 -1
- package/vendor/mime/dist/types/other.js +719 -0
- package/vendor/mime/dist/types/standard.js +366 -0
- package/vendor/typeson-registry/dist/index.js +519 -99
- package/vendor/zod/classic/checks.d.ts +1 -0
- package/vendor/zod/classic/checks.js +1 -0
- package/vendor/zod/classic/coerce.d.ts +17 -0
- package/vendor/zod/classic/coerce.js +17 -0
- package/vendor/zod/classic/compat.d.ts +48 -0
- package/vendor/zod/classic/compat.js +31 -0
- package/vendor/zod/classic/deep-partial.d.ts +14 -0
- package/vendor/zod/classic/deep-partial.js +13 -0
- package/vendor/zod/classic/errors.d.ts +29 -0
- package/vendor/zod/classic/errors.js +57 -0
- package/vendor/zod/classic/external.d.ts +19 -0
- package/vendor/zod/classic/external.js +17 -0
- package/vendor/zod/classic/from-json-schema.d.ts +12 -0
- package/vendor/zod/classic/from-json-schema.js +660 -0
- package/vendor/zod/classic/in-out.d.ts +8 -0
- package/vendor/zod/classic/in-out.js +36 -0
- package/vendor/zod/classic/index.d.ts +3 -0
- package/vendor/zod/classic/index.js +4 -0
- package/vendor/zod/classic/iso.d.ts +7 -0
- package/vendor/zod/classic/iso.js +15 -0
- package/vendor/zod/classic/package.json +7 -0
- package/vendor/zod/classic/parse.d.ts +44 -0
- package/vendor/zod/classic/parse.js +16 -0
- package/vendor/zod/classic/schemas.d.ts +802 -0
- package/vendor/zod/classic/schemas.js +1491 -0
- package/vendor/zod/core/api.d.ts +329 -0
- package/vendor/zod/core/api.js +1104 -0
- package/vendor/zod/core/checks.d.ts +278 -0
- package/vendor/zod/core/checks.js +581 -0
- package/vendor/zod/core/compile.d.ts +51 -0
- package/vendor/zod/core/compile.js +1783 -0
- package/vendor/zod/core/core.d.ts +82 -0
- package/vendor/zod/core/core.js +141 -0
- package/vendor/zod/core/doc.d.ts +16 -0
- package/vendor/zod/core/doc.js +33 -0
- package/vendor/zod/core/errors.d.ts +225 -0
- package/vendor/zod/core/errors.js +270 -0
- package/vendor/zod/core/index.d.ts +19 -0
- package/vendor/zod/core/index.js +19 -0
- package/vendor/zod/core/json-schema-generator.d.ts +65 -0
- package/vendor/zod/core/json-schema-generator.js +99 -0
- package/vendor/zod/core/json-schema-processors.d.ts +49 -0
- package/vendor/zod/core/json-schema-processors.js +747 -0
- package/vendor/zod/core/json-schema.d.ts +89 -0
- package/vendor/zod/core/memoizer.d.ts +15 -0
- package/vendor/zod/core/memoizer.js +265 -0
- package/vendor/zod/core/package.json +7 -0
- package/vendor/zod/core/parse.d.ts +52 -0
- package/vendor/zod/core/parse.js +154 -0
- package/vendor/zod/core/regexes.d.ts +87 -0
- package/vendor/zod/core/regexes.js +150 -0
- package/vendor/zod/core/registries.d.ts +35 -0
- package/vendor/zod/core/registries.js +51 -0
- package/vendor/zod/core/schemas.d.ts +1253 -0
- package/vendor/zod/core/schemas.js +2440 -0
- package/vendor/zod/core/standard-schema.d.ts +126 -0
- package/vendor/zod/core/to-json-schema.d.ts +153 -0
- package/vendor/zod/core/to-json-schema.js +650 -0
- package/vendor/zod/core/util.d.ts +257 -0
- package/vendor/zod/core/util.js +846 -0
- package/vendor/zod/core/versions.d.ts +5 -0
- package/vendor/zod/core/versions.js +5 -0
- package/vendor/zod/core/visit.d.ts +30 -0
- package/vendor/zod/core/visit.js +169 -0
- package/vendor/zod/index.d.ts +3 -0
- package/vendor/zod/index.js +4 -0
- package/vendor/zod/locales/ar.d.ts +4 -0
- package/vendor/zod/locales/ar.js +109 -0
- package/vendor/zod/locales/az.d.ts +4 -0
- package/vendor/zod/locales/az.js +108 -0
- package/vendor/zod/locales/be.d.ts +4 -0
- package/vendor/zod/locales/be.js +166 -0
- package/vendor/zod/locales/bg.d.ts +4 -0
- package/vendor/zod/locales/bg.js +123 -0
- package/vendor/zod/locales/bn.d.ts +4 -0
- package/vendor/zod/locales/bn.js +111 -0
- package/vendor/zod/locales/ca.d.ts +4 -0
- package/vendor/zod/locales/ca.js +110 -0
- package/vendor/zod/locales/ckb.d.ts +4 -0
- package/vendor/zod/locales/ckb.js +131 -0
- package/vendor/zod/locales/cs.d.ts +4 -0
- package/vendor/zod/locales/cs.js +114 -0
- package/vendor/zod/locales/da.d.ts +4 -0
- package/vendor/zod/locales/da.js +118 -0
- package/vendor/zod/locales/de.d.ts +4 -0
- package/vendor/zod/locales/de.js +111 -0
- package/vendor/zod/locales/el.d.ts +4 -0
- package/vendor/zod/locales/el.js +110 -0
- package/vendor/zod/locales/en.d.ts +4 -0
- package/vendor/zod/locales/en.js +123 -0
- package/vendor/zod/locales/eo.d.ts +4 -0
- package/vendor/zod/locales/eo.js +112 -0
- package/vendor/zod/locales/es.d.ts +4 -0
- package/vendor/zod/locales/es.js +134 -0
- package/vendor/zod/locales/fa.d.ts +4 -0
- package/vendor/zod/locales/fa.js +117 -0
- package/vendor/zod/locales/fi.d.ts +4 -0
- package/vendor/zod/locales/fi.js +115 -0
- package/vendor/zod/locales/fr-CA.d.ts +4 -0
- package/vendor/zod/locales/fr-CA.js +110 -0
- package/vendor/zod/locales/fr.d.ts +4 -0
- package/vendor/zod/locales/fr.js +127 -0
- package/vendor/zod/locales/gu.d.ts +4 -0
- package/vendor/zod/locales/gu.js +111 -0
- package/vendor/zod/locales/he.d.ts +4 -0
- package/vendor/zod/locales/he.js +219 -0
- package/vendor/zod/locales/hi.d.ts +4 -0
- package/vendor/zod/locales/hi.js +109 -0
- package/vendor/zod/locales/hr.d.ts +4 -0
- package/vendor/zod/locales/hr.js +124 -0
- package/vendor/zod/locales/hu.d.ts +4 -0
- package/vendor/zod/locales/hu.js +111 -0
- package/vendor/zod/locales/hy.d.ts +4 -0
- package/vendor/zod/locales/hy.js +156 -0
- package/vendor/zod/locales/id.d.ts +4 -0
- package/vendor/zod/locales/id.js +109 -0
- package/vendor/zod/locales/index.d.ts +62 -0
- package/vendor/zod/locales/index.js +62 -0
- package/vendor/zod/locales/is.d.ts +4 -0
- package/vendor/zod/locales/is.js +112 -0
- package/vendor/zod/locales/it.d.ts +4 -0
- package/vendor/zod/locales/it.js +111 -0
- package/vendor/zod/locales/ja.d.ts +4 -0
- package/vendor/zod/locales/ja.js +110 -0
- package/vendor/zod/locales/ka.d.ts +4 -0
- package/vendor/zod/locales/ka.js +115 -0
- package/vendor/zod/locales/kh.d.ts +5 -0
- package/vendor/zod/locales/kh.js +5 -0
- package/vendor/zod/locales/km.d.ts +4 -0
- package/vendor/zod/locales/km.js +113 -0
- package/vendor/zod/locales/kn.d.ts +4 -0
- package/vendor/zod/locales/kn.js +114 -0
- package/vendor/zod/locales/ko.d.ts +4 -0
- package/vendor/zod/locales/ko.js +114 -0
- package/vendor/zod/locales/lt.d.ts +4 -0
- package/vendor/zod/locales/lt.js +205 -0
- package/vendor/zod/locales/mk.d.ts +4 -0
- package/vendor/zod/locales/mk.js +112 -0
- package/vendor/zod/locales/ms.d.ts +4 -0
- package/vendor/zod/locales/ms.js +110 -0
- package/vendor/zod/locales/ne.d.ts +4 -0
- package/vendor/zod/locales/ne.js +109 -0
- package/vendor/zod/locales/nl.d.ts +4 -0
- package/vendor/zod/locales/nl.js +113 -0
- package/vendor/zod/locales/nn.d.ts +4 -0
- package/vendor/zod/locales/nn.js +111 -0
- package/vendor/zod/locales/no.d.ts +4 -0
- package/vendor/zod/locales/no.js +111 -0
- package/vendor/zod/locales/ota.d.ts +4 -0
- package/vendor/zod/locales/ota.js +112 -0
- package/vendor/zod/locales/package.json +7 -0
- package/vendor/zod/locales/pl.d.ts +4 -0
- package/vendor/zod/locales/pl.js +112 -0
- package/vendor/zod/locales/ps.d.ts +4 -0
- package/vendor/zod/locales/ps.js +117 -0
- package/vendor/zod/locales/pt-BR.d.ts +4 -0
- package/vendor/zod/locales/pt-BR.js +141 -0
- package/vendor/zod/locales/pt.d.ts +4 -0
- package/vendor/zod/locales/pt.js +140 -0
- package/vendor/zod/locales/ro.d.ts +4 -0
- package/vendor/zod/locales/ro.js +120 -0
- package/vendor/zod/locales/ru.d.ts +4 -0
- package/vendor/zod/locales/ru.js +166 -0
- package/vendor/zod/locales/sk.d.ts +4 -0
- package/vendor/zod/locales/sk.js +114 -0
- package/vendor/zod/locales/sl.d.ts +4 -0
- package/vendor/zod/locales/sl.js +112 -0
- package/vendor/zod/locales/sv.d.ts +4 -0
- package/vendor/zod/locales/sv.js +113 -0
- package/vendor/zod/locales/ta.d.ts +4 -0
- package/vendor/zod/locales/ta.js +113 -0
- package/vendor/zod/locales/th.d.ts +4 -0
- package/vendor/zod/locales/th.js +113 -0
- package/vendor/zod/locales/tk.d.ts +4 -0
- package/vendor/zod/locales/tk.js +105 -0
- package/vendor/zod/locales/tr.d.ts +4 -0
- package/vendor/zod/locales/tr.js +108 -0
- package/vendor/zod/locales/ua.d.ts +5 -0
- package/vendor/zod/locales/ua.js +5 -0
- package/vendor/zod/locales/uk.d.ts +4 -0
- package/vendor/zod/locales/uk.js +111 -0
- package/vendor/zod/locales/ur.d.ts +4 -0
- package/vendor/zod/locales/ur.js +113 -0
- package/vendor/zod/locales/uz.d.ts +4 -0
- package/vendor/zod/locales/uz.js +111 -0
- package/vendor/zod/locales/vi.d.ts +4 -0
- package/vendor/zod/locales/vi.js +111 -0
- package/vendor/zod/locales/yo.d.ts +4 -0
- package/vendor/zod/locales/yo.js +110 -0
- package/vendor/zod/locales/zh-CN.d.ts +4 -0
- package/vendor/zod/locales/zh-CN.js +112 -0
- package/vendor/zod/locales/zh-TW.d.ts +4 -0
- package/vendor/zod/locales/zh-TW.js +110 -0
- package/vendor/zod/mini/checks.d.ts +1 -0
- package/vendor/zod/mini/checks.js +1 -0
- package/vendor/zod/mini/coerce.d.ts +7 -0
- package/vendor/zod/mini/coerce.js +22 -0
- package/vendor/zod/mini/deep-partial.d.ts +14 -0
- package/vendor/zod/mini/deep-partial.js +13 -0
- package/vendor/zod/mini/external.d.ts +16 -0
- package/vendor/zod/mini/external.js +16 -0
- package/vendor/zod/mini/in-out.d.ts +8 -0
- package/vendor/zod/mini/in-out.js +36 -0
- package/vendor/zod/mini/index.d.ts +3 -0
- package/vendor/zod/mini/index.js +3 -0
- package/vendor/zod/mini/iso.d.ts +22 -0
- package/vendor/zod/mini/iso.js +34 -0
- package/vendor/zod/mini/package.json +7 -0
- package/vendor/zod/mini/parse.d.ts +1 -0
- package/vendor/zod/mini/parse.js +1 -0
- package/vendor/zod/mini/schemas.d.ts +475 -0
- package/vendor/zod/mini/schemas.js +987 -0
- package/vendor/zod/package.json +7 -0
- package/vendor/zodexy/dist/esm/index.js +1274 -0
- package/vendor/zodexy/dist/index.js +1088 -0
- package/vendor/zodexy/dist/schema.zodexy.json +1036 -0
- package/dist/fundamentalTypes/nativeEnumType.d.ts +0 -6
- package/dist/fundamentalTypes/nativeEnumType.d.ts.map +0 -1
- package/src/fundamentalTypes/catchType.js +0 -140
- package/src/fundamentalTypes/enumType.js +0 -52
- package/src/fundamentalTypes/literalType.js +0 -81
- package/src/fundamentalTypes/nativeEnumType.js +0 -157
- package/src/fundamentalTypes/neverType.js +0 -49
- package/src/fundamentalTypes/recordType.js +0 -42
- package/src/fundamentalTypes/tupleType.js +0 -39
- package/src/fundamentalTypes/voidType.js +0 -48
- package/vendor/zod/lib/index.mjs +0 -4236
- package/vendor/zodex/dist/esm/dezerialize.d.ts +0 -26
- package/vendor/zodex/dist/esm/dezerialize.js +0 -393
- package/vendor/zodex/dist/esm/index.d.ts +0 -9
- package/vendor/zodex/dist/esm/index.js +0 -4
- package/vendor/zodex/dist/esm/infer.d.ts +0 -29
- package/vendor/zodex/dist/esm/package.json +0 -1
- package/vendor/zodex/dist/esm/types.d.ts +0 -201
- package/vendor/zodex/dist/esm/types.js +0 -13
- package/vendor/zodex/dist/esm/ui.d.ts +0 -23
- package/vendor/zodex/dist/esm/ui.js +0 -10
- package/vendor/zodex/dist/esm/zerialize.d.ts +0 -50
- package/vendor/zodex/dist/esm/zerialize.js +0 -417
- package/vendor/zodex/dist/esm/zod-types.d.ts +0 -11
- /package/vendor/{zodex/dist/esm/infer.js → zod/core/json-schema.js} +0 -0
- /package/vendor/{zodex/dist/esm/zod-types.js → zod/core/standard-schema.js} +0 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export type Schema = ObjectSchema | ArraySchema | StringSchema | NumberSchema | IntegerSchema | BooleanSchema | NullSchema;
|
|
2
|
+
export type _JSONSchema = boolean | JSONSchema;
|
|
3
|
+
export type SchemaType = "object" | "array" | "string" | "number" | "boolean" | "null" | "integer";
|
|
4
|
+
export type JSONSchema = {
|
|
5
|
+
[k: string]: unknown;
|
|
6
|
+
$schema?: "https://json-schema.org/draft/2020-12/schema" | "http://json-schema.org/draft-07/schema#" | "http://json-schema.org/draft-04/schema#";
|
|
7
|
+
$id?: string;
|
|
8
|
+
$anchor?: string;
|
|
9
|
+
$ref?: string;
|
|
10
|
+
$dynamicRef?: string;
|
|
11
|
+
$dynamicAnchor?: string;
|
|
12
|
+
$vocabulary?: Record<string, boolean>;
|
|
13
|
+
$comment?: string;
|
|
14
|
+
$defs?: Record<string, JSONSchema>;
|
|
15
|
+
type?: SchemaType | SchemaType[];
|
|
16
|
+
additionalItems?: _JSONSchema;
|
|
17
|
+
unevaluatedItems?: _JSONSchema;
|
|
18
|
+
prefixItems?: _JSONSchema[];
|
|
19
|
+
items?: _JSONSchema | _JSONSchema[];
|
|
20
|
+
contains?: _JSONSchema;
|
|
21
|
+
additionalProperties?: _JSONSchema;
|
|
22
|
+
unevaluatedProperties?: _JSONSchema;
|
|
23
|
+
properties?: Record<string, _JSONSchema>;
|
|
24
|
+
patternProperties?: Record<string, _JSONSchema>;
|
|
25
|
+
dependentSchemas?: Record<string, _JSONSchema>;
|
|
26
|
+
propertyNames?: _JSONSchema;
|
|
27
|
+
if?: _JSONSchema;
|
|
28
|
+
then?: _JSONSchema;
|
|
29
|
+
else?: _JSONSchema;
|
|
30
|
+
allOf?: JSONSchema[];
|
|
31
|
+
anyOf?: JSONSchema[];
|
|
32
|
+
oneOf?: JSONSchema[];
|
|
33
|
+
not?: _JSONSchema;
|
|
34
|
+
multipleOf?: number;
|
|
35
|
+
maximum?: number;
|
|
36
|
+
exclusiveMaximum?: number | boolean;
|
|
37
|
+
minimum?: number;
|
|
38
|
+
exclusiveMinimum?: number | boolean;
|
|
39
|
+
maxLength?: number;
|
|
40
|
+
minLength?: number;
|
|
41
|
+
pattern?: string;
|
|
42
|
+
maxItems?: number;
|
|
43
|
+
minItems?: number;
|
|
44
|
+
uniqueItems?: boolean;
|
|
45
|
+
maxContains?: number;
|
|
46
|
+
minContains?: number;
|
|
47
|
+
maxProperties?: number;
|
|
48
|
+
minProperties?: number;
|
|
49
|
+
required?: string[];
|
|
50
|
+
dependentRequired?: Record<string, string[]>;
|
|
51
|
+
enum?: Array<string | number | boolean | null>;
|
|
52
|
+
const?: string | number | boolean | null;
|
|
53
|
+
id?: string;
|
|
54
|
+
title?: string;
|
|
55
|
+
description?: string;
|
|
56
|
+
default?: unknown;
|
|
57
|
+
deprecated?: boolean;
|
|
58
|
+
readOnly?: boolean;
|
|
59
|
+
writeOnly?: boolean;
|
|
60
|
+
nullable?: boolean;
|
|
61
|
+
examples?: unknown[];
|
|
62
|
+
format?: string;
|
|
63
|
+
contentMediaType?: string;
|
|
64
|
+
contentEncoding?: string;
|
|
65
|
+
contentSchema?: JSONSchema;
|
|
66
|
+
_prefault?: unknown;
|
|
67
|
+
};
|
|
68
|
+
export type BaseSchema = JSONSchema;
|
|
69
|
+
export interface ObjectSchema extends JSONSchema {
|
|
70
|
+
type: "object";
|
|
71
|
+
}
|
|
72
|
+
export interface ArraySchema extends JSONSchema {
|
|
73
|
+
type: "array";
|
|
74
|
+
}
|
|
75
|
+
export interface StringSchema extends JSONSchema {
|
|
76
|
+
type: "string";
|
|
77
|
+
}
|
|
78
|
+
export interface NumberSchema extends JSONSchema {
|
|
79
|
+
type: "number";
|
|
80
|
+
}
|
|
81
|
+
export interface IntegerSchema extends JSONSchema {
|
|
82
|
+
type: "integer";
|
|
83
|
+
}
|
|
84
|
+
export interface BooleanSchema extends JSONSchema {
|
|
85
|
+
type: "boolean";
|
|
86
|
+
}
|
|
87
|
+
export interface NullSchema extends JSONSchema {
|
|
88
|
+
type: "null";
|
|
89
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { $ZodMemoizer, $ZodType } from "./schemas.js";
|
|
2
|
+
export declare class $ZodCyclicError extends Error {
|
|
3
|
+
constructor();
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Whether one parse can re-enter this schema, i.e. its subtree contains a cycle.
|
|
7
|
+
* Exported for `z.compile`, which refuses to compile such a schema: cycle
|
|
8
|
+
* breaking is driven from here off state keyed on the parse context, and a
|
|
9
|
+
* generated fast path has no context to key on.
|
|
10
|
+
*/
|
|
11
|
+
export declare function isRecursiveSchema(inst: $ZodType): boolean;
|
|
12
|
+
/** The memoizer that gives containers cycle support. `zod` installs it by default; `zod/mini` opts in with `config({ memoizer: memoizer() })`. */
|
|
13
|
+
export declare function memoizer(): $ZodMemoizer;
|
|
14
|
+
/** Whether this value is a node a back-edge resolved to before it finished. */
|
|
15
|
+
export declare function isBackEdge(ctx: object, value: unknown): boolean;
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
export class $ZodCyclicError extends Error {
|
|
2
|
+
constructor() {
|
|
3
|
+
super(`Cannot parse a reference cycle that closes through a transform`);
|
|
4
|
+
this.name = "ZodCyclicError";
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/** Keyed off the context object every schema in one parse call already shares. */
|
|
8
|
+
const STATE = "~memo";
|
|
9
|
+
const NO_ISSUES = [];
|
|
10
|
+
// Receivers prefix paths in place, so the cache and every hand-out need their own copies.
|
|
11
|
+
function cloneIssues(issues) {
|
|
12
|
+
return issues.map((iss) => (iss.path ? { ...iss, path: iss.path.slice() } : { ...iss }));
|
|
13
|
+
}
|
|
14
|
+
const recursive = /*@__PURE__*/ new WeakMap();
|
|
15
|
+
/** Whether this schema's subtree contains a cycle, so one parse can re-enter it. */
|
|
16
|
+
function isRecursive(inst, stack) {
|
|
17
|
+
const cached = recursive.get(inst);
|
|
18
|
+
if (cached !== undefined)
|
|
19
|
+
return cached;
|
|
20
|
+
// Relative to the walk in progress, so not cached.
|
|
21
|
+
if (stack.has(inst))
|
|
22
|
+
return true;
|
|
23
|
+
stack.add(inst);
|
|
24
|
+
let result = false;
|
|
25
|
+
const check = (child) => {
|
|
26
|
+
if (!result && child?._zod && isRecursive(child, stack))
|
|
27
|
+
result = true;
|
|
28
|
+
};
|
|
29
|
+
const def = inst._zod.def;
|
|
30
|
+
const kind = def.type;
|
|
31
|
+
switch (kind) {
|
|
32
|
+
case "object": {
|
|
33
|
+
// `Reflect.ownKeys` rather than `Object.keys`, so a cycle through a declared symbol key is still seen
|
|
34
|
+
for (const key of Reflect.ownKeys(def.shape))
|
|
35
|
+
check(def.shape[key]);
|
|
36
|
+
check(def.catchall);
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
case "array":
|
|
40
|
+
check(def.element);
|
|
41
|
+
break;
|
|
42
|
+
case "tuple":
|
|
43
|
+
for (const el of def.items)
|
|
44
|
+
check(el);
|
|
45
|
+
check(def.rest);
|
|
46
|
+
break;
|
|
47
|
+
case "record":
|
|
48
|
+
case "map":
|
|
49
|
+
check(def.keyType);
|
|
50
|
+
check(def.valueType);
|
|
51
|
+
break;
|
|
52
|
+
case "set":
|
|
53
|
+
check(def.valueType);
|
|
54
|
+
break;
|
|
55
|
+
case "union":
|
|
56
|
+
for (const el of def.options)
|
|
57
|
+
check(el);
|
|
58
|
+
break;
|
|
59
|
+
case "intersection":
|
|
60
|
+
check(def.left);
|
|
61
|
+
check(def.right);
|
|
62
|
+
break;
|
|
63
|
+
case "optional":
|
|
64
|
+
case "nullable":
|
|
65
|
+
case "default":
|
|
66
|
+
case "prefault":
|
|
67
|
+
case "catch":
|
|
68
|
+
case "readonly":
|
|
69
|
+
case "nonoptional":
|
|
70
|
+
case "promise":
|
|
71
|
+
case "success":
|
|
72
|
+
check(def.innerType);
|
|
73
|
+
break;
|
|
74
|
+
case "pipe":
|
|
75
|
+
check(def.in);
|
|
76
|
+
check(def.out);
|
|
77
|
+
break;
|
|
78
|
+
case "function":
|
|
79
|
+
check(def.input);
|
|
80
|
+
check(def.output);
|
|
81
|
+
break;
|
|
82
|
+
// reading `_zod.innerType` resolves the getter once and caches it
|
|
83
|
+
case "lazy":
|
|
84
|
+
check(inst._zod.innerType);
|
|
85
|
+
break;
|
|
86
|
+
// a leaf by choice: `parts` are regex fragments, not data positions
|
|
87
|
+
case "template_literal":
|
|
88
|
+
// leaves
|
|
89
|
+
case "string":
|
|
90
|
+
case "number":
|
|
91
|
+
case "int":
|
|
92
|
+
case "boolean":
|
|
93
|
+
case "bigint":
|
|
94
|
+
case "symbol":
|
|
95
|
+
case "undefined":
|
|
96
|
+
case "null":
|
|
97
|
+
case "void":
|
|
98
|
+
case "never":
|
|
99
|
+
case "any":
|
|
100
|
+
case "unknown":
|
|
101
|
+
case "date":
|
|
102
|
+
case "nan":
|
|
103
|
+
case "enum":
|
|
104
|
+
case "literal":
|
|
105
|
+
case "file":
|
|
106
|
+
case "transform":
|
|
107
|
+
case "custom":
|
|
108
|
+
break;
|
|
109
|
+
default: {
|
|
110
|
+
// a new built-in kind becomes a compile error here
|
|
111
|
+
kind;
|
|
112
|
+
// a user-defined kind can still hold children, and only its author knows where, so fall back to scanning the def — skipping accessors, since reading one can run user code
|
|
113
|
+
for (const key in def) {
|
|
114
|
+
const desc = Object.getOwnPropertyDescriptor(def, key);
|
|
115
|
+
if (!desc || desc.get)
|
|
116
|
+
continue;
|
|
117
|
+
const value = desc.value;
|
|
118
|
+
if (!value || typeof value !== "object")
|
|
119
|
+
continue;
|
|
120
|
+
if (value._zod)
|
|
121
|
+
check(value);
|
|
122
|
+
else if (Array.isArray(value))
|
|
123
|
+
for (const el of value)
|
|
124
|
+
check(el);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
stack.delete(inst);
|
|
129
|
+
recursive.set(inst, result);
|
|
130
|
+
return result;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Whether one parse can re-enter this schema, i.e. its subtree contains a cycle.
|
|
134
|
+
* Exported for `z.compile`, which refuses to compile such a schema: cycle
|
|
135
|
+
* breaking is driven from here off state keyed on the parse context, and a
|
|
136
|
+
* generated fast path has no context to key on.
|
|
137
|
+
*/
|
|
138
|
+
export function isRecursiveSchema(inst) {
|
|
139
|
+
return isRecursive(inst, new Set());
|
|
140
|
+
}
|
|
141
|
+
function bucketFor(state, inst) {
|
|
142
|
+
let bucket = state.buckets.get(inst);
|
|
143
|
+
if (!bucket) {
|
|
144
|
+
bucket = new Map();
|
|
145
|
+
state.buckets.set(inst, bucket);
|
|
146
|
+
}
|
|
147
|
+
return bucket;
|
|
148
|
+
}
|
|
149
|
+
// Set immediately before delegating to core and cleared immediately after, so `alloc` registers only for a visit this module is driving.
|
|
150
|
+
let handoff;
|
|
151
|
+
// Allocated but unfinished entries. `alloc` and the matching pop both happen in the synchronous part of a parse, so they nest even when children are async, and one stack serves every schema.
|
|
152
|
+
const open = [];
|
|
153
|
+
const memo = {
|
|
154
|
+
alloc(_inst, payload, empty) {
|
|
155
|
+
const bucket = handoff;
|
|
156
|
+
if (!bucket)
|
|
157
|
+
return empty;
|
|
158
|
+
handoff = undefined;
|
|
159
|
+
const entry = { value: empty, issues: null };
|
|
160
|
+
bucket.set(payload.value, entry);
|
|
161
|
+
open.push(entry);
|
|
162
|
+
return empty;
|
|
163
|
+
},
|
|
164
|
+
guard(inst) {
|
|
165
|
+
var _a;
|
|
166
|
+
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
167
|
+
inst._zod.deferred.push(() => {
|
|
168
|
+
const base = inst._zod.parse;
|
|
169
|
+
const wrapped = (payload, ctx) => {
|
|
170
|
+
// The value is a placeholder a back-edge is still waiting on, so the cycle closes through this transform. Its output can't exist in time to bind.
|
|
171
|
+
if (ctx.direction !== "backward" && isBackEdge(ctx, payload.value))
|
|
172
|
+
throw new $ZodCyclicError();
|
|
173
|
+
return base(payload, ctx);
|
|
174
|
+
};
|
|
175
|
+
inst._zod.parse = wrapped;
|
|
176
|
+
if (inst._zod.run === base)
|
|
177
|
+
inst._zod.run = wrapped;
|
|
178
|
+
});
|
|
179
|
+
},
|
|
180
|
+
attach(inst) {
|
|
181
|
+
var _a;
|
|
182
|
+
let isRecursiveInst;
|
|
183
|
+
// `bucket` memoized for one parse; a recursive schema is re-entered many times and its bucket never changes
|
|
184
|
+
let lastCtx;
|
|
185
|
+
let lastBucket;
|
|
186
|
+
// Wraps `parse` in a deferred so it sees the container's final parse. Core's own deferred copies `parse` into `run` when there are no checks, and it ran first, so `run` is patched to match; with checks, `run` reads `parse` dynamically.
|
|
187
|
+
(_a = inst._zod).deferred ?? (_a.deferred = []);
|
|
188
|
+
inst._zod.deferred.push(() => {
|
|
189
|
+
const base = inst._zod.parse;
|
|
190
|
+
const wrapped = (payload, ctx) => {
|
|
191
|
+
if (isRecursiveInst === undefined) {
|
|
192
|
+
isRecursiveInst = isRecursive(inst, new Set());
|
|
193
|
+
if (!isRecursiveInst) {
|
|
194
|
+
// Nothing here can ever fire, so take it back out.
|
|
195
|
+
inst._zod.parse = base;
|
|
196
|
+
if (inst._zod.run === wrapped)
|
|
197
|
+
inst._zod.run = base;
|
|
198
|
+
return base(payload, ctx);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
const input = payload.value;
|
|
202
|
+
if (input === null || typeof input !== "object")
|
|
203
|
+
return base(payload, ctx);
|
|
204
|
+
let state = ctx[STATE];
|
|
205
|
+
if (!state) {
|
|
206
|
+
state = { buckets: new Map(), backEdges: undefined };
|
|
207
|
+
ctx[STATE] = state;
|
|
208
|
+
}
|
|
209
|
+
let bucket;
|
|
210
|
+
if (lastCtx === ctx) {
|
|
211
|
+
bucket = lastBucket;
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
bucket = bucketFor(state, inst);
|
|
215
|
+
lastCtx = ctx;
|
|
216
|
+
lastBucket = bucket;
|
|
217
|
+
}
|
|
218
|
+
const hit = bucket.get(input);
|
|
219
|
+
if (hit) {
|
|
220
|
+
payload.value = hit.value;
|
|
221
|
+
if (hit.issues) {
|
|
222
|
+
if (hit.issues.length)
|
|
223
|
+
payload.issues.push(...cloneIssues(hit.issues));
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
// Still being parsed: its own checks cover it, so skip them here.
|
|
227
|
+
payload.memo = true;
|
|
228
|
+
state.backEdges ?? (state.backEdges = new Set());
|
|
229
|
+
state.backEdges.add(hit.value);
|
|
230
|
+
}
|
|
231
|
+
return payload;
|
|
232
|
+
}
|
|
233
|
+
handoff = bucket;
|
|
234
|
+
const depth = open.length;
|
|
235
|
+
const result = base(payload, ctx);
|
|
236
|
+
handoff = undefined;
|
|
237
|
+
// A container that rejected its input outright allocated nothing.
|
|
238
|
+
const entry = open.length > depth ? open.pop() : undefined;
|
|
239
|
+
// Both paths written out so the sync one allocates no closure. It runs once per node, and capturing here cost more than everything else combined.
|
|
240
|
+
if (result instanceof Promise) {
|
|
241
|
+
return result.then((r) => {
|
|
242
|
+
if (entry)
|
|
243
|
+
entry.issues = r.issues.length ? cloneIssues(r.issues) : NO_ISSUES;
|
|
244
|
+
return r;
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
if (entry)
|
|
248
|
+
entry.issues = result.issues.length ? cloneIssues(result.issues) : NO_ISSUES;
|
|
249
|
+
return result;
|
|
250
|
+
};
|
|
251
|
+
inst._zod.parse = wrapped;
|
|
252
|
+
if (inst._zod.run === base)
|
|
253
|
+
inst._zod.run = wrapped;
|
|
254
|
+
});
|
|
255
|
+
},
|
|
256
|
+
};
|
|
257
|
+
/** The memoizer that gives containers cycle support. `zod` installs it by default; `zod/mini` opts in with `config({ memoizer: memoizer() })`. */
|
|
258
|
+
export function memoizer() {
|
|
259
|
+
return memo;
|
|
260
|
+
}
|
|
261
|
+
/** Whether this value is a node a back-edge resolved to before it finished. */
|
|
262
|
+
export function isBackEdge(ctx, value) {
|
|
263
|
+
const backEdges = ctx[STATE]?.backEdges;
|
|
264
|
+
return backEdges !== undefined && value !== null && typeof value === "object" && backEdges.has(value);
|
|
265
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as core from "./core.js";
|
|
2
|
+
import * as errors from "./errors.js";
|
|
3
|
+
import type * as schemas from "./schemas.js";
|
|
4
|
+
import * as util from "./util.js";
|
|
5
|
+
export type $ZodErrorClass = {
|
|
6
|
+
new (issues: errors.$ZodIssue[]): errors.$ZodError;
|
|
7
|
+
};
|
|
8
|
+
type $ParseParams = {
|
|
9
|
+
callee?: util.AnyFunc;
|
|
10
|
+
Err?: $ZodErrorClass | undefined;
|
|
11
|
+
};
|
|
12
|
+
export type $Parse = <T extends schemas.$ZodType>(schema: T, value: unknown, _ctx?: schemas.ParseContext<errors.$ZodIssue>, _params?: $ParseParams) => core.output<T>;
|
|
13
|
+
export declare const _parse: (_Err: $ZodErrorClass) => $Parse;
|
|
14
|
+
export declare const parse: $Parse;
|
|
15
|
+
export type $ParseAsync = <T extends schemas.$ZodType>(schema: T, value: unknown, _ctx?: schemas.ParseContext<errors.$ZodIssue>, _params?: $ParseParams) => Promise<core.output<T>>;
|
|
16
|
+
export declare const _parseAsync: (_Err: $ZodErrorClass) => $ParseAsync;
|
|
17
|
+
export declare const parseAsync: $ParseAsync;
|
|
18
|
+
export type $SafeParse = <T extends schemas.$ZodType>(schema: T, value: unknown, _ctx?: schemas.ParseContext<errors.$ZodIssue>) => util.SafeParseResult<core.output<T>>;
|
|
19
|
+
export declare const _safeParse: (_Err: $ZodErrorClass) => $SafeParse;
|
|
20
|
+
export declare const safeParse: $SafeParse;
|
|
21
|
+
export type $SafeParseAsync = <T extends schemas.$ZodType>(schema: T, value: unknown, _ctx?: schemas.ParseContext<errors.$ZodIssue>) => Promise<util.SafeParseResult<core.output<T>>>;
|
|
22
|
+
export declare const _safeParseAsync: (_Err: $ZodErrorClass) => $SafeParseAsync;
|
|
23
|
+
export declare const safeParseAsync: $SafeParseAsync;
|
|
24
|
+
export type $Validate = <T extends schemas.$ZodType>(schema: T, value: unknown, _ctx?: schemas.ParseContext<errors.$ZodIssue>) => value is core.input<T>;
|
|
25
|
+
export declare const validate: $Validate;
|
|
26
|
+
export type $ValidateAsync = <T extends schemas.$ZodType>(schema: T, value: unknown, _ctx?: schemas.ParseContext<errors.$ZodIssue>) => Promise<boolean>;
|
|
27
|
+
export declare const validateAsync: $ValidateAsync;
|
|
28
|
+
export type $Encode = <T extends schemas.$ZodType>(schema: T, value: core.output<T>, _ctx?: schemas.ParseContext<errors.$ZodIssue>, _params?: $ParseParams) => core.input<T>;
|
|
29
|
+
export declare const _encode: (_Err: $ZodErrorClass) => $Encode;
|
|
30
|
+
export declare const encode: $Encode;
|
|
31
|
+
export type $Decode = <T extends schemas.$ZodType>(schema: T, value: core.input<T>, _ctx?: schemas.ParseContext<errors.$ZodIssue>, _params?: $ParseParams) => core.output<T>;
|
|
32
|
+
export declare const _decode: (_Err: $ZodErrorClass) => $Decode;
|
|
33
|
+
export declare const decode: $Decode;
|
|
34
|
+
export type $EncodeAsync = <T extends schemas.$ZodType>(schema: T, value: core.output<T>, _ctx?: schemas.ParseContext<errors.$ZodIssue>, _params?: $ParseParams) => Promise<core.input<T>>;
|
|
35
|
+
export declare const _encodeAsync: (_Err: $ZodErrorClass) => $EncodeAsync;
|
|
36
|
+
export declare const encodeAsync: $EncodeAsync;
|
|
37
|
+
export type $DecodeAsync = <T extends schemas.$ZodType>(schema: T, value: core.input<T>, _ctx?: schemas.ParseContext<errors.$ZodIssue>, _params?: $ParseParams) => Promise<core.output<T>>;
|
|
38
|
+
export declare const _decodeAsync: (_Err: $ZodErrorClass) => $DecodeAsync;
|
|
39
|
+
export declare const decodeAsync: $DecodeAsync;
|
|
40
|
+
export type $SafeEncode = <T extends schemas.$ZodType>(schema: T, value: core.output<T>, _ctx?: schemas.ParseContext<errors.$ZodIssue>) => util.SafeParseResult<core.input<T>>;
|
|
41
|
+
export declare const _safeEncode: (_Err: $ZodErrorClass) => $SafeEncode;
|
|
42
|
+
export declare const safeEncode: $SafeEncode;
|
|
43
|
+
export type $SafeDecode = <T extends schemas.$ZodType>(schema: T, value: core.input<T>, _ctx?: schemas.ParseContext<errors.$ZodIssue>) => util.SafeParseResult<core.output<T>>;
|
|
44
|
+
export declare const _safeDecode: (_Err: $ZodErrorClass) => $SafeDecode;
|
|
45
|
+
export declare const safeDecode: $SafeDecode;
|
|
46
|
+
export type $SafeEncodeAsync = <T extends schemas.$ZodType>(schema: T, value: core.output<T>, _ctx?: schemas.ParseContext<errors.$ZodIssue>) => Promise<util.SafeParseResult<core.input<T>>>;
|
|
47
|
+
export declare const _safeEncodeAsync: (_Err: $ZodErrorClass) => $SafeEncodeAsync;
|
|
48
|
+
export declare const safeEncodeAsync: $SafeEncodeAsync;
|
|
49
|
+
export type $SafeDecodeAsync = <T extends schemas.$ZodType>(schema: T, value: core.input<T>, _ctx?: schemas.ParseContext<errors.$ZodIssue>) => Promise<util.SafeParseResult<core.output<T>>>;
|
|
50
|
+
export declare const _safeDecodeAsync: (_Err: $ZodErrorClass) => $SafeDecodeAsync;
|
|
51
|
+
export declare const safeDecodeAsync: $SafeDecodeAsync;
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import * as core from "./core.js";
|
|
2
|
+
import * as errors from "./errors.js";
|
|
3
|
+
import * as util from "./util.js";
|
|
4
|
+
// Always both keys, so the `_params` read site in `_parse` sees one object shape rather than two.
|
|
5
|
+
function finalizeParams(callee, params) {
|
|
6
|
+
return { callee: params?.callee ?? callee, Err: params?.Err };
|
|
7
|
+
}
|
|
8
|
+
export const _parse = (_Err) => {
|
|
9
|
+
const fn = (schema, value, _ctx, _params) => {
|
|
10
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
11
|
+
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
12
|
+
if (result instanceof Promise) {
|
|
13
|
+
throw new core.$ZodAsyncError();
|
|
14
|
+
}
|
|
15
|
+
if (result.issues.length) {
|
|
16
|
+
const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));
|
|
17
|
+
util.captureStackTrace(e, _params?.callee ?? fn);
|
|
18
|
+
throw e;
|
|
19
|
+
}
|
|
20
|
+
return result.value;
|
|
21
|
+
};
|
|
22
|
+
return fn;
|
|
23
|
+
};
|
|
24
|
+
export const parse = /* @__PURE__*/ _parse(errors.$ZodRealError);
|
|
25
|
+
export const _parseAsync = (_Err) => {
|
|
26
|
+
const fn = async (schema, value, _ctx, params) => {
|
|
27
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
28
|
+
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
29
|
+
if (result instanceof Promise)
|
|
30
|
+
result = await result;
|
|
31
|
+
if (result.issues.length) {
|
|
32
|
+
const e = new (params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));
|
|
33
|
+
util.captureStackTrace(e, params?.callee ?? fn);
|
|
34
|
+
throw e;
|
|
35
|
+
}
|
|
36
|
+
return result.value;
|
|
37
|
+
};
|
|
38
|
+
return fn;
|
|
39
|
+
};
|
|
40
|
+
export const parseAsync = /* @__PURE__*/ _parseAsync(errors.$ZodRealError);
|
|
41
|
+
export const _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
42
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
43
|
+
const result = schema._zod.run({ value, issues: [] }, ctx);
|
|
44
|
+
if (result instanceof Promise) {
|
|
45
|
+
throw new core.$ZodAsyncError();
|
|
46
|
+
}
|
|
47
|
+
return result.issues.length
|
|
48
|
+
? {
|
|
49
|
+
success: false,
|
|
50
|
+
error: new (_Err ?? errors.$ZodError)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
|
|
51
|
+
}
|
|
52
|
+
: { success: true, data: result.value };
|
|
53
|
+
};
|
|
54
|
+
export const safeParse = /* @__PURE__*/ _safeParse(errors.$ZodRealError);
|
|
55
|
+
export const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
56
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
57
|
+
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
58
|
+
if (result instanceof Promise)
|
|
59
|
+
result = await result;
|
|
60
|
+
return result.issues.length
|
|
61
|
+
? {
|
|
62
|
+
success: false,
|
|
63
|
+
error: new _Err(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
|
|
64
|
+
}
|
|
65
|
+
: { success: true, data: result.value };
|
|
66
|
+
};
|
|
67
|
+
export const safeParseAsync = /* @__PURE__*/ _safeParseAsync(errors.$ZodRealError);
|
|
68
|
+
// registry mirrors of the compiler's sentinels, so this module never imports the compiler
|
|
69
|
+
const COMPILE_INVALID = /* @__PURE__ */ Symbol.for("zod.compile.invalid");
|
|
70
|
+
const COMPILE_FALLBACK = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
|
|
71
|
+
// Deliberately tiny, because v8 will not inline a body carrying the fallback's object literals and throw. Everything that is not the compiled happy path lives in validateFallback, and that split is worth ~35% on a compiled schema.
|
|
72
|
+
export const validate = ((schema, value, _ctx) => {
|
|
73
|
+
const validator = schema._zod.bag.validator;
|
|
74
|
+
if (validator !== undefined && validator(value) !== COMPILE_INVALID)
|
|
75
|
+
return true;
|
|
76
|
+
return validateFallback(schema, value, _ctx);
|
|
77
|
+
});
|
|
78
|
+
function validateFallback(schema, value, _ctx) {
|
|
79
|
+
const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
|
|
80
|
+
const fallbackRun = schema._zod.bag.fallbackRun;
|
|
81
|
+
let result;
|
|
82
|
+
if (fallbackRun) {
|
|
83
|
+
// skip nested fast paths on the fallback, so user callbacks keep the at-most-twice bound
|
|
84
|
+
ctx[COMPILE_FALLBACK] = true;
|
|
85
|
+
result = fallbackRun({ value, issues: [] }, ctx);
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
result = schema._zod.run({ value, issues: [] }, ctx);
|
|
89
|
+
}
|
|
90
|
+
if (result instanceof Promise) {
|
|
91
|
+
throw new core.$ZodAsyncError();
|
|
92
|
+
}
|
|
93
|
+
return result.issues.length === 0;
|
|
94
|
+
}
|
|
95
|
+
// no fast path: the compiler keeps async parses on the runtime, because a promise-returning callback that is not declared async compiles to a throw
|
|
96
|
+
export const validateAsync = async (schema, value, _ctx) => {
|
|
97
|
+
const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
|
|
98
|
+
let result = schema._zod.run({ value, issues: [] }, ctx);
|
|
99
|
+
if (result instanceof Promise)
|
|
100
|
+
result = await result;
|
|
101
|
+
return result.issues.length === 0;
|
|
102
|
+
};
|
|
103
|
+
export const _encode = (_Err) => {
|
|
104
|
+
const parse = _parse(_Err);
|
|
105
|
+
const fn = (schema, value, _ctx, _params) => {
|
|
106
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
107
|
+
return parse(schema, value, ctx, finalizeParams(fn, _params));
|
|
108
|
+
};
|
|
109
|
+
return fn;
|
|
110
|
+
};
|
|
111
|
+
export const encode = /* @__PURE__*/ _encode(errors.$ZodRealError);
|
|
112
|
+
export const _decode = (_Err) => {
|
|
113
|
+
const parse = _parse(_Err);
|
|
114
|
+
const fn = (schema, value, _ctx, _params) => {
|
|
115
|
+
return parse(schema, value, _ctx, finalizeParams(fn, _params));
|
|
116
|
+
};
|
|
117
|
+
return fn;
|
|
118
|
+
};
|
|
119
|
+
export const decode = /* @__PURE__*/ _decode(errors.$ZodRealError);
|
|
120
|
+
export const _encodeAsync = (_Err) => {
|
|
121
|
+
const parseAsync = _parseAsync(_Err);
|
|
122
|
+
const fn = async (schema, value, _ctx, _params) => {
|
|
123
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
124
|
+
return (await parseAsync(schema, value, ctx, finalizeParams(fn, _params)));
|
|
125
|
+
};
|
|
126
|
+
return fn;
|
|
127
|
+
};
|
|
128
|
+
export const encodeAsync = /* @__PURE__*/ _encodeAsync(errors.$ZodRealError);
|
|
129
|
+
export const _decodeAsync = (_Err) => {
|
|
130
|
+
const parseAsync = _parseAsync(_Err);
|
|
131
|
+
const fn = async (schema, value, _ctx, _params) => {
|
|
132
|
+
return await parseAsync(schema, value, _ctx, finalizeParams(fn, _params));
|
|
133
|
+
};
|
|
134
|
+
return fn;
|
|
135
|
+
};
|
|
136
|
+
export const decodeAsync = /* @__PURE__*/ _decodeAsync(errors.$ZodRealError);
|
|
137
|
+
export const _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
138
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
139
|
+
return _safeParse(_Err)(schema, value, ctx);
|
|
140
|
+
};
|
|
141
|
+
export const safeEncode = /* @__PURE__*/ _safeEncode(errors.$ZodRealError);
|
|
142
|
+
export const _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
143
|
+
return _safeParse(_Err)(schema, value, _ctx);
|
|
144
|
+
};
|
|
145
|
+
export const safeDecode = /* @__PURE__*/ _safeDecode(errors.$ZodRealError);
|
|
146
|
+
export const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
147
|
+
const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
|
|
148
|
+
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
149
|
+
};
|
|
150
|
+
export const safeEncodeAsync = /* @__PURE__*/ _safeEncodeAsync(errors.$ZodRealError);
|
|
151
|
+
export const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
152
|
+
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
153
|
+
};
|
|
154
|
+
export const safeDecodeAsync = /* @__PURE__*/ _safeDecodeAsync(errors.$ZodRealError);
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated CUID v1 is deprecated by its authors due to information leakage
|
|
3
|
+
* (timestamps embedded in the id). Use {@link cuid2} instead.
|
|
4
|
+
* See https://github.com/paralleldrive/cuid.
|
|
5
|
+
*/
|
|
6
|
+
export declare const cuid: RegExp;
|
|
7
|
+
export declare const cuid2: RegExp;
|
|
8
|
+
export declare const ulid: RegExp;
|
|
9
|
+
export declare const xid: RegExp;
|
|
10
|
+
export declare const ksuid: RegExp;
|
|
11
|
+
export declare const nanoid: RegExp;
|
|
12
|
+
export declare function nanoidOfLength(length: number): RegExp;
|
|
13
|
+
/** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */
|
|
14
|
+
export declare const duration: RegExp;
|
|
15
|
+
/** Implements ISO 8601-2 extensions like explicit +- prefixes, mixing weeks with other units, and fractional/negative components. */
|
|
16
|
+
export declare const extendedDuration: RegExp;
|
|
17
|
+
/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */
|
|
18
|
+
export declare const guid: RegExp;
|
|
19
|
+
/** Returns a regex for validating an RFC 9562/4122 UUID.
|
|
20
|
+
*
|
|
21
|
+
* @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */
|
|
22
|
+
export declare const uuid: (version?: number | undefined) => RegExp;
|
|
23
|
+
export declare const uuid4: RegExp;
|
|
24
|
+
export declare const uuid6: RegExp;
|
|
25
|
+
export declare const uuid7: RegExp;
|
|
26
|
+
/** Practical email validation */
|
|
27
|
+
export declare const email: RegExp;
|
|
28
|
+
/** Equivalent to the HTML5 input[type=email] validation implemented by browsers. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email */
|
|
29
|
+
export declare const html5Email: RegExp;
|
|
30
|
+
/** The classic emailregex.com regex for RFC 5322-compliant emails */
|
|
31
|
+
export declare const rfc5322Email: RegExp;
|
|
32
|
+
/** A loose regex that allows Unicode characters, enforces length limits, and that's about it. */
|
|
33
|
+
export declare const unicodeEmail: RegExp;
|
|
34
|
+
export declare const idnEmail: RegExp;
|
|
35
|
+
export declare const browserEmail: RegExp;
|
|
36
|
+
export declare function emoji(): RegExp;
|
|
37
|
+
export declare const ipv4: RegExp;
|
|
38
|
+
export declare const ipv6: RegExp;
|
|
39
|
+
export declare const mac: (delimiter?: string) => RegExp;
|
|
40
|
+
export declare const cidrv4: RegExp;
|
|
41
|
+
export declare const cidrv6: RegExp;
|
|
42
|
+
export declare const base64: RegExp;
|
|
43
|
+
export declare const base64url: RegExp;
|
|
44
|
+
export declare const hostname: RegExp;
|
|
45
|
+
export declare const domain: RegExp;
|
|
46
|
+
export declare const httpProtocol: RegExp;
|
|
47
|
+
export declare const e164: RegExp;
|
|
48
|
+
export declare const creditCard: RegExp;
|
|
49
|
+
export declare const date: RegExp;
|
|
50
|
+
export declare function time(args: {
|
|
51
|
+
precision?: number | null;
|
|
52
|
+
}): RegExp;
|
|
53
|
+
export declare function datetime(args: {
|
|
54
|
+
precision?: number | null;
|
|
55
|
+
offset?: boolean;
|
|
56
|
+
local?: boolean;
|
|
57
|
+
}): RegExp;
|
|
58
|
+
export declare const string: (params?: {
|
|
59
|
+
minimum?: number | undefined;
|
|
60
|
+
maximum?: number | undefined;
|
|
61
|
+
}) => RegExp;
|
|
62
|
+
export declare const bigint: RegExp;
|
|
63
|
+
export declare const integer: RegExp;
|
|
64
|
+
export declare const number: RegExp;
|
|
65
|
+
export declare const boolean: RegExp;
|
|
66
|
+
declare const _null: RegExp;
|
|
67
|
+
export { _null as null };
|
|
68
|
+
declare const _undefined: RegExp;
|
|
69
|
+
export { _undefined as undefined };
|
|
70
|
+
export declare const lowercase: RegExp;
|
|
71
|
+
export declare const uppercase: RegExp;
|
|
72
|
+
export declare const hex: RegExp;
|
|
73
|
+
export declare const md5_hex: RegExp;
|
|
74
|
+
export declare const md5_base64: RegExp;
|
|
75
|
+
export declare const md5_base64url: RegExp;
|
|
76
|
+
export declare const sha1_hex: RegExp;
|
|
77
|
+
export declare const sha1_base64: RegExp;
|
|
78
|
+
export declare const sha1_base64url: RegExp;
|
|
79
|
+
export declare const sha256_hex: RegExp;
|
|
80
|
+
export declare const sha256_base64: RegExp;
|
|
81
|
+
export declare const sha256_base64url: RegExp;
|
|
82
|
+
export declare const sha384_hex: RegExp;
|
|
83
|
+
export declare const sha384_base64: RegExp;
|
|
84
|
+
export declare const sha384_base64url: RegExp;
|
|
85
|
+
export declare const sha512_hex: RegExp;
|
|
86
|
+
export declare const sha512_base64: RegExp;
|
|
87
|
+
export declare const sha512_base64url: RegExp;
|