cdk-assets 4.5.1 → 4.6.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/THIRD_PARTY_LICENSES +26 -0
- package/bin/cdk-assets.js +990 -252
- package/bin/docker-credential-cdk-assets.js +953 -215
- package/package.json +3 -3
package/bin/cdk-assets.js
CHANGED
|
@@ -646,22 +646,24 @@ var init_schema = __esm({
|
|
|
646
646
|
});
|
|
647
647
|
|
|
648
648
|
// ../@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/metadata-schema.ts
|
|
649
|
-
var ArtifactMetadataEntryType;
|
|
649
|
+
var ArtifactMetadataEntryType, CFN_RESOURCE_TYPE_ATTRIBUTE, CFN_RESOURCE_PROPS_ATTRIBUTE;
|
|
650
650
|
var init_metadata_schema = __esm({
|
|
651
651
|
"../@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/metadata-schema.ts"() {
|
|
652
652
|
"use strict";
|
|
653
|
-
ArtifactMetadataEntryType = /* @__PURE__ */ ((
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
return
|
|
653
|
+
ArtifactMetadataEntryType = /* @__PURE__ */ ((ArtifactMetadataEntryType5) => {
|
|
654
|
+
ArtifactMetadataEntryType5["ASSET"] = "aws:cdk:asset";
|
|
655
|
+
ArtifactMetadataEntryType5["INFO"] = "aws:cdk:info";
|
|
656
|
+
ArtifactMetadataEntryType5["WARN"] = "aws:cdk:warning";
|
|
657
|
+
ArtifactMetadataEntryType5["ERROR"] = "aws:cdk:error";
|
|
658
|
+
ArtifactMetadataEntryType5["LOGICAL_ID"] = "aws:cdk:logicalId";
|
|
659
|
+
ArtifactMetadataEntryType5["STACK_TAGS"] = "aws:cdk:stack-tags";
|
|
660
|
+
ArtifactMetadataEntryType5["DO_NOT_REFACTOR"] = "aws:cdk:do-not-refactor";
|
|
661
|
+
ArtifactMetadataEntryType5["CREATION_STACK"] = "aws:cdk:creationStack";
|
|
662
|
+
ArtifactMetadataEntryType5["PROPERTY_ASSIGNMENT"] = "aws:cdk:propertyAssignment";
|
|
663
|
+
return ArtifactMetadataEntryType5;
|
|
664
664
|
})(ArtifactMetadataEntryType || {});
|
|
665
|
+
CFN_RESOURCE_TYPE_ATTRIBUTE = "aws:cdk:cloudformation:type";
|
|
666
|
+
CFN_RESOURCE_PROPS_ATTRIBUTE = "aws:cdk:cloudformation:props";
|
|
665
667
|
}
|
|
666
668
|
});
|
|
667
669
|
|
|
@@ -728,6 +730,8 @@ var cloud_assembly_exports = {};
|
|
|
728
730
|
__export(cloud_assembly_exports, {
|
|
729
731
|
ArtifactMetadataEntryType: () => ArtifactMetadataEntryType,
|
|
730
732
|
ArtifactType: () => ArtifactType,
|
|
733
|
+
CFN_RESOURCE_PROPS_ATTRIBUTE: () => CFN_RESOURCE_PROPS_ATTRIBUTE,
|
|
734
|
+
CFN_RESOURCE_TYPE_ATTRIBUTE: () => CFN_RESOURCE_TYPE_ATTRIBUTE,
|
|
731
735
|
ContextProvider: () => ContextProvider,
|
|
732
736
|
LoadBalancerListenerProtocol: () => LoadBalancerListenerProtocol,
|
|
733
737
|
LoadBalancerType: () => LoadBalancerType
|
|
@@ -797,14 +801,14 @@ var init_assets = __esm({
|
|
|
797
801
|
var require_helpers = __commonJS({
|
|
798
802
|
"../@aws-cdk/cloud-assembly-schema/node_modules/jsonschema/lib/helpers.js"(exports2, module2) {
|
|
799
803
|
"use strict";
|
|
800
|
-
var ValidationError = exports2.ValidationError = /* @__PURE__ */ __name(function ValidationError2(message, instance, schema,
|
|
801
|
-
if (Array.isArray(
|
|
802
|
-
this.path =
|
|
803
|
-
this.property =
|
|
804
|
+
var ValidationError = exports2.ValidationError = /* @__PURE__ */ __name(function ValidationError2(message, instance, schema, path13, name, argument) {
|
|
805
|
+
if (Array.isArray(path13)) {
|
|
806
|
+
this.path = path13;
|
|
807
|
+
this.property = path13.reduce(function(sum, item) {
|
|
804
808
|
return sum + makeSuffix(item);
|
|
805
809
|
}, "instance");
|
|
806
|
-
} else if (
|
|
807
|
-
this.property =
|
|
810
|
+
} else if (path13 !== void 0) {
|
|
811
|
+
this.property = path13;
|
|
808
812
|
}
|
|
809
813
|
if (message) {
|
|
810
814
|
this.message = message;
|
|
@@ -899,16 +903,16 @@ var require_helpers = __commonJS({
|
|
|
899
903
|
name: { value: "SchemaError", enumerable: false }
|
|
900
904
|
}
|
|
901
905
|
);
|
|
902
|
-
var SchemaContext = exports2.SchemaContext = /* @__PURE__ */ __name(function SchemaContext2(schema, options,
|
|
906
|
+
var SchemaContext = exports2.SchemaContext = /* @__PURE__ */ __name(function SchemaContext2(schema, options, path13, base, schemas) {
|
|
903
907
|
this.schema = schema;
|
|
904
908
|
this.options = options;
|
|
905
|
-
if (Array.isArray(
|
|
906
|
-
this.path =
|
|
907
|
-
this.propertyPath =
|
|
909
|
+
if (Array.isArray(path13)) {
|
|
910
|
+
this.path = path13;
|
|
911
|
+
this.propertyPath = path13.reduce(function(sum, item) {
|
|
908
912
|
return sum + makeSuffix(item);
|
|
909
913
|
}, "instance");
|
|
910
914
|
} else {
|
|
911
|
-
this.propertyPath =
|
|
915
|
+
this.propertyPath = path13;
|
|
912
916
|
}
|
|
913
917
|
this.base = base;
|
|
914
918
|
this.schemas = schemas;
|
|
@@ -917,10 +921,10 @@ var require_helpers = __commonJS({
|
|
|
917
921
|
return (() => resolveUrl(this.base, target))();
|
|
918
922
|
}, "resolve");
|
|
919
923
|
SchemaContext.prototype.makeChild = /* @__PURE__ */ __name(function makeChild(schema, propertyName) {
|
|
920
|
-
var
|
|
924
|
+
var path13 = propertyName === void 0 ? this.path : this.path.concat([propertyName]);
|
|
921
925
|
var id = schema.$id || schema.id;
|
|
922
926
|
let base = (() => resolveUrl(this.base, id || ""))();
|
|
923
|
-
var ctx = new SchemaContext(schema, this.options,
|
|
927
|
+
var ctx = new SchemaContext(schema, this.options, path13, base, Object.create(this.schemas));
|
|
924
928
|
if (id && !ctx.schemas[base]) {
|
|
925
929
|
ctx.schemas[base] = schema;
|
|
926
930
|
}
|
|
@@ -2588,7 +2592,7 @@ var require_parse = __commonJS({
|
|
|
2588
2592
|
"../@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/parse.js"(exports2, module2) {
|
|
2589
2593
|
"use strict";
|
|
2590
2594
|
var SemVer = require_semver();
|
|
2591
|
-
var
|
|
2595
|
+
var parse3 = /* @__PURE__ */ __name((version, options, throwErrors = false) => {
|
|
2592
2596
|
if (version instanceof SemVer) {
|
|
2593
2597
|
return version;
|
|
2594
2598
|
}
|
|
@@ -2601,7 +2605,7 @@ var require_parse = __commonJS({
|
|
|
2601
2605
|
throw er;
|
|
2602
2606
|
}
|
|
2603
2607
|
}, "parse");
|
|
2604
|
-
module2.exports =
|
|
2608
|
+
module2.exports = parse3;
|
|
2605
2609
|
}
|
|
2606
2610
|
});
|
|
2607
2611
|
|
|
@@ -2609,9 +2613,9 @@ var require_parse = __commonJS({
|
|
|
2609
2613
|
var require_valid = __commonJS({
|
|
2610
2614
|
"../@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/valid.js"(exports2, module2) {
|
|
2611
2615
|
"use strict";
|
|
2612
|
-
var
|
|
2616
|
+
var parse3 = require_parse();
|
|
2613
2617
|
var valid2 = /* @__PURE__ */ __name((version, options) => {
|
|
2614
|
-
const v =
|
|
2618
|
+
const v = parse3(version, options);
|
|
2615
2619
|
return v ? v.version : null;
|
|
2616
2620
|
}, "valid");
|
|
2617
2621
|
module2.exports = valid2;
|
|
@@ -2622,9 +2626,9 @@ var require_valid = __commonJS({
|
|
|
2622
2626
|
var require_clean = __commonJS({
|
|
2623
2627
|
"../@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/clean.js"(exports2, module2) {
|
|
2624
2628
|
"use strict";
|
|
2625
|
-
var
|
|
2629
|
+
var parse3 = require_parse();
|
|
2626
2630
|
var clean = /* @__PURE__ */ __name((version, options) => {
|
|
2627
|
-
const s =
|
|
2631
|
+
const s = parse3(version.trim().replace(/^[=v]+/, ""), options);
|
|
2628
2632
|
return s ? s.version : null;
|
|
2629
2633
|
}, "clean");
|
|
2630
2634
|
module2.exports = clean;
|
|
@@ -2659,10 +2663,10 @@ var require_inc = __commonJS({
|
|
|
2659
2663
|
var require_diff = __commonJS({
|
|
2660
2664
|
"../@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/diff.js"(exports2, module2) {
|
|
2661
2665
|
"use strict";
|
|
2662
|
-
var
|
|
2666
|
+
var parse3 = require_parse();
|
|
2663
2667
|
var diff = /* @__PURE__ */ __name((version1, version2) => {
|
|
2664
|
-
const v1 =
|
|
2665
|
-
const v2 =
|
|
2668
|
+
const v1 = parse3(version1, null, true);
|
|
2669
|
+
const v2 = parse3(version2, null, true);
|
|
2666
2670
|
const comparison = v1.compare(v2);
|
|
2667
2671
|
if (comparison === 0) {
|
|
2668
2672
|
return null;
|
|
@@ -2733,9 +2737,9 @@ var require_patch = __commonJS({
|
|
|
2733
2737
|
var require_prerelease = __commonJS({
|
|
2734
2738
|
"../@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/prerelease.js"(exports2, module2) {
|
|
2735
2739
|
"use strict";
|
|
2736
|
-
var
|
|
2740
|
+
var parse3 = require_parse();
|
|
2737
2741
|
var prerelease = /* @__PURE__ */ __name((version, options) => {
|
|
2738
|
-
const parsed =
|
|
2742
|
+
const parsed = parse3(version, options);
|
|
2739
2743
|
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
2740
2744
|
}, "prerelease");
|
|
2741
2745
|
module2.exports = prerelease;
|
|
@@ -2921,7 +2925,7 @@ var require_coerce = __commonJS({
|
|
|
2921
2925
|
"../@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/coerce.js"(exports2, module2) {
|
|
2922
2926
|
"use strict";
|
|
2923
2927
|
var SemVer = require_semver();
|
|
2924
|
-
var
|
|
2928
|
+
var parse3 = require_parse();
|
|
2925
2929
|
var { safeRe: re, t } = require_re();
|
|
2926
2930
|
var coerce = /* @__PURE__ */ __name((version, options) => {
|
|
2927
2931
|
if (version instanceof SemVer) {
|
|
@@ -2956,7 +2960,7 @@ var require_coerce = __commonJS({
|
|
|
2956
2960
|
const patch = match[4] || "0";
|
|
2957
2961
|
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
2958
2962
|
const build2 = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
2959
|
-
return
|
|
2963
|
+
return parse3(`${major2}.${minor}.${patch}${prerelease}${build2}`, options);
|
|
2960
2964
|
}, "coerce");
|
|
2961
2965
|
module2.exports = coerce;
|
|
2962
2966
|
}
|
|
@@ -2966,7 +2970,7 @@ var require_coerce = __commonJS({
|
|
|
2966
2970
|
var require_truncate = __commonJS({
|
|
2967
2971
|
"../@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/truncate.js"(exports2, module2) {
|
|
2968
2972
|
"use strict";
|
|
2969
|
-
var
|
|
2973
|
+
var parse3 = require_parse();
|
|
2970
2974
|
var constants = require_constants();
|
|
2971
2975
|
var SemVer = require_semver();
|
|
2972
2976
|
var truncate = /* @__PURE__ */ __name((version, truncation, options) => {
|
|
@@ -2978,7 +2982,7 @@ var require_truncate = __commonJS({
|
|
|
2978
2982
|
}, "truncate");
|
|
2979
2983
|
var cloneInputVersion = /* @__PURE__ */ __name((version, options) => {
|
|
2980
2984
|
const versionStringToParse = version instanceof SemVer ? version.version : version;
|
|
2981
|
-
return
|
|
2985
|
+
return parse3(versionStringToParse, options);
|
|
2982
2986
|
}, "cloneInputVersion");
|
|
2983
2987
|
var doTruncation = /* @__PURE__ */ __name((version, truncation) => {
|
|
2984
2988
|
if (isPrerelease(truncation)) {
|
|
@@ -4031,7 +4035,7 @@ var require_semver2 = __commonJS({
|
|
|
4031
4035
|
var constants = require_constants();
|
|
4032
4036
|
var SemVer = require_semver();
|
|
4033
4037
|
var identifiers = require_identifiers();
|
|
4034
|
-
var
|
|
4038
|
+
var parse3 = require_parse();
|
|
4035
4039
|
var valid2 = require_valid();
|
|
4036
4040
|
var clean = require_clean();
|
|
4037
4041
|
var inc = require_inc();
|
|
@@ -4070,7 +4074,7 @@ var require_semver2 = __commonJS({
|
|
|
4070
4074
|
var simplifyRange = require_simplify();
|
|
4071
4075
|
var subset = require_subset();
|
|
4072
4076
|
module2.exports = {
|
|
4073
|
-
parse:
|
|
4077
|
+
parse: parse3,
|
|
4074
4078
|
valid: valid2,
|
|
4075
4079
|
clean,
|
|
4076
4080
|
inc,
|
|
@@ -4123,7 +4127,7 @@ var require_semver2 = __commonJS({
|
|
|
4123
4127
|
// ../@aws-cdk/cloud-assembly-schema/cli-version.json
|
|
4124
4128
|
var require_cli_version = __commonJS({
|
|
4125
4129
|
"../@aws-cdk/cloud-assembly-schema/cli-version.json"(exports2, module2) {
|
|
4126
|
-
module2.exports = { version: "2.
|
|
4130
|
+
module2.exports = { version: "2.1132.0" };
|
|
4127
4131
|
}
|
|
4128
4132
|
});
|
|
4129
4133
|
|
|
@@ -6409,12 +6413,13 @@ var require_version = __commonJS({
|
|
|
6409
6413
|
var manifest_exports = {};
|
|
6410
6414
|
__export(manifest_exports, {
|
|
6411
6415
|
Manifest: () => Manifest,
|
|
6416
|
+
VALIDATION_REPORT_FILE: () => VALIDATION_REPORT_FILE,
|
|
6412
6417
|
VERSION_MISMATCH: () => VERSION_MISMATCH
|
|
6413
6418
|
});
|
|
6414
6419
|
function stripEnumErrors(errors) {
|
|
6415
6420
|
return errors.filter((e6) => typeof e6.schema === "string" || !("enum" in e6.schema));
|
|
6416
6421
|
}
|
|
6417
|
-
var fs3, jsonschema, semver, VERSION_MISMATCH, CLI_VERSION, ASSETS_SCHEMA, ASSEMBLY_SCHEMA, INTEG_SCHEMA, VALIDATION_REPORT_SCHEMA, SCHEMA_VERSION, Manifest;
|
|
6422
|
+
var fs3, jsonschema, semver, VERSION_MISMATCH, VALIDATION_REPORT_FILE, CLI_VERSION, ASSETS_SCHEMA, ASSEMBLY_SCHEMA, INTEG_SCHEMA, VALIDATION_REPORT_SCHEMA, SCHEMA_VERSION, Manifest;
|
|
6418
6423
|
var init_manifest = __esm({
|
|
6419
6424
|
"../@aws-cdk/cloud-assembly-schema/lib/manifest.ts"() {
|
|
6420
6425
|
"use strict";
|
|
@@ -6423,6 +6428,7 @@ var init_manifest = __esm({
|
|
|
6423
6428
|
semver = __toESM(require_semver2());
|
|
6424
6429
|
init_cloud_assembly();
|
|
6425
6430
|
VERSION_MISMATCH = "Cloud assembly schema version mismatch";
|
|
6431
|
+
VALIDATION_REPORT_FILE = "validation-report.json";
|
|
6426
6432
|
CLI_VERSION = require_cli_version();
|
|
6427
6433
|
ASSETS_SCHEMA = require_assets_schema();
|
|
6428
6434
|
ASSEMBLY_SCHEMA = require_cloud_assembly_schema();
|
|
@@ -7465,7 +7471,8 @@ var init_toposort = __esm({
|
|
|
7465
7471
|
var cloud_assembly_exports2 = {};
|
|
7466
7472
|
__export(cloud_assembly_exports2, {
|
|
7467
7473
|
CloudAssembly: () => CloudAssembly,
|
|
7468
|
-
CloudAssemblyBuilder: () => CloudAssemblyBuilder
|
|
7474
|
+
CloudAssemblyBuilder: () => CloudAssemblyBuilder,
|
|
7475
|
+
MANIFEST_FILE: () => MANIFEST_FILE
|
|
7469
7476
|
});
|
|
7470
7477
|
function filterUndefined(obj) {
|
|
7471
7478
|
if (Array.isArray(obj)) {
|
|
@@ -8024,6 +8031,735 @@ var init_bootstrap = __esm({
|
|
|
8024
8031
|
}
|
|
8025
8032
|
});
|
|
8026
8033
|
|
|
8034
|
+
// ../@aws-cdk/cloud-assembly-api/lib/construct-tree.ts
|
|
8035
|
+
var construct_tree_exports = {};
|
|
8036
|
+
__export(construct_tree_exports, {
|
|
8037
|
+
ConstructIndex: () => ConstructIndex,
|
|
8038
|
+
buildConstructTree: () => buildConstructTree,
|
|
8039
|
+
buildConstructTreeAsync: () => buildConstructTreeAsync
|
|
8040
|
+
});
|
|
8041
|
+
function visit(nodes6, fn) {
|
|
8042
|
+
for (const node of nodes6) {
|
|
8043
|
+
fn(node);
|
|
8044
|
+
if (node.children.length > 0) visit(node.children, fn);
|
|
8045
|
+
}
|
|
8046
|
+
}
|
|
8047
|
+
function buildConstructTree(assembly, decorate) {
|
|
8048
|
+
const roots = readRoots(assembly);
|
|
8049
|
+
if (!roots) return [];
|
|
8050
|
+
const { rawRoots, ctx } = roots;
|
|
8051
|
+
return rawRoots.map((child) => buildNodeSync(child, ctx, void 0, NO_TEMPLATE, decorate));
|
|
8052
|
+
}
|
|
8053
|
+
async function buildConstructTreeAsync(assembly, decorate) {
|
|
8054
|
+
const roots = readRoots(assembly);
|
|
8055
|
+
if (!roots) return [];
|
|
8056
|
+
const { rawRoots, ctx } = roots;
|
|
8057
|
+
const out = [];
|
|
8058
|
+
for (const child of rawRoots) {
|
|
8059
|
+
out.push(await buildNodeAsync(child, ctx, void 0, NO_TEMPLATE, decorate));
|
|
8060
|
+
}
|
|
8061
|
+
return out;
|
|
8062
|
+
}
|
|
8063
|
+
function readRoots(assembly) {
|
|
8064
|
+
const treeArtifact = assembly.tree();
|
|
8065
|
+
if (!treeArtifact) return void 0;
|
|
8066
|
+
const rawTree = loadTree(path8.join(assembly.directory, treeArtifact.file));
|
|
8067
|
+
if (!rawTree) return void 0;
|
|
8068
|
+
const ctx = {
|
|
8069
|
+
stackIndex: buildStackIndex(assembly.stacksRecursively),
|
|
8070
|
+
templateCache: /* @__PURE__ */ new Map()
|
|
8071
|
+
};
|
|
8072
|
+
const rawRoots = Object.values(rawTree.children ?? {}).filter((child) => !isCdkInternal(child.id));
|
|
8073
|
+
return { rawRoots, ctx };
|
|
8074
|
+
}
|
|
8075
|
+
function loadTree(treePath) {
|
|
8076
|
+
if (!fs8.existsSync(treePath)) return void 0;
|
|
8077
|
+
const content = JSON.parse(fs8.readFileSync(treePath, "utf-8"));
|
|
8078
|
+
return content.tree;
|
|
8079
|
+
}
|
|
8080
|
+
function buildStackIndex(stacks) {
|
|
8081
|
+
const index = /* @__PURE__ */ new Map();
|
|
8082
|
+
for (const stack of stacks) {
|
|
8083
|
+
index.set(stack.hierarchicalId, { stack, metadata: new Map(Object.entries(stack.metadata)) });
|
|
8084
|
+
}
|
|
8085
|
+
return index;
|
|
8086
|
+
}
|
|
8087
|
+
function prepareNode(raw, ctx, inheritedStack, inherited) {
|
|
8088
|
+
const stackHere = ctx.stackIndex.get(raw.path);
|
|
8089
|
+
const owner = stackHere ?? inheritedStack;
|
|
8090
|
+
const scope = stackHere ? { file: stackHere.stack.templateFullPath, template: stackHere.stack.template } : inherited;
|
|
8091
|
+
const entries = owner?.metadata.get("/" + raw.path) ?? [];
|
|
8092
|
+
const logicalId = logicalIdFromEntries(entries);
|
|
8093
|
+
const cfnTypeRaw = raw.attributes?.[import_cloud_assembly_schema.CFN_RESOURCE_TYPE_ATTRIBUTE];
|
|
8094
|
+
const cfnType = typeof cfnTypeRaw === "string" ? cfnTypeRaw : void 0;
|
|
8095
|
+
const cfnPropsRaw = raw.attributes?.[import_cloud_assembly_schema.CFN_RESOURCE_PROPS_ATTRIBUTE];
|
|
8096
|
+
const cfnProperties = typeof cfnPropsRaw === "object" && cfnPropsRaw !== null ? cfnPropsRaw : void 0;
|
|
8097
|
+
const childInputs = Object.values(raw.children ?? {}).filter((child) => !isCdkInternal(child.id)).map((child) => ({ raw: child, scope: nestedBoundary(child, raw, owner, scope.template, ctx) ?? scope }));
|
|
8098
|
+
const nodeTemplateFile = logicalId !== void 0 ? scope.file : void 0;
|
|
8099
|
+
return {
|
|
8100
|
+
base: { path: raw.path, id: raw.id, type: cfnType, logicalId, templateFile: nodeTemplateFile, cfnProperties },
|
|
8101
|
+
owner,
|
|
8102
|
+
constructPath: raw.path,
|
|
8103
|
+
childInputs
|
|
8104
|
+
};
|
|
8105
|
+
}
|
|
8106
|
+
function buildNodeSync(raw, ctx, inheritedStack, inherited, decorate) {
|
|
8107
|
+
const prepared = prepareNode(raw, ctx, inheritedStack, inherited);
|
|
8108
|
+
const children = prepared.childInputs.map(
|
|
8109
|
+
(ci) => buildNodeSync(ci.raw, ctx, prepared.owner, ci.scope, decorate)
|
|
8110
|
+
);
|
|
8111
|
+
return decorate({ ...prepared.base, children }, prepared.owner?.stack, prepared.constructPath);
|
|
8112
|
+
}
|
|
8113
|
+
async function buildNodeAsync(raw, ctx, inheritedStack, inherited, decorate) {
|
|
8114
|
+
const prepared = prepareNode(raw, ctx, inheritedStack, inherited);
|
|
8115
|
+
const children = [];
|
|
8116
|
+
for (const ci of prepared.childInputs) {
|
|
8117
|
+
children.push(await buildNodeAsync(ci.raw, ctx, prepared.owner, ci.scope, decorate));
|
|
8118
|
+
}
|
|
8119
|
+
return decorate({ ...prepared.base, children }, prepared.owner?.stack, prepared.constructPath);
|
|
8120
|
+
}
|
|
8121
|
+
function logicalIdFromEntries(entries) {
|
|
8122
|
+
const entry = entries.find((e6) => e6.type === import_cloud_assembly_schema.ArtifactMetadataEntryType.LOGICAL_ID);
|
|
8123
|
+
return typeof entry?.data === "string" ? entry.data : void 0;
|
|
8124
|
+
}
|
|
8125
|
+
function loadTemplate(absPath, cache6) {
|
|
8126
|
+
if (cache6.has(absPath)) return cache6.get(absPath);
|
|
8127
|
+
let template;
|
|
8128
|
+
try {
|
|
8129
|
+
template = JSON.parse(fs8.readFileSync(absPath, "utf-8"));
|
|
8130
|
+
} catch {
|
|
8131
|
+
template = void 0;
|
|
8132
|
+
}
|
|
8133
|
+
cache6.set(absPath, template);
|
|
8134
|
+
return template;
|
|
8135
|
+
}
|
|
8136
|
+
function nestedBoundary(child, parent, owner, currentTemplate, ctx) {
|
|
8137
|
+
const resourceNode = parent.children?.[`${child.id}.NestedStack`]?.children?.[`${child.id}.NestedStackResource`];
|
|
8138
|
+
if (!resourceNode || !owner) return void 0;
|
|
8139
|
+
const logicalId = logicalIdFromEntries(owner.metadata.get("/" + resourceNode.path) ?? []);
|
|
8140
|
+
const assetPath = logicalId !== void 0 ? currentTemplate?.Resources?.[logicalId]?.Metadata?.[ASSET_RESOURCE_METADATA_PATH_KEY] : void 0;
|
|
8141
|
+
if (typeof assetPath !== "string") return NO_TEMPLATE;
|
|
8142
|
+
const file = path8.join(path8.dirname(owner.stack.templateFullPath), assetPath);
|
|
8143
|
+
const template = loadTemplate(file, ctx.templateCache);
|
|
8144
|
+
return template ? { file, template } : NO_TEMPLATE;
|
|
8145
|
+
}
|
|
8146
|
+
function isCdkInternal(id) {
|
|
8147
|
+
return CDK_INTERNAL_IDS.has(id);
|
|
8148
|
+
}
|
|
8149
|
+
var fs8, path8, import_cloud_assembly_schema, CDK_INTERNAL_IDS, ConstructIndex, NO_TEMPLATE;
|
|
8150
|
+
var init_construct_tree = __esm({
|
|
8151
|
+
"../@aws-cdk/cloud-assembly-api/lib/construct-tree.ts"() {
|
|
8152
|
+
"use strict";
|
|
8153
|
+
fs8 = __toESM(require("fs"));
|
|
8154
|
+
path8 = __toESM(require("path"));
|
|
8155
|
+
import_cloud_assembly_schema = __toESM(require_lib2());
|
|
8156
|
+
init_assets2();
|
|
8157
|
+
CDK_INTERNAL_IDS = /* @__PURE__ */ new Set(["Tree", "CDKMetadata", "BootstrapVersion", "CheckBootstrapVersion"]);
|
|
8158
|
+
ConstructIndex = class _ConstructIndex {
|
|
8159
|
+
constructor(byPathMap) {
|
|
8160
|
+
this.byPathMap = byPathMap;
|
|
8161
|
+
}
|
|
8162
|
+
byPathMap;
|
|
8163
|
+
static {
|
|
8164
|
+
__name(this, "ConstructIndex");
|
|
8165
|
+
}
|
|
8166
|
+
/** Build an index from the roots of a construct tree. */
|
|
8167
|
+
static fromTree(tree) {
|
|
8168
|
+
const byPath = /* @__PURE__ */ new Map();
|
|
8169
|
+
visit(tree, (node) => byPath.set(node.path, node));
|
|
8170
|
+
return new _ConstructIndex(byPath);
|
|
8171
|
+
}
|
|
8172
|
+
/** The node at a given construct path, or undefined if absent. */
|
|
8173
|
+
byPath(constructPath) {
|
|
8174
|
+
return this.byPathMap.get(constructPath);
|
|
8175
|
+
}
|
|
8176
|
+
/** Number of nodes in the tree. */
|
|
8177
|
+
get size() {
|
|
8178
|
+
return this.byPathMap.size;
|
|
8179
|
+
}
|
|
8180
|
+
/** Pre-order iteration over every node in the tree. */
|
|
8181
|
+
[Symbol.iterator]() {
|
|
8182
|
+
return this.byPathMap.values();
|
|
8183
|
+
}
|
|
8184
|
+
};
|
|
8185
|
+
__name(visit, "visit");
|
|
8186
|
+
__name(buildConstructTree, "buildConstructTree");
|
|
8187
|
+
__name(buildConstructTreeAsync, "buildConstructTreeAsync");
|
|
8188
|
+
__name(readRoots, "readRoots");
|
|
8189
|
+
NO_TEMPLATE = { file: void 0, template: void 0 };
|
|
8190
|
+
__name(loadTree, "loadTree");
|
|
8191
|
+
__name(buildStackIndex, "buildStackIndex");
|
|
8192
|
+
__name(prepareNode, "prepareNode");
|
|
8193
|
+
__name(buildNodeSync, "buildNodeSync");
|
|
8194
|
+
__name(buildNodeAsync, "buildNodeAsync");
|
|
8195
|
+
__name(logicalIdFromEntries, "logicalIdFromEntries");
|
|
8196
|
+
__name(loadTemplate, "loadTemplate");
|
|
8197
|
+
__name(nestedBoundary, "nestedBoundary");
|
|
8198
|
+
__name(isCdkInternal, "isCdkInternal");
|
|
8199
|
+
}
|
|
8200
|
+
});
|
|
8201
|
+
|
|
8202
|
+
// ../../node_modules/json-source-map/index.js
|
|
8203
|
+
var require_json_source_map = __commonJS({
|
|
8204
|
+
"../../node_modules/json-source-map/index.js"(exports2) {
|
|
8205
|
+
"use strict";
|
|
8206
|
+
var escapedChars = {
|
|
8207
|
+
"b": "\b",
|
|
8208
|
+
"f": "\f",
|
|
8209
|
+
"n": "\n",
|
|
8210
|
+
"r": "\r",
|
|
8211
|
+
"t": " ",
|
|
8212
|
+
'"': '"',
|
|
8213
|
+
"/": "/",
|
|
8214
|
+
"\\": "\\"
|
|
8215
|
+
};
|
|
8216
|
+
var A_CODE = "a".charCodeAt();
|
|
8217
|
+
exports2.parse = function(source, _, options) {
|
|
8218
|
+
var pointers = {};
|
|
8219
|
+
var line = 0;
|
|
8220
|
+
var column = 0;
|
|
8221
|
+
var pos = 0;
|
|
8222
|
+
var bigint = options && options.bigint && typeof BigInt != "undefined";
|
|
8223
|
+
return {
|
|
8224
|
+
data: _parse("", true),
|
|
8225
|
+
pointers
|
|
8226
|
+
};
|
|
8227
|
+
function _parse(ptr, topLevel) {
|
|
8228
|
+
whitespace();
|
|
8229
|
+
var data2;
|
|
8230
|
+
map3(ptr, "value");
|
|
8231
|
+
var char = getChar();
|
|
8232
|
+
switch (char) {
|
|
8233
|
+
case "t":
|
|
8234
|
+
read("rue");
|
|
8235
|
+
data2 = true;
|
|
8236
|
+
break;
|
|
8237
|
+
case "f":
|
|
8238
|
+
read("alse");
|
|
8239
|
+
data2 = false;
|
|
8240
|
+
break;
|
|
8241
|
+
case "n":
|
|
8242
|
+
read("ull");
|
|
8243
|
+
data2 = null;
|
|
8244
|
+
break;
|
|
8245
|
+
case '"':
|
|
8246
|
+
data2 = parseString();
|
|
8247
|
+
break;
|
|
8248
|
+
case "[":
|
|
8249
|
+
data2 = parseArray(ptr);
|
|
8250
|
+
break;
|
|
8251
|
+
case "{":
|
|
8252
|
+
data2 = parseObject(ptr);
|
|
8253
|
+
break;
|
|
8254
|
+
default:
|
|
8255
|
+
backChar();
|
|
8256
|
+
if ("-0123456789".indexOf(char) >= 0)
|
|
8257
|
+
data2 = parseNumber2();
|
|
8258
|
+
else
|
|
8259
|
+
unexpectedToken();
|
|
8260
|
+
}
|
|
8261
|
+
map3(ptr, "valueEnd");
|
|
8262
|
+
whitespace();
|
|
8263
|
+
if (topLevel && pos < source.length) unexpectedToken();
|
|
8264
|
+
return data2;
|
|
8265
|
+
}
|
|
8266
|
+
__name(_parse, "_parse");
|
|
8267
|
+
function whitespace() {
|
|
8268
|
+
loop:
|
|
8269
|
+
while (pos < source.length) {
|
|
8270
|
+
switch (source[pos]) {
|
|
8271
|
+
case " ":
|
|
8272
|
+
column++;
|
|
8273
|
+
break;
|
|
8274
|
+
case " ":
|
|
8275
|
+
column += 4;
|
|
8276
|
+
break;
|
|
8277
|
+
case "\r":
|
|
8278
|
+
column = 0;
|
|
8279
|
+
break;
|
|
8280
|
+
case "\n":
|
|
8281
|
+
column = 0;
|
|
8282
|
+
line++;
|
|
8283
|
+
break;
|
|
8284
|
+
default:
|
|
8285
|
+
break loop;
|
|
8286
|
+
}
|
|
8287
|
+
pos++;
|
|
8288
|
+
}
|
|
8289
|
+
}
|
|
8290
|
+
__name(whitespace, "whitespace");
|
|
8291
|
+
function parseString() {
|
|
8292
|
+
var str = "";
|
|
8293
|
+
var char;
|
|
8294
|
+
while (true) {
|
|
8295
|
+
char = getChar();
|
|
8296
|
+
if (char == '"') {
|
|
8297
|
+
break;
|
|
8298
|
+
} else if (char == "\\") {
|
|
8299
|
+
char = getChar();
|
|
8300
|
+
if (char in escapedChars)
|
|
8301
|
+
str += escapedChars[char];
|
|
8302
|
+
else if (char == "u")
|
|
8303
|
+
str += getCharCode();
|
|
8304
|
+
else
|
|
8305
|
+
wasUnexpectedToken();
|
|
8306
|
+
} else {
|
|
8307
|
+
str += char;
|
|
8308
|
+
}
|
|
8309
|
+
}
|
|
8310
|
+
return str;
|
|
8311
|
+
}
|
|
8312
|
+
__name(parseString, "parseString");
|
|
8313
|
+
function parseNumber2() {
|
|
8314
|
+
var numStr = "";
|
|
8315
|
+
var integer = true;
|
|
8316
|
+
if (source[pos] == "-") numStr += getChar();
|
|
8317
|
+
numStr += source[pos] == "0" ? getChar() : getDigits();
|
|
8318
|
+
if (source[pos] == ".") {
|
|
8319
|
+
numStr += getChar() + getDigits();
|
|
8320
|
+
integer = false;
|
|
8321
|
+
}
|
|
8322
|
+
if (source[pos] == "e" || source[pos] == "E") {
|
|
8323
|
+
numStr += getChar();
|
|
8324
|
+
if (source[pos] == "+" || source[pos] == "-") numStr += getChar();
|
|
8325
|
+
numStr += getDigits();
|
|
8326
|
+
integer = false;
|
|
8327
|
+
}
|
|
8328
|
+
var result = +numStr;
|
|
8329
|
+
return bigint && integer && (result > Number.MAX_SAFE_INTEGER || result < Number.MIN_SAFE_INTEGER) ? BigInt(numStr) : result;
|
|
8330
|
+
}
|
|
8331
|
+
__name(parseNumber2, "parseNumber");
|
|
8332
|
+
function parseArray(ptr) {
|
|
8333
|
+
whitespace();
|
|
8334
|
+
var arr = [];
|
|
8335
|
+
var i6 = 0;
|
|
8336
|
+
if (getChar() == "]") return arr;
|
|
8337
|
+
backChar();
|
|
8338
|
+
while (true) {
|
|
8339
|
+
var itemPtr = ptr + "/" + i6;
|
|
8340
|
+
arr.push(_parse(itemPtr));
|
|
8341
|
+
whitespace();
|
|
8342
|
+
var char = getChar();
|
|
8343
|
+
if (char == "]") break;
|
|
8344
|
+
if (char != ",") wasUnexpectedToken();
|
|
8345
|
+
whitespace();
|
|
8346
|
+
i6++;
|
|
8347
|
+
}
|
|
8348
|
+
return arr;
|
|
8349
|
+
}
|
|
8350
|
+
__name(parseArray, "parseArray");
|
|
8351
|
+
function parseObject(ptr) {
|
|
8352
|
+
whitespace();
|
|
8353
|
+
var obj = {};
|
|
8354
|
+
if (getChar() == "}") return obj;
|
|
8355
|
+
backChar();
|
|
8356
|
+
while (true) {
|
|
8357
|
+
var loc = getLoc();
|
|
8358
|
+
if (getChar() != '"') wasUnexpectedToken();
|
|
8359
|
+
var key = parseString();
|
|
8360
|
+
var propPtr = ptr + "/" + escapeJsonPointer(key);
|
|
8361
|
+
mapLoc(propPtr, "key", loc);
|
|
8362
|
+
map3(propPtr, "keyEnd");
|
|
8363
|
+
whitespace();
|
|
8364
|
+
if (getChar() != ":") wasUnexpectedToken();
|
|
8365
|
+
whitespace();
|
|
8366
|
+
obj[key] = _parse(propPtr);
|
|
8367
|
+
whitespace();
|
|
8368
|
+
var char = getChar();
|
|
8369
|
+
if (char == "}") break;
|
|
8370
|
+
if (char != ",") wasUnexpectedToken();
|
|
8371
|
+
whitespace();
|
|
8372
|
+
}
|
|
8373
|
+
return obj;
|
|
8374
|
+
}
|
|
8375
|
+
__name(parseObject, "parseObject");
|
|
8376
|
+
function read(str) {
|
|
8377
|
+
for (var i6 = 0; i6 < str.length; i6++)
|
|
8378
|
+
if (getChar() !== str[i6]) wasUnexpectedToken();
|
|
8379
|
+
}
|
|
8380
|
+
__name(read, "read");
|
|
8381
|
+
function getChar() {
|
|
8382
|
+
checkUnexpectedEnd();
|
|
8383
|
+
var char = source[pos];
|
|
8384
|
+
pos++;
|
|
8385
|
+
column++;
|
|
8386
|
+
return char;
|
|
8387
|
+
}
|
|
8388
|
+
__name(getChar, "getChar");
|
|
8389
|
+
function backChar() {
|
|
8390
|
+
pos--;
|
|
8391
|
+
column--;
|
|
8392
|
+
}
|
|
8393
|
+
__name(backChar, "backChar");
|
|
8394
|
+
function getCharCode() {
|
|
8395
|
+
var count = 4;
|
|
8396
|
+
var code = 0;
|
|
8397
|
+
while (count--) {
|
|
8398
|
+
code <<= 4;
|
|
8399
|
+
var char = getChar().toLowerCase();
|
|
8400
|
+
if (char >= "a" && char <= "f")
|
|
8401
|
+
code += char.charCodeAt() - A_CODE + 10;
|
|
8402
|
+
else if (char >= "0" && char <= "9")
|
|
8403
|
+
code += +char;
|
|
8404
|
+
else
|
|
8405
|
+
wasUnexpectedToken();
|
|
8406
|
+
}
|
|
8407
|
+
return String.fromCharCode(code);
|
|
8408
|
+
}
|
|
8409
|
+
__name(getCharCode, "getCharCode");
|
|
8410
|
+
function getDigits() {
|
|
8411
|
+
var digits = "";
|
|
8412
|
+
while (source[pos] >= "0" && source[pos] <= "9")
|
|
8413
|
+
digits += getChar();
|
|
8414
|
+
if (digits.length) return digits;
|
|
8415
|
+
checkUnexpectedEnd();
|
|
8416
|
+
unexpectedToken();
|
|
8417
|
+
}
|
|
8418
|
+
__name(getDigits, "getDigits");
|
|
8419
|
+
function map3(ptr, prop) {
|
|
8420
|
+
mapLoc(ptr, prop, getLoc());
|
|
8421
|
+
}
|
|
8422
|
+
__name(map3, "map");
|
|
8423
|
+
function mapLoc(ptr, prop, loc) {
|
|
8424
|
+
pointers[ptr] = pointers[ptr] || {};
|
|
8425
|
+
pointers[ptr][prop] = loc;
|
|
8426
|
+
}
|
|
8427
|
+
__name(mapLoc, "mapLoc");
|
|
8428
|
+
function getLoc() {
|
|
8429
|
+
return {
|
|
8430
|
+
line,
|
|
8431
|
+
column,
|
|
8432
|
+
pos
|
|
8433
|
+
};
|
|
8434
|
+
}
|
|
8435
|
+
__name(getLoc, "getLoc");
|
|
8436
|
+
function unexpectedToken() {
|
|
8437
|
+
throw new SyntaxError("Unexpected token " + source[pos] + " in JSON at position " + pos);
|
|
8438
|
+
}
|
|
8439
|
+
__name(unexpectedToken, "unexpectedToken");
|
|
8440
|
+
function wasUnexpectedToken() {
|
|
8441
|
+
backChar();
|
|
8442
|
+
unexpectedToken();
|
|
8443
|
+
}
|
|
8444
|
+
__name(wasUnexpectedToken, "wasUnexpectedToken");
|
|
8445
|
+
function checkUnexpectedEnd() {
|
|
8446
|
+
if (pos >= source.length)
|
|
8447
|
+
throw new SyntaxError("Unexpected end of JSON input");
|
|
8448
|
+
}
|
|
8449
|
+
__name(checkUnexpectedEnd, "checkUnexpectedEnd");
|
|
8450
|
+
};
|
|
8451
|
+
exports2.stringify = function(data2, _, options) {
|
|
8452
|
+
if (!validType(data2)) return;
|
|
8453
|
+
var wsLine = 0;
|
|
8454
|
+
var wsPos, wsColumn;
|
|
8455
|
+
var whitespace = typeof options == "object" ? options.space : options;
|
|
8456
|
+
switch (typeof whitespace) {
|
|
8457
|
+
case "number":
|
|
8458
|
+
var len = whitespace > 10 ? 10 : whitespace < 0 ? 0 : Math.floor(whitespace);
|
|
8459
|
+
whitespace = len && repeat(len, " ");
|
|
8460
|
+
wsPos = len;
|
|
8461
|
+
wsColumn = len;
|
|
8462
|
+
break;
|
|
8463
|
+
case "string":
|
|
8464
|
+
whitespace = whitespace.slice(0, 10);
|
|
8465
|
+
wsPos = 0;
|
|
8466
|
+
wsColumn = 0;
|
|
8467
|
+
for (var j6 = 0; j6 < whitespace.length; j6++) {
|
|
8468
|
+
var char = whitespace[j6];
|
|
8469
|
+
switch (char) {
|
|
8470
|
+
case " ":
|
|
8471
|
+
wsColumn++;
|
|
8472
|
+
break;
|
|
8473
|
+
case " ":
|
|
8474
|
+
wsColumn += 4;
|
|
8475
|
+
break;
|
|
8476
|
+
case "\r":
|
|
8477
|
+
wsColumn = 0;
|
|
8478
|
+
break;
|
|
8479
|
+
case "\n":
|
|
8480
|
+
wsColumn = 0;
|
|
8481
|
+
wsLine++;
|
|
8482
|
+
break;
|
|
8483
|
+
default:
|
|
8484
|
+
throw new Error("whitespace characters not allowed in JSON");
|
|
8485
|
+
}
|
|
8486
|
+
wsPos++;
|
|
8487
|
+
}
|
|
8488
|
+
break;
|
|
8489
|
+
default:
|
|
8490
|
+
whitespace = void 0;
|
|
8491
|
+
}
|
|
8492
|
+
var json = "";
|
|
8493
|
+
var pointers = {};
|
|
8494
|
+
var line = 0;
|
|
8495
|
+
var column = 0;
|
|
8496
|
+
var pos = 0;
|
|
8497
|
+
var es6 = options && options.es6 && typeof Map == "function";
|
|
8498
|
+
_stringify(data2, 0, "");
|
|
8499
|
+
return {
|
|
8500
|
+
json,
|
|
8501
|
+
pointers
|
|
8502
|
+
};
|
|
8503
|
+
function _stringify(_data6, lvl, ptr) {
|
|
8504
|
+
map3(ptr, "value");
|
|
8505
|
+
switch (typeof _data6) {
|
|
8506
|
+
case "number":
|
|
8507
|
+
case "bigint":
|
|
8508
|
+
case "boolean":
|
|
8509
|
+
out("" + _data6);
|
|
8510
|
+
break;
|
|
8511
|
+
case "string":
|
|
8512
|
+
out(quoted(_data6));
|
|
8513
|
+
break;
|
|
8514
|
+
case "object":
|
|
8515
|
+
if (_data6 === null) {
|
|
8516
|
+
out("null");
|
|
8517
|
+
} else if (typeof _data6.toJSON == "function") {
|
|
8518
|
+
out(quoted(_data6.toJSON()));
|
|
8519
|
+
} else if (Array.isArray(_data6)) {
|
|
8520
|
+
stringifyArray();
|
|
8521
|
+
} else if (es6) {
|
|
8522
|
+
if (_data6.constructor.BYTES_PER_ELEMENT)
|
|
8523
|
+
stringifyArray();
|
|
8524
|
+
else if (_data6 instanceof Map)
|
|
8525
|
+
stringifyMapSet();
|
|
8526
|
+
else if (_data6 instanceof Set)
|
|
8527
|
+
stringifyMapSet(true);
|
|
8528
|
+
else
|
|
8529
|
+
stringifyObject();
|
|
8530
|
+
} else {
|
|
8531
|
+
stringifyObject();
|
|
8532
|
+
}
|
|
8533
|
+
}
|
|
8534
|
+
map3(ptr, "valueEnd");
|
|
8535
|
+
function stringifyArray() {
|
|
8536
|
+
if (_data6.length) {
|
|
8537
|
+
out("[");
|
|
8538
|
+
var itemLvl = lvl + 1;
|
|
8539
|
+
for (var i6 = 0; i6 < _data6.length; i6++) {
|
|
8540
|
+
if (i6) out(",");
|
|
8541
|
+
indent(itemLvl);
|
|
8542
|
+
var item = validType(_data6[i6]) ? _data6[i6] : null;
|
|
8543
|
+
var itemPtr = ptr + "/" + i6;
|
|
8544
|
+
_stringify(item, itemLvl, itemPtr);
|
|
8545
|
+
}
|
|
8546
|
+
indent(lvl);
|
|
8547
|
+
out("]");
|
|
8548
|
+
} else {
|
|
8549
|
+
out("[]");
|
|
8550
|
+
}
|
|
8551
|
+
}
|
|
8552
|
+
__name(stringifyArray, "stringifyArray");
|
|
8553
|
+
function stringifyObject() {
|
|
8554
|
+
var keys = Object.keys(_data6);
|
|
8555
|
+
if (keys.length) {
|
|
8556
|
+
out("{");
|
|
8557
|
+
var propLvl = lvl + 1;
|
|
8558
|
+
for (var i6 = 0; i6 < keys.length; i6++) {
|
|
8559
|
+
var key = keys[i6];
|
|
8560
|
+
var value = _data6[key];
|
|
8561
|
+
if (validType(value)) {
|
|
8562
|
+
if (i6) out(",");
|
|
8563
|
+
var propPtr = ptr + "/" + escapeJsonPointer(key);
|
|
8564
|
+
indent(propLvl);
|
|
8565
|
+
map3(propPtr, "key");
|
|
8566
|
+
out(quoted(key));
|
|
8567
|
+
map3(propPtr, "keyEnd");
|
|
8568
|
+
out(":");
|
|
8569
|
+
if (whitespace) out(" ");
|
|
8570
|
+
_stringify(value, propLvl, propPtr);
|
|
8571
|
+
}
|
|
8572
|
+
}
|
|
8573
|
+
indent(lvl);
|
|
8574
|
+
out("}");
|
|
8575
|
+
} else {
|
|
8576
|
+
out("{}");
|
|
8577
|
+
}
|
|
8578
|
+
}
|
|
8579
|
+
__name(stringifyObject, "stringifyObject");
|
|
8580
|
+
function stringifyMapSet(isSet2) {
|
|
8581
|
+
if (_data6.size) {
|
|
8582
|
+
out("{");
|
|
8583
|
+
var propLvl = lvl + 1;
|
|
8584
|
+
var first = true;
|
|
8585
|
+
var entries = _data6.entries();
|
|
8586
|
+
var entry = entries.next();
|
|
8587
|
+
while (!entry.done) {
|
|
8588
|
+
var item = entry.value;
|
|
8589
|
+
var key = item[0];
|
|
8590
|
+
var value = isSet2 ? true : item[1];
|
|
8591
|
+
if (validType(value)) {
|
|
8592
|
+
if (!first) out(",");
|
|
8593
|
+
first = false;
|
|
8594
|
+
var propPtr = ptr + "/" + escapeJsonPointer(key);
|
|
8595
|
+
indent(propLvl);
|
|
8596
|
+
map3(propPtr, "key");
|
|
8597
|
+
out(quoted(key));
|
|
8598
|
+
map3(propPtr, "keyEnd");
|
|
8599
|
+
out(":");
|
|
8600
|
+
if (whitespace) out(" ");
|
|
8601
|
+
_stringify(value, propLvl, propPtr);
|
|
8602
|
+
}
|
|
8603
|
+
entry = entries.next();
|
|
8604
|
+
}
|
|
8605
|
+
indent(lvl);
|
|
8606
|
+
out("}");
|
|
8607
|
+
} else {
|
|
8608
|
+
out("{}");
|
|
8609
|
+
}
|
|
8610
|
+
}
|
|
8611
|
+
__name(stringifyMapSet, "stringifyMapSet");
|
|
8612
|
+
}
|
|
8613
|
+
__name(_stringify, "_stringify");
|
|
8614
|
+
function out(str) {
|
|
8615
|
+
column += str.length;
|
|
8616
|
+
pos += str.length;
|
|
8617
|
+
json += str;
|
|
8618
|
+
}
|
|
8619
|
+
__name(out, "out");
|
|
8620
|
+
function indent(lvl) {
|
|
8621
|
+
if (whitespace) {
|
|
8622
|
+
json += "\n" + repeat(lvl, whitespace);
|
|
8623
|
+
line++;
|
|
8624
|
+
column = 0;
|
|
8625
|
+
while (lvl--) {
|
|
8626
|
+
if (wsLine) {
|
|
8627
|
+
line += wsLine;
|
|
8628
|
+
column = wsColumn;
|
|
8629
|
+
} else {
|
|
8630
|
+
column += wsColumn;
|
|
8631
|
+
}
|
|
8632
|
+
pos += wsPos;
|
|
8633
|
+
}
|
|
8634
|
+
pos += 1;
|
|
8635
|
+
}
|
|
8636
|
+
}
|
|
8637
|
+
__name(indent, "indent");
|
|
8638
|
+
function map3(ptr, prop) {
|
|
8639
|
+
pointers[ptr] = pointers[ptr] || {};
|
|
8640
|
+
pointers[ptr][prop] = {
|
|
8641
|
+
line,
|
|
8642
|
+
column,
|
|
8643
|
+
pos
|
|
8644
|
+
};
|
|
8645
|
+
}
|
|
8646
|
+
__name(map3, "map");
|
|
8647
|
+
function repeat(n3, str) {
|
|
8648
|
+
return Array(n3 + 1).join(str);
|
|
8649
|
+
}
|
|
8650
|
+
__name(repeat, "repeat");
|
|
8651
|
+
};
|
|
8652
|
+
var VALID_TYPES = ["number", "bigint", "boolean", "string", "object"];
|
|
8653
|
+
function validType(data2) {
|
|
8654
|
+
return VALID_TYPES.indexOf(typeof data2) >= 0;
|
|
8655
|
+
}
|
|
8656
|
+
__name(validType, "validType");
|
|
8657
|
+
var ESC_QUOTE = /"|\\/g;
|
|
8658
|
+
var ESC_B = /[\b]/g;
|
|
8659
|
+
var ESC_F = /\f/g;
|
|
8660
|
+
var ESC_N = /\n/g;
|
|
8661
|
+
var ESC_R = /\r/g;
|
|
8662
|
+
var ESC_T = /\t/g;
|
|
8663
|
+
function quoted(str) {
|
|
8664
|
+
str = str.replace(ESC_QUOTE, "\\$&").replace(ESC_F, "\\f").replace(ESC_B, "\\b").replace(ESC_N, "\\n").replace(ESC_R, "\\r").replace(ESC_T, "\\t");
|
|
8665
|
+
return '"' + str + '"';
|
|
8666
|
+
}
|
|
8667
|
+
__name(quoted, "quoted");
|
|
8668
|
+
var ESC_0 = /~/g;
|
|
8669
|
+
var ESC_1 = /\//g;
|
|
8670
|
+
function escapeJsonPointer(str) {
|
|
8671
|
+
return str.replace(ESC_0, "~0").replace(ESC_1, "~1");
|
|
8672
|
+
}
|
|
8673
|
+
__name(escapeJsonPointer, "escapeJsonPointer");
|
|
8674
|
+
}
|
|
8675
|
+
});
|
|
8676
|
+
|
|
8677
|
+
// ../@aws-cdk/cloud-assembly-api/lib/template-ranges.ts
|
|
8678
|
+
var template_ranges_exports = {};
|
|
8679
|
+
__export(template_ranges_exports, {
|
|
8680
|
+
indexTemplateRanges: () => indexTemplateRanges,
|
|
8681
|
+
resolveLogicalIdAtOffset: () => resolveLogicalIdAtOffset,
|
|
8682
|
+
resolveResourceRange: () => resolveResourceRange,
|
|
8683
|
+
resolveResourceRanges: () => resolveResourceRanges
|
|
8684
|
+
});
|
|
8685
|
+
function resolveResourceRange(templateText, logicalId) {
|
|
8686
|
+
return indexTemplateRanges(templateText)?.block(logicalId);
|
|
8687
|
+
}
|
|
8688
|
+
function resolveResourceRanges(templateText, logicalId) {
|
|
8689
|
+
return indexTemplateRanges(templateText)?.resource(logicalId);
|
|
8690
|
+
}
|
|
8691
|
+
function indexTemplateRanges(templateText) {
|
|
8692
|
+
const pointers = parsePointers(templateText);
|
|
8693
|
+
if (pointers === void 0) {
|
|
8694
|
+
return void 0;
|
|
8695
|
+
}
|
|
8696
|
+
return {
|
|
8697
|
+
block: /* @__PURE__ */ __name((logicalId) => blockRange(pointers, escapePointerSegment(logicalId)), "block"),
|
|
8698
|
+
resource: /* @__PURE__ */ __name((logicalId) => {
|
|
8699
|
+
const escaped = escapePointerSegment(logicalId);
|
|
8700
|
+
const block = blockRange(pointers, escaped);
|
|
8701
|
+
return block === void 0 ? void 0 : { block, properties: propertyRanges(pointers, escaped) };
|
|
8702
|
+
}, "resource")
|
|
8703
|
+
};
|
|
8704
|
+
}
|
|
8705
|
+
function blockRange(pointers, escapedId) {
|
|
8706
|
+
const mapping = pointers[`/Resources/${escapedId}`];
|
|
8707
|
+
return mapping === void 0 ? void 0 : { start: mapping.value.pos, end: mapping.valueEnd.pos };
|
|
8708
|
+
}
|
|
8709
|
+
function propertyRanges(pointers, escapedId) {
|
|
8710
|
+
const properties = {};
|
|
8711
|
+
for (const [pointer, mapping] of Object.entries(pointers)) {
|
|
8712
|
+
const match = /^\/Resources\/([^/]+)\/Properties\/([^/]+)$/.exec(pointer);
|
|
8713
|
+
if (match === null || match[1] !== escapedId || mapping.key === void 0) {
|
|
8714
|
+
continue;
|
|
8715
|
+
}
|
|
8716
|
+
properties[unescapePointerSegment(match[2])] = { start: mapping.key.pos, end: mapping.valueEnd.pos };
|
|
8717
|
+
}
|
|
8718
|
+
return properties;
|
|
8719
|
+
}
|
|
8720
|
+
function resolveLogicalIdAtOffset(templateText, offset) {
|
|
8721
|
+
const pointers = parsePointers(templateText);
|
|
8722
|
+
if (pointers === void 0) {
|
|
8723
|
+
return void 0;
|
|
8724
|
+
}
|
|
8725
|
+
for (const [pointer, mapping] of Object.entries(pointers)) {
|
|
8726
|
+
const match = /^\/Resources\/([^/]+)$/.exec(pointer);
|
|
8727
|
+
if (match && offset >= mapping.value.pos && offset < mapping.valueEnd.pos) {
|
|
8728
|
+
return unescapePointerSegment(match[1]);
|
|
8729
|
+
}
|
|
8730
|
+
}
|
|
8731
|
+
return void 0;
|
|
8732
|
+
}
|
|
8733
|
+
function parsePointers(templateText) {
|
|
8734
|
+
try {
|
|
8735
|
+
return (0, import_json_source_map.parse)(templateText).pointers;
|
|
8736
|
+
} catch {
|
|
8737
|
+
return void 0;
|
|
8738
|
+
}
|
|
8739
|
+
}
|
|
8740
|
+
function escapePointerSegment(segment) {
|
|
8741
|
+
return segment.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
8742
|
+
}
|
|
8743
|
+
function unescapePointerSegment(segment) {
|
|
8744
|
+
return segment.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
8745
|
+
}
|
|
8746
|
+
var import_json_source_map;
|
|
8747
|
+
var init_template_ranges = __esm({
|
|
8748
|
+
"../@aws-cdk/cloud-assembly-api/lib/template-ranges.ts"() {
|
|
8749
|
+
"use strict";
|
|
8750
|
+
import_json_source_map = __toESM(require_json_source_map());
|
|
8751
|
+
__name(resolveResourceRange, "resolveResourceRange");
|
|
8752
|
+
__name(resolveResourceRanges, "resolveResourceRanges");
|
|
8753
|
+
__name(indexTemplateRanges, "indexTemplateRanges");
|
|
8754
|
+
__name(blockRange, "blockRange");
|
|
8755
|
+
__name(propertyRanges, "propertyRanges");
|
|
8756
|
+
__name(resolveLogicalIdAtOffset, "resolveLogicalIdAtOffset");
|
|
8757
|
+
__name(parsePointers, "parsePointers");
|
|
8758
|
+
__name(escapePointerSegment, "escapePointerSegment");
|
|
8759
|
+
__name(unescapePointerSegment, "unescapePointerSegment");
|
|
8760
|
+
}
|
|
8761
|
+
});
|
|
8762
|
+
|
|
8027
8763
|
// ../@aws-cdk/cloud-assembly-api/lib/index.js
|
|
8028
8764
|
var require_lib3 = __commonJS({
|
|
8029
8765
|
"../@aws-cdk/cloud-assembly-api/lib/index.js"(exports2) {
|
|
@@ -8066,6 +8802,8 @@ var require_lib3 = __commonJS({
|
|
|
8066
8802
|
__exportStar((init_placeholders(), __toCommonJS(placeholders_exports)), exports2);
|
|
8067
8803
|
__exportStar((init_environment(), __toCommonJS(environment_exports)), exports2);
|
|
8068
8804
|
__exportStar((init_bootstrap(), __toCommonJS(bootstrap_exports)), exports2);
|
|
8805
|
+
__exportStar((init_construct_tree(), __toCommonJS(construct_tree_exports)), exports2);
|
|
8806
|
+
__exportStar((init_template_ranges(), __toCommonJS(template_ranges_exports)), exports2);
|
|
8069
8807
|
}
|
|
8070
8808
|
});
|
|
8071
8809
|
|
|
@@ -8130,11 +8868,11 @@ async function repositoryUri(ecr, repositoryName) {
|
|
|
8130
8868
|
return void 0;
|
|
8131
8869
|
}
|
|
8132
8870
|
}
|
|
8133
|
-
var
|
|
8871
|
+
var path9, ContainerImageAssetHandler, ContainerImageBuilder;
|
|
8134
8872
|
var init_container_images = __esm({
|
|
8135
8873
|
"../@aws-cdk/cdk-assets-lib/lib/private/handlers/container-images.ts"() {
|
|
8136
8874
|
"use strict";
|
|
8137
|
-
|
|
8875
|
+
path9 = __toESM(require("path"));
|
|
8138
8876
|
init_client_options();
|
|
8139
8877
|
init_progress();
|
|
8140
8878
|
init_placeholders2();
|
|
@@ -8320,7 +9058,7 @@ var init_container_images = __esm({
|
|
|
8320
9058
|
`'directory' is expected in the DockerImage asset source, got: ${JSON.stringify(source)}`
|
|
8321
9059
|
);
|
|
8322
9060
|
}
|
|
8323
|
-
const fullPath =
|
|
9061
|
+
const fullPath = path9.resolve(this.workDir, source.directory);
|
|
8324
9062
|
this.host.emitMessage("build" /* BUILD */, `Building Docker image at ${fullPath}`);
|
|
8325
9063
|
await this.docker.build({
|
|
8326
9064
|
directory: fullPath,
|
|
@@ -8391,11 +9129,11 @@ var require_Mime = __commonJS({
|
|
|
8391
9129
|
}
|
|
8392
9130
|
}
|
|
8393
9131
|
};
|
|
8394
|
-
Mime.prototype.getType = function(
|
|
8395
|
-
|
|
8396
|
-
let last =
|
|
9132
|
+
Mime.prototype.getType = function(path13) {
|
|
9133
|
+
path13 = String(path13);
|
|
9134
|
+
let last = path13.replace(/^.*[/\\]/, "").toLowerCase();
|
|
8397
9135
|
let ext = last.replace(/^.*\./, "").toLowerCase();
|
|
8398
|
-
let hasPath = last.length <
|
|
9136
|
+
let hasPath = last.length < path13.length;
|
|
8399
9137
|
let hasDot = ext.length < last.length - 1;
|
|
8400
9138
|
return (hasDot || !hasPath) && this._types[ext] || null;
|
|
8401
9139
|
};
|
|
@@ -8442,12 +9180,12 @@ async function pathExists(pathName) {
|
|
|
8442
9180
|
return false;
|
|
8443
9181
|
}
|
|
8444
9182
|
}
|
|
8445
|
-
var
|
|
9183
|
+
var fs9, pfs;
|
|
8446
9184
|
var init_fs_extra = __esm({
|
|
8447
9185
|
"../@aws-cdk/cdk-assets-lib/lib/private/fs-extra.ts"() {
|
|
8448
9186
|
"use strict";
|
|
8449
|
-
|
|
8450
|
-
pfs =
|
|
9187
|
+
fs9 = __toESM(require("fs"));
|
|
9188
|
+
pfs = fs9.promises;
|
|
8451
9189
|
__name(pathExists, "pathExists");
|
|
8452
9190
|
}
|
|
8453
9191
|
});
|
|
@@ -8531,7 +9269,7 @@ var require_path = __commonJS({
|
|
|
8531
9269
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
8532
9270
|
exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0;
|
|
8533
9271
|
var os5 = require("os");
|
|
8534
|
-
var
|
|
9272
|
+
var path13 = require("path");
|
|
8535
9273
|
var IS_WINDOWS_PLATFORM = os5.platform() === "win32";
|
|
8536
9274
|
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
8537
9275
|
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
@@ -8544,7 +9282,7 @@ var require_path = __commonJS({
|
|
|
8544
9282
|
__name(unixify, "unixify");
|
|
8545
9283
|
exports2.unixify = unixify;
|
|
8546
9284
|
function makeAbsolute(cwd, filepath) {
|
|
8547
|
-
return
|
|
9285
|
+
return path13.resolve(cwd, filepath);
|
|
8548
9286
|
}
|
|
8549
9287
|
__name(makeAbsolute, "makeAbsolute");
|
|
8550
9288
|
exports2.makeAbsolute = makeAbsolute;
|
|
@@ -9590,7 +10328,7 @@ var require_parse2 = __commonJS({
|
|
|
9590
10328
|
CHAR_NO_BREAK_SPACE,
|
|
9591
10329
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE
|
|
9592
10330
|
} = require_constants2();
|
|
9593
|
-
var
|
|
10331
|
+
var parse3 = /* @__PURE__ */ __name((input, options = {}) => {
|
|
9594
10332
|
if (typeof input !== "string") {
|
|
9595
10333
|
throw new TypeError("Expected a string");
|
|
9596
10334
|
}
|
|
@@ -9790,7 +10528,7 @@ var require_parse2 = __commonJS({
|
|
|
9790
10528
|
push({ type: "eos" });
|
|
9791
10529
|
return ast;
|
|
9792
10530
|
}, "parse");
|
|
9793
|
-
module2.exports =
|
|
10531
|
+
module2.exports = parse3;
|
|
9794
10532
|
}
|
|
9795
10533
|
});
|
|
9796
10534
|
|
|
@@ -9801,7 +10539,7 @@ var require_braces = __commonJS({
|
|
|
9801
10539
|
var stringify = require_stringify();
|
|
9802
10540
|
var compile = require_compile();
|
|
9803
10541
|
var expand = require_expand();
|
|
9804
|
-
var
|
|
10542
|
+
var parse3 = require_parse2();
|
|
9805
10543
|
var braces = /* @__PURE__ */ __name((input, options = {}) => {
|
|
9806
10544
|
let output = [];
|
|
9807
10545
|
if (Array.isArray(input)) {
|
|
@@ -9821,7 +10559,7 @@ var require_braces = __commonJS({
|
|
|
9821
10559
|
}
|
|
9822
10560
|
return output;
|
|
9823
10561
|
}, "braces");
|
|
9824
|
-
braces.parse = (input, options = {}) =>
|
|
10562
|
+
braces.parse = (input, options = {}) => parse3(input, options);
|
|
9825
10563
|
braces.stringify = (input, options = {}) => {
|
|
9826
10564
|
if (typeof input === "string") {
|
|
9827
10565
|
return stringify(braces.parse(input, options), options);
|
|
@@ -9861,7 +10599,7 @@ var require_braces = __commonJS({
|
|
|
9861
10599
|
var require_constants3 = __commonJS({
|
|
9862
10600
|
"../../node_modules/micromatch/node_modules/picomatch/lib/constants.js"(exports2, module2) {
|
|
9863
10601
|
"use strict";
|
|
9864
|
-
var
|
|
10602
|
+
var path13 = require("path");
|
|
9865
10603
|
var WIN_SLASH = "\\\\/";
|
|
9866
10604
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
9867
10605
|
var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
|
|
@@ -10035,7 +10773,7 @@ var require_constants3 = __commonJS({
|
|
|
10035
10773
|
/* | */
|
|
10036
10774
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
10037
10775
|
/* \uFEFF */
|
|
10038
|
-
SEP:
|
|
10776
|
+
SEP: path13.sep,
|
|
10039
10777
|
/**
|
|
10040
10778
|
* Create EXTGLOB_CHARS
|
|
10041
10779
|
*/
|
|
@@ -10062,7 +10800,7 @@ var require_constants3 = __commonJS({
|
|
|
10062
10800
|
var require_utils2 = __commonJS({
|
|
10063
10801
|
"../../node_modules/micromatch/node_modules/picomatch/lib/utils.js"(exports2) {
|
|
10064
10802
|
"use strict";
|
|
10065
|
-
var
|
|
10803
|
+
var path13 = require("path");
|
|
10066
10804
|
var win32 = process.platform === "win32";
|
|
10067
10805
|
var {
|
|
10068
10806
|
REGEX_BACKSLASH,
|
|
@@ -10091,7 +10829,7 @@ var require_utils2 = __commonJS({
|
|
|
10091
10829
|
if (options && typeof options.windows === "boolean") {
|
|
10092
10830
|
return options.windows;
|
|
10093
10831
|
}
|
|
10094
|
-
return win32 === true ||
|
|
10832
|
+
return win32 === true || path13.sep === "\\";
|
|
10095
10833
|
};
|
|
10096
10834
|
exports2.escapeLast = (input, char, lastIdx) => {
|
|
10097
10835
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -10685,7 +11423,7 @@ var require_parse3 = __commonJS({
|
|
|
10685
11423
|
}
|
|
10686
11424
|
return { risky: false };
|
|
10687
11425
|
}, "analyzeRepeatedExtglob");
|
|
10688
|
-
var
|
|
11426
|
+
var parse3 = /* @__PURE__ */ __name((input, options) => {
|
|
10689
11427
|
if (typeof input !== "string") {
|
|
10690
11428
|
throw new TypeError("Expected a string");
|
|
10691
11429
|
}
|
|
@@ -10856,7 +11594,7 @@ var require_parse3 = __commonJS({
|
|
|
10856
11594
|
output = token.close = `)$))${extglobStar}`;
|
|
10857
11595
|
}
|
|
10858
11596
|
if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
|
|
10859
|
-
const expression =
|
|
11597
|
+
const expression = parse3(rest, { ...options, fastpaths: false }).output;
|
|
10860
11598
|
output = token.close = `)${expression})${extglobStar})`;
|
|
10861
11599
|
}
|
|
10862
11600
|
if (token.prev.type === "bos") {
|
|
@@ -11381,7 +12119,7 @@ var require_parse3 = __commonJS({
|
|
|
11381
12119
|
}
|
|
11382
12120
|
return state2;
|
|
11383
12121
|
}, "parse");
|
|
11384
|
-
|
|
12122
|
+
parse3.fastpaths = (input, options) => {
|
|
11385
12123
|
const opts = { ...options };
|
|
11386
12124
|
const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
|
11387
12125
|
const len = input.length;
|
|
@@ -11447,7 +12185,7 @@ var require_parse3 = __commonJS({
|
|
|
11447
12185
|
}
|
|
11448
12186
|
return source;
|
|
11449
12187
|
};
|
|
11450
|
-
module2.exports =
|
|
12188
|
+
module2.exports = parse3;
|
|
11451
12189
|
}
|
|
11452
12190
|
});
|
|
11453
12191
|
|
|
@@ -11455,9 +12193,9 @@ var require_parse3 = __commonJS({
|
|
|
11455
12193
|
var require_picomatch = __commonJS({
|
|
11456
12194
|
"../../node_modules/micromatch/node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
|
|
11457
12195
|
"use strict";
|
|
11458
|
-
var
|
|
12196
|
+
var path13 = require("path");
|
|
11459
12197
|
var scan = require_scan2();
|
|
11460
|
-
var
|
|
12198
|
+
var parse3 = require_parse3();
|
|
11461
12199
|
var utils = require_utils2();
|
|
11462
12200
|
var constants = require_constants3();
|
|
11463
12201
|
var isObject = /* @__PURE__ */ __name((val) => val && typeof val === "object" && !Array.isArray(val), "isObject");
|
|
@@ -11540,12 +12278,12 @@ var require_picomatch = __commonJS({
|
|
|
11540
12278
|
};
|
|
11541
12279
|
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
11542
12280
|
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
11543
|
-
return regex.test(
|
|
12281
|
+
return regex.test(path13.basename(input));
|
|
11544
12282
|
};
|
|
11545
12283
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
11546
12284
|
picomatch.parse = (pattern, options) => {
|
|
11547
12285
|
if (Array.isArray(pattern)) return pattern.map((p3) => picomatch.parse(p3, options));
|
|
11548
|
-
return
|
|
12286
|
+
return parse3(pattern, { ...options, fastpaths: false });
|
|
11549
12287
|
};
|
|
11550
12288
|
picomatch.scan = (input, options) => scan(input, options);
|
|
11551
12289
|
picomatch.compileRe = (state2, options, returnOutput = false, returnState = false) => {
|
|
@@ -11571,10 +12309,10 @@ var require_picomatch = __commonJS({
|
|
|
11571
12309
|
}
|
|
11572
12310
|
let parsed = { negated: false, fastpaths: true };
|
|
11573
12311
|
if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
|
|
11574
|
-
parsed.output =
|
|
12312
|
+
parsed.output = parse3.fastpaths(input, options);
|
|
11575
12313
|
}
|
|
11576
12314
|
if (!parsed.output) {
|
|
11577
|
-
parsed =
|
|
12315
|
+
parsed = parse3(input, options);
|
|
11578
12316
|
}
|
|
11579
12317
|
return picomatch.compileRe(parsed, options, returnOutput, returnState);
|
|
11580
12318
|
};
|
|
@@ -11767,7 +12505,7 @@ var require_pattern = __commonJS({
|
|
|
11767
12505
|
"use strict";
|
|
11768
12506
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11769
12507
|
exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0;
|
|
11770
|
-
var
|
|
12508
|
+
var path13 = require("path");
|
|
11771
12509
|
var globParent = require_glob_parent();
|
|
11772
12510
|
var micromatch = require_micromatch();
|
|
11773
12511
|
var GLOBSTAR = "**";
|
|
@@ -11877,7 +12615,7 @@ var require_pattern = __commonJS({
|
|
|
11877
12615
|
__name(endsWithSlashGlobStar, "endsWithSlashGlobStar");
|
|
11878
12616
|
exports2.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
11879
12617
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
11880
|
-
const basename =
|
|
12618
|
+
const basename = path13.basename(pattern);
|
|
11881
12619
|
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
|
11882
12620
|
}
|
|
11883
12621
|
__name(isAffectDepthOfReadingPattern, "isAffectDepthOfReadingPattern");
|
|
@@ -11944,7 +12682,7 @@ var require_pattern = __commonJS({
|
|
|
11944
12682
|
__name(partitionAbsoluteAndRelative, "partitionAbsoluteAndRelative");
|
|
11945
12683
|
exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
11946
12684
|
function isAbsolute(pattern) {
|
|
11947
|
-
return
|
|
12685
|
+
return path13.isAbsolute(pattern);
|
|
11948
12686
|
}
|
|
11949
12687
|
__name(isAbsolute, "isAbsolute");
|
|
11950
12688
|
exports2.isAbsolute = isAbsolute;
|
|
@@ -12133,10 +12871,10 @@ var require_utils3 = __commonJS({
|
|
|
12133
12871
|
exports2.array = array;
|
|
12134
12872
|
var errno = require_errno();
|
|
12135
12873
|
exports2.errno = errno;
|
|
12136
|
-
var
|
|
12137
|
-
exports2.fs =
|
|
12138
|
-
var
|
|
12139
|
-
exports2.path =
|
|
12874
|
+
var fs13 = require_fs();
|
|
12875
|
+
exports2.fs = fs13;
|
|
12876
|
+
var path13 = require_path();
|
|
12877
|
+
exports2.path = path13;
|
|
12140
12878
|
var pattern = require_pattern();
|
|
12141
12879
|
exports2.pattern = pattern;
|
|
12142
12880
|
var stream = require_stream();
|
|
@@ -12256,8 +12994,8 @@ var require_async = __commonJS({
|
|
|
12256
12994
|
"use strict";
|
|
12257
12995
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12258
12996
|
exports2.read = void 0;
|
|
12259
|
-
function read(
|
|
12260
|
-
settings.fs.lstat(
|
|
12997
|
+
function read(path13, settings, callback) {
|
|
12998
|
+
settings.fs.lstat(path13, (lstatError, lstat) => {
|
|
12261
12999
|
if (lstatError !== null) {
|
|
12262
13000
|
callFailureCallback(callback, lstatError);
|
|
12263
13001
|
return;
|
|
@@ -12266,7 +13004,7 @@ var require_async = __commonJS({
|
|
|
12266
13004
|
callSuccessCallback(callback, lstat);
|
|
12267
13005
|
return;
|
|
12268
13006
|
}
|
|
12269
|
-
settings.fs.stat(
|
|
13007
|
+
settings.fs.stat(path13, (statError, stat) => {
|
|
12270
13008
|
if (statError !== null) {
|
|
12271
13009
|
if (settings.throwErrorOnBrokenSymbolicLink) {
|
|
12272
13010
|
callFailureCallback(callback, statError);
|
|
@@ -12301,13 +13039,13 @@ var require_sync = __commonJS({
|
|
|
12301
13039
|
"use strict";
|
|
12302
13040
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12303
13041
|
exports2.read = void 0;
|
|
12304
|
-
function read(
|
|
12305
|
-
const lstat = settings.fs.lstatSync(
|
|
13042
|
+
function read(path13, settings) {
|
|
13043
|
+
const lstat = settings.fs.lstatSync(path13);
|
|
12306
13044
|
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
|
|
12307
13045
|
return lstat;
|
|
12308
13046
|
}
|
|
12309
13047
|
try {
|
|
12310
|
-
const stat = settings.fs.statSync(
|
|
13048
|
+
const stat = settings.fs.statSync(path13);
|
|
12311
13049
|
if (settings.markSymbolicLink) {
|
|
12312
13050
|
stat.isSymbolicLink = () => true;
|
|
12313
13051
|
}
|
|
@@ -12330,12 +13068,12 @@ var require_fs2 = __commonJS({
|
|
|
12330
13068
|
"use strict";
|
|
12331
13069
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12332
13070
|
exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
|
|
12333
|
-
var
|
|
13071
|
+
var fs13 = require("fs");
|
|
12334
13072
|
exports2.FILE_SYSTEM_ADAPTER = {
|
|
12335
|
-
lstat:
|
|
12336
|
-
stat:
|
|
12337
|
-
lstatSync:
|
|
12338
|
-
statSync:
|
|
13073
|
+
lstat: fs13.lstat,
|
|
13074
|
+
stat: fs13.stat,
|
|
13075
|
+
lstatSync: fs13.lstatSync,
|
|
13076
|
+
statSync: fs13.statSync
|
|
12339
13077
|
};
|
|
12340
13078
|
function createFileSystemAdapter(fsMethods) {
|
|
12341
13079
|
if (fsMethods === void 0) {
|
|
@@ -12353,7 +13091,7 @@ var require_settings = __commonJS({
|
|
|
12353
13091
|
"../../node_modules/@nodelib/fs.stat/out/settings.js"(exports2) {
|
|
12354
13092
|
"use strict";
|
|
12355
13093
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12356
|
-
var
|
|
13094
|
+
var fs13 = require_fs2();
|
|
12357
13095
|
var Settings = class {
|
|
12358
13096
|
static {
|
|
12359
13097
|
__name(this, "Settings");
|
|
@@ -12361,7 +13099,7 @@ var require_settings = __commonJS({
|
|
|
12361
13099
|
constructor(_options = {}) {
|
|
12362
13100
|
this._options = _options;
|
|
12363
13101
|
this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
|
|
12364
|
-
this.fs =
|
|
13102
|
+
this.fs = fs13.createFileSystemAdapter(this._options.fs);
|
|
12365
13103
|
this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
|
|
12366
13104
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
12367
13105
|
}
|
|
@@ -12383,18 +13121,18 @@ var require_out = __commonJS({
|
|
|
12383
13121
|
var sync = require_sync();
|
|
12384
13122
|
var settings_1 = require_settings();
|
|
12385
13123
|
exports2.Settings = settings_1.default;
|
|
12386
|
-
function stat(
|
|
13124
|
+
function stat(path13, optionsOrSettingsOrCallback, callback) {
|
|
12387
13125
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
12388
|
-
async.read(
|
|
13126
|
+
async.read(path13, getSettings(), optionsOrSettingsOrCallback);
|
|
12389
13127
|
return;
|
|
12390
13128
|
}
|
|
12391
|
-
async.read(
|
|
13129
|
+
async.read(path13, getSettings(optionsOrSettingsOrCallback), callback);
|
|
12392
13130
|
}
|
|
12393
13131
|
__name(stat, "stat");
|
|
12394
13132
|
exports2.stat = stat;
|
|
12395
|
-
function statSync3(
|
|
13133
|
+
function statSync3(path13, optionsOrSettings) {
|
|
12396
13134
|
const settings = getSettings(optionsOrSettings);
|
|
12397
|
-
return sync.read(
|
|
13135
|
+
return sync.read(path13, settings);
|
|
12398
13136
|
}
|
|
12399
13137
|
__name(statSync3, "statSync");
|
|
12400
13138
|
exports2.statSync = statSync3;
|
|
@@ -12527,8 +13265,8 @@ var require_utils4 = __commonJS({
|
|
|
12527
13265
|
"use strict";
|
|
12528
13266
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12529
13267
|
exports2.fs = void 0;
|
|
12530
|
-
var
|
|
12531
|
-
exports2.fs =
|
|
13268
|
+
var fs13 = require_fs3();
|
|
13269
|
+
exports2.fs = fs13;
|
|
12532
13270
|
}
|
|
12533
13271
|
});
|
|
12534
13272
|
|
|
@@ -12624,16 +13362,16 @@ var require_async2 = __commonJS({
|
|
|
12624
13362
|
return;
|
|
12625
13363
|
}
|
|
12626
13364
|
const tasks = names.map((name) => {
|
|
12627
|
-
const
|
|
13365
|
+
const path13 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
|
12628
13366
|
return (done) => {
|
|
12629
|
-
fsStat.stat(
|
|
13367
|
+
fsStat.stat(path13, settings.fsStatSettings, (error2, stats) => {
|
|
12630
13368
|
if (error2 !== null) {
|
|
12631
13369
|
done(error2);
|
|
12632
13370
|
return;
|
|
12633
13371
|
}
|
|
12634
13372
|
const entry = {
|
|
12635
13373
|
name,
|
|
12636
|
-
path:
|
|
13374
|
+
path: path13,
|
|
12637
13375
|
dirent: utils.fs.createDirentFromStats(name, stats)
|
|
12638
13376
|
};
|
|
12639
13377
|
if (settings.stats) {
|
|
@@ -12733,14 +13471,14 @@ var require_fs4 = __commonJS({
|
|
|
12733
13471
|
"use strict";
|
|
12734
13472
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12735
13473
|
exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
|
|
12736
|
-
var
|
|
13474
|
+
var fs13 = require("fs");
|
|
12737
13475
|
exports2.FILE_SYSTEM_ADAPTER = {
|
|
12738
|
-
lstat:
|
|
12739
|
-
stat:
|
|
12740
|
-
lstatSync:
|
|
12741
|
-
statSync:
|
|
12742
|
-
readdir:
|
|
12743
|
-
readdirSync:
|
|
13476
|
+
lstat: fs13.lstat,
|
|
13477
|
+
stat: fs13.stat,
|
|
13478
|
+
lstatSync: fs13.lstatSync,
|
|
13479
|
+
statSync: fs13.statSync,
|
|
13480
|
+
readdir: fs13.readdir,
|
|
13481
|
+
readdirSync: fs13.readdirSync
|
|
12744
13482
|
};
|
|
12745
13483
|
function createFileSystemAdapter(fsMethods) {
|
|
12746
13484
|
if (fsMethods === void 0) {
|
|
@@ -12758,9 +13496,9 @@ var require_settings2 = __commonJS({
|
|
|
12758
13496
|
"../../node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) {
|
|
12759
13497
|
"use strict";
|
|
12760
13498
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12761
|
-
var
|
|
13499
|
+
var path13 = require("path");
|
|
12762
13500
|
var fsStat = require_out();
|
|
12763
|
-
var
|
|
13501
|
+
var fs13 = require_fs4();
|
|
12764
13502
|
var Settings = class {
|
|
12765
13503
|
static {
|
|
12766
13504
|
__name(this, "Settings");
|
|
@@ -12768,8 +13506,8 @@ var require_settings2 = __commonJS({
|
|
|
12768
13506
|
constructor(_options = {}) {
|
|
12769
13507
|
this._options = _options;
|
|
12770
13508
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
12771
|
-
this.fs =
|
|
12772
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
13509
|
+
this.fs = fs13.createFileSystemAdapter(this._options.fs);
|
|
13510
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path13.sep);
|
|
12773
13511
|
this.stats = this._getValue(this._options.stats, false);
|
|
12774
13512
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
12775
13513
|
this.fsStatSettings = new fsStat.Settings({
|
|
@@ -12796,18 +13534,18 @@ var require_out2 = __commonJS({
|
|
|
12796
13534
|
var sync = require_sync2();
|
|
12797
13535
|
var settings_1 = require_settings2();
|
|
12798
13536
|
exports2.Settings = settings_1.default;
|
|
12799
|
-
function scandir(
|
|
13537
|
+
function scandir(path13, optionsOrSettingsOrCallback, callback) {
|
|
12800
13538
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
12801
|
-
async.read(
|
|
13539
|
+
async.read(path13, getSettings(), optionsOrSettingsOrCallback);
|
|
12802
13540
|
return;
|
|
12803
13541
|
}
|
|
12804
|
-
async.read(
|
|
13542
|
+
async.read(path13, getSettings(optionsOrSettingsOrCallback), callback);
|
|
12805
13543
|
}
|
|
12806
13544
|
__name(scandir, "scandir");
|
|
12807
13545
|
exports2.scandir = scandir;
|
|
12808
|
-
function scandirSync(
|
|
13546
|
+
function scandirSync(path13, optionsOrSettings) {
|
|
12809
13547
|
const settings = getSettings(optionsOrSettings);
|
|
12810
|
-
return sync.read(
|
|
13548
|
+
return sync.read(path13, settings);
|
|
12811
13549
|
}
|
|
12812
13550
|
__name(scandirSync, "scandirSync");
|
|
12813
13551
|
exports2.scandirSync = scandirSync;
|
|
@@ -13504,7 +14242,7 @@ var require_settings3 = __commonJS({
|
|
|
13504
14242
|
"../../node_modules/@nodelib/fs.walk/out/settings.js"(exports2) {
|
|
13505
14243
|
"use strict";
|
|
13506
14244
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
13507
|
-
var
|
|
14245
|
+
var path13 = require("path");
|
|
13508
14246
|
var fsScandir = require_out2();
|
|
13509
14247
|
var Settings = class {
|
|
13510
14248
|
static {
|
|
@@ -13517,7 +14255,7 @@ var require_settings3 = __commonJS({
|
|
|
13517
14255
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
13518
14256
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
13519
14257
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
|
13520
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
14258
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path13.sep);
|
|
13521
14259
|
this.fsScandirSettings = new fsScandir.Settings({
|
|
13522
14260
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
13523
14261
|
fs: this._options.fs,
|
|
@@ -13583,7 +14321,7 @@ var require_reader2 = __commonJS({
|
|
|
13583
14321
|
"../../node_modules/fast-glob/out/readers/reader.js"(exports2) {
|
|
13584
14322
|
"use strict";
|
|
13585
14323
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
13586
|
-
var
|
|
14324
|
+
var path13 = require("path");
|
|
13587
14325
|
var fsStat = require_out();
|
|
13588
14326
|
var utils = require_utils3();
|
|
13589
14327
|
var Reader = class {
|
|
@@ -13599,7 +14337,7 @@ var require_reader2 = __commonJS({
|
|
|
13599
14337
|
});
|
|
13600
14338
|
}
|
|
13601
14339
|
_getFullEntryPath(filepath) {
|
|
13602
|
-
return
|
|
14340
|
+
return path13.resolve(this._settings.cwd, filepath);
|
|
13603
14341
|
}
|
|
13604
14342
|
_makeEntry(stats, pattern) {
|
|
13605
14343
|
const entry = {
|
|
@@ -14039,7 +14777,7 @@ var require_provider = __commonJS({
|
|
|
14039
14777
|
"../../node_modules/fast-glob/out/providers/provider.js"(exports2) {
|
|
14040
14778
|
"use strict";
|
|
14041
14779
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
14042
|
-
var
|
|
14780
|
+
var path13 = require("path");
|
|
14043
14781
|
var deep_1 = require_deep();
|
|
14044
14782
|
var entry_1 = require_entry();
|
|
14045
14783
|
var error_1 = require_error();
|
|
@@ -14056,7 +14794,7 @@ var require_provider = __commonJS({
|
|
|
14056
14794
|
this.entryTransformer = new entry_2.default(this._settings);
|
|
14057
14795
|
}
|
|
14058
14796
|
_getRootDirectory(task) {
|
|
14059
|
-
return
|
|
14797
|
+
return path13.resolve(this._settings.cwd, task.base);
|
|
14060
14798
|
}
|
|
14061
14799
|
_getReaderOptions(task) {
|
|
14062
14800
|
const basePath = task.base === "." ? "" : task.base;
|
|
@@ -14249,16 +14987,16 @@ var require_settings4 = __commonJS({
|
|
|
14249
14987
|
"use strict";
|
|
14250
14988
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
14251
14989
|
exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
14252
|
-
var
|
|
14990
|
+
var fs13 = require("fs");
|
|
14253
14991
|
var os5 = require("os");
|
|
14254
14992
|
var CPU_COUNT = Math.max(os5.cpus().length, 1);
|
|
14255
14993
|
exports2.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
14256
|
-
lstat:
|
|
14257
|
-
lstatSync:
|
|
14258
|
-
stat:
|
|
14259
|
-
statSync:
|
|
14260
|
-
readdir:
|
|
14261
|
-
readdirSync:
|
|
14994
|
+
lstat: fs13.lstat,
|
|
14995
|
+
lstatSync: fs13.lstatSync,
|
|
14996
|
+
stat: fs13.stat,
|
|
14997
|
+
statSync: fs13.statSync,
|
|
14998
|
+
readdir: fs13.readdir,
|
|
14999
|
+
readdirSync: fs13.readdirSync
|
|
14262
15000
|
};
|
|
14263
15001
|
var Settings = class {
|
|
14264
15002
|
static {
|
|
@@ -14736,7 +15474,7 @@ var require_dist = __commonJS({
|
|
|
14736
15474
|
// ../../node_modules/yazl/index.js
|
|
14737
15475
|
var require_yazl = __commonJS({
|
|
14738
15476
|
"../../node_modules/yazl/index.js"(exports2) {
|
|
14739
|
-
var
|
|
15477
|
+
var fs13 = require("fs");
|
|
14740
15478
|
var Transform = require("stream").Transform;
|
|
14741
15479
|
var PassThrough2 = require("stream").PassThrough;
|
|
14742
15480
|
var zlib2 = require("zlib");
|
|
@@ -14767,14 +15505,14 @@ var require_yazl = __commonJS({
|
|
|
14767
15505
|
if (shouldIgnoreAdding(self2)) return;
|
|
14768
15506
|
var entry = new Entry(metadataPath, false, options);
|
|
14769
15507
|
self2.entries.push(entry);
|
|
14770
|
-
|
|
15508
|
+
fs13.stat(realPath, function(err, stats) {
|
|
14771
15509
|
if (err) return self2.emit("error", err);
|
|
14772
15510
|
if (!stats.isFile()) return self2.emit("error", new Error("not a file: " + realPath));
|
|
14773
15511
|
entry.uncompressedSize = stats.size;
|
|
14774
15512
|
if (options.mtime == null) entry.setLastModDate(stats.mtime);
|
|
14775
15513
|
if (options.mode == null) entry.setFileAttributesMode(stats.mode);
|
|
14776
15514
|
entry.setFileDataPumpFunction(function() {
|
|
14777
|
-
var readStream =
|
|
15515
|
+
var readStream = fs13.createReadStream(realPath);
|
|
14778
15516
|
entry.state = Entry.FILE_DATA_IN_PROGRESS;
|
|
14779
15517
|
readStream.on("error", function(err2) {
|
|
14780
15518
|
self2.emit("error", err2);
|
|
@@ -15444,7 +16182,7 @@ var require_zip = __commonJS({
|
|
|
15444
16182
|
exports2.zipDirectory = zipDirectory2;
|
|
15445
16183
|
exports2.zipString = zipString;
|
|
15446
16184
|
var fs_1 = require("fs");
|
|
15447
|
-
var
|
|
16185
|
+
var path13 = __importStar2(require("path"));
|
|
15448
16186
|
var fast_glob_1 = require_out4();
|
|
15449
16187
|
var yazl_1 = require_yazl();
|
|
15450
16188
|
function epoch() {
|
|
@@ -15492,7 +16230,7 @@ var require_zip = __commonJS({
|
|
|
15492
16230
|
output.once("close", ok);
|
|
15493
16231
|
zip.outputStream.pipe(output);
|
|
15494
16232
|
for (const file of files) {
|
|
15495
|
-
const fullPath =
|
|
16233
|
+
const fullPath = path13.resolve(directory, file);
|
|
15496
16234
|
const [data2, stat] = await Promise.all([fs_1.promises.readFile(fullPath), fs_1.promises.stat(fullPath)]);
|
|
15497
16235
|
zip.addBuffer(data2, file, {
|
|
15498
16236
|
mtime: epoch(),
|
|
@@ -15564,13 +16302,13 @@ async function cached(cache6, key, factory) {
|
|
|
15564
16302
|
cache6.set(key, fresh);
|
|
15565
16303
|
return fresh;
|
|
15566
16304
|
}
|
|
15567
|
-
var import_fs,
|
|
16305
|
+
var import_fs, path10, import_cloud_assembly_schema2, mime, EMPTY_ZIP_FILE_SIZE, FileAssetHandler, BucketInformation;
|
|
15568
16306
|
var init_files = __esm({
|
|
15569
16307
|
"../@aws-cdk/cdk-assets-lib/lib/private/handlers/files.ts"() {
|
|
15570
16308
|
"use strict";
|
|
15571
16309
|
import_fs = require("fs");
|
|
15572
|
-
|
|
15573
|
-
|
|
16310
|
+
path10 = __toESM(require("path"));
|
|
16311
|
+
import_cloud_assembly_schema2 = __toESM(require_lib2());
|
|
15574
16312
|
mime = __toESM(require_mime());
|
|
15575
16313
|
init_client_options();
|
|
15576
16314
|
init_progress();
|
|
@@ -15584,7 +16322,7 @@ var init_files = __esm({
|
|
|
15584
16322
|
this.workDir = workDir;
|
|
15585
16323
|
this.asset = asset;
|
|
15586
16324
|
this.host = host;
|
|
15587
|
-
this.fileCacheRoot =
|
|
16325
|
+
this.fileCacheRoot = path10.join(workDir, ".cache");
|
|
15588
16326
|
}
|
|
15589
16327
|
workDir;
|
|
15590
16328
|
asset;
|
|
@@ -15713,11 +16451,11 @@ var init_files = __esm({
|
|
|
15713
16451
|
`'path' is expected in the File asset source, got: ${JSON.stringify(source)}`
|
|
15714
16452
|
);
|
|
15715
16453
|
}
|
|
15716
|
-
const fullPath =
|
|
15717
|
-
if (source.packaging ===
|
|
16454
|
+
const fullPath = path10.resolve(this.workDir, source.path);
|
|
16455
|
+
if (source.packaging === import_cloud_assembly_schema2.FileAssetPackaging.ZIP_DIRECTORY) {
|
|
15718
16456
|
const contentType = "application/zip";
|
|
15719
16457
|
await import_fs.promises.mkdir(this.fileCacheRoot, { recursive: true });
|
|
15720
|
-
const packagedPath =
|
|
16458
|
+
const packagedPath = path10.join(this.fileCacheRoot, `${this.asset.id.assetId}.zip`);
|
|
15721
16459
|
if (await pathExists(packagedPath)) {
|
|
15722
16460
|
this.host.emitMessage("cached" /* CACHED */, `From cache ${packagedPath}`);
|
|
15723
16461
|
return { packagedPath, contentType };
|
|
@@ -15856,13 +16594,13 @@ function prefixTreeChars(xs, prefix = "") {
|
|
|
15856
16594
|
}
|
|
15857
16595
|
return ret;
|
|
15858
16596
|
}
|
|
15859
|
-
var
|
|
16597
|
+
var fs11, path11, import_cloud_assembly_schema3, AssetManifest, ASSET_TYPES, FileManifestEntry, DockerImageManifestEntry, DestinationIdentifier, DestinationPattern;
|
|
15860
16598
|
var init_asset_manifest = __esm({
|
|
15861
16599
|
"../@aws-cdk/cdk-assets-lib/lib/asset-manifest.ts"() {
|
|
15862
16600
|
"use strict";
|
|
15863
|
-
|
|
15864
|
-
|
|
15865
|
-
|
|
16601
|
+
fs11 = __toESM(require("fs"));
|
|
16602
|
+
path11 = __toESM(require("path"));
|
|
16603
|
+
import_cloud_assembly_schema3 = __toESM(require_lib2());
|
|
15866
16604
|
AssetManifest = class _AssetManifest {
|
|
15867
16605
|
constructor(directory, manifest) {
|
|
15868
16606
|
this.manifest = manifest;
|
|
@@ -15881,8 +16619,8 @@ var init_asset_manifest = __esm({
|
|
|
15881
16619
|
*/
|
|
15882
16620
|
static fromFile(fileName) {
|
|
15883
16621
|
try {
|
|
15884
|
-
const obj =
|
|
15885
|
-
return new _AssetManifest(
|
|
16622
|
+
const obj = import_cloud_assembly_schema3.Manifest.loadAssetManifest(fileName);
|
|
16623
|
+
return new _AssetManifest(path11.dirname(fileName), obj);
|
|
15886
16624
|
} catch (e6) {
|
|
15887
16625
|
throw new Error(`Cannot read asset manifest '${fileName}': ${e6.message}`);
|
|
15888
16626
|
}
|
|
@@ -15895,12 +16633,12 @@ var init_asset_manifest = __esm({
|
|
|
15895
16633
|
static fromPath(filePath) {
|
|
15896
16634
|
let st;
|
|
15897
16635
|
try {
|
|
15898
|
-
st =
|
|
16636
|
+
st = fs11.statSync(filePath);
|
|
15899
16637
|
} catch (e6) {
|
|
15900
16638
|
throw new Error(`Cannot read asset manifest at '${filePath}': ${e6.message}`);
|
|
15901
16639
|
}
|
|
15902
16640
|
if (st.isDirectory()) {
|
|
15903
|
-
return _AssetManifest.fromFile(
|
|
16641
|
+
return _AssetManifest.fromFile(path11.join(filePath, _AssetManifest.DEFAULT_FILENAME));
|
|
15904
16642
|
}
|
|
15905
16643
|
return _AssetManifest.fromFile(filePath);
|
|
15906
16644
|
}
|
|
@@ -20399,14 +21137,14 @@ var init_readFile = __esm({
|
|
|
20399
21137
|
import_promises2 = require("node:fs/promises");
|
|
20400
21138
|
filePromises = {};
|
|
20401
21139
|
fileIntercept = {};
|
|
20402
|
-
readFile2 = /* @__PURE__ */ __name((
|
|
20403
|
-
if (fileIntercept[
|
|
20404
|
-
return fileIntercept[
|
|
21140
|
+
readFile2 = /* @__PURE__ */ __name((path13, options) => {
|
|
21141
|
+
if (fileIntercept[path13] !== void 0) {
|
|
21142
|
+
return fileIntercept[path13];
|
|
20405
21143
|
}
|
|
20406
|
-
if (!filePromises[
|
|
20407
|
-
filePromises[
|
|
21144
|
+
if (!filePromises[path13] || options?.ignoreCache) {
|
|
21145
|
+
filePromises[path13] = (0, import_promises2.readFile)(path13, "utf8");
|
|
20408
21146
|
}
|
|
20409
|
-
return filePromises[
|
|
21147
|
+
return filePromises[path13];
|
|
20410
21148
|
}, "readFile");
|
|
20411
21149
|
}
|
|
20412
21150
|
});
|
|
@@ -20518,8 +21256,8 @@ var init_externalDataInterceptor = __esm({
|
|
|
20518
21256
|
getFileRecord() {
|
|
20519
21257
|
return fileIntercept;
|
|
20520
21258
|
},
|
|
20521
|
-
interceptFile(
|
|
20522
|
-
fileIntercept[
|
|
21259
|
+
interceptFile(path13, contents) {
|
|
21260
|
+
fileIntercept[path13] = Promise.resolve(contents);
|
|
20523
21261
|
},
|
|
20524
21262
|
getTokenRecord() {
|
|
20525
21263
|
return tokenIntercept;
|
|
@@ -21294,8 +22032,8 @@ var init_createConfigValueProvider = __esm({
|
|
|
21294
22032
|
return endpoint.url.href;
|
|
21295
22033
|
}
|
|
21296
22034
|
if ("hostname" in endpoint) {
|
|
21297
|
-
const { protocol, hostname, port, path:
|
|
21298
|
-
return `${protocol}//${hostname}${port ? ":" + port : ""}${
|
|
22035
|
+
const { protocol, hostname, port, path: path13 } = endpoint;
|
|
22036
|
+
return `${protocol}//${hostname}${port ? ":" + port : ""}${path13}`;
|
|
21299
22037
|
}
|
|
21300
22038
|
}
|
|
21301
22039
|
return endpoint;
|
|
@@ -21726,18 +22464,18 @@ var getAttrPathList;
|
|
|
21726
22464
|
var init_getAttrPathList = __esm({
|
|
21727
22465
|
"../../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttrPathList.js"() {
|
|
21728
22466
|
init_types2();
|
|
21729
|
-
getAttrPathList = /* @__PURE__ */ __name((
|
|
21730
|
-
const parts =
|
|
22467
|
+
getAttrPathList = /* @__PURE__ */ __name((path13) => {
|
|
22468
|
+
const parts = path13.split(".");
|
|
21731
22469
|
const pathList = [];
|
|
21732
22470
|
for (const part of parts) {
|
|
21733
22471
|
const squareBracketIndex = part.indexOf("[");
|
|
21734
22472
|
if (squareBracketIndex !== -1) {
|
|
21735
22473
|
if (part.indexOf("]") !== part.length - 1) {
|
|
21736
|
-
throw new EndpointError(`Path: '${
|
|
22474
|
+
throw new EndpointError(`Path: '${path13}' does not end with ']'`);
|
|
21737
22475
|
}
|
|
21738
22476
|
const arrayIndex = part.slice(squareBracketIndex + 1, -1);
|
|
21739
22477
|
if (Number.isNaN(parseInt(arrayIndex))) {
|
|
21740
|
-
throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${
|
|
22478
|
+
throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path13}'`);
|
|
21741
22479
|
}
|
|
21742
22480
|
if (squareBracketIndex !== 0) {
|
|
21743
22481
|
pathList.push(part.slice(0, squareBracketIndex));
|
|
@@ -21758,9 +22496,9 @@ var init_getAttr = __esm({
|
|
|
21758
22496
|
"../../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttr.js"() {
|
|
21759
22497
|
init_types2();
|
|
21760
22498
|
init_getAttrPathList();
|
|
21761
|
-
getAttr = /* @__PURE__ */ __name((value,
|
|
22499
|
+
getAttr = /* @__PURE__ */ __name((value, path13) => getAttrPathList(path13).reduce((acc, index) => {
|
|
21762
22500
|
if (typeof acc !== "object") {
|
|
21763
|
-
throw new EndpointError(`Index '${index}' in '${
|
|
22501
|
+
throw new EndpointError(`Index '${index}' in '${path13}' not found in '${JSON.stringify(value)}'`);
|
|
21764
22502
|
} else if (Array.isArray(acc)) {
|
|
21765
22503
|
const i6 = parseInt(index);
|
|
21766
22504
|
return acc[i6 < 0 ? acc.length + i6 : i6];
|
|
@@ -21822,8 +22560,8 @@ var init_parseURL = __esm({
|
|
|
21822
22560
|
return value;
|
|
21823
22561
|
}
|
|
21824
22562
|
if (typeof value === "object" && "hostname" in value) {
|
|
21825
|
-
const { hostname: hostname2, port, protocol: protocol2 = "", path:
|
|
21826
|
-
const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${
|
|
22563
|
+
const { hostname: hostname2, port, protocol: protocol2 = "", path: path13 = "", query = {} } = value;
|
|
22564
|
+
const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path13}`);
|
|
21827
22565
|
url.search = Object.entries(query).map(([k6, v]) => `${k6}=${v}`).join("&");
|
|
21828
22566
|
return url;
|
|
21829
22567
|
}
|
|
@@ -25526,11 +26264,11 @@ var init_HttpBindingProtocol = __esm({
|
|
|
25526
26264
|
const opTraits = translateTraits(operationSchema.traits);
|
|
25527
26265
|
if (opTraits.http) {
|
|
25528
26266
|
request.method = opTraits.http[0];
|
|
25529
|
-
const [
|
|
26267
|
+
const [path13, search] = opTraits.http[1].split("?");
|
|
25530
26268
|
if (request.path == "/") {
|
|
25531
|
-
request.path =
|
|
26269
|
+
request.path = path13;
|
|
25532
26270
|
} else {
|
|
25533
|
-
request.path +=
|
|
26271
|
+
request.path += path13;
|
|
25534
26272
|
}
|
|
25535
26273
|
const traitSearchParams = new URLSearchParams(search ?? "");
|
|
25536
26274
|
for (const [key, value] of traitSearchParams) {
|
|
@@ -25938,8 +26676,8 @@ var init_requestBuilder = __esm({
|
|
|
25938
26676
|
return this;
|
|
25939
26677
|
}
|
|
25940
26678
|
p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
|
|
25941
|
-
this.resolvePathStack.push((
|
|
25942
|
-
this.path = resolvedPath(
|
|
26679
|
+
this.resolvePathStack.push((path13) => {
|
|
26680
|
+
this.path = resolvedPath(path13, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
|
|
25943
26681
|
});
|
|
25944
26682
|
return this;
|
|
25945
26683
|
}
|
|
@@ -28074,9 +28812,9 @@ var init_createPaginator = __esm({
|
|
|
28074
28812
|
return await client.send(command6, ...args);
|
|
28075
28813
|
}, "makePagedClientRequest");
|
|
28076
28814
|
__name(createPaginator, "createPaginator");
|
|
28077
|
-
get = /* @__PURE__ */ __name((fromObject,
|
|
28815
|
+
get = /* @__PURE__ */ __name((fromObject, path13) => {
|
|
28078
28816
|
let cursor2 = fromObject;
|
|
28079
|
-
const pathComponents =
|
|
28817
|
+
const pathComponents = path13.split(".");
|
|
28080
28818
|
for (const step of pathComponents) {
|
|
28081
28819
|
if (!cursor2 || typeof cursor2 !== "object") {
|
|
28082
28820
|
return void 0;
|
|
@@ -28883,12 +29621,12 @@ var import_node_path6, getNodeModulesParentDirs;
|
|
|
28883
29621
|
var init_getNodeModulesParentDirs = __esm({
|
|
28884
29622
|
"../../node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getNodeModulesParentDirs.js"() {
|
|
28885
29623
|
import_node_path6 = require("node:path");
|
|
28886
|
-
getNodeModulesParentDirs = /* @__PURE__ */ __name((
|
|
29624
|
+
getNodeModulesParentDirs = /* @__PURE__ */ __name((dirname3) => {
|
|
28887
29625
|
const cwd = process.cwd();
|
|
28888
|
-
if (!
|
|
29626
|
+
if (!dirname3) {
|
|
28889
29627
|
return [cwd];
|
|
28890
29628
|
}
|
|
28891
|
-
const normalizedPath = (0, import_node_path6.normalize)(
|
|
29629
|
+
const normalizedPath = (0, import_node_path6.normalize)(dirname3);
|
|
28892
29630
|
const parts = normalizedPath.split(import_node_path6.sep);
|
|
28893
29631
|
const nodeModulesIndex = parts.indexOf("node_modules");
|
|
28894
29632
|
const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(import_node_path6.sep) : normalizedPath;
|
|
@@ -28963,8 +29701,8 @@ var init_getTypeScriptUserAgentPair = __esm({
|
|
|
28963
29701
|
tscVersion = null;
|
|
28964
29702
|
return void 0;
|
|
28965
29703
|
}
|
|
28966
|
-
const
|
|
28967
|
-
const nodeModulesParentDirs = getNodeModulesParentDirs(
|
|
29704
|
+
const dirname3 = typeof __dirname !== "undefined" ? __dirname : void 0;
|
|
29705
|
+
const nodeModulesParentDirs = getNodeModulesParentDirs(dirname3);
|
|
28968
29706
|
let versionFromApp;
|
|
28969
29707
|
for (const nodeModulesParentDir of nodeModulesParentDirs) {
|
|
28970
29708
|
try {
|
|
@@ -29925,8 +30663,8 @@ var init_createUserAgentStringParsingProvider = __esm({
|
|
|
29925
30663
|
"../../node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/createUserAgentStringParsingProvider.js"() {
|
|
29926
30664
|
createUserAgentStringParsingProvider = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => async (config) => {
|
|
29927
30665
|
const module2 = await Promise.resolve().then(() => __toESM(require_es5()));
|
|
29928
|
-
const
|
|
29929
|
-
const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent ?
|
|
30666
|
+
const parse3 = module2.parse ?? module2.default.parse ?? (() => "");
|
|
30667
|
+
const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent ? parse3(window.navigator.userAgent) : void 0;
|
|
29930
30668
|
const sections = [
|
|
29931
30669
|
["aws-sdk-js", clientVersion],
|
|
29932
30670
|
["ua", "2.1"],
|
|
@@ -30731,10 +31469,10 @@ ${longDate}
|
|
|
30731
31469
|
${credentialScope}
|
|
30732
31470
|
${toHex2(hashedRequest)}`;
|
|
30733
31471
|
}
|
|
30734
|
-
getCanonicalPath({ path:
|
|
31472
|
+
getCanonicalPath({ path: path13 }) {
|
|
30735
31473
|
if (this.uriEscapePath) {
|
|
30736
31474
|
const normalizedPathSegments = [];
|
|
30737
|
-
for (const pathSegment of
|
|
31475
|
+
for (const pathSegment of path13.split("/")) {
|
|
30738
31476
|
if (pathSegment?.length === 0)
|
|
30739
31477
|
continue;
|
|
30740
31478
|
if (pathSegment === ".")
|
|
@@ -30745,11 +31483,11 @@ ${toHex2(hashedRequest)}`;
|
|
|
30745
31483
|
normalizedPathSegments.push(pathSegment);
|
|
30746
31484
|
}
|
|
30747
31485
|
}
|
|
30748
|
-
const normalizedPath = `${
|
|
31486
|
+
const normalizedPath = `${path13?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path13?.endsWith("/") ? "/" : ""}`;
|
|
30749
31487
|
const doubleEncoded = escapeUri2(normalizedPath);
|
|
30750
31488
|
return doubleEncoded.replace(/%2F/g, "/");
|
|
30751
31489
|
}
|
|
30752
|
-
return
|
|
31490
|
+
return path13;
|
|
30753
31491
|
}
|
|
30754
31492
|
validateResolvedCredentials(credentials) {
|
|
30755
31493
|
if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") {
|
|
@@ -31900,12 +32638,12 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
31900
32638
|
const password = request.password ?? "";
|
|
31901
32639
|
auth = `${username}:${password}`;
|
|
31902
32640
|
}
|
|
31903
|
-
let
|
|
32641
|
+
let path13 = request.path;
|
|
31904
32642
|
if (queryString) {
|
|
31905
|
-
|
|
32643
|
+
path13 += `?${queryString}`;
|
|
31906
32644
|
}
|
|
31907
32645
|
if (request.fragment) {
|
|
31908
|
-
|
|
32646
|
+
path13 += `#${request.fragment}`;
|
|
31909
32647
|
}
|
|
31910
32648
|
let hostname = request.hostname ?? "";
|
|
31911
32649
|
if (hostname[0] === "[" && hostname.endsWith("]")) {
|
|
@@ -31917,7 +32655,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
31917
32655
|
headers: request.headers,
|
|
31918
32656
|
host: hostname,
|
|
31919
32657
|
method: request.method,
|
|
31920
|
-
path:
|
|
32658
|
+
path: path13,
|
|
31921
32659
|
port: request.port,
|
|
31922
32660
|
agent,
|
|
31923
32661
|
auth
|
|
@@ -32332,16 +33070,16 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
32332
33070
|
reject(err);
|
|
32333
33071
|
}, "rejectWithDestroy");
|
|
32334
33072
|
const queryString = query ? buildQueryString2(query) : "";
|
|
32335
|
-
let
|
|
33073
|
+
let path13 = request.path;
|
|
32336
33074
|
if (queryString) {
|
|
32337
|
-
|
|
33075
|
+
path13 += `?${queryString}`;
|
|
32338
33076
|
}
|
|
32339
33077
|
if (request.fragment) {
|
|
32340
|
-
|
|
33078
|
+
path13 += `#${request.fragment}`;
|
|
32341
33079
|
}
|
|
32342
33080
|
const clientHttp2Stream = session.request({
|
|
32343
33081
|
...request.headers,
|
|
32344
|
-
[constants.HTTP2_HEADER_PATH]:
|
|
33082
|
+
[constants.HTTP2_HEADER_PATH]: path13,
|
|
32345
33083
|
[constants.HTTP2_HEADER_METHOD]: method
|
|
32346
33084
|
});
|
|
32347
33085
|
if (effectiveRequestTimeout) {
|
|
@@ -32423,7 +33161,7 @@ var require_dist_cjs6 = __commonJS({
|
|
|
32423
33161
|
var { setCredentialFeature: setCredentialFeature2 } = (init_client3(), __toCommonJS(client_exports2));
|
|
32424
33162
|
var { CredentialsProviderError: CredentialsProviderError2 } = (init_config2(), __toCommonJS(config_exports));
|
|
32425
33163
|
var { NodeHttpHandler } = require_dist_cjs5();
|
|
32426
|
-
var
|
|
33164
|
+
var fs13 = require("node:fs/promises");
|
|
32427
33165
|
var { HttpRequest: HttpRequest2 } = (init_protocols(), __toCommonJS(protocols_exports));
|
|
32428
33166
|
var { sdkStreamMixin: sdkStreamMixin3, parseRfc3339DateTime: parseRfc3339DateTime2 } = (init_serde(), __toCommonJS(serde_exports));
|
|
32429
33167
|
var ECS_CONTAINER_HOST = "169.254.170.2";
|
|
@@ -32551,7 +33289,7 @@ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
|
|
|
32551
33289
|
if (token) {
|
|
32552
33290
|
request.headers.Authorization = token;
|
|
32553
33291
|
} else if (tokenFile) {
|
|
32554
|
-
request.headers.Authorization = (await
|
|
33292
|
+
request.headers.Authorization = (await fs13.readFile(tokenFile)).toString();
|
|
32555
33293
|
}
|
|
32556
33294
|
try {
|
|
32557
33295
|
const result = await requestHandler.handle(request, { requestTimeout });
|
|
@@ -33940,11 +34678,11 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
33940
34678
|
}
|
|
33941
34679
|
}
|
|
33942
34680
|
const { service, operation: operation2 } = getSmithyContext(context);
|
|
33943
|
-
const
|
|
34681
|
+
const path13 = `/service/${service}/operation/${operation2}`;
|
|
33944
34682
|
if (request.path.endsWith("/")) {
|
|
33945
|
-
request.path +=
|
|
34683
|
+
request.path += path13.slice(1);
|
|
33946
34684
|
} else {
|
|
33947
|
-
request.path +=
|
|
34685
|
+
request.path += path13;
|
|
33948
34686
|
}
|
|
33949
34687
|
return request;
|
|
33950
34688
|
}
|
|
@@ -39316,7 +40054,7 @@ var require_dist_cjs10 = __commonJS({
|
|
|
39316
40054
|
var { createHash: createHash6, createPrivateKey, createPublicKey, sign: sign3 } = require("node:crypto");
|
|
39317
40055
|
var { promises: promises2 } = require("node:fs");
|
|
39318
40056
|
var { homedir: homedir3 } = require("node:os");
|
|
39319
|
-
var { dirname:
|
|
40057
|
+
var { dirname: dirname3, join: join16 } = require("node:path");
|
|
39320
40058
|
var LoginCredentialsFetcher = class _LoginCredentialsFetcher {
|
|
39321
40059
|
static {
|
|
39322
40060
|
__name(this, "LoginCredentialsFetcher");
|
|
@@ -39467,7 +40205,7 @@ var require_dist_cjs10 = __commonJS({
|
|
|
39467
40205
|
}
|
|
39468
40206
|
async saveToken(token) {
|
|
39469
40207
|
const tokenFilePath = this.getTokenFilePath();
|
|
39470
|
-
const directory =
|
|
40208
|
+
const directory = dirname3(tokenFilePath);
|
|
39471
40209
|
try {
|
|
39472
40210
|
await promises2.mkdir(directory, { recursive: true });
|
|
39473
40211
|
} catch (error2) {
|
|
@@ -39475,10 +40213,10 @@ var require_dist_cjs10 = __commonJS({
|
|
|
39475
40213
|
await promises2.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8");
|
|
39476
40214
|
}
|
|
39477
40215
|
getTokenFilePath() {
|
|
39478
|
-
const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ??
|
|
40216
|
+
const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join16(homedir3(), ".aws", "login", "cache");
|
|
39479
40217
|
const loginSessionBytes = Buffer.from(this.loginSession, "utf8");
|
|
39480
40218
|
const loginSessionSha256 = createHash6("sha256").update(loginSessionBytes).digest("hex");
|
|
39481
|
-
return
|
|
40219
|
+
return join16(directory, `${loginSessionSha256}.json`);
|
|
39482
40220
|
}
|
|
39483
40221
|
derToRawSignature(derSignature) {
|
|
39484
40222
|
let offset = 2;
|
|
@@ -41061,7 +41799,7 @@ var require_dist_cjs13 = __commonJS({
|
|
|
41061
41799
|
"../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js"(exports2) {
|
|
41062
41800
|
var { setCredentialFeature: setCredentialFeature2 } = (init_client3(), __toCommonJS(client_exports2));
|
|
41063
41801
|
var { CredentialsProviderError: CredentialsProviderError2, externalDataInterceptor: externalDataInterceptor2 } = (init_config2(), __toCommonJS(config_exports));
|
|
41064
|
-
var { readFileSync:
|
|
41802
|
+
var { readFileSync: readFileSync8 } = require("node:fs");
|
|
41065
41803
|
var fromWebToken = /* @__PURE__ */ __name((init) => async (awsIdentityProperties) => {
|
|
41066
41804
|
init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");
|
|
41067
41805
|
const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;
|
|
@@ -41102,7 +41840,7 @@ var require_dist_cjs13 = __commonJS({
|
|
|
41102
41840
|
}
|
|
41103
41841
|
const credentials = await fromWebToken({
|
|
41104
41842
|
...init,
|
|
41105
|
-
webIdentityToken: externalDataInterceptor2?.getTokenRecord?.()[webIdentityTokenFile] ??
|
|
41843
|
+
webIdentityToken: externalDataInterceptor2?.getTokenRecord?.()[webIdentityTokenFile] ?? readFileSync8(webIdentityTokenFile, { encoding: "ascii" }),
|
|
41106
41844
|
roleArn,
|
|
41107
41845
|
roleSessionName
|
|
41108
41846
|
})(awsIdentityProperties);
|
|
@@ -47981,11 +48719,11 @@ var init_throw_200_exceptions = __esm({
|
|
|
47981
48719
|
});
|
|
47982
48720
|
|
|
47983
48721
|
// ../../node_modules/@aws-sdk/core/dist-es/submodules/util/util-arn-parser/arn.js
|
|
47984
|
-
var validate,
|
|
48722
|
+
var validate, parse2;
|
|
47985
48723
|
var init_arn = __esm({
|
|
47986
48724
|
"../../node_modules/@aws-sdk/core/dist-es/submodules/util/util-arn-parser/arn.js"() {
|
|
47987
48725
|
validate = /* @__PURE__ */ __name((str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6, "validate");
|
|
47988
|
-
|
|
48726
|
+
parse2 = /* @__PURE__ */ __name((arn) => {
|
|
47989
48727
|
const segments = arn.split(":");
|
|
47990
48728
|
if (segments.length < 6 || segments[0] !== "arn")
|
|
47991
48729
|
throw new Error("Malformed ARN");
|
|
@@ -48380,7 +49118,7 @@ var init_bucketEndpointMiddleware = __esm({
|
|
|
48380
49118
|
if (options.bucketEndpoint) {
|
|
48381
49119
|
request.hostname = bucketName;
|
|
48382
49120
|
} else if (validate(bucketName)) {
|
|
48383
|
-
const bucketArn =
|
|
49121
|
+
const bucketArn = parse2(bucketName);
|
|
48384
49122
|
const clientRegion = await options.region();
|
|
48385
49123
|
const useDualstackEndpoint = await options.useDualstackEndpoint();
|
|
48386
49124
|
const useFipsEndpoint = await options.useFipsEndpoint();
|
|
@@ -64766,9 +65504,9 @@ var require_lib4 = __commonJS({
|
|
|
64766
65504
|
var require_build = __commonJS({
|
|
64767
65505
|
"../../node_modules/y18n/build/index.cjs"(exports2, module2) {
|
|
64768
65506
|
"use strict";
|
|
64769
|
-
var
|
|
65507
|
+
var fs13 = require("fs");
|
|
64770
65508
|
var util = require("util");
|
|
64771
|
-
var
|
|
65509
|
+
var path13 = require("path");
|
|
64772
65510
|
var shim;
|
|
64773
65511
|
var Y18N = class {
|
|
64774
65512
|
static {
|
|
@@ -64934,14 +65672,14 @@ var require_build = __commonJS({
|
|
|
64934
65672
|
__name(y18n$1, "y18n$1");
|
|
64935
65673
|
var nodePlatformShim = {
|
|
64936
65674
|
fs: {
|
|
64937
|
-
readFileSync:
|
|
64938
|
-
writeFile:
|
|
65675
|
+
readFileSync: fs13.readFileSync,
|
|
65676
|
+
writeFile: fs13.writeFile
|
|
64939
65677
|
},
|
|
64940
65678
|
format: util.format,
|
|
64941
|
-
resolve:
|
|
65679
|
+
resolve: path13.resolve,
|
|
64942
65680
|
exists: /* @__PURE__ */ __name((file) => {
|
|
64943
65681
|
try {
|
|
64944
|
-
return
|
|
65682
|
+
return fs13.statSync(file).isFile();
|
|
64945
65683
|
} catch (err) {
|
|
64946
65684
|
return false;
|
|
64947
65685
|
}
|
|
@@ -64959,8 +65697,8 @@ var require_build2 = __commonJS({
|
|
|
64959
65697
|
"../../node_modules/yargs-parser/build/index.cjs"(exports2, module2) {
|
|
64960
65698
|
"use strict";
|
|
64961
65699
|
var util = require("util");
|
|
64962
|
-
var
|
|
64963
|
-
var
|
|
65700
|
+
var path13 = require("path");
|
|
65701
|
+
var fs13 = require("fs");
|
|
64964
65702
|
function camelCase(str) {
|
|
64965
65703
|
const isCamelCase = str !== str.toLowerCase() && str !== str.toUpperCase();
|
|
64966
65704
|
if (!isCamelCase) {
|
|
@@ -65942,13 +66680,13 @@ var require_build2 = __commonJS({
|
|
|
65942
66680
|
return env2;
|
|
65943
66681
|
}, "env"),
|
|
65944
66682
|
format: util.format,
|
|
65945
|
-
normalize:
|
|
65946
|
-
resolve:
|
|
65947
|
-
require: /* @__PURE__ */ __name((
|
|
66683
|
+
normalize: path13.normalize,
|
|
66684
|
+
resolve: path13.resolve,
|
|
66685
|
+
require: /* @__PURE__ */ __name((path14) => {
|
|
65948
66686
|
if (typeof require !== "undefined") {
|
|
65949
|
-
return require(
|
|
65950
|
-
} else if (
|
|
65951
|
-
return JSON.parse(
|
|
66687
|
+
return require(path14);
|
|
66688
|
+
} else if (path14.match(/\.json$/)) {
|
|
66689
|
+
return JSON.parse(fs13.readFileSync(path14, "utf8"));
|
|
65952
66690
|
} else {
|
|
65953
66691
|
throw Error("only .json config files are supported in ESM");
|
|
65954
66692
|
}
|
|
@@ -66945,15 +67683,15 @@ var require_route = __commonJS({
|
|
|
66945
67683
|
}
|
|
66946
67684
|
__name(link, "link");
|
|
66947
67685
|
function wrapConversion(toModel, graph) {
|
|
66948
|
-
const
|
|
67686
|
+
const path13 = [graph[toModel].parent, toModel];
|
|
66949
67687
|
let fn = conversions[graph[toModel].parent][toModel];
|
|
66950
67688
|
let cur = graph[toModel].parent;
|
|
66951
67689
|
while (graph[cur].parent) {
|
|
66952
|
-
|
|
67690
|
+
path13.unshift(graph[cur].parent);
|
|
66953
67691
|
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
66954
67692
|
cur = graph[cur].parent;
|
|
66955
67693
|
}
|
|
66956
|
-
fn.conversion =
|
|
67694
|
+
fn.conversion = path13;
|
|
66957
67695
|
return fn;
|
|
66958
67696
|
}
|
|
66959
67697
|
__name(wrapConversion, "wrapConversion");
|
|
@@ -67624,18 +68362,18 @@ var require_build3 = __commonJS({
|
|
|
67624
68362
|
// ../../node_modules/escalade/sync/index.js
|
|
67625
68363
|
var require_sync7 = __commonJS({
|
|
67626
68364
|
"../../node_modules/escalade/sync/index.js"(exports2, module2) {
|
|
67627
|
-
var { dirname:
|
|
68365
|
+
var { dirname: dirname3, resolve: resolve5 } = require("path");
|
|
67628
68366
|
var { readdirSync: readdirSync2, statSync: statSync3 } = require("fs");
|
|
67629
68367
|
module2.exports = function(start, callback) {
|
|
67630
68368
|
let dir = resolve5(".", start);
|
|
67631
68369
|
let tmp, stats = statSync3(dir);
|
|
67632
68370
|
if (!stats.isDirectory()) {
|
|
67633
|
-
dir =
|
|
68371
|
+
dir = dirname3(dir);
|
|
67634
68372
|
}
|
|
67635
68373
|
while (true) {
|
|
67636
68374
|
tmp = callback(dir, readdirSync2(dir));
|
|
67637
68375
|
if (tmp) return resolve5(dir, tmp);
|
|
67638
|
-
dir =
|
|
68376
|
+
dir = dirname3(tmp = dir);
|
|
67639
68377
|
if (tmp === dir) break;
|
|
67640
68378
|
}
|
|
67641
68379
|
};
|
|
@@ -67670,10 +68408,10 @@ var require_get_caller_file = __commonJS({
|
|
|
67670
68408
|
var require_require_directory = __commonJS({
|
|
67671
68409
|
"../../node_modules/require-directory/index.js"(exports2, module2) {
|
|
67672
68410
|
"use strict";
|
|
67673
|
-
var
|
|
67674
|
-
var
|
|
68411
|
+
var fs13 = require("fs");
|
|
68412
|
+
var join16 = require("path").join;
|
|
67675
68413
|
var resolve5 = require("path").resolve;
|
|
67676
|
-
var
|
|
68414
|
+
var dirname3 = require("path").dirname;
|
|
67677
68415
|
var defaultOptions = {
|
|
67678
68416
|
extensions: ["js", "json", "coffee"],
|
|
67679
68417
|
recurse: true,
|
|
@@ -67684,22 +68422,22 @@ var require_require_directory = __commonJS({
|
|
|
67684
68422
|
return obj;
|
|
67685
68423
|
}, "visit")
|
|
67686
68424
|
};
|
|
67687
|
-
function checkFileInclusion(
|
|
68425
|
+
function checkFileInclusion(path13, filename, options) {
|
|
67688
68426
|
return (
|
|
67689
68427
|
// verify file has valid extension
|
|
67690
68428
|
new RegExp("\\.(" + options.extensions.join("|") + ")$", "i").test(filename) && // if options.include is a RegExp, evaluate it and make sure the path passes
|
|
67691
|
-
!(options.include && options.include instanceof RegExp && !options.include.test(
|
|
67692
|
-
!(options.include && typeof options.include === "function" && !options.include(
|
|
67693
|
-
!(options.exclude && options.exclude instanceof RegExp && options.exclude.test(
|
|
67694
|
-
!(options.exclude && typeof options.exclude === "function" && options.exclude(
|
|
68429
|
+
!(options.include && options.include instanceof RegExp && !options.include.test(path13)) && // if options.include is a function, evaluate it and make sure the path passes
|
|
68430
|
+
!(options.include && typeof options.include === "function" && !options.include(path13, filename)) && // if options.exclude is a RegExp, evaluate it and make sure the path doesn't pass
|
|
68431
|
+
!(options.exclude && options.exclude instanceof RegExp && options.exclude.test(path13)) && // if options.exclude is a function, evaluate it and make sure the path doesn't pass
|
|
68432
|
+
!(options.exclude && typeof options.exclude === "function" && options.exclude(path13, filename))
|
|
67695
68433
|
);
|
|
67696
68434
|
}
|
|
67697
68435
|
__name(checkFileInclusion, "checkFileInclusion");
|
|
67698
|
-
function requireDirectory(m4,
|
|
68436
|
+
function requireDirectory(m4, path13, options) {
|
|
67699
68437
|
var retval = {};
|
|
67700
|
-
if (
|
|
67701
|
-
options =
|
|
67702
|
-
|
|
68438
|
+
if (path13 && !options && typeof path13 !== "string") {
|
|
68439
|
+
options = path13;
|
|
68440
|
+
path13 = null;
|
|
67703
68441
|
}
|
|
67704
68442
|
options = options || {};
|
|
67705
68443
|
for (var prop in defaultOptions) {
|
|
@@ -67707,10 +68445,10 @@ var require_require_directory = __commonJS({
|
|
|
67707
68445
|
options[prop] = defaultOptions[prop];
|
|
67708
68446
|
}
|
|
67709
68447
|
}
|
|
67710
|
-
|
|
67711
|
-
|
|
67712
|
-
var joined =
|
|
67713
|
-
if (
|
|
68448
|
+
path13 = !path13 ? dirname3(m4.filename) : resolve5(dirname3(m4.filename), path13);
|
|
68449
|
+
fs13.readdirSync(path13).forEach(function(filename) {
|
|
68450
|
+
var joined = join16(path13, filename), files, key, obj;
|
|
68451
|
+
if (fs13.statSync(joined).isDirectory() && options.recurse) {
|
|
67714
68452
|
files = requireDirectory(m4, joined, options);
|
|
67715
68453
|
if (Object.keys(files).length) {
|
|
67716
68454
|
retval[options.rename(filename, joined, filename)] = files;
|
|
@@ -69479,15 +70217,15 @@ function log(level, message, stream) {
|
|
|
69479
70217
|
}
|
|
69480
70218
|
}
|
|
69481
70219
|
}
|
|
69482
|
-
var
|
|
70220
|
+
var fs12, path12, logThreshold, VERSION, LOG_LEVELS;
|
|
69483
70221
|
var init_logging = __esm({
|
|
69484
70222
|
"bin/logging.ts"() {
|
|
69485
70223
|
"use strict";
|
|
69486
|
-
|
|
69487
|
-
|
|
70224
|
+
fs12 = __toESM(require("fs"));
|
|
70225
|
+
path12 = __toESM(require("path"));
|
|
69488
70226
|
logThreshold = "info";
|
|
69489
70227
|
VERSION = JSON.parse(
|
|
69490
|
-
|
|
70228
|
+
fs12.readFileSync(path12.join(__dirname, "..", "package.json"), { encoding: "utf-8" })
|
|
69491
70229
|
).version;
|
|
69492
70230
|
LOG_LEVELS = {
|
|
69493
70231
|
verbose: 1,
|