@wopee-io/wopee.wdio 5.2.2 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/build/domain/model/config.interface.d.ts +9 -9
- package/build/utils/versionMetadata.d.ts.map +1 -1
- package/build/utils/versionMetadata.js +2 -2
- package/node_modules/@autonomous-testing/sdk/.github/workflows/ci_cd.yaml +52 -20
- package/node_modules/@autonomous-testing/sdk/README.md +129 -36
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/index.d.ts +2 -2
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/index.js +3 -1
- package/node_modules/@autonomous-testing/sdk/build/index.d.ts +0 -1
- package/node_modules/@autonomous-testing/sdk/build/index.js +0 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/adapter.js +6 -8
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/axios-config.d.ts +16 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/axios-config.js +121 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/errors.d.ts +20 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/errors.js +178 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/factories.js +1 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/interface.d.ts +4 -1
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/interface.js +14 -3
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloAdapterService.js +6 -2
- package/node_modules/@autonomous-testing/sdk/build/shared/metadata/versionMetadata.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/error.interface.d.ts +13 -1
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/error.interface.js +8 -1
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/index.d.ts +2 -2
- package/node_modules/@autonomous-testing/sdk/package.json +27 -11
- package/node_modules/agent-base/LICENSE +22 -0
- package/node_modules/agent-base/README.md +69 -0
- package/node_modules/agent-base/dist/helpers.d.ts +15 -0
- package/node_modules/agent-base/dist/helpers.d.ts.map +1 -0
- package/node_modules/agent-base/dist/helpers.js +66 -0
- package/node_modules/agent-base/dist/helpers.js.map +1 -0
- package/node_modules/agent-base/dist/index.d.ts +41 -0
- package/node_modules/agent-base/dist/index.d.ts.map +1 -0
- package/node_modules/agent-base/dist/index.js +178 -0
- package/node_modules/agent-base/dist/index.js.map +1 -0
- package/node_modules/agent-base/package.json +46 -0
- package/node_modules/axios/CHANGELOG.md +1934 -1039
- package/node_modules/axios/LICENSE +4 -16
- package/node_modules/axios/MIGRATION_GUIDE.md +877 -0
- package/node_modules/axios/README.md +2047 -378
- package/node_modules/axios/dist/axios.js +4784 -1364
- package/node_modules/axios/dist/axios.min.js +4 -1
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +5829 -0
- package/node_modules/axios/dist/esm/axios.js +5073 -1602
- package/node_modules/axios/dist/esm/axios.min.js +2 -1
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +6808 -0
- package/node_modules/axios/index.d.cts +766 -0
- package/node_modules/axios/index.d.ts +582 -136
- package/node_modules/axios/index.js +45 -1
- package/node_modules/axios/lib/adapters/README.md +5 -6
- package/node_modules/axios/lib/adapters/adapters.js +132 -0
- package/node_modules/axios/lib/adapters/fetch.js +696 -0
- package/node_modules/axios/lib/adapters/http.js +1385 -358
- package/node_modules/axios/lib/adapters/xhr.js +247 -196
- package/node_modules/axios/lib/axios.js +47 -26
- package/node_modules/axios/lib/cancel/CancelToken.js +103 -86
- package/node_modules/axios/lib/cancel/CanceledError.js +17 -19
- package/node_modules/axios/lib/cancel/isCancel.js +2 -2
- package/node_modules/axios/lib/core/Axios.js +255 -125
- package/node_modules/axios/lib/core/AxiosError.js +196 -74
- package/node_modules/axios/lib/core/AxiosHeaders.js +474 -0
- package/node_modules/axios/lib/core/InterceptorManager.js +162 -54
- package/node_modules/axios/lib/core/buildFullPath.js +60 -7
- package/node_modules/axios/lib/core/dispatchRequest.js +61 -60
- package/node_modules/axios/lib/core/mergeConfig.js +130 -59
- package/node_modules/axios/lib/core/methodList.js +17 -0
- package/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
- package/node_modules/axios/lib/core/settle.js +7 -5
- package/node_modules/axios/lib/core/transformData.js +15 -10
- package/node_modules/axios/lib/defaults/index.js +114 -111
- package/node_modules/axios/lib/defaults/transitional.js +5 -2
- package/node_modules/axios/lib/env/classes/FormData.js +2 -2
- package/node_modules/axios/lib/env/data.js +1 -3
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +156 -0
- package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +31 -14
- package/node_modules/axios/lib/helpers/Http2Sessions.js +121 -0
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +88 -0
- package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
- package/node_modules/axios/lib/helpers/bind.js +9 -2
- package/node_modules/axios/lib/helpers/buildURL.js +42 -28
- package/node_modules/axios/lib/helpers/callbackify.js +18 -0
- package/node_modules/axios/lib/helpers/combineURLs.js +14 -5
- package/node_modules/axios/lib/helpers/composeSignals.js +68 -0
- package/node_modules/axios/lib/helpers/cookies.js +56 -45
- package/node_modules/axios/lib/helpers/deprecatedMethod.js +13 -6
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +166 -0
- package/node_modules/axios/lib/helpers/formDataToJSON.js +74 -23
- package/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
- package/node_modules/axios/lib/helpers/fromDataURI.js +32 -14
- package/node_modules/axios/lib/helpers/isAbsoluteURL.js +7 -2
- package/node_modules/axios/lib/helpers/isAxiosError.js +5 -4
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +16 -68
- package/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
- package/node_modules/axios/lib/helpers/null.js +1 -1
- package/node_modules/axios/lib/helpers/parseHeaders.js +43 -25
- package/node_modules/axios/lib/helpers/parseProtocol.js +4 -4
- package/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
- package/node_modules/axios/lib/helpers/readBlob.js +15 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +107 -0
- package/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +505 -0
- package/node_modules/axios/lib/helpers/speedometer.js +55 -0
- package/node_modules/axios/lib/helpers/spread.js +4 -3
- package/node_modules/axios/lib/helpers/throttle.js +45 -0
- package/node_modules/axios/lib/helpers/toFormData.js +152 -52
- package/node_modules/axios/lib/helpers/toURLEncodedForm.js +10 -9
- package/node_modules/axios/lib/helpers/trackStream.js +89 -0
- package/node_modules/axios/lib/helpers/validator.js +44 -18
- package/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
- package/node_modules/axios/lib/platform/browser/classes/FormData.js +1 -1
- package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +2 -3
- package/node_modules/axios/lib/platform/browser/index.js +8 -6
- package/node_modules/axios/lib/platform/common/utils.js +52 -0
- package/node_modules/axios/lib/platform/index.js +6 -2
- package/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
- package/node_modules/axios/lib/platform/node/classes/FormData.js +2 -2
- package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +2 -3
- package/node_modules/axios/lib/platform/node/index.js +32 -6
- package/node_modules/axios/lib/utils.js +866 -238
- package/node_modules/axios/node_modules/agent-base/README.md +145 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/index.d.ts +78 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/index.js +203 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/index.js.map +1 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.js +18 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.js.map +1 -0
- package/node_modules/axios/node_modules/agent-base/package.json +64 -0
- package/node_modules/axios/node_modules/agent-base/src/index.ts +345 -0
- package/node_modules/axios/node_modules/agent-base/src/promisify.ts +33 -0
- package/node_modules/axios/node_modules/https-proxy-agent/README.md +137 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.js +177 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.js +14 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
- package/node_modules/axios/node_modules/https-proxy-agent/package.json +56 -0
- package/node_modules/axios/package.json +178 -75
- package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/dotenv/CHANGELOG.md +520 -0
- package/node_modules/dotenv/LICENSE +23 -0
- package/node_modules/dotenv/README-es.md +411 -0
- package/node_modules/dotenv/README.md +645 -0
- package/node_modules/dotenv/SECURITY.md +1 -0
- package/node_modules/dotenv/config.js +9 -0
- package/node_modules/dotenv/lib/cli-options.js +17 -0
- package/node_modules/dotenv/lib/env-options.js +28 -0
- package/node_modules/dotenv/lib/main.d.ts +162 -0
- package/node_modules/dotenv/lib/main.js +386 -0
- package/node_modules/dotenv/package.json +62 -0
- package/node_modules/dunder-proto/.eslintrc +5 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/dunder-proto/LICENSE +21 -0
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/es-define-property/.eslintrc +13 -0
- package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/node_modules/es-define-property/.nycrc +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/node_modules/es-define-property/LICENSE +21 -0
- package/node_modules/es-define-property/README.md +49 -0
- package/node_modules/es-define-property/index.d.ts +3 -0
- package/node_modules/es-define-property/index.js +14 -0
- package/node_modules/es-define-property/package.json +81 -0
- package/node_modules/es-define-property/test/index.js +56 -0
- package/node_modules/es-define-property/tsconfig.json +10 -0
- package/node_modules/es-errors/.eslintrc +5 -0
- package/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/node_modules/es-errors/CHANGELOG.md +40 -0
- package/node_modules/es-errors/LICENSE +21 -0
- package/node_modules/es-errors/README.md +55 -0
- package/node_modules/es-errors/eval.d.ts +3 -0
- package/node_modules/es-errors/eval.js +4 -0
- package/node_modules/es-errors/index.d.ts +3 -0
- package/node_modules/es-errors/index.js +4 -0
- package/node_modules/es-errors/package.json +80 -0
- package/node_modules/es-errors/range.d.ts +3 -0
- package/node_modules/es-errors/range.js +4 -0
- package/node_modules/es-errors/ref.d.ts +3 -0
- package/node_modules/es-errors/ref.js +4 -0
- package/node_modules/es-errors/syntax.d.ts +3 -0
- package/node_modules/es-errors/syntax.js +4 -0
- package/node_modules/es-errors/test/index.js +19 -0
- package/node_modules/es-errors/tsconfig.json +49 -0
- package/node_modules/es-errors/type.d.ts +3 -0
- package/node_modules/es-errors/type.js +4 -0
- package/node_modules/es-errors/uri.d.ts +3 -0
- package/node_modules/es-errors/uri.js +4 -0
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +44 -0
- package/node_modules/es-object-atoms/LICENSE +21 -0
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +79 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +7 -0
- package/node_modules/es-set-tostringtag/.eslintrc +13 -0
- package/node_modules/es-set-tostringtag/.nycrc +9 -0
- package/node_modules/es-set-tostringtag/CHANGELOG.md +67 -0
- package/node_modules/es-set-tostringtag/LICENSE +21 -0
- package/node_modules/es-set-tostringtag/README.md +53 -0
- package/node_modules/es-set-tostringtag/index.d.ts +10 -0
- package/node_modules/es-set-tostringtag/index.js +35 -0
- package/node_modules/es-set-tostringtag/package.json +78 -0
- package/node_modules/es-set-tostringtag/test/index.js +85 -0
- package/node_modules/es-set-tostringtag/tsconfig.json +9 -0
- package/node_modules/follow-redirects/README.md +7 -5
- package/node_modules/follow-redirects/index.js +45 -8
- package/node_modules/follow-redirects/package.json +2 -2
- package/node_modules/form-data/CHANGELOG.md +686 -0
- package/node_modules/form-data/{README.md.bak → README.md} +34 -37
- package/node_modules/form-data/lib/browser.js +3 -1
- package/node_modules/form-data/lib/form_data.js +152 -147
- package/node_modules/form-data/lib/populate.js +5 -5
- package/node_modules/form-data/package.json +43 -29
- package/node_modules/function-bind/.eslintrc +21 -0
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +46 -0
- package/node_modules/function-bind/implementation.js +84 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +87 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/get-intrinsic/.eslintrc +42 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +9 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +186 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +71 -0
- package/node_modules/get-intrinsic/index.js +378 -0
- package/node_modules/get-intrinsic/package.json +97 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/get-proto/package.json +81 -0
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +45 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +15 -0
- package/node_modules/gopd/package.json +77 -0
- package/node_modules/gopd/test/index.js +36 -0
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.nycrc +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +91 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +46 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +14 -0
- package/node_modules/has-symbols/package.json +111 -0
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +45 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/node_modules/has-symbols/test/tests.js +58 -0
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/has-tostringtag/.eslintrc +5 -0
- package/node_modules/has-tostringtag/.github/FUNDING.yml +12 -0
- package/node_modules/has-tostringtag/.nycrc +13 -0
- package/node_modules/has-tostringtag/CHANGELOG.md +42 -0
- package/node_modules/has-tostringtag/LICENSE +21 -0
- package/node_modules/has-tostringtag/README.md +46 -0
- package/node_modules/has-tostringtag/index.d.ts +3 -0
- package/node_modules/has-tostringtag/index.js +8 -0
- package/node_modules/has-tostringtag/package.json +108 -0
- package/node_modules/has-tostringtag/shams.d.ts +3 -0
- package/node_modules/has-tostringtag/shams.js +8 -0
- package/node_modules/has-tostringtag/test/index.js +21 -0
- package/node_modules/has-tostringtag/test/shams/core-js.js +31 -0
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +30 -0
- package/node_modules/has-tostringtag/test/tests.js +15 -0
- package/node_modules/has-tostringtag/tsconfig.json +49 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +58 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/eslint.config.mjs +6 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +91 -0
- package/node_modules/hasown/tsconfig.json +6 -0
- package/node_modules/{process → http-proxy-agent}/LICENSE +1 -1
- package/node_modules/http-proxy-agent/README.md +44 -0
- package/node_modules/http-proxy-agent/dist/index.d.ts +44 -0
- package/node_modules/http-proxy-agent/dist/index.d.ts.map +1 -0
- package/node_modules/http-proxy-agent/dist/index.js +148 -0
- package/node_modules/http-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/http-proxy-agent/package.json +47 -0
- package/node_modules/https-proxy-agent/LICENSE +22 -0
- package/node_modules/https-proxy-agent/README.md +70 -0
- package/node_modules/https-proxy-agent/dist/index.d.ts +47 -0
- package/node_modules/https-proxy-agent/dist/index.d.ts.map +1 -0
- package/node_modules/https-proxy-agent/dist/index.js +180 -0
- package/node_modules/https-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +15 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +1 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +101 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
- package/node_modules/https-proxy-agent/package.json +50 -0
- package/node_modules/lodash/LICENSE +47 -0
- package/node_modules/lodash/README.md +39 -0
- package/node_modules/lodash/_DataView.js +7 -0
- package/node_modules/lodash/_Hash.js +32 -0
- package/node_modules/lodash/_LazyWrapper.js +28 -0
- package/node_modules/lodash/_ListCache.js +32 -0
- package/node_modules/lodash/_LodashWrapper.js +22 -0
- package/node_modules/lodash/_Map.js +7 -0
- package/node_modules/lodash/_MapCache.js +32 -0
- package/node_modules/lodash/_Promise.js +7 -0
- package/node_modules/lodash/_Set.js +7 -0
- package/node_modules/lodash/_SetCache.js +27 -0
- package/node_modules/lodash/_Stack.js +27 -0
- package/node_modules/lodash/_Symbol.js +6 -0
- package/node_modules/lodash/_Uint8Array.js +6 -0
- package/node_modules/lodash/_WeakMap.js +7 -0
- package/node_modules/lodash/_apply.js +21 -0
- package/node_modules/lodash/_arrayAggregator.js +22 -0
- package/node_modules/lodash/_arrayEach.js +22 -0
- package/node_modules/lodash/_arrayEachRight.js +21 -0
- package/node_modules/lodash/_arrayEvery.js +23 -0
- package/node_modules/lodash/_arrayFilter.js +25 -0
- package/node_modules/lodash/_arrayIncludes.js +17 -0
- package/node_modules/lodash/_arrayIncludesWith.js +22 -0
- package/node_modules/lodash/_arrayLikeKeys.js +49 -0
- package/node_modules/lodash/_arrayMap.js +21 -0
- package/node_modules/lodash/_arrayPush.js +20 -0
- package/node_modules/lodash/_arrayReduce.js +26 -0
- package/node_modules/lodash/_arrayReduceRight.js +24 -0
- package/node_modules/lodash/_arraySample.js +15 -0
- package/node_modules/lodash/_arraySampleSize.js +17 -0
- package/node_modules/lodash/_arrayShuffle.js +15 -0
- package/node_modules/lodash/_arraySome.js +23 -0
- package/node_modules/lodash/_asciiSize.js +12 -0
- package/node_modules/lodash/_asciiToArray.js +12 -0
- package/node_modules/lodash/_asciiWords.js +15 -0
- package/node_modules/lodash/_assignMergeValue.js +20 -0
- package/node_modules/lodash/_assignValue.js +28 -0
- package/node_modules/lodash/_assocIndexOf.js +21 -0
- package/node_modules/lodash/_baseAggregator.js +21 -0
- package/node_modules/lodash/_baseAssign.js +17 -0
- package/node_modules/lodash/_baseAssignIn.js +17 -0
- package/node_modules/lodash/_baseAssignValue.js +25 -0
- package/node_modules/lodash/_baseAt.js +23 -0
- package/node_modules/lodash/_baseClamp.js +22 -0
- package/node_modules/lodash/_baseClone.js +166 -0
- package/node_modules/lodash/_baseConforms.js +18 -0
- package/node_modules/lodash/_baseConformsTo.js +27 -0
- package/node_modules/lodash/_baseCreate.js +30 -0
- package/node_modules/lodash/_baseDelay.js +21 -0
- package/node_modules/lodash/_baseDifference.js +67 -0
- package/node_modules/lodash/_baseEach.js +14 -0
- package/node_modules/lodash/_baseEachRight.js +14 -0
- package/node_modules/lodash/_baseEvery.js +21 -0
- package/node_modules/lodash/_baseExtremum.js +32 -0
- package/node_modules/lodash/_baseFill.js +32 -0
- package/node_modules/lodash/_baseFilter.js +21 -0
- package/node_modules/lodash/_baseFindIndex.js +24 -0
- package/node_modules/lodash/_baseFindKey.js +23 -0
- package/node_modules/lodash/_baseFlatten.js +38 -0
- package/node_modules/lodash/_baseFor.js +16 -0
- package/node_modules/lodash/_baseForOwn.js +16 -0
- package/node_modules/lodash/_baseForOwnRight.js +16 -0
- package/node_modules/lodash/_baseForRight.js +15 -0
- package/node_modules/lodash/_baseFunctions.js +19 -0
- package/node_modules/lodash/_baseGet.js +24 -0
- package/node_modules/lodash/_baseGetAllKeys.js +20 -0
- package/node_modules/lodash/_baseGetTag.js +28 -0
- package/node_modules/lodash/_baseGt.js +14 -0
- package/node_modules/lodash/_baseHas.js +19 -0
- package/node_modules/lodash/_baseHasIn.js +13 -0
- package/node_modules/lodash/_baseInRange.js +18 -0
- package/node_modules/lodash/_baseIndexOf.js +20 -0
- package/node_modules/lodash/_baseIndexOfWith.js +23 -0
- package/node_modules/lodash/_baseIntersection.js +74 -0
- package/node_modules/lodash/_baseInverter.js +21 -0
- package/node_modules/lodash/_baseInvoke.js +24 -0
- package/node_modules/lodash/_baseIsArguments.js +18 -0
- package/node_modules/lodash/_baseIsArrayBuffer.js +17 -0
- package/node_modules/lodash/_baseIsDate.js +18 -0
- package/node_modules/lodash/_baseIsEqual.js +28 -0
- package/node_modules/lodash/_baseIsEqualDeep.js +83 -0
- package/node_modules/lodash/_baseIsMap.js +18 -0
- package/node_modules/lodash/_baseIsMatch.js +62 -0
- package/node_modules/lodash/_baseIsNaN.js +12 -0
- package/node_modules/lodash/_baseIsNative.js +47 -0
- package/node_modules/lodash/_baseIsRegExp.js +18 -0
- package/node_modules/lodash/_baseIsSet.js +18 -0
- package/node_modules/lodash/_baseIsTypedArray.js +60 -0
- package/node_modules/lodash/_baseIteratee.js +31 -0
- package/node_modules/lodash/_baseKeys.js +30 -0
- package/node_modules/lodash/_baseKeysIn.js +33 -0
- package/node_modules/lodash/_baseLodash.js +10 -0
- package/node_modules/lodash/_baseLt.js +14 -0
- package/node_modules/lodash/_baseMap.js +22 -0
- package/node_modules/lodash/_baseMatches.js +22 -0
- package/node_modules/lodash/_baseMatchesProperty.js +33 -0
- package/node_modules/lodash/_baseMean.js +20 -0
- package/node_modules/lodash/_baseMerge.js +42 -0
- package/node_modules/lodash/_baseMergeDeep.js +94 -0
- package/node_modules/lodash/_baseNth.js +20 -0
- package/node_modules/lodash/_baseOrderBy.js +49 -0
- package/node_modules/lodash/_basePick.js +19 -0
- package/node_modules/lodash/_basePickBy.js +30 -0
- package/node_modules/lodash/_baseProperty.js +14 -0
- package/node_modules/lodash/_basePropertyDeep.js +16 -0
- package/node_modules/lodash/_basePropertyOf.js +14 -0
- package/node_modules/lodash/_basePullAll.js +51 -0
- package/node_modules/lodash/_basePullAt.js +37 -0
- package/node_modules/lodash/_baseRandom.js +18 -0
- package/node_modules/lodash/_baseRange.js +28 -0
- package/node_modules/lodash/_baseReduce.js +23 -0
- package/node_modules/lodash/_baseRepeat.js +35 -0
- package/node_modules/lodash/_baseRest.js +17 -0
- package/node_modules/lodash/_baseSample.js +15 -0
- package/node_modules/lodash/_baseSampleSize.js +18 -0
- package/node_modules/lodash/_baseSet.js +51 -0
- package/node_modules/lodash/_baseSetData.js +17 -0
- package/node_modules/lodash/_baseSetToString.js +22 -0
- package/node_modules/lodash/_baseShuffle.js +15 -0
- package/node_modules/lodash/_baseSlice.js +31 -0
- package/node_modules/lodash/_baseSome.js +22 -0
- package/node_modules/lodash/_baseSortBy.js +21 -0
- package/node_modules/lodash/_baseSortedIndex.js +42 -0
- package/node_modules/lodash/_baseSortedIndexBy.js +67 -0
- package/node_modules/lodash/_baseSortedUniq.js +30 -0
- package/node_modules/lodash/_baseSum.js +24 -0
- package/node_modules/lodash/_baseTimes.js +20 -0
- package/node_modules/lodash/_baseToNumber.js +24 -0
- package/node_modules/lodash/_baseToPairs.js +18 -0
- package/node_modules/lodash/_baseToString.js +37 -0
- package/node_modules/lodash/_baseTrim.js +19 -0
- package/node_modules/lodash/_baseUnary.js +14 -0
- package/node_modules/lodash/_baseUniq.js +72 -0
- package/node_modules/lodash/_baseUnset.js +52 -0
- package/node_modules/lodash/_baseUpdate.js +18 -0
- package/node_modules/lodash/_baseValues.js +19 -0
- package/node_modules/lodash/_baseWhile.js +26 -0
- package/node_modules/lodash/_baseWrapperValue.js +25 -0
- package/node_modules/lodash/_baseXor.js +36 -0
- package/node_modules/lodash/_baseZipObject.js +23 -0
- package/node_modules/lodash/_cacheHas.js +13 -0
- package/node_modules/lodash/_castArrayLikeObject.js +14 -0
- package/node_modules/lodash/_castFunction.js +14 -0
- package/node_modules/lodash/_castPath.js +21 -0
- package/node_modules/lodash/_castRest.js +14 -0
- package/node_modules/lodash/_castSlice.js +18 -0
- package/node_modules/lodash/_charsEndIndex.js +19 -0
- package/node_modules/lodash/_charsStartIndex.js +20 -0
- package/node_modules/lodash/_cloneArrayBuffer.js +16 -0
- package/node_modules/lodash/_cloneBuffer.js +35 -0
- package/node_modules/lodash/_cloneDataView.js +16 -0
- package/node_modules/lodash/_cloneRegExp.js +17 -0
- package/node_modules/lodash/_cloneSymbol.js +18 -0
- package/node_modules/lodash/_cloneTypedArray.js +16 -0
- package/node_modules/lodash/_compareAscending.js +41 -0
- package/node_modules/lodash/_compareMultiple.js +44 -0
- package/node_modules/lodash/_composeArgs.js +39 -0
- package/node_modules/lodash/_composeArgsRight.js +41 -0
- package/node_modules/lodash/_copyArray.js +20 -0
- package/node_modules/lodash/_copyObject.js +40 -0
- package/node_modules/lodash/_copySymbols.js +16 -0
- package/node_modules/lodash/_copySymbolsIn.js +16 -0
- package/node_modules/lodash/_coreJsData.js +6 -0
- package/node_modules/lodash/_countHolders.js +21 -0
- package/node_modules/lodash/_createAggregator.js +23 -0
- package/node_modules/lodash/_createAssigner.js +37 -0
- package/node_modules/lodash/_createBaseEach.js +32 -0
- package/node_modules/lodash/_createBaseFor.js +25 -0
- package/node_modules/lodash/_createBind.js +28 -0
- package/node_modules/lodash/_createCaseFirst.js +33 -0
- package/node_modules/lodash/_createCompounder.js +24 -0
- package/node_modules/lodash/_createCtor.js +37 -0
- package/node_modules/lodash/_createCurry.js +46 -0
- package/node_modules/lodash/_createFind.js +25 -0
- package/node_modules/lodash/_createFlow.js +78 -0
- package/node_modules/lodash/_createHybrid.js +92 -0
- package/node_modules/lodash/_createInverter.js +17 -0
- package/node_modules/lodash/_createMathOperation.js +38 -0
- package/node_modules/lodash/_createOver.js +27 -0
- package/node_modules/lodash/_createPadding.js +33 -0
- package/node_modules/lodash/_createPartial.js +43 -0
- package/node_modules/lodash/_createRange.js +30 -0
- package/node_modules/lodash/_createRecurry.js +56 -0
- package/node_modules/lodash/_createRelationalOperation.js +20 -0
- package/node_modules/lodash/_createRound.js +35 -0
- package/node_modules/lodash/_createSet.js +19 -0
- package/node_modules/lodash/_createToPairs.js +30 -0
- package/node_modules/lodash/_createWrap.js +106 -0
- package/node_modules/lodash/_customDefaultsAssignIn.js +29 -0
- package/node_modules/lodash/_customDefaultsMerge.js +28 -0
- package/node_modules/lodash/_customOmitClone.js +16 -0
- package/node_modules/lodash/_deburrLetter.js +71 -0
- package/node_modules/lodash/_defineProperty.js +11 -0
- package/node_modules/lodash/_equalArrays.js +84 -0
- package/node_modules/lodash/_equalByTag.js +112 -0
- package/node_modules/lodash/_equalObjects.js +90 -0
- package/node_modules/lodash/_escapeHtmlChar.js +21 -0
- package/node_modules/lodash/_escapeStringChar.js +22 -0
- package/node_modules/lodash/_flatRest.js +16 -0
- package/node_modules/lodash/_freeGlobal.js +4 -0
- package/node_modules/lodash/_getAllKeys.js +16 -0
- package/node_modules/lodash/_getAllKeysIn.js +17 -0
- package/node_modules/lodash/_getData.js +15 -0
- package/node_modules/lodash/_getFuncName.js +31 -0
- package/node_modules/lodash/_getHolder.js +13 -0
- package/node_modules/lodash/_getMapData.js +18 -0
- package/node_modules/lodash/_getMatchData.js +24 -0
- package/node_modules/lodash/_getNative.js +17 -0
- package/node_modules/lodash/_getPrototype.js +6 -0
- package/node_modules/lodash/_getRawTag.js +46 -0
- package/node_modules/lodash/_getSymbols.js +30 -0
- package/node_modules/lodash/_getSymbolsIn.js +25 -0
- package/node_modules/lodash/_getTag.js +58 -0
- package/node_modules/lodash/_getValue.js +13 -0
- package/node_modules/lodash/_getView.js +33 -0
- package/node_modules/lodash/_getWrapDetails.js +17 -0
- package/node_modules/lodash/_hasPath.js +39 -0
- package/node_modules/lodash/_hasUnicode.js +26 -0
- package/node_modules/lodash/_hasUnicodeWord.js +15 -0
- package/node_modules/lodash/_hashClear.js +15 -0
- package/node_modules/lodash/_hashDelete.js +17 -0
- package/node_modules/lodash/_hashGet.js +30 -0
- package/node_modules/lodash/_hashHas.js +23 -0
- package/node_modules/lodash/_hashSet.js +23 -0
- package/node_modules/lodash/_initCloneArray.js +26 -0
- package/node_modules/lodash/_initCloneByTag.js +77 -0
- package/node_modules/lodash/_initCloneObject.js +18 -0
- package/node_modules/lodash/_insertWrapDetails.js +23 -0
- package/node_modules/lodash/_isFlattenable.js +20 -0
- package/node_modules/lodash/_isIndex.js +25 -0
- package/node_modules/lodash/_isIterateeCall.js +30 -0
- package/node_modules/lodash/_isKey.js +29 -0
- package/node_modules/lodash/_isKeyable.js +15 -0
- package/node_modules/lodash/_isLaziable.js +28 -0
- package/node_modules/lodash/_isMaskable.js +14 -0
- package/node_modules/lodash/_isMasked.js +20 -0
- package/node_modules/lodash/_isPrototype.js +18 -0
- package/node_modules/lodash/_isStrictComparable.js +15 -0
- package/node_modules/lodash/_iteratorToArray.js +18 -0
- package/node_modules/lodash/_lazyClone.js +23 -0
- package/node_modules/lodash/_lazyReverse.js +23 -0
- package/node_modules/lodash/_lazyValue.js +69 -0
- package/node_modules/lodash/_listCacheClear.js +13 -0
- package/node_modules/lodash/_listCacheDelete.js +35 -0
- package/node_modules/lodash/_listCacheGet.js +19 -0
- package/node_modules/lodash/_listCacheHas.js +16 -0
- package/node_modules/lodash/_listCacheSet.js +26 -0
- package/node_modules/lodash/_mapCacheClear.js +21 -0
- package/node_modules/lodash/_mapCacheDelete.js +18 -0
- package/node_modules/lodash/_mapCacheGet.js +16 -0
- package/node_modules/lodash/_mapCacheHas.js +16 -0
- package/node_modules/lodash/_mapCacheSet.js +22 -0
- package/node_modules/lodash/_mapToArray.js +18 -0
- package/node_modules/lodash/_matchesStrictComparable.js +20 -0
- package/node_modules/lodash/_memoizeCapped.js +26 -0
- package/node_modules/lodash/_mergeData.js +90 -0
- package/node_modules/lodash/_metaMap.js +6 -0
- package/node_modules/lodash/_nativeCreate.js +6 -0
- package/node_modules/lodash/_nativeKeys.js +6 -0
- package/node_modules/lodash/_nativeKeysIn.js +20 -0
- package/node_modules/lodash/_nodeUtil.js +30 -0
- package/node_modules/lodash/_objectToString.js +22 -0
- package/node_modules/lodash/_overArg.js +15 -0
- package/node_modules/lodash/_overRest.js +36 -0
- package/node_modules/lodash/_parent.js +16 -0
- package/node_modules/lodash/_reEscape.js +4 -0
- package/node_modules/lodash/_reEvaluate.js +4 -0
- package/node_modules/lodash/_reInterpolate.js +4 -0
- package/node_modules/lodash/_realNames.js +4 -0
- package/node_modules/lodash/_reorder.js +29 -0
- package/node_modules/lodash/_replaceHolders.js +29 -0
- package/node_modules/lodash/_root.js +9 -0
- package/node_modules/lodash/_safeGet.js +21 -0
- package/node_modules/lodash/_setCacheAdd.js +19 -0
- package/node_modules/lodash/_setCacheHas.js +14 -0
- package/node_modules/lodash/_setData.js +20 -0
- package/node_modules/lodash/_setToArray.js +18 -0
- package/node_modules/lodash/_setToPairs.js +18 -0
- package/node_modules/lodash/_setToString.js +14 -0
- package/node_modules/lodash/_setWrapToString.js +21 -0
- package/node_modules/lodash/_shortOut.js +37 -0
- package/node_modules/lodash/_shuffleSelf.js +28 -0
- package/node_modules/lodash/_stackClear.js +15 -0
- package/node_modules/lodash/_stackDelete.js +18 -0
- package/node_modules/lodash/_stackGet.js +14 -0
- package/node_modules/lodash/_stackHas.js +14 -0
- package/node_modules/lodash/_stackSet.js +34 -0
- package/node_modules/lodash/_strictIndexOf.js +23 -0
- package/node_modules/lodash/_strictLastIndexOf.js +21 -0
- package/node_modules/lodash/_stringSize.js +18 -0
- package/node_modules/lodash/_stringToArray.js +18 -0
- package/node_modules/lodash/_stringToPath.js +27 -0
- package/node_modules/lodash/_toKey.js +21 -0
- package/node_modules/lodash/_toSource.js +26 -0
- package/node_modules/lodash/_trimmedEndIndex.js +19 -0
- package/node_modules/lodash/_unescapeHtmlChar.js +21 -0
- package/node_modules/lodash/_unicodeSize.js +44 -0
- package/node_modules/lodash/_unicodeToArray.js +40 -0
- package/node_modules/lodash/_unicodeWords.js +69 -0
- package/node_modules/lodash/_updateWrapDetails.js +46 -0
- package/node_modules/lodash/_wrapperClone.js +23 -0
- package/node_modules/lodash/add.js +22 -0
- package/node_modules/lodash/after.js +42 -0
- package/node_modules/lodash/array.js +67 -0
- package/node_modules/lodash/ary.js +29 -0
- package/node_modules/lodash/assign.js +58 -0
- package/node_modules/lodash/assignIn.js +40 -0
- package/node_modules/lodash/assignInWith.js +38 -0
- package/node_modules/lodash/assignWith.js +37 -0
- package/node_modules/lodash/at.js +23 -0
- package/node_modules/lodash/attempt.js +35 -0
- package/node_modules/lodash/before.js +40 -0
- package/node_modules/lodash/bind.js +57 -0
- package/node_modules/lodash/bindAll.js +41 -0
- package/node_modules/lodash/bindKey.js +68 -0
- package/node_modules/lodash/camelCase.js +29 -0
- package/node_modules/lodash/capitalize.js +23 -0
- package/node_modules/lodash/castArray.js +44 -0
- package/node_modules/lodash/ceil.js +26 -0
- package/node_modules/lodash/chain.js +38 -0
- package/node_modules/lodash/chunk.js +50 -0
- package/node_modules/lodash/clamp.js +39 -0
- package/node_modules/lodash/clone.js +36 -0
- package/node_modules/lodash/cloneDeep.js +29 -0
- package/node_modules/lodash/cloneDeepWith.js +40 -0
- package/node_modules/lodash/cloneWith.js +42 -0
- package/node_modules/lodash/collection.js +30 -0
- package/node_modules/lodash/commit.js +33 -0
- package/node_modules/lodash/compact.js +31 -0
- package/node_modules/lodash/concat.js +43 -0
- package/node_modules/lodash/cond.js +60 -0
- package/node_modules/lodash/conforms.js +35 -0
- package/node_modules/lodash/conformsTo.js +32 -0
- package/node_modules/lodash/constant.js +26 -0
- package/node_modules/lodash/core.js +3877 -0
- package/node_modules/lodash/core.min.js +30 -0
- package/node_modules/lodash/countBy.js +40 -0
- package/node_modules/lodash/create.js +43 -0
- package/node_modules/lodash/curry.js +57 -0
- package/node_modules/lodash/curryRight.js +54 -0
- package/node_modules/lodash/date.js +3 -0
- package/node_modules/lodash/debounce.js +191 -0
- package/node_modules/lodash/deburr.js +45 -0
- package/node_modules/lodash/defaultTo.js +25 -0
- package/node_modules/lodash/defaults.js +64 -0
- package/node_modules/lodash/defaultsDeep.js +30 -0
- package/node_modules/lodash/defer.js +26 -0
- package/node_modules/lodash/delay.js +28 -0
- package/node_modules/lodash/difference.js +33 -0
- package/node_modules/lodash/differenceBy.js +44 -0
- package/node_modules/lodash/differenceWith.js +40 -0
- package/node_modules/lodash/divide.js +22 -0
- package/node_modules/lodash/drop.js +38 -0
- package/node_modules/lodash/dropRight.js +39 -0
- package/node_modules/lodash/dropRightWhile.js +45 -0
- package/node_modules/lodash/dropWhile.js +45 -0
- package/node_modules/lodash/each.js +1 -0
- package/node_modules/lodash/eachRight.js +1 -0
- package/node_modules/lodash/endsWith.js +43 -0
- package/node_modules/lodash/entries.js +1 -0
- package/node_modules/lodash/entriesIn.js +1 -0
- package/node_modules/lodash/eq.js +37 -0
- package/node_modules/lodash/escape.js +43 -0
- package/node_modules/lodash/escapeRegExp.js +32 -0
- package/node_modules/lodash/every.js +56 -0
- package/node_modules/lodash/extend.js +1 -0
- package/node_modules/lodash/extendWith.js +1 -0
- package/node_modules/lodash/fill.js +45 -0
- package/node_modules/lodash/filter.js +52 -0
- package/node_modules/lodash/find.js +42 -0
- package/node_modules/lodash/findIndex.js +55 -0
- package/node_modules/lodash/findKey.js +44 -0
- package/node_modules/lodash/findLast.js +25 -0
- package/node_modules/lodash/findLastIndex.js +59 -0
- package/node_modules/lodash/findLastKey.js +44 -0
- package/node_modules/lodash/first.js +1 -0
- package/node_modules/lodash/flatMap.js +29 -0
- package/node_modules/lodash/flatMapDeep.js +31 -0
- package/node_modules/lodash/flatMapDepth.js +31 -0
- package/node_modules/lodash/flatten.js +22 -0
- package/node_modules/lodash/flattenDeep.js +25 -0
- package/node_modules/lodash/flattenDepth.js +33 -0
- package/node_modules/lodash/flip.js +28 -0
- package/node_modules/lodash/floor.js +26 -0
- package/node_modules/lodash/flow.js +27 -0
- package/node_modules/lodash/flowRight.js +26 -0
- package/node_modules/lodash/forEach.js +41 -0
- package/node_modules/lodash/forEachRight.js +31 -0
- package/node_modules/lodash/forIn.js +39 -0
- package/node_modules/lodash/forInRight.js +37 -0
- package/node_modules/lodash/forOwn.js +36 -0
- package/node_modules/lodash/forOwnRight.js +34 -0
- package/node_modules/lodash/fp/F.js +1 -0
- package/node_modules/lodash/fp/T.js +1 -0
- package/node_modules/lodash/fp/__.js +1 -0
- package/node_modules/lodash/fp/_baseConvert.js +569 -0
- package/node_modules/lodash/fp/_convertBrowser.js +18 -0
- package/node_modules/lodash/fp/_falseOptions.js +7 -0
- package/node_modules/lodash/fp/_mapping.js +358 -0
- package/node_modules/lodash/fp/_util.js +16 -0
- package/node_modules/lodash/fp/add.js +5 -0
- package/node_modules/lodash/fp/after.js +5 -0
- package/node_modules/lodash/fp/all.js +1 -0
- package/node_modules/lodash/fp/allPass.js +1 -0
- package/node_modules/lodash/fp/always.js +1 -0
- package/node_modules/lodash/fp/any.js +1 -0
- package/node_modules/lodash/fp/anyPass.js +1 -0
- package/node_modules/lodash/fp/apply.js +1 -0
- package/node_modules/lodash/fp/array.js +2 -0
- package/node_modules/lodash/fp/ary.js +5 -0
- package/node_modules/lodash/fp/assign.js +5 -0
- package/node_modules/lodash/fp/assignAll.js +5 -0
- package/node_modules/lodash/fp/assignAllWith.js +5 -0
- package/node_modules/lodash/fp/assignIn.js +5 -0
- package/node_modules/lodash/fp/assignInAll.js +5 -0
- package/node_modules/lodash/fp/assignInAllWith.js +5 -0
- package/node_modules/lodash/fp/assignInWith.js +5 -0
- package/node_modules/lodash/fp/assignWith.js +5 -0
- package/node_modules/lodash/fp/assoc.js +1 -0
- package/node_modules/lodash/fp/assocPath.js +1 -0
- package/node_modules/lodash/fp/at.js +5 -0
- package/node_modules/lodash/fp/attempt.js +5 -0
- package/node_modules/lodash/fp/before.js +5 -0
- package/node_modules/lodash/fp/bind.js +5 -0
- package/node_modules/lodash/fp/bindAll.js +5 -0
- package/node_modules/lodash/fp/bindKey.js +5 -0
- package/node_modules/lodash/fp/camelCase.js +5 -0
- package/node_modules/lodash/fp/capitalize.js +5 -0
- package/node_modules/lodash/fp/castArray.js +5 -0
- package/node_modules/lodash/fp/ceil.js +5 -0
- package/node_modules/lodash/fp/chain.js +5 -0
- package/node_modules/lodash/fp/chunk.js +5 -0
- package/node_modules/lodash/fp/clamp.js +5 -0
- package/node_modules/lodash/fp/clone.js +5 -0
- package/node_modules/lodash/fp/cloneDeep.js +5 -0
- package/node_modules/lodash/fp/cloneDeepWith.js +5 -0
- package/node_modules/lodash/fp/cloneWith.js +5 -0
- package/node_modules/lodash/fp/collection.js +2 -0
- package/node_modules/lodash/fp/commit.js +5 -0
- package/node_modules/lodash/fp/compact.js +5 -0
- package/node_modules/lodash/fp/complement.js +1 -0
- package/node_modules/lodash/fp/compose.js +1 -0
- package/node_modules/lodash/fp/concat.js +5 -0
- package/node_modules/lodash/fp/cond.js +5 -0
- package/node_modules/lodash/fp/conforms.js +1 -0
- package/node_modules/lodash/fp/conformsTo.js +5 -0
- package/node_modules/lodash/fp/constant.js +5 -0
- package/node_modules/lodash/fp/contains.js +1 -0
- package/node_modules/lodash/fp/convert.js +18 -0
- package/node_modules/lodash/fp/countBy.js +5 -0
- package/node_modules/lodash/fp/create.js +5 -0
- package/node_modules/lodash/fp/curry.js +5 -0
- package/node_modules/lodash/fp/curryN.js +5 -0
- package/node_modules/lodash/fp/curryRight.js +5 -0
- package/node_modules/lodash/fp/curryRightN.js +5 -0
- package/node_modules/lodash/fp/date.js +2 -0
- package/node_modules/lodash/fp/debounce.js +5 -0
- package/node_modules/lodash/fp/deburr.js +5 -0
- package/node_modules/lodash/fp/defaultTo.js +5 -0
- package/node_modules/lodash/fp/defaults.js +5 -0
- package/node_modules/lodash/fp/defaultsAll.js +5 -0
- package/node_modules/lodash/fp/defaultsDeep.js +5 -0
- package/node_modules/lodash/fp/defaultsDeepAll.js +5 -0
- package/node_modules/lodash/fp/defer.js +5 -0
- package/node_modules/lodash/fp/delay.js +5 -0
- package/node_modules/lodash/fp/difference.js +5 -0
- package/node_modules/lodash/fp/differenceBy.js +5 -0
- package/node_modules/lodash/fp/differenceWith.js +5 -0
- package/node_modules/lodash/fp/dissoc.js +1 -0
- package/node_modules/lodash/fp/dissocPath.js +1 -0
- package/node_modules/lodash/fp/divide.js +5 -0
- package/node_modules/lodash/fp/drop.js +5 -0
- package/node_modules/lodash/fp/dropLast.js +1 -0
- package/node_modules/lodash/fp/dropLastWhile.js +1 -0
- package/node_modules/lodash/fp/dropRight.js +5 -0
- package/node_modules/lodash/fp/dropRightWhile.js +5 -0
- package/node_modules/lodash/fp/dropWhile.js +5 -0
- package/node_modules/lodash/fp/each.js +1 -0
- package/node_modules/lodash/fp/eachRight.js +1 -0
- package/node_modules/lodash/fp/endsWith.js +5 -0
- package/node_modules/lodash/fp/entries.js +1 -0
- package/node_modules/lodash/fp/entriesIn.js +1 -0
- package/node_modules/lodash/fp/eq.js +5 -0
- package/node_modules/lodash/fp/equals.js +1 -0
- package/node_modules/lodash/fp/escape.js +5 -0
- package/node_modules/lodash/fp/escapeRegExp.js +5 -0
- package/node_modules/lodash/fp/every.js +5 -0
- package/node_modules/lodash/fp/extend.js +1 -0
- package/node_modules/lodash/fp/extendAll.js +1 -0
- package/node_modules/lodash/fp/extendAllWith.js +1 -0
- package/node_modules/lodash/fp/extendWith.js +1 -0
- package/node_modules/lodash/fp/fill.js +5 -0
- package/node_modules/lodash/fp/filter.js +5 -0
- package/node_modules/lodash/fp/find.js +5 -0
- package/node_modules/lodash/fp/findFrom.js +5 -0
- package/node_modules/lodash/fp/findIndex.js +5 -0
- package/node_modules/lodash/fp/findIndexFrom.js +5 -0
- package/node_modules/lodash/fp/findKey.js +5 -0
- package/node_modules/lodash/fp/findLast.js +5 -0
- package/node_modules/lodash/fp/findLastFrom.js +5 -0
- package/node_modules/lodash/fp/findLastIndex.js +5 -0
- package/node_modules/lodash/fp/findLastIndexFrom.js +5 -0
- package/node_modules/lodash/fp/findLastKey.js +5 -0
- package/node_modules/lodash/fp/first.js +1 -0
- package/node_modules/lodash/fp/flatMap.js +5 -0
- package/node_modules/lodash/fp/flatMapDeep.js +5 -0
- package/node_modules/lodash/fp/flatMapDepth.js +5 -0
- package/node_modules/lodash/fp/flatten.js +5 -0
- package/node_modules/lodash/fp/flattenDeep.js +5 -0
- package/node_modules/lodash/fp/flattenDepth.js +5 -0
- package/node_modules/lodash/fp/flip.js +5 -0
- package/node_modules/lodash/fp/floor.js +5 -0
- package/node_modules/lodash/fp/flow.js +5 -0
- package/node_modules/lodash/fp/flowRight.js +5 -0
- package/node_modules/lodash/fp/forEach.js +5 -0
- package/node_modules/lodash/fp/forEachRight.js +5 -0
- package/node_modules/lodash/fp/forIn.js +5 -0
- package/node_modules/lodash/fp/forInRight.js +5 -0
- package/node_modules/lodash/fp/forOwn.js +5 -0
- package/node_modules/lodash/fp/forOwnRight.js +5 -0
- package/node_modules/lodash/fp/fromPairs.js +5 -0
- package/node_modules/lodash/fp/function.js +2 -0
- package/node_modules/lodash/fp/functions.js +5 -0
- package/node_modules/lodash/fp/functionsIn.js +5 -0
- package/node_modules/lodash/fp/get.js +5 -0
- package/node_modules/lodash/fp/getOr.js +5 -0
- package/node_modules/lodash/fp/groupBy.js +5 -0
- package/node_modules/lodash/fp/gt.js +5 -0
- package/node_modules/lodash/fp/gte.js +5 -0
- package/node_modules/lodash/fp/has.js +5 -0
- package/node_modules/lodash/fp/hasIn.js +5 -0
- package/node_modules/lodash/fp/head.js +5 -0
- package/node_modules/lodash/fp/identical.js +1 -0
- package/node_modules/lodash/fp/identity.js +5 -0
- package/node_modules/lodash/fp/inRange.js +5 -0
- package/node_modules/lodash/fp/includes.js +5 -0
- package/node_modules/lodash/fp/includesFrom.js +5 -0
- package/node_modules/lodash/fp/indexBy.js +1 -0
- package/node_modules/lodash/fp/indexOf.js +5 -0
- package/node_modules/lodash/fp/indexOfFrom.js +5 -0
- package/node_modules/lodash/fp/init.js +1 -0
- package/node_modules/lodash/fp/initial.js +5 -0
- package/node_modules/lodash/fp/intersection.js +5 -0
- package/node_modules/lodash/fp/intersectionBy.js +5 -0
- package/node_modules/lodash/fp/intersectionWith.js +5 -0
- package/node_modules/lodash/fp/invert.js +5 -0
- package/node_modules/lodash/fp/invertBy.js +5 -0
- package/node_modules/lodash/fp/invertObj.js +1 -0
- package/node_modules/lodash/fp/invoke.js +5 -0
- package/node_modules/lodash/fp/invokeArgs.js +5 -0
- package/node_modules/lodash/fp/invokeArgsMap.js +5 -0
- package/node_modules/lodash/fp/invokeMap.js +5 -0
- package/node_modules/lodash/fp/isArguments.js +5 -0
- package/node_modules/lodash/fp/isArray.js +5 -0
- package/node_modules/lodash/fp/isArrayBuffer.js +5 -0
- package/node_modules/lodash/fp/isArrayLike.js +5 -0
- package/node_modules/lodash/fp/isArrayLikeObject.js +5 -0
- package/node_modules/lodash/fp/isBoolean.js +5 -0
- package/node_modules/lodash/fp/isBuffer.js +5 -0
- package/node_modules/lodash/fp/isDate.js +5 -0
- package/node_modules/lodash/fp/isElement.js +5 -0
- package/node_modules/lodash/fp/isEmpty.js +5 -0
- package/node_modules/lodash/fp/isEqual.js +5 -0
- package/node_modules/lodash/fp/isEqualWith.js +5 -0
- package/node_modules/lodash/fp/isError.js +5 -0
- package/node_modules/lodash/fp/isFinite.js +5 -0
- package/node_modules/lodash/fp/isFunction.js +5 -0
- package/node_modules/lodash/fp/isInteger.js +5 -0
- package/node_modules/lodash/fp/isLength.js +5 -0
- package/node_modules/lodash/fp/isMap.js +5 -0
- package/node_modules/lodash/fp/isMatch.js +5 -0
- package/node_modules/lodash/fp/isMatchWith.js +5 -0
- package/node_modules/lodash/fp/isNaN.js +5 -0
- package/node_modules/lodash/fp/isNative.js +5 -0
- package/node_modules/lodash/fp/isNil.js +5 -0
- package/node_modules/lodash/fp/isNull.js +5 -0
- package/node_modules/lodash/fp/isNumber.js +5 -0
- package/node_modules/lodash/fp/isObject.js +5 -0
- package/node_modules/lodash/fp/isObjectLike.js +5 -0
- package/node_modules/lodash/fp/isPlainObject.js +5 -0
- package/node_modules/lodash/fp/isRegExp.js +5 -0
- package/node_modules/lodash/fp/isSafeInteger.js +5 -0
- package/node_modules/lodash/fp/isSet.js +5 -0
- package/node_modules/lodash/fp/isString.js +5 -0
- package/node_modules/lodash/fp/isSymbol.js +5 -0
- package/node_modules/lodash/fp/isTypedArray.js +5 -0
- package/node_modules/lodash/fp/isUndefined.js +5 -0
- package/node_modules/lodash/fp/isWeakMap.js +5 -0
- package/node_modules/lodash/fp/isWeakSet.js +5 -0
- package/node_modules/lodash/fp/iteratee.js +5 -0
- package/node_modules/lodash/fp/join.js +5 -0
- package/node_modules/lodash/fp/juxt.js +1 -0
- package/node_modules/lodash/fp/kebabCase.js +5 -0
- package/node_modules/lodash/fp/keyBy.js +5 -0
- package/node_modules/lodash/fp/keys.js +5 -0
- package/node_modules/lodash/fp/keysIn.js +5 -0
- package/node_modules/lodash/fp/lang.js +2 -0
- package/node_modules/lodash/fp/last.js +5 -0
- package/node_modules/lodash/fp/lastIndexOf.js +5 -0
- package/node_modules/lodash/fp/lastIndexOfFrom.js +5 -0
- package/node_modules/lodash/fp/lowerCase.js +5 -0
- package/node_modules/lodash/fp/lowerFirst.js +5 -0
- package/node_modules/lodash/fp/lt.js +5 -0
- package/node_modules/lodash/fp/lte.js +5 -0
- package/node_modules/lodash/fp/map.js +5 -0
- package/node_modules/lodash/fp/mapKeys.js +5 -0
- package/node_modules/lodash/fp/mapValues.js +5 -0
- package/node_modules/lodash/fp/matches.js +1 -0
- package/node_modules/lodash/fp/matchesProperty.js +5 -0
- package/node_modules/lodash/fp/math.js +2 -0
- package/node_modules/lodash/fp/max.js +5 -0
- package/node_modules/lodash/fp/maxBy.js +5 -0
- package/node_modules/lodash/fp/mean.js +5 -0
- package/node_modules/lodash/fp/meanBy.js +5 -0
- package/node_modules/lodash/fp/memoize.js +5 -0
- package/node_modules/lodash/fp/merge.js +5 -0
- package/node_modules/lodash/fp/mergeAll.js +5 -0
- package/node_modules/lodash/fp/mergeAllWith.js +5 -0
- package/node_modules/lodash/fp/mergeWith.js +5 -0
- package/node_modules/lodash/fp/method.js +5 -0
- package/node_modules/lodash/fp/methodOf.js +5 -0
- package/node_modules/lodash/fp/min.js +5 -0
- package/node_modules/lodash/fp/minBy.js +5 -0
- package/node_modules/lodash/fp/mixin.js +5 -0
- package/node_modules/lodash/fp/multiply.js +5 -0
- package/node_modules/lodash/fp/nAry.js +1 -0
- package/node_modules/lodash/fp/negate.js +5 -0
- package/node_modules/lodash/fp/next.js +5 -0
- package/node_modules/lodash/fp/noop.js +5 -0
- package/node_modules/lodash/fp/now.js +5 -0
- package/node_modules/lodash/fp/nth.js +5 -0
- package/node_modules/lodash/fp/nthArg.js +5 -0
- package/node_modules/lodash/fp/number.js +2 -0
- package/node_modules/lodash/fp/object.js +2 -0
- package/node_modules/lodash/fp/omit.js +5 -0
- package/node_modules/lodash/fp/omitAll.js +1 -0
- package/node_modules/lodash/fp/omitBy.js +5 -0
- package/node_modules/lodash/fp/once.js +5 -0
- package/node_modules/lodash/fp/orderBy.js +5 -0
- package/node_modules/lodash/fp/over.js +5 -0
- package/node_modules/lodash/fp/overArgs.js +5 -0
- package/node_modules/lodash/fp/overEvery.js +5 -0
- package/node_modules/lodash/fp/overSome.js +5 -0
- package/node_modules/lodash/fp/pad.js +5 -0
- package/node_modules/lodash/fp/padChars.js +5 -0
- package/node_modules/lodash/fp/padCharsEnd.js +5 -0
- package/node_modules/lodash/fp/padCharsStart.js +5 -0
- package/node_modules/lodash/fp/padEnd.js +5 -0
- package/node_modules/lodash/fp/padStart.js +5 -0
- package/node_modules/lodash/fp/parseInt.js +5 -0
- package/node_modules/lodash/fp/partial.js +5 -0
- package/node_modules/lodash/fp/partialRight.js +5 -0
- package/node_modules/lodash/fp/partition.js +5 -0
- package/node_modules/lodash/fp/path.js +1 -0
- package/node_modules/lodash/fp/pathEq.js +1 -0
- package/node_modules/lodash/fp/pathOr.js +1 -0
- package/node_modules/lodash/fp/paths.js +1 -0
- package/node_modules/lodash/fp/pick.js +5 -0
- package/node_modules/lodash/fp/pickAll.js +1 -0
- package/node_modules/lodash/fp/pickBy.js +5 -0
- package/node_modules/lodash/fp/pipe.js +1 -0
- package/node_modules/lodash/fp/placeholder.js +6 -0
- package/node_modules/lodash/fp/plant.js +5 -0
- package/node_modules/lodash/fp/pluck.js +1 -0
- package/node_modules/lodash/fp/prop.js +1 -0
- package/node_modules/lodash/fp/propEq.js +1 -0
- package/node_modules/lodash/fp/propOr.js +1 -0
- package/node_modules/lodash/fp/property.js +1 -0
- package/node_modules/lodash/fp/propertyOf.js +5 -0
- package/node_modules/lodash/fp/props.js +1 -0
- package/node_modules/lodash/fp/pull.js +5 -0
- package/node_modules/lodash/fp/pullAll.js +5 -0
- package/node_modules/lodash/fp/pullAllBy.js +5 -0
- package/node_modules/lodash/fp/pullAllWith.js +5 -0
- package/node_modules/lodash/fp/pullAt.js +5 -0
- package/node_modules/lodash/fp/random.js +5 -0
- package/node_modules/lodash/fp/range.js +5 -0
- package/node_modules/lodash/fp/rangeRight.js +5 -0
- package/node_modules/lodash/fp/rangeStep.js +5 -0
- package/node_modules/lodash/fp/rangeStepRight.js +5 -0
- package/node_modules/lodash/fp/rearg.js +5 -0
- package/node_modules/lodash/fp/reduce.js +5 -0
- package/node_modules/lodash/fp/reduceRight.js +5 -0
- package/node_modules/lodash/fp/reject.js +5 -0
- package/node_modules/lodash/fp/remove.js +5 -0
- package/node_modules/lodash/fp/repeat.js +5 -0
- package/node_modules/lodash/fp/replace.js +5 -0
- package/node_modules/lodash/fp/rest.js +5 -0
- package/node_modules/lodash/fp/restFrom.js +5 -0
- package/node_modules/lodash/fp/result.js +5 -0
- package/node_modules/lodash/fp/reverse.js +5 -0
- package/node_modules/lodash/fp/round.js +5 -0
- package/node_modules/lodash/fp/sample.js +5 -0
- package/node_modules/lodash/fp/sampleSize.js +5 -0
- package/node_modules/lodash/fp/seq.js +2 -0
- package/node_modules/lodash/fp/set.js +5 -0
- package/node_modules/lodash/fp/setWith.js +5 -0
- package/node_modules/lodash/fp/shuffle.js +5 -0
- package/node_modules/lodash/fp/size.js +5 -0
- package/node_modules/lodash/fp/slice.js +5 -0
- package/node_modules/lodash/fp/snakeCase.js +5 -0
- package/node_modules/lodash/fp/some.js +5 -0
- package/node_modules/lodash/fp/sortBy.js +5 -0
- package/node_modules/lodash/fp/sortedIndex.js +5 -0
- package/node_modules/lodash/fp/sortedIndexBy.js +5 -0
- package/node_modules/lodash/fp/sortedIndexOf.js +5 -0
- package/node_modules/lodash/fp/sortedLastIndex.js +5 -0
- package/node_modules/lodash/fp/sortedLastIndexBy.js +5 -0
- package/node_modules/lodash/fp/sortedLastIndexOf.js +5 -0
- package/node_modules/lodash/fp/sortedUniq.js +5 -0
- package/node_modules/lodash/fp/sortedUniqBy.js +5 -0
- package/node_modules/lodash/fp/split.js +5 -0
- package/node_modules/lodash/fp/spread.js +5 -0
- package/node_modules/lodash/fp/spreadFrom.js +5 -0
- package/node_modules/lodash/fp/startCase.js +5 -0
- package/node_modules/lodash/fp/startsWith.js +5 -0
- package/node_modules/lodash/fp/string.js +2 -0
- package/node_modules/lodash/fp/stubArray.js +5 -0
- package/node_modules/lodash/fp/stubFalse.js +5 -0
- package/node_modules/lodash/fp/stubObject.js +5 -0
- package/node_modules/lodash/fp/stubString.js +5 -0
- package/node_modules/lodash/fp/stubTrue.js +5 -0
- package/node_modules/lodash/fp/subtract.js +5 -0
- package/node_modules/lodash/fp/sum.js +5 -0
- package/node_modules/lodash/fp/sumBy.js +5 -0
- package/node_modules/lodash/fp/symmetricDifference.js +1 -0
- package/node_modules/lodash/fp/symmetricDifferenceBy.js +1 -0
- package/node_modules/lodash/fp/symmetricDifferenceWith.js +1 -0
- package/node_modules/lodash/fp/tail.js +5 -0
- package/node_modules/lodash/fp/take.js +5 -0
- package/node_modules/lodash/fp/takeLast.js +1 -0
- package/node_modules/lodash/fp/takeLastWhile.js +1 -0
- package/node_modules/lodash/fp/takeRight.js +5 -0
- package/node_modules/lodash/fp/takeRightWhile.js +5 -0
- package/node_modules/lodash/fp/takeWhile.js +5 -0
- package/node_modules/lodash/fp/tap.js +5 -0
- package/node_modules/lodash/fp/template.js +5 -0
- package/node_modules/lodash/fp/templateSettings.js +5 -0
- package/node_modules/lodash/fp/throttle.js +5 -0
- package/node_modules/lodash/fp/thru.js +5 -0
- package/node_modules/lodash/fp/times.js +5 -0
- package/node_modules/lodash/fp/toArray.js +5 -0
- package/node_modules/lodash/fp/toFinite.js +5 -0
- package/node_modules/lodash/fp/toInteger.js +5 -0
- package/node_modules/lodash/fp/toIterator.js +5 -0
- package/node_modules/lodash/fp/toJSON.js +5 -0
- package/node_modules/lodash/fp/toLength.js +5 -0
- package/node_modules/lodash/fp/toLower.js +5 -0
- package/node_modules/lodash/fp/toNumber.js +5 -0
- package/node_modules/lodash/fp/toPairs.js +5 -0
- package/node_modules/lodash/fp/toPairsIn.js +5 -0
- package/node_modules/lodash/fp/toPath.js +5 -0
- package/node_modules/lodash/fp/toPlainObject.js +5 -0
- package/node_modules/lodash/fp/toSafeInteger.js +5 -0
- package/node_modules/lodash/fp/toString.js +5 -0
- package/node_modules/lodash/fp/toUpper.js +5 -0
- package/node_modules/lodash/fp/transform.js +5 -0
- package/node_modules/lodash/fp/trim.js +5 -0
- package/node_modules/lodash/fp/trimChars.js +5 -0
- package/node_modules/lodash/fp/trimCharsEnd.js +5 -0
- package/node_modules/lodash/fp/trimCharsStart.js +5 -0
- package/node_modules/lodash/fp/trimEnd.js +5 -0
- package/node_modules/lodash/fp/trimStart.js +5 -0
- package/node_modules/lodash/fp/truncate.js +5 -0
- package/node_modules/lodash/fp/unapply.js +1 -0
- package/node_modules/lodash/fp/unary.js +5 -0
- package/node_modules/lodash/fp/unescape.js +5 -0
- package/node_modules/lodash/fp/union.js +5 -0
- package/node_modules/lodash/fp/unionBy.js +5 -0
- package/node_modules/lodash/fp/unionWith.js +5 -0
- package/node_modules/lodash/fp/uniq.js +5 -0
- package/node_modules/lodash/fp/uniqBy.js +5 -0
- package/node_modules/lodash/fp/uniqWith.js +5 -0
- package/node_modules/lodash/fp/uniqueId.js +5 -0
- package/node_modules/lodash/fp/unnest.js +1 -0
- package/node_modules/lodash/fp/unset.js +5 -0
- package/node_modules/lodash/fp/unzip.js +5 -0
- package/node_modules/lodash/fp/unzipWith.js +5 -0
- package/node_modules/lodash/fp/update.js +5 -0
- package/node_modules/lodash/fp/updateWith.js +5 -0
- package/node_modules/lodash/fp/upperCase.js +5 -0
- package/node_modules/lodash/fp/upperFirst.js +5 -0
- package/node_modules/lodash/fp/useWith.js +1 -0
- package/node_modules/lodash/fp/util.js +2 -0
- package/node_modules/lodash/fp/value.js +5 -0
- package/node_modules/lodash/fp/valueOf.js +5 -0
- package/node_modules/lodash/fp/values.js +5 -0
- package/node_modules/lodash/fp/valuesIn.js +5 -0
- package/node_modules/lodash/fp/where.js +1 -0
- package/node_modules/lodash/fp/whereEq.js +1 -0
- package/node_modules/lodash/fp/without.js +5 -0
- package/node_modules/lodash/fp/words.js +5 -0
- package/node_modules/lodash/fp/wrap.js +5 -0
- package/node_modules/lodash/fp/wrapperAt.js +5 -0
- package/node_modules/lodash/fp/wrapperChain.js +5 -0
- package/node_modules/lodash/fp/wrapperLodash.js +5 -0
- package/node_modules/lodash/fp/wrapperReverse.js +5 -0
- package/node_modules/lodash/fp/wrapperValue.js +5 -0
- package/node_modules/lodash/fp/xor.js +5 -0
- package/node_modules/lodash/fp/xorBy.js +5 -0
- package/node_modules/lodash/fp/xorWith.js +5 -0
- package/node_modules/lodash/fp/zip.js +5 -0
- package/node_modules/lodash/fp/zipAll.js +5 -0
- package/node_modules/lodash/fp/zipObj.js +1 -0
- package/node_modules/lodash/fp/zipObject.js +5 -0
- package/node_modules/lodash/fp/zipObjectDeep.js +5 -0
- package/node_modules/lodash/fp/zipWith.js +5 -0
- package/node_modules/lodash/fp.js +2 -0
- package/node_modules/lodash/fromPairs.js +30 -0
- package/node_modules/lodash/function.js +25 -0
- package/node_modules/lodash/functions.js +31 -0
- package/node_modules/lodash/functionsIn.js +31 -0
- package/node_modules/lodash/get.js +33 -0
- package/node_modules/lodash/groupBy.js +41 -0
- package/node_modules/lodash/gt.js +29 -0
- package/node_modules/lodash/gte.js +30 -0
- package/node_modules/lodash/has.js +35 -0
- package/node_modules/lodash/hasIn.js +34 -0
- package/node_modules/lodash/head.js +23 -0
- package/node_modules/lodash/identity.js +21 -0
- package/node_modules/lodash/inRange.js +55 -0
- package/node_modules/lodash/includes.js +53 -0
- package/node_modules/lodash/index.js +1 -0
- package/node_modules/lodash/indexOf.js +42 -0
- package/node_modules/lodash/initial.js +22 -0
- package/node_modules/lodash/intersection.js +30 -0
- package/node_modules/lodash/intersectionBy.js +45 -0
- package/node_modules/lodash/intersectionWith.js +41 -0
- package/node_modules/lodash/invert.js +42 -0
- package/node_modules/lodash/invertBy.js +56 -0
- package/node_modules/lodash/invoke.js +24 -0
- package/node_modules/lodash/invokeMap.js +41 -0
- package/node_modules/lodash/isArguments.js +36 -0
- package/node_modules/lodash/isArray.js +26 -0
- package/node_modules/lodash/isArrayBuffer.js +27 -0
- package/node_modules/lodash/isArrayLike.js +33 -0
- package/node_modules/lodash/isArrayLikeObject.js +33 -0
- package/node_modules/lodash/isBoolean.js +29 -0
- package/node_modules/lodash/isBuffer.js +38 -0
- package/node_modules/lodash/isDate.js +27 -0
- package/node_modules/lodash/isElement.js +25 -0
- package/node_modules/lodash/isEmpty.js +77 -0
- package/node_modules/lodash/isEqual.js +35 -0
- package/node_modules/lodash/isEqualWith.js +41 -0
- package/node_modules/lodash/isError.js +36 -0
- package/node_modules/lodash/isFinite.js +36 -0
- package/node_modules/lodash/isFunction.js +37 -0
- package/node_modules/lodash/isInteger.js +33 -0
- package/node_modules/lodash/isLength.js +35 -0
- package/node_modules/lodash/isMap.js +27 -0
- package/node_modules/lodash/isMatch.js +36 -0
- package/node_modules/lodash/isMatchWith.js +41 -0
- package/node_modules/lodash/isNaN.js +38 -0
- package/node_modules/lodash/isNative.js +40 -0
- package/node_modules/lodash/isNil.js +25 -0
- package/node_modules/lodash/isNull.js +22 -0
- package/node_modules/lodash/isNumber.js +38 -0
- package/node_modules/lodash/isObject.js +31 -0
- package/node_modules/lodash/isObjectLike.js +29 -0
- package/node_modules/lodash/isPlainObject.js +62 -0
- package/node_modules/lodash/isRegExp.js +27 -0
- package/node_modules/lodash/isSafeInteger.js +37 -0
- package/node_modules/lodash/isSet.js +27 -0
- package/node_modules/lodash/isString.js +30 -0
- package/node_modules/lodash/isSymbol.js +29 -0
- package/node_modules/lodash/isTypedArray.js +27 -0
- package/node_modules/lodash/isUndefined.js +22 -0
- package/node_modules/lodash/isWeakMap.js +28 -0
- package/node_modules/lodash/isWeakSet.js +28 -0
- package/node_modules/lodash/iteratee.js +53 -0
- package/node_modules/lodash/join.js +26 -0
- package/node_modules/lodash/kebabCase.js +28 -0
- package/node_modules/lodash/keyBy.js +36 -0
- package/node_modules/lodash/keys.js +37 -0
- package/node_modules/lodash/keysIn.js +32 -0
- package/node_modules/lodash/lang.js +58 -0
- package/node_modules/lodash/last.js +20 -0
- package/node_modules/lodash/lastIndexOf.js +46 -0
- package/node_modules/lodash/lodash.js +17259 -0
- package/node_modules/lodash/lodash.min.js +136 -0
- package/node_modules/lodash/lowerCase.js +27 -0
- package/node_modules/lodash/lowerFirst.js +22 -0
- package/node_modules/lodash/lt.js +29 -0
- package/node_modules/lodash/lte.js +30 -0
- package/node_modules/lodash/map.js +53 -0
- package/node_modules/lodash/mapKeys.js +36 -0
- package/node_modules/lodash/mapValues.js +43 -0
- package/node_modules/lodash/matches.js +46 -0
- package/node_modules/lodash/matchesProperty.js +44 -0
- package/node_modules/lodash/math.js +17 -0
- package/node_modules/lodash/max.js +29 -0
- package/node_modules/lodash/maxBy.js +34 -0
- package/node_modules/lodash/mean.js +22 -0
- package/node_modules/lodash/meanBy.js +31 -0
- package/node_modules/lodash/memoize.js +73 -0
- package/node_modules/lodash/merge.js +39 -0
- package/node_modules/lodash/mergeWith.js +39 -0
- package/node_modules/lodash/method.js +34 -0
- package/node_modules/lodash/methodOf.js +33 -0
- package/node_modules/lodash/min.js +29 -0
- package/node_modules/lodash/minBy.js +34 -0
- package/node_modules/lodash/mixin.js +74 -0
- package/node_modules/lodash/multiply.js +22 -0
- package/node_modules/lodash/negate.js +40 -0
- package/node_modules/lodash/next.js +35 -0
- package/node_modules/lodash/noop.js +17 -0
- package/node_modules/lodash/now.js +23 -0
- package/node_modules/lodash/nth.js +29 -0
- package/node_modules/lodash/nthArg.js +32 -0
- package/node_modules/lodash/number.js +5 -0
- package/node_modules/lodash/object.js +49 -0
- package/node_modules/lodash/omit.js +57 -0
- package/node_modules/lodash/omitBy.js +29 -0
- package/node_modules/lodash/once.js +25 -0
- package/node_modules/lodash/orderBy.js +47 -0
- package/node_modules/lodash/over.js +24 -0
- package/node_modules/lodash/overArgs.js +61 -0
- package/node_modules/lodash/overEvery.js +34 -0
- package/node_modules/lodash/overSome.js +37 -0
- package/node_modules/lodash/package.json +19 -0
- package/node_modules/lodash/pad.js +49 -0
- package/node_modules/lodash/padEnd.js +39 -0
- package/node_modules/lodash/padStart.js +39 -0
- package/node_modules/lodash/parseInt.js +43 -0
- package/node_modules/lodash/partial.js +50 -0
- package/node_modules/lodash/partialRight.js +49 -0
- package/node_modules/lodash/partition.js +43 -0
- package/node_modules/lodash/pick.js +25 -0
- package/node_modules/lodash/pickBy.js +37 -0
- package/node_modules/lodash/plant.js +48 -0
- package/node_modules/lodash/property.js +32 -0
- package/node_modules/lodash/propertyOf.js +30 -0
- package/node_modules/lodash/pull.js +29 -0
- package/node_modules/lodash/pullAll.js +29 -0
- package/node_modules/lodash/pullAllBy.js +33 -0
- package/node_modules/lodash/pullAllWith.js +32 -0
- package/node_modules/lodash/pullAt.js +43 -0
- package/node_modules/lodash/random.js +91 -0
- package/node_modules/lodash/range.js +46 -0
- package/node_modules/lodash/rangeRight.js +41 -0
- package/node_modules/lodash/rearg.js +33 -0
- package/node_modules/lodash/reduce.js +51 -0
- package/node_modules/lodash/reduceRight.js +36 -0
- package/node_modules/lodash/reject.js +46 -0
- package/node_modules/lodash/remove.js +53 -0
- package/node_modules/lodash/repeat.js +37 -0
- package/node_modules/lodash/replace.js +29 -0
- package/node_modules/lodash/rest.js +40 -0
- package/node_modules/lodash/result.js +56 -0
- package/node_modules/lodash/reverse.js +34 -0
- package/node_modules/lodash/round.js +26 -0
- package/node_modules/lodash/sample.js +24 -0
- package/node_modules/lodash/sampleSize.js +37 -0
- package/node_modules/lodash/seq.js +16 -0
- package/node_modules/lodash/set.js +35 -0
- package/node_modules/lodash/setWith.js +32 -0
- package/node_modules/lodash/shuffle.js +25 -0
- package/node_modules/lodash/size.js +46 -0
- package/node_modules/lodash/slice.js +37 -0
- package/node_modules/lodash/snakeCase.js +28 -0
- package/node_modules/lodash/some.js +51 -0
- package/node_modules/lodash/sortBy.js +48 -0
- package/node_modules/lodash/sortedIndex.js +24 -0
- package/node_modules/lodash/sortedIndexBy.js +33 -0
- package/node_modules/lodash/sortedIndexOf.js +31 -0
- package/node_modules/lodash/sortedLastIndex.js +25 -0
- package/node_modules/lodash/sortedLastIndexBy.js +33 -0
- package/node_modules/lodash/sortedLastIndexOf.js +31 -0
- package/node_modules/lodash/sortedUniq.js +24 -0
- package/node_modules/lodash/sortedUniqBy.js +26 -0
- package/node_modules/lodash/split.js +52 -0
- package/node_modules/lodash/spread.js +63 -0
- package/node_modules/lodash/startCase.js +29 -0
- package/node_modules/lodash/startsWith.js +39 -0
- package/node_modules/lodash/string.js +33 -0
- package/node_modules/lodash/stubArray.js +23 -0
- package/node_modules/lodash/stubFalse.js +18 -0
- package/node_modules/lodash/stubObject.js +23 -0
- package/node_modules/lodash/stubString.js +18 -0
- package/node_modules/lodash/stubTrue.js +18 -0
- package/node_modules/lodash/subtract.js +22 -0
- package/node_modules/lodash/sum.js +24 -0
- package/node_modules/lodash/sumBy.js +33 -0
- package/node_modules/lodash/tail.js +22 -0
- package/node_modules/lodash/take.js +37 -0
- package/node_modules/lodash/takeRight.js +39 -0
- package/node_modules/lodash/takeRightWhile.js +45 -0
- package/node_modules/lodash/takeWhile.js +45 -0
- package/node_modules/lodash/tap.js +29 -0
- package/node_modules/lodash/template.js +284 -0
- package/node_modules/lodash/templateSettings.js +71 -0
- package/node_modules/lodash/throttle.js +69 -0
- package/node_modules/lodash/thru.js +28 -0
- package/node_modules/lodash/times.js +51 -0
- package/node_modules/lodash/toArray.js +58 -0
- package/node_modules/lodash/toFinite.js +42 -0
- package/node_modules/lodash/toInteger.js +36 -0
- package/node_modules/lodash/toIterator.js +23 -0
- package/node_modules/lodash/toJSON.js +1 -0
- package/node_modules/lodash/toLength.js +38 -0
- package/node_modules/lodash/toLower.js +28 -0
- package/node_modules/lodash/toNumber.js +64 -0
- package/node_modules/lodash/toPairs.js +30 -0
- package/node_modules/lodash/toPairsIn.js +30 -0
- package/node_modules/lodash/toPath.js +33 -0
- package/node_modules/lodash/toPlainObject.js +32 -0
- package/node_modules/lodash/toSafeInteger.js +37 -0
- package/node_modules/lodash/toString.js +28 -0
- package/node_modules/lodash/toUpper.js +28 -0
- package/node_modules/lodash/transform.js +65 -0
- package/node_modules/lodash/trim.js +47 -0
- package/node_modules/lodash/trimEnd.js +41 -0
- package/node_modules/lodash/trimStart.js +43 -0
- package/node_modules/lodash/truncate.js +111 -0
- package/node_modules/lodash/unary.js +22 -0
- package/node_modules/lodash/unescape.js +34 -0
- package/node_modules/lodash/union.js +26 -0
- package/node_modules/lodash/unionBy.js +39 -0
- package/node_modules/lodash/unionWith.js +34 -0
- package/node_modules/lodash/uniq.js +25 -0
- package/node_modules/lodash/uniqBy.js +31 -0
- package/node_modules/lodash/uniqWith.js +28 -0
- package/node_modules/lodash/uniqueId.js +28 -0
- package/node_modules/lodash/unset.js +34 -0
- package/node_modules/lodash/unzip.js +45 -0
- package/node_modules/lodash/unzipWith.js +39 -0
- package/node_modules/lodash/update.js +35 -0
- package/node_modules/lodash/updateWith.js +33 -0
- package/node_modules/lodash/upperCase.js +27 -0
- package/node_modules/lodash/upperFirst.js +22 -0
- package/node_modules/lodash/util.js +34 -0
- package/node_modules/lodash/value.js +1 -0
- package/node_modules/lodash/valueOf.js +1 -0
- package/node_modules/lodash/values.js +34 -0
- package/node_modules/lodash/valuesIn.js +32 -0
- package/node_modules/lodash/without.js +31 -0
- package/node_modules/lodash/words.js +35 -0
- package/node_modules/lodash/wrap.js +30 -0
- package/node_modules/lodash/wrapperAt.js +48 -0
- package/node_modules/lodash/wrapperChain.js +34 -0
- package/node_modules/lodash/wrapperLodash.js +147 -0
- package/node_modules/lodash/wrapperReverse.js +44 -0
- package/node_modules/lodash/wrapperValue.js +21 -0
- package/node_modules/lodash/xor.js +28 -0
- package/node_modules/lodash/xorBy.js +39 -0
- package/node_modules/lodash/xorWith.js +34 -0
- package/node_modules/lodash/zip.js +22 -0
- package/node_modules/lodash/zipObject.js +24 -0
- package/node_modules/lodash/zipObjectDeep.js +23 -0
- package/node_modules/lodash/zipWith.js +32 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/proxy-from-env/README.md +43 -11
- package/node_modules/proxy-from-env/index.cjs +105 -0
- package/node_modules/proxy-from-env/index.js +14 -19
- package/node_modules/proxy-from-env/package.json +20 -11
- package/node_modules/zod/LICENSE +1 -1
- package/node_modules/zod/README.md +114 -2782
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -2
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/package.json +94 -95
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +257 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5136 -0
- package/node_modules/zod/src/v4/classic/checks.ts +30 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +66 -0
- package/node_modules/zod/src/v4/classic/errors.ts +75 -0
- package/node_modules/zod/src/v4/classic/external.ts +50 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +33 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1594 -0
- package/node_modules/zod/src/v4/core/checks.ts +1283 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +134 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +424 -0
- package/node_modules/zod/src/v4/core/function.ts +176 -0
- package/node_modules/zod/src/v4/core/index.ts +15 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +143 -0
- package/node_modules/zod/src/v4/core/parse.ts +94 -0
- package/node_modules/zod/src/v4/core/regexes.ts +135 -0
- package/node_modules/zod/src/v4/core/registries.ts +96 -0
- package/node_modules/zod/src/v4/core/schemas.ts +3842 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
- package/node_modules/zod/src/v4/core/util.ts +775 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +125 -0
- package/node_modules/zod/src/v4/locales/az.ts +121 -0
- package/node_modules/zod/src/v4/locales/be.ts +184 -0
- package/node_modules/zod/src/v4/locales/ca.ts +127 -0
- package/node_modules/zod/src/v4/locales/cs.ts +142 -0
- package/node_modules/zod/src/v4/locales/de.ts +124 -0
- package/node_modules/zod/src/v4/locales/en.ts +127 -0
- package/node_modules/zod/src/v4/locales/eo.ts +125 -0
- package/node_modules/zod/src/v4/locales/es.ts +125 -0
- package/node_modules/zod/src/v4/locales/fa.ts +134 -0
- package/node_modules/zod/src/v4/locales/fi.ts +131 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
- package/node_modules/zod/src/v4/locales/fr.ts +124 -0
- package/node_modules/zod/src/v4/locales/he.ts +125 -0
- package/node_modules/zod/src/v4/locales/hu.ts +126 -0
- package/node_modules/zod/src/v4/locales/id.ts +125 -0
- package/node_modules/zod/src/v4/locales/index.ts +39 -0
- package/node_modules/zod/src/v4/locales/it.ts +125 -0
- package/node_modules/zod/src/v4/locales/ja.ts +122 -0
- package/node_modules/zod/src/v4/locales/kh.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +131 -0
- package/node_modules/zod/src/v4/locales/mk.ts +127 -0
- package/node_modules/zod/src/v4/locales/ms.ts +124 -0
- package/node_modules/zod/src/v4/locales/nl.ts +126 -0
- package/node_modules/zod/src/v4/locales/no.ts +124 -0
- package/node_modules/zod/src/v4/locales/ota.ts +125 -0
- package/node_modules/zod/src/v4/locales/pl.ts +126 -0
- package/node_modules/zod/src/v4/locales/ps.ts +133 -0
- package/node_modules/zod/src/v4/locales/pt.ts +123 -0
- package/node_modules/zod/src/v4/locales/ru.ts +184 -0
- package/node_modules/zod/src/v4/locales/sl.ts +126 -0
- package/node_modules/zod/src/v4/locales/sv.ts +127 -0
- package/node_modules/zod/src/v4/locales/ta.ts +125 -0
- package/node_modules/zod/src/v4/locales/th.ts +126 -0
- package/node_modules/zod/src/v4/locales/tr.ts +121 -0
- package/node_modules/zod/src/v4/locales/ua.ts +126 -0
- package/node_modules/zod/src/v4/locales/ur.ts +126 -0
- package/node_modules/zod/src/v4/locales/vi.ts +125 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +22 -0
- package/node_modules/zod/src/v4/mini/external.ts +40 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +62 -0
- package/node_modules/zod/src/v4/mini/parse.ts +1 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
- package/node_modules/zod/src/v4-mini/index.ts +1 -0
- package/node_modules/zod/{lib/ZodError.js → v3/ZodError.cjs} +9 -8
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/{lib → v3}/ZodError.d.ts +23 -23
- package/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/zod/{lib/errors.js → v3/errors.cjs} +6 -6
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/{lib → v3}/errors.d.ts +2 -2
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/{lib/helpers/errorUtil.js → v3/helpers/errorUtil.cjs} +3 -2
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/{lib/helpers/parseUtil.js → v3/helpers/parseUtil.cjs} +10 -11
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/{lib → v3}/helpers/parseUtil.d.ts +15 -15
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/{lib → v3}/helpers/partialUtil.d.ts +1 -1
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/{lib/helpers/util.js → v3/helpers/util.cjs} +7 -12
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/{lib → v3}/helpers/util.d.ts +9 -6
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/{lib/index.js → v3/index.cjs} +7 -3
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/{lib/locales/en.js → v3/locales/en.cjs} +32 -50
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/{lib → v3}/locales/en.d.ts +1 -1
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/{lib/types.js → v3/types.cjs} +661 -563
- package/node_modules/zod/{lib/types.d.ts → v3/types.d.cts} +249 -345
- package/node_modules/zod/v3/types.d.ts +1031 -0
- package/node_modules/zod/{lib/index.mjs → v3/types.js} +357 -900
- package/node_modules/zod/v4/classic/checks.cjs +32 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +57 -0
- package/node_modules/zod/v4/classic/compat.d.cts +46 -0
- package/node_modules/zod/v4/classic/compat.d.ts +46 -0
- package/node_modules/zod/v4/classic/compat.js +27 -0
- package/node_modules/zod/v4/classic/errors.cjs +67 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +41 -0
- package/node_modules/zod/v4/classic/external.cjs +70 -0
- package/node_modules/zod/v4/classic/external.d.cts +13 -0
- package/node_modules/zod/v4/classic/external.d.ts +13 -0
- package/node_modules/zod/v4/classic/external.js +18 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/parse.cjs +32 -0
- package/node_modules/zod/v4/classic/parse.d.cts +23 -0
- package/node_modules/zod/v4/classic/parse.d.ts +23 -0
- package/node_modules/zod/v4/classic/parse.js +6 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1109 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +630 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +630 -0
- package/node_modules/zod/v4/classic/schemas.js +1006 -0
- package/node_modules/zod/v4/core/api.cjs +1039 -0
- package/node_modules/zod/v4/core/api.d.cts +284 -0
- package/node_modules/zod/v4/core/api.d.ts +284 -0
- package/node_modules/zod/v4/core/api.js +906 -0
- package/node_modules/zod/v4/core/checks.cjs +591 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +565 -0
- package/node_modules/zod/v4/core/core.cjs +67 -0
- package/node_modules/zod/v4/core/core.d.cts +49 -0
- package/node_modules/zod/v4/core/core.d.ts +49 -0
- package/node_modules/zod/v4/core/core.js +61 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +226 -0
- package/node_modules/zod/v4/core/errors.d.cts +208 -0
- package/node_modules/zod/v4/core/errors.d.ts +208 -0
- package/node_modules/zod/v4/core/errors.js +195 -0
- package/node_modules/zod/v4/core/function.cjs +102 -0
- package/node_modules/zod/v4/core/function.d.cts +52 -0
- package/node_modules/zod/v4/core/function.d.ts +52 -0
- package/node_modules/zod/v4/core/function.js +75 -0
- package/node_modules/zod/v4/core/index.cjs +44 -0
- package/node_modules/zod/v4/core/index.d.cts +15 -0
- package/node_modules/zod/v4/core/index.d.ts +15 -0
- package/node_modules/zod/v4/core/index.js +15 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +87 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +87 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/parse.cjs +87 -0
- package/node_modules/zod/v4/core/parse.d.cts +25 -0
- package/node_modules/zod/v4/core/parse.d.ts +25 -0
- package/node_modules/zod/v4/core/parse.js +57 -0
- package/node_modules/zod/v4/core/regexes.cjs +103 -0
- package/node_modules/zod/v4/core/regexes.d.cts +62 -0
- package/node_modules/zod/v4/core/regexes.d.ts +62 -0
- package/node_modules/zod/v4/core/regexes.js +95 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +1748 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1041 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1041 -0
- package/node_modules/zod/v4/core/schemas.js +1717 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/to-json-schema.js +849 -0
- package/node_modules/zod/v4/core/util.cjs +539 -0
- package/node_modules/zod/v4/core/util.d.cts +183 -0
- package/node_modules/zod/v4/core/util.d.ts +183 -0
- package/node_modules/zod/v4/core/util.js +493 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +142 -0
- package/node_modules/zod/v4/locales/ar.d.cts +4 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +116 -0
- package/node_modules/zod/v4/locales/az.cjs +141 -0
- package/node_modules/zod/v4/locales/az.d.cts +4 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +115 -0
- package/node_modules/zod/v4/locales/be.cjs +190 -0
- package/node_modules/zod/v4/locales/be.d.cts +4 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +164 -0
- package/node_modules/zod/v4/locales/ca.cjs +144 -0
- package/node_modules/zod/v4/locales/ca.d.cts +4 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +118 -0
- package/node_modules/zod/v4/locales/cs.cjs +161 -0
- package/node_modules/zod/v4/locales/cs.d.cts +4 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +135 -0
- package/node_modules/zod/v4/locales/de.cjs +142 -0
- package/node_modules/zod/v4/locales/de.d.cts +4 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +116 -0
- package/node_modules/zod/v4/locales/en.cjs +145 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +5 -0
- package/node_modules/zod/v4/locales/en.js +117 -0
- package/node_modules/zod/v4/locales/eo.cjs +144 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +5 -0
- package/node_modules/zod/v4/locales/eo.js +116 -0
- package/node_modules/zod/v4/locales/es.cjs +143 -0
- package/node_modules/zod/v4/locales/es.d.cts +4 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +117 -0
- package/node_modules/zod/v4/locales/fa.cjs +148 -0
- package/node_modules/zod/v4/locales/fa.d.cts +4 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +122 -0
- package/node_modules/zod/v4/locales/fi.cjs +148 -0
- package/node_modules/zod/v4/locales/fi.d.cts +4 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +122 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +117 -0
- package/node_modules/zod/v4/locales/fr.cjs +142 -0
- package/node_modules/zod/v4/locales/fr.d.cts +4 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +116 -0
- package/node_modules/zod/v4/locales/he.cjs +143 -0
- package/node_modules/zod/v4/locales/he.d.cts +4 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +117 -0
- package/node_modules/zod/v4/locales/hu.cjs +143 -0
- package/node_modules/zod/v4/locales/hu.d.cts +4 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +117 -0
- package/node_modules/zod/v4/locales/id.cjs +142 -0
- package/node_modules/zod/v4/locales/id.d.cts +4 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +116 -0
- package/node_modules/zod/v4/locales/index.cjs +84 -0
- package/node_modules/zod/v4/locales/index.d.cts +39 -0
- package/node_modules/zod/v4/locales/index.d.ts +39 -0
- package/node_modules/zod/v4/locales/index.js +39 -0
- package/node_modules/zod/v4/locales/it.cjs +143 -0
- package/node_modules/zod/v4/locales/it.d.cts +4 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +117 -0
- package/node_modules/zod/v4/locales/ja.cjs +141 -0
- package/node_modules/zod/v4/locales/ja.d.cts +4 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +115 -0
- package/node_modules/zod/v4/locales/kh.cjs +143 -0
- package/node_modules/zod/v4/locales/kh.d.cts +4 -0
- package/node_modules/zod/v4/locales/kh.d.ts +4 -0
- package/node_modules/zod/v4/locales/kh.js +117 -0
- package/node_modules/zod/v4/locales/ko.cjs +147 -0
- package/node_modules/zod/v4/locales/ko.d.cts +4 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +121 -0
- package/node_modules/zod/v4/locales/mk.cjs +144 -0
- package/node_modules/zod/v4/locales/mk.d.cts +4 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +118 -0
- package/node_modules/zod/v4/locales/ms.cjs +142 -0
- package/node_modules/zod/v4/locales/ms.d.cts +4 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +116 -0
- package/node_modules/zod/v4/locales/nl.cjs +143 -0
- package/node_modules/zod/v4/locales/nl.d.cts +4 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +117 -0
- package/node_modules/zod/v4/locales/no.cjs +142 -0
- package/node_modules/zod/v4/locales/no.d.cts +4 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +116 -0
- package/node_modules/zod/v4/locales/ota.cjs +143 -0
- package/node_modules/zod/v4/locales/ota.d.cts +4 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +117 -0
- package/node_modules/zod/v4/locales/pl.cjs +143 -0
- package/node_modules/zod/v4/locales/pl.d.cts +4 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +117 -0
- package/node_modules/zod/v4/locales/ps.cjs +148 -0
- package/node_modules/zod/v4/locales/ps.d.cts +4 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +122 -0
- package/node_modules/zod/v4/locales/pt.cjs +142 -0
- package/node_modules/zod/v4/locales/pt.d.cts +4 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +116 -0
- package/node_modules/zod/v4/locales/ru.cjs +190 -0
- package/node_modules/zod/v4/locales/ru.d.cts +4 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +164 -0
- package/node_modules/zod/v4/locales/sl.cjs +143 -0
- package/node_modules/zod/v4/locales/sl.d.cts +4 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +117 -0
- package/node_modules/zod/v4/locales/sv.cjs +144 -0
- package/node_modules/zod/v4/locales/sv.d.cts +4 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +118 -0
- package/node_modules/zod/v4/locales/ta.cjs +143 -0
- package/node_modules/zod/v4/locales/ta.d.cts +4 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +143 -0
- package/node_modules/zod/v4/locales/th.d.cts +4 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +117 -0
- package/node_modules/zod/v4/locales/tr.cjs +143 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +5 -0
- package/node_modules/zod/v4/locales/tr.js +115 -0
- package/node_modules/zod/v4/locales/ua.cjs +143 -0
- package/node_modules/zod/v4/locales/ua.d.cts +4 -0
- package/node_modules/zod/v4/locales/ua.d.ts +4 -0
- package/node_modules/zod/v4/locales/ua.js +117 -0
- package/node_modules/zod/v4/locales/ur.cjs +143 -0
- package/node_modules/zod/v4/locales/ur.d.cts +4 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +117 -0
- package/node_modules/zod/v4/locales/vi.cjs +142 -0
- package/node_modules/zod/v4/locales/vi.d.cts +4 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +116 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +116 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +117 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +47 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +17 -0
- package/node_modules/zod/v4/mini/external.cjs +62 -0
- package/node_modules/zod/v4/mini/external.d.cts +11 -0
- package/node_modules/zod/v4/mini/external.d.ts +11 -0
- package/node_modules/zod/v4/mini/external.js +13 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +60 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +30 -0
- package/node_modules/zod/v4/mini/parse.cjs +8 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +839 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +356 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +356 -0
- package/node_modules/zod/v4/mini/schemas.js +732 -0
- package/node_modules/zod/{lib/external.js → v4-mini/index.cjs} +6 -7
- package/node_modules/zod/v4-mini/index.d.cts +1 -0
- package/node_modules/zod/v4-mini/index.d.ts +1 -0
- package/node_modules/zod/v4-mini/index.js +1 -0
- package/package.json +27 -19
- package/node_modules/@autonomous-testing/sdk/.github/actions/npm_clean_install/action.yaml +0 -35
- package/node_modules/axios/SECURITY.md +0 -5
- package/node_modules/axios/UPGRADE_GUIDE.md +0 -190
- package/node_modules/axios/bin/check-build-version.js +0 -19
- package/node_modules/axios/bin/ssl_hotfix.js +0 -22
- package/node_modules/axios/dist/axios.js.map +0 -1
- package/node_modules/axios/dist/esm/axios.js.map +0 -1
- package/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
- package/node_modules/axios/rollup.config.js +0 -60
- package/node_modules/axios/tsconfig.json +0 -14
- package/node_modules/axios/tslint.json +0 -6
- package/node_modules/form-data/Readme.md +0 -358
- package/node_modules/process/.eslintrc +0 -21
- package/node_modules/process/README.md +0 -26
- package/node_modules/process/browser.js +0 -184
- package/node_modules/process/index.js +0 -2
- package/node_modules/process/package.json +0 -27
- package/node_modules/process/test.js +0 -199
- package/node_modules/proxy-from-env/.eslintrc +0 -29
- package/node_modules/proxy-from-env/.travis.yml +0 -10
- package/node_modules/proxy-from-env/test.js +0 -483
- package/node_modules/zod/lib/__tests__/Mocker.d.ts +0 -17
- package/node_modules/zod/lib/__tests__/Mocker.js +0 -57
- package/node_modules/zod/lib/benchmarks/datetime.d.ts +0 -5
- package/node_modules/zod/lib/benchmarks/datetime.js +0 -54
- package/node_modules/zod/lib/benchmarks/discriminatedUnion.d.ts +0 -5
- package/node_modules/zod/lib/benchmarks/discriminatedUnion.js +0 -79
- package/node_modules/zod/lib/benchmarks/index.js +0 -59
- package/node_modules/zod/lib/benchmarks/ipv4.d.ts +0 -5
- package/node_modules/zod/lib/benchmarks/ipv4.js +0 -54
- package/node_modules/zod/lib/benchmarks/object.d.ts +0 -5
- package/node_modules/zod/lib/benchmarks/object.js +0 -70
- package/node_modules/zod/lib/benchmarks/primitives.d.ts +0 -5
- package/node_modules/zod/lib/benchmarks/primitives.js +0 -170
- package/node_modules/zod/lib/benchmarks/realworld.d.ts +0 -5
- package/node_modules/zod/lib/benchmarks/realworld.js +0 -56
- package/node_modules/zod/lib/benchmarks/string.d.ts +0 -5
- package/node_modules/zod/lib/benchmarks/string.js +0 -55
- package/node_modules/zod/lib/benchmarks/union.d.ts +0 -5
- package/node_modules/zod/lib/benchmarks/union.js +0 -79
- package/node_modules/zod/lib/external.d.ts +0 -6
- package/node_modules/zod/lib/helpers/errorUtil.d.ts +0 -9
- package/node_modules/zod/lib/helpers/typeAliases.d.ts +0 -2
- package/node_modules/zod/lib/index.d.ts +0 -4
- package/node_modules/zod/lib/index.umd.js +0 -4351
- /package/node_modules/{zod/lib/benchmarks/index.d.ts → dotenv/config.d.ts} +0 -0
- /package/node_modules/{mime-types/node_modules/mime-db → mime-db}/HISTORY.md +0 -0
- /package/node_modules/{mime-types/node_modules/mime-db → mime-db}/LICENSE +0 -0
- /package/node_modules/{mime-types/node_modules/mime-db → mime-db}/README.md +0 -0
- /package/node_modules/{mime-types/node_modules/mime-db → mime-db}/db.json +0 -0
- /package/node_modules/{mime-types/node_modules/mime-db → mime-db}/index.js +0 -0
- /package/node_modules/{mime-types/node_modules/mime-db → mime-db}/package.json +0 -0
- /package/node_modules/zod/{lib/helpers/enumUtil.js → v3/helpers/enumUtil.cjs} +0 -0
- /package/node_modules/zod/{lib/helpers/enumUtil.d.ts → v3/helpers/enumUtil.d.cts} +0 -0
- /package/node_modules/zod/{lib/helpers/partialUtil.js → v3/helpers/partialUtil.cjs} +0 -0
- /package/node_modules/zod/{lib/helpers/typeAliases.js → v3/helpers/typeAliases.cjs} +0 -0
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
-
};
|
|
7
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
8
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
11
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12
|
-
};
|
|
13
|
-
var _ZodEnum_cache, _ZodNativeEnum_cache;
|
|
14
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.boolean = exports.bigint = exports.array = exports.any = exports.coerce = exports.ZodFirstPartyTypeKind = exports.late = exports.ZodSchema = exports.Schema = exports.
|
|
16
|
-
exports.NEVER = exports.void = exports.unknown = exports.union = exports.undefined = exports.tuple = exports.transformer = exports.symbol = exports.string = exports.strictObject = exports.set = exports.record = exports.promise = exports.preprocess = exports.pipeline = exports.ostring = exports.optional = exports.onumber = exports.oboolean = exports.object = exports.number = exports.nullable = exports.null = exports.never = exports.nativeEnum = exports.nan = exports.map = exports.literal = exports.lazy = exports.intersection = exports.instanceof = exports.function = exports.enum = exports.effect =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
3
|
+
exports.discriminatedUnion = exports.date = exports.boolean = exports.bigint = exports.array = exports.any = exports.coerce = exports.ZodFirstPartyTypeKind = exports.late = exports.ZodSchema = exports.Schema = exports.ZodReadonly = exports.ZodPipeline = exports.ZodBranded = exports.BRAND = exports.ZodNaN = exports.ZodCatch = exports.ZodDefault = exports.ZodNullable = exports.ZodOptional = exports.ZodTransformer = exports.ZodEffects = exports.ZodPromise = exports.ZodNativeEnum = exports.ZodEnum = exports.ZodLiteral = exports.ZodLazy = exports.ZodFunction = exports.ZodSet = exports.ZodMap = exports.ZodRecord = exports.ZodTuple = exports.ZodIntersection = exports.ZodDiscriminatedUnion = exports.ZodUnion = exports.ZodObject = exports.ZodArray = exports.ZodVoid = exports.ZodNever = exports.ZodUnknown = exports.ZodAny = exports.ZodNull = exports.ZodUndefined = exports.ZodSymbol = exports.ZodDate = exports.ZodBoolean = exports.ZodBigInt = exports.ZodNumber = exports.ZodString = exports.ZodType = void 0;
|
|
4
|
+
exports.NEVER = exports.void = exports.unknown = exports.union = exports.undefined = exports.tuple = exports.transformer = exports.symbol = exports.string = exports.strictObject = exports.set = exports.record = exports.promise = exports.preprocess = exports.pipeline = exports.ostring = exports.optional = exports.onumber = exports.oboolean = exports.object = exports.number = exports.nullable = exports.null = exports.never = exports.nativeEnum = exports.nan = exports.map = exports.literal = exports.lazy = exports.intersection = exports.instanceof = exports.function = exports.enum = exports.effect = void 0;
|
|
5
|
+
exports.datetimeRegex = datetimeRegex;
|
|
6
|
+
exports.custom = custom;
|
|
7
|
+
const ZodError_js_1 = require("./ZodError.cjs");
|
|
8
|
+
const errors_js_1 = require("./errors.cjs");
|
|
9
|
+
const errorUtil_js_1 = require("./helpers/errorUtil.cjs");
|
|
10
|
+
const parseUtil_js_1 = require("./helpers/parseUtil.cjs");
|
|
11
|
+
const util_js_1 = require("./helpers/util.cjs");
|
|
22
12
|
class ParseInputLazyPath {
|
|
23
13
|
constructor(parent, value, path, key) {
|
|
24
14
|
this._cachedPath = [];
|
|
@@ -29,7 +19,7 @@ class ParseInputLazyPath {
|
|
|
29
19
|
}
|
|
30
20
|
get path() {
|
|
31
21
|
if (!this._cachedPath.length) {
|
|
32
|
-
if (this._key
|
|
22
|
+
if (Array.isArray(this._key)) {
|
|
33
23
|
this._cachedPath.push(...this._path, ...this._key);
|
|
34
24
|
}
|
|
35
25
|
else {
|
|
@@ -40,7 +30,7 @@ class ParseInputLazyPath {
|
|
|
40
30
|
}
|
|
41
31
|
}
|
|
42
32
|
const handleResult = (ctx, result) => {
|
|
43
|
-
if ((0,
|
|
33
|
+
if ((0, parseUtil_js_1.isValid)(result)) {
|
|
44
34
|
return { success: true, data: result.value };
|
|
45
35
|
}
|
|
46
36
|
else {
|
|
@@ -52,7 +42,7 @@ const handleResult = (ctx, result) => {
|
|
|
52
42
|
get error() {
|
|
53
43
|
if (this._error)
|
|
54
44
|
return this._error;
|
|
55
|
-
const error = new
|
|
45
|
+
const error = new ZodError_js_1.ZodError(ctx.common.issues);
|
|
56
46
|
this._error = error;
|
|
57
47
|
return this._error;
|
|
58
48
|
},
|
|
@@ -69,61 +59,31 @@ function processCreateParams(params) {
|
|
|
69
59
|
if (errorMap)
|
|
70
60
|
return { errorMap: errorMap, description };
|
|
71
61
|
const customMap = (iss, ctx) => {
|
|
72
|
-
var _a, _b;
|
|
73
62
|
const { message } = params;
|
|
74
63
|
if (iss.code === "invalid_enum_value") {
|
|
75
|
-
return { message: message
|
|
64
|
+
return { message: message ?? ctx.defaultError };
|
|
76
65
|
}
|
|
77
66
|
if (typeof ctx.data === "undefined") {
|
|
78
|
-
return { message:
|
|
67
|
+
return { message: message ?? required_error ?? ctx.defaultError };
|
|
79
68
|
}
|
|
80
69
|
if (iss.code !== "invalid_type")
|
|
81
70
|
return { message: ctx.defaultError };
|
|
82
|
-
return { message:
|
|
71
|
+
return { message: message ?? invalid_type_error ?? ctx.defaultError };
|
|
83
72
|
};
|
|
84
73
|
return { errorMap: customMap, description };
|
|
85
74
|
}
|
|
86
75
|
class ZodType {
|
|
87
|
-
constructor(def) {
|
|
88
|
-
/** Alias of safeParseAsync */
|
|
89
|
-
this.spa = this.safeParseAsync;
|
|
90
|
-
this._def = def;
|
|
91
|
-
this.parse = this.parse.bind(this);
|
|
92
|
-
this.safeParse = this.safeParse.bind(this);
|
|
93
|
-
this.parseAsync = this.parseAsync.bind(this);
|
|
94
|
-
this.safeParseAsync = this.safeParseAsync.bind(this);
|
|
95
|
-
this.spa = this.spa.bind(this);
|
|
96
|
-
this.refine = this.refine.bind(this);
|
|
97
|
-
this.refinement = this.refinement.bind(this);
|
|
98
|
-
this.superRefine = this.superRefine.bind(this);
|
|
99
|
-
this.optional = this.optional.bind(this);
|
|
100
|
-
this.nullable = this.nullable.bind(this);
|
|
101
|
-
this.nullish = this.nullish.bind(this);
|
|
102
|
-
this.array = this.array.bind(this);
|
|
103
|
-
this.promise = this.promise.bind(this);
|
|
104
|
-
this.or = this.or.bind(this);
|
|
105
|
-
this.and = this.and.bind(this);
|
|
106
|
-
this.transform = this.transform.bind(this);
|
|
107
|
-
this.brand = this.brand.bind(this);
|
|
108
|
-
this.default = this.default.bind(this);
|
|
109
|
-
this.catch = this.catch.bind(this);
|
|
110
|
-
this.describe = this.describe.bind(this);
|
|
111
|
-
this.pipe = this.pipe.bind(this);
|
|
112
|
-
this.readonly = this.readonly.bind(this);
|
|
113
|
-
this.isNullable = this.isNullable.bind(this);
|
|
114
|
-
this.isOptional = this.isOptional.bind(this);
|
|
115
|
-
}
|
|
116
76
|
get description() {
|
|
117
77
|
return this._def.description;
|
|
118
78
|
}
|
|
119
79
|
_getType(input) {
|
|
120
|
-
return (0,
|
|
80
|
+
return (0, util_js_1.getParsedType)(input.data);
|
|
121
81
|
}
|
|
122
82
|
_getOrReturnCtx(input, ctx) {
|
|
123
83
|
return (ctx || {
|
|
124
84
|
common: input.parent.common,
|
|
125
85
|
data: input.data,
|
|
126
|
-
parsedType: (0,
|
|
86
|
+
parsedType: (0, util_js_1.getParsedType)(input.data),
|
|
127
87
|
schemaErrorMap: this._def.errorMap,
|
|
128
88
|
path: input.path,
|
|
129
89
|
parent: input.parent,
|
|
@@ -131,11 +91,11 @@ class ZodType {
|
|
|
131
91
|
}
|
|
132
92
|
_processInputParams(input) {
|
|
133
93
|
return {
|
|
134
|
-
status: new
|
|
94
|
+
status: new parseUtil_js_1.ParseStatus(),
|
|
135
95
|
ctx: {
|
|
136
96
|
common: input.parent.common,
|
|
137
97
|
data: input.data,
|
|
138
|
-
parsedType: (0,
|
|
98
|
+
parsedType: (0, util_js_1.getParsedType)(input.data),
|
|
139
99
|
schemaErrorMap: this._def.errorMap,
|
|
140
100
|
path: input.path,
|
|
141
101
|
parent: input.parent,
|
|
@@ -144,7 +104,7 @@ class ZodType {
|
|
|
144
104
|
}
|
|
145
105
|
_parseSync(input) {
|
|
146
106
|
const result = this._parse(input);
|
|
147
|
-
if ((0,
|
|
107
|
+
if ((0, parseUtil_js_1.isAsync)(result)) {
|
|
148
108
|
throw new Error("Synchronous parse encountered promise.");
|
|
149
109
|
}
|
|
150
110
|
return result;
|
|
@@ -160,22 +120,62 @@ class ZodType {
|
|
|
160
120
|
throw result.error;
|
|
161
121
|
}
|
|
162
122
|
safeParse(data, params) {
|
|
163
|
-
var _a;
|
|
164
123
|
const ctx = {
|
|
165
124
|
common: {
|
|
166
125
|
issues: [],
|
|
167
|
-
async:
|
|
168
|
-
contextualErrorMap: params
|
|
126
|
+
async: params?.async ?? false,
|
|
127
|
+
contextualErrorMap: params?.errorMap,
|
|
169
128
|
},
|
|
170
|
-
path:
|
|
129
|
+
path: params?.path || [],
|
|
171
130
|
schemaErrorMap: this._def.errorMap,
|
|
172
131
|
parent: null,
|
|
173
132
|
data,
|
|
174
|
-
parsedType: (0,
|
|
133
|
+
parsedType: (0, util_js_1.getParsedType)(data),
|
|
175
134
|
};
|
|
176
135
|
const result = this._parseSync({ data, path: ctx.path, parent: ctx });
|
|
177
136
|
return handleResult(ctx, result);
|
|
178
137
|
}
|
|
138
|
+
"~validate"(data) {
|
|
139
|
+
const ctx = {
|
|
140
|
+
common: {
|
|
141
|
+
issues: [],
|
|
142
|
+
async: !!this["~standard"].async,
|
|
143
|
+
},
|
|
144
|
+
path: [],
|
|
145
|
+
schemaErrorMap: this._def.errorMap,
|
|
146
|
+
parent: null,
|
|
147
|
+
data,
|
|
148
|
+
parsedType: (0, util_js_1.getParsedType)(data),
|
|
149
|
+
};
|
|
150
|
+
if (!this["~standard"].async) {
|
|
151
|
+
try {
|
|
152
|
+
const result = this._parseSync({ data, path: [], parent: ctx });
|
|
153
|
+
return (0, parseUtil_js_1.isValid)(result)
|
|
154
|
+
? {
|
|
155
|
+
value: result.value,
|
|
156
|
+
}
|
|
157
|
+
: {
|
|
158
|
+
issues: ctx.common.issues,
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
catch (err) {
|
|
162
|
+
if (err?.message?.toLowerCase()?.includes("encountered")) {
|
|
163
|
+
this["~standard"].async = true;
|
|
164
|
+
}
|
|
165
|
+
ctx.common = {
|
|
166
|
+
issues: [],
|
|
167
|
+
async: true,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return this._parseAsync({ data, path: [], parent: ctx }).then((result) => (0, parseUtil_js_1.isValid)(result)
|
|
172
|
+
? {
|
|
173
|
+
value: result.value,
|
|
174
|
+
}
|
|
175
|
+
: {
|
|
176
|
+
issues: ctx.common.issues,
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
179
|
async parseAsync(data, params) {
|
|
180
180
|
const result = await this.safeParseAsync(data, params);
|
|
181
181
|
if (result.success)
|
|
@@ -186,19 +186,17 @@ class ZodType {
|
|
|
186
186
|
const ctx = {
|
|
187
187
|
common: {
|
|
188
188
|
issues: [],
|
|
189
|
-
contextualErrorMap: params
|
|
189
|
+
contextualErrorMap: params?.errorMap,
|
|
190
190
|
async: true,
|
|
191
191
|
},
|
|
192
|
-
path:
|
|
192
|
+
path: params?.path || [],
|
|
193
193
|
schemaErrorMap: this._def.errorMap,
|
|
194
194
|
parent: null,
|
|
195
195
|
data,
|
|
196
|
-
parsedType: (0,
|
|
196
|
+
parsedType: (0, util_js_1.getParsedType)(data),
|
|
197
197
|
};
|
|
198
198
|
const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });
|
|
199
|
-
const result = await ((0,
|
|
200
|
-
? maybeAsyncResult
|
|
201
|
-
: Promise.resolve(maybeAsyncResult));
|
|
199
|
+
const result = await ((0, parseUtil_js_1.isAsync)(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));
|
|
202
200
|
return handleResult(ctx, result);
|
|
203
201
|
}
|
|
204
202
|
refine(check, message) {
|
|
@@ -216,7 +214,7 @@ class ZodType {
|
|
|
216
214
|
return this._refinement((val, ctx) => {
|
|
217
215
|
const result = check(val);
|
|
218
216
|
const setError = () => ctx.addIssue({
|
|
219
|
-
code:
|
|
217
|
+
code: ZodError_js_1.ZodIssueCode.custom,
|
|
220
218
|
...getIssueProperties(val),
|
|
221
219
|
});
|
|
222
220
|
if (typeof Promise !== "undefined" && result instanceof Promise) {
|
|
@@ -242,9 +240,7 @@ class ZodType {
|
|
|
242
240
|
refinement(check, refinementData) {
|
|
243
241
|
return this._refinement((val, ctx) => {
|
|
244
242
|
if (!check(val)) {
|
|
245
|
-
ctx.addIssue(typeof refinementData === "function"
|
|
246
|
-
? refinementData(val, ctx)
|
|
247
|
-
: refinementData);
|
|
243
|
+
ctx.addIssue(typeof refinementData === "function" ? refinementData(val, ctx) : refinementData);
|
|
248
244
|
return false;
|
|
249
245
|
}
|
|
250
246
|
else {
|
|
@@ -262,6 +258,40 @@ class ZodType {
|
|
|
262
258
|
superRefine(refinement) {
|
|
263
259
|
return this._refinement(refinement);
|
|
264
260
|
}
|
|
261
|
+
constructor(def) {
|
|
262
|
+
/** Alias of safeParseAsync */
|
|
263
|
+
this.spa = this.safeParseAsync;
|
|
264
|
+
this._def = def;
|
|
265
|
+
this.parse = this.parse.bind(this);
|
|
266
|
+
this.safeParse = this.safeParse.bind(this);
|
|
267
|
+
this.parseAsync = this.parseAsync.bind(this);
|
|
268
|
+
this.safeParseAsync = this.safeParseAsync.bind(this);
|
|
269
|
+
this.spa = this.spa.bind(this);
|
|
270
|
+
this.refine = this.refine.bind(this);
|
|
271
|
+
this.refinement = this.refinement.bind(this);
|
|
272
|
+
this.superRefine = this.superRefine.bind(this);
|
|
273
|
+
this.optional = this.optional.bind(this);
|
|
274
|
+
this.nullable = this.nullable.bind(this);
|
|
275
|
+
this.nullish = this.nullish.bind(this);
|
|
276
|
+
this.array = this.array.bind(this);
|
|
277
|
+
this.promise = this.promise.bind(this);
|
|
278
|
+
this.or = this.or.bind(this);
|
|
279
|
+
this.and = this.and.bind(this);
|
|
280
|
+
this.transform = this.transform.bind(this);
|
|
281
|
+
this.brand = this.brand.bind(this);
|
|
282
|
+
this.default = this.default.bind(this);
|
|
283
|
+
this.catch = this.catch.bind(this);
|
|
284
|
+
this.describe = this.describe.bind(this);
|
|
285
|
+
this.pipe = this.pipe.bind(this);
|
|
286
|
+
this.readonly = this.readonly.bind(this);
|
|
287
|
+
this.isNullable = this.isNullable.bind(this);
|
|
288
|
+
this.isOptional = this.isOptional.bind(this);
|
|
289
|
+
this["~standard"] = {
|
|
290
|
+
version: 1,
|
|
291
|
+
vendor: "zod",
|
|
292
|
+
validate: (data) => this["~validate"](data),
|
|
293
|
+
};
|
|
294
|
+
}
|
|
265
295
|
optional() {
|
|
266
296
|
return ZodOptional.create(this, this._def);
|
|
267
297
|
}
|
|
@@ -272,7 +302,7 @@ class ZodType {
|
|
|
272
302
|
return this.nullable().optional();
|
|
273
303
|
}
|
|
274
304
|
array() {
|
|
275
|
-
return ZodArray.create(this
|
|
305
|
+
return ZodArray.create(this);
|
|
276
306
|
}
|
|
277
307
|
promise() {
|
|
278
308
|
return ZodPromise.create(this, this._def);
|
|
@@ -341,11 +371,12 @@ exports.Schema = ZodType;
|
|
|
341
371
|
exports.ZodSchema = ZodType;
|
|
342
372
|
const cuidRegex = /^c[^\s-]{8,}$/i;
|
|
343
373
|
const cuid2Regex = /^[0-9a-z]+$/;
|
|
344
|
-
const ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}
|
|
374
|
+
const ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
|
|
345
375
|
// const uuidRegex =
|
|
346
376
|
// /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
347
377
|
const uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
|
|
348
378
|
const nanoidRegex = /^[a-z0-9_-]{21}$/i;
|
|
379
|
+
const jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
|
|
349
380
|
const durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
|
|
350
381
|
// from https://stackoverflow.com/a/46181/1550155
|
|
351
382
|
// old version: too slow, didn't support unicode
|
|
@@ -367,9 +398,15 @@ const _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
|
|
|
367
398
|
let emojiRegex;
|
|
368
399
|
// faster, simpler, safer
|
|
369
400
|
const ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
|
|
370
|
-
const
|
|
401
|
+
const ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/;
|
|
402
|
+
// const ipv6Regex =
|
|
403
|
+
// /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
|
|
404
|
+
const ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
|
|
405
|
+
const ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
|
|
371
406
|
// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript
|
|
372
407
|
const base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
|
|
408
|
+
// https://base64.guru/standards/base64url
|
|
409
|
+
const base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
|
|
373
410
|
// simple
|
|
374
411
|
// const dateRegexSource = `\\d{4}-\\d{2}-\\d{2}`;
|
|
375
412
|
// no leap year validation
|
|
@@ -378,15 +415,15 @@ const base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}
|
|
|
378
415
|
const dateRegexSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
|
|
379
416
|
const dateRegex = new RegExp(`^${dateRegexSource}$`);
|
|
380
417
|
function timeRegexSource(args) {
|
|
381
|
-
|
|
382
|
-
let regex = `([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d`;
|
|
418
|
+
let secondsRegexSource = `[0-5]\\d`;
|
|
383
419
|
if (args.precision) {
|
|
384
|
-
|
|
420
|
+
secondsRegexSource = `${secondsRegexSource}\\.\\d{${args.precision}}`;
|
|
385
421
|
}
|
|
386
422
|
else if (args.precision == null) {
|
|
387
|
-
|
|
423
|
+
secondsRegexSource = `${secondsRegexSource}(\\.\\d+)?`;
|
|
388
424
|
}
|
|
389
|
-
|
|
425
|
+
const secondsQuantifier = args.precision ? "+" : "?"; // require seconds if precision is nonzero
|
|
426
|
+
return `([01]\\d|2[0-3]):[0-5]\\d(:${secondsRegexSource})${secondsQuantifier}`;
|
|
390
427
|
}
|
|
391
428
|
function timeRegex(args) {
|
|
392
429
|
return new RegExp(`^${timeRegexSource(args)}$`);
|
|
@@ -401,7 +438,6 @@ function datetimeRegex(args) {
|
|
|
401
438
|
regex = `${regex}(${opts.join("|")})`;
|
|
402
439
|
return new RegExp(`^${regex}$`);
|
|
403
440
|
}
|
|
404
|
-
exports.datetimeRegex = datetimeRegex;
|
|
405
441
|
function isValidIP(ip, version) {
|
|
406
442
|
if ((version === "v4" || !version) && ipv4Regex.test(ip)) {
|
|
407
443
|
return true;
|
|
@@ -411,29 +447,65 @@ function isValidIP(ip, version) {
|
|
|
411
447
|
}
|
|
412
448
|
return false;
|
|
413
449
|
}
|
|
450
|
+
function isValidJWT(jwt, alg) {
|
|
451
|
+
if (!jwtRegex.test(jwt))
|
|
452
|
+
return false;
|
|
453
|
+
try {
|
|
454
|
+
const [header] = jwt.split(".");
|
|
455
|
+
if (!header)
|
|
456
|
+
return false;
|
|
457
|
+
// Convert base64url to base64
|
|
458
|
+
const base64 = header
|
|
459
|
+
.replace(/-/g, "+")
|
|
460
|
+
.replace(/_/g, "/")
|
|
461
|
+
.padEnd(header.length + ((4 - (header.length % 4)) % 4), "=");
|
|
462
|
+
const decoded = JSON.parse(atob(base64));
|
|
463
|
+
if (typeof decoded !== "object" || decoded === null)
|
|
464
|
+
return false;
|
|
465
|
+
if ("typ" in decoded && decoded?.typ !== "JWT")
|
|
466
|
+
return false;
|
|
467
|
+
if (!decoded.alg)
|
|
468
|
+
return false;
|
|
469
|
+
if (alg && decoded.alg !== alg)
|
|
470
|
+
return false;
|
|
471
|
+
return true;
|
|
472
|
+
}
|
|
473
|
+
catch {
|
|
474
|
+
return false;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
function isValidCidr(ip, version) {
|
|
478
|
+
if ((version === "v4" || !version) && ipv4CidrRegex.test(ip)) {
|
|
479
|
+
return true;
|
|
480
|
+
}
|
|
481
|
+
if ((version === "v6" || !version) && ipv6CidrRegex.test(ip)) {
|
|
482
|
+
return true;
|
|
483
|
+
}
|
|
484
|
+
return false;
|
|
485
|
+
}
|
|
414
486
|
class ZodString extends ZodType {
|
|
415
487
|
_parse(input) {
|
|
416
488
|
if (this._def.coerce) {
|
|
417
489
|
input.data = String(input.data);
|
|
418
490
|
}
|
|
419
491
|
const parsedType = this._getType(input);
|
|
420
|
-
if (parsedType !==
|
|
492
|
+
if (parsedType !== util_js_1.ZodParsedType.string) {
|
|
421
493
|
const ctx = this._getOrReturnCtx(input);
|
|
422
|
-
(0,
|
|
423
|
-
code:
|
|
424
|
-
expected:
|
|
494
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
495
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
496
|
+
expected: util_js_1.ZodParsedType.string,
|
|
425
497
|
received: ctx.parsedType,
|
|
426
498
|
});
|
|
427
|
-
return
|
|
499
|
+
return parseUtil_js_1.INVALID;
|
|
428
500
|
}
|
|
429
|
-
const status = new
|
|
501
|
+
const status = new parseUtil_js_1.ParseStatus();
|
|
430
502
|
let ctx = undefined;
|
|
431
503
|
for (const check of this._def.checks) {
|
|
432
504
|
if (check.kind === "min") {
|
|
433
505
|
if (input.data.length < check.value) {
|
|
434
506
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
435
|
-
(0,
|
|
436
|
-
code:
|
|
507
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
508
|
+
code: ZodError_js_1.ZodIssueCode.too_small,
|
|
437
509
|
minimum: check.value,
|
|
438
510
|
type: "string",
|
|
439
511
|
inclusive: true,
|
|
@@ -446,8 +518,8 @@ class ZodString extends ZodType {
|
|
|
446
518
|
else if (check.kind === "max") {
|
|
447
519
|
if (input.data.length > check.value) {
|
|
448
520
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
449
|
-
(0,
|
|
450
|
-
code:
|
|
521
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
522
|
+
code: ZodError_js_1.ZodIssueCode.too_big,
|
|
451
523
|
maximum: check.value,
|
|
452
524
|
type: "string",
|
|
453
525
|
inclusive: true,
|
|
@@ -463,8 +535,8 @@ class ZodString extends ZodType {
|
|
|
463
535
|
if (tooBig || tooSmall) {
|
|
464
536
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
465
537
|
if (tooBig) {
|
|
466
|
-
(0,
|
|
467
|
-
code:
|
|
538
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
539
|
+
code: ZodError_js_1.ZodIssueCode.too_big,
|
|
468
540
|
maximum: check.value,
|
|
469
541
|
type: "string",
|
|
470
542
|
inclusive: true,
|
|
@@ -473,8 +545,8 @@ class ZodString extends ZodType {
|
|
|
473
545
|
});
|
|
474
546
|
}
|
|
475
547
|
else if (tooSmall) {
|
|
476
|
-
(0,
|
|
477
|
-
code:
|
|
548
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
549
|
+
code: ZodError_js_1.ZodIssueCode.too_small,
|
|
478
550
|
minimum: check.value,
|
|
479
551
|
type: "string",
|
|
480
552
|
inclusive: true,
|
|
@@ -488,9 +560,9 @@ class ZodString extends ZodType {
|
|
|
488
560
|
else if (check.kind === "email") {
|
|
489
561
|
if (!emailRegex.test(input.data)) {
|
|
490
562
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
491
|
-
(0,
|
|
563
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
492
564
|
validation: "email",
|
|
493
|
-
code:
|
|
565
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
494
566
|
message: check.message,
|
|
495
567
|
});
|
|
496
568
|
status.dirty();
|
|
@@ -502,9 +574,9 @@ class ZodString extends ZodType {
|
|
|
502
574
|
}
|
|
503
575
|
if (!emojiRegex.test(input.data)) {
|
|
504
576
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
505
|
-
(0,
|
|
577
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
506
578
|
validation: "emoji",
|
|
507
|
-
code:
|
|
579
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
508
580
|
message: check.message,
|
|
509
581
|
});
|
|
510
582
|
status.dirty();
|
|
@@ -513,9 +585,9 @@ class ZodString extends ZodType {
|
|
|
513
585
|
else if (check.kind === "uuid") {
|
|
514
586
|
if (!uuidRegex.test(input.data)) {
|
|
515
587
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
516
|
-
(0,
|
|
588
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
517
589
|
validation: "uuid",
|
|
518
|
-
code:
|
|
590
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
519
591
|
message: check.message,
|
|
520
592
|
});
|
|
521
593
|
status.dirty();
|
|
@@ -524,9 +596,9 @@ class ZodString extends ZodType {
|
|
|
524
596
|
else if (check.kind === "nanoid") {
|
|
525
597
|
if (!nanoidRegex.test(input.data)) {
|
|
526
598
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
527
|
-
(0,
|
|
599
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
528
600
|
validation: "nanoid",
|
|
529
|
-
code:
|
|
601
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
530
602
|
message: check.message,
|
|
531
603
|
});
|
|
532
604
|
status.dirty();
|
|
@@ -535,9 +607,9 @@ class ZodString extends ZodType {
|
|
|
535
607
|
else if (check.kind === "cuid") {
|
|
536
608
|
if (!cuidRegex.test(input.data)) {
|
|
537
609
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
538
|
-
(0,
|
|
610
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
539
611
|
validation: "cuid",
|
|
540
|
-
code:
|
|
612
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
541
613
|
message: check.message,
|
|
542
614
|
});
|
|
543
615
|
status.dirty();
|
|
@@ -546,9 +618,9 @@ class ZodString extends ZodType {
|
|
|
546
618
|
else if (check.kind === "cuid2") {
|
|
547
619
|
if (!cuid2Regex.test(input.data)) {
|
|
548
620
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
549
|
-
(0,
|
|
621
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
550
622
|
validation: "cuid2",
|
|
551
|
-
code:
|
|
623
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
552
624
|
message: check.message,
|
|
553
625
|
});
|
|
554
626
|
status.dirty();
|
|
@@ -557,9 +629,9 @@ class ZodString extends ZodType {
|
|
|
557
629
|
else if (check.kind === "ulid") {
|
|
558
630
|
if (!ulidRegex.test(input.data)) {
|
|
559
631
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
560
|
-
(0,
|
|
632
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
561
633
|
validation: "ulid",
|
|
562
|
-
code:
|
|
634
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
563
635
|
message: check.message,
|
|
564
636
|
});
|
|
565
637
|
status.dirty();
|
|
@@ -569,11 +641,11 @@ class ZodString extends ZodType {
|
|
|
569
641
|
try {
|
|
570
642
|
new URL(input.data);
|
|
571
643
|
}
|
|
572
|
-
catch
|
|
644
|
+
catch {
|
|
573
645
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
574
|
-
(0,
|
|
646
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
575
647
|
validation: "url",
|
|
576
|
-
code:
|
|
648
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
577
649
|
message: check.message,
|
|
578
650
|
});
|
|
579
651
|
status.dirty();
|
|
@@ -584,9 +656,9 @@ class ZodString extends ZodType {
|
|
|
584
656
|
const testResult = check.regex.test(input.data);
|
|
585
657
|
if (!testResult) {
|
|
586
658
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
587
|
-
(0,
|
|
659
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
588
660
|
validation: "regex",
|
|
589
|
-
code:
|
|
661
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
590
662
|
message: check.message,
|
|
591
663
|
});
|
|
592
664
|
status.dirty();
|
|
@@ -598,8 +670,8 @@ class ZodString extends ZodType {
|
|
|
598
670
|
else if (check.kind === "includes") {
|
|
599
671
|
if (!input.data.includes(check.value, check.position)) {
|
|
600
672
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
601
|
-
(0,
|
|
602
|
-
code:
|
|
673
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
674
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
603
675
|
validation: { includes: check.value, position: check.position },
|
|
604
676
|
message: check.message,
|
|
605
677
|
});
|
|
@@ -615,8 +687,8 @@ class ZodString extends ZodType {
|
|
|
615
687
|
else if (check.kind === "startsWith") {
|
|
616
688
|
if (!input.data.startsWith(check.value)) {
|
|
617
689
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
618
|
-
(0,
|
|
619
|
-
code:
|
|
690
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
691
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
620
692
|
validation: { startsWith: check.value },
|
|
621
693
|
message: check.message,
|
|
622
694
|
});
|
|
@@ -626,8 +698,8 @@ class ZodString extends ZodType {
|
|
|
626
698
|
else if (check.kind === "endsWith") {
|
|
627
699
|
if (!input.data.endsWith(check.value)) {
|
|
628
700
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
629
|
-
(0,
|
|
630
|
-
code:
|
|
701
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
702
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
631
703
|
validation: { endsWith: check.value },
|
|
632
704
|
message: check.message,
|
|
633
705
|
});
|
|
@@ -638,8 +710,8 @@ class ZodString extends ZodType {
|
|
|
638
710
|
const regex = datetimeRegex(check);
|
|
639
711
|
if (!regex.test(input.data)) {
|
|
640
712
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
641
|
-
(0,
|
|
642
|
-
code:
|
|
713
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
714
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
643
715
|
validation: "datetime",
|
|
644
716
|
message: check.message,
|
|
645
717
|
});
|
|
@@ -650,8 +722,8 @@ class ZodString extends ZodType {
|
|
|
650
722
|
const regex = dateRegex;
|
|
651
723
|
if (!regex.test(input.data)) {
|
|
652
724
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
653
|
-
(0,
|
|
654
|
-
code:
|
|
725
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
726
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
655
727
|
validation: "date",
|
|
656
728
|
message: check.message,
|
|
657
729
|
});
|
|
@@ -662,8 +734,8 @@ class ZodString extends ZodType {
|
|
|
662
734
|
const regex = timeRegex(check);
|
|
663
735
|
if (!regex.test(input.data)) {
|
|
664
736
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
665
|
-
(0,
|
|
666
|
-
code:
|
|
737
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
738
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
667
739
|
validation: "time",
|
|
668
740
|
message: check.message,
|
|
669
741
|
});
|
|
@@ -673,9 +745,9 @@ class ZodString extends ZodType {
|
|
|
673
745
|
else if (check.kind === "duration") {
|
|
674
746
|
if (!durationRegex.test(input.data)) {
|
|
675
747
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
676
|
-
(0,
|
|
748
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
677
749
|
validation: "duration",
|
|
678
|
-
code:
|
|
750
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
679
751
|
message: check.message,
|
|
680
752
|
});
|
|
681
753
|
status.dirty();
|
|
@@ -684,9 +756,31 @@ class ZodString extends ZodType {
|
|
|
684
756
|
else if (check.kind === "ip") {
|
|
685
757
|
if (!isValidIP(input.data, check.version)) {
|
|
686
758
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
687
|
-
(0,
|
|
759
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
688
760
|
validation: "ip",
|
|
689
|
-
code:
|
|
761
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
762
|
+
message: check.message,
|
|
763
|
+
});
|
|
764
|
+
status.dirty();
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
else if (check.kind === "jwt") {
|
|
768
|
+
if (!isValidJWT(input.data, check.alg)) {
|
|
769
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
770
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
771
|
+
validation: "jwt",
|
|
772
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
773
|
+
message: check.message,
|
|
774
|
+
});
|
|
775
|
+
status.dirty();
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
else if (check.kind === "cidr") {
|
|
779
|
+
if (!isValidCidr(input.data, check.version)) {
|
|
780
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
781
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
782
|
+
validation: "cidr",
|
|
783
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
690
784
|
message: check.message,
|
|
691
785
|
});
|
|
692
786
|
status.dirty();
|
|
@@ -695,16 +789,27 @@ class ZodString extends ZodType {
|
|
|
695
789
|
else if (check.kind === "base64") {
|
|
696
790
|
if (!base64Regex.test(input.data)) {
|
|
697
791
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
698
|
-
(0,
|
|
792
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
699
793
|
validation: "base64",
|
|
700
|
-
code:
|
|
794
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
795
|
+
message: check.message,
|
|
796
|
+
});
|
|
797
|
+
status.dirty();
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
else if (check.kind === "base64url") {
|
|
801
|
+
if (!base64urlRegex.test(input.data)) {
|
|
802
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
803
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
804
|
+
validation: "base64url",
|
|
805
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
701
806
|
message: check.message,
|
|
702
807
|
});
|
|
703
808
|
status.dirty();
|
|
704
809
|
}
|
|
705
810
|
}
|
|
706
811
|
else {
|
|
707
|
-
|
|
812
|
+
util_js_1.util.assertNever(check);
|
|
708
813
|
}
|
|
709
814
|
}
|
|
710
815
|
return { status: status.value, value: input.data };
|
|
@@ -712,8 +817,8 @@ class ZodString extends ZodType {
|
|
|
712
817
|
_regex(regex, validation, message) {
|
|
713
818
|
return this.refinement((data) => regex.test(data), {
|
|
714
819
|
validation,
|
|
715
|
-
code:
|
|
716
|
-
...
|
|
820
|
+
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
821
|
+
...errorUtil_js_1.errorUtil.errToObj(message),
|
|
717
822
|
});
|
|
718
823
|
}
|
|
719
824
|
_addCheck(check) {
|
|
@@ -723,37 +828,49 @@ class ZodString extends ZodType {
|
|
|
723
828
|
});
|
|
724
829
|
}
|
|
725
830
|
email(message) {
|
|
726
|
-
return this._addCheck({ kind: "email", ...
|
|
831
|
+
return this._addCheck({ kind: "email", ...errorUtil_js_1.errorUtil.errToObj(message) });
|
|
727
832
|
}
|
|
728
833
|
url(message) {
|
|
729
|
-
return this._addCheck({ kind: "url", ...
|
|
834
|
+
return this._addCheck({ kind: "url", ...errorUtil_js_1.errorUtil.errToObj(message) });
|
|
730
835
|
}
|
|
731
836
|
emoji(message) {
|
|
732
|
-
return this._addCheck({ kind: "emoji", ...
|
|
837
|
+
return this._addCheck({ kind: "emoji", ...errorUtil_js_1.errorUtil.errToObj(message) });
|
|
733
838
|
}
|
|
734
839
|
uuid(message) {
|
|
735
|
-
return this._addCheck({ kind: "uuid", ...
|
|
840
|
+
return this._addCheck({ kind: "uuid", ...errorUtil_js_1.errorUtil.errToObj(message) });
|
|
736
841
|
}
|
|
737
842
|
nanoid(message) {
|
|
738
|
-
return this._addCheck({ kind: "nanoid", ...
|
|
843
|
+
return this._addCheck({ kind: "nanoid", ...errorUtil_js_1.errorUtil.errToObj(message) });
|
|
739
844
|
}
|
|
740
845
|
cuid(message) {
|
|
741
|
-
return this._addCheck({ kind: "cuid", ...
|
|
846
|
+
return this._addCheck({ kind: "cuid", ...errorUtil_js_1.errorUtil.errToObj(message) });
|
|
742
847
|
}
|
|
743
848
|
cuid2(message) {
|
|
744
|
-
return this._addCheck({ kind: "cuid2", ...
|
|
849
|
+
return this._addCheck({ kind: "cuid2", ...errorUtil_js_1.errorUtil.errToObj(message) });
|
|
745
850
|
}
|
|
746
851
|
ulid(message) {
|
|
747
|
-
return this._addCheck({ kind: "ulid", ...
|
|
852
|
+
return this._addCheck({ kind: "ulid", ...errorUtil_js_1.errorUtil.errToObj(message) });
|
|
748
853
|
}
|
|
749
854
|
base64(message) {
|
|
750
|
-
return this._addCheck({ kind: "base64", ...
|
|
855
|
+
return this._addCheck({ kind: "base64", ...errorUtil_js_1.errorUtil.errToObj(message) });
|
|
856
|
+
}
|
|
857
|
+
base64url(message) {
|
|
858
|
+
// base64url encoding is a modification of base64 that can safely be used in URLs and filenames
|
|
859
|
+
return this._addCheck({
|
|
860
|
+
kind: "base64url",
|
|
861
|
+
...errorUtil_js_1.errorUtil.errToObj(message),
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
jwt(options) {
|
|
865
|
+
return this._addCheck({ kind: "jwt", ...errorUtil_js_1.errorUtil.errToObj(options) });
|
|
751
866
|
}
|
|
752
867
|
ip(options) {
|
|
753
|
-
return this._addCheck({ kind: "ip", ...
|
|
868
|
+
return this._addCheck({ kind: "ip", ...errorUtil_js_1.errorUtil.errToObj(options) });
|
|
869
|
+
}
|
|
870
|
+
cidr(options) {
|
|
871
|
+
return this._addCheck({ kind: "cidr", ...errorUtil_js_1.errorUtil.errToObj(options) });
|
|
754
872
|
}
|
|
755
873
|
datetime(options) {
|
|
756
|
-
var _a, _b;
|
|
757
874
|
if (typeof options === "string") {
|
|
758
875
|
return this._addCheck({
|
|
759
876
|
kind: "datetime",
|
|
@@ -765,10 +882,10 @@ class ZodString extends ZodType {
|
|
|
765
882
|
}
|
|
766
883
|
return this._addCheck({
|
|
767
884
|
kind: "datetime",
|
|
768
|
-
precision: typeof
|
|
769
|
-
offset:
|
|
770
|
-
local:
|
|
771
|
-
...
|
|
885
|
+
precision: typeof options?.precision === "undefined" ? null : options?.precision,
|
|
886
|
+
offset: options?.offset ?? false,
|
|
887
|
+
local: options?.local ?? false,
|
|
888
|
+
...errorUtil_js_1.errorUtil.errToObj(options?.message),
|
|
772
889
|
});
|
|
773
890
|
}
|
|
774
891
|
date(message) {
|
|
@@ -784,69 +901,68 @@ class ZodString extends ZodType {
|
|
|
784
901
|
}
|
|
785
902
|
return this._addCheck({
|
|
786
903
|
kind: "time",
|
|
787
|
-
precision: typeof
|
|
788
|
-
...
|
|
904
|
+
precision: typeof options?.precision === "undefined" ? null : options?.precision,
|
|
905
|
+
...errorUtil_js_1.errorUtil.errToObj(options?.message),
|
|
789
906
|
});
|
|
790
907
|
}
|
|
791
908
|
duration(message) {
|
|
792
|
-
return this._addCheck({ kind: "duration", ...
|
|
909
|
+
return this._addCheck({ kind: "duration", ...errorUtil_js_1.errorUtil.errToObj(message) });
|
|
793
910
|
}
|
|
794
911
|
regex(regex, message) {
|
|
795
912
|
return this._addCheck({
|
|
796
913
|
kind: "regex",
|
|
797
914
|
regex: regex,
|
|
798
|
-
...
|
|
915
|
+
...errorUtil_js_1.errorUtil.errToObj(message),
|
|
799
916
|
});
|
|
800
917
|
}
|
|
801
918
|
includes(value, options) {
|
|
802
919
|
return this._addCheck({
|
|
803
920
|
kind: "includes",
|
|
804
921
|
value: value,
|
|
805
|
-
position: options
|
|
806
|
-
...
|
|
922
|
+
position: options?.position,
|
|
923
|
+
...errorUtil_js_1.errorUtil.errToObj(options?.message),
|
|
807
924
|
});
|
|
808
925
|
}
|
|
809
926
|
startsWith(value, message) {
|
|
810
927
|
return this._addCheck({
|
|
811
928
|
kind: "startsWith",
|
|
812
929
|
value: value,
|
|
813
|
-
...
|
|
930
|
+
...errorUtil_js_1.errorUtil.errToObj(message),
|
|
814
931
|
});
|
|
815
932
|
}
|
|
816
933
|
endsWith(value, message) {
|
|
817
934
|
return this._addCheck({
|
|
818
935
|
kind: "endsWith",
|
|
819
936
|
value: value,
|
|
820
|
-
...
|
|
937
|
+
...errorUtil_js_1.errorUtil.errToObj(message),
|
|
821
938
|
});
|
|
822
939
|
}
|
|
823
940
|
min(minLength, message) {
|
|
824
941
|
return this._addCheck({
|
|
825
942
|
kind: "min",
|
|
826
943
|
value: minLength,
|
|
827
|
-
...
|
|
944
|
+
...errorUtil_js_1.errorUtil.errToObj(message),
|
|
828
945
|
});
|
|
829
946
|
}
|
|
830
947
|
max(maxLength, message) {
|
|
831
948
|
return this._addCheck({
|
|
832
949
|
kind: "max",
|
|
833
950
|
value: maxLength,
|
|
834
|
-
...
|
|
951
|
+
...errorUtil_js_1.errorUtil.errToObj(message),
|
|
835
952
|
});
|
|
836
953
|
}
|
|
837
954
|
length(len, message) {
|
|
838
955
|
return this._addCheck({
|
|
839
956
|
kind: "length",
|
|
840
957
|
value: len,
|
|
841
|
-
...
|
|
958
|
+
...errorUtil_js_1.errorUtil.errToObj(message),
|
|
842
959
|
});
|
|
843
960
|
}
|
|
844
961
|
/**
|
|
845
|
-
*
|
|
846
|
-
* @see {@link ZodString.min}
|
|
962
|
+
* Equivalent to `.min(1)`
|
|
847
963
|
*/
|
|
848
964
|
nonempty(message) {
|
|
849
|
-
return this.min(1,
|
|
965
|
+
return this.min(1, errorUtil_js_1.errorUtil.errToObj(message));
|
|
850
966
|
}
|
|
851
967
|
trim() {
|
|
852
968
|
return new ZodString({
|
|
@@ -905,9 +1021,16 @@ class ZodString extends ZodType {
|
|
|
905
1021
|
get isIP() {
|
|
906
1022
|
return !!this._def.checks.find((ch) => ch.kind === "ip");
|
|
907
1023
|
}
|
|
1024
|
+
get isCIDR() {
|
|
1025
|
+
return !!this._def.checks.find((ch) => ch.kind === "cidr");
|
|
1026
|
+
}
|
|
908
1027
|
get isBase64() {
|
|
909
1028
|
return !!this._def.checks.find((ch) => ch.kind === "base64");
|
|
910
1029
|
}
|
|
1030
|
+
get isBase64url() {
|
|
1031
|
+
// base64url encoding is a modification of base64 that can safely be used in URLs and filenames
|
|
1032
|
+
return !!this._def.checks.find((ch) => ch.kind === "base64url");
|
|
1033
|
+
}
|
|
911
1034
|
get minLength() {
|
|
912
1035
|
let min = null;
|
|
913
1036
|
for (const ch of this._def.checks) {
|
|
@@ -931,11 +1054,10 @@ class ZodString extends ZodType {
|
|
|
931
1054
|
}
|
|
932
1055
|
exports.ZodString = ZodString;
|
|
933
1056
|
ZodString.create = (params) => {
|
|
934
|
-
var _a;
|
|
935
1057
|
return new ZodString({
|
|
936
1058
|
checks: [],
|
|
937
1059
|
typeName: ZodFirstPartyTypeKind.ZodString,
|
|
938
|
-
coerce:
|
|
1060
|
+
coerce: params?.coerce ?? false,
|
|
939
1061
|
...processCreateParams(params),
|
|
940
1062
|
});
|
|
941
1063
|
};
|
|
@@ -944,9 +1066,9 @@ function floatSafeRemainder(val, step) {
|
|
|
944
1066
|
const valDecCount = (val.toString().split(".")[1] || "").length;
|
|
945
1067
|
const stepDecCount = (step.toString().split(".")[1] || "").length;
|
|
946
1068
|
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
|
|
947
|
-
const valInt = parseInt(val.toFixed(decCount).replace(".", ""));
|
|
948
|
-
const stepInt = parseInt(step.toFixed(decCount).replace(".", ""));
|
|
949
|
-
return (valInt % stepInt) /
|
|
1069
|
+
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
|
|
1070
|
+
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
1071
|
+
return (valInt % stepInt) / 10 ** decCount;
|
|
950
1072
|
}
|
|
951
1073
|
class ZodNumber extends ZodType {
|
|
952
1074
|
constructor() {
|
|
@@ -960,23 +1082,23 @@ class ZodNumber extends ZodType {
|
|
|
960
1082
|
input.data = Number(input.data);
|
|
961
1083
|
}
|
|
962
1084
|
const parsedType = this._getType(input);
|
|
963
|
-
if (parsedType !==
|
|
1085
|
+
if (parsedType !== util_js_1.ZodParsedType.number) {
|
|
964
1086
|
const ctx = this._getOrReturnCtx(input);
|
|
965
|
-
(0,
|
|
966
|
-
code:
|
|
967
|
-
expected:
|
|
1087
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1088
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
1089
|
+
expected: util_js_1.ZodParsedType.number,
|
|
968
1090
|
received: ctx.parsedType,
|
|
969
1091
|
});
|
|
970
|
-
return
|
|
1092
|
+
return parseUtil_js_1.INVALID;
|
|
971
1093
|
}
|
|
972
1094
|
let ctx = undefined;
|
|
973
|
-
const status = new
|
|
1095
|
+
const status = new parseUtil_js_1.ParseStatus();
|
|
974
1096
|
for (const check of this._def.checks) {
|
|
975
1097
|
if (check.kind === "int") {
|
|
976
|
-
if (!
|
|
1098
|
+
if (!util_js_1.util.isInteger(input.data)) {
|
|
977
1099
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
978
|
-
(0,
|
|
979
|
-
code:
|
|
1100
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1101
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
980
1102
|
expected: "integer",
|
|
981
1103
|
received: "float",
|
|
982
1104
|
message: check.message,
|
|
@@ -985,13 +1107,11 @@ class ZodNumber extends ZodType {
|
|
|
985
1107
|
}
|
|
986
1108
|
}
|
|
987
1109
|
else if (check.kind === "min") {
|
|
988
|
-
const tooSmall = check.inclusive
|
|
989
|
-
? input.data < check.value
|
|
990
|
-
: input.data <= check.value;
|
|
1110
|
+
const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;
|
|
991
1111
|
if (tooSmall) {
|
|
992
1112
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
993
|
-
(0,
|
|
994
|
-
code:
|
|
1113
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1114
|
+
code: ZodError_js_1.ZodIssueCode.too_small,
|
|
995
1115
|
minimum: check.value,
|
|
996
1116
|
type: "number",
|
|
997
1117
|
inclusive: check.inclusive,
|
|
@@ -1002,13 +1122,11 @@ class ZodNumber extends ZodType {
|
|
|
1002
1122
|
}
|
|
1003
1123
|
}
|
|
1004
1124
|
else if (check.kind === "max") {
|
|
1005
|
-
const tooBig = check.inclusive
|
|
1006
|
-
? input.data > check.value
|
|
1007
|
-
: input.data >= check.value;
|
|
1125
|
+
const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;
|
|
1008
1126
|
if (tooBig) {
|
|
1009
1127
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
1010
|
-
(0,
|
|
1011
|
-
code:
|
|
1128
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1129
|
+
code: ZodError_js_1.ZodIssueCode.too_big,
|
|
1012
1130
|
maximum: check.value,
|
|
1013
1131
|
type: "number",
|
|
1014
1132
|
inclusive: check.inclusive,
|
|
@@ -1021,8 +1139,8 @@ class ZodNumber extends ZodType {
|
|
|
1021
1139
|
else if (check.kind === "multipleOf") {
|
|
1022
1140
|
if (floatSafeRemainder(input.data, check.value) !== 0) {
|
|
1023
1141
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
1024
|
-
(0,
|
|
1025
|
-
code:
|
|
1142
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1143
|
+
code: ZodError_js_1.ZodIssueCode.not_multiple_of,
|
|
1026
1144
|
multipleOf: check.value,
|
|
1027
1145
|
message: check.message,
|
|
1028
1146
|
});
|
|
@@ -1032,30 +1150,30 @@ class ZodNumber extends ZodType {
|
|
|
1032
1150
|
else if (check.kind === "finite") {
|
|
1033
1151
|
if (!Number.isFinite(input.data)) {
|
|
1034
1152
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
1035
|
-
(0,
|
|
1036
|
-
code:
|
|
1153
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1154
|
+
code: ZodError_js_1.ZodIssueCode.not_finite,
|
|
1037
1155
|
message: check.message,
|
|
1038
1156
|
});
|
|
1039
1157
|
status.dirty();
|
|
1040
1158
|
}
|
|
1041
1159
|
}
|
|
1042
1160
|
else {
|
|
1043
|
-
|
|
1161
|
+
util_js_1.util.assertNever(check);
|
|
1044
1162
|
}
|
|
1045
1163
|
}
|
|
1046
1164
|
return { status: status.value, value: input.data };
|
|
1047
1165
|
}
|
|
1048
1166
|
gte(value, message) {
|
|
1049
|
-
return this.setLimit("min", value, true,
|
|
1167
|
+
return this.setLimit("min", value, true, errorUtil_js_1.errorUtil.toString(message));
|
|
1050
1168
|
}
|
|
1051
1169
|
gt(value, message) {
|
|
1052
|
-
return this.setLimit("min", value, false,
|
|
1170
|
+
return this.setLimit("min", value, false, errorUtil_js_1.errorUtil.toString(message));
|
|
1053
1171
|
}
|
|
1054
1172
|
lte(value, message) {
|
|
1055
|
-
return this.setLimit("max", value, true,
|
|
1173
|
+
return this.setLimit("max", value, true, errorUtil_js_1.errorUtil.toString(message));
|
|
1056
1174
|
}
|
|
1057
1175
|
lt(value, message) {
|
|
1058
|
-
return this.setLimit("max", value, false,
|
|
1176
|
+
return this.setLimit("max", value, false, errorUtil_js_1.errorUtil.toString(message));
|
|
1059
1177
|
}
|
|
1060
1178
|
setLimit(kind, value, inclusive, message) {
|
|
1061
1179
|
return new ZodNumber({
|
|
@@ -1066,7 +1184,7 @@ class ZodNumber extends ZodType {
|
|
|
1066
1184
|
kind,
|
|
1067
1185
|
value,
|
|
1068
1186
|
inclusive,
|
|
1069
|
-
message:
|
|
1187
|
+
message: errorUtil_js_1.errorUtil.toString(message),
|
|
1070
1188
|
},
|
|
1071
1189
|
],
|
|
1072
1190
|
});
|
|
@@ -1080,7 +1198,7 @@ class ZodNumber extends ZodType {
|
|
|
1080
1198
|
int(message) {
|
|
1081
1199
|
return this._addCheck({
|
|
1082
1200
|
kind: "int",
|
|
1083
|
-
message:
|
|
1201
|
+
message: errorUtil_js_1.errorUtil.toString(message),
|
|
1084
1202
|
});
|
|
1085
1203
|
}
|
|
1086
1204
|
positive(message) {
|
|
@@ -1088,7 +1206,7 @@ class ZodNumber extends ZodType {
|
|
|
1088
1206
|
kind: "min",
|
|
1089
1207
|
value: 0,
|
|
1090
1208
|
inclusive: false,
|
|
1091
|
-
message:
|
|
1209
|
+
message: errorUtil_js_1.errorUtil.toString(message),
|
|
1092
1210
|
});
|
|
1093
1211
|
}
|
|
1094
1212
|
negative(message) {
|
|
@@ -1096,7 +1214,7 @@ class ZodNumber extends ZodType {
|
|
|
1096
1214
|
kind: "max",
|
|
1097
1215
|
value: 0,
|
|
1098
1216
|
inclusive: false,
|
|
1099
|
-
message:
|
|
1217
|
+
message: errorUtil_js_1.errorUtil.toString(message),
|
|
1100
1218
|
});
|
|
1101
1219
|
}
|
|
1102
1220
|
nonpositive(message) {
|
|
@@ -1104,7 +1222,7 @@ class ZodNumber extends ZodType {
|
|
|
1104
1222
|
kind: "max",
|
|
1105
1223
|
value: 0,
|
|
1106
1224
|
inclusive: true,
|
|
1107
|
-
message:
|
|
1225
|
+
message: errorUtil_js_1.errorUtil.toString(message),
|
|
1108
1226
|
});
|
|
1109
1227
|
}
|
|
1110
1228
|
nonnegative(message) {
|
|
@@ -1112,20 +1230,20 @@ class ZodNumber extends ZodType {
|
|
|
1112
1230
|
kind: "min",
|
|
1113
1231
|
value: 0,
|
|
1114
1232
|
inclusive: true,
|
|
1115
|
-
message:
|
|
1233
|
+
message: errorUtil_js_1.errorUtil.toString(message),
|
|
1116
1234
|
});
|
|
1117
1235
|
}
|
|
1118
1236
|
multipleOf(value, message) {
|
|
1119
1237
|
return this._addCheck({
|
|
1120
1238
|
kind: "multipleOf",
|
|
1121
1239
|
value: value,
|
|
1122
|
-
message:
|
|
1240
|
+
message: errorUtil_js_1.errorUtil.toString(message),
|
|
1123
1241
|
});
|
|
1124
1242
|
}
|
|
1125
1243
|
finite(message) {
|
|
1126
1244
|
return this._addCheck({
|
|
1127
1245
|
kind: "finite",
|
|
1128
|
-
message:
|
|
1246
|
+
message: errorUtil_js_1.errorUtil.toString(message),
|
|
1129
1247
|
});
|
|
1130
1248
|
}
|
|
1131
1249
|
safe(message) {
|
|
@@ -1133,12 +1251,12 @@ class ZodNumber extends ZodType {
|
|
|
1133
1251
|
kind: "min",
|
|
1134
1252
|
inclusive: true,
|
|
1135
1253
|
value: Number.MIN_SAFE_INTEGER,
|
|
1136
|
-
message:
|
|
1254
|
+
message: errorUtil_js_1.errorUtil.toString(message),
|
|
1137
1255
|
})._addCheck({
|
|
1138
1256
|
kind: "max",
|
|
1139
1257
|
inclusive: true,
|
|
1140
1258
|
value: Number.MAX_SAFE_INTEGER,
|
|
1141
|
-
message:
|
|
1259
|
+
message: errorUtil_js_1.errorUtil.toString(message),
|
|
1142
1260
|
});
|
|
1143
1261
|
}
|
|
1144
1262
|
get minValue() {
|
|
@@ -1162,15 +1280,13 @@ class ZodNumber extends ZodType {
|
|
|
1162
1280
|
return max;
|
|
1163
1281
|
}
|
|
1164
1282
|
get isInt() {
|
|
1165
|
-
return !!this._def.checks.find((ch) => ch.kind === "int" ||
|
|
1166
|
-
(ch.kind === "multipleOf" && util_1.util.isInteger(ch.value)));
|
|
1283
|
+
return !!this._def.checks.find((ch) => ch.kind === "int" || (ch.kind === "multipleOf" && util_js_1.util.isInteger(ch.value)));
|
|
1167
1284
|
}
|
|
1168
1285
|
get isFinite() {
|
|
1169
|
-
let max = null
|
|
1286
|
+
let max = null;
|
|
1287
|
+
let min = null;
|
|
1170
1288
|
for (const ch of this._def.checks) {
|
|
1171
|
-
if (ch.kind === "finite" ||
|
|
1172
|
-
ch.kind === "int" ||
|
|
1173
|
-
ch.kind === "multipleOf") {
|
|
1289
|
+
if (ch.kind === "finite" || ch.kind === "int" || ch.kind === "multipleOf") {
|
|
1174
1290
|
return true;
|
|
1175
1291
|
}
|
|
1176
1292
|
else if (ch.kind === "min") {
|
|
@@ -1190,7 +1306,7 @@ ZodNumber.create = (params) => {
|
|
|
1190
1306
|
return new ZodNumber({
|
|
1191
1307
|
checks: [],
|
|
1192
1308
|
typeName: ZodFirstPartyTypeKind.ZodNumber,
|
|
1193
|
-
coerce:
|
|
1309
|
+
coerce: params?.coerce || false,
|
|
1194
1310
|
...processCreateParams(params),
|
|
1195
1311
|
});
|
|
1196
1312
|
};
|
|
@@ -1202,29 +1318,26 @@ class ZodBigInt extends ZodType {
|
|
|
1202
1318
|
}
|
|
1203
1319
|
_parse(input) {
|
|
1204
1320
|
if (this._def.coerce) {
|
|
1205
|
-
|
|
1321
|
+
try {
|
|
1322
|
+
input.data = BigInt(input.data);
|
|
1323
|
+
}
|
|
1324
|
+
catch {
|
|
1325
|
+
return this._getInvalidInput(input);
|
|
1326
|
+
}
|
|
1206
1327
|
}
|
|
1207
1328
|
const parsedType = this._getType(input);
|
|
1208
|
-
if (parsedType !==
|
|
1209
|
-
|
|
1210
|
-
(0, parseUtil_1.addIssueToContext)(ctx, {
|
|
1211
|
-
code: ZodError_1.ZodIssueCode.invalid_type,
|
|
1212
|
-
expected: util_1.ZodParsedType.bigint,
|
|
1213
|
-
received: ctx.parsedType,
|
|
1214
|
-
});
|
|
1215
|
-
return parseUtil_1.INVALID;
|
|
1329
|
+
if (parsedType !== util_js_1.ZodParsedType.bigint) {
|
|
1330
|
+
return this._getInvalidInput(input);
|
|
1216
1331
|
}
|
|
1217
1332
|
let ctx = undefined;
|
|
1218
|
-
const status = new
|
|
1333
|
+
const status = new parseUtil_js_1.ParseStatus();
|
|
1219
1334
|
for (const check of this._def.checks) {
|
|
1220
1335
|
if (check.kind === "min") {
|
|
1221
|
-
const tooSmall = check.inclusive
|
|
1222
|
-
? input.data < check.value
|
|
1223
|
-
: input.data <= check.value;
|
|
1336
|
+
const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;
|
|
1224
1337
|
if (tooSmall) {
|
|
1225
1338
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
1226
|
-
(0,
|
|
1227
|
-
code:
|
|
1339
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1340
|
+
code: ZodError_js_1.ZodIssueCode.too_small,
|
|
1228
1341
|
type: "bigint",
|
|
1229
1342
|
minimum: check.value,
|
|
1230
1343
|
inclusive: check.inclusive,
|
|
@@ -1234,13 +1347,11 @@ class ZodBigInt extends ZodType {
|
|
|
1234
1347
|
}
|
|
1235
1348
|
}
|
|
1236
1349
|
else if (check.kind === "max") {
|
|
1237
|
-
const tooBig = check.inclusive
|
|
1238
|
-
? input.data > check.value
|
|
1239
|
-
: input.data >= check.value;
|
|
1350
|
+
const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;
|
|
1240
1351
|
if (tooBig) {
|
|
1241
1352
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
1242
|
-
(0,
|
|
1243
|
-
code:
|
|
1353
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1354
|
+
code: ZodError_js_1.ZodIssueCode.too_big,
|
|
1244
1355
|
type: "bigint",
|
|
1245
1356
|
maximum: check.value,
|
|
1246
1357
|
inclusive: check.inclusive,
|
|
@@ -1252,8 +1363,8 @@ class ZodBigInt extends ZodType {
|
|
|
1252
1363
|
else if (check.kind === "multipleOf") {
|
|
1253
1364
|
if (input.data % check.value !== BigInt(0)) {
|
|
1254
1365
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
1255
|
-
(0,
|
|
1256
|
-
code:
|
|
1366
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1367
|
+
code: ZodError_js_1.ZodIssueCode.not_multiple_of,
|
|
1257
1368
|
multipleOf: check.value,
|
|
1258
1369
|
message: check.message,
|
|
1259
1370
|
});
|
|
@@ -1261,22 +1372,31 @@ class ZodBigInt extends ZodType {
|
|
|
1261
1372
|
}
|
|
1262
1373
|
}
|
|
1263
1374
|
else {
|
|
1264
|
-
|
|
1375
|
+
util_js_1.util.assertNever(check);
|
|
1265
1376
|
}
|
|
1266
1377
|
}
|
|
1267
1378
|
return { status: status.value, value: input.data };
|
|
1268
1379
|
}
|
|
1380
|
+
_getInvalidInput(input) {
|
|
1381
|
+
const ctx = this._getOrReturnCtx(input);
|
|
1382
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1383
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
1384
|
+
expected: util_js_1.ZodParsedType.bigint,
|
|
1385
|
+
received: ctx.parsedType,
|
|
1386
|
+
});
|
|
1387
|
+
return parseUtil_js_1.INVALID;
|
|
1388
|
+
}
|
|
1269
1389
|
gte(value, message) {
|
|
1270
|
-
return this.setLimit("min", value, true,
|
|
1390
|
+
return this.setLimit("min", value, true, errorUtil_js_1.errorUtil.toString(message));
|
|
1271
1391
|
}
|
|
1272
1392
|
gt(value, message) {
|
|
1273
|
-
return this.setLimit("min", value, false,
|
|
1393
|
+
return this.setLimit("min", value, false, errorUtil_js_1.errorUtil.toString(message));
|
|
1274
1394
|
}
|
|
1275
1395
|
lte(value, message) {
|
|
1276
|
-
return this.setLimit("max", value, true,
|
|
1396
|
+
return this.setLimit("max", value, true, errorUtil_js_1.errorUtil.toString(message));
|
|
1277
1397
|
}
|
|
1278
1398
|
lt(value, message) {
|
|
1279
|
-
return this.setLimit("max", value, false,
|
|
1399
|
+
return this.setLimit("max", value, false, errorUtil_js_1.errorUtil.toString(message));
|
|
1280
1400
|
}
|
|
1281
1401
|
setLimit(kind, value, inclusive, message) {
|
|
1282
1402
|
return new ZodBigInt({
|
|
@@ -1287,7 +1407,7 @@ class ZodBigInt extends ZodType {
|
|
|
1287
1407
|
kind,
|
|
1288
1408
|
value,
|
|
1289
1409
|
inclusive,
|
|
1290
|
-
message:
|
|
1410
|
+
message: errorUtil_js_1.errorUtil.toString(message),
|
|
1291
1411
|
},
|
|
1292
1412
|
],
|
|
1293
1413
|
});
|
|
@@ -1303,7 +1423,7 @@ class ZodBigInt extends ZodType {
|
|
|
1303
1423
|
kind: "min",
|
|
1304
1424
|
value: BigInt(0),
|
|
1305
1425
|
inclusive: false,
|
|
1306
|
-
message:
|
|
1426
|
+
message: errorUtil_js_1.errorUtil.toString(message),
|
|
1307
1427
|
});
|
|
1308
1428
|
}
|
|
1309
1429
|
negative(message) {
|
|
@@ -1311,7 +1431,7 @@ class ZodBigInt extends ZodType {
|
|
|
1311
1431
|
kind: "max",
|
|
1312
1432
|
value: BigInt(0),
|
|
1313
1433
|
inclusive: false,
|
|
1314
|
-
message:
|
|
1434
|
+
message: errorUtil_js_1.errorUtil.toString(message),
|
|
1315
1435
|
});
|
|
1316
1436
|
}
|
|
1317
1437
|
nonpositive(message) {
|
|
@@ -1319,7 +1439,7 @@ class ZodBigInt extends ZodType {
|
|
|
1319
1439
|
kind: "max",
|
|
1320
1440
|
value: BigInt(0),
|
|
1321
1441
|
inclusive: true,
|
|
1322
|
-
message:
|
|
1442
|
+
message: errorUtil_js_1.errorUtil.toString(message),
|
|
1323
1443
|
});
|
|
1324
1444
|
}
|
|
1325
1445
|
nonnegative(message) {
|
|
@@ -1327,14 +1447,14 @@ class ZodBigInt extends ZodType {
|
|
|
1327
1447
|
kind: "min",
|
|
1328
1448
|
value: BigInt(0),
|
|
1329
1449
|
inclusive: true,
|
|
1330
|
-
message:
|
|
1450
|
+
message: errorUtil_js_1.errorUtil.toString(message),
|
|
1331
1451
|
});
|
|
1332
1452
|
}
|
|
1333
1453
|
multipleOf(value, message) {
|
|
1334
1454
|
return this._addCheck({
|
|
1335
1455
|
kind: "multipleOf",
|
|
1336
1456
|
value,
|
|
1337
|
-
message:
|
|
1457
|
+
message: errorUtil_js_1.errorUtil.toString(message),
|
|
1338
1458
|
});
|
|
1339
1459
|
}
|
|
1340
1460
|
get minValue() {
|
|
@@ -1360,11 +1480,10 @@ class ZodBigInt extends ZodType {
|
|
|
1360
1480
|
}
|
|
1361
1481
|
exports.ZodBigInt = ZodBigInt;
|
|
1362
1482
|
ZodBigInt.create = (params) => {
|
|
1363
|
-
var _a;
|
|
1364
1483
|
return new ZodBigInt({
|
|
1365
1484
|
checks: [],
|
|
1366
1485
|
typeName: ZodFirstPartyTypeKind.ZodBigInt,
|
|
1367
|
-
coerce:
|
|
1486
|
+
coerce: params?.coerce ?? false,
|
|
1368
1487
|
...processCreateParams(params),
|
|
1369
1488
|
});
|
|
1370
1489
|
};
|
|
@@ -1374,23 +1493,23 @@ class ZodBoolean extends ZodType {
|
|
|
1374
1493
|
input.data = Boolean(input.data);
|
|
1375
1494
|
}
|
|
1376
1495
|
const parsedType = this._getType(input);
|
|
1377
|
-
if (parsedType !==
|
|
1496
|
+
if (parsedType !== util_js_1.ZodParsedType.boolean) {
|
|
1378
1497
|
const ctx = this._getOrReturnCtx(input);
|
|
1379
|
-
(0,
|
|
1380
|
-
code:
|
|
1381
|
-
expected:
|
|
1498
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1499
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
1500
|
+
expected: util_js_1.ZodParsedType.boolean,
|
|
1382
1501
|
received: ctx.parsedType,
|
|
1383
1502
|
});
|
|
1384
|
-
return
|
|
1503
|
+
return parseUtil_js_1.INVALID;
|
|
1385
1504
|
}
|
|
1386
|
-
return (0,
|
|
1505
|
+
return (0, parseUtil_js_1.OK)(input.data);
|
|
1387
1506
|
}
|
|
1388
1507
|
}
|
|
1389
1508
|
exports.ZodBoolean = ZodBoolean;
|
|
1390
1509
|
ZodBoolean.create = (params) => {
|
|
1391
1510
|
return new ZodBoolean({
|
|
1392
1511
|
typeName: ZodFirstPartyTypeKind.ZodBoolean,
|
|
1393
|
-
coerce:
|
|
1512
|
+
coerce: params?.coerce || false,
|
|
1394
1513
|
...processCreateParams(params),
|
|
1395
1514
|
});
|
|
1396
1515
|
};
|
|
@@ -1400,30 +1519,30 @@ class ZodDate extends ZodType {
|
|
|
1400
1519
|
input.data = new Date(input.data);
|
|
1401
1520
|
}
|
|
1402
1521
|
const parsedType = this._getType(input);
|
|
1403
|
-
if (parsedType !==
|
|
1522
|
+
if (parsedType !== util_js_1.ZodParsedType.date) {
|
|
1404
1523
|
const ctx = this._getOrReturnCtx(input);
|
|
1405
|
-
(0,
|
|
1406
|
-
code:
|
|
1407
|
-
expected:
|
|
1524
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1525
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
1526
|
+
expected: util_js_1.ZodParsedType.date,
|
|
1408
1527
|
received: ctx.parsedType,
|
|
1409
1528
|
});
|
|
1410
|
-
return
|
|
1529
|
+
return parseUtil_js_1.INVALID;
|
|
1411
1530
|
}
|
|
1412
|
-
if (isNaN(input.data.getTime())) {
|
|
1531
|
+
if (Number.isNaN(input.data.getTime())) {
|
|
1413
1532
|
const ctx = this._getOrReturnCtx(input);
|
|
1414
|
-
(0,
|
|
1415
|
-
code:
|
|
1533
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1534
|
+
code: ZodError_js_1.ZodIssueCode.invalid_date,
|
|
1416
1535
|
});
|
|
1417
|
-
return
|
|
1536
|
+
return parseUtil_js_1.INVALID;
|
|
1418
1537
|
}
|
|
1419
|
-
const status = new
|
|
1538
|
+
const status = new parseUtil_js_1.ParseStatus();
|
|
1420
1539
|
let ctx = undefined;
|
|
1421
1540
|
for (const check of this._def.checks) {
|
|
1422
1541
|
if (check.kind === "min") {
|
|
1423
1542
|
if (input.data.getTime() < check.value) {
|
|
1424
1543
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
1425
|
-
(0,
|
|
1426
|
-
code:
|
|
1544
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1545
|
+
code: ZodError_js_1.ZodIssueCode.too_small,
|
|
1427
1546
|
message: check.message,
|
|
1428
1547
|
inclusive: true,
|
|
1429
1548
|
exact: false,
|
|
@@ -1436,8 +1555,8 @@ class ZodDate extends ZodType {
|
|
|
1436
1555
|
else if (check.kind === "max") {
|
|
1437
1556
|
if (input.data.getTime() > check.value) {
|
|
1438
1557
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
1439
|
-
(0,
|
|
1440
|
-
code:
|
|
1558
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1559
|
+
code: ZodError_js_1.ZodIssueCode.too_big,
|
|
1441
1560
|
message: check.message,
|
|
1442
1561
|
inclusive: true,
|
|
1443
1562
|
exact: false,
|
|
@@ -1448,7 +1567,7 @@ class ZodDate extends ZodType {
|
|
|
1448
1567
|
}
|
|
1449
1568
|
}
|
|
1450
1569
|
else {
|
|
1451
|
-
|
|
1570
|
+
util_js_1.util.assertNever(check);
|
|
1452
1571
|
}
|
|
1453
1572
|
}
|
|
1454
1573
|
return {
|
|
@@ -1466,14 +1585,14 @@ class ZodDate extends ZodType {
|
|
|
1466
1585
|
return this._addCheck({
|
|
1467
1586
|
kind: "min",
|
|
1468
1587
|
value: minDate.getTime(),
|
|
1469
|
-
message:
|
|
1588
|
+
message: errorUtil_js_1.errorUtil.toString(message),
|
|
1470
1589
|
});
|
|
1471
1590
|
}
|
|
1472
1591
|
max(maxDate, message) {
|
|
1473
1592
|
return this._addCheck({
|
|
1474
1593
|
kind: "max",
|
|
1475
1594
|
value: maxDate.getTime(),
|
|
1476
|
-
message:
|
|
1595
|
+
message: errorUtil_js_1.errorUtil.toString(message),
|
|
1477
1596
|
});
|
|
1478
1597
|
}
|
|
1479
1598
|
get minDate() {
|
|
@@ -1501,7 +1620,7 @@ exports.ZodDate = ZodDate;
|
|
|
1501
1620
|
ZodDate.create = (params) => {
|
|
1502
1621
|
return new ZodDate({
|
|
1503
1622
|
checks: [],
|
|
1504
|
-
coerce:
|
|
1623
|
+
coerce: params?.coerce || false,
|
|
1505
1624
|
typeName: ZodFirstPartyTypeKind.ZodDate,
|
|
1506
1625
|
...processCreateParams(params),
|
|
1507
1626
|
});
|
|
@@ -1509,16 +1628,16 @@ ZodDate.create = (params) => {
|
|
|
1509
1628
|
class ZodSymbol extends ZodType {
|
|
1510
1629
|
_parse(input) {
|
|
1511
1630
|
const parsedType = this._getType(input);
|
|
1512
|
-
if (parsedType !==
|
|
1631
|
+
if (parsedType !== util_js_1.ZodParsedType.symbol) {
|
|
1513
1632
|
const ctx = this._getOrReturnCtx(input);
|
|
1514
|
-
(0,
|
|
1515
|
-
code:
|
|
1516
|
-
expected:
|
|
1633
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1634
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
1635
|
+
expected: util_js_1.ZodParsedType.symbol,
|
|
1517
1636
|
received: ctx.parsedType,
|
|
1518
1637
|
});
|
|
1519
|
-
return
|
|
1638
|
+
return parseUtil_js_1.INVALID;
|
|
1520
1639
|
}
|
|
1521
|
-
return (0,
|
|
1640
|
+
return (0, parseUtil_js_1.OK)(input.data);
|
|
1522
1641
|
}
|
|
1523
1642
|
}
|
|
1524
1643
|
exports.ZodSymbol = ZodSymbol;
|
|
@@ -1531,16 +1650,16 @@ ZodSymbol.create = (params) => {
|
|
|
1531
1650
|
class ZodUndefined extends ZodType {
|
|
1532
1651
|
_parse(input) {
|
|
1533
1652
|
const parsedType = this._getType(input);
|
|
1534
|
-
if (parsedType !==
|
|
1653
|
+
if (parsedType !== util_js_1.ZodParsedType.undefined) {
|
|
1535
1654
|
const ctx = this._getOrReturnCtx(input);
|
|
1536
|
-
(0,
|
|
1537
|
-
code:
|
|
1538
|
-
expected:
|
|
1655
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1656
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
1657
|
+
expected: util_js_1.ZodParsedType.undefined,
|
|
1539
1658
|
received: ctx.parsedType,
|
|
1540
1659
|
});
|
|
1541
|
-
return
|
|
1660
|
+
return parseUtil_js_1.INVALID;
|
|
1542
1661
|
}
|
|
1543
|
-
return (0,
|
|
1662
|
+
return (0, parseUtil_js_1.OK)(input.data);
|
|
1544
1663
|
}
|
|
1545
1664
|
}
|
|
1546
1665
|
exports.ZodUndefined = ZodUndefined;
|
|
@@ -1553,16 +1672,16 @@ ZodUndefined.create = (params) => {
|
|
|
1553
1672
|
class ZodNull extends ZodType {
|
|
1554
1673
|
_parse(input) {
|
|
1555
1674
|
const parsedType = this._getType(input);
|
|
1556
|
-
if (parsedType !==
|
|
1675
|
+
if (parsedType !== util_js_1.ZodParsedType.null) {
|
|
1557
1676
|
const ctx = this._getOrReturnCtx(input);
|
|
1558
|
-
(0,
|
|
1559
|
-
code:
|
|
1560
|
-
expected:
|
|
1677
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1678
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
1679
|
+
expected: util_js_1.ZodParsedType.null,
|
|
1561
1680
|
received: ctx.parsedType,
|
|
1562
1681
|
});
|
|
1563
|
-
return
|
|
1682
|
+
return parseUtil_js_1.INVALID;
|
|
1564
1683
|
}
|
|
1565
|
-
return (0,
|
|
1684
|
+
return (0, parseUtil_js_1.OK)(input.data);
|
|
1566
1685
|
}
|
|
1567
1686
|
}
|
|
1568
1687
|
exports.ZodNull = ZodNull;
|
|
@@ -1579,7 +1698,7 @@ class ZodAny extends ZodType {
|
|
|
1579
1698
|
this._any = true;
|
|
1580
1699
|
}
|
|
1581
1700
|
_parse(input) {
|
|
1582
|
-
return (0,
|
|
1701
|
+
return (0, parseUtil_js_1.OK)(input.data);
|
|
1583
1702
|
}
|
|
1584
1703
|
}
|
|
1585
1704
|
exports.ZodAny = ZodAny;
|
|
@@ -1596,7 +1715,7 @@ class ZodUnknown extends ZodType {
|
|
|
1596
1715
|
this._unknown = true;
|
|
1597
1716
|
}
|
|
1598
1717
|
_parse(input) {
|
|
1599
|
-
return (0,
|
|
1718
|
+
return (0, parseUtil_js_1.OK)(input.data);
|
|
1600
1719
|
}
|
|
1601
1720
|
}
|
|
1602
1721
|
exports.ZodUnknown = ZodUnknown;
|
|
@@ -1609,12 +1728,12 @@ ZodUnknown.create = (params) => {
|
|
|
1609
1728
|
class ZodNever extends ZodType {
|
|
1610
1729
|
_parse(input) {
|
|
1611
1730
|
const ctx = this._getOrReturnCtx(input);
|
|
1612
|
-
(0,
|
|
1613
|
-
code:
|
|
1614
|
-
expected:
|
|
1731
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1732
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
1733
|
+
expected: util_js_1.ZodParsedType.never,
|
|
1615
1734
|
received: ctx.parsedType,
|
|
1616
1735
|
});
|
|
1617
|
-
return
|
|
1736
|
+
return parseUtil_js_1.INVALID;
|
|
1618
1737
|
}
|
|
1619
1738
|
}
|
|
1620
1739
|
exports.ZodNever = ZodNever;
|
|
@@ -1627,16 +1746,16 @@ ZodNever.create = (params) => {
|
|
|
1627
1746
|
class ZodVoid extends ZodType {
|
|
1628
1747
|
_parse(input) {
|
|
1629
1748
|
const parsedType = this._getType(input);
|
|
1630
|
-
if (parsedType !==
|
|
1749
|
+
if (parsedType !== util_js_1.ZodParsedType.undefined) {
|
|
1631
1750
|
const ctx = this._getOrReturnCtx(input);
|
|
1632
|
-
(0,
|
|
1633
|
-
code:
|
|
1634
|
-
expected:
|
|
1751
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1752
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
1753
|
+
expected: util_js_1.ZodParsedType.void,
|
|
1635
1754
|
received: ctx.parsedType,
|
|
1636
1755
|
});
|
|
1637
|
-
return
|
|
1756
|
+
return parseUtil_js_1.INVALID;
|
|
1638
1757
|
}
|
|
1639
|
-
return (0,
|
|
1758
|
+
return (0, parseUtil_js_1.OK)(input.data);
|
|
1640
1759
|
}
|
|
1641
1760
|
}
|
|
1642
1761
|
exports.ZodVoid = ZodVoid;
|
|
@@ -1650,20 +1769,20 @@ class ZodArray extends ZodType {
|
|
|
1650
1769
|
_parse(input) {
|
|
1651
1770
|
const { ctx, status } = this._processInputParams(input);
|
|
1652
1771
|
const def = this._def;
|
|
1653
|
-
if (ctx.parsedType !==
|
|
1654
|
-
(0,
|
|
1655
|
-
code:
|
|
1656
|
-
expected:
|
|
1772
|
+
if (ctx.parsedType !== util_js_1.ZodParsedType.array) {
|
|
1773
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1774
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
1775
|
+
expected: util_js_1.ZodParsedType.array,
|
|
1657
1776
|
received: ctx.parsedType,
|
|
1658
1777
|
});
|
|
1659
|
-
return
|
|
1778
|
+
return parseUtil_js_1.INVALID;
|
|
1660
1779
|
}
|
|
1661
1780
|
if (def.exactLength !== null) {
|
|
1662
1781
|
const tooBig = ctx.data.length > def.exactLength.value;
|
|
1663
1782
|
const tooSmall = ctx.data.length < def.exactLength.value;
|
|
1664
1783
|
if (tooBig || tooSmall) {
|
|
1665
|
-
(0,
|
|
1666
|
-
code: tooBig ?
|
|
1784
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1785
|
+
code: tooBig ? ZodError_js_1.ZodIssueCode.too_big : ZodError_js_1.ZodIssueCode.too_small,
|
|
1667
1786
|
minimum: (tooSmall ? def.exactLength.value : undefined),
|
|
1668
1787
|
maximum: (tooBig ? def.exactLength.value : undefined),
|
|
1669
1788
|
type: "array",
|
|
@@ -1676,8 +1795,8 @@ class ZodArray extends ZodType {
|
|
|
1676
1795
|
}
|
|
1677
1796
|
if (def.minLength !== null) {
|
|
1678
1797
|
if (ctx.data.length < def.minLength.value) {
|
|
1679
|
-
(0,
|
|
1680
|
-
code:
|
|
1798
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1799
|
+
code: ZodError_js_1.ZodIssueCode.too_small,
|
|
1681
1800
|
minimum: def.minLength.value,
|
|
1682
1801
|
type: "array",
|
|
1683
1802
|
inclusive: true,
|
|
@@ -1689,8 +1808,8 @@ class ZodArray extends ZodType {
|
|
|
1689
1808
|
}
|
|
1690
1809
|
if (def.maxLength !== null) {
|
|
1691
1810
|
if (ctx.data.length > def.maxLength.value) {
|
|
1692
|
-
(0,
|
|
1693
|
-
code:
|
|
1811
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1812
|
+
code: ZodError_js_1.ZodIssueCode.too_big,
|
|
1694
1813
|
maximum: def.maxLength.value,
|
|
1695
1814
|
type: "array",
|
|
1696
1815
|
inclusive: true,
|
|
@@ -1704,13 +1823,13 @@ class ZodArray extends ZodType {
|
|
|
1704
1823
|
return Promise.all([...ctx.data].map((item, i) => {
|
|
1705
1824
|
return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));
|
|
1706
1825
|
})).then((result) => {
|
|
1707
|
-
return
|
|
1826
|
+
return parseUtil_js_1.ParseStatus.mergeArray(status, result);
|
|
1708
1827
|
});
|
|
1709
1828
|
}
|
|
1710
1829
|
const result = [...ctx.data].map((item, i) => {
|
|
1711
1830
|
return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));
|
|
1712
1831
|
});
|
|
1713
|
-
return
|
|
1832
|
+
return parseUtil_js_1.ParseStatus.mergeArray(status, result);
|
|
1714
1833
|
}
|
|
1715
1834
|
get element() {
|
|
1716
1835
|
return this._def.type;
|
|
@@ -1718,19 +1837,19 @@ class ZodArray extends ZodType {
|
|
|
1718
1837
|
min(minLength, message) {
|
|
1719
1838
|
return new ZodArray({
|
|
1720
1839
|
...this._def,
|
|
1721
|
-
minLength: { value: minLength, message:
|
|
1840
|
+
minLength: { value: minLength, message: errorUtil_js_1.errorUtil.toString(message) },
|
|
1722
1841
|
});
|
|
1723
1842
|
}
|
|
1724
1843
|
max(maxLength, message) {
|
|
1725
1844
|
return new ZodArray({
|
|
1726
1845
|
...this._def,
|
|
1727
|
-
maxLength: { value: maxLength, message:
|
|
1846
|
+
maxLength: { value: maxLength, message: errorUtil_js_1.errorUtil.toString(message) },
|
|
1728
1847
|
});
|
|
1729
1848
|
}
|
|
1730
1849
|
length(len, message) {
|
|
1731
1850
|
return new ZodArray({
|
|
1732
1851
|
...this._def,
|
|
1733
|
-
exactLength: { value: len, message:
|
|
1852
|
+
exactLength: { value: len, message: errorUtil_js_1.errorUtil.toString(message) },
|
|
1734
1853
|
});
|
|
1735
1854
|
}
|
|
1736
1855
|
nonempty(message) {
|
|
@@ -1830,25 +1949,25 @@ class ZodObject extends ZodType {
|
|
|
1830
1949
|
if (this._cached !== null)
|
|
1831
1950
|
return this._cached;
|
|
1832
1951
|
const shape = this._def.shape();
|
|
1833
|
-
const keys =
|
|
1834
|
-
|
|
1952
|
+
const keys = util_js_1.util.objectKeys(shape);
|
|
1953
|
+
this._cached = { shape, keys };
|
|
1954
|
+
return this._cached;
|
|
1835
1955
|
}
|
|
1836
1956
|
_parse(input) {
|
|
1837
1957
|
const parsedType = this._getType(input);
|
|
1838
|
-
if (parsedType !==
|
|
1958
|
+
if (parsedType !== util_js_1.ZodParsedType.object) {
|
|
1839
1959
|
const ctx = this._getOrReturnCtx(input);
|
|
1840
|
-
(0,
|
|
1841
|
-
code:
|
|
1842
|
-
expected:
|
|
1960
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
1961
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
1962
|
+
expected: util_js_1.ZodParsedType.object,
|
|
1843
1963
|
received: ctx.parsedType,
|
|
1844
1964
|
});
|
|
1845
|
-
return
|
|
1965
|
+
return parseUtil_js_1.INVALID;
|
|
1846
1966
|
}
|
|
1847
1967
|
const { status, ctx } = this._processInputParams(input);
|
|
1848
1968
|
const { shape, keys: shapeKeys } = this._getCached();
|
|
1849
1969
|
const extraKeys = [];
|
|
1850
|
-
if (!(this._def.catchall instanceof ZodNever &&
|
|
1851
|
-
this._def.unknownKeys === "strip")) {
|
|
1970
|
+
if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === "strip")) {
|
|
1852
1971
|
for (const key in ctx.data) {
|
|
1853
1972
|
if (!shapeKeys.includes(key)) {
|
|
1854
1973
|
extraKeys.push(key);
|
|
@@ -1877,8 +1996,8 @@ class ZodObject extends ZodType {
|
|
|
1877
1996
|
}
|
|
1878
1997
|
else if (unknownKeys === "strict") {
|
|
1879
1998
|
if (extraKeys.length > 0) {
|
|
1880
|
-
(0,
|
|
1881
|
-
code:
|
|
1999
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
2000
|
+
code: ZodError_js_1.ZodIssueCode.unrecognized_keys,
|
|
1882
2001
|
keys: extraKeys,
|
|
1883
2002
|
});
|
|
1884
2003
|
status.dirty();
|
|
@@ -1919,29 +2038,28 @@ class ZodObject extends ZodType {
|
|
|
1919
2038
|
return syncPairs;
|
|
1920
2039
|
})
|
|
1921
2040
|
.then((syncPairs) => {
|
|
1922
|
-
return
|
|
2041
|
+
return parseUtil_js_1.ParseStatus.mergeObjectSync(status, syncPairs);
|
|
1923
2042
|
});
|
|
1924
2043
|
}
|
|
1925
2044
|
else {
|
|
1926
|
-
return
|
|
2045
|
+
return parseUtil_js_1.ParseStatus.mergeObjectSync(status, pairs);
|
|
1927
2046
|
}
|
|
1928
2047
|
}
|
|
1929
2048
|
get shape() {
|
|
1930
2049
|
return this._def.shape();
|
|
1931
2050
|
}
|
|
1932
2051
|
strict(message) {
|
|
1933
|
-
|
|
2052
|
+
errorUtil_js_1.errorUtil.errToObj;
|
|
1934
2053
|
return new ZodObject({
|
|
1935
2054
|
...this._def,
|
|
1936
2055
|
unknownKeys: "strict",
|
|
1937
2056
|
...(message !== undefined
|
|
1938
2057
|
? {
|
|
1939
2058
|
errorMap: (issue, ctx) => {
|
|
1940
|
-
|
|
1941
|
-
const defaultError = (_c = (_b = (_a = this._def).errorMap) === null || _b === void 0 ? void 0 : _b.call(_a, issue, ctx).message) !== null && _c !== void 0 ? _c : ctx.defaultError;
|
|
2059
|
+
const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;
|
|
1942
2060
|
if (issue.code === "unrecognized_keys")
|
|
1943
2061
|
return {
|
|
1944
|
-
message:
|
|
2062
|
+
message: errorUtil_js_1.errorUtil.errToObj(message).message ?? defaultError,
|
|
1945
2063
|
};
|
|
1946
2064
|
return {
|
|
1947
2065
|
message: defaultError,
|
|
@@ -2073,11 +2191,11 @@ class ZodObject extends ZodType {
|
|
|
2073
2191
|
}
|
|
2074
2192
|
pick(mask) {
|
|
2075
2193
|
const shape = {};
|
|
2076
|
-
|
|
2194
|
+
for (const key of util_js_1.util.objectKeys(mask)) {
|
|
2077
2195
|
if (mask[key] && this.shape[key]) {
|
|
2078
2196
|
shape[key] = this.shape[key];
|
|
2079
2197
|
}
|
|
2080
|
-
}
|
|
2198
|
+
}
|
|
2081
2199
|
return new ZodObject({
|
|
2082
2200
|
...this._def,
|
|
2083
2201
|
shape: () => shape,
|
|
@@ -2085,11 +2203,11 @@ class ZodObject extends ZodType {
|
|
|
2085
2203
|
}
|
|
2086
2204
|
omit(mask) {
|
|
2087
2205
|
const shape = {};
|
|
2088
|
-
|
|
2206
|
+
for (const key of util_js_1.util.objectKeys(this.shape)) {
|
|
2089
2207
|
if (!mask[key]) {
|
|
2090
2208
|
shape[key] = this.shape[key];
|
|
2091
2209
|
}
|
|
2092
|
-
}
|
|
2210
|
+
}
|
|
2093
2211
|
return new ZodObject({
|
|
2094
2212
|
...this._def,
|
|
2095
2213
|
shape: () => shape,
|
|
@@ -2103,7 +2221,7 @@ class ZodObject extends ZodType {
|
|
|
2103
2221
|
}
|
|
2104
2222
|
partial(mask) {
|
|
2105
2223
|
const newShape = {};
|
|
2106
|
-
|
|
2224
|
+
for (const key of util_js_1.util.objectKeys(this.shape)) {
|
|
2107
2225
|
const fieldSchema = this.shape[key];
|
|
2108
2226
|
if (mask && !mask[key]) {
|
|
2109
2227
|
newShape[key] = fieldSchema;
|
|
@@ -2111,7 +2229,7 @@ class ZodObject extends ZodType {
|
|
|
2111
2229
|
else {
|
|
2112
2230
|
newShape[key] = fieldSchema.optional();
|
|
2113
2231
|
}
|
|
2114
|
-
}
|
|
2232
|
+
}
|
|
2115
2233
|
return new ZodObject({
|
|
2116
2234
|
...this._def,
|
|
2117
2235
|
shape: () => newShape,
|
|
@@ -2119,7 +2237,7 @@ class ZodObject extends ZodType {
|
|
|
2119
2237
|
}
|
|
2120
2238
|
required(mask) {
|
|
2121
2239
|
const newShape = {};
|
|
2122
|
-
|
|
2240
|
+
for (const key of util_js_1.util.objectKeys(this.shape)) {
|
|
2123
2241
|
if (mask && !mask[key]) {
|
|
2124
2242
|
newShape[key] = this.shape[key];
|
|
2125
2243
|
}
|
|
@@ -2131,14 +2249,14 @@ class ZodObject extends ZodType {
|
|
|
2131
2249
|
}
|
|
2132
2250
|
newShape[key] = newField;
|
|
2133
2251
|
}
|
|
2134
|
-
}
|
|
2252
|
+
}
|
|
2135
2253
|
return new ZodObject({
|
|
2136
2254
|
...this._def,
|
|
2137
2255
|
shape: () => newShape,
|
|
2138
2256
|
});
|
|
2139
2257
|
}
|
|
2140
2258
|
keyof() {
|
|
2141
|
-
return createZodEnum(
|
|
2259
|
+
return createZodEnum(util_js_1.util.objectKeys(this.shape));
|
|
2142
2260
|
}
|
|
2143
2261
|
}
|
|
2144
2262
|
exports.ZodObject = ZodObject;
|
|
@@ -2188,12 +2306,12 @@ class ZodUnion extends ZodType {
|
|
|
2188
2306
|
}
|
|
2189
2307
|
}
|
|
2190
2308
|
// return invalid
|
|
2191
|
-
const unionErrors = results.map((result) => new
|
|
2192
|
-
(0,
|
|
2193
|
-
code:
|
|
2309
|
+
const unionErrors = results.map((result) => new ZodError_js_1.ZodError(result.ctx.common.issues));
|
|
2310
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
2311
|
+
code: ZodError_js_1.ZodIssueCode.invalid_union,
|
|
2194
2312
|
unionErrors,
|
|
2195
2313
|
});
|
|
2196
|
-
return
|
|
2314
|
+
return parseUtil_js_1.INVALID;
|
|
2197
2315
|
}
|
|
2198
2316
|
if (ctx.common.async) {
|
|
2199
2317
|
return Promise.all(options.map(async (option) => {
|
|
@@ -2246,12 +2364,12 @@ class ZodUnion extends ZodType {
|
|
|
2246
2364
|
ctx.common.issues.push(...dirty.ctx.common.issues);
|
|
2247
2365
|
return dirty.result;
|
|
2248
2366
|
}
|
|
2249
|
-
const unionErrors = issues.map((issues) => new
|
|
2250
|
-
(0,
|
|
2251
|
-
code:
|
|
2367
|
+
const unionErrors = issues.map((issues) => new ZodError_js_1.ZodError(issues));
|
|
2368
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
2369
|
+
code: ZodError_js_1.ZodIssueCode.invalid_union,
|
|
2252
2370
|
unionErrors,
|
|
2253
2371
|
});
|
|
2254
|
-
return
|
|
2372
|
+
return parseUtil_js_1.INVALID;
|
|
2255
2373
|
}
|
|
2256
2374
|
}
|
|
2257
2375
|
get options() {
|
|
@@ -2288,7 +2406,7 @@ const getDiscriminator = (type) => {
|
|
|
2288
2406
|
}
|
|
2289
2407
|
else if (type instanceof ZodNativeEnum) {
|
|
2290
2408
|
// eslint-disable-next-line ban/ban
|
|
2291
|
-
return
|
|
2409
|
+
return util_js_1.util.objectValues(type.enum);
|
|
2292
2410
|
}
|
|
2293
2411
|
else if (type instanceof ZodDefault) {
|
|
2294
2412
|
return getDiscriminator(type._def.innerType);
|
|
@@ -2321,24 +2439,24 @@ const getDiscriminator = (type) => {
|
|
|
2321
2439
|
class ZodDiscriminatedUnion extends ZodType {
|
|
2322
2440
|
_parse(input) {
|
|
2323
2441
|
const { ctx } = this._processInputParams(input);
|
|
2324
|
-
if (ctx.parsedType !==
|
|
2325
|
-
(0,
|
|
2326
|
-
code:
|
|
2327
|
-
expected:
|
|
2442
|
+
if (ctx.parsedType !== util_js_1.ZodParsedType.object) {
|
|
2443
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
2444
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
2445
|
+
expected: util_js_1.ZodParsedType.object,
|
|
2328
2446
|
received: ctx.parsedType,
|
|
2329
2447
|
});
|
|
2330
|
-
return
|
|
2448
|
+
return parseUtil_js_1.INVALID;
|
|
2331
2449
|
}
|
|
2332
2450
|
const discriminator = this.discriminator;
|
|
2333
2451
|
const discriminatorValue = ctx.data[discriminator];
|
|
2334
2452
|
const option = this.optionsMap.get(discriminatorValue);
|
|
2335
2453
|
if (!option) {
|
|
2336
|
-
(0,
|
|
2337
|
-
code:
|
|
2454
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
2455
|
+
code: ZodError_js_1.ZodIssueCode.invalid_union_discriminator,
|
|
2338
2456
|
options: Array.from(this.optionsMap.keys()),
|
|
2339
2457
|
path: [discriminator],
|
|
2340
2458
|
});
|
|
2341
|
-
return
|
|
2459
|
+
return parseUtil_js_1.INVALID;
|
|
2342
2460
|
}
|
|
2343
2461
|
if (ctx.common.async) {
|
|
2344
2462
|
return option._parseAsync({
|
|
@@ -2399,16 +2517,14 @@ class ZodDiscriminatedUnion extends ZodType {
|
|
|
2399
2517
|
}
|
|
2400
2518
|
exports.ZodDiscriminatedUnion = ZodDiscriminatedUnion;
|
|
2401
2519
|
function mergeValues(a, b) {
|
|
2402
|
-
const aType = (0,
|
|
2403
|
-
const bType = (0,
|
|
2520
|
+
const aType = (0, util_js_1.getParsedType)(a);
|
|
2521
|
+
const bType = (0, util_js_1.getParsedType)(b);
|
|
2404
2522
|
if (a === b) {
|
|
2405
2523
|
return { valid: true, data: a };
|
|
2406
2524
|
}
|
|
2407
|
-
else if (aType ===
|
|
2408
|
-
const bKeys =
|
|
2409
|
-
const sharedKeys =
|
|
2410
|
-
.objectKeys(a)
|
|
2411
|
-
.filter((key) => bKeys.indexOf(key) !== -1);
|
|
2525
|
+
else if (aType === util_js_1.ZodParsedType.object && bType === util_js_1.ZodParsedType.object) {
|
|
2526
|
+
const bKeys = util_js_1.util.objectKeys(b);
|
|
2527
|
+
const sharedKeys = util_js_1.util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
2412
2528
|
const newObj = { ...a, ...b };
|
|
2413
2529
|
for (const key of sharedKeys) {
|
|
2414
2530
|
const sharedValue = mergeValues(a[key], b[key]);
|
|
@@ -2419,7 +2535,7 @@ function mergeValues(a, b) {
|
|
|
2419
2535
|
}
|
|
2420
2536
|
return { valid: true, data: newObj };
|
|
2421
2537
|
}
|
|
2422
|
-
else if (aType ===
|
|
2538
|
+
else if (aType === util_js_1.ZodParsedType.array && bType === util_js_1.ZodParsedType.array) {
|
|
2423
2539
|
if (a.length !== b.length) {
|
|
2424
2540
|
return { valid: false };
|
|
2425
2541
|
}
|
|
@@ -2435,9 +2551,7 @@ function mergeValues(a, b) {
|
|
|
2435
2551
|
}
|
|
2436
2552
|
return { valid: true, data: newArray };
|
|
2437
2553
|
}
|
|
2438
|
-
else if (aType ===
|
|
2439
|
-
bType === util_1.ZodParsedType.date &&
|
|
2440
|
-
+a === +b) {
|
|
2554
|
+
else if (aType === util_js_1.ZodParsedType.date && bType === util_js_1.ZodParsedType.date && +a === +b) {
|
|
2441
2555
|
return { valid: true, data: a };
|
|
2442
2556
|
}
|
|
2443
2557
|
else {
|
|
@@ -2448,17 +2562,17 @@ class ZodIntersection extends ZodType {
|
|
|
2448
2562
|
_parse(input) {
|
|
2449
2563
|
const { status, ctx } = this._processInputParams(input);
|
|
2450
2564
|
const handleParsed = (parsedLeft, parsedRight) => {
|
|
2451
|
-
if ((0,
|
|
2452
|
-
return
|
|
2565
|
+
if ((0, parseUtil_js_1.isAborted)(parsedLeft) || (0, parseUtil_js_1.isAborted)(parsedRight)) {
|
|
2566
|
+
return parseUtil_js_1.INVALID;
|
|
2453
2567
|
}
|
|
2454
2568
|
const merged = mergeValues(parsedLeft.value, parsedRight.value);
|
|
2455
2569
|
if (!merged.valid) {
|
|
2456
|
-
(0,
|
|
2457
|
-
code:
|
|
2570
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
2571
|
+
code: ZodError_js_1.ZodIssueCode.invalid_intersection_types,
|
|
2458
2572
|
});
|
|
2459
|
-
return
|
|
2573
|
+
return parseUtil_js_1.INVALID;
|
|
2460
2574
|
}
|
|
2461
|
-
if ((0,
|
|
2575
|
+
if ((0, parseUtil_js_1.isDirty)(parsedLeft) || (0, parseUtil_js_1.isDirty)(parsedRight)) {
|
|
2462
2576
|
status.dirty();
|
|
2463
2577
|
}
|
|
2464
2578
|
return { status: status.value, value: merged.data };
|
|
@@ -2499,31 +2613,32 @@ ZodIntersection.create = (left, right, params) => {
|
|
|
2499
2613
|
...processCreateParams(params),
|
|
2500
2614
|
});
|
|
2501
2615
|
};
|
|
2616
|
+
// type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]];
|
|
2502
2617
|
class ZodTuple extends ZodType {
|
|
2503
2618
|
_parse(input) {
|
|
2504
2619
|
const { status, ctx } = this._processInputParams(input);
|
|
2505
|
-
if (ctx.parsedType !==
|
|
2506
|
-
(0,
|
|
2507
|
-
code:
|
|
2508
|
-
expected:
|
|
2620
|
+
if (ctx.parsedType !== util_js_1.ZodParsedType.array) {
|
|
2621
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
2622
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
2623
|
+
expected: util_js_1.ZodParsedType.array,
|
|
2509
2624
|
received: ctx.parsedType,
|
|
2510
2625
|
});
|
|
2511
|
-
return
|
|
2626
|
+
return parseUtil_js_1.INVALID;
|
|
2512
2627
|
}
|
|
2513
2628
|
if (ctx.data.length < this._def.items.length) {
|
|
2514
|
-
(0,
|
|
2515
|
-
code:
|
|
2629
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
2630
|
+
code: ZodError_js_1.ZodIssueCode.too_small,
|
|
2516
2631
|
minimum: this._def.items.length,
|
|
2517
2632
|
inclusive: true,
|
|
2518
2633
|
exact: false,
|
|
2519
2634
|
type: "array",
|
|
2520
2635
|
});
|
|
2521
|
-
return
|
|
2636
|
+
return parseUtil_js_1.INVALID;
|
|
2522
2637
|
}
|
|
2523
2638
|
const rest = this._def.rest;
|
|
2524
2639
|
if (!rest && ctx.data.length > this._def.items.length) {
|
|
2525
|
-
(0,
|
|
2526
|
-
code:
|
|
2640
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
2641
|
+
code: ZodError_js_1.ZodIssueCode.too_big,
|
|
2527
2642
|
maximum: this._def.items.length,
|
|
2528
2643
|
inclusive: true,
|
|
2529
2644
|
exact: false,
|
|
@@ -2541,11 +2656,11 @@ class ZodTuple extends ZodType {
|
|
|
2541
2656
|
.filter((x) => !!x); // filter nulls
|
|
2542
2657
|
if (ctx.common.async) {
|
|
2543
2658
|
return Promise.all(items).then((results) => {
|
|
2544
|
-
return
|
|
2659
|
+
return parseUtil_js_1.ParseStatus.mergeArray(status, results);
|
|
2545
2660
|
});
|
|
2546
2661
|
}
|
|
2547
2662
|
else {
|
|
2548
|
-
return
|
|
2663
|
+
return parseUtil_js_1.ParseStatus.mergeArray(status, items);
|
|
2549
2664
|
}
|
|
2550
2665
|
}
|
|
2551
2666
|
get items() {
|
|
@@ -2579,13 +2694,13 @@ class ZodRecord extends ZodType {
|
|
|
2579
2694
|
}
|
|
2580
2695
|
_parse(input) {
|
|
2581
2696
|
const { status, ctx } = this._processInputParams(input);
|
|
2582
|
-
if (ctx.parsedType !==
|
|
2583
|
-
(0,
|
|
2584
|
-
code:
|
|
2585
|
-
expected:
|
|
2697
|
+
if (ctx.parsedType !== util_js_1.ZodParsedType.object) {
|
|
2698
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
2699
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
2700
|
+
expected: util_js_1.ZodParsedType.object,
|
|
2586
2701
|
received: ctx.parsedType,
|
|
2587
2702
|
});
|
|
2588
|
-
return
|
|
2703
|
+
return parseUtil_js_1.INVALID;
|
|
2589
2704
|
}
|
|
2590
2705
|
const pairs = [];
|
|
2591
2706
|
const keyType = this._def.keyType;
|
|
@@ -2598,10 +2713,10 @@ class ZodRecord extends ZodType {
|
|
|
2598
2713
|
});
|
|
2599
2714
|
}
|
|
2600
2715
|
if (ctx.common.async) {
|
|
2601
|
-
return
|
|
2716
|
+
return parseUtil_js_1.ParseStatus.mergeObjectAsync(status, pairs);
|
|
2602
2717
|
}
|
|
2603
2718
|
else {
|
|
2604
|
-
return
|
|
2719
|
+
return parseUtil_js_1.ParseStatus.mergeObjectSync(status, pairs);
|
|
2605
2720
|
}
|
|
2606
2721
|
}
|
|
2607
2722
|
get element() {
|
|
@@ -2634,13 +2749,13 @@ class ZodMap extends ZodType {
|
|
|
2634
2749
|
}
|
|
2635
2750
|
_parse(input) {
|
|
2636
2751
|
const { status, ctx } = this._processInputParams(input);
|
|
2637
|
-
if (ctx.parsedType !==
|
|
2638
|
-
(0,
|
|
2639
|
-
code:
|
|
2640
|
-
expected:
|
|
2752
|
+
if (ctx.parsedType !== util_js_1.ZodParsedType.map) {
|
|
2753
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
2754
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
2755
|
+
expected: util_js_1.ZodParsedType.map,
|
|
2641
2756
|
received: ctx.parsedType,
|
|
2642
2757
|
});
|
|
2643
|
-
return
|
|
2758
|
+
return parseUtil_js_1.INVALID;
|
|
2644
2759
|
}
|
|
2645
2760
|
const keyType = this._def.keyType;
|
|
2646
2761
|
const valueType = this._def.valueType;
|
|
@@ -2657,7 +2772,7 @@ class ZodMap extends ZodType {
|
|
|
2657
2772
|
const key = await pair.key;
|
|
2658
2773
|
const value = await pair.value;
|
|
2659
2774
|
if (key.status === "aborted" || value.status === "aborted") {
|
|
2660
|
-
return
|
|
2775
|
+
return parseUtil_js_1.INVALID;
|
|
2661
2776
|
}
|
|
2662
2777
|
if (key.status === "dirty" || value.status === "dirty") {
|
|
2663
2778
|
status.dirty();
|
|
@@ -2673,7 +2788,7 @@ class ZodMap extends ZodType {
|
|
|
2673
2788
|
const key = pair.key;
|
|
2674
2789
|
const value = pair.value;
|
|
2675
2790
|
if (key.status === "aborted" || value.status === "aborted") {
|
|
2676
|
-
return
|
|
2791
|
+
return parseUtil_js_1.INVALID;
|
|
2677
2792
|
}
|
|
2678
2793
|
if (key.status === "dirty" || value.status === "dirty") {
|
|
2679
2794
|
status.dirty();
|
|
@@ -2696,19 +2811,19 @@ ZodMap.create = (keyType, valueType, params) => {
|
|
|
2696
2811
|
class ZodSet extends ZodType {
|
|
2697
2812
|
_parse(input) {
|
|
2698
2813
|
const { status, ctx } = this._processInputParams(input);
|
|
2699
|
-
if (ctx.parsedType !==
|
|
2700
|
-
(0,
|
|
2701
|
-
code:
|
|
2702
|
-
expected:
|
|
2814
|
+
if (ctx.parsedType !== util_js_1.ZodParsedType.set) {
|
|
2815
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
2816
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
2817
|
+
expected: util_js_1.ZodParsedType.set,
|
|
2703
2818
|
received: ctx.parsedType,
|
|
2704
2819
|
});
|
|
2705
|
-
return
|
|
2820
|
+
return parseUtil_js_1.INVALID;
|
|
2706
2821
|
}
|
|
2707
2822
|
const def = this._def;
|
|
2708
2823
|
if (def.minSize !== null) {
|
|
2709
2824
|
if (ctx.data.size < def.minSize.value) {
|
|
2710
|
-
(0,
|
|
2711
|
-
code:
|
|
2825
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
2826
|
+
code: ZodError_js_1.ZodIssueCode.too_small,
|
|
2712
2827
|
minimum: def.minSize.value,
|
|
2713
2828
|
type: "set",
|
|
2714
2829
|
inclusive: true,
|
|
@@ -2720,8 +2835,8 @@ class ZodSet extends ZodType {
|
|
|
2720
2835
|
}
|
|
2721
2836
|
if (def.maxSize !== null) {
|
|
2722
2837
|
if (ctx.data.size > def.maxSize.value) {
|
|
2723
|
-
(0,
|
|
2724
|
-
code:
|
|
2838
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
2839
|
+
code: ZodError_js_1.ZodIssueCode.too_big,
|
|
2725
2840
|
maximum: def.maxSize.value,
|
|
2726
2841
|
type: "set",
|
|
2727
2842
|
inclusive: true,
|
|
@@ -2736,7 +2851,7 @@ class ZodSet extends ZodType {
|
|
|
2736
2851
|
const parsedSet = new Set();
|
|
2737
2852
|
for (const element of elements) {
|
|
2738
2853
|
if (element.status === "aborted")
|
|
2739
|
-
return
|
|
2854
|
+
return parseUtil_js_1.INVALID;
|
|
2740
2855
|
if (element.status === "dirty")
|
|
2741
2856
|
status.dirty();
|
|
2742
2857
|
parsedSet.add(element.value);
|
|
@@ -2754,13 +2869,13 @@ class ZodSet extends ZodType {
|
|
|
2754
2869
|
min(minSize, message) {
|
|
2755
2870
|
return new ZodSet({
|
|
2756
2871
|
...this._def,
|
|
2757
|
-
minSize: { value: minSize, message:
|
|
2872
|
+
minSize: { value: minSize, message: errorUtil_js_1.errorUtil.toString(message) },
|
|
2758
2873
|
});
|
|
2759
2874
|
}
|
|
2760
2875
|
max(maxSize, message) {
|
|
2761
2876
|
return new ZodSet({
|
|
2762
2877
|
...this._def,
|
|
2763
|
-
maxSize: { value: maxSize, message:
|
|
2878
|
+
maxSize: { value: maxSize, message: errorUtil_js_1.errorUtil.toString(message) },
|
|
2764
2879
|
});
|
|
2765
2880
|
}
|
|
2766
2881
|
size(size, message) {
|
|
@@ -2787,42 +2902,32 @@ class ZodFunction extends ZodType {
|
|
|
2787
2902
|
}
|
|
2788
2903
|
_parse(input) {
|
|
2789
2904
|
const { ctx } = this._processInputParams(input);
|
|
2790
|
-
if (ctx.parsedType !==
|
|
2791
|
-
(0,
|
|
2792
|
-
code:
|
|
2793
|
-
expected:
|
|
2905
|
+
if (ctx.parsedType !== util_js_1.ZodParsedType.function) {
|
|
2906
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
2907
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
2908
|
+
expected: util_js_1.ZodParsedType.function,
|
|
2794
2909
|
received: ctx.parsedType,
|
|
2795
2910
|
});
|
|
2796
|
-
return
|
|
2911
|
+
return parseUtil_js_1.INVALID;
|
|
2797
2912
|
}
|
|
2798
2913
|
function makeArgsIssue(args, error) {
|
|
2799
|
-
return (0,
|
|
2914
|
+
return (0, parseUtil_js_1.makeIssue)({
|
|
2800
2915
|
data: args,
|
|
2801
2916
|
path: ctx.path,
|
|
2802
|
-
errorMaps: [
|
|
2803
|
-
ctx.common.contextualErrorMap,
|
|
2804
|
-
ctx.schemaErrorMap,
|
|
2805
|
-
(0, errors_1.getErrorMap)(),
|
|
2806
|
-
errors_1.defaultErrorMap,
|
|
2807
|
-
].filter((x) => !!x),
|
|
2917
|
+
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, (0, errors_js_1.getErrorMap)(), errors_js_1.defaultErrorMap].filter((x) => !!x),
|
|
2808
2918
|
issueData: {
|
|
2809
|
-
code:
|
|
2919
|
+
code: ZodError_js_1.ZodIssueCode.invalid_arguments,
|
|
2810
2920
|
argumentsError: error,
|
|
2811
2921
|
},
|
|
2812
2922
|
});
|
|
2813
2923
|
}
|
|
2814
2924
|
function makeReturnsIssue(returns, error) {
|
|
2815
|
-
return (0,
|
|
2925
|
+
return (0, parseUtil_js_1.makeIssue)({
|
|
2816
2926
|
data: returns,
|
|
2817
2927
|
path: ctx.path,
|
|
2818
|
-
errorMaps: [
|
|
2819
|
-
ctx.common.contextualErrorMap,
|
|
2820
|
-
ctx.schemaErrorMap,
|
|
2821
|
-
(0, errors_1.getErrorMap)(),
|
|
2822
|
-
errors_1.defaultErrorMap,
|
|
2823
|
-
].filter((x) => !!x),
|
|
2928
|
+
errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, (0, errors_js_1.getErrorMap)(), errors_js_1.defaultErrorMap].filter((x) => !!x),
|
|
2824
2929
|
issueData: {
|
|
2825
|
-
code:
|
|
2930
|
+
code: ZodError_js_1.ZodIssueCode.invalid_return_type,
|
|
2826
2931
|
returnTypeError: error,
|
|
2827
2932
|
},
|
|
2828
2933
|
});
|
|
@@ -2834,11 +2939,9 @@ class ZodFunction extends ZodType {
|
|
|
2834
2939
|
// an alias (using an arrow function was what caused 2651).
|
|
2835
2940
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
2836
2941
|
const me = this;
|
|
2837
|
-
return (0,
|
|
2838
|
-
const error = new
|
|
2839
|
-
const parsedArgs = await me._def.args
|
|
2840
|
-
.parseAsync(args, params)
|
|
2841
|
-
.catch((e) => {
|
|
2942
|
+
return (0, parseUtil_js_1.OK)(async function (...args) {
|
|
2943
|
+
const error = new ZodError_js_1.ZodError([]);
|
|
2944
|
+
const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {
|
|
2842
2945
|
error.addIssue(makeArgsIssue(args, e));
|
|
2843
2946
|
throw error;
|
|
2844
2947
|
});
|
|
@@ -2857,15 +2960,15 @@ class ZodFunction extends ZodType {
|
|
|
2857
2960
|
// an alias (using an arrow function was what caused 2651).
|
|
2858
2961
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
2859
2962
|
const me = this;
|
|
2860
|
-
return (0,
|
|
2963
|
+
return (0, parseUtil_js_1.OK)(function (...args) {
|
|
2861
2964
|
const parsedArgs = me._def.args.safeParse(args, params);
|
|
2862
2965
|
if (!parsedArgs.success) {
|
|
2863
|
-
throw new
|
|
2966
|
+
throw new ZodError_js_1.ZodError([makeArgsIssue(args, parsedArgs.error)]);
|
|
2864
2967
|
}
|
|
2865
2968
|
const result = Reflect.apply(fn, this, parsedArgs.data);
|
|
2866
2969
|
const parsedReturns = me._def.returns.safeParse(result, params);
|
|
2867
2970
|
if (!parsedReturns.success) {
|
|
2868
|
-
throw new
|
|
2971
|
+
throw new ZodError_js_1.ZodError([makeReturnsIssue(result, parsedReturns.error)]);
|
|
2869
2972
|
}
|
|
2870
2973
|
return parsedReturns.data;
|
|
2871
2974
|
});
|
|
@@ -2899,9 +3002,7 @@ class ZodFunction extends ZodType {
|
|
|
2899
3002
|
}
|
|
2900
3003
|
static create(args, returns, params) {
|
|
2901
3004
|
return new ZodFunction({
|
|
2902
|
-
args: (args
|
|
2903
|
-
? args
|
|
2904
|
-
: ZodTuple.create([]).rest(ZodUnknown.create())),
|
|
3005
|
+
args: (args ? args : ZodTuple.create([]).rest(ZodUnknown.create())),
|
|
2905
3006
|
returns: returns || ZodUnknown.create(),
|
|
2906
3007
|
typeName: ZodFirstPartyTypeKind.ZodFunction,
|
|
2907
3008
|
...processCreateParams(params),
|
|
@@ -2931,12 +3032,12 @@ class ZodLiteral extends ZodType {
|
|
|
2931
3032
|
_parse(input) {
|
|
2932
3033
|
if (input.data !== this._def.value) {
|
|
2933
3034
|
const ctx = this._getOrReturnCtx(input);
|
|
2934
|
-
(0,
|
|
3035
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
2935
3036
|
received: ctx.data,
|
|
2936
|
-
code:
|
|
3037
|
+
code: ZodError_js_1.ZodIssueCode.invalid_literal,
|
|
2937
3038
|
expected: this._def.value,
|
|
2938
3039
|
});
|
|
2939
|
-
return
|
|
3040
|
+
return parseUtil_js_1.INVALID;
|
|
2940
3041
|
}
|
|
2941
3042
|
return { status: "valid", value: input.data };
|
|
2942
3043
|
}
|
|
@@ -2960,35 +3061,31 @@ function createZodEnum(values, params) {
|
|
|
2960
3061
|
});
|
|
2961
3062
|
}
|
|
2962
3063
|
class ZodEnum extends ZodType {
|
|
2963
|
-
constructor() {
|
|
2964
|
-
super(...arguments);
|
|
2965
|
-
_ZodEnum_cache.set(this, void 0);
|
|
2966
|
-
}
|
|
2967
3064
|
_parse(input) {
|
|
2968
3065
|
if (typeof input.data !== "string") {
|
|
2969
3066
|
const ctx = this._getOrReturnCtx(input);
|
|
2970
3067
|
const expectedValues = this._def.values;
|
|
2971
|
-
(0,
|
|
2972
|
-
expected:
|
|
3068
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
3069
|
+
expected: util_js_1.util.joinValues(expectedValues),
|
|
2973
3070
|
received: ctx.parsedType,
|
|
2974
|
-
code:
|
|
3071
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
2975
3072
|
});
|
|
2976
|
-
return
|
|
3073
|
+
return parseUtil_js_1.INVALID;
|
|
2977
3074
|
}
|
|
2978
|
-
if (!
|
|
2979
|
-
|
|
3075
|
+
if (!this._cache) {
|
|
3076
|
+
this._cache = new Set(this._def.values);
|
|
2980
3077
|
}
|
|
2981
|
-
if (!
|
|
3078
|
+
if (!this._cache.has(input.data)) {
|
|
2982
3079
|
const ctx = this._getOrReturnCtx(input);
|
|
2983
3080
|
const expectedValues = this._def.values;
|
|
2984
|
-
(0,
|
|
3081
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
2985
3082
|
received: ctx.data,
|
|
2986
|
-
code:
|
|
3083
|
+
code: ZodError_js_1.ZodIssueCode.invalid_enum_value,
|
|
2987
3084
|
options: expectedValues,
|
|
2988
3085
|
});
|
|
2989
|
-
return
|
|
3086
|
+
return parseUtil_js_1.INVALID;
|
|
2990
3087
|
}
|
|
2991
|
-
return (0,
|
|
3088
|
+
return (0, parseUtil_js_1.OK)(input.data);
|
|
2992
3089
|
}
|
|
2993
3090
|
get options() {
|
|
2994
3091
|
return this._def.values;
|
|
@@ -3028,46 +3125,39 @@ class ZodEnum extends ZodType {
|
|
|
3028
3125
|
}
|
|
3029
3126
|
}
|
|
3030
3127
|
exports.ZodEnum = ZodEnum;
|
|
3031
|
-
_ZodEnum_cache = new WeakMap();
|
|
3032
3128
|
ZodEnum.create = createZodEnum;
|
|
3033
3129
|
class ZodNativeEnum extends ZodType {
|
|
3034
|
-
constructor() {
|
|
3035
|
-
super(...arguments);
|
|
3036
|
-
_ZodNativeEnum_cache.set(this, void 0);
|
|
3037
|
-
}
|
|
3038
3130
|
_parse(input) {
|
|
3039
|
-
const nativeEnumValues =
|
|
3131
|
+
const nativeEnumValues = util_js_1.util.getValidEnumValues(this._def.values);
|
|
3040
3132
|
const ctx = this._getOrReturnCtx(input);
|
|
3041
|
-
if (ctx.parsedType !==
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
expected: util_1.util.joinValues(expectedValues),
|
|
3133
|
+
if (ctx.parsedType !== util_js_1.ZodParsedType.string && ctx.parsedType !== util_js_1.ZodParsedType.number) {
|
|
3134
|
+
const expectedValues = util_js_1.util.objectValues(nativeEnumValues);
|
|
3135
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
3136
|
+
expected: util_js_1.util.joinValues(expectedValues),
|
|
3046
3137
|
received: ctx.parsedType,
|
|
3047
|
-
code:
|
|
3138
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
3048
3139
|
});
|
|
3049
|
-
return
|
|
3140
|
+
return parseUtil_js_1.INVALID;
|
|
3050
3141
|
}
|
|
3051
|
-
if (!
|
|
3052
|
-
|
|
3142
|
+
if (!this._cache) {
|
|
3143
|
+
this._cache = new Set(util_js_1.util.getValidEnumValues(this._def.values));
|
|
3053
3144
|
}
|
|
3054
|
-
if (!
|
|
3055
|
-
const expectedValues =
|
|
3056
|
-
(0,
|
|
3145
|
+
if (!this._cache.has(input.data)) {
|
|
3146
|
+
const expectedValues = util_js_1.util.objectValues(nativeEnumValues);
|
|
3147
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
3057
3148
|
received: ctx.data,
|
|
3058
|
-
code:
|
|
3149
|
+
code: ZodError_js_1.ZodIssueCode.invalid_enum_value,
|
|
3059
3150
|
options: expectedValues,
|
|
3060
3151
|
});
|
|
3061
|
-
return
|
|
3152
|
+
return parseUtil_js_1.INVALID;
|
|
3062
3153
|
}
|
|
3063
|
-
return (0,
|
|
3154
|
+
return (0, parseUtil_js_1.OK)(input.data);
|
|
3064
3155
|
}
|
|
3065
3156
|
get enum() {
|
|
3066
3157
|
return this._def.values;
|
|
3067
3158
|
}
|
|
3068
3159
|
}
|
|
3069
3160
|
exports.ZodNativeEnum = ZodNativeEnum;
|
|
3070
|
-
_ZodNativeEnum_cache = new WeakMap();
|
|
3071
3161
|
ZodNativeEnum.create = (values, params) => {
|
|
3072
3162
|
return new ZodNativeEnum({
|
|
3073
3163
|
values: values,
|
|
@@ -3081,19 +3171,16 @@ class ZodPromise extends ZodType {
|
|
|
3081
3171
|
}
|
|
3082
3172
|
_parse(input) {
|
|
3083
3173
|
const { ctx } = this._processInputParams(input);
|
|
3084
|
-
if (ctx.parsedType !==
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
expected: util_1.ZodParsedType.promise,
|
|
3174
|
+
if (ctx.parsedType !== util_js_1.ZodParsedType.promise && ctx.common.async === false) {
|
|
3175
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
3176
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
3177
|
+
expected: util_js_1.ZodParsedType.promise,
|
|
3089
3178
|
received: ctx.parsedType,
|
|
3090
3179
|
});
|
|
3091
|
-
return
|
|
3180
|
+
return parseUtil_js_1.INVALID;
|
|
3092
3181
|
}
|
|
3093
|
-
const promisified = ctx.parsedType ===
|
|
3094
|
-
|
|
3095
|
-
: Promise.resolve(ctx.data);
|
|
3096
|
-
return (0, parseUtil_1.OK)(promisified.then((data) => {
|
|
3182
|
+
const promisified = ctx.parsedType === util_js_1.ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);
|
|
3183
|
+
return (0, parseUtil_js_1.OK)(promisified.then((data) => {
|
|
3097
3184
|
return this._def.type.parseAsync(data, {
|
|
3098
3185
|
path: ctx.path,
|
|
3099
3186
|
errorMap: ctx.common.contextualErrorMap,
|
|
@@ -3123,7 +3210,7 @@ class ZodEffects extends ZodType {
|
|
|
3123
3210
|
const effect = this._def.effect || null;
|
|
3124
3211
|
const checkCtx = {
|
|
3125
3212
|
addIssue: (arg) => {
|
|
3126
|
-
(0,
|
|
3213
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, arg);
|
|
3127
3214
|
if (arg.fatal) {
|
|
3128
3215
|
status.abort();
|
|
3129
3216
|
}
|
|
@@ -3141,35 +3228,35 @@ class ZodEffects extends ZodType {
|
|
|
3141
3228
|
if (ctx.common.async) {
|
|
3142
3229
|
return Promise.resolve(processed).then(async (processed) => {
|
|
3143
3230
|
if (status.value === "aborted")
|
|
3144
|
-
return
|
|
3231
|
+
return parseUtil_js_1.INVALID;
|
|
3145
3232
|
const result = await this._def.schema._parseAsync({
|
|
3146
3233
|
data: processed,
|
|
3147
3234
|
path: ctx.path,
|
|
3148
3235
|
parent: ctx,
|
|
3149
3236
|
});
|
|
3150
3237
|
if (result.status === "aborted")
|
|
3151
|
-
return
|
|
3238
|
+
return parseUtil_js_1.INVALID;
|
|
3152
3239
|
if (result.status === "dirty")
|
|
3153
|
-
return (0,
|
|
3240
|
+
return (0, parseUtil_js_1.DIRTY)(result.value);
|
|
3154
3241
|
if (status.value === "dirty")
|
|
3155
|
-
return (0,
|
|
3242
|
+
return (0, parseUtil_js_1.DIRTY)(result.value);
|
|
3156
3243
|
return result;
|
|
3157
3244
|
});
|
|
3158
3245
|
}
|
|
3159
3246
|
else {
|
|
3160
3247
|
if (status.value === "aborted")
|
|
3161
|
-
return
|
|
3248
|
+
return parseUtil_js_1.INVALID;
|
|
3162
3249
|
const result = this._def.schema._parseSync({
|
|
3163
3250
|
data: processed,
|
|
3164
3251
|
path: ctx.path,
|
|
3165
3252
|
parent: ctx,
|
|
3166
3253
|
});
|
|
3167
3254
|
if (result.status === "aborted")
|
|
3168
|
-
return
|
|
3255
|
+
return parseUtil_js_1.INVALID;
|
|
3169
3256
|
if (result.status === "dirty")
|
|
3170
|
-
return (0,
|
|
3257
|
+
return (0, parseUtil_js_1.DIRTY)(result.value);
|
|
3171
3258
|
if (status.value === "dirty")
|
|
3172
|
-
return (0,
|
|
3259
|
+
return (0, parseUtil_js_1.DIRTY)(result.value);
|
|
3173
3260
|
return result;
|
|
3174
3261
|
}
|
|
3175
3262
|
}
|
|
@@ -3191,7 +3278,7 @@ class ZodEffects extends ZodType {
|
|
|
3191
3278
|
parent: ctx,
|
|
3192
3279
|
});
|
|
3193
3280
|
if (inner.status === "aborted")
|
|
3194
|
-
return
|
|
3281
|
+
return parseUtil_js_1.INVALID;
|
|
3195
3282
|
if (inner.status === "dirty")
|
|
3196
3283
|
status.dirty();
|
|
3197
3284
|
// return value is ignored
|
|
@@ -3199,11 +3286,9 @@ class ZodEffects extends ZodType {
|
|
|
3199
3286
|
return { status: status.value, value: inner.value };
|
|
3200
3287
|
}
|
|
3201
3288
|
else {
|
|
3202
|
-
return this._def.schema
|
|
3203
|
-
._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx })
|
|
3204
|
-
.then((inner) => {
|
|
3289
|
+
return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => {
|
|
3205
3290
|
if (inner.status === "aborted")
|
|
3206
|
-
return
|
|
3291
|
+
return parseUtil_js_1.INVALID;
|
|
3207
3292
|
if (inner.status === "dirty")
|
|
3208
3293
|
status.dirty();
|
|
3209
3294
|
return executeRefinement(inner.value).then(() => {
|
|
@@ -3219,8 +3304,8 @@ class ZodEffects extends ZodType {
|
|
|
3219
3304
|
path: ctx.path,
|
|
3220
3305
|
parent: ctx,
|
|
3221
3306
|
});
|
|
3222
|
-
if (!(0,
|
|
3223
|
-
return
|
|
3307
|
+
if (!(0, parseUtil_js_1.isValid)(base))
|
|
3308
|
+
return parseUtil_js_1.INVALID;
|
|
3224
3309
|
const result = effect.transform(base.value, checkCtx);
|
|
3225
3310
|
if (result instanceof Promise) {
|
|
3226
3311
|
throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
|
|
@@ -3228,16 +3313,17 @@ class ZodEffects extends ZodType {
|
|
|
3228
3313
|
return { status: status.value, value: result };
|
|
3229
3314
|
}
|
|
3230
3315
|
else {
|
|
3231
|
-
return this._def.schema
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3316
|
+
return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
|
|
3317
|
+
if (!(0, parseUtil_js_1.isValid)(base))
|
|
3318
|
+
return parseUtil_js_1.INVALID;
|
|
3319
|
+
return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
|
|
3320
|
+
status: status.value,
|
|
3321
|
+
value: result,
|
|
3322
|
+
}));
|
|
3237
3323
|
});
|
|
3238
3324
|
}
|
|
3239
3325
|
}
|
|
3240
|
-
|
|
3326
|
+
util_js_1.util.assertNever(effect);
|
|
3241
3327
|
}
|
|
3242
3328
|
}
|
|
3243
3329
|
exports.ZodEffects = ZodEffects;
|
|
@@ -3261,8 +3347,8 @@ ZodEffects.createWithPreprocess = (preprocess, schema, params) => {
|
|
|
3261
3347
|
class ZodOptional extends ZodType {
|
|
3262
3348
|
_parse(input) {
|
|
3263
3349
|
const parsedType = this._getType(input);
|
|
3264
|
-
if (parsedType ===
|
|
3265
|
-
return (0,
|
|
3350
|
+
if (parsedType === util_js_1.ZodParsedType.undefined) {
|
|
3351
|
+
return (0, parseUtil_js_1.OK)(undefined);
|
|
3266
3352
|
}
|
|
3267
3353
|
return this._def.innerType._parse(input);
|
|
3268
3354
|
}
|
|
@@ -3281,8 +3367,8 @@ ZodOptional.create = (type, params) => {
|
|
|
3281
3367
|
class ZodNullable extends ZodType {
|
|
3282
3368
|
_parse(input) {
|
|
3283
3369
|
const parsedType = this._getType(input);
|
|
3284
|
-
if (parsedType ===
|
|
3285
|
-
return (0,
|
|
3370
|
+
if (parsedType === util_js_1.ZodParsedType.null) {
|
|
3371
|
+
return (0, parseUtil_js_1.OK)(null);
|
|
3286
3372
|
}
|
|
3287
3373
|
return this._def.innerType._parse(input);
|
|
3288
3374
|
}
|
|
@@ -3302,7 +3388,7 @@ class ZodDefault extends ZodType {
|
|
|
3302
3388
|
_parse(input) {
|
|
3303
3389
|
const { ctx } = this._processInputParams(input);
|
|
3304
3390
|
let data = ctx.data;
|
|
3305
|
-
if (ctx.parsedType ===
|
|
3391
|
+
if (ctx.parsedType === util_js_1.ZodParsedType.undefined) {
|
|
3306
3392
|
data = this._def.defaultValue();
|
|
3307
3393
|
}
|
|
3308
3394
|
return this._def.innerType._parse({
|
|
@@ -3320,9 +3406,7 @@ ZodDefault.create = (type, params) => {
|
|
|
3320
3406
|
return new ZodDefault({
|
|
3321
3407
|
innerType: type,
|
|
3322
3408
|
typeName: ZodFirstPartyTypeKind.ZodDefault,
|
|
3323
|
-
defaultValue: typeof params.default === "function"
|
|
3324
|
-
? params.default
|
|
3325
|
-
: () => params.default,
|
|
3409
|
+
defaultValue: typeof params.default === "function" ? params.default : () => params.default,
|
|
3326
3410
|
...processCreateParams(params),
|
|
3327
3411
|
});
|
|
3328
3412
|
};
|
|
@@ -3344,7 +3428,7 @@ class ZodCatch extends ZodType {
|
|
|
3344
3428
|
...newCtx,
|
|
3345
3429
|
},
|
|
3346
3430
|
});
|
|
3347
|
-
if ((0,
|
|
3431
|
+
if ((0, parseUtil_js_1.isAsync)(result)) {
|
|
3348
3432
|
return result.then((result) => {
|
|
3349
3433
|
return {
|
|
3350
3434
|
status: "valid",
|
|
@@ -3352,7 +3436,7 @@ class ZodCatch extends ZodType {
|
|
|
3352
3436
|
? result.value
|
|
3353
3437
|
: this._def.catchValue({
|
|
3354
3438
|
get error() {
|
|
3355
|
-
return new
|
|
3439
|
+
return new ZodError_js_1.ZodError(newCtx.common.issues);
|
|
3356
3440
|
},
|
|
3357
3441
|
input: newCtx.data,
|
|
3358
3442
|
}),
|
|
@@ -3366,7 +3450,7 @@ class ZodCatch extends ZodType {
|
|
|
3366
3450
|
? result.value
|
|
3367
3451
|
: this._def.catchValue({
|
|
3368
3452
|
get error() {
|
|
3369
|
-
return new
|
|
3453
|
+
return new ZodError_js_1.ZodError(newCtx.common.issues);
|
|
3370
3454
|
},
|
|
3371
3455
|
input: newCtx.data,
|
|
3372
3456
|
}),
|
|
@@ -3389,14 +3473,14 @@ ZodCatch.create = (type, params) => {
|
|
|
3389
3473
|
class ZodNaN extends ZodType {
|
|
3390
3474
|
_parse(input) {
|
|
3391
3475
|
const parsedType = this._getType(input);
|
|
3392
|
-
if (parsedType !==
|
|
3476
|
+
if (parsedType !== util_js_1.ZodParsedType.nan) {
|
|
3393
3477
|
const ctx = this._getOrReturnCtx(input);
|
|
3394
|
-
(0,
|
|
3395
|
-
code:
|
|
3396
|
-
expected:
|
|
3478
|
+
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
3479
|
+
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
3480
|
+
expected: util_js_1.ZodParsedType.nan,
|
|
3397
3481
|
received: ctx.parsedType,
|
|
3398
3482
|
});
|
|
3399
|
-
return
|
|
3483
|
+
return parseUtil_js_1.INVALID;
|
|
3400
3484
|
}
|
|
3401
3485
|
return { status: "valid", value: input.data };
|
|
3402
3486
|
}
|
|
@@ -3435,10 +3519,10 @@ class ZodPipeline extends ZodType {
|
|
|
3435
3519
|
parent: ctx,
|
|
3436
3520
|
});
|
|
3437
3521
|
if (inResult.status === "aborted")
|
|
3438
|
-
return
|
|
3522
|
+
return parseUtil_js_1.INVALID;
|
|
3439
3523
|
if (inResult.status === "dirty") {
|
|
3440
3524
|
status.dirty();
|
|
3441
|
-
return (0,
|
|
3525
|
+
return (0, parseUtil_js_1.DIRTY)(inResult.value);
|
|
3442
3526
|
}
|
|
3443
3527
|
else {
|
|
3444
3528
|
return this._def.out._parseAsync({
|
|
@@ -3457,7 +3541,7 @@ class ZodPipeline extends ZodType {
|
|
|
3457
3541
|
parent: ctx,
|
|
3458
3542
|
});
|
|
3459
3543
|
if (inResult.status === "aborted")
|
|
3460
|
-
return
|
|
3544
|
+
return parseUtil_js_1.INVALID;
|
|
3461
3545
|
if (inResult.status === "dirty") {
|
|
3462
3546
|
status.dirty();
|
|
3463
3547
|
return {
|
|
@@ -3487,14 +3571,12 @@ class ZodReadonly extends ZodType {
|
|
|
3487
3571
|
_parse(input) {
|
|
3488
3572
|
const result = this._def.innerType._parse(input);
|
|
3489
3573
|
const freeze = (data) => {
|
|
3490
|
-
if ((0,
|
|
3574
|
+
if ((0, parseUtil_js_1.isValid)(data)) {
|
|
3491
3575
|
data.value = Object.freeze(data.value);
|
|
3492
3576
|
}
|
|
3493
3577
|
return data;
|
|
3494
3578
|
};
|
|
3495
|
-
return (0,
|
|
3496
|
-
? result.then((data) => freeze(data))
|
|
3497
|
-
: freeze(result);
|
|
3579
|
+
return (0, parseUtil_js_1.isAsync)(result) ? result.then((data) => freeze(data)) : freeze(result);
|
|
3498
3580
|
}
|
|
3499
3581
|
unwrap() {
|
|
3500
3582
|
return this._def.innerType;
|
|
@@ -3508,7 +3590,19 @@ ZodReadonly.create = (type, params) => {
|
|
|
3508
3590
|
...processCreateParams(params),
|
|
3509
3591
|
});
|
|
3510
3592
|
};
|
|
3511
|
-
|
|
3593
|
+
////////////////////////////////////////
|
|
3594
|
+
////////////////////////////////////////
|
|
3595
|
+
////////// //////////
|
|
3596
|
+
////////// z.custom //////////
|
|
3597
|
+
////////// //////////
|
|
3598
|
+
////////////////////////////////////////
|
|
3599
|
+
////////////////////////////////////////
|
|
3600
|
+
function cleanParams(params, data) {
|
|
3601
|
+
const p = typeof params === "function" ? params(data) : typeof params === "string" ? { message: params } : params;
|
|
3602
|
+
const p2 = typeof p === "string" ? { message: p } : p;
|
|
3603
|
+
return p2;
|
|
3604
|
+
}
|
|
3605
|
+
function custom(check, _params = {},
|
|
3512
3606
|
/**
|
|
3513
3607
|
* @deprecated
|
|
3514
3608
|
*
|
|
@@ -3522,21 +3616,25 @@ function custom(check, params = {},
|
|
|
3522
3616
|
fatal) {
|
|
3523
3617
|
if (check)
|
|
3524
3618
|
return ZodAny.create().superRefine((data, ctx) => {
|
|
3525
|
-
|
|
3526
|
-
if (
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
: params;
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
ctx.addIssue({ code: "custom", ...p2, fatal: _fatal });
|
|
3619
|
+
const r = check(data);
|
|
3620
|
+
if (r instanceof Promise) {
|
|
3621
|
+
return r.then((r) => {
|
|
3622
|
+
if (!r) {
|
|
3623
|
+
const params = cleanParams(_params, data);
|
|
3624
|
+
const _fatal = params.fatal ?? fatal ?? true;
|
|
3625
|
+
ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
|
|
3626
|
+
}
|
|
3627
|
+
});
|
|
3535
3628
|
}
|
|
3629
|
+
if (!r) {
|
|
3630
|
+
const params = cleanParams(_params, data);
|
|
3631
|
+
const _fatal = params.fatal ?? fatal ?? true;
|
|
3632
|
+
ctx.addIssue({ code: "custom", ...params, fatal: _fatal });
|
|
3633
|
+
}
|
|
3634
|
+
return;
|
|
3536
3635
|
});
|
|
3537
3636
|
return ZodAny.create();
|
|
3538
3637
|
}
|
|
3539
|
-
exports.custom = custom;
|
|
3540
3638
|
exports.late = {
|
|
3541
3639
|
object: ZodObject.lazycreate,
|
|
3542
3640
|
};
|
|
@@ -3578,7 +3676,7 @@ var ZodFirstPartyTypeKind;
|
|
|
3578
3676
|
ZodFirstPartyTypeKind["ZodBranded"] = "ZodBranded";
|
|
3579
3677
|
ZodFirstPartyTypeKind["ZodPipeline"] = "ZodPipeline";
|
|
3580
3678
|
ZodFirstPartyTypeKind["ZodReadonly"] = "ZodReadonly";
|
|
3581
|
-
})(ZodFirstPartyTypeKind
|
|
3679
|
+
})(ZodFirstPartyTypeKind || (exports.ZodFirstPartyTypeKind = ZodFirstPartyTypeKind = {}));
|
|
3582
3680
|
// requires TS 4.4+
|
|
3583
3681
|
class Class {
|
|
3584
3682
|
constructor(..._) { }
|
|
@@ -3674,4 +3772,4 @@ exports.coerce = {
|
|
|
3674
3772
|
bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),
|
|
3675
3773
|
date: ((arg) => ZodDate.create({ ...arg, coerce: true })),
|
|
3676
3774
|
};
|
|
3677
|
-
exports.NEVER =
|
|
3775
|
+
exports.NEVER = parseUtil_js_1.INVALID;
|