cdk-real-drift 0.12.30 → 0.12.31
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/dist/cli.js +9 -6
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -5591,7 +5591,7 @@ function matchesKnownDefault(live, def) {
|
|
|
5591
5591
|
if (!isNestedObject(live) || !isNestedObject(def)) return false;
|
|
5592
5592
|
return Object.entries(live).every(([k, v]) => k in def ? matchesKnownDefault(v, def[k]) : isTrivialEmpty(v));
|
|
5593
5593
|
}
|
|
5594
|
-
function collectNestedUndeclared(declaredVal, liveVal, path, emit, nestedArrayIdentity) {
|
|
5594
|
+
function collectNestedUndeclared(declaredVal, liveVal, path, emit, nestedArrayIdentity, declaredAbsent = false) {
|
|
5595
5595
|
if (Array.isArray(declaredVal) && Array.isArray(liveVal)) {
|
|
5596
5596
|
if (declaredVal.length === 0 || liveVal.length === 0) return;
|
|
5597
5597
|
const regId = nestedArrayIdentity?.[path.replace(/\[[^\]]*\]/g, "")];
|
|
@@ -5635,7 +5635,7 @@ function collectNestedUndeclared(declaredVal, liveVal, path, emit, nestedArrayId
|
|
|
5635
5635
|
}
|
|
5636
5636
|
if (!isNestedObject(declaredVal) || !isNestedObject(liveVal)) return;
|
|
5637
5637
|
if (Object.keys(liveVal).some((k) => PATH_UNSAFE_KEY.test(k))) {
|
|
5638
|
-
if (
|
|
5638
|
+
if (declaredAbsent) emit(path, liveVal);
|
|
5639
5639
|
return;
|
|
5640
5640
|
}
|
|
5641
5641
|
for (const [k, val] of Object.entries(liveVal)) {
|
|
@@ -6685,7 +6685,7 @@ function classifyResource(resource, liveRaw, schema, opts = {}) {
|
|
|
6685
6685
|
}) ?? false);
|
|
6686
6686
|
if (!offStateIsMeaningful && (isTrivialEmpty(v) || isSelfEchoTrivialEmpty(v, physicalId) || isEmptyPolicyShell(v))) continue;
|
|
6687
6687
|
if (isNestedObject(v) && DESCEND_UNDECLARED_OBJECT_PATHS[resourceType]?.has(k)) {
|
|
6688
|
-
collectNestedUndeclared({}, v, k, emitNested, NESTED_ARRAY_IDENTITY[resourceType]);
|
|
6688
|
+
collectNestedUndeclared({}, v, k, emitNested, NESTED_ARRAY_IDENTITY[resourceType], true);
|
|
6689
6689
|
continue;
|
|
6690
6690
|
}
|
|
6691
6691
|
const subsetSpecU = IDENTITY_KEYED_SUBSET_ARRAYS[resourceType]?.[k];
|
|
@@ -6789,6 +6789,8 @@ function unqualifiedFunctionRef(ref) {
|
|
|
6789
6789
|
if (seg.length >= 8 && seg[5] === "function") return seg.slice(0, 7).join(":");
|
|
6790
6790
|
return ref;
|
|
6791
6791
|
}
|
|
6792
|
+
const partial = ref.match(/^\d{12}:function:([^:]+)/);
|
|
6793
|
+
if (partial) return partial[1];
|
|
6792
6794
|
const i = ref.indexOf(":");
|
|
6793
6795
|
return i === -1 ? ref : ref.slice(0, i);
|
|
6794
6796
|
}
|
|
@@ -7509,7 +7511,7 @@ async function enumerateLambdaFunctionChildren(ctx) {
|
|
|
7509
7511
|
for (const r of desired.resources) {
|
|
7510
7512
|
if (r.resourceType !== "AWS::Lambda::Url") continue;
|
|
7511
7513
|
const target = r.declared.TargetFunctionArn;
|
|
7512
|
-
if (
|
|
7514
|
+
if (lambdaFunctionRefMatches(target, functionName, fnArn)) {
|
|
7513
7515
|
if (fnArn !== void 0) declaredUrlArns.push(fnArn);
|
|
7514
7516
|
if (r.physicalId) declaredUrlArns.push(r.physicalId);
|
|
7515
7517
|
} else if (r.physicalId) declaredUrlArns.push(r.physicalId);
|
|
@@ -7517,7 +7519,7 @@ async function enumerateLambdaFunctionChildren(ctx) {
|
|
|
7517
7519
|
const declaredAliasArns = [];
|
|
7518
7520
|
for (const r of desired.resources) {
|
|
7519
7521
|
if (r.resourceType !== "AWS::Lambda::Alias" || !r.physicalId) continue;
|
|
7520
|
-
if (
|
|
7522
|
+
if (lambdaFunctionRefMatches(r.declared.FunctionName, functionName, fnArn)) declaredAliasArns.push(r.physicalId);
|
|
7521
7523
|
}
|
|
7522
7524
|
const declaredVersionArns = [];
|
|
7523
7525
|
for (const r of desired.resources) {
|
|
@@ -11698,7 +11700,8 @@ function buildSiblingListenerPorts(desired) {
|
|
|
11698
11700
|
const ranges = r.declared?.PortRanges;
|
|
11699
11701
|
const first = Array.isArray(ranges) ? ranges[0] : void 0;
|
|
11700
11702
|
const from = first && typeof first === "object" ? first.FromPort : void 0;
|
|
11701
|
-
|
|
11703
|
+
const port = typeof from === "number" ? from : typeof from === "string" && /^\d+$/.test(from) ? Number(from) : void 0;
|
|
11704
|
+
if (port !== void 0) map[r.physicalId] = port;
|
|
11702
11705
|
}
|
|
11703
11706
|
return map;
|
|
11704
11707
|
}
|