@go-to-k/cdkd 0.49.0 → 0.50.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/dist/cli.js +13 -7
- package/dist/cli.js.map +2 -2
- package/dist/go-to-k-cdkd-0.50.0.tgz +0 -0
- package/package.json +1 -1
- package/dist/go-to-k-cdkd-0.49.0.tgz +0 -0
package/dist/cli.js
CHANGED
|
@@ -38666,10 +38666,11 @@ init_aws_clients();
|
|
|
38666
38666
|
function calculateResourceDrift(stateProperties, awsProperties, options) {
|
|
38667
38667
|
const drifts = [];
|
|
38668
38668
|
const ignore = options?.ignorePaths ?? [];
|
|
38669
|
+
const union = options?.unionWalkObjects ?? false;
|
|
38669
38670
|
for (const key of Object.keys(stateProperties)) {
|
|
38670
38671
|
if (isIgnoredPath(key, ignore))
|
|
38671
38672
|
continue;
|
|
38672
|
-
diffAt(key, stateProperties[key], awsProperties[key], drifts, ignore);
|
|
38673
|
+
diffAt(key, stateProperties[key], awsProperties[key], drifts, ignore, union);
|
|
38673
38674
|
}
|
|
38674
38675
|
return drifts;
|
|
38675
38676
|
}
|
|
@@ -38682,15 +38683,16 @@ function isIgnoredPath(path, ignorePaths) {
|
|
|
38682
38683
|
}
|
|
38683
38684
|
return false;
|
|
38684
38685
|
}
|
|
38685
|
-
function diffAt(path, stateValue, awsValue, out, ignorePaths) {
|
|
38686
|
+
function diffAt(path, stateValue, awsValue, out, ignorePaths, unionWalkObjects) {
|
|
38686
38687
|
if (deepEqual(stateValue, awsValue))
|
|
38687
38688
|
return;
|
|
38688
38689
|
if (isPlainObject(stateValue) && isPlainObject(awsValue) && !Array.isArray(stateValue) && !Array.isArray(awsValue)) {
|
|
38689
|
-
|
|
38690
|
+
const keys = unionWalkObjects ? /* @__PURE__ */ new Set([...Object.keys(stateValue), ...Object.keys(awsValue)]) : Object.keys(stateValue);
|
|
38691
|
+
for (const key of keys) {
|
|
38690
38692
|
const childPath = `${path}.${key}`;
|
|
38691
38693
|
if (isIgnoredPath(childPath, ignorePaths))
|
|
38692
38694
|
continue;
|
|
38693
|
-
diffAt(childPath, stateValue[key], awsValue[key], out, ignorePaths);
|
|
38695
|
+
diffAt(childPath, stateValue[key], awsValue[key], out, ignorePaths, unionWalkObjects);
|
|
38694
38696
|
}
|
|
38695
38697
|
return;
|
|
38696
38698
|
}
|
|
@@ -39069,8 +39071,12 @@ async function runDriftForStack(stackName, region, stateBackend, providerRegistr
|
|
|
39069
39071
|
continue;
|
|
39070
39072
|
}
|
|
39071
39073
|
const ignorePaths = provider.getDriftUnknownPaths ? provider.getDriftUnknownPaths(resource.resourceType) : [];
|
|
39072
|
-
const
|
|
39073
|
-
const
|
|
39074
|
+
const useObserved = resource.observedProperties !== void 0;
|
|
39075
|
+
const baseline = useObserved ? resource.observedProperties : resource.properties ?? {};
|
|
39076
|
+
const changes = calculateResourceDrift(baseline, aws, {
|
|
39077
|
+
ignorePaths,
|
|
39078
|
+
unionWalkObjects: useObserved
|
|
39079
|
+
});
|
|
39074
39080
|
if (changes.length === 0) {
|
|
39075
39081
|
outcomes.push({ kind: "clean", logicalId, resourceType: resource.resourceType });
|
|
39076
39082
|
} else {
|
|
@@ -42855,7 +42861,7 @@ function reorderArgs(argv) {
|
|
|
42855
42861
|
}
|
|
42856
42862
|
async function main() {
|
|
42857
42863
|
const program = new Command14();
|
|
42858
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
42864
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.50.0");
|
|
42859
42865
|
program.addCommand(createBootstrapCommand());
|
|
42860
42866
|
program.addCommand(createSynthCommand());
|
|
42861
42867
|
program.addCommand(createListCommand());
|