@go-to-k/cdkd 0.147.0 → 0.147.1
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 +24 -3
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-DjnWyAAc.js → deploy-engine-CRxNgcqJ.js} +47 -2
- package/dist/deploy-engine-CRxNgcqJ.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-DjnWyAAc.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { _ as withSkipPrefix, a as runDockerStreaming, c as getLogger, d as getLiveRenderer, f as PATTERN_B_NAME_PROPERTIES, g as generateResourceNameWithFallback, h as generateResourceName, i as runDockerForeground, n as formatDockerLoginError, p as PATTERN_B_RESOURCE_TYPES, r as getDockerCmd, u as runStackBuffered, v as withStackName } from "./docker-cmd-EtWSTAje.js";
|
|
3
|
-
import { A as AssetPublisher, B as resolveStateBucketWithDefault, C as applyRoleArnIfSet, D as LockManager, E as TemplateParser, F as getDefaultStateBucketName, G as MIGRATE_TMP_PREFIX, H as warnDeprecatedNoPrefixCliFlag, I as getLegacyStateBucketName, J as AssemblyReader, K as findLargeInlineResources, L as resolveApp, M as WorkGraph, N as buildDockerImage, O as S3StateBackend, P as Synthesizer, Q as CdkdError, R as resolveCaptureObservedState, S as IntrinsicFunctionResolver, T as DagBuilder, U as CFN_TEMPLATE_BODY_LIMIT, V as resolveStateBucketWithDefaultAndSource, W as CFN_TEMPLATE_URL_LIMIT, X as resolveBucketRegion, _ as normalizeAwsTagsToCfn,
|
|
3
|
+
import { A as AssetPublisher, B as resolveStateBucketWithDefault, C as applyRoleArnIfSet, D as LockManager, E as TemplateParser, F as getDefaultStateBucketName, G as MIGRATE_TMP_PREFIX, H as warnDeprecatedNoPrefixCliFlag, I as getLegacyStateBucketName, J as AssemblyReader, K as findLargeInlineResources, L as resolveApp, M as WorkGraph, N as buildDockerImage, O as S3StateBackend, P as Synthesizer, Q as CdkdError, R as resolveCaptureObservedState, S as IntrinsicFunctionResolver, T as DagBuilder, U as CFN_TEMPLATE_BODY_LIMIT, V as resolveStateBucketWithDefaultAndSource, W as CFN_TEMPLATE_URL_LIMIT, X as resolveBucketRegion, _ as normalizeAwsTagsToCfn, a as withRetry, at as MissingCdkCliError, b as CloudControlProvider, c as cyan, ct as ProvisioningError, d as red, dt as RouteDiscoveryError, f as yellow, ft as StackHasActiveImportsError, g as matchesCdkPath, h as CDK_PATH_TAG, i as withResourceDeadline, j as stringifyValue, k as shouldRetainResource, l as gray, lt as ResourceTimeoutError, m as collectInlinePolicyNamesManagedBySiblings, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as LocalMigrateError, o as IMPLICIT_DELETE_DEPENDENCIES, ot as NestedStackChildDirectDestroyError, p as IAMRoleProvider, pt as StackTerminationProtectionError, q as uploadCfnTemplate, r as DeployEngine, rt as LocalStartServiceError, s as bold, st as PartialFailureError, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as LocalInvokeBuildError, u as green, ut as ResourceUpdateNotSupportedError, v as resolveExplicitPhysicalId, vt as normalizeAwsError, w as DiffCalculator, x as assertRegionMatch, y as ProviderRegistry, yt as withErrorHandling, z as resolveSkipPrefix } from "./deploy-engine-CRxNgcqJ.js";
|
|
4
4
|
import { a as setAwsClients, i as resetAwsClients, r as getAwsClients, t as AwsClients } from "./aws-clients-BF03Alpe.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { createHash, createHmac, createPublicKey, createVerify, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -33592,6 +33592,7 @@ async function destroyCommand(stackArgs, options) {
|
|
|
33592
33592
|
}
|
|
33593
33593
|
} else throw new Error("Could not determine which stacks belong to this app. Specify stack names explicitly, use --all, or ensure --app / cdk.json is configured.");
|
|
33594
33594
|
const stackPatterns = stackArgs.length > 0 ? stackArgs : options.stack ? [options.stack] : [];
|
|
33595
|
+
let totalErrors = 0;
|
|
33595
33596
|
let stackNames;
|
|
33596
33597
|
if (options.all) stackNames = candidateStacks.map((s) => s.stackName);
|
|
33597
33598
|
else if (stackPatterns.length > 0) stackNames = matchStacks(candidateStacks, stackPatterns).map((s) => s.stackName);
|
|
@@ -33601,6 +33602,21 @@ async function destroyCommand(stackArgs, options) {
|
|
|
33601
33602
|
return;
|
|
33602
33603
|
} else throw new Error(`Multiple stacks found: ${candidateStacks.map(describeStack).join(", ")}. Specify stack name(s) or use --all`);
|
|
33603
33604
|
if (stackNames.length === 0) {
|
|
33605
|
+
if (stackPatterns.length > 0) {
|
|
33606
|
+
const allStateNamesSet = new Set(allStateRefs.map((r) => r.stackName));
|
|
33607
|
+
for (const pattern of stackPatterns) {
|
|
33608
|
+
if (pattern.includes("*") || pattern.includes("?") || pattern.includes("/")) continue;
|
|
33609
|
+
if (!allStateNamesSet.has(pattern)) continue;
|
|
33610
|
+
const refRegion = allStateRefs.find((r) => r.stackName === pattern)?.region ?? region;
|
|
33611
|
+
const stateOnlyResult = await stateBackend.getState(pattern, refRegion);
|
|
33612
|
+
if (stateOnlyResult?.state.parentStack) {
|
|
33613
|
+
const err = new NestedStackChildDirectDestroyError(pattern, stateOnlyResult.state.parentStack, stateOnlyResult.state.parentLogicalId);
|
|
33614
|
+
logger.error(` ✗ ${err.message}`);
|
|
33615
|
+
totalErrors++;
|
|
33616
|
+
}
|
|
33617
|
+
}
|
|
33618
|
+
if (totalErrors > 0) throw new PartialFailureError(`Destroy completed with ${totalErrors} resource error(s). State preserved — inspect 'cdkd state show <stack>' and re-run 'cdkd destroy' to retry.`);
|
|
33619
|
+
}
|
|
33604
33620
|
logger.info("No matching stacks found in state");
|
|
33605
33621
|
return;
|
|
33606
33622
|
}
|
|
@@ -33612,7 +33628,6 @@ async function destroyCommand(stackArgs, options) {
|
|
|
33612
33628
|
arr.push(ref);
|
|
33613
33629
|
stateRefsByName.set(ref.stackName, arr);
|
|
33614
33630
|
}
|
|
33615
|
-
let totalErrors = 0;
|
|
33616
33631
|
for (const stackName of stackNames) {
|
|
33617
33632
|
logger.info(`\nPreparing to destroy stack: ${stackName}`);
|
|
33618
33633
|
const refs = stateRefsByName.get(stackName) ?? [];
|
|
@@ -33643,6 +33658,12 @@ async function destroyCommand(stackArgs, options) {
|
|
|
33643
33658
|
logger.warn(`No state found for stack ${stackName}, skipping`);
|
|
33644
33659
|
continue;
|
|
33645
33660
|
}
|
|
33661
|
+
if (stateResult.state.parentStack) {
|
|
33662
|
+
const err = new NestedStackChildDirectDestroyError(stackName, stateResult.state.parentStack, stateResult.state.parentLogicalId);
|
|
33663
|
+
logger.error(` ✗ ${err.message}`);
|
|
33664
|
+
totalErrors++;
|
|
33665
|
+
continue;
|
|
33666
|
+
}
|
|
33646
33667
|
const result = await withNestedStackContext({
|
|
33647
33668
|
stateBackend,
|
|
33648
33669
|
lockManager,
|
|
@@ -56593,7 +56614,7 @@ function reorderArgs(argv) {
|
|
|
56593
56614
|
*/
|
|
56594
56615
|
async function main() {
|
|
56595
56616
|
const program = new Command();
|
|
56596
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.147.
|
|
56617
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.147.1");
|
|
56597
56618
|
program.addCommand(createBootstrapCommand());
|
|
56598
56619
|
program.addCommand(createSynthCommand());
|
|
56599
56620
|
program.addCommand(createListCommand());
|