@aws-cdk/integ-runner 2.178.2-alpha.0 → 2.180.0-alpha.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 +20 -0
- package/lib/index.js +2 -2
- package/lib/recommended-feature-flags.json +2 -1
- package/lib/runner/runner-base.d.ts +1 -0
- package/lib/workers/extract/index.js +1378 -1274
- package/package.json +13 -12
|
@@ -5,6 +5,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __typeError = (msg) => {
|
|
9
|
+
throw TypeError(msg);
|
|
10
|
+
};
|
|
8
11
|
var __esm = (fn, res) => function __init() {
|
|
9
12
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
10
13
|
};
|
|
@@ -32,6 +35,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
32
35
|
mod
|
|
33
36
|
));
|
|
34
37
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
38
|
+
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
|
|
39
|
+
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
|
|
40
|
+
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
41
|
+
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
|
|
35
42
|
|
|
36
43
|
// ../../../node_modules/workerpool/src/requireFoolWebpack.js
|
|
37
44
|
var require_requireFoolWebpack = __commonJS({
|
|
@@ -1771,8 +1778,8 @@ var require_helpers = __commonJS({
|
|
|
1771
1778
|
var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema, path11, name, argument) {
|
|
1772
1779
|
if (Array.isArray(path11)) {
|
|
1773
1780
|
this.path = path11;
|
|
1774
|
-
this.property = path11.reduce(function(
|
|
1775
|
-
return
|
|
1781
|
+
this.property = path11.reduce(function(sum, item) {
|
|
1782
|
+
return sum + makeSuffix(item);
|
|
1776
1783
|
}, "instance");
|
|
1777
1784
|
} else if (path11 !== void 0) {
|
|
1778
1785
|
this.property = path11;
|
|
@@ -1871,8 +1878,8 @@ var require_helpers = __commonJS({
|
|
|
1871
1878
|
this.options = options;
|
|
1872
1879
|
if (Array.isArray(path11)) {
|
|
1873
1880
|
this.path = path11;
|
|
1874
|
-
this.propertyPath = path11.reduce(function(
|
|
1875
|
-
return
|
|
1881
|
+
this.propertyPath = path11.reduce(function(sum, item) {
|
|
1882
|
+
return sum + makeSuffix(item);
|
|
1876
1883
|
}, "instance");
|
|
1877
1884
|
} else {
|
|
1878
1885
|
this.propertyPath = path11;
|
|
@@ -1949,16 +1956,16 @@ var require_helpers = __commonJS({
|
|
|
1949
1956
|
FORMAT_REGEXPS.regexp = FORMAT_REGEXPS.regex;
|
|
1950
1957
|
FORMAT_REGEXPS.pattern = FORMAT_REGEXPS.regex;
|
|
1951
1958
|
FORMAT_REGEXPS.ipv4 = FORMAT_REGEXPS["ip-address"];
|
|
1952
|
-
exports2.isFormat = function isFormat(input,
|
|
1953
|
-
if (typeof input === "string" && FORMAT_REGEXPS[
|
|
1954
|
-
if (FORMAT_REGEXPS[
|
|
1955
|
-
return FORMAT_REGEXPS[
|
|
1959
|
+
exports2.isFormat = function isFormat(input, format3, validator) {
|
|
1960
|
+
if (typeof input === "string" && FORMAT_REGEXPS[format3] !== void 0) {
|
|
1961
|
+
if (FORMAT_REGEXPS[format3] instanceof RegExp) {
|
|
1962
|
+
return FORMAT_REGEXPS[format3].test(input);
|
|
1956
1963
|
}
|
|
1957
|
-
if (typeof FORMAT_REGEXPS[
|
|
1958
|
-
return FORMAT_REGEXPS[
|
|
1964
|
+
if (typeof FORMAT_REGEXPS[format3] === "function") {
|
|
1965
|
+
return FORMAT_REGEXPS[format3](input);
|
|
1959
1966
|
}
|
|
1960
|
-
} else if (validator && validator.customFormats && typeof validator.customFormats[
|
|
1961
|
-
return validator.customFormats[
|
|
1967
|
+
} else if (validator && validator.customFormats && typeof validator.customFormats[format3] === "function") {
|
|
1968
|
+
return validator.customFormats[format3](input);
|
|
1962
1969
|
}
|
|
1963
1970
|
return true;
|
|
1964
1971
|
};
|
|
@@ -3625,16 +3632,16 @@ var require_prerelease = __commonJS({
|
|
|
3625
3632
|
var require_compare = __commonJS({
|
|
3626
3633
|
"../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/compare.js"(exports2, module2) {
|
|
3627
3634
|
var SemVer = require_semver();
|
|
3628
|
-
var
|
|
3629
|
-
module2.exports =
|
|
3635
|
+
var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
3636
|
+
module2.exports = compare;
|
|
3630
3637
|
}
|
|
3631
3638
|
});
|
|
3632
3639
|
|
|
3633
3640
|
// ../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/rcompare.js
|
|
3634
3641
|
var require_rcompare = __commonJS({
|
|
3635
3642
|
"../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/rcompare.js"(exports2, module2) {
|
|
3636
|
-
var
|
|
3637
|
-
var rcompare = (a, b, loose) =>
|
|
3643
|
+
var compare = require_compare();
|
|
3644
|
+
var rcompare = (a, b, loose) => compare(b, a, loose);
|
|
3638
3645
|
module2.exports = rcompare;
|
|
3639
3646
|
}
|
|
3640
3647
|
});
|
|
@@ -3642,8 +3649,8 @@ var require_rcompare = __commonJS({
|
|
|
3642
3649
|
// ../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/compare-loose.js
|
|
3643
3650
|
var require_compare_loose = __commonJS({
|
|
3644
3651
|
"../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/compare-loose.js"(exports2, module2) {
|
|
3645
|
-
var
|
|
3646
|
-
var compareLoose = (a, b) =>
|
|
3652
|
+
var compare = require_compare();
|
|
3653
|
+
var compareLoose = (a, b) => compare(a, b, true);
|
|
3647
3654
|
module2.exports = compareLoose;
|
|
3648
3655
|
}
|
|
3649
3656
|
});
|
|
@@ -3682,8 +3689,8 @@ var require_rsort = __commonJS({
|
|
|
3682
3689
|
// ../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/gt.js
|
|
3683
3690
|
var require_gt = __commonJS({
|
|
3684
3691
|
"../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/gt.js"(exports2, module2) {
|
|
3685
|
-
var
|
|
3686
|
-
var gt = (a, b, loose) =>
|
|
3692
|
+
var compare = require_compare();
|
|
3693
|
+
var gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
3687
3694
|
module2.exports = gt;
|
|
3688
3695
|
}
|
|
3689
3696
|
});
|
|
@@ -3691,8 +3698,8 @@ var require_gt = __commonJS({
|
|
|
3691
3698
|
// ../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/lt.js
|
|
3692
3699
|
var require_lt = __commonJS({
|
|
3693
3700
|
"../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/lt.js"(exports2, module2) {
|
|
3694
|
-
var
|
|
3695
|
-
var lt = (a, b, loose) =>
|
|
3701
|
+
var compare = require_compare();
|
|
3702
|
+
var lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
3696
3703
|
module2.exports = lt;
|
|
3697
3704
|
}
|
|
3698
3705
|
});
|
|
@@ -3700,8 +3707,8 @@ var require_lt = __commonJS({
|
|
|
3700
3707
|
// ../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/eq.js
|
|
3701
3708
|
var require_eq = __commonJS({
|
|
3702
3709
|
"../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/eq.js"(exports2, module2) {
|
|
3703
|
-
var
|
|
3704
|
-
var eq = (a, b, loose) =>
|
|
3710
|
+
var compare = require_compare();
|
|
3711
|
+
var eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
3705
3712
|
module2.exports = eq;
|
|
3706
3713
|
}
|
|
3707
3714
|
});
|
|
@@ -3709,8 +3716,8 @@ var require_eq = __commonJS({
|
|
|
3709
3716
|
// ../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/neq.js
|
|
3710
3717
|
var require_neq = __commonJS({
|
|
3711
3718
|
"../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/neq.js"(exports2, module2) {
|
|
3712
|
-
var
|
|
3713
|
-
var neq = (a, b, loose) =>
|
|
3719
|
+
var compare = require_compare();
|
|
3720
|
+
var neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
3714
3721
|
module2.exports = neq;
|
|
3715
3722
|
}
|
|
3716
3723
|
});
|
|
@@ -3718,8 +3725,8 @@ var require_neq = __commonJS({
|
|
|
3718
3725
|
// ../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/gte.js
|
|
3719
3726
|
var require_gte = __commonJS({
|
|
3720
3727
|
"../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/gte.js"(exports2, module2) {
|
|
3721
|
-
var
|
|
3722
|
-
var gte = (a, b, loose) =>
|
|
3728
|
+
var compare = require_compare();
|
|
3729
|
+
var gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
3723
3730
|
module2.exports = gte;
|
|
3724
3731
|
}
|
|
3725
3732
|
});
|
|
@@ -3727,8 +3734,8 @@ var require_gte = __commonJS({
|
|
|
3727
3734
|
// ../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/lte.js
|
|
3728
3735
|
var require_lte = __commonJS({
|
|
3729
3736
|
"../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/lte.js"(exports2, module2) {
|
|
3730
|
-
var
|
|
3731
|
-
var lte = (a, b, loose) =>
|
|
3737
|
+
var compare = require_compare();
|
|
3738
|
+
var lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
3732
3739
|
module2.exports = lte;
|
|
3733
3740
|
}
|
|
3734
3741
|
});
|
|
@@ -4608,12 +4615,12 @@ var require_intersects = __commonJS({
|
|
|
4608
4615
|
var require_simplify = __commonJS({
|
|
4609
4616
|
"../../../node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/ranges/simplify.js"(exports2, module2) {
|
|
4610
4617
|
var satisfies = require_satisfies();
|
|
4611
|
-
var
|
|
4618
|
+
var compare = require_compare();
|
|
4612
4619
|
module2.exports = (versions, range, options) => {
|
|
4613
4620
|
const set = [];
|
|
4614
4621
|
let first = null;
|
|
4615
4622
|
let prev = null;
|
|
4616
|
-
const v = versions.sort((a, b) =>
|
|
4623
|
+
const v = versions.sort((a, b) => compare(a, b, options));
|
|
4617
4624
|
for (const version of v) {
|
|
4618
4625
|
const included = satisfies(version, range, options);
|
|
4619
4626
|
if (included) {
|
|
@@ -4660,7 +4667,7 @@ var require_subset = __commonJS({
|
|
|
4660
4667
|
var Comparator = require_comparator();
|
|
4661
4668
|
var { ANY } = Comparator;
|
|
4662
4669
|
var satisfies = require_satisfies();
|
|
4663
|
-
var
|
|
4670
|
+
var compare = require_compare();
|
|
4664
4671
|
var subset = (sub, dom, options = {}) => {
|
|
4665
4672
|
if (sub === dom) {
|
|
4666
4673
|
return true;
|
|
@@ -4720,7 +4727,7 @@ var require_subset = __commonJS({
|
|
|
4720
4727
|
}
|
|
4721
4728
|
let gtltComp;
|
|
4722
4729
|
if (gt && lt) {
|
|
4723
|
-
gtltComp =
|
|
4730
|
+
gtltComp = compare(gt.semver, lt.semver, options);
|
|
4724
4731
|
if (gtltComp > 0) {
|
|
4725
4732
|
return null;
|
|
4726
4733
|
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
|
|
@@ -4800,14 +4807,14 @@ var require_subset = __commonJS({
|
|
|
4800
4807
|
if (!a) {
|
|
4801
4808
|
return b;
|
|
4802
4809
|
}
|
|
4803
|
-
const comp =
|
|
4810
|
+
const comp = compare(a.semver, b.semver, options);
|
|
4804
4811
|
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
4805
4812
|
};
|
|
4806
4813
|
var lowerLT = (a, b, options) => {
|
|
4807
4814
|
if (!a) {
|
|
4808
4815
|
return b;
|
|
4809
4816
|
}
|
|
4810
|
-
const comp =
|
|
4817
|
+
const comp = compare(a.semver, b.semver, options);
|
|
4811
4818
|
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
4812
4819
|
};
|
|
4813
4820
|
module2.exports = subset;
|
|
@@ -4830,7 +4837,7 @@ var require_semver2 = __commonJS({
|
|
|
4830
4837
|
var minor = require_minor();
|
|
4831
4838
|
var patch = require_patch();
|
|
4832
4839
|
var prerelease = require_prerelease();
|
|
4833
|
-
var
|
|
4840
|
+
var compare = require_compare();
|
|
4834
4841
|
var rcompare = require_rcompare();
|
|
4835
4842
|
var compareLoose = require_compare_loose();
|
|
4836
4843
|
var compareBuild = require_compare_build();
|
|
@@ -4868,7 +4875,7 @@ var require_semver2 = __commonJS({
|
|
|
4868
4875
|
minor,
|
|
4869
4876
|
patch,
|
|
4870
4877
|
prerelease,
|
|
4871
|
-
compare
|
|
4878
|
+
compare,
|
|
4872
4879
|
rcompare,
|
|
4873
4880
|
compareLoose,
|
|
4874
4881
|
compareBuild,
|
|
@@ -7128,6 +7135,36 @@ var require_lib3 = __commonJS({
|
|
|
7128
7135
|
}
|
|
7129
7136
|
});
|
|
7130
7137
|
|
|
7138
|
+
// ../cx-api/lib/private/error.ts
|
|
7139
|
+
var ASSEMBLY_ERROR_SYMBOL, _time, _CloudAssemblyError, CloudAssemblyError;
|
|
7140
|
+
var init_error = __esm({
|
|
7141
|
+
"../cx-api/lib/private/error.ts"() {
|
|
7142
|
+
"use strict";
|
|
7143
|
+
ASSEMBLY_ERROR_SYMBOL = Symbol.for("@aws-cdk/cx-api.CloudAssemblyError");
|
|
7144
|
+
_CloudAssemblyError = class _CloudAssemblyError extends Error {
|
|
7145
|
+
constructor(msg) {
|
|
7146
|
+
super(msg);
|
|
7147
|
+
__privateAdd(this, _time);
|
|
7148
|
+
Object.setPrototypeOf(this, _CloudAssemblyError.prototype);
|
|
7149
|
+
Object.defineProperty(this, ASSEMBLY_ERROR_SYMBOL, { value: true });
|
|
7150
|
+
this.name = new.target.name;
|
|
7151
|
+
__privateSet(this, _time, (/* @__PURE__ */ new Date()).toISOString());
|
|
7152
|
+
}
|
|
7153
|
+
/**
|
|
7154
|
+
* The time the error was thrown.
|
|
7155
|
+
*/
|
|
7156
|
+
get time() {
|
|
7157
|
+
return __privateGet(this, _time);
|
|
7158
|
+
}
|
|
7159
|
+
get type() {
|
|
7160
|
+
return "assembly";
|
|
7161
|
+
}
|
|
7162
|
+
};
|
|
7163
|
+
_time = new WeakMap();
|
|
7164
|
+
CloudAssemblyError = _CloudAssemblyError;
|
|
7165
|
+
}
|
|
7166
|
+
});
|
|
7167
|
+
|
|
7131
7168
|
// ../cx-api/lib/cloud-artifact.ts
|
|
7132
7169
|
var cloud_artifact_exports = {};
|
|
7133
7170
|
__export(cloud_artifact_exports, {
|
|
@@ -7139,6 +7176,7 @@ var init_cloud_artifact = __esm({
|
|
|
7139
7176
|
"use strict";
|
|
7140
7177
|
init_metadata();
|
|
7141
7178
|
cxschema = __toESM(require_lib3());
|
|
7179
|
+
init_error();
|
|
7142
7180
|
CloudArtifact = class {
|
|
7143
7181
|
constructor(assembly, id, manifest) {
|
|
7144
7182
|
this.assembly = assembly;
|
|
@@ -7156,8 +7194,8 @@ var init_cloud_artifact = __esm({
|
|
|
7156
7194
|
* @returns the `CloudArtifact` that matches the artifact type or `undefined` if it's an artifact type that is unrecognized by this module.
|
|
7157
7195
|
*/
|
|
7158
7196
|
static fromManifest(assembly, id, artifact) {
|
|
7159
|
-
void
|
|
7160
|
-
throw new
|
|
7197
|
+
void assembly, void id, void artifact;
|
|
7198
|
+
throw new CloudAssemblyError("Implementation not overridden yet");
|
|
7161
7199
|
}
|
|
7162
7200
|
/**
|
|
7163
7201
|
* Returns all the artifacts that this artifact depends on.
|
|
@@ -7169,7 +7207,7 @@ var init_cloud_artifact = __esm({
|
|
|
7169
7207
|
this._deps = this._dependencyIDs.map((id) => {
|
|
7170
7208
|
const dep = this.assembly.tryGetArtifact(id);
|
|
7171
7209
|
if (!dep) {
|
|
7172
|
-
throw new
|
|
7210
|
+
throw new CloudAssemblyError(`Artifact ${this.id} depends on non-existing artifact ${id}`);
|
|
7173
7211
|
}
|
|
7174
7212
|
return dep;
|
|
7175
7213
|
});
|
|
@@ -7236,6 +7274,7 @@ var init_asset_manifest_artifact = __esm({
|
|
|
7236
7274
|
fs = __toESM(require("fs"));
|
|
7237
7275
|
path = __toESM(require("path"));
|
|
7238
7276
|
init_cloud_artifact();
|
|
7277
|
+
init_error();
|
|
7239
7278
|
ASSET_MANIFEST_ARTIFACT_SYM = Symbol.for("@aws-cdk/cx-api.AssetManifestArtifact");
|
|
7240
7279
|
AssetManifestArtifact = class extends CloudArtifact {
|
|
7241
7280
|
/**
|
|
@@ -7262,7 +7301,7 @@ var init_asset_manifest_artifact = __esm({
|
|
|
7262
7301
|
super(assembly, name, artifact);
|
|
7263
7302
|
const properties = this.manifest.properties || {};
|
|
7264
7303
|
if (!properties.file) {
|
|
7265
|
-
throw new
|
|
7304
|
+
throw new CloudAssemblyError('Invalid AssetManifestArtifact. Missing "file" property');
|
|
7266
7305
|
}
|
|
7267
7306
|
this.file = path.resolve(this.assembly.directory, properties.file);
|
|
7268
7307
|
this.requiresBootstrapStackVersion = properties.requiresBootstrapStackVersion;
|
|
@@ -7298,6 +7337,7 @@ var AWS_ENV_REGEX, UNKNOWN_ACCOUNT, UNKNOWN_REGION, EnvironmentUtils;
|
|
|
7298
7337
|
var init_environment = __esm({
|
|
7299
7338
|
"../cx-api/lib/environment.ts"() {
|
|
7300
7339
|
"use strict";
|
|
7340
|
+
init_error();
|
|
7301
7341
|
AWS_ENV_REGEX = /aws\:\/\/([a-z0-9A-Z\-\@\.\_]+)\/([a-z\-0-9]+)/;
|
|
7302
7342
|
UNKNOWN_ACCOUNT = "unknown-account";
|
|
7303
7343
|
UNKNOWN_REGION = "unknown-region";
|
|
@@ -7305,13 +7345,13 @@ var init_environment = __esm({
|
|
|
7305
7345
|
static parse(environment) {
|
|
7306
7346
|
const env = AWS_ENV_REGEX.exec(environment);
|
|
7307
7347
|
if (!env) {
|
|
7308
|
-
throw new
|
|
7348
|
+
throw new CloudAssemblyError(
|
|
7309
7349
|
`Unable to parse environment specification "${environment}". Expected format: aws://account/region`
|
|
7310
7350
|
);
|
|
7311
7351
|
}
|
|
7312
7352
|
const [, account, region] = env;
|
|
7313
7353
|
if (!account || !region) {
|
|
7314
|
-
throw new
|
|
7354
|
+
throw new CloudAssemblyError(`Invalid environment specification: ${environment}`);
|
|
7315
7355
|
}
|
|
7316
7356
|
return { account, region, name: environment };
|
|
7317
7357
|
}
|
|
@@ -7345,6 +7385,7 @@ var init_cloudformation_artifact = __esm({
|
|
|
7345
7385
|
cxschema2 = __toESM(require_lib3());
|
|
7346
7386
|
init_cloud_artifact();
|
|
7347
7387
|
init_environment();
|
|
7388
|
+
init_error();
|
|
7348
7389
|
CLOUDFORMATION_STACK_ARTIFACT_SYM = Symbol.for("@aws-cdk/cx-api.CloudFormationStackArtifact");
|
|
7349
7390
|
CloudFormationStackArtifact = class extends CloudArtifact {
|
|
7350
7391
|
/**
|
|
@@ -7371,10 +7412,10 @@ var init_cloudformation_artifact = __esm({
|
|
|
7371
7412
|
super(assembly, artifactId, artifact);
|
|
7372
7413
|
const properties = this.manifest.properties || {};
|
|
7373
7414
|
if (!properties.templateFile) {
|
|
7374
|
-
throw new
|
|
7415
|
+
throw new CloudAssemblyError('Invalid CloudFormation stack artifact. Missing "templateFile" property in cloud assembly manifest');
|
|
7375
7416
|
}
|
|
7376
7417
|
if (!artifact.environment) {
|
|
7377
|
-
throw new
|
|
7418
|
+
throw new CloudAssemblyError("Invalid CloudFormation stack artifact. Missing environment");
|
|
7378
7419
|
}
|
|
7379
7420
|
this.environment = EnvironmentUtils.parse(artifact.environment);
|
|
7380
7421
|
this.templateFile = properties.templateFile;
|
|
@@ -7494,6 +7535,7 @@ var init_tree_cloud_artifact = __esm({
|
|
|
7494
7535
|
"../cx-api/lib/artifacts/tree-cloud-artifact.ts"() {
|
|
7495
7536
|
"use strict";
|
|
7496
7537
|
init_cloud_artifact();
|
|
7538
|
+
init_error();
|
|
7497
7539
|
TREE_CLOUD_ARTIFACT_SYM = Symbol.for("@aws-cdk/cx-api.TreeCloudArtifact");
|
|
7498
7540
|
TreeCloudArtifact = class extends CloudArtifact {
|
|
7499
7541
|
/**
|
|
@@ -7520,7 +7562,7 @@ var init_tree_cloud_artifact = __esm({
|
|
|
7520
7562
|
super(assembly, name, artifact);
|
|
7521
7563
|
const properties = this.manifest.properties || {};
|
|
7522
7564
|
if (!properties.file) {
|
|
7523
|
-
throw new
|
|
7565
|
+
throw new CloudAssemblyError('Invalid TreeCloudArtifact. Missing "file" property');
|
|
7524
7566
|
}
|
|
7525
7567
|
this.file = properties.file;
|
|
7526
7568
|
}
|
|
@@ -7578,7 +7620,7 @@ function topologicalSort(xs, keyFn, depFn) {
|
|
|
7578
7620
|
remaining.delete(selected.key);
|
|
7579
7621
|
}
|
|
7580
7622
|
if (selectable.length === 0) {
|
|
7581
|
-
throw new
|
|
7623
|
+
throw new CloudAssemblyError(`Could not determine ordering between: ${Array.from(remaining.keys()).join(", ")}`);
|
|
7582
7624
|
}
|
|
7583
7625
|
}
|
|
7584
7626
|
return ret;
|
|
@@ -7586,6 +7628,7 @@ function topologicalSort(xs, keyFn, depFn) {
|
|
|
7586
7628
|
var init_toposort = __esm({
|
|
7587
7629
|
"../cx-api/lib/toposort.ts"() {
|
|
7588
7630
|
"use strict";
|
|
7631
|
+
init_error();
|
|
7589
7632
|
}
|
|
7590
7633
|
});
|
|
7591
7634
|
|
|
@@ -7620,7 +7663,7 @@ function determineOutputDirectory(outdir) {
|
|
|
7620
7663
|
function ensureDirSync(dir) {
|
|
7621
7664
|
if (fs3.existsSync(dir)) {
|
|
7622
7665
|
if (!fs3.statSync(dir).isDirectory()) {
|
|
7623
|
-
throw new
|
|
7666
|
+
throw new CloudAssemblyError(`${dir} must be a directory`);
|
|
7624
7667
|
}
|
|
7625
7668
|
} else {
|
|
7626
7669
|
fs3.mkdirSync(dir, { recursive: true });
|
|
@@ -7639,6 +7682,7 @@ var init_cloud_assembly = __esm({
|
|
|
7639
7682
|
init_cloud_artifact();
|
|
7640
7683
|
init_toposort();
|
|
7641
7684
|
cxschema4 = __toESM(require_lib3());
|
|
7685
|
+
init_error();
|
|
7642
7686
|
CLOUD_ASSEMBLY_SYMBOL = Symbol.for("@aws-cdk/cx-api.CloudAssembly");
|
|
7643
7687
|
MANIFEST_FILE = "manifest.json";
|
|
7644
7688
|
CloudAssembly = class {
|
|
@@ -7685,10 +7729,10 @@ var init_cloud_assembly = __esm({
|
|
|
7685
7729
|
getStackByName(stackName) {
|
|
7686
7730
|
const artifacts = this.artifacts.filter((a) => a instanceof CloudFormationStackArtifact && a.stackName === stackName);
|
|
7687
7731
|
if (!artifacts || artifacts.length === 0) {
|
|
7688
|
-
throw new
|
|
7732
|
+
throw new CloudAssemblyError(`Unable to find stack with stack name "${stackName}"`);
|
|
7689
7733
|
}
|
|
7690
7734
|
if (artifacts.length > 1) {
|
|
7691
|
-
throw new
|
|
7735
|
+
throw new CloudAssemblyError(`There are multiple stacks with the stack name "${stackName}" (${artifacts.map((a) => a.id).join(",")}). Use "getStackArtifact(id)" instead`);
|
|
7692
7736
|
}
|
|
7693
7737
|
return artifacts[0];
|
|
7694
7738
|
}
|
|
@@ -7709,10 +7753,10 @@ var init_cloud_assembly = __esm({
|
|
|
7709
7753
|
getStackArtifact(artifactId) {
|
|
7710
7754
|
const artifact = this.tryGetArtifactRecursively(artifactId);
|
|
7711
7755
|
if (!artifact) {
|
|
7712
|
-
throw new
|
|
7756
|
+
throw new CloudAssemblyError(`Unable to find artifact with id "${artifactId}"`);
|
|
7713
7757
|
}
|
|
7714
7758
|
if (!(artifact instanceof CloudFormationStackArtifact)) {
|
|
7715
|
-
throw new
|
|
7759
|
+
throw new CloudAssemblyError(`Artifact ${artifactId} is not a CloudFormation stack`);
|
|
7716
7760
|
}
|
|
7717
7761
|
return artifact;
|
|
7718
7762
|
}
|
|
@@ -7741,10 +7785,10 @@ var init_cloud_assembly = __esm({
|
|
|
7741
7785
|
getNestedAssemblyArtifact(artifactId) {
|
|
7742
7786
|
const artifact = this.tryGetArtifact(artifactId);
|
|
7743
7787
|
if (!artifact) {
|
|
7744
|
-
throw new
|
|
7788
|
+
throw new CloudAssemblyError(`Unable to find artifact with id "${artifactId}"`);
|
|
7745
7789
|
}
|
|
7746
7790
|
if (!(artifact instanceof NestedCloudAssemblyArtifact)) {
|
|
7747
|
-
throw new
|
|
7791
|
+
throw new CloudAssemblyError(`Found artifact '${artifactId}' but it's not a nested cloud assembly`);
|
|
7748
7792
|
}
|
|
7749
7793
|
return artifact;
|
|
7750
7794
|
}
|
|
@@ -7766,11 +7810,11 @@ var init_cloud_assembly = __esm({
|
|
|
7766
7810
|
if (trees.length === 0) {
|
|
7767
7811
|
return void 0;
|
|
7768
7812
|
} else if (trees.length > 1) {
|
|
7769
|
-
throw new
|
|
7813
|
+
throw new CloudAssemblyError(`Multiple artifacts of type ${cxschema4.ArtifactType.CDK_TREE} found in manifest`);
|
|
7770
7814
|
}
|
|
7771
7815
|
const tree = trees[0];
|
|
7772
7816
|
if (!(tree instanceof TreeCloudArtifact)) {
|
|
7773
|
-
throw new
|
|
7817
|
+
throw new CloudAssemblyError('"Tree" artifact is not of expected type');
|
|
7774
7818
|
}
|
|
7775
7819
|
return tree;
|
|
7776
7820
|
}
|
|
@@ -8015,6 +8059,7 @@ __export(features_exports, {
|
|
|
8015
8059
|
KMS_ALIAS_NAME_REF: () => KMS_ALIAS_NAME_REF,
|
|
8016
8060
|
KMS_DEFAULT_KEY_POLICIES: () => KMS_DEFAULT_KEY_POLICIES,
|
|
8017
8061
|
KMS_REDUCE_CROSS_ACCOUNT_REGION_POLICY_SCOPE: () => KMS_REDUCE_CROSS_ACCOUNT_REGION_POLICY_SCOPE,
|
|
8062
|
+
LAMBDA_CREATE_NEW_POLICIES_WITH_ADDTOROLEPOLICY: () => LAMBDA_CREATE_NEW_POLICIES_WITH_ADDTOROLEPOLICY,
|
|
8018
8063
|
LAMBDA_NODEJS_SDK_V3_EXCLUDE_SMITHY_PACKAGES: () => LAMBDA_NODEJS_SDK_V3_EXCLUDE_SMITHY_PACKAGES,
|
|
8019
8064
|
LAMBDA_NODEJS_USE_LATEST_RUNTIME: () => LAMBDA_NODEJS_USE_LATEST_RUNTIME,
|
|
8020
8065
|
LAMBDA_PERMISSION_LOGICAL_ID_FOR_LAMBDA_ACTION: () => LAMBDA_PERMISSION_LOGICAL_ID_FOR_LAMBDA_ACTION,
|
|
@@ -8052,7 +8097,7 @@ function futureFlagDefault(flag) {
|
|
|
8052
8097
|
}
|
|
8053
8098
|
return value;
|
|
8054
8099
|
}
|
|
8055
|
-
var ENABLE_STACK_NAME_DUPLICATES_CONTEXT, ENABLE_DIFF_NO_FAIL_CONTEXT, ENABLE_DIFF_NO_FAIL, NEW_STYLE_STACK_SYNTHESIS_CONTEXT, STACK_RELATIVE_EXPORTS_CONTEXT, DOCKER_IGNORE_SUPPORT, SECRETS_MANAGER_PARSE_OWNED_SECRET_NAME, KMS_DEFAULT_KEY_POLICIES, S3_GRANT_WRITE_WITHOUT_ACL, ECS_REMOVE_DEFAULT_DESIRED_COUNT, RDS_LOWERCASE_DB_IDENTIFIER, APIGATEWAY_USAGEPLANKEY_ORDERINSENSITIVE_ID, EFS_DEFAULT_ENCRYPTION_AT_REST, LAMBDA_RECOGNIZE_VERSION_PROPS, LAMBDA_RECOGNIZE_LAYER_VERSION, CLOUDFRONT_DEFAULT_SECURITY_POLICY_TLS_V1_2_2021, CHECK_SECRET_USAGE, TARGET_PARTITIONS, ECS_SERVICE_EXTENSIONS_ENABLE_DEFAULT_LOG_DRIVER, EC2_UNIQUE_IMDSV2_LAUNCH_TEMPLATE_NAME, ECS_ARN_FORMAT_INCLUDES_CLUSTER_NAME, IAM_MINIMIZE_POLICIES, IAM_IMPORTED_ROLE_STACK_SAFE_DEFAULT_POLICY_NAME, VALIDATE_SNAPSHOT_REMOVAL_POLICY, CODEPIPELINE_CROSS_ACCOUNT_KEY_ALIAS_STACK_SAFE_RESOURCE_NAME, S3_CREATE_DEFAULT_LOGGING_POLICY, SNS_SUBSCRIPTIONS_SQS_DECRYPTION_POLICY, APIGATEWAY_DISABLE_CLOUDWATCH_ROLE, ENABLE_PARTITION_LITERALS, EVENTS_TARGET_QUEUE_SAME_ACCOUNT, ECS_DISABLE_EXPLICIT_DEPLOYMENT_CONTROLLER_FOR_CIRCUIT_BREAKER, S3_SERVER_ACCESS_LOGS_USE_BUCKET_POLICY, ROUTE53_PATTERNS_USE_CERTIFICATE, AWS_CUSTOM_RESOURCE_LATEST_SDK_DEFAULT, DATABASE_PROXY_UNIQUE_RESOURCE_NAME, CODEDEPLOY_REMOVE_ALARMS_FROM_DEPLOYMENT_GROUP, APIGATEWAY_AUTHORIZER_CHANGE_DEPLOYMENT_LOGICAL_ID, EC2_LAUNCH_TEMPLATE_DEFAULT_USER_DATA, SECRETS_MANAGER_TARGET_ATTACHMENT_RESOURCE_POLICY, REDSHIFT_COLUMN_ID, ENABLE_EMR_SERVICE_POLICY_V2, EC2_RESTRICT_DEFAULT_SECURITY_GROUP, APIGATEWAY_REQUEST_VALIDATOR_UNIQUE_ID, INCLUDE_PREFIX_IN_UNIQUE_NAME_GENERATION, KMS_ALIAS_NAME_REF, EFS_DENY_ANONYMOUS_ACCESS, EFS_MOUNTTARGET_ORDERINSENSITIVE_LOGICAL_ID, AUTOSCALING_GENERATE_LAUNCH_TEMPLATE, ENABLE_OPENSEARCH_MULTIAZ_WITH_STANDBY, LAMBDA_NODEJS_USE_LATEST_RUNTIME, RDS_PREVENT_RENDERING_DEPRECATED_CREDENTIALS, AURORA_CLUSTER_CHANGE_SCOPE_OF_INSTANCE_PARAMETER_GROUP_WITH_EACH_PARAMETERS, APPSYNC_ENABLE_USE_ARN_IDENTIFIER_SOURCE_API_ASSOCIATION, CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME, LAMBDA_PERMISSION_LOGICAL_ID_FOR_LAMBDA_ACTION, CODEPIPELINE_CROSS_ACCOUNT_KEYS_DEFAULT_VALUE_TO_FALSE, CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2, KMS_REDUCE_CROSS_ACCOUNT_REGION_POLICY_SCOPE, PIPELINE_REDUCE_ASSET_ROLE_TRUST_SCOPE, EKS_NODEGROUP_NAME, EBS_DEFAULT_GP3, ECS_REMOVE_DEFAULT_DEPLOYMENT_ALARM, LOG_API_RESPONSE_DATA_PROPERTY_TRUE_DEFAULT, S3_KEEP_NOTIFICATION_IN_IMPORTED_BUCKET, USE_NEW_S3URI_PARAMETERS_FOR_BEDROCK_INVOKE_MODEL_TASK, REDUCE_EC2_FARGATE_CLOUDWATCH_PERMISSIONS, DYNAMODB_TABLEV2_RESOURCE_POLICY_PER_REPLICA, EC2_SUM_TIMEOUT_ENABLED, APPSYNC_GRAPHQLAPI_SCOPE_LAMBDA_FUNCTION_PERMISSION, USE_CORRECT_VALUE_FOR_INSTANCE_RESOURCE_ID_PROPERTY, CFN_INCLUDE_REJECT_COMPLEX_RESOURCE_UPDATE_CREATE_POLICY_INTRINSICS, LAMBDA_NODEJS_SDK_V3_EXCLUDE_SMITHY_PACKAGES, STEPFUNCTIONS_TASKS_FIX_RUN_ECS_TASK_POLICY, BASTION_HOST_USE_AMAZON_LINUX_2023_BY_DEFAULT, ASPECT_STABILIZATION, USER_POOL_DOMAIN_NAME_METHOD_WITHOUT_CUSTOM_RESOURCE, Enable_IMDS_Blocking_Deprecated_Feature, Disable_ECS_IMDS_Blocking, ALB_DUALSTACK_WITHOUT_PUBLIC_IPV4_SECURITY_GROUP_RULES_DEFAULT, IAM_OIDC_REJECT_UNAUTHORIZED_CONNECTIONS, ENABLE_ADDITIONAL_METADATA_COLLECTION, FLAGS, CURRENT_MV, CURRENT_VERSION_EXPIRED_FLAGS, CURRENTLY_RECOMMENDED_FLAGS, CURRENT_VERSION_FLAG_DEFAULTS, FUTURE_FLAGS_EXPIRED, FUTURE_FLAGS, NEW_PROJECT_DEFAULT_CONTEXT;
|
|
8100
|
+
var ENABLE_STACK_NAME_DUPLICATES_CONTEXT, ENABLE_DIFF_NO_FAIL_CONTEXT, ENABLE_DIFF_NO_FAIL, NEW_STYLE_STACK_SYNTHESIS_CONTEXT, STACK_RELATIVE_EXPORTS_CONTEXT, DOCKER_IGNORE_SUPPORT, SECRETS_MANAGER_PARSE_OWNED_SECRET_NAME, KMS_DEFAULT_KEY_POLICIES, S3_GRANT_WRITE_WITHOUT_ACL, ECS_REMOVE_DEFAULT_DESIRED_COUNT, RDS_LOWERCASE_DB_IDENTIFIER, APIGATEWAY_USAGEPLANKEY_ORDERINSENSITIVE_ID, EFS_DEFAULT_ENCRYPTION_AT_REST, LAMBDA_RECOGNIZE_VERSION_PROPS, LAMBDA_RECOGNIZE_LAYER_VERSION, CLOUDFRONT_DEFAULT_SECURITY_POLICY_TLS_V1_2_2021, CHECK_SECRET_USAGE, TARGET_PARTITIONS, ECS_SERVICE_EXTENSIONS_ENABLE_DEFAULT_LOG_DRIVER, EC2_UNIQUE_IMDSV2_LAUNCH_TEMPLATE_NAME, ECS_ARN_FORMAT_INCLUDES_CLUSTER_NAME, IAM_MINIMIZE_POLICIES, IAM_IMPORTED_ROLE_STACK_SAFE_DEFAULT_POLICY_NAME, VALIDATE_SNAPSHOT_REMOVAL_POLICY, CODEPIPELINE_CROSS_ACCOUNT_KEY_ALIAS_STACK_SAFE_RESOURCE_NAME, S3_CREATE_DEFAULT_LOGGING_POLICY, SNS_SUBSCRIPTIONS_SQS_DECRYPTION_POLICY, APIGATEWAY_DISABLE_CLOUDWATCH_ROLE, ENABLE_PARTITION_LITERALS, EVENTS_TARGET_QUEUE_SAME_ACCOUNT, ECS_DISABLE_EXPLICIT_DEPLOYMENT_CONTROLLER_FOR_CIRCUIT_BREAKER, S3_SERVER_ACCESS_LOGS_USE_BUCKET_POLICY, ROUTE53_PATTERNS_USE_CERTIFICATE, AWS_CUSTOM_RESOURCE_LATEST_SDK_DEFAULT, DATABASE_PROXY_UNIQUE_RESOURCE_NAME, CODEDEPLOY_REMOVE_ALARMS_FROM_DEPLOYMENT_GROUP, APIGATEWAY_AUTHORIZER_CHANGE_DEPLOYMENT_LOGICAL_ID, EC2_LAUNCH_TEMPLATE_DEFAULT_USER_DATA, SECRETS_MANAGER_TARGET_ATTACHMENT_RESOURCE_POLICY, REDSHIFT_COLUMN_ID, ENABLE_EMR_SERVICE_POLICY_V2, EC2_RESTRICT_DEFAULT_SECURITY_GROUP, APIGATEWAY_REQUEST_VALIDATOR_UNIQUE_ID, INCLUDE_PREFIX_IN_UNIQUE_NAME_GENERATION, KMS_ALIAS_NAME_REF, EFS_DENY_ANONYMOUS_ACCESS, EFS_MOUNTTARGET_ORDERINSENSITIVE_LOGICAL_ID, AUTOSCALING_GENERATE_LAUNCH_TEMPLATE, ENABLE_OPENSEARCH_MULTIAZ_WITH_STANDBY, LAMBDA_NODEJS_USE_LATEST_RUNTIME, RDS_PREVENT_RENDERING_DEPRECATED_CREDENTIALS, AURORA_CLUSTER_CHANGE_SCOPE_OF_INSTANCE_PARAMETER_GROUP_WITH_EACH_PARAMETERS, APPSYNC_ENABLE_USE_ARN_IDENTIFIER_SOURCE_API_ASSOCIATION, CODECOMMIT_SOURCE_ACTION_DEFAULT_BRANCH_NAME, LAMBDA_PERMISSION_LOGICAL_ID_FOR_LAMBDA_ACTION, CODEPIPELINE_CROSS_ACCOUNT_KEYS_DEFAULT_VALUE_TO_FALSE, CODEPIPELINE_DEFAULT_PIPELINE_TYPE_TO_V2, KMS_REDUCE_CROSS_ACCOUNT_REGION_POLICY_SCOPE, PIPELINE_REDUCE_ASSET_ROLE_TRUST_SCOPE, EKS_NODEGROUP_NAME, EBS_DEFAULT_GP3, ECS_REMOVE_DEFAULT_DEPLOYMENT_ALARM, LOG_API_RESPONSE_DATA_PROPERTY_TRUE_DEFAULT, S3_KEEP_NOTIFICATION_IN_IMPORTED_BUCKET, USE_NEW_S3URI_PARAMETERS_FOR_BEDROCK_INVOKE_MODEL_TASK, REDUCE_EC2_FARGATE_CLOUDWATCH_PERMISSIONS, DYNAMODB_TABLEV2_RESOURCE_POLICY_PER_REPLICA, EC2_SUM_TIMEOUT_ENABLED, APPSYNC_GRAPHQLAPI_SCOPE_LAMBDA_FUNCTION_PERMISSION, USE_CORRECT_VALUE_FOR_INSTANCE_RESOURCE_ID_PROPERTY, CFN_INCLUDE_REJECT_COMPLEX_RESOURCE_UPDATE_CREATE_POLICY_INTRINSICS, LAMBDA_NODEJS_SDK_V3_EXCLUDE_SMITHY_PACKAGES, STEPFUNCTIONS_TASKS_FIX_RUN_ECS_TASK_POLICY, BASTION_HOST_USE_AMAZON_LINUX_2023_BY_DEFAULT, ASPECT_STABILIZATION, USER_POOL_DOMAIN_NAME_METHOD_WITHOUT_CUSTOM_RESOURCE, Enable_IMDS_Blocking_Deprecated_Feature, Disable_ECS_IMDS_Blocking, ALB_DUALSTACK_WITHOUT_PUBLIC_IPV4_SECURITY_GROUP_RULES_DEFAULT, IAM_OIDC_REJECT_UNAUTHORIZED_CONNECTIONS, ENABLE_ADDITIONAL_METADATA_COLLECTION, LAMBDA_CREATE_NEW_POLICIES_WITH_ADDTOROLEPOLICY, FLAGS, CURRENT_MV, CURRENT_VERSION_EXPIRED_FLAGS, CURRENTLY_RECOMMENDED_FLAGS, CURRENT_VERSION_FLAG_DEFAULTS, FUTURE_FLAGS_EXPIRED, FUTURE_FLAGS, NEW_PROJECT_DEFAULT_CONTEXT;
|
|
8056
8101
|
var init_features = __esm({
|
|
8057
8102
|
"../cx-api/lib/features.ts"() {
|
|
8058
8103
|
"use strict";
|
|
@@ -8138,6 +8183,7 @@ var init_features = __esm({
|
|
|
8138
8183
|
ALB_DUALSTACK_WITHOUT_PUBLIC_IPV4_SECURITY_GROUP_RULES_DEFAULT = "@aws-cdk/aws-elasticloadbalancingV2:albDualstackWithoutPublicIpv4SecurityGroupRulesDefault";
|
|
8139
8184
|
IAM_OIDC_REJECT_UNAUTHORIZED_CONNECTIONS = "@aws-cdk/aws-iam:oidcRejectUnauthorizedConnections";
|
|
8140
8185
|
ENABLE_ADDITIONAL_METADATA_COLLECTION = "@aws-cdk/core:enableAdditionalMetadataCollection";
|
|
8186
|
+
LAMBDA_CREATE_NEW_POLICIES_WITH_ADDTOROLEPOLICY = "@aws-cdk/aws-lambda:createNewPoliciesWithAddToRolePolicy";
|
|
8141
8187
|
FLAGS = {
|
|
8142
8188
|
//////////////////////////////////////////////////////////////////////
|
|
8143
8189
|
[ENABLE_STACK_NAME_DUPLICATES_CONTEXT]: {
|
|
@@ -9315,6 +9361,18 @@ var init_features = __esm({
|
|
|
9315
9361
|
`,
|
|
9316
9362
|
introducedIn: { v2: "2.178.0" },
|
|
9317
9363
|
recommendedValue: true
|
|
9364
|
+
},
|
|
9365
|
+
//////////////////////////////////////////////////////////////////////
|
|
9366
|
+
[LAMBDA_CREATE_NEW_POLICIES_WITH_ADDTOROLEPOLICY]: {
|
|
9367
|
+
type: 1 /* BugFix */,
|
|
9368
|
+
summary: "When enabled, Lambda will create new inline policies with AddToRolePolicy instead of adding to the Default Policy Statement",
|
|
9369
|
+
detailsMd: `
|
|
9370
|
+
When this feature flag is enabled, Lambda will create new inline policies with AddToRolePolicy.
|
|
9371
|
+
The purpose of this is to prevent lambda from creating a dependency on the Default Policy Statement.
|
|
9372
|
+
This solves an issue where a circular dependency could occur if adding lambda to something like a Cognito Trigger, then adding the User Pool to the lambda execution role permissions.
|
|
9373
|
+
`,
|
|
9374
|
+
introducedIn: { v2: "2.180.0" },
|
|
9375
|
+
recommendedValue: true
|
|
9318
9376
|
}
|
|
9319
9377
|
};
|
|
9320
9378
|
CURRENT_MV = "v2";
|
|
@@ -12308,6 +12366,7 @@ __export(recommended_feature_flags_exports, {
|
|
|
12308
12366
|
"@aws-cdk/aws-kms:reduceCrossAccountRegionPolicyScope": () => _aws_cdk_aws_kms_reduceCrossAccountRegionPolicyScope,
|
|
12309
12367
|
"@aws-cdk/aws-lambda-nodejs:sdkV3ExcludeSmithyPackages": () => _aws_cdk_aws_lambda_nodejs_sdkV3ExcludeSmithyPackages,
|
|
12310
12368
|
"@aws-cdk/aws-lambda-nodejs:useLatestRuntimeVersion": () => _aws_cdk_aws_lambda_nodejs_useLatestRuntimeVersion,
|
|
12369
|
+
"@aws-cdk/aws-lambda:createNewPoliciesWithAddToRolePolicy": () => _aws_cdk_aws_lambda_createNewPoliciesWithAddToRolePolicy,
|
|
12311
12370
|
"@aws-cdk/aws-lambda:recognizeLayerVersion": () => _aws_cdk_aws_lambda_recognizeLayerVersion,
|
|
12312
12371
|
"@aws-cdk/aws-opensearchservice:enableOpensearchMultiAzWithStandby": () => _aws_cdk_aws_opensearchservice_enableOpensearchMultiAzWithStandby,
|
|
12313
12372
|
"@aws-cdk/aws-rds:auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters": () => _aws_cdk_aws_rds_auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters,
|
|
@@ -12335,7 +12394,7 @@ __export(recommended_feature_flags_exports, {
|
|
|
12335
12394
|
"@aws-cdk/customresources:installLatestAwsSdkDefault": () => _aws_cdk_customresources_installLatestAwsSdkDefault,
|
|
12336
12395
|
default: () => recommended_feature_flags_default
|
|
12337
12396
|
});
|
|
12338
|
-
var _aws_cdk_aws_lambda_recognizeLayerVersion, _aws_cdk_core_checkSecretUsage, _aws_cdk_core_target_partitions, _aws_cdk_containers_ecs_service_extensions_enableDefaultLogDriver, _aws_cdk_aws_ec2_uniqueImdsv2TemplateName, _aws_cdk_aws_ecs_arnFormatIncludesClusterName, _aws_cdk_aws_iam_minimizePolicies, _aws_cdk_core_validateSnapshotRemovalPolicy, _aws_cdk_aws_codepipeline_crossAccountKeyAliasStackSafeResourceName, _aws_cdk_aws_s3_createDefaultLoggingPolicy, _aws_cdk_aws_sns_subscriptions_restrictSqsDescryption, _aws_cdk_aws_apigateway_disableCloudWatchRole, _aws_cdk_core_enablePartitionLiterals, _aws_cdk_aws_events_eventsTargetQueueSameAccount, _aws_cdk_aws_ecs_disableExplicitDeploymentControllerForCircuitBreaker, _aws_cdk_aws_iam_importedRoleStackSafeDefaultPolicyName, _aws_cdk_aws_s3_serverAccessLogsUseBucketPolicy, _aws_cdk_aws_route53_patters_useCertificate, _aws_cdk_customresources_installLatestAwsSdkDefault, _aws_cdk_aws_rds_databaseProxyUniqueResourceName, _aws_cdk_aws_codedeploy_removeAlarmsFromDeploymentGroup, _aws_cdk_aws_apigateway_authorizerChangeDeploymentLogicalId, _aws_cdk_aws_ec2_launchTemplateDefaultUserData, _aws_cdk_aws_secretsmanager_useAttachedSecretResourcePolicyForSecretTargetAttachments, _aws_cdk_aws_redshift_columnId, _aws_cdk_aws_stepfunctions_tasks_enableEmrServicePolicyV2, _aws_cdk_aws_ec2_restrictDefaultSecurityGroup, _aws_cdk_aws_apigateway_requestValidatorUniqueId, _aws_cdk_aws_kms_aliasNameRef, _aws_cdk_aws_autoscaling_generateLaunchTemplateInsteadOfLaunchConfig, _aws_cdk_core_includePrefixInUniqueNameGeneration, _aws_cdk_aws_efs_denyAnonymousAccess, _aws_cdk_aws_opensearchservice_enableOpensearchMultiAzWithStandby, _aws_cdk_aws_lambda_nodejs_useLatestRuntimeVersion, _aws_cdk_aws_efs_mountTargetOrderInsensitiveLogicalId, _aws_cdk_aws_rds_auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters, _aws_cdk_aws_appsync_useArnForSourceApiAssociationIdentifier, _aws_cdk_aws_rds_preventRenderingDeprecatedCredentials, _aws_cdk_aws_codepipeline_actions_useNewDefaultBranchForCodeCommitSource, _aws_cdk_aws_cloudwatch_actions_changeLambdaPermissionLogicalIdForLambdaAction, _aws_cdk_aws_codepipeline_crossAccountKeysDefaultValueToFalse, _aws_cdk_aws_codepipeline_defaultPipelineTypeToV2, _aws_cdk_aws_kms_reduceCrossAccountRegionPolicyScope, _aws_cdk_aws_eks_nodegroupNameAttribute, _aws_cdk_aws_ec2_ebsDefaultGp3Volume, _aws_cdk_aws_ecs_removeDefaultDeploymentAlarm, _aws_cdk_custom_resources_logApiResponseDataPropertyTrueDefault, _aws_cdk_aws_s3_keepNotificationInImportedBucket, _aws_cdk_aws_ecs_enableImdsBlockingDeprecatedFeature, _aws_cdk_aws_ecs_disableEcsImdsBlocking, _aws_cdk_aws_ecs_reduceEc2FargateCloudWatchPermissions, _aws_cdk_aws_dynamodb_resourcePolicyPerReplica, _aws_cdk_aws_ec2_ec2SumTImeoutEnabled, _aws_cdk_aws_appsync_appSyncGraphQLAPIScopeLambdaPermission, _aws_cdk_aws_rds_setCorrectValueForDatabaseInstanceReadReplicaInstanceResourceId, _aws_cdk_core_cfnIncludeRejectComplexResourceUpdateCreatePolicyIntrinsics, _aws_cdk_aws_lambda_nodejs_sdkV3ExcludeSmithyPackages, _aws_cdk_aws_stepfunctions_tasks_fixRunEcsTaskPolicy, _aws_cdk_aws_ec2_bastionHostUseAmazonLinux2023ByDefault, _aws_cdk_aws_route53_targets_userPoolDomainNameMethodWithoutCustomResource, _aws_cdk_aws_elasticloadbalancingV2_albDualstackWithoutPublicIpv4SecurityGroupRulesDefault, _aws_cdk_aws_iam_oidcRejectUnauthorizedConnections, _aws_cdk_core_enableAdditionalMetadataCollection, recommended_feature_flags_default;
|
|
12397
|
+
var _aws_cdk_aws_lambda_recognizeLayerVersion, _aws_cdk_core_checkSecretUsage, _aws_cdk_core_target_partitions, _aws_cdk_containers_ecs_service_extensions_enableDefaultLogDriver, _aws_cdk_aws_ec2_uniqueImdsv2TemplateName, _aws_cdk_aws_ecs_arnFormatIncludesClusterName, _aws_cdk_aws_iam_minimizePolicies, _aws_cdk_core_validateSnapshotRemovalPolicy, _aws_cdk_aws_codepipeline_crossAccountKeyAliasStackSafeResourceName, _aws_cdk_aws_s3_createDefaultLoggingPolicy, _aws_cdk_aws_sns_subscriptions_restrictSqsDescryption, _aws_cdk_aws_apigateway_disableCloudWatchRole, _aws_cdk_core_enablePartitionLiterals, _aws_cdk_aws_events_eventsTargetQueueSameAccount, _aws_cdk_aws_ecs_disableExplicitDeploymentControllerForCircuitBreaker, _aws_cdk_aws_iam_importedRoleStackSafeDefaultPolicyName, _aws_cdk_aws_s3_serverAccessLogsUseBucketPolicy, _aws_cdk_aws_route53_patters_useCertificate, _aws_cdk_customresources_installLatestAwsSdkDefault, _aws_cdk_aws_rds_databaseProxyUniqueResourceName, _aws_cdk_aws_codedeploy_removeAlarmsFromDeploymentGroup, _aws_cdk_aws_apigateway_authorizerChangeDeploymentLogicalId, _aws_cdk_aws_ec2_launchTemplateDefaultUserData, _aws_cdk_aws_secretsmanager_useAttachedSecretResourcePolicyForSecretTargetAttachments, _aws_cdk_aws_redshift_columnId, _aws_cdk_aws_stepfunctions_tasks_enableEmrServicePolicyV2, _aws_cdk_aws_ec2_restrictDefaultSecurityGroup, _aws_cdk_aws_apigateway_requestValidatorUniqueId, _aws_cdk_aws_kms_aliasNameRef, _aws_cdk_aws_autoscaling_generateLaunchTemplateInsteadOfLaunchConfig, _aws_cdk_core_includePrefixInUniqueNameGeneration, _aws_cdk_aws_efs_denyAnonymousAccess, _aws_cdk_aws_opensearchservice_enableOpensearchMultiAzWithStandby, _aws_cdk_aws_lambda_nodejs_useLatestRuntimeVersion, _aws_cdk_aws_efs_mountTargetOrderInsensitiveLogicalId, _aws_cdk_aws_rds_auroraClusterChangeScopeOfInstanceParameterGroupWithEachParameters, _aws_cdk_aws_appsync_useArnForSourceApiAssociationIdentifier, _aws_cdk_aws_rds_preventRenderingDeprecatedCredentials, _aws_cdk_aws_codepipeline_actions_useNewDefaultBranchForCodeCommitSource, _aws_cdk_aws_cloudwatch_actions_changeLambdaPermissionLogicalIdForLambdaAction, _aws_cdk_aws_codepipeline_crossAccountKeysDefaultValueToFalse, _aws_cdk_aws_codepipeline_defaultPipelineTypeToV2, _aws_cdk_aws_kms_reduceCrossAccountRegionPolicyScope, _aws_cdk_aws_eks_nodegroupNameAttribute, _aws_cdk_aws_ec2_ebsDefaultGp3Volume, _aws_cdk_aws_ecs_removeDefaultDeploymentAlarm, _aws_cdk_custom_resources_logApiResponseDataPropertyTrueDefault, _aws_cdk_aws_s3_keepNotificationInImportedBucket, _aws_cdk_aws_ecs_enableImdsBlockingDeprecatedFeature, _aws_cdk_aws_ecs_disableEcsImdsBlocking, _aws_cdk_aws_ecs_reduceEc2FargateCloudWatchPermissions, _aws_cdk_aws_dynamodb_resourcePolicyPerReplica, _aws_cdk_aws_ec2_ec2SumTImeoutEnabled, _aws_cdk_aws_appsync_appSyncGraphQLAPIScopeLambdaPermission, _aws_cdk_aws_rds_setCorrectValueForDatabaseInstanceReadReplicaInstanceResourceId, _aws_cdk_core_cfnIncludeRejectComplexResourceUpdateCreatePolicyIntrinsics, _aws_cdk_aws_lambda_nodejs_sdkV3ExcludeSmithyPackages, _aws_cdk_aws_stepfunctions_tasks_fixRunEcsTaskPolicy, _aws_cdk_aws_ec2_bastionHostUseAmazonLinux2023ByDefault, _aws_cdk_aws_route53_targets_userPoolDomainNameMethodWithoutCustomResource, _aws_cdk_aws_elasticloadbalancingV2_albDualstackWithoutPublicIpv4SecurityGroupRulesDefault, _aws_cdk_aws_iam_oidcRejectUnauthorizedConnections, _aws_cdk_core_enableAdditionalMetadataCollection, _aws_cdk_aws_lambda_createNewPoliciesWithAddToRolePolicy, recommended_feature_flags_default;
|
|
12339
12398
|
var init_recommended_feature_flags = __esm({
|
|
12340
12399
|
"lib/recommended-feature-flags.json"() {
|
|
12341
12400
|
_aws_cdk_aws_lambda_recognizeLayerVersion = true;
|
|
@@ -12404,6 +12463,7 @@ var init_recommended_feature_flags = __esm({
|
|
|
12404
12463
|
_aws_cdk_aws_elasticloadbalancingV2_albDualstackWithoutPublicIpv4SecurityGroupRulesDefault = true;
|
|
12405
12464
|
_aws_cdk_aws_iam_oidcRejectUnauthorizedConnections = true;
|
|
12406
12465
|
_aws_cdk_core_enableAdditionalMetadataCollection = true;
|
|
12466
|
+
_aws_cdk_aws_lambda_createNewPoliciesWithAddToRolePolicy = true;
|
|
12407
12467
|
recommended_feature_flags_default = {
|
|
12408
12468
|
"@aws-cdk/aws-lambda:recognizeLayerVersion": _aws_cdk_aws_lambda_recognizeLayerVersion,
|
|
12409
12469
|
"@aws-cdk/core:checkSecretUsage": _aws_cdk_core_checkSecretUsage,
|
|
@@ -12467,7 +12527,8 @@ var init_recommended_feature_flags = __esm({
|
|
|
12467
12527
|
"@aws-cdk/aws-route53-targets:userPoolDomainNameMethodWithoutCustomResource": _aws_cdk_aws_route53_targets_userPoolDomainNameMethodWithoutCustomResource,
|
|
12468
12528
|
"@aws-cdk/aws-elasticloadbalancingV2:albDualstackWithoutPublicIpv4SecurityGroupRulesDefault": _aws_cdk_aws_elasticloadbalancingV2_albDualstackWithoutPublicIpv4SecurityGroupRulesDefault,
|
|
12469
12529
|
"@aws-cdk/aws-iam:oidcRejectUnauthorizedConnections": _aws_cdk_aws_iam_oidcRejectUnauthorizedConnections,
|
|
12470
|
-
"@aws-cdk/core:enableAdditionalMetadataCollection": _aws_cdk_core_enableAdditionalMetadataCollection
|
|
12530
|
+
"@aws-cdk/core:enableAdditionalMetadataCollection": _aws_cdk_core_enableAdditionalMetadataCollection,
|
|
12531
|
+
"@aws-cdk/aws-lambda:createNewPoliciesWithAddToRolePolicy": _aws_cdk_aws_lambda_createNewPoliciesWithAddToRolePolicy
|
|
12471
12532
|
};
|
|
12472
12533
|
}
|
|
12473
12534
|
});
|
|
@@ -12701,8 +12762,8 @@ var require_helpers2 = __commonJS({
|
|
|
12701
12762
|
var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema, path11, name, argument) {
|
|
12702
12763
|
if (Array.isArray(path11)) {
|
|
12703
12764
|
this.path = path11;
|
|
12704
|
-
this.property = path11.reduce(function(
|
|
12705
|
-
return
|
|
12765
|
+
this.property = path11.reduce(function(sum, item) {
|
|
12766
|
+
return sum + makeSuffix(item);
|
|
12706
12767
|
}, "instance");
|
|
12707
12768
|
} else if (path11 !== void 0) {
|
|
12708
12769
|
this.property = path11;
|
|
@@ -12801,8 +12862,8 @@ var require_helpers2 = __commonJS({
|
|
|
12801
12862
|
this.options = options;
|
|
12802
12863
|
if (Array.isArray(path11)) {
|
|
12803
12864
|
this.path = path11;
|
|
12804
|
-
this.propertyPath = path11.reduce(function(
|
|
12805
|
-
return
|
|
12865
|
+
this.propertyPath = path11.reduce(function(sum, item) {
|
|
12866
|
+
return sum + makeSuffix(item);
|
|
12806
12867
|
}, "instance");
|
|
12807
12868
|
} else {
|
|
12808
12869
|
this.propertyPath = path11;
|
|
@@ -12879,16 +12940,16 @@ var require_helpers2 = __commonJS({
|
|
|
12879
12940
|
FORMAT_REGEXPS.regexp = FORMAT_REGEXPS.regex;
|
|
12880
12941
|
FORMAT_REGEXPS.pattern = FORMAT_REGEXPS.regex;
|
|
12881
12942
|
FORMAT_REGEXPS.ipv4 = FORMAT_REGEXPS["ip-address"];
|
|
12882
|
-
exports2.isFormat = function isFormat(input,
|
|
12883
|
-
if (typeof input === "string" && FORMAT_REGEXPS[
|
|
12884
|
-
if (FORMAT_REGEXPS[
|
|
12885
|
-
return FORMAT_REGEXPS[
|
|
12943
|
+
exports2.isFormat = function isFormat(input, format3, validator) {
|
|
12944
|
+
if (typeof input === "string" && FORMAT_REGEXPS[format3] !== void 0) {
|
|
12945
|
+
if (FORMAT_REGEXPS[format3] instanceof RegExp) {
|
|
12946
|
+
return FORMAT_REGEXPS[format3].test(input);
|
|
12886
12947
|
}
|
|
12887
|
-
if (typeof FORMAT_REGEXPS[
|
|
12888
|
-
return FORMAT_REGEXPS[
|
|
12948
|
+
if (typeof FORMAT_REGEXPS[format3] === "function") {
|
|
12949
|
+
return FORMAT_REGEXPS[format3](input);
|
|
12889
12950
|
}
|
|
12890
|
-
} else if (validator && validator.customFormats && typeof validator.customFormats[
|
|
12891
|
-
return validator.customFormats[
|
|
12951
|
+
} else if (validator && validator.customFormats && typeof validator.customFormats[format3] === "function") {
|
|
12952
|
+
return validator.customFormats[format3](input);
|
|
12892
12953
|
}
|
|
12893
12954
|
return true;
|
|
12894
12955
|
};
|
|
@@ -14043,6 +14104,7 @@ var require_re2 = __commonJS({
|
|
|
14043
14104
|
var re = exports2.re = [];
|
|
14044
14105
|
var safeRe = exports2.safeRe = [];
|
|
14045
14106
|
var src = exports2.src = [];
|
|
14107
|
+
var safeSrc = exports2.safeSrc = [];
|
|
14046
14108
|
var t = exports2.t = {};
|
|
14047
14109
|
var R = 0;
|
|
14048
14110
|
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
@@ -14063,6 +14125,7 @@ var require_re2 = __commonJS({
|
|
|
14063
14125
|
debug(name, index, value);
|
|
14064
14126
|
t[name] = index;
|
|
14065
14127
|
src[index] = value;
|
|
14128
|
+
safeSrc[index] = safe;
|
|
14066
14129
|
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
14067
14130
|
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
14068
14131
|
};
|
|
@@ -14159,7 +14222,7 @@ var require_semver3 = __commonJS({
|
|
|
14159
14222
|
"../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/classes/semver.js"(exports2, module2) {
|
|
14160
14223
|
var debug = require_debug2();
|
|
14161
14224
|
var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants2();
|
|
14162
|
-
var { safeRe: re, t } = require_re2();
|
|
14225
|
+
var { safeRe: re, safeSrc: src, t } = require_re2();
|
|
14163
14226
|
var parseOptions = require_parse_options2();
|
|
14164
14227
|
var { compareIdentifiers } = require_identifiers2();
|
|
14165
14228
|
var SemVer = class _SemVer {
|
|
@@ -14299,6 +14362,18 @@ var require_semver3 = __commonJS({
|
|
|
14299
14362
|
// preminor will bump the version up to the next minor release, and immediately
|
|
14300
14363
|
// down to pre-release. premajor and prepatch work the same way.
|
|
14301
14364
|
inc(release, identifier, identifierBase) {
|
|
14365
|
+
if (release.startsWith("pre")) {
|
|
14366
|
+
if (!identifier && identifierBase === false) {
|
|
14367
|
+
throw new Error("invalid increment argument: identifier is empty");
|
|
14368
|
+
}
|
|
14369
|
+
if (identifier) {
|
|
14370
|
+
const r = new RegExp(`^${this.options.loose ? src[t.PRERELEASELOOSE] : src[t.PRERELEASE]}$`);
|
|
14371
|
+
const match = `-${identifier}`.match(r);
|
|
14372
|
+
if (!match || match[1] !== identifier) {
|
|
14373
|
+
throw new Error(`invalid identifier: ${identifier}`);
|
|
14374
|
+
}
|
|
14375
|
+
}
|
|
14376
|
+
}
|
|
14302
14377
|
switch (release) {
|
|
14303
14378
|
case "premajor":
|
|
14304
14379
|
this.prerelease.length = 0;
|
|
@@ -14326,6 +14401,12 @@ var require_semver3 = __commonJS({
|
|
|
14326
14401
|
}
|
|
14327
14402
|
this.inc("pre", identifier, identifierBase);
|
|
14328
14403
|
break;
|
|
14404
|
+
case "release":
|
|
14405
|
+
if (this.prerelease.length === 0) {
|
|
14406
|
+
throw new Error(`version ${this.raw} is not a prerelease`);
|
|
14407
|
+
}
|
|
14408
|
+
this.prerelease.length = 0;
|
|
14409
|
+
break;
|
|
14329
14410
|
case "major":
|
|
14330
14411
|
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
|
14331
14412
|
this.major++;
|
|
@@ -14351,9 +14432,6 @@ var require_semver3 = __commonJS({
|
|
|
14351
14432
|
// 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
|
|
14352
14433
|
case "pre": {
|
|
14353
14434
|
const base = Number(identifierBase) ? 1 : 0;
|
|
14354
|
-
if (!identifier && identifierBase === false) {
|
|
14355
|
-
throw new Error("invalid increment argument: identifier is empty");
|
|
14356
|
-
}
|
|
14357
14435
|
if (this.prerelease.length === 0) {
|
|
14358
14436
|
this.prerelease = [base];
|
|
14359
14437
|
} else {
|
|
@@ -14488,13 +14566,12 @@ var require_diff2 = __commonJS({
|
|
|
14488
14566
|
if (!lowVersion.patch && !lowVersion.minor) {
|
|
14489
14567
|
return "major";
|
|
14490
14568
|
}
|
|
14491
|
-
if (highVersion
|
|
14569
|
+
if (lowVersion.compareMain(highVersion) === 0) {
|
|
14570
|
+
if (lowVersion.minor && !lowVersion.patch) {
|
|
14571
|
+
return "minor";
|
|
14572
|
+
}
|
|
14492
14573
|
return "patch";
|
|
14493
14574
|
}
|
|
14494
|
-
if (highVersion.minor) {
|
|
14495
|
-
return "minor";
|
|
14496
|
-
}
|
|
14497
|
-
return "major";
|
|
14498
14575
|
}
|
|
14499
14576
|
const prefix = highHasPre ? "pre" : "";
|
|
14500
14577
|
if (v1.major !== v2.major) {
|
|
@@ -14555,16 +14632,16 @@ var require_prerelease2 = __commonJS({
|
|
|
14555
14632
|
var require_compare2 = __commonJS({
|
|
14556
14633
|
"../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/compare.js"(exports2, module2) {
|
|
14557
14634
|
var SemVer = require_semver3();
|
|
14558
|
-
var
|
|
14559
|
-
module2.exports =
|
|
14635
|
+
var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose));
|
|
14636
|
+
module2.exports = compare;
|
|
14560
14637
|
}
|
|
14561
14638
|
});
|
|
14562
14639
|
|
|
14563
14640
|
// ../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/rcompare.js
|
|
14564
14641
|
var require_rcompare2 = __commonJS({
|
|
14565
14642
|
"../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/rcompare.js"(exports2, module2) {
|
|
14566
|
-
var
|
|
14567
|
-
var rcompare = (a, b, loose) =>
|
|
14643
|
+
var compare = require_compare2();
|
|
14644
|
+
var rcompare = (a, b, loose) => compare(b, a, loose);
|
|
14568
14645
|
module2.exports = rcompare;
|
|
14569
14646
|
}
|
|
14570
14647
|
});
|
|
@@ -14572,8 +14649,8 @@ var require_rcompare2 = __commonJS({
|
|
|
14572
14649
|
// ../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/compare-loose.js
|
|
14573
14650
|
var require_compare_loose2 = __commonJS({
|
|
14574
14651
|
"../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/compare-loose.js"(exports2, module2) {
|
|
14575
|
-
var
|
|
14576
|
-
var compareLoose = (a, b) =>
|
|
14652
|
+
var compare = require_compare2();
|
|
14653
|
+
var compareLoose = (a, b) => compare(a, b, true);
|
|
14577
14654
|
module2.exports = compareLoose;
|
|
14578
14655
|
}
|
|
14579
14656
|
});
|
|
@@ -14612,8 +14689,8 @@ var require_rsort2 = __commonJS({
|
|
|
14612
14689
|
// ../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/gt.js
|
|
14613
14690
|
var require_gt2 = __commonJS({
|
|
14614
14691
|
"../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/gt.js"(exports2, module2) {
|
|
14615
|
-
var
|
|
14616
|
-
var gt = (a, b, loose) =>
|
|
14692
|
+
var compare = require_compare2();
|
|
14693
|
+
var gt = (a, b, loose) => compare(a, b, loose) > 0;
|
|
14617
14694
|
module2.exports = gt;
|
|
14618
14695
|
}
|
|
14619
14696
|
});
|
|
@@ -14621,8 +14698,8 @@ var require_gt2 = __commonJS({
|
|
|
14621
14698
|
// ../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/lt.js
|
|
14622
14699
|
var require_lt2 = __commonJS({
|
|
14623
14700
|
"../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/lt.js"(exports2, module2) {
|
|
14624
|
-
var
|
|
14625
|
-
var lt = (a, b, loose) =>
|
|
14701
|
+
var compare = require_compare2();
|
|
14702
|
+
var lt = (a, b, loose) => compare(a, b, loose) < 0;
|
|
14626
14703
|
module2.exports = lt;
|
|
14627
14704
|
}
|
|
14628
14705
|
});
|
|
@@ -14630,8 +14707,8 @@ var require_lt2 = __commonJS({
|
|
|
14630
14707
|
// ../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/eq.js
|
|
14631
14708
|
var require_eq2 = __commonJS({
|
|
14632
14709
|
"../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/eq.js"(exports2, module2) {
|
|
14633
|
-
var
|
|
14634
|
-
var eq = (a, b, loose) =>
|
|
14710
|
+
var compare = require_compare2();
|
|
14711
|
+
var eq = (a, b, loose) => compare(a, b, loose) === 0;
|
|
14635
14712
|
module2.exports = eq;
|
|
14636
14713
|
}
|
|
14637
14714
|
});
|
|
@@ -14639,8 +14716,8 @@ var require_eq2 = __commonJS({
|
|
|
14639
14716
|
// ../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/neq.js
|
|
14640
14717
|
var require_neq2 = __commonJS({
|
|
14641
14718
|
"../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/neq.js"(exports2, module2) {
|
|
14642
|
-
var
|
|
14643
|
-
var neq = (a, b, loose) =>
|
|
14719
|
+
var compare = require_compare2();
|
|
14720
|
+
var neq = (a, b, loose) => compare(a, b, loose) !== 0;
|
|
14644
14721
|
module2.exports = neq;
|
|
14645
14722
|
}
|
|
14646
14723
|
});
|
|
@@ -14648,8 +14725,8 @@ var require_neq2 = __commonJS({
|
|
|
14648
14725
|
// ../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/gte.js
|
|
14649
14726
|
var require_gte2 = __commonJS({
|
|
14650
14727
|
"../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/gte.js"(exports2, module2) {
|
|
14651
|
-
var
|
|
14652
|
-
var gte = (a, b, loose) =>
|
|
14728
|
+
var compare = require_compare2();
|
|
14729
|
+
var gte = (a, b, loose) => compare(a, b, loose) >= 0;
|
|
14653
14730
|
module2.exports = gte;
|
|
14654
14731
|
}
|
|
14655
14732
|
});
|
|
@@ -14657,8 +14734,8 @@ var require_gte2 = __commonJS({
|
|
|
14657
14734
|
// ../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/lte.js
|
|
14658
14735
|
var require_lte2 = __commonJS({
|
|
14659
14736
|
"../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/functions/lte.js"(exports2, module2) {
|
|
14660
|
-
var
|
|
14661
|
-
var lte = (a, b, loose) =>
|
|
14737
|
+
var compare = require_compare2();
|
|
14738
|
+
var lte = (a, b, loose) => compare(a, b, loose) <= 0;
|
|
14662
14739
|
module2.exports = lte;
|
|
14663
14740
|
}
|
|
14664
14741
|
});
|
|
@@ -15538,12 +15615,12 @@ var require_intersects2 = __commonJS({
|
|
|
15538
15615
|
var require_simplify2 = __commonJS({
|
|
15539
15616
|
"../../../node_modules/cdk-assets/node_modules/@aws-cdk/cloud-assembly-schema/node_modules/semver/ranges/simplify.js"(exports2, module2) {
|
|
15540
15617
|
var satisfies = require_satisfies2();
|
|
15541
|
-
var
|
|
15618
|
+
var compare = require_compare2();
|
|
15542
15619
|
module2.exports = (versions, range, options) => {
|
|
15543
15620
|
const set = [];
|
|
15544
15621
|
let first = null;
|
|
15545
15622
|
let prev = null;
|
|
15546
|
-
const v = versions.sort((a, b) =>
|
|
15623
|
+
const v = versions.sort((a, b) => compare(a, b, options));
|
|
15547
15624
|
for (const version of v) {
|
|
15548
15625
|
const included = satisfies(version, range, options);
|
|
15549
15626
|
if (included) {
|
|
@@ -15590,7 +15667,7 @@ var require_subset2 = __commonJS({
|
|
|
15590
15667
|
var Comparator = require_comparator2();
|
|
15591
15668
|
var { ANY } = Comparator;
|
|
15592
15669
|
var satisfies = require_satisfies2();
|
|
15593
|
-
var
|
|
15670
|
+
var compare = require_compare2();
|
|
15594
15671
|
var subset = (sub, dom, options = {}) => {
|
|
15595
15672
|
if (sub === dom) {
|
|
15596
15673
|
return true;
|
|
@@ -15650,7 +15727,7 @@ var require_subset2 = __commonJS({
|
|
|
15650
15727
|
}
|
|
15651
15728
|
let gtltComp;
|
|
15652
15729
|
if (gt && lt) {
|
|
15653
|
-
gtltComp =
|
|
15730
|
+
gtltComp = compare(gt.semver, lt.semver, options);
|
|
15654
15731
|
if (gtltComp > 0) {
|
|
15655
15732
|
return null;
|
|
15656
15733
|
} else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) {
|
|
@@ -15730,14 +15807,14 @@ var require_subset2 = __commonJS({
|
|
|
15730
15807
|
if (!a) {
|
|
15731
15808
|
return b;
|
|
15732
15809
|
}
|
|
15733
|
-
const comp =
|
|
15810
|
+
const comp = compare(a.semver, b.semver, options);
|
|
15734
15811
|
return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a;
|
|
15735
15812
|
};
|
|
15736
15813
|
var lowerLT = (a, b, options) => {
|
|
15737
15814
|
if (!a) {
|
|
15738
15815
|
return b;
|
|
15739
15816
|
}
|
|
15740
|
-
const comp =
|
|
15817
|
+
const comp = compare(a.semver, b.semver, options);
|
|
15741
15818
|
return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a;
|
|
15742
15819
|
};
|
|
15743
15820
|
module2.exports = subset;
|
|
@@ -15760,7 +15837,7 @@ var require_semver4 = __commonJS({
|
|
|
15760
15837
|
var minor = require_minor2();
|
|
15761
15838
|
var patch = require_patch2();
|
|
15762
15839
|
var prerelease = require_prerelease2();
|
|
15763
|
-
var
|
|
15840
|
+
var compare = require_compare2();
|
|
15764
15841
|
var rcompare = require_rcompare2();
|
|
15765
15842
|
var compareLoose = require_compare_loose2();
|
|
15766
15843
|
var compareBuild = require_compare_build2();
|
|
@@ -15798,7 +15875,7 @@ var require_semver4 = __commonJS({
|
|
|
15798
15875
|
minor,
|
|
15799
15876
|
patch,
|
|
15800
15877
|
prerelease,
|
|
15801
|
-
compare
|
|
15878
|
+
compare,
|
|
15802
15879
|
rcompare,
|
|
15803
15880
|
compareLoose,
|
|
15804
15881
|
compareBuild,
|
|
@@ -17903,7 +17980,7 @@ ${errors.map((e) => e.stack).join("\n")}`);
|
|
|
17903
17980
|
};
|
|
17904
17981
|
exports2.Manifest = Manifest5;
|
|
17905
17982
|
_a = JSII_RTTI_SYMBOL_1;
|
|
17906
|
-
Manifest5[_a] = { fqn: "@aws-cdk/cloud-assembly-schema.Manifest", version: "39.2.
|
|
17983
|
+
Manifest5[_a] = { fqn: "@aws-cdk/cloud-assembly-schema.Manifest", version: "39.2.20" };
|
|
17907
17984
|
function mapValues(xs, fn) {
|
|
17908
17985
|
if (!xs) {
|
|
17909
17986
|
return void 0;
|
|
@@ -20236,11 +20313,11 @@ var require_picomatch = __commonJS({
|
|
|
20236
20313
|
return { isMatch: false, output: "" };
|
|
20237
20314
|
}
|
|
20238
20315
|
const opts = options || {};
|
|
20239
|
-
const
|
|
20316
|
+
const format3 = opts.format || (posix ? utils.toPosixSlashes : null);
|
|
20240
20317
|
let match = input === glob;
|
|
20241
|
-
let output = match &&
|
|
20318
|
+
let output = match && format3 ? format3(input) : input;
|
|
20242
20319
|
if (match === false) {
|
|
20243
|
-
output =
|
|
20320
|
+
output = format3 ? format3(input) : input;
|
|
20244
20321
|
match = output === glob;
|
|
20245
20322
|
}
|
|
20246
20323
|
if (match === false || opts.capture === true) {
|
|
@@ -21034,7 +21111,7 @@ var require_to_regex_range = __commonJS({
|
|
|
21034
21111
|
stop = countZeros(max + 1, zeros) - 1;
|
|
21035
21112
|
}
|
|
21036
21113
|
stops = [...stops];
|
|
21037
|
-
stops.sort(
|
|
21114
|
+
stops.sort(compare);
|
|
21038
21115
|
return stops;
|
|
21039
21116
|
}
|
|
21040
21117
|
function rangeToPattern(start, stop, options) {
|
|
@@ -21092,10 +21169,10 @@ var require_to_regex_range = __commonJS({
|
|
|
21092
21169
|
let result = [];
|
|
21093
21170
|
for (let ele of arr) {
|
|
21094
21171
|
let { string } = ele;
|
|
21095
|
-
if (!intersection && !
|
|
21172
|
+
if (!intersection && !contains(comparison, "string", string)) {
|
|
21096
21173
|
result.push(prefix + string);
|
|
21097
21174
|
}
|
|
21098
|
-
if (intersection &&
|
|
21175
|
+
if (intersection && contains(comparison, "string", string)) {
|
|
21099
21176
|
result.push(prefix + string);
|
|
21100
21177
|
}
|
|
21101
21178
|
}
|
|
@@ -21106,10 +21183,10 @@ var require_to_regex_range = __commonJS({
|
|
|
21106
21183
|
for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
|
|
21107
21184
|
return arr;
|
|
21108
21185
|
}
|
|
21109
|
-
function
|
|
21186
|
+
function compare(a, b) {
|
|
21110
21187
|
return a > b ? 1 : b > a ? -1 : 0;
|
|
21111
21188
|
}
|
|
21112
|
-
function
|
|
21189
|
+
function contains(arr, key, val) {
|
|
21113
21190
|
return arr.some((ele) => ele[key] === val);
|
|
21114
21191
|
}
|
|
21115
21192
|
function countNines(min, len) {
|
|
@@ -21273,7 +21350,7 @@ var require_fill_range = __commonJS({
|
|
|
21273
21350
|
let padded = zeros(startString) || zeros(endString) || zeros(stepString);
|
|
21274
21351
|
let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0;
|
|
21275
21352
|
let toNumber = padded === false && stringify(start, end, options) === false;
|
|
21276
|
-
let
|
|
21353
|
+
let format3 = options.transform || transform(toNumber);
|
|
21277
21354
|
if (options.toRegex && step === 1) {
|
|
21278
21355
|
return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options);
|
|
21279
21356
|
}
|
|
@@ -21285,7 +21362,7 @@ var require_fill_range = __commonJS({
|
|
|
21285
21362
|
if (options.toRegex === true && step > 1) {
|
|
21286
21363
|
push(a);
|
|
21287
21364
|
} else {
|
|
21288
|
-
range.push(pad(
|
|
21365
|
+
range.push(pad(format3(a, index), maxLen, toNumber));
|
|
21289
21366
|
}
|
|
21290
21367
|
a = descending ? a - step : a + step;
|
|
21291
21368
|
index++;
|
|
@@ -21299,7 +21376,7 @@ var require_fill_range = __commonJS({
|
|
|
21299
21376
|
if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {
|
|
21300
21377
|
return invalidRange(start, end, options);
|
|
21301
21378
|
}
|
|
21302
|
-
let
|
|
21379
|
+
let format3 = options.transform || ((val) => String.fromCharCode(val));
|
|
21303
21380
|
let a = `${start}`.charCodeAt(0);
|
|
21304
21381
|
let b = `${end}`.charCodeAt(0);
|
|
21305
21382
|
let descending = a > b;
|
|
@@ -21311,7 +21388,7 @@ var require_fill_range = __commonJS({
|
|
|
21311
21388
|
let range = [];
|
|
21312
21389
|
let index = 0;
|
|
21313
21390
|
while (descending ? a >= b : a <= b) {
|
|
21314
|
-
range.push(
|
|
21391
|
+
range.push(format3(a, index));
|
|
21315
21392
|
a = descending ? a - step : a + step;
|
|
21316
21393
|
index++;
|
|
21317
21394
|
}
|
|
@@ -24686,17 +24763,17 @@ var require_conversions = __commonJS({
|
|
|
24686
24763
|
return [0, 0, args[0]];
|
|
24687
24764
|
};
|
|
24688
24765
|
convert.gray.hsv = convert.gray.hsl;
|
|
24689
|
-
convert.gray.hwb = function(
|
|
24690
|
-
return [0, 100,
|
|
24766
|
+
convert.gray.hwb = function(gray2) {
|
|
24767
|
+
return [0, 100, gray2[0]];
|
|
24691
24768
|
};
|
|
24692
|
-
convert.gray.cmyk = function(
|
|
24693
|
-
return [0, 0, 0,
|
|
24769
|
+
convert.gray.cmyk = function(gray2) {
|
|
24770
|
+
return [0, 0, 0, gray2[0]];
|
|
24694
24771
|
};
|
|
24695
|
-
convert.gray.lab = function(
|
|
24696
|
-
return [
|
|
24772
|
+
convert.gray.lab = function(gray2) {
|
|
24773
|
+
return [gray2[0], 0, 0];
|
|
24697
24774
|
};
|
|
24698
|
-
convert.gray.hex = function(
|
|
24699
|
-
const val = Math.round(
|
|
24775
|
+
convert.gray.hex = function(gray2) {
|
|
24776
|
+
const val = Math.round(gray2[0] / 100 * 255) & 255;
|
|
24700
24777
|
const integer = (val << 16) + (val << 8) + val;
|
|
24701
24778
|
const string = integer.toString(16).toUpperCase();
|
|
24702
24779
|
return "000000".substring(string.length) + string;
|
|
@@ -25197,14 +25274,14 @@ var require_templates = __commonJS({
|
|
|
25197
25274
|
}
|
|
25198
25275
|
return results;
|
|
25199
25276
|
}
|
|
25200
|
-
function buildStyle(
|
|
25277
|
+
function buildStyle(chalk3, styles) {
|
|
25201
25278
|
const enabled = {};
|
|
25202
25279
|
for (const layer of styles) {
|
|
25203
25280
|
for (const style of layer.styles) {
|
|
25204
25281
|
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
25205
25282
|
}
|
|
25206
25283
|
}
|
|
25207
|
-
let current =
|
|
25284
|
+
let current = chalk3;
|
|
25208
25285
|
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
25209
25286
|
if (!Array.isArray(styles2)) {
|
|
25210
25287
|
continue;
|
|
@@ -25216,7 +25293,7 @@ var require_templates = __commonJS({
|
|
|
25216
25293
|
}
|
|
25217
25294
|
return current;
|
|
25218
25295
|
}
|
|
25219
|
-
module2.exports = (
|
|
25296
|
+
module2.exports = (chalk3, temporary) => {
|
|
25220
25297
|
const styles = [];
|
|
25221
25298
|
const chunks2 = [];
|
|
25222
25299
|
let chunk = [];
|
|
@@ -25226,13 +25303,13 @@ var require_templates = __commonJS({
|
|
|
25226
25303
|
} else if (style) {
|
|
25227
25304
|
const string = chunk.join("");
|
|
25228
25305
|
chunk = [];
|
|
25229
|
-
chunks2.push(styles.length === 0 ? string : buildStyle(
|
|
25306
|
+
chunks2.push(styles.length === 0 ? string : buildStyle(chalk3, styles)(string));
|
|
25230
25307
|
styles.push({ inverse, styles: parseStyle(style) });
|
|
25231
25308
|
} else if (close) {
|
|
25232
25309
|
if (styles.length === 0) {
|
|
25233
25310
|
throw new Error("Found extraneous } in Chalk template literal");
|
|
25234
25311
|
}
|
|
25235
|
-
chunks2.push(buildStyle(
|
|
25312
|
+
chunks2.push(buildStyle(chalk3, styles)(chunk.join("")));
|
|
25236
25313
|
chunk = [];
|
|
25237
25314
|
styles.pop();
|
|
25238
25315
|
} else {
|
|
@@ -25280,16 +25357,16 @@ var require_source = __commonJS({
|
|
|
25280
25357
|
}
|
|
25281
25358
|
};
|
|
25282
25359
|
var chalkFactory = (options) => {
|
|
25283
|
-
const
|
|
25284
|
-
applyOptions(
|
|
25285
|
-
|
|
25286
|
-
Object.setPrototypeOf(
|
|
25287
|
-
Object.setPrototypeOf(
|
|
25288
|
-
|
|
25360
|
+
const chalk4 = {};
|
|
25361
|
+
applyOptions(chalk4, options);
|
|
25362
|
+
chalk4.template = (...arguments_) => chalkTag(chalk4.template, ...arguments_);
|
|
25363
|
+
Object.setPrototypeOf(chalk4, Chalk.prototype);
|
|
25364
|
+
Object.setPrototypeOf(chalk4.template, chalk4);
|
|
25365
|
+
chalk4.template.constructor = () => {
|
|
25289
25366
|
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
25290
25367
|
};
|
|
25291
|
-
|
|
25292
|
-
return
|
|
25368
|
+
chalk4.template.Instance = ChalkClass;
|
|
25369
|
+
return chalk4.template;
|
|
25293
25370
|
};
|
|
25294
25371
|
function Chalk(options) {
|
|
25295
25372
|
return chalkFactory(options);
|
|
@@ -25400,7 +25477,7 @@ var require_source = __commonJS({
|
|
|
25400
25477
|
return openAll + string + closeAll;
|
|
25401
25478
|
};
|
|
25402
25479
|
var template;
|
|
25403
|
-
var chalkTag = (
|
|
25480
|
+
var chalkTag = (chalk4, ...strings) => {
|
|
25404
25481
|
const [firstString] = strings;
|
|
25405
25482
|
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
|
25406
25483
|
return strings.join(" ");
|
|
@@ -25416,14 +25493,14 @@ var require_source = __commonJS({
|
|
|
25416
25493
|
if (template === void 0) {
|
|
25417
25494
|
template = require_templates();
|
|
25418
25495
|
}
|
|
25419
|
-
return template(
|
|
25496
|
+
return template(chalk4, parts.join(""));
|
|
25420
25497
|
};
|
|
25421
25498
|
Object.defineProperties(Chalk.prototype, styles);
|
|
25422
|
-
var
|
|
25423
|
-
|
|
25424
|
-
|
|
25425
|
-
|
|
25426
|
-
module2.exports =
|
|
25499
|
+
var chalk3 = Chalk();
|
|
25500
|
+
chalk3.supportsColor = stdoutColor;
|
|
25501
|
+
chalk3.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
25502
|
+
chalk3.stderr.supportsColor = stderrColor;
|
|
25503
|
+
module2.exports = chalk3;
|
|
25427
25504
|
}
|
|
25428
25505
|
});
|
|
25429
25506
|
|
|
@@ -26664,27 +26741,27 @@ var require_resource = __commonJS({
|
|
|
26664
26741
|
return x.type === "array" || x.type === "map";
|
|
26665
26742
|
}
|
|
26666
26743
|
exports2.isCollectionType = isCollectionType;
|
|
26667
|
-
var
|
|
26668
|
-
(function(
|
|
26669
|
-
|
|
26670
|
-
|
|
26671
|
-
|
|
26672
|
-
|
|
26673
|
-
|
|
26674
|
-
|
|
26675
|
-
|
|
26676
|
-
|
|
26677
|
-
|
|
26678
|
-
})(
|
|
26679
|
-
var
|
|
26680
|
-
(function(
|
|
26681
|
-
|
|
26682
|
-
|
|
26683
|
-
|
|
26684
|
-
|
|
26685
|
-
|
|
26686
|
-
|
|
26687
|
-
})(
|
|
26744
|
+
var ResourceScrutinyType;
|
|
26745
|
+
(function(ResourceScrutinyType2) {
|
|
26746
|
+
ResourceScrutinyType2["None"] = "None";
|
|
26747
|
+
ResourceScrutinyType2["ResourcePolicyResource"] = "ResourcePolicyResource";
|
|
26748
|
+
ResourceScrutinyType2["IdentityPolicyResource"] = "IdentityPolicyResource";
|
|
26749
|
+
ResourceScrutinyType2["LambdaPermission"] = "LambdaPermission";
|
|
26750
|
+
ResourceScrutinyType2["IngressRuleResource"] = "IngressRuleResource";
|
|
26751
|
+
ResourceScrutinyType2["EgressRuleResource"] = "EgressRuleResource";
|
|
26752
|
+
ResourceScrutinyType2["SsoAssignmentResource"] = "SsoAssignmentResource";
|
|
26753
|
+
ResourceScrutinyType2["SsoInstanceACAConfigResource"] = "SsoInstanceACAConfigResource";
|
|
26754
|
+
ResourceScrutinyType2["SsoPermissionSet"] = "SsoPermissionSet";
|
|
26755
|
+
})(ResourceScrutinyType = exports2.ResourceScrutinyType || (exports2.ResourceScrutinyType = {}));
|
|
26756
|
+
var PropertyScrutinyType;
|
|
26757
|
+
(function(PropertyScrutinyType2) {
|
|
26758
|
+
PropertyScrutinyType2["None"] = "None";
|
|
26759
|
+
PropertyScrutinyType2["InlineResourcePolicy"] = "InlineResourcePolicy";
|
|
26760
|
+
PropertyScrutinyType2["InlineIdentityPolicies"] = "InlineIdentityPolicies";
|
|
26761
|
+
PropertyScrutinyType2["ManagedPolicies"] = "ManagedPolicies";
|
|
26762
|
+
PropertyScrutinyType2["IngressRules"] = "IngressRules";
|
|
26763
|
+
PropertyScrutinyType2["EgressRules"] = "EgressRules";
|
|
26764
|
+
})(PropertyScrutinyType = exports2.PropertyScrutinyType || (exports2.PropertyScrutinyType = {}));
|
|
26688
26765
|
var RichPropertyType = class _RichPropertyType {
|
|
26689
26766
|
constructor(type) {
|
|
26690
26767
|
this.type = type;
|
|
@@ -26880,132 +26957,130 @@ var require_lib9 = __commonJS({
|
|
|
26880
26957
|
}
|
|
26881
26958
|
});
|
|
26882
26959
|
|
|
26883
|
-
//
|
|
26884
|
-
var
|
|
26885
|
-
|
|
26886
|
-
|
|
26887
|
-
|
|
26888
|
-
|
|
26889
|
-
|
|
26890
|
-
|
|
26891
|
-
|
|
26892
|
-
|
|
26893
|
-
|
|
26894
|
-
|
|
26895
|
-
|
|
26896
|
-
|
|
26897
|
-
|
|
26898
|
-
|
|
26899
|
-
|
|
26900
|
-
|
|
26901
|
-
|
|
26902
|
-
|
|
26903
|
-
|
|
26904
|
-
|
|
26905
|
-
if (Array.isArray(lvalue) !== Array.isArray(rvalue)) {
|
|
26906
|
-
return false;
|
|
26907
|
-
}
|
|
26908
|
-
if (Array.isArray(lvalue)) {
|
|
26909
|
-
if (lvalue.length !== rvalue.length) {
|
|
26910
|
-
return false;
|
|
26911
|
-
}
|
|
26912
|
-
for (let i = 0; i < lvalue.length; i++) {
|
|
26913
|
-
if (!deepEqual(lvalue[i], rvalue[i])) {
|
|
26960
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/util.js
|
|
26961
|
+
var require_util2 = __commonJS({
|
|
26962
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/util.js"(exports2) {
|
|
26963
|
+
"use strict";
|
|
26964
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
26965
|
+
exports2.deepEqual = deepEqual;
|
|
26966
|
+
exports2.diffKeyedEntities = diffKeyedEntities;
|
|
26967
|
+
exports2.unionOf = unionOf;
|
|
26968
|
+
exports2.mangleLikeCloudFormation = mangleLikeCloudFormation;
|
|
26969
|
+
exports2.loadResourceModel = loadResourceModel;
|
|
26970
|
+
var aws_service_spec_1 = require("@aws-cdk/aws-service-spec");
|
|
26971
|
+
function deepEqual(lvalue, rvalue) {
|
|
26972
|
+
if (lvalue === rvalue) {
|
|
26973
|
+
return true;
|
|
26974
|
+
}
|
|
26975
|
+
if ((typeof lvalue === "string" && typeof rvalue === "boolean" || typeof lvalue === "boolean" && typeof rvalue === "string") && lvalue.toString() === rvalue.toString()) {
|
|
26976
|
+
return true;
|
|
26977
|
+
}
|
|
26978
|
+
if ((typeof lvalue === "string" || typeof rvalue === "string") && safeParseFloat(lvalue) === safeParseFloat(rvalue)) {
|
|
26979
|
+
return true;
|
|
26980
|
+
}
|
|
26981
|
+
if (typeof lvalue !== typeof rvalue) {
|
|
26914
26982
|
return false;
|
|
26915
26983
|
}
|
|
26916
|
-
|
|
26917
|
-
|
|
26918
|
-
|
|
26919
|
-
|
|
26920
|
-
|
|
26921
|
-
|
|
26922
|
-
|
|
26923
|
-
|
|
26924
|
-
|
|
26984
|
+
if (Array.isArray(lvalue) !== Array.isArray(rvalue)) {
|
|
26985
|
+
return false;
|
|
26986
|
+
}
|
|
26987
|
+
if (Array.isArray(lvalue)) {
|
|
26988
|
+
if (lvalue.length !== rvalue.length) {
|
|
26989
|
+
return false;
|
|
26990
|
+
}
|
|
26991
|
+
for (let i = 0; i < lvalue.length; i++) {
|
|
26992
|
+
if (!deepEqual(lvalue[i], rvalue[i])) {
|
|
26993
|
+
return false;
|
|
26994
|
+
}
|
|
26995
|
+
}
|
|
26996
|
+
return true;
|
|
26997
|
+
}
|
|
26998
|
+
if (typeof lvalue === "object") {
|
|
26999
|
+
if (lvalue === null || rvalue === null) {
|
|
27000
|
+
return false;
|
|
27001
|
+
}
|
|
27002
|
+
const keys = Object.keys(lvalue);
|
|
27003
|
+
if (keys.length !== Object.keys(rvalue).length) {
|
|
27004
|
+
return false;
|
|
27005
|
+
}
|
|
27006
|
+
for (const key of keys) {
|
|
27007
|
+
if (!rvalue.hasOwnProperty(key)) {
|
|
27008
|
+
return false;
|
|
27009
|
+
}
|
|
27010
|
+
if (key === "DependsOn") {
|
|
27011
|
+
if (!dependsOnEqual(lvalue[key], rvalue[key])) {
|
|
27012
|
+
return false;
|
|
27013
|
+
}
|
|
27014
|
+
continue;
|
|
27015
|
+
}
|
|
27016
|
+
if (!deepEqual(lvalue[key], rvalue[key])) {
|
|
27017
|
+
return false;
|
|
27018
|
+
}
|
|
27019
|
+
}
|
|
27020
|
+
return true;
|
|
27021
|
+
}
|
|
26925
27022
|
return false;
|
|
26926
27023
|
}
|
|
26927
|
-
|
|
26928
|
-
if (
|
|
27024
|
+
function dependsOnEqual(lvalue, rvalue) {
|
|
27025
|
+
if (Array.isArray(lvalue) !== Array.isArray(rvalue)) {
|
|
27026
|
+
const array = Array.isArray(lvalue) ? lvalue : rvalue;
|
|
27027
|
+
const nonArray = Array.isArray(lvalue) ? rvalue : lvalue;
|
|
27028
|
+
if (array.length === 1 && deepEqual(array[0], nonArray)) {
|
|
27029
|
+
return true;
|
|
27030
|
+
}
|
|
26929
27031
|
return false;
|
|
26930
27032
|
}
|
|
26931
|
-
if (
|
|
26932
|
-
if (
|
|
27033
|
+
if (Array.isArray(lvalue) && Array.isArray(rvalue)) {
|
|
27034
|
+
if (lvalue.length !== rvalue.length) {
|
|
26933
27035
|
return false;
|
|
26934
27036
|
}
|
|
26935
|
-
|
|
27037
|
+
for (let i = 0; i < lvalue.length; i++) {
|
|
27038
|
+
for (let j = 0; j < lvalue.length; j++) {
|
|
27039
|
+
if (!deepEqual(lvalue[i], rvalue[j]) && j === lvalue.length - 1) {
|
|
27040
|
+
return false;
|
|
27041
|
+
}
|
|
27042
|
+
break;
|
|
27043
|
+
}
|
|
27044
|
+
}
|
|
27045
|
+
return true;
|
|
26936
27046
|
}
|
|
26937
|
-
|
|
26938
|
-
|
|
27047
|
+
return false;
|
|
27048
|
+
}
|
|
27049
|
+
function diffKeyedEntities(oldValue, newValue, elementDiff) {
|
|
27050
|
+
const result = {};
|
|
27051
|
+
for (const logicalId of unionOf(Object.keys(oldValue || {}), Object.keys(newValue || {}))) {
|
|
27052
|
+
const oldElement = oldValue && oldValue[logicalId];
|
|
27053
|
+
const newElement = newValue && newValue[logicalId];
|
|
27054
|
+
if (oldElement === void 0 && newElement === void 0) {
|
|
27055
|
+
continue;
|
|
27056
|
+
}
|
|
27057
|
+
result[logicalId] = elementDiff(oldElement, newElement, logicalId);
|
|
27058
|
+
}
|
|
27059
|
+
return result;
|
|
27060
|
+
}
|
|
27061
|
+
function unionOf(lv, rv) {
|
|
27062
|
+
const result = new Set(lv);
|
|
27063
|
+
for (const v of rv) {
|
|
27064
|
+
result.add(v);
|
|
26939
27065
|
}
|
|
27066
|
+
return new Array(...result);
|
|
26940
27067
|
}
|
|
26941
|
-
|
|
26942
|
-
|
|
26943
|
-
return false;
|
|
26944
|
-
}
|
|
26945
|
-
function dependsOnEqual(lvalue, rvalue) {
|
|
26946
|
-
if (Array.isArray(lvalue) !== Array.isArray(rvalue)) {
|
|
26947
|
-
const array = Array.isArray(lvalue) ? lvalue : rvalue;
|
|
26948
|
-
const nonArray = Array.isArray(lvalue) ? rvalue : lvalue;
|
|
26949
|
-
if (array.length === 1 && deepEqual(array[0], nonArray)) {
|
|
26950
|
-
return true;
|
|
27068
|
+
function mangleLikeCloudFormation(payload) {
|
|
27069
|
+
return payload.replace(/[\u{80}-\u{10ffff}]/gu, "?");
|
|
26951
27070
|
}
|
|
26952
|
-
|
|
26953
|
-
|
|
26954
|
-
if (Array.isArray(lvalue) && Array.isArray(rvalue)) {
|
|
26955
|
-
if (lvalue.length !== rvalue.length) {
|
|
26956
|
-
return false;
|
|
27071
|
+
function safeParseFloat(str) {
|
|
27072
|
+
return Number(str);
|
|
26957
27073
|
}
|
|
26958
|
-
|
|
26959
|
-
|
|
26960
|
-
|
|
26961
|
-
|
|
26962
|
-
}
|
|
26963
|
-
break;
|
|
27074
|
+
var DATABASE;
|
|
27075
|
+
function database() {
|
|
27076
|
+
if (!DATABASE) {
|
|
27077
|
+
DATABASE = (0, aws_service_spec_1.loadAwsServiceSpecSync)();
|
|
26964
27078
|
}
|
|
27079
|
+
return DATABASE;
|
|
26965
27080
|
}
|
|
26966
|
-
|
|
26967
|
-
|
|
26968
|
-
return false;
|
|
26969
|
-
}
|
|
26970
|
-
function diffKeyedEntities(oldValue, newValue, elementDiff) {
|
|
26971
|
-
const result = {};
|
|
26972
|
-
for (const logicalId of unionOf(Object.keys(oldValue || {}), Object.keys(newValue || {}))) {
|
|
26973
|
-
const oldElement = oldValue && oldValue[logicalId];
|
|
26974
|
-
const newElement = newValue && newValue[logicalId];
|
|
26975
|
-
if (oldElement === void 0 && newElement === void 0) {
|
|
26976
|
-
continue;
|
|
27081
|
+
function loadResourceModel(type) {
|
|
27082
|
+
return database().lookup("resource", "cloudFormationType", "equals", type)[0];
|
|
26977
27083
|
}
|
|
26978
|
-
result[logicalId] = elementDiff(oldElement, newElement, logicalId);
|
|
26979
|
-
}
|
|
26980
|
-
return result;
|
|
26981
|
-
}
|
|
26982
|
-
function unionOf(lv, rv) {
|
|
26983
|
-
const result = new Set(lv);
|
|
26984
|
-
for (const v of rv) {
|
|
26985
|
-
result.add(v);
|
|
26986
|
-
}
|
|
26987
|
-
return new Array(...result);
|
|
26988
|
-
}
|
|
26989
|
-
function mangleLikeCloudFormation(payload) {
|
|
26990
|
-
return payload.replace(/[\u{80}-\u{10ffff}]/gu, "?");
|
|
26991
|
-
}
|
|
26992
|
-
function safeParseFloat(str) {
|
|
26993
|
-
return Number(str);
|
|
26994
|
-
}
|
|
26995
|
-
function database() {
|
|
26996
|
-
if (!DATABASE) {
|
|
26997
|
-
DATABASE = (0, import_aws_service_spec.loadAwsServiceSpecSync)();
|
|
26998
|
-
}
|
|
26999
|
-
return DATABASE;
|
|
27000
|
-
}
|
|
27001
|
-
function loadResourceModel(type) {
|
|
27002
|
-
return database().lookup("resource", "cloudFormationType", "equals", type)[0];
|
|
27003
|
-
}
|
|
27004
|
-
var import_aws_service_spec, DATABASE;
|
|
27005
|
-
var init_util = __esm({
|
|
27006
|
-
"../cloudformation-diff/lib/diff/util.ts"() {
|
|
27007
|
-
"use strict";
|
|
27008
|
-
import_aws_service_spec = require("@aws-cdk/aws-service-spec");
|
|
27009
27084
|
}
|
|
27010
27085
|
});
|
|
27011
27086
|
|
|
@@ -27044,13 +27119,14 @@ var require_fast_deep_equal = __commonJS({
|
|
|
27044
27119
|
}
|
|
27045
27120
|
});
|
|
27046
27121
|
|
|
27047
|
-
//
|
|
27048
|
-
var
|
|
27049
|
-
|
|
27050
|
-
"../cloudformation-diff/lib/iam/iam-identity-center.ts"() {
|
|
27122
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/lib/iam/iam-identity-center.js
|
|
27123
|
+
var require_iam_identity_center = __commonJS({
|
|
27124
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/lib/iam/iam-identity-center.js"(exports2) {
|
|
27051
27125
|
"use strict";
|
|
27052
|
-
|
|
27053
|
-
SsoPermissionSet =
|
|
27126
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
27127
|
+
exports2.SsoInstanceACAConfig = exports2.SsoAssignment = exports2.SsoPermissionSet = void 0;
|
|
27128
|
+
var deepEqual = require_fast_deep_equal();
|
|
27129
|
+
var SsoPermissionSet = class {
|
|
27054
27130
|
constructor(props) {
|
|
27055
27131
|
this.cfnLogicalId = props.cfnLogicalId;
|
|
27056
27132
|
this.name = props.name;
|
|
@@ -27059,10 +27135,11 @@ var init_iam_identity_center = __esm({
|
|
|
27059
27135
|
this.ssoCustomerManagedPolicyReferences = props.ssoCustomerManagedPolicyReferences;
|
|
27060
27136
|
}
|
|
27061
27137
|
equal(other) {
|
|
27062
|
-
return
|
|
27138
|
+
return deepEqual(this, other);
|
|
27063
27139
|
}
|
|
27064
27140
|
};
|
|
27065
|
-
|
|
27141
|
+
exports2.SsoPermissionSet = SsoPermissionSet;
|
|
27142
|
+
var SsoAssignment = class {
|
|
27066
27143
|
constructor(props) {
|
|
27067
27144
|
this.cfnLogicalId = props.cfnLogicalId;
|
|
27068
27145
|
this.ssoInstanceArn = props.ssoInstanceArn;
|
|
@@ -27073,52 +27150,58 @@ var init_iam_identity_center = __esm({
|
|
|
27073
27150
|
this.targetType = props.targetType;
|
|
27074
27151
|
}
|
|
27075
27152
|
equal(other) {
|
|
27076
|
-
return
|
|
27153
|
+
return deepEqual(this, other);
|
|
27077
27154
|
}
|
|
27078
27155
|
};
|
|
27079
|
-
|
|
27156
|
+
exports2.SsoAssignment = SsoAssignment;
|
|
27157
|
+
var SsoInstanceACAConfig = class {
|
|
27080
27158
|
constructor(props) {
|
|
27081
27159
|
this.cfnLogicalId = props.cfnLogicalId;
|
|
27082
27160
|
this.ssoInstanceArn = props.ssoInstanceArn;
|
|
27083
27161
|
this.accessControlAttributes = props.accessControlAttributes;
|
|
27084
27162
|
}
|
|
27085
27163
|
equal(other) {
|
|
27086
|
-
return
|
|
27164
|
+
return deepEqual(this, other);
|
|
27087
27165
|
}
|
|
27088
27166
|
};
|
|
27167
|
+
exports2.SsoInstanceACAConfig = SsoInstanceACAConfig;
|
|
27089
27168
|
}
|
|
27090
27169
|
});
|
|
27091
27170
|
|
|
27092
|
-
//
|
|
27093
|
-
|
|
27094
|
-
|
|
27095
|
-
}
|
|
27096
|
-
function mkUnparseable(value) {
|
|
27097
|
-
return {
|
|
27098
|
-
type: "unparseable",
|
|
27099
|
-
repr: typeof value === "string" ? value : JSON.stringify(value)
|
|
27100
|
-
};
|
|
27101
|
-
}
|
|
27102
|
-
var init_maybe_parsed = __esm({
|
|
27103
|
-
"../cloudformation-diff/lib/diff/maybe-parsed.ts"() {
|
|
27171
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/maybe-parsed.js
|
|
27172
|
+
var require_maybe_parsed = __commonJS({
|
|
27173
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/maybe-parsed.js"(exports2) {
|
|
27104
27174
|
"use strict";
|
|
27175
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
27176
|
+
exports2.mkParsed = mkParsed;
|
|
27177
|
+
exports2.mkUnparseable = mkUnparseable;
|
|
27178
|
+
function mkParsed(value) {
|
|
27179
|
+
return { type: "parsed", value };
|
|
27180
|
+
}
|
|
27181
|
+
function mkUnparseable(value) {
|
|
27182
|
+
return {
|
|
27183
|
+
type: "unparseable",
|
|
27184
|
+
repr: typeof value === "string" ? value : JSON.stringify(value)
|
|
27185
|
+
};
|
|
27186
|
+
}
|
|
27105
27187
|
}
|
|
27106
27188
|
});
|
|
27107
27189
|
|
|
27108
|
-
//
|
|
27109
|
-
var
|
|
27110
|
-
|
|
27111
|
-
"../cloudformation-diff/lib/iam/managed-policy.ts"() {
|
|
27190
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/lib/iam/managed-policy.js
|
|
27191
|
+
var require_managed_policy = __commonJS({
|
|
27192
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/lib/iam/managed-policy.js"(exports2) {
|
|
27112
27193
|
"use strict";
|
|
27113
|
-
|
|
27114
|
-
ManagedPolicyAttachment =
|
|
27194
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
27195
|
+
exports2.ManagedPolicyAttachment = void 0;
|
|
27196
|
+
var maybe_parsed_1 = require_maybe_parsed();
|
|
27197
|
+
var ManagedPolicyAttachment = class _ManagedPolicyAttachment {
|
|
27198
|
+
static parseManagedPolicies(identityArn, arns) {
|
|
27199
|
+
return typeof arns === "string" ? [new _ManagedPolicyAttachment(identityArn, arns)] : arns.map((arn) => new _ManagedPolicyAttachment(identityArn, arn));
|
|
27200
|
+
}
|
|
27115
27201
|
constructor(identityArn, managedPolicyArn) {
|
|
27116
27202
|
this.identityArn = identityArn;
|
|
27117
27203
|
this.managedPolicyArn = managedPolicyArn;
|
|
27118
27204
|
}
|
|
27119
|
-
static parseManagedPolicies(identityArn, arns) {
|
|
27120
|
-
return typeof arns === "string" ? [new _ManagedPolicyAttachment(identityArn, arns)] : arns.map((arn) => new _ManagedPolicyAttachment(identityArn, arn));
|
|
27121
|
-
}
|
|
27122
27205
|
equal(other) {
|
|
27123
27206
|
return this.identityArn === other.identityArn && this.managedPolicyArn === other.managedPolicyArn;
|
|
27124
27207
|
}
|
|
@@ -27129,166 +27212,96 @@ var init_managed_policy = __esm({
|
|
|
27129
27212
|
* @internal
|
|
27130
27213
|
*/
|
|
27131
27214
|
_toJson() {
|
|
27132
|
-
return mkParsed({
|
|
27215
|
+
return (0, maybe_parsed_1.mkParsed)({
|
|
27133
27216
|
identityArn: this.identityArn,
|
|
27134
27217
|
managedPolicyArn: this.managedPolicyArn
|
|
27135
27218
|
});
|
|
27136
27219
|
}
|
|
27137
27220
|
};
|
|
27221
|
+
exports2.ManagedPolicyAttachment = ManagedPolicyAttachment;
|
|
27138
27222
|
}
|
|
27139
27223
|
});
|
|
27140
27224
|
|
|
27141
|
-
//
|
|
27142
|
-
|
|
27143
|
-
|
|
27144
|
-
const keyA = keyFn(a);
|
|
27145
|
-
const keyB = keyFn(b);
|
|
27146
|
-
const len = Math.min(keyA.length, keyB.length);
|
|
27147
|
-
for (let i = 0; i < len; i++) {
|
|
27148
|
-
const c = compare(keyA[i], keyB[i]);
|
|
27149
|
-
if (c !== 0) {
|
|
27150
|
-
return c;
|
|
27151
|
-
}
|
|
27152
|
-
}
|
|
27153
|
-
return keyA.length - keyB.length;
|
|
27154
|
-
};
|
|
27155
|
-
}
|
|
27156
|
-
function compare(a, b) {
|
|
27157
|
-
if (a < b) {
|
|
27158
|
-
return -1;
|
|
27159
|
-
}
|
|
27160
|
-
if (b < a) {
|
|
27161
|
-
return 1;
|
|
27162
|
-
}
|
|
27163
|
-
return 0;
|
|
27164
|
-
}
|
|
27165
|
-
function dropIfEmpty(xs) {
|
|
27166
|
-
return xs.length > 0 ? xs : void 0;
|
|
27167
|
-
}
|
|
27168
|
-
function deepRemoveUndefined(x) {
|
|
27169
|
-
if (typeof x === void 0 || x === null) {
|
|
27170
|
-
return x;
|
|
27171
|
-
}
|
|
27172
|
-
if (Array.isArray(x)) {
|
|
27173
|
-
return x.map(deepRemoveUndefined);
|
|
27174
|
-
}
|
|
27175
|
-
if (typeof x === "object") {
|
|
27176
|
-
for (const [key, value] of Object.entries(x)) {
|
|
27177
|
-
x[key] = deepRemoveUndefined(value);
|
|
27178
|
-
if (x[key] === void 0) {
|
|
27179
|
-
delete x[key];
|
|
27180
|
-
}
|
|
27181
|
-
}
|
|
27182
|
-
return x;
|
|
27183
|
-
}
|
|
27184
|
-
return x;
|
|
27185
|
-
}
|
|
27186
|
-
function flatMap(xs, f) {
|
|
27187
|
-
const ret = new Array();
|
|
27188
|
-
for (const x of xs) {
|
|
27189
|
-
ret.push(...f(x));
|
|
27190
|
-
}
|
|
27191
|
-
return ret;
|
|
27192
|
-
}
|
|
27193
|
-
var init_util2 = __esm({
|
|
27194
|
-
"../cloudformation-diff/lib/util.ts"() {
|
|
27225
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/lib/util.js
|
|
27226
|
+
var require_util3 = __commonJS({
|
|
27227
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/lib/util.js"(exports2) {
|
|
27195
27228
|
"use strict";
|
|
27196
|
-
|
|
27197
|
-
|
|
27198
|
-
|
|
27199
|
-
|
|
27200
|
-
|
|
27201
|
-
|
|
27202
|
-
|
|
27203
|
-
|
|
27204
|
-
|
|
27205
|
-
|
|
27206
|
-
|
|
27207
|
-
|
|
27208
|
-
|
|
27209
|
-
|
|
27210
|
-
|
|
27211
|
-
|
|
27212
|
-
|
|
27213
|
-
|
|
27214
|
-
};
|
|
27215
|
-
if (x.Principal !== void 0) {
|
|
27216
|
-
if (x.Principal === "*") {
|
|
27217
|
-
statement.Principal = "*";
|
|
27218
|
-
} else if (/^\d{12}$/.test(x.Principal)) {
|
|
27219
|
-
statement.Principal = { AWS: `arn:aws:iam::${x.Principal}:root` };
|
|
27220
|
-
} else {
|
|
27221
|
-
statement.Principal = { Service: x.Principal };
|
|
27229
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
27230
|
+
exports2.makeComparator = makeComparator;
|
|
27231
|
+
exports2.dropIfEmpty = dropIfEmpty;
|
|
27232
|
+
exports2.deepRemoveUndefined = deepRemoveUndefined;
|
|
27233
|
+
exports2.flatMap = flatMap;
|
|
27234
|
+
function makeComparator(keyFn) {
|
|
27235
|
+
return (a, b) => {
|
|
27236
|
+
const keyA = keyFn(a);
|
|
27237
|
+
const keyB = keyFn(b);
|
|
27238
|
+
const len = Math.min(keyA.length, keyB.length);
|
|
27239
|
+
for (let i = 0; i < len; i++) {
|
|
27240
|
+
const c = compare(keyA[i], keyB[i]);
|
|
27241
|
+
if (c !== 0) {
|
|
27242
|
+
return c;
|
|
27243
|
+
}
|
|
27244
|
+
}
|
|
27245
|
+
return keyA.length - keyB.length;
|
|
27246
|
+
};
|
|
27222
27247
|
}
|
|
27223
|
-
|
|
27224
|
-
|
|
27225
|
-
|
|
27226
|
-
|
|
27248
|
+
function compare(a, b) {
|
|
27249
|
+
if (a < b) {
|
|
27250
|
+
return -1;
|
|
27251
|
+
}
|
|
27252
|
+
if (b < a) {
|
|
27253
|
+
return 1;
|
|
27254
|
+
}
|
|
27255
|
+
return 0;
|
|
27227
27256
|
}
|
|
27228
|
-
|
|
27229
|
-
|
|
27230
|
-
if (x.SourceAccount !== void 0) {
|
|
27231
|
-
if (statement.Condition === void 0) {
|
|
27232
|
-
statement.Condition = {};
|
|
27257
|
+
function dropIfEmpty(xs) {
|
|
27258
|
+
return xs.length > 0 ? xs : void 0;
|
|
27233
27259
|
}
|
|
27234
|
-
|
|
27235
|
-
|
|
27236
|
-
|
|
27237
|
-
|
|
27238
|
-
|
|
27260
|
+
function deepRemoveUndefined(x) {
|
|
27261
|
+
if (typeof x === void 0 || x === null) {
|
|
27262
|
+
return x;
|
|
27263
|
+
}
|
|
27264
|
+
if (Array.isArray(x)) {
|
|
27265
|
+
return x.map(deepRemoveUndefined);
|
|
27266
|
+
}
|
|
27267
|
+
if (typeof x === "object") {
|
|
27268
|
+
for (const [key, value] of Object.entries(x)) {
|
|
27269
|
+
x[key] = deepRemoveUndefined(value);
|
|
27270
|
+
if (x[key] === void 0) {
|
|
27271
|
+
delete x[key];
|
|
27272
|
+
}
|
|
27273
|
+
}
|
|
27274
|
+
return x;
|
|
27275
|
+
}
|
|
27276
|
+
return x;
|
|
27239
27277
|
}
|
|
27240
|
-
|
|
27241
|
-
|
|
27242
|
-
|
|
27243
|
-
|
|
27244
|
-
|
|
27245
|
-
|
|
27246
|
-
}
|
|
27247
|
-
function expectEffect(x) {
|
|
27248
|
-
if (x === "Allow" /* Allow */ || x === "Deny" /* Deny */) {
|
|
27249
|
-
return x;
|
|
27250
|
-
}
|
|
27251
|
-
return "Unknown" /* Unknown */;
|
|
27252
|
-
}
|
|
27253
|
-
function forceListOfStrings(x) {
|
|
27254
|
-
if (typeof x === "string") {
|
|
27255
|
-
return [x];
|
|
27256
|
-
}
|
|
27257
|
-
if (typeof x === "undefined" || x === null) {
|
|
27258
|
-
return [];
|
|
27259
|
-
}
|
|
27260
|
-
if (Array.isArray(x)) {
|
|
27261
|
-
return x.map((e) => forceListOfStrings(e).join(","));
|
|
27262
|
-
}
|
|
27263
|
-
if (typeof x === "object" && x !== null) {
|
|
27264
|
-
const ret = [];
|
|
27265
|
-
for (const [key, value] of Object.entries(x)) {
|
|
27266
|
-
ret.push(...forceListOfStrings(value).map((s) => `${key}:${s}`));
|
|
27278
|
+
function flatMap(xs, f) {
|
|
27279
|
+
const ret = new Array();
|
|
27280
|
+
for (const x of xs) {
|
|
27281
|
+
ret.push(...f(x));
|
|
27282
|
+
}
|
|
27283
|
+
return ret;
|
|
27267
27284
|
}
|
|
27268
|
-
return ret;
|
|
27269
|
-
}
|
|
27270
|
-
return [`${x}`];
|
|
27271
|
-
}
|
|
27272
|
-
function renderCondition(condition) {
|
|
27273
|
-
if (!condition || Object.keys(condition).length === 0) {
|
|
27274
|
-
return "";
|
|
27275
27285
|
}
|
|
27276
|
-
|
|
27277
|
-
|
|
27278
|
-
|
|
27279
|
-
|
|
27280
|
-
|
|
27281
|
-
|
|
27282
|
-
|
|
27283
|
-
|
|
27284
|
-
|
|
27285
|
-
|
|
27286
|
-
|
|
27287
|
-
|
|
27286
|
+
});
|
|
27287
|
+
|
|
27288
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/lib/iam/statement.js
|
|
27289
|
+
var require_statement = __commonJS({
|
|
27290
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/lib/iam/statement.js"(exports2) {
|
|
27291
|
+
"use strict";
|
|
27292
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
27293
|
+
exports2.Effect = exports2.Targets = exports2.Statement = void 0;
|
|
27294
|
+
exports2.parseStatements = parseStatements;
|
|
27295
|
+
exports2.parseLambdaPermission = parseLambdaPermission;
|
|
27296
|
+
exports2.renderCondition = renderCondition;
|
|
27297
|
+
var maybe_parsed_1 = require_maybe_parsed();
|
|
27298
|
+
var util_1 = require_util3();
|
|
27299
|
+
var deepEqual = require_fast_deep_equal();
|
|
27300
|
+
var Statement = class {
|
|
27288
27301
|
constructor(statement) {
|
|
27289
27302
|
if (typeof statement === "string") {
|
|
27290
27303
|
this.sid = void 0;
|
|
27291
|
-
this.effect =
|
|
27304
|
+
this.effect = Effect.Unknown;
|
|
27292
27305
|
this.resources = new Targets({}, "", "");
|
|
27293
27306
|
this.actions = new Targets({}, "", "");
|
|
27294
27307
|
this.principals = new Targets({}, "", "");
|
|
@@ -27308,7 +27321,7 @@ var init_statement = __esm({
|
|
|
27308
27321
|
* Whether this statement is equal to the other statement
|
|
27309
27322
|
*/
|
|
27310
27323
|
equal(other) {
|
|
27311
|
-
return this.sid === other.sid && this.effect === other.effect && this.serializedIntrinsic === other.serializedIntrinsic && this.resources.equal(other.resources) && this.actions.equal(other.actions) && this.principals.equal(other.principals) &&
|
|
27324
|
+
return this.sid === other.sid && this.effect === other.effect && this.serializedIntrinsic === other.serializedIntrinsic && this.resources.equal(other.resources) && this.actions.equal(other.actions) && this.principals.equal(other.principals) && deepEqual(this.condition, other.condition);
|
|
27312
27325
|
}
|
|
27313
27326
|
render() {
|
|
27314
27327
|
return this.serializedIntrinsic ? {
|
|
@@ -27333,7 +27346,7 @@ var init_statement = __esm({
|
|
|
27333
27346
|
* @internal
|
|
27334
27347
|
*/
|
|
27335
27348
|
_toJson() {
|
|
27336
|
-
return this.serializedIntrinsic ? mkUnparseable(this.serializedIntrinsic) : mkParsed(deepRemoveUndefined({
|
|
27349
|
+
return this.serializedIntrinsic ? (0, maybe_parsed_1.mkUnparseable)(this.serializedIntrinsic) : (0, maybe_parsed_1.mkParsed)((0, util_1.deepRemoveUndefined)({
|
|
27337
27350
|
sid: this.sid,
|
|
27338
27351
|
effect: this.effect,
|
|
27339
27352
|
resources: this.resources._toJson(),
|
|
@@ -27350,10 +27363,55 @@ var init_statement = __esm({
|
|
|
27350
27363
|
*/
|
|
27351
27364
|
get isNegativeStatement() {
|
|
27352
27365
|
const notTarget = this.actions.not || this.principals.not || this.resources.not;
|
|
27353
|
-
return this.effect ===
|
|
27366
|
+
return this.effect === Effect.Allow ? notTarget : !notTarget;
|
|
27354
27367
|
}
|
|
27355
27368
|
};
|
|
27356
|
-
|
|
27369
|
+
exports2.Statement = Statement;
|
|
27370
|
+
function parseStatements(x) {
|
|
27371
|
+
if (x === void 0) {
|
|
27372
|
+
x = [];
|
|
27373
|
+
}
|
|
27374
|
+
if (!Array.isArray(x)) {
|
|
27375
|
+
x = [x];
|
|
27376
|
+
}
|
|
27377
|
+
return x.map((s) => new Statement(s));
|
|
27378
|
+
}
|
|
27379
|
+
function parseLambdaPermission(x) {
|
|
27380
|
+
const statement = {
|
|
27381
|
+
Effect: "Allow",
|
|
27382
|
+
Action: x.Action,
|
|
27383
|
+
Resource: x.FunctionName
|
|
27384
|
+
};
|
|
27385
|
+
if (x.Principal !== void 0) {
|
|
27386
|
+
if (x.Principal === "*") {
|
|
27387
|
+
statement.Principal = "*";
|
|
27388
|
+
} else if (/^\d{12}$/.test(x.Principal)) {
|
|
27389
|
+
statement.Principal = { AWS: `arn:aws:iam::${x.Principal}:root` };
|
|
27390
|
+
} else {
|
|
27391
|
+
statement.Principal = { Service: x.Principal };
|
|
27392
|
+
}
|
|
27393
|
+
}
|
|
27394
|
+
if (x.SourceArn !== void 0) {
|
|
27395
|
+
if (statement.Condition === void 0) {
|
|
27396
|
+
statement.Condition = {};
|
|
27397
|
+
}
|
|
27398
|
+
statement.Condition.ArnLike = { "AWS:SourceArn": x.SourceArn };
|
|
27399
|
+
}
|
|
27400
|
+
if (x.SourceAccount !== void 0) {
|
|
27401
|
+
if (statement.Condition === void 0) {
|
|
27402
|
+
statement.Condition = {};
|
|
27403
|
+
}
|
|
27404
|
+
statement.Condition.StringEquals = { "AWS:SourceAccount": x.SourceAccount };
|
|
27405
|
+
}
|
|
27406
|
+
if (x.EventSourceToken !== void 0) {
|
|
27407
|
+
if (statement.Condition === void 0) {
|
|
27408
|
+
statement.Condition = {};
|
|
27409
|
+
}
|
|
27410
|
+
statement.Condition.StringEquals = { "lambda:EventSourceToken": x.EventSourceToken };
|
|
27411
|
+
}
|
|
27412
|
+
return new Statement(statement);
|
|
27413
|
+
}
|
|
27414
|
+
var Targets = class {
|
|
27357
27415
|
constructor(statement, positiveKey, negativeKey) {
|
|
27358
27416
|
if (negativeKey in statement) {
|
|
27359
27417
|
this.values = forceListOfStrings(statement[negativeKey]);
|
|
@@ -27371,7 +27429,7 @@ var init_statement = __esm({
|
|
|
27371
27429
|
* Whether this set of targets is equal to the other set of targets
|
|
27372
27430
|
*/
|
|
27373
27431
|
equal(other) {
|
|
27374
|
-
return this.not === other.not &&
|
|
27432
|
+
return this.not === other.not && deepEqual(this.values.sort(), other.values.sort());
|
|
27375
27433
|
}
|
|
27376
27434
|
/**
|
|
27377
27435
|
* If the current value set is empty, put this in it
|
|
@@ -27408,21 +27466,59 @@ var init_statement = __esm({
|
|
|
27408
27466
|
return { not: this.not, values: this.values };
|
|
27409
27467
|
}
|
|
27410
27468
|
};
|
|
27469
|
+
exports2.Targets = Targets;
|
|
27470
|
+
var Effect;
|
|
27471
|
+
(function(Effect2) {
|
|
27472
|
+
Effect2["Unknown"] = "Unknown";
|
|
27473
|
+
Effect2["Allow"] = "Allow";
|
|
27474
|
+
Effect2["Deny"] = "Deny";
|
|
27475
|
+
})(Effect || (exports2.Effect = Effect = {}));
|
|
27476
|
+
function expectString(x) {
|
|
27477
|
+
return typeof x === "string" ? x : void 0;
|
|
27478
|
+
}
|
|
27479
|
+
function expectEffect(x) {
|
|
27480
|
+
if (x === Effect.Allow || x === Effect.Deny) {
|
|
27481
|
+
return x;
|
|
27482
|
+
}
|
|
27483
|
+
return Effect.Unknown;
|
|
27484
|
+
}
|
|
27485
|
+
function forceListOfStrings(x) {
|
|
27486
|
+
if (typeof x === "string") {
|
|
27487
|
+
return [x];
|
|
27488
|
+
}
|
|
27489
|
+
if (typeof x === "undefined" || x === null) {
|
|
27490
|
+
return [];
|
|
27491
|
+
}
|
|
27492
|
+
if (Array.isArray(x)) {
|
|
27493
|
+
return x.map((e) => forceListOfStrings(e).join(","));
|
|
27494
|
+
}
|
|
27495
|
+
if (typeof x === "object" && x !== null) {
|
|
27496
|
+
const ret = [];
|
|
27497
|
+
for (const [key, value] of Object.entries(x)) {
|
|
27498
|
+
ret.push(...forceListOfStrings(value).map((s) => `${key}:${s}`));
|
|
27499
|
+
}
|
|
27500
|
+
return ret;
|
|
27501
|
+
}
|
|
27502
|
+
return [`${x}`];
|
|
27503
|
+
}
|
|
27504
|
+
function renderCondition(condition) {
|
|
27505
|
+
if (!condition || Object.keys(condition).length === 0) {
|
|
27506
|
+
return "";
|
|
27507
|
+
}
|
|
27508
|
+
const jsonRepresentation = JSON.stringify(condition, void 0, 2);
|
|
27509
|
+
const lines = jsonRepresentation.split("\n");
|
|
27510
|
+
return lines.slice(1, lines.length - 1).map((s) => s.slice(2)).join("\n");
|
|
27511
|
+
}
|
|
27411
27512
|
}
|
|
27412
27513
|
});
|
|
27413
27514
|
|
|
27414
|
-
//
|
|
27415
|
-
|
|
27416
|
-
|
|
27417
|
-
}
|
|
27418
|
-
function difference(collection, elements) {
|
|
27419
|
-
return collection.filter((x) => !contains(x, elements));
|
|
27420
|
-
}
|
|
27421
|
-
var DiffableCollection;
|
|
27422
|
-
var init_diffable = __esm({
|
|
27423
|
-
"../cloudformation-diff/lib/diffable.ts"() {
|
|
27515
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/lib/diffable.js
|
|
27516
|
+
var require_diffable = __commonJS({
|
|
27517
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/lib/diffable.js"(exports2) {
|
|
27424
27518
|
"use strict";
|
|
27425
|
-
|
|
27519
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
27520
|
+
exports2.DiffableCollection = void 0;
|
|
27521
|
+
var DiffableCollection = class {
|
|
27426
27522
|
constructor() {
|
|
27427
27523
|
this.additions = [];
|
|
27428
27524
|
this.removals = [];
|
|
@@ -27449,101 +27545,100 @@ var init_diffable = __esm({
|
|
|
27449
27545
|
return this.removals.length > 0;
|
|
27450
27546
|
}
|
|
27451
27547
|
};
|
|
27548
|
+
exports2.DiffableCollection = DiffableCollection;
|
|
27549
|
+
function contains(element, xs) {
|
|
27550
|
+
return xs.some((x) => x.equal(element));
|
|
27551
|
+
}
|
|
27552
|
+
function difference(collection, elements) {
|
|
27553
|
+
return collection.filter((x) => !contains(x, elements));
|
|
27554
|
+
}
|
|
27452
27555
|
}
|
|
27453
27556
|
});
|
|
27454
27557
|
|
|
27455
|
-
//
|
|
27456
|
-
|
|
27457
|
-
|
|
27458
|
-
|
|
27459
|
-
|
|
27460
|
-
|
|
27461
|
-
|
|
27462
|
-
|
|
27463
|
-
|
|
27464
|
-
|
|
27465
|
-
|
|
27466
|
-
|
|
27558
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/lib/render-intrinsics.js
|
|
27559
|
+
var require_render_intrinsics = __commonJS({
|
|
27560
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/lib/render-intrinsics.js"(exports2) {
|
|
27561
|
+
"use strict";
|
|
27562
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
27563
|
+
exports2.renderIntrinsics = renderIntrinsics;
|
|
27564
|
+
function renderIntrinsics(x) {
|
|
27565
|
+
if (Array.isArray(x)) {
|
|
27566
|
+
return x.filter((el) => !isNoValue(el)).map(renderIntrinsics);
|
|
27567
|
+
}
|
|
27568
|
+
if (isNoValue(x)) {
|
|
27569
|
+
return void 0;
|
|
27570
|
+
}
|
|
27571
|
+
const intrinsic = getIntrinsic(x);
|
|
27572
|
+
if (intrinsic) {
|
|
27573
|
+
if (intrinsic.fn === "Ref") {
|
|
27574
|
+
return "${" + intrinsic.args + "}";
|
|
27575
|
+
}
|
|
27576
|
+
if (intrinsic.fn === "Fn::GetAtt") {
|
|
27577
|
+
return "${" + intrinsic.args[0] + "." + intrinsic.args[1] + "}";
|
|
27578
|
+
}
|
|
27579
|
+
if (intrinsic.fn === "Fn::Join") {
|
|
27580
|
+
return unCloudFormationFnJoin(intrinsic.args[0], intrinsic.args[1]);
|
|
27581
|
+
}
|
|
27582
|
+
return stringifyIntrinsic(intrinsic.fn, intrinsic.args);
|
|
27583
|
+
}
|
|
27584
|
+
if (typeof x === "object" && x !== null) {
|
|
27585
|
+
const ret = {};
|
|
27586
|
+
for (const [key, value] of Object.entries(x)) {
|
|
27587
|
+
if (!isNoValue(value)) {
|
|
27588
|
+
ret[key] = renderIntrinsics(value);
|
|
27589
|
+
}
|
|
27590
|
+
}
|
|
27591
|
+
return ret;
|
|
27592
|
+
}
|
|
27593
|
+
return x;
|
|
27467
27594
|
}
|
|
27468
|
-
|
|
27469
|
-
|
|
27595
|
+
function unCloudFormationFnJoin(separator, args) {
|
|
27596
|
+
if (Array.isArray(args)) {
|
|
27597
|
+
return args.filter((el) => !isNoValue(el)).map(renderIntrinsics).join(separator);
|
|
27598
|
+
}
|
|
27599
|
+
return stringifyIntrinsic("Fn::Join", [separator, args]);
|
|
27470
27600
|
}
|
|
27471
|
-
|
|
27472
|
-
return
|
|
27601
|
+
function stringifyIntrinsic(fn, args) {
|
|
27602
|
+
return JSON.stringify({ [fn]: renderIntrinsics(args) });
|
|
27473
27603
|
}
|
|
27474
|
-
|
|
27475
|
-
|
|
27476
|
-
|
|
27477
|
-
const ret = {};
|
|
27478
|
-
for (const [key, value] of Object.entries(x)) {
|
|
27479
|
-
if (!isNoValue(value)) {
|
|
27480
|
-
ret[key] = renderIntrinsics(value);
|
|
27604
|
+
function getIntrinsic(x) {
|
|
27605
|
+
if (x === void 0 || x === null || Array.isArray(x)) {
|
|
27606
|
+
return void 0;
|
|
27481
27607
|
}
|
|
27608
|
+
if (typeof x !== "object") {
|
|
27609
|
+
return void 0;
|
|
27610
|
+
}
|
|
27611
|
+
const keys = Object.keys(x);
|
|
27612
|
+
return keys.length === 1 && (keys[0] === "Ref" || keys[0].startsWith("Fn::")) ? { fn: keys[0], args: x[keys[0]] } : void 0;
|
|
27613
|
+
}
|
|
27614
|
+
function isNoValue(x) {
|
|
27615
|
+
const int = getIntrinsic(x);
|
|
27616
|
+
return int && int.fn === "Ref" && int.args === "AWS::NoValue";
|
|
27482
27617
|
}
|
|
27483
|
-
return ret;
|
|
27484
|
-
}
|
|
27485
|
-
return x;
|
|
27486
|
-
}
|
|
27487
|
-
function unCloudFormationFnJoin(separator, args) {
|
|
27488
|
-
if (Array.isArray(args)) {
|
|
27489
|
-
return args.filter((el) => !isNoValue(el)).map(renderIntrinsics).join(separator);
|
|
27490
|
-
}
|
|
27491
|
-
return stringifyIntrinsic("Fn::Join", [separator, args]);
|
|
27492
|
-
}
|
|
27493
|
-
function stringifyIntrinsic(fn, args) {
|
|
27494
|
-
return JSON.stringify({ [fn]: renderIntrinsics(args) });
|
|
27495
|
-
}
|
|
27496
|
-
function getIntrinsic(x) {
|
|
27497
|
-
if (x === void 0 || x === null || Array.isArray(x)) {
|
|
27498
|
-
return void 0;
|
|
27499
|
-
}
|
|
27500
|
-
if (typeof x !== "object") {
|
|
27501
|
-
return void 0;
|
|
27502
|
-
}
|
|
27503
|
-
const keys = Object.keys(x);
|
|
27504
|
-
return keys.length === 1 && (keys[0] === "Ref" || keys[0].startsWith("Fn::")) ? { fn: keys[0], args: x[keys[0]] } : void 0;
|
|
27505
|
-
}
|
|
27506
|
-
function isNoValue(x) {
|
|
27507
|
-
const int = getIntrinsic(x);
|
|
27508
|
-
return int && int.fn === "Ref" && int.args === "AWS::NoValue";
|
|
27509
|
-
}
|
|
27510
|
-
var init_render_intrinsics = __esm({
|
|
27511
|
-
"../cloudformation-diff/lib/render-intrinsics.ts"() {
|
|
27512
|
-
"use strict";
|
|
27513
27618
|
}
|
|
27514
27619
|
});
|
|
27515
27620
|
|
|
27516
|
-
//
|
|
27517
|
-
|
|
27518
|
-
|
|
27519
|
-
|
|
27520
|
-
|
|
27521
|
-
|
|
27522
|
-
|
|
27523
|
-
|
|
27524
|
-
|
|
27525
|
-
|
|
27526
|
-
|
|
27527
|
-
var
|
|
27528
|
-
var
|
|
27529
|
-
|
|
27530
|
-
|
|
27531
|
-
import_service_spec_types = __toESM(require_lib9());
|
|
27532
|
-
chalk3 = __toESM(require_source());
|
|
27533
|
-
init_iam_identity_center();
|
|
27534
|
-
init_managed_policy();
|
|
27535
|
-
init_statement();
|
|
27536
|
-
init_diffable();
|
|
27537
|
-
init_render_intrinsics();
|
|
27538
|
-
init_util2();
|
|
27539
|
-
IamChanges = class {
|
|
27621
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.js
|
|
27622
|
+
var require_iam_changes = __commonJS({
|
|
27623
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/lib/iam/iam-changes.js"(exports2) {
|
|
27624
|
+
"use strict";
|
|
27625
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
27626
|
+
exports2.IamChanges = void 0;
|
|
27627
|
+
var service_spec_types_1 = require_lib9();
|
|
27628
|
+
var chalk3 = require_source();
|
|
27629
|
+
var iam_identity_center_1 = require_iam_identity_center();
|
|
27630
|
+
var managed_policy_1 = require_managed_policy();
|
|
27631
|
+
var statement_1 = require_statement();
|
|
27632
|
+
var diffable_1 = require_diffable();
|
|
27633
|
+
var render_intrinsics_1 = require_render_intrinsics();
|
|
27634
|
+
var util_1 = require_util3();
|
|
27635
|
+
var IamChanges = class {
|
|
27540
27636
|
constructor(props) {
|
|
27541
|
-
|
|
27542
|
-
this.
|
|
27543
|
-
this.
|
|
27544
|
-
this.
|
|
27545
|
-
this.
|
|
27546
|
-
this.ssoInstanceACAConfigs = new DiffableCollection();
|
|
27637
|
+
this.statements = new diffable_1.DiffableCollection();
|
|
27638
|
+
this.managedPolicies = new diffable_1.DiffableCollection();
|
|
27639
|
+
this.ssoPermissionSets = new diffable_1.DiffableCollection();
|
|
27640
|
+
this.ssoAssignments = new diffable_1.DiffableCollection();
|
|
27641
|
+
this.ssoInstanceACAConfigs = new diffable_1.DiffableCollection();
|
|
27547
27642
|
for (const propertyChange of props.propertyChanges) {
|
|
27548
27643
|
this.readPropertyChange(propertyChange);
|
|
27549
27644
|
}
|
|
@@ -27596,7 +27691,7 @@ var init_iam_changes = __esm({
|
|
|
27596
27691
|
renderedStatement.condition
|
|
27597
27692
|
].map((s) => chalk3.red(s)));
|
|
27598
27693
|
}
|
|
27599
|
-
ret.sort(makeComparator((row) => [row[1]]));
|
|
27694
|
+
ret.sort((0, util_1.makeComparator)((row) => [row[1]]));
|
|
27600
27695
|
ret.splice(0, 0, header);
|
|
27601
27696
|
return ret;
|
|
27602
27697
|
}
|
|
@@ -27617,7 +27712,7 @@ var init_iam_changes = __esm({
|
|
|
27617
27712
|
att.managedPolicyArn
|
|
27618
27713
|
].map((s) => chalk3.red(s)));
|
|
27619
27714
|
}
|
|
27620
|
-
ret.sort(makeComparator((row) => [row[1]]));
|
|
27715
|
+
ret.sort((0, util_1.makeComparator)((row) => [row[1]]));
|
|
27621
27716
|
ret.splice(0, 0, header);
|
|
27622
27717
|
return ret;
|
|
27623
27718
|
}
|
|
@@ -27648,7 +27743,7 @@ var init_iam_changes = __esm({
|
|
|
27648
27743
|
att.targetType || ""
|
|
27649
27744
|
].map((s) => chalk3.red(s)));
|
|
27650
27745
|
}
|
|
27651
|
-
ret.sort(makeComparator((row) => [row[1]]));
|
|
27746
|
+
ret.sort((0, util_1.makeComparator)((row) => [row[1]]));
|
|
27652
27747
|
ret.splice(0, 0, header);
|
|
27653
27748
|
return ret;
|
|
27654
27749
|
}
|
|
@@ -27676,7 +27771,7 @@ var init_iam_changes = __esm({
|
|
|
27676
27771
|
((_b = att.accessControlAttributes) == null ? void 0 : _b.map(formatAccessControlAttribute).join("\n")) || ""
|
|
27677
27772
|
].map((s) => chalk3.red(s)));
|
|
27678
27773
|
}
|
|
27679
|
-
ret.sort(makeComparator((row) => [row[1]]));
|
|
27774
|
+
ret.sort((0, util_1.makeComparator)((row) => [row[1]]));
|
|
27680
27775
|
ret.splice(0, 0, header);
|
|
27681
27776
|
return ret;
|
|
27682
27777
|
}
|
|
@@ -27718,7 +27813,7 @@ var init_iam_changes = __esm({
|
|
|
27718
27813
|
((_b = att.ssoCustomerManagedPolicyReferences) == null ? void 0 : _b.map(formatManagedPolicyRef).join("\n")) || ""
|
|
27719
27814
|
].map((s) => chalk3.red(s)));
|
|
27720
27815
|
}
|
|
27721
|
-
ret.sort(makeComparator((row) => [row[1]]));
|
|
27816
|
+
ret.sort((0, util_1.makeComparator)((row) => [row[1]]));
|
|
27722
27817
|
ret.splice(0, 0, header);
|
|
27723
27818
|
return ret;
|
|
27724
27819
|
}
|
|
@@ -27729,24 +27824,24 @@ var init_iam_changes = __esm({
|
|
|
27729
27824
|
* @internal
|
|
27730
27825
|
*/
|
|
27731
27826
|
_toJson() {
|
|
27732
|
-
return deepRemoveUndefined({
|
|
27733
|
-
statementAdditions: dropIfEmpty(this.statements.additions.map((s) => s._toJson())),
|
|
27734
|
-
statementRemovals: dropIfEmpty(this.statements.removals.map((s) => s._toJson())),
|
|
27735
|
-
managedPolicyAdditions: dropIfEmpty(this.managedPolicies.additions.map((s) => s._toJson())),
|
|
27736
|
-
managedPolicyRemovals: dropIfEmpty(this.managedPolicies.removals.map((s) => s._toJson()))
|
|
27827
|
+
return (0, util_1.deepRemoveUndefined)({
|
|
27828
|
+
statementAdditions: (0, util_1.dropIfEmpty)(this.statements.additions.map((s) => s._toJson())),
|
|
27829
|
+
statementRemovals: (0, util_1.dropIfEmpty)(this.statements.removals.map((s) => s._toJson())),
|
|
27830
|
+
managedPolicyAdditions: (0, util_1.dropIfEmpty)(this.managedPolicies.additions.map((s) => s._toJson())),
|
|
27831
|
+
managedPolicyRemovals: (0, util_1.dropIfEmpty)(this.managedPolicies.removals.map((s) => s._toJson()))
|
|
27737
27832
|
});
|
|
27738
27833
|
}
|
|
27739
27834
|
readPropertyChange(propertyChange) {
|
|
27740
27835
|
switch (propertyChange.scrutinyType) {
|
|
27741
|
-
case
|
|
27836
|
+
case service_spec_types_1.PropertyScrutinyType.InlineIdentityPolicies:
|
|
27742
27837
|
this.statements.addOld(...this.readIdentityPolicies(propertyChange.oldValue, propertyChange.resourceLogicalId));
|
|
27743
27838
|
this.statements.addNew(...this.readIdentityPolicies(propertyChange.newValue, propertyChange.resourceLogicalId));
|
|
27744
27839
|
break;
|
|
27745
|
-
case
|
|
27840
|
+
case service_spec_types_1.PropertyScrutinyType.InlineResourcePolicy:
|
|
27746
27841
|
this.statements.addOld(...this.readResourceStatements(propertyChange.oldValue, propertyChange.resourceLogicalId));
|
|
27747
27842
|
this.statements.addNew(...this.readResourceStatements(propertyChange.newValue, propertyChange.resourceLogicalId));
|
|
27748
27843
|
break;
|
|
27749
|
-
case
|
|
27844
|
+
case service_spec_types_1.PropertyScrutinyType.ManagedPolicies:
|
|
27750
27845
|
this.managedPolicies.addOld(...this.readManagedPolicies(propertyChange.oldValue, propertyChange.resourceLogicalId));
|
|
27751
27846
|
this.managedPolicies.addNew(...this.readManagedPolicies(propertyChange.newValue, propertyChange.resourceLogicalId));
|
|
27752
27847
|
break;
|
|
@@ -27754,27 +27849,27 @@ var init_iam_changes = __esm({
|
|
|
27754
27849
|
}
|
|
27755
27850
|
readResourceChange(resourceChange) {
|
|
27756
27851
|
switch (resourceChange.scrutinyType) {
|
|
27757
|
-
case
|
|
27852
|
+
case service_spec_types_1.ResourceScrutinyType.IdentityPolicyResource:
|
|
27758
27853
|
this.statements.addOld(...this.readIdentityPolicyResource(resourceChange.oldProperties));
|
|
27759
27854
|
this.statements.addNew(...this.readIdentityPolicyResource(resourceChange.newProperties));
|
|
27760
27855
|
break;
|
|
27761
|
-
case
|
|
27856
|
+
case service_spec_types_1.ResourceScrutinyType.ResourcePolicyResource:
|
|
27762
27857
|
this.statements.addOld(...this.readResourcePolicyResource(resourceChange.oldProperties));
|
|
27763
27858
|
this.statements.addNew(...this.readResourcePolicyResource(resourceChange.newProperties));
|
|
27764
27859
|
break;
|
|
27765
|
-
case
|
|
27860
|
+
case service_spec_types_1.ResourceScrutinyType.LambdaPermission:
|
|
27766
27861
|
this.statements.addOld(...this.readLambdaStatements(resourceChange.oldProperties));
|
|
27767
27862
|
this.statements.addNew(...this.readLambdaStatements(resourceChange.newProperties));
|
|
27768
27863
|
break;
|
|
27769
|
-
case
|
|
27864
|
+
case service_spec_types_1.ResourceScrutinyType.SsoPermissionSet:
|
|
27770
27865
|
this.ssoPermissionSets.addOld(...this.readSsoPermissionSet(resourceChange.oldProperties, resourceChange.resourceLogicalId));
|
|
27771
27866
|
this.ssoPermissionSets.addNew(...this.readSsoPermissionSet(resourceChange.newProperties, resourceChange.resourceLogicalId));
|
|
27772
27867
|
break;
|
|
27773
|
-
case
|
|
27868
|
+
case service_spec_types_1.ResourceScrutinyType.SsoAssignmentResource:
|
|
27774
27869
|
this.ssoAssignments.addOld(...this.readSsoAssignments(resourceChange.oldProperties, resourceChange.resourceLogicalId));
|
|
27775
27870
|
this.ssoAssignments.addNew(...this.readSsoAssignments(resourceChange.newProperties, resourceChange.resourceLogicalId));
|
|
27776
27871
|
break;
|
|
27777
|
-
case
|
|
27872
|
+
case service_spec_types_1.ResourceScrutinyType.SsoInstanceACAConfigResource:
|
|
27778
27873
|
this.ssoInstanceACAConfigs.addOld(...this.readSsoInstanceACAConfigs(resourceChange.oldProperties, resourceChange.resourceLogicalId));
|
|
27779
27874
|
this.ssoInstanceACAConfigs.addNew(...this.readSsoInstanceACAConfigs(resourceChange.newProperties, resourceChange.resourceLogicalId));
|
|
27780
27875
|
break;
|
|
@@ -27788,10 +27883,10 @@ var init_iam_changes = __esm({
|
|
|
27788
27883
|
return [];
|
|
27789
27884
|
}
|
|
27790
27885
|
const appliesToPrincipal = "AWS:${" + logicalId + "}";
|
|
27791
|
-
return flatMap(policies, (policy) => {
|
|
27886
|
+
return (0, util_1.flatMap)(policies, (policy) => {
|
|
27792
27887
|
var _a;
|
|
27793
27888
|
const unparsedStatement = ((_a = policy.PolicyDocument) == null ? void 0 : _a.Statement) ? policy.PolicyDocument.Statement : policy;
|
|
27794
|
-
return defaultPrincipal(appliesToPrincipal, parseStatements(renderIntrinsics(unparsedStatement)));
|
|
27889
|
+
return defaultPrincipal(appliesToPrincipal, (0, statement_1.parseStatements)((0, render_intrinsics_1.renderIntrinsics)(unparsedStatement)));
|
|
27795
27890
|
});
|
|
27796
27891
|
}
|
|
27797
27892
|
/**
|
|
@@ -27801,19 +27896,19 @@ var init_iam_changes = __esm({
|
|
|
27801
27896
|
if (properties === void 0) {
|
|
27802
27897
|
return [];
|
|
27803
27898
|
}
|
|
27804
|
-
properties = renderIntrinsics(properties);
|
|
27899
|
+
properties = (0, render_intrinsics_1.renderIntrinsics)(properties);
|
|
27805
27900
|
const principals = (properties.Groups || []).concat(properties.Users || []).concat(properties.Roles || []);
|
|
27806
|
-
return flatMap(principals, (principal) => {
|
|
27901
|
+
return (0, util_1.flatMap)(principals, (principal) => {
|
|
27807
27902
|
const ref = "AWS:" + principal;
|
|
27808
|
-
return defaultPrincipal(ref, parseStatements(properties.PolicyDocument.Statement));
|
|
27903
|
+
return defaultPrincipal(ref, (0, statement_1.parseStatements)(properties.PolicyDocument.Statement));
|
|
27809
27904
|
});
|
|
27810
27905
|
}
|
|
27811
27906
|
readSsoInstanceACAConfigs(properties, logicalId) {
|
|
27812
27907
|
if (properties === void 0) {
|
|
27813
27908
|
return [];
|
|
27814
27909
|
}
|
|
27815
|
-
properties = renderIntrinsics(properties);
|
|
27816
|
-
return [new SsoInstanceACAConfig({
|
|
27910
|
+
properties = (0, render_intrinsics_1.renderIntrinsics)(properties);
|
|
27911
|
+
return [new iam_identity_center_1.SsoInstanceACAConfig({
|
|
27817
27912
|
cfnLogicalId: "${" + logicalId + "}",
|
|
27818
27913
|
ssoInstanceArn: properties.InstanceArn,
|
|
27819
27914
|
accessControlAttributes: properties.AccessControlAttributes
|
|
@@ -27823,8 +27918,8 @@ var init_iam_changes = __esm({
|
|
|
27823
27918
|
if (properties === void 0) {
|
|
27824
27919
|
return [];
|
|
27825
27920
|
}
|
|
27826
|
-
properties = renderIntrinsics(properties);
|
|
27827
|
-
return [new SsoAssignment({
|
|
27921
|
+
properties = (0, render_intrinsics_1.renderIntrinsics)(properties);
|
|
27922
|
+
return [new iam_identity_center_1.SsoAssignment({
|
|
27828
27923
|
cfnLogicalId: "${" + logicalId + "}",
|
|
27829
27924
|
ssoInstanceArn: properties.InstanceArn,
|
|
27830
27925
|
permissionSetArn: properties.PermissionSetArn,
|
|
@@ -27838,8 +27933,8 @@ var init_iam_changes = __esm({
|
|
|
27838
27933
|
if (properties === void 0) {
|
|
27839
27934
|
return [];
|
|
27840
27935
|
}
|
|
27841
|
-
properties = renderIntrinsics(properties);
|
|
27842
|
-
return [new SsoPermissionSet({
|
|
27936
|
+
properties = (0, render_intrinsics_1.renderIntrinsics)(properties);
|
|
27937
|
+
return [new iam_identity_center_1.SsoPermissionSet({
|
|
27843
27938
|
cfnLogicalId: "${" + logicalId + "}",
|
|
27844
27939
|
name: properties.Name,
|
|
27845
27940
|
ssoInstanceArn: properties.InstanceArn,
|
|
@@ -27852,7 +27947,7 @@ var init_iam_changes = __esm({
|
|
|
27852
27947
|
return [];
|
|
27853
27948
|
}
|
|
27854
27949
|
const appliesToResource = "${" + logicalId + ".Arn}";
|
|
27855
|
-
return defaultResource(appliesToResource, parseStatements(renderIntrinsics(policy.Statement)));
|
|
27950
|
+
return defaultResource(appliesToResource, (0, statement_1.parseStatements)((0, render_intrinsics_1.renderIntrinsics)(policy.Statement)));
|
|
27856
27951
|
}
|
|
27857
27952
|
/**
|
|
27858
27953
|
* Parse an AWS::*::{Bucket,Topic,Queue}policy
|
|
@@ -27861,15 +27956,15 @@ var init_iam_changes = __esm({
|
|
|
27861
27956
|
if (properties === void 0) {
|
|
27862
27957
|
return [];
|
|
27863
27958
|
}
|
|
27864
|
-
properties = renderIntrinsics(properties);
|
|
27959
|
+
properties = (0, render_intrinsics_1.renderIntrinsics)(properties);
|
|
27865
27960
|
const policyKeys = Object.keys(properties).filter((key) => key.indexOf("Policy") > -1);
|
|
27866
27961
|
const resourceKeys = Object.keys(properties).filter((key) => !policyKeys.includes(key) && !key.endsWith("Name"));
|
|
27867
27962
|
let resources = resourceKeys.length === 1 ? properties[resourceKeys[0]] : ["???"];
|
|
27868
27963
|
if (!Array.isArray(resources)) {
|
|
27869
27964
|
resources = [resources];
|
|
27870
27965
|
}
|
|
27871
|
-
return flatMap(resources, (resource) => {
|
|
27872
|
-
return defaultResource(resource, parseStatements(properties[policyKeys[0]].Statement));
|
|
27966
|
+
return (0, util_1.flatMap)(resources, (resource) => {
|
|
27967
|
+
return defaultResource(resource, (0, statement_1.parseStatements)(properties[policyKeys[0]].Statement));
|
|
27873
27968
|
});
|
|
27874
27969
|
}
|
|
27875
27970
|
readManagedPolicies(policyArns, logicalId) {
|
|
@@ -27877,87 +27972,56 @@ var init_iam_changes = __esm({
|
|
|
27877
27972
|
return [];
|
|
27878
27973
|
}
|
|
27879
27974
|
const rep = "${" + logicalId + "}";
|
|
27880
|
-
return ManagedPolicyAttachment.parseManagedPolicies(rep, renderIntrinsics(policyArns));
|
|
27975
|
+
return managed_policy_1.ManagedPolicyAttachment.parseManagedPolicies(rep, (0, render_intrinsics_1.renderIntrinsics)(policyArns));
|
|
27881
27976
|
}
|
|
27882
27977
|
readLambdaStatements(properties) {
|
|
27883
27978
|
if (!properties) {
|
|
27884
27979
|
return [];
|
|
27885
27980
|
}
|
|
27886
|
-
return [parseLambdaPermission(renderIntrinsics(properties))];
|
|
27981
|
+
return [(0, statement_1.parseLambdaPermission)((0, render_intrinsics_1.renderIntrinsics)(properties))];
|
|
27887
27982
|
}
|
|
27888
27983
|
};
|
|
27984
|
+
exports2.IamChanges = IamChanges;
|
|
27889
27985
|
IamChanges.IamPropertyScrutinies = [
|
|
27890
|
-
|
|
27891
|
-
|
|
27892
|
-
|
|
27986
|
+
service_spec_types_1.PropertyScrutinyType.InlineIdentityPolicies,
|
|
27987
|
+
service_spec_types_1.PropertyScrutinyType.InlineResourcePolicy,
|
|
27988
|
+
service_spec_types_1.PropertyScrutinyType.ManagedPolicies
|
|
27893
27989
|
];
|
|
27894
27990
|
IamChanges.IamResourceScrutinies = [
|
|
27895
|
-
|
|
27896
|
-
|
|
27897
|
-
|
|
27898
|
-
|
|
27899
|
-
|
|
27900
|
-
|
|
27991
|
+
service_spec_types_1.ResourceScrutinyType.ResourcePolicyResource,
|
|
27992
|
+
service_spec_types_1.ResourceScrutinyType.IdentityPolicyResource,
|
|
27993
|
+
service_spec_types_1.ResourceScrutinyType.LambdaPermission,
|
|
27994
|
+
service_spec_types_1.ResourceScrutinyType.SsoAssignmentResource,
|
|
27995
|
+
service_spec_types_1.ResourceScrutinyType.SsoInstanceACAConfigResource,
|
|
27996
|
+
service_spec_types_1.ResourceScrutinyType.SsoPermissionSet
|
|
27901
27997
|
];
|
|
27998
|
+
function defaultPrincipal(principal, statements) {
|
|
27999
|
+
statements.forEach((s) => s.principals.replaceEmpty(principal));
|
|
28000
|
+
statements.forEach((s) => s.principals.replaceStar(principal));
|
|
28001
|
+
return statements;
|
|
28002
|
+
}
|
|
28003
|
+
function defaultResource(resource, statements) {
|
|
28004
|
+
statements.forEach((s) => s.resources.replaceEmpty(resource));
|
|
28005
|
+
statements.forEach((s) => s.resources.replaceStar(resource));
|
|
28006
|
+
return statements;
|
|
28007
|
+
}
|
|
27902
28008
|
}
|
|
27903
28009
|
});
|
|
27904
28010
|
|
|
27905
|
-
//
|
|
27906
|
-
|
|
27907
|
-
|
|
27908
|
-
return false;
|
|
27909
|
-
}
|
|
27910
|
-
if (a === void 0) {
|
|
27911
|
-
return true;
|
|
27912
|
-
}
|
|
27913
|
-
if (a.kind !== b.kind) {
|
|
27914
|
-
return false;
|
|
27915
|
-
}
|
|
27916
|
-
switch (a.kind) {
|
|
27917
|
-
case "cidr-ip":
|
|
27918
|
-
return a.ip === b.ip;
|
|
27919
|
-
case "security-group":
|
|
27920
|
-
return a.securityGroupId === b.securityGroupId;
|
|
27921
|
-
case "prefix-list":
|
|
27922
|
-
return a.prefixListId === b.prefixListId;
|
|
27923
|
-
}
|
|
27924
|
-
}
|
|
27925
|
-
function findFirst(obj, keys, fn) {
|
|
27926
|
-
for (const key of keys) {
|
|
27927
|
-
try {
|
|
27928
|
-
if (key in obj) {
|
|
27929
|
-
return fn(obj[key]);
|
|
27930
|
-
}
|
|
27931
|
-
} catch (e) {
|
|
27932
|
-
debugger;
|
|
27933
|
-
}
|
|
27934
|
-
}
|
|
27935
|
-
return void 0;
|
|
27936
|
-
}
|
|
27937
|
-
var SecurityGroupRule;
|
|
27938
|
-
var init_security_group_rule = __esm({
|
|
27939
|
-
"../cloudformation-diff/lib/network/security-group-rule.ts"() {
|
|
28011
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/lib/network/security-group-rule.js
|
|
28012
|
+
var require_security_group_rule = __commonJS({
|
|
28013
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/lib/network/security-group-rule.js"(exports2) {
|
|
27940
28014
|
"use strict";
|
|
27941
|
-
|
|
28015
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
28016
|
+
exports2.SecurityGroupRule = void 0;
|
|
28017
|
+
var SecurityGroupRule = class {
|
|
27942
28018
|
constructor(ruleObject, groupRef) {
|
|
27943
28019
|
var _a;
|
|
27944
28020
|
this.ipProtocol = ((_a = ruleObject.IpProtocol) == null ? void 0 : _a.toString()) || "*unknown*";
|
|
27945
28021
|
this.fromPort = ruleObject.FromPort;
|
|
27946
28022
|
this.toPort = ruleObject.ToPort;
|
|
27947
28023
|
this.groupId = ruleObject.GroupId || groupRef || "*unknown*";
|
|
27948
|
-
this.peer = findFirst(
|
|
27949
|
-
ruleObject,
|
|
27950
|
-
["CidrIp", "CidrIpv6"],
|
|
27951
|
-
(ip) => ({ kind: "cidr-ip", ip })
|
|
27952
|
-
) || findFirst(
|
|
27953
|
-
ruleObject,
|
|
27954
|
-
["DestinationSecurityGroupId", "SourceSecurityGroupId"],
|
|
27955
|
-
(securityGroupId) => ({ kind: "security-group", securityGroupId })
|
|
27956
|
-
) || findFirst(
|
|
27957
|
-
ruleObject,
|
|
27958
|
-
["DestinationPrefixListId", "SourcePrefixListId"],
|
|
27959
|
-
(prefixListId) => ({ kind: "prefix-list", prefixListId })
|
|
27960
|
-
);
|
|
28024
|
+
this.peer = findFirst(ruleObject, ["CidrIp", "CidrIpv6"], (ip) => ({ kind: "cidr-ip", ip })) || findFirst(ruleObject, ["DestinationSecurityGroupId", "SourceSecurityGroupId"], (securityGroupId) => ({ kind: "security-group", securityGroupId })) || findFirst(ruleObject, ["DestinationPrefixListId", "SourcePrefixListId"], (prefixListId) => ({ kind: "prefix-list", prefixListId }));
|
|
27961
28025
|
}
|
|
27962
28026
|
equal(other) {
|
|
27963
28027
|
return this.ipProtocol === other.ipProtocol && this.fromPort === other.fromPort && this.toPort === other.toPort && peerEqual(this.peer, other.peer);
|
|
@@ -28004,23 +28068,56 @@ var init_security_group_rule = __esm({
|
|
|
28004
28068
|
};
|
|
28005
28069
|
}
|
|
28006
28070
|
};
|
|
28071
|
+
exports2.SecurityGroupRule = SecurityGroupRule;
|
|
28072
|
+
function peerEqual(a, b) {
|
|
28073
|
+
if (a === void 0 !== (b === void 0)) {
|
|
28074
|
+
return false;
|
|
28075
|
+
}
|
|
28076
|
+
if (a === void 0) {
|
|
28077
|
+
return true;
|
|
28078
|
+
}
|
|
28079
|
+
if (a.kind !== b.kind) {
|
|
28080
|
+
return false;
|
|
28081
|
+
}
|
|
28082
|
+
switch (a.kind) {
|
|
28083
|
+
case "cidr-ip":
|
|
28084
|
+
return a.ip === b.ip;
|
|
28085
|
+
case "security-group":
|
|
28086
|
+
return a.securityGroupId === b.securityGroupId;
|
|
28087
|
+
case "prefix-list":
|
|
28088
|
+
return a.prefixListId === b.prefixListId;
|
|
28089
|
+
}
|
|
28090
|
+
}
|
|
28091
|
+
function findFirst(obj, keys, fn) {
|
|
28092
|
+
for (const key of keys) {
|
|
28093
|
+
try {
|
|
28094
|
+
if (key in obj) {
|
|
28095
|
+
return fn(obj[key]);
|
|
28096
|
+
}
|
|
28097
|
+
} catch (e) {
|
|
28098
|
+
debugger;
|
|
28099
|
+
}
|
|
28100
|
+
}
|
|
28101
|
+
return void 0;
|
|
28102
|
+
}
|
|
28007
28103
|
}
|
|
28008
28104
|
});
|
|
28009
28105
|
|
|
28010
|
-
//
|
|
28011
|
-
var
|
|
28012
|
-
|
|
28013
|
-
"../cloudformation-diff/lib/network/security-group-changes.ts"() {
|
|
28106
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.js
|
|
28107
|
+
var require_security_group_changes = __commonJS({
|
|
28108
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/lib/network/security-group-changes.js"(exports2) {
|
|
28014
28109
|
"use strict";
|
|
28015
|
-
|
|
28016
|
-
|
|
28017
|
-
|
|
28018
|
-
|
|
28019
|
-
|
|
28020
|
-
|
|
28110
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
28111
|
+
exports2.SecurityGroupChanges = void 0;
|
|
28112
|
+
var chalk3 = require_source();
|
|
28113
|
+
var security_group_rule_1 = require_security_group_rule();
|
|
28114
|
+
var diffable_1 = require_diffable();
|
|
28115
|
+
var render_intrinsics_1 = require_render_intrinsics();
|
|
28116
|
+
var util_1 = require_util3();
|
|
28117
|
+
var SecurityGroupChanges = class {
|
|
28021
28118
|
constructor(props) {
|
|
28022
|
-
this.ingress = new DiffableCollection();
|
|
28023
|
-
this.egress = new DiffableCollection();
|
|
28119
|
+
this.ingress = new diffable_1.DiffableCollection();
|
|
28120
|
+
this.egress = new diffable_1.DiffableCollection();
|
|
28024
28121
|
for (const ingressProp of props.ingressRulePropertyChanges) {
|
|
28025
28122
|
this.ingress.addOld(...this.readInlineRules(ingressProp.oldValue, ingressProp.resourceLogicalId));
|
|
28026
28123
|
this.ingress.addNew(...this.readInlineRules(ingressProp.newValue, ingressProp.resourceLogicalId));
|
|
@@ -28057,21 +28154,21 @@ var init_security_group_changes = __esm({
|
|
|
28057
28154
|
inOut,
|
|
28058
28155
|
rule.describeProtocol(),
|
|
28059
28156
|
rule.describePeer()
|
|
28060
|
-
].map((s) => plusMin === "+" ?
|
|
28157
|
+
].map((s) => plusMin === "+" ? chalk3.green(s) : chalk3.red(s));
|
|
28061
28158
|
ret.push(...this.ingress.additions.map(renderRule("+", inWord)));
|
|
28062
28159
|
ret.push(...this.egress.additions.map(renderRule("+", outWord)));
|
|
28063
28160
|
ret.push(...this.ingress.removals.map(renderRule("-", inWord)));
|
|
28064
28161
|
ret.push(...this.egress.removals.map(renderRule("-", outWord)));
|
|
28065
|
-
ret.sort(makeComparator((row) => [row[1], row[2].indexOf(inWord) > -1 ? 0 : 1]));
|
|
28162
|
+
ret.sort((0, util_1.makeComparator)((row) => [row[1], row[2].indexOf(inWord) > -1 ? 0 : 1]));
|
|
28066
28163
|
ret.splice(0, 0, header);
|
|
28067
28164
|
return ret;
|
|
28068
28165
|
}
|
|
28069
28166
|
toJson() {
|
|
28070
|
-
return deepRemoveUndefined({
|
|
28071
|
-
ingressRuleAdditions: dropIfEmpty(this.ingress.additions.map((s) => s.toJson())),
|
|
28072
|
-
ingressRuleRemovals: dropIfEmpty(this.ingress.removals.map((s) => s.toJson())),
|
|
28073
|
-
egressRuleAdditions: dropIfEmpty(this.egress.additions.map((s) => s.toJson())),
|
|
28074
|
-
egressRuleRemovals: dropIfEmpty(this.egress.removals.map((s) => s.toJson()))
|
|
28167
|
+
return (0, util_1.deepRemoveUndefined)({
|
|
28168
|
+
ingressRuleAdditions: (0, util_1.dropIfEmpty)(this.ingress.additions.map((s) => s.toJson())),
|
|
28169
|
+
ingressRuleRemovals: (0, util_1.dropIfEmpty)(this.ingress.removals.map((s) => s.toJson())),
|
|
28170
|
+
egressRuleAdditions: (0, util_1.dropIfEmpty)(this.egress.additions.map((s) => s.toJson())),
|
|
28171
|
+
egressRuleRemovals: (0, util_1.dropIfEmpty)(this.egress.removals.map((s) => s.toJson()))
|
|
28075
28172
|
});
|
|
28076
28173
|
}
|
|
28077
28174
|
get rulesAdded() {
|
|
@@ -28083,59 +28180,34 @@ var init_security_group_changes = __esm({
|
|
|
28083
28180
|
}
|
|
28084
28181
|
const ref = "${" + logicalId + ".GroupId}";
|
|
28085
28182
|
return rules.flatMap((r) => {
|
|
28086
|
-
const rendered = renderIntrinsics(r);
|
|
28087
|
-
return typeof rendered === "object" ? [new SecurityGroupRule(rendered, ref)] : [];
|
|
28183
|
+
const rendered = (0, render_intrinsics_1.renderIntrinsics)(r);
|
|
28184
|
+
return typeof rendered === "object" ? [new security_group_rule_1.SecurityGroupRule(rendered, ref)] : [];
|
|
28088
28185
|
});
|
|
28089
28186
|
}
|
|
28090
28187
|
readRuleResource(resource) {
|
|
28091
28188
|
if (!resource) {
|
|
28092
28189
|
return [];
|
|
28093
28190
|
}
|
|
28094
|
-
return [new SecurityGroupRule(renderIntrinsics(resource))];
|
|
28191
|
+
return [new security_group_rule_1.SecurityGroupRule((0, render_intrinsics_1.renderIntrinsics)(resource))];
|
|
28095
28192
|
}
|
|
28096
28193
|
};
|
|
28194
|
+
exports2.SecurityGroupChanges = SecurityGroupChanges;
|
|
28097
28195
|
}
|
|
28098
28196
|
});
|
|
28099
28197
|
|
|
28100
|
-
//
|
|
28101
|
-
|
|
28102
|
-
|
|
28103
|
-
|
|
28104
|
-
|
|
28105
|
-
|
|
28106
|
-
|
|
28107
|
-
|
|
28108
|
-
|
|
28109
|
-
|
|
28110
|
-
|
|
28111
|
-
|
|
28112
|
-
|
|
28113
|
-
["WILL_DESTROY" /* WILL_DESTROY */]: 6
|
|
28114
|
-
};
|
|
28115
|
-
return badness[one] > badness[two] ? one : two;
|
|
28116
|
-
}
|
|
28117
|
-
function isPropertyDifference(diff) {
|
|
28118
|
-
return diff.changeImpact !== void 0;
|
|
28119
|
-
}
|
|
28120
|
-
function onlyChanges(xs) {
|
|
28121
|
-
const ret = {};
|
|
28122
|
-
for (const [key, diff] of Object.entries(xs)) {
|
|
28123
|
-
if (diff.isDifferent) {
|
|
28124
|
-
ret[key] = diff;
|
|
28125
|
-
}
|
|
28126
|
-
}
|
|
28127
|
-
return ret;
|
|
28128
|
-
}
|
|
28129
|
-
var import_assert, import_service_spec_types2, TemplateDiff, Difference, PropertyDifference, DifferenceCollection, ConditionDifference, MappingDifference, MetadataDifference, OutputDifference, ParameterDifference, ResourceImpact, ResourceDifference;
|
|
28130
|
-
var init_types = __esm({
|
|
28131
|
-
"../cloudformation-diff/lib/diff/types.ts"() {
|
|
28132
|
-
"use strict";
|
|
28133
|
-
import_assert = require("assert");
|
|
28134
|
-
import_service_spec_types2 = __toESM(require_lib9());
|
|
28135
|
-
init_util();
|
|
28136
|
-
init_iam_changes();
|
|
28137
|
-
init_security_group_changes();
|
|
28138
|
-
TemplateDiff = class {
|
|
28198
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/types.js
|
|
28199
|
+
var require_types = __commonJS({
|
|
28200
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/types.js"(exports2) {
|
|
28201
|
+
"use strict";
|
|
28202
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
28203
|
+
exports2.ResourceDifference = exports2.ResourceImpact = exports2.ParameterDifference = exports2.OutputDifference = exports2.MetadataDifference = exports2.MappingDifference = exports2.ConditionDifference = exports2.DifferenceCollection = exports2.PropertyDifference = exports2.Difference = exports2.TemplateDiff = void 0;
|
|
28204
|
+
exports2.isPropertyDifference = isPropertyDifference;
|
|
28205
|
+
var assert_1 = require("assert");
|
|
28206
|
+
var service_spec_types_1 = require_lib9();
|
|
28207
|
+
var util_1 = require_util2();
|
|
28208
|
+
var iam_changes_1 = require_iam_changes();
|
|
28209
|
+
var security_group_changes_1 = require_security_group_changes();
|
|
28210
|
+
var TemplateDiff = class {
|
|
28139
28211
|
constructor(args) {
|
|
28140
28212
|
if (args.awsTemplateFormatVersion !== void 0) {
|
|
28141
28213
|
this.awsTemplateFormatVersion = args.awsTemplateFormatVersion;
|
|
@@ -28153,15 +28225,15 @@ var init_types = __esm({
|
|
|
28153
28225
|
this.parameters = args.parameters || new DifferenceCollection({});
|
|
28154
28226
|
this.resources = args.resources || new DifferenceCollection({});
|
|
28155
28227
|
this.unknown = args.unknown || new DifferenceCollection({});
|
|
28156
|
-
this.iamChanges = new IamChanges({
|
|
28157
|
-
propertyChanges: this.scrutinizablePropertyChanges(IamChanges.IamPropertyScrutinies),
|
|
28158
|
-
resourceChanges: this.scrutinizableResourceChanges(IamChanges.IamResourceScrutinies)
|
|
28228
|
+
this.iamChanges = new iam_changes_1.IamChanges({
|
|
28229
|
+
propertyChanges: this.scrutinizablePropertyChanges(iam_changes_1.IamChanges.IamPropertyScrutinies),
|
|
28230
|
+
resourceChanges: this.scrutinizableResourceChanges(iam_changes_1.IamChanges.IamResourceScrutinies)
|
|
28159
28231
|
});
|
|
28160
|
-
this.securityGroupChanges = new SecurityGroupChanges({
|
|
28161
|
-
egressRulePropertyChanges: this.scrutinizablePropertyChanges([
|
|
28162
|
-
ingressRulePropertyChanges: this.scrutinizablePropertyChanges([
|
|
28163
|
-
egressRuleResourceChanges: this.scrutinizableResourceChanges([
|
|
28164
|
-
ingressRuleResourceChanges: this.scrutinizableResourceChanges([
|
|
28232
|
+
this.securityGroupChanges = new security_group_changes_1.SecurityGroupChanges({
|
|
28233
|
+
egressRulePropertyChanges: this.scrutinizablePropertyChanges([service_spec_types_1.PropertyScrutinyType.EgressRules]),
|
|
28234
|
+
ingressRulePropertyChanges: this.scrutinizablePropertyChanges([service_spec_types_1.PropertyScrutinyType.IngressRules]),
|
|
28235
|
+
egressRuleResourceChanges: this.scrutinizableResourceChanges([service_spec_types_1.ResourceScrutinyType.EgressRuleResource]),
|
|
28236
|
+
ingressRuleResourceChanges: this.scrutinizableResourceChanges([service_spec_types_1.ResourceScrutinyType.IngressRuleResource])
|
|
28165
28237
|
});
|
|
28166
28238
|
}
|
|
28167
28239
|
get differenceCount() {
|
|
@@ -28215,9 +28287,9 @@ var init_types = __esm({
|
|
|
28215
28287
|
if (!resourceChange.resourceType) {
|
|
28216
28288
|
continue;
|
|
28217
28289
|
}
|
|
28218
|
-
const newTypeProps = ((_a = loadResourceModel(resourceChange.resourceType)) == null ? void 0 : _a.properties) || {};
|
|
28290
|
+
const newTypeProps = ((_a = (0, util_1.loadResourceModel)(resourceChange.resourceType)) == null ? void 0 : _a.properties) || {};
|
|
28219
28291
|
for (const [propertyName, prop] of Object.entries(newTypeProps)) {
|
|
28220
|
-
const propScrutinyType = prop.scrutinizable ||
|
|
28292
|
+
const propScrutinyType = prop.scrutinizable || service_spec_types_1.PropertyScrutinyType.None;
|
|
28221
28293
|
if (scrutinyTypes.includes(propScrutinyType)) {
|
|
28222
28294
|
ret.push({
|
|
28223
28295
|
resourceLogicalId,
|
|
@@ -28251,7 +28323,7 @@ var init_types = __esm({
|
|
|
28251
28323
|
};
|
|
28252
28324
|
if (resourceChange.resourceTypeChanged) {
|
|
28253
28325
|
if (resourceChange.oldResourceType) {
|
|
28254
|
-
const oldResourceModel = loadResourceModel(resourceChange.oldResourceType);
|
|
28326
|
+
const oldResourceModel = (0, util_1.loadResourceModel)(resourceChange.oldResourceType);
|
|
28255
28327
|
if (oldResourceModel && this.resourceIsScrutinizable(oldResourceModel, scrutinyTypes)) {
|
|
28256
28328
|
ret.push({
|
|
28257
28329
|
...commonProps,
|
|
@@ -28262,7 +28334,7 @@ var init_types = __esm({
|
|
|
28262
28334
|
}
|
|
28263
28335
|
}
|
|
28264
28336
|
if (resourceChange.newResourceType) {
|
|
28265
|
-
const newResourceModel = loadResourceModel(resourceChange.newResourceType);
|
|
28337
|
+
const newResourceModel = (0, util_1.loadResourceModel)(resourceChange.newResourceType);
|
|
28266
28338
|
if (newResourceModel && this.resourceIsScrutinizable(newResourceModel, scrutinyTypes)) {
|
|
28267
28339
|
ret.push({
|
|
28268
28340
|
...commonProps,
|
|
@@ -28276,7 +28348,7 @@ var init_types = __esm({
|
|
|
28276
28348
|
if (!resourceChange.resourceType) {
|
|
28277
28349
|
continue;
|
|
28278
28350
|
}
|
|
28279
|
-
const resourceModel = loadResourceModel(resourceChange.resourceType);
|
|
28351
|
+
const resourceModel = (0, util_1.loadResourceModel)(resourceChange.resourceType);
|
|
28280
28352
|
if (resourceModel && this.resourceIsScrutinizable(resourceModel, scrutinyTypes)) {
|
|
28281
28353
|
ret.push({
|
|
28282
28354
|
...commonProps,
|
|
@@ -28289,10 +28361,11 @@ var init_types = __esm({
|
|
|
28289
28361
|
return ret;
|
|
28290
28362
|
}
|
|
28291
28363
|
resourceIsScrutinizable(res, scrutinyTypes) {
|
|
28292
|
-
return scrutinyTypes.includes(res.scrutinizable ||
|
|
28364
|
+
return scrutinyTypes.includes(res.scrutinizable || service_spec_types_1.ResourceScrutinyType.None);
|
|
28293
28365
|
}
|
|
28294
28366
|
};
|
|
28295
|
-
|
|
28367
|
+
exports2.TemplateDiff = TemplateDiff;
|
|
28368
|
+
var Difference = class {
|
|
28296
28369
|
/**
|
|
28297
28370
|
* @param oldValue the old value, cannot be equal (to the sense of +deepEqual+) to +newValue+.
|
|
28298
28371
|
* @param newValue the new value, cannot be equal (to the sense of +deepEqual+) to +oldValue+.
|
|
@@ -28301,9 +28374,9 @@ var init_types = __esm({
|
|
|
28301
28374
|
this.oldValue = oldValue;
|
|
28302
28375
|
this.newValue = newValue;
|
|
28303
28376
|
if (oldValue === void 0 && newValue === void 0) {
|
|
28304
|
-
throw new
|
|
28377
|
+
throw new assert_1.AssertionError({ message: "oldValue and newValue are both undefined!" });
|
|
28305
28378
|
}
|
|
28306
|
-
this.isDifferent = !deepEqual(oldValue, newValue);
|
|
28379
|
+
this.isDifferent = !(0, util_1.deepEqual)(oldValue, newValue);
|
|
28307
28380
|
}
|
|
28308
28381
|
/** @returns +true+ if the element is new to the template. */
|
|
28309
28382
|
get isAddition() {
|
|
@@ -28318,13 +28391,15 @@ var init_types = __esm({
|
|
|
28318
28391
|
return this.oldValue !== void 0 && this.newValue !== void 0;
|
|
28319
28392
|
}
|
|
28320
28393
|
};
|
|
28321
|
-
|
|
28394
|
+
exports2.Difference = Difference;
|
|
28395
|
+
var PropertyDifference = class extends Difference {
|
|
28322
28396
|
constructor(oldValue, newValue, args) {
|
|
28323
28397
|
super(oldValue, newValue);
|
|
28324
28398
|
this.changeImpact = args.changeImpact;
|
|
28325
28399
|
}
|
|
28326
28400
|
};
|
|
28327
|
-
|
|
28401
|
+
exports2.PropertyDifference = PropertyDifference;
|
|
28402
|
+
var DifferenceCollection = class _DifferenceCollection {
|
|
28328
28403
|
constructor(diffs) {
|
|
28329
28404
|
this.diffs = diffs;
|
|
28330
28405
|
}
|
|
@@ -28394,22 +28469,24 @@ var init_types = __esm({
|
|
|
28394
28469
|
others.forEach((v) => cb(v.logicalId, v.change));
|
|
28395
28470
|
}
|
|
28396
28471
|
};
|
|
28397
|
-
|
|
28398
|
-
|
|
28472
|
+
exports2.DifferenceCollection = DifferenceCollection;
|
|
28473
|
+
var ConditionDifference = class extends Difference {
|
|
28399
28474
|
};
|
|
28400
|
-
|
|
28401
|
-
|
|
28475
|
+
exports2.ConditionDifference = ConditionDifference;
|
|
28476
|
+
var MappingDifference = class extends Difference {
|
|
28402
28477
|
};
|
|
28403
|
-
|
|
28404
|
-
|
|
28478
|
+
exports2.MappingDifference = MappingDifference;
|
|
28479
|
+
var MetadataDifference = class extends Difference {
|
|
28405
28480
|
};
|
|
28406
|
-
|
|
28407
|
-
|
|
28481
|
+
exports2.MetadataDifference = MetadataDifference;
|
|
28482
|
+
var OutputDifference = class extends Difference {
|
|
28408
28483
|
};
|
|
28409
|
-
|
|
28410
|
-
|
|
28484
|
+
exports2.OutputDifference = OutputDifference;
|
|
28485
|
+
var ParameterDifference = class extends Difference {
|
|
28411
28486
|
};
|
|
28412
|
-
|
|
28487
|
+
exports2.ParameterDifference = ParameterDifference;
|
|
28488
|
+
var ResourceImpact2;
|
|
28489
|
+
(function(ResourceImpact3) {
|
|
28413
28490
|
ResourceImpact3["WILL_UPDATE"] = "WILL_UPDATE";
|
|
28414
28491
|
ResourceImpact3["WILL_CREATE"] = "WILL_CREATE";
|
|
28415
28492
|
ResourceImpact3["WILL_REPLACE"] = "WILL_REPLACE";
|
|
@@ -28418,9 +28495,24 @@ var init_types = __esm({
|
|
|
28418
28495
|
ResourceImpact3["WILL_ORPHAN"] = "WILL_ORPHAN";
|
|
28419
28496
|
ResourceImpact3["WILL_IMPORT"] = "WILL_IMPORT";
|
|
28420
28497
|
ResourceImpact3["NO_CHANGE"] = "NO_CHANGE";
|
|
28421
|
-
|
|
28422
|
-
|
|
28423
|
-
|
|
28498
|
+
})(ResourceImpact2 || (exports2.ResourceImpact = ResourceImpact2 = {}));
|
|
28499
|
+
function worstImpact(one, two) {
|
|
28500
|
+
if (!two) {
|
|
28501
|
+
return one;
|
|
28502
|
+
}
|
|
28503
|
+
const badness = {
|
|
28504
|
+
[ResourceImpact2.NO_CHANGE]: 0,
|
|
28505
|
+
[ResourceImpact2.WILL_IMPORT]: 0,
|
|
28506
|
+
[ResourceImpact2.WILL_UPDATE]: 1,
|
|
28507
|
+
[ResourceImpact2.WILL_CREATE]: 2,
|
|
28508
|
+
[ResourceImpact2.WILL_ORPHAN]: 3,
|
|
28509
|
+
[ResourceImpact2.MAY_REPLACE]: 4,
|
|
28510
|
+
[ResourceImpact2.WILL_REPLACE]: 5,
|
|
28511
|
+
[ResourceImpact2.WILL_DESTROY]: 6
|
|
28512
|
+
};
|
|
28513
|
+
return badness[one] > badness[two] ? one : two;
|
|
28514
|
+
}
|
|
28515
|
+
var ResourceDifference2 = class {
|
|
28424
28516
|
constructor(oldValue, newValue, args) {
|
|
28425
28517
|
this.oldValue = oldValue;
|
|
28426
28518
|
this.newValue = newValue;
|
|
@@ -28511,18 +28603,18 @@ var init_types = __esm({
|
|
|
28511
28603
|
}
|
|
28512
28604
|
get changeImpact() {
|
|
28513
28605
|
if (this.isImport) {
|
|
28514
|
-
return
|
|
28606
|
+
return ResourceImpact2.WILL_IMPORT;
|
|
28515
28607
|
}
|
|
28516
28608
|
if (this.resourceTypes.oldType !== this.resourceTypes.newType) {
|
|
28517
28609
|
if (this.resourceTypes.oldType === void 0) {
|
|
28518
|
-
return
|
|
28610
|
+
return ResourceImpact2.WILL_CREATE;
|
|
28519
28611
|
}
|
|
28520
28612
|
if (this.resourceTypes.newType === void 0) {
|
|
28521
|
-
return this.oldValue.DeletionPolicy === "Retain" ?
|
|
28613
|
+
return this.oldValue.DeletionPolicy === "Retain" ? ResourceImpact2.WILL_ORPHAN : ResourceImpact2.WILL_DESTROY;
|
|
28522
28614
|
}
|
|
28523
|
-
return
|
|
28615
|
+
return ResourceImpact2.WILL_REPLACE;
|
|
28524
28616
|
}
|
|
28525
|
-
const baseImpact = Object.keys(this.otherChanges).length > 0 ?
|
|
28617
|
+
const baseImpact = Object.keys(this.otherChanges).length > 0 ? ResourceImpact2.WILL_UPDATE : ResourceImpact2.NO_CHANGE;
|
|
28526
28618
|
return Object.values(this.propertyDiffs).map((elt) => elt.changeImpact).reduce(worstImpact, baseImpact);
|
|
28527
28619
|
}
|
|
28528
28620
|
/**
|
|
@@ -28543,99 +28635,118 @@ var init_types = __esm({
|
|
|
28543
28635
|
}
|
|
28544
28636
|
}
|
|
28545
28637
|
};
|
|
28638
|
+
exports2.ResourceDifference = ResourceDifference2;
|
|
28639
|
+
function isPropertyDifference(diff) {
|
|
28640
|
+
return diff.changeImpact !== void 0;
|
|
28641
|
+
}
|
|
28642
|
+
function onlyChanges(xs) {
|
|
28643
|
+
const ret = {};
|
|
28644
|
+
for (const [key, diff] of Object.entries(xs)) {
|
|
28645
|
+
if (diff.isDifferent) {
|
|
28646
|
+
ret[key] = diff;
|
|
28647
|
+
}
|
|
28648
|
+
}
|
|
28649
|
+
return ret;
|
|
28650
|
+
}
|
|
28546
28651
|
}
|
|
28547
28652
|
});
|
|
28548
28653
|
|
|
28549
|
-
//
|
|
28550
|
-
|
|
28551
|
-
|
|
28552
|
-
|
|
28553
|
-
|
|
28554
|
-
|
|
28555
|
-
|
|
28556
|
-
|
|
28557
|
-
|
|
28558
|
-
|
|
28559
|
-
|
|
28560
|
-
|
|
28561
|
-
|
|
28562
|
-
|
|
28563
|
-
|
|
28564
|
-
|
|
28565
|
-
|
|
28566
|
-
|
|
28567
|
-
|
|
28568
|
-
|
|
28569
|
-
|
|
28570
|
-
|
|
28571
|
-
|
|
28572
|
-
|
|
28573
|
-
|
|
28574
|
-
|
|
28575
|
-
|
|
28576
|
-
|
|
28577
|
-
|
|
28578
|
-
|
|
28579
|
-
|
|
28580
|
-
|
|
28581
|
-
|
|
28582
|
-
|
|
28583
|
-
|
|
28584
|
-
|
|
28585
|
-
|
|
28586
|
-
|
|
28587
|
-
|
|
28588
|
-
|
|
28589
|
-
|
|
28590
|
-
|
|
28591
|
-
|
|
28592
|
-
|
|
28593
|
-
|
|
28594
|
-
|
|
28595
|
-
|
|
28596
|
-
|
|
28597
|
-
|
|
28598
|
-
|
|
28599
|
-
|
|
28600
|
-
|
|
28601
|
-
|
|
28602
|
-
|
|
28603
|
-
|
|
28654
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/index.js
|
|
28655
|
+
var require_diff4 = __commonJS({
|
|
28656
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/index.js"(exports2) {
|
|
28657
|
+
"use strict";
|
|
28658
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
28659
|
+
exports2.diffAttribute = diffAttribute;
|
|
28660
|
+
exports2.diffCondition = diffCondition;
|
|
28661
|
+
exports2.diffMapping = diffMapping;
|
|
28662
|
+
exports2.diffMetadata = diffMetadata;
|
|
28663
|
+
exports2.diffOutput = diffOutput;
|
|
28664
|
+
exports2.diffParameter = diffParameter;
|
|
28665
|
+
exports2.diffResource = diffResource;
|
|
28666
|
+
exports2.diffUnknown = diffUnknown;
|
|
28667
|
+
var types = require_types();
|
|
28668
|
+
var util_1 = require_util2();
|
|
28669
|
+
function diffAttribute(oldValue, newValue) {
|
|
28670
|
+
return new types.Difference(_asString(oldValue), _asString(newValue));
|
|
28671
|
+
}
|
|
28672
|
+
function diffCondition(oldValue, newValue) {
|
|
28673
|
+
return new types.ConditionDifference(oldValue, newValue);
|
|
28674
|
+
}
|
|
28675
|
+
function diffMapping(oldValue, newValue) {
|
|
28676
|
+
return new types.MappingDifference(oldValue, newValue);
|
|
28677
|
+
}
|
|
28678
|
+
function diffMetadata(oldValue, newValue) {
|
|
28679
|
+
return new types.MetadataDifference(oldValue, newValue);
|
|
28680
|
+
}
|
|
28681
|
+
function diffOutput(oldValue, newValue) {
|
|
28682
|
+
return new types.OutputDifference(oldValue, newValue);
|
|
28683
|
+
}
|
|
28684
|
+
function diffParameter(oldValue, newValue) {
|
|
28685
|
+
return new types.ParameterDifference(oldValue, newValue);
|
|
28686
|
+
}
|
|
28687
|
+
function diffResource(oldValue, newValue) {
|
|
28688
|
+
const resourceType = {
|
|
28689
|
+
oldType: oldValue && oldValue.Type,
|
|
28690
|
+
newType: newValue && newValue.Type
|
|
28691
|
+
};
|
|
28692
|
+
let propertyDiffs = {};
|
|
28693
|
+
let otherDiffs = {};
|
|
28694
|
+
if (resourceType.oldType !== void 0 && resourceType.oldType === resourceType.newType) {
|
|
28695
|
+
const impl = (0, util_1.loadResourceModel)(resourceType.oldType);
|
|
28696
|
+
propertyDiffs = (0, util_1.diffKeyedEntities)(oldValue.Properties, newValue.Properties, (oldVal, newVal, key) => _diffProperty(oldVal, newVal, key, impl));
|
|
28697
|
+
otherDiffs = (0, util_1.diffKeyedEntities)(oldValue, newValue, _diffOther);
|
|
28698
|
+
delete otherDiffs.Properties;
|
|
28699
|
+
}
|
|
28700
|
+
return new types.ResourceDifference(oldValue, newValue, {
|
|
28701
|
+
resourceType,
|
|
28702
|
+
propertyDiffs,
|
|
28703
|
+
otherDiffs
|
|
28704
|
+
});
|
|
28705
|
+
function _diffProperty(oldV, newV, key, resourceSpec) {
|
|
28706
|
+
var _a;
|
|
28707
|
+
let changeImpact = types.ResourceImpact.NO_CHANGE;
|
|
28708
|
+
const spec = (_a = resourceSpec == null ? void 0 : resourceSpec.properties) == null ? void 0 : _a[key];
|
|
28709
|
+
if (spec && !(0, util_1.deepEqual)(oldV, newV)) {
|
|
28710
|
+
switch (spec.causesReplacement) {
|
|
28711
|
+
case "yes":
|
|
28712
|
+
changeImpact = types.ResourceImpact.WILL_REPLACE;
|
|
28713
|
+
break;
|
|
28714
|
+
case "maybe":
|
|
28715
|
+
changeImpact = types.ResourceImpact.MAY_REPLACE;
|
|
28716
|
+
break;
|
|
28717
|
+
default:
|
|
28718
|
+
changeImpact = types.ResourceImpact.WILL_UPDATE;
|
|
28719
|
+
}
|
|
28720
|
+
}
|
|
28721
|
+
return new types.PropertyDifference(oldV, newV, { changeImpact });
|
|
28722
|
+
}
|
|
28723
|
+
function _diffOther(oldV, newV) {
|
|
28724
|
+
return new types.Difference(oldV, newV);
|
|
28604
28725
|
}
|
|
28605
28726
|
}
|
|
28606
|
-
|
|
28607
|
-
|
|
28608
|
-
|
|
28609
|
-
|
|
28610
|
-
|
|
28611
|
-
|
|
28612
|
-
|
|
28613
|
-
|
|
28614
|
-
|
|
28615
|
-
|
|
28616
|
-
|
|
28617
|
-
|
|
28618
|
-
}
|
|
28619
|
-
if (typeof value === "string") {
|
|
28620
|
-
return value;
|
|
28621
|
-
}
|
|
28622
|
-
return JSON.stringify(value);
|
|
28623
|
-
}
|
|
28624
|
-
var init_diff = __esm({
|
|
28625
|
-
"../cloudformation-diff/lib/diff/index.ts"() {
|
|
28626
|
-
"use strict";
|
|
28627
|
-
init_types();
|
|
28628
|
-
init_util();
|
|
28727
|
+
function diffUnknown(oldValue, newValue) {
|
|
28728
|
+
return new types.Difference(oldValue, newValue);
|
|
28729
|
+
}
|
|
28730
|
+
function _asString(value) {
|
|
28731
|
+
if (value == null) {
|
|
28732
|
+
return void 0;
|
|
28733
|
+
}
|
|
28734
|
+
if (typeof value === "string") {
|
|
28735
|
+
return value;
|
|
28736
|
+
}
|
|
28737
|
+
return JSON.stringify(value);
|
|
28738
|
+
}
|
|
28629
28739
|
}
|
|
28630
28740
|
});
|
|
28631
28741
|
|
|
28632
|
-
//
|
|
28633
|
-
var
|
|
28634
|
-
|
|
28635
|
-
"../cloudformation-diff/lib/diff/template-and-changeset-diff-merger.ts"() {
|
|
28742
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/template-and-changeset-diff-merger.js
|
|
28743
|
+
var require_template_and_changeset_diff_merger = __commonJS({
|
|
28744
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff/template-and-changeset-diff-merger.js"(exports2) {
|
|
28636
28745
|
"use strict";
|
|
28637
|
-
|
|
28638
|
-
|
|
28746
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
28747
|
+
exports2.TemplateAndChangeSetDiffMerger = void 0;
|
|
28748
|
+
var types = require_types();
|
|
28749
|
+
var TemplateAndChangeSetDiffMerger = class _TemplateAndChangeSetDiffMerger {
|
|
28639
28750
|
static determineChangeSetReplacementMode(propertyChange) {
|
|
28640
28751
|
var _a;
|
|
28641
28752
|
if (((_a = propertyChange.Target) == null ? void 0 : _a.RequiresRecreation) === void 0) {
|
|
@@ -28696,30 +28807,30 @@ var init_template_and_changeset_diff_merger = __esm({
|
|
|
28696
28807
|
var _a2;
|
|
28697
28808
|
if (type === "Property") {
|
|
28698
28809
|
if (!this.changeSetResources[logicalId]) {
|
|
28699
|
-
value.changeImpact =
|
|
28810
|
+
value.changeImpact = types.ResourceImpact.NO_CHANGE;
|
|
28700
28811
|
value.isDifferent = false;
|
|
28701
28812
|
return;
|
|
28702
28813
|
}
|
|
28703
28814
|
const changingPropertyCausesResourceReplacement = (_a2 = (this.changeSetResources[logicalId].propertyReplacementModes ?? {})[name]) == null ? void 0 : _a2.replacementMode;
|
|
28704
28815
|
switch (changingPropertyCausesResourceReplacement) {
|
|
28705
28816
|
case "Always":
|
|
28706
|
-
value.changeImpact =
|
|
28817
|
+
value.changeImpact = types.ResourceImpact.WILL_REPLACE;
|
|
28707
28818
|
break;
|
|
28708
28819
|
case "Never":
|
|
28709
|
-
value.changeImpact =
|
|
28820
|
+
value.changeImpact = types.ResourceImpact.WILL_UPDATE;
|
|
28710
28821
|
break;
|
|
28711
28822
|
case "Conditionally":
|
|
28712
|
-
value.changeImpact =
|
|
28823
|
+
value.changeImpact = types.ResourceImpact.MAY_REPLACE;
|
|
28713
28824
|
break;
|
|
28714
28825
|
case void 0:
|
|
28715
|
-
value.changeImpact =
|
|
28826
|
+
value.changeImpact = types.ResourceImpact.NO_CHANGE;
|
|
28716
28827
|
value.isDifferent = false;
|
|
28717
28828
|
break;
|
|
28718
28829
|
}
|
|
28719
28830
|
} else if (type === "Other") {
|
|
28720
28831
|
switch (name) {
|
|
28721
28832
|
case "Metadata":
|
|
28722
|
-
change.setOtherChange("Metadata", new Difference(value.newValue, value.newValue));
|
|
28833
|
+
change.setOtherChange("Metadata", new types.Difference(value.newValue, value.newValue));
|
|
28723
28834
|
break;
|
|
28724
28835
|
}
|
|
28725
28836
|
}
|
|
@@ -28744,198 +28855,196 @@ var init_template_and_changeset_diff_merger = __esm({
|
|
|
28744
28855
|
return importedResourceLogicalIds;
|
|
28745
28856
|
}
|
|
28746
28857
|
};
|
|
28747
|
-
|
|
28748
|
-
|
|
28749
|
-
TemplateAndChangeSetDiffMerger = _TemplateAndChangeSetDiffMerger;
|
|
28750
|
-
}
|
|
28751
|
-
});
|
|
28752
|
-
|
|
28753
|
-
// ../cloudformation-diff/lib/diff-template.ts
|
|
28754
|
-
var diff_template_exports = {};
|
|
28755
|
-
__export(diff_template_exports, {
|
|
28756
|
-
ConditionDifference: () => ConditionDifference,
|
|
28757
|
-
Difference: () => Difference,
|
|
28758
|
-
DifferenceCollection: () => DifferenceCollection,
|
|
28759
|
-
MappingDifference: () => MappingDifference,
|
|
28760
|
-
MetadataDifference: () => MetadataDifference,
|
|
28761
|
-
OutputDifference: () => OutputDifference,
|
|
28762
|
-
ParameterDifference: () => ParameterDifference,
|
|
28763
|
-
PropertyDifference: () => PropertyDifference,
|
|
28764
|
-
ResourceDifference: () => ResourceDifference,
|
|
28765
|
-
ResourceImpact: () => ResourceImpact,
|
|
28766
|
-
TemplateDiff: () => TemplateDiff,
|
|
28767
|
-
diffTemplate: () => diffTemplate,
|
|
28768
|
-
fullDiff: () => fullDiff,
|
|
28769
|
-
isPropertyDifference: () => isPropertyDifference
|
|
28770
|
-
});
|
|
28771
|
-
function fullDiff(currentTemplate, newTemplate, changeSet, isImport) {
|
|
28772
|
-
normalize(currentTemplate);
|
|
28773
|
-
normalize(newTemplate);
|
|
28774
|
-
const theDiff = diffTemplate(currentTemplate, newTemplate);
|
|
28775
|
-
if (changeSet) {
|
|
28776
|
-
const changeSetDiff = new TemplateAndChangeSetDiffMerger({ changeSet });
|
|
28777
|
-
theDiff.resources.forEachDifference(
|
|
28778
|
-
(logicalId, change) => changeSetDiff.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, change)
|
|
28779
|
-
);
|
|
28780
|
-
changeSetDiff.addImportInformationFromChangeset(theDiff.resources);
|
|
28781
|
-
} else if (isImport) {
|
|
28782
|
-
makeAllResourceChangesImports(theDiff);
|
|
28858
|
+
exports2.TemplateAndChangeSetDiffMerger = TemplateAndChangeSetDiffMerger;
|
|
28859
|
+
TemplateAndChangeSetDiffMerger.UNKNOWN_RESOURCE_TYPE = "UNKNOWN_RESOURCE_TYPE";
|
|
28783
28860
|
}
|
|
28784
|
-
|
|
28785
|
-
|
|
28786
|
-
|
|
28787
|
-
|
|
28788
|
-
|
|
28789
|
-
|
|
28790
|
-
|
|
28791
|
-
|
|
28792
|
-
|
|
28793
|
-
|
|
28794
|
-
|
|
28795
|
-
|
|
28796
|
-
|
|
28797
|
-
|
|
28798
|
-
|
|
28799
|
-
|
|
28861
|
+
});
|
|
28862
|
+
|
|
28863
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff-template.js
|
|
28864
|
+
var require_diff_template = __commonJS({
|
|
28865
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/lib/diff-template.js"(exports2) {
|
|
28866
|
+
"use strict";
|
|
28867
|
+
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
28868
|
+
if (k2 === void 0) k2 = k;
|
|
28869
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
28870
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
28871
|
+
desc = { enumerable: true, get: function() {
|
|
28872
|
+
return m[k];
|
|
28873
|
+
} };
|
|
28874
|
+
}
|
|
28875
|
+
Object.defineProperty(o, k2, desc);
|
|
28876
|
+
} : function(o, m, k, k2) {
|
|
28877
|
+
if (k2 === void 0) k2 = k;
|
|
28878
|
+
o[k2] = m[k];
|
|
28879
|
+
});
|
|
28880
|
+
var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) {
|
|
28881
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p);
|
|
28882
|
+
};
|
|
28883
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
28884
|
+
exports2.fullDiff = fullDiff2;
|
|
28885
|
+
exports2.diffTemplate = diffTemplate;
|
|
28886
|
+
var impl = require_diff4();
|
|
28887
|
+
var template_and_changeset_diff_merger_1 = require_template_and_changeset_diff_merger();
|
|
28888
|
+
var types = require_types();
|
|
28889
|
+
var util_1 = require_util2();
|
|
28890
|
+
__exportStar2(require_types(), exports2);
|
|
28891
|
+
var DIFF_HANDLERS = {
|
|
28892
|
+
AWSTemplateFormatVersion: (diff, oldValue, newValue) => diff.awsTemplateFormatVersion = impl.diffAttribute(oldValue, newValue),
|
|
28893
|
+
Description: (diff, oldValue, newValue) => diff.description = impl.diffAttribute(oldValue, newValue),
|
|
28894
|
+
Metadata: (diff, oldValue, newValue) => diff.metadata = new types.DifferenceCollection((0, util_1.diffKeyedEntities)(oldValue, newValue, impl.diffMetadata)),
|
|
28895
|
+
Parameters: (diff, oldValue, newValue) => diff.parameters = new types.DifferenceCollection((0, util_1.diffKeyedEntities)(oldValue, newValue, impl.diffParameter)),
|
|
28896
|
+
Mappings: (diff, oldValue, newValue) => diff.mappings = new types.DifferenceCollection((0, util_1.diffKeyedEntities)(oldValue, newValue, impl.diffMapping)),
|
|
28897
|
+
Conditions: (diff, oldValue, newValue) => diff.conditions = new types.DifferenceCollection((0, util_1.diffKeyedEntities)(oldValue, newValue, impl.diffCondition)),
|
|
28898
|
+
Transform: (diff, oldValue, newValue) => diff.transform = impl.diffAttribute(oldValue, newValue),
|
|
28899
|
+
Resources: (diff, oldValue, newValue) => diff.resources = new types.DifferenceCollection((0, util_1.diffKeyedEntities)(oldValue, newValue, impl.diffResource)),
|
|
28900
|
+
Outputs: (diff, oldValue, newValue) => diff.outputs = new types.DifferenceCollection((0, util_1.diffKeyedEntities)(oldValue, newValue, impl.diffOutput))
|
|
28901
|
+
};
|
|
28902
|
+
function fullDiff2(currentTemplate, newTemplate, changeSet, isImport) {
|
|
28903
|
+
normalize(currentTemplate);
|
|
28904
|
+
normalize(newTemplate);
|
|
28905
|
+
const theDiff = diffTemplate(currentTemplate, newTemplate);
|
|
28906
|
+
if (changeSet) {
|
|
28907
|
+
const changeSetDiff = new template_and_changeset_diff_merger_1.TemplateAndChangeSetDiffMerger({ changeSet });
|
|
28908
|
+
theDiff.resources.forEachDifference((logicalId, change) => changeSetDiff.overrideDiffResourceChangeImpactWithChangeSetChangeImpact(logicalId, change));
|
|
28909
|
+
changeSetDiff.addImportInformationFromChangeset(theDiff.resources);
|
|
28910
|
+
} else if (isImport) {
|
|
28911
|
+
makeAllResourceChangesImports(theDiff);
|
|
28912
|
+
}
|
|
28913
|
+
return theDiff;
|
|
28914
|
+
}
|
|
28915
|
+
function diffTemplate(currentTemplate, newTemplate) {
|
|
28916
|
+
const theDiff = calculateTemplateDiff(currentTemplate, newTemplate);
|
|
28917
|
+
const newTemplateCopy = deepCopy(newTemplate);
|
|
28918
|
+
let didPropagateReferenceChanges;
|
|
28919
|
+
let diffWithReplacements;
|
|
28920
|
+
do {
|
|
28921
|
+
diffWithReplacements = calculateTemplateDiff(currentTemplate, newTemplateCopy);
|
|
28922
|
+
didPropagateReferenceChanges = false;
|
|
28923
|
+
if (diffWithReplacements.resources) {
|
|
28924
|
+
diffWithReplacements.resources.forEachDifference((logicalId, change) => {
|
|
28925
|
+
if (change.changeImpact === types.ResourceImpact.WILL_REPLACE) {
|
|
28926
|
+
if (propagateReplacedReferences(newTemplateCopy, logicalId)) {
|
|
28927
|
+
didPropagateReferenceChanges = true;
|
|
28928
|
+
}
|
|
28929
|
+
}
|
|
28930
|
+
});
|
|
28931
|
+
}
|
|
28932
|
+
} while (didPropagateReferenceChanges);
|
|
28933
|
+
diffWithReplacements.resources.filter((r) => isReplacement(r.changeImpact)).forEachDifference((logicalId, downstreamReplacement) => {
|
|
28934
|
+
const resource = theDiff.resources.get(logicalId);
|
|
28935
|
+
if (resource.changeImpact !== downstreamReplacement.changeImpact) {
|
|
28936
|
+
propagatePropertyReplacement(downstreamReplacement, resource);
|
|
28800
28937
|
}
|
|
28801
28938
|
});
|
|
28939
|
+
return theDiff;
|
|
28802
28940
|
}
|
|
28803
|
-
|
|
28804
|
-
|
|
28805
|
-
const resource = theDiff.resources.get(logicalId);
|
|
28806
|
-
if (resource.changeImpact !== downstreamReplacement.changeImpact) {
|
|
28807
|
-
propagatePropertyReplacement(downstreamReplacement, resource);
|
|
28808
|
-
}
|
|
28809
|
-
});
|
|
28810
|
-
return theDiff;
|
|
28811
|
-
}
|
|
28812
|
-
function isReplacement(impact) {
|
|
28813
|
-
return impact === "MAY_REPLACE" /* MAY_REPLACE */ || impact === "WILL_REPLACE" /* WILL_REPLACE */;
|
|
28814
|
-
}
|
|
28815
|
-
function propagatePropertyReplacement(source, dest) {
|
|
28816
|
-
for (const [propertyName, diff] of Object.entries(source.propertyUpdates)) {
|
|
28817
|
-
if (diff.changeImpact && isReplacement(diff.changeImpact)) {
|
|
28818
|
-
dest.setPropertyChange(propertyName, diff);
|
|
28819
|
-
}
|
|
28820
|
-
}
|
|
28821
|
-
}
|
|
28822
|
-
function calculateTemplateDiff(currentTemplate, newTemplate) {
|
|
28823
|
-
const differences = {};
|
|
28824
|
-
const unknown = {};
|
|
28825
|
-
for (const key of unionOf(Object.keys(currentTemplate), Object.keys(newTemplate)).sort()) {
|
|
28826
|
-
const oldValue = currentTemplate[key];
|
|
28827
|
-
const newValue = newTemplate[key];
|
|
28828
|
-
if (deepEqual(oldValue, newValue)) {
|
|
28829
|
-
continue;
|
|
28830
|
-
}
|
|
28831
|
-
const handler = DIFF_HANDLERS[key] || ((_diff, oldV, newV) => unknown[key] = diffUnknown(oldV, newV));
|
|
28832
|
-
handler(differences, oldValue, newValue);
|
|
28833
|
-
}
|
|
28834
|
-
if (Object.keys(unknown).length > 0) {
|
|
28835
|
-
differences.unknown = new DifferenceCollection(unknown);
|
|
28836
|
-
}
|
|
28837
|
-
return new TemplateDiff(differences);
|
|
28838
|
-
}
|
|
28839
|
-
function propagateReplacedReferences(template, logicalId) {
|
|
28840
|
-
let ret = false;
|
|
28841
|
-
function recurse(obj) {
|
|
28842
|
-
if (Array.isArray(obj)) {
|
|
28843
|
-
obj.forEach(recurse);
|
|
28941
|
+
function isReplacement(impact) {
|
|
28942
|
+
return impact === types.ResourceImpact.MAY_REPLACE || impact === types.ResourceImpact.WILL_REPLACE;
|
|
28844
28943
|
}
|
|
28845
|
-
|
|
28846
|
-
|
|
28847
|
-
|
|
28944
|
+
function propagatePropertyReplacement(source, dest) {
|
|
28945
|
+
for (const [propertyName, diff] of Object.entries(source.propertyUpdates)) {
|
|
28946
|
+
if (diff.changeImpact && isReplacement(diff.changeImpact)) {
|
|
28947
|
+
dest.setPropertyChange(propertyName, diff);
|
|
28948
|
+
}
|
|
28848
28949
|
}
|
|
28849
28950
|
}
|
|
28850
|
-
|
|
28851
|
-
|
|
28852
|
-
|
|
28853
|
-
|
|
28854
|
-
|
|
28855
|
-
|
|
28856
|
-
|
|
28857
|
-
|
|
28858
|
-
|
|
28859
|
-
|
|
28860
|
-
|
|
28951
|
+
function calculateTemplateDiff(currentTemplate, newTemplate) {
|
|
28952
|
+
const differences = {};
|
|
28953
|
+
const unknown = {};
|
|
28954
|
+
for (const key of (0, util_1.unionOf)(Object.keys(currentTemplate), Object.keys(newTemplate)).sort()) {
|
|
28955
|
+
const oldValue = currentTemplate[key];
|
|
28956
|
+
const newValue = newTemplate[key];
|
|
28957
|
+
if ((0, util_1.deepEqual)(oldValue, newValue)) {
|
|
28958
|
+
continue;
|
|
28959
|
+
}
|
|
28960
|
+
const handler = DIFF_HANDLERS[key] || ((_diff, oldV, newV) => unknown[key] = impl.diffUnknown(oldV, newV));
|
|
28961
|
+
handler(differences, oldValue, newValue);
|
|
28861
28962
|
}
|
|
28862
|
-
|
|
28863
|
-
|
|
28864
|
-
if (key.startsWith("Fn::")) {
|
|
28865
|
-
if (Array.isArray(obj[key]) && obj[key].length > 0 && obj[key][0] === logicalId) {
|
|
28866
|
-
obj[key][0] = logicalId + "(replaced)";
|
|
28867
|
-
ret = true;
|
|
28963
|
+
if (Object.keys(unknown).length > 0) {
|
|
28964
|
+
differences.unknown = new types.DifferenceCollection(unknown);
|
|
28868
28965
|
}
|
|
28869
|
-
return
|
|
28966
|
+
return new types.TemplateDiff(differences);
|
|
28870
28967
|
}
|
|
28871
|
-
|
|
28872
|
-
|
|
28873
|
-
|
|
28874
|
-
|
|
28875
|
-
|
|
28876
|
-
|
|
28877
|
-
|
|
28878
|
-
|
|
28879
|
-
|
|
28880
|
-
|
|
28881
|
-
|
|
28882
|
-
|
|
28883
|
-
|
|
28968
|
+
function propagateReplacedReferences(template, logicalId) {
|
|
28969
|
+
let ret = false;
|
|
28970
|
+
function recurse(obj) {
|
|
28971
|
+
if (Array.isArray(obj)) {
|
|
28972
|
+
obj.forEach(recurse);
|
|
28973
|
+
}
|
|
28974
|
+
if (typeof obj === "object" && obj !== null) {
|
|
28975
|
+
if (!replaceReference(obj)) {
|
|
28976
|
+
Object.values(obj).forEach(recurse);
|
|
28977
|
+
}
|
|
28978
|
+
}
|
|
28979
|
+
}
|
|
28980
|
+
function replaceReference(obj) {
|
|
28981
|
+
const keys = Object.keys(obj);
|
|
28982
|
+
if (keys.length !== 1) {
|
|
28983
|
+
return false;
|
|
28984
|
+
}
|
|
28985
|
+
const key = keys[0];
|
|
28986
|
+
if (key === "Ref") {
|
|
28987
|
+
if (obj.Ref === logicalId) {
|
|
28988
|
+
obj.Ref = logicalId + " (replaced)";
|
|
28989
|
+
ret = true;
|
|
28990
|
+
}
|
|
28991
|
+
return true;
|
|
28992
|
+
}
|
|
28993
|
+
if (key.startsWith("Fn::")) {
|
|
28994
|
+
if (Array.isArray(obj[key]) && obj[key].length > 0 && obj[key][0] === logicalId) {
|
|
28995
|
+
obj[key][0] = logicalId + "(replaced)";
|
|
28996
|
+
ret = true;
|
|
28997
|
+
}
|
|
28998
|
+
return true;
|
|
28999
|
+
}
|
|
29000
|
+
return false;
|
|
29001
|
+
}
|
|
29002
|
+
recurse(template);
|
|
29003
|
+
return ret;
|
|
28884
29004
|
}
|
|
28885
|
-
|
|
28886
|
-
|
|
28887
|
-
|
|
28888
|
-
}
|
|
28889
|
-
|
|
28890
|
-
|
|
28891
|
-
|
|
28892
|
-
|
|
28893
|
-
}
|
|
28894
|
-
function normalize(template) {
|
|
28895
|
-
if (typeof template === "object") {
|
|
28896
|
-
for (const key of Object.keys(template ?? {})) {
|
|
28897
|
-
if (key === "Fn::GetAtt" && typeof template[key] === "string") {
|
|
28898
|
-
template[key] = template[key].split(".");
|
|
28899
|
-
continue;
|
|
28900
|
-
} else if (key === "DependsOn") {
|
|
28901
|
-
if (typeof template[key] === "string") {
|
|
28902
|
-
template[key] = [template[key]];
|
|
28903
|
-
} else if (Array.isArray(template[key])) {
|
|
28904
|
-
template[key] = template[key].sort();
|
|
29005
|
+
function deepCopy(x) {
|
|
29006
|
+
if (Array.isArray(x)) {
|
|
29007
|
+
return x.map(deepCopy);
|
|
29008
|
+
}
|
|
29009
|
+
if (typeof x === "object" && x !== null) {
|
|
29010
|
+
const ret = {};
|
|
29011
|
+
for (const key of Object.keys(x)) {
|
|
29012
|
+
ret[key] = deepCopy(x[key]);
|
|
28905
29013
|
}
|
|
28906
|
-
|
|
29014
|
+
return ret;
|
|
28907
29015
|
}
|
|
28908
|
-
|
|
28909
|
-
|
|
28910
|
-
|
|
29016
|
+
return x;
|
|
29017
|
+
}
|
|
29018
|
+
function makeAllResourceChangesImports(diff) {
|
|
29019
|
+
diff.resources.forEachDifference((_logicalId, change) => {
|
|
29020
|
+
change.isImport = true;
|
|
29021
|
+
});
|
|
29022
|
+
}
|
|
29023
|
+
function normalize(template) {
|
|
29024
|
+
if (typeof template === "object") {
|
|
29025
|
+
for (const key of Object.keys(template ?? {})) {
|
|
29026
|
+
if (key === "Fn::GetAtt" && typeof template[key] === "string") {
|
|
29027
|
+
template[key] = template[key].split(".");
|
|
29028
|
+
continue;
|
|
29029
|
+
} else if (key === "DependsOn") {
|
|
29030
|
+
if (typeof template[key] === "string") {
|
|
29031
|
+
template[key] = [template[key]];
|
|
29032
|
+
} else if (Array.isArray(template[key])) {
|
|
29033
|
+
template[key] = template[key].sort();
|
|
29034
|
+
}
|
|
29035
|
+
continue;
|
|
29036
|
+
}
|
|
29037
|
+
if (Array.isArray(template[key])) {
|
|
29038
|
+
for (const element of template[key]) {
|
|
29039
|
+
normalize(element);
|
|
29040
|
+
}
|
|
29041
|
+
} else {
|
|
29042
|
+
normalize(template[key]);
|
|
29043
|
+
}
|
|
28911
29044
|
}
|
|
28912
|
-
} else {
|
|
28913
|
-
normalize(template[key]);
|
|
28914
29045
|
}
|
|
28915
29046
|
}
|
|
28916
29047
|
}
|
|
28917
|
-
}
|
|
28918
|
-
var DIFF_HANDLERS;
|
|
28919
|
-
var init_diff_template = __esm({
|
|
28920
|
-
"../cloudformation-diff/lib/diff-template.ts"() {
|
|
28921
|
-
"use strict";
|
|
28922
|
-
init_diff();
|
|
28923
|
-
init_template_and_changeset_diff_merger();
|
|
28924
|
-
init_types();
|
|
28925
|
-
init_util();
|
|
28926
|
-
init_types();
|
|
28927
|
-
DIFF_HANDLERS = {
|
|
28928
|
-
AWSTemplateFormatVersion: (diff, oldValue, newValue) => diff.awsTemplateFormatVersion = diffAttribute(oldValue, newValue),
|
|
28929
|
-
Description: (diff, oldValue, newValue) => diff.description = diffAttribute(oldValue, newValue),
|
|
28930
|
-
Metadata: (diff, oldValue, newValue) => diff.metadata = new DifferenceCollection(diffKeyedEntities(oldValue, newValue, diffMetadata)),
|
|
28931
|
-
Parameters: (diff, oldValue, newValue) => diff.parameters = new DifferenceCollection(diffKeyedEntities(oldValue, newValue, diffParameter)),
|
|
28932
|
-
Mappings: (diff, oldValue, newValue) => diff.mappings = new DifferenceCollection(diffKeyedEntities(oldValue, newValue, diffMapping)),
|
|
28933
|
-
Conditions: (diff, oldValue, newValue) => diff.conditions = new DifferenceCollection(diffKeyedEntities(oldValue, newValue, diffCondition)),
|
|
28934
|
-
Transform: (diff, oldValue, newValue) => diff.transform = diffAttribute(oldValue, newValue),
|
|
28935
|
-
Resources: (diff, oldValue, newValue) => diff.resources = new DifferenceCollection(diffKeyedEntities(oldValue, newValue, diffResource)),
|
|
28936
|
-
Outputs: (diff, oldValue, newValue) => diff.outputs = new DifferenceCollection(diffKeyedEntities(oldValue, newValue, diffOutput))
|
|
28937
|
-
};
|
|
28938
|
-
}
|
|
28939
29048
|
});
|
|
28940
29049
|
|
|
28941
29050
|
// ../../../node_modules/ansi-regex/index.js
|
|
@@ -29011,7 +29120,7 @@ var require_string_width = __commonJS({
|
|
|
29011
29120
|
var stripAnsi = require_strip_ansi();
|
|
29012
29121
|
var isFullwidthCodePoint = require_is_fullwidth_code_point();
|
|
29013
29122
|
var emojiRegex = require_emoji_regex();
|
|
29014
|
-
var
|
|
29123
|
+
var stringWidth = (string) => {
|
|
29015
29124
|
if (typeof string !== "string" || string.length === 0) {
|
|
29016
29125
|
return 0;
|
|
29017
29126
|
}
|
|
@@ -29036,8 +29145,8 @@ var require_string_width = __commonJS({
|
|
|
29036
29145
|
}
|
|
29037
29146
|
return width;
|
|
29038
29147
|
};
|
|
29039
|
-
module2.exports =
|
|
29040
|
-
module2.exports.default =
|
|
29148
|
+
module2.exports = stringWidth;
|
|
29149
|
+
module2.exports.default = stringWidth;
|
|
29041
29150
|
}
|
|
29042
29151
|
});
|
|
29043
29152
|
|
|
@@ -29299,10 +29408,10 @@ var require_utils4 = __commonJS({
|
|
|
29299
29408
|
return (_b = (_a = input.match(/\s+/g)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
29300
29409
|
};
|
|
29301
29410
|
exports2.countSpaceSequence = countSpaceSequence;
|
|
29302
|
-
var distributeUnevenly = (
|
|
29303
|
-
const result = Array.from({ length }).fill(Math.floor(
|
|
29411
|
+
var distributeUnevenly = (sum, length) => {
|
|
29412
|
+
const result = Array.from({ length }).fill(Math.floor(sum / length));
|
|
29304
29413
|
return result.map((element, index) => {
|
|
29305
|
-
return element + (index <
|
|
29414
|
+
return element + (index < sum % length ? 1 : 0);
|
|
29306
29415
|
});
|
|
29307
29416
|
};
|
|
29308
29417
|
exports2.distributeUnevenly = distributeUnevenly;
|
|
@@ -33425,7 +33534,7 @@ var require_table = __commonJS({
|
|
|
33425
33534
|
var truncateTableData_1 = require_truncateTableData();
|
|
33426
33535
|
var utils_1 = require_utils4();
|
|
33427
33536
|
var validateTableData_1 = require_validateTableData();
|
|
33428
|
-
var
|
|
33537
|
+
var table = (data, userConfig = {}) => {
|
|
33429
33538
|
(0, validateTableData_1.validateTableData)(data);
|
|
33430
33539
|
let rows = (0, stringifyTableData_1.stringifyTableData)(data);
|
|
33431
33540
|
const [injectedRows, injectedSpanningCellConfig] = (0, injectHeaderConfig_1.injectHeaderConfig)(rows, userConfig);
|
|
@@ -33440,7 +33549,7 @@ var require_table = __commonJS({
|
|
|
33440
33549
|
const outputColumnWidths = (0, calculateOutputColumnWidths_1.calculateOutputColumnWidths)(config);
|
|
33441
33550
|
return (0, drawTable_1.drawTable)(rows, outputColumnWidths, rowHeights, config);
|
|
33442
33551
|
};
|
|
33443
|
-
exports2.table =
|
|
33552
|
+
exports2.table = table;
|
|
33444
33553
|
}
|
|
33445
33554
|
});
|
|
33446
33555
|
|
|
@@ -33486,75 +33595,72 @@ var require_src2 = __commonJS({
|
|
|
33486
33595
|
}
|
|
33487
33596
|
});
|
|
33488
33597
|
|
|
33489
|
-
//
|
|
33490
|
-
var
|
|
33491
|
-
|
|
33492
|
-
|
|
33493
|
-
});
|
|
33494
|
-
|
|
33495
|
-
|
|
33496
|
-
|
|
33497
|
-
|
|
33498
|
-
|
|
33499
|
-
return
|
|
33598
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/lib/format-table.js
|
|
33599
|
+
var require_format_table = __commonJS({
|
|
33600
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/lib/format-table.js"(exports2) {
|
|
33601
|
+
"use strict";
|
|
33602
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
33603
|
+
exports2.formatTable = formatTable;
|
|
33604
|
+
var chalk3 = require_source();
|
|
33605
|
+
var string_width_1 = require_string_width();
|
|
33606
|
+
var table = require_src2();
|
|
33607
|
+
function formatTable(cells, columns) {
|
|
33608
|
+
return table.table(cells, {
|
|
33609
|
+
border: TABLE_BORDER_CHARACTERS,
|
|
33610
|
+
columns: buildColumnConfig(columns !== void 0 ? calculateColumnWidths(cells, columns) : void 0),
|
|
33611
|
+
drawHorizontalLine: (line) => {
|
|
33612
|
+
return line < 2 || line === cells.length || lineBetween(cells[line - 1], cells[line]);
|
|
33613
|
+
}
|
|
33614
|
+
}).trimRight();
|
|
33615
|
+
}
|
|
33616
|
+
function lineBetween(rowA, rowB) {
|
|
33617
|
+
return rowA[1] !== rowB[1];
|
|
33618
|
+
}
|
|
33619
|
+
function buildColumnConfig(widths) {
|
|
33620
|
+
if (widths === void 0) {
|
|
33621
|
+
return void 0;
|
|
33622
|
+
}
|
|
33623
|
+
const ret = {};
|
|
33624
|
+
widths.forEach((width, i) => {
|
|
33625
|
+
if (width === void 0) {
|
|
33626
|
+
return;
|
|
33627
|
+
}
|
|
33628
|
+
ret[i] = { width };
|
|
33629
|
+
});
|
|
33630
|
+
return ret;
|
|
33500
33631
|
}
|
|
33501
|
-
|
|
33502
|
-
|
|
33503
|
-
|
|
33504
|
-
|
|
33505
|
-
|
|
33506
|
-
|
|
33507
|
-
|
|
33508
|
-
|
|
33509
|
-
|
|
33510
|
-
|
|
33511
|
-
|
|
33512
|
-
|
|
33513
|
-
|
|
33632
|
+
function calculateColumnWidths(rows, terminalWidth) {
|
|
33633
|
+
terminalWidth = Math.max(terminalWidth, 40);
|
|
33634
|
+
const columns = rows[0].map((_, i) => Math.max(...rows.map((row) => (0, string_width_1.default)(String(row[i])))));
|
|
33635
|
+
const contentWidth = terminalWidth - 2 - columns.length * 3;
|
|
33636
|
+
if (sum(columns) <= contentWidth) {
|
|
33637
|
+
return columns;
|
|
33638
|
+
}
|
|
33639
|
+
const fairShare = Math.min(contentWidth / columns.length);
|
|
33640
|
+
const smallColumns = columns.filter((w) => w < fairShare);
|
|
33641
|
+
let distributableWidth = contentWidth - sum(smallColumns);
|
|
33642
|
+
const fairDistributable = Math.floor(distributableWidth / (columns.length - smallColumns.length));
|
|
33643
|
+
const ret = new Array();
|
|
33644
|
+
for (const requestedWidth of columns) {
|
|
33645
|
+
if (requestedWidth < fairShare) {
|
|
33646
|
+
ret.push(requestedWidth);
|
|
33647
|
+
} else {
|
|
33648
|
+
const width = distributableWidth < 2 * fairDistributable ? distributableWidth : fairDistributable;
|
|
33649
|
+
ret.push(width);
|
|
33650
|
+
distributableWidth -= width;
|
|
33651
|
+
}
|
|
33652
|
+
}
|
|
33653
|
+
return ret;
|
|
33514
33654
|
}
|
|
33515
|
-
|
|
33516
|
-
|
|
33517
|
-
|
|
33518
|
-
|
|
33519
|
-
|
|
33520
|
-
|
|
33521
|
-
const columns = rows[0].map((_, i) => Math.max(...rows.map((row) => (0, import_string_width.default)(String(row[i])))));
|
|
33522
|
-
const contentWidth = terminalWidth - 2 - columns.length * 3;
|
|
33523
|
-
if (sum(columns) <= contentWidth) {
|
|
33524
|
-
return columns;
|
|
33525
|
-
}
|
|
33526
|
-
const fairShare = Math.min(contentWidth / columns.length);
|
|
33527
|
-
const smallColumns = columns.filter((w) => w < fairShare);
|
|
33528
|
-
let distributableWidth = contentWidth - sum(smallColumns);
|
|
33529
|
-
const fairDistributable = Math.floor(distributableWidth / (columns.length - smallColumns.length));
|
|
33530
|
-
const ret = new Array();
|
|
33531
|
-
for (const requestedWidth of columns) {
|
|
33532
|
-
if (requestedWidth < fairShare) {
|
|
33533
|
-
ret.push(requestedWidth);
|
|
33534
|
-
} else {
|
|
33535
|
-
const width = distributableWidth < 2 * fairDistributable ? distributableWidth : fairDistributable;
|
|
33536
|
-
ret.push(width);
|
|
33537
|
-
distributableWidth -= width;
|
|
33655
|
+
function sum(xs) {
|
|
33656
|
+
let total = 0;
|
|
33657
|
+
for (const x of xs) {
|
|
33658
|
+
total += x;
|
|
33659
|
+
}
|
|
33660
|
+
return total;
|
|
33538
33661
|
}
|
|
33539
|
-
|
|
33540
|
-
|
|
33541
|
-
}
|
|
33542
|
-
function sum(xs) {
|
|
33543
|
-
let total = 0;
|
|
33544
|
-
for (const x of xs) {
|
|
33545
|
-
total += x;
|
|
33546
|
-
}
|
|
33547
|
-
return total;
|
|
33548
|
-
}
|
|
33549
|
-
var chalk5, import_string_width, table, tableColor, TABLE_BORDER_CHARACTERS;
|
|
33550
|
-
var init_format_table = __esm({
|
|
33551
|
-
"../cloudformation-diff/lib/format-table.ts"() {
|
|
33552
|
-
"use strict";
|
|
33553
|
-
chalk5 = __toESM(require_source());
|
|
33554
|
-
import_string_width = __toESM(require_string_width());
|
|
33555
|
-
table = __toESM(require_src2());
|
|
33556
|
-
tableColor = chalk5.gray;
|
|
33557
|
-
TABLE_BORDER_CHARACTERS = {
|
|
33662
|
+
var tableColor = chalk3.gray;
|
|
33663
|
+
var TABLE_BORDER_CHARACTERS = {
|
|
33558
33664
|
topBody: tableColor("\u2500"),
|
|
33559
33665
|
topJoin: tableColor("\u252C"),
|
|
33560
33666
|
topLeft: tableColor("\u250C"),
|
|
@@ -33574,9 +33680,9 @@ var init_format_table = __esm({
|
|
|
33574
33680
|
}
|
|
33575
33681
|
});
|
|
33576
33682
|
|
|
33577
|
-
// ../../../node_modules/diff/lib/diff/base.js
|
|
33683
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/base.js
|
|
33578
33684
|
var require_base = __commonJS({
|
|
33579
|
-
"../../../node_modules/diff/lib/diff/base.js"(exports2) {
|
|
33685
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/base.js"(exports2) {
|
|
33580
33686
|
"use strict";
|
|
33581
33687
|
Object.defineProperty(exports2, "__esModule", {
|
|
33582
33688
|
value: true
|
|
@@ -33823,9 +33929,9 @@ var require_base = __commonJS({
|
|
|
33823
33929
|
}
|
|
33824
33930
|
});
|
|
33825
33931
|
|
|
33826
|
-
// ../../../node_modules/diff/lib/diff/character.js
|
|
33932
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/character.js
|
|
33827
33933
|
var require_character = __commonJS({
|
|
33828
|
-
"../../../node_modules/diff/lib/diff/character.js"(exports2) {
|
|
33934
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/character.js"(exports2) {
|
|
33829
33935
|
"use strict";
|
|
33830
33936
|
Object.defineProperty(exports2, "__esModule", {
|
|
33831
33937
|
value: true
|
|
@@ -33849,9 +33955,9 @@ var require_character = __commonJS({
|
|
|
33849
33955
|
}
|
|
33850
33956
|
});
|
|
33851
33957
|
|
|
33852
|
-
// ../../../node_modules/diff/lib/util/params.js
|
|
33958
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/util/params.js
|
|
33853
33959
|
var require_params = __commonJS({
|
|
33854
|
-
"../../../node_modules/diff/lib/util/params.js"(exports2) {
|
|
33960
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/util/params.js"(exports2) {
|
|
33855
33961
|
"use strict";
|
|
33856
33962
|
Object.defineProperty(exports2, "__esModule", {
|
|
33857
33963
|
value: true
|
|
@@ -33872,9 +33978,9 @@ var require_params = __commonJS({
|
|
|
33872
33978
|
}
|
|
33873
33979
|
});
|
|
33874
33980
|
|
|
33875
|
-
// ../../../node_modules/diff/lib/diff/word.js
|
|
33981
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/word.js
|
|
33876
33982
|
var require_word = __commonJS({
|
|
33877
|
-
"../../../node_modules/diff/lib/diff/word.js"(exports2) {
|
|
33983
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/word.js"(exports2) {
|
|
33878
33984
|
"use strict";
|
|
33879
33985
|
Object.defineProperty(exports2, "__esModule", {
|
|
33880
33986
|
value: true
|
|
@@ -33929,9 +34035,9 @@ var require_word = __commonJS({
|
|
|
33929
34035
|
}
|
|
33930
34036
|
});
|
|
33931
34037
|
|
|
33932
|
-
// ../../../node_modules/diff/lib/diff/line.js
|
|
34038
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/line.js
|
|
33933
34039
|
var require_line = __commonJS({
|
|
33934
|
-
"../../../node_modules/diff/lib/diff/line.js"(exports2) {
|
|
34040
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/line.js"(exports2) {
|
|
33935
34041
|
"use strict";
|
|
33936
34042
|
Object.defineProperty(exports2, "__esModule", {
|
|
33937
34043
|
value: true
|
|
@@ -33989,9 +34095,9 @@ var require_line = __commonJS({
|
|
|
33989
34095
|
}
|
|
33990
34096
|
});
|
|
33991
34097
|
|
|
33992
|
-
// ../../../node_modules/diff/lib/diff/sentence.js
|
|
34098
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/sentence.js
|
|
33993
34099
|
var require_sentence = __commonJS({
|
|
33994
|
-
"../../../node_modules/diff/lib/diff/sentence.js"(exports2) {
|
|
34100
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/sentence.js"(exports2) {
|
|
33995
34101
|
"use strict";
|
|
33996
34102
|
Object.defineProperty(exports2, "__esModule", {
|
|
33997
34103
|
value: true
|
|
@@ -34018,9 +34124,9 @@ var require_sentence = __commonJS({
|
|
|
34018
34124
|
}
|
|
34019
34125
|
});
|
|
34020
34126
|
|
|
34021
|
-
// ../../../node_modules/diff/lib/diff/css.js
|
|
34127
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/css.js
|
|
34022
34128
|
var require_css = __commonJS({
|
|
34023
|
-
"../../../node_modules/diff/lib/diff/css.js"(exports2) {
|
|
34129
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/css.js"(exports2) {
|
|
34024
34130
|
"use strict";
|
|
34025
34131
|
Object.defineProperty(exports2, "__esModule", {
|
|
34026
34132
|
value: true
|
|
@@ -34047,9 +34153,9 @@ var require_css = __commonJS({
|
|
|
34047
34153
|
}
|
|
34048
34154
|
});
|
|
34049
34155
|
|
|
34050
|
-
// ../../../node_modules/diff/lib/diff/json.js
|
|
34156
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/json.js
|
|
34051
34157
|
var require_json2 = __commonJS({
|
|
34052
|
-
"../../../node_modules/diff/lib/diff/json.js"(exports2) {
|
|
34158
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/json.js"(exports2) {
|
|
34053
34159
|
"use strict";
|
|
34054
34160
|
Object.defineProperty(exports2, "__esModule", {
|
|
34055
34161
|
value: true
|
|
@@ -34169,9 +34275,9 @@ var require_json2 = __commonJS({
|
|
|
34169
34275
|
}
|
|
34170
34276
|
});
|
|
34171
34277
|
|
|
34172
|
-
// ../../../node_modules/diff/lib/diff/array.js
|
|
34278
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/array.js
|
|
34173
34279
|
var require_array = __commonJS({
|
|
34174
|
-
"../../../node_modules/diff/lib/diff/array.js"(exports2) {
|
|
34280
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/diff/array.js"(exports2) {
|
|
34175
34281
|
"use strict";
|
|
34176
34282
|
Object.defineProperty(exports2, "__esModule", {
|
|
34177
34283
|
value: true
|
|
@@ -34201,9 +34307,9 @@ var require_array = __commonJS({
|
|
|
34201
34307
|
}
|
|
34202
34308
|
});
|
|
34203
34309
|
|
|
34204
|
-
// ../../../node_modules/diff/lib/patch/parse.js
|
|
34310
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/parse.js
|
|
34205
34311
|
var require_parse5 = __commonJS({
|
|
34206
|
-
"../../../node_modules/diff/lib/patch/parse.js"(exports2) {
|
|
34312
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/parse.js"(exports2) {
|
|
34207
34313
|
"use strict";
|
|
34208
34314
|
Object.defineProperty(exports2, "__esModule", {
|
|
34209
34315
|
value: true
|
|
@@ -34317,9 +34423,9 @@ var require_parse5 = __commonJS({
|
|
|
34317
34423
|
}
|
|
34318
34424
|
});
|
|
34319
34425
|
|
|
34320
|
-
// ../../../node_modules/diff/lib/util/distance-iterator.js
|
|
34426
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/util/distance-iterator.js
|
|
34321
34427
|
var require_distance_iterator = __commonJS({
|
|
34322
|
-
"../../../node_modules/diff/lib/util/distance-iterator.js"(exports2) {
|
|
34428
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/util/distance-iterator.js"(exports2) {
|
|
34323
34429
|
"use strict";
|
|
34324
34430
|
Object.defineProperty(exports2, "__esModule", {
|
|
34325
34431
|
value: true
|
|
@@ -34354,9 +34460,9 @@ var require_distance_iterator = __commonJS({
|
|
|
34354
34460
|
}
|
|
34355
34461
|
});
|
|
34356
34462
|
|
|
34357
|
-
// ../../../node_modules/diff/lib/patch/apply.js
|
|
34463
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/apply.js
|
|
34358
34464
|
var require_apply = __commonJS({
|
|
34359
|
-
"../../../node_modules/diff/lib/patch/apply.js"(exports2) {
|
|
34465
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/apply.js"(exports2) {
|
|
34360
34466
|
"use strict";
|
|
34361
34467
|
Object.defineProperty(exports2, "__esModule", {
|
|
34362
34468
|
value: true
|
|
@@ -34496,14 +34602,14 @@ var require_apply = __commonJS({
|
|
|
34496
34602
|
}
|
|
34497
34603
|
});
|
|
34498
34604
|
|
|
34499
|
-
// ../../../node_modules/diff/lib/patch/create.js
|
|
34605
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/create.js
|
|
34500
34606
|
var require_create = __commonJS({
|
|
34501
|
-
"../../../node_modules/diff/lib/patch/create.js"(exports2) {
|
|
34607
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/create.js"(exports2) {
|
|
34502
34608
|
"use strict";
|
|
34503
34609
|
Object.defineProperty(exports2, "__esModule", {
|
|
34504
34610
|
value: true
|
|
34505
34611
|
});
|
|
34506
|
-
exports2.structuredPatch =
|
|
34612
|
+
exports2.structuredPatch = structuredPatch;
|
|
34507
34613
|
exports2.formatPatch = formatPatch;
|
|
34508
34614
|
exports2.createTwoFilesPatch = createTwoFilesPatch;
|
|
34509
34615
|
exports2.createPatch = createPatch;
|
|
@@ -34535,7 +34641,7 @@ var require_create = __commonJS({
|
|
|
34535
34641
|
}
|
|
34536
34642
|
return arr2;
|
|
34537
34643
|
}
|
|
34538
|
-
function
|
|
34644
|
+
function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
|
|
34539
34645
|
if (!options) {
|
|
34540
34646
|
options = {};
|
|
34541
34647
|
}
|
|
@@ -34688,7 +34794,7 @@ var require_create = __commonJS({
|
|
|
34688
34794
|
return ret.join("\n") + "\n";
|
|
34689
34795
|
}
|
|
34690
34796
|
function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
|
|
34691
|
-
return formatPatch(
|
|
34797
|
+
return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options));
|
|
34692
34798
|
}
|
|
34693
34799
|
function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
|
|
34694
34800
|
return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
|
|
@@ -34696,9 +34802,9 @@ var require_create = __commonJS({
|
|
|
34696
34802
|
}
|
|
34697
34803
|
});
|
|
34698
34804
|
|
|
34699
|
-
// ../../../node_modules/diff/lib/util/array.js
|
|
34805
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/util/array.js
|
|
34700
34806
|
var require_array2 = __commonJS({
|
|
34701
|
-
"../../../node_modules/diff/lib/util/array.js"(exports2) {
|
|
34807
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/util/array.js"(exports2) {
|
|
34702
34808
|
"use strict";
|
|
34703
34809
|
Object.defineProperty(exports2, "__esModule", {
|
|
34704
34810
|
value: true
|
|
@@ -34725,9 +34831,9 @@ var require_array2 = __commonJS({
|
|
|
34725
34831
|
}
|
|
34726
34832
|
});
|
|
34727
34833
|
|
|
34728
|
-
// ../../../node_modules/diff/lib/patch/merge.js
|
|
34834
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/merge.js
|
|
34729
34835
|
var require_merge = __commonJS({
|
|
34730
|
-
"../../../node_modules/diff/lib/patch/merge.js"(exports2) {
|
|
34836
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/merge.js"(exports2) {
|
|
34731
34837
|
"use strict";
|
|
34732
34838
|
Object.defineProperty(exports2, "__esModule", {
|
|
34733
34839
|
value: true
|
|
@@ -35148,9 +35254,9 @@ var require_merge = __commonJS({
|
|
|
35148
35254
|
}
|
|
35149
35255
|
});
|
|
35150
35256
|
|
|
35151
|
-
// ../../../node_modules/diff/lib/patch/reverse.js
|
|
35257
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/reverse.js
|
|
35152
35258
|
var require_reverse = __commonJS({
|
|
35153
|
-
"../../../node_modules/diff/lib/patch/reverse.js"(exports2) {
|
|
35259
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/patch/reverse.js"(exports2) {
|
|
35154
35260
|
"use strict";
|
|
35155
35261
|
Object.defineProperty(exports2, "__esModule", {
|
|
35156
35262
|
value: true
|
|
@@ -35192,22 +35298,22 @@ var require_reverse = __commonJS({
|
|
|
35192
35298
|
}
|
|
35193
35299
|
return obj;
|
|
35194
35300
|
}
|
|
35195
|
-
function reversePatch(
|
|
35196
|
-
if (Array.isArray(
|
|
35197
|
-
return
|
|
35301
|
+
function reversePatch(structuredPatch) {
|
|
35302
|
+
if (Array.isArray(structuredPatch)) {
|
|
35303
|
+
return structuredPatch.map(reversePatch).reverse();
|
|
35198
35304
|
}
|
|
35199
35305
|
return (
|
|
35200
35306
|
/*istanbul ignore start*/
|
|
35201
35307
|
_objectSpread(_objectSpread(
|
|
35202
35308
|
{},
|
|
35203
35309
|
/*istanbul ignore end*/
|
|
35204
|
-
|
|
35310
|
+
structuredPatch
|
|
35205
35311
|
), {}, {
|
|
35206
|
-
oldFileName:
|
|
35207
|
-
oldHeader:
|
|
35208
|
-
newFileName:
|
|
35209
|
-
newHeader:
|
|
35210
|
-
hunks:
|
|
35312
|
+
oldFileName: structuredPatch.newFileName,
|
|
35313
|
+
oldHeader: structuredPatch.newHeader,
|
|
35314
|
+
newFileName: structuredPatch.oldFileName,
|
|
35315
|
+
newHeader: structuredPatch.oldHeader,
|
|
35316
|
+
hunks: structuredPatch.hunks.map(function(hunk) {
|
|
35211
35317
|
return {
|
|
35212
35318
|
oldLines: hunk.newLines,
|
|
35213
35319
|
oldStart: hunk.newStart,
|
|
@@ -35243,9 +35349,9 @@ var require_reverse = __commonJS({
|
|
|
35243
35349
|
}
|
|
35244
35350
|
});
|
|
35245
35351
|
|
|
35246
|
-
// ../../../node_modules/diff/lib/convert/dmp.js
|
|
35352
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/convert/dmp.js
|
|
35247
35353
|
var require_dmp = __commonJS({
|
|
35248
|
-
"../../../node_modules/diff/lib/convert/dmp.js"(exports2) {
|
|
35354
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/convert/dmp.js"(exports2) {
|
|
35249
35355
|
"use strict";
|
|
35250
35356
|
Object.defineProperty(exports2, "__esModule", {
|
|
35251
35357
|
value: true
|
|
@@ -35269,9 +35375,9 @@ var require_dmp = __commonJS({
|
|
|
35269
35375
|
}
|
|
35270
35376
|
});
|
|
35271
35377
|
|
|
35272
|
-
// ../../../node_modules/diff/lib/convert/xml.js
|
|
35378
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/convert/xml.js
|
|
35273
35379
|
var require_xml = __commonJS({
|
|
35274
|
-
"../../../node_modules/diff/lib/convert/xml.js"(exports2) {
|
|
35380
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/convert/xml.js"(exports2) {
|
|
35275
35381
|
"use strict";
|
|
35276
35382
|
Object.defineProperty(exports2, "__esModule", {
|
|
35277
35383
|
value: true
|
|
@@ -35306,9 +35412,9 @@ var require_xml = __commonJS({
|
|
|
35306
35412
|
}
|
|
35307
35413
|
});
|
|
35308
35414
|
|
|
35309
|
-
// ../../../node_modules/diff/lib/index.js
|
|
35415
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/index.js
|
|
35310
35416
|
var require_lib10 = __commonJS({
|
|
35311
|
-
"../../../node_modules/diff/lib/index.js"(exports2) {
|
|
35417
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/node_modules/diff/lib/index.js"(exports2) {
|
|
35312
35418
|
"use strict";
|
|
35313
35419
|
Object.defineProperty(exports2, "__esModule", {
|
|
35314
35420
|
value: true
|
|
@@ -35466,102 +35572,58 @@ var require_lib10 = __commonJS({
|
|
|
35466
35572
|
}
|
|
35467
35573
|
});
|
|
35468
35574
|
|
|
35469
|
-
//
|
|
35470
|
-
var
|
|
35471
|
-
|
|
35472
|
-
|
|
35473
|
-
|
|
35474
|
-
|
|
35475
|
-
|
|
35476
|
-
|
|
35477
|
-
|
|
35478
|
-
|
|
35479
|
-
|
|
35480
|
-
|
|
35481
|
-
|
|
35482
|
-
|
|
35483
|
-
|
|
35484
|
-
|
|
35485
|
-
|
|
35486
|
-
|
|
35487
|
-
|
|
35488
|
-
|
|
35489
|
-
|
|
35490
|
-
|
|
35491
|
-
|
|
35492
|
-
|
|
35493
|
-
|
|
35494
|
-
|
|
35495
|
-
|
|
35496
|
-
|
|
35497
|
-
|
|
35498
|
-
|
|
35499
|
-
|
|
35500
|
-
|
|
35501
|
-
|
|
35502
|
-
|
|
35503
|
-
|
|
35504
|
-
|
|
35505
|
-
|
|
35506
|
-
|
|
35507
|
-
|
|
35508
|
-
|
|
35509
|
-
const result = new Array();
|
|
35510
|
-
for (const hunk of patch.hunks) {
|
|
35511
|
-
result.push(chalk6.magenta(`@@ -${hunk.oldStart},${hunk.oldLines} +${hunk.newStart},${hunk.newLines} @@`));
|
|
35512
|
-
const baseIndent = _findIndent(hunk.lines);
|
|
35513
|
-
for (const line of hunk.lines) {
|
|
35514
|
-
if (line === "\") {
|
|
35515
|
-
continue;
|
|
35516
|
-
}
|
|
35517
|
-
const marker = line.charAt(0);
|
|
35518
|
-
const text = line.slice(1 + baseIndent);
|
|
35519
|
-
switch (marker) {
|
|
35520
|
-
case " ":
|
|
35521
|
-
result.push(`${CONTEXT} ${text}`);
|
|
35522
|
-
break;
|
|
35523
|
-
case "+":
|
|
35524
|
-
result.push(chalk6.bold(`${ADDITION} ${chalk6.green(text)}`));
|
|
35525
|
-
break;
|
|
35526
|
-
case "-":
|
|
35527
|
-
result.push(chalk6.bold(`${REMOVAL} ${chalk6.red(text)}`));
|
|
35528
|
-
break;
|
|
35529
|
-
default:
|
|
35530
|
-
throw new Error(`Unexpected diff marker: ${marker} (full line: ${line})`);
|
|
35531
|
-
}
|
|
35532
|
-
}
|
|
35533
|
-
}
|
|
35534
|
-
return result;
|
|
35535
|
-
function _findIndent(lines) {
|
|
35536
|
-
let indent = Number.MAX_SAFE_INTEGER;
|
|
35537
|
-
for (const line of lines) {
|
|
35538
|
-
for (let i = 1; i < line.length; i++) {
|
|
35539
|
-
if (line.charAt(i) !== " ") {
|
|
35540
|
-
indent = indent > i - 1 ? i - 1 : indent;
|
|
35541
|
-
break;
|
|
35542
|
-
}
|
|
35575
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/lib/format.js
|
|
35576
|
+
var require_format = __commonJS({
|
|
35577
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/lib/format.js"(exports2) {
|
|
35578
|
+
"use strict";
|
|
35579
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
35580
|
+
exports2.Formatter = void 0;
|
|
35581
|
+
exports2.formatDifferences = formatDifferences2;
|
|
35582
|
+
exports2.formatSecurityChanges = formatSecurityChanges;
|
|
35583
|
+
var util_1 = require("util");
|
|
35584
|
+
var chalk3 = require_source();
|
|
35585
|
+
var util_2 = require_util2();
|
|
35586
|
+
var diff_template_1 = require_diff_template();
|
|
35587
|
+
var format_table_1 = require_format_table();
|
|
35588
|
+
var PATH_METADATA_KEY2 = "aws:cdk:path";
|
|
35589
|
+
var { structuredPatch } = require_lib10();
|
|
35590
|
+
function formatDifferences2(stream, templateDiff, logicalToPathMap = {}, context = 3) {
|
|
35591
|
+
const formatter = new Formatter(stream, logicalToPathMap, templateDiff, context);
|
|
35592
|
+
if (templateDiff.awsTemplateFormatVersion || templateDiff.transform || templateDiff.description) {
|
|
35593
|
+
formatter.printSectionHeader("Template");
|
|
35594
|
+
formatter.formatDifference("AWSTemplateFormatVersion", "AWSTemplateFormatVersion", templateDiff.awsTemplateFormatVersion);
|
|
35595
|
+
formatter.formatDifference("Transform", "Transform", templateDiff.transform);
|
|
35596
|
+
formatter.formatDifference("Description", "Description", templateDiff.description);
|
|
35597
|
+
formatter.printSectionFooter();
|
|
35598
|
+
}
|
|
35599
|
+
formatSecurityChangesWithBanner(formatter, templateDiff);
|
|
35600
|
+
formatter.formatSection("Parameters", "Parameter", templateDiff.parameters);
|
|
35601
|
+
formatter.formatSection("Metadata", "Metadata", templateDiff.metadata);
|
|
35602
|
+
formatter.formatSection("Mappings", "Mapping", templateDiff.mappings);
|
|
35603
|
+
formatter.formatSection("Conditions", "Condition", templateDiff.conditions);
|
|
35604
|
+
formatter.formatSection("Resources", "Resource", templateDiff.resources, formatter.formatResourceDifference.bind(formatter));
|
|
35605
|
+
formatter.formatSection("Outputs", "Output", templateDiff.outputs);
|
|
35606
|
+
formatter.formatSection("Other Changes", "Unknown", templateDiff.unknown);
|
|
35607
|
+
}
|
|
35608
|
+
function formatSecurityChanges(stream, templateDiff, logicalToPathMap = {}, context) {
|
|
35609
|
+
const formatter = new Formatter(stream, logicalToPathMap, templateDiff, context);
|
|
35610
|
+
formatSecurityChangesWithBanner(formatter, templateDiff);
|
|
35611
|
+
}
|
|
35612
|
+
function formatSecurityChangesWithBanner(formatter, templateDiff) {
|
|
35613
|
+
if (!templateDiff.iamChanges.hasChanges && !templateDiff.securityGroupChanges.hasChanges) {
|
|
35614
|
+
return;
|
|
35543
35615
|
}
|
|
35544
|
-
|
|
35545
|
-
|
|
35546
|
-
|
|
35547
|
-
|
|
35548
|
-
|
|
35549
|
-
var
|
|
35550
|
-
|
|
35551
|
-
|
|
35552
|
-
|
|
35553
|
-
|
|
35554
|
-
|
|
35555
|
-
init_diff_template();
|
|
35556
|
-
init_format_table();
|
|
35557
|
-
PATH_METADATA_KEY2 = "aws:cdk:path";
|
|
35558
|
-
({ structuredPatch } = require_lib10());
|
|
35559
|
-
ADDITION = chalk6.green("[+]");
|
|
35560
|
-
CONTEXT = chalk6.grey("[ ]");
|
|
35561
|
-
UPDATE = chalk6.yellow("[~]");
|
|
35562
|
-
REMOVAL = chalk6.red("[-]");
|
|
35563
|
-
IMPORT = chalk6.blue("[\u2190]");
|
|
35564
|
-
Formatter = class {
|
|
35616
|
+
formatter.formatIamChanges(templateDiff.iamChanges);
|
|
35617
|
+
formatter.formatSecurityGroupChanges(templateDiff.securityGroupChanges);
|
|
35618
|
+
formatter.warning("(NOTE: There may be security-related changes not in this list. See https://github.com/aws/aws-cdk/issues/1299)");
|
|
35619
|
+
formatter.printSectionFooter();
|
|
35620
|
+
}
|
|
35621
|
+
var ADDITION = chalk3.green("[+]");
|
|
35622
|
+
var CONTEXT = chalk3.grey("[ ]");
|
|
35623
|
+
var UPDATE = chalk3.yellow("[~]");
|
|
35624
|
+
var REMOVAL = chalk3.red("[-]");
|
|
35625
|
+
var IMPORT = chalk3.blue("[\u2190]");
|
|
35626
|
+
var Formatter = class {
|
|
35565
35627
|
constructor(stream, logicalToPathMap, diff, context = 3) {
|
|
35566
35628
|
this.stream = stream;
|
|
35567
35629
|
this.logicalToPathMap = logicalToPathMap;
|
|
@@ -35571,10 +35633,10 @@ var init_format = __esm({
|
|
|
35571
35633
|
}
|
|
35572
35634
|
}
|
|
35573
35635
|
print(fmt, ...args) {
|
|
35574
|
-
this.stream.write(
|
|
35636
|
+
this.stream.write(chalk3.white((0, util_1.format)(fmt, ...args)) + "\n");
|
|
35575
35637
|
}
|
|
35576
35638
|
warning(fmt, ...args) {
|
|
35577
|
-
this.stream.write(
|
|
35639
|
+
this.stream.write(chalk3.yellow((0, util_1.format)(fmt, ...args)) + "\n");
|
|
35578
35640
|
}
|
|
35579
35641
|
formatSection(title, entryType, collection, formatter = this.formatDifference.bind(this)) {
|
|
35580
35642
|
if (collection.differenceCount === 0) {
|
|
@@ -35585,7 +35647,7 @@ var init_format = __esm({
|
|
|
35585
35647
|
this.printSectionFooter();
|
|
35586
35648
|
}
|
|
35587
35649
|
printSectionHeader(title) {
|
|
35588
|
-
this.print(
|
|
35650
|
+
this.print(chalk3.underline(chalk3.bold(title)));
|
|
35589
35651
|
}
|
|
35590
35652
|
printSectionFooter() {
|
|
35591
35653
|
this.print("");
|
|
@@ -35601,8 +35663,8 @@ var init_format = __esm({
|
|
|
35601
35663
|
return;
|
|
35602
35664
|
}
|
|
35603
35665
|
let value;
|
|
35604
|
-
const oldValue = this.formatValue(diff.oldValue,
|
|
35605
|
-
const newValue = this.formatValue(diff.newValue,
|
|
35666
|
+
const oldValue = this.formatValue(diff.oldValue, chalk3.red);
|
|
35667
|
+
const newValue = this.formatValue(diff.newValue, chalk3.green);
|
|
35606
35668
|
if (diff.isAddition) {
|
|
35607
35669
|
value = newValue;
|
|
35608
35670
|
} else if (diff.isUpdate) {
|
|
@@ -35610,7 +35672,7 @@ var init_format = __esm({
|
|
|
35610
35672
|
} else if (diff.isRemoval) {
|
|
35611
35673
|
value = oldValue;
|
|
35612
35674
|
}
|
|
35613
|
-
this.print(`${this.formatPrefix(diff)} ${
|
|
35675
|
+
this.print(`${this.formatPrefix(diff)} ${chalk3.cyan(type)} ${this.formatLogicalId(logicalId)}: ${value}`);
|
|
35614
35676
|
}
|
|
35615
35677
|
/**
|
|
35616
35678
|
* Print a resource difference for a given logical ID.
|
|
@@ -35623,7 +35685,7 @@ var init_format = __esm({
|
|
|
35623
35685
|
return;
|
|
35624
35686
|
}
|
|
35625
35687
|
const resourceType = diff.isRemoval ? diff.oldResourceType : diff.newResourceType;
|
|
35626
|
-
this.print(`${this.formatResourcePrefix(diff)} ${this.formatValue(resourceType,
|
|
35688
|
+
this.print(`${this.formatResourcePrefix(diff)} ${this.formatValue(resourceType, chalk3.cyan)} ${this.formatLogicalId(logicalId)} ${this.formatImpact(diff.changeImpact)}`.trimEnd());
|
|
35627
35689
|
if (diff.isUpdate) {
|
|
35628
35690
|
const differenceCount = diff.differenceCount;
|
|
35629
35691
|
let processedCount = 0;
|
|
@@ -35649,7 +35711,7 @@ var init_format = __esm({
|
|
|
35649
35711
|
if (diff.isRemoval) {
|
|
35650
35712
|
return REMOVAL;
|
|
35651
35713
|
}
|
|
35652
|
-
return
|
|
35714
|
+
return chalk3.white("[?]");
|
|
35653
35715
|
}
|
|
35654
35716
|
/**
|
|
35655
35717
|
* @param value the value to be formatted.
|
|
@@ -35672,19 +35734,19 @@ var init_format = __esm({
|
|
|
35672
35734
|
*/
|
|
35673
35735
|
formatImpact(impact) {
|
|
35674
35736
|
switch (impact) {
|
|
35675
|
-
case
|
|
35676
|
-
return
|
|
35677
|
-
case
|
|
35678
|
-
return
|
|
35679
|
-
case
|
|
35680
|
-
return
|
|
35681
|
-
case
|
|
35682
|
-
return
|
|
35683
|
-
case
|
|
35684
|
-
return
|
|
35685
|
-
case
|
|
35686
|
-
case
|
|
35687
|
-
case
|
|
35737
|
+
case diff_template_1.ResourceImpact.MAY_REPLACE:
|
|
35738
|
+
return chalk3.italic(chalk3.yellow("may be replaced"));
|
|
35739
|
+
case diff_template_1.ResourceImpact.WILL_REPLACE:
|
|
35740
|
+
return chalk3.italic(chalk3.bold(chalk3.red("replace")));
|
|
35741
|
+
case diff_template_1.ResourceImpact.WILL_DESTROY:
|
|
35742
|
+
return chalk3.italic(chalk3.bold(chalk3.red("destroy")));
|
|
35743
|
+
case diff_template_1.ResourceImpact.WILL_ORPHAN:
|
|
35744
|
+
return chalk3.italic(chalk3.yellow("orphan"));
|
|
35745
|
+
case diff_template_1.ResourceImpact.WILL_IMPORT:
|
|
35746
|
+
return chalk3.italic(chalk3.blue("import"));
|
|
35747
|
+
case diff_template_1.ResourceImpact.WILL_UPDATE:
|
|
35748
|
+
case diff_template_1.ResourceImpact.WILL_CREATE:
|
|
35749
|
+
case diff_template_1.ResourceImpact.NO_CHANGE:
|
|
35688
35750
|
return "";
|
|
35689
35751
|
}
|
|
35690
35752
|
}
|
|
@@ -35696,10 +35758,10 @@ var init_format = __esm({
|
|
|
35696
35758
|
*/
|
|
35697
35759
|
formatTreeDiff(name, diff, last) {
|
|
35698
35760
|
let additionalInfo = "";
|
|
35699
|
-
if (isPropertyDifference(diff)) {
|
|
35700
|
-
if (diff.changeImpact ===
|
|
35761
|
+
if ((0, diff_template_1.isPropertyDifference)(diff)) {
|
|
35762
|
+
if (diff.changeImpact === diff_template_1.ResourceImpact.MAY_REPLACE) {
|
|
35701
35763
|
additionalInfo = " (may cause replacement)";
|
|
35702
|
-
} else if (diff.changeImpact ===
|
|
35764
|
+
} else if (diff.changeImpact === diff_template_1.ResourceImpact.WILL_REPLACE) {
|
|
35703
35765
|
additionalInfo = " (requires replacement)";
|
|
35704
35766
|
}
|
|
35705
35767
|
}
|
|
@@ -35725,31 +35787,31 @@ var init_format = __esm({
|
|
|
35725
35787
|
this.print("%s %s %s", linePrefix, i === 0 ? "\u2514\u2500" : " ", diff[i]);
|
|
35726
35788
|
}
|
|
35727
35789
|
} else {
|
|
35728
|
-
this.print("%s \u251C\u2500 %s %s", linePrefix, REMOVAL, this.formatValue(oldObject,
|
|
35729
|
-
this.print("%s \u2514\u2500 %s %s", linePrefix, ADDITION, this.formatValue(newObject,
|
|
35790
|
+
this.print("%s \u251C\u2500 %s %s", linePrefix, REMOVAL, this.formatValue(oldObject, chalk3.red));
|
|
35791
|
+
this.print("%s \u2514\u2500 %s %s", linePrefix, ADDITION, this.formatValue(newObject, chalk3.green));
|
|
35730
35792
|
}
|
|
35731
35793
|
} else if (oldObject !== void 0) {
|
|
35732
|
-
this.print("%s \u2514\u2500 %s", linePrefix, this.formatValue(oldObject,
|
|
35794
|
+
this.print("%s \u2514\u2500 %s", linePrefix, this.formatValue(oldObject, chalk3.red));
|
|
35733
35795
|
} else {
|
|
35734
|
-
this.print("%s \u2514\u2500 %s", linePrefix, this.formatValue(newObject,
|
|
35796
|
+
this.print("%s \u2514\u2500 %s", linePrefix, this.formatValue(newObject, chalk3.green));
|
|
35735
35797
|
}
|
|
35736
35798
|
return;
|
|
35737
35799
|
}
|
|
35738
35800
|
const keySet = new Set(Object.keys(oldObject));
|
|
35739
35801
|
Object.keys(newObject).forEach((k) => keySet.add(k));
|
|
35740
|
-
const keys = new Array(...keySet).filter((k) => !deepEqual(oldObject[k], newObject[k])).sort();
|
|
35802
|
+
const keys = new Array(...keySet).filter((k) => !(0, util_2.deepEqual)(oldObject[k], newObject[k])).sort();
|
|
35741
35803
|
const lastKey = keys[keys.length - 1];
|
|
35742
35804
|
for (const key of keys) {
|
|
35743
35805
|
const oldValue = oldObject[key];
|
|
35744
35806
|
const newValue = newObject[key];
|
|
35745
35807
|
const treePrefix = key === lastKey ? "\u2514" : "\u251C";
|
|
35746
35808
|
if (oldValue !== void 0 && newValue !== void 0) {
|
|
35747
|
-
this.print("%s %s\u2500 %s %s:", linePrefix, treePrefix, this.changeTag(oldValue, newValue),
|
|
35809
|
+
this.print("%s %s\u2500 %s %s:", linePrefix, treePrefix, this.changeTag(oldValue, newValue), chalk3.blue(`.${key}`));
|
|
35748
35810
|
this.formatObjectDiff(oldValue, newValue, `${linePrefix} ${key === lastKey ? " " : "\u2502"}`);
|
|
35749
35811
|
} else if (oldValue !== void 0) {
|
|
35750
|
-
this.print("%s %s\u2500 %s Removed: %s", linePrefix, treePrefix, REMOVAL,
|
|
35812
|
+
this.print("%s %s\u2500 %s Removed: %s", linePrefix, treePrefix, REMOVAL, chalk3.blue(`.${key}`));
|
|
35751
35813
|
} else {
|
|
35752
|
-
this.print("%s %s\u2500 %s Added: %s", linePrefix, treePrefix, ADDITION,
|
|
35814
|
+
this.print("%s %s\u2500 %s Added: %s", linePrefix, treePrefix, ADDITION, chalk3.blue(`.${key}`));
|
|
35753
35815
|
}
|
|
35754
35816
|
}
|
|
35755
35817
|
}
|
|
@@ -35794,7 +35856,7 @@ var init_format = __esm({
|
|
|
35794
35856
|
formatLogicalId(logicalId) {
|
|
35795
35857
|
const normalized = this.normalizedLogicalIdPath(logicalId);
|
|
35796
35858
|
if (normalized) {
|
|
35797
|
-
return `${normalized} ${
|
|
35859
|
+
return `${normalized} ${chalk3.gray(logicalId)}`;
|
|
35798
35860
|
}
|
|
35799
35861
|
return logicalId;
|
|
35800
35862
|
}
|
|
@@ -35825,22 +35887,22 @@ var init_format = __esm({
|
|
|
35825
35887
|
}
|
|
35826
35888
|
if (changes.statements.hasChanges) {
|
|
35827
35889
|
this.printSectionHeader("IAM Statement Changes");
|
|
35828
|
-
this.print(formatTable(this.deepSubstituteBracedLogicalIds(changes.summarizeStatements()), this.stream.columns));
|
|
35890
|
+
this.print((0, format_table_1.formatTable)(this.deepSubstituteBracedLogicalIds(changes.summarizeStatements()), this.stream.columns));
|
|
35829
35891
|
}
|
|
35830
35892
|
if (changes.managedPolicies.hasChanges) {
|
|
35831
35893
|
this.printSectionHeader("IAM Policy Changes");
|
|
35832
|
-
this.print(formatTable(this.deepSubstituteBracedLogicalIds(changes.summarizeManagedPolicies()), this.stream.columns));
|
|
35894
|
+
this.print((0, format_table_1.formatTable)(this.deepSubstituteBracedLogicalIds(changes.summarizeManagedPolicies()), this.stream.columns));
|
|
35833
35895
|
}
|
|
35834
35896
|
if (changes.ssoPermissionSets.hasChanges || changes.ssoInstanceACAConfigs.hasChanges || changes.ssoAssignments.hasChanges) {
|
|
35835
35897
|
this.printSectionHeader("IAM Identity Center Changes");
|
|
35836
35898
|
if (changes.ssoPermissionSets.hasChanges) {
|
|
35837
|
-
this.print(formatTable(this.deepSubstituteBracedLogicalIds(changes.summarizeSsoPermissionSets()), this.stream.columns));
|
|
35899
|
+
this.print((0, format_table_1.formatTable)(this.deepSubstituteBracedLogicalIds(changes.summarizeSsoPermissionSets()), this.stream.columns));
|
|
35838
35900
|
}
|
|
35839
35901
|
if (changes.ssoInstanceACAConfigs.hasChanges) {
|
|
35840
|
-
this.print(formatTable(this.deepSubstituteBracedLogicalIds(changes.summarizeSsoInstanceACAConfigs()), this.stream.columns));
|
|
35902
|
+
this.print((0, format_table_1.formatTable)(this.deepSubstituteBracedLogicalIds(changes.summarizeSsoInstanceACAConfigs()), this.stream.columns));
|
|
35841
35903
|
}
|
|
35842
35904
|
if (changes.ssoAssignments.hasChanges) {
|
|
35843
|
-
this.print(formatTable(this.deepSubstituteBracedLogicalIds(changes.summarizeSsoAssignments()), this.stream.columns));
|
|
35905
|
+
this.print((0, format_table_1.formatTable)(this.deepSubstituteBracedLogicalIds(changes.summarizeSsoAssignments()), this.stream.columns));
|
|
35844
35906
|
}
|
|
35845
35907
|
}
|
|
35846
35908
|
}
|
|
@@ -35849,7 +35911,7 @@ var init_format = __esm({
|
|
|
35849
35911
|
return;
|
|
35850
35912
|
}
|
|
35851
35913
|
this.printSectionHeader("Security Group Changes");
|
|
35852
|
-
this.print(formatTable(this.deepSubstituteBracedLogicalIds(changes.summarize()), this.stream.columns));
|
|
35914
|
+
this.print((0, format_table_1.formatTable)(this.deepSubstituteBracedLogicalIds(changes.summarize()), this.stream.columns));
|
|
35853
35915
|
}
|
|
35854
35916
|
deepSubstituteBracedLogicalIds(rows) {
|
|
35855
35917
|
return rows.map((row) => row.map(this.substituteBracedLogicalIds.bind(this)));
|
|
@@ -35863,12 +35925,54 @@ var init_format = __esm({
|
|
|
35863
35925
|
});
|
|
35864
35926
|
}
|
|
35865
35927
|
};
|
|
35928
|
+
exports2.Formatter = Formatter;
|
|
35929
|
+
function _diffStrings(oldStr, newStr, context) {
|
|
35930
|
+
const patch = structuredPatch(null, null, oldStr, newStr, null, null, { context });
|
|
35931
|
+
const result = new Array();
|
|
35932
|
+
for (const hunk of patch.hunks) {
|
|
35933
|
+
result.push(chalk3.magenta(`@@ -${hunk.oldStart},${hunk.oldLines} +${hunk.newStart},${hunk.newLines} @@`));
|
|
35934
|
+
const baseIndent = _findIndent(hunk.lines);
|
|
35935
|
+
for (const line of hunk.lines) {
|
|
35936
|
+
if (line === "\") {
|
|
35937
|
+
continue;
|
|
35938
|
+
}
|
|
35939
|
+
const marker = line.charAt(0);
|
|
35940
|
+
const text = line.slice(1 + baseIndent);
|
|
35941
|
+
switch (marker) {
|
|
35942
|
+
case " ":
|
|
35943
|
+
result.push(`${CONTEXT} ${text}`);
|
|
35944
|
+
break;
|
|
35945
|
+
case "+":
|
|
35946
|
+
result.push(chalk3.bold(`${ADDITION} ${chalk3.green(text)}`));
|
|
35947
|
+
break;
|
|
35948
|
+
case "-":
|
|
35949
|
+
result.push(chalk3.bold(`${REMOVAL} ${chalk3.red(text)}`));
|
|
35950
|
+
break;
|
|
35951
|
+
default:
|
|
35952
|
+
throw new Error(`Unexpected diff marker: ${marker} (full line: ${line})`);
|
|
35953
|
+
}
|
|
35954
|
+
}
|
|
35955
|
+
}
|
|
35956
|
+
return result;
|
|
35957
|
+
function _findIndent(lines) {
|
|
35958
|
+
let indent = Number.MAX_SAFE_INTEGER;
|
|
35959
|
+
for (const line of lines) {
|
|
35960
|
+
for (let i = 1; i < line.length; i++) {
|
|
35961
|
+
if (line.charAt(i) !== " ") {
|
|
35962
|
+
indent = indent > i - 1 ? i - 1 : indent;
|
|
35963
|
+
break;
|
|
35964
|
+
}
|
|
35965
|
+
}
|
|
35966
|
+
}
|
|
35967
|
+
return indent;
|
|
35968
|
+
}
|
|
35969
|
+
}
|
|
35866
35970
|
}
|
|
35867
35971
|
});
|
|
35868
35972
|
|
|
35869
|
-
//
|
|
35973
|
+
// ../../../node_modules/@aws-cdk/cloudformation-diff/lib/index.js
|
|
35870
35974
|
var require_lib11 = __commonJS({
|
|
35871
|
-
"
|
|
35975
|
+
"../../../node_modules/@aws-cdk/cloudformation-diff/lib/index.js"(exports2) {
|
|
35872
35976
|
"use strict";
|
|
35873
35977
|
var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
35874
35978
|
if (k2 === void 0) k2 = k;
|
|
@@ -35888,10 +35992,10 @@ var require_lib11 = __commonJS({
|
|
|
35888
35992
|
};
|
|
35889
35993
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
35890
35994
|
exports2.mangleLikeCloudFormation = exports2.deepEqual = void 0;
|
|
35891
|
-
__exportStar2((
|
|
35892
|
-
__exportStar2((
|
|
35893
|
-
__exportStar2((
|
|
35894
|
-
var util_1 = (
|
|
35995
|
+
__exportStar2(require_diff_template(), exports2);
|
|
35996
|
+
__exportStar2(require_format(), exports2);
|
|
35997
|
+
__exportStar2(require_format_table(), exports2);
|
|
35998
|
+
var util_1 = require_util2();
|
|
35895
35999
|
Object.defineProperty(exports2, "deepEqual", { enumerable: true, get: function() {
|
|
35896
36000
|
return util_1.deepEqual;
|
|
35897
36001
|
} });
|