@go-to-k/cdkd 0.283.3 → 0.283.4
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-CtmogXk9.js → asg-provider-CZQewQcH.js} +2 -2
- package/dist/{asg-provider-CtmogXk9.js.map → asg-provider-CZQewQcH.js.map} +1 -1
- package/dist/cli.js +35 -7
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-DxpS3fJ9.js → deploy-engine-C605sBVJ.js} +121 -14
- package/dist/deploy-engine-C605sBVJ.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-DxpS3fJ9.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as configStringRefusal, $t as
|
|
2
|
+
import { $ as configStringRefusal, $t as resolveSkipPrefix, A as green, At as rewriteTemplateAssetReferences, B as slowCcOperationTimeoutMs, Bt as formatDockerLoginError, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as CdkdError, Ct as shouldRetainResource, D as bold, Dn as LocalInvokeBuildError$1, Dt as buildAssetRedirectMap, E as formatResourceLine, En as DeployCancelledError, Et as WorkGraph, F as clearOnUpdateRemoval, Fn as ResourceTimeoutError, Ft as parseBootstrapMarker, G as getAccountInfo, Gt as getDockerImageBySourceHash, H as isTerminationProtectionPropagationError, Ht as runDockerForeground, I as ProviderRegistry, In as ResourceUpdateNotSupportedError, It as validateAssetBucketName, J as normalizeAwsTagsToCfn, Jt as getDefaultStateBucketName, K as refStateLookupFromResource, Kt as Synthesizer, L as findActionableSilentDrops, Ln as StackHasActiveImportsError, Lt as validateContainerRepoName, M as yellow, Mn as NestedStackChildDirectDestroyError, Mt as BOOTSTRAP_MARKER_PREFIX, N as IAMRoleProvider, Nn as PartialFailureError, Nt as ensureAssetStorage, O as cyan, On as LocalMigrateError, Ot as createAssetRedirectResolver, P as collectInlinePolicyNamesManagedBySiblings, Pn as ProvisioningError, Pt as getBootstrapMarkerKey, Q as configBooleanRefusal, Qt as resolveCaptureObservedState, R as findSilentDropProperties, Rn as StackTerminationProtectionError, Rt as buildDenyExternalAccessPolicy, S as extractDeploymentEventError, St as rebuildClientForBucketRegion, T as renderStatefulReason, Tt as stringifyValue, U as IntrinsicFunctionResolver, Un as normalizeAwsError, Ut as runDockerStreaming, V as disableInstanceApiTermination, Vt as getDockerCmd, W as cfnRefValueFromPhysicalId, Wn as withErrorHandling, Wt as AssetManifestLoader, X as assertRegionMatch, Xt as resolveApp, Y as resolveExplicitPhysicalId, Yt as getLegacyStateBucketName, Z as coerceCfnBoolean, Zt as resolveAutoAssetStorage, _ as createPreDeleteFinalSnapshot, _n as resolveBucketRegion, _t as markNonRetryable, a as DeploymentEventsStore, an as CFN_TEMPLATE_BODY_LIMIT, at as s3BucketArn, b as unsupportedFinalSnapshotError, bn as resetAwsClients, bt as LockManager, c as replayFailedOperations, cn as findLargeInlineResources, ct as s3BucketRegionalDomainName, d as IMPLICIT_DELETE_DEPENDENCIES, dn as PARTITION_TABLE, dt as DiffCalculator, en as resolveStateBucketWithDefault, et as readConfigString, f as computeImplicitDeleteEdges, fn as canonicalizeRegion, ft as describeTypeWithThrottleRetry, g as ccRoutedFinalSnapshotError, gt as isThrottlingError, h as buildFinalSnapshotIdentifier, hn as processStackMessages, ht as isRetryableTransientError, i as DeploymentEventsReader, in as warnDeprecatedNoPrefixCliFlag, it as requireConfigString, j as red, jn as MissingCdkCliError, jt as AssetModeResolver, k as gray, kn as LocalStartServiceError, kt as loadPublishableAssetManifest, l as replayRollback, ln as uploadCfnTemplate, lt as s3BucketWebsiteUrl, m as PRE_DELETE_SNAPSHOT_TYPES, mn as AssemblyReader, mt as isMarkedNonRetryable, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as resolveUseCdkBootstrapAssets, nt as requireConfigArray, o as planFailedOps, on as CFN_TEMPLATE_URL_LIMIT, ot as s3BucketDomainName, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as derivePartitionAndUrlSuffix, pt as withRetry, q as WAFv2WebACLProvider, qt as synthesisStatusMessage, r as DeployEngine, rn as stateBucketExistenceConfirmed, rt as requireConfigObject, s as planRollback, sn as MIGRATE_TMP_PREFIX, st as s3BucketDualStackDomainName, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as resolveStateBucketWithDefaultAndSource, tt as replayWarn, u as withResourceDeadline, un as expectedOwnerParam, ut as applyRoleArnIfSet, v as isFinalSnapshotError, vn as AwsClients, vt as DagBuilder, w as isStatefulRecreateTargetSync, wt as AssetPublisher, x as makeCanonicalizePropertiesFn, xn as setAwsClients, xt as S3StateBackend, y as refusesFinalSnapshot, yn as getAwsClients, yt as TemplateParser, z as CloudControlProvider, zt as buildDockerImage } from "./deploy-engine-C605sBVJ.js";
|
|
3
3
|
import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, 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-CZQewQcH.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";
|
|
@@ -3032,7 +3032,8 @@ var IAMManagedPolicyProvider = class {
|
|
|
3032
3032
|
this.logger.debug(`${reason} changed, replacing managed policy: ${physicalId} (${reason} mutation)`);
|
|
3033
3033
|
const createResult = await this.create(logicalId, resourceType, properties);
|
|
3034
3034
|
try {
|
|
3035
|
-
await this.delete(logicalId, physicalId, resourceType, previousProperties);
|
|
3035
|
+
const deleteResult = await this.delete(logicalId, physicalId, resourceType, previousProperties);
|
|
3036
|
+
if (deleteResult?.outcome === "skipped") this.logger.warn(`Skipped deleting old managed policy ${physicalId} during replacement: ${deleteResult.reason}. The old policy may be orphaned and require manual cleanup.`);
|
|
3036
3037
|
} catch (error) {
|
|
3037
3038
|
this.logger.warn(`Failed to delete old managed policy ${physicalId} during replacement: ${String(error)}. The old policy may be orphaned and require manual cleanup.`);
|
|
3038
3039
|
}
|
|
@@ -10399,11 +10400,16 @@ var SNSSubscriptionProvider = class {
|
|
|
10399
10400
|
*/
|
|
10400
10401
|
async update(logicalId, physicalId, resourceType, properties, _previousProperties) {
|
|
10401
10402
|
this.logger.debug(`Updating SNS subscription ${logicalId}: ${physicalId}`);
|
|
10403
|
+
let deleteResult = void 0;
|
|
10402
10404
|
try {
|
|
10403
|
-
await this.delete(logicalId, physicalId, resourceType);
|
|
10405
|
+
deleteResult = await this.delete(logicalId, physicalId, resourceType);
|
|
10404
10406
|
} catch (error) {
|
|
10405
10407
|
this.logger.warn(`Failed to delete old subscription ${physicalId} during update: ${String(error)}`);
|
|
10406
10408
|
}
|
|
10409
|
+
if (deleteResult?.outcome === "skipped") {
|
|
10410
|
+
this.logger.warn(`Cannot replace SNS subscription ${logicalId}: the old subscription ${physicalId} was not deleted — ${deleteResult.reason}`);
|
|
10411
|
+
throw markNonRetryable(new ProvisioningError(`Cannot replace SNS subscription ${logicalId}: cdkd could not delete the old subscription, and creating the replacement would leave both subscribed to the topic and deliver every message twice. See the warning naming ${logicalId} for the recorded physical id and the cause. Repair the state record for ${logicalId}, or remove the old subscription in AWS if it is still live, then re-run.`, resourceType, logicalId, physicalId));
|
|
10412
|
+
}
|
|
10407
10413
|
const createResult = await this.create(logicalId, resourceType, properties);
|
|
10408
10414
|
return {
|
|
10409
10415
|
physicalId: createResult.physicalId,
|
|
@@ -10439,6 +10445,27 @@ var SNSSubscriptionProvider = class {
|
|
|
10439
10445
|
}
|
|
10440
10446
|
/**
|
|
10441
10447
|
* Log the CFn-parity skip for a pending-confirmation subscription delete.
|
|
10448
|
+
*
|
|
10449
|
+
* **Do NOT convert either caller into a `ResourceDeleteResult` skip** (the
|
|
10450
|
+
* issue [#1770](https://github.com/go-to-k/cdkd/issues/1770) sweep) — the
|
|
10451
|
+
* note lives here rather than only at `update()` because this is where a
|
|
10452
|
+
* future converter looks. Both arms mean the resource is GONE as far as the
|
|
10453
|
+
* stack is concerned: CloudFormation removes a pending-confirmation
|
|
10454
|
+
* subscription from the stack without unsubscribing, and the pending record
|
|
10455
|
+
* expires on its own, so `deleted` is the honest outcome and a skip would
|
|
10456
|
+
* preserve state and fail an otherwise-clean destroy for no reason.
|
|
10457
|
+
*
|
|
10458
|
+
* There is a second consequence, and it is why the warning is this loud:
|
|
10459
|
+
* `update()` ABORTS the DELETE-first replacement on a skip (issue
|
|
10460
|
+
* [#1778](https://github.com/go-to-k/cdkd/issues/1778)). Reporting a skip
|
|
10461
|
+
* here would therefore make every deploy of a subscription whose state
|
|
10462
|
+
* physicalId is the `PendingConfirmation` placeholder — reachable via
|
|
10463
|
+
* `cdkd import --resource <id>=PendingConfirmation` — throw permanently,
|
|
10464
|
+
* with no flag to force it, and `cdkd drift --revert` would fail the same
|
|
10465
|
+
* way. Exempting that placeholder from the abort was the alternative and
|
|
10466
|
+
* was rejected: it would duplicate this method's knowledge of the
|
|
10467
|
+
* placeholder inside `update()`, where a later change to the accepted set
|
|
10468
|
+
* would silently un-fence the abort.
|
|
10442
10469
|
*/
|
|
10443
10470
|
logPendingConfirmationSkip(logicalId, physicalId) {
|
|
10444
10471
|
this.logger.warn(`SNS subscription ${logicalId} (${physicalId}) is pending confirmation and cannot be unsubscribed; skipping deletion to match CloudFormation behavior (the pending record expires automatically within 3 days)`);
|
|
@@ -53511,7 +53538,7 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
53511
53538
|
} catch (retryError) {
|
|
53512
53539
|
lastDeleteError = retryError;
|
|
53513
53540
|
const msg = retryError instanceof Error ? retryError.message : String(retryError);
|
|
53514
|
-
if (!(isRetryableTransientError(retryError, msg) || msg.includes("Too Many Requests")) || attempt >= maxAttempts) break;
|
|
53541
|
+
if (!(!isMarkedNonRetryable(retryError) && (isRetryableTransientError(retryError, msg) || msg.includes("Too Many Requests"))) || attempt >= maxAttempts) break;
|
|
53515
53542
|
const delay = 5e3 * Math.pow(2, attempt);
|
|
53516
53543
|
logger.debug(` ⏳ Retrying delete ${logicalId} in ${delay / 1e3}s (attempt ${attempt + 1}/${maxAttempts})`);
|
|
53517
53544
|
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
@@ -54209,7 +54236,8 @@ var ACMCertificateProvider = class {
|
|
|
54209
54236
|
this.logger.debug(`${changedImmutable} changed, replacing ACM certificate: ${physicalId}`);
|
|
54210
54237
|
const createResult = await this.create(logicalId, resourceType, properties);
|
|
54211
54238
|
try {
|
|
54212
|
-
await this.delete(logicalId, physicalId, resourceType, previousProperties);
|
|
54239
|
+
const deleteResult = await this.delete(logicalId, physicalId, resourceType, previousProperties);
|
|
54240
|
+
if (deleteResult?.outcome === "skipped") this.logger.warn(`Skipped deleting old ACM certificate ${physicalId} during replacement: ${deleteResult.reason}. The old certificate may be orphaned and require manual cleanup.`);
|
|
54213
54241
|
} catch (error) {
|
|
54214
54242
|
this.logger.warn(`Failed to delete old ACM certificate ${physicalId} during replacement: ${String(error)}. The old certificate may be orphaned and require manual cleanup.`);
|
|
54215
54243
|
}
|
|
@@ -76590,7 +76618,7 @@ function createMigrateCommand() {
|
|
|
76590
76618
|
*/
|
|
76591
76619
|
function buildProgram() {
|
|
76592
76620
|
const program = new Command();
|
|
76593
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.283.
|
|
76621
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.283.4");
|
|
76594
76622
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
76595
76623
|
const { profile } = actionCommand.optsWithGlobals();
|
|
76596
76624
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|