@wopee-io/wopee.wdio 6.0.0 → 6.0.1
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/build/domain/model/config.interface.d.ts +15 -60
- package/build/domain/model/config.interface.d.ts.map +1 -1
- package/build/domain/service/wopeeService.d.ts.map +1 -1
- package/build/domain/service/wopeeService.js +2 -0
- package/build/domain/service/wopeeService.js.map +1 -1
- package/build/utils/versionMetadata.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationScenarioPayload.interface.d.ts +1 -7
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationStepPayload.interface.d.ts +1 -23
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/createIntegrationSuitePayload.interface.d.ts +1 -5
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationScenario.interface.d.ts +1 -7
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationStep.interface.d.ts +3 -11
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationStep.interface.js +1 -1
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/integrationSuite.interface.d.ts +1 -7
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/visualAssert.interface.d.ts +3 -11
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/visualAssert.interface.js +1 -1
- package/node_modules/@autonomous-testing/sdk/build/core/domain/entities/visualAssertPayload.interface.d.ts +1 -9
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/adapter.d.ts +9 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/adapter.js +30 -3
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/axios-config.d.ts +15 -1
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/axios-config.js +17 -1
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/deadline.d.ts +36 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/deadline.js +63 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/errors.js +10 -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/index.d.ts +2 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/interface.d.ts +41 -224
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/interface.js +16 -8
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/retry.d.ts +52 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloAdapter/retry.js +122 -0
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloAdapterService.js +3 -7
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloAdapterService/apolloService.interface.d.ts +2 -2
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerOptions.interface.d.ts +5 -10
- package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerOptions.interface.js +2 -1
- package/node_modules/@autonomous-testing/sdk/build/shared/metadata/versionMetadata.js +2 -2
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/zodHelper.d.ts +10 -0
- package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/zodHelper.js +8 -0
- package/node_modules/@autonomous-testing/sdk/package.json +2 -2
- package/node_modules/follow-redirects/README.md +27 -1
- package/node_modules/follow-redirects/index.js +11 -6
- package/node_modules/follow-redirects/package.json +1 -1
- package/node_modules/zod/README.md +34 -24
- package/node_modules/zod/compile.cjs +96 -0
- package/node_modules/zod/compile.d.cts +1 -0
- package/node_modules/zod/compile.d.ts +1 -0
- package/node_modules/zod/compile.js +52 -0
- package/node_modules/zod/index.cjs +22 -3
- package/node_modules/zod/index.d.cts +3 -4
- package/node_modules/zod/index.d.ts +3 -4
- package/node_modules/zod/index.js +7 -4
- package/node_modules/zod/locales/index.cjs +36 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +7 -0
- package/node_modules/zod/mini/index.cjs +51 -0
- package/node_modules/zod/mini/index.d.cts +3 -0
- package/node_modules/zod/mini/index.d.ts +3 -0
- package/node_modules/zod/mini/index.js +3 -0
- package/node_modules/zod/mini/package.json +7 -0
- package/node_modules/zod/package.json +44 -15
- package/node_modules/zod/src/compile.ts +56 -0
- package/node_modules/zod/src/index.ts +7 -4
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +3 -0
- package/node_modules/zod/src/v3/ZodError.ts +23 -13
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +1 -1
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +3 -3
- package/node_modules/zod/src/v3/tests/complex.test.ts +17 -3
- package/node_modules/zod/src/v3/tests/error.test.ts +35 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +7 -3
- package/node_modules/zod/src/v3/tests/intersection.test.ts +18 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +1 -2
- package/node_modules/zod/src/v3/tests/nan.test.ts +5 -2
- package/node_modules/zod/src/v3/tests/object.test.ts +10 -13
- package/node_modules/zod/src/v3/tests/partials.test.ts +3 -3
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/string.test.ts +8 -2
- package/node_modules/zod/src/v3/types.ts +8 -6
- package/node_modules/zod/src/v4/classic/checks.ts +3 -0
- package/node_modules/zod/src/v4/classic/compat.ts +30 -18
- package/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/node_modules/zod/src/v4/classic/errors.ts +61 -39
- package/node_modules/zod/src/v4/classic/external.ts +18 -11
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +944 -0
- package/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/node_modules/zod/src/v4/classic/index.ts +2 -2
- package/node_modules/zod/src/v4/classic/iso.ts +2 -72
- package/node_modules/zod/src/v4/classic/parse.ts +57 -2
- package/node_modules/zod/src/v4/classic/schemas.ts +1258 -375
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +86 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +35 -8
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +192 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +43 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +357 -5
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +572 -0
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +704 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +27 -5
- package/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
- package/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +67 -6
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +37 -17
- package/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
- package/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +142 -0
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +221 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +333 -10
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +394 -4
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +403 -6
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +9 -4
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +4 -0
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +1467 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +160 -37
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +67 -0
- package/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +134 -5
- package/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +93 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +168 -5
- package/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +4 -3
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +36 -1
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +37 -1
- package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +153 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +15 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +161 -7
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +457 -14
- package/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +255 -12
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +350 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +89 -5
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +25 -5
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +107 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +44 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +74 -21
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +1 -1
- package/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +1 -69
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +553 -10
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +352 -1
- package/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +229 -68
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +40 -1
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +20 -3
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +96 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +16 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +568 -9
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +58 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +70 -16
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +3409 -990
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +128 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +353 -5
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +219 -3
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +2 -2
- package/node_modules/zod/src/v4/core/api.ts +442 -161
- package/node_modules/zod/src/v4/core/checks.ts +134 -151
- package/node_modules/zod/src/v4/core/compile.ts +2322 -0
- package/node_modules/zod/src/v4/core/core.ts +146 -50
- package/node_modules/zod/src/v4/core/doc.ts +18 -10
- package/node_modules/zod/src/v4/core/errors.ts +221 -102
- package/node_modules/zod/src/v4/core/index.ts +5 -1
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +131 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +934 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +9 -4
- package/node_modules/zod/src/v4/core/memoizer.ts +331 -0
- package/node_modules/zod/src/v4/core/parse.ts +252 -37
- package/node_modules/zod/src/v4/core/regexes.ts +112 -30
- package/node_modules/zod/src/v4/core/registries.ts +19 -10
- package/node_modules/zod/src/v4/core/schemas.ts +1972 -588
- package/node_modules/zod/src/v4/core/standard-schema.ts +114 -19
- package/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
- package/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
- package/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
- package/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
- package/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
- package/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +214 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +1 -1
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +180 -0
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
- package/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +2 -2
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
- package/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
- package/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +706 -826
- package/node_modules/zod/src/v4/core/util.ts +675 -157
- package/node_modules/zod/src/v4/core/versions.ts +2 -2
- package/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/node_modules/zod/src/v4/index.ts +3 -3
- package/node_modules/zod/src/v4/locales/ar.ts +22 -27
- package/node_modules/zod/src/v4/locales/az.ts +22 -27
- package/node_modules/zod/src/v4/locales/be.ts +31 -27
- package/node_modules/zod/src/v4/locales/bg.ts +133 -0
- package/node_modules/zod/src/v4/locales/bn.ts +123 -0
- package/node_modules/zod/src/v4/locales/ca.ts +22 -28
- package/node_modules/zod/src/v4/locales/ckb.ts +140 -0
- package/node_modules/zod/src/v4/locales/cs.ts +26 -45
- package/node_modules/zod/src/v4/locales/da.ts +128 -0
- package/node_modules/zod/src/v4/locales/de.ts +24 -27
- package/node_modules/zod/src/v4/locales/el.ts +124 -0
- package/node_modules/zod/src/v4/locales/en.ts +38 -29
- package/node_modules/zod/src/v4/locales/eo.ts +25 -27
- package/node_modules/zod/src/v4/locales/es.ts +53 -33
- package/node_modules/zod/src/v4/locales/fa.ts +24 -27
- package/node_modules/zod/src/v4/locales/fi.ts +22 -27
- package/node_modules/zod/src/v4/locales/fr-CA.ts +22 -27
- package/node_modules/zod/src/v4/locales/fr.ts +58 -43
- package/node_modules/zod/src/v4/locales/gu.ts +123 -0
- package/node_modules/zod/src/v4/locales/he.ts +208 -80
- package/node_modules/zod/src/v4/locales/hi.ts +126 -0
- package/node_modules/zod/src/v4/locales/hr.ts +135 -0
- package/node_modules/zod/src/v4/locales/hu.ts +24 -28
- package/node_modules/zod/src/v4/locales/hy.ts +175 -0
- package/node_modules/zod/src/v4/locales/id.ts +22 -27
- package/node_modules/zod/src/v4/locales/index.ts +24 -0
- package/node_modules/zod/src/v4/locales/is.ts +124 -0
- package/node_modules/zod/src/v4/locales/it.ts +24 -28
- package/node_modules/zod/src/v4/locales/ja.ts +24 -27
- package/node_modules/zod/src/v4/locales/ka.ts +128 -0
- package/node_modules/zod/src/v4/locales/kh.ts +3 -122
- package/node_modules/zod/src/v4/locales/km.ts +124 -0
- package/node_modules/zod/src/v4/locales/kn.ts +126 -0
- package/node_modules/zod/src/v4/locales/ko.ts +22 -27
- package/node_modules/zod/src/v4/locales/lt.ts +243 -0
- package/node_modules/zod/src/v4/locales/mk.ts +24 -28
- package/node_modules/zod/src/v4/locales/ms.ts +23 -27
- package/node_modules/zod/src/v4/locales/ne.ts +128 -0
- package/node_modules/zod/src/v4/locales/nl.ts +37 -37
- package/node_modules/zod/src/v4/locales/nn.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +26 -29
- package/node_modules/zod/src/v4/locales/ota.ts +25 -28
- package/node_modules/zod/src/v4/locales/pl.ts +24 -27
- package/node_modules/zod/src/v4/locales/ps.ts +24 -26
- package/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
- package/node_modules/zod/src/v4/locales/pt.ts +107 -71
- package/node_modules/zod/src/v4/locales/ro.ts +132 -0
- package/node_modules/zod/src/v4/locales/ru.ts +31 -27
- package/node_modules/zod/src/v4/locales/sk.ts +123 -0
- package/node_modules/zod/src/v4/locales/sl.ts +24 -27
- package/node_modules/zod/src/v4/locales/sv.ts +26 -29
- package/node_modules/zod/src/v4/locales/ta.ts +25 -27
- package/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/node_modules/zod/src/v4/locales/th.ts +25 -27
- package/node_modules/zod/src/v4/locales/tk.ts +113 -0
- package/node_modules/zod/src/v4/locales/tr.ts +22 -27
- package/node_modules/zod/src/v4/locales/ua.ts +3 -122
- package/node_modules/zod/src/v4/locales/uk.ts +122 -0
- package/node_modules/zod/src/v4/locales/ur.ts +25 -27
- package/node_modules/zod/src/v4/locales/uz.ts +120 -0
- package/node_modules/zod/src/v4/locales/vi.ts +24 -27
- package/node_modules/zod/src/v4/locales/yo.ts +129 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +25 -27
- package/node_modules/zod/src/v4/locales/zh-TW.ts +22 -27
- package/node_modules/zod/src/v4/mini/checks.ts +1 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +5 -0
- package/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/node_modules/zod/src/v4/mini/external.ts +15 -3
- package/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/node_modules/zod/src/v4/mini/iso.ts +8 -4
- package/node_modules/zod/src/v4/mini/parse.ts +16 -1
- package/node_modules/zod/src/v4/mini/schemas.ts +586 -114
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +57 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +63 -2
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +14 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +582 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +12 -18
- package/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
- package/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +24 -5
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +7 -36
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +281 -6
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +15 -1
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +116 -9
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +1 -1
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +68 -2
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +98 -1
- package/node_modules/zod/src/v4-mini/index.ts +3 -1
- package/node_modules/zod/v3/ZodError.cjs +42 -13
- package/node_modules/zod/v3/ZodError.d.cts +6 -6
- package/node_modules/zod/v3/ZodError.d.ts +6 -6
- package/node_modules/zod/v3/ZodError.js +23 -13
- package/node_modules/zod/v3/errors.cjs +19 -0
- package/node_modules/zod/v3/external.cjs +19 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +20 -1
- package/node_modules/zod/v3/helpers/errorUtil.js +1 -1
- package/node_modules/zod/v3/helpers/parseUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +19 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +19 -0
- package/node_modules/zod/v3/helpers/util.cjs +19 -0
- package/node_modules/zod/v3/index.cjs +19 -0
- package/node_modules/zod/v3/locales/en.cjs +1 -0
- package/node_modules/zod/v3/locales/en.d.cts +1 -1
- package/node_modules/zod/v3/package.json +7 -0
- package/node_modules/zod/v3/standard-schema.cjs +19 -0
- package/node_modules/zod/v3/types.cjs +28 -5
- package/node_modules/zod/v3/types.d.cts +4 -1
- package/node_modules/zod/v3/types.d.ts +4 -1
- package/node_modules/zod/v3/types.js +9 -5
- package/node_modules/zod/v4/classic/checks.cjs +22 -1
- package/node_modules/zod/v4/classic/checks.d.cts +1 -1
- package/node_modules/zod/v4/classic/checks.d.ts +1 -1
- package/node_modules/zod/v4/classic/checks.js +1 -1
- package/node_modules/zod/v4/classic/coerce.cjs +19 -0
- package/node_modules/zod/v4/classic/compat.cjs +24 -1
- package/node_modules/zod/v4/classic/compat.d.cts +13 -11
- package/node_modules/zod/v4/classic/compat.d.ts +13 -11
- package/node_modules/zod/v4/classic/compat.js +4 -0
- package/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/node_modules/zod/v4/classic/errors.cjs +63 -28
- package/node_modules/zod/v4/classic/errors.d.cts +3 -4
- package/node_modules/zod/v4/classic/errors.d.ts +3 -4
- package/node_modules/zod/v4/classic/errors.js +45 -29
- package/node_modules/zod/v4/classic/external.cjs +55 -28
- package/node_modules/zod/v4/classic/external.d.cts +8 -2
- package/node_modules/zod/v4/classic/external.d.ts +8 -2
- package/node_modules/zod/v4/classic/external.js +7 -8
- package/node_modules/zod/v4/classic/from-json-schema.cjs +926 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +881 -0
- package/node_modules/zod/v4/classic/in-out.cjs +82 -0
- package/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/node_modules/zod/v4/classic/in-out.js +36 -0
- package/node_modules/zod/v4/classic/index.cjs +21 -2
- package/node_modules/zod/v4/classic/index.d.cts +1 -2
- package/node_modules/zod/v4/classic/index.d.ts +1 -2
- package/node_modules/zod/v4/classic/index.js +2 -2
- package/node_modules/zod/v4/classic/iso.cjs +30 -22
- package/node_modules/zod/v4/classic/iso.d.cts +2 -17
- package/node_modules/zod/v4/classic/iso.d.ts +2 -17
- package/node_modules/zod/v4/classic/iso.js +2 -17
- package/node_modules/zod/v4/classic/package.json +7 -0
- package/node_modules/zod/v4/classic/parse.cjs +32 -1
- package/node_modules/zod/v4/classic/parse.d.cts +21 -0
- package/node_modules/zod/v4/classic/parse.d.ts +21 -0
- package/node_modules/zod/v4/classic/parse.js +10 -0
- package/node_modules/zod/v4/classic/schemas.cjs +805 -238
- package/node_modules/zod/v4/classic/schemas.d.cts +241 -55
- package/node_modules/zod/v4/classic/schemas.d.ts +241 -55
- package/node_modules/zod/v4/classic/schemas.js +766 -237
- package/node_modules/zod/v4/core/api.cjs +284 -54
- package/node_modules/zod/v4/core/api.d.cts +133 -82
- package/node_modules/zod/v4/core/api.d.ts +133 -82
- package/node_modules/zod/v4/core/api.js +255 -54
- package/node_modules/zod/v4/core/checks.cjs +100 -130
- package/node_modules/zod/v4/core/checks.d.cts +32 -16
- package/node_modules/zod/v4/core/checks.d.ts +32 -16
- package/node_modules/zod/v4/core/checks.js +80 -129
- package/node_modules/zod/v4/core/compile.cjs +1916 -0
- package/node_modules/zod/v4/core/compile.d.cts +65 -0
- package/node_modules/zod/v4/core/compile.d.ts +65 -0
- package/node_modules/zod/v4/core/compile.js +1866 -0
- package/node_modules/zod/v4/core/core.cjs +120 -20
- package/node_modules/zod/v4/core/core.d.cts +40 -7
- package/node_modules/zod/v4/core/core.d.ts +40 -7
- package/node_modules/zod/v4/core/core.js +101 -21
- package/node_modules/zod/v4/core/doc.cjs +31 -9
- package/node_modules/zod/v4/core/doc.d.cts +4 -2
- package/node_modules/zod/v4/core/doc.d.ts +4 -2
- package/node_modules/zod/v4/core/doc.js +12 -9
- package/node_modules/zod/v4/core/errors.cjs +151 -60
- package/node_modules/zod/v4/core/errors.d.cts +41 -24
- package/node_modules/zod/v4/core/errors.d.ts +41 -24
- package/node_modules/zod/v4/core/errors.js +132 -60
- package/node_modules/zod/v4/core/index.cjs +28 -2
- package/node_modules/zod/v4/core/index.d.cts +5 -1
- package/node_modules/zod/v4/core/index.d.ts +5 -1
- package/node_modules/zod/v4/core/index.js +5 -1
- package/node_modules/zod/v4/core/json-schema-generator.cjs +122 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +99 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +929 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +843 -0
- package/node_modules/zod/v4/core/json-schema.cjs +19 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +6 -4
- package/node_modules/zod/v4/core/json-schema.d.ts +6 -4
- package/node_modules/zod/v4/core/memoizer.cjs +360 -0
- package/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/node_modules/zod/v4/core/memoizer.js +311 -0
- package/node_modules/zod/v4/core/package.json +7 -0
- package/node_modules/zod/v4/core/parse.cjs +183 -37
- package/node_modules/zod/v4/core/parse.d.cts +34 -7
- package/node_modules/zod/v4/core/parse.d.ts +34 -7
- package/node_modules/zod/v4/core/parse.js +154 -36
- package/node_modules/zod/v4/core/regexes.cjs +137 -31
- package/node_modules/zod/v4/core/regexes.d.cts +30 -2
- package/node_modules/zod/v4/core/regexes.d.ts +30 -2
- package/node_modules/zod/v4/core/regexes.js +90 -29
- package/node_modules/zod/v4/core/registries.cjs +26 -7
- package/node_modules/zod/v4/core/registries.d.cts +2 -2
- package/node_modules/zod/v4/core/registries.d.ts +2 -2
- package/node_modules/zod/v4/core/registries.js +9 -9
- package/node_modules/zod/v4/core/schemas.cjs +1373 -422
- package/node_modules/zod/v4/core/schemas.d.cts +276 -42
- package/node_modules/zod/v4/core/schemas.d.ts +276 -42
- package/node_modules/zod/v4/core/schemas.js +1341 -422
- package/node_modules/zod/v4/core/standard-schema.cjs +19 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +90 -19
- package/node_modules/zod/v4/core/standard-schema.d.ts +90 -19
- package/node_modules/zod/v4/core/to-json-schema.cjs +628 -801
- package/node_modules/zod/v4/core/to-json-schema.d.cts +103 -37
- package/node_modules/zod/v4/core/to-json-schema.d.ts +103 -37
- package/node_modules/zod/v4/core/to-json-schema.js +602 -800
- package/node_modules/zod/v4/core/util.cjs +580 -155
- package/node_modules/zod/v4/core/util.d.cts +98 -1
- package/node_modules/zod/v4/core/util.d.ts +98 -1
- package/node_modules/zod/v4/core/util.js +536 -156
- package/node_modules/zod/v4/core/versions.cjs +21 -2
- package/node_modules/zod/v4/core/versions.d.cts +1 -1
- package/node_modules/zod/v4/core/versions.d.ts +1 -1
- package/node_modules/zod/v4/core/versions.js +2 -2
- package/node_modules/zod/v4/core/visit.cjs +214 -0
- package/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/node_modules/zod/v4/core/visit.js +169 -0
- package/node_modules/zod/v4/index.cjs +34 -5
- package/node_modules/zod/v4/index.d.cts +2 -2
- package/node_modules/zod/v4/index.d.ts +2 -2
- package/node_modules/zod/v4/index.js +3 -2
- package/node_modules/zod/v4/locales/ar.cjs +20 -24
- package/node_modules/zod/v4/locales/ar.d.cts +2 -1
- package/node_modules/zod/v4/locales/ar.js +19 -24
- package/node_modules/zod/v4/locales/az.cjs +20 -24
- package/node_modules/zod/v4/locales/az.d.cts +2 -1
- package/node_modules/zod/v4/locales/az.js +19 -24
- package/node_modules/zod/v4/locales/be.cjs +29 -24
- package/node_modules/zod/v4/locales/be.d.cts +2 -1
- package/node_modules/zod/v4/locales/be.js +28 -24
- package/node_modules/zod/v4/locales/bg.cjs +152 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +125 -0
- package/node_modules/zod/v4/locales/bn.cjs +140 -0
- package/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/node_modules/zod/v4/locales/bn.js +113 -0
- package/node_modules/zod/v4/locales/ca.cjs +20 -25
- package/node_modules/zod/v4/locales/ca.d.cts +2 -1
- package/node_modules/zod/v4/locales/ca.js +19 -25
- package/node_modules/zod/v4/locales/ckb.cjs +160 -0
- package/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/node_modules/zod/v4/locales/ckb.js +133 -0
- package/node_modules/zod/v4/locales/cs.cjs +24 -42
- package/node_modules/zod/v4/locales/cs.d.cts +2 -1
- package/node_modules/zod/v4/locales/cs.js +23 -42
- package/node_modules/zod/v4/locales/da.cjs +147 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +120 -0
- package/node_modules/zod/v4/locales/de.cjs +22 -24
- package/node_modules/zod/v4/locales/de.d.cts +2 -1
- package/node_modules/zod/v4/locales/de.js +21 -24
- package/node_modules/zod/v4/locales/el.cjs +139 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/node_modules/zod/v4/locales/el.js +112 -0
- package/node_modules/zod/v4/locales/en.cjs +35 -28
- package/node_modules/zod/v4/locales/en.d.cts +2 -2
- package/node_modules/zod/v4/locales/en.d.ts +0 -1
- package/node_modules/zod/v4/locales/en.js +34 -26
- package/node_modules/zod/v4/locales/eo.cjs +23 -26
- package/node_modules/zod/v4/locales/eo.d.cts +2 -2
- package/node_modules/zod/v4/locales/eo.d.ts +0 -1
- package/node_modules/zod/v4/locales/eo.js +22 -24
- package/node_modules/zod/v4/locales/es.cjs +51 -31
- package/node_modules/zod/v4/locales/es.d.cts +2 -1
- package/node_modules/zod/v4/locales/es.js +50 -31
- package/node_modules/zod/v4/locales/fa.cjs +22 -24
- package/node_modules/zod/v4/locales/fa.d.cts +2 -1
- package/node_modules/zod/v4/locales/fa.js +21 -24
- package/node_modules/zod/v4/locales/fi.cjs +20 -24
- package/node_modules/zod/v4/locales/fi.d.cts +2 -1
- package/node_modules/zod/v4/locales/fi.js +19 -24
- package/node_modules/zod/v4/locales/fr-CA.cjs +20 -24
- package/node_modules/zod/v4/locales/fr-CA.d.cts +2 -1
- package/node_modules/zod/v4/locales/fr-CA.js +19 -24
- package/node_modules/zod/v4/locales/fr.cjs +53 -39
- package/node_modules/zod/v4/locales/fr.d.cts +2 -1
- package/node_modules/zod/v4/locales/fr.js +52 -39
- package/node_modules/zod/v4/locales/gu.cjs +140 -0
- package/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/node_modules/zod/v4/locales/gu.js +113 -0
- package/node_modules/zod/v4/locales/he.cjs +183 -78
- package/node_modules/zod/v4/locales/he.d.cts +2 -1
- package/node_modules/zod/v4/locales/he.js +182 -78
- package/node_modules/zod/v4/locales/hi.cjs +138 -0
- package/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/node_modules/zod/v4/locales/hi.js +111 -0
- package/node_modules/zod/v4/locales/hr.cjs +153 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/node_modules/zod/v4/locales/hr.js +126 -0
- package/node_modules/zod/v4/locales/hu.cjs +22 -25
- package/node_modules/zod/v4/locales/hu.d.cts +2 -1
- package/node_modules/zod/v4/locales/hu.js +21 -25
- package/node_modules/zod/v4/locales/hy.cjs +185 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +158 -0
- package/node_modules/zod/v4/locales/id.cjs +20 -24
- package/node_modules/zod/v4/locales/id.d.cts +2 -1
- package/node_modules/zod/v4/locales/id.js +19 -24
- package/node_modules/zod/v4/locales/index.cjs +69 -1
- package/node_modules/zod/v4/locales/index.d.cts +24 -0
- package/node_modules/zod/v4/locales/index.d.ts +24 -0
- package/node_modules/zod/v4/locales/index.js +24 -0
- package/node_modules/zod/v4/locales/is.cjs +141 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +114 -0
- package/node_modules/zod/v4/locales/it.cjs +22 -25
- package/node_modules/zod/v4/locales/it.d.cts +2 -1
- package/node_modules/zod/v4/locales/it.js +21 -25
- package/node_modules/zod/v4/locales/ja.cjs +22 -24
- package/node_modules/zod/v4/locales/ja.d.cts +2 -1
- package/node_modules/zod/v4/locales/ja.js +21 -24
- package/node_modules/zod/v4/locales/ka.cjs +144 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +117 -0
- package/node_modules/zod/v4/locales/kh.cjs +6 -137
- package/node_modules/zod/v4/locales/kh.d.cts +2 -1
- package/node_modules/zod/v4/locales/kh.d.ts +1 -0
- package/node_modules/zod/v4/locales/kh.js +3 -115
- package/node_modules/zod/v4/locales/km.cjs +142 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +115 -0
- package/node_modules/zod/v4/locales/kn.cjs +143 -0
- package/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/node_modules/zod/v4/locales/kn.js +116 -0
- package/node_modules/zod/v4/locales/ko.cjs +20 -24
- package/node_modules/zod/v4/locales/ko.d.cts +2 -1
- package/node_modules/zod/v4/locales/ko.js +19 -24
- package/node_modules/zod/v4/locales/lt.cjs +234 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +207 -0
- package/node_modules/zod/v4/locales/mk.cjs +22 -25
- package/node_modules/zod/v4/locales/mk.d.cts +2 -1
- package/node_modules/zod/v4/locales/mk.js +21 -25
- package/node_modules/zod/v4/locales/ms.cjs +21 -24
- package/node_modules/zod/v4/locales/ms.d.cts +2 -1
- package/node_modules/zod/v4/locales/ms.js +20 -24
- package/node_modules/zod/v4/locales/ne.cjs +138 -0
- package/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/node_modules/zod/v4/locales/ne.js +111 -0
- package/node_modules/zod/v4/locales/nl.cjs +31 -32
- package/node_modules/zod/v4/locales/nl.d.cts +2 -1
- package/node_modules/zod/v4/locales/nl.js +30 -32
- package/node_modules/zod/v4/locales/nn.cjs +140 -0
- package/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/node_modules/zod/v4/locales/nn.js +113 -0
- package/node_modules/zod/v4/locales/no.cjs +24 -26
- package/node_modules/zod/v4/locales/no.d.cts +2 -1
- package/node_modules/zod/v4/locales/no.js +23 -26
- package/node_modules/zod/v4/locales/ota.cjs +23 -25
- package/node_modules/zod/v4/locales/ota.d.cts +2 -1
- package/node_modules/zod/v4/locales/ota.js +22 -25
- package/node_modules/zod/v4/locales/package.json +7 -0
- package/node_modules/zod/v4/locales/pl.cjs +22 -24
- package/node_modules/zod/v4/locales/pl.d.cts +2 -1
- package/node_modules/zod/v4/locales/pl.js +21 -24
- package/node_modules/zod/v4/locales/ps.cjs +22 -24
- package/node_modules/zod/v4/locales/ps.d.cts +2 -1
- package/node_modules/zod/v4/locales/ps.js +21 -24
- package/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
- package/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt-BR.js +143 -0
- package/node_modules/zod/v4/locales/pt.cjs +95 -68
- package/node_modules/zod/v4/locales/pt.d.cts +2 -1
- package/node_modules/zod/v4/locales/pt.js +94 -68
- package/node_modules/zod/v4/locales/ro.cjs +149 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/node_modules/zod/v4/locales/ro.js +122 -0
- package/node_modules/zod/v4/locales/ru.cjs +29 -24
- package/node_modules/zod/v4/locales/ru.d.cts +2 -1
- package/node_modules/zod/v4/locales/ru.js +28 -24
- package/node_modules/zod/v4/locales/sk.cjs +143 -0
- package/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/node_modules/zod/v4/locales/sk.js +116 -0
- package/node_modules/zod/v4/locales/sl.cjs +22 -24
- package/node_modules/zod/v4/locales/sl.d.cts +2 -1
- package/node_modules/zod/v4/locales/sl.js +21 -24
- package/node_modules/zod/v4/locales/sv.cjs +24 -26
- package/node_modules/zod/v4/locales/sv.d.cts +2 -1
- package/node_modules/zod/v4/locales/sv.js +23 -26
- package/node_modules/zod/v4/locales/ta.cjs +23 -24
- package/node_modules/zod/v4/locales/ta.d.cts +2 -1
- package/node_modules/zod/v4/locales/ta.js +22 -24
- package/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/node_modules/zod/v4/locales/tg.js +117 -0
- package/node_modules/zod/v4/locales/th.cjs +23 -24
- package/node_modules/zod/v4/locales/th.d.cts +2 -1
- package/node_modules/zod/v4/locales/th.js +22 -24
- package/node_modules/zod/v4/locales/tk.cjs +134 -0
- package/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/node_modules/zod/v4/locales/tk.js +107 -0
- package/node_modules/zod/v4/locales/tr.cjs +20 -26
- package/node_modules/zod/v4/locales/tr.d.cts +2 -2
- package/node_modules/zod/v4/locales/tr.d.ts +0 -1
- package/node_modules/zod/v4/locales/tr.js +19 -24
- package/node_modules/zod/v4/locales/ua.cjs +6 -137
- package/node_modules/zod/v4/locales/ua.d.cts +2 -1
- package/node_modules/zod/v4/locales/ua.d.ts +1 -0
- package/node_modules/zod/v4/locales/ua.js +3 -115
- package/node_modules/zod/v4/locales/uk.cjs +140 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +113 -0
- package/node_modules/zod/v4/locales/ur.cjs +23 -24
- package/node_modules/zod/v4/locales/ur.d.cts +2 -1
- package/node_modules/zod/v4/locales/ur.js +22 -24
- package/node_modules/zod/v4/locales/uz.cjs +140 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +113 -0
- package/node_modules/zod/v4/locales/vi.cjs +22 -24
- package/node_modules/zod/v4/locales/vi.d.cts +2 -1
- package/node_modules/zod/v4/locales/vi.js +21 -24
- package/node_modules/zod/v4/locales/yo.cjs +139 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +112 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +23 -24
- package/node_modules/zod/v4/locales/zh-CN.d.cts +2 -1
- package/node_modules/zod/v4/locales/zh-CN.js +22 -24
- package/node_modules/zod/v4/locales/zh-TW.cjs +20 -24
- package/node_modules/zod/v4/locales/zh-TW.d.cts +2 -1
- package/node_modules/zod/v4/locales/zh-TW.js +19 -24
- package/node_modules/zod/v4/mini/checks.cjs +21 -1
- package/node_modules/zod/v4/mini/checks.d.cts +1 -1
- package/node_modules/zod/v4/mini/checks.d.ts +1 -1
- package/node_modules/zod/v4/mini/checks.js +1 -1
- package/node_modules/zod/v4/mini/coerce.cjs +24 -0
- package/node_modules/zod/v4/mini/coerce.js +5 -0
- package/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
- package/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/node_modules/zod/v4/mini/external.cjs +36 -3
- package/node_modules/zod/v4/mini/external.d.cts +7 -2
- package/node_modules/zod/v4/mini/external.d.ts +7 -2
- package/node_modules/zod/v4/mini/external.js +4 -1
- package/node_modules/zod/v4/mini/in-out.cjs +82 -0
- package/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/node_modules/zod/v4/mini/in-out.js +36 -0
- package/node_modules/zod/v4/mini/index.cjs +19 -0
- package/node_modules/zod/v4/mini/iso.cjs +27 -4
- package/node_modules/zod/v4/mini/iso.js +8 -4
- package/node_modules/zod/v4/mini/package.json +7 -0
- package/node_modules/zod/v4/mini/parse.cjs +30 -1
- package/node_modules/zod/v4/mini/parse.d.cts +1 -1
- package/node_modules/zod/v4/mini/parse.d.ts +1 -1
- package/node_modules/zod/v4/mini/parse.js +1 -1
- package/node_modules/zod/v4/mini/schemas.cjs +390 -82
- package/node_modules/zod/v4/mini/schemas.d.cts +156 -32
- package/node_modules/zod/v4/mini/schemas.d.ts +156 -32
- package/node_modules/zod/v4/mini/schemas.js +329 -59
- package/node_modules/zod/v4/package.json +7 -0
- package/node_modules/zod/v4-mini/index.cjs +35 -1
- package/node_modules/zod/v4-mini/index.d.cts +3 -1
- package/node_modules/zod/v4-mini/index.d.ts +3 -1
- package/node_modules/zod/v4-mini/index.js +3 -1
- package/node_modules/zod/v4-mini/package.json +7 -0
- package/package.json +6 -3
- package/node_modules/zod/src/v4/core/config.ts +0 -15
- package/node_modules/zod/src/v4/core/function.ts +0 -176
- package/node_modules/zod/v4/core/function.cjs +0 -102
- package/node_modules/zod/v4/core/function.d.cts +0 -52
- package/node_modules/zod/v4/core/function.d.ts +0 -52
- package/node_modules/zod/v4/core/function.js +0 -75
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { expect, expectTypeOf, test } from "vitest";
|
|
2
|
-
import * as z from "zod/
|
|
2
|
+
import * as z from "zod/mini";
|
|
3
3
|
|
|
4
4
|
test("z.object", () => {
|
|
5
5
|
const a = z.object({
|
|
@@ -17,7 +17,7 @@ test("z.object", () => {
|
|
|
17
17
|
expectTypeOf<a>().toEqualTypeOf<{
|
|
18
18
|
name: string;
|
|
19
19
|
age: number;
|
|
20
|
-
points?: number;
|
|
20
|
+
points?: number | undefined;
|
|
21
21
|
"test?": boolean;
|
|
22
22
|
}>();
|
|
23
23
|
expect(z.parse(a, { name: "john", age: 30, "test?": true })).toEqual({
|
|
@@ -89,6 +89,12 @@ test("z.keyof", () => {
|
|
|
89
89
|
type UserKeys = z.infer<typeof userKeysSchema>;
|
|
90
90
|
expectTypeOf<UserKeys>().toEqualTypeOf<"name" | "age" | "email">();
|
|
91
91
|
expect(userKeysSchema).toBeDefined();
|
|
92
|
+
expect(userKeysSchema._zod.def.type).toBe("enum");
|
|
93
|
+
expect(userKeysSchema._zod.def.entries).toEqual({
|
|
94
|
+
name: "name",
|
|
95
|
+
age: "age",
|
|
96
|
+
email: "email",
|
|
97
|
+
});
|
|
92
98
|
expect(z.safeParse(userKeysSchema, "name").success).toBe(true);
|
|
93
99
|
expect(z.safeParse(userKeysSchema, "age").success).toBe(true);
|
|
94
100
|
expect(z.safeParse(userKeysSchema, "email").success).toBe(true);
|
|
@@ -103,17 +109,47 @@ test("z.extend", () => {
|
|
|
103
109
|
expectTypeOf<ExtendedUser>().toEqualTypeOf<{
|
|
104
110
|
name: string;
|
|
105
111
|
age: number;
|
|
106
|
-
email?: string;
|
|
112
|
+
email?: string | undefined;
|
|
107
113
|
isAdmin: boolean;
|
|
108
114
|
}>();
|
|
109
115
|
expect(extendedSchema).toBeDefined();
|
|
110
116
|
expect(z.safeParse(extendedSchema, { name: "John", age: 30, isAdmin: true }).success).toBe(true);
|
|
111
117
|
});
|
|
112
118
|
|
|
119
|
+
test("z.merge", () => {
|
|
120
|
+
const mergedSchema = z.merge(userSchema, z.object({ isAdmin: z.boolean() }));
|
|
121
|
+
type MergedUser = z.infer<typeof mergedSchema>;
|
|
122
|
+
expectTypeOf<MergedUser>().toEqualTypeOf<{
|
|
123
|
+
name: string;
|
|
124
|
+
age: number;
|
|
125
|
+
email?: string | undefined;
|
|
126
|
+
isAdmin: boolean;
|
|
127
|
+
}>();
|
|
128
|
+
expect(z.safeParse(mergedSchema, { name: "John", age: 30, isAdmin: true }).success).toBe(true);
|
|
129
|
+
|
|
130
|
+
// the second schema's catchall wins, matching classic
|
|
131
|
+
const strict = z.merge(userSchema, z.strictObject({ isAdmin: z.boolean() }));
|
|
132
|
+
expect(z.safeParse(strict, { name: "John", age: 30, isAdmin: true, extra: 1 }).success).toBe(false);
|
|
133
|
+
|
|
134
|
+
expect(() =>
|
|
135
|
+
// @ts-expect-error second argument is a schema, not a shape
|
|
136
|
+
z.merge(userSchema, { isAdmin: z.boolean() })
|
|
137
|
+
).toThrow("Invalid input to merge");
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
test("z.safeExtend", () => {
|
|
141
|
+
const extended = z.safeExtend(userSchema, { name: z.string() });
|
|
142
|
+
expect(z.safeParse(extended, { name: "John", age: 30 }).success).toBe(true);
|
|
143
|
+
type Extended = z.infer<typeof extended>;
|
|
144
|
+
expectTypeOf<Extended>().toEqualTypeOf<{ name: string; age: number; email?: string | undefined }>();
|
|
145
|
+
// @ts-expect-error
|
|
146
|
+
z.safeExtend(userSchema, { name: z.number() });
|
|
147
|
+
});
|
|
148
|
+
|
|
113
149
|
test("z.pick", () => {
|
|
114
150
|
const pickedSchema = z.pick(userSchema, { name: true, email: true });
|
|
115
151
|
type PickedUser = z.infer<typeof pickedSchema>;
|
|
116
|
-
expectTypeOf<PickedUser>().toEqualTypeOf<{ name: string; email?: string }>();
|
|
152
|
+
expectTypeOf<PickedUser>().toEqualTypeOf<{ name: string; email?: string | undefined }>();
|
|
117
153
|
expect(pickedSchema).toBeDefined();
|
|
118
154
|
expect(z.safeParse(pickedSchema, { name: "John", email: "john@example.com" }).success).toBe(true);
|
|
119
155
|
});
|
|
@@ -134,9 +170,9 @@ test("z.partial", () => {
|
|
|
134
170
|
const partialSchema = z.partial(userSchema);
|
|
135
171
|
type PartialUser = z.infer<typeof partialSchema>;
|
|
136
172
|
expectTypeOf<PartialUser>().toEqualTypeOf<{
|
|
137
|
-
name?: string;
|
|
138
|
-
age?: number;
|
|
139
|
-
email?: string;
|
|
173
|
+
name?: string | undefined;
|
|
174
|
+
age?: number | undefined;
|
|
175
|
+
email?: string | undefined;
|
|
140
176
|
}>();
|
|
141
177
|
expect(z.safeParse(partialSchema, { name: "John" }).success).toBe(true);
|
|
142
178
|
});
|
|
@@ -145,14 +181,85 @@ test("z.partial with mask", () => {
|
|
|
145
181
|
const partialSchemaWithMask = z.partial(userSchema, { name: true });
|
|
146
182
|
type PartialUserWithMask = z.infer<typeof partialSchemaWithMask>;
|
|
147
183
|
expectTypeOf<PartialUserWithMask>().toEqualTypeOf<{
|
|
148
|
-
name?: string;
|
|
184
|
+
name?: string | undefined;
|
|
149
185
|
age: number;
|
|
150
|
-
email?: string;
|
|
186
|
+
email?: string | undefined;
|
|
151
187
|
}>();
|
|
152
188
|
expect(z.safeParse(partialSchemaWithMask, { age: 30 }).success).toBe(true);
|
|
153
189
|
expect(z.safeParse(partialSchemaWithMask, { name: "John" }).success).toBe(false);
|
|
154
190
|
});
|
|
155
191
|
|
|
192
|
+
test("z.exactPartial", () => {
|
|
193
|
+
const partialSchema = z.exactPartial(userSchema);
|
|
194
|
+
type PartialUser = z.infer<typeof partialSchema>;
|
|
195
|
+
expectTypeOf<PartialUser>().toEqualTypeOf<{
|
|
196
|
+
name?: string;
|
|
197
|
+
age?: number;
|
|
198
|
+
email?: string | undefined;
|
|
199
|
+
}>();
|
|
200
|
+
expect(z.safeParse(partialSchema, { name: "John" }).success).toBe(true);
|
|
201
|
+
expect(z.safeParse(partialSchema, {}).success).toBe(true);
|
|
202
|
+
expect(z.safeParse(partialSchema, { name: undefined }).success).toBe(false);
|
|
203
|
+
expect(z.safeParse(partialSchema, { email: undefined }).success).toBe(true);
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
test("z.exactPartial with mask", () => {
|
|
207
|
+
const partialSchemaWithMask = z.exactPartial(userSchema, { name: true });
|
|
208
|
+
type PartialUserWithMask = z.infer<typeof partialSchemaWithMask>;
|
|
209
|
+
expectTypeOf<PartialUserWithMask>().toEqualTypeOf<{
|
|
210
|
+
name?: string;
|
|
211
|
+
age: number;
|
|
212
|
+
email?: string | undefined;
|
|
213
|
+
}>();
|
|
214
|
+
expect(z.safeParse(partialSchemaWithMask, { age: 30 }).success).toBe(true);
|
|
215
|
+
expect(z.safeParse(partialSchemaWithMask, { age: 30, name: undefined }).success).toBe(false);
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
test("z.required", () => {
|
|
219
|
+
const requiredSchema = z.required(userSchema);
|
|
220
|
+
type RequiredUser = z.infer<typeof requiredSchema>;
|
|
221
|
+
expectTypeOf<RequiredUser>().toEqualTypeOf<{ name: string; age: number; email: string }>();
|
|
222
|
+
expect(requiredSchema.shape.email).toBeInstanceOf(z.ZodMiniNonOptional);
|
|
223
|
+
expect(z.safeParse(requiredSchema, { name: "John", age: 30 }).success).toBe(false);
|
|
224
|
+
expect(z.safeParse(requiredSchema, { name: "John", age: 30, email: "john@example.com" }).success).toBe(true);
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
test("z.required with mask", () => {
|
|
228
|
+
const schema = z.object({ name: z.optional(z.string()), age: z.optional(z.number()) });
|
|
229
|
+
const requiredSchemaWithMask = z.required(schema, { name: true });
|
|
230
|
+
type RequiredWithMask = z.infer<typeof requiredSchemaWithMask>;
|
|
231
|
+
expectTypeOf<RequiredWithMask>().toEqualTypeOf<{ name: string; age?: number | undefined }>();
|
|
232
|
+
expect(requiredSchemaWithMask.shape.name).toBeInstanceOf(z.ZodMiniNonOptional);
|
|
233
|
+
expect(requiredSchemaWithMask.shape.age).toBeInstanceOf(z.ZodMiniOptional);
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
test("z.pick/omit/partial/required - do not allow unknown keys", () => {
|
|
237
|
+
const schema = z.object({
|
|
238
|
+
name: z.string(),
|
|
239
|
+
age: z.number(),
|
|
240
|
+
});
|
|
241
|
+
|
|
242
|
+
// Mixed valid + invalid keys - throws at parse time (lazy evaluation)
|
|
243
|
+
// @ts-expect-error
|
|
244
|
+
expect(() => z.parse(z.pick(schema, { name: true, asdf: true }), {})).toThrow();
|
|
245
|
+
// @ts-expect-error
|
|
246
|
+
expect(() => z.parse(z.omit(schema, { name: true, asdf: true }), {})).toThrow();
|
|
247
|
+
// @ts-expect-error
|
|
248
|
+
expect(() => z.parse(z.partial(schema, { name: true, asdf: true }), {})).toThrow();
|
|
249
|
+
// @ts-expect-error
|
|
250
|
+
expect(() => z.parse(z.required(schema, { name: true, asdf: true }), {})).toThrow();
|
|
251
|
+
|
|
252
|
+
// Only invalid keys
|
|
253
|
+
// @ts-expect-error
|
|
254
|
+
expect(() => z.parse(z.pick(schema, { $unknown: true }), {})).toThrow();
|
|
255
|
+
// @ts-expect-error
|
|
256
|
+
expect(() => z.parse(z.omit(schema, { $unknown: true }), {})).toThrow();
|
|
257
|
+
// @ts-expect-error
|
|
258
|
+
expect(() => z.parse(z.partial(schema, { $unknown: true }), {})).toThrow();
|
|
259
|
+
// @ts-expect-error
|
|
260
|
+
expect(() => z.parse(z.required(schema, { $unknown: true }), {})).toThrow();
|
|
261
|
+
});
|
|
262
|
+
|
|
156
263
|
test("z.catchall", () => {
|
|
157
264
|
// z.catchall()
|
|
158
265
|
const schema = z.catchall(
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
import { expect, expectTypeOf, test } from "vitest";
|
|
2
|
-
import { z } from "zod/
|
|
2
|
+
import { z } from "zod/mini";
|
|
3
|
+
|
|
4
|
+
test("recursive object schema type aliases", () => {
|
|
5
|
+
type ObjectField = z.ZodMiniObject<{ [k: string]: ObjectField }>;
|
|
6
|
+
type Field = z.ZodMiniString<string> | z.ZodMiniObject<{ [k: string]: Field }>;
|
|
7
|
+
type ObjectValue = { [k: string]: ObjectValue };
|
|
8
|
+
type Value = string | { [k: string]: Value };
|
|
9
|
+
expectTypeOf<z.input<ObjectField>>().toEqualTypeOf<ObjectValue>();
|
|
10
|
+
expectTypeOf<z.output<ObjectField>>().toEqualTypeOf<ObjectValue>();
|
|
11
|
+
expectTypeOf<keyof z.input<ObjectField>>().toEqualTypeOf<string>();
|
|
12
|
+
expectTypeOf<keyof z.output<ObjectField>>().toEqualTypeOf<string>();
|
|
13
|
+
expectTypeOf<z.input<Field>>().toEqualTypeOf<Value>();
|
|
14
|
+
expectTypeOf<z.output<Field>>().toEqualTypeOf<Value>();
|
|
15
|
+
const schema: Field = z.object({ nested: z.object({ name: z.string() }) });
|
|
16
|
+
expect(schema.parse({ nested: { name: "a", extra: true } })).toEqual({ nested: { name: "a" } });
|
|
17
|
+
expect(schema.safeParse({ nested: { name: 123 } }).success).toBe(false);
|
|
18
|
+
});
|
|
3
19
|
|
|
4
20
|
test("recursion with z.lazy", () => {
|
|
5
21
|
const data = {
|
|
@@ -33,7 +49,7 @@ test("recursion with z.lazy", () => {
|
|
|
33
49
|
type Category = z.infer<typeof Category>;
|
|
34
50
|
interface _Category {
|
|
35
51
|
name: string;
|
|
36
|
-
subcategories?: _Category[];
|
|
52
|
+
subcategories?: _Category[] | undefined;
|
|
37
53
|
}
|
|
38
54
|
expectTypeOf<Category>().toEqualTypeOf<_Category>();
|
|
39
55
|
});
|
|
@@ -273,3 +289,53 @@ test("recursion compatibility", () => {
|
|
|
273
289
|
},
|
|
274
290
|
});
|
|
275
291
|
});
|
|
292
|
+
|
|
293
|
+
test("shape stays writeable through object/strictObject/looseObject/extend with getters", () => {
|
|
294
|
+
const Cat = z.object({
|
|
295
|
+
name: z.string(),
|
|
296
|
+
get sub(): z.ZodMiniArray<typeof Cat> {
|
|
297
|
+
return z.array(Cat);
|
|
298
|
+
},
|
|
299
|
+
});
|
|
300
|
+
type CatShape = (typeof Cat)["shape"];
|
|
301
|
+
expectTypeOf<CatShape>().toEqualTypeOf<{
|
|
302
|
+
name: z.ZodMiniString<string>;
|
|
303
|
+
sub: z.ZodMiniArray<typeof Cat>;
|
|
304
|
+
}>();
|
|
305
|
+
|
|
306
|
+
const StrictCat = z.strictObject({
|
|
307
|
+
name: z.string(),
|
|
308
|
+
get sub(): z.ZodMiniArray<typeof StrictCat> {
|
|
309
|
+
return z.array(StrictCat);
|
|
310
|
+
},
|
|
311
|
+
});
|
|
312
|
+
type StrictShape = (typeof StrictCat)["shape"];
|
|
313
|
+
expectTypeOf<StrictShape>().toEqualTypeOf<{
|
|
314
|
+
name: z.ZodMiniString<string>;
|
|
315
|
+
sub: z.ZodMiniArray<typeof StrictCat>;
|
|
316
|
+
}>();
|
|
317
|
+
|
|
318
|
+
const LooseCat = z.looseObject({
|
|
319
|
+
name: z.string(),
|
|
320
|
+
get sub(): z.ZodMiniArray<typeof LooseCat> {
|
|
321
|
+
return z.array(LooseCat);
|
|
322
|
+
},
|
|
323
|
+
});
|
|
324
|
+
type LooseShape = (typeof LooseCat)["shape"];
|
|
325
|
+
expectTypeOf<LooseShape>().toEqualTypeOf<{
|
|
326
|
+
name: z.ZodMiniString<string>;
|
|
327
|
+
sub: z.ZodMiniArray<typeof LooseCat>;
|
|
328
|
+
}>();
|
|
329
|
+
|
|
330
|
+
const Base = z.object({ name: z.string() });
|
|
331
|
+
const Extended = z.extend(Base, {
|
|
332
|
+
get sub(): z.ZodMiniArray<typeof Extended> {
|
|
333
|
+
return z.array(Extended);
|
|
334
|
+
},
|
|
335
|
+
});
|
|
336
|
+
type ExtendedShape = (typeof Extended)["shape"];
|
|
337
|
+
expectTypeOf<ExtendedShape>().toEqualTypeOf<{
|
|
338
|
+
name: z.ZodMiniString<string>;
|
|
339
|
+
sub: z.ZodMiniArray<typeof Extended>;
|
|
340
|
+
}>();
|
|
341
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { expect, test } from "vitest";
|
|
2
|
+
import type { StandardSchemaWithJSON } from "../../core/standard-schema.js";
|
|
3
|
+
import * as z from "../index.js";
|
|
4
|
+
|
|
5
|
+
function acceptSchema(schema: StandardSchemaWithJSON) {
|
|
6
|
+
return schema;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
test("Zod Mini schemas are NOT assignable to StandardJSONSchema", () => {
|
|
10
|
+
const schema = z.string();
|
|
11
|
+
|
|
12
|
+
// @ts-expect-error
|
|
13
|
+
const _standard: StandardSchemaWithJSON["~standard"] = schema;
|
|
14
|
+
|
|
15
|
+
// @ts-expect-error
|
|
16
|
+
acceptSchema(schema);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
test("toJSONSchema result ~standard.jsonSchema works with objects", () => {
|
|
20
|
+
const schema = z.object({
|
|
21
|
+
firstName: z.string(),
|
|
22
|
+
lastName: z.string(),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const jsonSchema = z.toJSONSchema(schema);
|
|
26
|
+
|
|
27
|
+
// Call ~standard.jsonSchema.input - this should not throw
|
|
28
|
+
const inputSchema = jsonSchema["~standard"].jsonSchema.input({ target: "draft-07" });
|
|
29
|
+
|
|
30
|
+
expect(inputSchema).toMatchObject({
|
|
31
|
+
type: "object",
|
|
32
|
+
properties: {
|
|
33
|
+
firstName: { type: "string" },
|
|
34
|
+
lastName: { type: "string" },
|
|
35
|
+
},
|
|
36
|
+
required: ["firstName", "lastName"],
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// Call ~standard.jsonSchema.output - this should not throw
|
|
40
|
+
const outputSchema = jsonSchema["~standard"].jsonSchema.output({ target: "draft-07" });
|
|
41
|
+
|
|
42
|
+
expect(outputSchema).toMatchObject({
|
|
43
|
+
type: "object",
|
|
44
|
+
properties: {
|
|
45
|
+
firstName: { type: "string" },
|
|
46
|
+
lastName: { type: "string" },
|
|
47
|
+
},
|
|
48
|
+
required: ["firstName", "lastName"],
|
|
49
|
+
});
|
|
50
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { expect, expectTypeOf, test } from "vitest";
|
|
2
|
-
import * as z from "zod/
|
|
2
|
+
import * as z from "zod/mini";
|
|
3
3
|
|
|
4
4
|
const FAIL = { success: false };
|
|
5
5
|
|
|
@@ -177,6 +177,13 @@ test("z.nanoid", () => {
|
|
|
177
177
|
expect(() => z.parse(a, "abc")).toThrow();
|
|
178
178
|
});
|
|
179
179
|
|
|
180
|
+
test("z.nanoid custom length", () => {
|
|
181
|
+
const a = z.nanoid({ length: 64 });
|
|
182
|
+
const id = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
183
|
+
expect(z.parse(a, id)).toEqual(id);
|
|
184
|
+
expect(() => z.parse(a, "8FHZpIxleEK3axQRBNNjN")).toThrow();
|
|
185
|
+
});
|
|
186
|
+
|
|
180
187
|
test("z.cuid", () => {
|
|
181
188
|
const a = z.cuid();
|
|
182
189
|
expect(z.parse(a, "cixs7y0c0000f7x3b1z6m3w6r")).toEqual("cixs7y0c0000f7x3b1z6m3w6r");
|
|
@@ -241,6 +248,38 @@ test("z.ipv6", () => {
|
|
|
241
248
|
expect(() => z.parse(a, 123)).toThrow();
|
|
242
249
|
});
|
|
243
250
|
|
|
251
|
+
test("z.mac", () => {
|
|
252
|
+
const a = z.mac();
|
|
253
|
+
// valid mac
|
|
254
|
+
expect(z.parse(a, "00:1A:2B:3C:4D:5E")).toEqual("00:1A:2B:3C:4D:5E");
|
|
255
|
+
// invalid mac (dash delimiter not accepted by default)
|
|
256
|
+
expect(() => z.parse(a, "01-23-45-67-89-AB")).toThrow();
|
|
257
|
+
expect(() => z.parse(a, "00:1A:2B::4D:5E")).toThrow();
|
|
258
|
+
expect(() => z.parse(a, "00:1a-2B:3c-4D:5e")).toThrow();
|
|
259
|
+
expect(() => z.parse(a, "hello")).toThrow();
|
|
260
|
+
// wrong type
|
|
261
|
+
expect(() => z.parse(a, 123)).toThrow();
|
|
262
|
+
});
|
|
263
|
+
|
|
264
|
+
test("z.mac with custom delimiter", () => {
|
|
265
|
+
const a = z.mac({ delimiter: ":" });
|
|
266
|
+
// valid mac with colon
|
|
267
|
+
expect(z.parse(a, "00:1A:2B:3C:4D:5E")).toEqual("00:1A:2B:3C:4D:5E");
|
|
268
|
+
// invalid mac with dash
|
|
269
|
+
expect(() => z.parse(a, "00-1A-2B-3C-4D-5E")).toThrow();
|
|
270
|
+
|
|
271
|
+
const b = z.mac({ delimiter: "-" });
|
|
272
|
+
// valid mac with dash
|
|
273
|
+
expect(z.parse(b, "00-1A-2B-3C-4D-5E")).toEqual("00-1A-2B-3C-4D-5E");
|
|
274
|
+
// invalid mac with colon
|
|
275
|
+
expect(() => z.parse(b, "00:1A:2B:3C:4D:5E")).toThrow();
|
|
276
|
+
|
|
277
|
+
const c = z.mac({ delimiter: ":" });
|
|
278
|
+
// colon-only mac
|
|
279
|
+
expect(z.parse(c, "00:1A:2B:3C:4D:5E")).toEqual("00:1A:2B:3C:4D:5E");
|
|
280
|
+
expect(() => z.parse(c, "00-1A-2B-3C-4D-5E")).toThrow();
|
|
281
|
+
});
|
|
282
|
+
|
|
244
283
|
test("z.base64", () => {
|
|
245
284
|
const a = z.base64();
|
|
246
285
|
// valid base64
|
|
@@ -250,6 +289,11 @@ test("z.base64", () => {
|
|
|
250
289
|
expect(() => z.parse(a, "SGVsbG8gd29ybGQ")).toThrow();
|
|
251
290
|
expect(() => z.parse(a, "U29tZSBvdGhlciBzdHJpbmc")).toThrow();
|
|
252
291
|
expect(() => z.parse(a, "hello")).toThrow();
|
|
292
|
+
// whitespace is not allowed (atob would otherwise strip it)
|
|
293
|
+
expect(() => z.parse(a, "123 ")).toThrow();
|
|
294
|
+
expect(() => z.parse(a, "SGVsbG8gd29ybGQ= ")).toThrow();
|
|
295
|
+
expect(() => z.parse(a, "SGVsbG8gd29ybGQ=\n")).toThrow();
|
|
296
|
+
expect(() => z.parse(a, "SGVs bG8gd29ybGQ=")).toThrow();
|
|
253
297
|
// wrong type
|
|
254
298
|
expect(() => z.parse(a, 123)).toThrow();
|
|
255
299
|
});
|
|
@@ -280,6 +324,36 @@ test("z.e164", () => {
|
|
|
280
324
|
expect(() => z.parse(a, 123)).toThrow();
|
|
281
325
|
});
|
|
282
326
|
|
|
327
|
+
test("z.creditCard", () => {
|
|
328
|
+
const a = z.creditCard();
|
|
329
|
+
// valid credit card
|
|
330
|
+
expect(z.parse(a, "4111111111111111")).toEqual("4111111111111111");
|
|
331
|
+
expect(z.parse(a, "4111 1111 1111 1111")).toEqual("4111 1111 1111 1111");
|
|
332
|
+
// failed Luhn checksum
|
|
333
|
+
expect(() => z.parse(a, "4111111111111112")).toThrow();
|
|
334
|
+
// outside the 12-19 digit range
|
|
335
|
+
expect(() => z.parse(a, "40000000006")).toThrow();
|
|
336
|
+
expect(() => z.parse(a, "hello")).toThrow();
|
|
337
|
+
// wrong type
|
|
338
|
+
expect(() => z.parse(a, 123)).toThrow();
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
test("z.iban", () => {
|
|
342
|
+
const a = z.iban();
|
|
343
|
+
// valid iban
|
|
344
|
+
expect(z.parse(a, "DE89370400440532013000")).toEqual("DE89370400440532013000");
|
|
345
|
+
expect(z.parse(a, "NO9386011117947")).toEqual("NO9386011117947");
|
|
346
|
+
// failed mod 97 checksum
|
|
347
|
+
expect(() => z.parse(a, "DE89370400440532013001")).toThrow();
|
|
348
|
+
// formatting violations
|
|
349
|
+
expect(() => z.parse(a, "de89370400440532013000")).toThrow();
|
|
350
|
+
expect(() => z.parse(a, "DE89 3704 0044 0532 0130 00")).toThrow();
|
|
351
|
+
expect(() => z.parse(a, "NO938601111794")).toThrow();
|
|
352
|
+
expect(() => z.parse(a, "hello")).toThrow();
|
|
353
|
+
// wrong type
|
|
354
|
+
expect(() => z.parse(a, 123)).toThrow();
|
|
355
|
+
});
|
|
356
|
+
|
|
283
357
|
test("z.jwt", () => {
|
|
284
358
|
const a = z.jwt();
|
|
285
359
|
// valid jwt
|
|
@@ -297,3 +371,26 @@ test("z.jwt", () => {
|
|
|
297
371
|
// wrong type
|
|
298
372
|
expect(() => z.parse(a, 123)).toThrow();
|
|
299
373
|
});
|
|
374
|
+
|
|
375
|
+
test("z.hash generic format", () => {
|
|
376
|
+
expect(z.hash("sha256").parse("a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3")).toBe(
|
|
377
|
+
"a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3"
|
|
378
|
+
);
|
|
379
|
+
|
|
380
|
+
// --- Type-level checks (ensure the literal format string is encoded in the return type)
|
|
381
|
+
expectTypeOf(z.hash("md5")).toEqualTypeOf<z.ZodMiniCustomStringFormat<"md5_hex">>();
|
|
382
|
+
expectTypeOf(z.hash("sha1")).toEqualTypeOf<z.ZodMiniCustomStringFormat<"sha1_hex">>();
|
|
383
|
+
expectTypeOf(z.hash("sha256", { enc: "base64" as const })).toEqualTypeOf<
|
|
384
|
+
z.ZodMiniCustomStringFormat<"sha256_base64">
|
|
385
|
+
>();
|
|
386
|
+
expectTypeOf(z.hash("sha384", { enc: "base64url" as const })).toEqualTypeOf<
|
|
387
|
+
z.ZodMiniCustomStringFormat<"sha384_base64url">
|
|
388
|
+
>();
|
|
389
|
+
});
|
|
390
|
+
|
|
391
|
+
test("z.currencyCode", () => {
|
|
392
|
+
const a = z.currencyCode();
|
|
393
|
+
expectTypeOf(a).toEqualTypeOf<z.ZodMiniCustomStringFormat<"currency_code">>();
|
|
394
|
+
expect(z.parse(a, "EUR")).toBe("EUR");
|
|
395
|
+
expect(z.safeParse(a, "eur")).toMatchObject(FAIL);
|
|
396
|
+
});
|
|
@@ -75,21 +75,31 @@ class ZodError extends Error {
|
|
|
75
75
|
while (i < issue.path.length) {
|
|
76
76
|
const el = issue.path[i];
|
|
77
77
|
const terminal = i === issue.path.length - 1;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
// errorArray._errors = [];
|
|
85
|
-
// curr[el] = curr[el] || errorArray;
|
|
86
|
-
// }
|
|
78
|
+
// `_errors` is reserved by this legacy format, so merge a matching path segment into the current node instead of treating its array as a child.
|
|
79
|
+
if (el === "_errors") {
|
|
80
|
+
if (terminal)
|
|
81
|
+
curr._errors.push(mapper(issue));
|
|
82
|
+
i++;
|
|
83
|
+
continue;
|
|
87
84
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
// Create `el` as an own data property. A segment naming an inherited member ("toString", "constructor") would otherwise read through to the prototype, and assigning "__proto__" would hit the setter and walk into Object.prototype.
|
|
86
|
+
if (!Object.prototype.hasOwnProperty.call(curr, el)) {
|
|
87
|
+
if (el === "__proto__") {
|
|
88
|
+
Object.defineProperty(curr, el, {
|
|
89
|
+
value: { _errors: [] },
|
|
90
|
+
writable: true,
|
|
91
|
+
enumerable: true,
|
|
92
|
+
configurable: true,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
curr[el] = { _errors: [] };
|
|
97
|
+
}
|
|
91
98
|
}
|
|
92
99
|
curr = curr[el];
|
|
100
|
+
if (terminal) {
|
|
101
|
+
curr._errors.push(mapper(issue));
|
|
102
|
+
}
|
|
93
103
|
i++;
|
|
94
104
|
}
|
|
95
105
|
}
|
|
@@ -113,7 +123,7 @@ class ZodError extends Error {
|
|
|
113
123
|
return this.issues.length === 0;
|
|
114
124
|
}
|
|
115
125
|
flatten(mapper = (issue) => issue.message) {
|
|
116
|
-
const fieldErrors =
|
|
126
|
+
const fieldErrors = Object.create(null);
|
|
117
127
|
const formErrors = [];
|
|
118
128
|
for (const sub of this.issues) {
|
|
119
129
|
if (sub.path.length > 0) {
|
|
@@ -136,3 +146,22 @@ ZodError.create = (issues) => {
|
|
|
136
146
|
const error = new ZodError(issues);
|
|
137
147
|
return error;
|
|
138
148
|
};
|
|
149
|
+
|
|
150
|
+
// seal-cjs-exports
|
|
151
|
+
(function () {
|
|
152
|
+
var keys = Object.getOwnPropertyNames(exports);
|
|
153
|
+
for (var i = 0; i < keys.length; i++) {
|
|
154
|
+
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
|
|
155
|
+
if (!desc || !desc.get || !desc.configurable) continue;
|
|
156
|
+
var value;
|
|
157
|
+
try {
|
|
158
|
+
value = desc.get();
|
|
159
|
+
} catch (e) {
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
// a circular require may not have settled this one yet, so leave it live
|
|
163
|
+
if (value === undefined) continue;
|
|
164
|
+
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
|
|
165
|
+
}
|
|
166
|
+
Object.freeze(exports);
|
|
167
|
+
})();
|
|
@@ -11,20 +11,20 @@ export type typeToFlattenedError<T, U = string> = {
|
|
|
11
11
|
};
|
|
12
12
|
export declare const ZodIssueCode: {
|
|
13
13
|
invalid_type: "invalid_type";
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
too_big: "too_big";
|
|
15
|
+
too_small: "too_small";
|
|
16
|
+
not_multiple_of: "not_multiple_of";
|
|
17
|
+
unrecognized_keys: "unrecognized_keys";
|
|
16
18
|
invalid_union: "invalid_union";
|
|
19
|
+
custom: "custom";
|
|
20
|
+
invalid_literal: "invalid_literal";
|
|
17
21
|
invalid_union_discriminator: "invalid_union_discriminator";
|
|
18
22
|
invalid_enum_value: "invalid_enum_value";
|
|
19
|
-
unrecognized_keys: "unrecognized_keys";
|
|
20
23
|
invalid_arguments: "invalid_arguments";
|
|
21
24
|
invalid_return_type: "invalid_return_type";
|
|
22
25
|
invalid_date: "invalid_date";
|
|
23
26
|
invalid_string: "invalid_string";
|
|
24
|
-
too_small: "too_small";
|
|
25
|
-
too_big: "too_big";
|
|
26
27
|
invalid_intersection_types: "invalid_intersection_types";
|
|
27
|
-
not_multiple_of: "not_multiple_of";
|
|
28
28
|
not_finite: "not_finite";
|
|
29
29
|
};
|
|
30
30
|
export type ZodIssueCode = keyof typeof ZodIssueCode;
|
|
@@ -11,20 +11,20 @@ export type typeToFlattenedError<T, U = string> = {
|
|
|
11
11
|
};
|
|
12
12
|
export declare const ZodIssueCode: {
|
|
13
13
|
invalid_type: "invalid_type";
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
too_big: "too_big";
|
|
15
|
+
too_small: "too_small";
|
|
16
|
+
not_multiple_of: "not_multiple_of";
|
|
17
|
+
unrecognized_keys: "unrecognized_keys";
|
|
16
18
|
invalid_union: "invalid_union";
|
|
19
|
+
custom: "custom";
|
|
20
|
+
invalid_literal: "invalid_literal";
|
|
17
21
|
invalid_union_discriminator: "invalid_union_discriminator";
|
|
18
22
|
invalid_enum_value: "invalid_enum_value";
|
|
19
|
-
unrecognized_keys: "unrecognized_keys";
|
|
20
23
|
invalid_arguments: "invalid_arguments";
|
|
21
24
|
invalid_return_type: "invalid_return_type";
|
|
22
25
|
invalid_date: "invalid_date";
|
|
23
26
|
invalid_string: "invalid_string";
|
|
24
|
-
too_small: "too_small";
|
|
25
|
-
too_big: "too_big";
|
|
26
27
|
invalid_intersection_types: "invalid_intersection_types";
|
|
27
|
-
not_multiple_of: "not_multiple_of";
|
|
28
28
|
not_finite: "not_finite";
|
|
29
29
|
};
|
|
30
30
|
export type ZodIssueCode = keyof typeof ZodIssueCode;
|
|
@@ -71,21 +71,31 @@ export class ZodError extends Error {
|
|
|
71
71
|
while (i < issue.path.length) {
|
|
72
72
|
const el = issue.path[i];
|
|
73
73
|
const terminal = i === issue.path.length - 1;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
// errorArray._errors = [];
|
|
81
|
-
// curr[el] = curr[el] || errorArray;
|
|
82
|
-
// }
|
|
74
|
+
// `_errors` is reserved by this legacy format, so merge a matching path segment into the current node instead of treating its array as a child.
|
|
75
|
+
if (el === "_errors") {
|
|
76
|
+
if (terminal)
|
|
77
|
+
curr._errors.push(mapper(issue));
|
|
78
|
+
i++;
|
|
79
|
+
continue;
|
|
83
80
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
// Create `el` as an own data property. A segment naming an inherited member ("toString", "constructor") would otherwise read through to the prototype, and assigning "__proto__" would hit the setter and walk into Object.prototype.
|
|
82
|
+
if (!Object.prototype.hasOwnProperty.call(curr, el)) {
|
|
83
|
+
if (el === "__proto__") {
|
|
84
|
+
Object.defineProperty(curr, el, {
|
|
85
|
+
value: { _errors: [] },
|
|
86
|
+
writable: true,
|
|
87
|
+
enumerable: true,
|
|
88
|
+
configurable: true,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
curr[el] = { _errors: [] };
|
|
93
|
+
}
|
|
87
94
|
}
|
|
88
95
|
curr = curr[el];
|
|
96
|
+
if (terminal) {
|
|
97
|
+
curr._errors.push(mapper(issue));
|
|
98
|
+
}
|
|
89
99
|
i++;
|
|
90
100
|
}
|
|
91
101
|
}
|
|
@@ -109,7 +119,7 @@ export class ZodError extends Error {
|
|
|
109
119
|
return this.issues.length === 0;
|
|
110
120
|
}
|
|
111
121
|
flatten(mapper = (issue) => issue.message) {
|
|
112
|
-
const fieldErrors =
|
|
122
|
+
const fieldErrors = Object.create(null);
|
|
113
123
|
const formErrors = [];
|
|
114
124
|
for (const sub of this.issues) {
|
|
115
125
|
if (sub.path.length > 0) {
|
|
@@ -15,3 +15,22 @@ function setErrorMap(map) {
|
|
|
15
15
|
function getErrorMap() {
|
|
16
16
|
return overrideErrorMap;
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
// seal-cjs-exports
|
|
20
|
+
(function () {
|
|
21
|
+
var keys = Object.getOwnPropertyNames(exports);
|
|
22
|
+
for (var i = 0; i < keys.length; i++) {
|
|
23
|
+
var desc = Object.getOwnPropertyDescriptor(exports, keys[i]);
|
|
24
|
+
if (!desc || !desc.get || !desc.configurable) continue;
|
|
25
|
+
var value;
|
|
26
|
+
try {
|
|
27
|
+
value = desc.get();
|
|
28
|
+
} catch (e) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
// a circular require may not have settled this one yet, so leave it live
|
|
32
|
+
if (value === undefined) continue;
|
|
33
|
+
Object.defineProperty(exports, keys[i], { value: value, writable: false, enumerable: desc.enumerable, configurable: false });
|
|
34
|
+
}
|
|
35
|
+
Object.freeze(exports);
|
|
36
|
+
})();
|