cdk-real-drift 0.12.46 → 0.12.47
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 +10 -3
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1359,8 +1359,14 @@ const CONTAINS_DYNAMIC_REFERENCE_RE = /\{\{resolve:(ssm|ssm-secure|secretsmanage
|
|
|
1359
1359
|
function containsDynamicReference(v) {
|
|
1360
1360
|
return CONTAINS_DYNAMIC_REFERENCE_RE.test(v);
|
|
1361
1361
|
}
|
|
1362
|
+
function containsDynamicReferenceDeep(v) {
|
|
1363
|
+
if (typeof v === "string") return containsDynamicReference(v);
|
|
1364
|
+
if (Array.isArray(v)) return v.some(containsDynamicReferenceDeep);
|
|
1365
|
+
if (v !== null && typeof v === "object") return Object.values(v).some(containsDynamicReferenceDeep);
|
|
1366
|
+
return false;
|
|
1367
|
+
}
|
|
1362
1368
|
function checkResolvedDynamicRef(r) {
|
|
1363
|
-
return
|
|
1369
|
+
return containsDynamicReferenceDeep(r) ? UNRESOLVED : r;
|
|
1364
1370
|
}
|
|
1365
1371
|
function isScalarInterpolant(v) {
|
|
1366
1372
|
const t = typeof v;
|
|
@@ -1406,11 +1412,12 @@ function resolve$1(node, ctx, inCondition = false) {
|
|
|
1406
1412
|
const [idxRaw, list] = v;
|
|
1407
1413
|
const arr = resolve$1(list, ctx);
|
|
1408
1414
|
if (!Array.isArray(arr)) return UNRESOLVED;
|
|
1415
|
+
const compacted = arr.filter((x) => x !== NOVALUE);
|
|
1409
1416
|
const idx = resolve$1(idxRaw, ctx);
|
|
1410
1417
|
if (idx === UNRESOLVED) return UNRESOLVED;
|
|
1411
1418
|
const i = Number(idx);
|
|
1412
|
-
if (!Number.isInteger(i) || i < 0 || i >=
|
|
1413
|
-
const sel =
|
|
1419
|
+
if (!Number.isInteger(i) || i < 0 || i >= compacted.length) return UNRESOLVED;
|
|
1420
|
+
const sel = compacted[i];
|
|
1414
1421
|
return sel === UNRESOLVED ? UNRESOLVED : checkResolvedDynamicRef(sel);
|
|
1415
1422
|
}
|
|
1416
1423
|
case "Fn::FindInMap": {
|