@btc-embedded/cdk-extensions 0.10.1 → 0.10.4
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/.jsii +40 -40
- package/CHANGELOG.md +11 -0
- package/lib/constructs/EventPipe.js +1 -1
- package/lib/constructs/S3Bucket.js +1 -1
- package/lib/constructs/SecureRestApi.js +1 -1
- package/lib/constructs/SecureRestApiV2.js +1 -1
- package/lib/extensions/ApiGatewayExtension.js +1 -1
- package/lib/extensions/ApplicationLoadBalancerExtension.js +1 -1
- package/lib/extensions/ApplicationLoadBalancerExtensionV2.js +1 -1
- package/lib/extensions/CloudMapExtension.js +1 -1
- package/lib/extensions/DeactivatableServiceExtension.js +1 -1
- package/lib/extensions/DocumentDbAccessExtension.js +3 -6
- package/lib/extensions/DomainEventMessagingExtension.js +1 -1
- package/lib/extensions/ExtraContainerExtension.js +1 -1
- package/lib/extensions/HTTPApiExtension.js +1 -1
- package/lib/extensions/LogExtension.js +3 -4
- package/lib/extensions/ModifyContainerDefinitionExtension.js +1 -1
- package/lib/extensions/ModifyTaskDefinitionExtension.js +1 -1
- package/lib/extensions/OpenTelemetryExtension.js +1 -1
- package/lib/extensions/PostgresDbAccessExtension.js +3 -6
- package/lib/extensions/SharedVolumeExtension.js +5 -4
- package/lib/extensions/TcpKeepAliveExtension.js +3 -6
- package/lib/platform/ApiGateway.js +1 -1
- package/lib/platform/ApiGatewayV2.js +2 -2
- package/lib/platform/ApplicationLoadBalancer.js +1 -1
- package/lib/platform/ApplicationLoadBalancerV2.js +2 -2
- package/lib/platform/CognitoUserPool.js +2 -2
- package/lib/platform/DefaultUserPoolClients.js +1 -1
- package/lib/platform/DocumentDB.js +2 -2
- package/lib/platform/PrivateDnsNamespace.js +1 -1
- package/lib/platform/ResourceServer.js +1 -1
- package/lib/platform/Vpc.js +1 -1
- package/lib/utils/StackParameter.js +1 -1
- package/lib/utils/functions.d.ts +12 -2
- package/lib/utils/functions.js +23 -6
- package/node_modules/yaml/README.md +2 -0
- package/node_modules/yaml/browser/dist/compose/compose-collection.js +2 -2
- package/node_modules/yaml/browser/dist/compose/resolve-props.js +2 -4
- package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +1 -2
- package/node_modules/yaml/browser/dist/doc/anchors.js +1 -2
- package/node_modules/yaml/browser/dist/doc/createNode.js +1 -2
- package/node_modules/yaml/browser/dist/nodes/Alias.js +24 -11
- package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +1 -1
- package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +1 -0
- package/node_modules/yaml/browser/dist/parse/parser.js +14 -1
- package/node_modules/yaml/browser/dist/schema/tags.js +3 -3
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +3 -2
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +1 -1
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +1 -1
- package/node_modules/yaml/browser/dist/stringify/stringify.js +3 -4
- package/node_modules/yaml/browser/dist/stringify/stringifyString.js +3 -4
- package/node_modules/yaml/dist/cli.d.ts +1 -1
- package/node_modules/yaml/dist/cli.mjs +5 -3
- package/node_modules/yaml/dist/compose/compose-collection.js +2 -2
- package/node_modules/yaml/dist/compose/composer.js +1 -1
- package/node_modules/yaml/dist/compose/resolve-props.js +2 -4
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +1 -2
- package/node_modules/yaml/dist/doc/anchors.js +1 -2
- package/node_modules/yaml/dist/doc/createNode.js +1 -2
- package/node_modules/yaml/dist/log.js +1 -1
- package/node_modules/yaml/dist/nodes/Alias.d.ts +1 -1
- package/node_modules/yaml/dist/nodes/Alias.js +23 -10
- package/node_modules/yaml/dist/nodes/addPairToJSMap.js +1 -0
- package/node_modules/yaml/dist/nodes/toJS.d.ts +2 -0
- package/node_modules/yaml/dist/parse/parser.js +15 -2
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +4 -3
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +1 -1
- package/node_modules/yaml/dist/stringify/stringify.js +3 -4
- package/node_modules/yaml/dist/stringify/stringifyString.js +2 -3
- package/node_modules/yaml/package.json +2 -2
- package/node_modules/zod/LICENSE +1 -1
- package/node_modules/zod/README.md +105 -2971
- package/node_modules/zod/{lib/external.js → dist/cjs/index.js} +6 -6
- package/node_modules/zod/dist/cjs/package.json +3 -0
- package/node_modules/zod/{lib → dist/cjs/v3}/ZodError.js +3 -3
- package/node_modules/zod/{lib → dist/cjs/v3}/benchmarks/datetime.js +1 -1
- package/node_modules/zod/{lib → dist/cjs/v3}/benchmarks/discriminatedUnion.js +15 -15
- package/node_modules/zod/dist/cjs/v3/benchmarks/index.js +59 -0
- package/node_modules/zod/{lib → dist/cjs/v3}/benchmarks/object.js +11 -11
- package/node_modules/zod/{lib → dist/cjs/v3}/benchmarks/primitives.js +22 -33
- package/node_modules/zod/{lib → dist/cjs/v3}/benchmarks/realworld.js +12 -12
- package/node_modules/zod/{lib → dist/cjs/v3}/benchmarks/string.js +5 -5
- package/node_modules/zod/{lib → dist/cjs/v3}/benchmarks/union.js +15 -15
- package/node_modules/zod/{lib → dist/cjs/v3}/errors.js +6 -6
- package/node_modules/zod/dist/cjs/v3/external.js +22 -0
- package/node_modules/zod/{lib → dist/cjs/v3}/helpers/errorUtil.js +2 -1
- package/node_modules/zod/{lib → dist/cjs/v3}/helpers/parseUtil.js +7 -8
- package/node_modules/zod/{lib → dist/cjs/v3}/helpers/util.js +5 -10
- package/node_modules/zod/{lib → dist/cjs/v3}/index.js +2 -2
- package/node_modules/zod/{lib → dist/cjs/v3}/locales/en.js +30 -50
- package/node_modules/zod/{lib → dist/cjs/v3}/types.js +466 -539
- package/node_modules/zod/dist/cjs/v4/classic/checks.js +32 -0
- package/node_modules/zod/dist/cjs/v4/classic/coerce.js +47 -0
- package/node_modules/zod/dist/cjs/v4/classic/compat.js +63 -0
- package/node_modules/zod/dist/cjs/v4/classic/errors.js +67 -0
- package/node_modules/zod/dist/cjs/v4/classic/external.js +69 -0
- package/node_modules/zod/dist/cjs/v4/classic/index.js +33 -0
- package/node_modules/zod/dist/cjs/v4/classic/iso.js +60 -0
- package/node_modules/zod/dist/cjs/v4/classic/parse.js +32 -0
- package/node_modules/zod/dist/cjs/v4/classic/schemas.js +1100 -0
- package/node_modules/zod/dist/cjs/v4/core/api.js +1021 -0
- package/node_modules/zod/dist/cjs/v4/core/checks.js +580 -0
- package/node_modules/zod/dist/cjs/v4/core/config.js +10 -0
- package/node_modules/zod/dist/cjs/v4/core/core.js +63 -0
- package/node_modules/zod/dist/cjs/v4/core/doc.js +39 -0
- package/node_modules/zod/dist/cjs/v4/core/errors.js +222 -0
- package/node_modules/zod/dist/cjs/v4/core/function.js +102 -0
- package/node_modules/zod/dist/cjs/v4/core/index.js +44 -0
- package/node_modules/zod/dist/cjs/v4/core/json-schema.js +2 -0
- package/node_modules/zod/dist/cjs/v4/core/parse.js +87 -0
- package/node_modules/zod/dist/cjs/v4/core/regexes.js +103 -0
- package/node_modules/zod/dist/cjs/v4/core/registries.js +47 -0
- package/node_modules/zod/dist/cjs/v4/core/schemas.js +1719 -0
- package/node_modules/zod/dist/cjs/v4/core/standard-schema.js +2 -0
- package/node_modules/zod/dist/cjs/v4/core/to-json-schema.js +833 -0
- package/node_modules/zod/dist/cjs/v4/core/util.js +537 -0
- package/node_modules/zod/dist/cjs/v4/core/versions.js +8 -0
- package/node_modules/zod/dist/cjs/v4/core/zsf.js +172 -0
- package/node_modules/zod/dist/cjs/v4/index.js +22 -0
- package/node_modules/zod/dist/cjs/v4/locales/ar.js +142 -0
- package/node_modules/zod/dist/cjs/v4/locales/az.js +141 -0
- package/node_modules/zod/dist/cjs/v4/locales/be.js +190 -0
- package/node_modules/zod/dist/cjs/v4/locales/ca.js +144 -0
- package/node_modules/zod/dist/cjs/v4/locales/cs.js +161 -0
- package/node_modules/zod/dist/cjs/v4/locales/de.js +142 -0
- package/node_modules/zod/dist/cjs/v4/locales/en.js +145 -0
- package/node_modules/zod/dist/cjs/v4/locales/es.js +143 -0
- package/node_modules/zod/dist/cjs/v4/locales/fa.js +148 -0
- package/node_modules/zod/dist/cjs/v4/locales/fi.js +148 -0
- package/node_modules/zod/dist/cjs/v4/locales/fr-CA.js +143 -0
- package/node_modules/zod/dist/cjs/v4/locales/fr.js +142 -0
- package/node_modules/zod/dist/cjs/v4/locales/he.js +143 -0
- package/node_modules/zod/dist/cjs/v4/locales/hu.js +143 -0
- package/node_modules/zod/dist/cjs/v4/locales/id.js +142 -0
- package/node_modules/zod/dist/cjs/v4/locales/index.js +82 -0
- package/node_modules/zod/dist/cjs/v4/locales/it.js +143 -0
- package/node_modules/zod/dist/cjs/v4/locales/ja.js +141 -0
- package/node_modules/zod/dist/cjs/v4/locales/kh.js +143 -0
- package/node_modules/zod/dist/cjs/v4/locales/ko.js +147 -0
- package/node_modules/zod/dist/cjs/v4/locales/mk.js +144 -0
- package/node_modules/zod/dist/cjs/v4/locales/ms.js +142 -0
- package/node_modules/zod/dist/cjs/v4/locales/nl.js +143 -0
- package/node_modules/zod/dist/cjs/v4/locales/no.js +142 -0
- package/node_modules/zod/dist/cjs/v4/locales/ota.js +143 -0
- package/node_modules/zod/dist/cjs/v4/locales/pl.js +143 -0
- package/node_modules/zod/dist/cjs/v4/locales/ps.js +148 -0
- package/node_modules/zod/dist/cjs/v4/locales/pt.js +142 -0
- package/node_modules/zod/dist/cjs/v4/locales/ru.js +190 -0
- package/node_modules/zod/dist/cjs/v4/locales/sl.js +143 -0
- package/node_modules/zod/dist/cjs/v4/locales/sv.js +144 -0
- package/node_modules/zod/dist/cjs/v4/locales/ta.js +143 -0
- package/node_modules/zod/dist/cjs/v4/locales/th.js +143 -0
- package/node_modules/zod/dist/cjs/v4/locales/tr.js +143 -0
- package/node_modules/zod/dist/cjs/v4/locales/ua.js +143 -0
- package/node_modules/zod/dist/cjs/v4/locales/ur.js +143 -0
- package/node_modules/zod/dist/cjs/v4/locales/vi.js +142 -0
- package/node_modules/zod/dist/cjs/v4/locales/zh-CN.js +142 -0
- package/node_modules/zod/dist/cjs/v4/locales/zh-TW.js +143 -0
- package/node_modules/zod/dist/cjs/v4/mini/checks.js +34 -0
- package/node_modules/zod/dist/cjs/v4/mini/coerce.js +47 -0
- package/node_modules/zod/dist/cjs/v4/mini/external.js +61 -0
- package/node_modules/zod/dist/cjs/v4/mini/index.js +32 -0
- package/node_modules/zod/dist/cjs/v4/mini/iso.js +60 -0
- package/node_modules/zod/dist/cjs/v4/mini/parse.js +8 -0
- package/node_modules/zod/dist/cjs/v4/mini/schemas.js +831 -0
- package/node_modules/zod/dist/esm/index.js +3 -0
- package/node_modules/zod/dist/esm/package.json +3 -0
- package/node_modules/zod/dist/esm/v3/ZodError.js +132 -0
- package/node_modules/zod/dist/esm/v3/benchmarks/datetime.js +49 -0
- package/node_modules/zod/dist/esm/v3/benchmarks/discriminatedUnion.js +74 -0
- package/node_modules/zod/dist/esm/v3/benchmarks/index.js +54 -0
- package/node_modules/zod/dist/esm/v3/benchmarks/ipv4.js +49 -0
- package/node_modules/zod/dist/esm/v3/benchmarks/object.js +65 -0
- package/node_modules/zod/dist/esm/v3/benchmarks/primitives.js +154 -0
- package/node_modules/zod/dist/esm/v3/benchmarks/realworld.js +51 -0
- package/node_modules/zod/dist/esm/v3/benchmarks/string.js +50 -0
- package/node_modules/zod/dist/esm/v3/benchmarks/union.js +74 -0
- package/node_modules/zod/dist/esm/v3/errors.js +9 -0
- package/node_modules/zod/dist/esm/v3/external.js +6 -0
- package/node_modules/zod/dist/esm/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/dist/esm/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/dist/esm/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/dist/esm/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/dist/esm/v3/helpers/util.js +133 -0
- package/node_modules/zod/dist/esm/v3/index.js +4 -0
- package/node_modules/zod/dist/esm/v3/locales/en.js +107 -0
- package/node_modules/zod/dist/esm/v3/standard-schema.js +1 -0
- package/node_modules/zod/dist/esm/v3/tests/Mocker.js +53 -0
- package/node_modules/zod/{lib/index.mjs → dist/esm/v3/types.js} +148 -862
- package/node_modules/zod/dist/esm/v4/classic/checks.js +1 -0
- package/node_modules/zod/dist/esm/v4/classic/coerce.js +17 -0
- package/node_modules/zod/dist/esm/v4/classic/compat.js +33 -0
- package/node_modules/zod/dist/esm/v4/classic/errors.js +41 -0
- package/node_modules/zod/dist/esm/v4/classic/external.js +18 -0
- package/node_modules/zod/dist/esm/v4/classic/index.js +4 -0
- package/node_modules/zod/dist/esm/v4/classic/iso.js +30 -0
- package/node_modules/zod/dist/esm/v4/classic/parse.js +6 -0
- package/node_modules/zod/dist/esm/v4/classic/schemas.js +998 -0
- package/node_modules/zod/dist/esm/v4/core/api.js +889 -0
- package/node_modules/zod/dist/esm/v4/core/checks.js +554 -0
- package/node_modules/zod/dist/esm/v4/core/config.js +6 -0
- package/node_modules/zod/dist/esm/v4/core/core.js +57 -0
- package/node_modules/zod/dist/esm/v4/core/doc.js +35 -0
- package/node_modules/zod/dist/esm/v4/core/errors.js +191 -0
- package/node_modules/zod/dist/esm/v4/core/function.js +75 -0
- package/node_modules/zod/dist/esm/v4/core/index.js +15 -0
- package/node_modules/zod/dist/esm/v4/core/json-schema.js +1 -0
- package/node_modules/zod/dist/esm/v4/core/parse.js +57 -0
- package/node_modules/zod/dist/esm/v4/core/regexes.js +95 -0
- package/node_modules/zod/dist/esm/v4/core/registries.js +42 -0
- package/node_modules/zod/dist/esm/v4/core/schemas.js +1688 -0
- package/node_modules/zod/dist/esm/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/dist/esm/v4/core/to-json-schema.js +828 -0
- package/node_modules/zod/dist/esm/v4/core/util.js +491 -0
- package/node_modules/zod/dist/esm/v4/core/versions.js +5 -0
- package/node_modules/zod/dist/esm/v4/core/zsf.js +171 -0
- package/node_modules/zod/dist/esm/v4/index.js +3 -0
- package/node_modules/zod/dist/esm/v4/locales/ar.js +116 -0
- package/node_modules/zod/dist/esm/v4/locales/az.js +115 -0
- package/node_modules/zod/dist/esm/v4/locales/be.js +164 -0
- package/node_modules/zod/dist/esm/v4/locales/ca.js +118 -0
- package/node_modules/zod/dist/esm/v4/locales/cs.js +135 -0
- package/node_modules/zod/dist/esm/v4/locales/de.js +116 -0
- package/node_modules/zod/dist/esm/v4/locales/en.js +117 -0
- package/node_modules/zod/dist/esm/v4/locales/es.js +117 -0
- package/node_modules/zod/dist/esm/v4/locales/fa.js +122 -0
- package/node_modules/zod/dist/esm/v4/locales/fi.js +122 -0
- package/node_modules/zod/dist/esm/v4/locales/fr-CA.js +117 -0
- package/node_modules/zod/dist/esm/v4/locales/fr.js +116 -0
- package/node_modules/zod/dist/esm/v4/locales/he.js +117 -0
- package/node_modules/zod/dist/esm/v4/locales/hu.js +117 -0
- package/node_modules/zod/dist/esm/v4/locales/id.js +116 -0
- package/node_modules/zod/dist/esm/v4/locales/index.js +38 -0
- package/node_modules/zod/dist/esm/v4/locales/it.js +117 -0
- package/node_modules/zod/dist/esm/v4/locales/ja.js +115 -0
- package/node_modules/zod/dist/esm/v4/locales/kh.js +117 -0
- package/node_modules/zod/dist/esm/v4/locales/ko.js +121 -0
- package/node_modules/zod/dist/esm/v4/locales/mk.js +118 -0
- package/node_modules/zod/dist/esm/v4/locales/ms.js +116 -0
- package/node_modules/zod/dist/esm/v4/locales/nl.js +117 -0
- package/node_modules/zod/dist/esm/v4/locales/no.js +116 -0
- package/node_modules/zod/dist/esm/v4/locales/ota.js +117 -0
- package/node_modules/zod/dist/esm/v4/locales/pl.js +117 -0
- package/node_modules/zod/dist/esm/v4/locales/ps.js +122 -0
- package/node_modules/zod/dist/esm/v4/locales/pt.js +116 -0
- package/node_modules/zod/dist/esm/v4/locales/ru.js +164 -0
- package/node_modules/zod/dist/esm/v4/locales/sl.js +117 -0
- package/node_modules/zod/dist/esm/v4/locales/sv.js +118 -0
- package/node_modules/zod/dist/esm/v4/locales/ta.js +117 -0
- package/node_modules/zod/dist/esm/v4/locales/th.js +117 -0
- package/node_modules/zod/dist/esm/v4/locales/tr.js +115 -0
- package/node_modules/zod/dist/esm/v4/locales/ua.js +117 -0
- package/node_modules/zod/dist/esm/v4/locales/ur.js +117 -0
- package/node_modules/zod/dist/esm/v4/locales/vi.js +116 -0
- package/node_modules/zod/dist/esm/v4/locales/zh-CN.js +116 -0
- package/node_modules/zod/dist/esm/v4/locales/zh-TW.js +117 -0
- package/node_modules/zod/dist/esm/v4/mini/checks.js +1 -0
- package/node_modules/zod/dist/esm/v4/mini/coerce.js +17 -0
- package/node_modules/zod/dist/esm/v4/mini/external.js +13 -0
- package/node_modules/zod/dist/esm/v4/mini/index.js +3 -0
- package/node_modules/zod/dist/esm/v4/mini/iso.js +30 -0
- package/node_modules/zod/dist/esm/v4/mini/parse.js +1 -0
- package/node_modules/zod/dist/esm/v4/mini/schemas.js +725 -0
- package/node_modules/zod/dist/types/index.d.ts +3 -0
- package/node_modules/zod/dist/types/package.json +3 -0
- package/node_modules/zod/{lib → dist/types/v3}/ZodError.d.ts +7 -7
- package/node_modules/zod/dist/types/v3/benchmarks/index.d.ts +1 -0
- package/node_modules/zod/{lib → dist/types/v3}/errors.d.ts +2 -2
- package/node_modules/zod/dist/types/v3/external.d.ts +6 -0
- package/node_modules/zod/{lib → dist/types/v3}/helpers/errorUtil.d.ts +1 -1
- package/node_modules/zod/{lib → dist/types/v3}/helpers/parseUtil.d.ts +4 -4
- package/node_modules/zod/{lib → dist/types/v3}/helpers/partialUtil.d.ts +1 -1
- package/node_modules/zod/{lib → dist/types/v3}/helpers/util.d.ts +14 -11
- package/node_modules/zod/dist/types/v3/index.d.ts +4 -0
- package/node_modules/zod/{lib → dist/types/v3}/locales/en.d.ts +1 -1
- package/node_modules/zod/{lib/__tests__ → dist/types/v3/tests}/Mocker.d.ts +6 -6
- package/node_modules/zod/{lib → dist/types/v3}/types.d.ts +120 -151
- package/node_modules/zod/dist/types/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/dist/types/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/dist/types/v4/classic/compat.d.ts +48 -0
- package/node_modules/zod/dist/types/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/dist/types/v4/classic/external.d.ts +13 -0
- package/node_modules/zod/dist/types/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/dist/types/v4/classic/parse.d.ts +23 -0
- package/node_modules/zod/dist/types/v4/classic/schemas.d.ts +624 -0
- package/node_modules/zod/dist/types/v4/core/api.d.ts +281 -0
- package/node_modules/zod/dist/types/v4/core/checks.d.ts +277 -0
- package/node_modules/zod/dist/types/v4/core/config.d.ts +9 -0
- package/node_modules/zod/dist/types/v4/core/core.d.ts +47 -0
- package/node_modules/zod/dist/types/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/dist/types/v4/core/errors.d.ts +204 -0
- package/node_modules/zod/dist/types/v4/core/function.d.ts +52 -0
- package/node_modules/zod/dist/types/v4/core/index.d.ts +15 -0
- package/node_modules/zod/dist/types/v4/core/json-schema.d.ts +87 -0
- package/node_modules/zod/dist/types/v4/core/parse.d.ts +25 -0
- package/node_modules/zod/dist/types/v4/core/regexes.d.ts +62 -0
- package/node_modules/zod/dist/types/v4/core/registries.d.ts +39 -0
- package/node_modules/zod/dist/types/v4/core/schemas.d.ts +1005 -0
- package/node_modules/zod/dist/types/v4/core/standard-schema.d.ts +55 -0
- package/node_modules/zod/dist/types/v4/core/to-json-schema.d.ts +84 -0
- package/node_modules/zod/dist/types/v4/core/util.d.ts +183 -0
- package/node_modules/zod/dist/types/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/dist/types/v4/core/zsf.d.ts +91 -0
- package/node_modules/zod/dist/types/v4/index.d.ts +3 -0
- package/node_modules/zod/dist/types/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/en.d.ts +5 -0
- package/node_modules/zod/dist/types/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/index.d.ts +38 -0
- package/node_modules/zod/dist/types/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/kh.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/tr.d.ts +5 -0
- package/node_modules/zod/dist/types/v4/locales/ua.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/dist/types/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/dist/types/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/dist/types/v4/mini/external.d.ts +11 -0
- package/node_modules/zod/dist/types/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/dist/types/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/dist/types/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/dist/types/v4/mini/schemas.d.ts +351 -0
- package/node_modules/zod/package.json +105 -107
- package/node_modules/zod/v3/index.d.ts +3 -0
- package/node_modules/zod/v3/index.js +1 -0
- package/node_modules/zod/v4/core/index.d.ts +1 -0
- package/node_modules/zod/v4/core/index.js +1 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +1 -0
- package/node_modules/zod/v4/locales/en.d.ts +2 -0
- package/node_modules/zod/v4/locales/en.js +2 -0
- package/node_modules/zod/v4/locales/index.d.ts +1 -0
- package/node_modules/zod/v4/locales/index.js +1 -0
- package/node_modules/zod/v4-mini/index.d.ts +1 -0
- package/node_modules/zod/v4-mini/index.js +1 -0
- package/package.json +16 -16
- package/node_modules/zod/index.d.ts +0 -2
- package/node_modules/zod/lib/benchmarks/index.js +0 -59
- package/node_modules/zod/lib/external.d.ts +0 -6
- package/node_modules/zod/lib/index.d.ts +0 -4
- package/node_modules/zod/lib/index.umd.js +0 -4520
- /package/node_modules/zod/{lib → dist/cjs/v3}/benchmarks/ipv4.js +0 -0
- /package/node_modules/zod/{lib → dist/cjs/v3}/helpers/enumUtil.js +0 -0
- /package/node_modules/zod/{lib → dist/cjs/v3}/helpers/partialUtil.js +0 -0
- /package/node_modules/zod/{lib → dist/cjs/v3}/helpers/typeAliases.js +0 -0
- /package/node_modules/zod/{lib → dist/cjs/v3}/standard-schema.js +0 -0
- /package/node_modules/zod/{lib/__tests__ → dist/cjs/v3/tests}/Mocker.js +0 -0
- /package/node_modules/zod/{lib/benchmarks/index.d.ts → dist/esm/v3/helpers/enumUtil.js} +0 -0
- /package/node_modules/zod/{lib → dist/types/v3}/benchmarks/datetime.d.ts +0 -0
- /package/node_modules/zod/{lib → dist/types/v3}/benchmarks/discriminatedUnion.d.ts +0 -0
- /package/node_modules/zod/{lib → dist/types/v3}/benchmarks/ipv4.d.ts +0 -0
- /package/node_modules/zod/{lib → dist/types/v3}/benchmarks/object.d.ts +0 -0
- /package/node_modules/zod/{lib → dist/types/v3}/benchmarks/primitives.d.ts +0 -0
- /package/node_modules/zod/{lib → dist/types/v3}/benchmarks/realworld.d.ts +0 -0
- /package/node_modules/zod/{lib → dist/types/v3}/benchmarks/string.d.ts +0 -0
- /package/node_modules/zod/{lib → dist/types/v3}/benchmarks/union.d.ts +0 -0
- /package/node_modules/zod/{lib → dist/types/v3}/helpers/enumUtil.d.ts +0 -0
- /package/node_modules/zod/{lib → dist/types/v3}/helpers/typeAliases.d.ts +0 -0
- /package/node_modules/zod/{lib → dist/types/v3}/standard-schema.d.ts +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import * as util from "../core/util.js";
|
|
2
|
+
const error = () => {
|
|
3
|
+
const Sizable = {
|
|
4
|
+
string: { unit: "aksara", verb: "mempunyai" },
|
|
5
|
+
file: { unit: "bait", verb: "mempunyai" },
|
|
6
|
+
array: { unit: "elemen", verb: "mempunyai" },
|
|
7
|
+
set: { unit: "elemen", verb: "mempunyai" },
|
|
8
|
+
};
|
|
9
|
+
function getSizing(origin) {
|
|
10
|
+
return Sizable[origin] ?? null;
|
|
11
|
+
}
|
|
12
|
+
const parsedType = (data) => {
|
|
13
|
+
const t = typeof data;
|
|
14
|
+
switch (t) {
|
|
15
|
+
case "number": {
|
|
16
|
+
return Number.isNaN(data) ? "NaN" : "nombor";
|
|
17
|
+
}
|
|
18
|
+
case "object": {
|
|
19
|
+
if (Array.isArray(data)) {
|
|
20
|
+
return "array";
|
|
21
|
+
}
|
|
22
|
+
if (data === null) {
|
|
23
|
+
return "null";
|
|
24
|
+
}
|
|
25
|
+
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
26
|
+
return data.constructor.name;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return t;
|
|
31
|
+
};
|
|
32
|
+
const Nouns = {
|
|
33
|
+
regex: "input",
|
|
34
|
+
email: "alamat e-mel",
|
|
35
|
+
url: "URL",
|
|
36
|
+
emoji: "emoji",
|
|
37
|
+
uuid: "UUID",
|
|
38
|
+
uuidv4: "UUIDv4",
|
|
39
|
+
uuidv6: "UUIDv6",
|
|
40
|
+
nanoid: "nanoid",
|
|
41
|
+
guid: "GUID",
|
|
42
|
+
cuid: "cuid",
|
|
43
|
+
cuid2: "cuid2",
|
|
44
|
+
ulid: "ULID",
|
|
45
|
+
xid: "XID",
|
|
46
|
+
ksuid: "KSUID",
|
|
47
|
+
datetime: "tarikh masa ISO",
|
|
48
|
+
date: "tarikh ISO",
|
|
49
|
+
time: "masa ISO",
|
|
50
|
+
duration: "tempoh ISO",
|
|
51
|
+
ipv4: "alamat IPv4",
|
|
52
|
+
ipv6: "alamat IPv6",
|
|
53
|
+
cidrv4: "julat IPv4",
|
|
54
|
+
cidrv6: "julat IPv6",
|
|
55
|
+
base64: "string dikodkan base64",
|
|
56
|
+
base64url: "string dikodkan base64url",
|
|
57
|
+
json_string: "string JSON",
|
|
58
|
+
e164: "nombor E.164",
|
|
59
|
+
jwt: "JWT",
|
|
60
|
+
template_literal: "input",
|
|
61
|
+
};
|
|
62
|
+
return (issue) => {
|
|
63
|
+
switch (issue.code) {
|
|
64
|
+
case "invalid_type":
|
|
65
|
+
return `Input tidak sah: dijangka ${issue.expected}, diterima ${parsedType(issue.input)}`;
|
|
66
|
+
case "invalid_value":
|
|
67
|
+
if (issue.values.length === 1)
|
|
68
|
+
return `Input tidak sah: dijangka ${util.stringifyPrimitive(issue.values[0])}`;
|
|
69
|
+
return `Pilihan tidak sah: dijangka salah satu daripada ${util.joinValues(issue.values, "|")}`;
|
|
70
|
+
case "too_big": {
|
|
71
|
+
const adj = issue.inclusive ? "<=" : "<";
|
|
72
|
+
const sizing = getSizing(issue.origin);
|
|
73
|
+
if (sizing)
|
|
74
|
+
return `Terlalu besar: dijangka ${issue.origin ?? "nilai"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elemen"}`;
|
|
75
|
+
return `Terlalu besar: dijangka ${issue.origin ?? "nilai"} adalah ${adj}${issue.maximum.toString()}`;
|
|
76
|
+
}
|
|
77
|
+
case "too_small": {
|
|
78
|
+
const adj = issue.inclusive ? ">=" : ">";
|
|
79
|
+
const sizing = getSizing(issue.origin);
|
|
80
|
+
if (sizing) {
|
|
81
|
+
return `Terlalu kecil: dijangka ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
|
|
82
|
+
}
|
|
83
|
+
return `Terlalu kecil: dijangka ${issue.origin} adalah ${adj}${issue.minimum.toString()}`;
|
|
84
|
+
}
|
|
85
|
+
case "invalid_format": {
|
|
86
|
+
const _issue = issue;
|
|
87
|
+
if (_issue.format === "starts_with")
|
|
88
|
+
return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`;
|
|
89
|
+
if (_issue.format === "ends_with")
|
|
90
|
+
return `String tidak sah: mesti berakhir dengan "${_issue.suffix}"`;
|
|
91
|
+
if (_issue.format === "includes")
|
|
92
|
+
return `String tidak sah: mesti mengandungi "${_issue.includes}"`;
|
|
93
|
+
if (_issue.format === "regex")
|
|
94
|
+
return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`;
|
|
95
|
+
return `${Nouns[_issue.format] ?? issue.format} tidak sah`;
|
|
96
|
+
}
|
|
97
|
+
case "not_multiple_of":
|
|
98
|
+
return `Nombor tidak sah: perlu gandaan ${issue.divisor}`;
|
|
99
|
+
case "unrecognized_keys":
|
|
100
|
+
return `Kunci tidak dikenali: ${util.joinValues(issue.keys, ", ")}`;
|
|
101
|
+
case "invalid_key":
|
|
102
|
+
return `Kunci tidak sah dalam ${issue.origin}`;
|
|
103
|
+
case "invalid_union":
|
|
104
|
+
return "Input tidak sah";
|
|
105
|
+
case "invalid_element":
|
|
106
|
+
return `Nilai tidak sah dalam ${issue.origin}`;
|
|
107
|
+
default:
|
|
108
|
+
return `Input tidak sah`;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
export default function () {
|
|
113
|
+
return {
|
|
114
|
+
localeError: error(),
|
|
115
|
+
};
|
|
116
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as util from "../core/util.js";
|
|
2
|
+
const error = () => {
|
|
3
|
+
const Sizable = {
|
|
4
|
+
string: { unit: "tekens" },
|
|
5
|
+
file: { unit: "bytes" },
|
|
6
|
+
array: { unit: "elementen" },
|
|
7
|
+
set: { unit: "elementen" },
|
|
8
|
+
};
|
|
9
|
+
function getSizing(origin) {
|
|
10
|
+
return Sizable[origin] ?? null;
|
|
11
|
+
}
|
|
12
|
+
const parsedType = (data) => {
|
|
13
|
+
const t = typeof data;
|
|
14
|
+
switch (t) {
|
|
15
|
+
case "number": {
|
|
16
|
+
return Number.isNaN(data) ? "NaN" : "getal";
|
|
17
|
+
}
|
|
18
|
+
case "object": {
|
|
19
|
+
if (Array.isArray(data)) {
|
|
20
|
+
return "array";
|
|
21
|
+
}
|
|
22
|
+
if (data === null) {
|
|
23
|
+
return "null";
|
|
24
|
+
}
|
|
25
|
+
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
26
|
+
return data.constructor.name;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return t;
|
|
31
|
+
};
|
|
32
|
+
const Nouns = {
|
|
33
|
+
regex: "invoer",
|
|
34
|
+
email: "emailadres",
|
|
35
|
+
url: "URL",
|
|
36
|
+
emoji: "emoji",
|
|
37
|
+
uuid: "UUID",
|
|
38
|
+
uuidv4: "UUIDv4",
|
|
39
|
+
uuidv6: "UUIDv6",
|
|
40
|
+
nanoid: "nanoid",
|
|
41
|
+
guid: "GUID",
|
|
42
|
+
cuid: "cuid",
|
|
43
|
+
cuid2: "cuid2",
|
|
44
|
+
ulid: "ULID",
|
|
45
|
+
xid: "XID",
|
|
46
|
+
ksuid: "KSUID",
|
|
47
|
+
datetime: "ISO datum en tijd",
|
|
48
|
+
date: "ISO datum",
|
|
49
|
+
time: "ISO tijd",
|
|
50
|
+
duration: "ISO duur",
|
|
51
|
+
ipv4: "IPv4-adres",
|
|
52
|
+
ipv6: "IPv6-adres",
|
|
53
|
+
cidrv4: "IPv4-bereik",
|
|
54
|
+
cidrv6: "IPv6-bereik",
|
|
55
|
+
base64: "base64-gecodeerde tekst",
|
|
56
|
+
base64url: "base64 URL-gecodeerde tekst",
|
|
57
|
+
json_string: "JSON string",
|
|
58
|
+
e164: "E.164-nummer",
|
|
59
|
+
jwt: "JWT",
|
|
60
|
+
template_literal: "invoer",
|
|
61
|
+
};
|
|
62
|
+
return (issue) => {
|
|
63
|
+
switch (issue.code) {
|
|
64
|
+
case "invalid_type":
|
|
65
|
+
return `Ongeldige invoer: verwacht ${issue.expected}, ontving ${parsedType(issue.input)}`;
|
|
66
|
+
case "invalid_value":
|
|
67
|
+
if (issue.values.length === 1)
|
|
68
|
+
return `Ongeldige invoer: verwacht ${util.stringifyPrimitive(issue.values[0])}`;
|
|
69
|
+
return `Ongeldige optie: verwacht één van ${util.joinValues(issue.values, "|")}`;
|
|
70
|
+
case "too_big": {
|
|
71
|
+
const adj = issue.inclusive ? "<=" : "<";
|
|
72
|
+
const sizing = getSizing(issue.origin);
|
|
73
|
+
if (sizing)
|
|
74
|
+
return `Te lang: verwacht dat ${issue.origin ?? "waarde"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementen"} bevat`;
|
|
75
|
+
return `Te lang: verwacht dat ${issue.origin ?? "waarde"} ${adj}${issue.maximum.toString()} is`;
|
|
76
|
+
}
|
|
77
|
+
case "too_small": {
|
|
78
|
+
const adj = issue.inclusive ? ">=" : ">";
|
|
79
|
+
const sizing = getSizing(issue.origin);
|
|
80
|
+
if (sizing) {
|
|
81
|
+
return `Te kort: verwacht dat ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} bevat`;
|
|
82
|
+
}
|
|
83
|
+
return `Te kort: verwacht dat ${issue.origin} ${adj}${issue.minimum.toString()} is`;
|
|
84
|
+
}
|
|
85
|
+
case "invalid_format": {
|
|
86
|
+
const _issue = issue;
|
|
87
|
+
if (_issue.format === "starts_with") {
|
|
88
|
+
return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`;
|
|
89
|
+
}
|
|
90
|
+
if (_issue.format === "ends_with")
|
|
91
|
+
return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`;
|
|
92
|
+
if (_issue.format === "includes")
|
|
93
|
+
return `Ongeldige tekst: moet "${_issue.includes}" bevatten`;
|
|
94
|
+
if (_issue.format === "regex")
|
|
95
|
+
return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`;
|
|
96
|
+
return `Ongeldig: ${Nouns[_issue.format] ?? issue.format}`;
|
|
97
|
+
}
|
|
98
|
+
case "not_multiple_of":
|
|
99
|
+
return `Ongeldig getal: moet een veelvoud van ${issue.divisor} zijn`;
|
|
100
|
+
case "unrecognized_keys":
|
|
101
|
+
return `Onbekende key${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
|
|
102
|
+
case "invalid_key":
|
|
103
|
+
return `Ongeldige key in ${issue.origin}`;
|
|
104
|
+
case "invalid_union":
|
|
105
|
+
return "Ongeldige invoer";
|
|
106
|
+
case "invalid_element":
|
|
107
|
+
return `Ongeldige waarde in ${issue.origin}`;
|
|
108
|
+
default:
|
|
109
|
+
return `Ongeldige invoer`;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
export default function () {
|
|
114
|
+
return {
|
|
115
|
+
localeError: error(),
|
|
116
|
+
};
|
|
117
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import * as util from "../core/util.js";
|
|
2
|
+
const error = () => {
|
|
3
|
+
const Sizable = {
|
|
4
|
+
string: { unit: "tegn", verb: "å ha" },
|
|
5
|
+
file: { unit: "bytes", verb: "å ha" },
|
|
6
|
+
array: { unit: "elementer", verb: "å inneholde" },
|
|
7
|
+
set: { unit: "elementer", verb: "å inneholde" },
|
|
8
|
+
};
|
|
9
|
+
function getSizing(origin) {
|
|
10
|
+
return Sizable[origin] ?? null;
|
|
11
|
+
}
|
|
12
|
+
const parsedType = (data) => {
|
|
13
|
+
const t = typeof data;
|
|
14
|
+
switch (t) {
|
|
15
|
+
case "number": {
|
|
16
|
+
return Number.isNaN(data) ? "NaN" : "tall";
|
|
17
|
+
}
|
|
18
|
+
case "object": {
|
|
19
|
+
if (Array.isArray(data)) {
|
|
20
|
+
return "liste";
|
|
21
|
+
}
|
|
22
|
+
if (data === null) {
|
|
23
|
+
return "null";
|
|
24
|
+
}
|
|
25
|
+
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
26
|
+
return data.constructor.name;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return t;
|
|
31
|
+
};
|
|
32
|
+
const Nouns = {
|
|
33
|
+
regex: "input",
|
|
34
|
+
email: "e-postadresse",
|
|
35
|
+
url: "URL",
|
|
36
|
+
emoji: "emoji",
|
|
37
|
+
uuid: "UUID",
|
|
38
|
+
uuidv4: "UUIDv4",
|
|
39
|
+
uuidv6: "UUIDv6",
|
|
40
|
+
nanoid: "nanoid",
|
|
41
|
+
guid: "GUID",
|
|
42
|
+
cuid: "cuid",
|
|
43
|
+
cuid2: "cuid2",
|
|
44
|
+
ulid: "ULID",
|
|
45
|
+
xid: "XID",
|
|
46
|
+
ksuid: "KSUID",
|
|
47
|
+
datetime: "ISO dato- og klokkeslett",
|
|
48
|
+
date: "ISO-dato",
|
|
49
|
+
time: "ISO-klokkeslett",
|
|
50
|
+
duration: "ISO-varighet",
|
|
51
|
+
ipv4: "IPv4-område",
|
|
52
|
+
ipv6: "IPv6-område",
|
|
53
|
+
cidrv4: "IPv4-spekter",
|
|
54
|
+
cidrv6: "IPv6-spekter",
|
|
55
|
+
base64: "base64-enkodet streng",
|
|
56
|
+
base64url: "base64url-enkodet streng",
|
|
57
|
+
json_string: "JSON-streng",
|
|
58
|
+
e164: "E.164-nummer",
|
|
59
|
+
jwt: "JWT",
|
|
60
|
+
template_literal: "input",
|
|
61
|
+
};
|
|
62
|
+
return (issue) => {
|
|
63
|
+
switch (issue.code) {
|
|
64
|
+
case "invalid_type":
|
|
65
|
+
return `Ugyldig input: forventet ${issue.expected}, fikk ${parsedType(issue.input)}`;
|
|
66
|
+
case "invalid_value":
|
|
67
|
+
if (issue.values.length === 1)
|
|
68
|
+
return `Ugyldig verdi: forventet ${util.stringifyPrimitive(issue.values[0])}`;
|
|
69
|
+
return `Ugyldig valg: forventet en av ${util.joinValues(issue.values, "|")}`;
|
|
70
|
+
case "too_big": {
|
|
71
|
+
const adj = issue.inclusive ? "<=" : "<";
|
|
72
|
+
const sizing = getSizing(issue.origin);
|
|
73
|
+
if (sizing)
|
|
74
|
+
return `For stor(t): forventet ${issue.origin ?? "value"} til å ha ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementer"}`;
|
|
75
|
+
return `For stor(t): forventet ${issue.origin ?? "value"} til å ha ${adj}${issue.maximum.toString()}`;
|
|
76
|
+
}
|
|
77
|
+
case "too_small": {
|
|
78
|
+
const adj = issue.inclusive ? ">=" : ">";
|
|
79
|
+
const sizing = getSizing(issue.origin);
|
|
80
|
+
if (sizing) {
|
|
81
|
+
return `For lite(n): forventet ${issue.origin} til å ha ${adj}${issue.minimum.toString()} ${sizing.unit}`;
|
|
82
|
+
}
|
|
83
|
+
return `For lite(n): forventet ${issue.origin} til å ha ${adj}${issue.minimum.toString()}`;
|
|
84
|
+
}
|
|
85
|
+
case "invalid_format": {
|
|
86
|
+
const _issue = issue;
|
|
87
|
+
if (_issue.format === "starts_with")
|
|
88
|
+
return `Ugyldig streng: må starte med "${_issue.prefix}"`;
|
|
89
|
+
if (_issue.format === "ends_with")
|
|
90
|
+
return `Ugyldig streng: må ende med "${_issue.suffix}"`;
|
|
91
|
+
if (_issue.format === "includes")
|
|
92
|
+
return `Ugyldig streng: må inneholde "${_issue.includes}"`;
|
|
93
|
+
if (_issue.format === "regex")
|
|
94
|
+
return `Ugyldig streng: må matche mønsteret ${_issue.pattern}`;
|
|
95
|
+
return `Ugyldig ${Nouns[_issue.format] ?? issue.format}`;
|
|
96
|
+
}
|
|
97
|
+
case "not_multiple_of":
|
|
98
|
+
return `Ugyldig tall: må være et multiplum av ${issue.divisor}`;
|
|
99
|
+
case "unrecognized_keys":
|
|
100
|
+
return `${issue.keys.length > 1 ? "Ukjente nøkler" : "Ukjent nøkkel"}: ${util.joinValues(issue.keys, ", ")}`;
|
|
101
|
+
case "invalid_key":
|
|
102
|
+
return `Ugyldig nøkkel i ${issue.origin}`;
|
|
103
|
+
case "invalid_union":
|
|
104
|
+
return "Ugyldig input";
|
|
105
|
+
case "invalid_element":
|
|
106
|
+
return `Ugyldig verdi i ${issue.origin}`;
|
|
107
|
+
default:
|
|
108
|
+
return `Ugyldig input`;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
export default function () {
|
|
113
|
+
return {
|
|
114
|
+
localeError: error(),
|
|
115
|
+
};
|
|
116
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as util from "../core/util.js";
|
|
2
|
+
const error = () => {
|
|
3
|
+
const Sizable = {
|
|
4
|
+
string: { unit: "harf", verb: "olmalıdır" },
|
|
5
|
+
file: { unit: "bayt", verb: "olmalıdır" },
|
|
6
|
+
array: { unit: "unsur", verb: "olmalıdır" },
|
|
7
|
+
set: { unit: "unsur", verb: "olmalıdır" },
|
|
8
|
+
};
|
|
9
|
+
function getSizing(origin) {
|
|
10
|
+
return Sizable[origin] ?? null;
|
|
11
|
+
}
|
|
12
|
+
const parsedType = (data) => {
|
|
13
|
+
const t = typeof data;
|
|
14
|
+
switch (t) {
|
|
15
|
+
case "number": {
|
|
16
|
+
return Number.isNaN(data) ? "NaN" : "numara";
|
|
17
|
+
}
|
|
18
|
+
case "object": {
|
|
19
|
+
if (Array.isArray(data)) {
|
|
20
|
+
return "saf";
|
|
21
|
+
}
|
|
22
|
+
if (data === null) {
|
|
23
|
+
return "gayb";
|
|
24
|
+
}
|
|
25
|
+
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
26
|
+
return data.constructor.name;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return t;
|
|
31
|
+
};
|
|
32
|
+
const Nouns = {
|
|
33
|
+
regex: "giren",
|
|
34
|
+
email: "epostagâh",
|
|
35
|
+
url: "URL",
|
|
36
|
+
emoji: "emoji",
|
|
37
|
+
uuid: "UUID",
|
|
38
|
+
uuidv4: "UUIDv4",
|
|
39
|
+
uuidv6: "UUIDv6",
|
|
40
|
+
nanoid: "nanoid",
|
|
41
|
+
guid: "GUID",
|
|
42
|
+
cuid: "cuid",
|
|
43
|
+
cuid2: "cuid2",
|
|
44
|
+
ulid: "ULID",
|
|
45
|
+
xid: "XID",
|
|
46
|
+
ksuid: "KSUID",
|
|
47
|
+
datetime: "ISO hengâmı",
|
|
48
|
+
date: "ISO tarihi",
|
|
49
|
+
time: "ISO zamanı",
|
|
50
|
+
duration: "ISO müddeti",
|
|
51
|
+
ipv4: "IPv4 nişânı",
|
|
52
|
+
ipv6: "IPv6 nişânı",
|
|
53
|
+
cidrv4: "IPv4 menzili",
|
|
54
|
+
cidrv6: "IPv6 menzili",
|
|
55
|
+
base64: "base64-şifreli metin",
|
|
56
|
+
base64url: "base64url-şifreli metin",
|
|
57
|
+
json_string: "JSON metin",
|
|
58
|
+
e164: "E.164 sayısı",
|
|
59
|
+
jwt: "JWT",
|
|
60
|
+
template_literal: "giren",
|
|
61
|
+
};
|
|
62
|
+
return (issue) => {
|
|
63
|
+
switch (issue.code) {
|
|
64
|
+
case "invalid_type":
|
|
65
|
+
return `Fâsit giren: umulan ${issue.expected}, alınan ${parsedType(issue.input)}`;
|
|
66
|
+
// return `Fâsit giren: umulan ${issue.expected}, alınan ${util.getParsedType(issue.input)}`;
|
|
67
|
+
case "invalid_value":
|
|
68
|
+
if (issue.values.length === 1)
|
|
69
|
+
return `Fâsit giren: umulan ${util.stringifyPrimitive(issue.values[0])}`;
|
|
70
|
+
return `Fâsit tercih: mûteberler ${util.joinValues(issue.values, "|")}`;
|
|
71
|
+
case "too_big": {
|
|
72
|
+
const adj = issue.inclusive ? "<=" : "<";
|
|
73
|
+
const sizing = getSizing(issue.origin);
|
|
74
|
+
if (sizing)
|
|
75
|
+
return `Fazla büyük: ${issue.origin ?? "value"}, ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmalıydı.`;
|
|
76
|
+
return `Fazla büyük: ${issue.origin ?? "value"}, ${adj}${issue.maximum.toString()} olmalıydı.`;
|
|
77
|
+
}
|
|
78
|
+
case "too_small": {
|
|
79
|
+
const adj = issue.inclusive ? ">=" : ">";
|
|
80
|
+
const sizing = getSizing(issue.origin);
|
|
81
|
+
if (sizing) {
|
|
82
|
+
return `Fazla küçük: ${issue.origin}, ${adj}${issue.minimum.toString()} ${sizing.unit} sahip olmalıydı.`;
|
|
83
|
+
}
|
|
84
|
+
return `Fazla küçük: ${issue.origin}, ${adj}${issue.minimum.toString()} olmalıydı.`;
|
|
85
|
+
}
|
|
86
|
+
case "invalid_format": {
|
|
87
|
+
const _issue = issue;
|
|
88
|
+
if (_issue.format === "starts_with")
|
|
89
|
+
return `Fâsit metin: "${_issue.prefix}" ile başlamalı.`;
|
|
90
|
+
if (_issue.format === "ends_with")
|
|
91
|
+
return `Fâsit metin: "${_issue.suffix}" ile bitmeli.`;
|
|
92
|
+
if (_issue.format === "includes")
|
|
93
|
+
return `Fâsit metin: "${_issue.includes}" ihtivâ etmeli.`;
|
|
94
|
+
if (_issue.format === "regex")
|
|
95
|
+
return `Fâsit metin: ${_issue.pattern} nakşına uymalı.`;
|
|
96
|
+
return `Fâsit ${Nouns[_issue.format] ?? issue.format}`;
|
|
97
|
+
}
|
|
98
|
+
case "not_multiple_of":
|
|
99
|
+
return `Fâsit sayı: ${issue.divisor} katı olmalıydı.`;
|
|
100
|
+
case "unrecognized_keys":
|
|
101
|
+
return `Tanınmayan anahtar ${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
|
|
102
|
+
case "invalid_key":
|
|
103
|
+
return `${issue.origin} için tanınmayan anahtar var.`;
|
|
104
|
+
case "invalid_union":
|
|
105
|
+
return "Giren tanınamadı.";
|
|
106
|
+
case "invalid_element":
|
|
107
|
+
return `${issue.origin} için tanınmayan kıymet var.`;
|
|
108
|
+
default:
|
|
109
|
+
return `Kıymet tanınamadı.`;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
export default function () {
|
|
114
|
+
return {
|
|
115
|
+
localeError: error(),
|
|
116
|
+
};
|
|
117
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import * as util from "../core/util.js";
|
|
2
|
+
const error = () => {
|
|
3
|
+
const Sizable = {
|
|
4
|
+
string: { unit: "znaków", verb: "mieć" },
|
|
5
|
+
file: { unit: "bajtów", verb: "mieć" },
|
|
6
|
+
array: { unit: "elementów", verb: "mieć" },
|
|
7
|
+
set: { unit: "elementów", verb: "mieć" },
|
|
8
|
+
};
|
|
9
|
+
function getSizing(origin) {
|
|
10
|
+
return Sizable[origin] ?? null;
|
|
11
|
+
}
|
|
12
|
+
const parsedType = (data) => {
|
|
13
|
+
const t = typeof data;
|
|
14
|
+
switch (t) {
|
|
15
|
+
case "number": {
|
|
16
|
+
return Number.isNaN(data) ? "NaN" : "liczba";
|
|
17
|
+
}
|
|
18
|
+
case "object": {
|
|
19
|
+
if (Array.isArray(data)) {
|
|
20
|
+
return "tablica";
|
|
21
|
+
}
|
|
22
|
+
if (data === null) {
|
|
23
|
+
return "null";
|
|
24
|
+
}
|
|
25
|
+
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
26
|
+
return data.constructor.name;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return t;
|
|
31
|
+
};
|
|
32
|
+
const Nouns = {
|
|
33
|
+
regex: "wyrażenie",
|
|
34
|
+
email: "adres email",
|
|
35
|
+
url: "URL",
|
|
36
|
+
emoji: "emoji",
|
|
37
|
+
uuid: "UUID",
|
|
38
|
+
uuidv4: "UUIDv4",
|
|
39
|
+
uuidv6: "UUIDv6",
|
|
40
|
+
nanoid: "nanoid",
|
|
41
|
+
guid: "GUID",
|
|
42
|
+
cuid: "cuid",
|
|
43
|
+
cuid2: "cuid2",
|
|
44
|
+
ulid: "ULID",
|
|
45
|
+
xid: "XID",
|
|
46
|
+
ksuid: "KSUID",
|
|
47
|
+
datetime: "data i godzina w formacie ISO",
|
|
48
|
+
date: "data w formacie ISO",
|
|
49
|
+
time: "godzina w formacie ISO",
|
|
50
|
+
duration: "czas trwania ISO",
|
|
51
|
+
ipv4: "adres IPv4",
|
|
52
|
+
ipv6: "adres IPv6",
|
|
53
|
+
cidrv4: "zakres IPv4",
|
|
54
|
+
cidrv6: "zakres IPv6",
|
|
55
|
+
base64: "ciąg znaków zakodowany w formacie base64",
|
|
56
|
+
base64url: "ciąg znaków zakodowany w formacie base64url",
|
|
57
|
+
json_string: "ciąg znaków w formacie JSON",
|
|
58
|
+
e164: "liczba E.164",
|
|
59
|
+
jwt: "JWT",
|
|
60
|
+
template_literal: "wejście",
|
|
61
|
+
};
|
|
62
|
+
return (issue) => {
|
|
63
|
+
switch (issue.code) {
|
|
64
|
+
case "invalid_type":
|
|
65
|
+
return `Nieprawidłowe dane wejściowe: oczekiwano ${issue.expected}, otrzymano ${parsedType(issue.input)}`;
|
|
66
|
+
case "invalid_value":
|
|
67
|
+
if (issue.values.length === 1)
|
|
68
|
+
return `Nieprawidłowe dane wejściowe: oczekiwano ${util.stringifyPrimitive(issue.values[0])}`;
|
|
69
|
+
return `Nieprawidłowa opcja: oczekiwano jednej z wartości ${util.joinValues(issue.values, "|")}`;
|
|
70
|
+
case "too_big": {
|
|
71
|
+
const adj = issue.inclusive ? "<=" : "<";
|
|
72
|
+
const sizing = getSizing(issue.origin);
|
|
73
|
+
if (sizing) {
|
|
74
|
+
return `Za duża wartość: oczekiwano, że ${issue.origin ?? "wartość"} będzie mieć ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementów"}`;
|
|
75
|
+
}
|
|
76
|
+
return `Zbyt duż(y/a/e): oczekiwano, że ${issue.origin ?? "wartość"} będzie wynosić ${adj}${issue.maximum.toString()}`;
|
|
77
|
+
}
|
|
78
|
+
case "too_small": {
|
|
79
|
+
const adj = issue.inclusive ? ">=" : ">";
|
|
80
|
+
const sizing = getSizing(issue.origin);
|
|
81
|
+
if (sizing) {
|
|
82
|
+
return `Za mała wartość: oczekiwano, że ${issue.origin ?? "wartość"} będzie mieć ${adj}${issue.minimum.toString()} ${sizing.unit ?? "elementów"}`;
|
|
83
|
+
}
|
|
84
|
+
return `Zbyt mał(y/a/e): oczekiwano, że ${issue.origin ?? "wartość"} będzie wynosić ${adj}${issue.minimum.toString()}`;
|
|
85
|
+
}
|
|
86
|
+
case "invalid_format": {
|
|
87
|
+
const _issue = issue;
|
|
88
|
+
if (_issue.format === "starts_with")
|
|
89
|
+
return `Nieprawidłowy ciąg znaków: musi zaczynać się od "${_issue.prefix}"`;
|
|
90
|
+
if (_issue.format === "ends_with")
|
|
91
|
+
return `Nieprawidłowy ciąg znaków: musi kończyć się na "${_issue.suffix}"`;
|
|
92
|
+
if (_issue.format === "includes")
|
|
93
|
+
return `Nieprawidłowy ciąg znaków: musi zawierać "${_issue.includes}"`;
|
|
94
|
+
if (_issue.format === "regex")
|
|
95
|
+
return `Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${_issue.pattern}`;
|
|
96
|
+
return `Nieprawidłow(y/a/e) ${Nouns[_issue.format] ?? issue.format}`;
|
|
97
|
+
}
|
|
98
|
+
case "not_multiple_of":
|
|
99
|
+
return `Nieprawidłowa liczba: musi być wielokrotnością ${issue.divisor}`;
|
|
100
|
+
case "unrecognized_keys":
|
|
101
|
+
return `Nierozpoznane klucze${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
|
|
102
|
+
case "invalid_key":
|
|
103
|
+
return `Nieprawidłowy klucz w ${issue.origin}`;
|
|
104
|
+
case "invalid_union":
|
|
105
|
+
return "Nieprawidłowe dane wejściowe";
|
|
106
|
+
case "invalid_element":
|
|
107
|
+
return `Nieprawidłowa wartość w ${issue.origin}`;
|
|
108
|
+
default:
|
|
109
|
+
return `Nieprawidłowe dane wejściowe`;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
export default function () {
|
|
114
|
+
return {
|
|
115
|
+
localeError: error(),
|
|
116
|
+
};
|
|
117
|
+
}
|