@go-to-k/cdkd 0.6.0 → 0.7.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 +9 -4
- package/dist/cli.js.map +2 -2
- package/dist/go-to-k-cdkd-0.7.0.tgz +0 -0
- package/package.json +1 -1
- package/dist/go-to-k-cdkd-0.6.0.tgz +0 -0
package/dist/cli.js
CHANGED
|
@@ -2401,7 +2401,9 @@ function toYaml(obj, indent = 0) {
|
|
|
2401
2401
|
let result = "\n";
|
|
2402
2402
|
for (const [key, value] of entries) {
|
|
2403
2403
|
const safeKey = key.includes(" ") ? `"${key}"` : key;
|
|
2404
|
-
|
|
2404
|
+
const isContainer = typeof value === "object" && value !== null;
|
|
2405
|
+
const isEmptyContainer = isContainer && (Array.isArray(value) ? value.length === 0 : Object.keys(value).length === 0);
|
|
2406
|
+
if (isContainer && !isEmptyContainer) {
|
|
2405
2407
|
result += `${prefix}${safeKey}:${toYaml(value, indent + 1)}`;
|
|
2406
2408
|
} else {
|
|
2407
2409
|
result += `${prefix}${safeKey}: ${toYaml(value, indent + 1).trimStart()}`;
|
|
@@ -2584,17 +2586,20 @@ async function listCommand(patterns, options) {
|
|
|
2584
2586
|
}
|
|
2585
2587
|
if (options.showDependencies) {
|
|
2586
2588
|
const records = sorted.map((s) => ({
|
|
2587
|
-
id: s
|
|
2589
|
+
id: formatDisplayId(s),
|
|
2588
2590
|
dependencies: [...s.dependencyNames]
|
|
2589
2591
|
}));
|
|
2590
2592
|
emitStructured(records, options.json);
|
|
2591
2593
|
return;
|
|
2592
2594
|
}
|
|
2593
2595
|
for (const stack of sorted) {
|
|
2594
|
-
process.stdout.write(`${stack
|
|
2596
|
+
process.stdout.write(`${formatDisplayId(stack)}
|
|
2595
2597
|
`);
|
|
2596
2598
|
}
|
|
2597
2599
|
}
|
|
2600
|
+
function formatDisplayId(stack) {
|
|
2601
|
+
return stack.displayName === stack.stackName ? stack.displayName : `${stack.displayName} (${stack.stackName})`;
|
|
2602
|
+
}
|
|
2598
2603
|
function emitStructured(payload, asJson) {
|
|
2599
2604
|
if (asJson) {
|
|
2600
2605
|
process.stdout.write(`${JSON.stringify(payload, null, 2)}
|
|
@@ -28457,7 +28462,7 @@ function reorderArgs(argv) {
|
|
|
28457
28462
|
}
|
|
28458
28463
|
async function main() {
|
|
28459
28464
|
const program = new Command10();
|
|
28460
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
28465
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.7.0");
|
|
28461
28466
|
program.addCommand(createBootstrapCommand());
|
|
28462
28467
|
program.addCommand(createSynthCommand());
|
|
28463
28468
|
program.addCommand(createListCommand());
|