@btc-embedded/cdk-extensions 0.10.1 → 0.10.3
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 +5 -5
- package/CHANGELOG.md +9 -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/StackParameter.js +1 -1
- 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: "ký tự", verb: "có" },
|
|
5
|
+
file: { unit: "byte", verb: "có" },
|
|
6
|
+
array: { unit: "phần tử", verb: "có" },
|
|
7
|
+
set: { unit: "phần tử", verb: "có" },
|
|
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" : "số";
|
|
17
|
+
}
|
|
18
|
+
case "object": {
|
|
19
|
+
if (Array.isArray(data)) {
|
|
20
|
+
return "mảng";
|
|
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: "đầu vào",
|
|
34
|
+
email: "địa chỉ 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: "ngày giờ ISO",
|
|
48
|
+
date: "ngày ISO",
|
|
49
|
+
time: "giờ ISO",
|
|
50
|
+
duration: "khoảng thời gian ISO",
|
|
51
|
+
ipv4: "địa chỉ IPv4",
|
|
52
|
+
ipv6: "địa chỉ IPv6",
|
|
53
|
+
cidrv4: "dải IPv4",
|
|
54
|
+
cidrv6: "dải IPv6",
|
|
55
|
+
base64: "chuỗi mã hóa base64",
|
|
56
|
+
base64url: "chuỗi mã hóa base64url",
|
|
57
|
+
json_string: "chuỗi JSON",
|
|
58
|
+
e164: "số E.164",
|
|
59
|
+
jwt: "JWT",
|
|
60
|
+
template_literal: "đầu vào",
|
|
61
|
+
};
|
|
62
|
+
return (issue) => {
|
|
63
|
+
switch (issue.code) {
|
|
64
|
+
case "invalid_type":
|
|
65
|
+
return `Đầu vào không hợp lệ: mong đợi ${issue.expected}, nhận được ${parsedType(issue.input)}`;
|
|
66
|
+
case "invalid_value":
|
|
67
|
+
if (issue.values.length === 1)
|
|
68
|
+
return `Đầu vào không hợp lệ: mong đợi ${util.stringifyPrimitive(issue.values[0])}`;
|
|
69
|
+
return `Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${util.joinValues(issue.values, "|")}`;
|
|
70
|
+
case "too_big": {
|
|
71
|
+
const adj = issue.inclusive ? "<=" : "<";
|
|
72
|
+
const sizing = getSizing(issue.origin);
|
|
73
|
+
if (sizing)
|
|
74
|
+
return `Quá lớn: mong đợi ${issue.origin ?? "giá trị"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "phần tử"}`;
|
|
75
|
+
return `Quá lớn: mong đợi ${issue.origin ?? "giá trị"} ${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 `Quá nhỏ: mong đợi ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
|
|
82
|
+
}
|
|
83
|
+
return `Quá nhỏ: mong đợi ${issue.origin} ${adj}${issue.minimum.toString()}`;
|
|
84
|
+
}
|
|
85
|
+
case "invalid_format": {
|
|
86
|
+
const _issue = issue;
|
|
87
|
+
if (_issue.format === "starts_with")
|
|
88
|
+
return `Chuỗi không hợp lệ: phải bắt đầu bằng "${_issue.prefix}"`;
|
|
89
|
+
if (_issue.format === "ends_with")
|
|
90
|
+
return `Chuỗi không hợp lệ: phải kết thúc bằng "${_issue.suffix}"`;
|
|
91
|
+
if (_issue.format === "includes")
|
|
92
|
+
return `Chuỗi không hợp lệ: phải bao gồm "${_issue.includes}"`;
|
|
93
|
+
if (_issue.format === "regex")
|
|
94
|
+
return `Chuỗi không hợp lệ: phải khớp với mẫu ${_issue.pattern}`;
|
|
95
|
+
return `${Nouns[_issue.format] ?? issue.format} không hợp lệ`;
|
|
96
|
+
}
|
|
97
|
+
case "not_multiple_of":
|
|
98
|
+
return `Số không hợp lệ: phải là bội số của ${issue.divisor}`;
|
|
99
|
+
case "unrecognized_keys":
|
|
100
|
+
return `Khóa không được nhận dạng: ${util.joinValues(issue.keys, ", ")}`;
|
|
101
|
+
case "invalid_key":
|
|
102
|
+
return `Khóa không hợp lệ trong ${issue.origin}`;
|
|
103
|
+
case "invalid_union":
|
|
104
|
+
return "Đầu vào không hợp lệ";
|
|
105
|
+
case "invalid_element":
|
|
106
|
+
return `Giá trị không hợp lệ trong ${issue.origin}`;
|
|
107
|
+
default:
|
|
108
|
+
return `Đầu vào không hợp lệ`;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
export default function () {
|
|
113
|
+
return {
|
|
114
|
+
localeError: error(),
|
|
115
|
+
};
|
|
116
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
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: "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: "ISO日期时间",
|
|
48
|
+
date: "ISO日期",
|
|
49
|
+
time: "ISO时间",
|
|
50
|
+
duration: "ISO时长",
|
|
51
|
+
ipv4: "IPv4地址",
|
|
52
|
+
ipv6: "IPv6地址",
|
|
53
|
+
cidrv4: "IPv4网段",
|
|
54
|
+
cidrv6: "IPv6网段",
|
|
55
|
+
base64: "base64编码字符串",
|
|
56
|
+
base64url: "base64url编码字符串",
|
|
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
|
+
return `无效选项:期望以下之一 ${util.joinValues(issue.values, "|")}`;
|
|
70
|
+
case "too_big": {
|
|
71
|
+
const adj = issue.inclusive ? "<=" : "<";
|
|
72
|
+
const sizing = getSizing(issue.origin);
|
|
73
|
+
if (sizing)
|
|
74
|
+
return `数值过大:期望 ${issue.origin ?? "值"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "个元素"}`;
|
|
75
|
+
return `数值过大:期望 ${issue.origin ?? "值"} ${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 `数值过小:期望 ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
|
|
82
|
+
}
|
|
83
|
+
return `数值过小:期望 ${issue.origin} ${adj}${issue.minimum.toString()}`;
|
|
84
|
+
}
|
|
85
|
+
case "invalid_format": {
|
|
86
|
+
const _issue = issue;
|
|
87
|
+
if (_issue.format === "starts_with")
|
|
88
|
+
return `无效字符串:必须以 "${_issue.prefix}" 开头`;
|
|
89
|
+
if (_issue.format === "ends_with")
|
|
90
|
+
return `无效字符串:必须以 "${_issue.suffix}" 结尾`;
|
|
91
|
+
if (_issue.format === "includes")
|
|
92
|
+
return `无效字符串:必须包含 "${_issue.includes}"`;
|
|
93
|
+
if (_issue.format === "regex")
|
|
94
|
+
return `无效字符串:必须满足正则表达式 ${_issue.pattern}`;
|
|
95
|
+
return `无效${Nouns[_issue.format] ?? issue.format}`;
|
|
96
|
+
}
|
|
97
|
+
case "not_multiple_of":
|
|
98
|
+
return `无效数字:必须是 ${issue.divisor} 的倍数`;
|
|
99
|
+
case "unrecognized_keys":
|
|
100
|
+
return `出现未知的键(key): ${util.joinValues(issue.keys, ", ")}`;
|
|
101
|
+
case "invalid_key":
|
|
102
|
+
return `${issue.origin} 中的键(key)无效`;
|
|
103
|
+
case "invalid_union":
|
|
104
|
+
return "无效输入";
|
|
105
|
+
case "invalid_element":
|
|
106
|
+
return `${issue.origin} 中包含无效值(value)`;
|
|
107
|
+
default:
|
|
108
|
+
return `无效输入`;
|
|
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: "字元", 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" : "number";
|
|
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: "輸入",
|
|
34
|
+
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: "ISO 日期時間",
|
|
48
|
+
date: "ISO 日期",
|
|
49
|
+
time: "ISO 時間",
|
|
50
|
+
duration: "ISO 期間",
|
|
51
|
+
ipv4: "IPv4 位址",
|
|
52
|
+
ipv6: "IPv6 位址",
|
|
53
|
+
cidrv4: "IPv4 範圍",
|
|
54
|
+
cidrv6: "IPv6 範圍",
|
|
55
|
+
base64: "base64 編碼字串",
|
|
56
|
+
base64url: "base64url 編碼字串",
|
|
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
|
+
return `無效的選項:預期為以下其中之一 ${util.joinValues(issue.values, "|")}`;
|
|
70
|
+
case "too_big": {
|
|
71
|
+
const adj = issue.inclusive ? "<=" : "<";
|
|
72
|
+
const sizing = getSizing(issue.origin);
|
|
73
|
+
if (sizing)
|
|
74
|
+
return `數值過大:預期 ${issue.origin ?? "值"} 應為 ${adj}${issue.maximum.toString()} ${sizing.unit ?? "個元素"}`;
|
|
75
|
+
return `數值過大:預期 ${issue.origin ?? "值"} 應為 ${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 `數值過小:預期 ${issue.origin} 應為 ${adj}${issue.minimum.toString()} ${sizing.unit}`;
|
|
82
|
+
}
|
|
83
|
+
return `數值過小:預期 ${issue.origin} 應為 ${adj}${issue.minimum.toString()}`;
|
|
84
|
+
}
|
|
85
|
+
case "invalid_format": {
|
|
86
|
+
const _issue = issue;
|
|
87
|
+
if (_issue.format === "starts_with") {
|
|
88
|
+
return `無效的字串:必須以 "${_issue.prefix}" 開頭`;
|
|
89
|
+
}
|
|
90
|
+
if (_issue.format === "ends_with")
|
|
91
|
+
return `無效的字串:必須以 "${_issue.suffix}" 結尾`;
|
|
92
|
+
if (_issue.format === "includes")
|
|
93
|
+
return `無效的字串:必須包含 "${_issue.includes}"`;
|
|
94
|
+
if (_issue.format === "regex")
|
|
95
|
+
return `無效的字串:必須符合格式 ${_issue.pattern}`;
|
|
96
|
+
return `無效的 ${Nouns[_issue.format] ?? issue.format}`;
|
|
97
|
+
}
|
|
98
|
+
case "not_multiple_of":
|
|
99
|
+
return `無效的數字:必須為 ${issue.divisor} 的倍數`;
|
|
100
|
+
case "unrecognized_keys":
|
|
101
|
+
return `無法識別的鍵值${issue.keys.length > 1 ? "們" : ""}:${util.joinValues(issue.keys, "、")}`;
|
|
102
|
+
case "invalid_key":
|
|
103
|
+
return `${issue.origin} 中有無效的鍵值`;
|
|
104
|
+
case "invalid_union":
|
|
105
|
+
return "無效的輸入值";
|
|
106
|
+
case "invalid_element":
|
|
107
|
+
return `${issue.origin} 中有無效的值`;
|
|
108
|
+
default:
|
|
109
|
+
return `無效的輸入值`;
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
export default function () {
|
|
114
|
+
return {
|
|
115
|
+
localeError: error(),
|
|
116
|
+
};
|
|
117
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { _lt as lt, _lte as lte, _lte as maximum, _gt as gt, _gte as gte, _gte as minimum, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property, _mime as mime, _overwrite as overwrite, _normalize as normalize, _trim as trim, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, } from "zod/v4/core";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as core from "zod/v4/core";
|
|
2
|
+
import * as schemas from "./schemas.js";
|
|
3
|
+
export function string(params) {
|
|
4
|
+
return core._coercedString(schemas.ZodMiniString, params);
|
|
5
|
+
}
|
|
6
|
+
export function number(params) {
|
|
7
|
+
return core._coercedNumber(schemas.ZodMiniNumber, params);
|
|
8
|
+
}
|
|
9
|
+
export function boolean(params) {
|
|
10
|
+
return core._coercedBoolean(schemas.ZodMiniBoolean, params);
|
|
11
|
+
}
|
|
12
|
+
export function bigint(params) {
|
|
13
|
+
return core._coercedBigint(schemas.ZodMiniBigInt, params);
|
|
14
|
+
}
|
|
15
|
+
export function date(params) {
|
|
16
|
+
return core._coercedDate(schemas.ZodMiniDate, params);
|
|
17
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * as core from "zod/v4/core";
|
|
2
|
+
export * from "./parse.js";
|
|
3
|
+
export * from "./schemas.js";
|
|
4
|
+
export * from "./checks.js";
|
|
5
|
+
export { globalRegistry, registry, config, $output, $input, $brand, function, clone, regexes, treeifyError, prettifyError, formatError, flattenError, toJSONSchema, TimePrecision, } from "zod/v4/core";
|
|
6
|
+
export * as locales from "../locales/index.js";
|
|
7
|
+
/** A special constant with type `never` */
|
|
8
|
+
// export const NEVER = {} as never;
|
|
9
|
+
// iso
|
|
10
|
+
export * as iso from "./iso.js";
|
|
11
|
+
export { ZodMiniISODateTime, ZodMiniISODate, ZodMiniISOTime, ZodMiniISODuration, } from "./iso.js";
|
|
12
|
+
// coerce
|
|
13
|
+
export * as coerce from "./coerce.js";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as core from "zod/v4/core";
|
|
2
|
+
import * as schemas from "./schemas.js";
|
|
3
|
+
export const ZodMiniISODateTime = /*@__PURE__*/ core.$constructor("$ZodISODateTime", (inst, def) => {
|
|
4
|
+
core.$ZodISODateTime.init(inst, def);
|
|
5
|
+
schemas.ZodMiniStringFormat.init(inst, def);
|
|
6
|
+
});
|
|
7
|
+
export function datetime(params) {
|
|
8
|
+
return core._isoDateTime(ZodMiniISODateTime, params);
|
|
9
|
+
}
|
|
10
|
+
export const ZodMiniISODate = /*@__PURE__*/ core.$constructor("$ZodISODate", (inst, def) => {
|
|
11
|
+
core.$ZodISODate.init(inst, def);
|
|
12
|
+
schemas.ZodMiniStringFormat.init(inst, def);
|
|
13
|
+
});
|
|
14
|
+
export function date(params) {
|
|
15
|
+
return core._isoDate(ZodMiniISODate, params);
|
|
16
|
+
}
|
|
17
|
+
export const ZodMiniISOTime = /*@__PURE__*/ core.$constructor("$ZodISOTime", (inst, def) => {
|
|
18
|
+
core.$ZodISOTime.init(inst, def);
|
|
19
|
+
schemas.ZodMiniStringFormat.init(inst, def);
|
|
20
|
+
});
|
|
21
|
+
export function time(params) {
|
|
22
|
+
return core._isoTime(ZodMiniISOTime, params);
|
|
23
|
+
}
|
|
24
|
+
export const ZodMiniISODuration = /*@__PURE__*/ core.$constructor("$ZodISODuration", (inst, def) => {
|
|
25
|
+
core.$ZodISODuration.init(inst, def);
|
|
26
|
+
schemas.ZodMiniStringFormat.init(inst, def);
|
|
27
|
+
});
|
|
28
|
+
export function duration(params) {
|
|
29
|
+
return core._isoDuration(ZodMiniISODuration, params);
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { parse, safeParse, parseAsync, safeParseAsync } from "zod/v4/core";
|