cdk-real-drift 0.12.3 → 0.12.4
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 +5 -1
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1750,6 +1750,10 @@ const TAG_PROPERTY_NAMES = new Set([
|
|
|
1750
1750
|
function stripCcApiAwsManagedFields(awsProps) {
|
|
1751
1751
|
return stripWalk(awsProps, false);
|
|
1752
1752
|
}
|
|
1753
|
+
const MANAGED_TIMESTAMP_NAME = /^(creation|created|create|lastmodified|lastupdated|lastupdate|modification|modified|updated|update)(date|time|timestamp|at)$/;
|
|
1754
|
+
function isManagedTimestampName(key) {
|
|
1755
|
+
return MANAGED_TIMESTAMP_NAME.test(key.toLowerCase().replace(/[^a-z0-9]/g, ""));
|
|
1756
|
+
}
|
|
1753
1757
|
function stripWalk(value, freeForm) {
|
|
1754
1758
|
if (value === null || value === void 0) return value;
|
|
1755
1759
|
if (Array.isArray(value)) {
|
|
@@ -1759,7 +1763,7 @@ function stripWalk(value, freeForm) {
|
|
|
1759
1763
|
if (typeof value === "object") {
|
|
1760
1764
|
const out = {};
|
|
1761
1765
|
for (const [k, child] of Object.entries(value)) {
|
|
1762
|
-
if (!freeForm && ALWAYS_STRIPPED.has(k)) continue;
|
|
1766
|
+
if (!freeForm && (ALWAYS_STRIPPED.has(k) || isManagedTimestampName(k))) continue;
|
|
1763
1767
|
out[k] = stripWalk(child, freeForm || FREE_FORM_MAP_PARENTS.has(k));
|
|
1764
1768
|
}
|
|
1765
1769
|
return out;
|