@wopee-io/wopee.pw 4.21.0 → 4.21.2
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/core/ports/configPort/configDefaults.js +1 -2
- package/build/core/ports/configPort/configDefaults.js.map +1 -1
- package/build/shared/metadata/versionMetadata.js +2 -2
- package/build/tools/wopee-reporter/helpers/axios-config.js +1 -2
- package/build/tools/wopee-reporter/helpers/axios-config.js.map +1 -1
- package/build/tools/wopee-reporter/helpers/generateTestRunId.js +1 -2
- package/build/tools/wopee-reporter/helpers/generateTestRunId.js.map +1 -1
- package/build/tools/wopee-reporter/helpers/parseError.js +1 -2
- package/build/tools/wopee-reporter/helpers/parseError.js.map +1 -1
- package/build/tools/wopee-reporter/helpers/parseNestedSteps.js +1 -2
- package/build/tools/wopee-reporter/helpers/parseNestedSteps.js.map +1 -1
- package/build/tools/wopee-reporter/wopeeReporter.js +3 -3
- package/node_modules/follow-redirects/package.json +1 -1
- package/node_modules/form-data/CHANGELOG.md +659 -0
- package/node_modules/form-data/{Readme.md → README.md} +34 -37
- package/node_modules/form-data/lib/browser.js +3 -1
- package/node_modules/form-data/lib/form_data.js +126 -135
- package/node_modules/form-data/lib/populate.js +5 -5
- package/node_modules/form-data/package.json +24 -16
- 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/{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 +4 -2
- 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/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/benchmarks/index.d.ts → v3/helpers/enumUtil.js} +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,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -10,9 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
15
|
};
|
|
12
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("
|
|
14
|
-
__exportStar(require("./helpers/parseUtil"), exports);
|
|
15
|
-
__exportStar(require("./helpers/typeAliases"), exports);
|
|
16
|
-
__exportStar(require("./helpers/util"), exports);
|
|
17
|
-
__exportStar(require("./types"), exports);
|
|
18
|
-
__exportStar(require("./ZodError"), exports);
|
|
17
|
+
__exportStar(require("../v4/mini/index.cjs"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../v4/mini/index.cjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../v4/mini/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../v4/mini/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wopee-io/wopee.pw",
|
|
3
|
-
"version": "4.21.
|
|
3
|
+
"version": "4.21.2",
|
|
4
4
|
"description": "Wopee's Playwright integration.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"visual testing",
|
|
@@ -28,13 +28,15 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@autonomous-testing/sdk": "3.7.0",
|
|
30
30
|
"dotenv": "^16.6.1",
|
|
31
|
+
"http-proxy-agent": "^7.0.2",
|
|
32
|
+
"https-proxy-agent": "^7.0.6",
|
|
31
33
|
"lodash": "^4.17.21",
|
|
32
34
|
"proxy-from-env": "^1.1.0"
|
|
33
35
|
},
|
|
34
36
|
"devDependencies": {
|
|
35
37
|
"@commitlint/cli": "^19.2.1",
|
|
36
38
|
"@commitlint/config-angular": "^19.1.0",
|
|
37
|
-
"@playwright/test": "^1.
|
|
39
|
+
"@playwright/test": "^1.54.2",
|
|
38
40
|
"@semantic-release/changelog": "^6.0.3",
|
|
39
41
|
"@semantic-release/exec": "^6.0.3",
|
|
40
42
|
"@semantic-release/git": "^10.0.1",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare class Mocker {
|
|
2
|
-
pick: (...args: any[]) => any;
|
|
3
|
-
get string(): string;
|
|
4
|
-
get number(): number;
|
|
5
|
-
get bigint(): bigint;
|
|
6
|
-
get boolean(): boolean;
|
|
7
|
-
get date(): Date;
|
|
8
|
-
get symbol(): symbol;
|
|
9
|
-
get null(): null;
|
|
10
|
-
get undefined(): undefined;
|
|
11
|
-
get stringOptional(): any;
|
|
12
|
-
get stringNullable(): any;
|
|
13
|
-
get numberOptional(): any;
|
|
14
|
-
get numberNullable(): any;
|
|
15
|
-
get booleanOptional(): any;
|
|
16
|
-
get booleanNullable(): any;
|
|
17
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Mocker = void 0;
|
|
4
|
-
function getRandomInt(max) {
|
|
5
|
-
return Math.floor(Math.random() * Math.floor(max));
|
|
6
|
-
}
|
|
7
|
-
const testSymbol = Symbol("test");
|
|
8
|
-
class Mocker {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.pick = (...args) => {
|
|
11
|
-
return args[getRandomInt(args.length)];
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
get string() {
|
|
15
|
-
return Math.random().toString(36).substring(7);
|
|
16
|
-
}
|
|
17
|
-
get number() {
|
|
18
|
-
return Math.random() * 100;
|
|
19
|
-
}
|
|
20
|
-
get bigint() {
|
|
21
|
-
return BigInt(Math.floor(Math.random() * 10000));
|
|
22
|
-
}
|
|
23
|
-
get boolean() {
|
|
24
|
-
return Math.random() < 0.5;
|
|
25
|
-
}
|
|
26
|
-
get date() {
|
|
27
|
-
return new Date(Math.floor(Date.now() * Math.random()));
|
|
28
|
-
}
|
|
29
|
-
get symbol() {
|
|
30
|
-
return testSymbol;
|
|
31
|
-
}
|
|
32
|
-
get null() {
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
|
-
get undefined() {
|
|
36
|
-
return undefined;
|
|
37
|
-
}
|
|
38
|
-
get stringOptional() {
|
|
39
|
-
return this.pick(this.string, this.undefined);
|
|
40
|
-
}
|
|
41
|
-
get stringNullable() {
|
|
42
|
-
return this.pick(this.string, this.null);
|
|
43
|
-
}
|
|
44
|
-
get numberOptional() {
|
|
45
|
-
return this.pick(this.number, this.undefined);
|
|
46
|
-
}
|
|
47
|
-
get numberNullable() {
|
|
48
|
-
return this.pick(this.number, this.null);
|
|
49
|
-
}
|
|
50
|
-
get booleanOptional() {
|
|
51
|
-
return this.pick(this.boolean, this.undefined);
|
|
52
|
-
}
|
|
53
|
-
get booleanNullable() {
|
|
54
|
-
return this.pick(this.boolean, this.null);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
exports.Mocker = Mocker;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const benchmark_1 = __importDefault(require("benchmark"));
|
|
7
|
-
const datetimeValidationSuite = new benchmark_1.default.Suite("datetime");
|
|
8
|
-
const DATA = "2021-01-01";
|
|
9
|
-
const MONTHS_31 = new Set([1, 3, 5, 7, 8, 10, 12]);
|
|
10
|
-
const MONTHS_30 = new Set([4, 6, 9, 11]);
|
|
11
|
-
const simpleDatetimeRegex = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
12
|
-
const datetimeRegexNoLeapYearValidation = /^\d{4}-((0[13578]|10|12)-31|(0[13-9]|1[0-2])-30|(0[1-9]|1[0-2])-(0[1-9]|1\d|2\d))$/;
|
|
13
|
-
const datetimeRegexWithLeapYearValidation = /^((\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])))$/;
|
|
14
|
-
datetimeValidationSuite
|
|
15
|
-
.add("new Date()", () => {
|
|
16
|
-
return !isNaN(new Date(DATA).getTime());
|
|
17
|
-
})
|
|
18
|
-
.add("regex (no validation)", () => {
|
|
19
|
-
return simpleDatetimeRegex.test(DATA);
|
|
20
|
-
})
|
|
21
|
-
.add("regex (no leap year)", () => {
|
|
22
|
-
return datetimeRegexNoLeapYearValidation.test(DATA);
|
|
23
|
-
})
|
|
24
|
-
.add("regex (w/ leap year)", () => {
|
|
25
|
-
return datetimeRegexWithLeapYearValidation.test(DATA);
|
|
26
|
-
})
|
|
27
|
-
.add("capture groups + code", () => {
|
|
28
|
-
const match = DATA.match(simpleDatetimeRegex);
|
|
29
|
-
if (!match)
|
|
30
|
-
return false;
|
|
31
|
-
// Extract year, month, and day from the capture groups
|
|
32
|
-
const year = Number.parseInt(match[1], 10);
|
|
33
|
-
const month = Number.parseInt(match[2], 10); // month is 0-indexed in JavaScript Date, so subtract 1
|
|
34
|
-
const day = Number.parseInt(match[3], 10);
|
|
35
|
-
if (month === 2) {
|
|
36
|
-
if ((year % 4 === 0 && year % 100 !== 0) || year % 400 === 0) {
|
|
37
|
-
return day <= 29;
|
|
38
|
-
}
|
|
39
|
-
return day <= 28;
|
|
40
|
-
}
|
|
41
|
-
if (MONTHS_30.has(month)) {
|
|
42
|
-
return day <= 30;
|
|
43
|
-
}
|
|
44
|
-
if (MONTHS_31.has(month)) {
|
|
45
|
-
return day <= 31;
|
|
46
|
-
}
|
|
47
|
-
return false;
|
|
48
|
-
})
|
|
49
|
-
.on("cycle", (e) => {
|
|
50
|
-
console.log(`${datetimeValidationSuite.name}: ${e.target}`);
|
|
51
|
-
});
|
|
52
|
-
exports.default = {
|
|
53
|
-
suites: [datetimeValidationSuite],
|
|
54
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const benchmark_1 = __importDefault(require("benchmark"));
|
|
7
|
-
const index_1 = require("../index");
|
|
8
|
-
const doubleSuite = new benchmark_1.default.Suite("z.discriminatedUnion: double");
|
|
9
|
-
const manySuite = new benchmark_1.default.Suite("z.discriminatedUnion: many");
|
|
10
|
-
const aSchema = index_1.z.object({
|
|
11
|
-
type: index_1.z.literal("a"),
|
|
12
|
-
});
|
|
13
|
-
const objA = {
|
|
14
|
-
type: "a",
|
|
15
|
-
};
|
|
16
|
-
const bSchema = index_1.z.object({
|
|
17
|
-
type: index_1.z.literal("b"),
|
|
18
|
-
});
|
|
19
|
-
const objB = {
|
|
20
|
-
type: "b",
|
|
21
|
-
};
|
|
22
|
-
const cSchema = index_1.z.object({
|
|
23
|
-
type: index_1.z.literal("c"),
|
|
24
|
-
});
|
|
25
|
-
const objC = {
|
|
26
|
-
type: "c",
|
|
27
|
-
};
|
|
28
|
-
const dSchema = index_1.z.object({
|
|
29
|
-
type: index_1.z.literal("d"),
|
|
30
|
-
});
|
|
31
|
-
const double = index_1.z.discriminatedUnion("type", [aSchema, bSchema]);
|
|
32
|
-
const many = index_1.z.discriminatedUnion("type", [aSchema, bSchema, cSchema, dSchema]);
|
|
33
|
-
doubleSuite
|
|
34
|
-
.add("valid: a", () => {
|
|
35
|
-
double.parse(objA);
|
|
36
|
-
})
|
|
37
|
-
.add("valid: b", () => {
|
|
38
|
-
double.parse(objB);
|
|
39
|
-
})
|
|
40
|
-
.add("invalid: null", () => {
|
|
41
|
-
try {
|
|
42
|
-
double.parse(null);
|
|
43
|
-
}
|
|
44
|
-
catch (err) { }
|
|
45
|
-
})
|
|
46
|
-
.add("invalid: wrong shape", () => {
|
|
47
|
-
try {
|
|
48
|
-
double.parse(objC);
|
|
49
|
-
}
|
|
50
|
-
catch (err) { }
|
|
51
|
-
})
|
|
52
|
-
.on("cycle", (e) => {
|
|
53
|
-
console.log(`${doubleSuite.name}: ${e.target}`);
|
|
54
|
-
});
|
|
55
|
-
manySuite
|
|
56
|
-
.add("valid: a", () => {
|
|
57
|
-
many.parse(objA);
|
|
58
|
-
})
|
|
59
|
-
.add("valid: c", () => {
|
|
60
|
-
many.parse(objC);
|
|
61
|
-
})
|
|
62
|
-
.add("invalid: null", () => {
|
|
63
|
-
try {
|
|
64
|
-
many.parse(null);
|
|
65
|
-
}
|
|
66
|
-
catch (err) { }
|
|
67
|
-
})
|
|
68
|
-
.add("invalid: wrong shape", () => {
|
|
69
|
-
try {
|
|
70
|
-
many.parse({ type: "unknown" });
|
|
71
|
-
}
|
|
72
|
-
catch (err) { }
|
|
73
|
-
})
|
|
74
|
-
.on("cycle", (e) => {
|
|
75
|
-
console.log(`${manySuite.name}: ${e.target}`);
|
|
76
|
-
});
|
|
77
|
-
exports.default = {
|
|
78
|
-
suites: [doubleSuite, manySuite],
|
|
79
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const datetime_1 = __importDefault(require("./datetime"));
|
|
7
|
-
const discriminatedUnion_1 = __importDefault(require("./discriminatedUnion"));
|
|
8
|
-
const ipv4_1 = __importDefault(require("./ipv4"));
|
|
9
|
-
const object_1 = __importDefault(require("./object"));
|
|
10
|
-
const primitives_1 = __importDefault(require("./primitives"));
|
|
11
|
-
const realworld_1 = __importDefault(require("./realworld"));
|
|
12
|
-
const string_1 = __importDefault(require("./string"));
|
|
13
|
-
const union_1 = __importDefault(require("./union"));
|
|
14
|
-
const argv = process.argv.slice(2);
|
|
15
|
-
let suites = [];
|
|
16
|
-
if (!argv.length) {
|
|
17
|
-
suites = [
|
|
18
|
-
...realworld_1.default.suites,
|
|
19
|
-
...primitives_1.default.suites,
|
|
20
|
-
...string_1.default.suites,
|
|
21
|
-
...object_1.default.suites,
|
|
22
|
-
...union_1.default.suites,
|
|
23
|
-
...discriminatedUnion_1.default.suites,
|
|
24
|
-
];
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
if (argv.includes("--realworld")) {
|
|
28
|
-
suites.push(...realworld_1.default.suites);
|
|
29
|
-
}
|
|
30
|
-
if (argv.includes("--primitives")) {
|
|
31
|
-
suites.push(...primitives_1.default.suites);
|
|
32
|
-
}
|
|
33
|
-
if (argv.includes("--string")) {
|
|
34
|
-
suites.push(...string_1.default.suites);
|
|
35
|
-
}
|
|
36
|
-
if (argv.includes("--object")) {
|
|
37
|
-
suites.push(...object_1.default.suites);
|
|
38
|
-
}
|
|
39
|
-
if (argv.includes("--union")) {
|
|
40
|
-
suites.push(...union_1.default.suites);
|
|
41
|
-
}
|
|
42
|
-
if (argv.includes("--discriminatedUnion")) {
|
|
43
|
-
suites.push(...datetime_1.default.suites);
|
|
44
|
-
}
|
|
45
|
-
if (argv.includes("--datetime")) {
|
|
46
|
-
suites.push(...datetime_1.default.suites);
|
|
47
|
-
}
|
|
48
|
-
if (argv.includes("--ipv4")) {
|
|
49
|
-
suites.push(...ipv4_1.default.suites);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
for (const suite of suites) {
|
|
53
|
-
suite.run({});
|
|
54
|
-
}
|
|
55
|
-
// exit on Ctrl-C
|
|
56
|
-
process.on("SIGINT", function () {
|
|
57
|
-
console.log("Exiting...");
|
|
58
|
-
process.exit();
|
|
59
|
-
});
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const benchmark_1 = __importDefault(require("benchmark"));
|
|
7
|
-
const suite = new benchmark_1.default.Suite("ipv4");
|
|
8
|
-
const DATA = "127.0.0.1";
|
|
9
|
-
const ipv4RegexA = /^(((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}))$/;
|
|
10
|
-
const ipv4RegexB = /^(?:(?:(?=(25[0-5]))\1|(?=(2[0-4][0-9]))\2|(?=(1[0-9]{2}))\3|(?=([0-9]{1,2}))\4)\.){3}(?:(?=(25[0-5]))\5|(?=(2[0-4][0-9]))\6|(?=(1[0-9]{2}))\7|(?=([0-9]{1,2}))\8)$/;
|
|
11
|
-
const ipv4RegexC = /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;
|
|
12
|
-
const ipv4RegexD = /^(\b25[0-5]|\b2[0-4][0-9]|\b[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/;
|
|
13
|
-
const ipv4RegexE = /^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.){3}(25[0-5]|(2[0-4]|1\d|[1-9]|)\d)$/;
|
|
14
|
-
const ipv4RegexF = /^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/;
|
|
15
|
-
const ipv4RegexG = /^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}$/;
|
|
16
|
-
const ipv4RegexH = /^((25[0-5]|(2[0-4]|1[0-9]|[1-9]|)[0-9])(\.(?!$)|$)){4}$/;
|
|
17
|
-
const ipv4RegexI = /^(?:(?: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])$/;
|
|
18
|
-
suite
|
|
19
|
-
.add("A", () => {
|
|
20
|
-
return ipv4RegexA.test(DATA);
|
|
21
|
-
})
|
|
22
|
-
.add("B", () => {
|
|
23
|
-
return ipv4RegexB.test(DATA);
|
|
24
|
-
})
|
|
25
|
-
.add("C", () => {
|
|
26
|
-
return ipv4RegexC.test(DATA);
|
|
27
|
-
})
|
|
28
|
-
.add("D", () => {
|
|
29
|
-
return ipv4RegexD.test(DATA);
|
|
30
|
-
})
|
|
31
|
-
.add("E", () => {
|
|
32
|
-
return ipv4RegexE.test(DATA);
|
|
33
|
-
})
|
|
34
|
-
.add("F", () => {
|
|
35
|
-
return ipv4RegexF.test(DATA);
|
|
36
|
-
})
|
|
37
|
-
.add("G", () => {
|
|
38
|
-
return ipv4RegexG.test(DATA);
|
|
39
|
-
})
|
|
40
|
-
.add("H", () => {
|
|
41
|
-
return ipv4RegexH.test(DATA);
|
|
42
|
-
})
|
|
43
|
-
.add("I", () => {
|
|
44
|
-
return ipv4RegexI.test(DATA);
|
|
45
|
-
})
|
|
46
|
-
.on("cycle", (e) => {
|
|
47
|
-
console.log(`${suite.name}: ${e.target}`);
|
|
48
|
-
});
|
|
49
|
-
exports.default = {
|
|
50
|
-
suites: [suite],
|
|
51
|
-
};
|
|
52
|
-
if (require.main === module) {
|
|
53
|
-
suite.run();
|
|
54
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const benchmark_1 = __importDefault(require("benchmark"));
|
|
7
|
-
const index_1 = require("../index");
|
|
8
|
-
const emptySuite = new benchmark_1.default.Suite("z.object: empty");
|
|
9
|
-
const shortSuite = new benchmark_1.default.Suite("z.object: short");
|
|
10
|
-
const longSuite = new benchmark_1.default.Suite("z.object: long");
|
|
11
|
-
const empty = index_1.z.object({});
|
|
12
|
-
const short = index_1.z.object({
|
|
13
|
-
string: index_1.z.string(),
|
|
14
|
-
});
|
|
15
|
-
const long = index_1.z.object({
|
|
16
|
-
string: index_1.z.string(),
|
|
17
|
-
number: index_1.z.number(),
|
|
18
|
-
boolean: index_1.z.boolean(),
|
|
19
|
-
});
|
|
20
|
-
emptySuite
|
|
21
|
-
.add("valid", () => {
|
|
22
|
-
empty.parse({});
|
|
23
|
-
})
|
|
24
|
-
.add("valid: extra keys", () => {
|
|
25
|
-
empty.parse({ string: "string" });
|
|
26
|
-
})
|
|
27
|
-
.add("invalid: null", () => {
|
|
28
|
-
try {
|
|
29
|
-
empty.parse(null);
|
|
30
|
-
}
|
|
31
|
-
catch (err) { }
|
|
32
|
-
})
|
|
33
|
-
.on("cycle", (e) => {
|
|
34
|
-
console.log(`${emptySuite.name}: ${e.target}`);
|
|
35
|
-
});
|
|
36
|
-
shortSuite
|
|
37
|
-
.add("valid", () => {
|
|
38
|
-
short.parse({ string: "string" });
|
|
39
|
-
})
|
|
40
|
-
.add("valid: extra keys", () => {
|
|
41
|
-
short.parse({ string: "string", number: 42 });
|
|
42
|
-
})
|
|
43
|
-
.add("invalid: null", () => {
|
|
44
|
-
try {
|
|
45
|
-
short.parse(null);
|
|
46
|
-
}
|
|
47
|
-
catch (err) { }
|
|
48
|
-
})
|
|
49
|
-
.on("cycle", (e) => {
|
|
50
|
-
console.log(`${shortSuite.name}: ${e.target}`);
|
|
51
|
-
});
|
|
52
|
-
longSuite
|
|
53
|
-
.add("valid", () => {
|
|
54
|
-
long.parse({ string: "string", number: 42, boolean: true });
|
|
55
|
-
})
|
|
56
|
-
.add("valid: extra keys", () => {
|
|
57
|
-
long.parse({ string: "string", number: 42, boolean: true, list: [] });
|
|
58
|
-
})
|
|
59
|
-
.add("invalid: null", () => {
|
|
60
|
-
try {
|
|
61
|
-
long.parse(null);
|
|
62
|
-
}
|
|
63
|
-
catch (err) { }
|
|
64
|
-
})
|
|
65
|
-
.on("cycle", (e) => {
|
|
66
|
-
console.log(`${longSuite.name}: ${e.target}`);
|
|
67
|
-
});
|
|
68
|
-
exports.default = {
|
|
69
|
-
suites: [emptySuite, shortSuite, longSuite],
|
|
70
|
-
};
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const benchmark_1 = __importDefault(require("benchmark"));
|
|
7
|
-
const Mocker_1 = require("../__tests__/Mocker");
|
|
8
|
-
const index_1 = require("../index");
|
|
9
|
-
const val = new Mocker_1.Mocker();
|
|
10
|
-
const enumSuite = new benchmark_1.default.Suite("z.enum");
|
|
11
|
-
const enumSchema = index_1.z.enum(["a", "b", "c"]);
|
|
12
|
-
enumSuite
|
|
13
|
-
.add("valid", () => {
|
|
14
|
-
enumSchema.parse("a");
|
|
15
|
-
})
|
|
16
|
-
.add("invalid", () => {
|
|
17
|
-
try {
|
|
18
|
-
enumSchema.parse("x");
|
|
19
|
-
}
|
|
20
|
-
catch (e) { }
|
|
21
|
-
})
|
|
22
|
-
.on("cycle", (e) => {
|
|
23
|
-
console.log(`z.enum: ${e.target}`);
|
|
24
|
-
});
|
|
25
|
-
const longEnumSuite = new benchmark_1.default.Suite("long z.enum");
|
|
26
|
-
const longEnumSchema = index_1.z.enum([
|
|
27
|
-
"one",
|
|
28
|
-
"two",
|
|
29
|
-
"three",
|
|
30
|
-
"four",
|
|
31
|
-
"five",
|
|
32
|
-
"six",
|
|
33
|
-
"seven",
|
|
34
|
-
"eight",
|
|
35
|
-
"nine",
|
|
36
|
-
"ten",
|
|
37
|
-
"eleven",
|
|
38
|
-
"twelve",
|
|
39
|
-
"thirteen",
|
|
40
|
-
"fourteen",
|
|
41
|
-
"fifteen",
|
|
42
|
-
"sixteen",
|
|
43
|
-
"seventeen",
|
|
44
|
-
]);
|
|
45
|
-
longEnumSuite
|
|
46
|
-
.add("valid", () => {
|
|
47
|
-
longEnumSchema.parse("five");
|
|
48
|
-
})
|
|
49
|
-
.add("invalid", () => {
|
|
50
|
-
try {
|
|
51
|
-
longEnumSchema.parse("invalid");
|
|
52
|
-
}
|
|
53
|
-
catch (e) { }
|
|
54
|
-
})
|
|
55
|
-
.on("cycle", (e) => {
|
|
56
|
-
console.log(`long z.enum: ${e.target}`);
|
|
57
|
-
});
|
|
58
|
-
const undefinedSuite = new benchmark_1.default.Suite("z.undefined");
|
|
59
|
-
const undefinedSchema = index_1.z.undefined();
|
|
60
|
-
undefinedSuite
|
|
61
|
-
.add("valid", () => {
|
|
62
|
-
undefinedSchema.parse(undefined);
|
|
63
|
-
})
|
|
64
|
-
.add("invalid", () => {
|
|
65
|
-
try {
|
|
66
|
-
undefinedSchema.parse(1);
|
|
67
|
-
}
|
|
68
|
-
catch (e) { }
|
|
69
|
-
})
|
|
70
|
-
.on("cycle", (e) => {
|
|
71
|
-
console.log(`z.undefined: ${e.target}`);
|
|
72
|
-
});
|
|
73
|
-
const literalSuite = new benchmark_1.default.Suite("z.literal");
|
|
74
|
-
const short = "short";
|
|
75
|
-
const bad = "bad";
|
|
76
|
-
const literalSchema = index_1.z.literal("short");
|
|
77
|
-
literalSuite
|
|
78
|
-
.add("valid", () => {
|
|
79
|
-
literalSchema.parse(short);
|
|
80
|
-
})
|
|
81
|
-
.add("invalid", () => {
|
|
82
|
-
try {
|
|
83
|
-
literalSchema.parse(bad);
|
|
84
|
-
}
|
|
85
|
-
catch (e) { }
|
|
86
|
-
})
|
|
87
|
-
.on("cycle", (e) => {
|
|
88
|
-
console.log(`z.literal: ${e.target}`);
|
|
89
|
-
});
|
|
90
|
-
const numberSuite = new benchmark_1.default.Suite("z.number");
|
|
91
|
-
const numberSchema = index_1.z.number().int();
|
|
92
|
-
numberSuite
|
|
93
|
-
.add("valid", () => {
|
|
94
|
-
numberSchema.parse(1);
|
|
95
|
-
})
|
|
96
|
-
.add("invalid type", () => {
|
|
97
|
-
try {
|
|
98
|
-
numberSchema.parse("bad");
|
|
99
|
-
}
|
|
100
|
-
catch (e) { }
|
|
101
|
-
})
|
|
102
|
-
.add("invalid number", () => {
|
|
103
|
-
try {
|
|
104
|
-
numberSchema.parse(0.5);
|
|
105
|
-
}
|
|
106
|
-
catch (e) { }
|
|
107
|
-
})
|
|
108
|
-
.on("cycle", (e) => {
|
|
109
|
-
console.log(`z.number: ${e.target}`);
|
|
110
|
-
});
|
|
111
|
-
const dateSuite = new benchmark_1.default.Suite("z.date");
|
|
112
|
-
const plainDate = index_1.z.date();
|
|
113
|
-
const minMaxDate = index_1.z
|
|
114
|
-
.date()
|
|
115
|
-
.min(new Date("2021-01-01"))
|
|
116
|
-
.max(new Date("2030-01-01"));
|
|
117
|
-
dateSuite
|
|
118
|
-
.add("valid", () => {
|
|
119
|
-
plainDate.parse(new Date());
|
|
120
|
-
})
|
|
121
|
-
.add("invalid", () => {
|
|
122
|
-
try {
|
|
123
|
-
plainDate.parse(1);
|
|
124
|
-
}
|
|
125
|
-
catch (e) { }
|
|
126
|
-
})
|
|
127
|
-
.add("valid min and max", () => {
|
|
128
|
-
minMaxDate.parse(new Date("2023-01-01"));
|
|
129
|
-
})
|
|
130
|
-
.add("invalid min", () => {
|
|
131
|
-
try {
|
|
132
|
-
minMaxDate.parse(new Date("2019-01-01"));
|
|
133
|
-
}
|
|
134
|
-
catch (e) { }
|
|
135
|
-
})
|
|
136
|
-
.add("invalid max", () => {
|
|
137
|
-
try {
|
|
138
|
-
minMaxDate.parse(new Date("2031-01-01"));
|
|
139
|
-
}
|
|
140
|
-
catch (e) { }
|
|
141
|
-
})
|
|
142
|
-
.on("cycle", (e) => {
|
|
143
|
-
console.log(`z.date: ${e.target}`);
|
|
144
|
-
});
|
|
145
|
-
const symbolSuite = new benchmark_1.default.Suite("z.symbol");
|
|
146
|
-
const symbolSchema = index_1.z.symbol();
|
|
147
|
-
symbolSuite
|
|
148
|
-
.add("valid", () => {
|
|
149
|
-
symbolSchema.parse(val.symbol);
|
|
150
|
-
})
|
|
151
|
-
.add("invalid", () => {
|
|
152
|
-
try {
|
|
153
|
-
symbolSchema.parse(1);
|
|
154
|
-
}
|
|
155
|
-
catch (e) { }
|
|
156
|
-
})
|
|
157
|
-
.on("cycle", (e) => {
|
|
158
|
-
console.log(`z.symbol: ${e.target}`);
|
|
159
|
-
});
|
|
160
|
-
exports.default = {
|
|
161
|
-
suites: [
|
|
162
|
-
enumSuite,
|
|
163
|
-
longEnumSuite,
|
|
164
|
-
undefinedSuite,
|
|
165
|
-
literalSuite,
|
|
166
|
-
numberSuite,
|
|
167
|
-
dateSuite,
|
|
168
|
-
symbolSuite,
|
|
169
|
-
],
|
|
170
|
-
};
|