@btc-embedded/cdk-extensions 0.10.5 → 0.11.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/.jsii +3 -4
- package/CHANGELOG.md +26 -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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/lib/extensions/SharedVolumeExtension.js +1 -1
- package/lib/extensions/TcpKeepAliveExtension.js +1 -1
- 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/BTCLogGroup.js +1 -1
- package/lib/utils/StackParameter.js +1 -1
- package/lib/utils/configFileParsing.d.ts +17 -9
- package/lib/utils/configFileParsing.js +12 -5
- package/lib/utils/functions.js +10 -2
- package/package.json +5 -6
- package/node_modules/zod/LICENSE +0 -21
- package/node_modules/zod/README.md +0 -208
- package/node_modules/zod/dist/cjs/index.js +0 -22
- package/node_modules/zod/dist/cjs/package.json +0 -3
- package/node_modules/zod/dist/cjs/v3/ZodError.js +0 -137
- package/node_modules/zod/dist/cjs/v3/benchmarks/datetime.js +0 -54
- package/node_modules/zod/dist/cjs/v3/benchmarks/discriminatedUnion.js +0 -79
- package/node_modules/zod/dist/cjs/v3/benchmarks/index.js +0 -59
- package/node_modules/zod/dist/cjs/v3/benchmarks/ipv4.js +0 -54
- package/node_modules/zod/dist/cjs/v3/benchmarks/object.js +0 -70
- package/node_modules/zod/dist/cjs/v3/benchmarks/primitives.js +0 -159
- package/node_modules/zod/dist/cjs/v3/benchmarks/realworld.js +0 -56
- package/node_modules/zod/dist/cjs/v3/benchmarks/string.js +0 -55
- package/node_modules/zod/dist/cjs/v3/benchmarks/union.js +0 -79
- package/node_modules/zod/dist/cjs/v3/errors.js +0 -17
- package/node_modules/zod/dist/cjs/v3/external.js +0 -22
- package/node_modules/zod/dist/cjs/v3/helpers/enumUtil.js +0 -2
- package/node_modules/zod/dist/cjs/v3/helpers/errorUtil.js +0 -9
- package/node_modules/zod/dist/cjs/v3/helpers/parseUtil.js +0 -124
- package/node_modules/zod/dist/cjs/v3/helpers/partialUtil.js +0 -2
- package/node_modules/zod/dist/cjs/v3/helpers/typeAliases.js +0 -2
- package/node_modules/zod/dist/cjs/v3/helpers/util.js +0 -137
- package/node_modules/zod/dist/cjs/v3/index.js +0 -33
- package/node_modules/zod/dist/cjs/v3/locales/en.js +0 -109
- package/node_modules/zod/dist/cjs/v3/standard-schema.js +0 -2
- package/node_modules/zod/dist/cjs/v3/tests/Mocker.js +0 -57
- package/node_modules/zod/dist/cjs/v3/types.js +0 -3773
- package/node_modules/zod/dist/cjs/v4/classic/checks.js +0 -32
- package/node_modules/zod/dist/cjs/v4/classic/coerce.js +0 -47
- package/node_modules/zod/dist/cjs/v4/classic/compat.js +0 -63
- package/node_modules/zod/dist/cjs/v4/classic/errors.js +0 -67
- package/node_modules/zod/dist/cjs/v4/classic/external.js +0 -69
- package/node_modules/zod/dist/cjs/v4/classic/index.js +0 -33
- package/node_modules/zod/dist/cjs/v4/classic/iso.js +0 -60
- package/node_modules/zod/dist/cjs/v4/classic/parse.js +0 -32
- package/node_modules/zod/dist/cjs/v4/classic/schemas.js +0 -1100
- package/node_modules/zod/dist/cjs/v4/core/api.js +0 -1021
- package/node_modules/zod/dist/cjs/v4/core/checks.js +0 -580
- package/node_modules/zod/dist/cjs/v4/core/config.js +0 -10
- package/node_modules/zod/dist/cjs/v4/core/core.js +0 -63
- package/node_modules/zod/dist/cjs/v4/core/doc.js +0 -39
- package/node_modules/zod/dist/cjs/v4/core/errors.js +0 -222
- package/node_modules/zod/dist/cjs/v4/core/function.js +0 -102
- package/node_modules/zod/dist/cjs/v4/core/index.js +0 -44
- package/node_modules/zod/dist/cjs/v4/core/json-schema.js +0 -2
- package/node_modules/zod/dist/cjs/v4/core/parse.js +0 -87
- package/node_modules/zod/dist/cjs/v4/core/regexes.js +0 -103
- package/node_modules/zod/dist/cjs/v4/core/registries.js +0 -47
- package/node_modules/zod/dist/cjs/v4/core/schemas.js +0 -1719
- package/node_modules/zod/dist/cjs/v4/core/standard-schema.js +0 -2
- package/node_modules/zod/dist/cjs/v4/core/to-json-schema.js +0 -833
- package/node_modules/zod/dist/cjs/v4/core/util.js +0 -537
- package/node_modules/zod/dist/cjs/v4/core/versions.js +0 -8
- package/node_modules/zod/dist/cjs/v4/core/zsf.js +0 -172
- package/node_modules/zod/dist/cjs/v4/index.js +0 -22
- package/node_modules/zod/dist/cjs/v4/locales/ar.js +0 -142
- package/node_modules/zod/dist/cjs/v4/locales/az.js +0 -141
- package/node_modules/zod/dist/cjs/v4/locales/be.js +0 -190
- package/node_modules/zod/dist/cjs/v4/locales/ca.js +0 -144
- package/node_modules/zod/dist/cjs/v4/locales/cs.js +0 -161
- package/node_modules/zod/dist/cjs/v4/locales/de.js +0 -142
- package/node_modules/zod/dist/cjs/v4/locales/en.js +0 -145
- package/node_modules/zod/dist/cjs/v4/locales/es.js +0 -143
- package/node_modules/zod/dist/cjs/v4/locales/fa.js +0 -148
- package/node_modules/zod/dist/cjs/v4/locales/fi.js +0 -148
- package/node_modules/zod/dist/cjs/v4/locales/fr-CA.js +0 -143
- package/node_modules/zod/dist/cjs/v4/locales/fr.js +0 -142
- package/node_modules/zod/dist/cjs/v4/locales/he.js +0 -143
- package/node_modules/zod/dist/cjs/v4/locales/hu.js +0 -143
- package/node_modules/zod/dist/cjs/v4/locales/id.js +0 -142
- package/node_modules/zod/dist/cjs/v4/locales/index.js +0 -82
- package/node_modules/zod/dist/cjs/v4/locales/it.js +0 -143
- package/node_modules/zod/dist/cjs/v4/locales/ja.js +0 -141
- package/node_modules/zod/dist/cjs/v4/locales/kh.js +0 -143
- package/node_modules/zod/dist/cjs/v4/locales/ko.js +0 -147
- package/node_modules/zod/dist/cjs/v4/locales/mk.js +0 -144
- package/node_modules/zod/dist/cjs/v4/locales/ms.js +0 -142
- package/node_modules/zod/dist/cjs/v4/locales/nl.js +0 -143
- package/node_modules/zod/dist/cjs/v4/locales/no.js +0 -142
- package/node_modules/zod/dist/cjs/v4/locales/ota.js +0 -143
- package/node_modules/zod/dist/cjs/v4/locales/pl.js +0 -143
- package/node_modules/zod/dist/cjs/v4/locales/ps.js +0 -148
- package/node_modules/zod/dist/cjs/v4/locales/pt.js +0 -142
- package/node_modules/zod/dist/cjs/v4/locales/ru.js +0 -190
- package/node_modules/zod/dist/cjs/v4/locales/sl.js +0 -143
- package/node_modules/zod/dist/cjs/v4/locales/sv.js +0 -144
- package/node_modules/zod/dist/cjs/v4/locales/ta.js +0 -143
- package/node_modules/zod/dist/cjs/v4/locales/th.js +0 -143
- package/node_modules/zod/dist/cjs/v4/locales/tr.js +0 -143
- package/node_modules/zod/dist/cjs/v4/locales/ua.js +0 -143
- package/node_modules/zod/dist/cjs/v4/locales/ur.js +0 -143
- package/node_modules/zod/dist/cjs/v4/locales/vi.js +0 -142
- package/node_modules/zod/dist/cjs/v4/locales/zh-CN.js +0 -142
- package/node_modules/zod/dist/cjs/v4/locales/zh-TW.js +0 -143
- package/node_modules/zod/dist/cjs/v4/mini/checks.js +0 -34
- package/node_modules/zod/dist/cjs/v4/mini/coerce.js +0 -47
- package/node_modules/zod/dist/cjs/v4/mini/external.js +0 -61
- package/node_modules/zod/dist/cjs/v4/mini/index.js +0 -32
- package/node_modules/zod/dist/cjs/v4/mini/iso.js +0 -60
- package/node_modules/zod/dist/cjs/v4/mini/parse.js +0 -8
- package/node_modules/zod/dist/cjs/v4/mini/schemas.js +0 -831
- package/node_modules/zod/dist/esm/index.js +0 -3
- package/node_modules/zod/dist/esm/package.json +0 -3
- package/node_modules/zod/dist/esm/v3/ZodError.js +0 -132
- package/node_modules/zod/dist/esm/v3/benchmarks/datetime.js +0 -49
- package/node_modules/zod/dist/esm/v3/benchmarks/discriminatedUnion.js +0 -74
- package/node_modules/zod/dist/esm/v3/benchmarks/index.js +0 -54
- package/node_modules/zod/dist/esm/v3/benchmarks/ipv4.js +0 -49
- package/node_modules/zod/dist/esm/v3/benchmarks/object.js +0 -65
- package/node_modules/zod/dist/esm/v3/benchmarks/primitives.js +0 -154
- package/node_modules/zod/dist/esm/v3/benchmarks/realworld.js +0 -51
- package/node_modules/zod/dist/esm/v3/benchmarks/string.js +0 -50
- package/node_modules/zod/dist/esm/v3/benchmarks/union.js +0 -74
- package/node_modules/zod/dist/esm/v3/errors.js +0 -9
- package/node_modules/zod/dist/esm/v3/external.js +0 -6
- package/node_modules/zod/dist/esm/v3/helpers/enumUtil.js +0 -1
- package/node_modules/zod/dist/esm/v3/helpers/errorUtil.js +0 -6
- package/node_modules/zod/dist/esm/v3/helpers/parseUtil.js +0 -109
- package/node_modules/zod/dist/esm/v3/helpers/partialUtil.js +0 -1
- package/node_modules/zod/dist/esm/v3/helpers/typeAliases.js +0 -1
- package/node_modules/zod/dist/esm/v3/helpers/util.js +0 -133
- package/node_modules/zod/dist/esm/v3/index.js +0 -4
- package/node_modules/zod/dist/esm/v3/locales/en.js +0 -107
- package/node_modules/zod/dist/esm/v3/standard-schema.js +0 -1
- package/node_modules/zod/dist/esm/v3/tests/Mocker.js +0 -53
- package/node_modules/zod/dist/esm/v3/types.js +0 -3691
- package/node_modules/zod/dist/esm/v4/classic/checks.js +0 -1
- package/node_modules/zod/dist/esm/v4/classic/coerce.js +0 -17
- package/node_modules/zod/dist/esm/v4/classic/compat.js +0 -33
- package/node_modules/zod/dist/esm/v4/classic/errors.js +0 -41
- package/node_modules/zod/dist/esm/v4/classic/external.js +0 -18
- package/node_modules/zod/dist/esm/v4/classic/index.js +0 -4
- package/node_modules/zod/dist/esm/v4/classic/iso.js +0 -30
- package/node_modules/zod/dist/esm/v4/classic/parse.js +0 -6
- package/node_modules/zod/dist/esm/v4/classic/schemas.js +0 -998
- package/node_modules/zod/dist/esm/v4/core/api.js +0 -889
- package/node_modules/zod/dist/esm/v4/core/checks.js +0 -554
- package/node_modules/zod/dist/esm/v4/core/config.js +0 -6
- package/node_modules/zod/dist/esm/v4/core/core.js +0 -57
- package/node_modules/zod/dist/esm/v4/core/doc.js +0 -35
- package/node_modules/zod/dist/esm/v4/core/errors.js +0 -191
- package/node_modules/zod/dist/esm/v4/core/function.js +0 -75
- package/node_modules/zod/dist/esm/v4/core/index.js +0 -15
- package/node_modules/zod/dist/esm/v4/core/json-schema.js +0 -1
- package/node_modules/zod/dist/esm/v4/core/parse.js +0 -57
- package/node_modules/zod/dist/esm/v4/core/regexes.js +0 -95
- package/node_modules/zod/dist/esm/v4/core/registries.js +0 -42
- package/node_modules/zod/dist/esm/v4/core/schemas.js +0 -1688
- package/node_modules/zod/dist/esm/v4/core/standard-schema.js +0 -1
- package/node_modules/zod/dist/esm/v4/core/to-json-schema.js +0 -828
- package/node_modules/zod/dist/esm/v4/core/util.js +0 -491
- package/node_modules/zod/dist/esm/v4/core/versions.js +0 -5
- package/node_modules/zod/dist/esm/v4/core/zsf.js +0 -171
- package/node_modules/zod/dist/esm/v4/index.js +0 -3
- package/node_modules/zod/dist/esm/v4/locales/ar.js +0 -116
- package/node_modules/zod/dist/esm/v4/locales/az.js +0 -115
- package/node_modules/zod/dist/esm/v4/locales/be.js +0 -164
- package/node_modules/zod/dist/esm/v4/locales/ca.js +0 -118
- package/node_modules/zod/dist/esm/v4/locales/cs.js +0 -135
- package/node_modules/zod/dist/esm/v4/locales/de.js +0 -116
- package/node_modules/zod/dist/esm/v4/locales/en.js +0 -117
- package/node_modules/zod/dist/esm/v4/locales/es.js +0 -117
- package/node_modules/zod/dist/esm/v4/locales/fa.js +0 -122
- package/node_modules/zod/dist/esm/v4/locales/fi.js +0 -122
- package/node_modules/zod/dist/esm/v4/locales/fr-CA.js +0 -117
- package/node_modules/zod/dist/esm/v4/locales/fr.js +0 -116
- package/node_modules/zod/dist/esm/v4/locales/he.js +0 -117
- package/node_modules/zod/dist/esm/v4/locales/hu.js +0 -117
- package/node_modules/zod/dist/esm/v4/locales/id.js +0 -116
- package/node_modules/zod/dist/esm/v4/locales/index.js +0 -38
- package/node_modules/zod/dist/esm/v4/locales/it.js +0 -117
- package/node_modules/zod/dist/esm/v4/locales/ja.js +0 -115
- package/node_modules/zod/dist/esm/v4/locales/kh.js +0 -117
- package/node_modules/zod/dist/esm/v4/locales/ko.js +0 -121
- package/node_modules/zod/dist/esm/v4/locales/mk.js +0 -118
- package/node_modules/zod/dist/esm/v4/locales/ms.js +0 -116
- package/node_modules/zod/dist/esm/v4/locales/nl.js +0 -117
- package/node_modules/zod/dist/esm/v4/locales/no.js +0 -116
- package/node_modules/zod/dist/esm/v4/locales/ota.js +0 -117
- package/node_modules/zod/dist/esm/v4/locales/pl.js +0 -117
- package/node_modules/zod/dist/esm/v4/locales/ps.js +0 -122
- package/node_modules/zod/dist/esm/v4/locales/pt.js +0 -116
- package/node_modules/zod/dist/esm/v4/locales/ru.js +0 -164
- package/node_modules/zod/dist/esm/v4/locales/sl.js +0 -117
- package/node_modules/zod/dist/esm/v4/locales/sv.js +0 -118
- package/node_modules/zod/dist/esm/v4/locales/ta.js +0 -117
- package/node_modules/zod/dist/esm/v4/locales/th.js +0 -117
- package/node_modules/zod/dist/esm/v4/locales/tr.js +0 -115
- package/node_modules/zod/dist/esm/v4/locales/ua.js +0 -117
- package/node_modules/zod/dist/esm/v4/locales/ur.js +0 -117
- package/node_modules/zod/dist/esm/v4/locales/vi.js +0 -116
- package/node_modules/zod/dist/esm/v4/locales/zh-CN.js +0 -116
- package/node_modules/zod/dist/esm/v4/locales/zh-TW.js +0 -117
- package/node_modules/zod/dist/esm/v4/mini/checks.js +0 -1
- package/node_modules/zod/dist/esm/v4/mini/coerce.js +0 -17
- package/node_modules/zod/dist/esm/v4/mini/external.js +0 -13
- package/node_modules/zod/dist/esm/v4/mini/index.js +0 -3
- package/node_modules/zod/dist/esm/v4/mini/iso.js +0 -30
- package/node_modules/zod/dist/esm/v4/mini/parse.js +0 -1
- package/node_modules/zod/dist/esm/v4/mini/schemas.js +0 -725
- package/node_modules/zod/dist/types/index.d.ts +0 -3
- package/node_modules/zod/dist/types/package.json +0 -3
- package/node_modules/zod/dist/types/v3/ZodError.d.ts +0 -164
- package/node_modules/zod/dist/types/v3/benchmarks/datetime.d.ts +0 -5
- package/node_modules/zod/dist/types/v3/benchmarks/discriminatedUnion.d.ts +0 -5
- package/node_modules/zod/dist/types/v3/benchmarks/index.d.ts +0 -1
- package/node_modules/zod/dist/types/v3/benchmarks/ipv4.d.ts +0 -5
- package/node_modules/zod/dist/types/v3/benchmarks/object.d.ts +0 -5
- package/node_modules/zod/dist/types/v3/benchmarks/primitives.d.ts +0 -5
- package/node_modules/zod/dist/types/v3/benchmarks/realworld.d.ts +0 -5
- package/node_modules/zod/dist/types/v3/benchmarks/string.d.ts +0 -5
- package/node_modules/zod/dist/types/v3/benchmarks/union.d.ts +0 -5
- package/node_modules/zod/dist/types/v3/errors.d.ts +0 -5
- package/node_modules/zod/dist/types/v3/external.d.ts +0 -6
- package/node_modules/zod/dist/types/v3/helpers/enumUtil.d.ts +0 -8
- package/node_modules/zod/dist/types/v3/helpers/errorUtil.d.ts +0 -9
- package/node_modules/zod/dist/types/v3/helpers/parseUtil.d.ts +0 -78
- package/node_modules/zod/dist/types/v3/helpers/partialUtil.d.ts +0 -8
- package/node_modules/zod/dist/types/v3/helpers/typeAliases.d.ts +0 -2
- package/node_modules/zod/dist/types/v3/helpers/util.d.ts +0 -85
- package/node_modules/zod/dist/types/v3/index.d.ts +0 -4
- package/node_modules/zod/dist/types/v3/locales/en.d.ts +0 -3
- package/node_modules/zod/dist/types/v3/standard-schema.d.ts +0 -102
- package/node_modules/zod/dist/types/v3/tests/Mocker.d.ts +0 -17
- package/node_modules/zod/dist/types/v3/types.d.ts +0 -1031
- package/node_modules/zod/dist/types/v4/classic/checks.d.ts +0 -1
- package/node_modules/zod/dist/types/v4/classic/coerce.d.ts +0 -17
- package/node_modules/zod/dist/types/v4/classic/compat.d.ts +0 -48
- package/node_modules/zod/dist/types/v4/classic/errors.d.ts +0 -30
- package/node_modules/zod/dist/types/v4/classic/external.d.ts +0 -13
- package/node_modules/zod/dist/types/v4/classic/index.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/classic/iso.d.ts +0 -22
- package/node_modules/zod/dist/types/v4/classic/parse.d.ts +0 -23
- package/node_modules/zod/dist/types/v4/classic/schemas.d.ts +0 -624
- package/node_modules/zod/dist/types/v4/core/api.d.ts +0 -281
- package/node_modules/zod/dist/types/v4/core/checks.d.ts +0 -277
- package/node_modules/zod/dist/types/v4/core/config.d.ts +0 -9
- package/node_modules/zod/dist/types/v4/core/core.d.ts +0 -47
- package/node_modules/zod/dist/types/v4/core/doc.d.ts +0 -14
- package/node_modules/zod/dist/types/v4/core/errors.d.ts +0 -204
- package/node_modules/zod/dist/types/v4/core/function.d.ts +0 -52
- package/node_modules/zod/dist/types/v4/core/index.d.ts +0 -15
- package/node_modules/zod/dist/types/v4/core/json-schema.d.ts +0 -87
- package/node_modules/zod/dist/types/v4/core/parse.d.ts +0 -25
- package/node_modules/zod/dist/types/v4/core/regexes.d.ts +0 -62
- package/node_modules/zod/dist/types/v4/core/registries.d.ts +0 -39
- package/node_modules/zod/dist/types/v4/core/schemas.d.ts +0 -1005
- package/node_modules/zod/dist/types/v4/core/standard-schema.d.ts +0 -55
- package/node_modules/zod/dist/types/v4/core/to-json-schema.d.ts +0 -84
- package/node_modules/zod/dist/types/v4/core/util.d.ts +0 -183
- package/node_modules/zod/dist/types/v4/core/versions.d.ts +0 -5
- package/node_modules/zod/dist/types/v4/core/zsf.d.ts +0 -91
- package/node_modules/zod/dist/types/v4/index.d.ts +0 -3
- package/node_modules/zod/dist/types/v4/locales/ar.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/az.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/be.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/ca.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/cs.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/de.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/en.d.ts +0 -5
- package/node_modules/zod/dist/types/v4/locales/es.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/fa.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/fi.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/fr-CA.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/fr.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/he.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/hu.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/id.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/index.d.ts +0 -38
- package/node_modules/zod/dist/types/v4/locales/it.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/ja.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/kh.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/ko.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/mk.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/ms.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/nl.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/no.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/ota.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/pl.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/ps.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/pt.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/ru.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/sl.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/sv.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/ta.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/th.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/tr.d.ts +0 -5
- package/node_modules/zod/dist/types/v4/locales/ua.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/ur.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/vi.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/zh-CN.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/locales/zh-TW.d.ts +0 -4
- package/node_modules/zod/dist/types/v4/mini/checks.d.ts +0 -1
- package/node_modules/zod/dist/types/v4/mini/coerce.d.ts +0 -7
- package/node_modules/zod/dist/types/v4/mini/external.d.ts +0 -11
- package/node_modules/zod/dist/types/v4/mini/index.d.ts +0 -3
- package/node_modules/zod/dist/types/v4/mini/iso.d.ts +0 -22
- package/node_modules/zod/dist/types/v4/mini/parse.d.ts +0 -1
- package/node_modules/zod/dist/types/v4/mini/schemas.d.ts +0 -351
- package/node_modules/zod/package.json +0 -120
- package/node_modules/zod/v3/index.d.ts +0 -3
- package/node_modules/zod/v3/index.js +0 -1
- package/node_modules/zod/v4/core/index.d.ts +0 -1
- package/node_modules/zod/v4/core/index.js +0 -1
- package/node_modules/zod/v4/index.d.ts +0 -3
- package/node_modules/zod/v4/index.js +0 -1
- package/node_modules/zod/v4/locales/en.d.ts +0 -2
- package/node_modules/zod/v4/locales/en.js +0 -2
- package/node_modules/zod/v4/locales/index.d.ts +0 -1
- package/node_modules/zod/v4/locales/index.js +0 -1
- package/node_modules/zod/v4-mini/index.d.ts +0 -1
- package/node_modules/zod/v4-mini/index.js +0 -1
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import * as util from "../core/util.js";
|
|
2
|
-
const error = () => {
|
|
3
|
-
const Sizable = {
|
|
4
|
-
string: { unit: "توکي", verb: "ولري" },
|
|
5
|
-
file: { unit: "بایټس", verb: "ولري" },
|
|
6
|
-
array: { unit: "توکي", verb: "ولري" },
|
|
7
|
-
set: { unit: "توکي", verb: "ولري" },
|
|
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" : "عدد";
|
|
17
|
-
}
|
|
18
|
-
case "object": {
|
|
19
|
-
if (Array.isArray(data)) {
|
|
20
|
-
return "ارې";
|
|
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: "ورودي",
|
|
34
|
-
email: "بریښنالیک",
|
|
35
|
-
url: "یو آر ال",
|
|
36
|
-
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: "نیټه او وخت",
|
|
48
|
-
date: "نېټه",
|
|
49
|
-
time: "وخت",
|
|
50
|
-
duration: "موده",
|
|
51
|
-
ipv4: "د IPv4 پته",
|
|
52
|
-
ipv6: "د IPv6 پته",
|
|
53
|
-
cidrv4: "د IPv4 ساحه",
|
|
54
|
-
cidrv6: "د IPv6 ساحه",
|
|
55
|
-
base64: "base64-encoded متن",
|
|
56
|
-
base64url: "base64url-encoded متن",
|
|
57
|
-
json_string: "JSON متن",
|
|
58
|
-
e164: "د E.164 شمېره",
|
|
59
|
-
jwt: "JWT",
|
|
60
|
-
template_literal: "ورودي",
|
|
61
|
-
};
|
|
62
|
-
return (issue) => {
|
|
63
|
-
switch (issue.code) {
|
|
64
|
-
case "invalid_type":
|
|
65
|
-
return `ناسم ورودي: باید ${issue.expected} وای, مګر ${parsedType(issue.input)} ترلاسه شو`;
|
|
66
|
-
case "invalid_value":
|
|
67
|
-
if (issue.values.length === 1) {
|
|
68
|
-
return `ناسم ورودي: باید ${util.stringifyPrimitive(issue.values[0])} وای`;
|
|
69
|
-
}
|
|
70
|
-
return `ناسم انتخاب: باید یو له ${util.joinValues(issue.values, "|")} څخه وای`;
|
|
71
|
-
case "too_big": {
|
|
72
|
-
const adj = issue.inclusive ? "<=" : "<";
|
|
73
|
-
const sizing = getSizing(issue.origin);
|
|
74
|
-
if (sizing) {
|
|
75
|
-
return `ډیر لوی: ${issue.origin ?? "ارزښت"} باید ${adj}${issue.maximum.toString()} ${sizing.unit ?? "عنصرونه"} ولري`;
|
|
76
|
-
}
|
|
77
|
-
return `ډیر لوی: ${issue.origin ?? "ارزښت"} باید ${adj}${issue.maximum.toString()} وي`;
|
|
78
|
-
}
|
|
79
|
-
case "too_small": {
|
|
80
|
-
const adj = issue.inclusive ? ">=" : ">";
|
|
81
|
-
const sizing = getSizing(issue.origin);
|
|
82
|
-
if (sizing) {
|
|
83
|
-
return `ډیر کوچنی: ${issue.origin} باید ${adj}${issue.minimum.toString()} ${sizing.unit} ولري`;
|
|
84
|
-
}
|
|
85
|
-
return `ډیر کوچنی: ${issue.origin} باید ${adj}${issue.minimum.toString()} وي`;
|
|
86
|
-
}
|
|
87
|
-
case "invalid_format": {
|
|
88
|
-
const _issue = issue;
|
|
89
|
-
if (_issue.format === "starts_with") {
|
|
90
|
-
return `ناسم متن: باید د "${_issue.prefix}" سره پیل شي`;
|
|
91
|
-
}
|
|
92
|
-
if (_issue.format === "ends_with") {
|
|
93
|
-
return `ناسم متن: باید د "${_issue.suffix}" سره پای ته ورسيږي`;
|
|
94
|
-
}
|
|
95
|
-
if (_issue.format === "includes") {
|
|
96
|
-
return `ناسم متن: باید "${_issue.includes}" ولري`;
|
|
97
|
-
}
|
|
98
|
-
if (_issue.format === "regex") {
|
|
99
|
-
return `ناسم متن: باید د ${_issue.pattern} سره مطابقت ولري`;
|
|
100
|
-
}
|
|
101
|
-
return `${Nouns[_issue.format] ?? issue.format} ناسم دی`;
|
|
102
|
-
}
|
|
103
|
-
case "not_multiple_of":
|
|
104
|
-
return `ناسم عدد: باید د ${issue.divisor} مضرب وي`;
|
|
105
|
-
case "unrecognized_keys":
|
|
106
|
-
return `ناسم ${issue.keys.length > 1 ? "کلیډونه" : "کلیډ"}: ${util.joinValues(issue.keys, ", ")}`;
|
|
107
|
-
case "invalid_key":
|
|
108
|
-
return `ناسم کلیډ په ${issue.origin} کې`;
|
|
109
|
-
case "invalid_union":
|
|
110
|
-
return `ناسمه ورودي`;
|
|
111
|
-
case "invalid_element":
|
|
112
|
-
return `ناسم عنصر په ${issue.origin} کې`;
|
|
113
|
-
default:
|
|
114
|
-
return `ناسمه ورودي`;
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
export default function () {
|
|
119
|
-
return {
|
|
120
|
-
localeError: error(),
|
|
121
|
-
};
|
|
122
|
-
}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import * as util from "../core/util.js";
|
|
2
|
-
const error = () => {
|
|
3
|
-
const Sizable = {
|
|
4
|
-
string: { unit: "caracteres", verb: "ter" },
|
|
5
|
-
file: { unit: "bytes", verb: "ter" },
|
|
6
|
-
array: { unit: "itens", verb: "ter" },
|
|
7
|
-
set: { unit: "itens", verb: "ter" },
|
|
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" : "número";
|
|
17
|
-
}
|
|
18
|
-
case "object": {
|
|
19
|
-
if (Array.isArray(data)) {
|
|
20
|
-
return "array";
|
|
21
|
-
}
|
|
22
|
-
if (data === null) {
|
|
23
|
-
return "nulo";
|
|
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: "padrão",
|
|
34
|
-
email: "endereço de e-mail",
|
|
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 e hora ISO",
|
|
48
|
-
date: "data ISO",
|
|
49
|
-
time: "hora ISO",
|
|
50
|
-
duration: "duração ISO",
|
|
51
|
-
ipv4: "endereço IPv4",
|
|
52
|
-
ipv6: "endereço IPv6",
|
|
53
|
-
cidrv4: "faixa de IPv4",
|
|
54
|
-
cidrv6: "faixa de IPv6",
|
|
55
|
-
base64: "texto codificado em base64",
|
|
56
|
-
base64url: "URL codificada em base64",
|
|
57
|
-
json_string: "texto JSON",
|
|
58
|
-
e164: "número E.164",
|
|
59
|
-
jwt: "JWT",
|
|
60
|
-
template_literal: "entrada",
|
|
61
|
-
};
|
|
62
|
-
return (issue) => {
|
|
63
|
-
switch (issue.code) {
|
|
64
|
-
case "invalid_type":
|
|
65
|
-
return `Tipo inválido: esperado ${issue.expected}, recebido ${parsedType(issue.input)}`;
|
|
66
|
-
case "invalid_value":
|
|
67
|
-
if (issue.values.length === 1)
|
|
68
|
-
return `Entrada inválida: esperado ${util.stringifyPrimitive(issue.values[0])}`;
|
|
69
|
-
return `Opção inválida: esperada uma das ${util.joinValues(issue.values, "|")}`;
|
|
70
|
-
case "too_big": {
|
|
71
|
-
const adj = issue.inclusive ? "<=" : "<";
|
|
72
|
-
const sizing = getSizing(issue.origin);
|
|
73
|
-
if (sizing)
|
|
74
|
-
return `Muito grande: esperado que ${issue.origin ?? "valor"} tivesse ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementos"}`;
|
|
75
|
-
return `Muito grande: esperado que ${issue.origin ?? "valor"} fosse ${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 `Muito pequeno: esperado que ${issue.origin} tivesse ${adj}${issue.minimum.toString()} ${sizing.unit}`;
|
|
82
|
-
}
|
|
83
|
-
return `Muito pequeno: esperado que ${issue.origin} fosse ${adj}${issue.minimum.toString()}`;
|
|
84
|
-
}
|
|
85
|
-
case "invalid_format": {
|
|
86
|
-
const _issue = issue;
|
|
87
|
-
if (_issue.format === "starts_with")
|
|
88
|
-
return `Texto inválido: deve começar com "${_issue.prefix}"`;
|
|
89
|
-
if (_issue.format === "ends_with")
|
|
90
|
-
return `Texto inválido: deve terminar com "${_issue.suffix}"`;
|
|
91
|
-
if (_issue.format === "includes")
|
|
92
|
-
return `Texto inválido: deve incluir "${_issue.includes}"`;
|
|
93
|
-
if (_issue.format === "regex")
|
|
94
|
-
return `Texto inválido: deve corresponder ao padrão ${_issue.pattern}`;
|
|
95
|
-
return `${Nouns[_issue.format] ?? issue.format} inválido`;
|
|
96
|
-
}
|
|
97
|
-
case "not_multiple_of":
|
|
98
|
-
return `Número inválido: deve ser múltiplo de ${issue.divisor}`;
|
|
99
|
-
case "unrecognized_keys":
|
|
100
|
-
return `Chave${issue.keys.length > 1 ? "s" : ""} desconhecida${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
|
|
101
|
-
case "invalid_key":
|
|
102
|
-
return `Chave inválida em ${issue.origin}`;
|
|
103
|
-
case "invalid_union":
|
|
104
|
-
return "Entrada inválida";
|
|
105
|
-
case "invalid_element":
|
|
106
|
-
return `Valor inválido em ${issue.origin}`;
|
|
107
|
-
default:
|
|
108
|
-
return `Campo inválido`;
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
};
|
|
112
|
-
export default function () {
|
|
113
|
-
return {
|
|
114
|
-
localeError: error(),
|
|
115
|
-
};
|
|
116
|
-
}
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import * as util from "../core/util.js";
|
|
2
|
-
function getRussianPlural(count, one, few, many) {
|
|
3
|
-
const absCount = Math.abs(count);
|
|
4
|
-
const lastDigit = absCount % 10;
|
|
5
|
-
const lastTwoDigits = absCount % 100;
|
|
6
|
-
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
|
|
7
|
-
return many;
|
|
8
|
-
}
|
|
9
|
-
if (lastDigit === 1) {
|
|
10
|
-
return one;
|
|
11
|
-
}
|
|
12
|
-
if (lastDigit >= 2 && lastDigit <= 4) {
|
|
13
|
-
return few;
|
|
14
|
-
}
|
|
15
|
-
return many;
|
|
16
|
-
}
|
|
17
|
-
const error = () => {
|
|
18
|
-
const Sizable = {
|
|
19
|
-
string: {
|
|
20
|
-
unit: {
|
|
21
|
-
one: "символ",
|
|
22
|
-
few: "символа",
|
|
23
|
-
many: "символов",
|
|
24
|
-
},
|
|
25
|
-
verb: "иметь",
|
|
26
|
-
},
|
|
27
|
-
file: {
|
|
28
|
-
unit: {
|
|
29
|
-
one: "байт",
|
|
30
|
-
few: "байта",
|
|
31
|
-
many: "байт",
|
|
32
|
-
},
|
|
33
|
-
verb: "иметь",
|
|
34
|
-
},
|
|
35
|
-
array: {
|
|
36
|
-
unit: {
|
|
37
|
-
one: "элемент",
|
|
38
|
-
few: "элемента",
|
|
39
|
-
many: "элементов",
|
|
40
|
-
},
|
|
41
|
-
verb: "иметь",
|
|
42
|
-
},
|
|
43
|
-
set: {
|
|
44
|
-
unit: {
|
|
45
|
-
one: "элемент",
|
|
46
|
-
few: "элемента",
|
|
47
|
-
many: "элементов",
|
|
48
|
-
},
|
|
49
|
-
verb: "иметь",
|
|
50
|
-
},
|
|
51
|
-
};
|
|
52
|
-
function getSizing(origin) {
|
|
53
|
-
return Sizable[origin] ?? null;
|
|
54
|
-
}
|
|
55
|
-
const parsedType = (data) => {
|
|
56
|
-
const t = typeof data;
|
|
57
|
-
switch (t) {
|
|
58
|
-
case "number": {
|
|
59
|
-
return Number.isNaN(data) ? "NaN" : "число";
|
|
60
|
-
}
|
|
61
|
-
case "object": {
|
|
62
|
-
if (Array.isArray(data)) {
|
|
63
|
-
return "массив";
|
|
64
|
-
}
|
|
65
|
-
if (data === null) {
|
|
66
|
-
return "null";
|
|
67
|
-
}
|
|
68
|
-
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
|
|
69
|
-
return data.constructor.name;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return t;
|
|
74
|
-
};
|
|
75
|
-
const Nouns = {
|
|
76
|
-
regex: "ввод",
|
|
77
|
-
email: "email адрес",
|
|
78
|
-
url: "URL",
|
|
79
|
-
emoji: "эмодзи",
|
|
80
|
-
uuid: "UUID",
|
|
81
|
-
uuidv4: "UUIDv4",
|
|
82
|
-
uuidv6: "UUIDv6",
|
|
83
|
-
nanoid: "nanoid",
|
|
84
|
-
guid: "GUID",
|
|
85
|
-
cuid: "cuid",
|
|
86
|
-
cuid2: "cuid2",
|
|
87
|
-
ulid: "ULID",
|
|
88
|
-
xid: "XID",
|
|
89
|
-
ksuid: "KSUID",
|
|
90
|
-
datetime: "ISO дата и время",
|
|
91
|
-
date: "ISO дата",
|
|
92
|
-
time: "ISO время",
|
|
93
|
-
duration: "ISO длительность",
|
|
94
|
-
ipv4: "IPv4 адрес",
|
|
95
|
-
ipv6: "IPv6 адрес",
|
|
96
|
-
cidrv4: "IPv4 диапазон",
|
|
97
|
-
cidrv6: "IPv6 диапазон",
|
|
98
|
-
base64: "строка в формате base64",
|
|
99
|
-
base64url: "строка в формате base64url",
|
|
100
|
-
json_string: "JSON строка",
|
|
101
|
-
e164: "номер E.164",
|
|
102
|
-
jwt: "JWT",
|
|
103
|
-
template_literal: "ввод",
|
|
104
|
-
};
|
|
105
|
-
return (issue) => {
|
|
106
|
-
switch (issue.code) {
|
|
107
|
-
case "invalid_type":
|
|
108
|
-
return `Неверный ввод: ожидалось ${issue.expected}, получено ${parsedType(issue.input)}`;
|
|
109
|
-
case "invalid_value":
|
|
110
|
-
if (issue.values.length === 1)
|
|
111
|
-
return `Неверный ввод: ожидалось ${util.stringifyPrimitive(issue.values[0])}`;
|
|
112
|
-
return `Неверный вариант: ожидалось одно из ${util.joinValues(issue.values, "|")}`;
|
|
113
|
-
case "too_big": {
|
|
114
|
-
const adj = issue.inclusive ? "<=" : "<";
|
|
115
|
-
const sizing = getSizing(issue.origin);
|
|
116
|
-
if (sizing) {
|
|
117
|
-
const maxValue = Number(issue.maximum);
|
|
118
|
-
const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
|
|
119
|
-
return `Слишком большое значение: ожидалось, что ${issue.origin ?? "значение"} будет иметь ${adj}${issue.maximum.toString()} ${unit}`;
|
|
120
|
-
}
|
|
121
|
-
return `Слишком большое значение: ожидалось, что ${issue.origin ?? "значение"} будет ${adj}${issue.maximum.toString()}`;
|
|
122
|
-
}
|
|
123
|
-
case "too_small": {
|
|
124
|
-
const adj = issue.inclusive ? ">=" : ">";
|
|
125
|
-
const sizing = getSizing(issue.origin);
|
|
126
|
-
if (sizing) {
|
|
127
|
-
const minValue = Number(issue.minimum);
|
|
128
|
-
const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
|
|
129
|
-
return `Слишком маленькое значение: ожидалось, что ${issue.origin} будет иметь ${adj}${issue.minimum.toString()} ${unit}`;
|
|
130
|
-
}
|
|
131
|
-
return `Слишком маленькое значение: ожидалось, что ${issue.origin} будет ${adj}${issue.minimum.toString()}`;
|
|
132
|
-
}
|
|
133
|
-
case "invalid_format": {
|
|
134
|
-
const _issue = issue;
|
|
135
|
-
if (_issue.format === "starts_with")
|
|
136
|
-
return `Неверная строка: должна начинаться с "${_issue.prefix}"`;
|
|
137
|
-
if (_issue.format === "ends_with")
|
|
138
|
-
return `Неверная строка: должна заканчиваться на "${_issue.suffix}"`;
|
|
139
|
-
if (_issue.format === "includes")
|
|
140
|
-
return `Неверная строка: должна содержать "${_issue.includes}"`;
|
|
141
|
-
if (_issue.format === "regex")
|
|
142
|
-
return `Неверная строка: должна соответствовать шаблону ${_issue.pattern}`;
|
|
143
|
-
return `Неверный ${Nouns[_issue.format] ?? issue.format}`;
|
|
144
|
-
}
|
|
145
|
-
case "not_multiple_of":
|
|
146
|
-
return `Неверное число: должно быть кратным ${issue.divisor}`;
|
|
147
|
-
case "unrecognized_keys":
|
|
148
|
-
return `Нераспознанн${issue.keys.length > 1 ? "ые" : "ый"} ключ${issue.keys.length > 1 ? "и" : ""}: ${util.joinValues(issue.keys, ", ")}`;
|
|
149
|
-
case "invalid_key":
|
|
150
|
-
return `Неверный ключ в ${issue.origin}`;
|
|
151
|
-
case "invalid_union":
|
|
152
|
-
return "Неверные входные данные";
|
|
153
|
-
case "invalid_element":
|
|
154
|
-
return `Неверное значение в ${issue.origin}`;
|
|
155
|
-
default:
|
|
156
|
-
return `Неверные входные данные`;
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
|
-
export default function () {
|
|
161
|
-
return {
|
|
162
|
-
localeError: error(),
|
|
163
|
-
};
|
|
164
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import * as util from "../core/util.js";
|
|
2
|
-
const error = () => {
|
|
3
|
-
const Sizable = {
|
|
4
|
-
string: { unit: "znakov", verb: "imeti" },
|
|
5
|
-
file: { unit: "bajtov", verb: "imeti" },
|
|
6
|
-
array: { unit: "elementov", verb: "imeti" },
|
|
7
|
-
set: { unit: "elementov", verb: "imeti" },
|
|
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" : "število";
|
|
17
|
-
}
|
|
18
|
-
case "object": {
|
|
19
|
-
if (Array.isArray(data)) {
|
|
20
|
-
return "tabela";
|
|
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: "vnos",
|
|
34
|
-
email: "e-poštni naslov",
|
|
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 in čas",
|
|
48
|
-
date: "ISO datum",
|
|
49
|
-
time: "ISO čas",
|
|
50
|
-
duration: "ISO trajanje",
|
|
51
|
-
ipv4: "IPv4 naslov",
|
|
52
|
-
ipv6: "IPv6 naslov",
|
|
53
|
-
cidrv4: "obseg IPv4",
|
|
54
|
-
cidrv6: "obseg IPv6",
|
|
55
|
-
base64: "base64 kodiran niz",
|
|
56
|
-
base64url: "base64url kodiran niz",
|
|
57
|
-
json_string: "JSON niz",
|
|
58
|
-
e164: "E.164 številka",
|
|
59
|
-
jwt: "JWT",
|
|
60
|
-
template_literal: "vnos",
|
|
61
|
-
};
|
|
62
|
-
return (issue) => {
|
|
63
|
-
switch (issue.code) {
|
|
64
|
-
case "invalid_type":
|
|
65
|
-
return `Neveljaven vnos: pričakovano ${issue.expected}, prejeto ${parsedType(issue.input)}`;
|
|
66
|
-
case "invalid_value":
|
|
67
|
-
if (issue.values.length === 1)
|
|
68
|
-
return `Neveljaven vnos: pričakovano ${util.stringifyPrimitive(issue.values[0])}`;
|
|
69
|
-
return `Neveljavna možnost: pričakovano eno izmed ${util.joinValues(issue.values, "|")}`;
|
|
70
|
-
case "too_big": {
|
|
71
|
-
const adj = issue.inclusive ? "<=" : "<";
|
|
72
|
-
const sizing = getSizing(issue.origin);
|
|
73
|
-
if (sizing)
|
|
74
|
-
return `Preveliko: pričakovano, da bo ${issue.origin ?? "vrednost"} imelo ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementov"}`;
|
|
75
|
-
return `Preveliko: pričakovano, da bo ${issue.origin ?? "vrednost"} ${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 `Premajhno: pričakovano, da bo ${issue.origin} imelo ${adj}${issue.minimum.toString()} ${sizing.unit}`;
|
|
82
|
-
}
|
|
83
|
-
return `Premajhno: pričakovano, da bo ${issue.origin} ${adj}${issue.minimum.toString()}`;
|
|
84
|
-
}
|
|
85
|
-
case "invalid_format": {
|
|
86
|
-
const _issue = issue;
|
|
87
|
-
if (_issue.format === "starts_with") {
|
|
88
|
-
return `Neveljaven niz: mora se začeti z "${_issue.prefix}"`;
|
|
89
|
-
}
|
|
90
|
-
if (_issue.format === "ends_with")
|
|
91
|
-
return `Neveljaven niz: mora se končati z "${_issue.suffix}"`;
|
|
92
|
-
if (_issue.format === "includes")
|
|
93
|
-
return `Neveljaven niz: mora vsebovati "${_issue.includes}"`;
|
|
94
|
-
if (_issue.format === "regex")
|
|
95
|
-
return `Neveljaven niz: mora ustrezati vzorcu ${_issue.pattern}`;
|
|
96
|
-
return `Neveljaven ${Nouns[_issue.format] ?? issue.format}`;
|
|
97
|
-
}
|
|
98
|
-
case "not_multiple_of":
|
|
99
|
-
return `Neveljavno število: mora biti večkratnik ${issue.divisor}`;
|
|
100
|
-
case "unrecognized_keys":
|
|
101
|
-
return `Neprepoznan${issue.keys.length > 1 ? "i ključi" : " ključ"}: ${util.joinValues(issue.keys, ", ")}`;
|
|
102
|
-
case "invalid_key":
|
|
103
|
-
return `Neveljaven ključ v ${issue.origin}`;
|
|
104
|
-
case "invalid_union":
|
|
105
|
-
return "Neveljaven vnos";
|
|
106
|
-
case "invalid_element":
|
|
107
|
-
return `Neveljavna vrednost v ${issue.origin}`;
|
|
108
|
-
default:
|
|
109
|
-
return "Neveljaven vnos";
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
export default function () {
|
|
114
|
-
return {
|
|
115
|
-
localeError: error(),
|
|
116
|
-
};
|
|
117
|
-
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import * as util from "../core/util.js";
|
|
2
|
-
const error = () => {
|
|
3
|
-
const Sizable = {
|
|
4
|
-
string: { unit: "tecken", verb: "att ha" },
|
|
5
|
-
file: { unit: "bytes", verb: "att ha" },
|
|
6
|
-
array: { unit: "objekt", verb: "att innehålla" },
|
|
7
|
-
set: { unit: "objekt", verb: "att innehålla" },
|
|
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" : "antal";
|
|
17
|
-
}
|
|
18
|
-
case "object": {
|
|
19
|
-
if (Array.isArray(data)) {
|
|
20
|
-
return "lista";
|
|
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: "reguljärt uttryck",
|
|
34
|
-
email: "e-postadress",
|
|
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 och tid",
|
|
48
|
-
date: "ISO-datum",
|
|
49
|
-
time: "ISO-tid",
|
|
50
|
-
duration: "ISO-varaktighet",
|
|
51
|
-
ipv4: "IPv4-intervall",
|
|
52
|
-
ipv6: "IPv6-intervall",
|
|
53
|
-
cidrv4: "IPv4-spektrum",
|
|
54
|
-
cidrv6: "IPv6-spektrum",
|
|
55
|
-
base64: "base64-kodad sträng",
|
|
56
|
-
base64url: "base64url-kodad sträng",
|
|
57
|
-
json_string: "JSON-sträng",
|
|
58
|
-
e164: "E.164-nummer",
|
|
59
|
-
jwt: "JWT",
|
|
60
|
-
template_literal: "mall-literal",
|
|
61
|
-
};
|
|
62
|
-
return (issue) => {
|
|
63
|
-
switch (issue.code) {
|
|
64
|
-
case "invalid_type":
|
|
65
|
-
return `Ogiltig inmatning: förväntat ${issue.expected}, fick ${parsedType(issue.input)}`;
|
|
66
|
-
case "invalid_value":
|
|
67
|
-
if (issue.values.length === 1)
|
|
68
|
-
return `Ogiltig inmatning: förväntat ${util.stringifyPrimitive(issue.values[0])}`;
|
|
69
|
-
return `Ogiltigt val: förväntade 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 `För stor(t): förväntade ${issue.origin ?? "värdet"} att ha ${adj}${issue.maximum.toString()} ${sizing.unit ?? "element"}`;
|
|
75
|
-
}
|
|
76
|
-
return `För stor(t): förväntat ${issue.origin ?? "värdet"} att ha ${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 `För lite(t): förväntade ${issue.origin ?? "värdet"} att ha ${adj}${issue.minimum.toString()} ${sizing.unit}`;
|
|
83
|
-
}
|
|
84
|
-
return `För lite(t): förväntade ${issue.origin ?? "värdet"} att ha ${adj}${issue.minimum.toString()}`;
|
|
85
|
-
}
|
|
86
|
-
case "invalid_format": {
|
|
87
|
-
const _issue = issue;
|
|
88
|
-
if (_issue.format === "starts_with") {
|
|
89
|
-
return `Ogiltig sträng: måste börja med "${_issue.prefix}"`;
|
|
90
|
-
}
|
|
91
|
-
if (_issue.format === "ends_with")
|
|
92
|
-
return `Ogiltig sträng: måste sluta med "${_issue.suffix}"`;
|
|
93
|
-
if (_issue.format === "includes")
|
|
94
|
-
return `Ogiltig sträng: måste innehålla "${_issue.includes}"`;
|
|
95
|
-
if (_issue.format === "regex")
|
|
96
|
-
return `Ogiltig sträng: måste matcha mönstret "${_issue.pattern}"`;
|
|
97
|
-
return `Ogiltig(t) ${Nouns[_issue.format] ?? issue.format}`;
|
|
98
|
-
}
|
|
99
|
-
case "not_multiple_of":
|
|
100
|
-
return `Ogiltigt tal: måste vara en multipel av ${issue.divisor}`;
|
|
101
|
-
case "unrecognized_keys":
|
|
102
|
-
return `${issue.keys.length > 1 ? "Okända nycklar" : "Okänd nyckel"}: ${util.joinValues(issue.keys, ", ")}`;
|
|
103
|
-
case "invalid_key":
|
|
104
|
-
return `Ogiltig nyckel i ${issue.origin ?? "värdet"}`;
|
|
105
|
-
case "invalid_union":
|
|
106
|
-
return "Ogiltig input";
|
|
107
|
-
case "invalid_element":
|
|
108
|
-
return `Ogiltigt värde i ${issue.origin ?? "värdet"}`;
|
|
109
|
-
default:
|
|
110
|
-
return `Ogiltig input`;
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
|
-
export default function () {
|
|
115
|
-
return {
|
|
116
|
-
localeError: error(),
|
|
117
|
-
};
|
|
118
|
-
}
|