moonflower 1.2.0 → 1.3.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/cli/entry.cjs +1 -1
- package/dist/cli/cli.cjs +2 -0
- package/dist/cli/cli.cjs.map +1 -0
- package/dist/cli/cli.d.ts +2 -0
- package/dist/cli/cli.d.ts.map +1 -0
- package/dist/cli/cli.mjs +62 -0
- package/dist/cli/cli.mjs.map +1 -0
- package/dist/cli/prettyprint.cjs +2 -0
- package/dist/cli/prettyprint.cjs.map +1 -0
- package/dist/cli/prettyprint.d.ts +5 -0
- package/dist/cli/prettyprint.d.ts.map +1 -0
- package/dist/cli/prettyprint.mjs +15 -0
- package/dist/cli/prettyprint.mjs.map +1 -0
- package/dist/errors/UserFacingErrors.cjs +1 -1
- package/dist/errors/UserFacingErrors.cjs.map +1 -1
- package/dist/errors/UserFacingErrors.d.ts +27 -0
- package/dist/errors/UserFacingErrors.d.ts.map +1 -1
- package/dist/errors/UserFacingErrors.mjs +67 -13
- package/dist/errors/UserFacingErrors.mjs.map +1 -1
- package/dist/hooks/usePathParams.cjs +1 -1
- package/dist/hooks/usePathParams.cjs.map +1 -1
- package/dist/hooks/usePathParams.d.ts.map +1 -1
- package/dist/hooks/usePathParams.mjs +20 -27
- package/dist/hooks/usePathParams.mjs.map +1 -1
- package/dist/hooks/useQueryParams.cjs +1 -1
- package/dist/hooks/useQueryParams.cjs.map +1 -1
- package/dist/hooks/useQueryParams.d.ts +4 -3
- package/dist/hooks/useQueryParams.d.ts.map +1 -1
- package/dist/hooks/useQueryParams.mjs +24 -33
- package/dist/hooks/useQueryParams.mjs.map +1 -1
- package/dist/hooks/useRequestBody.cjs +1 -1
- package/dist/hooks/useRequestBody.cjs.map +1 -1
- package/dist/hooks/useRequestBody.d.ts +4 -3
- package/dist/hooks/useRequestBody.d.ts.map +1 -1
- package/dist/hooks/useRequestBody.mjs +23 -34
- package/dist/hooks/useRequestBody.mjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +64 -55
- package/dist/node_modules/zod/index.cjs +2 -0
- package/dist/node_modules/zod/index.cjs.map +1 -0
- package/dist/node_modules/zod/index.mjs +6 -0
- package/dist/node_modules/zod/index.mjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/checks.cjs +2 -0
- package/dist/node_modules/zod/v4/classic/checks.cjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/checks.mjs +34 -0
- package/dist/node_modules/zod/v4/classic/checks.mjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/coerce.cjs +2 -0
- package/dist/node_modules/zod/v4/classic/coerce.cjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/coerce.mjs +26 -0
- package/dist/node_modules/zod/v4/classic/coerce.mjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/compat.cjs +2 -0
- package/dist/node_modules/zod/v4/classic/compat.cjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/compat.mjs +35 -0
- package/dist/node_modules/zod/v4/classic/compat.mjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/errors.cjs +2 -0
- package/dist/node_modules/zod/v4/classic/errors.cjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/errors.mjs +41 -0
- package/dist/node_modules/zod/v4/classic/errors.mjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/external.cjs +2 -0
- package/dist/node_modules/zod/v4/classic/external.cjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/external.mjs +260 -0
- package/dist/node_modules/zod/v4/classic/external.mjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/from-json-schema.cjs +2 -0
- package/dist/node_modules/zod/v4/classic/from-json-schema.cjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/from-json-schema.mjs +287 -0
- package/dist/node_modules/zod/v4/classic/from-json-schema.mjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/iso.cjs +2 -0
- package/dist/node_modules/zod/v4/classic/iso.cjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/iso.mjs +40 -0
- package/dist/node_modules/zod/v4/classic/iso.mjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/parse.cjs +2 -0
- package/dist/node_modules/zod/v4/classic/parse.cjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/parse.mjs +19 -0
- package/dist/node_modules/zod/v4/classic/parse.mjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/schemas.cjs +2 -0
- package/dist/node_modules/zod/v4/classic/schemas.cjs.map +1 -0
- package/dist/node_modules/zod/v4/classic/schemas.mjs +912 -0
- package/dist/node_modules/zod/v4/classic/schemas.mjs.map +1 -0
- package/dist/node_modules/zod/v4/core/api.cjs +2 -0
- package/dist/node_modules/zod/v4/core/api.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/api.mjs +1110 -0
- package/dist/node_modules/zod/v4/core/api.mjs.map +1 -0
- package/dist/node_modules/zod/v4/core/checks.cjs +2 -0
- package/dist/node_modules/zod/v4/core/checks.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/checks.mjs +421 -0
- package/dist/node_modules/zod/v4/core/checks.mjs.map +1 -0
- package/dist/node_modules/zod/v4/core/core.cjs +2 -0
- package/dist/node_modules/zod/v4/core/core.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/core.mjs +62 -0
- package/dist/node_modules/zod/v4/core/core.mjs.map +1 -0
- package/dist/node_modules/zod/v4/core/doc.cjs +4 -0
- package/dist/node_modules/zod/v4/core/doc.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/doc.mjs +27 -0
- package/dist/node_modules/zod/v4/core/doc.mjs.map +1 -0
- package/dist/node_modules/zod/v4/core/errors.cjs +3 -0
- package/dist/node_modules/zod/v4/core/errors.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/errors.mjs +89 -0
- package/dist/node_modules/zod/v4/core/errors.mjs.map +1 -0
- package/dist/node_modules/zod/v4/core/index.cjs +2 -0
- package/dist/node_modules/zod/v4/core/index.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/index.mjs +293 -0
- package/dist/node_modules/zod/v4/core/index.mjs.map +1 -0
- package/dist/node_modules/zod/v4/core/json-schema-generator.cjs +2 -0
- package/dist/node_modules/zod/v4/core/json-schema-generator.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/json-schema-generator.mjs +66 -0
- package/dist/node_modules/zod/v4/core/json-schema-generator.mjs.map +1 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.cjs +2 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.mjs +346 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.mjs.map +1 -0
- package/dist/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/dist/node_modules/zod/v4/core/json-schema.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/json-schema.mjs +2 -0
- package/dist/node_modules/zod/v4/core/json-schema.mjs.map +1 -0
- package/dist/node_modules/zod/v4/core/parse.cjs +2 -0
- package/dist/node_modules/zod/v4/core/parse.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/parse.mjs +75 -0
- package/dist/node_modules/zod/v4/core/parse.mjs.map +1 -0
- package/dist/node_modules/zod/v4/core/regexes.cjs +2 -0
- package/dist/node_modules/zod/v4/core/regexes.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/regexes.mjs +94 -0
- package/dist/node_modules/zod/v4/core/regexes.mjs.map +1 -0
- package/dist/node_modules/zod/v4/core/registries.cjs +2 -0
- package/dist/node_modules/zod/v4/core/registries.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/registries.mjs +44 -0
- package/dist/node_modules/zod/v4/core/registries.mjs.map +1 -0
- package/dist/node_modules/zod/v4/core/schemas.cjs +36 -0
- package/dist/node_modules/zod/v4/core/schemas.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/schemas.mjs +1319 -0
- package/dist/node_modules/zod/v4/core/schemas.mjs.map +1 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.cjs +4 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.mjs +244 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.mjs.map +1 -0
- package/dist/node_modules/zod/v4/core/util.cjs +2 -0
- package/dist/node_modules/zod/v4/core/util.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/util.mjs +523 -0
- package/dist/node_modules/zod/v4/core/util.mjs.map +1 -0
- package/dist/node_modules/zod/v4/core/versions.cjs +2 -0
- package/dist/node_modules/zod/v4/core/versions.cjs.map +1 -0
- package/dist/node_modules/zod/v4/core/versions.mjs +9 -0
- package/dist/node_modules/zod/v4/core/versions.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ar.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/ar.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ar.mjs +87 -0
- package/dist/node_modules/zod/v4/locales/ar.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/az.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/az.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/az.mjs +87 -0
- package/dist/node_modules/zod/v4/locales/az.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/be.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/be.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/be.mjs +129 -0
- package/dist/node_modules/zod/v4/locales/be.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/bg.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/bg.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/bg.mjs +98 -0
- package/dist/node_modules/zod/v4/locales/bg.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ca.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/ca.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ca.mjs +88 -0
- package/dist/node_modules/zod/v4/locales/ca.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/cs.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/cs.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/cs.mjs +91 -0
- package/dist/node_modules/zod/v4/locales/cs.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/da.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/da.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/da.mjs +94 -0
- package/dist/node_modules/zod/v4/locales/da.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/de.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/de.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/de.mjs +89 -0
- package/dist/node_modules/zod/v4/locales/de.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/en.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/en.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/en.mjs +91 -0
- package/dist/node_modules/zod/v4/locales/en.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/eo.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/eo.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/eo.mjs +90 -0
- package/dist/node_modules/zod/v4/locales/eo.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/es.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/es.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/es.mjs +111 -0
- package/dist/node_modules/zod/v4/locales/es.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/fa.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/fa.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/fa.mjs +89 -0
- package/dist/node_modules/zod/v4/locales/fa.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/fi.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/fi.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/fi.mjs +91 -0
- package/dist/node_modules/zod/v4/locales/fi.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/fr-CA.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/fr-CA.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/fr-CA.mjs +87 -0
- package/dist/node_modules/zod/v4/locales/fr-CA.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/fr.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/fr.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/fr.mjs +89 -0
- package/dist/node_modules/zod/v4/locales/fr.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/he.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/he.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/he.mjs +152 -0
- package/dist/node_modules/zod/v4/locales/he.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/hu.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/hu.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/hu.mjs +89 -0
- package/dist/node_modules/zod/v4/locales/hu.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/hy.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/hy.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/hy.mjs +130 -0
- package/dist/node_modules/zod/v4/locales/hy.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/id.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/id.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/id.mjs +87 -0
- package/dist/node_modules/zod/v4/locales/id.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/index.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/index.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/index.mjs +101 -0
- package/dist/node_modules/zod/v4/locales/index.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/is.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/is.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/is.mjs +89 -0
- package/dist/node_modules/zod/v4/locales/is.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/it.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/it.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/it.mjs +89 -0
- package/dist/node_modules/zod/v4/locales/it.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ja.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/ja.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ja.mjs +89 -0
- package/dist/node_modules/zod/v4/locales/ja.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ka.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/ka.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ka.mjs +92 -0
- package/dist/node_modules/zod/v4/locales/ka.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/kh.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/kh.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/kh.mjs +8 -0
- package/dist/node_modules/zod/v4/locales/kh.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/km.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/km.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/km.mjs +90 -0
- package/dist/node_modules/zod/v4/locales/km.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ko.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/ko.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ko.mjs +87 -0
- package/dist/node_modules/zod/v4/locales/ko.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/lt.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/lt.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/lt.mjs +178 -0
- package/dist/node_modules/zod/v4/locales/lt.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/mk.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/mk.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/mk.mjs +89 -0
- package/dist/node_modules/zod/v4/locales/mk.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ms.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/ms.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ms.mjs +88 -0
- package/dist/node_modules/zod/v4/locales/ms.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/nl.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/nl.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/nl.mjs +88 -0
- package/dist/node_modules/zod/v4/locales/nl.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/no.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/no.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/no.mjs +89 -0
- package/dist/node_modules/zod/v4/locales/no.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ota.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/ota.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ota.mjs +90 -0
- package/dist/node_modules/zod/v4/locales/ota.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/pl.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/pl.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/pl.mjs +89 -0
- package/dist/node_modules/zod/v4/locales/pl.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ps.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/ps.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ps.mjs +89 -0
- package/dist/node_modules/zod/v4/locales/ps.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/pt.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/pt.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/pt.mjs +89 -0
- package/dist/node_modules/zod/v4/locales/pt.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ru.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/ru.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ru.mjs +129 -0
- package/dist/node_modules/zod/v4/locales/ru.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/sl.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/sl.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/sl.mjs +89 -0
- package/dist/node_modules/zod/v4/locales/sl.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/sv.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/sv.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/sv.mjs +89 -0
- package/dist/node_modules/zod/v4/locales/sv.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ta.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/ta.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ta.mjs +90 -0
- package/dist/node_modules/zod/v4/locales/ta.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/th.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/th.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/th.mjs +90 -0
- package/dist/node_modules/zod/v4/locales/th.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/tr.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/tr.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/tr.mjs +87 -0
- package/dist/node_modules/zod/v4/locales/tr.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ua.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/ua.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ua.mjs +8 -0
- package/dist/node_modules/zod/v4/locales/ua.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/uk.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/uk.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/uk.mjs +89 -0
- package/dist/node_modules/zod/v4/locales/uk.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ur.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/ur.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ur.mjs +90 -0
- package/dist/node_modules/zod/v4/locales/ur.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/uz.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/uz.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/uz.mjs +90 -0
- package/dist/node_modules/zod/v4/locales/uz.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/vi.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/vi.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/vi.mjs +89 -0
- package/dist/node_modules/zod/v4/locales/vi.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/yo.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/yo.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/yo.mjs +89 -0
- package/dist/node_modules/zod/v4/locales/yo.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/zh-CN.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/zh-CN.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/zh-CN.mjs +90 -0
- package/dist/node_modules/zod/v4/locales/zh-CN.mjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/zh-TW.cjs +2 -0
- package/dist/node_modules/zod/v4/locales/zh-TW.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/zh-TW.mjs +87 -0
- package/dist/node_modules/zod/v4/locales/zh-TW.mjs.map +1 -0
- package/dist/openapi/analyzerModule/analyzerModule.cjs +1 -1
- package/dist/openapi/analyzerModule/analyzerModule.cjs.map +1 -1
- package/dist/openapi/analyzerModule/analyzerModule.d.ts.map +1 -1
- package/dist/openapi/analyzerModule/analyzerModule.mjs +42 -42
- package/dist/openapi/analyzerModule/analyzerModule.mjs.map +1 -1
- package/dist/openapi/analyzerModule/nodeParsers.cjs +1 -1
- package/dist/openapi/analyzerModule/nodeParsers.cjs.map +1 -1
- package/dist/openapi/analyzerModule/nodeParsers.d.ts +1 -0
- package/dist/openapi/analyzerModule/nodeParsers.d.ts.map +1 -1
- package/dist/openapi/analyzerModule/nodeParsers.mjs +261 -206
- package/dist/openapi/analyzerModule/nodeParsers.mjs.map +1 -1
- package/dist/openapi/analyzerModule/parseEndpoint.cjs +1 -1
- package/dist/openapi/analyzerModule/parseEndpoint.cjs.map +1 -1
- package/dist/openapi/analyzerModule/parseEndpoint.d.ts.map +1 -1
- package/dist/openapi/analyzerModule/parseEndpoint.mjs +62 -62
- package/dist/openapi/analyzerModule/parseEndpoint.mjs.map +1 -1
- package/dist/openapi/analyzerModule/test/TestCase.d.ts +9 -0
- package/dist/openapi/analyzerModule/test/TestCase.d.ts.map +1 -0
- package/dist/openapi/analyzerModule/test/openApiAnalyzer.zod.spec.d.ts +2 -0
- package/dist/openapi/analyzerModule/test/openApiAnalyzer.zod.spec.d.ts.map +1 -0
- package/dist/openapi/analyzerModule/test/openApiAnalyzer.zod.spec.data.d.ts +2 -0
- package/dist/openapi/analyzerModule/test/openApiAnalyzer.zod.spec.data.d.ts.map +1 -0
- package/dist/openapi/initOpenApiEngine.cjs +1 -1
- package/dist/openapi/initOpenApiEngine.cjs.map +1 -1
- package/dist/openapi/initOpenApiEngine.d.ts +7 -2
- package/dist/openapi/initOpenApiEngine.d.ts.map +1 -1
- package/dist/openapi/initOpenApiEngine.mjs +13 -7
- package/dist/openapi/initOpenApiEngine.mjs.map +1 -1
- package/dist/openapi/manager/OpenApiManager.cjs +1 -1
- package/dist/openapi/manager/OpenApiManager.cjs.map +1 -1
- package/dist/openapi/manager/OpenApiManager.d.ts +4 -0
- package/dist/openapi/manager/OpenApiManager.d.ts.map +1 -1
- package/dist/openapi/manager/OpenApiManager.mjs +11 -2
- package/dist/openapi/manager/OpenApiManager.mjs.map +1 -1
- package/dist/openapi/router/OpenApiRouter.cjs +1 -1
- package/dist/openapi/router/OpenApiRouter.cjs.map +1 -1
- package/dist/openapi/router/OpenApiRouter.d.ts.map +1 -1
- package/dist/openapi/router/OpenApiRouter.mjs +9 -6
- package/dist/openapi/router/OpenApiRouter.mjs.map +1 -1
- package/dist/utils/getValueAsNullableString.cjs +2 -0
- package/dist/utils/getValueAsNullableString.cjs.map +1 -0
- package/dist/utils/getValueAsNullableString.d.ts +2 -0
- package/dist/utils/getValueAsNullableString.d.ts.map +1 -0
- package/dist/utils/getValueAsNullableString.mjs +7 -0
- package/dist/utils/getValueAsNullableString.mjs.map +1 -0
- package/dist/utils/validationMessages.cjs +1 -1
- package/dist/utils/validationMessages.cjs.map +1 -1
- package/dist/utils/validationMessages.d.ts +1 -1
- package/dist/utils/validationMessages.d.ts.map +1 -1
- package/dist/utils/validationMessages.mjs +8 -8
- package/dist/utils/validationMessages.mjs.map +1 -1
- package/dist/validators/types.d.ts +4 -0
- package/dist/validators/types.d.ts.map +1 -1
- package/dist/validators/validateMissingParams.cjs +2 -0
- package/dist/validators/validateMissingParams.cjs.map +1 -0
- package/dist/validators/validateMissingParams.d.ts +7 -0
- package/dist/validators/validateMissingParams.d.ts.map +1 -0
- package/dist/validators/validateMissingParams.mjs +17 -0
- package/dist/validators/validateMissingParams.mjs.map +1 -0
- package/dist/validators/validateParam.cjs +2 -0
- package/dist/validators/validateParam.cjs.map +1 -0
- package/dist/validators/validateParam.d.ts +8 -0
- package/dist/validators/validateParam.d.ts.map +1 -0
- package/dist/validators/validateParam.mjs +41 -0
- package/dist/validators/validateParam.mjs.map +1 -0
- package/package.json +12 -5
- package/{cli → src/cli}/cli.ts +26 -6
- package/{cli → src/cli}/prettyprint.ts +2 -2
- package/src/errors/UserFacingErrors.ts +54 -0
- package/src/hooks/usePathParams.spec.ts +27 -0
- package/src/hooks/usePathParams.ts +5 -13
- package/src/hooks/useQueryParams.spec.ts +99 -0
- package/src/hooks/useQueryParams.ts +16 -25
- package/src/hooks/useRequestBody.spec.ts +99 -0
- package/src/hooks/useRequestBody.ts +16 -35
- package/src/openapi/analyzerModule/analyzerModule.ts +2 -3
- package/src/openapi/analyzerModule/nodeParsers.ts +113 -8
- package/src/openapi/analyzerModule/parseEndpoint.ts +2 -2
- package/src/openapi/analyzerModule/test/TestCase.ts +8 -0
- package/src/openapi/analyzerModule/test/openApiAnalyzer.spec.data.ts +9 -0
- package/src/openapi/analyzerModule/test/openApiAnalyzer.spec.ts +21 -0
- package/src/openapi/analyzerModule/test/openApiAnalyzer.zod.spec.data.ts +87 -0
- package/src/openapi/analyzerModule/test/openApiAnalyzer.zod.spec.ts +178 -0
- package/src/openapi/initOpenApiEngine.ts +48 -6
- package/src/openapi/manager/OpenApiManager.ts +16 -0
- package/src/openapi/router/OpenApiRouter.ts +6 -1
- package/src/test/app.spec.ts +27 -0
- package/src/utils/getValueAsNullableString.ts +8 -0
- package/src/utils/validationMessages.ts +4 -0
- package/src/validators/types.ts +5 -0
- package/src/validators/validateMissingParams.ts +27 -0
- package/src/validators/validateParam.ts +69 -0
- package/vite.config.ts +3 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { joinValues as o, stringifyPrimitive as s, parsedType as c } from "../core/util.mjs";
|
|
2
|
+
const y = () => {
|
|
3
|
+
const l = {
|
|
4
|
+
string: { unit: "merkkiä", subject: "merkkijonon" },
|
|
5
|
+
file: { unit: "tavua", subject: "tiedoston" },
|
|
6
|
+
array: { unit: "alkiota", subject: "listan" },
|
|
7
|
+
set: { unit: "alkiota", subject: "joukon" },
|
|
8
|
+
number: { unit: "", subject: "luvun" },
|
|
9
|
+
bigint: { unit: "", subject: "suuren kokonaisluvun" },
|
|
10
|
+
int: { unit: "", subject: "kokonaisluvun" },
|
|
11
|
+
date: { unit: "", subject: "päivämäärän" }
|
|
12
|
+
};
|
|
13
|
+
function n(t) {
|
|
14
|
+
return l[t] ?? null;
|
|
15
|
+
}
|
|
16
|
+
const u = {
|
|
17
|
+
regex: "säännöllinen lauseke",
|
|
18
|
+
email: "sähköpostiosoite",
|
|
19
|
+
url: "URL-osoite",
|
|
20
|
+
emoji: "emoji",
|
|
21
|
+
uuid: "UUID",
|
|
22
|
+
uuidv4: "UUIDv4",
|
|
23
|
+
uuidv6: "UUIDv6",
|
|
24
|
+
nanoid: "nanoid",
|
|
25
|
+
guid: "GUID",
|
|
26
|
+
cuid: "cuid",
|
|
27
|
+
cuid2: "cuid2",
|
|
28
|
+
ulid: "ULID",
|
|
29
|
+
xid: "XID",
|
|
30
|
+
ksuid: "KSUID",
|
|
31
|
+
datetime: "ISO-aikaleima",
|
|
32
|
+
date: "ISO-päivämäärä",
|
|
33
|
+
time: "ISO-aika",
|
|
34
|
+
duration: "ISO-kesto",
|
|
35
|
+
ipv4: "IPv4-osoite",
|
|
36
|
+
ipv6: "IPv6-osoite",
|
|
37
|
+
cidrv4: "IPv4-alue",
|
|
38
|
+
cidrv6: "IPv6-alue",
|
|
39
|
+
base64: "base64-koodattu merkkijono",
|
|
40
|
+
base64url: "base64url-koodattu merkkijono",
|
|
41
|
+
json_string: "JSON-merkkijono",
|
|
42
|
+
e164: "E.164-luku",
|
|
43
|
+
jwt: "JWT",
|
|
44
|
+
template_literal: "templaattimerkkijono"
|
|
45
|
+
}, r = {
|
|
46
|
+
nan: "NaN"
|
|
47
|
+
};
|
|
48
|
+
return (t) => {
|
|
49
|
+
switch (t.code) {
|
|
50
|
+
case "invalid_type": {
|
|
51
|
+
const e = r[t.expected] ?? t.expected, i = c(t.input), a = r[i] ?? i;
|
|
52
|
+
return /^[A-Z]/.test(t.expected) ? `Virheellinen tyyppi: odotettiin instanceof ${t.expected}, oli ${a}` : `Virheellinen tyyppi: odotettiin ${e}, oli ${a}`;
|
|
53
|
+
}
|
|
54
|
+
case "invalid_value":
|
|
55
|
+
return t.values.length === 1 ? `Virheellinen syöte: täytyy olla ${s(t.values[0])}` : `Virheellinen valinta: täytyy olla yksi seuraavista: ${o(t.values, "|")}`;
|
|
56
|
+
case "too_big": {
|
|
57
|
+
const e = t.inclusive ? "<=" : "<", i = n(t.origin);
|
|
58
|
+
return i ? `Liian suuri: ${i.subject} täytyy olla ${e}${t.maximum.toString()} ${i.unit}`.trim() : `Liian suuri: arvon täytyy olla ${e}${t.maximum.toString()}`;
|
|
59
|
+
}
|
|
60
|
+
case "too_small": {
|
|
61
|
+
const e = t.inclusive ? ">=" : ">", i = n(t.origin);
|
|
62
|
+
return i ? `Liian pieni: ${i.subject} täytyy olla ${e}${t.minimum.toString()} ${i.unit}`.trim() : `Liian pieni: arvon täytyy olla ${e}${t.minimum.toString()}`;
|
|
63
|
+
}
|
|
64
|
+
case "invalid_format": {
|
|
65
|
+
const e = t;
|
|
66
|
+
return e.format === "starts_with" ? `Virheellinen syöte: täytyy alkaa "${e.prefix}"` : e.format === "ends_with" ? `Virheellinen syöte: täytyy loppua "${e.suffix}"` : e.format === "includes" ? `Virheellinen syöte: täytyy sisältää "${e.includes}"` : e.format === "regex" ? `Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${e.pattern}` : `Virheellinen ${u[e.format] ?? t.format}`;
|
|
67
|
+
}
|
|
68
|
+
case "not_multiple_of":
|
|
69
|
+
return `Virheellinen luku: täytyy olla luvun ${t.divisor} monikerta`;
|
|
70
|
+
case "unrecognized_keys":
|
|
71
|
+
return `${t.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${o(t.keys, ", ")}`;
|
|
72
|
+
case "invalid_key":
|
|
73
|
+
return "Virheellinen avain tietueessa";
|
|
74
|
+
case "invalid_union":
|
|
75
|
+
return "Virheellinen unioni";
|
|
76
|
+
case "invalid_element":
|
|
77
|
+
return "Virheellinen arvo joukossa";
|
|
78
|
+
default:
|
|
79
|
+
return "Virheellinen syöte";
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
function d() {
|
|
84
|
+
return {
|
|
85
|
+
localeError: y()
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
export {
|
|
89
|
+
d as default
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=fi.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fi.mjs","sources":["../../../../../node_modules/zod/v4/locales/fi.js"],"sourcesContent":["import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"merkkiä\", subject: \"merkkijonon\" },\n file: { unit: \"tavua\", subject: \"tiedoston\" },\n array: { unit: \"alkiota\", subject: \"listan\" },\n set: { unit: \"alkiota\", subject: \"joukon\" },\n number: { unit: \"\", subject: \"luvun\" },\n bigint: { unit: \"\", subject: \"suuren kokonaisluvun\" },\n int: { unit: \"\", subject: \"kokonaisluvun\" },\n date: { unit: \"\", subject: \"päivämäärän\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"säännöllinen lauseke\",\n email: \"sähköpostiosoite\",\n url: \"URL-osoite\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"ISO-aikaleima\",\n date: \"ISO-päivämäärä\",\n time: \"ISO-aika\",\n duration: \"ISO-kesto\",\n ipv4: \"IPv4-osoite\",\n ipv6: \"IPv6-osoite\",\n cidrv4: \"IPv4-alue\",\n cidrv6: \"IPv6-alue\",\n base64: \"base64-koodattu merkkijono\",\n base64url: \"base64url-koodattu merkkijono\",\n json_string: \"JSON-merkkijono\",\n e164: \"E.164-luku\",\n jwt: \"JWT\",\n template_literal: \"templaattimerkkijono\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Virheellinen tyyppi: odotettiin instanceof ${issue.expected}, oli ${received}`;\n }\n return `Virheellinen tyyppi: odotettiin ${expected}, oli ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Virheellinen syöte: täytyy olla ${util.stringifyPrimitive(issue.values[0])}`;\n return `Virheellinen valinta: täytyy olla yksi seuraavista: ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Liian suuri: ${sizing.subject} täytyy olla ${adj}${issue.maximum.toString()} ${sizing.unit}`.trim();\n }\n return `Liian suuri: arvon täytyy olla ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Liian pieni: ${sizing.subject} täytyy olla ${adj}${issue.minimum.toString()} ${sizing.unit}`.trim();\n }\n return `Liian pieni: arvon täytyy olla ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Virheellinen syöte: täytyy alkaa \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Virheellinen syöte: täytyy loppua \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Virheellinen syöte: täytyy sisältää \"${_issue.includes}\"`;\n if (_issue.format === \"regex\") {\n return `Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${_issue.pattern}`;\n }\n return `Virheellinen ${FormatDictionary[_issue.format] ?? issue.format}`;\n }\n case \"not_multiple_of\":\n return `Virheellinen luku: täytyy olla luvun ${issue.divisor} monikerta`;\n case \"unrecognized_keys\":\n return `${issue.keys.length > 1 ? \"Tuntemattomat avaimet\" : \"Tuntematon avain\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return \"Virheellinen avain tietueessa\";\n case \"invalid_union\":\n return \"Virheellinen unioni\";\n case \"invalid_element\":\n return \"Virheellinen arvo joukossa\";\n default:\n return `Virheellinen syöte`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n"],"names":["error","Sizable","getSizing","origin","FormatDictionary","TypeDictionary","issue","expected","receivedType","util.parsedType","received","util.stringifyPrimitive","util.joinValues","adj","sizing","_issue","fi"],"mappings":";AACA,MAAMA,IAAQ,MAAM;AAChB,QAAMC,IAAU;AAAA,IACZ,QAAQ,EAAE,MAAM,WAAW,SAAS,cAAe;AAAA,IACnD,MAAM,EAAE,MAAM,SAAS,SAAS,YAAa;AAAA,IAC7C,OAAO,EAAE,MAAM,WAAW,SAAS,SAAU;AAAA,IAC7C,KAAK,EAAE,MAAM,WAAW,SAAS,SAAU;AAAA,IAC3C,QAAQ,EAAE,MAAM,IAAI,SAAS,QAAS;AAAA,IACtC,QAAQ,EAAE,MAAM,IAAI,SAAS,uBAAwB;AAAA,IACrD,KAAK,EAAE,MAAM,IAAI,SAAS,gBAAiB;AAAA,IAC3C,MAAM,EAAE,MAAM,IAAI,SAAS,cAAe;AAAA,EAC7C;AACD,WAASC,EAAUC,GAAQ;AACvB,WAAOF,EAAQE,CAAM,KAAK;AAAA,EAClC;AACI,QAAMC,IAAmB;AAAA,IACrB,OAAO;AAAA,IACP,OAAO;AAAA,IACP,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,MAAM;AAAA,IACN,KAAK;AAAA,IACL,OAAO;AAAA,IACP,UAAU;AAAA,IACV,MAAM;AAAA,IACN,MAAM;AAAA,IACN,UAAU;AAAA,IACV,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,aAAa;AAAA,IACb,MAAM;AAAA,IACN,KAAK;AAAA,I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W,cACX,sCAAsCA,EAAO,MAAM,MAC1DA,EAAO,WAAW,aACX,wCAAwCA,EAAO,QAAQ,MAC9DA,EAAO,WAAW,UACX,8DAA8DA,EAAO,OAAO,KAEhF,gBAAgBX,EAAiBW,EAAO,MAAM,KAAKT,EAAM,MAAM;AAAA,MACtF;AAAA,MACY,KAAK;AACD,eAAO,wCAAwCA,EAAM,OAAO;AAAA,MAChE,KAAK;AACD,eAAO,GAAGA,EAAM,KAAK,SAAS,IAAI,0BAA0B,kBAAkB,KAAKM,EAAgBN,EAAM,MAAM,IAAI,CAAC;AAAA,MACxH,KAAK;AACD,eAAO;AAAA,MACX,KAAK;AACD,eAAO;AAAA,MACX,KAAK;AACD,eAAO;AAAA,MACX;AACI,eAAO;AAAA,IACvB;AAAA,EACK;AACL;AACe,SAAAU,IAAY;AACvB,SAAO;AAAA,IACH,aAAahB,EAAO;AAAA,EACvB;AACL;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const r=require("../core/util.cjs"),l=()=>{const d={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function i(e){return d[e]??null}const u={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},a={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const n=a[e.expected]??e.expected,t=r.parsedType(e.input),o=a[t]??t;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${o}`:`Entrée invalide : attendu ${n}, reçu ${o}`}case"invalid_value":return e.values.length===1?`Entrée invalide : attendu ${r.stringifyPrimitive(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${r.joinValues(e.values,"|")}`;case"too_big":{const n=e.inclusive?"≤":"<",t=i(e.origin);return t?`Trop grand : attendu que ${e.origin??"la valeur"} ait ${n}${e.maximum.toString()} ${t.unit}`:`Trop grand : attendu que ${e.origin??"la valeur"} soit ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?"≥":">",t=i(e.origin);return t?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${t.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Chaîne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Chaîne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Chaîne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Chaîne invalide : doit correspondre au motif ${n.pattern}`:`${u[n.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${r.joinValues(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`;default:return"Entrée invalide"}}};function c(){return{localeError:l()}}module.exports=c;
|
|
2
|
+
//# sourceMappingURL=fr-CA.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fr-CA.cjs","sources":["../../../../../node_modules/zod/v4/locales/fr-CA.js"],"sourcesContent":["import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caractères\", verb: \"avoir\" },\n file: { unit: \"octets\", verb: \"avoir\" },\n array: { unit: \"éléments\", verb: \"avoir\" },\n set: { unit: \"éléments\", verb: \"avoir\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entrée\",\n email: \"adresse courriel\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"date-heure ISO\",\n date: \"date ISO\",\n time: \"heure ISO\",\n duration: \"durée ISO\",\n ipv4: \"adresse IPv4\",\n ipv6: \"adresse IPv6\",\n cidrv4: \"plage IPv4\",\n cidrv6: \"plage IPv6\",\n base64: \"chaîne encodée en base64\",\n base64url: \"chaîne encodée en base64url\",\n json_string: \"chaîne JSON\",\n e164: \"numéro E.164\",\n jwt: \"JWT\",\n template_literal: \"entrée\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Entrée invalide : attendu instanceof ${issue.expected}, reçu ${received}`;\n }\n return `Entrée invalide : attendu ${expected}, reçu ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entrée invalide : attendu ${util.stringifyPrimitive(issue.values[0])}`;\n return `Option invalide : attendu l'une des valeurs suivantes ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"≤\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Trop grand : attendu que ${issue.origin ?? \"la valeur\"} ait ${adj}${issue.maximum.toString()} ${sizing.unit}`;\n return `Trop grand : attendu que ${issue.origin ?? \"la valeur\"} soit ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"≥\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Trop petit : attendu que ${issue.origin} ait ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Trop petit : attendu que ${issue.origin} soit ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Chaîne invalide : doit commencer par \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Chaîne invalide : doit se terminer par \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Chaîne invalide : doit inclure \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Chaîne invalide : doit correspondre au motif ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} invalide`;\n }\n case \"not_multiple_of\":\n return `Nombre invalide : doit être un multiple de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Clé${issue.keys.length > 1 ? \"s\" : \"\"} non reconnue${issue.keys.length > 1 ? \"s\" : \"\"} : ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Clé invalide dans ${issue.origin}`;\n case \"invalid_union\":\n return \"Entrée invalide\";\n case \"invalid_element\":\n return `Valeur invalide dans ${issue.origin}`;\n default:\n return `Entrée invalide`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n"],"names":["error","Sizable","getSizing","origin","FormatDictionary","TypeDictionary","issue","expected","receivedType","util.parsedType","received","util.stringifyPrimitive","util.joinValues","adj","sizing","_issue","frCA"],"mappings":"iDACMA,EAAQ,IAAM,CAChB,MAAMC,EAAU,CACZ,OAAQ,CAAE,KAAM,aAAc,KAAM,OAAS,EAC7C,KAAM,CAAE,KAAM,SAAU,KAAM,OAAS,EACvC,MAAO,CAAE,KAAM,WAAY,KAAM,OAAS,EAC1C,IAAK,CAAE,KAAM,WAAY,KAAM,OAAS,CA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,EAAMP,EAAM,UAAY,IAAM,IAC9BQ,EAASZ,EAAUI,EAAM,MAAM,EACrC,OAAIQ,EACO,4BAA4BR,EAAM,MAAM,QAAQO,CAAG,GAAGP,EAAM,QAAQ,SAAU,CAAA,IAAIQ,EAAO,IAAI,GAEjG,4BAA4BR,EAAM,MAAM,SAASO,CAAG,GAAGP,EAAM,QAAQ,SAAQ,CAAE,EACtG,CACY,IAAK,iBAAkB,CACnB,MAAMS,EAAST,EACf,OAAIS,EAAO,SAAW,cACX,yCAAyCA,EAAO,MAAM,IAE7DA,EAAO,SAAW,YACX,2CAA2CA,EAAO,MAAM,IAC/DA,EAAO,SAAW,WACX,mCAAmCA,EAAO,QAAQ,IACzDA,EAAO,SAAW,QACX,gDAAgDA,EAAO,OAAO,GAClE,GAAGX,EAAiBW,EAAO,MAAM,GAAKT,EAAM,MAAM,WACzE,CACY,IAAK,kBACD,MAAO,8CAA8CA,EAAM,OAAO,GACtE,IAAK,oBACD,MAAO,MAAMA,EAAM,KAAK,OAAS,EAAI,IAAM,EAAE,gBAAgBA,EAAM,KAAK,OAAS,EAAI,IAAM,EAAE,MAAMM,EAAe,WAACN,EAAM,KAAM,IAAI,CAAC,GACxI,IAAK,cACD,MAAO,qBAAqBA,EAAM,MAAM,GAC5C,IAAK,gBACD,MAAO,kBACX,IAAK,kBACD,MAAO,wBAAwBA,EAAM,MAAM,GAC/C,QACI,MAAO,iBACvB,CACK,CACL,EACe,SAAAU,GAAY,CACvB,MAAO,CACH,YAAahB,EAAO,CACvB,CACL","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { joinValues as o, stringifyPrimitive as l, parsedType as c } from "../core/util.mjs";
|
|
2
|
+
const v = () => {
|
|
3
|
+
const d = {
|
|
4
|
+
string: { unit: "caractères", verb: "avoir" },
|
|
5
|
+
file: { unit: "octets", verb: "avoir" },
|
|
6
|
+
array: { unit: "éléments", verb: "avoir" },
|
|
7
|
+
set: { unit: "éléments", verb: "avoir" }
|
|
8
|
+
};
|
|
9
|
+
function r(e) {
|
|
10
|
+
return d[e] ?? null;
|
|
11
|
+
}
|
|
12
|
+
const u = {
|
|
13
|
+
regex: "entrée",
|
|
14
|
+
email: "adresse courriel",
|
|
15
|
+
url: "URL",
|
|
16
|
+
emoji: "emoji",
|
|
17
|
+
uuid: "UUID",
|
|
18
|
+
uuidv4: "UUIDv4",
|
|
19
|
+
uuidv6: "UUIDv6",
|
|
20
|
+
nanoid: "nanoid",
|
|
21
|
+
guid: "GUID",
|
|
22
|
+
cuid: "cuid",
|
|
23
|
+
cuid2: "cuid2",
|
|
24
|
+
ulid: "ULID",
|
|
25
|
+
xid: "XID",
|
|
26
|
+
ksuid: "KSUID",
|
|
27
|
+
datetime: "date-heure ISO",
|
|
28
|
+
date: "date ISO",
|
|
29
|
+
time: "heure ISO",
|
|
30
|
+
duration: "durée ISO",
|
|
31
|
+
ipv4: "adresse IPv4",
|
|
32
|
+
ipv6: "adresse IPv6",
|
|
33
|
+
cidrv4: "plage IPv4",
|
|
34
|
+
cidrv6: "plage IPv6",
|
|
35
|
+
base64: "chaîne encodée en base64",
|
|
36
|
+
base64url: "chaîne encodée en base64url",
|
|
37
|
+
json_string: "chaîne JSON",
|
|
38
|
+
e164: "numéro E.164",
|
|
39
|
+
jwt: "JWT",
|
|
40
|
+
template_literal: "entrée"
|
|
41
|
+
}, i = {
|
|
42
|
+
nan: "NaN"
|
|
43
|
+
};
|
|
44
|
+
return (e) => {
|
|
45
|
+
switch (e.code) {
|
|
46
|
+
case "invalid_type": {
|
|
47
|
+
const n = i[e.expected] ?? e.expected, t = c(e.input), a = i[t] ?? t;
|
|
48
|
+
return /^[A-Z]/.test(e.expected) ? `Entrée invalide : attendu instanceof ${e.expected}, reçu ${a}` : `Entrée invalide : attendu ${n}, reçu ${a}`;
|
|
49
|
+
}
|
|
50
|
+
case "invalid_value":
|
|
51
|
+
return e.values.length === 1 ? `Entrée invalide : attendu ${l(e.values[0])}` : `Option invalide : attendu l'une des valeurs suivantes ${o(e.values, "|")}`;
|
|
52
|
+
case "too_big": {
|
|
53
|
+
const n = e.inclusive ? "≤" : "<", t = r(e.origin);
|
|
54
|
+
return t ? `Trop grand : attendu que ${e.origin ?? "la valeur"} ait ${n}${e.maximum.toString()} ${t.unit}` : `Trop grand : attendu que ${e.origin ?? "la valeur"} soit ${n}${e.maximum.toString()}`;
|
|
55
|
+
}
|
|
56
|
+
case "too_small": {
|
|
57
|
+
const n = e.inclusive ? "≥" : ">", t = r(e.origin);
|
|
58
|
+
return t ? `Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${t.unit}` : `Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`;
|
|
59
|
+
}
|
|
60
|
+
case "invalid_format": {
|
|
61
|
+
const n = e;
|
|
62
|
+
return n.format === "starts_with" ? `Chaîne invalide : doit commencer par "${n.prefix}"` : n.format === "ends_with" ? `Chaîne invalide : doit se terminer par "${n.suffix}"` : n.format === "includes" ? `Chaîne invalide : doit inclure "${n.includes}"` : n.format === "regex" ? `Chaîne invalide : doit correspondre au motif ${n.pattern}` : `${u[n.format] ?? e.format} invalide`;
|
|
63
|
+
}
|
|
64
|
+
case "not_multiple_of":
|
|
65
|
+
return `Nombre invalide : doit être un multiple de ${e.divisor}`;
|
|
66
|
+
case "unrecognized_keys":
|
|
67
|
+
return `Clé${e.keys.length > 1 ? "s" : ""} non reconnue${e.keys.length > 1 ? "s" : ""} : ${o(e.keys, ", ")}`;
|
|
68
|
+
case "invalid_key":
|
|
69
|
+
return `Clé invalide dans ${e.origin}`;
|
|
70
|
+
case "invalid_union":
|
|
71
|
+
return "Entrée invalide";
|
|
72
|
+
case "invalid_element":
|
|
73
|
+
return `Valeur invalide dans ${e.origin}`;
|
|
74
|
+
default:
|
|
75
|
+
return "Entrée invalide";
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
function p() {
|
|
80
|
+
return {
|
|
81
|
+
localeError: v()
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
export {
|
|
85
|
+
p as default
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=fr-CA.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fr-CA.mjs","sources":["../../../../../node_modules/zod/v4/locales/fr-CA.js"],"sourcesContent":["import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caractères\", verb: \"avoir\" },\n file: { unit: \"octets\", verb: \"avoir\" },\n array: { unit: \"éléments\", verb: \"avoir\" },\n set: { unit: \"éléments\", verb: \"avoir\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entrée\",\n email: \"adresse courriel\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"date-heure ISO\",\n date: \"date ISO\",\n time: \"heure ISO\",\n duration: \"durée ISO\",\n ipv4: \"adresse IPv4\",\n ipv6: \"adresse IPv6\",\n cidrv4: \"plage IPv4\",\n cidrv6: \"plage IPv6\",\n base64: \"chaîne encodée en base64\",\n base64url: \"chaîne encodée en base64url\",\n json_string: \"chaîne JSON\",\n e164: \"numéro E.164\",\n jwt: \"JWT\",\n template_literal: \"entrée\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Entrée invalide : attendu instanceof ${issue.expected}, reçu ${received}`;\n }\n return `Entrée invalide : attendu ${expected}, reçu ${received}`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entrée invalide : attendu ${util.stringifyPrimitive(issue.values[0])}`;\n return `Option invalide : attendu l'une des valeurs suivantes ${util.joinValues(issue.values, \"|\")}`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"≤\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Trop grand : attendu que ${issue.origin ?? \"la valeur\"} ait ${adj}${issue.maximum.toString()} ${sizing.unit}`;\n return `Trop grand : attendu que ${issue.origin ?? \"la valeur\"} soit ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \"≥\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Trop petit : attendu que ${issue.origin} ait ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Trop petit : attendu que ${issue.origin} soit ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\") {\n return `Chaîne invalide : doit commencer par \"${_issue.prefix}\"`;\n }\n if (_issue.format === \"ends_with\")\n return `Chaîne invalide : doit se terminer par \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Chaîne invalide : doit inclure \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Chaîne invalide : doit correspondre au motif ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} invalide`;\n }\n case \"not_multiple_of\":\n return `Nombre invalide : doit être un multiple de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Clé${issue.keys.length > 1 ? \"s\" : \"\"} non reconnue${issue.keys.length > 1 ? \"s\" : \"\"} : ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Clé invalide dans ${issue.origin}`;\n case \"invalid_union\":\n return \"Entrée invalide\";\n case \"invalid_element\":\n return `Valeur invalide dans ${issue.origin}`;\n default:\n return `Entrée invalide`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n"],"names":["error","Sizable","getSizing","origin","FormatDictionary","TypeDictionary","issue","expected","receivedType","util.parsedType","received","util.stringifyPrimitive","util.joinValues","adj","sizing","_issue","frCA"],"mappings":";AACA,MAAMA,IAAQ,MAAM;AAChB,QAAMC,IAAU;AAAA,IACZ,QAAQ,EAAE,MAAM,cAAc,MAAM,QAAS;AAAA,IAC7C,MAAM,EAAE,MAAM,UAAU,MAAM,QAAS;AAAA,IACvC,OAAO,EAAE,MAAM,YAAY,MAAM,QAAS;AAAA,IAC1C,KAAK,EAAE,MAAM,YAAY,MAAM,QAAS;AAAA,EAC3C;AACD,WAASC,EAAUC,GAAQ;AACvB,WAAOF,EAAQE,CAAM,KAAK;AAAA,EAClC;AACI,QAAMC,IAAmB;AAAA,IACrB,OAAO;AAAA,IACP,OAAO;AAAA,IACP,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,MAAM;AAAA,IACN,KAAK;AAAA,IACL,OAAO;AAAA,IACP,UAAU;AAAA,IACV,MAAM;AAAA,IACN,MAAM;AAAA,IACN,UAAU;AAAA,IACV,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,aAAa;AAAA,IACb,MAAM;AAAA,IACN,KAAK;AAAA,IACL,kBAAkB;AAAA,EACrB,GACKC,IAAiB;AAAA,IACnB,KAAK;AAAA,EACR;AACD,SAAO,CAACC,MAAU;AACd,YAAQA,EAAM,MAAI;AAAA,MACd,KAAK,gBAAgB;AACjB,cAAMC,IAAWF,EAAeC,EAAM,QAAQ,KAAKA,EAAM,UACnDE,IAAeC,EAAgBH,EAAM,KAAK,GAC1CI,IAAWL,EAAeG,CAAY,KAAKA;AACjD,eAAI,SAAS,KAAKF,EAAM,QAAQ,I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AAK,SAAS,IAAI,MAAM,EAAE,gBAAgBA,EAAM,KAAK,SAAS,IAAI,MAAM,EAAE,MAAMM,EAAgBN,EAAM,MAAM,IAAI,CAAC;AAAA,MACxI,KAAK;AACD,eAAO,qBAAqBA,EAAM,MAAM;AAAA,MAC5C,KAAK;AACD,eAAO;AAAA,MACX,KAAK;AACD,eAAO,wBAAwBA,EAAM,MAAM;AAAA,MAC/C;AACI,eAAO;AAAA,IACvB;AAAA,EACK;AACL;AACe,SAAAU,IAAY;AACvB,SAAO;AAAA,IACH,aAAahB,EAAO;AAAA,EACvB;AACL;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const t=require("../core/util.cjs"),u=()=>{const d={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function i(e){return d[e]??null}const l={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},a={nan:"NaN",number:"nombre",array:"tableau"};return e=>{switch(e.code){case"invalid_type":{const n=a[e.expected]??e.expected,r=t.parsedType(e.input),o=a[r]??r;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instanceof ${e.expected} attendu, ${o} reçu`:`Entrée invalide : ${n} attendu, ${o} reçu`}case"invalid_value":return e.values.length===1?`Entrée invalide : ${t.stringifyPrimitive(e.values[0])} attendu`:`Option invalide : une valeur parmi ${t.joinValues(e.values,"|")} attendue`;case"too_big":{const n=e.inclusive?"<=":"<",r=i(e.origin);return r?`Trop grand : ${e.origin??"valeur"} doit ${r.verb} ${n}${e.maximum.toString()} ${r.unit??"élément(s)"}`:`Trop grand : ${e.origin??"valeur"} doit être ${n}${e.maximum.toString()}`}case"too_small":{const n=e.inclusive?">=":">",r=i(e.origin);return r?`Trop petit : ${e.origin} doit ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : ${e.origin} doit être ${n}${e.minimum.toString()}`}case"invalid_format":{const n=e;return n.format==="starts_with"?`Chaîne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Chaîne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Chaîne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${n.pattern}`:`${l[n.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${t.joinValues(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`;default:return"Entrée invalide"}}};function c(){return{localeError:u()}}module.exports=c;
|
|
2
|
+
//# sourceMappingURL=fr.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fr.cjs","sources":["../../../../../node_modules/zod/v4/locales/fr.js"],"sourcesContent":["import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caractères\", verb: \"avoir\" },\n file: { unit: \"octets\", verb: \"avoir\" },\n array: { unit: \"éléments\", verb: \"avoir\" },\n set: { unit: \"éléments\", verb: \"avoir\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entrée\",\n email: \"adresse e-mail\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"date et heure ISO\",\n date: \"date ISO\",\n time: \"heure ISO\",\n duration: \"durée ISO\",\n ipv4: \"adresse IPv4\",\n ipv6: \"adresse IPv6\",\n cidrv4: \"plage IPv4\",\n cidrv6: \"plage IPv6\",\n base64: \"chaîne encodée en base64\",\n base64url: \"chaîne encodée en base64url\",\n json_string: \"chaîne JSON\",\n e164: \"numéro E.164\",\n jwt: \"JWT\",\n template_literal: \"entrée\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"nombre\",\n array: \"tableau\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Entrée invalide : instanceof ${issue.expected} attendu, ${received} reçu`;\n }\n return `Entrée invalide : ${expected} attendu, ${received} reçu`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entrée invalide : ${util.stringifyPrimitive(issue.values[0])} attendu`;\n return `Option invalide : une valeur parmi ${util.joinValues(issue.values, \"|\")} attendue`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Trop grand : ${issue.origin ?? \"valeur\"} doit ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"élément(s)\"}`;\n return `Trop grand : ${issue.origin ?? \"valeur\"} doit être ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Trop petit : ${issue.origin} doit ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Trop petit : ${issue.origin} doit être ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Chaîne invalide : doit commencer par \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Chaîne invalide : doit se terminer par \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Chaîne invalide : doit inclure \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Chaîne invalide : doit correspondre au modèle ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} invalide`;\n }\n case \"not_multiple_of\":\n return `Nombre invalide : doit être un multiple de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Clé${issue.keys.length > 1 ? \"s\" : \"\"} non reconnue${issue.keys.length > 1 ? \"s\" : \"\"} : ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Clé invalide dans ${issue.origin}`;\n case \"invalid_union\":\n return \"Entrée invalide\";\n case \"invalid_element\":\n return `Valeur invalide dans ${issue.origin}`;\n default:\n return `Entrée invalide`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n"],"names":["error","Sizable","getSizing","origin","FormatDictionary","TypeDictionary","issue","expected","receivedType","util.parsedType","received","util.stringifyPrimitive","util.joinValues","adj","sizing","_issue","fr"],"mappings":"iDACMA,EAAQ,IAAM,CAChB,MAAMC,EAAU,CACZ,OAAQ,CAAE,KAAM,aAAc,KAAM,OAAS,EAC7C,KAAM,CAAE,KAAM,SAAU,KAAM,OAAS,EACvC,MAAO,CAAE,KAAM,WAAY,KAAM,OAAS,EAC1C,IAAK,CAAE,KAAM,WAAY,KAAM,OAAS,CAC3C,EACD,SAASC,EAAUC,EAAQ,CACvB,OAAOF,EAAQE,CAAM,GAAK,IAClC,CACI,MAAMC,EAAmB,CACrB,MAAO,SACP,MAAO,iBACP,IAAK,MACL,MAAO,QACP,KAAM,OACN,OAAQ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Q,EAAO,IAAI,IAAID,CAAG,GAAGP,EAAM,QAAQ,SAAQ,CAAE,IAAIQ,EAAO,IAAI,GAErG,gBAAgBR,EAAM,MAAM,cAAcO,CAAG,GAAGP,EAAM,QAAQ,SAAQ,CAAE,EAC/F,CACY,IAAK,iBAAkB,CACnB,MAAMS,EAAST,EACf,OAAIS,EAAO,SAAW,cACX,yCAAyCA,EAAO,MAAM,IAC7DA,EAAO,SAAW,YACX,2CAA2CA,EAAO,MAAM,IAC/DA,EAAO,SAAW,WACX,mCAAmCA,EAAO,QAAQ,IACzDA,EAAO,SAAW,QACX,iDAAiDA,EAAO,OAAO,GACnE,GAAGX,EAAiBW,EAAO,MAAM,GAAKT,EAAM,MAAM,WACzE,CACY,IAAK,kBACD,MAAO,8CAA8CA,EAAM,OAAO,GACtE,IAAK,oBACD,MAAO,MAAMA,EAAM,KAAK,OAAS,EAAI,IAAM,EAAE,gBAAgBA,EAAM,KAAK,OAAS,EAAI,IAAM,EAAE,MAAMM,EAAe,WAACN,EAAM,KAAM,IAAI,CAAC,GACxI,IAAK,cACD,MAAO,qBAAqBA,EAAM,MAAM,GAC5C,IAAK,gBACD,MAAO,kBACX,IAAK,kBACD,MAAO,wBAAwBA,EAAM,MAAM,GAC/C,QACI,MAAO,iBACvB,CACK,CACL,EACe,SAAAU,GAAY,CACvB,MAAO,CACH,YAAahB,EAAO,CACvB,CACL","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { joinValues as o, stringifyPrimitive as u, parsedType as c } from "../core/util.mjs";
|
|
2
|
+
const v = () => {
|
|
3
|
+
const d = {
|
|
4
|
+
string: { unit: "caractères", verb: "avoir" },
|
|
5
|
+
file: { unit: "octets", verb: "avoir" },
|
|
6
|
+
array: { unit: "éléments", verb: "avoir" },
|
|
7
|
+
set: { unit: "éléments", verb: "avoir" }
|
|
8
|
+
};
|
|
9
|
+
function t(e) {
|
|
10
|
+
return d[e] ?? null;
|
|
11
|
+
}
|
|
12
|
+
const l = {
|
|
13
|
+
regex: "entrée",
|
|
14
|
+
email: "adresse e-mail",
|
|
15
|
+
url: "URL",
|
|
16
|
+
emoji: "emoji",
|
|
17
|
+
uuid: "UUID",
|
|
18
|
+
uuidv4: "UUIDv4",
|
|
19
|
+
uuidv6: "UUIDv6",
|
|
20
|
+
nanoid: "nanoid",
|
|
21
|
+
guid: "GUID",
|
|
22
|
+
cuid: "cuid",
|
|
23
|
+
cuid2: "cuid2",
|
|
24
|
+
ulid: "ULID",
|
|
25
|
+
xid: "XID",
|
|
26
|
+
ksuid: "KSUID",
|
|
27
|
+
datetime: "date et heure ISO",
|
|
28
|
+
date: "date ISO",
|
|
29
|
+
time: "heure ISO",
|
|
30
|
+
duration: "durée ISO",
|
|
31
|
+
ipv4: "adresse IPv4",
|
|
32
|
+
ipv6: "adresse IPv6",
|
|
33
|
+
cidrv4: "plage IPv4",
|
|
34
|
+
cidrv6: "plage IPv6",
|
|
35
|
+
base64: "chaîne encodée en base64",
|
|
36
|
+
base64url: "chaîne encodée en base64url",
|
|
37
|
+
json_string: "chaîne JSON",
|
|
38
|
+
e164: "numéro E.164",
|
|
39
|
+
jwt: "JWT",
|
|
40
|
+
template_literal: "entrée"
|
|
41
|
+
}, i = {
|
|
42
|
+
nan: "NaN",
|
|
43
|
+
number: "nombre",
|
|
44
|
+
array: "tableau"
|
|
45
|
+
};
|
|
46
|
+
return (e) => {
|
|
47
|
+
switch (e.code) {
|
|
48
|
+
case "invalid_type": {
|
|
49
|
+
const n = i[e.expected] ?? e.expected, r = c(e.input), a = i[r] ?? r;
|
|
50
|
+
return /^[A-Z]/.test(e.expected) ? `Entrée invalide : instanceof ${e.expected} attendu, ${a} reçu` : `Entrée invalide : ${n} attendu, ${a} reçu`;
|
|
51
|
+
}
|
|
52
|
+
case "invalid_value":
|
|
53
|
+
return e.values.length === 1 ? `Entrée invalide : ${u(e.values[0])} attendu` : `Option invalide : une valeur parmi ${o(e.values, "|")} attendue`;
|
|
54
|
+
case "too_big": {
|
|
55
|
+
const n = e.inclusive ? "<=" : "<", r = t(e.origin);
|
|
56
|
+
return r ? `Trop grand : ${e.origin ?? "valeur"} doit ${r.verb} ${n}${e.maximum.toString()} ${r.unit ?? "élément(s)"}` : `Trop grand : ${e.origin ?? "valeur"} doit être ${n}${e.maximum.toString()}`;
|
|
57
|
+
}
|
|
58
|
+
case "too_small": {
|
|
59
|
+
const n = e.inclusive ? ">=" : ">", r = t(e.origin);
|
|
60
|
+
return r ? `Trop petit : ${e.origin} doit ${r.verb} ${n}${e.minimum.toString()} ${r.unit}` : `Trop petit : ${e.origin} doit être ${n}${e.minimum.toString()}`;
|
|
61
|
+
}
|
|
62
|
+
case "invalid_format": {
|
|
63
|
+
const n = e;
|
|
64
|
+
return n.format === "starts_with" ? `Chaîne invalide : doit commencer par "${n.prefix}"` : n.format === "ends_with" ? `Chaîne invalide : doit se terminer par "${n.suffix}"` : n.format === "includes" ? `Chaîne invalide : doit inclure "${n.includes}"` : n.format === "regex" ? `Chaîne invalide : doit correspondre au modèle ${n.pattern}` : `${l[n.format] ?? e.format} invalide`;
|
|
65
|
+
}
|
|
66
|
+
case "not_multiple_of":
|
|
67
|
+
return `Nombre invalide : doit être un multiple de ${e.divisor}`;
|
|
68
|
+
case "unrecognized_keys":
|
|
69
|
+
return `Clé${e.keys.length > 1 ? "s" : ""} non reconnue${e.keys.length > 1 ? "s" : ""} : ${o(e.keys, ", ")}`;
|
|
70
|
+
case "invalid_key":
|
|
71
|
+
return `Clé invalide dans ${e.origin}`;
|
|
72
|
+
case "invalid_union":
|
|
73
|
+
return "Entrée invalide";
|
|
74
|
+
case "invalid_element":
|
|
75
|
+
return `Valeur invalide dans ${e.origin}`;
|
|
76
|
+
default:
|
|
77
|
+
return "Entrée invalide";
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
function p() {
|
|
82
|
+
return {
|
|
83
|
+
localeError: v()
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export {
|
|
87
|
+
p as default
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=fr.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fr.mjs","sources":["../../../../../node_modules/zod/v4/locales/fr.js"],"sourcesContent":["import * as util from \"../core/util.js\";\nconst error = () => {\n const Sizable = {\n string: { unit: \"caractères\", verb: \"avoir\" },\n file: { unit: \"octets\", verb: \"avoir\" },\n array: { unit: \"éléments\", verb: \"avoir\" },\n set: { unit: \"éléments\", verb: \"avoir\" },\n };\n function getSizing(origin) {\n return Sizable[origin] ?? null;\n }\n const FormatDictionary = {\n regex: \"entrée\",\n email: \"adresse e-mail\",\n url: \"URL\",\n emoji: \"emoji\",\n uuid: \"UUID\",\n uuidv4: \"UUIDv4\",\n uuidv6: \"UUIDv6\",\n nanoid: \"nanoid\",\n guid: \"GUID\",\n cuid: \"cuid\",\n cuid2: \"cuid2\",\n ulid: \"ULID\",\n xid: \"XID\",\n ksuid: \"KSUID\",\n datetime: \"date et heure ISO\",\n date: \"date ISO\",\n time: \"heure ISO\",\n duration: \"durée ISO\",\n ipv4: \"adresse IPv4\",\n ipv6: \"adresse IPv6\",\n cidrv4: \"plage IPv4\",\n cidrv6: \"plage IPv6\",\n base64: \"chaîne encodée en base64\",\n base64url: \"chaîne encodée en base64url\",\n json_string: \"chaîne JSON\",\n e164: \"numéro E.164\",\n jwt: \"JWT\",\n template_literal: \"entrée\",\n };\n const TypeDictionary = {\n nan: \"NaN\",\n number: \"nombre\",\n array: \"tableau\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n const expected = TypeDictionary[issue.expected] ?? issue.expected;\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `Entrée invalide : instanceof ${issue.expected} attendu, ${received} reçu`;\n }\n return `Entrée invalide : ${expected} attendu, ${received} reçu`;\n }\n case \"invalid_value\":\n if (issue.values.length === 1)\n return `Entrée invalide : ${util.stringifyPrimitive(issue.values[0])} attendu`;\n return `Option invalide : une valeur parmi ${util.joinValues(issue.values, \"|\")} attendue`;\n case \"too_big\": {\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const sizing = getSizing(issue.origin);\n if (sizing)\n return `Trop grand : ${issue.origin ?? \"valeur\"} doit ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"élément(s)\"}`;\n return `Trop grand : ${issue.origin ?? \"valeur\"} doit être ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const adj = issue.inclusive ? \">=\" : \">\";\n const sizing = getSizing(issue.origin);\n if (sizing) {\n return `Trop petit : ${issue.origin} doit ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `Trop petit : ${issue.origin} doit être ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n if (_issue.format === \"starts_with\")\n return `Chaîne invalide : doit commencer par \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `Chaîne invalide : doit se terminer par \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `Chaîne invalide : doit inclure \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `Chaîne invalide : doit correspondre au modèle ${_issue.pattern}`;\n return `${FormatDictionary[_issue.format] ?? issue.format} invalide`;\n }\n case \"not_multiple_of\":\n return `Nombre invalide : doit être un multiple de ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `Clé${issue.keys.length > 1 ? \"s\" : \"\"} non reconnue${issue.keys.length > 1 ? \"s\" : \"\"} : ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\":\n return `Clé invalide dans ${issue.origin}`;\n case \"invalid_union\":\n return \"Entrée invalide\";\n case \"invalid_element\":\n return `Valeur invalide dans ${issue.origin}`;\n default:\n return `Entrée invalide`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n"],"names":["error","Sizable","getSizing","origin","FormatDictionary","TypeDictionary","issue","expected","receivedType","util.parsedType","received","util.stringifyPrimitive","util.joinValues","adj","sizing","_issue","fr"],"mappings":";AACA,MAAMA,IAAQ,MAAM;AAChB,QAAMC,IAAU;AAAA,IACZ,QAAQ,EAAE,MAAM,cAAc,MAAM,QAAS;AAAA,IAC7C,MAAM,EAAE,MAAM,UAAU,MAAM,QAAS;AAAA,IACvC,OAAO,EAAE,MAAM,YAAY,MAAM,QAAS;AAAA,IAC1C,KAAK,EAAE,MAAM,YAAY,MAAM,QAAS;AAAA,EAC3C;AACD,WAASC,EAAUC,GAAQ;AACvB,WAAOF,EAAQE,CAAM,KAAK;AAAA,EAClC;AACI,QAAMC,IAAmB;AAAA,IACrB,OAAO;AAAA,IACP,OAAO;AAAA,IACP,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,MAAM;AAAA,IACN,KAAK;AAAA,IACL,OAAO;AAAA,IACP,UAAU;AAAA,IACV,MAAM;AAAA,IACN,MAAM;AAAA,IACN,UAAU;AAAA,IACV,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,aAAa;AAAA,IACb,MAAM;AAAA,IACN,KAAK;AAAA,IACL,kBAAkB;AAAA,EACrB,GACKC,IAAiB;AAAA,IACnB,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,OAAO;AAAA,EACV;AACD,SAAO,CAACC,MAAU;AACd,YAAQA,EAAM,MAAI;AAAA,MACd,KAAK,gBAAgB;AACjB,cAAMC,IAAWF,EAAeC,EAAM,QAAQ,KAAKA,EAAM,UACnDE,IAAeC,EAAgBH,EAAM,KAAK,GAC1CI,IAAWL,EAAeG,CAAY,KAAKA;AACjD,eAAI,SAAS,KA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AO,8CAA8CA,EAAM,OAAO;AAAA,MACtE,KAAK;AACD,eAAO,MAAMA,EAAM,KAAK,SAAS,IAAI,MAAM,EAAE,gBAAgBA,EAAM,KAAK,SAAS,IAAI,MAAM,EAAE,MAAMM,EAAgBN,EAAM,MAAM,IAAI,CAAC;AAAA,MACxI,KAAK;AACD,eAAO,qBAAqBA,EAAM,MAAM;AAAA,MAC5C,KAAK;AACD,eAAO;AAAA,MACX,KAAK;AACD,eAAO,wBAAwBA,EAAM,MAAM;AAAA,MAC/C;AACI,eAAO;AAAA,IACvB;AAAA,EACK;AACL;AACe,SAAAU,IAAY;AACvB,SAAO;AAAA,IACH,aAAahB,EAAO;AAAA,EACvB;AACL;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const a=require("../core/util.cjs"),s=()=>{const o={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},f={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},d=e=>e?o[e]:void 0,c=e=>{const n=d(e);return n?n.label:e??o.unknown.label},m=e=>`ה${c(e)}`,b=e=>(d(e)?.gender??"m")==="f"?"צריכה להיות":"צריך להיות",u=e=>e?f[e]??null:null,v={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},$={nan:"NaN"};return e=>{switch(e.code){case"invalid_type":{const n=e.expected,r=$[n??""]??c(n),t=a.parsedType(e.input),l=$[t]??o[t]?.label??t;return/^[A-Z]/.test(e.expected)?`קלט לא תקין: צריך להיות instanceof ${e.expected}, התקבל ${l}`:`קלט לא תקין: צריך להיות ${r}, התקבל ${l}`}case"invalid_value":{if(e.values.length===1)return`ערך לא תקין: הערך חייב להיות ${a.stringifyPrimitive(e.values[0])}`;const n=e.values.map(l=>a.stringifyPrimitive(l));if(e.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${n[0]} או ${n[1]}`;const r=n[n.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${n.slice(0,-1).join(", ")} או ${r}`}case"too_big":{const n=u(e.origin),r=m(e.origin??"value");if(e.origin==="string")return`${n?.longLabel??"ארוך"} מדי: ${r} צריכה להכיל ${e.maximum.toString()} ${n?.unit??""} ${e.inclusive?"או פחות":"לכל היותר"}`.trim();if(e.origin==="number"){const i=e.inclusive?`קטן או שווה ל-${e.maximum}`:`קטן מ-${e.maximum}`;return`גדול מדי: ${r} צריך להיות ${i}`}if(e.origin==="array"||e.origin==="set"){const i=e.origin==="set"?"צריכה":"צריך",g=e.inclusive?`${e.maximum} ${n?.unit??""} או פחות`:`פחות מ-${e.maximum} ${n?.unit??""}`;return`גדול מדי: ${r} ${i} להכיל ${g}`.trim()}const t=e.inclusive?"<=":"<",l=b(e.origin??"value");return n?.unit?`${n.longLabel} מדי: ${r} ${l} ${t}${e.maximum.toString()} ${n.unit}`:`${n?.longLabel??"גדול"} מדי: ${r} ${l} ${t}${e.maximum.toString()}`}case"too_small":{const n=u(e.origin),r=m(e.origin??"value");if(e.origin==="string")return`${n?.shortLabel??"קצר"} מדי: ${r} צריכה להכיל ${e.minimum.toString()} ${n?.unit??""} ${e.inclusive?"או יותר":"לפחות"}`.trim();if(e.origin==="number"){const i=e.inclusive?`גדול או שווה ל-${e.minimum}`:`גדול מ-${e.minimum}`;return`קטן מדי: ${r} צריך להיות ${i}`}if(e.origin==="array"||e.origin==="set"){const i=e.origin==="set"?"צריכה":"צריך";if(e.minimum===1&&e.inclusive){const p=(e.origin==="set","לפחות פריט אחד");return`קטן מדי: ${r} ${i} להכיל ${p}`}const g=e.inclusive?`${e.minimum} ${n?.unit??""} או יותר`:`יותר מ-${e.minimum} ${n?.unit??""}`;return`קטן מדי: ${r} ${i} להכיל ${g}`.trim()}const t=e.inclusive?">=":">",l=b(e.origin??"value");return n?.unit?`${n.shortLabel} מדי: ${r} ${l} ${t}${e.minimum.toString()} ${n.unit}`:`${n?.shortLabel??"קטן"} מדי: ${r} ${l} ${t}${e.minimum.toString()}`}case"invalid_format":{const n=e;if(n.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${n.prefix}"`;if(n.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${n.suffix}"`;if(n.format==="includes")return`המחרוזת חייבת לכלול "${n.includes}"`;if(n.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${n.pattern}`;const r=v[n.format],t=r?.label??n.format,i=(r?.gender??"m")==="f"?"תקינה":"תקין";return`${t} לא ${i}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${e.divisor}`;case"unrecognized_keys":return`מפתח${e.keys.length>1?"ות":""} לא מזוה${e.keys.length>1?"ים":"ה"}: ${a.joinValues(e.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${m(e.origin??"array")}`;default:return"קלט לא תקין"}}};function y(){return{localeError:s()}}module.exports=y;
|
|
2
|
+
//# sourceMappingURL=he.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"he.cjs","sources":["../../../../../node_modules/zod/v4/locales/he.js"],"sourcesContent":["import * as util from \"../core/util.js\";\nconst error = () => {\n // Hebrew labels + grammatical gender\n const TypeNames = {\n string: { label: \"מחרוזת\", gender: \"f\" },\n number: { label: \"מספר\", gender: \"m\" },\n boolean: { label: \"ערך בוליאני\", gender: \"m\" },\n bigint: { label: \"BigInt\", gender: \"m\" },\n date: { label: \"תאריך\", gender: \"m\" },\n array: { label: \"מערך\", gender: \"m\" },\n object: { label: \"אובייקט\", gender: \"m\" },\n null: { label: \"ערך ריק (null)\", gender: \"m\" },\n undefined: { label: \"ערך לא מוגדר (undefined)\", gender: \"m\" },\n symbol: { label: \"סימבול (Symbol)\", gender: \"m\" },\n function: { label: \"פונקציה\", gender: \"f\" },\n map: { label: \"מפה (Map)\", gender: \"f\" },\n set: { label: \"קבוצה (Set)\", gender: \"f\" },\n file: { label: \"קובץ\", gender: \"m\" },\n promise: { label: \"Promise\", gender: \"m\" },\n NaN: { label: \"NaN\", gender: \"m\" },\n unknown: { label: \"ערך לא ידוע\", gender: \"m\" },\n value: { label: \"ערך\", gender: \"m\" },\n };\n // Sizing units for size-related messages + localized origin labels\n const Sizable = {\n string: { unit: \"תווים\", shortLabel: \"קצר\", longLabel: \"ארוך\" },\n file: { unit: \"בייטים\", shortLabel: \"קטן\", longLabel: \"גדול\" },\n array: { unit: \"פריטים\", shortLabel: \"קטן\", longLabel: \"גדול\" },\n set: { unit: \"פריטים\", shortLabel: \"קטן\", longLabel: \"גדול\" },\n number: { unit: \"\", shortLabel: \"קטן\", longLabel: \"גדול\" }, // no unit\n };\n // Helpers — labels, articles, and verbs\n const typeEntry = (t) => (t ? TypeNames[t] : undefined);\n const typeLabel = (t) => {\n const e = typeEntry(t);\n if (e)\n return e.label;\n // fallback: show raw string if unknown\n return t ?? TypeNames.unknown.label;\n };\n const withDefinite = (t) => `ה${typeLabel(t)}`;\n const verbFor = (t) => {\n const e = typeEntry(t);\n const gender = e?.gender ?? \"m\";\n return gender === \"f\" ? \"צריכה להיות\" : \"צריך להיות\";\n };\n const getSizing = (origin) => {\n if (!origin)\n return null;\n return Sizable[origin] ?? null;\n };\n const FormatDictionary = {\n regex: { label: \"קלט\", gender: \"m\" },\n email: { label: \"כתובת אימייל\", gender: \"f\" },\n url: { label: \"כתובת רשת\", gender: \"f\" },\n emoji: { label: \"אימוג'י\", gender: \"m\" },\n uuid: { label: \"UUID\", gender: \"m\" },\n nanoid: { label: \"nanoid\", gender: \"m\" },\n guid: { label: \"GUID\", gender: \"m\" },\n cuid: { label: \"cuid\", gender: \"m\" },\n cuid2: { label: \"cuid2\", gender: \"m\" },\n ulid: { label: \"ULID\", gender: \"m\" },\n xid: { label: \"XID\", gender: \"m\" },\n ksuid: { label: \"KSUID\", gender: \"m\" },\n datetime: { label: \"תאריך וזמן ISO\", gender: \"m\" },\n date: { label: \"תאריך ISO\", gender: \"m\" },\n time: { label: \"זמן ISO\", gender: \"m\" },\n duration: { label: \"משך זמן ISO\", gender: \"m\" },\n ipv4: { label: \"כתובת IPv4\", gender: \"f\" },\n ipv6: { label: \"כתובת IPv6\", gender: \"f\" },\n cidrv4: { label: \"טווח IPv4\", gender: \"m\" },\n cidrv6: { label: \"טווח IPv6\", gender: \"m\" },\n base64: { label: \"מחרוזת בבסיס 64\", gender: \"f\" },\n base64url: { label: \"מחרוזת בבסיס 64 לכתובות רשת\", gender: \"f\" },\n json_string: { label: \"מחרוזת JSON\", gender: \"f\" },\n e164: { label: \"מספר E.164\", gender: \"m\" },\n jwt: { label: \"JWT\", gender: \"m\" },\n ends_with: { label: \"קלט\", gender: \"m\" },\n includes: { label: \"קלט\", gender: \"m\" },\n lowercase: { label: \"קלט\", gender: \"m\" },\n starts_with: { label: \"קלט\", gender: \"m\" },\n uppercase: { label: \"קלט\", gender: \"m\" },\n };\n const TypeDictionary = {\n nan: \"NaN\",\n };\n return (issue) => {\n switch (issue.code) {\n case \"invalid_type\": {\n // Expected type: show without definite article for clearer Hebrew\n const expectedKey = issue.expected;\n const expected = TypeDictionary[expectedKey ?? \"\"] ?? typeLabel(expectedKey);\n // Received: show localized label if known, otherwise constructor/raw\n const receivedType = util.parsedType(issue.input);\n const received = TypeDictionary[receivedType] ?? TypeNames[receivedType]?.label ?? receivedType;\n if (/^[A-Z]/.test(issue.expected)) {\n return `קלט לא תקין: צריך להיות instanceof ${issue.expected}, התקבל ${received}`;\n }\n return `קלט לא תקין: צריך להיות ${expected}, התקבל ${received}`;\n }\n case \"invalid_value\": {\n if (issue.values.length === 1) {\n return `ערך לא תקין: הערך חייב להיות ${util.stringifyPrimitive(issue.values[0])}`;\n }\n // Join values with proper Hebrew formatting\n const stringified = issue.values.map((v) => util.stringifyPrimitive(v));\n if (issue.values.length === 2) {\n return `ערך לא תקין: האפשרויות המתאימות הן ${stringified[0]} או ${stringified[1]}`;\n }\n // For 3+ values: \"a\", \"b\" או \"c\"\n const lastValue = stringified[stringified.length - 1];\n const restValues = stringified.slice(0, -1).join(\", \");\n return `ערך לא תקין: האפשרויות המתאימות הן ${restValues} או ${lastValue}`;\n }\n case \"too_big\": {\n const sizing = getSizing(issue.origin);\n const subject = withDefinite(issue.origin ?? \"value\");\n if (issue.origin === \"string\") {\n // Special handling for strings - more natural Hebrew\n return `${sizing?.longLabel ?? \"ארוך\"} מדי: ${subject} צריכה להכיל ${issue.maximum.toString()} ${sizing?.unit ?? \"\"} ${issue.inclusive ? \"או פחות\" : \"לכל היותר\"}`.trim();\n }\n if (issue.origin === \"number\") {\n // Natural Hebrew for numbers\n const comparison = issue.inclusive ? `קטן או שווה ל-${issue.maximum}` : `קטן מ-${issue.maximum}`;\n return `גדול מדי: ${subject} צריך להיות ${comparison}`;\n }\n if (issue.origin === \"array\" || issue.origin === \"set\") {\n // Natural Hebrew for arrays and sets\n const verb = issue.origin === \"set\" ? \"צריכה\" : \"צריך\";\n const comparison = issue.inclusive\n ? `${issue.maximum} ${sizing?.unit ?? \"\"} או פחות`\n : `פחות מ-${issue.maximum} ${sizing?.unit ?? \"\"}`;\n return `גדול מדי: ${subject} ${verb} להכיל ${comparison}`.trim();\n }\n const adj = issue.inclusive ? \"<=\" : \"<\";\n const be = verbFor(issue.origin ?? \"value\");\n if (sizing?.unit) {\n return `${sizing.longLabel} מדי: ${subject} ${be} ${adj}${issue.maximum.toString()} ${sizing.unit}`;\n }\n return `${sizing?.longLabel ?? \"גדול\"} מדי: ${subject} ${be} ${adj}${issue.maximum.toString()}`;\n }\n case \"too_small\": {\n const sizing = getSizing(issue.origin);\n const subject = withDefinite(issue.origin ?? \"value\");\n if (issue.origin === \"string\") {\n // Special handling for strings - more natural Hebrew\n return `${sizing?.shortLabel ?? \"קצר\"} מדי: ${subject} צריכה להכיל ${issue.minimum.toString()} ${sizing?.unit ?? \"\"} ${issue.inclusive ? \"או יותר\" : \"לפחות\"}`.trim();\n }\n if (issue.origin === \"number\") {\n // Natural Hebrew for numbers\n const comparison = issue.inclusive ? `גדול או שווה ל-${issue.minimum}` : `גדול מ-${issue.minimum}`;\n return `קטן מדי: ${subject} צריך להיות ${comparison}`;\n }\n if (issue.origin === \"array\" || issue.origin === \"set\") {\n // Natural Hebrew for arrays and sets\n const verb = issue.origin === \"set\" ? \"צריכה\" : \"צריך\";\n // Special case for singular (minimum === 1)\n if (issue.minimum === 1 && issue.inclusive) {\n const singularPhrase = issue.origin === \"set\" ? \"לפחות פריט אחד\" : \"לפחות פריט אחד\";\n return `קטן מדי: ${subject} ${verb} להכיל ${singularPhrase}`;\n }\n const comparison = issue.inclusive\n ? `${issue.minimum} ${sizing?.unit ?? \"\"} או יותר`\n : `יותר מ-${issue.minimum} ${sizing?.unit ?? \"\"}`;\n return `קטן מדי: ${subject} ${verb} להכיל ${comparison}`.trim();\n }\n const adj = issue.inclusive ? \">=\" : \">\";\n const be = verbFor(issue.origin ?? \"value\");\n if (sizing?.unit) {\n return `${sizing.shortLabel} מדי: ${subject} ${be} ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n }\n return `${sizing?.shortLabel ?? \"קטן\"} מדי: ${subject} ${be} ${adj}${issue.minimum.toString()}`;\n }\n case \"invalid_format\": {\n const _issue = issue;\n // These apply to strings — use feminine grammar + ה׳ הידיעה\n if (_issue.format === \"starts_with\")\n return `המחרוזת חייבת להתחיל ב \"${_issue.prefix}\"`;\n if (_issue.format === \"ends_with\")\n return `המחרוזת חייבת להסתיים ב \"${_issue.suffix}\"`;\n if (_issue.format === \"includes\")\n return `המחרוזת חייבת לכלול \"${_issue.includes}\"`;\n if (_issue.format === \"regex\")\n return `המחרוזת חייבת להתאים לתבנית ${_issue.pattern}`;\n // Handle gender agreement for formats\n const nounEntry = FormatDictionary[_issue.format];\n const noun = nounEntry?.label ?? _issue.format;\n const gender = nounEntry?.gender ?? \"m\";\n const adjective = gender === \"f\" ? \"תקינה\" : \"תקין\";\n return `${noun} לא ${adjective}`;\n }\n case \"not_multiple_of\":\n return `מספר לא תקין: חייב להיות מכפלה של ${issue.divisor}`;\n case \"unrecognized_keys\":\n return `מפתח${issue.keys.length > 1 ? \"ות\" : \"\"} לא מזוה${issue.keys.length > 1 ? \"ים\" : \"ה\"}: ${util.joinValues(issue.keys, \", \")}`;\n case \"invalid_key\": {\n return `שדה לא תקין באובייקט`;\n }\n case \"invalid_union\":\n return \"קלט לא תקין\";\n case \"invalid_element\": {\n const place = withDefinite(issue.origin ?? \"array\");\n return `ערך לא תקין ב${place}`;\n }\n default:\n return `קלט לא תקין`;\n }\n };\n};\nexport default function () {\n return {\n localeError: error(),\n };\n}\n"],"names":["error","TypeNames","Sizable","typeEntry","t","typeLabel","e","withDefinite","verbFor","getSizing","origin","FormatDictionary","TypeDictionary","issue","expectedKey","expected","receivedType","util.parsedType","received","util.stringifyPrimitive","stringified","v","lastValue","sizing","subject","comparison","verb","adj","be","singularPhrase","_issue","nounEntry","noun","adjective","util.joinValues","he"],"mappings":"iDACMA,EAAQ,IAAM,CAEhB,MAAMC,EAAY,CACd,OAAQ,CAAE,MAAO,SAAU,OAAQ,GAAK,EACxC,OAAQ,CAAE,MAAO,OAAQ,OAAQ,GAAK,EACtC,QAAS,CAAE,MAAO,cAAe,OAAQ,GAAK,EAC9C,OAAQ,CAAE,MAAO,SAAU,OAAQ,GAAK,EACxC,KAAM,CAAE,MAAO,QAAS,OAAQ,GAAK,EACrC,MAAO,CAAE,MAAO,OAAQ,OAAQ,GAAK,EACrC,OAAQ,CAAE,MAAO,UAAW,OAAQ,GAAK,EACzC,KAAM,CAAE,MAAO,iBAAkB,OAAQ,GAAK,EAC9C,UAAW,CAAE,MAAO,2BAA4B,OAAQ,GAAK,EAC7D,OAAQ,CAAE,MAAO,kBAAmB,OAAQ,GAAK,EACjD,SAAU,CAAE,MAAO,UAAW,OAAQ,GAAK,EAC3C,IAAK,CAAE,MAAO,YAAa,OAAQ,GAAK,EACxC,IAAK,CAAE,M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AAO,CACvB,CACL","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { joinValues as s, stringifyPrimitive as u, parsedType as y } from "../core/util.mjs";
|
|
2
|
+
const h = () => {
|
|
3
|
+
const i = {
|
|
4
|
+
string: { label: "מחרוזת", gender: "f" },
|
|
5
|
+
number: { label: "מספר", gender: "m" },
|
|
6
|
+
boolean: { label: "ערך בוליאני", gender: "m" },
|
|
7
|
+
bigint: { label: "BigInt", gender: "m" },
|
|
8
|
+
date: { label: "תאריך", gender: "m" },
|
|
9
|
+
array: { label: "מערך", gender: "m" },
|
|
10
|
+
object: { label: "אובייקט", gender: "m" },
|
|
11
|
+
null: { label: "ערך ריק (null)", gender: "m" },
|
|
12
|
+
undefined: { label: "ערך לא מוגדר (undefined)", gender: "m" },
|
|
13
|
+
symbol: { label: "סימבול (Symbol)", gender: "m" },
|
|
14
|
+
function: { label: "פונקציה", gender: "f" },
|
|
15
|
+
map: { label: "מפה (Map)", gender: "f" },
|
|
16
|
+
set: { label: "קבוצה (Set)", gender: "f" },
|
|
17
|
+
file: { label: "קובץ", gender: "m" },
|
|
18
|
+
promise: { label: "Promise", gender: "m" },
|
|
19
|
+
NaN: { label: "NaN", gender: "m" },
|
|
20
|
+
unknown: { label: "ערך לא ידוע", gender: "m" },
|
|
21
|
+
value: { label: "ערך", gender: "m" }
|
|
22
|
+
}, f = {
|
|
23
|
+
string: { unit: "תווים", shortLabel: "קצר", longLabel: "ארוך" },
|
|
24
|
+
file: { unit: "בייטים", shortLabel: "קטן", longLabel: "גדול" },
|
|
25
|
+
array: { unit: "פריטים", shortLabel: "קטן", longLabel: "גדול" },
|
|
26
|
+
set: { unit: "פריטים", shortLabel: "קטן", longLabel: "גדול" },
|
|
27
|
+
number: { unit: "", shortLabel: "קטן", longLabel: "גדול" }
|
|
28
|
+
// no unit
|
|
29
|
+
}, g = (e) => e ? i[e] : void 0, d = (e) => {
|
|
30
|
+
const n = g(e);
|
|
31
|
+
return n ? n.label : e ?? i.unknown.label;
|
|
32
|
+
}, o = (e) => `ה${d(e)}`, c = (e) => (g(e)?.gender ?? "m") === "f" ? "צריכה להיות" : "צריך להיות", b = (e) => e ? f[e] ?? null : null, v = {
|
|
33
|
+
regex: { label: "קלט", gender: "m" },
|
|
34
|
+
email: { label: "כתובת אימייל", gender: "f" },
|
|
35
|
+
url: { label: "כתובת רשת", gender: "f" },
|
|
36
|
+
emoji: { label: "אימוג'י", gender: "m" },
|
|
37
|
+
uuid: { label: "UUID", gender: "m" },
|
|
38
|
+
nanoid: { label: "nanoid", gender: "m" },
|
|
39
|
+
guid: { label: "GUID", gender: "m" },
|
|
40
|
+
cuid: { label: "cuid", gender: "m" },
|
|
41
|
+
cuid2: { label: "cuid2", gender: "m" },
|
|
42
|
+
ulid: { label: "ULID", gender: "m" },
|
|
43
|
+
xid: { label: "XID", gender: "m" },
|
|
44
|
+
ksuid: { label: "KSUID", gender: "m" },
|
|
45
|
+
datetime: { label: "תאריך וזמן ISO", gender: "m" },
|
|
46
|
+
date: { label: "תאריך ISO", gender: "m" },
|
|
47
|
+
time: { label: "זמן ISO", gender: "m" },
|
|
48
|
+
duration: { label: "משך זמן ISO", gender: "m" },
|
|
49
|
+
ipv4: { label: "כתובת IPv4", gender: "f" },
|
|
50
|
+
ipv6: { label: "כתובת IPv6", gender: "f" },
|
|
51
|
+
cidrv4: { label: "טווח IPv4", gender: "m" },
|
|
52
|
+
cidrv6: { label: "טווח IPv6", gender: "m" },
|
|
53
|
+
base64: { label: "מחרוזת בבסיס 64", gender: "f" },
|
|
54
|
+
base64url: { label: "מחרוזת בבסיס 64 לכתובות רשת", gender: "f" },
|
|
55
|
+
json_string: { label: "מחרוזת JSON", gender: "f" },
|
|
56
|
+
e164: { label: "מספר E.164", gender: "m" },
|
|
57
|
+
jwt: { label: "JWT", gender: "m" },
|
|
58
|
+
ends_with: { label: "קלט", gender: "m" },
|
|
59
|
+
includes: { label: "קלט", gender: "m" },
|
|
60
|
+
lowercase: { label: "קלט", gender: "m" },
|
|
61
|
+
starts_with: { label: "קלט", gender: "m" },
|
|
62
|
+
uppercase: { label: "קלט", gender: "m" }
|
|
63
|
+
}, $ = {
|
|
64
|
+
nan: "NaN"
|
|
65
|
+
};
|
|
66
|
+
return (e) => {
|
|
67
|
+
switch (e.code) {
|
|
68
|
+
case "invalid_type": {
|
|
69
|
+
const n = e.expected, r = $[n ?? ""] ?? d(n), l = y(e.input), t = $[l] ?? i[l]?.label ?? l;
|
|
70
|
+
return /^[A-Z]/.test(e.expected) ? `קלט לא תקין: צריך להיות instanceof ${e.expected}, התקבל ${t}` : `קלט לא תקין: צריך להיות ${r}, התקבל ${t}`;
|
|
71
|
+
}
|
|
72
|
+
case "invalid_value": {
|
|
73
|
+
if (e.values.length === 1)
|
|
74
|
+
return `ערך לא תקין: הערך חייב להיות ${u(e.values[0])}`;
|
|
75
|
+
const n = e.values.map((t) => u(t));
|
|
76
|
+
if (e.values.length === 2)
|
|
77
|
+
return `ערך לא תקין: האפשרויות המתאימות הן ${n[0]} או ${n[1]}`;
|
|
78
|
+
const r = n[n.length - 1];
|
|
79
|
+
return `ערך לא תקין: האפשרויות המתאימות הן ${n.slice(0, -1).join(", ")} או ${r}`;
|
|
80
|
+
}
|
|
81
|
+
case "too_big": {
|
|
82
|
+
const n = b(e.origin), r = o(e.origin ?? "value");
|
|
83
|
+
if (e.origin === "string")
|
|
84
|
+
return `${n?.longLabel ?? "ארוך"} מדי: ${r} צריכה להכיל ${e.maximum.toString()} ${n?.unit ?? ""} ${e.inclusive ? "או פחות" : "לכל היותר"}`.trim();
|
|
85
|
+
if (e.origin === "number") {
|
|
86
|
+
const a = e.inclusive ? `קטן או שווה ל-${e.maximum}` : `קטן מ-${e.maximum}`;
|
|
87
|
+
return `גדול מדי: ${r} צריך להיות ${a}`;
|
|
88
|
+
}
|
|
89
|
+
if (e.origin === "array" || e.origin === "set") {
|
|
90
|
+
const a = e.origin === "set" ? "צריכה" : "צריך", m = e.inclusive ? `${e.maximum} ${n?.unit ?? ""} או פחות` : `פחות מ-${e.maximum} ${n?.unit ?? ""}`;
|
|
91
|
+
return `גדול מדי: ${r} ${a} להכיל ${m}`.trim();
|
|
92
|
+
}
|
|
93
|
+
const l = e.inclusive ? "<=" : "<", t = c(e.origin ?? "value");
|
|
94
|
+
return n?.unit ? `${n.longLabel} מדי: ${r} ${t} ${l}${e.maximum.toString()} ${n.unit}` : `${n?.longLabel ?? "גדול"} מדי: ${r} ${t} ${l}${e.maximum.toString()}`;
|
|
95
|
+
}
|
|
96
|
+
case "too_small": {
|
|
97
|
+
const n = b(e.origin), r = o(e.origin ?? "value");
|
|
98
|
+
if (e.origin === "string")
|
|
99
|
+
return `${n?.shortLabel ?? "קצר"} מדי: ${r} צריכה להכיל ${e.minimum.toString()} ${n?.unit ?? ""} ${e.inclusive ? "או יותר" : "לפחות"}`.trim();
|
|
100
|
+
if (e.origin === "number") {
|
|
101
|
+
const a = e.inclusive ? `גדול או שווה ל-${e.minimum}` : `גדול מ-${e.minimum}`;
|
|
102
|
+
return `קטן מדי: ${r} צריך להיות ${a}`;
|
|
103
|
+
}
|
|
104
|
+
if (e.origin === "array" || e.origin === "set") {
|
|
105
|
+
const a = e.origin === "set" ? "צריכה" : "צריך";
|
|
106
|
+
if (e.minimum === 1 && e.inclusive) {
|
|
107
|
+
const p = (e.origin === "set", "לפחות פריט אחד");
|
|
108
|
+
return `קטן מדי: ${r} ${a} להכיל ${p}`;
|
|
109
|
+
}
|
|
110
|
+
const m = e.inclusive ? `${e.minimum} ${n?.unit ?? ""} או יותר` : `יותר מ-${e.minimum} ${n?.unit ?? ""}`;
|
|
111
|
+
return `קטן מדי: ${r} ${a} להכיל ${m}`.trim();
|
|
112
|
+
}
|
|
113
|
+
const l = e.inclusive ? ">=" : ">", t = c(e.origin ?? "value");
|
|
114
|
+
return n?.unit ? `${n.shortLabel} מדי: ${r} ${t} ${l}${e.minimum.toString()} ${n.unit}` : `${n?.shortLabel ?? "קטן"} מדי: ${r} ${t} ${l}${e.minimum.toString()}`;
|
|
115
|
+
}
|
|
116
|
+
case "invalid_format": {
|
|
117
|
+
const n = e;
|
|
118
|
+
if (n.format === "starts_with")
|
|
119
|
+
return `המחרוזת חייבת להתחיל ב "${n.prefix}"`;
|
|
120
|
+
if (n.format === "ends_with")
|
|
121
|
+
return `המחרוזת חייבת להסתיים ב "${n.suffix}"`;
|
|
122
|
+
if (n.format === "includes")
|
|
123
|
+
return `המחרוזת חייבת לכלול "${n.includes}"`;
|
|
124
|
+
if (n.format === "regex")
|
|
125
|
+
return `המחרוזת חייבת להתאים לתבנית ${n.pattern}`;
|
|
126
|
+
const r = v[n.format], l = r?.label ?? n.format, a = (r?.gender ?? "m") === "f" ? "תקינה" : "תקין";
|
|
127
|
+
return `${l} לא ${a}`;
|
|
128
|
+
}
|
|
129
|
+
case "not_multiple_of":
|
|
130
|
+
return `מספר לא תקין: חייב להיות מכפלה של ${e.divisor}`;
|
|
131
|
+
case "unrecognized_keys":
|
|
132
|
+
return `מפתח${e.keys.length > 1 ? "ות" : ""} לא מזוה${e.keys.length > 1 ? "ים" : "ה"}: ${s(e.keys, ", ")}`;
|
|
133
|
+
case "invalid_key":
|
|
134
|
+
return "שדה לא תקין באובייקט";
|
|
135
|
+
case "invalid_union":
|
|
136
|
+
return "קלט לא תקין";
|
|
137
|
+
case "invalid_element":
|
|
138
|
+
return `ערך לא תקין ב${o(e.origin ?? "array")}`;
|
|
139
|
+
default:
|
|
140
|
+
return "קלט לא תקין";
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
function L() {
|
|
145
|
+
return {
|
|
146
|
+
localeError: h()
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
export {
|
|
150
|
+
L as default
|
|
151
|
+
};
|
|
152
|
+
//# sourceMappingURL=he.mjs.map
|