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
|
@@ -693,22 +693,24 @@ var init_schema = __esm({
|
|
|
693
693
|
});
|
|
694
694
|
|
|
695
695
|
// ../@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/metadata-schema.ts
|
|
696
|
-
var ArtifactMetadataEntryType;
|
|
696
|
+
var ArtifactMetadataEntryType, CFN_RESOURCE_TYPE_ATTRIBUTE, CFN_RESOURCE_PROPS_ATTRIBUTE;
|
|
697
697
|
var init_metadata_schema = __esm({
|
|
698
698
|
"../@aws-cdk/cloud-assembly-schema/lib/cloud-assembly/metadata-schema.ts"() {
|
|
699
699
|
"use strict";
|
|
700
|
-
ArtifactMetadataEntryType = /* @__PURE__ */ ((
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
return
|
|
700
|
+
ArtifactMetadataEntryType = /* @__PURE__ */ ((ArtifactMetadataEntryType5) => {
|
|
701
|
+
ArtifactMetadataEntryType5["ASSET"] = "aws:cdk:asset";
|
|
702
|
+
ArtifactMetadataEntryType5["INFO"] = "aws:cdk:info";
|
|
703
|
+
ArtifactMetadataEntryType5["WARN"] = "aws:cdk:warning";
|
|
704
|
+
ArtifactMetadataEntryType5["ERROR"] = "aws:cdk:error";
|
|
705
|
+
ArtifactMetadataEntryType5["LOGICAL_ID"] = "aws:cdk:logicalId";
|
|
706
|
+
ArtifactMetadataEntryType5["STACK_TAGS"] = "aws:cdk:stack-tags";
|
|
707
|
+
ArtifactMetadataEntryType5["DO_NOT_REFACTOR"] = "aws:cdk:do-not-refactor";
|
|
708
|
+
ArtifactMetadataEntryType5["CREATION_STACK"] = "aws:cdk:creationStack";
|
|
709
|
+
ArtifactMetadataEntryType5["PROPERTY_ASSIGNMENT"] = "aws:cdk:propertyAssignment";
|
|
710
|
+
return ArtifactMetadataEntryType5;
|
|
711
711
|
})(ArtifactMetadataEntryType || {});
|
|
712
|
+
CFN_RESOURCE_TYPE_ATTRIBUTE = "aws:cdk:cloudformation:type";
|
|
713
|
+
CFN_RESOURCE_PROPS_ATTRIBUTE = "aws:cdk:cloudformation:props";
|
|
712
714
|
}
|
|
713
715
|
});
|
|
714
716
|
|
|
@@ -775,6 +777,8 @@ var cloud_assembly_exports = {};
|
|
|
775
777
|
__export(cloud_assembly_exports, {
|
|
776
778
|
ArtifactMetadataEntryType: () => ArtifactMetadataEntryType,
|
|
777
779
|
ArtifactType: () => ArtifactType,
|
|
780
|
+
CFN_RESOURCE_PROPS_ATTRIBUTE: () => CFN_RESOURCE_PROPS_ATTRIBUTE,
|
|
781
|
+
CFN_RESOURCE_TYPE_ATTRIBUTE: () => CFN_RESOURCE_TYPE_ATTRIBUTE,
|
|
778
782
|
ContextProvider: () => ContextProvider,
|
|
779
783
|
LoadBalancerListenerProtocol: () => LoadBalancerListenerProtocol,
|
|
780
784
|
LoadBalancerType: () => LoadBalancerType
|
|
@@ -844,14 +848,14 @@ var init_assets = __esm({
|
|
|
844
848
|
var require_helpers = __commonJS({
|
|
845
849
|
"../@aws-cdk/cloud-assembly-schema/node_modules/jsonschema/lib/helpers.js"(exports2, module2) {
|
|
846
850
|
"use strict";
|
|
847
|
-
var ValidationError = exports2.ValidationError = /* @__PURE__ */ __name(function ValidationError2(message, instance, schema,
|
|
848
|
-
if (Array.isArray(
|
|
849
|
-
this.path =
|
|
850
|
-
this.property =
|
|
851
|
+
var ValidationError = exports2.ValidationError = /* @__PURE__ */ __name(function ValidationError2(message, instance, schema, path12, name, argument) {
|
|
852
|
+
if (Array.isArray(path12)) {
|
|
853
|
+
this.path = path12;
|
|
854
|
+
this.property = path12.reduce(function(sum, item) {
|
|
851
855
|
return sum + makeSuffix(item);
|
|
852
856
|
}, "instance");
|
|
853
|
-
} else if (
|
|
854
|
-
this.property =
|
|
857
|
+
} else if (path12 !== void 0) {
|
|
858
|
+
this.property = path12;
|
|
855
859
|
}
|
|
856
860
|
if (message) {
|
|
857
861
|
this.message = message;
|
|
@@ -946,16 +950,16 @@ var require_helpers = __commonJS({
|
|
|
946
950
|
name: { value: "SchemaError", enumerable: false }
|
|
947
951
|
}
|
|
948
952
|
);
|
|
949
|
-
var SchemaContext = exports2.SchemaContext = /* @__PURE__ */ __name(function SchemaContext2(schema, options,
|
|
953
|
+
var SchemaContext = exports2.SchemaContext = /* @__PURE__ */ __name(function SchemaContext2(schema, options, path12, base, schemas) {
|
|
950
954
|
this.schema = schema;
|
|
951
955
|
this.options = options;
|
|
952
|
-
if (Array.isArray(
|
|
953
|
-
this.path =
|
|
954
|
-
this.propertyPath =
|
|
956
|
+
if (Array.isArray(path12)) {
|
|
957
|
+
this.path = path12;
|
|
958
|
+
this.propertyPath = path12.reduce(function(sum, item) {
|
|
955
959
|
return sum + makeSuffix(item);
|
|
956
960
|
}, "instance");
|
|
957
961
|
} else {
|
|
958
|
-
this.propertyPath =
|
|
962
|
+
this.propertyPath = path12;
|
|
959
963
|
}
|
|
960
964
|
this.base = base;
|
|
961
965
|
this.schemas = schemas;
|
|
@@ -964,10 +968,10 @@ var require_helpers = __commonJS({
|
|
|
964
968
|
return (() => resolveUrl(this.base, target))();
|
|
965
969
|
}, "resolve");
|
|
966
970
|
SchemaContext.prototype.makeChild = /* @__PURE__ */ __name(function makeChild(schema, propertyName) {
|
|
967
|
-
var
|
|
971
|
+
var path12 = propertyName === void 0 ? this.path : this.path.concat([propertyName]);
|
|
968
972
|
var id = schema.$id || schema.id;
|
|
969
973
|
let base = (() => resolveUrl(this.base, id || ""))();
|
|
970
|
-
var ctx = new SchemaContext(schema, this.options,
|
|
974
|
+
var ctx = new SchemaContext(schema, this.options, path12, base, Object.create(this.schemas));
|
|
971
975
|
if (id && !ctx.schemas[base]) {
|
|
972
976
|
ctx.schemas[base] = schema;
|
|
973
977
|
}
|
|
@@ -2635,7 +2639,7 @@ var require_parse = __commonJS({
|
|
|
2635
2639
|
"../@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/parse.js"(exports2, module2) {
|
|
2636
2640
|
"use strict";
|
|
2637
2641
|
var SemVer = require_semver();
|
|
2638
|
-
var
|
|
2642
|
+
var parse3 = /* @__PURE__ */ __name((version, options, throwErrors = false) => {
|
|
2639
2643
|
if (version instanceof SemVer) {
|
|
2640
2644
|
return version;
|
|
2641
2645
|
}
|
|
@@ -2648,7 +2652,7 @@ var require_parse = __commonJS({
|
|
|
2648
2652
|
throw er;
|
|
2649
2653
|
}
|
|
2650
2654
|
}, "parse");
|
|
2651
|
-
module2.exports =
|
|
2655
|
+
module2.exports = parse3;
|
|
2652
2656
|
}
|
|
2653
2657
|
});
|
|
2654
2658
|
|
|
@@ -2656,9 +2660,9 @@ var require_parse = __commonJS({
|
|
|
2656
2660
|
var require_valid = __commonJS({
|
|
2657
2661
|
"../@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/valid.js"(exports2, module2) {
|
|
2658
2662
|
"use strict";
|
|
2659
|
-
var
|
|
2663
|
+
var parse3 = require_parse();
|
|
2660
2664
|
var valid2 = /* @__PURE__ */ __name((version, options) => {
|
|
2661
|
-
const v =
|
|
2665
|
+
const v = parse3(version, options);
|
|
2662
2666
|
return v ? v.version : null;
|
|
2663
2667
|
}, "valid");
|
|
2664
2668
|
module2.exports = valid2;
|
|
@@ -2669,9 +2673,9 @@ var require_valid = __commonJS({
|
|
|
2669
2673
|
var require_clean = __commonJS({
|
|
2670
2674
|
"../@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/clean.js"(exports2, module2) {
|
|
2671
2675
|
"use strict";
|
|
2672
|
-
var
|
|
2676
|
+
var parse3 = require_parse();
|
|
2673
2677
|
var clean = /* @__PURE__ */ __name((version, options) => {
|
|
2674
|
-
const s =
|
|
2678
|
+
const s = parse3(version.trim().replace(/^[=v]+/, ""), options);
|
|
2675
2679
|
return s ? s.version : null;
|
|
2676
2680
|
}, "clean");
|
|
2677
2681
|
module2.exports = clean;
|
|
@@ -2706,10 +2710,10 @@ var require_inc = __commonJS({
|
|
|
2706
2710
|
var require_diff = __commonJS({
|
|
2707
2711
|
"../@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/diff.js"(exports2, module2) {
|
|
2708
2712
|
"use strict";
|
|
2709
|
-
var
|
|
2713
|
+
var parse3 = require_parse();
|
|
2710
2714
|
var diff = /* @__PURE__ */ __name((version1, version2) => {
|
|
2711
|
-
const v1 =
|
|
2712
|
-
const v2 =
|
|
2715
|
+
const v1 = parse3(version1, null, true);
|
|
2716
|
+
const v2 = parse3(version2, null, true);
|
|
2713
2717
|
const comparison = v1.compare(v2);
|
|
2714
2718
|
if (comparison === 0) {
|
|
2715
2719
|
return null;
|
|
@@ -2780,9 +2784,9 @@ var require_patch = __commonJS({
|
|
|
2780
2784
|
var require_prerelease = __commonJS({
|
|
2781
2785
|
"../@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/prerelease.js"(exports2, module2) {
|
|
2782
2786
|
"use strict";
|
|
2783
|
-
var
|
|
2787
|
+
var parse3 = require_parse();
|
|
2784
2788
|
var prerelease = /* @__PURE__ */ __name((version, options) => {
|
|
2785
|
-
const parsed =
|
|
2789
|
+
const parsed = parse3(version, options);
|
|
2786
2790
|
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
|
2787
2791
|
}, "prerelease");
|
|
2788
2792
|
module2.exports = prerelease;
|
|
@@ -2968,7 +2972,7 @@ var require_coerce = __commonJS({
|
|
|
2968
2972
|
"../@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/coerce.js"(exports2, module2) {
|
|
2969
2973
|
"use strict";
|
|
2970
2974
|
var SemVer = require_semver();
|
|
2971
|
-
var
|
|
2975
|
+
var parse3 = require_parse();
|
|
2972
2976
|
var { safeRe: re, t } = require_re();
|
|
2973
2977
|
var coerce = /* @__PURE__ */ __name((version, options) => {
|
|
2974
2978
|
if (version instanceof SemVer) {
|
|
@@ -3003,7 +3007,7 @@ var require_coerce = __commonJS({
|
|
|
3003
3007
|
const patch = match[4] || "0";
|
|
3004
3008
|
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
3005
3009
|
const build2 = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
3006
|
-
return
|
|
3010
|
+
return parse3(`${major2}.${minor}.${patch}${prerelease}${build2}`, options);
|
|
3007
3011
|
}, "coerce");
|
|
3008
3012
|
module2.exports = coerce;
|
|
3009
3013
|
}
|
|
@@ -3013,7 +3017,7 @@ var require_coerce = __commonJS({
|
|
|
3013
3017
|
var require_truncate = __commonJS({
|
|
3014
3018
|
"../@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/truncate.js"(exports2, module2) {
|
|
3015
3019
|
"use strict";
|
|
3016
|
-
var
|
|
3020
|
+
var parse3 = require_parse();
|
|
3017
3021
|
var constants = require_constants();
|
|
3018
3022
|
var SemVer = require_semver();
|
|
3019
3023
|
var truncate = /* @__PURE__ */ __name((version, truncation, options) => {
|
|
@@ -3025,7 +3029,7 @@ var require_truncate = __commonJS({
|
|
|
3025
3029
|
}, "truncate");
|
|
3026
3030
|
var cloneInputVersion = /* @__PURE__ */ __name((version, options) => {
|
|
3027
3031
|
const versionStringToParse = version instanceof SemVer ? version.version : version;
|
|
3028
|
-
return
|
|
3032
|
+
return parse3(versionStringToParse, options);
|
|
3029
3033
|
}, "cloneInputVersion");
|
|
3030
3034
|
var doTruncation = /* @__PURE__ */ __name((version, truncation) => {
|
|
3031
3035
|
if (isPrerelease(truncation)) {
|
|
@@ -4078,7 +4082,7 @@ var require_semver2 = __commonJS({
|
|
|
4078
4082
|
var constants = require_constants();
|
|
4079
4083
|
var SemVer = require_semver();
|
|
4080
4084
|
var identifiers = require_identifiers();
|
|
4081
|
-
var
|
|
4085
|
+
var parse3 = require_parse();
|
|
4082
4086
|
var valid2 = require_valid();
|
|
4083
4087
|
var clean = require_clean();
|
|
4084
4088
|
var inc = require_inc();
|
|
@@ -4117,7 +4121,7 @@ var require_semver2 = __commonJS({
|
|
|
4117
4121
|
var simplifyRange = require_simplify();
|
|
4118
4122
|
var subset = require_subset();
|
|
4119
4123
|
module2.exports = {
|
|
4120
|
-
parse:
|
|
4124
|
+
parse: parse3,
|
|
4121
4125
|
valid: valid2,
|
|
4122
4126
|
clean,
|
|
4123
4127
|
inc,
|
|
@@ -4170,7 +4174,7 @@ var require_semver2 = __commonJS({
|
|
|
4170
4174
|
// ../@aws-cdk/cloud-assembly-schema/cli-version.json
|
|
4171
4175
|
var require_cli_version = __commonJS({
|
|
4172
4176
|
"../@aws-cdk/cloud-assembly-schema/cli-version.json"(exports2, module2) {
|
|
4173
|
-
module2.exports = { version: "2.
|
|
4177
|
+
module2.exports = { version: "2.1132.0" };
|
|
4174
4178
|
}
|
|
4175
4179
|
});
|
|
4176
4180
|
|
|
@@ -6456,12 +6460,13 @@ var require_version = __commonJS({
|
|
|
6456
6460
|
var manifest_exports = {};
|
|
6457
6461
|
__export(manifest_exports, {
|
|
6458
6462
|
Manifest: () => Manifest,
|
|
6463
|
+
VALIDATION_REPORT_FILE: () => VALIDATION_REPORT_FILE,
|
|
6459
6464
|
VERSION_MISMATCH: () => VERSION_MISMATCH
|
|
6460
6465
|
});
|
|
6461
6466
|
function stripEnumErrors(errors) {
|
|
6462
6467
|
return errors.filter((e6) => typeof e6.schema === "string" || !("enum" in e6.schema));
|
|
6463
6468
|
}
|
|
6464
|
-
var fs3, jsonschema, semver, VERSION_MISMATCH, CLI_VERSION, ASSETS_SCHEMA, ASSEMBLY_SCHEMA, INTEG_SCHEMA, VALIDATION_REPORT_SCHEMA, SCHEMA_VERSION, Manifest;
|
|
6469
|
+
var fs3, jsonschema, semver, VERSION_MISMATCH, VALIDATION_REPORT_FILE, CLI_VERSION, ASSETS_SCHEMA, ASSEMBLY_SCHEMA, INTEG_SCHEMA, VALIDATION_REPORT_SCHEMA, SCHEMA_VERSION, Manifest;
|
|
6465
6470
|
var init_manifest = __esm({
|
|
6466
6471
|
"../@aws-cdk/cloud-assembly-schema/lib/manifest.ts"() {
|
|
6467
6472
|
"use strict";
|
|
@@ -6470,6 +6475,7 @@ var init_manifest = __esm({
|
|
|
6470
6475
|
semver = __toESM(require_semver2());
|
|
6471
6476
|
init_cloud_assembly();
|
|
6472
6477
|
VERSION_MISMATCH = "Cloud assembly schema version mismatch";
|
|
6478
|
+
VALIDATION_REPORT_FILE = "validation-report.json";
|
|
6473
6479
|
CLI_VERSION = require_cli_version();
|
|
6474
6480
|
ASSETS_SCHEMA = require_assets_schema();
|
|
6475
6481
|
ASSEMBLY_SCHEMA = require_cloud_assembly_schema();
|
|
@@ -7512,7 +7518,8 @@ var init_toposort = __esm({
|
|
|
7512
7518
|
var cloud_assembly_exports2 = {};
|
|
7513
7519
|
__export(cloud_assembly_exports2, {
|
|
7514
7520
|
CloudAssembly: () => CloudAssembly,
|
|
7515
|
-
CloudAssemblyBuilder: () => CloudAssemblyBuilder
|
|
7521
|
+
CloudAssemblyBuilder: () => CloudAssemblyBuilder,
|
|
7522
|
+
MANIFEST_FILE: () => MANIFEST_FILE
|
|
7516
7523
|
});
|
|
7517
7524
|
function filterUndefined(obj) {
|
|
7518
7525
|
if (Array.isArray(obj)) {
|
|
@@ -8071,6 +8078,735 @@ var init_bootstrap = __esm({
|
|
|
8071
8078
|
}
|
|
8072
8079
|
});
|
|
8073
8080
|
|
|
8081
|
+
// ../@aws-cdk/cloud-assembly-api/lib/construct-tree.ts
|
|
8082
|
+
var construct_tree_exports = {};
|
|
8083
|
+
__export(construct_tree_exports, {
|
|
8084
|
+
ConstructIndex: () => ConstructIndex,
|
|
8085
|
+
buildConstructTree: () => buildConstructTree,
|
|
8086
|
+
buildConstructTreeAsync: () => buildConstructTreeAsync
|
|
8087
|
+
});
|
|
8088
|
+
function visit(nodes6, fn) {
|
|
8089
|
+
for (const node of nodes6) {
|
|
8090
|
+
fn(node);
|
|
8091
|
+
if (node.children.length > 0) visit(node.children, fn);
|
|
8092
|
+
}
|
|
8093
|
+
}
|
|
8094
|
+
function buildConstructTree(assembly, decorate) {
|
|
8095
|
+
const roots = readRoots(assembly);
|
|
8096
|
+
if (!roots) return [];
|
|
8097
|
+
const { rawRoots, ctx } = roots;
|
|
8098
|
+
return rawRoots.map((child) => buildNodeSync(child, ctx, void 0, NO_TEMPLATE, decorate));
|
|
8099
|
+
}
|
|
8100
|
+
async function buildConstructTreeAsync(assembly, decorate) {
|
|
8101
|
+
const roots = readRoots(assembly);
|
|
8102
|
+
if (!roots) return [];
|
|
8103
|
+
const { rawRoots, ctx } = roots;
|
|
8104
|
+
const out = [];
|
|
8105
|
+
for (const child of rawRoots) {
|
|
8106
|
+
out.push(await buildNodeAsync(child, ctx, void 0, NO_TEMPLATE, decorate));
|
|
8107
|
+
}
|
|
8108
|
+
return out;
|
|
8109
|
+
}
|
|
8110
|
+
function readRoots(assembly) {
|
|
8111
|
+
const treeArtifact = assembly.tree();
|
|
8112
|
+
if (!treeArtifact) return void 0;
|
|
8113
|
+
const rawTree = loadTree(path8.join(assembly.directory, treeArtifact.file));
|
|
8114
|
+
if (!rawTree) return void 0;
|
|
8115
|
+
const ctx = {
|
|
8116
|
+
stackIndex: buildStackIndex(assembly.stacksRecursively),
|
|
8117
|
+
templateCache: /* @__PURE__ */ new Map()
|
|
8118
|
+
};
|
|
8119
|
+
const rawRoots = Object.values(rawTree.children ?? {}).filter((child) => !isCdkInternal(child.id));
|
|
8120
|
+
return { rawRoots, ctx };
|
|
8121
|
+
}
|
|
8122
|
+
function loadTree(treePath) {
|
|
8123
|
+
if (!fs8.existsSync(treePath)) return void 0;
|
|
8124
|
+
const content = JSON.parse(fs8.readFileSync(treePath, "utf-8"));
|
|
8125
|
+
return content.tree;
|
|
8126
|
+
}
|
|
8127
|
+
function buildStackIndex(stacks) {
|
|
8128
|
+
const index = /* @__PURE__ */ new Map();
|
|
8129
|
+
for (const stack of stacks) {
|
|
8130
|
+
index.set(stack.hierarchicalId, { stack, metadata: new Map(Object.entries(stack.metadata)) });
|
|
8131
|
+
}
|
|
8132
|
+
return index;
|
|
8133
|
+
}
|
|
8134
|
+
function prepareNode(raw, ctx, inheritedStack, inherited) {
|
|
8135
|
+
const stackHere = ctx.stackIndex.get(raw.path);
|
|
8136
|
+
const owner = stackHere ?? inheritedStack;
|
|
8137
|
+
const scope = stackHere ? { file: stackHere.stack.templateFullPath, template: stackHere.stack.template } : inherited;
|
|
8138
|
+
const entries = owner?.metadata.get("/" + raw.path) ?? [];
|
|
8139
|
+
const logicalId = logicalIdFromEntries(entries);
|
|
8140
|
+
const cfnTypeRaw = raw.attributes?.[import_cloud_assembly_schema.CFN_RESOURCE_TYPE_ATTRIBUTE];
|
|
8141
|
+
const cfnType = typeof cfnTypeRaw === "string" ? cfnTypeRaw : void 0;
|
|
8142
|
+
const cfnPropsRaw = raw.attributes?.[import_cloud_assembly_schema.CFN_RESOURCE_PROPS_ATTRIBUTE];
|
|
8143
|
+
const cfnProperties = typeof cfnPropsRaw === "object" && cfnPropsRaw !== null ? cfnPropsRaw : void 0;
|
|
8144
|
+
const childInputs = Object.values(raw.children ?? {}).filter((child) => !isCdkInternal(child.id)).map((child) => ({ raw: child, scope: nestedBoundary(child, raw, owner, scope.template, ctx) ?? scope }));
|
|
8145
|
+
const nodeTemplateFile = logicalId !== void 0 ? scope.file : void 0;
|
|
8146
|
+
return {
|
|
8147
|
+
base: { path: raw.path, id: raw.id, type: cfnType, logicalId, templateFile: nodeTemplateFile, cfnProperties },
|
|
8148
|
+
owner,
|
|
8149
|
+
constructPath: raw.path,
|
|
8150
|
+
childInputs
|
|
8151
|
+
};
|
|
8152
|
+
}
|
|
8153
|
+
function buildNodeSync(raw, ctx, inheritedStack, inherited, decorate) {
|
|
8154
|
+
const prepared = prepareNode(raw, ctx, inheritedStack, inherited);
|
|
8155
|
+
const children = prepared.childInputs.map(
|
|
8156
|
+
(ci) => buildNodeSync(ci.raw, ctx, prepared.owner, ci.scope, decorate)
|
|
8157
|
+
);
|
|
8158
|
+
return decorate({ ...prepared.base, children }, prepared.owner?.stack, prepared.constructPath);
|
|
8159
|
+
}
|
|
8160
|
+
async function buildNodeAsync(raw, ctx, inheritedStack, inherited, decorate) {
|
|
8161
|
+
const prepared = prepareNode(raw, ctx, inheritedStack, inherited);
|
|
8162
|
+
const children = [];
|
|
8163
|
+
for (const ci of prepared.childInputs) {
|
|
8164
|
+
children.push(await buildNodeAsync(ci.raw, ctx, prepared.owner, ci.scope, decorate));
|
|
8165
|
+
}
|
|
8166
|
+
return decorate({ ...prepared.base, children }, prepared.owner?.stack, prepared.constructPath);
|
|
8167
|
+
}
|
|
8168
|
+
function logicalIdFromEntries(entries) {
|
|
8169
|
+
const entry = entries.find((e6) => e6.type === import_cloud_assembly_schema.ArtifactMetadataEntryType.LOGICAL_ID);
|
|
8170
|
+
return typeof entry?.data === "string" ? entry.data : void 0;
|
|
8171
|
+
}
|
|
8172
|
+
function loadTemplate(absPath, cache6) {
|
|
8173
|
+
if (cache6.has(absPath)) return cache6.get(absPath);
|
|
8174
|
+
let template;
|
|
8175
|
+
try {
|
|
8176
|
+
template = JSON.parse(fs8.readFileSync(absPath, "utf-8"));
|
|
8177
|
+
} catch {
|
|
8178
|
+
template = void 0;
|
|
8179
|
+
}
|
|
8180
|
+
cache6.set(absPath, template);
|
|
8181
|
+
return template;
|
|
8182
|
+
}
|
|
8183
|
+
function nestedBoundary(child, parent, owner, currentTemplate, ctx) {
|
|
8184
|
+
const resourceNode = parent.children?.[`${child.id}.NestedStack`]?.children?.[`${child.id}.NestedStackResource`];
|
|
8185
|
+
if (!resourceNode || !owner) return void 0;
|
|
8186
|
+
const logicalId = logicalIdFromEntries(owner.metadata.get("/" + resourceNode.path) ?? []);
|
|
8187
|
+
const assetPath = logicalId !== void 0 ? currentTemplate?.Resources?.[logicalId]?.Metadata?.[ASSET_RESOURCE_METADATA_PATH_KEY] : void 0;
|
|
8188
|
+
if (typeof assetPath !== "string") return NO_TEMPLATE;
|
|
8189
|
+
const file = path8.join(path8.dirname(owner.stack.templateFullPath), assetPath);
|
|
8190
|
+
const template = loadTemplate(file, ctx.templateCache);
|
|
8191
|
+
return template ? { file, template } : NO_TEMPLATE;
|
|
8192
|
+
}
|
|
8193
|
+
function isCdkInternal(id) {
|
|
8194
|
+
return CDK_INTERNAL_IDS.has(id);
|
|
8195
|
+
}
|
|
8196
|
+
var fs8, path8, import_cloud_assembly_schema, CDK_INTERNAL_IDS, ConstructIndex, NO_TEMPLATE;
|
|
8197
|
+
var init_construct_tree = __esm({
|
|
8198
|
+
"../@aws-cdk/cloud-assembly-api/lib/construct-tree.ts"() {
|
|
8199
|
+
"use strict";
|
|
8200
|
+
fs8 = __toESM(require("fs"));
|
|
8201
|
+
path8 = __toESM(require("path"));
|
|
8202
|
+
import_cloud_assembly_schema = __toESM(require_lib2());
|
|
8203
|
+
init_assets2();
|
|
8204
|
+
CDK_INTERNAL_IDS = /* @__PURE__ */ new Set(["Tree", "CDKMetadata", "BootstrapVersion", "CheckBootstrapVersion"]);
|
|
8205
|
+
ConstructIndex = class _ConstructIndex {
|
|
8206
|
+
constructor(byPathMap) {
|
|
8207
|
+
this.byPathMap = byPathMap;
|
|
8208
|
+
}
|
|
8209
|
+
byPathMap;
|
|
8210
|
+
static {
|
|
8211
|
+
__name(this, "ConstructIndex");
|
|
8212
|
+
}
|
|
8213
|
+
/** Build an index from the roots of a construct tree. */
|
|
8214
|
+
static fromTree(tree) {
|
|
8215
|
+
const byPath = /* @__PURE__ */ new Map();
|
|
8216
|
+
visit(tree, (node) => byPath.set(node.path, node));
|
|
8217
|
+
return new _ConstructIndex(byPath);
|
|
8218
|
+
}
|
|
8219
|
+
/** The node at a given construct path, or undefined if absent. */
|
|
8220
|
+
byPath(constructPath) {
|
|
8221
|
+
return this.byPathMap.get(constructPath);
|
|
8222
|
+
}
|
|
8223
|
+
/** Number of nodes in the tree. */
|
|
8224
|
+
get size() {
|
|
8225
|
+
return this.byPathMap.size;
|
|
8226
|
+
}
|
|
8227
|
+
/** Pre-order iteration over every node in the tree. */
|
|
8228
|
+
[Symbol.iterator]() {
|
|
8229
|
+
return this.byPathMap.values();
|
|
8230
|
+
}
|
|
8231
|
+
};
|
|
8232
|
+
__name(visit, "visit");
|
|
8233
|
+
__name(buildConstructTree, "buildConstructTree");
|
|
8234
|
+
__name(buildConstructTreeAsync, "buildConstructTreeAsync");
|
|
8235
|
+
__name(readRoots, "readRoots");
|
|
8236
|
+
NO_TEMPLATE = { file: void 0, template: void 0 };
|
|
8237
|
+
__name(loadTree, "loadTree");
|
|
8238
|
+
__name(buildStackIndex, "buildStackIndex");
|
|
8239
|
+
__name(prepareNode, "prepareNode");
|
|
8240
|
+
__name(buildNodeSync, "buildNodeSync");
|
|
8241
|
+
__name(buildNodeAsync, "buildNodeAsync");
|
|
8242
|
+
__name(logicalIdFromEntries, "logicalIdFromEntries");
|
|
8243
|
+
__name(loadTemplate, "loadTemplate");
|
|
8244
|
+
__name(nestedBoundary, "nestedBoundary");
|
|
8245
|
+
__name(isCdkInternal, "isCdkInternal");
|
|
8246
|
+
}
|
|
8247
|
+
});
|
|
8248
|
+
|
|
8249
|
+
// ../../node_modules/json-source-map/index.js
|
|
8250
|
+
var require_json_source_map = __commonJS({
|
|
8251
|
+
"../../node_modules/json-source-map/index.js"(exports2) {
|
|
8252
|
+
"use strict";
|
|
8253
|
+
var escapedChars = {
|
|
8254
|
+
"b": "\b",
|
|
8255
|
+
"f": "\f",
|
|
8256
|
+
"n": "\n",
|
|
8257
|
+
"r": "\r",
|
|
8258
|
+
"t": " ",
|
|
8259
|
+
'"': '"',
|
|
8260
|
+
"/": "/",
|
|
8261
|
+
"\\": "\\"
|
|
8262
|
+
};
|
|
8263
|
+
var A_CODE = "a".charCodeAt();
|
|
8264
|
+
exports2.parse = function(source, _, options) {
|
|
8265
|
+
var pointers = {};
|
|
8266
|
+
var line = 0;
|
|
8267
|
+
var column = 0;
|
|
8268
|
+
var pos = 0;
|
|
8269
|
+
var bigint = options && options.bigint && typeof BigInt != "undefined";
|
|
8270
|
+
return {
|
|
8271
|
+
data: _parse("", true),
|
|
8272
|
+
pointers
|
|
8273
|
+
};
|
|
8274
|
+
function _parse(ptr, topLevel) {
|
|
8275
|
+
whitespace();
|
|
8276
|
+
var data2;
|
|
8277
|
+
map3(ptr, "value");
|
|
8278
|
+
var char = getChar();
|
|
8279
|
+
switch (char) {
|
|
8280
|
+
case "t":
|
|
8281
|
+
read("rue");
|
|
8282
|
+
data2 = true;
|
|
8283
|
+
break;
|
|
8284
|
+
case "f":
|
|
8285
|
+
read("alse");
|
|
8286
|
+
data2 = false;
|
|
8287
|
+
break;
|
|
8288
|
+
case "n":
|
|
8289
|
+
read("ull");
|
|
8290
|
+
data2 = null;
|
|
8291
|
+
break;
|
|
8292
|
+
case '"':
|
|
8293
|
+
data2 = parseString();
|
|
8294
|
+
break;
|
|
8295
|
+
case "[":
|
|
8296
|
+
data2 = parseArray(ptr);
|
|
8297
|
+
break;
|
|
8298
|
+
case "{":
|
|
8299
|
+
data2 = parseObject(ptr);
|
|
8300
|
+
break;
|
|
8301
|
+
default:
|
|
8302
|
+
backChar();
|
|
8303
|
+
if ("-0123456789".indexOf(char) >= 0)
|
|
8304
|
+
data2 = parseNumber2();
|
|
8305
|
+
else
|
|
8306
|
+
unexpectedToken();
|
|
8307
|
+
}
|
|
8308
|
+
map3(ptr, "valueEnd");
|
|
8309
|
+
whitespace();
|
|
8310
|
+
if (topLevel && pos < source.length) unexpectedToken();
|
|
8311
|
+
return data2;
|
|
8312
|
+
}
|
|
8313
|
+
__name(_parse, "_parse");
|
|
8314
|
+
function whitespace() {
|
|
8315
|
+
loop:
|
|
8316
|
+
while (pos < source.length) {
|
|
8317
|
+
switch (source[pos]) {
|
|
8318
|
+
case " ":
|
|
8319
|
+
column++;
|
|
8320
|
+
break;
|
|
8321
|
+
case " ":
|
|
8322
|
+
column += 4;
|
|
8323
|
+
break;
|
|
8324
|
+
case "\r":
|
|
8325
|
+
column = 0;
|
|
8326
|
+
break;
|
|
8327
|
+
case "\n":
|
|
8328
|
+
column = 0;
|
|
8329
|
+
line++;
|
|
8330
|
+
break;
|
|
8331
|
+
default:
|
|
8332
|
+
break loop;
|
|
8333
|
+
}
|
|
8334
|
+
pos++;
|
|
8335
|
+
}
|
|
8336
|
+
}
|
|
8337
|
+
__name(whitespace, "whitespace");
|
|
8338
|
+
function parseString() {
|
|
8339
|
+
var str = "";
|
|
8340
|
+
var char;
|
|
8341
|
+
while (true) {
|
|
8342
|
+
char = getChar();
|
|
8343
|
+
if (char == '"') {
|
|
8344
|
+
break;
|
|
8345
|
+
} else if (char == "\\") {
|
|
8346
|
+
char = getChar();
|
|
8347
|
+
if (char in escapedChars)
|
|
8348
|
+
str += escapedChars[char];
|
|
8349
|
+
else if (char == "u")
|
|
8350
|
+
str += getCharCode();
|
|
8351
|
+
else
|
|
8352
|
+
wasUnexpectedToken();
|
|
8353
|
+
} else {
|
|
8354
|
+
str += char;
|
|
8355
|
+
}
|
|
8356
|
+
}
|
|
8357
|
+
return str;
|
|
8358
|
+
}
|
|
8359
|
+
__name(parseString, "parseString");
|
|
8360
|
+
function parseNumber2() {
|
|
8361
|
+
var numStr = "";
|
|
8362
|
+
var integer = true;
|
|
8363
|
+
if (source[pos] == "-") numStr += getChar();
|
|
8364
|
+
numStr += source[pos] == "0" ? getChar() : getDigits();
|
|
8365
|
+
if (source[pos] == ".") {
|
|
8366
|
+
numStr += getChar() + getDigits();
|
|
8367
|
+
integer = false;
|
|
8368
|
+
}
|
|
8369
|
+
if (source[pos] == "e" || source[pos] == "E") {
|
|
8370
|
+
numStr += getChar();
|
|
8371
|
+
if (source[pos] == "+" || source[pos] == "-") numStr += getChar();
|
|
8372
|
+
numStr += getDigits();
|
|
8373
|
+
integer = false;
|
|
8374
|
+
}
|
|
8375
|
+
var result = +numStr;
|
|
8376
|
+
return bigint && integer && (result > Number.MAX_SAFE_INTEGER || result < Number.MIN_SAFE_INTEGER) ? BigInt(numStr) : result;
|
|
8377
|
+
}
|
|
8378
|
+
__name(parseNumber2, "parseNumber");
|
|
8379
|
+
function parseArray(ptr) {
|
|
8380
|
+
whitespace();
|
|
8381
|
+
var arr = [];
|
|
8382
|
+
var i6 = 0;
|
|
8383
|
+
if (getChar() == "]") return arr;
|
|
8384
|
+
backChar();
|
|
8385
|
+
while (true) {
|
|
8386
|
+
var itemPtr = ptr + "/" + i6;
|
|
8387
|
+
arr.push(_parse(itemPtr));
|
|
8388
|
+
whitespace();
|
|
8389
|
+
var char = getChar();
|
|
8390
|
+
if (char == "]") break;
|
|
8391
|
+
if (char != ",") wasUnexpectedToken();
|
|
8392
|
+
whitespace();
|
|
8393
|
+
i6++;
|
|
8394
|
+
}
|
|
8395
|
+
return arr;
|
|
8396
|
+
}
|
|
8397
|
+
__name(parseArray, "parseArray");
|
|
8398
|
+
function parseObject(ptr) {
|
|
8399
|
+
whitespace();
|
|
8400
|
+
var obj = {};
|
|
8401
|
+
if (getChar() == "}") return obj;
|
|
8402
|
+
backChar();
|
|
8403
|
+
while (true) {
|
|
8404
|
+
var loc = getLoc();
|
|
8405
|
+
if (getChar() != '"') wasUnexpectedToken();
|
|
8406
|
+
var key = parseString();
|
|
8407
|
+
var propPtr = ptr + "/" + escapeJsonPointer(key);
|
|
8408
|
+
mapLoc(propPtr, "key", loc);
|
|
8409
|
+
map3(propPtr, "keyEnd");
|
|
8410
|
+
whitespace();
|
|
8411
|
+
if (getChar() != ":") wasUnexpectedToken();
|
|
8412
|
+
whitespace();
|
|
8413
|
+
obj[key] = _parse(propPtr);
|
|
8414
|
+
whitespace();
|
|
8415
|
+
var char = getChar();
|
|
8416
|
+
if (char == "}") break;
|
|
8417
|
+
if (char != ",") wasUnexpectedToken();
|
|
8418
|
+
whitespace();
|
|
8419
|
+
}
|
|
8420
|
+
return obj;
|
|
8421
|
+
}
|
|
8422
|
+
__name(parseObject, "parseObject");
|
|
8423
|
+
function read(str) {
|
|
8424
|
+
for (var i6 = 0; i6 < str.length; i6++)
|
|
8425
|
+
if (getChar() !== str[i6]) wasUnexpectedToken();
|
|
8426
|
+
}
|
|
8427
|
+
__name(read, "read");
|
|
8428
|
+
function getChar() {
|
|
8429
|
+
checkUnexpectedEnd();
|
|
8430
|
+
var char = source[pos];
|
|
8431
|
+
pos++;
|
|
8432
|
+
column++;
|
|
8433
|
+
return char;
|
|
8434
|
+
}
|
|
8435
|
+
__name(getChar, "getChar");
|
|
8436
|
+
function backChar() {
|
|
8437
|
+
pos--;
|
|
8438
|
+
column--;
|
|
8439
|
+
}
|
|
8440
|
+
__name(backChar, "backChar");
|
|
8441
|
+
function getCharCode() {
|
|
8442
|
+
var count = 4;
|
|
8443
|
+
var code = 0;
|
|
8444
|
+
while (count--) {
|
|
8445
|
+
code <<= 4;
|
|
8446
|
+
var char = getChar().toLowerCase();
|
|
8447
|
+
if (char >= "a" && char <= "f")
|
|
8448
|
+
code += char.charCodeAt() - A_CODE + 10;
|
|
8449
|
+
else if (char >= "0" && char <= "9")
|
|
8450
|
+
code += +char;
|
|
8451
|
+
else
|
|
8452
|
+
wasUnexpectedToken();
|
|
8453
|
+
}
|
|
8454
|
+
return String.fromCharCode(code);
|
|
8455
|
+
}
|
|
8456
|
+
__name(getCharCode, "getCharCode");
|
|
8457
|
+
function getDigits() {
|
|
8458
|
+
var digits = "";
|
|
8459
|
+
while (source[pos] >= "0" && source[pos] <= "9")
|
|
8460
|
+
digits += getChar();
|
|
8461
|
+
if (digits.length) return digits;
|
|
8462
|
+
checkUnexpectedEnd();
|
|
8463
|
+
unexpectedToken();
|
|
8464
|
+
}
|
|
8465
|
+
__name(getDigits, "getDigits");
|
|
8466
|
+
function map3(ptr, prop) {
|
|
8467
|
+
mapLoc(ptr, prop, getLoc());
|
|
8468
|
+
}
|
|
8469
|
+
__name(map3, "map");
|
|
8470
|
+
function mapLoc(ptr, prop, loc) {
|
|
8471
|
+
pointers[ptr] = pointers[ptr] || {};
|
|
8472
|
+
pointers[ptr][prop] = loc;
|
|
8473
|
+
}
|
|
8474
|
+
__name(mapLoc, "mapLoc");
|
|
8475
|
+
function getLoc() {
|
|
8476
|
+
return {
|
|
8477
|
+
line,
|
|
8478
|
+
column,
|
|
8479
|
+
pos
|
|
8480
|
+
};
|
|
8481
|
+
}
|
|
8482
|
+
__name(getLoc, "getLoc");
|
|
8483
|
+
function unexpectedToken() {
|
|
8484
|
+
throw new SyntaxError("Unexpected token " + source[pos] + " in JSON at position " + pos);
|
|
8485
|
+
}
|
|
8486
|
+
__name(unexpectedToken, "unexpectedToken");
|
|
8487
|
+
function wasUnexpectedToken() {
|
|
8488
|
+
backChar();
|
|
8489
|
+
unexpectedToken();
|
|
8490
|
+
}
|
|
8491
|
+
__name(wasUnexpectedToken, "wasUnexpectedToken");
|
|
8492
|
+
function checkUnexpectedEnd() {
|
|
8493
|
+
if (pos >= source.length)
|
|
8494
|
+
throw new SyntaxError("Unexpected end of JSON input");
|
|
8495
|
+
}
|
|
8496
|
+
__name(checkUnexpectedEnd, "checkUnexpectedEnd");
|
|
8497
|
+
};
|
|
8498
|
+
exports2.stringify = function(data2, _, options) {
|
|
8499
|
+
if (!validType(data2)) return;
|
|
8500
|
+
var wsLine = 0;
|
|
8501
|
+
var wsPos, wsColumn;
|
|
8502
|
+
var whitespace = typeof options == "object" ? options.space : options;
|
|
8503
|
+
switch (typeof whitespace) {
|
|
8504
|
+
case "number":
|
|
8505
|
+
var len = whitespace > 10 ? 10 : whitespace < 0 ? 0 : Math.floor(whitespace);
|
|
8506
|
+
whitespace = len && repeat(len, " ");
|
|
8507
|
+
wsPos = len;
|
|
8508
|
+
wsColumn = len;
|
|
8509
|
+
break;
|
|
8510
|
+
case "string":
|
|
8511
|
+
whitespace = whitespace.slice(0, 10);
|
|
8512
|
+
wsPos = 0;
|
|
8513
|
+
wsColumn = 0;
|
|
8514
|
+
for (var j6 = 0; j6 < whitespace.length; j6++) {
|
|
8515
|
+
var char = whitespace[j6];
|
|
8516
|
+
switch (char) {
|
|
8517
|
+
case " ":
|
|
8518
|
+
wsColumn++;
|
|
8519
|
+
break;
|
|
8520
|
+
case " ":
|
|
8521
|
+
wsColumn += 4;
|
|
8522
|
+
break;
|
|
8523
|
+
case "\r":
|
|
8524
|
+
wsColumn = 0;
|
|
8525
|
+
break;
|
|
8526
|
+
case "\n":
|
|
8527
|
+
wsColumn = 0;
|
|
8528
|
+
wsLine++;
|
|
8529
|
+
break;
|
|
8530
|
+
default:
|
|
8531
|
+
throw new Error("whitespace characters not allowed in JSON");
|
|
8532
|
+
}
|
|
8533
|
+
wsPos++;
|
|
8534
|
+
}
|
|
8535
|
+
break;
|
|
8536
|
+
default:
|
|
8537
|
+
whitespace = void 0;
|
|
8538
|
+
}
|
|
8539
|
+
var json = "";
|
|
8540
|
+
var pointers = {};
|
|
8541
|
+
var line = 0;
|
|
8542
|
+
var column = 0;
|
|
8543
|
+
var pos = 0;
|
|
8544
|
+
var es6 = options && options.es6 && typeof Map == "function";
|
|
8545
|
+
_stringify(data2, 0, "");
|
|
8546
|
+
return {
|
|
8547
|
+
json,
|
|
8548
|
+
pointers
|
|
8549
|
+
};
|
|
8550
|
+
function _stringify(_data6, lvl, ptr) {
|
|
8551
|
+
map3(ptr, "value");
|
|
8552
|
+
switch (typeof _data6) {
|
|
8553
|
+
case "number":
|
|
8554
|
+
case "bigint":
|
|
8555
|
+
case "boolean":
|
|
8556
|
+
out("" + _data6);
|
|
8557
|
+
break;
|
|
8558
|
+
case "string":
|
|
8559
|
+
out(quoted(_data6));
|
|
8560
|
+
break;
|
|
8561
|
+
case "object":
|
|
8562
|
+
if (_data6 === null) {
|
|
8563
|
+
out("null");
|
|
8564
|
+
} else if (typeof _data6.toJSON == "function") {
|
|
8565
|
+
out(quoted(_data6.toJSON()));
|
|
8566
|
+
} else if (Array.isArray(_data6)) {
|
|
8567
|
+
stringifyArray();
|
|
8568
|
+
} else if (es6) {
|
|
8569
|
+
if (_data6.constructor.BYTES_PER_ELEMENT)
|
|
8570
|
+
stringifyArray();
|
|
8571
|
+
else if (_data6 instanceof Map)
|
|
8572
|
+
stringifyMapSet();
|
|
8573
|
+
else if (_data6 instanceof Set)
|
|
8574
|
+
stringifyMapSet(true);
|
|
8575
|
+
else
|
|
8576
|
+
stringifyObject();
|
|
8577
|
+
} else {
|
|
8578
|
+
stringifyObject();
|
|
8579
|
+
}
|
|
8580
|
+
}
|
|
8581
|
+
map3(ptr, "valueEnd");
|
|
8582
|
+
function stringifyArray() {
|
|
8583
|
+
if (_data6.length) {
|
|
8584
|
+
out("[");
|
|
8585
|
+
var itemLvl = lvl + 1;
|
|
8586
|
+
for (var i6 = 0; i6 < _data6.length; i6++) {
|
|
8587
|
+
if (i6) out(",");
|
|
8588
|
+
indent(itemLvl);
|
|
8589
|
+
var item = validType(_data6[i6]) ? _data6[i6] : null;
|
|
8590
|
+
var itemPtr = ptr + "/" + i6;
|
|
8591
|
+
_stringify(item, itemLvl, itemPtr);
|
|
8592
|
+
}
|
|
8593
|
+
indent(lvl);
|
|
8594
|
+
out("]");
|
|
8595
|
+
} else {
|
|
8596
|
+
out("[]");
|
|
8597
|
+
}
|
|
8598
|
+
}
|
|
8599
|
+
__name(stringifyArray, "stringifyArray");
|
|
8600
|
+
function stringifyObject() {
|
|
8601
|
+
var keys = Object.keys(_data6);
|
|
8602
|
+
if (keys.length) {
|
|
8603
|
+
out("{");
|
|
8604
|
+
var propLvl = lvl + 1;
|
|
8605
|
+
for (var i6 = 0; i6 < keys.length; i6++) {
|
|
8606
|
+
var key = keys[i6];
|
|
8607
|
+
var value = _data6[key];
|
|
8608
|
+
if (validType(value)) {
|
|
8609
|
+
if (i6) out(",");
|
|
8610
|
+
var propPtr = ptr + "/" + escapeJsonPointer(key);
|
|
8611
|
+
indent(propLvl);
|
|
8612
|
+
map3(propPtr, "key");
|
|
8613
|
+
out(quoted(key));
|
|
8614
|
+
map3(propPtr, "keyEnd");
|
|
8615
|
+
out(":");
|
|
8616
|
+
if (whitespace) out(" ");
|
|
8617
|
+
_stringify(value, propLvl, propPtr);
|
|
8618
|
+
}
|
|
8619
|
+
}
|
|
8620
|
+
indent(lvl);
|
|
8621
|
+
out("}");
|
|
8622
|
+
} else {
|
|
8623
|
+
out("{}");
|
|
8624
|
+
}
|
|
8625
|
+
}
|
|
8626
|
+
__name(stringifyObject, "stringifyObject");
|
|
8627
|
+
function stringifyMapSet(isSet2) {
|
|
8628
|
+
if (_data6.size) {
|
|
8629
|
+
out("{");
|
|
8630
|
+
var propLvl = lvl + 1;
|
|
8631
|
+
var first = true;
|
|
8632
|
+
var entries = _data6.entries();
|
|
8633
|
+
var entry = entries.next();
|
|
8634
|
+
while (!entry.done) {
|
|
8635
|
+
var item = entry.value;
|
|
8636
|
+
var key = item[0];
|
|
8637
|
+
var value = isSet2 ? true : item[1];
|
|
8638
|
+
if (validType(value)) {
|
|
8639
|
+
if (!first) out(",");
|
|
8640
|
+
first = false;
|
|
8641
|
+
var propPtr = ptr + "/" + escapeJsonPointer(key);
|
|
8642
|
+
indent(propLvl);
|
|
8643
|
+
map3(propPtr, "key");
|
|
8644
|
+
out(quoted(key));
|
|
8645
|
+
map3(propPtr, "keyEnd");
|
|
8646
|
+
out(":");
|
|
8647
|
+
if (whitespace) out(" ");
|
|
8648
|
+
_stringify(value, propLvl, propPtr);
|
|
8649
|
+
}
|
|
8650
|
+
entry = entries.next();
|
|
8651
|
+
}
|
|
8652
|
+
indent(lvl);
|
|
8653
|
+
out("}");
|
|
8654
|
+
} else {
|
|
8655
|
+
out("{}");
|
|
8656
|
+
}
|
|
8657
|
+
}
|
|
8658
|
+
__name(stringifyMapSet, "stringifyMapSet");
|
|
8659
|
+
}
|
|
8660
|
+
__name(_stringify, "_stringify");
|
|
8661
|
+
function out(str) {
|
|
8662
|
+
column += str.length;
|
|
8663
|
+
pos += str.length;
|
|
8664
|
+
json += str;
|
|
8665
|
+
}
|
|
8666
|
+
__name(out, "out");
|
|
8667
|
+
function indent(lvl) {
|
|
8668
|
+
if (whitespace) {
|
|
8669
|
+
json += "\n" + repeat(lvl, whitespace);
|
|
8670
|
+
line++;
|
|
8671
|
+
column = 0;
|
|
8672
|
+
while (lvl--) {
|
|
8673
|
+
if (wsLine) {
|
|
8674
|
+
line += wsLine;
|
|
8675
|
+
column = wsColumn;
|
|
8676
|
+
} else {
|
|
8677
|
+
column += wsColumn;
|
|
8678
|
+
}
|
|
8679
|
+
pos += wsPos;
|
|
8680
|
+
}
|
|
8681
|
+
pos += 1;
|
|
8682
|
+
}
|
|
8683
|
+
}
|
|
8684
|
+
__name(indent, "indent");
|
|
8685
|
+
function map3(ptr, prop) {
|
|
8686
|
+
pointers[ptr] = pointers[ptr] || {};
|
|
8687
|
+
pointers[ptr][prop] = {
|
|
8688
|
+
line,
|
|
8689
|
+
column,
|
|
8690
|
+
pos
|
|
8691
|
+
};
|
|
8692
|
+
}
|
|
8693
|
+
__name(map3, "map");
|
|
8694
|
+
function repeat(n3, str) {
|
|
8695
|
+
return Array(n3 + 1).join(str);
|
|
8696
|
+
}
|
|
8697
|
+
__name(repeat, "repeat");
|
|
8698
|
+
};
|
|
8699
|
+
var VALID_TYPES = ["number", "bigint", "boolean", "string", "object"];
|
|
8700
|
+
function validType(data2) {
|
|
8701
|
+
return VALID_TYPES.indexOf(typeof data2) >= 0;
|
|
8702
|
+
}
|
|
8703
|
+
__name(validType, "validType");
|
|
8704
|
+
var ESC_QUOTE = /"|\\/g;
|
|
8705
|
+
var ESC_B = /[\b]/g;
|
|
8706
|
+
var ESC_F = /\f/g;
|
|
8707
|
+
var ESC_N = /\n/g;
|
|
8708
|
+
var ESC_R = /\r/g;
|
|
8709
|
+
var ESC_T = /\t/g;
|
|
8710
|
+
function quoted(str) {
|
|
8711
|
+
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");
|
|
8712
|
+
return '"' + str + '"';
|
|
8713
|
+
}
|
|
8714
|
+
__name(quoted, "quoted");
|
|
8715
|
+
var ESC_0 = /~/g;
|
|
8716
|
+
var ESC_1 = /\//g;
|
|
8717
|
+
function escapeJsonPointer(str) {
|
|
8718
|
+
return str.replace(ESC_0, "~0").replace(ESC_1, "~1");
|
|
8719
|
+
}
|
|
8720
|
+
__name(escapeJsonPointer, "escapeJsonPointer");
|
|
8721
|
+
}
|
|
8722
|
+
});
|
|
8723
|
+
|
|
8724
|
+
// ../@aws-cdk/cloud-assembly-api/lib/template-ranges.ts
|
|
8725
|
+
var template_ranges_exports = {};
|
|
8726
|
+
__export(template_ranges_exports, {
|
|
8727
|
+
indexTemplateRanges: () => indexTemplateRanges,
|
|
8728
|
+
resolveLogicalIdAtOffset: () => resolveLogicalIdAtOffset,
|
|
8729
|
+
resolveResourceRange: () => resolveResourceRange,
|
|
8730
|
+
resolveResourceRanges: () => resolveResourceRanges
|
|
8731
|
+
});
|
|
8732
|
+
function resolveResourceRange(templateText, logicalId) {
|
|
8733
|
+
return indexTemplateRanges(templateText)?.block(logicalId);
|
|
8734
|
+
}
|
|
8735
|
+
function resolveResourceRanges(templateText, logicalId) {
|
|
8736
|
+
return indexTemplateRanges(templateText)?.resource(logicalId);
|
|
8737
|
+
}
|
|
8738
|
+
function indexTemplateRanges(templateText) {
|
|
8739
|
+
const pointers = parsePointers(templateText);
|
|
8740
|
+
if (pointers === void 0) {
|
|
8741
|
+
return void 0;
|
|
8742
|
+
}
|
|
8743
|
+
return {
|
|
8744
|
+
block: /* @__PURE__ */ __name((logicalId) => blockRange(pointers, escapePointerSegment(logicalId)), "block"),
|
|
8745
|
+
resource: /* @__PURE__ */ __name((logicalId) => {
|
|
8746
|
+
const escaped = escapePointerSegment(logicalId);
|
|
8747
|
+
const block = blockRange(pointers, escaped);
|
|
8748
|
+
return block === void 0 ? void 0 : { block, properties: propertyRanges(pointers, escaped) };
|
|
8749
|
+
}, "resource")
|
|
8750
|
+
};
|
|
8751
|
+
}
|
|
8752
|
+
function blockRange(pointers, escapedId) {
|
|
8753
|
+
const mapping = pointers[`/Resources/${escapedId}`];
|
|
8754
|
+
return mapping === void 0 ? void 0 : { start: mapping.value.pos, end: mapping.valueEnd.pos };
|
|
8755
|
+
}
|
|
8756
|
+
function propertyRanges(pointers, escapedId) {
|
|
8757
|
+
const properties = {};
|
|
8758
|
+
for (const [pointer, mapping] of Object.entries(pointers)) {
|
|
8759
|
+
const match = /^\/Resources\/([^/]+)\/Properties\/([^/]+)$/.exec(pointer);
|
|
8760
|
+
if (match === null || match[1] !== escapedId || mapping.key === void 0) {
|
|
8761
|
+
continue;
|
|
8762
|
+
}
|
|
8763
|
+
properties[unescapePointerSegment(match[2])] = { start: mapping.key.pos, end: mapping.valueEnd.pos };
|
|
8764
|
+
}
|
|
8765
|
+
return properties;
|
|
8766
|
+
}
|
|
8767
|
+
function resolveLogicalIdAtOffset(templateText, offset) {
|
|
8768
|
+
const pointers = parsePointers(templateText);
|
|
8769
|
+
if (pointers === void 0) {
|
|
8770
|
+
return void 0;
|
|
8771
|
+
}
|
|
8772
|
+
for (const [pointer, mapping] of Object.entries(pointers)) {
|
|
8773
|
+
const match = /^\/Resources\/([^/]+)$/.exec(pointer);
|
|
8774
|
+
if (match && offset >= mapping.value.pos && offset < mapping.valueEnd.pos) {
|
|
8775
|
+
return unescapePointerSegment(match[1]);
|
|
8776
|
+
}
|
|
8777
|
+
}
|
|
8778
|
+
return void 0;
|
|
8779
|
+
}
|
|
8780
|
+
function parsePointers(templateText) {
|
|
8781
|
+
try {
|
|
8782
|
+
return (0, import_json_source_map.parse)(templateText).pointers;
|
|
8783
|
+
} catch {
|
|
8784
|
+
return void 0;
|
|
8785
|
+
}
|
|
8786
|
+
}
|
|
8787
|
+
function escapePointerSegment(segment) {
|
|
8788
|
+
return segment.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
8789
|
+
}
|
|
8790
|
+
function unescapePointerSegment(segment) {
|
|
8791
|
+
return segment.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
8792
|
+
}
|
|
8793
|
+
var import_json_source_map;
|
|
8794
|
+
var init_template_ranges = __esm({
|
|
8795
|
+
"../@aws-cdk/cloud-assembly-api/lib/template-ranges.ts"() {
|
|
8796
|
+
"use strict";
|
|
8797
|
+
import_json_source_map = __toESM(require_json_source_map());
|
|
8798
|
+
__name(resolveResourceRange, "resolveResourceRange");
|
|
8799
|
+
__name(resolveResourceRanges, "resolveResourceRanges");
|
|
8800
|
+
__name(indexTemplateRanges, "indexTemplateRanges");
|
|
8801
|
+
__name(blockRange, "blockRange");
|
|
8802
|
+
__name(propertyRanges, "propertyRanges");
|
|
8803
|
+
__name(resolveLogicalIdAtOffset, "resolveLogicalIdAtOffset");
|
|
8804
|
+
__name(parsePointers, "parsePointers");
|
|
8805
|
+
__name(escapePointerSegment, "escapePointerSegment");
|
|
8806
|
+
__name(unescapePointerSegment, "unescapePointerSegment");
|
|
8807
|
+
}
|
|
8808
|
+
});
|
|
8809
|
+
|
|
8074
8810
|
// ../@aws-cdk/cloud-assembly-api/lib/index.js
|
|
8075
8811
|
var require_lib3 = __commonJS({
|
|
8076
8812
|
"../@aws-cdk/cloud-assembly-api/lib/index.js"(exports2) {
|
|
@@ -8113,6 +8849,8 @@ var require_lib3 = __commonJS({
|
|
|
8113
8849
|
__exportStar((init_placeholders(), __toCommonJS(placeholders_exports)), exports2);
|
|
8114
8850
|
__exportStar((init_environment(), __toCommonJS(environment_exports)), exports2);
|
|
8115
8851
|
__exportStar((init_bootstrap(), __toCommonJS(bootstrap_exports)), exports2);
|
|
8852
|
+
__exportStar((init_construct_tree(), __toCommonJS(construct_tree_exports)), exports2);
|
|
8853
|
+
__exportStar((init_template_ranges(), __toCommonJS(template_ranges_exports)), exports2);
|
|
8116
8854
|
}
|
|
8117
8855
|
});
|
|
8118
8856
|
|
|
@@ -8177,11 +8915,11 @@ async function repositoryUri(ecr, repositoryName) {
|
|
|
8177
8915
|
return void 0;
|
|
8178
8916
|
}
|
|
8179
8917
|
}
|
|
8180
|
-
var
|
|
8918
|
+
var path9, ContainerImageAssetHandler, ContainerImageBuilder;
|
|
8181
8919
|
var init_container_images = __esm({
|
|
8182
8920
|
"../@aws-cdk/cdk-assets-lib/lib/private/handlers/container-images.ts"() {
|
|
8183
8921
|
"use strict";
|
|
8184
|
-
|
|
8922
|
+
path9 = __toESM(require("path"));
|
|
8185
8923
|
init_client_options();
|
|
8186
8924
|
init_progress();
|
|
8187
8925
|
init_placeholders2();
|
|
@@ -8367,7 +9105,7 @@ var init_container_images = __esm({
|
|
|
8367
9105
|
`'directory' is expected in the DockerImage asset source, got: ${JSON.stringify(source)}`
|
|
8368
9106
|
);
|
|
8369
9107
|
}
|
|
8370
|
-
const fullPath =
|
|
9108
|
+
const fullPath = path9.resolve(this.workDir, source.directory);
|
|
8371
9109
|
this.host.emitMessage("build" /* BUILD */, `Building Docker image at ${fullPath}`);
|
|
8372
9110
|
await this.docker.build({
|
|
8373
9111
|
directory: fullPath,
|
|
@@ -8438,11 +9176,11 @@ var require_Mime = __commonJS({
|
|
|
8438
9176
|
}
|
|
8439
9177
|
}
|
|
8440
9178
|
};
|
|
8441
|
-
Mime.prototype.getType = function(
|
|
8442
|
-
|
|
8443
|
-
let last =
|
|
9179
|
+
Mime.prototype.getType = function(path12) {
|
|
9180
|
+
path12 = String(path12);
|
|
9181
|
+
let last = path12.replace(/^.*[/\\]/, "").toLowerCase();
|
|
8444
9182
|
let ext = last.replace(/^.*\./, "").toLowerCase();
|
|
8445
|
-
let hasPath = last.length <
|
|
9183
|
+
let hasPath = last.length < path12.length;
|
|
8446
9184
|
let hasDot = ext.length < last.length - 1;
|
|
8447
9185
|
return (hasDot || !hasPath) && this._types[ext] || null;
|
|
8448
9186
|
};
|
|
@@ -8489,12 +9227,12 @@ async function pathExists(pathName) {
|
|
|
8489
9227
|
return false;
|
|
8490
9228
|
}
|
|
8491
9229
|
}
|
|
8492
|
-
var
|
|
9230
|
+
var fs9, pfs;
|
|
8493
9231
|
var init_fs_extra = __esm({
|
|
8494
9232
|
"../@aws-cdk/cdk-assets-lib/lib/private/fs-extra.ts"() {
|
|
8495
9233
|
"use strict";
|
|
8496
|
-
|
|
8497
|
-
pfs =
|
|
9234
|
+
fs9 = __toESM(require("fs"));
|
|
9235
|
+
pfs = fs9.promises;
|
|
8498
9236
|
__name(pathExists, "pathExists");
|
|
8499
9237
|
}
|
|
8500
9238
|
});
|
|
@@ -8578,7 +9316,7 @@ var require_path = __commonJS({
|
|
|
8578
9316
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
8579
9317
|
exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0;
|
|
8580
9318
|
var os5 = require("os");
|
|
8581
|
-
var
|
|
9319
|
+
var path12 = require("path");
|
|
8582
9320
|
var IS_WINDOWS_PLATFORM = os5.platform() === "win32";
|
|
8583
9321
|
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
8584
9322
|
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
@@ -8591,7 +9329,7 @@ var require_path = __commonJS({
|
|
|
8591
9329
|
__name(unixify, "unixify");
|
|
8592
9330
|
exports2.unixify = unixify;
|
|
8593
9331
|
function makeAbsolute(cwd, filepath) {
|
|
8594
|
-
return
|
|
9332
|
+
return path12.resolve(cwd, filepath);
|
|
8595
9333
|
}
|
|
8596
9334
|
__name(makeAbsolute, "makeAbsolute");
|
|
8597
9335
|
exports2.makeAbsolute = makeAbsolute;
|
|
@@ -9637,7 +10375,7 @@ var require_parse2 = __commonJS({
|
|
|
9637
10375
|
CHAR_NO_BREAK_SPACE,
|
|
9638
10376
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE
|
|
9639
10377
|
} = require_constants2();
|
|
9640
|
-
var
|
|
10378
|
+
var parse3 = /* @__PURE__ */ __name((input, options = {}) => {
|
|
9641
10379
|
if (typeof input !== "string") {
|
|
9642
10380
|
throw new TypeError("Expected a string");
|
|
9643
10381
|
}
|
|
@@ -9837,7 +10575,7 @@ var require_parse2 = __commonJS({
|
|
|
9837
10575
|
push({ type: "eos" });
|
|
9838
10576
|
return ast;
|
|
9839
10577
|
}, "parse");
|
|
9840
|
-
module2.exports =
|
|
10578
|
+
module2.exports = parse3;
|
|
9841
10579
|
}
|
|
9842
10580
|
});
|
|
9843
10581
|
|
|
@@ -9848,7 +10586,7 @@ var require_braces = __commonJS({
|
|
|
9848
10586
|
var stringify = require_stringify();
|
|
9849
10587
|
var compile = require_compile();
|
|
9850
10588
|
var expand = require_expand();
|
|
9851
|
-
var
|
|
10589
|
+
var parse3 = require_parse2();
|
|
9852
10590
|
var braces = /* @__PURE__ */ __name((input, options = {}) => {
|
|
9853
10591
|
let output = [];
|
|
9854
10592
|
if (Array.isArray(input)) {
|
|
@@ -9868,7 +10606,7 @@ var require_braces = __commonJS({
|
|
|
9868
10606
|
}
|
|
9869
10607
|
return output;
|
|
9870
10608
|
}, "braces");
|
|
9871
|
-
braces.parse = (input, options = {}) =>
|
|
10609
|
+
braces.parse = (input, options = {}) => parse3(input, options);
|
|
9872
10610
|
braces.stringify = (input, options = {}) => {
|
|
9873
10611
|
if (typeof input === "string") {
|
|
9874
10612
|
return stringify(braces.parse(input, options), options);
|
|
@@ -9908,7 +10646,7 @@ var require_braces = __commonJS({
|
|
|
9908
10646
|
var require_constants3 = __commonJS({
|
|
9909
10647
|
"../../node_modules/micromatch/node_modules/picomatch/lib/constants.js"(exports2, module2) {
|
|
9910
10648
|
"use strict";
|
|
9911
|
-
var
|
|
10649
|
+
var path12 = require("path");
|
|
9912
10650
|
var WIN_SLASH = "\\\\/";
|
|
9913
10651
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
9914
10652
|
var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
|
|
@@ -10082,7 +10820,7 @@ var require_constants3 = __commonJS({
|
|
|
10082
10820
|
/* | */
|
|
10083
10821
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
10084
10822
|
/* \uFEFF */
|
|
10085
|
-
SEP:
|
|
10823
|
+
SEP: path12.sep,
|
|
10086
10824
|
/**
|
|
10087
10825
|
* Create EXTGLOB_CHARS
|
|
10088
10826
|
*/
|
|
@@ -10109,7 +10847,7 @@ var require_constants3 = __commonJS({
|
|
|
10109
10847
|
var require_utils2 = __commonJS({
|
|
10110
10848
|
"../../node_modules/micromatch/node_modules/picomatch/lib/utils.js"(exports2) {
|
|
10111
10849
|
"use strict";
|
|
10112
|
-
var
|
|
10850
|
+
var path12 = require("path");
|
|
10113
10851
|
var win32 = process.platform === "win32";
|
|
10114
10852
|
var {
|
|
10115
10853
|
REGEX_BACKSLASH,
|
|
@@ -10138,7 +10876,7 @@ var require_utils2 = __commonJS({
|
|
|
10138
10876
|
if (options && typeof options.windows === "boolean") {
|
|
10139
10877
|
return options.windows;
|
|
10140
10878
|
}
|
|
10141
|
-
return win32 === true ||
|
|
10879
|
+
return win32 === true || path12.sep === "\\";
|
|
10142
10880
|
};
|
|
10143
10881
|
exports2.escapeLast = (input, char, lastIdx) => {
|
|
10144
10882
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -10732,7 +11470,7 @@ var require_parse3 = __commonJS({
|
|
|
10732
11470
|
}
|
|
10733
11471
|
return { risky: false };
|
|
10734
11472
|
}, "analyzeRepeatedExtglob");
|
|
10735
|
-
var
|
|
11473
|
+
var parse3 = /* @__PURE__ */ __name((input, options) => {
|
|
10736
11474
|
if (typeof input !== "string") {
|
|
10737
11475
|
throw new TypeError("Expected a string");
|
|
10738
11476
|
}
|
|
@@ -10903,7 +11641,7 @@ var require_parse3 = __commonJS({
|
|
|
10903
11641
|
output = token.close = `)$))${extglobStar}`;
|
|
10904
11642
|
}
|
|
10905
11643
|
if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
|
|
10906
|
-
const expression =
|
|
11644
|
+
const expression = parse3(rest, { ...options, fastpaths: false }).output;
|
|
10907
11645
|
output = token.close = `)${expression})${extglobStar})`;
|
|
10908
11646
|
}
|
|
10909
11647
|
if (token.prev.type === "bos") {
|
|
@@ -11428,7 +12166,7 @@ var require_parse3 = __commonJS({
|
|
|
11428
12166
|
}
|
|
11429
12167
|
return state2;
|
|
11430
12168
|
}, "parse");
|
|
11431
|
-
|
|
12169
|
+
parse3.fastpaths = (input, options) => {
|
|
11432
12170
|
const opts = { ...options };
|
|
11433
12171
|
const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
|
11434
12172
|
const len = input.length;
|
|
@@ -11494,7 +12232,7 @@ var require_parse3 = __commonJS({
|
|
|
11494
12232
|
}
|
|
11495
12233
|
return source;
|
|
11496
12234
|
};
|
|
11497
|
-
module2.exports =
|
|
12235
|
+
module2.exports = parse3;
|
|
11498
12236
|
}
|
|
11499
12237
|
});
|
|
11500
12238
|
|
|
@@ -11502,9 +12240,9 @@ var require_parse3 = __commonJS({
|
|
|
11502
12240
|
var require_picomatch = __commonJS({
|
|
11503
12241
|
"../../node_modules/micromatch/node_modules/picomatch/lib/picomatch.js"(exports2, module2) {
|
|
11504
12242
|
"use strict";
|
|
11505
|
-
var
|
|
12243
|
+
var path12 = require("path");
|
|
11506
12244
|
var scan = require_scan2();
|
|
11507
|
-
var
|
|
12245
|
+
var parse3 = require_parse3();
|
|
11508
12246
|
var utils = require_utils2();
|
|
11509
12247
|
var constants = require_constants3();
|
|
11510
12248
|
var isObject = /* @__PURE__ */ __name((val) => val && typeof val === "object" && !Array.isArray(val), "isObject");
|
|
@@ -11587,12 +12325,12 @@ var require_picomatch = __commonJS({
|
|
|
11587
12325
|
};
|
|
11588
12326
|
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
11589
12327
|
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
11590
|
-
return regex.test(
|
|
12328
|
+
return regex.test(path12.basename(input));
|
|
11591
12329
|
};
|
|
11592
12330
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
11593
12331
|
picomatch.parse = (pattern, options) => {
|
|
11594
12332
|
if (Array.isArray(pattern)) return pattern.map((p3) => picomatch.parse(p3, options));
|
|
11595
|
-
return
|
|
12333
|
+
return parse3(pattern, { ...options, fastpaths: false });
|
|
11596
12334
|
};
|
|
11597
12335
|
picomatch.scan = (input, options) => scan(input, options);
|
|
11598
12336
|
picomatch.compileRe = (state2, options, returnOutput = false, returnState = false) => {
|
|
@@ -11618,10 +12356,10 @@ var require_picomatch = __commonJS({
|
|
|
11618
12356
|
}
|
|
11619
12357
|
let parsed = { negated: false, fastpaths: true };
|
|
11620
12358
|
if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
|
|
11621
|
-
parsed.output =
|
|
12359
|
+
parsed.output = parse3.fastpaths(input, options);
|
|
11622
12360
|
}
|
|
11623
12361
|
if (!parsed.output) {
|
|
11624
|
-
parsed =
|
|
12362
|
+
parsed = parse3(input, options);
|
|
11625
12363
|
}
|
|
11626
12364
|
return picomatch.compileRe(parsed, options, returnOutput, returnState);
|
|
11627
12365
|
};
|
|
@@ -11814,7 +12552,7 @@ var require_pattern = __commonJS({
|
|
|
11814
12552
|
"use strict";
|
|
11815
12553
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
11816
12554
|
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;
|
|
11817
|
-
var
|
|
12555
|
+
var path12 = require("path");
|
|
11818
12556
|
var globParent = require_glob_parent();
|
|
11819
12557
|
var micromatch = require_micromatch();
|
|
11820
12558
|
var GLOBSTAR = "**";
|
|
@@ -11924,7 +12662,7 @@ var require_pattern = __commonJS({
|
|
|
11924
12662
|
__name(endsWithSlashGlobStar, "endsWithSlashGlobStar");
|
|
11925
12663
|
exports2.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
11926
12664
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
11927
|
-
const basename =
|
|
12665
|
+
const basename = path12.basename(pattern);
|
|
11928
12666
|
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
|
11929
12667
|
}
|
|
11930
12668
|
__name(isAffectDepthOfReadingPattern, "isAffectDepthOfReadingPattern");
|
|
@@ -11991,7 +12729,7 @@ var require_pattern = __commonJS({
|
|
|
11991
12729
|
__name(partitionAbsoluteAndRelative, "partitionAbsoluteAndRelative");
|
|
11992
12730
|
exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
11993
12731
|
function isAbsolute(pattern) {
|
|
11994
|
-
return
|
|
12732
|
+
return path12.isAbsolute(pattern);
|
|
11995
12733
|
}
|
|
11996
12734
|
__name(isAbsolute, "isAbsolute");
|
|
11997
12735
|
exports2.isAbsolute = isAbsolute;
|
|
@@ -12180,10 +12918,10 @@ var require_utils3 = __commonJS({
|
|
|
12180
12918
|
exports2.array = array;
|
|
12181
12919
|
var errno = require_errno();
|
|
12182
12920
|
exports2.errno = errno;
|
|
12183
|
-
var
|
|
12184
|
-
exports2.fs =
|
|
12185
|
-
var
|
|
12186
|
-
exports2.path =
|
|
12921
|
+
var fs13 = require_fs();
|
|
12922
|
+
exports2.fs = fs13;
|
|
12923
|
+
var path12 = require_path();
|
|
12924
|
+
exports2.path = path12;
|
|
12187
12925
|
var pattern = require_pattern();
|
|
12188
12926
|
exports2.pattern = pattern;
|
|
12189
12927
|
var stream = require_stream();
|
|
@@ -12303,8 +13041,8 @@ var require_async = __commonJS({
|
|
|
12303
13041
|
"use strict";
|
|
12304
13042
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12305
13043
|
exports2.read = void 0;
|
|
12306
|
-
function read(
|
|
12307
|
-
settings.fs.lstat(
|
|
13044
|
+
function read(path12, settings, callback) {
|
|
13045
|
+
settings.fs.lstat(path12, (lstatError, lstat) => {
|
|
12308
13046
|
if (lstatError !== null) {
|
|
12309
13047
|
callFailureCallback(callback, lstatError);
|
|
12310
13048
|
return;
|
|
@@ -12313,7 +13051,7 @@ var require_async = __commonJS({
|
|
|
12313
13051
|
callSuccessCallback(callback, lstat);
|
|
12314
13052
|
return;
|
|
12315
13053
|
}
|
|
12316
|
-
settings.fs.stat(
|
|
13054
|
+
settings.fs.stat(path12, (statError, stat) => {
|
|
12317
13055
|
if (statError !== null) {
|
|
12318
13056
|
if (settings.throwErrorOnBrokenSymbolicLink) {
|
|
12319
13057
|
callFailureCallback(callback, statError);
|
|
@@ -12348,13 +13086,13 @@ var require_sync = __commonJS({
|
|
|
12348
13086
|
"use strict";
|
|
12349
13087
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12350
13088
|
exports2.read = void 0;
|
|
12351
|
-
function read(
|
|
12352
|
-
const lstat = settings.fs.lstatSync(
|
|
13089
|
+
function read(path12, settings) {
|
|
13090
|
+
const lstat = settings.fs.lstatSync(path12);
|
|
12353
13091
|
if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
|
|
12354
13092
|
return lstat;
|
|
12355
13093
|
}
|
|
12356
13094
|
try {
|
|
12357
|
-
const stat = settings.fs.statSync(
|
|
13095
|
+
const stat = settings.fs.statSync(path12);
|
|
12358
13096
|
if (settings.markSymbolicLink) {
|
|
12359
13097
|
stat.isSymbolicLink = () => true;
|
|
12360
13098
|
}
|
|
@@ -12377,12 +13115,12 @@ var require_fs2 = __commonJS({
|
|
|
12377
13115
|
"use strict";
|
|
12378
13116
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12379
13117
|
exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
|
|
12380
|
-
var
|
|
13118
|
+
var fs13 = require("fs");
|
|
12381
13119
|
exports2.FILE_SYSTEM_ADAPTER = {
|
|
12382
|
-
lstat:
|
|
12383
|
-
stat:
|
|
12384
|
-
lstatSync:
|
|
12385
|
-
statSync:
|
|
13120
|
+
lstat: fs13.lstat,
|
|
13121
|
+
stat: fs13.stat,
|
|
13122
|
+
lstatSync: fs13.lstatSync,
|
|
13123
|
+
statSync: fs13.statSync
|
|
12386
13124
|
};
|
|
12387
13125
|
function createFileSystemAdapter(fsMethods) {
|
|
12388
13126
|
if (fsMethods === void 0) {
|
|
@@ -12400,7 +13138,7 @@ var require_settings = __commonJS({
|
|
|
12400
13138
|
"../../node_modules/@nodelib/fs.stat/out/settings.js"(exports2) {
|
|
12401
13139
|
"use strict";
|
|
12402
13140
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12403
|
-
var
|
|
13141
|
+
var fs13 = require_fs2();
|
|
12404
13142
|
var Settings = class {
|
|
12405
13143
|
static {
|
|
12406
13144
|
__name(this, "Settings");
|
|
@@ -12408,7 +13146,7 @@ var require_settings = __commonJS({
|
|
|
12408
13146
|
constructor(_options = {}) {
|
|
12409
13147
|
this._options = _options;
|
|
12410
13148
|
this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
|
|
12411
|
-
this.fs =
|
|
13149
|
+
this.fs = fs13.createFileSystemAdapter(this._options.fs);
|
|
12412
13150
|
this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
|
|
12413
13151
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
12414
13152
|
}
|
|
@@ -12430,18 +13168,18 @@ var require_out = __commonJS({
|
|
|
12430
13168
|
var sync = require_sync();
|
|
12431
13169
|
var settings_1 = require_settings();
|
|
12432
13170
|
exports2.Settings = settings_1.default;
|
|
12433
|
-
function stat(
|
|
13171
|
+
function stat(path12, optionsOrSettingsOrCallback, callback) {
|
|
12434
13172
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
12435
|
-
async.read(
|
|
13173
|
+
async.read(path12, getSettings(), optionsOrSettingsOrCallback);
|
|
12436
13174
|
return;
|
|
12437
13175
|
}
|
|
12438
|
-
async.read(
|
|
13176
|
+
async.read(path12, getSettings(optionsOrSettingsOrCallback), callback);
|
|
12439
13177
|
}
|
|
12440
13178
|
__name(stat, "stat");
|
|
12441
13179
|
exports2.stat = stat;
|
|
12442
|
-
function statSync3(
|
|
13180
|
+
function statSync3(path12, optionsOrSettings) {
|
|
12443
13181
|
const settings = getSettings(optionsOrSettings);
|
|
12444
|
-
return sync.read(
|
|
13182
|
+
return sync.read(path12, settings);
|
|
12445
13183
|
}
|
|
12446
13184
|
__name(statSync3, "statSync");
|
|
12447
13185
|
exports2.statSync = statSync3;
|
|
@@ -12574,8 +13312,8 @@ var require_utils4 = __commonJS({
|
|
|
12574
13312
|
"use strict";
|
|
12575
13313
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12576
13314
|
exports2.fs = void 0;
|
|
12577
|
-
var
|
|
12578
|
-
exports2.fs =
|
|
13315
|
+
var fs13 = require_fs3();
|
|
13316
|
+
exports2.fs = fs13;
|
|
12579
13317
|
}
|
|
12580
13318
|
});
|
|
12581
13319
|
|
|
@@ -12671,16 +13409,16 @@ var require_async2 = __commonJS({
|
|
|
12671
13409
|
return;
|
|
12672
13410
|
}
|
|
12673
13411
|
const tasks = names.map((name) => {
|
|
12674
|
-
const
|
|
13412
|
+
const path12 = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
|
|
12675
13413
|
return (done) => {
|
|
12676
|
-
fsStat.stat(
|
|
13414
|
+
fsStat.stat(path12, settings.fsStatSettings, (error2, stats) => {
|
|
12677
13415
|
if (error2 !== null) {
|
|
12678
13416
|
done(error2);
|
|
12679
13417
|
return;
|
|
12680
13418
|
}
|
|
12681
13419
|
const entry = {
|
|
12682
13420
|
name,
|
|
12683
|
-
path:
|
|
13421
|
+
path: path12,
|
|
12684
13422
|
dirent: utils.fs.createDirentFromStats(name, stats)
|
|
12685
13423
|
};
|
|
12686
13424
|
if (settings.stats) {
|
|
@@ -12780,14 +13518,14 @@ var require_fs4 = __commonJS({
|
|
|
12780
13518
|
"use strict";
|
|
12781
13519
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12782
13520
|
exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
|
|
12783
|
-
var
|
|
13521
|
+
var fs13 = require("fs");
|
|
12784
13522
|
exports2.FILE_SYSTEM_ADAPTER = {
|
|
12785
|
-
lstat:
|
|
12786
|
-
stat:
|
|
12787
|
-
lstatSync:
|
|
12788
|
-
statSync:
|
|
12789
|
-
readdir:
|
|
12790
|
-
readdirSync:
|
|
13523
|
+
lstat: fs13.lstat,
|
|
13524
|
+
stat: fs13.stat,
|
|
13525
|
+
lstatSync: fs13.lstatSync,
|
|
13526
|
+
statSync: fs13.statSync,
|
|
13527
|
+
readdir: fs13.readdir,
|
|
13528
|
+
readdirSync: fs13.readdirSync
|
|
12791
13529
|
};
|
|
12792
13530
|
function createFileSystemAdapter(fsMethods) {
|
|
12793
13531
|
if (fsMethods === void 0) {
|
|
@@ -12805,9 +13543,9 @@ var require_settings2 = __commonJS({
|
|
|
12805
13543
|
"../../node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) {
|
|
12806
13544
|
"use strict";
|
|
12807
13545
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
12808
|
-
var
|
|
13546
|
+
var path12 = require("path");
|
|
12809
13547
|
var fsStat = require_out();
|
|
12810
|
-
var
|
|
13548
|
+
var fs13 = require_fs4();
|
|
12811
13549
|
var Settings = class {
|
|
12812
13550
|
static {
|
|
12813
13551
|
__name(this, "Settings");
|
|
@@ -12815,8 +13553,8 @@ var require_settings2 = __commonJS({
|
|
|
12815
13553
|
constructor(_options = {}) {
|
|
12816
13554
|
this._options = _options;
|
|
12817
13555
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
12818
|
-
this.fs =
|
|
12819
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
13556
|
+
this.fs = fs13.createFileSystemAdapter(this._options.fs);
|
|
13557
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path12.sep);
|
|
12820
13558
|
this.stats = this._getValue(this._options.stats, false);
|
|
12821
13559
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
12822
13560
|
this.fsStatSettings = new fsStat.Settings({
|
|
@@ -12843,18 +13581,18 @@ var require_out2 = __commonJS({
|
|
|
12843
13581
|
var sync = require_sync2();
|
|
12844
13582
|
var settings_1 = require_settings2();
|
|
12845
13583
|
exports2.Settings = settings_1.default;
|
|
12846
|
-
function scandir(
|
|
13584
|
+
function scandir(path12, optionsOrSettingsOrCallback, callback) {
|
|
12847
13585
|
if (typeof optionsOrSettingsOrCallback === "function") {
|
|
12848
|
-
async.read(
|
|
13586
|
+
async.read(path12, getSettings(), optionsOrSettingsOrCallback);
|
|
12849
13587
|
return;
|
|
12850
13588
|
}
|
|
12851
|
-
async.read(
|
|
13589
|
+
async.read(path12, getSettings(optionsOrSettingsOrCallback), callback);
|
|
12852
13590
|
}
|
|
12853
13591
|
__name(scandir, "scandir");
|
|
12854
13592
|
exports2.scandir = scandir;
|
|
12855
|
-
function scandirSync(
|
|
13593
|
+
function scandirSync(path12, optionsOrSettings) {
|
|
12856
13594
|
const settings = getSettings(optionsOrSettings);
|
|
12857
|
-
return sync.read(
|
|
13595
|
+
return sync.read(path12, settings);
|
|
12858
13596
|
}
|
|
12859
13597
|
__name(scandirSync, "scandirSync");
|
|
12860
13598
|
exports2.scandirSync = scandirSync;
|
|
@@ -13551,7 +14289,7 @@ var require_settings3 = __commonJS({
|
|
|
13551
14289
|
"../../node_modules/@nodelib/fs.walk/out/settings.js"(exports2) {
|
|
13552
14290
|
"use strict";
|
|
13553
14291
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
13554
|
-
var
|
|
14292
|
+
var path12 = require("path");
|
|
13555
14293
|
var fsScandir = require_out2();
|
|
13556
14294
|
var Settings = class {
|
|
13557
14295
|
static {
|
|
@@ -13564,7 +14302,7 @@ var require_settings3 = __commonJS({
|
|
|
13564
14302
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
13565
14303
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
13566
14304
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
|
13567
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator,
|
|
14305
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path12.sep);
|
|
13568
14306
|
this.fsScandirSettings = new fsScandir.Settings({
|
|
13569
14307
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
13570
14308
|
fs: this._options.fs,
|
|
@@ -13630,7 +14368,7 @@ var require_reader2 = __commonJS({
|
|
|
13630
14368
|
"../../node_modules/fast-glob/out/readers/reader.js"(exports2) {
|
|
13631
14369
|
"use strict";
|
|
13632
14370
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
13633
|
-
var
|
|
14371
|
+
var path12 = require("path");
|
|
13634
14372
|
var fsStat = require_out();
|
|
13635
14373
|
var utils = require_utils3();
|
|
13636
14374
|
var Reader = class {
|
|
@@ -13646,7 +14384,7 @@ var require_reader2 = __commonJS({
|
|
|
13646
14384
|
});
|
|
13647
14385
|
}
|
|
13648
14386
|
_getFullEntryPath(filepath) {
|
|
13649
|
-
return
|
|
14387
|
+
return path12.resolve(this._settings.cwd, filepath);
|
|
13650
14388
|
}
|
|
13651
14389
|
_makeEntry(stats, pattern) {
|
|
13652
14390
|
const entry = {
|
|
@@ -14086,7 +14824,7 @@ var require_provider = __commonJS({
|
|
|
14086
14824
|
"../../node_modules/fast-glob/out/providers/provider.js"(exports2) {
|
|
14087
14825
|
"use strict";
|
|
14088
14826
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
14089
|
-
var
|
|
14827
|
+
var path12 = require("path");
|
|
14090
14828
|
var deep_1 = require_deep();
|
|
14091
14829
|
var entry_1 = require_entry();
|
|
14092
14830
|
var error_1 = require_error();
|
|
@@ -14103,7 +14841,7 @@ var require_provider = __commonJS({
|
|
|
14103
14841
|
this.entryTransformer = new entry_2.default(this._settings);
|
|
14104
14842
|
}
|
|
14105
14843
|
_getRootDirectory(task) {
|
|
14106
|
-
return
|
|
14844
|
+
return path12.resolve(this._settings.cwd, task.base);
|
|
14107
14845
|
}
|
|
14108
14846
|
_getReaderOptions(task) {
|
|
14109
14847
|
const basePath = task.base === "." ? "" : task.base;
|
|
@@ -14296,16 +15034,16 @@ var require_settings4 = __commonJS({
|
|
|
14296
15034
|
"use strict";
|
|
14297
15035
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
14298
15036
|
exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
14299
|
-
var
|
|
15037
|
+
var fs13 = require("fs");
|
|
14300
15038
|
var os5 = require("os");
|
|
14301
15039
|
var CPU_COUNT = Math.max(os5.cpus().length, 1);
|
|
14302
15040
|
exports2.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
14303
|
-
lstat:
|
|
14304
|
-
lstatSync:
|
|
14305
|
-
stat:
|
|
14306
|
-
statSync:
|
|
14307
|
-
readdir:
|
|
14308
|
-
readdirSync:
|
|
15041
|
+
lstat: fs13.lstat,
|
|
15042
|
+
lstatSync: fs13.lstatSync,
|
|
15043
|
+
stat: fs13.stat,
|
|
15044
|
+
statSync: fs13.statSync,
|
|
15045
|
+
readdir: fs13.readdir,
|
|
15046
|
+
readdirSync: fs13.readdirSync
|
|
14309
15047
|
};
|
|
14310
15048
|
var Settings = class {
|
|
14311
15049
|
static {
|
|
@@ -14783,7 +15521,7 @@ var require_dist = __commonJS({
|
|
|
14783
15521
|
// ../../node_modules/yazl/index.js
|
|
14784
15522
|
var require_yazl = __commonJS({
|
|
14785
15523
|
"../../node_modules/yazl/index.js"(exports2) {
|
|
14786
|
-
var
|
|
15524
|
+
var fs13 = require("fs");
|
|
14787
15525
|
var Transform = require("stream").Transform;
|
|
14788
15526
|
var PassThrough2 = require("stream").PassThrough;
|
|
14789
15527
|
var zlib2 = require("zlib");
|
|
@@ -14814,14 +15552,14 @@ var require_yazl = __commonJS({
|
|
|
14814
15552
|
if (shouldIgnoreAdding(self2)) return;
|
|
14815
15553
|
var entry = new Entry(metadataPath, false, options);
|
|
14816
15554
|
self2.entries.push(entry);
|
|
14817
|
-
|
|
15555
|
+
fs13.stat(realPath, function(err, stats) {
|
|
14818
15556
|
if (err) return self2.emit("error", err);
|
|
14819
15557
|
if (!stats.isFile()) return self2.emit("error", new Error("not a file: " + realPath));
|
|
14820
15558
|
entry.uncompressedSize = stats.size;
|
|
14821
15559
|
if (options.mtime == null) entry.setLastModDate(stats.mtime);
|
|
14822
15560
|
if (options.mode == null) entry.setFileAttributesMode(stats.mode);
|
|
14823
15561
|
entry.setFileDataPumpFunction(function() {
|
|
14824
|
-
var readStream =
|
|
15562
|
+
var readStream = fs13.createReadStream(realPath);
|
|
14825
15563
|
entry.state = Entry.FILE_DATA_IN_PROGRESS;
|
|
14826
15564
|
readStream.on("error", function(err2) {
|
|
14827
15565
|
self2.emit("error", err2);
|
|
@@ -15491,7 +16229,7 @@ var require_zip = __commonJS({
|
|
|
15491
16229
|
exports2.zipDirectory = zipDirectory2;
|
|
15492
16230
|
exports2.zipString = zipString;
|
|
15493
16231
|
var fs_1 = require("fs");
|
|
15494
|
-
var
|
|
16232
|
+
var path12 = __importStar2(require("path"));
|
|
15495
16233
|
var fast_glob_1 = require_out4();
|
|
15496
16234
|
var yazl_1 = require_yazl();
|
|
15497
16235
|
function epoch() {
|
|
@@ -15539,7 +16277,7 @@ var require_zip = __commonJS({
|
|
|
15539
16277
|
output.once("close", ok);
|
|
15540
16278
|
zip.outputStream.pipe(output);
|
|
15541
16279
|
for (const file of files) {
|
|
15542
|
-
const fullPath =
|
|
16280
|
+
const fullPath = path12.resolve(directory, file);
|
|
15543
16281
|
const [data2, stat] = await Promise.all([fs_1.promises.readFile(fullPath), fs_1.promises.stat(fullPath)]);
|
|
15544
16282
|
zip.addBuffer(data2, file, {
|
|
15545
16283
|
mtime: epoch(),
|
|
@@ -15611,13 +16349,13 @@ async function cached(cache6, key, factory) {
|
|
|
15611
16349
|
cache6.set(key, fresh);
|
|
15612
16350
|
return fresh;
|
|
15613
16351
|
}
|
|
15614
|
-
var import_fs,
|
|
16352
|
+
var import_fs, path10, import_cloud_assembly_schema2, mime, EMPTY_ZIP_FILE_SIZE, FileAssetHandler, BucketInformation;
|
|
15615
16353
|
var init_files = __esm({
|
|
15616
16354
|
"../@aws-cdk/cdk-assets-lib/lib/private/handlers/files.ts"() {
|
|
15617
16355
|
"use strict";
|
|
15618
16356
|
import_fs = require("fs");
|
|
15619
|
-
|
|
15620
|
-
|
|
16357
|
+
path10 = __toESM(require("path"));
|
|
16358
|
+
import_cloud_assembly_schema2 = __toESM(require_lib2());
|
|
15621
16359
|
mime = __toESM(require_mime());
|
|
15622
16360
|
init_client_options();
|
|
15623
16361
|
init_progress();
|
|
@@ -15631,7 +16369,7 @@ var init_files = __esm({
|
|
|
15631
16369
|
this.workDir = workDir;
|
|
15632
16370
|
this.asset = asset;
|
|
15633
16371
|
this.host = host;
|
|
15634
|
-
this.fileCacheRoot =
|
|
16372
|
+
this.fileCacheRoot = path10.join(workDir, ".cache");
|
|
15635
16373
|
}
|
|
15636
16374
|
workDir;
|
|
15637
16375
|
asset;
|
|
@@ -15760,11 +16498,11 @@ var init_files = __esm({
|
|
|
15760
16498
|
`'path' is expected in the File asset source, got: ${JSON.stringify(source)}`
|
|
15761
16499
|
);
|
|
15762
16500
|
}
|
|
15763
|
-
const fullPath =
|
|
15764
|
-
if (source.packaging ===
|
|
16501
|
+
const fullPath = path10.resolve(this.workDir, source.path);
|
|
16502
|
+
if (source.packaging === import_cloud_assembly_schema2.FileAssetPackaging.ZIP_DIRECTORY) {
|
|
15765
16503
|
const contentType = "application/zip";
|
|
15766
16504
|
await import_fs.promises.mkdir(this.fileCacheRoot, { recursive: true });
|
|
15767
|
-
const packagedPath =
|
|
16505
|
+
const packagedPath = path10.join(this.fileCacheRoot, `${this.asset.id.assetId}.zip`);
|
|
15768
16506
|
if (await pathExists(packagedPath)) {
|
|
15769
16507
|
this.host.emitMessage("cached" /* CACHED */, `From cache ${packagedPath}`);
|
|
15770
16508
|
return { packagedPath, contentType };
|
|
@@ -15903,13 +16641,13 @@ function prefixTreeChars(xs, prefix = "") {
|
|
|
15903
16641
|
}
|
|
15904
16642
|
return ret;
|
|
15905
16643
|
}
|
|
15906
|
-
var
|
|
16644
|
+
var fs11, path11, import_cloud_assembly_schema3, AssetManifest, ASSET_TYPES, FileManifestEntry, DockerImageManifestEntry, DestinationIdentifier, DestinationPattern;
|
|
15907
16645
|
var init_asset_manifest = __esm({
|
|
15908
16646
|
"../@aws-cdk/cdk-assets-lib/lib/asset-manifest.ts"() {
|
|
15909
16647
|
"use strict";
|
|
15910
|
-
|
|
15911
|
-
|
|
15912
|
-
|
|
16648
|
+
fs11 = __toESM(require("fs"));
|
|
16649
|
+
path11 = __toESM(require("path"));
|
|
16650
|
+
import_cloud_assembly_schema3 = __toESM(require_lib2());
|
|
15913
16651
|
AssetManifest = class _AssetManifest {
|
|
15914
16652
|
constructor(directory, manifest) {
|
|
15915
16653
|
this.manifest = manifest;
|
|
@@ -15928,8 +16666,8 @@ var init_asset_manifest = __esm({
|
|
|
15928
16666
|
*/
|
|
15929
16667
|
static fromFile(fileName) {
|
|
15930
16668
|
try {
|
|
15931
|
-
const obj =
|
|
15932
|
-
return new _AssetManifest(
|
|
16669
|
+
const obj = import_cloud_assembly_schema3.Manifest.loadAssetManifest(fileName);
|
|
16670
|
+
return new _AssetManifest(path11.dirname(fileName), obj);
|
|
15933
16671
|
} catch (e6) {
|
|
15934
16672
|
throw new Error(`Cannot read asset manifest '${fileName}': ${e6.message}`);
|
|
15935
16673
|
}
|
|
@@ -15942,12 +16680,12 @@ var init_asset_manifest = __esm({
|
|
|
15942
16680
|
static fromPath(filePath) {
|
|
15943
16681
|
let st;
|
|
15944
16682
|
try {
|
|
15945
|
-
st =
|
|
16683
|
+
st = fs11.statSync(filePath);
|
|
15946
16684
|
} catch (e6) {
|
|
15947
16685
|
throw new Error(`Cannot read asset manifest at '${filePath}': ${e6.message}`);
|
|
15948
16686
|
}
|
|
15949
16687
|
if (st.isDirectory()) {
|
|
15950
|
-
return _AssetManifest.fromFile(
|
|
16688
|
+
return _AssetManifest.fromFile(path11.join(filePath, _AssetManifest.DEFAULT_FILENAME));
|
|
15951
16689
|
}
|
|
15952
16690
|
return _AssetManifest.fromFile(filePath);
|
|
15953
16691
|
}
|
|
@@ -20446,14 +21184,14 @@ var init_readFile = __esm({
|
|
|
20446
21184
|
import_promises2 = require("node:fs/promises");
|
|
20447
21185
|
filePromises = {};
|
|
20448
21186
|
fileIntercept = {};
|
|
20449
|
-
readFile2 = /* @__PURE__ */ __name((
|
|
20450
|
-
if (fileIntercept[
|
|
20451
|
-
return fileIntercept[
|
|
21187
|
+
readFile2 = /* @__PURE__ */ __name((path12, options) => {
|
|
21188
|
+
if (fileIntercept[path12] !== void 0) {
|
|
21189
|
+
return fileIntercept[path12];
|
|
20452
21190
|
}
|
|
20453
|
-
if (!filePromises[
|
|
20454
|
-
filePromises[
|
|
21191
|
+
if (!filePromises[path12] || options?.ignoreCache) {
|
|
21192
|
+
filePromises[path12] = (0, import_promises2.readFile)(path12, "utf8");
|
|
20455
21193
|
}
|
|
20456
|
-
return filePromises[
|
|
21194
|
+
return filePromises[path12];
|
|
20457
21195
|
}, "readFile");
|
|
20458
21196
|
}
|
|
20459
21197
|
});
|
|
@@ -20565,8 +21303,8 @@ var init_externalDataInterceptor = __esm({
|
|
|
20565
21303
|
getFileRecord() {
|
|
20566
21304
|
return fileIntercept;
|
|
20567
21305
|
},
|
|
20568
|
-
interceptFile(
|
|
20569
|
-
fileIntercept[
|
|
21306
|
+
interceptFile(path12, contents) {
|
|
21307
|
+
fileIntercept[path12] = Promise.resolve(contents);
|
|
20570
21308
|
},
|
|
20571
21309
|
getTokenRecord() {
|
|
20572
21310
|
return tokenIntercept;
|
|
@@ -21341,8 +22079,8 @@ var init_createConfigValueProvider = __esm({
|
|
|
21341
22079
|
return endpoint.url.href;
|
|
21342
22080
|
}
|
|
21343
22081
|
if ("hostname" in endpoint) {
|
|
21344
|
-
const { protocol, hostname, port, path:
|
|
21345
|
-
return `${protocol}//${hostname}${port ? ":" + port : ""}${
|
|
22082
|
+
const { protocol, hostname, port, path: path12 } = endpoint;
|
|
22083
|
+
return `${protocol}//${hostname}${port ? ":" + port : ""}${path12}`;
|
|
21346
22084
|
}
|
|
21347
22085
|
}
|
|
21348
22086
|
return endpoint;
|
|
@@ -21773,18 +22511,18 @@ var getAttrPathList;
|
|
|
21773
22511
|
var init_getAttrPathList = __esm({
|
|
21774
22512
|
"../../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttrPathList.js"() {
|
|
21775
22513
|
init_types2();
|
|
21776
|
-
getAttrPathList = /* @__PURE__ */ __name((
|
|
21777
|
-
const parts =
|
|
22514
|
+
getAttrPathList = /* @__PURE__ */ __name((path12) => {
|
|
22515
|
+
const parts = path12.split(".");
|
|
21778
22516
|
const pathList = [];
|
|
21779
22517
|
for (const part of parts) {
|
|
21780
22518
|
const squareBracketIndex = part.indexOf("[");
|
|
21781
22519
|
if (squareBracketIndex !== -1) {
|
|
21782
22520
|
if (part.indexOf("]") !== part.length - 1) {
|
|
21783
|
-
throw new EndpointError(`Path: '${
|
|
22521
|
+
throw new EndpointError(`Path: '${path12}' does not end with ']'`);
|
|
21784
22522
|
}
|
|
21785
22523
|
const arrayIndex = part.slice(squareBracketIndex + 1, -1);
|
|
21786
22524
|
if (Number.isNaN(parseInt(arrayIndex))) {
|
|
21787
|
-
throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${
|
|
22525
|
+
throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path12}'`);
|
|
21788
22526
|
}
|
|
21789
22527
|
if (squareBracketIndex !== 0) {
|
|
21790
22528
|
pathList.push(part.slice(0, squareBracketIndex));
|
|
@@ -21805,9 +22543,9 @@ var init_getAttr = __esm({
|
|
|
21805
22543
|
"../../node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/getAttr.js"() {
|
|
21806
22544
|
init_types2();
|
|
21807
22545
|
init_getAttrPathList();
|
|
21808
|
-
getAttr = /* @__PURE__ */ __name((value,
|
|
22546
|
+
getAttr = /* @__PURE__ */ __name((value, path12) => getAttrPathList(path12).reduce((acc, index) => {
|
|
21809
22547
|
if (typeof acc !== "object") {
|
|
21810
|
-
throw new EndpointError(`Index '${index}' in '${
|
|
22548
|
+
throw new EndpointError(`Index '${index}' in '${path12}' not found in '${JSON.stringify(value)}'`);
|
|
21811
22549
|
} else if (Array.isArray(acc)) {
|
|
21812
22550
|
const i6 = parseInt(index);
|
|
21813
22551
|
return acc[i6 < 0 ? acc.length + i6 : i6];
|
|
@@ -21869,8 +22607,8 @@ var init_parseURL = __esm({
|
|
|
21869
22607
|
return value;
|
|
21870
22608
|
}
|
|
21871
22609
|
if (typeof value === "object" && "hostname" in value) {
|
|
21872
|
-
const { hostname: hostname2, port, protocol: protocol2 = "", path:
|
|
21873
|
-
const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${
|
|
22610
|
+
const { hostname: hostname2, port, protocol: protocol2 = "", path: path12 = "", query = {} } = value;
|
|
22611
|
+
const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : ""}${path12}`);
|
|
21874
22612
|
url.search = Object.entries(query).map(([k6, v]) => `${k6}=${v}`).join("&");
|
|
21875
22613
|
return url;
|
|
21876
22614
|
}
|
|
@@ -25573,11 +26311,11 @@ var init_HttpBindingProtocol = __esm({
|
|
|
25573
26311
|
const opTraits = translateTraits(operationSchema.traits);
|
|
25574
26312
|
if (opTraits.http) {
|
|
25575
26313
|
request.method = opTraits.http[0];
|
|
25576
|
-
const [
|
|
26314
|
+
const [path12, search] = opTraits.http[1].split("?");
|
|
25577
26315
|
if (request.path == "/") {
|
|
25578
|
-
request.path =
|
|
26316
|
+
request.path = path12;
|
|
25579
26317
|
} else {
|
|
25580
|
-
request.path +=
|
|
26318
|
+
request.path += path12;
|
|
25581
26319
|
}
|
|
25582
26320
|
const traitSearchParams = new URLSearchParams(search ?? "");
|
|
25583
26321
|
for (const [key, value] of traitSearchParams) {
|
|
@@ -25985,8 +26723,8 @@ var init_requestBuilder = __esm({
|
|
|
25985
26723
|
return this;
|
|
25986
26724
|
}
|
|
25987
26725
|
p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {
|
|
25988
|
-
this.resolvePathStack.push((
|
|
25989
|
-
this.path = resolvedPath(
|
|
26726
|
+
this.resolvePathStack.push((path12) => {
|
|
26727
|
+
this.path = resolvedPath(path12, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);
|
|
25990
26728
|
});
|
|
25991
26729
|
return this;
|
|
25992
26730
|
}
|
|
@@ -28121,9 +28859,9 @@ var init_createPaginator = __esm({
|
|
|
28121
28859
|
return await client.send(command6, ...args);
|
|
28122
28860
|
}, "makePagedClientRequest");
|
|
28123
28861
|
__name(createPaginator, "createPaginator");
|
|
28124
|
-
get = /* @__PURE__ */ __name((fromObject,
|
|
28862
|
+
get = /* @__PURE__ */ __name((fromObject, path12) => {
|
|
28125
28863
|
let cursor2 = fromObject;
|
|
28126
|
-
const pathComponents =
|
|
28864
|
+
const pathComponents = path12.split(".");
|
|
28127
28865
|
for (const step of pathComponents) {
|
|
28128
28866
|
if (!cursor2 || typeof cursor2 !== "object") {
|
|
28129
28867
|
return void 0;
|
|
@@ -28930,12 +29668,12 @@ var import_node_path6, getNodeModulesParentDirs;
|
|
|
28930
29668
|
var init_getNodeModulesParentDirs = __esm({
|
|
28931
29669
|
"../../node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getNodeModulesParentDirs.js"() {
|
|
28932
29670
|
import_node_path6 = require("node:path");
|
|
28933
|
-
getNodeModulesParentDirs = /* @__PURE__ */ __name((
|
|
29671
|
+
getNodeModulesParentDirs = /* @__PURE__ */ __name((dirname3) => {
|
|
28934
29672
|
const cwd = process.cwd();
|
|
28935
|
-
if (!
|
|
29673
|
+
if (!dirname3) {
|
|
28936
29674
|
return [cwd];
|
|
28937
29675
|
}
|
|
28938
|
-
const normalizedPath = (0, import_node_path6.normalize)(
|
|
29676
|
+
const normalizedPath = (0, import_node_path6.normalize)(dirname3);
|
|
28939
29677
|
const parts = normalizedPath.split(import_node_path6.sep);
|
|
28940
29678
|
const nodeModulesIndex = parts.indexOf("node_modules");
|
|
28941
29679
|
const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(import_node_path6.sep) : normalizedPath;
|
|
@@ -29010,8 +29748,8 @@ var init_getTypeScriptUserAgentPair = __esm({
|
|
|
29010
29748
|
tscVersion = null;
|
|
29011
29749
|
return void 0;
|
|
29012
29750
|
}
|
|
29013
|
-
const
|
|
29014
|
-
const nodeModulesParentDirs = getNodeModulesParentDirs(
|
|
29751
|
+
const dirname3 = typeof __dirname !== "undefined" ? __dirname : void 0;
|
|
29752
|
+
const nodeModulesParentDirs = getNodeModulesParentDirs(dirname3);
|
|
29015
29753
|
let versionFromApp;
|
|
29016
29754
|
for (const nodeModulesParentDir of nodeModulesParentDirs) {
|
|
29017
29755
|
try {
|
|
@@ -29972,8 +30710,8 @@ var init_createUserAgentStringParsingProvider = __esm({
|
|
|
29972
30710
|
"../../node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/createUserAgentStringParsingProvider.js"() {
|
|
29973
30711
|
createUserAgentStringParsingProvider = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => async (config) => {
|
|
29974
30712
|
const module2 = await Promise.resolve().then(() => __toESM(require_es5()));
|
|
29975
|
-
const
|
|
29976
|
-
const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent ?
|
|
30713
|
+
const parse3 = module2.parse ?? module2.default.parse ?? (() => "");
|
|
30714
|
+
const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent ? parse3(window.navigator.userAgent) : void 0;
|
|
29977
30715
|
const sections = [
|
|
29978
30716
|
["aws-sdk-js", clientVersion],
|
|
29979
30717
|
["ua", "2.1"],
|
|
@@ -30778,10 +31516,10 @@ ${longDate}
|
|
|
30778
31516
|
${credentialScope}
|
|
30779
31517
|
${toHex2(hashedRequest)}`;
|
|
30780
31518
|
}
|
|
30781
|
-
getCanonicalPath({ path:
|
|
31519
|
+
getCanonicalPath({ path: path12 }) {
|
|
30782
31520
|
if (this.uriEscapePath) {
|
|
30783
31521
|
const normalizedPathSegments = [];
|
|
30784
|
-
for (const pathSegment of
|
|
31522
|
+
for (const pathSegment of path12.split("/")) {
|
|
30785
31523
|
if (pathSegment?.length === 0)
|
|
30786
31524
|
continue;
|
|
30787
31525
|
if (pathSegment === ".")
|
|
@@ -30792,11 +31530,11 @@ ${toHex2(hashedRequest)}`;
|
|
|
30792
31530
|
normalizedPathSegments.push(pathSegment);
|
|
30793
31531
|
}
|
|
30794
31532
|
}
|
|
30795
|
-
const normalizedPath = `${
|
|
31533
|
+
const normalizedPath = `${path12?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path12?.endsWith("/") ? "/" : ""}`;
|
|
30796
31534
|
const doubleEncoded = escapeUri2(normalizedPath);
|
|
30797
31535
|
return doubleEncoded.replace(/%2F/g, "/");
|
|
30798
31536
|
}
|
|
30799
|
-
return
|
|
31537
|
+
return path12;
|
|
30800
31538
|
}
|
|
30801
31539
|
validateResolvedCredentials(credentials) {
|
|
30802
31540
|
if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") {
|
|
@@ -31947,12 +32685,12 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
31947
32685
|
const password = request.password ?? "";
|
|
31948
32686
|
auth = `${username}:${password}`;
|
|
31949
32687
|
}
|
|
31950
|
-
let
|
|
32688
|
+
let path12 = request.path;
|
|
31951
32689
|
if (queryString) {
|
|
31952
|
-
|
|
32690
|
+
path12 += `?${queryString}`;
|
|
31953
32691
|
}
|
|
31954
32692
|
if (request.fragment) {
|
|
31955
|
-
|
|
32693
|
+
path12 += `#${request.fragment}`;
|
|
31956
32694
|
}
|
|
31957
32695
|
let hostname = request.hostname ?? "";
|
|
31958
32696
|
if (hostname[0] === "[" && hostname.endsWith("]")) {
|
|
@@ -31964,7 +32702,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
31964
32702
|
headers: request.headers,
|
|
31965
32703
|
host: hostname,
|
|
31966
32704
|
method: request.method,
|
|
31967
|
-
path:
|
|
32705
|
+
path: path12,
|
|
31968
32706
|
port: request.port,
|
|
31969
32707
|
agent,
|
|
31970
32708
|
auth
|
|
@@ -32379,16 +33117,16 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
32379
33117
|
reject(err);
|
|
32380
33118
|
}, "rejectWithDestroy");
|
|
32381
33119
|
const queryString = query ? buildQueryString2(query) : "";
|
|
32382
|
-
let
|
|
33120
|
+
let path12 = request.path;
|
|
32383
33121
|
if (queryString) {
|
|
32384
|
-
|
|
33122
|
+
path12 += `?${queryString}`;
|
|
32385
33123
|
}
|
|
32386
33124
|
if (request.fragment) {
|
|
32387
|
-
|
|
33125
|
+
path12 += `#${request.fragment}`;
|
|
32388
33126
|
}
|
|
32389
33127
|
const clientHttp2Stream = session.request({
|
|
32390
33128
|
...request.headers,
|
|
32391
|
-
[constants.HTTP2_HEADER_PATH]:
|
|
33129
|
+
[constants.HTTP2_HEADER_PATH]: path12,
|
|
32392
33130
|
[constants.HTTP2_HEADER_METHOD]: method
|
|
32393
33131
|
});
|
|
32394
33132
|
if (effectiveRequestTimeout) {
|
|
@@ -32470,7 +33208,7 @@ var require_dist_cjs6 = __commonJS({
|
|
|
32470
33208
|
var { setCredentialFeature: setCredentialFeature2 } = (init_client3(), __toCommonJS(client_exports2));
|
|
32471
33209
|
var { CredentialsProviderError: CredentialsProviderError2 } = (init_config2(), __toCommonJS(config_exports));
|
|
32472
33210
|
var { NodeHttpHandler } = require_dist_cjs5();
|
|
32473
|
-
var
|
|
33211
|
+
var fs13 = require("node:fs/promises");
|
|
32474
33212
|
var { HttpRequest: HttpRequest2 } = (init_protocols(), __toCommonJS(protocols_exports));
|
|
32475
33213
|
var { sdkStreamMixin: sdkStreamMixin3, parseRfc3339DateTime: parseRfc3339DateTime2 } = (init_serde(), __toCommonJS(serde_exports));
|
|
32476
33214
|
var ECS_CONTAINER_HOST = "169.254.170.2";
|
|
@@ -32598,7 +33336,7 @@ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
|
|
|
32598
33336
|
if (token) {
|
|
32599
33337
|
request.headers.Authorization = token;
|
|
32600
33338
|
} else if (tokenFile) {
|
|
32601
|
-
request.headers.Authorization = (await
|
|
33339
|
+
request.headers.Authorization = (await fs13.readFile(tokenFile)).toString();
|
|
32602
33340
|
}
|
|
32603
33341
|
try {
|
|
32604
33342
|
const result = await requestHandler.handle(request, { requestTimeout });
|
|
@@ -33987,11 +34725,11 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|
|
33987
34725
|
}
|
|
33988
34726
|
}
|
|
33989
34727
|
const { service, operation: operation2 } = getSmithyContext(context);
|
|
33990
|
-
const
|
|
34728
|
+
const path12 = `/service/${service}/operation/${operation2}`;
|
|
33991
34729
|
if (request.path.endsWith("/")) {
|
|
33992
|
-
request.path +=
|
|
34730
|
+
request.path += path12.slice(1);
|
|
33993
34731
|
} else {
|
|
33994
|
-
request.path +=
|
|
34732
|
+
request.path += path12;
|
|
33995
34733
|
}
|
|
33996
34734
|
return request;
|
|
33997
34735
|
}
|
|
@@ -39363,7 +40101,7 @@ var require_dist_cjs10 = __commonJS({
|
|
|
39363
40101
|
var { createHash: createHash6, createPrivateKey, createPublicKey, sign: sign3 } = require("node:crypto");
|
|
39364
40102
|
var { promises: promises2 } = require("node:fs");
|
|
39365
40103
|
var { homedir: homedir3 } = require("node:os");
|
|
39366
|
-
var { dirname:
|
|
40104
|
+
var { dirname: dirname3, join: join15 } = require("node:path");
|
|
39367
40105
|
var LoginCredentialsFetcher = class _LoginCredentialsFetcher {
|
|
39368
40106
|
static {
|
|
39369
40107
|
__name(this, "LoginCredentialsFetcher");
|
|
@@ -39514,7 +40252,7 @@ var require_dist_cjs10 = __commonJS({
|
|
|
39514
40252
|
}
|
|
39515
40253
|
async saveToken(token) {
|
|
39516
40254
|
const tokenFilePath = this.getTokenFilePath();
|
|
39517
|
-
const directory =
|
|
40255
|
+
const directory = dirname3(tokenFilePath);
|
|
39518
40256
|
try {
|
|
39519
40257
|
await promises2.mkdir(directory, { recursive: true });
|
|
39520
40258
|
} catch (error2) {
|
|
@@ -39522,10 +40260,10 @@ var require_dist_cjs10 = __commonJS({
|
|
|
39522
40260
|
await promises2.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8");
|
|
39523
40261
|
}
|
|
39524
40262
|
getTokenFilePath() {
|
|
39525
|
-
const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ??
|
|
40263
|
+
const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? join15(homedir3(), ".aws", "login", "cache");
|
|
39526
40264
|
const loginSessionBytes = Buffer.from(this.loginSession, "utf8");
|
|
39527
40265
|
const loginSessionSha256 = createHash6("sha256").update(loginSessionBytes).digest("hex");
|
|
39528
|
-
return
|
|
40266
|
+
return join15(directory, `${loginSessionSha256}.json`);
|
|
39529
40267
|
}
|
|
39530
40268
|
derToRawSignature(derSignature) {
|
|
39531
40269
|
let offset = 2;
|
|
@@ -41108,7 +41846,7 @@ var require_dist_cjs13 = __commonJS({
|
|
|
41108
41846
|
"../../node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js"(exports2) {
|
|
41109
41847
|
var { setCredentialFeature: setCredentialFeature2 } = (init_client3(), __toCommonJS(client_exports2));
|
|
41110
41848
|
var { CredentialsProviderError: CredentialsProviderError2, externalDataInterceptor: externalDataInterceptor2 } = (init_config2(), __toCommonJS(config_exports));
|
|
41111
|
-
var { readFileSync:
|
|
41849
|
+
var { readFileSync: readFileSync7 } = require("node:fs");
|
|
41112
41850
|
var fromWebToken = /* @__PURE__ */ __name((init) => async (awsIdentityProperties) => {
|
|
41113
41851
|
init.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");
|
|
41114
41852
|
const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;
|
|
@@ -41149,7 +41887,7 @@ var require_dist_cjs13 = __commonJS({
|
|
|
41149
41887
|
}
|
|
41150
41888
|
const credentials = await fromWebToken({
|
|
41151
41889
|
...init,
|
|
41152
|
-
webIdentityToken: externalDataInterceptor2?.getTokenRecord?.()[webIdentityTokenFile] ??
|
|
41890
|
+
webIdentityToken: externalDataInterceptor2?.getTokenRecord?.()[webIdentityTokenFile] ?? readFileSync7(webIdentityTokenFile, { encoding: "ascii" }),
|
|
41153
41891
|
roleArn,
|
|
41154
41892
|
roleSessionName
|
|
41155
41893
|
})(awsIdentityProperties);
|
|
@@ -48028,11 +48766,11 @@ var init_throw_200_exceptions = __esm({
|
|
|
48028
48766
|
});
|
|
48029
48767
|
|
|
48030
48768
|
// ../../node_modules/@aws-sdk/core/dist-es/submodules/util/util-arn-parser/arn.js
|
|
48031
|
-
var validate,
|
|
48769
|
+
var validate, parse2;
|
|
48032
48770
|
var init_arn = __esm({
|
|
48033
48771
|
"../../node_modules/@aws-sdk/core/dist-es/submodules/util/util-arn-parser/arn.js"() {
|
|
48034
48772
|
validate = /* @__PURE__ */ __name((str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6, "validate");
|
|
48035
|
-
|
|
48773
|
+
parse2 = /* @__PURE__ */ __name((arn) => {
|
|
48036
48774
|
const segments = arn.split(":");
|
|
48037
48775
|
if (segments.length < 6 || segments[0] !== "arn")
|
|
48038
48776
|
throw new Error("Malformed ARN");
|
|
@@ -48427,7 +49165,7 @@ var init_bucketEndpointMiddleware = __esm({
|
|
|
48427
49165
|
if (options.bucketEndpoint) {
|
|
48428
49166
|
request.hostname = bucketName;
|
|
48429
49167
|
} else if (validate(bucketName)) {
|
|
48430
|
-
const bucketArn =
|
|
49168
|
+
const bucketArn = parse2(bucketName);
|
|
48431
49169
|
const clientRegion = await options.region();
|
|
48432
49170
|
const useDualstackEndpoint = await options.useDualstackEndpoint();
|
|
48433
49171
|
const useFipsEndpoint = await options.useFipsEndpoint();
|
|
@@ -64848,7 +65586,7 @@ var __importStar = exports && exports.__importStar || /* @__PURE__ */ (function(
|
|
|
64848
65586
|
};
|
|
64849
65587
|
})();
|
|
64850
65588
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
64851
|
-
var
|
|
65589
|
+
var fs12 = __importStar(require("fs"));
|
|
64852
65590
|
var cdk_assets_lib_1 = require_lib4();
|
|
64853
65591
|
var docker_credentials_1 = (init_docker_credentials(), __toCommonJS(docker_credentials_exports));
|
|
64854
65592
|
async function main() {
|
|
@@ -64859,9 +65597,9 @@ async function main() {
|
|
|
64859
65597
|
if (!config) {
|
|
64860
65598
|
throw new Error(`unable to find CDK Docker credentials at: ${(0, docker_credentials_1.cdkCredentialsConfigFile)()}`);
|
|
64861
65599
|
}
|
|
64862
|
-
let endpoint =
|
|
65600
|
+
let endpoint = fs12.readFileSync(0, { encoding: "utf-8" }).trim();
|
|
64863
65601
|
const credentials = await (0, docker_credentials_1.fetchDockerLoginCredentials)(new cdk_assets_lib_1.DefaultAwsClient(), config, endpoint);
|
|
64864
|
-
|
|
65602
|
+
fs12.writeFileSync(1, JSON.stringify(credentials));
|
|
64865
65603
|
}
|
|
64866
65604
|
__name(main, "main");
|
|
64867
65605
|
main().catch((e6) => {
|