@openclaw/firecrawl-plugin 2026.9.4 → 2026.9.6
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/assets/activity.svg +31 -0
- package/assets/icon.png +0 -0
- package/dist/{firecrawl-client-BPFpIblh.js → .setup/firecrawl-client-hBjAoE8s.mjs} +25 -26
- package/dist/{firecrawl-fetch-provider-CIpxLKLq.js → .setup/firecrawl-fetch-provider-DH8FdBjV.mjs} +1 -1
- package/dist/{firecrawl-search-provider-80szkO8A.js → .setup/firecrawl-search-provider-8H0Cu9l0.mjs} +1 -1
- package/dist/api.js +1 -1
- package/dist/index.js +3 -3
- package/dist/web-fetch-contract-api.js +1 -1
- package/dist/web-fetch-provider.js +1 -1
- package/dist/web-search-contract-api.js +1 -1
- package/dist/web-search-provider.js +1 -1
- package/node_modules/typebox/build/compile/validator.d.mts +1 -1
- package/node_modules/typebox/build/compile/validator.mjs +1 -1
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +7 -5
- package/node_modules/typebox/build/format/iri.mjs +5 -1
- package/node_modules/typebox/build/guard/emit.mjs +2 -4
- package/node_modules/typebox/build/guard/guard.mjs +6 -18
- package/node_modules/typebox/build/guard/string.mjs +16 -24
- package/node_modules/typebox/build/schema/build.mjs +2 -2
- package/node_modules/typebox/build/schema/check.mjs +1 -1
- package/node_modules/typebox/build/schema/compile.d.mts +3 -2
- package/node_modules/typebox/build/schema/compile.mjs +8 -8
- package/node_modules/typebox/build/schema/engine/_context.d.mts +6 -7
- package/node_modules/typebox/build/schema/engine/_context.mjs +23 -15
- package/node_modules/typebox/build/schema/engine/_functions.d.mts +2 -2
- package/node_modules/typebox/build/schema/engine/_functions.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/_reducer.d.mts +3 -3
- package/node_modules/typebox/build/schema/engine/_refine.d.mts +5 -5
- package/node_modules/typebox/build/schema/engine/_refine.mjs +4 -7
- package/node_modules/typebox/build/schema/engine/_stack.d.mts +34 -16
- package/node_modules/typebox/build/schema/engine/_stack.mjs +148 -104
- package/node_modules/typebox/build/schema/engine/additionalItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +8 -8
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +26 -18
- package/node_modules/typebox/build/schema/engine/allOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/allOf.mjs +3 -3
- package/node_modules/typebox/build/schema/engine/anyOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/anyOf.mjs +5 -10
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/boolean.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/const.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/const.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/contains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/contains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/dependencies.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +3 -6
- package/node_modules/typebox/build/schema/engine/dependentRequired.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dependentRequired.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/dependentSchemas.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +11 -7
- package/node_modules/typebox/build/schema/engine/enum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/enum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/format.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/format.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/if.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/if.mjs +7 -15
- package/node_modules/typebox/build/schema/engine/items.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/items.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/maxContains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxItems.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxLength.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxLength.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maxProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maxProperties.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/maximum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/maximum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minContains.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minContains.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minItems.d.mts +5 -5
- package/node_modules/typebox/build/schema/engine/minItems.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minLength.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minLength.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minProperties.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/minimum.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/minimum.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/multipleOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/multipleOf.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/not.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/not.mjs +4 -8
- package/node_modules/typebox/build/schema/engine/oneOf.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +6 -11
- package/node_modules/typebox/build/schema/engine/pattern.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/pattern.mjs +3 -7
- package/node_modules/typebox/build/schema/engine/patternProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/prefixItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/prefixItems.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/properties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/properties.mjs +1 -1
- package/node_modules/typebox/build/schema/engine/propertyNames.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +4 -10
- package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +11 -7
- package/node_modules/typebox/build/schema/engine/ref.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/ref.mjs +19 -15
- package/node_modules/typebox/build/schema/engine/required.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/required.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/schema.d.mts +7 -7
- package/node_modules/typebox/build/schema/engine/schema.mjs +137 -133
- package/node_modules/typebox/build/schema/engine/type.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/type.mjs +2 -6
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +5 -9
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +5 -9
- package/node_modules/typebox/build/schema/engine/uniqueItems.d.mts +4 -4
- package/node_modules/typebox/build/schema/engine/uniqueItems.mjs +2 -6
- package/node_modules/typebox/build/schema/errors.d.mts +2 -2
- package/node_modules/typebox/build/schema/errors.mjs +8 -14
- package/node_modules/typebox/build/schema/intern/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/intern/index.mjs +1 -0
- package/node_modules/typebox/build/schema/intern/intern.d.mts +11 -0
- package/node_modules/typebox/build/schema/intern/intern.mjs +293 -0
- package/node_modules/typebox/build/schema/meta/draft_2019_09.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_2019_09.mjs +288 -0
- package/node_modules/typebox/build/schema/meta/draft_2020_12.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_2020_12.mjs +300 -0
- package/node_modules/typebox/build/schema/meta/draft_3.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_3.mjs +143 -0
- package/node_modules/typebox/build/schema/meta/draft_4.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_4.mjs +149 -0
- package/node_modules/typebox/build/schema/meta/draft_6.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_6.mjs +155 -0
- package/node_modules/typebox/build/schema/meta/draft_7.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/draft_7.mjs +172 -0
- package/node_modules/typebox/build/schema/meta/index.d.mts +2 -0
- package/node_modules/typebox/build/schema/meta/index.mjs +2 -0
- package/node_modules/typebox/build/schema/meta/meta.d.mts +9 -0
- package/node_modules/typebox/build/schema/meta/meta.mjs +15 -0
- package/node_modules/typebox/build/schema/meta/schema.d.mts +6 -0
- package/node_modules/typebox/build/schema/meta/schema.mjs +1 -0
- package/node_modules/typebox/build/schema/parse.d.mts +1 -0
- package/node_modules/typebox/build/schema/parse.mjs +10 -5
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +8 -3
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +268 -139
- package/node_modules/typebox/build/schema/schema.d.mts +2 -0
- package/node_modules/typebox/build/schema/schema.mjs +2 -0
- package/node_modules/typebox/build/value/errors/errors.d.mts +2 -12
- package/node_modules/typebox/build/value/errors/errors.mjs +2 -7
- package/node_modules/typebox/package.json +1 -1
- package/node_modules/typebox/readme.md +59 -89
- package/node_modules/zod/README.md +29 -2
- package/node_modules/zod/compile.cjs +96 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +21 -2
- package/node_modules/zod/index.d.cts +1 -2
- package/node_modules/zod/index.d.ts +1 -2
- package/node_modules/zod/index.js +5 -2
- package/node_modules/zod/locales/index.cjs +19 -0
- package/node_modules/zod/mini/index.cjs +19 -0
- package/node_modules/zod/package.json +20 -8
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +5 -2
- package/node_modules/zod/src/v3/ZodError.ts +22 -12
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
- package/node_modules/zod/src/v3/tests/object.test.ts +3 -6
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/string.test.ts +6 -0
- package/node_modules/zod/src/v3/types.ts +5 -5
- package/node_modules/zod/src/v4/classic/checks.ts +1 -0
- package/node_modules/zod/src/v4/classic/compat.ts +26 -18
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +59 -44
- package/node_modules/zod/src/v4/classic/external.ts +14 -9
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +363 -78
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +2 -2
- package/node_modules/zod/src/v4/classic/iso.ts +2 -72
- package/node_modules/zod/src/v4/classic/parse.ts +10 -4
- package/node_modules/zod/src/v4/classic/schemas.ts +640 -375
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +2 -2
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +186 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +278 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +2 -1
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +3 -3
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +30 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +32 -18
- package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
- package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +31 -7
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +261 -13
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +112 -2
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +403 -6
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +582 -10
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +2 -9
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +1 -2
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +21 -2
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +67 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +136 -0
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +3 -10
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +12 -1
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +12 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +85 -9
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +301 -12
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +49 -16
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +51 -4
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +70 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +20 -2
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +186 -18
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +79 -3
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +9 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +19 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +222 -6
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +18 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +44 -3
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1812 -204
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +45 -30
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +39 -2
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +87 -35
- package/node_modules/zod/src/v4/core/checks.ts +119 -146
- package/node_modules/zod/src/v4/core/compile.ts +2313 -0
- package/node_modules/zod/src/v4/core/core.ts +99 -22
- package/node_modules/zod/src/v4/core/doc.ts +17 -9
- package/node_modules/zod/src/v4/core/errors.ts +113 -25
- package/node_modules/zod/src/v4/core/index.ts +3 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +8 -3
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +424 -156
- package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
- package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
- package/node_modules/zod/src/v4/core/parse.ts +164 -50
- package/node_modules/zod/src/v4/core/regexes.ts +42 -15
- package/node_modules/zod/src/v4/core/registries.ts +2 -2
- package/node_modules/zod/src/v4/core/schemas.ts +1000 -538
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
- package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
- package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +1 -2
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +3 -3
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +283 -48
- package/node_modules/zod/src/v4/core/util.ts +454 -157
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/index.ts +3 -3
- package/node_modules/zod/src/v4/locales/ar.ts +5 -0
- package/node_modules/zod/src/v4/locales/az.ts +5 -0
- package/node_modules/zod/src/v4/locales/be.ts +12 -0
- package/node_modules/zod/src/v4/locales/bg.ts +5 -0
- package/node_modules/zod/src/v4/locales/bn.ts +123 -0
- package/node_modules/zod/src/v4/locales/ca.ts +5 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
- package/node_modules/zod/src/v4/locales/cs.ts +5 -0
- package/node_modules/zod/src/v4/locales/da.ts +7 -2
- package/node_modules/zod/src/v4/locales/de.ts +5 -0
- package/node_modules/zod/src/v4/locales/el.ts +3 -0
- package/node_modules/zod/src/v4/locales/en.ts +17 -4
- package/node_modules/zod/src/v4/locales/eo.ts +5 -0
- package/node_modules/zod/src/v4/locales/es.ts +4 -0
- package/node_modules/zod/src/v4/locales/fa.ts +5 -0
- package/node_modules/zod/src/v4/locales/fi.ts +5 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +5 -0
- package/node_modules/zod/src/v4/locales/fr.ts +21 -14
- package/node_modules/zod/src/v4/locales/gu.ts +123 -0
- package/node_modules/zod/src/v4/locales/he.ts +8 -1
- package/node_modules/zod/src/v4/locales/hi.ts +126 -0
- package/node_modules/zod/src/v4/locales/hr.ts +4 -0
- package/node_modules/zod/src/v4/locales/hu.ts +5 -0
- package/node_modules/zod/src/v4/locales/hy.ts +11 -0
- package/node_modules/zod/src/v4/locales/id.ts +5 -0
- package/node_modules/zod/src/v4/locales/index.ts +11 -0
- package/node_modules/zod/src/v4/locales/is.ts +5 -0
- package/node_modules/zod/src/v4/locales/it.ts +5 -0
- package/node_modules/zod/src/v4/locales/ja.ts +5 -0
- package/node_modules/zod/src/v4/locales/ka.ts +5 -0
- package/node_modules/zod/src/v4/locales/km.ts +5 -0
- package/node_modules/zod/src/v4/locales/kn.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +5 -0
- package/node_modules/zod/src/v4/locales/lt.ts +4 -0
- package/node_modules/zod/src/v4/locales/mk.ts +5 -0
- package/node_modules/zod/src/v4/locales/ms.ts +5 -0
- package/node_modules/zod/src/v4/locales/ne.ts +128 -0
- package/node_modules/zod/src/v4/locales/nl.ts +5 -0
- package/node_modules/zod/src/v4/locales/nn.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +7 -2
- package/node_modules/zod/src/v4/locales/ota.ts +5 -0
- package/node_modules/zod/src/v4/locales/pl.ts +5 -0
- package/node_modules/zod/src/v4/locales/ps.ts +5 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
- package/node_modules/zod/src/v4/locales/pt.ts +101 -58
- package/node_modules/zod/src/v4/locales/ro.ts +3 -0
- package/node_modules/zod/src/v4/locales/ru.ts +12 -0
- package/node_modules/zod/src/v4/locales/sk.ts +123 -0
- package/node_modules/zod/src/v4/locales/sl.ts +5 -0
- package/node_modules/zod/src/v4/locales/sv.ts +7 -2
- package/node_modules/zod/src/v4/locales/ta.ts +5 -0
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +5 -0
- package/node_modules/zod/src/v4/locales/tk.ts +113 -0
- package/node_modules/zod/src/v4/locales/tr.ts +5 -0
- package/node_modules/zod/src/v4/locales/uk.ts +5 -0
- package/node_modules/zod/src/v4/locales/ur.ts +5 -0
- package/node_modules/zod/src/v4/locales/uz.ts +3 -0
- package/node_modules/zod/src/v4/locales/vi.ts +5 -0
- package/node_modules/zod/src/v4/locales/yo.ts +5 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +5 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +5 -0
- package/node_modules/zod/src/v4/mini/checks.ts +1 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +12 -1
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/parse.ts +2 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +167 -63
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +33 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +62 -1
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +35 -1
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +11 -17
- package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
- package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +23 -4
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +9 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +158 -5
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +65 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +16 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +44 -0
- package/node_modules/zod/v3/ZodError.cjs +41 -12
- package/node_modules/zod/v3/ZodError.d.cts +1 -1
- package/node_modules/zod/v3/ZodError.d.ts +1 -1
- package/node_modules/zod/v3/ZodError.js +22 -12
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +26 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +21 -1
- package/node_modules/zod/v4/classic/checks.d.cts +1 -1
- package/node_modules/zod/v4/classic/checks.d.ts +1 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.d.cts +9 -11
- package/node_modules/zod/v4/classic/compat.d.ts +9 -11
- package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +62 -34
- package/node_modules/zod/v4/classic/errors.d.cts +3 -4
- package/node_modules/zod/v4/classic/errors.d.ts +3 -4
- package/node_modules/zod/v4/classic/errors.js +43 -34
- package/node_modules/zod/v4/classic/external.cjs +51 -27
- package/node_modules/zod/v4/classic/external.d.cts +5 -2
- package/node_modules/zod/v4/classic/external.d.ts +5 -2
- package/node_modules/zod/v4/classic/external.js +5 -8
- package/node_modules/zod/v4/classic/from-json-schema.cjs +376 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +357 -75
- package/node_modules/zod/v4/classic/in-out.cjs +82 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +21 -2
- package/node_modules/zod/v4/classic/index.d.cts +1 -2
- package/node_modules/zod/v4/classic/index.d.ts +1 -2
- package/node_modules/zod/v4/classic/index.js +2 -2
- package/node_modules/zod/v4/classic/iso.cjs +30 -22
- package/node_modules/zod/v4/classic/iso.d.cts +2 -17
- package/node_modules/zod/v4/classic/iso.d.ts +2 -17
- package/node_modules/zod/v4/classic/iso.js +2 -17
- package/node_modules/zod/v4/classic/parse.cjs +23 -1
- package/node_modules/zod/v4/classic/parse.d.cts +17 -4
- package/node_modules/zod/v4/classic/parse.d.ts +17 -4
- package/node_modules/zod/v4/classic/parse.js +1 -0
- package/node_modules/zod/v4/classic/schemas.cjs +591 -426
- package/node_modules/zod/v4/classic/schemas.d.cts +68 -19
- package/node_modules/zod/v4/classic/schemas.d.ts +68 -19
- package/node_modules/zod/v4/classic/schemas.js +564 -424
- package/node_modules/zod/v4/core/api.cjs +66 -24
- package/node_modules/zod/v4/core/api.d.cts +22 -12
- package/node_modules/zod/v4/core/api.d.ts +22 -12
- package/node_modules/zod/v4/core/api.js +44 -24
- package/node_modules/zod/v4/core/checks.cjs +88 -128
- package/node_modules/zod/v4/core/checks.d.cts +29 -13
- package/node_modules/zod/v4/core/checks.d.ts +29 -13
- package/node_modules/zod/v4/core/checks.js +68 -127
- package/node_modules/zod/v4/core/compile.cjs +1908 -0
- package/node_modules/zod/v4/core/compile.d.cts +65 -0
- package/node_modules/zod/v4/core/compile.d.ts +65 -0
- package/node_modules/zod/v4/core/compile.js +1858 -0
- package/node_modules/zod/v4/core/core.cjs +101 -19
- package/node_modules/zod/v4/core/core.d.cts +16 -4
- package/node_modules/zod/v4/core/core.d.ts +16 -4
- package/node_modules/zod/v4/core/core.js +83 -20
- package/node_modules/zod/v4/core/doc.cjs +31 -9
- package/node_modules/zod/v4/core/doc.d.cts +3 -1
- package/node_modules/zod/v4/core/doc.d.ts +3 -1
- package/node_modules/zod/v4/core/doc.js +12 -9
- package/node_modules/zod/v4/core/errors.cjs +126 -25
- package/node_modules/zod/v4/core/errors.d.cts +4 -0
- package/node_modules/zod/v4/core/errors.d.ts +4 -0
- package/node_modules/zod/v4/core/errors.js +107 -25
- package/node_modules/zod/v4/core/index.cjs +24 -1
- package/node_modules/zod/v4/core/index.d.cts +3 -0
- package/node_modules/zod/v4/core/index.d.ts +3 -0
- package/node_modules/zod/v4/core/index.js +3 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +24 -1
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +2 -2
- package/node_modules/zod/v4/core/json-schema-generator.js +6 -2
- package/node_modules/zod/v4/core/json-schema-processors.cjs +441 -156
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +16 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +400 -158
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +2 -1
- package/node_modules/zod/v4/core/json-schema.d.ts +2 -1
- package/node_modules/zod/v4/core/memoizer.cjs +360 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +311 -0
- package/node_modules/zod/v4/core/parse.cjs +148 -46
- package/node_modules/zod/v4/core/parse.d.cts +14 -11
- package/node_modules/zod/v4/core/parse.d.ts +14 -11
- package/node_modules/zod/v4/core/parse.js +127 -45
- package/node_modules/zod/v4/core/regexes.cjs +54 -17
- package/node_modules/zod/v4/core/regexes.d.cts +5 -0
- package/node_modules/zod/v4/core/regexes.d.ts +5 -0
- package/node_modules/zod/v4/core/regexes.js +32 -15
- package/node_modules/zod/v4/core/registries.cjs +19 -0
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +785 -386
- package/node_modules/zod/v4/core/schemas.d.cts +123 -34
- package/node_modules/zod/v4/core/schemas.d.ts +123 -34
- package/node_modules/zod/v4/core/schemas.js +753 -386
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +269 -45
- package/node_modules/zod/v4/core/to-json-schema.d.cts +45 -5
- package/node_modules/zod/v4/core/to-json-schema.d.ts +45 -5
- package/node_modules/zod/v4/core/to-json-schema.js +247 -44
- package/node_modules/zod/v4/core/util.cjs +372 -157
- package/node_modules/zod/v4/core/util.d.cts +79 -1
- package/node_modules/zod/v4/core/util.d.ts +79 -1
- package/node_modules/zod/v4/core/util.js +341 -156
- package/node_modules/zod/v4/core/versions.cjs +21 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +214 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +34 -5
- package/node_modules/zod/v4/index.d.cts +2 -2
- package/node_modules/zod/v4/index.d.ts +2 -2
- package/node_modules/zod/v4/index.js +3 -2
- package/node_modules/zod/v4/locales/ar.cjs +5 -0
- package/node_modules/zod/v4/locales/ar.js +5 -0
- package/node_modules/zod/v4/locales/az.cjs +5 -0
- package/node_modules/zod/v4/locales/az.js +5 -0
- package/node_modules/zod/v4/locales/be.cjs +12 -0
- package/node_modules/zod/v4/locales/be.js +12 -0
- package/node_modules/zod/v4/locales/bg.cjs +5 -0
- package/node_modules/zod/v4/locales/bg.js +5 -0
- package/node_modules/zod/v4/locales/bn.cjs +140 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +113 -0
- package/node_modules/zod/v4/locales/ca.cjs +5 -0
- package/node_modules/zod/v4/locales/ca.js +5 -0
- package/node_modules/zod/v4/locales/ckb.cjs +160 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +133 -0
- package/node_modules/zod/v4/locales/cs.cjs +5 -0
- package/node_modules/zod/v4/locales/cs.js +5 -0
- package/node_modules/zod/v4/locales/da.cjs +7 -2
- package/node_modules/zod/v4/locales/da.js +7 -2
- package/node_modules/zod/v4/locales/de.cjs +5 -0
- package/node_modules/zod/v4/locales/de.js +5 -0
- package/node_modules/zod/v4/locales/el.cjs +3 -0
- package/node_modules/zod/v4/locales/el.js +3 -0
- package/node_modules/zod/v4/locales/en.cjs +16 -4
- package/node_modules/zod/v4/locales/en.js +16 -4
- package/node_modules/zod/v4/locales/eo.cjs +5 -0
- package/node_modules/zod/v4/locales/eo.js +5 -0
- package/node_modules/zod/v4/locales/es.cjs +4 -0
- package/node_modules/zod/v4/locales/es.js +4 -0
- package/node_modules/zod/v4/locales/fa.cjs +5 -0
- package/node_modules/zod/v4/locales/fa.js +5 -0
- package/node_modules/zod/v4/locales/fi.cjs +5 -0
- package/node_modules/zod/v4/locales/fi.js +5 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +5 -0
- package/node_modules/zod/v4/locales/fr-CA.js +5 -0
- package/node_modules/zod/v4/locales/fr.cjs +18 -14
- package/node_modules/zod/v4/locales/fr.js +18 -14
- package/node_modules/zod/v4/locales/gu.cjs +140 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +113 -0
- package/node_modules/zod/v4/locales/he.cjs +7 -0
- package/node_modules/zod/v4/locales/he.js +7 -0
- package/node_modules/zod/v4/locales/hi.cjs +138 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +111 -0
- package/node_modules/zod/v4/locales/hr.cjs +4 -0
- package/node_modules/zod/v4/locales/hr.js +4 -0
- package/node_modules/zod/v4/locales/hu.cjs +5 -0
- package/node_modules/zod/v4/locales/hu.js +5 -0
- package/node_modules/zod/v4/locales/hy.cjs +11 -0
- package/node_modules/zod/v4/locales/hy.js +11 -0
- package/node_modules/zod/v4/locales/id.cjs +5 -0
- package/node_modules/zod/v4/locales/id.js +5 -0
- package/node_modules/zod/v4/locales/index.cjs +43 -2
- package/node_modules/zod/v4/locales/index.d.cts +11 -0
- package/node_modules/zod/v4/locales/index.d.ts +11 -0
- package/node_modules/zod/v4/locales/index.js +11 -0
- package/node_modules/zod/v4/locales/is.cjs +5 -0
- package/node_modules/zod/v4/locales/is.js +5 -0
- package/node_modules/zod/v4/locales/it.cjs +5 -0
- package/node_modules/zod/v4/locales/it.js +5 -0
- package/node_modules/zod/v4/locales/ja.cjs +5 -0
- package/node_modules/zod/v4/locales/ja.js +5 -0
- package/node_modules/zod/v4/locales/ka.cjs +5 -0
- package/node_modules/zod/v4/locales/ka.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +5 -0
- package/node_modules/zod/v4/locales/km.js +5 -0
- package/node_modules/zod/v4/locales/kn.cjs +143 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +116 -0
- package/node_modules/zod/v4/locales/ko.cjs +5 -0
- package/node_modules/zod/v4/locales/ko.js +5 -0
- package/node_modules/zod/v4/locales/lt.cjs +4 -0
- package/node_modules/zod/v4/locales/lt.js +4 -0
- package/node_modules/zod/v4/locales/mk.cjs +5 -0
- package/node_modules/zod/v4/locales/mk.js +5 -0
- package/node_modules/zod/v4/locales/ms.cjs +5 -0
- package/node_modules/zod/v4/locales/ms.js +5 -0
- package/node_modules/zod/v4/locales/ne.cjs +138 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +111 -0
- package/node_modules/zod/v4/locales/nl.cjs +5 -0
- package/node_modules/zod/v4/locales/nl.js +5 -0
- package/node_modules/zod/v4/locales/nn.cjs +140 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +113 -0
- package/node_modules/zod/v4/locales/no.cjs +7 -2
- package/node_modules/zod/v4/locales/no.js +7 -2
- package/node_modules/zod/v4/locales/ota.cjs +5 -0
- package/node_modules/zod/v4/locales/ota.js +5 -0
- package/node_modules/zod/v4/locales/pl.cjs +5 -0
- package/node_modules/zod/v4/locales/pl.js +5 -0
- package/node_modules/zod/v4/locales/ps.cjs +5 -0
- package/node_modules/zod/v4/locales/ps.js +5 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +143 -0
- package/node_modules/zod/v4/locales/pt.cjs +89 -55
- package/node_modules/zod/v4/locales/pt.js +89 -55
- package/node_modules/zod/v4/locales/ro.cjs +3 -0
- package/node_modules/zod/v4/locales/ro.js +3 -0
- package/node_modules/zod/v4/locales/ru.cjs +12 -0
- package/node_modules/zod/v4/locales/ru.js +12 -0
- package/node_modules/zod/v4/locales/sk.cjs +143 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +116 -0
- package/node_modules/zod/v4/locales/sl.cjs +5 -0
- package/node_modules/zod/v4/locales/sl.js +5 -0
- package/node_modules/zod/v4/locales/sv.cjs +7 -2
- package/node_modules/zod/v4/locales/sv.js +7 -2
- package/node_modules/zod/v4/locales/ta.cjs +5 -0
- package/node_modules/zod/v4/locales/ta.js +5 -0
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +5 -0
- package/node_modules/zod/v4/locales/th.js +5 -0
- package/node_modules/zod/v4/locales/tk.cjs +134 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +107 -0
- package/node_modules/zod/v4/locales/tr.cjs +5 -0
- package/node_modules/zod/v4/locales/tr.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +5 -0
- package/node_modules/zod/v4/locales/uk.js +5 -0
- package/node_modules/zod/v4/locales/ur.cjs +5 -0
- package/node_modules/zod/v4/locales/ur.js +5 -0
- package/node_modules/zod/v4/locales/uz.cjs +3 -0
- package/node_modules/zod/v4/locales/uz.js +3 -0
- package/node_modules/zod/v4/locales/vi.cjs +5 -0
- package/node_modules/zod/v4/locales/vi.js +5 -0
- package/node_modules/zod/v4/locales/yo.cjs +5 -0
- package/node_modules/zod/v4/locales/yo.js +5 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +5 -0
- package/node_modules/zod/v4/locales/zh-CN.js +5 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +5 -0
- package/node_modules/zod/v4/locales/zh-TW.js +5 -0
- package/node_modules/zod/v4/mini/checks.cjs +21 -1
- package/node_modules/zod/v4/mini/checks.d.cts +1 -1
- package/node_modules/zod/v4/mini/checks.d.ts +1 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/coerce.cjs +19 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +33 -1
- package/node_modules/zod/v4/mini/external.d.cts +5 -2
- package/node_modules/zod/v4/mini/external.d.ts +5 -2
- package/node_modules/zod/v4/mini/external.js +3 -1
- package/node_modules/zod/v4/mini/in-out.cjs +82 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +19 -0
- package/node_modules/zod/v4/mini/parse.cjs +22 -1
- package/node_modules/zod/v4/mini/parse.d.cts +1 -1
- package/node_modules/zod/v4/mini/parse.d.ts +1 -1
- package/node_modules/zod/v4/mini/parse.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +117 -53
- package/node_modules/zod/v4/mini/schemas.d.cts +49 -14
- package/node_modules/zod/v4/mini/schemas.d.ts +49 -14
- package/node_modules/zod/v4/mini/schemas.js +92 -51
- package/node_modules/zod/v4-mini/index.cjs +19 -0
- package/openclaw.plugin.json +15 -1
- package/package.json +9 -7
- package/node_modules/zod/src/v4/core/config.ts +0 -15
|
@@ -22,9 +22,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
25
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
27
|
-
exports.stringbool = exports.meta = exports.describe = exports.ZodCustom = exports.ZodFunction = exports.ZodPromise = exports.ZodLazy = exports.ZodTemplateLiteral = exports.ZodReadonly = exports.ZodPreprocess = exports.ZodCodec = exports.ZodPipe = exports.ZodNaN = exports.ZodCatch = exports.ZodSuccess = exports.ZodNonOptional = exports.ZodPrefault = exports.ZodDefault = exports.ZodNullable = exports.ZodExactOptional = exports.ZodOptional = exports.ZodTransform = exports.ZodFile = void 0;
|
|
29
|
+
exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodXor = exports.ZodUnion = exports.ZodObject = exports.ZodArray = exports.ZodDate = exports.ZodVoid = exports.ZodNever = exports.ZodUnknown = exports.ZodAny = exports.ZodNull = exports.ZodUndefined = exports.ZodSymbol = exports.ZodBigIntFormat = exports.ZodBigInt = exports.ZodBoolean = exports.ZodNumberFormat = exports.ZodNumber = exports.ZodCustomStringFormat = exports.ZodJWT = exports.ZodIBAN = exports.ZodCreditCard = exports.ZodE164 = exports.ZodBase64URL = exports.ZodBase64 = exports.ZodCIDRv6 = exports.ZodCIDRv4 = exports.ZodIPv6 = exports.ZodMAC = exports.ZodIPv4 = exports.ZodKSUID = exports.ZodXID = exports.ZodULID = exports.ZodCUID2 = exports.ZodCUID = exports.ZodNanoID = exports.ZodEmoji = exports.ZodURL = exports.ZodUUID = exports.ZodGUID = exports.ZodEmail = exports.ZodISODuration = exports.ZodISOTime = exports.ZodISODate = exports.ZodISODateTime = exports.ZodStringFormat = exports.ZodString = exports._ZodString = exports.ZodType = void 0;
|
|
30
|
+
exports.stringbool = exports.ZodInstanceOf = exports.meta = exports.describe = exports.ZodCustom = exports.ZodFunction = exports.ZodPromise = exports.ZodLazy = exports.ZodTemplateLiteral = exports.ZodReadonly = exports.ZodPreprocess = exports.ZodCodec = exports.ZodPipe = exports.ZodNaN = exports.ZodCatch = exports.ZodSuccess = exports.ZodNonOptional = exports.ZodPrefault = exports.ZodDefault = exports.ZodNullable = exports.ZodExactOptional = exports.ZodOptional = exports.ZodTransform = exports.ZodFile = exports.ZodLiteral = exports.ZodEnum = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = void 0;
|
|
28
31
|
exports.string = string;
|
|
29
32
|
exports.email = email;
|
|
30
33
|
exports.guid = guid;
|
|
@@ -49,10 +52,13 @@ exports.cidrv6 = cidrv6;
|
|
|
49
52
|
exports.base64 = base64;
|
|
50
53
|
exports.base64url = base64url;
|
|
51
54
|
exports.e164 = e164;
|
|
55
|
+
exports.creditCard = creditCard;
|
|
56
|
+
exports.iban = iban;
|
|
52
57
|
exports.jwt = jwt;
|
|
53
58
|
exports.stringFormat = stringFormat;
|
|
54
59
|
exports.hostname = hostname;
|
|
55
60
|
exports.hex = hex;
|
|
61
|
+
exports.currencyCode = currencyCode;
|
|
56
62
|
exports.hash = hash;
|
|
57
63
|
exports.number = number;
|
|
58
64
|
exports.int = int;
|
|
@@ -123,290 +129,336 @@ exports.preprocess = preprocess;
|
|
|
123
129
|
const core = __importStar(require("../core/index.cjs"));
|
|
124
130
|
const index_js_1 = require("../core/index.cjs");
|
|
125
131
|
const processors = __importStar(require("../core/json-schema-processors.cjs"));
|
|
132
|
+
const regexes = __importStar(require("../core/regexes.cjs"));
|
|
126
133
|
const to_json_schema_js_1 = require("../core/to-json-schema.cjs");
|
|
134
|
+
const en_js_1 = __importDefault(require("../locales/en.cjs"));
|
|
127
135
|
const checks = __importStar(require("./checks.cjs"));
|
|
128
|
-
const iso = __importStar(require("./iso.cjs"));
|
|
129
136
|
const parse = __importStar(require("./parse.cjs"));
|
|
130
|
-
//
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
//
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
//
|
|
140
|
-
// One install per (prototype, group), memoized by `_installedGroups`.
|
|
141
|
-
const _installedGroups = /* @__PURE__ */ new WeakMap();
|
|
142
|
-
function _installLazyMethods(inst, group, methods) {
|
|
143
|
-
const proto = Object.getPrototypeOf(inst);
|
|
144
|
-
let installed = _installedGroups.get(proto);
|
|
145
|
-
if (!installed) {
|
|
146
|
-
installed = new Set();
|
|
147
|
-
_installedGroups.set(proto, installed);
|
|
148
|
-
}
|
|
149
|
-
if (installed.has(group))
|
|
150
|
-
return;
|
|
151
|
-
installed.add(group);
|
|
152
|
-
for (const key in methods) {
|
|
153
|
-
const fn = methods[key];
|
|
154
|
-
Object.defineProperty(proto, key, {
|
|
155
|
-
configurable: true,
|
|
156
|
-
enumerable: false,
|
|
157
|
-
get() {
|
|
158
|
-
const bound = fn.bind(this);
|
|
159
|
-
Object.defineProperty(this, key, {
|
|
160
|
-
configurable: true,
|
|
161
|
-
writable: true,
|
|
162
|
-
enumerable: true,
|
|
163
|
-
value: bound,
|
|
164
|
-
});
|
|
165
|
-
return bound;
|
|
166
|
-
},
|
|
167
|
-
set(v) {
|
|
168
|
-
Object.defineProperty(this, key, {
|
|
169
|
-
configurable: true,
|
|
170
|
-
writable: true,
|
|
171
|
-
enumerable: true,
|
|
172
|
-
value: v,
|
|
173
|
-
});
|
|
174
|
-
},
|
|
175
|
-
});
|
|
176
|
-
}
|
|
137
|
+
// Register English as the default locale on first ZodType construction. Hooked into the `ZodType` `$constructor` (rather than a top-level `config(en())` in `external.ts`) so bundlers honoring `sideEffects: false` can't tree-shake it out — see #5953, #5725. An explicit `z.config(z.locales.xx())` call wins regardless of order, since this only sets the default when none is present.
|
|
138
|
+
function _ensureDefaultLocale() {
|
|
139
|
+
if (!core.globalConfig.localeError)
|
|
140
|
+
core.config((0, en_js_1.default)());
|
|
141
|
+
}
|
|
142
|
+
// the default memoizer is read by the core container init, which runs before `ZodType.init`, so each container calls this first
|
|
143
|
+
function _ensureDefaultMemoizer() {
|
|
144
|
+
if (!core.globalConfig.memoizer)
|
|
145
|
+
core.config({ memoizer: core.memoizer() });
|
|
177
146
|
}
|
|
178
147
|
exports.ZodType = core.$constructor("ZodType", (inst, def) => {
|
|
148
|
+
_ensureDefaultLocale();
|
|
179
149
|
core.$ZodType.init(inst, def);
|
|
180
|
-
Object.assign(inst["~standard"], {
|
|
181
|
-
jsonSchema: {
|
|
182
|
-
input: (0, to_json_schema_js_1.createStandardJSONSchemaMethod)(inst, "input"),
|
|
183
|
-
output: (0, to_json_schema_js_1.createStandardJSONSchemaMethod)(inst, "output"),
|
|
184
|
-
},
|
|
185
|
-
});
|
|
186
|
-
inst.toJSONSchema = (0, to_json_schema_js_1.createToJSONSchemaMethod)(inst, {});
|
|
187
150
|
inst.def = def;
|
|
188
151
|
inst.type = def.type;
|
|
189
|
-
Object.defineProperty(inst, "_def", { value: def });
|
|
190
|
-
// Parse-family is intentionally kept as per-instance closures: these are
|
|
191
|
-
// the hot path AND the most-detached methods (`arr.map(schema.parse)`,
|
|
192
|
-
// `const { parse } = schema`, etc.). Eager closures here mean callers pay
|
|
193
|
-
// ~12 closure allocations per schema but get monomorphic call sites and
|
|
194
|
-
// detached usage that "just works".
|
|
195
|
-
inst.parse = (data, params) => parse.parse(inst, data, params, { callee: inst.parse });
|
|
196
|
-
inst.safeParse = (data, params) => parse.safeParse(inst, data, params);
|
|
197
|
-
inst.parseAsync = async (data, params) => parse.parseAsync(inst, data, params, { callee: inst.parseAsync });
|
|
198
|
-
inst.safeParseAsync = async (data, params) => parse.safeParseAsync(inst, data, params);
|
|
199
|
-
inst.spa = inst.safeParseAsync;
|
|
200
|
-
inst.encode = (data, params) => parse.encode(inst, data, params);
|
|
201
|
-
inst.decode = (data, params) => parse.decode(inst, data, params);
|
|
202
|
-
inst.encodeAsync = async (data, params) => parse.encodeAsync(inst, data, params);
|
|
203
|
-
inst.decodeAsync = async (data, params) => parse.decodeAsync(inst, data, params);
|
|
204
|
-
inst.safeEncode = (data, params) => parse.safeEncode(inst, data, params);
|
|
205
|
-
inst.safeDecode = (data, params) => parse.safeDecode(inst, data, params);
|
|
206
|
-
inst.safeEncodeAsync = async (data, params) => parse.safeEncodeAsync(inst, data, params);
|
|
207
|
-
inst.safeDecodeAsync = async (data, params) => parse.safeDecodeAsync(inst, data, params);
|
|
208
|
-
// All builder methods are placed on the internal prototype as lazy-bind
|
|
209
|
-
// getters. On first access per-instance, a bound thunk is allocated and
|
|
210
|
-
// cached as an own property; subsequent accesses skip the getter. This
|
|
211
|
-
// means: no per-instance allocation for unused methods, full
|
|
212
|
-
// detachability preserved (`const m = schema.optional; m()` works), and
|
|
213
|
-
// shared underlying function references across all instances.
|
|
214
|
-
_installLazyMethods(inst, "ZodType", {
|
|
215
|
-
check(...chks) {
|
|
216
|
-
const def = this.def;
|
|
217
|
-
return this.clone(index_js_1.util.mergeDefs(def, {
|
|
218
|
-
checks: [
|
|
219
|
-
...(def.checks ?? []),
|
|
220
|
-
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch),
|
|
221
|
-
],
|
|
222
|
-
}), { parent: true });
|
|
223
|
-
},
|
|
224
|
-
with(...chks) {
|
|
225
|
-
return this.check(...chks);
|
|
226
|
-
},
|
|
227
|
-
clone(def, params) {
|
|
228
|
-
return core.clone(this, def, params);
|
|
229
|
-
},
|
|
230
|
-
brand() {
|
|
231
|
-
return this;
|
|
232
|
-
},
|
|
233
|
-
register(reg, meta) {
|
|
234
|
-
reg.add(this, meta);
|
|
235
|
-
return this;
|
|
236
|
-
},
|
|
237
|
-
refine(check, params) {
|
|
238
|
-
return this.check(refine(check, params));
|
|
239
|
-
},
|
|
240
|
-
superRefine(refinement, params) {
|
|
241
|
-
return this.check(superRefine(refinement, params));
|
|
242
|
-
},
|
|
243
|
-
overwrite(fn) {
|
|
244
|
-
return this.check(checks.overwrite(fn));
|
|
245
|
-
},
|
|
246
|
-
optional() {
|
|
247
|
-
return optional(this);
|
|
248
|
-
},
|
|
249
|
-
exactOptional() {
|
|
250
|
-
return exactOptional(this);
|
|
251
|
-
},
|
|
252
|
-
nullable() {
|
|
253
|
-
return nullable(this);
|
|
254
|
-
},
|
|
255
|
-
nullish() {
|
|
256
|
-
return optional(nullable(this));
|
|
257
|
-
},
|
|
258
|
-
nonoptional(params) {
|
|
259
|
-
return nonoptional(this, params);
|
|
260
|
-
},
|
|
261
|
-
array() {
|
|
262
|
-
return array(this);
|
|
263
|
-
},
|
|
264
|
-
or(arg) {
|
|
265
|
-
return union([this, arg]);
|
|
266
|
-
},
|
|
267
|
-
and(arg) {
|
|
268
|
-
return intersection(this, arg);
|
|
269
|
-
},
|
|
270
|
-
transform(tx) {
|
|
271
|
-
return pipe(this, transform(tx));
|
|
272
|
-
},
|
|
273
|
-
default(d) {
|
|
274
|
-
return _default(this, d);
|
|
275
|
-
},
|
|
276
|
-
prefault(d) {
|
|
277
|
-
return prefault(this, d);
|
|
278
|
-
},
|
|
279
|
-
catch(params) {
|
|
280
|
-
return _catch(this, params);
|
|
281
|
-
},
|
|
282
|
-
pipe(target) {
|
|
283
|
-
return pipe(this, target);
|
|
284
|
-
},
|
|
285
|
-
readonly() {
|
|
286
|
-
return readonly(this);
|
|
287
|
-
},
|
|
288
|
-
describe(description) {
|
|
289
|
-
const cl = this.clone();
|
|
290
|
-
core.globalRegistry.add(cl, { description });
|
|
291
|
-
return cl;
|
|
292
|
-
},
|
|
293
|
-
meta(...args) {
|
|
294
|
-
// overloaded: meta() returns the registered metadata, meta(data)
|
|
295
|
-
// returns a clone with `data` registered. The mapped type picks
|
|
296
|
-
// up the second overload, so we accept variadic any-args and
|
|
297
|
-
// return `any` to satisfy both at runtime.
|
|
298
|
-
if (args.length === 0)
|
|
299
|
-
return core.globalRegistry.get(this);
|
|
300
|
-
const cl = this.clone();
|
|
301
|
-
core.globalRegistry.add(cl, args[0]);
|
|
302
|
-
return cl;
|
|
303
|
-
},
|
|
304
|
-
isOptional() {
|
|
305
|
-
return this.safeParse(undefined).success;
|
|
306
|
-
},
|
|
307
|
-
isNullable() {
|
|
308
|
-
return this.safeParse(null).success;
|
|
309
|
-
},
|
|
310
|
-
apply(fn) {
|
|
311
|
-
return fn(this);
|
|
312
|
-
},
|
|
313
|
-
});
|
|
314
|
-
Object.defineProperty(inst, "description", {
|
|
315
|
-
get() {
|
|
316
|
-
return core.globalRegistry.get(inst)?.description;
|
|
317
|
-
},
|
|
318
|
-
configurable: true,
|
|
319
|
-
});
|
|
320
152
|
return inst;
|
|
153
|
+
}, {
|
|
154
|
+
check(...chks) {
|
|
155
|
+
const def = this.def;
|
|
156
|
+
return this.clone(index_js_1.util.mergeDefs(def, {
|
|
157
|
+
checks: [
|
|
158
|
+
...(def.checks ?? []),
|
|
159
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch),
|
|
160
|
+
],
|
|
161
|
+
}), { parent: true });
|
|
162
|
+
},
|
|
163
|
+
with(...chks) {
|
|
164
|
+
return this.check(...chks);
|
|
165
|
+
},
|
|
166
|
+
clone(def, params) {
|
|
167
|
+
return core.clone(this, def, params);
|
|
168
|
+
},
|
|
169
|
+
brand() {
|
|
170
|
+
return this;
|
|
171
|
+
},
|
|
172
|
+
register(reg, meta) {
|
|
173
|
+
reg.add(this, meta);
|
|
174
|
+
return this;
|
|
175
|
+
},
|
|
176
|
+
refine(check, params) {
|
|
177
|
+
return this.check(refine(check, params));
|
|
178
|
+
},
|
|
179
|
+
superRefine(refinement, params) {
|
|
180
|
+
return this.check(superRefine(refinement, params));
|
|
181
|
+
},
|
|
182
|
+
overwrite(fn) {
|
|
183
|
+
return this.check(checks.overwrite(fn));
|
|
184
|
+
},
|
|
185
|
+
optional() {
|
|
186
|
+
return optional(this);
|
|
187
|
+
},
|
|
188
|
+
exactOptional() {
|
|
189
|
+
return exactOptional(this);
|
|
190
|
+
},
|
|
191
|
+
nullable() {
|
|
192
|
+
return nullable(this);
|
|
193
|
+
},
|
|
194
|
+
nullish() {
|
|
195
|
+
return optional(nullable(this));
|
|
196
|
+
},
|
|
197
|
+
nonoptional(params) {
|
|
198
|
+
return nonoptional(this, params);
|
|
199
|
+
},
|
|
200
|
+
array() {
|
|
201
|
+
return array(this);
|
|
202
|
+
},
|
|
203
|
+
or(arg) {
|
|
204
|
+
return union([this, arg]);
|
|
205
|
+
},
|
|
206
|
+
and(arg) {
|
|
207
|
+
return intersection(this, arg);
|
|
208
|
+
},
|
|
209
|
+
transform(tx) {
|
|
210
|
+
return pipe(this, transform(tx));
|
|
211
|
+
},
|
|
212
|
+
default(d) {
|
|
213
|
+
return _default(this, d);
|
|
214
|
+
},
|
|
215
|
+
prefault(d) {
|
|
216
|
+
return prefault(this, d);
|
|
217
|
+
},
|
|
218
|
+
catch(params) {
|
|
219
|
+
return _catch(this, params);
|
|
220
|
+
},
|
|
221
|
+
pipe(target) {
|
|
222
|
+
return pipe(this, target);
|
|
223
|
+
},
|
|
224
|
+
readonly() {
|
|
225
|
+
return readonly(this);
|
|
226
|
+
},
|
|
227
|
+
describe(description) {
|
|
228
|
+
const cl = this.clone();
|
|
229
|
+
core.globalRegistry.add(cl, { description });
|
|
230
|
+
return cl;
|
|
231
|
+
},
|
|
232
|
+
meta(...args) {
|
|
233
|
+
// overloaded: meta() returns the registered metadata, meta(data) returns a clone with `data` registered. The mapped type picks up the second overload, so we accept variadic any-args and return `any` to satisfy both at runtime.
|
|
234
|
+
if (args.length === 0)
|
|
235
|
+
return core.globalRegistry.get(this);
|
|
236
|
+
const cl = this.clone();
|
|
237
|
+
core.globalRegistry.add(cl, args[0]);
|
|
238
|
+
return cl;
|
|
239
|
+
},
|
|
240
|
+
isOptional() {
|
|
241
|
+
return this.safeParse(undefined).success;
|
|
242
|
+
},
|
|
243
|
+
isNullable() {
|
|
244
|
+
return this.safeParse(null).success;
|
|
245
|
+
},
|
|
246
|
+
apply(fn, ...args) {
|
|
247
|
+
return args.length === 0 ? fn(this) : fn(this, ...args);
|
|
248
|
+
},
|
|
249
|
+
// Overrides core's `~standard` to add `jsonSchema`. Must stay a prototype entry: redefining it per instance demotes instances to dictionary mode.
|
|
250
|
+
get "~standard"() {
|
|
251
|
+
return index_js_1.util.hide(this, "~standard", {
|
|
252
|
+
...core.standardProps(this),
|
|
253
|
+
jsonSchema: {
|
|
254
|
+
input: (0, to_json_schema_js_1.createStandardJSONSchemaMethod)(this, "input"),
|
|
255
|
+
output: (0, to_json_schema_js_1.createStandardJSONSchemaMethod)(this, "output"),
|
|
256
|
+
},
|
|
257
|
+
});
|
|
258
|
+
},
|
|
259
|
+
set "~standard"(value) {
|
|
260
|
+
index_js_1.util.own(this, "~standard", value);
|
|
261
|
+
},
|
|
262
|
+
parse: function _parse(data, params) {
|
|
263
|
+
return parse.parse(this, data, params, { callee: _parse });
|
|
264
|
+
},
|
|
265
|
+
parseAsync: async function _parseAsync(data, params) {
|
|
266
|
+
return await parse.parseAsync(this, data, params, { callee: _parseAsync });
|
|
267
|
+
},
|
|
268
|
+
safeParse(data, params) {
|
|
269
|
+
return parse.safeParse(this, data, params);
|
|
270
|
+
},
|
|
271
|
+
async safeParseAsync(data, params) {
|
|
272
|
+
return parse.safeParseAsync(this, data, params);
|
|
273
|
+
},
|
|
274
|
+
// `spa` is an alias: same function object as `safeParseAsync`, as before.
|
|
275
|
+
get spa() {
|
|
276
|
+
return this?.safeParseAsync;
|
|
277
|
+
},
|
|
278
|
+
set spa(value) {
|
|
279
|
+
index_js_1.util.own(this, "spa", value);
|
|
280
|
+
},
|
|
281
|
+
validate(data, params) {
|
|
282
|
+
return parse.validate(this, data, params);
|
|
283
|
+
},
|
|
284
|
+
validateAsync(data, params) {
|
|
285
|
+
return parse.validateAsync(this, data, params);
|
|
286
|
+
},
|
|
287
|
+
encode: function _encode(data, params) {
|
|
288
|
+
return parse.encode(this, data, params, { callee: _encode });
|
|
289
|
+
},
|
|
290
|
+
decode: function _decode(data, params) {
|
|
291
|
+
return parse.decode(this, data, params, { callee: _decode });
|
|
292
|
+
},
|
|
293
|
+
encodeAsync: async function _encodeAsync(data, params) {
|
|
294
|
+
return await parse.encodeAsync(this, data, params, { callee: _encodeAsync });
|
|
295
|
+
},
|
|
296
|
+
decodeAsync: async function _decodeAsync(data, params) {
|
|
297
|
+
return await parse.decodeAsync(this, data, params, { callee: _decodeAsync });
|
|
298
|
+
},
|
|
299
|
+
safeEncode(data, params) {
|
|
300
|
+
return parse.safeEncode(this, data, params);
|
|
301
|
+
},
|
|
302
|
+
safeDecode(data, params) {
|
|
303
|
+
return parse.safeDecode(this, data, params);
|
|
304
|
+
},
|
|
305
|
+
async safeEncodeAsync(data, params) {
|
|
306
|
+
return parse.safeEncodeAsync(this, data, params);
|
|
307
|
+
},
|
|
308
|
+
async safeDecodeAsync(data, params) {
|
|
309
|
+
return parse.safeDecodeAsync(this, data, params);
|
|
310
|
+
},
|
|
311
|
+
toJSONSchema(params) {
|
|
312
|
+
return (0, to_json_schema_js_1.createToJSONSchemaMethod)(this, {})(params);
|
|
313
|
+
},
|
|
314
|
+
// Reads through to the registry on every access, so it must not cache.
|
|
315
|
+
get description() {
|
|
316
|
+
return core.globalRegistry.get(this)?.description;
|
|
317
|
+
},
|
|
318
|
+
// No setter: `schema._def = x` throws, as it did when `_def` was a non-writable own property.
|
|
319
|
+
get _def() {
|
|
320
|
+
return this._zod.def;
|
|
321
|
+
},
|
|
321
322
|
});
|
|
322
323
|
/** @internal */
|
|
323
324
|
exports._ZodString = core.$constructor("_ZodString", (inst, def) => {
|
|
324
325
|
core.$ZodString.init(inst, def);
|
|
325
326
|
exports.ZodType.init(inst, def);
|
|
326
327
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.stringProcessor(inst, ctx, json, params);
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
inst
|
|
330
|
-
inst
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
}
|
|
378
|
-
});
|
|
328
|
+
},
|
|
329
|
+
/*@__PURE__*/ index_js_1.util.derived({
|
|
330
|
+
format: (inst) => processors.aggregateChecks(inst).format ?? null,
|
|
331
|
+
minLength: (inst) => processors.aggregateChecks(inst).minimum ?? null,
|
|
332
|
+
maxLength: (inst) => processors.aggregateChecks(inst).maximum ?? null,
|
|
333
|
+
}, {
|
|
334
|
+
regex(...args) {
|
|
335
|
+
return this.check(checks.regex(...args));
|
|
336
|
+
},
|
|
337
|
+
includes(...args) {
|
|
338
|
+
return this.check(checks.includes(...args));
|
|
339
|
+
},
|
|
340
|
+
startsWith(...args) {
|
|
341
|
+
return this.check(checks.startsWith(...args));
|
|
342
|
+
},
|
|
343
|
+
endsWith(...args) {
|
|
344
|
+
return this.check(checks.endsWith(...args));
|
|
345
|
+
},
|
|
346
|
+
min(...args) {
|
|
347
|
+
return this.check(checks.minLength(...args));
|
|
348
|
+
},
|
|
349
|
+
max(...args) {
|
|
350
|
+
return this.check(checks.maxLength(...args));
|
|
351
|
+
},
|
|
352
|
+
length(...args) {
|
|
353
|
+
return this.check(checks.length(...args));
|
|
354
|
+
},
|
|
355
|
+
nonempty(...args) {
|
|
356
|
+
return this.check(checks.minLength(1, ...args));
|
|
357
|
+
},
|
|
358
|
+
lowercase(params) {
|
|
359
|
+
return this.check(checks.lowercase(params));
|
|
360
|
+
},
|
|
361
|
+
uppercase(params) {
|
|
362
|
+
return this.check(checks.uppercase(params));
|
|
363
|
+
},
|
|
364
|
+
trim() {
|
|
365
|
+
return this.check(checks.trim());
|
|
366
|
+
},
|
|
367
|
+
normalize(...args) {
|
|
368
|
+
return this.check(checks.normalize(...args));
|
|
369
|
+
},
|
|
370
|
+
toLowerCase() {
|
|
371
|
+
return this.check(checks.toLowerCase());
|
|
372
|
+
},
|
|
373
|
+
toUpperCase() {
|
|
374
|
+
return this.check(checks.toUpperCase());
|
|
375
|
+
},
|
|
376
|
+
slugify() {
|
|
377
|
+
return this.check(checks.slugify());
|
|
378
|
+
},
|
|
379
|
+
}));
|
|
379
380
|
exports.ZodString = core.$constructor("ZodString", (inst, def) => {
|
|
380
381
|
core.$ZodString.init(inst, def);
|
|
381
382
|
exports._ZodString.init(inst, def);
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
383
|
+
}, {
|
|
384
|
+
email(params) {
|
|
385
|
+
return this.check(core._email(exports.ZodEmail, params));
|
|
386
|
+
},
|
|
387
|
+
url(params) {
|
|
388
|
+
return this.check(core._url(exports.ZodURL, params));
|
|
389
|
+
},
|
|
390
|
+
jwt(params) {
|
|
391
|
+
return this.check(core._jwt(exports.ZodJWT, params));
|
|
392
|
+
},
|
|
393
|
+
emoji(params) {
|
|
394
|
+
return this.check(core._emoji(exports.ZodEmoji, params));
|
|
395
|
+
},
|
|
396
|
+
guid(params) {
|
|
397
|
+
return this.check(core._guid(exports.ZodGUID, params));
|
|
398
|
+
},
|
|
399
|
+
uuid(params) {
|
|
400
|
+
return this.check(core._uuid(exports.ZodUUID, params));
|
|
401
|
+
},
|
|
402
|
+
uuidv4(params) {
|
|
403
|
+
return this.check(core._uuidv4(exports.ZodUUID, params));
|
|
404
|
+
},
|
|
405
|
+
uuidv6(params) {
|
|
406
|
+
return this.check(core._uuidv6(exports.ZodUUID, params));
|
|
407
|
+
},
|
|
408
|
+
uuidv7(params) {
|
|
409
|
+
return this.check(core._uuidv7(exports.ZodUUID, params));
|
|
410
|
+
},
|
|
411
|
+
nanoid(params) {
|
|
412
|
+
return this.check(core._nanoid(exports.ZodNanoID, params));
|
|
413
|
+
},
|
|
414
|
+
cuid(params) {
|
|
415
|
+
return this.check(core._cuid(exports.ZodCUID, params));
|
|
416
|
+
},
|
|
417
|
+
cuid2(params) {
|
|
418
|
+
return this.check(core._cuid2(exports.ZodCUID2, params));
|
|
419
|
+
},
|
|
420
|
+
ulid(params) {
|
|
421
|
+
return this.check(core._ulid(exports.ZodULID, params));
|
|
422
|
+
},
|
|
423
|
+
base64(params) {
|
|
424
|
+
return this.check(core._base64(exports.ZodBase64, params));
|
|
425
|
+
},
|
|
426
|
+
base64url(params) {
|
|
427
|
+
return this.check(core._base64url(exports.ZodBase64URL, params));
|
|
428
|
+
},
|
|
429
|
+
xid(params) {
|
|
430
|
+
return this.check(core._xid(exports.ZodXID, params));
|
|
431
|
+
},
|
|
432
|
+
ksuid(params) {
|
|
433
|
+
return this.check(core._ksuid(exports.ZodKSUID, params));
|
|
434
|
+
},
|
|
435
|
+
ipv4(params) {
|
|
436
|
+
return this.check(core._ipv4(exports.ZodIPv4, params));
|
|
437
|
+
},
|
|
438
|
+
ipv6(params) {
|
|
439
|
+
return this.check(core._ipv6(exports.ZodIPv6, params));
|
|
440
|
+
},
|
|
441
|
+
cidrv4(params) {
|
|
442
|
+
return this.check(core._cidrv4(exports.ZodCIDRv4, params));
|
|
443
|
+
},
|
|
444
|
+
cidrv6(params) {
|
|
445
|
+
return this.check(core._cidrv6(exports.ZodCIDRv6, params));
|
|
446
|
+
},
|
|
447
|
+
e164(params) {
|
|
448
|
+
return this.check(core._e164(exports.ZodE164, params));
|
|
449
|
+
},
|
|
450
|
+
datetime(params) {
|
|
451
|
+
return this.check(core._isoDateTime(exports.ZodISODateTime, params));
|
|
452
|
+
},
|
|
453
|
+
date(params) {
|
|
454
|
+
return this.check(core._isoDate(exports.ZodISODate, params));
|
|
455
|
+
},
|
|
456
|
+
time(params) {
|
|
457
|
+
return this.check(core._isoTime(exports.ZodISOTime, params));
|
|
458
|
+
},
|
|
459
|
+
duration(params) {
|
|
460
|
+
return this.check(core._isoDuration(exports.ZodISODuration, params));
|
|
461
|
+
},
|
|
410
462
|
});
|
|
411
463
|
function string(params) {
|
|
412
464
|
return core._string(exports.ZodString, params);
|
|
@@ -415,6 +467,22 @@ exports.ZodStringFormat = core.$constructor("ZodStringFormat", (inst, def) => {
|
|
|
415
467
|
core.$ZodStringFormat.init(inst, def);
|
|
416
468
|
exports._ZodString.init(inst, def);
|
|
417
469
|
});
|
|
470
|
+
exports.ZodISODateTime = core.$constructor("ZodISODateTime", (inst, def) => {
|
|
471
|
+
core.$ZodISODateTime.init(inst, def);
|
|
472
|
+
exports.ZodStringFormat.init(inst, def);
|
|
473
|
+
});
|
|
474
|
+
exports.ZodISODate = core.$constructor("ZodISODate", (inst, def) => {
|
|
475
|
+
core.$ZodISODate.init(inst, def);
|
|
476
|
+
exports.ZodStringFormat.init(inst, def);
|
|
477
|
+
});
|
|
478
|
+
exports.ZodISOTime = core.$constructor("ZodISOTime", (inst, def) => {
|
|
479
|
+
core.$ZodISOTime.init(inst, def);
|
|
480
|
+
exports.ZodStringFormat.init(inst, def);
|
|
481
|
+
});
|
|
482
|
+
exports.ZodISODuration = core.$constructor("ZodISODuration", (inst, def) => {
|
|
483
|
+
core.$ZodISODuration.init(inst, def);
|
|
484
|
+
exports.ZodStringFormat.init(inst, def);
|
|
485
|
+
});
|
|
418
486
|
exports.ZodEmail = core.$constructor("ZodEmail", (inst, def) => {
|
|
419
487
|
// ZodStringFormat.init(inst, def);
|
|
420
488
|
core.$ZodEmail.init(inst, def);
|
|
@@ -460,8 +528,8 @@ function url(params) {
|
|
|
460
528
|
}
|
|
461
529
|
function httpUrl(params) {
|
|
462
530
|
return core._url(exports.ZodURL, {
|
|
463
|
-
protocol:
|
|
464
|
-
hostname:
|
|
531
|
+
protocol: regexes.httpProtocol,
|
|
532
|
+
hostname: regexes.domain,
|
|
465
533
|
...index_js_1.util.normalizeParams(params),
|
|
466
534
|
});
|
|
467
535
|
}
|
|
@@ -595,6 +663,20 @@ exports.ZodE164 = core.$constructor("ZodE164", (inst, def) => {
|
|
|
595
663
|
function e164(params) {
|
|
596
664
|
return core._e164(exports.ZodE164, params);
|
|
597
665
|
}
|
|
666
|
+
exports.ZodCreditCard = core.$constructor("ZodCreditCard", (inst, def) => {
|
|
667
|
+
core.$ZodCreditCard.init(inst, def);
|
|
668
|
+
exports.ZodStringFormat.init(inst, def);
|
|
669
|
+
});
|
|
670
|
+
function creditCard(params) {
|
|
671
|
+
return core._creditCard(exports.ZodCreditCard, params);
|
|
672
|
+
}
|
|
673
|
+
exports.ZodIBAN = core.$constructor("ZodIBAN", (inst, def) => {
|
|
674
|
+
core.$ZodIBAN.init(inst, def);
|
|
675
|
+
exports.ZodStringFormat.init(inst, def);
|
|
676
|
+
});
|
|
677
|
+
function iban(params) {
|
|
678
|
+
return core._iban(exports.ZodIBAN, params);
|
|
679
|
+
}
|
|
598
680
|
exports.ZodJWT = core.$constructor("ZodJWT", (inst, def) => {
|
|
599
681
|
// ZodStringFormat.init(inst, def);
|
|
600
682
|
core.$ZodJWT.init(inst, def);
|
|
@@ -612,10 +694,13 @@ function stringFormat(format, fnOrRegex, _params = {}) {
|
|
|
612
694
|
return core._stringFormat(exports.ZodCustomStringFormat, format, fnOrRegex, _params);
|
|
613
695
|
}
|
|
614
696
|
function hostname(_params) {
|
|
615
|
-
return core._stringFormat(exports.ZodCustomStringFormat, "hostname",
|
|
697
|
+
return core._stringFormat(exports.ZodCustomStringFormat, "hostname", regexes.hostname, _params);
|
|
616
698
|
}
|
|
617
699
|
function hex(_params) {
|
|
618
|
-
return core._stringFormat(exports.ZodCustomStringFormat, "hex",
|
|
700
|
+
return core._stringFormat(exports.ZodCustomStringFormat, "hex", regexes.hex, _params);
|
|
701
|
+
}
|
|
702
|
+
function currencyCode(_params) {
|
|
703
|
+
return core._stringFormat(exports.ZodCustomStringFormat, "currency_code", regexes.currencyCode, _params);
|
|
619
704
|
}
|
|
620
705
|
function hash(alg, params) {
|
|
621
706
|
const enc = params?.enc ?? "hex";
|
|
@@ -629,62 +714,69 @@ exports.ZodNumber = core.$constructor("ZodNumber", (inst, def) => {
|
|
|
629
714
|
core.$ZodNumber.init(inst, def);
|
|
630
715
|
exports.ZodType.init(inst, def);
|
|
631
716
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.numberProcessor(inst, ctx, json, params);
|
|
632
|
-
_installLazyMethods(inst, "ZodNumber", {
|
|
633
|
-
gt(value, params) {
|
|
634
|
-
return this.check(checks.gt(value, params));
|
|
635
|
-
},
|
|
636
|
-
gte(value, params) {
|
|
637
|
-
return this.check(checks.gte(value, params));
|
|
638
|
-
},
|
|
639
|
-
min(value, params) {
|
|
640
|
-
return this.check(checks.gte(value, params));
|
|
641
|
-
},
|
|
642
|
-
lt(value, params) {
|
|
643
|
-
return this.check(checks.lt(value, params));
|
|
644
|
-
},
|
|
645
|
-
lte(value, params) {
|
|
646
|
-
return this.check(checks.lte(value, params));
|
|
647
|
-
},
|
|
648
|
-
max(value, params) {
|
|
649
|
-
return this.check(checks.lte(value, params));
|
|
650
|
-
},
|
|
651
|
-
int(params) {
|
|
652
|
-
return this.check(int(params));
|
|
653
|
-
},
|
|
654
|
-
safe(params) {
|
|
655
|
-
return this.check(int(params));
|
|
656
|
-
},
|
|
657
|
-
positive(params) {
|
|
658
|
-
return this.check(checks.gt(0, params));
|
|
659
|
-
},
|
|
660
|
-
nonnegative(params) {
|
|
661
|
-
return this.check(checks.gte(0, params));
|
|
662
|
-
},
|
|
663
|
-
negative(params) {
|
|
664
|
-
return this.check(checks.lt(0, params));
|
|
665
|
-
},
|
|
666
|
-
nonpositive(params) {
|
|
667
|
-
return this.check(checks.lte(0, params));
|
|
668
|
-
},
|
|
669
|
-
multipleOf(value, params) {
|
|
670
|
-
return this.check(checks.multipleOf(value, params));
|
|
671
|
-
},
|
|
672
|
-
step(value, params) {
|
|
673
|
-
return this.check(checks.multipleOf(value, params));
|
|
674
|
-
},
|
|
675
|
-
finite() {
|
|
676
|
-
return this;
|
|
677
|
-
},
|
|
678
|
-
});
|
|
679
|
-
const bag = inst._zod.bag;
|
|
680
|
-
inst.minValue =
|
|
681
|
-
Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
682
|
-
inst.maxValue =
|
|
683
|
-
Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
|
|
684
|
-
inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5);
|
|
685
717
|
inst.isFinite = true;
|
|
686
|
-
|
|
687
|
-
|
|
718
|
+
},
|
|
719
|
+
/*@__PURE__*/ index_js_1.util.derived({
|
|
720
|
+
minValue: (inst) => {
|
|
721
|
+
const { minimum, exclusiveMinimum } = processors.aggregateChecks(inst);
|
|
722
|
+
return Math.max(minimum ?? Number.NEGATIVE_INFINITY, exclusiveMinimum ?? Number.NEGATIVE_INFINITY);
|
|
723
|
+
},
|
|
724
|
+
maxValue: (inst) => {
|
|
725
|
+
const { maximum, exclusiveMaximum } = processors.aggregateChecks(inst);
|
|
726
|
+
return Math.min(maximum ?? Number.POSITIVE_INFINITY, exclusiveMaximum ?? Number.POSITIVE_INFINITY);
|
|
727
|
+
},
|
|
728
|
+
isInt: (inst) => {
|
|
729
|
+
const { isInt, multipleOf } = processors.aggregateChecks(inst);
|
|
730
|
+
return !!isInt || !!multipleOf?.some(Number.isSafeInteger);
|
|
731
|
+
},
|
|
732
|
+
format: (inst) => processors.aggregateChecks(inst).format ?? null,
|
|
733
|
+
}, {
|
|
734
|
+
gt(value, params) {
|
|
735
|
+
return this.check(checks.gt(value, params));
|
|
736
|
+
},
|
|
737
|
+
gte(value, params) {
|
|
738
|
+
return this.check(checks.gte(value, params));
|
|
739
|
+
},
|
|
740
|
+
min(value, params) {
|
|
741
|
+
return this.check(checks.gte(value, params));
|
|
742
|
+
},
|
|
743
|
+
lt(value, params) {
|
|
744
|
+
return this.check(checks.lt(value, params));
|
|
745
|
+
},
|
|
746
|
+
lte(value, params) {
|
|
747
|
+
return this.check(checks.lte(value, params));
|
|
748
|
+
},
|
|
749
|
+
max(value, params) {
|
|
750
|
+
return this.check(checks.lte(value, params));
|
|
751
|
+
},
|
|
752
|
+
int(params) {
|
|
753
|
+
return this.check(int(params));
|
|
754
|
+
},
|
|
755
|
+
safe(params) {
|
|
756
|
+
return this.check(int(params));
|
|
757
|
+
},
|
|
758
|
+
positive(params) {
|
|
759
|
+
return this.check(checks.gt(0, params));
|
|
760
|
+
},
|
|
761
|
+
nonnegative(params) {
|
|
762
|
+
return this.check(checks.gte(0, params));
|
|
763
|
+
},
|
|
764
|
+
negative(params) {
|
|
765
|
+
return this.check(checks.lt(0, params));
|
|
766
|
+
},
|
|
767
|
+
nonpositive(params) {
|
|
768
|
+
return this.check(checks.lte(0, params));
|
|
769
|
+
},
|
|
770
|
+
multipleOf(value, params) {
|
|
771
|
+
return this.check(checks.multipleOf(value, params));
|
|
772
|
+
},
|
|
773
|
+
step(value, params) {
|
|
774
|
+
return this.check(checks.multipleOf(value, params));
|
|
775
|
+
},
|
|
776
|
+
finite() {
|
|
777
|
+
return this;
|
|
778
|
+
},
|
|
779
|
+
}));
|
|
688
780
|
function number(params) {
|
|
689
781
|
return core._number(exports.ZodNumber, params);
|
|
690
782
|
}
|
|
@@ -719,24 +811,46 @@ exports.ZodBigInt = core.$constructor("ZodBigInt", (inst, def) => {
|
|
|
719
811
|
core.$ZodBigInt.init(inst, def);
|
|
720
812
|
exports.ZodType.init(inst, def);
|
|
721
813
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.bigintProcessor(inst, ctx, json, params);
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
}
|
|
814
|
+
},
|
|
815
|
+
/*@__PURE__*/ index_js_1.util.derived({
|
|
816
|
+
minValue: (inst) => processors.aggregateChecks(inst).minimum ?? null,
|
|
817
|
+
maxValue: (inst) => processors.aggregateChecks(inst).maximum ?? null,
|
|
818
|
+
format: (inst) => processors.aggregateChecks(inst).format ?? null,
|
|
819
|
+
}, {
|
|
820
|
+
gte(value, params) {
|
|
821
|
+
return this.check(checks.gte(value, params));
|
|
822
|
+
},
|
|
823
|
+
min(value, params) {
|
|
824
|
+
return this.check(checks.gte(value, params));
|
|
825
|
+
},
|
|
826
|
+
gt(value, params) {
|
|
827
|
+
return this.check(checks.gt(value, params));
|
|
828
|
+
},
|
|
829
|
+
lt(value, params) {
|
|
830
|
+
return this.check(checks.lt(value, params));
|
|
831
|
+
},
|
|
832
|
+
lte(value, params) {
|
|
833
|
+
return this.check(checks.lte(value, params));
|
|
834
|
+
},
|
|
835
|
+
max(value, params) {
|
|
836
|
+
return this.check(checks.lte(value, params));
|
|
837
|
+
},
|
|
838
|
+
positive(params) {
|
|
839
|
+
return this.check(checks.gt(BigInt(0), params));
|
|
840
|
+
},
|
|
841
|
+
negative(params) {
|
|
842
|
+
return this.check(checks.lt(BigInt(0), params));
|
|
843
|
+
},
|
|
844
|
+
nonpositive(params) {
|
|
845
|
+
return this.check(checks.lte(BigInt(0), params));
|
|
846
|
+
},
|
|
847
|
+
nonnegative(params) {
|
|
848
|
+
return this.check(checks.gte(BigInt(0), params));
|
|
849
|
+
},
|
|
850
|
+
multipleOf(value, params) {
|
|
851
|
+
return this.check(checks.multipleOf(value, params));
|
|
852
|
+
},
|
|
853
|
+
}));
|
|
740
854
|
function bigint(params) {
|
|
741
855
|
return core._bigint(exports.ZodBigInt, params);
|
|
742
856
|
}
|
|
@@ -744,11 +858,9 @@ exports.ZodBigIntFormat = core.$constructor("ZodBigIntFormat", (inst, def) => {
|
|
|
744
858
|
core.$ZodBigIntFormat.init(inst, def);
|
|
745
859
|
exports.ZodBigInt.init(inst, def);
|
|
746
860
|
});
|
|
747
|
-
// int64
|
|
748
861
|
function int64(params) {
|
|
749
862
|
return core._int64(exports.ZodBigIntFormat, params);
|
|
750
863
|
}
|
|
751
|
-
// uint64
|
|
752
864
|
function uint64(params) {
|
|
753
865
|
return core._uint64(exports.ZodBigIntFormat, params);
|
|
754
866
|
}
|
|
@@ -814,35 +926,42 @@ exports.ZodDate = core.$constructor("ZodDate", (inst, def) => {
|
|
|
814
926
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.dateProcessor(inst, ctx, json, params);
|
|
815
927
|
inst.min = (value, params) => inst.check(checks.gte(value, params));
|
|
816
928
|
inst.max = (value, params) => inst.check(checks.lte(value, params));
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
});
|
|
929
|
+
},
|
|
930
|
+
/*@__PURE__*/ index_js_1.util.derived({
|
|
931
|
+
minDate: (inst) => {
|
|
932
|
+
const { minimum } = processors.aggregateChecks(inst);
|
|
933
|
+
return minimum ? new Date(minimum) : null;
|
|
934
|
+
},
|
|
935
|
+
maxDate: (inst) => {
|
|
936
|
+
const { maximum } = processors.aggregateChecks(inst);
|
|
937
|
+
return maximum ? new Date(maximum) : null;
|
|
938
|
+
},
|
|
939
|
+
}, {}));
|
|
821
940
|
function date(params) {
|
|
822
941
|
return core._date(exports.ZodDate, params);
|
|
823
942
|
}
|
|
824
943
|
exports.ZodArray = core.$constructor("ZodArray", (inst, def) => {
|
|
944
|
+
_ensureDefaultMemoizer();
|
|
825
945
|
core.$ZodArray.init(inst, def);
|
|
826
946
|
exports.ZodType.init(inst, def);
|
|
827
947
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.arrayProcessor(inst, ctx, json, params);
|
|
828
948
|
inst.element = def.element;
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
});
|
|
949
|
+
}, {
|
|
950
|
+
min(n, params) {
|
|
951
|
+
return this.check(checks.minLength(n, params));
|
|
952
|
+
},
|
|
953
|
+
nonempty(params) {
|
|
954
|
+
return this.check(checks.minLength(1, params));
|
|
955
|
+
},
|
|
956
|
+
max(n, params) {
|
|
957
|
+
return this.check(checks.maxLength(n, params));
|
|
958
|
+
},
|
|
959
|
+
length(n, params) {
|
|
960
|
+
return this.check(checks.length(n, params));
|
|
961
|
+
},
|
|
962
|
+
unwrap() {
|
|
963
|
+
return this.element;
|
|
964
|
+
},
|
|
846
965
|
});
|
|
847
966
|
function array(element, params) {
|
|
848
967
|
return core._array(exports.ZodArray, element, params);
|
|
@@ -853,53 +972,55 @@ function keyof(schema) {
|
|
|
853
972
|
return _enum(Object.keys(shape));
|
|
854
973
|
}
|
|
855
974
|
exports.ZodObject = core.$constructor("ZodObject", (inst, def) => {
|
|
975
|
+
_ensureDefaultMemoizer();
|
|
856
976
|
core.$ZodObjectJIT.init(inst, def);
|
|
857
977
|
exports.ZodType.init(inst, def);
|
|
858
978
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.objectProcessor(inst, ctx, json, params);
|
|
859
|
-
index_js_1.util.
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
extend(incoming)
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
safeExtend(incoming)
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
merge(other)
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
pick(mask)
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
omit(mask)
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
partial(
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
979
|
+
index_js_1.util.installLazyProp(inst, "shape", (self) => self._zod.def.shape, false);
|
|
980
|
+
}, {
|
|
981
|
+
keyof() {
|
|
982
|
+
return _enum(Object.keys(this._zod.def.shape));
|
|
983
|
+
},
|
|
984
|
+
catchall(catchall) {
|
|
985
|
+
// `mergeDefs` rather than a spread: spreading reads `shape`, and resolving it can mint a whole fresh subtree
|
|
986
|
+
return this.clone(index_js_1.util.mergeDefs(this._zod.def, { catchall: catchall }));
|
|
987
|
+
},
|
|
988
|
+
passthrough() {
|
|
989
|
+
return this.clone(index_js_1.util.mergeDefs(this._zod.def, { catchall: unknown() }));
|
|
990
|
+
},
|
|
991
|
+
loose() {
|
|
992
|
+
return this.clone(index_js_1.util.mergeDefs(this._zod.def, { catchall: unknown() }));
|
|
993
|
+
},
|
|
994
|
+
strict() {
|
|
995
|
+
return this.clone(index_js_1.util.mergeDefs(this._zod.def, { catchall: never() }));
|
|
996
|
+
},
|
|
997
|
+
strip() {
|
|
998
|
+
return this.clone(index_js_1.util.mergeDefs(this._zod.def, { catchall: undefined }));
|
|
999
|
+
},
|
|
1000
|
+
extend(incoming) {
|
|
1001
|
+
return index_js_1.util.extend(this, incoming);
|
|
1002
|
+
},
|
|
1003
|
+
safeExtend(incoming) {
|
|
1004
|
+
return index_js_1.util.safeExtend(this, incoming);
|
|
1005
|
+
},
|
|
1006
|
+
merge(other) {
|
|
1007
|
+
return index_js_1.util.merge(this, other);
|
|
1008
|
+
},
|
|
1009
|
+
pick(mask) {
|
|
1010
|
+
return index_js_1.util.pick(this, mask);
|
|
1011
|
+
},
|
|
1012
|
+
omit(mask) {
|
|
1013
|
+
return index_js_1.util.omit(this, mask);
|
|
1014
|
+
},
|
|
1015
|
+
partial(...args) {
|
|
1016
|
+
return index_js_1.util.partial(exports.ZodOptional, this, args[0]);
|
|
1017
|
+
},
|
|
1018
|
+
exactPartial(...args) {
|
|
1019
|
+
return index_js_1.util.partial(exports.ZodExactOptional, this, args[0], "exactPartial");
|
|
1020
|
+
},
|
|
1021
|
+
required(...args) {
|
|
1022
|
+
return index_js_1.util.required(exports.ZodNonOptional, this, args[0]);
|
|
1023
|
+
},
|
|
903
1024
|
});
|
|
904
1025
|
function object(shape, params) {
|
|
905
1026
|
const def = {
|
|
@@ -965,7 +1086,7 @@ function discriminatedUnion(discriminator, options, params) {
|
|
|
965
1086
|
// const [options, params] = args;
|
|
966
1087
|
return new exports.ZodDiscriminatedUnion({
|
|
967
1088
|
type: "union",
|
|
968
|
-
options,
|
|
1089
|
+
options: options,
|
|
969
1090
|
discriminator,
|
|
970
1091
|
...index_js_1.util.normalizeParams(params),
|
|
971
1092
|
});
|
|
@@ -983,13 +1104,27 @@ function intersection(left, right) {
|
|
|
983
1104
|
});
|
|
984
1105
|
}
|
|
985
1106
|
exports.ZodTuple = core.$constructor("ZodTuple", (inst, def) => {
|
|
1107
|
+
_ensureDefaultMemoizer();
|
|
986
1108
|
core.$ZodTuple.init(inst, def);
|
|
987
1109
|
exports.ZodType.init(inst, def);
|
|
988
1110
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.tupleProcessor(inst, ctx, json, params);
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
1111
|
+
}, {
|
|
1112
|
+
rest(rest) {
|
|
1113
|
+
return this.clone({
|
|
1114
|
+
...this._zod.def,
|
|
1115
|
+
rest: rest,
|
|
1116
|
+
});
|
|
1117
|
+
},
|
|
1118
|
+
partial() {
|
|
1119
|
+
const def = this._zod.def;
|
|
1120
|
+
// a refinement was authored against the full arity; partialing would run it on a shorter array
|
|
1121
|
+
if (def.checks?.length)
|
|
1122
|
+
throw new Error(".partial() cannot be used on tuple schemas containing refinements");
|
|
1123
|
+
return this.clone({
|
|
1124
|
+
...def,
|
|
1125
|
+
items: def.items.map((item) => new exports.ZodOptional({ type: "optional", innerType: item })),
|
|
1126
|
+
});
|
|
1127
|
+
},
|
|
993
1128
|
});
|
|
994
1129
|
function tuple(items, _paramsOrRest, _params) {
|
|
995
1130
|
const hasRest = _paramsOrRest instanceof core.$ZodType;
|
|
@@ -1003,6 +1138,7 @@ function tuple(items, _paramsOrRest, _params) {
|
|
|
1003
1138
|
});
|
|
1004
1139
|
}
|
|
1005
1140
|
exports.ZodRecord = core.$constructor("ZodRecord", (inst, def) => {
|
|
1141
|
+
_ensureDefaultMemoizer();
|
|
1006
1142
|
core.$ZodRecord.init(inst, def);
|
|
1007
1143
|
exports.ZodType.init(inst, def);
|
|
1008
1144
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.recordProcessor(inst, ctx, json, params);
|
|
@@ -1028,13 +1164,12 @@ function record(keyType, valueType, params) {
|
|
|
1028
1164
|
}
|
|
1029
1165
|
// type alksjf = core.output<core.$ZodRecordKey>;
|
|
1030
1166
|
function partialRecord(keyType, valueType, params) {
|
|
1031
|
-
const k = core.clone(keyType);
|
|
1032
|
-
k._zod.values = undefined;
|
|
1033
1167
|
return new exports.ZodRecord({
|
|
1034
1168
|
type: "record",
|
|
1035
|
-
keyType
|
|
1169
|
+
keyType,
|
|
1036
1170
|
valueType: valueType,
|
|
1037
1171
|
...index_js_1.util.normalizeParams(params),
|
|
1172
|
+
partial: true,
|
|
1038
1173
|
});
|
|
1039
1174
|
}
|
|
1040
1175
|
function looseRecord(keyType, valueType, params) {
|
|
@@ -1047,6 +1182,7 @@ function looseRecord(keyType, valueType, params) {
|
|
|
1047
1182
|
});
|
|
1048
1183
|
}
|
|
1049
1184
|
exports.ZodMap = core.$constructor("ZodMap", (inst, def) => {
|
|
1185
|
+
_ensureDefaultMemoizer();
|
|
1050
1186
|
core.$ZodMap.init(inst, def);
|
|
1051
1187
|
exports.ZodType.init(inst, def);
|
|
1052
1188
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.mapProcessor(inst, ctx, json, params);
|
|
@@ -1066,6 +1202,7 @@ function map(keyType, valueType, params) {
|
|
|
1066
1202
|
});
|
|
1067
1203
|
}
|
|
1068
1204
|
exports.ZodSet = core.$constructor("ZodSet", (inst, def) => {
|
|
1205
|
+
_ensureDefaultMemoizer();
|
|
1069
1206
|
core.$ZodSet.init(inst, def);
|
|
1070
1207
|
exports.ZodType.init(inst, def);
|
|
1071
1208
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.setProcessor(inst, ctx, json, params);
|
|
@@ -1086,7 +1223,8 @@ exports.ZodEnum = core.$constructor("ZodEnum", (inst, def) => {
|
|
|
1086
1223
|
exports.ZodType.init(inst, def);
|
|
1087
1224
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.enumProcessor(inst, ctx, json, params);
|
|
1088
1225
|
inst.enum = def.entries;
|
|
1089
|
-
|
|
1226
|
+
// reuse the parsed value set so a numeric TS enum's reverse-mapping keys stay out
|
|
1227
|
+
inst.options = [...inst._zod.values];
|
|
1090
1228
|
const keys = new Set(Object.keys(def.entries));
|
|
1091
1229
|
inst.extract = (values, params) => {
|
|
1092
1230
|
const newEntries = {};
|
|
@@ -1176,6 +1314,7 @@ function file(params) {
|
|
|
1176
1314
|
return core._file(exports.ZodFile, params);
|
|
1177
1315
|
}
|
|
1178
1316
|
exports.ZodTransform = core.$constructor("ZodTransform", (inst, def) => {
|
|
1317
|
+
_ensureDefaultMemoizer();
|
|
1179
1318
|
core.$ZodTransform.init(inst, def);
|
|
1180
1319
|
exports.ZodType.init(inst, def);
|
|
1181
1320
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.transformProcessor(inst, ctx, json, params);
|
|
@@ -1193,7 +1332,8 @@ exports.ZodTransform = core.$constructor("ZodTransform", (inst, def) => {
|
|
|
1193
1332
|
if (_issue.fatal)
|
|
1194
1333
|
_issue.continue = false;
|
|
1195
1334
|
_issue.code ?? (_issue.code = "custom");
|
|
1196
|
-
|
|
1335
|
+
if (!("input" in _issue))
|
|
1336
|
+
_issue.input = payload.value;
|
|
1197
1337
|
_issue.inst ?? (_issue.inst = inst);
|
|
1198
1338
|
// _issue.continue ??= true;
|
|
1199
1339
|
payload.issues.push(index_js_1.util.issue(_issue));
|
|
@@ -1203,12 +1343,10 @@ exports.ZodTransform = core.$constructor("ZodTransform", (inst, def) => {
|
|
|
1203
1343
|
if (output instanceof Promise) {
|
|
1204
1344
|
return output.then((output) => {
|
|
1205
1345
|
payload.value = output;
|
|
1206
|
-
payload.fallback = true;
|
|
1207
1346
|
return payload;
|
|
1208
1347
|
});
|
|
1209
1348
|
}
|
|
1210
1349
|
payload.value = output;
|
|
1211
|
-
payload.fallback = true;
|
|
1212
1350
|
return payload;
|
|
1213
1351
|
};
|
|
1214
1352
|
});
|
|
@@ -1325,7 +1463,7 @@ function _catch(innerType, catchValue) {
|
|
|
1325
1463
|
return new exports.ZodCatch({
|
|
1326
1464
|
type: "catch",
|
|
1327
1465
|
innerType: innerType,
|
|
1328
|
-
catchValue: (typeof catchValue === "function" ? catchValue : (
|
|
1466
|
+
catchValue: (typeof catchValue === "function" ? catchValue : core.util.constantCatch(catchValue)),
|
|
1329
1467
|
});
|
|
1330
1468
|
}
|
|
1331
1469
|
exports.ZodNaN = core.$constructor("ZodNaN", (inst, def) => {
|
|
@@ -1465,8 +1603,16 @@ function superRefine(fn, params) {
|
|
|
1465
1603
|
// Re-export describe and meta from core
|
|
1466
1604
|
exports.describe = core.describe;
|
|
1467
1605
|
exports.meta = core.meta;
|
|
1606
|
+
exports.ZodInstanceOf = core.$constructor("ZodInstanceOf", (inst, def) => {
|
|
1607
|
+
exports.ZodCustom.init(inst, def);
|
|
1608
|
+
}, {
|
|
1609
|
+
properties(shape, params) {
|
|
1610
|
+
// asserts in place, so the narrowed output type is truthful without a wrapper
|
|
1611
|
+
return this.check(core._properties(shape, params));
|
|
1612
|
+
},
|
|
1613
|
+
});
|
|
1468
1614
|
function _instanceof(cls, params = {}) {
|
|
1469
|
-
const inst = new exports.
|
|
1615
|
+
const inst = new exports.ZodInstanceOf({
|
|
1470
1616
|
type: "custom",
|
|
1471
1617
|
check: "custom",
|
|
1472
1618
|
fn: (data) => data instanceof cls,
|
|
@@ -1509,3 +1655,22 @@ function preprocess(fn, schema) {
|
|
|
1509
1655
|
out: schema,
|
|
1510
1656
|
});
|
|
1511
1657
|
}
|
|
1658
|
+
|
|
1659
|
+
// seal-cjs-exports
|
|
1660
|
+
(function () {
|
|
1661
|
+
var keys = Object.getOwnPropertyNames(exports);
|
|
1662
|
+
for (var i = 0; i < keys.length; i++) {
|
|
1663
|
+
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
|
|
1664
|
+
if (!desc || !desc.get || !desc.configurable) continue;
|
|
1665
|
+
var value;
|
|
1666
|
+
try {
|
|
1667
|
+
value = desc.get();
|
|
1668
|
+
} catch (e) {
|
|
1669
|
+
continue;
|
|
1670
|
+
}
|
|
1671
|
+
// a circular require may not have settled this one yet, so leave it live
|
|
1672
|
+
if (value === undefined) continue;
|
|
1673
|
+
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
|
|
1674
|
+
}
|
|
1675
|
+
Object.freeze(exports);
|
|
1676
|
+
})();
|