@go-to-k/cdkd 0.284.37 → 0.284.38
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-BbWubpjP.js → asg-provider-kqBWElNc.js} +2 -2
- package/dist/{asg-provider-BbWubpjP.js.map → asg-provider-kqBWElNc.js.map} +1 -1
- package/dist/cli.js +49 -29
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-C62UGXid.js → deploy-engine-DyxASW-O.js} +3 -3
- package/dist/{deploy-engine-C62UGXid.js.map → deploy-engine-DyxASW-O.js.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 startInterruptWatch, $t as buildAssetRedirectMap, A as renderStatefulReason, An as resolveStateBucketWithDefaultAndSource, At as redactSecretsForState, B as exportAliasCollisionScrubWarning, Bn as PARTITION_TABLE, Bt as DiffCalculator, C as isFinalSnapshotError, Cn as getDefaultStateBucketName, Cr as isRetryableTransientError, Ct as TEMPLATE_SOURCED_RULES, D as extractDeploymentEventError, Dn as resolveCaptureObservedState, Dt as isSingleDynamicReferenceToken, E as makeCanonicalizePropertiesFn, En as resolveAutoAssetStorage, Et as errorCauseChain, F as green, Fn as CFN_TEMPLATE_URL_LIMIT, Ft as s3BucketDomainName, G as collectInlinePolicyNamesManagedBySiblings, Gt as TemplateParser, H as secretBearingStateKeyWarning, Hn as derivePartitionAndUrlSuffix, Ht as describeTypeWithThrottleRetry, I as red, In as MIGRATE_TMP_PREFIX, It as s3BucketDualStackDomainName, J as findActionableSilentDrops, Jn as getAwsClients, Jt as rebuildClientForBucketRegion, K as clearOnUpdateRemoval, Kn as resolveBucketRegion, Kt as LockManager, L as yellow, Ln as findLargeInlineResources, Lt as s3BucketRegionalDomainName, M as bold, Mn as stateBucketExistenceConfirmed, Mt as classifyReplaySecretRegion, N as cyan, Nn as warnDeprecatedNoPrefixCliFlag, Nt as producerRegionsFromState, O as MULTI_REGION_RECREATE_BLOCKED_TYPES, On as resolveSkipPrefix, Ot as maskSecretsInError, P as gray, Pn as CFN_TEMPLATE_BODY_LIMIT, Pt as s3BucketArn, Q as isInterruptedWaitError, Qn as CdkdError, Qt as WorkGraph, R as collectDeclaredOutputNames, Rn as uploadCfnTemplate, Rt as s3BucketWebsiteUrl, S as createPreDeleteFinalSnapshot, Sn as synthesisStatusMessage, Sr as isMarkedNonRetryable, St as STATE_SOURCED_READBACK_RULES, T as unsupportedFinalSnapshotError, Tn as resolveApp, Tr as markNonRetryable, Tt as dynamicReferenceTokens, U as stateKeySecretExposure, Un as AssemblyReader, Ut as withRetry, V as isExportAliasCollision, Vn as canonicalizeRegion, Vt as INTRINSIC_KEYS, W as IAMRoleProvider, Wn as processStackMessages, Wt as DagBuilder, X as beginCommandInterruptScope, Xn as setAwsClients, Xt as AssetPublisher, Y as findSilentDropProperties, Yn as resetAwsClients, Yt as shouldRetainResource, Z as endCommandInterruptScope, Zt as stringifyValue, _ as computeImplicitDeleteEdges, _n as runDockerForeground, _t as replayWarn, a as DeploymentEventsStore, an as AssetModeResolver, ar as LocalMigrateError, at as carriesDynamicReference, b as buildFinalSnapshotIdentifier, bn as getDockerImageBySourceHash, br as normalizeAwsError, bt as requireConfigString, c as replayFailedOperations, cn as getBootstrapMarkerKey, cr as MissingCdkCliError, ct as refStateLookupFromResource, d as updatePartialReason, dn as validateAssetBucketName, dr as ProvisioningError, dt as resolveExplicitPhysicalId, en as createAssetRedirectResolver, er as CrossAccountSecretRefusalError, et as CloudControlProvider, f as UNSPECIFIED_SKIP_REASON, fn as validateContainerRepoName, fr as ResourceTimeoutError, ft as assertRegionMatch, g as IMPLICIT_DELETE_DEPENDENCIES, gn as getDockerCmd, gt as readConfigString, h as maskingRetryLogger, hn as formatDockerLoginError, hr as StackTerminationProtectionError, ht as configStringRefusal, i as DeploymentEventsReader, in as stripControlChars, ir as LocalInvokeBuildError$1, it as IntrinsicFunctionResolver, j as formatResourceLine, jn as resolveUseCdkBootstrapAssets, jt as scrubResourceRecord, k as isStatefulRecreateTargetSync, kn as resolveStateBucketWithDefault, kt as maskSecretsInText, l as replayRollback, ln as parseBootstrapMarker, lr as NestedStackChildDirectDestroyError, lt as WAFv2WebACLProvider, m as withResourceDeadline, mn as buildDockerImage, mr as StackHasActiveImportsError, mt as configBooleanRefusal, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as rewriteTemplateAssetReferences, nr as DeployCancelledError, nt as disableInstanceApiTermination, o as planFailedOps, on as BOOTSTRAP_MARKER_PREFIX, or as LocalStartServiceError, ot as cfnRefValueFromPhysicalId, p as deleteSkipReason, pn as buildDenyExternalAccessPolicy, pr as ResourceUpdateNotSupportedError, pt as coerceCfnBoolean, q as ProviderRegistry, qn as AwsClients, qt as S3StateBackend, r as DeployEngine, rn as escapeRegExp, rr as DynamicReferenceRegionAmbiguousError, rt as isTerminationProtectionPropagationError, s as planRollback, sn as ensureAssetStorage, st as getAccountInfo, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as loadPublishableAssetManifest, tt as slowCcOperationTimeoutMs, u as updatePartialMessage, un as readBootstrapMarkerBody, ur as PartialFailureError, ut as normalizeAwsTagsToCfn, v as ATOMIC_FINAL_SNAPSHOT_TYPES, vn as runDockerStreaming, vt as requireConfigArray, w as refusesFinalSnapshot, wn as getLegacyStateBucketName, wr as isThrottlingError, wt as createSecretMasker, x as ccRoutedFinalSnapshotError, xn as Synthesizer, xr as withErrorHandling, xt as STATE_SOURCED_CROSS_GENERATION_RULES, y as PRE_DELETE_SNAPSHOT_TYPES, yn as AssetManifestLoader, yt as requireConfigObject, z as collectPublishedOutputNames, zn as expectedOwnerParam, zt as applyRoleArnIfSet } from "./deploy-engine-
|
|
2
|
+
import { $ as startInterruptWatch, $t as buildAssetRedirectMap, A as renderStatefulReason, An as resolveStateBucketWithDefaultAndSource, At as redactSecretsForState, B as exportAliasCollisionScrubWarning, Bn as PARTITION_TABLE, Bt as DiffCalculator, C as isFinalSnapshotError, Cn as getDefaultStateBucketName, Cr as isRetryableTransientError, Ct as TEMPLATE_SOURCED_RULES, D as extractDeploymentEventError, Dn as resolveCaptureObservedState, Dt as isSingleDynamicReferenceToken, E as makeCanonicalizePropertiesFn, En as resolveAutoAssetStorage, Et as errorCauseChain, F as green, Fn as CFN_TEMPLATE_URL_LIMIT, Ft as s3BucketDomainName, G as collectInlinePolicyNamesManagedBySiblings, Gt as TemplateParser, H as secretBearingStateKeyWarning, Hn as derivePartitionAndUrlSuffix, Ht as describeTypeWithThrottleRetry, I as red, In as MIGRATE_TMP_PREFIX, It as s3BucketDualStackDomainName, J as findActionableSilentDrops, Jn as getAwsClients, Jt as rebuildClientForBucketRegion, K as clearOnUpdateRemoval, Kn as resolveBucketRegion, Kt as LockManager, L as yellow, Ln as findLargeInlineResources, Lt as s3BucketRegionalDomainName, M as bold, Mn as stateBucketExistenceConfirmed, Mt as classifyReplaySecretRegion, N as cyan, Nn as warnDeprecatedNoPrefixCliFlag, Nt as producerRegionsFromState, O as MULTI_REGION_RECREATE_BLOCKED_TYPES, On as resolveSkipPrefix, Ot as maskSecretsInError, P as gray, Pn as CFN_TEMPLATE_BODY_LIMIT, Pt as s3BucketArn, Q as isInterruptedWaitError, Qn as CdkdError, Qt as WorkGraph, R as collectDeclaredOutputNames, Rn as uploadCfnTemplate, Rt as s3BucketWebsiteUrl, S as createPreDeleteFinalSnapshot, Sn as synthesisStatusMessage, Sr as isMarkedNonRetryable, St as STATE_SOURCED_READBACK_RULES, T as unsupportedFinalSnapshotError, Tn as resolveApp, Tr as markNonRetryable, Tt as dynamicReferenceTokens, U as stateKeySecretExposure, Un as AssemblyReader, Ut as withRetry, V as isExportAliasCollision, Vn as canonicalizeRegion, Vt as INTRINSIC_KEYS, W as IAMRoleProvider, Wn as processStackMessages, Wt as DagBuilder, X as beginCommandInterruptScope, Xn as setAwsClients, Xt as AssetPublisher, Y as findSilentDropProperties, Yn as resetAwsClients, Yt as shouldRetainResource, Z as endCommandInterruptScope, Zt as stringifyValue, _ as computeImplicitDeleteEdges, _n as runDockerForeground, _t as replayWarn, a as DeploymentEventsStore, an as AssetModeResolver, ar as LocalMigrateError, at as carriesDynamicReference, b as buildFinalSnapshotIdentifier, bn as getDockerImageBySourceHash, br as normalizeAwsError, bt as requireConfigString, c as replayFailedOperations, cn as getBootstrapMarkerKey, cr as MissingCdkCliError, ct as refStateLookupFromResource, d as updatePartialReason, dn as validateAssetBucketName, dr as ProvisioningError, dt as resolveExplicitPhysicalId, en as createAssetRedirectResolver, er as CrossAccountSecretRefusalError, et as CloudControlProvider, f as UNSPECIFIED_SKIP_REASON, fn as validateContainerRepoName, fr as ResourceTimeoutError, ft as assertRegionMatch, g as IMPLICIT_DELETE_DEPENDENCIES, gn as getDockerCmd, gt as readConfigString, h as maskingRetryLogger, hn as formatDockerLoginError, hr as StackTerminationProtectionError, ht as configStringRefusal, i as DeploymentEventsReader, in as stripControlChars, ir as LocalInvokeBuildError$1, it as IntrinsicFunctionResolver, j as formatResourceLine, jn as resolveUseCdkBootstrapAssets, jt as scrubResourceRecord, k as isStatefulRecreateTargetSync, kn as resolveStateBucketWithDefault, kt as maskSecretsInText, l as replayRollback, ln as parseBootstrapMarker, lr as NestedStackChildDirectDestroyError, lt as WAFv2WebACLProvider, m as withResourceDeadline, mn as buildDockerImage, mr as StackHasActiveImportsError, mt as configBooleanRefusal, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as rewriteTemplateAssetReferences, nr as DeployCancelledError, nt as disableInstanceApiTermination, o as planFailedOps, on as BOOTSTRAP_MARKER_PREFIX, or as LocalStartServiceError, ot as cfnRefValueFromPhysicalId, p as deleteSkipReason, pn as buildDenyExternalAccessPolicy, pr as ResourceUpdateNotSupportedError, pt as coerceCfnBoolean, q as ProviderRegistry, qn as AwsClients, qt as S3StateBackend, r as DeployEngine, rn as escapeRegExp, rr as DynamicReferenceRegionAmbiguousError, rt as isTerminationProtectionPropagationError, s as planRollback, sn as ensureAssetStorage, st as getAccountInfo, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as loadPublishableAssetManifest, tt as slowCcOperationTimeoutMs, u as updatePartialMessage, un as readBootstrapMarkerBody, ur as PartialFailureError, ut as normalizeAwsTagsToCfn, v as ATOMIC_FINAL_SNAPSHOT_TYPES, vn as runDockerStreaming, vt as requireConfigArray, w as refusesFinalSnapshot, wn as getLegacyStateBucketName, wr as isThrottlingError, wt as createSecretMasker, x as ccRoutedFinalSnapshotError, xn as Synthesizer, xr as withErrorHandling, xt as STATE_SOURCED_CROSS_GENERATION_RULES, y as PRE_DELETE_SNAPSHOT_TYPES, yn as AssetManifestLoader, yt as requireConfigObject, z as collectPublishedOutputNames, zn as expectedOwnerParam, zt as applyRoleArnIfSet } from "./deploy-engine-DyxASW-O.js";
|
|
3
3
|
import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, f as getCurrentStackName, h as withStackName, i as runStackBuffered, m as withSkipPrefix, n as getLogger, o as PATTERN_B_NAME_OPTIONS, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-zRrlbaQt.js";
|
|
4
|
-
import { t as ASGProvider } from "./asg-provider-
|
|
4
|
+
import { t as ASGProvider } from "./asg-provider-kqBWElNc.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, DeleteBucketEncryptionCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketOwnershipControlsCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketOwnershipControlsCommand, 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";
|
|
@@ -58335,19 +58335,40 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
58335
58335
|
const stackRegion = state.region;
|
|
58336
58336
|
let destroyProviderRegistry = ctx.providerRegistry;
|
|
58337
58337
|
let destroyAwsClients;
|
|
58338
|
+
let regionSwitched = false;
|
|
58339
|
+
const restoreBaseRegionAndClients = () => {
|
|
58340
|
+
if (!regionSwitched) return;
|
|
58341
|
+
regionSwitched = false;
|
|
58342
|
+
const switchedClients = destroyAwsClients;
|
|
58343
|
+
destroyAwsClients = void 0;
|
|
58344
|
+
process.env["AWS_REGION"] = ctx.baseRegion;
|
|
58345
|
+
process.env["AWS_DEFAULT_REGION"] = ctx.baseRegion;
|
|
58346
|
+
setAwsClients(ctx.baseAwsClients);
|
|
58347
|
+
try {
|
|
58348
|
+
switchedClients?.destroy();
|
|
58349
|
+
} catch (destroyError) {
|
|
58350
|
+
logger.debug(`Failed to destroy region-scoped AWS clients: ${destroyError instanceof Error ? destroyError.message : String(destroyError)}`);
|
|
58351
|
+
}
|
|
58352
|
+
};
|
|
58338
58353
|
if (stackRegion && stackRegion !== ctx.baseRegion) {
|
|
58339
58354
|
logger.info(`Stack region: ${stackRegion}`);
|
|
58340
58355
|
process.env["AWS_REGION"] = stackRegion;
|
|
58341
58356
|
process.env["AWS_DEFAULT_REGION"] = stackRegion;
|
|
58342
|
-
|
|
58343
|
-
|
|
58344
|
-
|
|
58345
|
-
|
|
58346
|
-
|
|
58347
|
-
|
|
58348
|
-
|
|
58349
|
-
|
|
58350
|
-
|
|
58357
|
+
regionSwitched = true;
|
|
58358
|
+
try {
|
|
58359
|
+
destroyAwsClients = new AwsClients({
|
|
58360
|
+
region: stackRegion,
|
|
58361
|
+
...ctx.profile && { profile: ctx.profile }
|
|
58362
|
+
});
|
|
58363
|
+
setAwsClients(destroyAwsClients);
|
|
58364
|
+
destroyProviderRegistry = new ProviderRegistry();
|
|
58365
|
+
registerAllProviders(destroyProviderRegistry);
|
|
58366
|
+
destroyProviderRegistry.setCustomResourceResponseBucket(ctx.stateBucket);
|
|
58367
|
+
if (ctx.allowUnsupportedTypes?.length) destroyProviderRegistry.allowUnsupportedTypes(ctx.allowUnsupportedTypes);
|
|
58368
|
+
} catch (setupError) {
|
|
58369
|
+
restoreBaseRegionAndClients();
|
|
58370
|
+
throw setupError;
|
|
58371
|
+
}
|
|
58351
58372
|
}
|
|
58352
58373
|
const renderer = getLiveRenderer();
|
|
58353
58374
|
let draining = false;
|
|
@@ -58367,10 +58388,11 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
58367
58388
|
};
|
|
58368
58389
|
process.setMaxListeners(Math.max(process.getMaxListeners(), 100));
|
|
58369
58390
|
process.on("SIGINT", sigintHandler);
|
|
58370
|
-
logger.info(`\nAcquiring lock for stack ${stackName}...`);
|
|
58371
58391
|
try {
|
|
58372
|
-
|
|
58392
|
+
logger.info(`\nAcquiring lock for stack ${stackName}...`);
|
|
58393
|
+
if (!await ctx.lockManager.acquireLock(stackName, regionForState, void 0, "destroy")) throw new Error(`Could not acquire lock for stack '${stackName}' (${regionForState}) — another cdkd process holds it. Wait for it to finish, or run 'cdkd force-unlock ${stackName} --stack-region ${regionForState}' if you are certain no other process is active.`);
|
|
58373
58394
|
} catch (error) {
|
|
58395
|
+
restoreBaseRegionAndClients();
|
|
58374
58396
|
process.removeListener("SIGINT", sigintHandler);
|
|
58375
58397
|
throw error;
|
|
58376
58398
|
}
|
|
@@ -58382,6 +58404,7 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
58382
58404
|
} catch (releaseErr) {
|
|
58383
58405
|
logger.warn(`Failed to release lock after strong-ref refusal/failure: ${releaseErr instanceof Error ? releaseErr.message : String(releaseErr)}`);
|
|
58384
58406
|
}
|
|
58407
|
+
restoreBaseRegionAndClients();
|
|
58385
58408
|
process.removeListener("SIGINT", sigintHandler);
|
|
58386
58409
|
};
|
|
58387
58410
|
let consumers;
|
|
@@ -58422,8 +58445,8 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
58422
58445
|
}
|
|
58423
58446
|
});
|
|
58424
58447
|
};
|
|
58425
|
-
renderer.start();
|
|
58426
58448
|
try {
|
|
58449
|
+
renderer.start();
|
|
58427
58450
|
logger.info("Building dependency graph...");
|
|
58428
58451
|
const template = {
|
|
58429
58452
|
AWSTemplateFormatVersion: "2010-09-09",
|
|
@@ -58693,14 +58716,9 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
58693
58716
|
await ctx.lockManager.releaseLock(stackName, regionForState);
|
|
58694
58717
|
} finally {
|
|
58695
58718
|
process.removeListener("SIGINT", sigintHandler);
|
|
58719
|
+
restoreBaseRegionAndClients();
|
|
58696
58720
|
}
|
|
58697
58721
|
result.interrupted ||= draining;
|
|
58698
|
-
if (destroyAwsClients) {
|
|
58699
|
-
destroyAwsClients.destroy();
|
|
58700
|
-
process.env["AWS_REGION"] = ctx.baseRegion;
|
|
58701
|
-
process.env["AWS_DEFAULT_REGION"] = ctx.baseRegion;
|
|
58702
|
-
setAwsClients(ctx.baseAwsClients);
|
|
58703
|
-
}
|
|
58704
58722
|
}
|
|
58705
58723
|
return result;
|
|
58706
58724
|
}
|
|
@@ -66146,7 +66164,7 @@ async function runAccept(reports, stateBackend, stateConfig, awsClients, options
|
|
|
66146
66164
|
skipped: () => []
|
|
66147
66165
|
}));
|
|
66148
66166
|
if (driftedOutcomes.length === 0) continue;
|
|
66149
|
-
await lockManager.acquireLock(report.stackName, report.region, owner, "drift-accept");
|
|
66167
|
+
if (!await lockManager.acquireLock(report.stackName, report.region, owner, "drift-accept")) throw new Error(`Could not acquire lock for stack '${report.stackName}' (${report.region}) — another cdkd process holds it. Wait for it to finish, or run 'cdkd force-unlock ${report.stackName} --stack-region ${report.region}' if you are certain no other process is active.`);
|
|
66150
66168
|
try {
|
|
66151
66169
|
const resources = { ...report.state.resources };
|
|
66152
66170
|
for (const outcome of driftedOutcomes) {
|
|
@@ -66770,7 +66788,7 @@ async function runRevert(reports, providerRegistry, stateBackend, stateConfig, a
|
|
|
66770
66788
|
skipped: () => []
|
|
66771
66789
|
}));
|
|
66772
66790
|
if (driftedOutcomes.length === 0) continue;
|
|
66773
|
-
await lockManager.acquireLock(report.stackName, report.region, owner, "drift-revert");
|
|
66791
|
+
if (!await lockManager.acquireLock(report.stackName, report.region, owner, "drift-revert")) throw new Error(`Could not acquire lock for stack '${report.stackName}' (${report.region}) — another cdkd process holds it. Wait for it to finish, or run 'cdkd force-unlock ${report.stackName} --stack-region ${report.region}' if you are certain no other process is active.`);
|
|
66774
66792
|
const narrowedByLogicalId = /* @__PURE__ */ new Map();
|
|
66775
66793
|
const revertSecretResolvers = new DriftSecretResolvers(report.region);
|
|
66776
66794
|
const revertProducerRegions = producerRegionsFromState(report.state);
|
|
@@ -69060,7 +69078,7 @@ async function exportCommand(stackArg, options) {
|
|
|
69060
69078
|
}
|
|
69061
69079
|
const owner = `${process.env["USER"] || "unknown"}@${process.env["HOSTNAME"] || "host"}:${process.pid}`;
|
|
69062
69080
|
if (!options.dryRun) {
|
|
69063
|
-
if (!await lockManager.acquireLock(resolvedStackName, targetRegion, owner, "export")) throw new Error(`Could not acquire lock for stack '${resolvedStackName}' (${targetRegion}) — another cdkd process holds it. Wait for it to finish, or run 'cdkd force-unlock ${resolvedStackName}' if you are certain no other process is active.`);
|
|
69081
|
+
if (!await lockManager.acquireLock(resolvedStackName, targetRegion, owner, "export")) throw new Error(`Could not acquire lock for stack '${resolvedStackName}' (${targetRegion}) — another cdkd process holds it. Wait for it to finish, or run 'cdkd force-unlock ${resolvedStackName} --stack-region ${targetRegion}' if you are certain no other process is active.`);
|
|
69064
69082
|
}
|
|
69065
69083
|
try {
|
|
69066
69084
|
if (nestedStackRows.length > 0) {
|
|
@@ -70976,7 +70994,7 @@ async function runPerStackImportLoop(args) {
|
|
|
70976
70994
|
try {
|
|
70977
70995
|
await deps.lockManager.acquireLockWithRetry(node.stackName, node.region, deps.lockOwner, "export", CHILD_LOCK_RETRY_MAX_ATTEMPTS, CHILD_LOCK_RETRY_DELAY_MS);
|
|
70978
70996
|
} catch (err) {
|
|
70979
|
-
throw new Error(`Could not acquire lock for nested-stack child '${node.stackName}' (${node.region}) — another cdkd process held it through the retry window. Wait for it to finish, or run 'cdkd force-unlock ${node.stackName}' if you are certain no other process is active. No CloudFormation changeset has been submitted; cdkd state is unchanged.`, { cause: err instanceof Error ? err : void 0 });
|
|
70997
|
+
throw new Error(`Could not acquire lock for nested-stack child '${node.stackName}' (${node.region}) — another cdkd process held it through the retry window. Wait for it to finish, or run 'cdkd force-unlock ${node.stackName} --stack-region ${node.region}' if you are certain no other process is active. No CloudFormation changeset has been submitted; cdkd state is unchanged.`, { cause: err instanceof Error ? err : void 0 });
|
|
70980
70998
|
}
|
|
70981
70999
|
acquiredChildLocks.push({
|
|
70982
71000
|
stackName: node.stackName,
|
|
@@ -72517,7 +72535,7 @@ async function refreshObservedForStack(stackName, region, stateBackend, lockMana
|
|
|
72517
72535
|
};
|
|
72518
72536
|
}
|
|
72519
72537
|
const owner = `${process.env["USER"] || "unknown"}@${process.env["HOSTNAME"] || "host"}:${process.pid}`;
|
|
72520
|
-
await lockManager.acquireLock(stackName, region, owner, "state-refresh-observed");
|
|
72538
|
+
if (!await lockManager.acquireLock(stackName, region, owner, "state-refresh-observed")) throw new Error(`Could not acquire lock for stack '${stackName}' (${region}) — another cdkd process holds it. Wait for it to finish, or run 'cdkd force-unlock ${stackName} --stack-region ${region}' if you are certain no other process is active.`);
|
|
72521
72539
|
try {
|
|
72522
72540
|
let refreshed = 0;
|
|
72523
72541
|
let unsupported = 0;
|
|
@@ -74896,7 +74914,9 @@ async function orphanCommand(pathArgs, options) {
|
|
|
74896
74914
|
const targetRegion = await pickStackRegion(stateBackend, stackInfo.stackName, stackInfo.region, options.stackRegion);
|
|
74897
74915
|
logger.info(`Target: ${stackInfo.stackName} (${targetRegion}); orphaning ${orphanLogicalIds.length} resource(s): ${orphanLogicalIds.join(", ")}`);
|
|
74898
74916
|
const owner = `${process.env["USER"] || "unknown"}@${process.env["HOSTNAME"] || "host"}:${process.pid}`;
|
|
74899
|
-
if (!options.dryRun)
|
|
74917
|
+
if (!options.dryRun) {
|
|
74918
|
+
if (!await lockManager.acquireLock(stackInfo.stackName, targetRegion, owner, "orphan")) throw new Error(`Could not acquire lock for stack '${stackInfo.stackName}' (${targetRegion}) — another cdkd process holds it. Wait for it to finish, or run 'cdkd force-unlock ${stackInfo.stackName} --stack-region ${targetRegion}' if you are certain no other process is active.`);
|
|
74919
|
+
}
|
|
74900
74920
|
try {
|
|
74901
74921
|
const stateData = await stateBackend.getState(stackInfo.stackName, targetRegion);
|
|
74902
74922
|
if (!stateData) throw new Error(`No state found for stack '${stackInfo.stackName}' (${targetRegion}). Nothing to orphan. (Did the stack get deployed?)`);
|
|
@@ -75481,7 +75501,7 @@ async function importCommand(stackArg, options) {
|
|
|
75481
75501
|
}
|
|
75482
75502
|
for (const overrideId of overrides.keys()) if (!templateLogicalIds.has(overrideId)) throw new Error(`--resource / --resource-mapping references logical ID '${overrideId}' which is not in the synthesized template for stack '${stackInfo.stackName}'. Available IDs: ${[...templateLogicalIds].join(", ")}`);
|
|
75483
75503
|
const owner = `${process.env["USER"] || "unknown"}@${process.env["HOSTNAME"] || "host"}:${process.pid}`;
|
|
75484
|
-
await lockManager.acquireLock(stackInfo.stackName, targetRegion, owner, "import");
|
|
75504
|
+
if (!await lockManager.acquireLock(stackInfo.stackName, targetRegion, owner, "import")) throw new Error(`Could not acquire lock for stack '${stackInfo.stackName}' (${targetRegion}) — another cdkd process holds it. Wait for it to finish, or run 'cdkd force-unlock ${stackInfo.stackName} --stack-region ${targetRegion}' if you are certain no other process is active.`);
|
|
75485
75505
|
try {
|
|
75486
75506
|
const rows = [];
|
|
75487
75507
|
for (const { logicalId, resource } of resources) {
|
|
@@ -76210,7 +76230,7 @@ async function importNestedStackChildrenRecursive(args) {
|
|
|
76210
76230
|
const childRewritten = rewriteTemplateAssetReferences(childTemplate, assetRedirect);
|
|
76211
76231
|
if (childRewritten > 0) logger.info(`Note: ${childRewritten} asset reference(s) in nested stack ${childStackName} are recorded in state at their pre-rewrite (CDK bootstrap) values, so the next 'cdkd deploy' repoints any resource that still holds them to cdkd asset storage.`);
|
|
76212
76232
|
}
|
|
76213
|
-
await lockManager.acquireLock(childStackName, childRegion, lockOwner, "import");
|
|
76233
|
+
if (!await lockManager.acquireLock(childStackName, childRegion, lockOwner, "import")) throw new Error(`Could not acquire lock for nested stack '${childStackName}' (${childRegion}) — another cdkd process holds it. Wait for it to finish, or run 'cdkd force-unlock ${childStackName} --stack-region ${childRegion}' if you are certain no other process is active.`);
|
|
76214
76234
|
try {
|
|
76215
76235
|
const childResources = collectImportableResources(childTemplate);
|
|
76216
76236
|
const childTemplateLogicalIds = new Set(childResources.map((r) => r.logicalId));
|
|
@@ -86125,7 +86145,7 @@ function createMigrateCommand() {
|
|
|
86125
86145
|
*/
|
|
86126
86146
|
function buildProgram() {
|
|
86127
86147
|
const program = new Command();
|
|
86128
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.284.
|
|
86148
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.284.38");
|
|
86129
86149
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
86130
86150
|
const { profile } = actionCommand.optsWithGlobals();
|
|
86131
86151
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|