@go-to-k/cdkd 0.275.4 → 0.275.5
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/{asg-provider-BxpwCQGo.js → asg-provider-D6Y0zhd3.js} +2 -2
- package/dist/{asg-provider-BxpwCQGo.js.map → asg-provider-D6Y0zhd3.js.map} +1 -1
- package/dist/cli.js +48 -23
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-CHL0hb1m.js → deploy-engine-rn1TQits.js} +10 -5
- package/dist/{deploy-engine-CHL0hb1m.js.map → deploy-engine-rn1TQits.js.map} +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as WorkGraph, A as slowCcOperationTimeoutMs, At as warnDeprecatedNoPrefixCliFlag, B as applyRoleArnIfSet, Bt as resolveBucketRegion, C as yellow, Ct as resolveAutoAssetStorage, D as ProviderRegistry, Dt as resolveStateBucketWithDefaultAndSource, E as clearOnUpdateRemoval, Et as resolveStateBucketWithDefault, F as refStateLookupFromResource, Ft as uploadCfnTemplate, G as DagBuilder, H as describeTypeWithThrottleRetry, Ht as getAwsClients, I as WAFv2WebACLProvider, It as expectedOwnerParam, J as S3StateBackend, K as TemplateParser, Kt as CdkdError, L as normalizeAwsTagsToCfn, Lt as AssemblyReader, M as isTerminationProtectionPropagationError, Mt as CFN_TEMPLATE_URL_LIMIT, N as IntrinsicFunctionResolver, Nt as MIGRATE_TMP_PREFIX, O as findActionableSilentDrops, Ot as resolveUseCdkBootstrapAssets, P as cfnRefValueFromPhysicalId, Pt as findLargeInlineResources, Q as stringifyValue, Qt as LocalStartServiceError, R as resolveExplicitPhysicalId, Rt as processStackMessages, S as red, St as resolveApp, T as collectInlinePolicyNamesManagedBySiblings, Tt as resolveSkipPrefix, U as withRetry, Ut as resetAwsClients, V as DiffCalculator, Vt as AwsClients, W as isRetryableTransientError, Wt as setAwsClients, X as shouldRetainResource, Xt as LocalInvokeBuildError$1, Y as rebuildClientForBucketRegion, Yt as DeployCancelledError, Z as AssetPublisher, Zt as LocalMigrateError, _ as formatResourceLine, _t as getDockerImageBySourceHash, a as DeploymentEventsStore, an as ResourceUpdateNotSupportedError, at as BOOTSTRAP_MARKER_PREFIX, b as gray, bt as getDefaultStateBucketName, c as replayFailedOperations, ct as parseBootstrapMarker, d as IMPLICIT_DELETE_DEPENDENCIES, dt as buildDockerImage, en as MissingCdkCliError, et as buildAssetRedirectMap, f as computeImplicitDeleteEdges, fn as normalizeAwsError, ft as formatDockerLoginError, g as renderStatefulReason, gt as AssetManifestLoader, h as isStatefulRecreateTargetSync, ht as runDockerStreaming, i as DeploymentEventsReader, in as ResourceTimeoutError, it as AssetModeResolver, j as disableInstanceApiTermination, jt as CFN_TEMPLATE_BODY_LIMIT, k as CloudControlProvider, kt as stateBucketExistenceConfirmed, l as replayRollback, lt as validateAssetBucketName, m as MULTI_REGION_RECREATE_BLOCKED_TYPES, mt as runDockerForeground, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as PartialFailureError, nt as loadPublishableAssetManifest, o as planFailedOps, on as StackHasActiveImportsError, ot as ensureAssetStorage, p as extractDeploymentEventError, pn as withErrorHandling, pt as getDockerCmd, q as LockManager, r as DeployEngine, rn as ProvisioningError, rt as rewriteTemplateAssetReferences, s as planRollback, sn as StackTerminationProtectionError, st as getBootstrapMarkerKey, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as NestedStackChildDirectDestroyError, tt as createAssetRedirectResolver, u as withResourceDeadline, ut as validateContainerRepoName, v as bold, vt as Synthesizer, w as IAMRoleProvider, wt as resolveCaptureObservedState, x as green, xt as getLegacyStateBucketName, y as cyan, yt as synthesisStatusMessage, z as assertRegionMatch } from "./deploy-engine-
|
|
2
|
+
import { $ as WorkGraph, A as slowCcOperationTimeoutMs, At as warnDeprecatedNoPrefixCliFlag, B as applyRoleArnIfSet, Bt as resolveBucketRegion, C as yellow, Ct as resolveAutoAssetStorage, D as ProviderRegistry, Dt as resolveStateBucketWithDefaultAndSource, E as clearOnUpdateRemoval, Et as resolveStateBucketWithDefault, F as refStateLookupFromResource, Ft as uploadCfnTemplate, G as DagBuilder, H as describeTypeWithThrottleRetry, Ht as getAwsClients, I as WAFv2WebACLProvider, It as expectedOwnerParam, J as S3StateBackend, K as TemplateParser, Kt as CdkdError, L as normalizeAwsTagsToCfn, Lt as AssemblyReader, M as isTerminationProtectionPropagationError, Mt as CFN_TEMPLATE_URL_LIMIT, N as IntrinsicFunctionResolver, Nt as MIGRATE_TMP_PREFIX, O as findActionableSilentDrops, Ot as resolveUseCdkBootstrapAssets, P as cfnRefValueFromPhysicalId, Pt as findLargeInlineResources, Q as stringifyValue, Qt as LocalStartServiceError, R as resolveExplicitPhysicalId, Rt as processStackMessages, S as red, St as resolveApp, T as collectInlinePolicyNamesManagedBySiblings, Tt as resolveSkipPrefix, U as withRetry, Ut as resetAwsClients, V as DiffCalculator, Vt as AwsClients, W as isRetryableTransientError, Wt as setAwsClients, X as shouldRetainResource, Xt as LocalInvokeBuildError$1, Y as rebuildClientForBucketRegion, Yt as DeployCancelledError, Z as AssetPublisher, Zt as LocalMigrateError, _ as formatResourceLine, _t as getDockerImageBySourceHash, a as DeploymentEventsStore, an as ResourceUpdateNotSupportedError, at as BOOTSTRAP_MARKER_PREFIX, b as gray, bt as getDefaultStateBucketName, c as replayFailedOperations, ct as parseBootstrapMarker, d as IMPLICIT_DELETE_DEPENDENCIES, dt as buildDockerImage, en as MissingCdkCliError, et as buildAssetRedirectMap, f as computeImplicitDeleteEdges, fn as normalizeAwsError, ft as formatDockerLoginError, g as renderStatefulReason, gt as AssetManifestLoader, h as isStatefulRecreateTargetSync, ht as runDockerStreaming, i as DeploymentEventsReader, in as ResourceTimeoutError, it as AssetModeResolver, j as disableInstanceApiTermination, jt as CFN_TEMPLATE_BODY_LIMIT, k as CloudControlProvider, kt as stateBucketExistenceConfirmed, l as replayRollback, lt as validateAssetBucketName, m as MULTI_REGION_RECREATE_BLOCKED_TYPES, mt as runDockerForeground, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as PartialFailureError, nt as loadPublishableAssetManifest, o as planFailedOps, on as StackHasActiveImportsError, ot as ensureAssetStorage, p as extractDeploymentEventError, pn as withErrorHandling, pt as getDockerCmd, q as LockManager, r as DeployEngine, rn as ProvisioningError, rt as rewriteTemplateAssetReferences, s as planRollback, sn as StackTerminationProtectionError, st as getBootstrapMarkerKey, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as NestedStackChildDirectDestroyError, tt as createAssetRedirectResolver, u as withResourceDeadline, ut as validateContainerRepoName, v as bold, vt as Synthesizer, w as IAMRoleProvider, wt as resolveCaptureObservedState, x as green, xt as getLegacyStateBucketName, y as cyan, yt as synthesisStatusMessage, z as assertRegionMatch } from "./deploy-engine-rn1TQits.js";
|
|
3
3
|
import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, f as withSkipPrefix, i as runStackBuffered, n as getLogger, o as PATTERN_B_NAME_OPTIONS, p as withStackName, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-BYMEE-BS.js";
|
|
4
|
-
import { t as ASGProvider } from "./asg-provider-
|
|
4
|
+
import { t as ASGProvider } from "./asg-provider-D6Y0zhd3.js";
|
|
5
5
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
6
|
import { createHash, randomBytes, randomUUID } from "node:crypto";
|
|
7
7
|
import { CopyObjectCommand, CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
@@ -42623,16 +42623,50 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
42623
42623
|
destroyProviderRegistry.setCustomResourceResponseBucket(ctx.stateBucket);
|
|
42624
42624
|
if (ctx.allowUnsupportedTypes?.length) destroyProviderRegistry.allowUnsupportedTypes(ctx.allowUnsupportedTypes);
|
|
42625
42625
|
}
|
|
42626
|
+
const renderer = getLiveRenderer();
|
|
42627
|
+
let draining = false;
|
|
42628
|
+
let lockHeld = false;
|
|
42629
|
+
const sigintHandler = () => {
|
|
42630
|
+
if (draining) {
|
|
42631
|
+
if (lockHeld) {
|
|
42632
|
+
ctx.lockManager.releaseLock(stackName, regionForState).catch(() => {});
|
|
42633
|
+
process.stderr.write(`\nForce-quit: stack lock may not be released. If the next run reports a lock, run: cdkd force-unlock ${stackName}\n`);
|
|
42634
|
+
}
|
|
42635
|
+
process.exit(130);
|
|
42636
|
+
}
|
|
42637
|
+
draining = true;
|
|
42638
|
+
renderer.printAbove(() => {
|
|
42639
|
+
process.stderr.write("\nInterrupted — finishing in-flight deletes, then flushing state and releasing the lock (press Ctrl-C again to force-quit)...\n");
|
|
42640
|
+
});
|
|
42641
|
+
};
|
|
42642
|
+
process.setMaxListeners(Math.max(process.getMaxListeners(), 100));
|
|
42643
|
+
process.on("SIGINT", sigintHandler);
|
|
42626
42644
|
logger.info(`\nAcquiring lock for stack ${stackName}...`);
|
|
42627
|
-
|
|
42645
|
+
try {
|
|
42646
|
+
await ctx.lockManager.acquireLock(stackName, regionForState, void 0, "destroy");
|
|
42647
|
+
} catch (error) {
|
|
42648
|
+
process.removeListener("SIGINT", sigintHandler);
|
|
42649
|
+
throw error;
|
|
42650
|
+
}
|
|
42651
|
+
lockHeld = true;
|
|
42628
42652
|
if (needsStrongRefCheck) {
|
|
42629
|
-
const
|
|
42630
|
-
if (consumers.length > 0) {
|
|
42653
|
+
const releaseThenUnregister = async () => {
|
|
42631
42654
|
try {
|
|
42632
42655
|
await ctx.lockManager.releaseLock(stackName, regionForState);
|
|
42633
42656
|
} catch (releaseErr) {
|
|
42634
|
-
logger.warn(`Failed to release lock after strong-ref refusal: ${releaseErr instanceof Error ? releaseErr.message : String(releaseErr)}`);
|
|
42657
|
+
logger.warn(`Failed to release lock after strong-ref refusal/failure: ${releaseErr instanceof Error ? releaseErr.message : String(releaseErr)}`);
|
|
42635
42658
|
}
|
|
42659
|
+
process.removeListener("SIGINT", sigintHandler);
|
|
42660
|
+
};
|
|
42661
|
+
let consumers;
|
|
42662
|
+
try {
|
|
42663
|
+
consumers = await scanActiveConsumers(stackName, regionForState, ctx);
|
|
42664
|
+
} catch (error) {
|
|
42665
|
+
await releaseThenUnregister();
|
|
42666
|
+
throw error;
|
|
42667
|
+
}
|
|
42668
|
+
if (consumers.length > 0) {
|
|
42669
|
+
await releaseThenUnregister();
|
|
42636
42670
|
throw new StackHasActiveImportsError(stackName, regionForState, consumers);
|
|
42637
42671
|
}
|
|
42638
42672
|
}
|
|
@@ -42657,22 +42691,7 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
42657
42691
|
}
|
|
42658
42692
|
});
|
|
42659
42693
|
};
|
|
42660
|
-
const renderer = getLiveRenderer();
|
|
42661
42694
|
renderer.start();
|
|
42662
|
-
let draining = false;
|
|
42663
|
-
const sigintHandler = () => {
|
|
42664
|
-
if (draining) {
|
|
42665
|
-
ctx.lockManager.releaseLock(stackName, regionForState).catch(() => {});
|
|
42666
|
-
process.stderr.write(`\nForce-quit: stack lock may not be released. If the next run reports a lock, run: cdkd force-unlock ${stackName}\n`);
|
|
42667
|
-
process.exit(130);
|
|
42668
|
-
}
|
|
42669
|
-
draining = true;
|
|
42670
|
-
renderer.printAbove(() => {
|
|
42671
|
-
process.stderr.write("\nInterrupted — finishing in-flight deletes, then flushing state and releasing the lock (press Ctrl-C again to force-quit)...\n");
|
|
42672
|
-
});
|
|
42673
|
-
};
|
|
42674
|
-
process.setMaxListeners(Math.max(process.getMaxListeners(), 100));
|
|
42675
|
-
process.on("SIGINT", sigintHandler);
|
|
42676
42695
|
try {
|
|
42677
42696
|
logger.info("Building dependency graph...");
|
|
42678
42697
|
const template = {
|
|
@@ -51238,7 +51257,6 @@ async function rollbackCommand(stackArg, options) {
|
|
|
51238
51257
|
const providerRegistry = new ProviderRegistry();
|
|
51239
51258
|
registerAllProviders(providerRegistry);
|
|
51240
51259
|
providerRegistry.setCustomResourceResponseBucket(setup.bucket);
|
|
51241
|
-
await setup.lockManager.acquireLockWithRetry(stackName, region, void 0, "rollback");
|
|
51242
51260
|
let interrupted = false;
|
|
51243
51261
|
const sigintHandler = () => {
|
|
51244
51262
|
process.stderr.write("\nInterrupted — stopping rollback after the current operation...\n");
|
|
@@ -51246,6 +51264,13 @@ async function rollbackCommand(stackArg, options) {
|
|
|
51246
51264
|
};
|
|
51247
51265
|
process.on("SIGINT", sigintHandler);
|
|
51248
51266
|
const unforwardSigterm = forwardSigtermToSigint();
|
|
51267
|
+
try {
|
|
51268
|
+
await setup.lockManager.acquireLockWithRetry(stackName, region, void 0, "rollback");
|
|
51269
|
+
} catch (error) {
|
|
51270
|
+
unforwardSigterm();
|
|
51271
|
+
process.removeListener("SIGINT", sigintHandler);
|
|
51272
|
+
throw error;
|
|
51273
|
+
}
|
|
51249
51274
|
try {
|
|
51250
51275
|
const stateData = await setup.stateBackend.getState(stackName, region);
|
|
51251
51276
|
const journal = await setup.stateBackend.loadRollbackJournal(stackName, region);
|
|
@@ -63624,7 +63649,7 @@ function createMigrateCommand() {
|
|
|
63624
63649
|
*/
|
|
63625
63650
|
function buildProgram() {
|
|
63626
63651
|
const program = new Command();
|
|
63627
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.275.
|
|
63652
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.275.5");
|
|
63628
63653
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
63629
63654
|
const { profile } = actionCommand.optsWithGlobals();
|
|
63630
63655
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|