@openclaw/feishu 2026.9.4 → 2026.9.5
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 +3 -0
- package/assets/icon.png +0 -0
- package/dist/{accounts-cCMNFBKg.js → .setup/accounts-DmU0xYPx.mjs} +1 -1
- package/dist/{app-registration-BI99e_JI.js → .setup/app-registration-Bv4mvauR.mjs} +1 -1
- package/dist/{channel-HDnQAH4Z.js → .setup/channel-C1KrXXJa.mjs} +93 -86
- package/dist/{channel.runtime-B-f6ajOp.js → .setup/channel.runtime-Bizuv7WZ.mjs} +32 -18
- package/dist/{chat-zhIPXu4X.js → .setup/chat-dWJYS63b.mjs} +2 -2
- package/dist/{client-DMbIL3UH.js → .setup/client-DCwNVFZg.mjs} +128 -11
- package/dist/{conversation-id-VYgGQ-GX.js → .setup/conversation-id-H-lUayji.mjs} +49 -14
- package/dist/{monitor-EuNsFn2T.js → .setup/monitor-C69OLzgO.mjs} +4 -4
- package/dist/{monitor.account-CZ7EtqYS.js → .setup/monitor.account-zwHb3HKM.mjs} +68 -52
- package/dist/{probe-D_SatdZl.js → .setup/probe-bdidyhAn.mjs} +2 -2
- package/dist/{reply-delivery-result-C3smdVzb.js → .setup/reply-delivery-result-DFjxGLgX.mjs} +129 -116
- package/dist/.setup/runtime-setter-api-CG-RC4_r.mjs +3 -0
- package/dist/.setup/secret-contract-api-jmCkqVLc.mjs +3 -0
- package/dist/{security-audit-DKfR4Cv3.js → .setup/security-audit-CmiKKfU-.mjs} +1 -1
- package/dist/{session-conversation-DFCIvQK-.js → .setup/session-conversation-ZC6TC1zk.mjs} +1 -1
- package/dist/.setup/setup-api-CTRwX09n.mjs +3 -0
- package/dist/{subagent-hooks-Buadpie_.js → .setup/subagent-hooks-BBfF1hZk.mjs} +3 -19
- package/dist/api.js +29 -15
- package/dist/channel-plugin-api.js +1 -1
- package/dist/contract-api.js +3 -3
- package/dist/doctor-contract-api.js +1 -1
- package/dist/runtime-api.js +1 -1
- package/dist/runtime-setter-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/session-binding-contract-api.js +1 -1
- package/dist/session-key-api.js +1 -1
- package/dist/setup-api.js +1 -1
- package/dist/setup-entry.js +4 -3
- package/dist/subagent-hooks-api.js +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/es/index.js +199 -35
- package/node_modules/@larksuiteoapi/node-sdk/lib/index.js +199 -35
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/CHANGELOG.md +62 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/README.md +233 -5
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/axios.js +387 -89
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/axios.min.js +3 -3
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/browser/axios.cjs +458 -98
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/esm/axios.js +458 -98
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/dist/node/axios.cjs +568 -116
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/index.d.cts +4 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/index.d.ts +4 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/adapters/fetch.js +64 -11
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/adapters/http.js +134 -50
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/adapters/xhr.js +52 -3
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/Axios.js +19 -14
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/InterceptorManager.js +107 -8
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/buildFullPath.js +1 -13
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/dispatchRequest.js +8 -2
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/mergeConfig.js +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/core/methodList.js +17 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/defaults/index.js +2 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/Http2Sessions.js +2 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/HttpStatusCode.js +11 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/fromDataURI.js +5 -4
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/progressEventReducer.js +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/resolveConfig.js +4 -2
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/shouldBypassProxy.js +182 -6
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/throttle.js +3 -2
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/helpers/toFormData.js +14 -21
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/lib/utils.js +134 -13
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/axios/package.json +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/README.md +24 -17
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/light/protobuf.js +124 -14
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/minimal/protobuf.js +63 -9
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/protobuf.js +133 -18
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/ext/descriptor.generated.d.ts +7 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/ext/descriptor.js +24 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/ext/protojson.js +14 -4
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/ext/textformat.js +8 -4
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/google/protobuf/descriptor.json +20 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/google/protobuf/descriptor.proto +14 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/index.d.ts +12 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/package.json +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/decoder.js +31 -2
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/enum.js +10 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/object.js +5 -2
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/parse.js +9 -4
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/reader.js +61 -7
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/type.js +10 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/protobufjs/src/wrappers.js +5 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/.github/THREAT_MODEL.md +3 -3
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/CHANGELOG.md +15 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/README.md +19 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/dist/qs.js +21 -21
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/eslint.config.mjs +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/lib/parse.js +3 -4
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/lib/stringify.js +23 -8
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/lib/utils.js +10 -3
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/package.json +4 -4
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/test/parse.js +192 -3
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/test/stringify.js +317 -0
- package/node_modules/@larksuiteoapi/node-sdk/node_modules/qs/test/utils.js +12 -0
- package/node_modules/@larksuiteoapi/node-sdk/package.json +1 -1
- package/node_modules/@larksuiteoapi/node-sdk/types/index.d.ts +35 -0
- 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 +27 -0
- package/node_modules/zod/compile.cjs +77 -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 +2 -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/package.json +13 -2
- 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/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 +12 -9
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +140 -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 +452 -262
- 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 +135 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +30 -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 +2 -2
- 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 +720 -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 +155 -13
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +11 -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 +274 -6
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +425 -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/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 +281 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +47 -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 +183 -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 +46 -9
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +245 -12
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +234 -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/preprocess-types.test.ts +20 -2
- 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 +33 -2
- 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/string.test.ts +127 -5
- 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 +11 -2
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +1585 -173
- 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 +76 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +48 -12
- package/node_modules/zod/src/v4/core/checks.ts +57 -44
- package/node_modules/zod/src/v4/core/compile.ts +2188 -0
- package/node_modules/zod/src/v4/core/core.ts +98 -19
- package/node_modules/zod/src/v4/core/doc.ts +11 -7
- package/node_modules/zod/src/v4/core/errors.ts +115 -24
- package/node_modules/zod/src/v4/core/index.ts +3 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +6 -1
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +257 -93
- package/node_modules/zod/src/v4/core/json-schema.ts +2 -1
- package/node_modules/zod/src/v4/core/memoizer.ts +284 -0
- package/node_modules/zod/src/v4/core/parse.ts +131 -38
- package/node_modules/zod/src/v4/core/regexes.ts +30 -13
- package/node_modules/zod/src/v4/core/registries.ts +2 -2
- package/node_modules/zod/src/v4/core/schemas.ts +759 -461
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +969 -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 +1639 -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/tk.test.ts +69 -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 +31 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +275 -42
- package/node_modules/zod/src/v4/core/util.ts +268 -42
- 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 +3 -0
- package/node_modules/zod/src/v4/locales/az.ts +3 -0
- package/node_modules/zod/src/v4/locales/be.ts +10 -0
- package/node_modules/zod/src/v4/locales/bg.ts +3 -0
- package/node_modules/zod/src/v4/locales/bn.ts +121 -0
- package/node_modules/zod/src/v4/locales/ca.ts +3 -0
- package/node_modules/zod/src/v4/locales/ckb.ts +138 -0
- package/node_modules/zod/src/v4/locales/cs.ts +3 -0
- package/node_modules/zod/src/v4/locales/da.ts +5 -2
- package/node_modules/zod/src/v4/locales/de.ts +3 -0
- package/node_modules/zod/src/v4/locales/el.ts +1 -0
- package/node_modules/zod/src/v4/locales/en.ts +15 -4
- package/node_modules/zod/src/v4/locales/eo.ts +3 -0
- package/node_modules/zod/src/v4/locales/es.ts +2 -0
- package/node_modules/zod/src/v4/locales/fa.ts +3 -0
- package/node_modules/zod/src/v4/locales/fi.ts +3 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +3 -0
- package/node_modules/zod/src/v4/locales/fr.ts +19 -14
- package/node_modules/zod/src/v4/locales/gu.ts +121 -0
- package/node_modules/zod/src/v4/locales/he.ts +6 -1
- package/node_modules/zod/src/v4/locales/hi.ts +124 -0
- package/node_modules/zod/src/v4/locales/hr.ts +2 -0
- package/node_modules/zod/src/v4/locales/hu.ts +3 -0
- package/node_modules/zod/src/v4/locales/hy.ts +9 -0
- package/node_modules/zod/src/v4/locales/id.ts +3 -0
- package/node_modules/zod/src/v4/locales/index.ts +10 -0
- package/node_modules/zod/src/v4/locales/is.ts +3 -0
- package/node_modules/zod/src/v4/locales/it.ts +3 -0
- package/node_modules/zod/src/v4/locales/ja.ts +3 -0
- package/node_modules/zod/src/v4/locales/ka.ts +3 -0
- package/node_modules/zod/src/v4/locales/km.ts +3 -0
- package/node_modules/zod/src/v4/locales/kn.ts +124 -0
- package/node_modules/zod/src/v4/locales/ko.ts +3 -0
- package/node_modules/zod/src/v4/locales/lt.ts +2 -0
- package/node_modules/zod/src/v4/locales/mk.ts +3 -0
- package/node_modules/zod/src/v4/locales/ms.ts +3 -0
- package/node_modules/zod/src/v4/locales/ne.ts +126 -0
- package/node_modules/zod/src/v4/locales/nl.ts +3 -0
- package/node_modules/zod/src/v4/locales/nn.ts +119 -0
- package/node_modules/zod/src/v4/locales/no.ts +5 -2
- package/node_modules/zod/src/v4/locales/ota.ts +3 -0
- package/node_modules/zod/src/v4/locales/pl.ts +3 -0
- package/node_modules/zod/src/v4/locales/ps.ts +3 -0
- package/node_modules/zod/src/v4/locales/pt-BR.ts +159 -0
- package/node_modules/zod/src/v4/locales/pt.ts +99 -58
- package/node_modules/zod/src/v4/locales/ro.ts +1 -0
- package/node_modules/zod/src/v4/locales/ru.ts +10 -0
- package/node_modules/zod/src/v4/locales/sk.ts +121 -0
- package/node_modules/zod/src/v4/locales/sl.ts +3 -0
- package/node_modules/zod/src/v4/locales/sv.ts +5 -2
- package/node_modules/zod/src/v4/locales/ta.ts +3 -0
- package/node_modules/zod/src/v4/locales/th.ts +3 -0
- package/node_modules/zod/src/v4/locales/tk.ts +111 -0
- package/node_modules/zod/src/v4/locales/tr.ts +3 -0
- package/node_modules/zod/src/v4/locales/uk.ts +3 -0
- package/node_modules/zod/src/v4/locales/ur.ts +3 -0
- package/node_modules/zod/src/v4/locales/uz.ts +1 -0
- package/node_modules/zod/src/v4/locales/vi.ts +3 -0
- package/node_modules/zod/src/v4/locales/yo.ts +3 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +3 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +3 -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 +10 -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 +135 -56
- 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/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 +72 -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/string.test.ts +21 -0
- package/node_modules/zod/v3/ZodError.cjs +22 -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/types.cjs +7 -5
- package/node_modules/zod/v3/types.js +7 -5
- package/node_modules/zod/v4/classic/checks.cjs +2 -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/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 +39 -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 +43 -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 +30 -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 +136 -75
- package/node_modules/zod/v4/classic/from-json-schema.js +136 -75
- package/node_modules/zod/v4/classic/in-out.cjs +63 -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 +2 -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 +11 -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 +4 -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 +498 -398
- package/node_modules/zod/v4/classic/schemas.d.cts +53 -18
- package/node_modules/zod/v4/classic/schemas.d.ts +53 -18
- package/node_modules/zod/v4/classic/schemas.js +492 -396
- package/node_modules/zod/v4/core/api.cjs +23 -4
- package/node_modules/zod/v4/core/api.d.cts +13 -9
- package/node_modules/zod/v4/core/api.d.ts +13 -9
- package/node_modules/zod/v4/core/api.js +21 -4
- package/node_modules/zod/v4/core/checks.cjs +37 -31
- package/node_modules/zod/v4/core/checks.d.cts +13 -13
- package/node_modules/zod/v4/core/checks.d.ts +13 -13
- package/node_modules/zod/v4/core/checks.js +37 -31
- package/node_modules/zod/v4/core/compile.cjs +1813 -0
- package/node_modules/zod/v4/core/compile.d.cts +51 -0
- package/node_modules/zod/v4/core/compile.d.ts +51 -0
- package/node_modules/zod/v4/core/compile.js +1783 -0
- package/node_modules/zod/v4/core/core.cjs +81 -18
- 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 +82 -19
- package/node_modules/zod/v4/core/doc.cjs +5 -7
- 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 +5 -7
- package/node_modules/zod/v4/core/errors.cjs +110 -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 +110 -25
- package/node_modules/zod/v4/core/index.cjs +5 -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 +4 -0
- 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 +4 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +264 -95
- package/node_modules/zod/v4/core/json-schema-processors.js +243 -97
- 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 +272 -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 +265 -0
- package/node_modules/zod/v4/core/parse.cjs +96 -34
- 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 +94 -33
- package/node_modules/zod/v4/core/regexes.cjs +27 -15
- package/node_modules/zod/v4/core/regexes.d.cts +2 -0
- package/node_modules/zod/v4/core/regexes.d.ts +2 -0
- package/node_modules/zod/v4/core/regexes.js +24 -13
- package/node_modules/zod/v4/core/registries.js +2 -2
- package/node_modules/zod/v4/core/schemas.cjs +537 -326
- package/node_modules/zod/v4/core/schemas.d.cts +100 -31
- package/node_modules/zod/v4/core/schemas.d.ts +100 -31
- package/node_modules/zod/v4/core/schemas.js +526 -325
- package/node_modules/zod/v4/core/to-json-schema.cjs +242 -39
- package/node_modules/zod/v4/core/to-json-schema.d.cts +42 -3
- package/node_modules/zod/v4/core/to-json-schema.d.ts +42 -3
- package/node_modules/zod/v4/core/to-json-schema.js +241 -39
- package/node_modules/zod/v4/core/util.cjs +212 -31
- package/node_modules/zod/v4/core/util.d.cts +58 -1
- package/node_modules/zod/v4/core/util.d.ts +58 -1
- package/node_modules/zod/v4/core/util.js +202 -30
- package/node_modules/zod/v4/core/versions.cjs +2 -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 +195 -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 +15 -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 +3 -0
- package/node_modules/zod/v4/locales/ar.js +3 -0
- package/node_modules/zod/v4/locales/az.cjs +3 -0
- package/node_modules/zod/v4/locales/az.js +3 -0
- package/node_modules/zod/v4/locales/be.cjs +10 -0
- package/node_modules/zod/v4/locales/be.js +10 -0
- package/node_modules/zod/v4/locales/bg.cjs +3 -0
- package/node_modules/zod/v4/locales/bg.js +3 -0
- package/node_modules/zod/v4/locales/bn.cjs +138 -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 +111 -0
- package/node_modules/zod/v4/locales/ca.cjs +3 -0
- package/node_modules/zod/v4/locales/ca.js +3 -0
- package/node_modules/zod/v4/locales/ckb.cjs +158 -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 +131 -0
- package/node_modules/zod/v4/locales/cs.cjs +3 -0
- package/node_modules/zod/v4/locales/cs.js +3 -0
- package/node_modules/zod/v4/locales/da.cjs +5 -2
- package/node_modules/zod/v4/locales/da.js +5 -2
- package/node_modules/zod/v4/locales/de.cjs +3 -0
- package/node_modules/zod/v4/locales/de.js +3 -0
- package/node_modules/zod/v4/locales/el.cjs +1 -0
- package/node_modules/zod/v4/locales/el.js +1 -0
- package/node_modules/zod/v4/locales/en.cjs +14 -4
- package/node_modules/zod/v4/locales/en.js +14 -4
- package/node_modules/zod/v4/locales/eo.cjs +3 -0
- package/node_modules/zod/v4/locales/eo.js +3 -0
- package/node_modules/zod/v4/locales/es.cjs +2 -0
- package/node_modules/zod/v4/locales/es.js +2 -0
- package/node_modules/zod/v4/locales/fa.cjs +3 -0
- package/node_modules/zod/v4/locales/fa.js +3 -0
- package/node_modules/zod/v4/locales/fi.cjs +3 -0
- package/node_modules/zod/v4/locales/fi.js +3 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +3 -0
- package/node_modules/zod/v4/locales/fr-CA.js +3 -0
- package/node_modules/zod/v4/locales/fr.cjs +16 -14
- package/node_modules/zod/v4/locales/fr.js +16 -14
- package/node_modules/zod/v4/locales/gu.cjs +138 -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 +111 -0
- package/node_modules/zod/v4/locales/he.cjs +5 -0
- package/node_modules/zod/v4/locales/he.js +5 -0
- package/node_modules/zod/v4/locales/hi.cjs +136 -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 +109 -0
- package/node_modules/zod/v4/locales/hr.cjs +2 -0
- package/node_modules/zod/v4/locales/hr.js +2 -0
- package/node_modules/zod/v4/locales/hu.cjs +3 -0
- package/node_modules/zod/v4/locales/hu.js +3 -0
- package/node_modules/zod/v4/locales/hy.cjs +9 -0
- package/node_modules/zod/v4/locales/hy.js +9 -0
- package/node_modules/zod/v4/locales/id.cjs +3 -0
- package/node_modules/zod/v4/locales/id.js +3 -0
- package/node_modules/zod/v4/locales/index.cjs +22 -2
- package/node_modules/zod/v4/locales/index.d.cts +10 -0
- package/node_modules/zod/v4/locales/index.d.ts +10 -0
- package/node_modules/zod/v4/locales/index.js +10 -0
- package/node_modules/zod/v4/locales/is.cjs +3 -0
- package/node_modules/zod/v4/locales/is.js +3 -0
- package/node_modules/zod/v4/locales/it.cjs +3 -0
- package/node_modules/zod/v4/locales/it.js +3 -0
- package/node_modules/zod/v4/locales/ja.cjs +3 -0
- package/node_modules/zod/v4/locales/ja.js +3 -0
- package/node_modules/zod/v4/locales/ka.cjs +3 -0
- package/node_modules/zod/v4/locales/ka.js +3 -0
- package/node_modules/zod/v4/locales/km.cjs +3 -0
- package/node_modules/zod/v4/locales/km.js +3 -0
- package/node_modules/zod/v4/locales/kn.cjs +141 -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 +114 -0
- package/node_modules/zod/v4/locales/ko.cjs +3 -0
- package/node_modules/zod/v4/locales/ko.js +3 -0
- package/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/node_modules/zod/v4/locales/lt.js +2 -0
- package/node_modules/zod/v4/locales/mk.cjs +3 -0
- package/node_modules/zod/v4/locales/mk.js +3 -0
- package/node_modules/zod/v4/locales/ms.cjs +3 -0
- package/node_modules/zod/v4/locales/ms.js +3 -0
- package/node_modules/zod/v4/locales/ne.cjs +136 -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 +109 -0
- package/node_modules/zod/v4/locales/nl.cjs +3 -0
- package/node_modules/zod/v4/locales/nl.js +3 -0
- package/node_modules/zod/v4/locales/nn.cjs +138 -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 +111 -0
- package/node_modules/zod/v4/locales/no.cjs +5 -2
- package/node_modules/zod/v4/locales/no.js +5 -2
- package/node_modules/zod/v4/locales/ota.cjs +3 -0
- package/node_modules/zod/v4/locales/ota.js +3 -0
- package/node_modules/zod/v4/locales/pl.cjs +3 -0
- package/node_modules/zod/v4/locales/pl.js +3 -0
- package/node_modules/zod/v4/locales/ps.cjs +3 -0
- package/node_modules/zod/v4/locales/ps.js +3 -0
- package/node_modules/zod/v4/locales/pt-BR.cjs +168 -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 +141 -0
- package/node_modules/zod/v4/locales/pt.cjs +87 -55
- package/node_modules/zod/v4/locales/pt.js +87 -55
- package/node_modules/zod/v4/locales/ro.cjs +1 -0
- package/node_modules/zod/v4/locales/ro.js +1 -0
- package/node_modules/zod/v4/locales/ru.cjs +10 -0
- package/node_modules/zod/v4/locales/ru.js +10 -0
- package/node_modules/zod/v4/locales/sk.cjs +141 -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 +114 -0
- package/node_modules/zod/v4/locales/sl.cjs +3 -0
- package/node_modules/zod/v4/locales/sl.js +3 -0
- package/node_modules/zod/v4/locales/sv.cjs +5 -2
- package/node_modules/zod/v4/locales/sv.js +5 -2
- package/node_modules/zod/v4/locales/ta.cjs +3 -0
- package/node_modules/zod/v4/locales/ta.js +3 -0
- package/node_modules/zod/v4/locales/th.cjs +3 -0
- package/node_modules/zod/v4/locales/th.js +3 -0
- package/node_modules/zod/v4/locales/tk.cjs +132 -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 +105 -0
- package/node_modules/zod/v4/locales/tr.cjs +3 -0
- package/node_modules/zod/v4/locales/tr.js +3 -0
- package/node_modules/zod/v4/locales/uk.cjs +3 -0
- package/node_modules/zod/v4/locales/uk.js +3 -0
- package/node_modules/zod/v4/locales/ur.cjs +3 -0
- package/node_modules/zod/v4/locales/ur.js +3 -0
- package/node_modules/zod/v4/locales/uz.cjs +1 -0
- package/node_modules/zod/v4/locales/uz.js +1 -0
- package/node_modules/zod/v4/locales/vi.cjs +3 -0
- package/node_modules/zod/v4/locales/vi.js +3 -0
- package/node_modules/zod/v4/locales/yo.cjs +3 -0
- package/node_modules/zod/v4/locales/yo.js +3 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-CN.js +3 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +3 -0
- package/node_modules/zod/v4/locales/zh-TW.js +3 -0
- package/node_modules/zod/v4/mini/checks.cjs +2 -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/deep-partial.cjs +39 -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 +12 -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 +63 -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/parse.cjs +3 -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 +75 -47
- package/node_modules/zod/v4/mini/schemas.d.cts +43 -13
- package/node_modules/zod/v4/mini/schemas.d.ts +43 -13
- package/node_modules/zod/v4/mini/schemas.js +71 -45
- package/openclaw.plugin.json +25 -58
- package/package.json +10 -7
- package/dist/targets-BTQCYRZQ.js +0 -48
- package/node_modules/zod/src/v4/core/config.ts +0 -15
- /package/dist/{audio-preflight.runtime-BBfC9elv.js → .setup/audio-preflight.runtime-BBfC9elv.mjs} +0 -0
- /package/dist/{doctor-contract-w6FpMypv.js → .setup/doctor-contract-w6FpMypv.mjs} +0 -0
- /package/dist/{json-response-DXajw_FU.js → .setup/json-response-DXajw_FU.mjs} +0 -0
- /package/dist/{rolldown-runtime-8H4AJuhK.js → .setup/rolldown-runtime-8H4AJuhK.mjs} +0 -0
- /package/dist/{runtime-C5JxBWZp.js → .setup/runtime-C5JxBWZp.mjs} +0 -0
- /package/dist/{secret-contract-BCpDLdg9.js → .setup/secret-contract-BCpDLdg9.mjs} +0 -0
- /package/dist/{security-audit-shared-CK5rVR-1.js → .setup/security-audit-shared-CK5rVR-1.mjs} +0 -0
- /package/dist/{thread-bindings-BiL1wGqK.js → .setup/thread-bindings-BiL1wGqK.mjs} +0 -0
|
@@ -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.ZodTuple = 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.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.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 = void 0;
|
|
28
31
|
exports.string = string;
|
|
29
32
|
exports.email = email;
|
|
30
33
|
exports.guid = guid;
|
|
@@ -49,6 +52,7 @@ exports.cidrv6 = cidrv6;
|
|
|
49
52
|
exports.base64 = base64;
|
|
50
53
|
exports.base64url = base64url;
|
|
51
54
|
exports.e164 = e164;
|
|
55
|
+
exports.creditCard = creditCard;
|
|
52
56
|
exports.jwt = jwt;
|
|
53
57
|
exports.stringFormat = stringFormat;
|
|
54
58
|
exports.hostname = hostname;
|
|
@@ -124,200 +128,188 @@ const core = __importStar(require("../core/index.cjs"));
|
|
|
124
128
|
const index_js_1 = require("../core/index.cjs");
|
|
125
129
|
const processors = __importStar(require("../core/json-schema-processors.cjs"));
|
|
126
130
|
const to_json_schema_js_1 = require("../core/to-json-schema.cjs");
|
|
131
|
+
const en_js_1 = __importDefault(require("../locales/en.cjs"));
|
|
127
132
|
const checks = __importStar(require("./checks.cjs"));
|
|
128
|
-
const iso = __importStar(require("./iso.cjs"));
|
|
129
133
|
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
|
-
}
|
|
134
|
+
// 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.
|
|
135
|
+
function _ensureDefaultLocale() {
|
|
136
|
+
if (!core.globalConfig.localeError)
|
|
137
|
+
core.config((0, en_js_1.default)());
|
|
138
|
+
}
|
|
139
|
+
// the default memoizer is read by the core container init, which runs before `ZodType.init`, so each container calls this first
|
|
140
|
+
function _ensureDefaultMemoizer() {
|
|
141
|
+
if (!core.globalConfig.memoizer)
|
|
142
|
+
core.config({ memoizer: core.memoizer() });
|
|
177
143
|
}
|
|
178
144
|
exports.ZodType = core.$constructor("ZodType", (inst, def) => {
|
|
145
|
+
_ensureDefaultLocale();
|
|
179
146
|
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
147
|
inst.def = def;
|
|
188
148
|
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
149
|
return inst;
|
|
150
|
+
}, {
|
|
151
|
+
check(...chks) {
|
|
152
|
+
const def = this.def;
|
|
153
|
+
return this.clone(index_js_1.util.mergeDefs(def, {
|
|
154
|
+
checks: [
|
|
155
|
+
...(def.checks ?? []),
|
|
156
|
+
...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch),
|
|
157
|
+
],
|
|
158
|
+
}), { parent: true });
|
|
159
|
+
},
|
|
160
|
+
with(...chks) {
|
|
161
|
+
return this.check(...chks);
|
|
162
|
+
},
|
|
163
|
+
clone(def, params) {
|
|
164
|
+
return core.clone(this, def, params);
|
|
165
|
+
},
|
|
166
|
+
brand() {
|
|
167
|
+
return this;
|
|
168
|
+
},
|
|
169
|
+
register(reg, meta) {
|
|
170
|
+
reg.add(this, meta);
|
|
171
|
+
return this;
|
|
172
|
+
},
|
|
173
|
+
refine(check, params) {
|
|
174
|
+
return this.check(refine(check, params));
|
|
175
|
+
},
|
|
176
|
+
superRefine(refinement, params) {
|
|
177
|
+
return this.check(superRefine(refinement, params));
|
|
178
|
+
},
|
|
179
|
+
overwrite(fn) {
|
|
180
|
+
return this.check(checks.overwrite(fn));
|
|
181
|
+
},
|
|
182
|
+
optional() {
|
|
183
|
+
return optional(this);
|
|
184
|
+
},
|
|
185
|
+
exactOptional() {
|
|
186
|
+
return exactOptional(this);
|
|
187
|
+
},
|
|
188
|
+
nullable() {
|
|
189
|
+
return nullable(this);
|
|
190
|
+
},
|
|
191
|
+
nullish() {
|
|
192
|
+
return optional(nullable(this));
|
|
193
|
+
},
|
|
194
|
+
nonoptional(params) {
|
|
195
|
+
return nonoptional(this, params);
|
|
196
|
+
},
|
|
197
|
+
array() {
|
|
198
|
+
return array(this);
|
|
199
|
+
},
|
|
200
|
+
or(arg) {
|
|
201
|
+
return union([this, arg]);
|
|
202
|
+
},
|
|
203
|
+
and(arg) {
|
|
204
|
+
return intersection(this, arg);
|
|
205
|
+
},
|
|
206
|
+
transform(tx) {
|
|
207
|
+
return pipe(this, transform(tx));
|
|
208
|
+
},
|
|
209
|
+
default(d) {
|
|
210
|
+
return _default(this, d);
|
|
211
|
+
},
|
|
212
|
+
prefault(d) {
|
|
213
|
+
return prefault(this, d);
|
|
214
|
+
},
|
|
215
|
+
catch(params) {
|
|
216
|
+
return _catch(this, params);
|
|
217
|
+
},
|
|
218
|
+
pipe(target) {
|
|
219
|
+
return pipe(this, target);
|
|
220
|
+
},
|
|
221
|
+
readonly() {
|
|
222
|
+
return readonly(this);
|
|
223
|
+
},
|
|
224
|
+
describe(description) {
|
|
225
|
+
const cl = this.clone();
|
|
226
|
+
core.globalRegistry.add(cl, { description });
|
|
227
|
+
return cl;
|
|
228
|
+
},
|
|
229
|
+
meta(...args) {
|
|
230
|
+
// 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.
|
|
231
|
+
if (args.length === 0)
|
|
232
|
+
return core.globalRegistry.get(this);
|
|
233
|
+
const cl = this.clone();
|
|
234
|
+
core.globalRegistry.add(cl, args[0]);
|
|
235
|
+
return cl;
|
|
236
|
+
},
|
|
237
|
+
isOptional() {
|
|
238
|
+
return this.safeParse(undefined).success;
|
|
239
|
+
},
|
|
240
|
+
isNullable() {
|
|
241
|
+
return this.safeParse(null).success;
|
|
242
|
+
},
|
|
243
|
+
apply(fn, ...args) {
|
|
244
|
+
return args.length === 0 ? fn(this) : fn(this, ...args);
|
|
245
|
+
},
|
|
246
|
+
// Overrides core's `~standard` to add `jsonSchema`. Must stay a prototype entry: redefining it per instance demotes instances to dictionary mode.
|
|
247
|
+
get "~standard"() {
|
|
248
|
+
return index_js_1.util.hide(this, "~standard", {
|
|
249
|
+
...core.standardProps(this),
|
|
250
|
+
jsonSchema: {
|
|
251
|
+
input: (0, to_json_schema_js_1.createStandardJSONSchemaMethod)(this, "input"),
|
|
252
|
+
output: (0, to_json_schema_js_1.createStandardJSONSchemaMethod)(this, "output"),
|
|
253
|
+
},
|
|
254
|
+
});
|
|
255
|
+
},
|
|
256
|
+
set "~standard"(value) {
|
|
257
|
+
index_js_1.util.own(this, "~standard", value);
|
|
258
|
+
},
|
|
259
|
+
parse: function _parse(data, params) {
|
|
260
|
+
return parse.parse(this, data, params, { callee: _parse });
|
|
261
|
+
},
|
|
262
|
+
parseAsync: async function _parseAsync(data, params) {
|
|
263
|
+
return await parse.parseAsync(this, data, params, { callee: _parseAsync });
|
|
264
|
+
},
|
|
265
|
+
safeParse(data, params) {
|
|
266
|
+
return parse.safeParse(this, data, params);
|
|
267
|
+
},
|
|
268
|
+
async safeParseAsync(data, params) {
|
|
269
|
+
return parse.safeParseAsync(this, data, params);
|
|
270
|
+
},
|
|
271
|
+
// `spa` is an alias: same function object as `safeParseAsync`, as before.
|
|
272
|
+
get spa() {
|
|
273
|
+
return this?.safeParseAsync;
|
|
274
|
+
},
|
|
275
|
+
set spa(value) {
|
|
276
|
+
index_js_1.util.own(this, "spa", value);
|
|
277
|
+
},
|
|
278
|
+
encode: function _encode(data, params) {
|
|
279
|
+
return parse.encode(this, data, params, { callee: _encode });
|
|
280
|
+
},
|
|
281
|
+
decode: function _decode(data, params) {
|
|
282
|
+
return parse.decode(this, data, params, { callee: _decode });
|
|
283
|
+
},
|
|
284
|
+
encodeAsync: async function _encodeAsync(data, params) {
|
|
285
|
+
return await parse.encodeAsync(this, data, params, { callee: _encodeAsync });
|
|
286
|
+
},
|
|
287
|
+
decodeAsync: async function _decodeAsync(data, params) {
|
|
288
|
+
return await parse.decodeAsync(this, data, params, { callee: _decodeAsync });
|
|
289
|
+
},
|
|
290
|
+
safeEncode(data, params) {
|
|
291
|
+
return parse.safeEncode(this, data, params);
|
|
292
|
+
},
|
|
293
|
+
safeDecode(data, params) {
|
|
294
|
+
return parse.safeDecode(this, data, params);
|
|
295
|
+
},
|
|
296
|
+
async safeEncodeAsync(data, params) {
|
|
297
|
+
return parse.safeEncodeAsync(this, data, params);
|
|
298
|
+
},
|
|
299
|
+
async safeDecodeAsync(data, params) {
|
|
300
|
+
return parse.safeDecodeAsync(this, data, params);
|
|
301
|
+
},
|
|
302
|
+
toJSONSchema(params) {
|
|
303
|
+
return (0, to_json_schema_js_1.createToJSONSchemaMethod)(this, {})(params);
|
|
304
|
+
},
|
|
305
|
+
// Reads through to the registry on every access, so it must not cache.
|
|
306
|
+
get description() {
|
|
307
|
+
return core.globalRegistry.get(this)?.description;
|
|
308
|
+
},
|
|
309
|
+
// No setter: `schema._def = x` throws, as it did when `_def` was a non-writable own property.
|
|
310
|
+
get _def() {
|
|
311
|
+
return this._zod.def;
|
|
312
|
+
},
|
|
321
313
|
});
|
|
322
314
|
/** @internal */
|
|
323
315
|
exports._ZodString = core.$constructor("_ZodString", (inst, def) => {
|
|
@@ -328,85 +320,135 @@ exports._ZodString = core.$constructor("_ZodString", (inst, def) => {
|
|
|
328
320
|
inst.format = bag.format ?? null;
|
|
329
321
|
inst.minLength = bag.minimum ?? null;
|
|
330
322
|
inst.maxLength = bag.maximum ?? null;
|
|
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
|
-
});
|
|
323
|
+
}, {
|
|
324
|
+
regex(...args) {
|
|
325
|
+
return this.check(checks.regex(...args));
|
|
326
|
+
},
|
|
327
|
+
includes(...args) {
|
|
328
|
+
return this.check(checks.includes(...args));
|
|
329
|
+
},
|
|
330
|
+
startsWith(...args) {
|
|
331
|
+
return this.check(checks.startsWith(...args));
|
|
332
|
+
},
|
|
333
|
+
endsWith(...args) {
|
|
334
|
+
return this.check(checks.endsWith(...args));
|
|
335
|
+
},
|
|
336
|
+
min(...args) {
|
|
337
|
+
return this.check(checks.minLength(...args));
|
|
338
|
+
},
|
|
339
|
+
max(...args) {
|
|
340
|
+
return this.check(checks.maxLength(...args));
|
|
341
|
+
},
|
|
342
|
+
length(...args) {
|
|
343
|
+
return this.check(checks.length(...args));
|
|
344
|
+
},
|
|
345
|
+
nonempty(...args) {
|
|
346
|
+
return this.check(checks.minLength(1, ...args));
|
|
347
|
+
},
|
|
348
|
+
lowercase(params) {
|
|
349
|
+
return this.check(checks.lowercase(params));
|
|
350
|
+
},
|
|
351
|
+
uppercase(params) {
|
|
352
|
+
return this.check(checks.uppercase(params));
|
|
353
|
+
},
|
|
354
|
+
trim() {
|
|
355
|
+
return this.check(checks.trim());
|
|
356
|
+
},
|
|
357
|
+
normalize(...args) {
|
|
358
|
+
return this.check(checks.normalize(...args));
|
|
359
|
+
},
|
|
360
|
+
toLowerCase() {
|
|
361
|
+
return this.check(checks.toLowerCase());
|
|
362
|
+
},
|
|
363
|
+
toUpperCase() {
|
|
364
|
+
return this.check(checks.toUpperCase());
|
|
365
|
+
},
|
|
366
|
+
slugify() {
|
|
367
|
+
return this.check(checks.slugify());
|
|
368
|
+
},
|
|
378
369
|
});
|
|
379
370
|
exports.ZodString = core.$constructor("ZodString", (inst, def) => {
|
|
380
371
|
core.$ZodString.init(inst, def);
|
|
381
372
|
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
|
-
|
|
373
|
+
}, {
|
|
374
|
+
email(params) {
|
|
375
|
+
return this.check(core._email(exports.ZodEmail, params));
|
|
376
|
+
},
|
|
377
|
+
url(params) {
|
|
378
|
+
return this.check(core._url(exports.ZodURL, params));
|
|
379
|
+
},
|
|
380
|
+
jwt(params) {
|
|
381
|
+
return this.check(core._jwt(exports.ZodJWT, params));
|
|
382
|
+
},
|
|
383
|
+
emoji(params) {
|
|
384
|
+
return this.check(core._emoji(exports.ZodEmoji, params));
|
|
385
|
+
},
|
|
386
|
+
guid(params) {
|
|
387
|
+
return this.check(core._guid(exports.ZodGUID, params));
|
|
388
|
+
},
|
|
389
|
+
uuid(params) {
|
|
390
|
+
return this.check(core._uuid(exports.ZodUUID, params));
|
|
391
|
+
},
|
|
392
|
+
uuidv4(params) {
|
|
393
|
+
return this.check(core._uuidv4(exports.ZodUUID, params));
|
|
394
|
+
},
|
|
395
|
+
uuidv6(params) {
|
|
396
|
+
return this.check(core._uuidv6(exports.ZodUUID, params));
|
|
397
|
+
},
|
|
398
|
+
uuidv7(params) {
|
|
399
|
+
return this.check(core._uuidv7(exports.ZodUUID, params));
|
|
400
|
+
},
|
|
401
|
+
nanoid(params) {
|
|
402
|
+
return this.check(core._nanoid(exports.ZodNanoID, params));
|
|
403
|
+
},
|
|
404
|
+
cuid(params) {
|
|
405
|
+
return this.check(core._cuid(exports.ZodCUID, params));
|
|
406
|
+
},
|
|
407
|
+
cuid2(params) {
|
|
408
|
+
return this.check(core._cuid2(exports.ZodCUID2, params));
|
|
409
|
+
},
|
|
410
|
+
ulid(params) {
|
|
411
|
+
return this.check(core._ulid(exports.ZodULID, params));
|
|
412
|
+
},
|
|
413
|
+
base64(params) {
|
|
414
|
+
return this.check(core._base64(exports.ZodBase64, params));
|
|
415
|
+
},
|
|
416
|
+
base64url(params) {
|
|
417
|
+
return this.check(core._base64url(exports.ZodBase64URL, params));
|
|
418
|
+
},
|
|
419
|
+
xid(params) {
|
|
420
|
+
return this.check(core._xid(exports.ZodXID, params));
|
|
421
|
+
},
|
|
422
|
+
ksuid(params) {
|
|
423
|
+
return this.check(core._ksuid(exports.ZodKSUID, params));
|
|
424
|
+
},
|
|
425
|
+
ipv4(params) {
|
|
426
|
+
return this.check(core._ipv4(exports.ZodIPv4, params));
|
|
427
|
+
},
|
|
428
|
+
ipv6(params) {
|
|
429
|
+
return this.check(core._ipv6(exports.ZodIPv6, params));
|
|
430
|
+
},
|
|
431
|
+
cidrv4(params) {
|
|
432
|
+
return this.check(core._cidrv4(exports.ZodCIDRv4, params));
|
|
433
|
+
},
|
|
434
|
+
cidrv6(params) {
|
|
435
|
+
return this.check(core._cidrv6(exports.ZodCIDRv6, params));
|
|
436
|
+
},
|
|
437
|
+
e164(params) {
|
|
438
|
+
return this.check(core._e164(exports.ZodE164, params));
|
|
439
|
+
},
|
|
440
|
+
datetime(params) {
|
|
441
|
+
return this.check(core._isoDateTime(exports.ZodISODateTime, params));
|
|
442
|
+
},
|
|
443
|
+
date(params) {
|
|
444
|
+
return this.check(core._isoDate(exports.ZodISODate, params));
|
|
445
|
+
},
|
|
446
|
+
time(params) {
|
|
447
|
+
return this.check(core._isoTime(exports.ZodISOTime, params));
|
|
448
|
+
},
|
|
449
|
+
duration(params) {
|
|
450
|
+
return this.check(core._isoDuration(exports.ZodISODuration, params));
|
|
451
|
+
},
|
|
410
452
|
});
|
|
411
453
|
function string(params) {
|
|
412
454
|
return core._string(exports.ZodString, params);
|
|
@@ -415,6 +457,22 @@ exports.ZodStringFormat = core.$constructor("ZodStringFormat", (inst, def) => {
|
|
|
415
457
|
core.$ZodStringFormat.init(inst, def);
|
|
416
458
|
exports._ZodString.init(inst, def);
|
|
417
459
|
});
|
|
460
|
+
exports.ZodISODateTime = core.$constructor("ZodISODateTime", (inst, def) => {
|
|
461
|
+
core.$ZodISODateTime.init(inst, def);
|
|
462
|
+
exports.ZodStringFormat.init(inst, def);
|
|
463
|
+
});
|
|
464
|
+
exports.ZodISODate = core.$constructor("ZodISODate", (inst, def) => {
|
|
465
|
+
core.$ZodISODate.init(inst, def);
|
|
466
|
+
exports.ZodStringFormat.init(inst, def);
|
|
467
|
+
});
|
|
468
|
+
exports.ZodISOTime = core.$constructor("ZodISOTime", (inst, def) => {
|
|
469
|
+
core.$ZodISOTime.init(inst, def);
|
|
470
|
+
exports.ZodStringFormat.init(inst, def);
|
|
471
|
+
});
|
|
472
|
+
exports.ZodISODuration = core.$constructor("ZodISODuration", (inst, def) => {
|
|
473
|
+
core.$ZodISODuration.init(inst, def);
|
|
474
|
+
exports.ZodStringFormat.init(inst, def);
|
|
475
|
+
});
|
|
418
476
|
exports.ZodEmail = core.$constructor("ZodEmail", (inst, def) => {
|
|
419
477
|
// ZodStringFormat.init(inst, def);
|
|
420
478
|
core.$ZodEmail.init(inst, def);
|
|
@@ -595,6 +653,13 @@ exports.ZodE164 = core.$constructor("ZodE164", (inst, def) => {
|
|
|
595
653
|
function e164(params) {
|
|
596
654
|
return core._e164(exports.ZodE164, params);
|
|
597
655
|
}
|
|
656
|
+
exports.ZodCreditCard = core.$constructor("ZodCreditCard", (inst, def) => {
|
|
657
|
+
core.$ZodCreditCard.init(inst, def);
|
|
658
|
+
exports.ZodStringFormat.init(inst, def);
|
|
659
|
+
});
|
|
660
|
+
function creditCard(params) {
|
|
661
|
+
return core._creditCard(exports.ZodCreditCard, params);
|
|
662
|
+
}
|
|
598
663
|
exports.ZodJWT = core.$constructor("ZodJWT", (inst, def) => {
|
|
599
664
|
// ZodStringFormat.init(inst, def);
|
|
600
665
|
core.$ZodJWT.init(inst, def);
|
|
@@ -629,53 +694,6 @@ exports.ZodNumber = core.$constructor("ZodNumber", (inst, def) => {
|
|
|
629
694
|
core.$ZodNumber.init(inst, def);
|
|
630
695
|
exports.ZodType.init(inst, def);
|
|
631
696
|
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
697
|
const bag = inst._zod.bag;
|
|
680
698
|
inst.minValue =
|
|
681
699
|
Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
|
|
@@ -684,6 +702,52 @@ exports.ZodNumber = core.$constructor("ZodNumber", (inst, def) => {
|
|
|
684
702
|
inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5);
|
|
685
703
|
inst.isFinite = true;
|
|
686
704
|
inst.format = bag.format ?? null;
|
|
705
|
+
}, {
|
|
706
|
+
gt(value, params) {
|
|
707
|
+
return this.check(checks.gt(value, params));
|
|
708
|
+
},
|
|
709
|
+
gte(value, params) {
|
|
710
|
+
return this.check(checks.gte(value, params));
|
|
711
|
+
},
|
|
712
|
+
min(value, params) {
|
|
713
|
+
return this.check(checks.gte(value, params));
|
|
714
|
+
},
|
|
715
|
+
lt(value, params) {
|
|
716
|
+
return this.check(checks.lt(value, params));
|
|
717
|
+
},
|
|
718
|
+
lte(value, params) {
|
|
719
|
+
return this.check(checks.lte(value, params));
|
|
720
|
+
},
|
|
721
|
+
max(value, params) {
|
|
722
|
+
return this.check(checks.lte(value, params));
|
|
723
|
+
},
|
|
724
|
+
int(params) {
|
|
725
|
+
return this.check(int(params));
|
|
726
|
+
},
|
|
727
|
+
safe(params) {
|
|
728
|
+
return this.check(int(params));
|
|
729
|
+
},
|
|
730
|
+
positive(params) {
|
|
731
|
+
return this.check(checks.gt(0, params));
|
|
732
|
+
},
|
|
733
|
+
nonnegative(params) {
|
|
734
|
+
return this.check(checks.gte(0, params));
|
|
735
|
+
},
|
|
736
|
+
negative(params) {
|
|
737
|
+
return this.check(checks.lt(0, params));
|
|
738
|
+
},
|
|
739
|
+
nonpositive(params) {
|
|
740
|
+
return this.check(checks.lte(0, params));
|
|
741
|
+
},
|
|
742
|
+
multipleOf(value, params) {
|
|
743
|
+
return this.check(checks.multipleOf(value, params));
|
|
744
|
+
},
|
|
745
|
+
step(value, params) {
|
|
746
|
+
return this.check(checks.multipleOf(value, params));
|
|
747
|
+
},
|
|
748
|
+
finite() {
|
|
749
|
+
return this;
|
|
750
|
+
},
|
|
687
751
|
});
|
|
688
752
|
function number(params) {
|
|
689
753
|
return core._number(exports.ZodNumber, params);
|
|
@@ -719,23 +783,44 @@ exports.ZodBigInt = core.$constructor("ZodBigInt", (inst, def) => {
|
|
|
719
783
|
core.$ZodBigInt.init(inst, def);
|
|
720
784
|
exports.ZodType.init(inst, def);
|
|
721
785
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.bigintProcessor(inst, ctx, json, params);
|
|
722
|
-
inst.gte = (value, params) => inst.check(checks.gte(value, params));
|
|
723
|
-
inst.min = (value, params) => inst.check(checks.gte(value, params));
|
|
724
|
-
inst.gt = (value, params) => inst.check(checks.gt(value, params));
|
|
725
|
-
inst.gte = (value, params) => inst.check(checks.gte(value, params));
|
|
726
|
-
inst.min = (value, params) => inst.check(checks.gte(value, params));
|
|
727
|
-
inst.lt = (value, params) => inst.check(checks.lt(value, params));
|
|
728
|
-
inst.lte = (value, params) => inst.check(checks.lte(value, params));
|
|
729
|
-
inst.max = (value, params) => inst.check(checks.lte(value, params));
|
|
730
|
-
inst.positive = (params) => inst.check(checks.gt(BigInt(0), params));
|
|
731
|
-
inst.negative = (params) => inst.check(checks.lt(BigInt(0), params));
|
|
732
|
-
inst.nonpositive = (params) => inst.check(checks.lte(BigInt(0), params));
|
|
733
|
-
inst.nonnegative = (params) => inst.check(checks.gte(BigInt(0), params));
|
|
734
|
-
inst.multipleOf = (value, params) => inst.check(checks.multipleOf(value, params));
|
|
735
786
|
const bag = inst._zod.bag;
|
|
736
787
|
inst.minValue = bag.minimum ?? null;
|
|
737
788
|
inst.maxValue = bag.maximum ?? null;
|
|
738
789
|
inst.format = bag.format ?? null;
|
|
790
|
+
}, {
|
|
791
|
+
gte(value, params) {
|
|
792
|
+
return this.check(checks.gte(value, params));
|
|
793
|
+
},
|
|
794
|
+
min(value, params) {
|
|
795
|
+
return this.check(checks.gte(value, params));
|
|
796
|
+
},
|
|
797
|
+
gt(value, params) {
|
|
798
|
+
return this.check(checks.gt(value, params));
|
|
799
|
+
},
|
|
800
|
+
lt(value, params) {
|
|
801
|
+
return this.check(checks.lt(value, params));
|
|
802
|
+
},
|
|
803
|
+
lte(value, params) {
|
|
804
|
+
return this.check(checks.lte(value, params));
|
|
805
|
+
},
|
|
806
|
+
max(value, params) {
|
|
807
|
+
return this.check(checks.lte(value, params));
|
|
808
|
+
},
|
|
809
|
+
positive(params) {
|
|
810
|
+
return this.check(checks.gt(BigInt(0), params));
|
|
811
|
+
},
|
|
812
|
+
negative(params) {
|
|
813
|
+
return this.check(checks.lt(BigInt(0), params));
|
|
814
|
+
},
|
|
815
|
+
nonpositive(params) {
|
|
816
|
+
return this.check(checks.lte(BigInt(0), params));
|
|
817
|
+
},
|
|
818
|
+
nonnegative(params) {
|
|
819
|
+
return this.check(checks.gte(BigInt(0), params));
|
|
820
|
+
},
|
|
821
|
+
multipleOf(value, params) {
|
|
822
|
+
return this.check(checks.multipleOf(value, params));
|
|
823
|
+
},
|
|
739
824
|
});
|
|
740
825
|
function bigint(params) {
|
|
741
826
|
return core._bigint(exports.ZodBigInt, params);
|
|
@@ -744,11 +829,9 @@ exports.ZodBigIntFormat = core.$constructor("ZodBigIntFormat", (inst, def) => {
|
|
|
744
829
|
core.$ZodBigIntFormat.init(inst, def);
|
|
745
830
|
exports.ZodBigInt.init(inst, def);
|
|
746
831
|
});
|
|
747
|
-
// int64
|
|
748
832
|
function int64(params) {
|
|
749
833
|
return core._int64(exports.ZodBigIntFormat, params);
|
|
750
834
|
}
|
|
751
|
-
// uint64
|
|
752
835
|
function uint64(params) {
|
|
753
836
|
return core._uint64(exports.ZodBigIntFormat, params);
|
|
754
837
|
}
|
|
@@ -822,27 +905,27 @@ function date(params) {
|
|
|
822
905
|
return core._date(exports.ZodDate, params);
|
|
823
906
|
}
|
|
824
907
|
exports.ZodArray = core.$constructor("ZodArray", (inst, def) => {
|
|
908
|
+
_ensureDefaultMemoizer();
|
|
825
909
|
core.$ZodArray.init(inst, def);
|
|
826
910
|
exports.ZodType.init(inst, def);
|
|
827
911
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.arrayProcessor(inst, ctx, json, params);
|
|
828
912
|
inst.element = def.element;
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
});
|
|
913
|
+
}, {
|
|
914
|
+
min(n, params) {
|
|
915
|
+
return this.check(checks.minLength(n, params));
|
|
916
|
+
},
|
|
917
|
+
nonempty(params) {
|
|
918
|
+
return this.check(checks.minLength(1, params));
|
|
919
|
+
},
|
|
920
|
+
max(n, params) {
|
|
921
|
+
return this.check(checks.maxLength(n, params));
|
|
922
|
+
},
|
|
923
|
+
length(n, params) {
|
|
924
|
+
return this.check(checks.length(n, params));
|
|
925
|
+
},
|
|
926
|
+
unwrap() {
|
|
927
|
+
return this.element;
|
|
928
|
+
},
|
|
846
929
|
});
|
|
847
930
|
function array(element, params) {
|
|
848
931
|
return core._array(exports.ZodArray, element, params);
|
|
@@ -853,53 +936,54 @@ function keyof(schema) {
|
|
|
853
936
|
return _enum(Object.keys(shape));
|
|
854
937
|
}
|
|
855
938
|
exports.ZodObject = core.$constructor("ZodObject", (inst, def) => {
|
|
939
|
+
_ensureDefaultMemoizer();
|
|
856
940
|
core.$ZodObjectJIT.init(inst, def);
|
|
857
941
|
exports.ZodType.init(inst, def);
|
|
858
942
|
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
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
}
|
|
943
|
+
index_js_1.util.installLazyProp(inst, "shape", (self) => self._zod.def.shape, false);
|
|
944
|
+
}, {
|
|
945
|
+
keyof() {
|
|
946
|
+
return _enum(Object.keys(this._zod.def.shape));
|
|
947
|
+
},
|
|
948
|
+
catchall(catchall) {
|
|
949
|
+
return this.clone({ ...this._zod.def, catchall: catchall });
|
|
950
|
+
},
|
|
951
|
+
passthrough() {
|
|
952
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
953
|
+
},
|
|
954
|
+
loose() {
|
|
955
|
+
return this.clone({ ...this._zod.def, catchall: unknown() });
|
|
956
|
+
},
|
|
957
|
+
strict() {
|
|
958
|
+
return this.clone({ ...this._zod.def, catchall: never() });
|
|
959
|
+
},
|
|
960
|
+
strip() {
|
|
961
|
+
return this.clone({ ...this._zod.def, catchall: undefined });
|
|
962
|
+
},
|
|
963
|
+
extend(incoming) {
|
|
964
|
+
return index_js_1.util.extend(this, incoming);
|
|
965
|
+
},
|
|
966
|
+
safeExtend(incoming) {
|
|
967
|
+
return index_js_1.util.safeExtend(this, incoming);
|
|
968
|
+
},
|
|
969
|
+
merge(other) {
|
|
970
|
+
return index_js_1.util.merge(this, other);
|
|
971
|
+
},
|
|
972
|
+
pick(mask) {
|
|
973
|
+
return index_js_1.util.pick(this, mask);
|
|
974
|
+
},
|
|
975
|
+
omit(mask) {
|
|
976
|
+
return index_js_1.util.omit(this, mask);
|
|
977
|
+
},
|
|
978
|
+
partial(...args) {
|
|
979
|
+
return index_js_1.util.partial(exports.ZodOptional, this, args[0]);
|
|
980
|
+
},
|
|
981
|
+
exactPartial(...args) {
|
|
982
|
+
return index_js_1.util.partial(exports.ZodExactOptional, this, args[0], "exactPartial");
|
|
983
|
+
},
|
|
984
|
+
required(...args) {
|
|
985
|
+
return index_js_1.util.required(exports.ZodNonOptional, this, args[0]);
|
|
986
|
+
},
|
|
903
987
|
});
|
|
904
988
|
function object(shape, params) {
|
|
905
989
|
const def = {
|
|
@@ -965,7 +1049,7 @@ function discriminatedUnion(discriminator, options, params) {
|
|
|
965
1049
|
// const [options, params] = args;
|
|
966
1050
|
return new exports.ZodDiscriminatedUnion({
|
|
967
1051
|
type: "union",
|
|
968
|
-
options,
|
|
1052
|
+
options: options,
|
|
969
1053
|
discriminator,
|
|
970
1054
|
...index_js_1.util.normalizeParams(params),
|
|
971
1055
|
});
|
|
@@ -983,13 +1067,27 @@ function intersection(left, right) {
|
|
|
983
1067
|
});
|
|
984
1068
|
}
|
|
985
1069
|
exports.ZodTuple = core.$constructor("ZodTuple", (inst, def) => {
|
|
1070
|
+
_ensureDefaultMemoizer();
|
|
986
1071
|
core.$ZodTuple.init(inst, def);
|
|
987
1072
|
exports.ZodType.init(inst, def);
|
|
988
1073
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.tupleProcessor(inst, ctx, json, params);
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
1074
|
+
}, {
|
|
1075
|
+
rest(rest) {
|
|
1076
|
+
return this.clone({
|
|
1077
|
+
...this._zod.def,
|
|
1078
|
+
rest: rest,
|
|
1079
|
+
});
|
|
1080
|
+
},
|
|
1081
|
+
partial() {
|
|
1082
|
+
const def = this._zod.def;
|
|
1083
|
+
// a refinement was authored against the full arity; partialing would run it on a shorter array
|
|
1084
|
+
if (def.checks?.length)
|
|
1085
|
+
throw new Error(".partial() cannot be used on tuple schemas containing refinements");
|
|
1086
|
+
return this.clone({
|
|
1087
|
+
...def,
|
|
1088
|
+
items: def.items.map((item) => new exports.ZodOptional({ type: "optional", innerType: item })),
|
|
1089
|
+
});
|
|
1090
|
+
},
|
|
993
1091
|
});
|
|
994
1092
|
function tuple(items, _paramsOrRest, _params) {
|
|
995
1093
|
const hasRest = _paramsOrRest instanceof core.$ZodType;
|
|
@@ -1003,6 +1101,7 @@ function tuple(items, _paramsOrRest, _params) {
|
|
|
1003
1101
|
});
|
|
1004
1102
|
}
|
|
1005
1103
|
exports.ZodRecord = core.$constructor("ZodRecord", (inst, def) => {
|
|
1104
|
+
_ensureDefaultMemoizer();
|
|
1006
1105
|
core.$ZodRecord.init(inst, def);
|
|
1007
1106
|
exports.ZodType.init(inst, def);
|
|
1008
1107
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.recordProcessor(inst, ctx, json, params);
|
|
@@ -1028,13 +1127,12 @@ function record(keyType, valueType, params) {
|
|
|
1028
1127
|
}
|
|
1029
1128
|
// type alksjf = core.output<core.$ZodRecordKey>;
|
|
1030
1129
|
function partialRecord(keyType, valueType, params) {
|
|
1031
|
-
const k = core.clone(keyType);
|
|
1032
|
-
k._zod.values = undefined;
|
|
1033
1130
|
return new exports.ZodRecord({
|
|
1034
1131
|
type: "record",
|
|
1035
|
-
keyType
|
|
1132
|
+
keyType,
|
|
1036
1133
|
valueType: valueType,
|
|
1037
1134
|
...index_js_1.util.normalizeParams(params),
|
|
1135
|
+
partial: true,
|
|
1038
1136
|
});
|
|
1039
1137
|
}
|
|
1040
1138
|
function looseRecord(keyType, valueType, params) {
|
|
@@ -1047,6 +1145,7 @@ function looseRecord(keyType, valueType, params) {
|
|
|
1047
1145
|
});
|
|
1048
1146
|
}
|
|
1049
1147
|
exports.ZodMap = core.$constructor("ZodMap", (inst, def) => {
|
|
1148
|
+
_ensureDefaultMemoizer();
|
|
1050
1149
|
core.$ZodMap.init(inst, def);
|
|
1051
1150
|
exports.ZodType.init(inst, def);
|
|
1052
1151
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.mapProcessor(inst, ctx, json, params);
|
|
@@ -1066,6 +1165,7 @@ function map(keyType, valueType, params) {
|
|
|
1066
1165
|
});
|
|
1067
1166
|
}
|
|
1068
1167
|
exports.ZodSet = core.$constructor("ZodSet", (inst, def) => {
|
|
1168
|
+
_ensureDefaultMemoizer();
|
|
1069
1169
|
core.$ZodSet.init(inst, def);
|
|
1070
1170
|
exports.ZodType.init(inst, def);
|
|
1071
1171
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.setProcessor(inst, ctx, json, params);
|
|
@@ -1176,6 +1276,7 @@ function file(params) {
|
|
|
1176
1276
|
return core._file(exports.ZodFile, params);
|
|
1177
1277
|
}
|
|
1178
1278
|
exports.ZodTransform = core.$constructor("ZodTransform", (inst, def) => {
|
|
1279
|
+
_ensureDefaultMemoizer();
|
|
1179
1280
|
core.$ZodTransform.init(inst, def);
|
|
1180
1281
|
exports.ZodType.init(inst, def);
|
|
1181
1282
|
inst._zod.processJSONSchema = (ctx, json, params) => processors.transformProcessor(inst, ctx, json, params);
|
|
@@ -1193,7 +1294,8 @@ exports.ZodTransform = core.$constructor("ZodTransform", (inst, def) => {
|
|
|
1193
1294
|
if (_issue.fatal)
|
|
1194
1295
|
_issue.continue = false;
|
|
1195
1296
|
_issue.code ?? (_issue.code = "custom");
|
|
1196
|
-
|
|
1297
|
+
if (!("input" in _issue))
|
|
1298
|
+
_issue.input = payload.value;
|
|
1197
1299
|
_issue.inst ?? (_issue.inst = inst);
|
|
1198
1300
|
// _issue.continue ??= true;
|
|
1199
1301
|
payload.issues.push(index_js_1.util.issue(_issue));
|
|
@@ -1203,12 +1305,10 @@ exports.ZodTransform = core.$constructor("ZodTransform", (inst, def) => {
|
|
|
1203
1305
|
if (output instanceof Promise) {
|
|
1204
1306
|
return output.then((output) => {
|
|
1205
1307
|
payload.value = output;
|
|
1206
|
-
payload.fallback = true;
|
|
1207
1308
|
return payload;
|
|
1208
1309
|
});
|
|
1209
1310
|
}
|
|
1210
1311
|
payload.value = output;
|
|
1211
|
-
payload.fallback = true;
|
|
1212
1312
|
return payload;
|
|
1213
1313
|
};
|
|
1214
1314
|
});
|
|
@@ -1325,7 +1425,7 @@ function _catch(innerType, catchValue) {
|
|
|
1325
1425
|
return new exports.ZodCatch({
|
|
1326
1426
|
type: "catch",
|
|
1327
1427
|
innerType: innerType,
|
|
1328
|
-
catchValue: (typeof catchValue === "function" ? catchValue : (
|
|
1428
|
+
catchValue: (typeof catchValue === "function" ? catchValue : core.util.constantCatch(catchValue)),
|
|
1329
1429
|
});
|
|
1330
1430
|
}
|
|
1331
1431
|
exports.ZodNaN = core.$constructor("ZodNaN", (inst, def) => {
|