@btc-embedded/cdk-extensions 0.6.0 → 0.7.0
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 -3
- package/CHANGELOG.md +19 -0
- package/lib/constructs/SecureRestApi.js +1 -1
- package/lib/extensions/ApiGatewayExtension.js +1 -1
- package/lib/extensions/ApplicationLoadBalancerExtension.js +1 -1
- package/lib/extensions/CloudMapExtension.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/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/ApplicationLoadBalancer.js +1 -1
- package/lib/platform/DefaultUserPoolClients.js +1 -1
- package/lib/platform/DocumentDB.js +1 -1
- package/lib/platform/PrivateDnsNamespace.js +1 -1
- package/lib/platform/Vpc.js +1 -1
- package/lib/utils/configFileParsing.d.ts +25 -0
- package/lib/utils/configFileParsing.js +51 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +2 -1
- package/node_modules/yaml/LICENSE +13 -0
- package/node_modules/yaml/README.md +188 -0
- package/node_modules/yaml/bin.mjs +11 -0
- package/node_modules/yaml/browser/dist/compose/compose-collection.js +88 -0
- package/node_modules/yaml/browser/dist/compose/compose-doc.js +43 -0
- package/node_modules/yaml/browser/dist/compose/compose-node.js +102 -0
- package/node_modules/yaml/browser/dist/compose/compose-scalar.js +86 -0
- package/node_modules/yaml/browser/dist/compose/composer.js +217 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-map.js +115 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-scalar.js +198 -0
- package/node_modules/yaml/browser/dist/compose/resolve-block-seq.js +49 -0
- package/node_modules/yaml/browser/dist/compose/resolve-end.js +37 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-collection.js +207 -0
- package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +223 -0
- package/node_modules/yaml/browser/dist/compose/resolve-props.js +148 -0
- package/node_modules/yaml/browser/dist/compose/util-contains-newline.js +34 -0
- package/node_modules/yaml/browser/dist/compose/util-empty-scalar-position.js +27 -0
- package/node_modules/yaml/browser/dist/compose/util-flow-indent-check.js +15 -0
- package/node_modules/yaml/browser/dist/compose/util-map-includes.js +13 -0
- package/node_modules/yaml/browser/dist/doc/Document.js +335 -0
- package/node_modules/yaml/browser/dist/doc/anchors.js +72 -0
- package/node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
- package/node_modules/yaml/browser/dist/doc/createNode.js +89 -0
- package/node_modules/yaml/browser/dist/doc/directives.js +176 -0
- package/node_modules/yaml/browser/dist/errors.js +57 -0
- package/node_modules/yaml/browser/dist/index.js +17 -0
- package/node_modules/yaml/browser/dist/log.js +11 -0
- package/node_modules/yaml/browser/dist/nodes/Alias.js +101 -0
- package/node_modules/yaml/browser/dist/nodes/Collection.js +147 -0
- package/node_modules/yaml/browser/dist/nodes/Node.js +38 -0
- package/node_modules/yaml/browser/dist/nodes/Pair.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/Scalar.js +24 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLMap.js +144 -0
- package/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +113 -0
- package/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +62 -0
- package/node_modules/yaml/browser/dist/nodes/identity.js +36 -0
- package/node_modules/yaml/browser/dist/nodes/toJS.js +37 -0
- package/node_modules/yaml/browser/dist/parse/cst-scalar.js +214 -0
- package/node_modules/yaml/browser/dist/parse/cst-stringify.js +61 -0
- package/node_modules/yaml/browser/dist/parse/cst-visit.js +97 -0
- package/node_modules/yaml/browser/dist/parse/cst.js +98 -0
- package/node_modules/yaml/browser/dist/parse/lexer.js +717 -0
- package/node_modules/yaml/browser/dist/parse/line-counter.js +39 -0
- package/node_modules/yaml/browser/dist/parse/parser.js +954 -0
- package/node_modules/yaml/browser/dist/public-api.js +102 -0
- package/node_modules/yaml/browser/dist/schema/Schema.js +37 -0
- package/node_modules/yaml/browser/dist/schema/common/map.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/null.js +15 -0
- package/node_modules/yaml/browser/dist/schema/common/seq.js +17 -0
- package/node_modules/yaml/browser/dist/schema/common/string.js +14 -0
- package/node_modules/yaml/browser/dist/schema/core/bool.js +19 -0
- package/node_modules/yaml/browser/dist/schema/core/float.js +43 -0
- package/node_modules/yaml/browser/dist/schema/core/int.js +38 -0
- package/node_modules/yaml/browser/dist/schema/core/schema.js +23 -0
- package/node_modules/yaml/browser/dist/schema/json/schema.js +62 -0
- package/node_modules/yaml/browser/dist/schema/tags.js +96 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +57 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/bool.js +26 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/float.js +46 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/int.js +71 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +64 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +74 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +78 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/schema.js +39 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +93 -0
- package/node_modules/yaml/browser/dist/schema/yaml-1.1/timestamp.js +101 -0
- package/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +146 -0
- package/node_modules/yaml/browser/dist/stringify/stringify.js +129 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +143 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyComment.js +20 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyDocument.js +85 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyNumber.js +24 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyPair.js +150 -0
- package/node_modules/yaml/browser/dist/stringify/stringifyString.js +337 -0
- package/node_modules/yaml/browser/dist/util.js +11 -0
- package/node_modules/yaml/browser/dist/visit.js +233 -0
- package/node_modules/yaml/browser/index.js +5 -0
- package/node_modules/yaml/browser/package.json +3 -0
- package/node_modules/yaml/dist/cli.d.ts +8 -0
- package/node_modules/yaml/dist/cli.mjs +199 -0
- package/node_modules/yaml/dist/compose/compose-collection.d.ts +11 -0
- package/node_modules/yaml/dist/compose/compose-collection.js +90 -0
- package/node_modules/yaml/dist/compose/compose-doc.d.ts +7 -0
- package/node_modules/yaml/dist/compose/compose-doc.js +45 -0
- package/node_modules/yaml/dist/compose/compose-node.d.ts +29 -0
- package/node_modules/yaml/dist/compose/compose-node.js +105 -0
- package/node_modules/yaml/dist/compose/compose-scalar.d.ts +5 -0
- package/node_modules/yaml/dist/compose/compose-scalar.js +88 -0
- package/node_modules/yaml/dist/compose/composer.d.ts +63 -0
- package/node_modules/yaml/dist/compose/composer.js +222 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-map.js +117 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +11 -0
- package/node_modules/yaml/dist/compose/resolve-block-scalar.js +200 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-block-seq.js +51 -0
- package/node_modules/yaml/dist/compose/resolve-end.d.ts +6 -0
- package/node_modules/yaml/dist/compose/resolve-end.js +39 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -0
- package/node_modules/yaml/dist/compose/resolve-flow-collection.js +209 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +10 -0
- package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +225 -0
- package/node_modules/yaml/dist/compose/resolve-props.d.ts +23 -0
- package/node_modules/yaml/dist/compose/resolve-props.js +150 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-contains-newline.js +36 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +2 -0
- package/node_modules/yaml/dist/compose/util-empty-scalar-position.js +29 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +3 -0
- package/node_modules/yaml/dist/compose/util-flow-indent-check.js +17 -0
- package/node_modules/yaml/dist/compose/util-map-includes.d.ts +4 -0
- package/node_modules/yaml/dist/compose/util-map-includes.js +15 -0
- package/node_modules/yaml/dist/doc/Document.d.ts +141 -0
- package/node_modules/yaml/dist/doc/Document.js +337 -0
- package/node_modules/yaml/dist/doc/anchors.d.ts +24 -0
- package/node_modules/yaml/dist/doc/anchors.js +77 -0
- package/node_modules/yaml/dist/doc/applyReviver.d.ts +9 -0
- package/node_modules/yaml/dist/doc/applyReviver.js +57 -0
- package/node_modules/yaml/dist/doc/createNode.d.ts +17 -0
- package/node_modules/yaml/dist/doc/createNode.js +91 -0
- package/node_modules/yaml/dist/doc/directives.d.ts +49 -0
- package/node_modules/yaml/dist/doc/directives.js +178 -0
- package/node_modules/yaml/dist/errors.d.ts +21 -0
- package/node_modules/yaml/dist/errors.js +62 -0
- package/node_modules/yaml/dist/index.d.ts +25 -0
- package/node_modules/yaml/dist/index.js +50 -0
- package/node_modules/yaml/dist/log.d.ts +3 -0
- package/node_modules/yaml/dist/log.js +19 -0
- package/node_modules/yaml/dist/nodes/Alias.d.ts +29 -0
- package/node_modules/yaml/dist/nodes/Alias.js +103 -0
- package/node_modules/yaml/dist/nodes/Collection.d.ts +73 -0
- package/node_modules/yaml/dist/nodes/Collection.js +151 -0
- package/node_modules/yaml/dist/nodes/Node.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/Node.js +40 -0
- package/node_modules/yaml/dist/nodes/Pair.d.ts +22 -0
- package/node_modules/yaml/dist/nodes/Pair.js +39 -0
- package/node_modules/yaml/dist/nodes/Scalar.d.ts +43 -0
- package/node_modules/yaml/dist/nodes/Scalar.js +27 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +53 -0
- package/node_modules/yaml/dist/nodes/YAMLMap.js +147 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +60 -0
- package/node_modules/yaml/dist/nodes/YAMLSeq.js +115 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +4 -0
- package/node_modules/yaml/dist/nodes/addPairToJSMap.js +64 -0
- package/node_modules/yaml/dist/nodes/identity.d.ts +23 -0
- package/node_modules/yaml/dist/nodes/identity.js +53 -0
- package/node_modules/yaml/dist/nodes/toJS.d.ts +27 -0
- package/node_modules/yaml/dist/nodes/toJS.js +39 -0
- package/node_modules/yaml/dist/options.d.ts +344 -0
- package/node_modules/yaml/dist/parse/cst-scalar.d.ts +64 -0
- package/node_modules/yaml/dist/parse/cst-scalar.js +218 -0
- package/node_modules/yaml/dist/parse/cst-stringify.d.ts +8 -0
- package/node_modules/yaml/dist/parse/cst-stringify.js +63 -0
- package/node_modules/yaml/dist/parse/cst-visit.d.ts +39 -0
- package/node_modules/yaml/dist/parse/cst-visit.js +99 -0
- package/node_modules/yaml/dist/parse/cst.d.ts +109 -0
- package/node_modules/yaml/dist/parse/cst.js +112 -0
- package/node_modules/yaml/dist/parse/lexer.d.ts +87 -0
- package/node_modules/yaml/dist/parse/lexer.js +719 -0
- package/node_modules/yaml/dist/parse/line-counter.d.ts +22 -0
- package/node_modules/yaml/dist/parse/line-counter.js +41 -0
- package/node_modules/yaml/dist/parse/parser.d.ts +84 -0
- package/node_modules/yaml/dist/parse/parser.js +959 -0
- package/node_modules/yaml/dist/public-api.d.ts +44 -0
- package/node_modules/yaml/dist/public-api.js +107 -0
- package/node_modules/yaml/dist/schema/Schema.d.ts +17 -0
- package/node_modules/yaml/dist/schema/Schema.js +39 -0
- package/node_modules/yaml/dist/schema/common/map.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/map.js +19 -0
- package/node_modules/yaml/dist/schema/common/null.d.ts +4 -0
- package/node_modules/yaml/dist/schema/common/null.js +17 -0
- package/node_modules/yaml/dist/schema/common/seq.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/seq.js +19 -0
- package/node_modules/yaml/dist/schema/common/string.d.ts +2 -0
- package/node_modules/yaml/dist/schema/common/string.js +16 -0
- package/node_modules/yaml/dist/schema/core/bool.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/bool.js +21 -0
- package/node_modules/yaml/dist/schema/core/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/float.js +47 -0
- package/node_modules/yaml/dist/schema/core/int.d.ts +4 -0
- package/node_modules/yaml/dist/schema/core/int.js +42 -0
- package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/core/schema.js +25 -0
- package/node_modules/yaml/dist/schema/json/schema.d.ts +2 -0
- package/node_modules/yaml/dist/schema/json/schema.js +64 -0
- package/node_modules/yaml/dist/schema/json-schema.d.ts +69 -0
- package/node_modules/yaml/dist/schema/tags.d.ts +48 -0
- package/node_modules/yaml/dist/schema/tags.js +99 -0
- package/node_modules/yaml/dist/schema/types.d.ts +92 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +2 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +69 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +7 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/bool.js +29 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +4 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/float.js +50 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +5 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/int.js +76 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +9 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/merge.js +68 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +22 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/omap.js +77 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +10 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/pairs.js +82 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/schema.js +41 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +28 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/set.js +96 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +6 -0
- package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js +105 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.d.ts +34 -0
- package/node_modules/yaml/dist/stringify/foldFlowLines.js +151 -0
- package/node_modules/yaml/dist/stringify/stringify.d.ts +21 -0
- package/node_modules/yaml/dist/stringify/stringify.js +132 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +17 -0
- package/node_modules/yaml/dist/stringify/stringifyCollection.js +145 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.d.ts +10 -0
- package/node_modules/yaml/dist/stringify/stringifyComment.js +24 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +4 -0
- package/node_modules/yaml/dist/stringify/stringifyDocument.js +87 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +2 -0
- package/node_modules/yaml/dist/stringify/stringifyNumber.js +26 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +3 -0
- package/node_modules/yaml/dist/stringify/stringifyPair.js +152 -0
- package/node_modules/yaml/dist/stringify/stringifyString.d.ts +9 -0
- package/node_modules/yaml/dist/stringify/stringifyString.js +339 -0
- package/node_modules/yaml/dist/test-events.d.ts +4 -0
- package/node_modules/yaml/dist/test-events.js +134 -0
- package/node_modules/yaml/dist/util.d.ts +16 -0
- package/node_modules/yaml/dist/util.js +28 -0
- package/node_modules/yaml/dist/visit.d.ts +102 -0
- package/node_modules/yaml/dist/visit.js +236 -0
- package/node_modules/yaml/package.json +96 -0
- package/node_modules/yaml/util.js +2 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +3074 -0
- package/node_modules/zod/index.d.ts +2 -0
- package/node_modules/zod/lib/ZodError.d.ts +164 -0
- package/node_modules/zod/lib/ZodError.js +137 -0
- package/node_modules/zod/lib/__tests__/Mocker.d.ts +17 -0
- package/node_modules/zod/lib/__tests__/Mocker.js +57 -0
- package/node_modules/zod/lib/benchmarks/datetime.d.ts +5 -0
- package/node_modules/zod/lib/benchmarks/datetime.js +54 -0
- package/node_modules/zod/lib/benchmarks/discriminatedUnion.d.ts +5 -0
- package/node_modules/zod/lib/benchmarks/discriminatedUnion.js +79 -0
- package/node_modules/zod/lib/benchmarks/index.d.ts +1 -0
- package/node_modules/zod/lib/benchmarks/index.js +59 -0
- package/node_modules/zod/lib/benchmarks/ipv4.d.ts +5 -0
- package/node_modules/zod/lib/benchmarks/ipv4.js +54 -0
- package/node_modules/zod/lib/benchmarks/object.d.ts +5 -0
- package/node_modules/zod/lib/benchmarks/object.js +70 -0
- package/node_modules/zod/lib/benchmarks/primitives.d.ts +5 -0
- package/node_modules/zod/lib/benchmarks/primitives.js +170 -0
- package/node_modules/zod/lib/benchmarks/realworld.d.ts +5 -0
- package/node_modules/zod/lib/benchmarks/realworld.js +56 -0
- package/node_modules/zod/lib/benchmarks/string.d.ts +5 -0
- package/node_modules/zod/lib/benchmarks/string.js +55 -0
- package/node_modules/zod/lib/benchmarks/union.d.ts +5 -0
- package/node_modules/zod/lib/benchmarks/union.js +79 -0
- package/node_modules/zod/lib/errors.d.ts +5 -0
- package/node_modules/zod/lib/errors.js +17 -0
- package/node_modules/zod/lib/external.d.ts +6 -0
- package/node_modules/zod/lib/external.js +22 -0
- package/node_modules/zod/lib/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/lib/helpers/enumUtil.js +2 -0
- package/node_modules/zod/lib/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/lib/helpers/errorUtil.js +8 -0
- package/node_modules/zod/lib/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/lib/helpers/parseUtil.js +125 -0
- package/node_modules/zod/lib/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/lib/helpers/partialUtil.js +2 -0
- package/node_modules/zod/lib/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/lib/helpers/typeAliases.js +2 -0
- package/node_modules/zod/lib/helpers/util.d.ts +82 -0
- package/node_modules/zod/lib/helpers/util.js +142 -0
- package/node_modules/zod/lib/index.d.ts +4 -0
- package/node_modules/zod/lib/index.js +33 -0
- package/node_modules/zod/lib/index.mjs +4405 -0
- package/node_modules/zod/lib/index.umd.js +4520 -0
- package/node_modules/zod/lib/locales/en.d.ts +3 -0
- package/node_modules/zod/lib/locales/en.js +129 -0
- package/node_modules/zod/lib/standard-schema.d.ts +102 -0
- package/node_modules/zod/lib/standard-schema.js +2 -0
- package/node_modules/zod/lib/types.d.ts +1062 -0
- package/node_modules/zod/lib/types.js +3846 -0
- package/node_modules/zod/package.json +122 -0
- package/package.json +7 -3
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.isAsync = exports.isValid = exports.isDirty = exports.isAborted = exports.OK = exports.DIRTY = exports.INVALID = exports.ParseStatus = exports.addIssueToContext = exports.EMPTY_PATH = exports.makeIssue = void 0;
|
|
7
|
+
const errors_1 = require("../errors");
|
|
8
|
+
const en_1 = __importDefault(require("../locales/en"));
|
|
9
|
+
const makeIssue = (params) => {
|
|
10
|
+
const { data, path, errorMaps, issueData } = params;
|
|
11
|
+
const fullPath = [...path, ...(issueData.path || [])];
|
|
12
|
+
const fullIssue = {
|
|
13
|
+
...issueData,
|
|
14
|
+
path: fullPath,
|
|
15
|
+
};
|
|
16
|
+
if (issueData.message !== undefined) {
|
|
17
|
+
return {
|
|
18
|
+
...issueData,
|
|
19
|
+
path: fullPath,
|
|
20
|
+
message: issueData.message,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
let errorMessage = "";
|
|
24
|
+
const maps = errorMaps
|
|
25
|
+
.filter((m) => !!m)
|
|
26
|
+
.slice()
|
|
27
|
+
.reverse();
|
|
28
|
+
for (const map of maps) {
|
|
29
|
+
errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
...issueData,
|
|
33
|
+
path: fullPath,
|
|
34
|
+
message: errorMessage,
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
exports.makeIssue = makeIssue;
|
|
38
|
+
exports.EMPTY_PATH = [];
|
|
39
|
+
function addIssueToContext(ctx, issueData) {
|
|
40
|
+
const overrideMap = (0, errors_1.getErrorMap)();
|
|
41
|
+
const issue = (0, exports.makeIssue)({
|
|
42
|
+
issueData: issueData,
|
|
43
|
+
data: ctx.data,
|
|
44
|
+
path: ctx.path,
|
|
45
|
+
errorMaps: [
|
|
46
|
+
ctx.common.contextualErrorMap, // contextual error map is first priority
|
|
47
|
+
ctx.schemaErrorMap, // then schema-bound map if available
|
|
48
|
+
overrideMap, // then global override map
|
|
49
|
+
overrideMap === en_1.default ? undefined : en_1.default, // then global default map
|
|
50
|
+
].filter((x) => !!x),
|
|
51
|
+
});
|
|
52
|
+
ctx.common.issues.push(issue);
|
|
53
|
+
}
|
|
54
|
+
exports.addIssueToContext = addIssueToContext;
|
|
55
|
+
class ParseStatus {
|
|
56
|
+
constructor() {
|
|
57
|
+
this.value = "valid";
|
|
58
|
+
}
|
|
59
|
+
dirty() {
|
|
60
|
+
if (this.value === "valid")
|
|
61
|
+
this.value = "dirty";
|
|
62
|
+
}
|
|
63
|
+
abort() {
|
|
64
|
+
if (this.value !== "aborted")
|
|
65
|
+
this.value = "aborted";
|
|
66
|
+
}
|
|
67
|
+
static mergeArray(status, results) {
|
|
68
|
+
const arrayValue = [];
|
|
69
|
+
for (const s of results) {
|
|
70
|
+
if (s.status === "aborted")
|
|
71
|
+
return exports.INVALID;
|
|
72
|
+
if (s.status === "dirty")
|
|
73
|
+
status.dirty();
|
|
74
|
+
arrayValue.push(s.value);
|
|
75
|
+
}
|
|
76
|
+
return { status: status.value, value: arrayValue };
|
|
77
|
+
}
|
|
78
|
+
static async mergeObjectAsync(status, pairs) {
|
|
79
|
+
const syncPairs = [];
|
|
80
|
+
for (const pair of pairs) {
|
|
81
|
+
const key = await pair.key;
|
|
82
|
+
const value = await pair.value;
|
|
83
|
+
syncPairs.push({
|
|
84
|
+
key,
|
|
85
|
+
value,
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
return ParseStatus.mergeObjectSync(status, syncPairs);
|
|
89
|
+
}
|
|
90
|
+
static mergeObjectSync(status, pairs) {
|
|
91
|
+
const finalObject = {};
|
|
92
|
+
for (const pair of pairs) {
|
|
93
|
+
const { key, value } = pair;
|
|
94
|
+
if (key.status === "aborted")
|
|
95
|
+
return exports.INVALID;
|
|
96
|
+
if (value.status === "aborted")
|
|
97
|
+
return exports.INVALID;
|
|
98
|
+
if (key.status === "dirty")
|
|
99
|
+
status.dirty();
|
|
100
|
+
if (value.status === "dirty")
|
|
101
|
+
status.dirty();
|
|
102
|
+
if (key.value !== "__proto__" &&
|
|
103
|
+
(typeof value.value !== "undefined" || pair.alwaysSet)) {
|
|
104
|
+
finalObject[key.value] = value.value;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return { status: status.value, value: finalObject };
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
exports.ParseStatus = ParseStatus;
|
|
111
|
+
exports.INVALID = Object.freeze({
|
|
112
|
+
status: "aborted",
|
|
113
|
+
});
|
|
114
|
+
const DIRTY = (value) => ({ status: "dirty", value });
|
|
115
|
+
exports.DIRTY = DIRTY;
|
|
116
|
+
const OK = (value) => ({ status: "valid", value });
|
|
117
|
+
exports.OK = OK;
|
|
118
|
+
const isAborted = (x) => x.status === "aborted";
|
|
119
|
+
exports.isAborted = isAborted;
|
|
120
|
+
const isDirty = (x) => x.status === "dirty";
|
|
121
|
+
exports.isDirty = isDirty;
|
|
122
|
+
const isValid = (x) => x.status === "valid";
|
|
123
|
+
exports.isValid = isValid;
|
|
124
|
+
const isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
125
|
+
exports.isAsync = isAsync;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ZodArray, ZodNullable, ZodObject, ZodOptional, ZodRawShape, ZodTuple, ZodTupleItems, ZodTypeAny } from "../index";
|
|
2
|
+
export declare namespace partialUtil {
|
|
3
|
+
type DeepPartial<T extends ZodTypeAny> = T extends ZodObject<ZodRawShape> ? ZodObject<{
|
|
4
|
+
[k in keyof T["shape"]]: ZodOptional<DeepPartial<T["shape"][k]>>;
|
|
5
|
+
}, T["_def"]["unknownKeys"], T["_def"]["catchall"]> : T extends ZodArray<infer Type, infer Card> ? ZodArray<DeepPartial<Type>, Card> : T extends ZodOptional<infer Type> ? ZodOptional<DeepPartial<Type>> : T extends ZodNullable<infer Type> ? ZodNullable<DeepPartial<Type>> : T extends ZodTuple<infer Items> ? {
|
|
6
|
+
[k in keyof Items]: Items[k] extends ZodTypeAny ? DeepPartial<Items[k]> : never;
|
|
7
|
+
} extends infer PI ? PI extends ZodTupleItems ? ZodTuple<PI> : never : never : T;
|
|
8
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export declare namespace util {
|
|
2
|
+
type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
|
|
3
|
+
export type isAny<T> = 0 extends 1 & T ? true : false;
|
|
4
|
+
export const assertEqual: <A, B>(val: AssertEqual<A, B>) => AssertEqual<A, B>;
|
|
5
|
+
export function assertIs<T>(_arg: T): void;
|
|
6
|
+
export function assertNever(_x: never): never;
|
|
7
|
+
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
8
|
+
export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
|
|
9
|
+
export type MakePartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
10
|
+
export type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;
|
|
11
|
+
export const arrayToEnum: <T extends string, U extends [T, ...T[]]>(items: U) => { [k in U[number]]: k; };
|
|
12
|
+
export const getValidEnumValues: (obj: any) => any[];
|
|
13
|
+
export const objectValues: (obj: any) => any[];
|
|
14
|
+
export const objectKeys: ObjectConstructor["keys"];
|
|
15
|
+
export const find: <T>(arr: T[], checker: (arg: T) => any) => T | undefined;
|
|
16
|
+
export type identity<T> = objectUtil.identity<T>;
|
|
17
|
+
export type flatten<T> = objectUtil.flatten<T>;
|
|
18
|
+
export type noUndefined<T> = T extends undefined ? never : T;
|
|
19
|
+
export const isInteger: NumberConstructor["isInteger"];
|
|
20
|
+
export function joinValues<T extends any[]>(array: T, separator?: string): string;
|
|
21
|
+
export const jsonStringifyReplacer: (_: string, value: any) => any;
|
|
22
|
+
export {};
|
|
23
|
+
}
|
|
24
|
+
export declare namespace objectUtil {
|
|
25
|
+
export type MergeShapes<U, V> = {
|
|
26
|
+
[k in Exclude<keyof U, keyof V>]: U[k];
|
|
27
|
+
} & V;
|
|
28
|
+
type optionalKeys<T extends object> = {
|
|
29
|
+
[k in keyof T]: undefined extends T[k] ? k : never;
|
|
30
|
+
}[keyof T];
|
|
31
|
+
type requiredKeys<T extends object> = {
|
|
32
|
+
[k in keyof T]: undefined extends T[k] ? never : k;
|
|
33
|
+
}[keyof T];
|
|
34
|
+
export type addQuestionMarks<T extends object, _O = any> = {
|
|
35
|
+
[K in requiredKeys<T>]: T[K];
|
|
36
|
+
} & {
|
|
37
|
+
[K in optionalKeys<T>]?: T[K];
|
|
38
|
+
} & {
|
|
39
|
+
[k in keyof T]?: unknown;
|
|
40
|
+
};
|
|
41
|
+
export type identity<T> = T;
|
|
42
|
+
export type flatten<T> = identity<{
|
|
43
|
+
[k in keyof T]: T[k];
|
|
44
|
+
}>;
|
|
45
|
+
export type noNeverKeys<T> = {
|
|
46
|
+
[k in keyof T]: [T[k]] extends [never] ? never : k;
|
|
47
|
+
}[keyof T];
|
|
48
|
+
export type noNever<T> = identity<{
|
|
49
|
+
[k in noNeverKeys<T>]: k extends keyof T ? T[k] : never;
|
|
50
|
+
}>;
|
|
51
|
+
export const mergeShapes: <U, T>(first: U, second: T) => T & U;
|
|
52
|
+
export type extendShape<A extends object, B extends object> = {
|
|
53
|
+
[K in keyof A as K extends keyof B ? never : K]: A[K];
|
|
54
|
+
} & {
|
|
55
|
+
[K in keyof B]: B[K];
|
|
56
|
+
};
|
|
57
|
+
export {};
|
|
58
|
+
}
|
|
59
|
+
export declare const ZodParsedType: {
|
|
60
|
+
string: "string";
|
|
61
|
+
number: "number";
|
|
62
|
+
bigint: "bigint";
|
|
63
|
+
boolean: "boolean";
|
|
64
|
+
symbol: "symbol";
|
|
65
|
+
undefined: "undefined";
|
|
66
|
+
object: "object";
|
|
67
|
+
function: "function";
|
|
68
|
+
map: "map";
|
|
69
|
+
nan: "nan";
|
|
70
|
+
integer: "integer";
|
|
71
|
+
float: "float";
|
|
72
|
+
date: "date";
|
|
73
|
+
null: "null";
|
|
74
|
+
array: "array";
|
|
75
|
+
unknown: "unknown";
|
|
76
|
+
promise: "promise";
|
|
77
|
+
void: "void";
|
|
78
|
+
never: "never";
|
|
79
|
+
set: "set";
|
|
80
|
+
};
|
|
81
|
+
export type ZodParsedType = keyof typeof ZodParsedType;
|
|
82
|
+
export declare const getParsedType: (data: any) => ZodParsedType;
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getParsedType = exports.ZodParsedType = exports.objectUtil = exports.util = void 0;
|
|
4
|
+
var util;
|
|
5
|
+
(function (util) {
|
|
6
|
+
util.assertEqual = (val) => val;
|
|
7
|
+
function assertIs(_arg) { }
|
|
8
|
+
util.assertIs = assertIs;
|
|
9
|
+
function assertNever(_x) {
|
|
10
|
+
throw new Error();
|
|
11
|
+
}
|
|
12
|
+
util.assertNever = assertNever;
|
|
13
|
+
util.arrayToEnum = (items) => {
|
|
14
|
+
const obj = {};
|
|
15
|
+
for (const item of items) {
|
|
16
|
+
obj[item] = item;
|
|
17
|
+
}
|
|
18
|
+
return obj;
|
|
19
|
+
};
|
|
20
|
+
util.getValidEnumValues = (obj) => {
|
|
21
|
+
const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== "number");
|
|
22
|
+
const filtered = {};
|
|
23
|
+
for (const k of validKeys) {
|
|
24
|
+
filtered[k] = obj[k];
|
|
25
|
+
}
|
|
26
|
+
return util.objectValues(filtered);
|
|
27
|
+
};
|
|
28
|
+
util.objectValues = (obj) => {
|
|
29
|
+
return util.objectKeys(obj).map(function (e) {
|
|
30
|
+
return obj[e];
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
util.objectKeys = typeof Object.keys === "function" // eslint-disable-line ban/ban
|
|
34
|
+
? (obj) => Object.keys(obj) // eslint-disable-line ban/ban
|
|
35
|
+
: (object) => {
|
|
36
|
+
const keys = [];
|
|
37
|
+
for (const key in object) {
|
|
38
|
+
if (Object.prototype.hasOwnProperty.call(object, key)) {
|
|
39
|
+
keys.push(key);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return keys;
|
|
43
|
+
};
|
|
44
|
+
util.find = (arr, checker) => {
|
|
45
|
+
for (const item of arr) {
|
|
46
|
+
if (checker(item))
|
|
47
|
+
return item;
|
|
48
|
+
}
|
|
49
|
+
return undefined;
|
|
50
|
+
};
|
|
51
|
+
util.isInteger = typeof Number.isInteger === "function"
|
|
52
|
+
? (val) => Number.isInteger(val) // eslint-disable-line ban/ban
|
|
53
|
+
: (val) => typeof val === "number" && isFinite(val) && Math.floor(val) === val;
|
|
54
|
+
function joinValues(array, separator = " | ") {
|
|
55
|
+
return array
|
|
56
|
+
.map((val) => (typeof val === "string" ? `'${val}'` : val))
|
|
57
|
+
.join(separator);
|
|
58
|
+
}
|
|
59
|
+
util.joinValues = joinValues;
|
|
60
|
+
util.jsonStringifyReplacer = (_, value) => {
|
|
61
|
+
if (typeof value === "bigint") {
|
|
62
|
+
return value.toString();
|
|
63
|
+
}
|
|
64
|
+
return value;
|
|
65
|
+
};
|
|
66
|
+
})(util || (exports.util = util = {}));
|
|
67
|
+
var objectUtil;
|
|
68
|
+
(function (objectUtil) {
|
|
69
|
+
objectUtil.mergeShapes = (first, second) => {
|
|
70
|
+
return {
|
|
71
|
+
...first,
|
|
72
|
+
...second, // second overwrites first
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
})(objectUtil || (exports.objectUtil = objectUtil = {}));
|
|
76
|
+
exports.ZodParsedType = util.arrayToEnum([
|
|
77
|
+
"string",
|
|
78
|
+
"nan",
|
|
79
|
+
"number",
|
|
80
|
+
"integer",
|
|
81
|
+
"float",
|
|
82
|
+
"boolean",
|
|
83
|
+
"date",
|
|
84
|
+
"bigint",
|
|
85
|
+
"symbol",
|
|
86
|
+
"function",
|
|
87
|
+
"undefined",
|
|
88
|
+
"null",
|
|
89
|
+
"array",
|
|
90
|
+
"object",
|
|
91
|
+
"unknown",
|
|
92
|
+
"promise",
|
|
93
|
+
"void",
|
|
94
|
+
"never",
|
|
95
|
+
"map",
|
|
96
|
+
"set",
|
|
97
|
+
]);
|
|
98
|
+
const getParsedType = (data) => {
|
|
99
|
+
const t = typeof data;
|
|
100
|
+
switch (t) {
|
|
101
|
+
case "undefined":
|
|
102
|
+
return exports.ZodParsedType.undefined;
|
|
103
|
+
case "string":
|
|
104
|
+
return exports.ZodParsedType.string;
|
|
105
|
+
case "number":
|
|
106
|
+
return isNaN(data) ? exports.ZodParsedType.nan : exports.ZodParsedType.number;
|
|
107
|
+
case "boolean":
|
|
108
|
+
return exports.ZodParsedType.boolean;
|
|
109
|
+
case "function":
|
|
110
|
+
return exports.ZodParsedType.function;
|
|
111
|
+
case "bigint":
|
|
112
|
+
return exports.ZodParsedType.bigint;
|
|
113
|
+
case "symbol":
|
|
114
|
+
return exports.ZodParsedType.symbol;
|
|
115
|
+
case "object":
|
|
116
|
+
if (Array.isArray(data)) {
|
|
117
|
+
return exports.ZodParsedType.array;
|
|
118
|
+
}
|
|
119
|
+
if (data === null) {
|
|
120
|
+
return exports.ZodParsedType.null;
|
|
121
|
+
}
|
|
122
|
+
if (data.then &&
|
|
123
|
+
typeof data.then === "function" &&
|
|
124
|
+
data.catch &&
|
|
125
|
+
typeof data.catch === "function") {
|
|
126
|
+
return exports.ZodParsedType.promise;
|
|
127
|
+
}
|
|
128
|
+
if (typeof Map !== "undefined" && data instanceof Map) {
|
|
129
|
+
return exports.ZodParsedType.map;
|
|
130
|
+
}
|
|
131
|
+
if (typeof Set !== "undefined" && data instanceof Set) {
|
|
132
|
+
return exports.ZodParsedType.set;
|
|
133
|
+
}
|
|
134
|
+
if (typeof Date !== "undefined" && data instanceof Date) {
|
|
135
|
+
return exports.ZodParsedType.date;
|
|
136
|
+
}
|
|
137
|
+
return exports.ZodParsedType.object;
|
|
138
|
+
default:
|
|
139
|
+
return exports.ZodParsedType.unknown;
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
exports.getParsedType = getParsedType;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.z = void 0;
|
|
30
|
+
const z = __importStar(require("./external"));
|
|
31
|
+
exports.z = z;
|
|
32
|
+
__exportStar(require("./external"), exports);
|
|
33
|
+
exports.default = z;
|