cdk-real-drift 0.2.48 → 0.2.49
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 +14 -3
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2888,9 +2888,13 @@ function isEqualUnorderedScalarSet(a, b) {
|
|
|
2888
2888
|
if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;
|
|
2889
2889
|
const scalar = (v) => typeof v === "string" || typeof v === "number" || typeof v === "boolean";
|
|
2890
2890
|
if (!a.every(scalar) || !b.every(scalar)) return false;
|
|
2891
|
-
const
|
|
2892
|
-
|
|
2893
|
-
|
|
2891
|
+
const key = (v) => {
|
|
2892
|
+
if (typeof v === "number") return `num:${v}`;
|
|
2893
|
+
if (typeof v === "string" && DECIMAL_RE.test(v.trim())) return `num:${Number(v)}`;
|
|
2894
|
+
return `${typeof v}:${String(v)}`;
|
|
2895
|
+
};
|
|
2896
|
+
const sa = a.map(key).sort();
|
|
2897
|
+
const sb = b.map(key).sort();
|
|
2894
2898
|
return sa.every((v, i) => v === sb[i]);
|
|
2895
2899
|
}
|
|
2896
2900
|
const READGAP_COLLECTION_PATHS = {
|
|
@@ -3008,6 +3012,12 @@ function isStringlyEqualScalar(a, b) {
|
|
|
3008
3012
|
if (prim(b) && typeof a === "string") return eq(b, a);
|
|
3009
3013
|
return false;
|
|
3010
3014
|
}
|
|
3015
|
+
function isNumericStringEqualScalar(a, b) {
|
|
3016
|
+
const num = (v) => typeof v === "number" ? v : typeof v === "string" && DECIMAL_RE.test(v.trim()) ? Number(v) : void 0;
|
|
3017
|
+
const na = num(a);
|
|
3018
|
+
const nb = num(b);
|
|
3019
|
+
return na !== void 0 && nb !== void 0 && na === nb;
|
|
3020
|
+
}
|
|
3011
3021
|
function isStringlyEqualScalarArray(a, b) {
|
|
3012
3022
|
if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;
|
|
3013
3023
|
const scalar = (v) => typeof v === "string" || typeof v === "number" || typeof v === "boolean";
|
|
@@ -4030,6 +4040,7 @@ function isPolicySubsetOf(sub, sup) {
|
|
|
4030
4040
|
}
|
|
4031
4041
|
function matchesKnownDefault(live, def) {
|
|
4032
4042
|
if (deepEqual(live, def)) return true;
|
|
4043
|
+
if (!isNestedObject(live) && !isNestedObject(def)) return isNumericStringEqualScalar(live, def);
|
|
4033
4044
|
if (!isNestedObject(live) || !isNestedObject(def)) return false;
|
|
4034
4045
|
return Object.entries(live).every(([k, v]) => k in def ? matchesKnownDefault(v, def[k]) : isTrivialEmpty(v));
|
|
4035
4046
|
}
|