@go-to-k/cdkd 0.283.7 → 0.283.8
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-o7QsopaI.js → asg-provider-Tu4sDbhu.js} +2 -2
- package/dist/{asg-provider-o7QsopaI.js.map → asg-provider-Tu4sDbhu.js.map} +1 -1
- package/dist/cli.js +28 -24
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-CKpBSlde.js → deploy-engine-D95wmKN8.js} +170 -32
- package/dist/deploy-engine-D95wmKN8.js.map +1 -0
- package/dist/index.d.ts +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-CKpBSlde.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as coerceCfnBoolean, $t as resolveAutoAssetStorage, A as cyan, An as LocalMigrateError, At as createAssetRedirectResolver, B as findSilentDropProperties, Bn as StackTerminationProtectionError, Bt as buildDenyExternalAccessPolicy, C as makeCanonicalizePropertiesFn, Cn as setAwsClients, Ct as S3StateBackend, D as renderStatefulReason, Dt as stringifyValue, E as isStatefulRecreateTargetSync, Et as AssetPublisher, F as IAMRoleProvider, Fn as PartialFailureError, Ft as ensureAssetStorage, G as IntrinsicFunctionResolver, Gn as normalizeAwsError, Gt as runDockerStreaming, H as slowCcOperationTimeoutMs, Ht as formatDockerLoginError, I as collectInlinePolicyNamesManagedBySiblings, In as ProvisioningError, It as getBootstrapMarkerKey, J as refStateLookupFromResource, Jt as Synthesizer, K as cfnRefValueFromPhysicalId, Kn as withErrorHandling, Kt as AssetManifestLoader, L as clearOnUpdateRemoval, Ln as ResourceTimeoutError, Lt as parseBootstrapMarker, M as green, Mt as rewriteTemplateAssetReferences, N as red, Nn as MissingCdkCliError, Nt as AssetModeResolver, O as formatResourceLine, On as DeployCancelledError, Ot as WorkGraph, P as yellow, Pn as NestedStackChildDirectDestroyError, Pt as BOOTSTRAP_MARKER_PREFIX, Q as assertRegionMatch, Qt as resolveApp, R as ProviderRegistry, Rn as ResourceUpdateNotSupportedError, Rt as validateAssetBucketName, S as unsupportedFinalSnapshotError, Sn as resetAwsClients, St as LockManager, T as MULTI_REGION_RECREATE_BLOCKED_TYPES, Tn as CdkdError, Tt as shouldRetainResource, U as disableInstanceApiTermination, Ut as getDockerCmd, V as CloudControlProvider, Vt as buildDockerImage, W as isTerminationProtectionPropagationError, Wt as runDockerForeground, X as normalizeAwsTagsToCfn, Xt as getDefaultStateBucketName, Y as WAFv2WebACLProvider, Yt as synthesisStatusMessage, Z as resolveExplicitPhysicalId, Zt as getLegacyStateBucketName, _ as buildFinalSnapshotIdentifier, _n as processStackMessages, _t as isRetryableTransientError, a as DeploymentEventsStore, an as stateBucketExistenceConfirmed, at as requireConfigObject, b as isFinalSnapshotError, bn as AwsClients, bt as DagBuilder, c as replayFailedOperations, cn as CFN_TEMPLATE_URL_LIMIT, ct as s3BucketDomainName, d as deleteSkipReason, dn as uploadCfnTemplate, dt as s3BucketWebsiteUrl, en as resolveCaptureObservedState, et as configBooleanRefusal, f as withResourceDeadline, fn as expectedOwnerParam, ft as applyRoleArnIfSet, g as PRE_DELETE_SNAPSHOT_TYPES, gn as AssemblyReader, gt as isMarkedNonRetryable, h as ATOMIC_FINAL_SNAPSHOT_TYPES, hn as derivePartitionAndUrlSuffix, ht as withRetry, i as DeploymentEventsReader, in as resolveUseCdkBootstrapAssets, it as requireConfigArray, j as gray, jn as LocalStartServiceError, jt as loadPublishableAssetManifest, k as bold, kn as LocalInvokeBuildError$1, kt as buildAssetRedirectMap, l as replayRollback, ln as MIGRATE_TMP_PREFIX, lt as s3BucketDualStackDomainName, m as computeImplicitDeleteEdges, mn as canonicalizeRegion, mt as describeTypeWithThrottleRetry, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as resolveStateBucketWithDefault, nt as readConfigString, o as planFailedOps, on as warnDeprecatedNoPrefixCliFlag, ot as requireConfigString, p as IMPLICIT_DELETE_DEPENDENCIES, pn as PARTITION_TABLE, pt as DiffCalculator, q as getAccountInfo, qt as getDockerImageBySourceHash, r as DeployEngine, rn as resolveStateBucketWithDefaultAndSource, rt as replayWarn, s as planRollback, sn as CFN_TEMPLATE_BODY_LIMIT, st as s3BucketArn, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as resolveSkipPrefix, tt as configStringRefusal, u as UNSPECIFIED_SKIP_REASON, un as findLargeInlineResources, ut as s3BucketRegionalDomainName, v as ccRoutedFinalSnapshotError, vt as isThrottlingError, w as extractDeploymentEventError, wt as rebuildClientForBucketRegion, x as refusesFinalSnapshot, xn as getAwsClients, xt as TemplateParser, y as createPreDeleteFinalSnapshot, yn as resolveBucketRegion, yt as markNonRetryable, z as findActionableSilentDrops, zn as StackHasActiveImportsError, zt as validateContainerRepoName } from "./deploy-engine-D95wmKN8.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-Tu4sDbhu.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";
|
|
@@ -2649,7 +2649,7 @@ const POLICY_NO_TARGET_SKIP_REASON = "no Roles/Groups/Users in state — no dele
|
|
|
2649
2649
|
* removed by hand. Mirrors the caveat `compositeIdFormatMessage` already
|
|
2650
2650
|
* carries for the composite-id family.
|
|
2651
2651
|
*/
|
|
2652
|
-
const DEPLOY_SKIP_CAVEAT$3 = "NOTE this arm is ALSO reached from cdkd deploy
|
|
2652
|
+
const DEPLOY_SKIP_CAVEAT$3 = "NOTE this arm is ALSO reached from cdkd deploy. Since issue 1762 the DELETE of a resource removed from the template behaves like destroy — the record is KEPT and the next deploy re-attempts it — but a REPLACEMENT / rollback delete FAILS the resource instead (https://github.com/go-to-k/cdkd/issues/1762), leaving the old one untracked; there, remove the resource by hand.";
|
|
2653
2653
|
/**
|
|
2654
2654
|
* AWS IAM Policy Provider
|
|
2655
2655
|
*
|
|
@@ -3966,7 +3966,7 @@ const MEMBERSHIP_MISSING_FIELDS_SKIP_REASON = "GroupName/Users missing from stat
|
|
|
3966
3966
|
* be removed by hand. Mirrors the caveat `compositeIdFormatMessage` already
|
|
3967
3967
|
* carries for the composite-id family.
|
|
3968
3968
|
*/
|
|
3969
|
-
const DEPLOY_SKIP_CAVEAT$2 = "NOTE this arm is ALSO reached from cdkd deploy
|
|
3969
|
+
const DEPLOY_SKIP_CAVEAT$2 = "NOTE this arm is ALSO reached from cdkd deploy. Since issue 1762 the DELETE of a resource removed from the template behaves like destroy — the record is KEPT and the next deploy re-attempts it — but a REPLACEMENT / rollback delete FAILS the resource instead (https://github.com/go-to-k/cdkd/issues/1762), leaving the old one untracked; there, remove the memberships by hand.";
|
|
3970
3970
|
/**
|
|
3971
3971
|
* AWS IAM User / Group / UserToGroupAddition Provider
|
|
3972
3972
|
*
|
|
@@ -11857,7 +11857,7 @@ const PERMISSION_STATEMENT_ID_SKIP_REASON = "empty StatementId in state physical
|
|
|
11857
11857
|
* carries for the composite-id family; a remedy that is impossible on the path
|
|
11858
11858
|
* the user is actually on is worse than no remedy.
|
|
11859
11859
|
*/
|
|
11860
|
-
const DEPLOY_SKIP_CAVEAT$1 = "NOTE this arm is ALSO reached from cdkd deploy
|
|
11860
|
+
const DEPLOY_SKIP_CAVEAT$1 = "NOTE this arm is ALSO reached from cdkd deploy. Since issue 1762 the DELETE of a resource removed from the template behaves like destroy — the record is KEPT and the next deploy re-attempts it — but a REPLACEMENT / rollback delete FAILS the resource instead (https://github.com/go-to-k/cdkd/issues/1762), leaving the old one untracked; there, remove the resource by hand.";
|
|
11861
11861
|
/**
|
|
11862
11862
|
* AWS Lambda Permission Provider
|
|
11863
11863
|
*
|
|
@@ -12834,14 +12834,14 @@ const LAYER_VERSION_SKIP_REASON = "unparsable version in state LayerVersionArn
|
|
|
12834
12834
|
* The deploy-side caveat both skip warnings in this file carry (issue
|
|
12835
12835
|
* [#1762](https://github.com/go-to-k/cdkd/issues/1762)).
|
|
12836
12836
|
*
|
|
12837
|
-
* "Repair state.json and re-run"
|
|
12838
|
-
*
|
|
12839
|
-
*
|
|
12840
|
-
*
|
|
12841
|
-
* removed by hand. Mirrors the caveat
|
|
12842
|
-
* carries for the composite-id family.
|
|
12837
|
+
* "Repair state.json and re-run" holds on DESTROY and, since #1762, on the
|
|
12838
|
+
* deploy engine's template-removal DELETE — both keep the record. It does NOT
|
|
12839
|
+
* hold for a deploy-side REPLACEMENT or rollback delete: those now FAIL the
|
|
12840
|
+
* resource rather than reporting success, and the old resource can be left
|
|
12841
|
+
* untracked, so it has to be removed by hand. Mirrors the caveat
|
|
12842
|
+
* `compositeIdFormatMessage` carries for the composite-id family.
|
|
12843
12843
|
*/
|
|
12844
|
-
const DEPLOY_SKIP_CAVEAT = "NOTE this arm is ALSO reached from cdkd deploy
|
|
12844
|
+
const DEPLOY_SKIP_CAVEAT = "NOTE this arm is ALSO reached from cdkd deploy. Since issue 1762 the DELETE of a resource removed from the template behaves like destroy — the record is KEPT and the next deploy re-attempts it — but a REPLACEMENT / rollback delete FAILS the resource instead (https://github.com/go-to-k/cdkd/issues/1762), leaving the old one untracked; there, remove the resource by hand.";
|
|
12845
12845
|
/**
|
|
12846
12846
|
* AWS Lambda LayerVersion Provider
|
|
12847
12847
|
*
|
|
@@ -13194,19 +13194,20 @@ function formatShape(segments) {
|
|
|
13194
13194
|
* prints a `⚠ … skipped` line instead of `✓ … deleted`, reports
|
|
13195
13195
|
* `N deleted, 1 skipped`, KEEPS the state record, and exits non-zero. The
|
|
13196
13196
|
* wording here changed accordingly — it used to promise unconditionally that
|
|
13197
|
-
* cdkd "will report this delete as successful", which is no longer true on
|
|
13198
|
-
*
|
|
13199
|
-
*
|
|
13200
|
-
*
|
|
13201
|
-
*
|
|
13202
|
-
*
|
|
13203
|
-
*
|
|
13197
|
+
* cdkd "will report this delete as successful", which is no longer true on
|
|
13198
|
+
* either path. Issue [#1762](https://github.com/go-to-k/cdkd/issues/1762) then
|
|
13199
|
+
* taught the deploy engine to consume the outcome too, so the message no longer
|
|
13200
|
+
* warns that deploy drops the record: the template-removal DELETE keeps it,
|
|
13201
|
+
* exactly like destroy. What it DOES still distinguish is the replacement /
|
|
13202
|
+
* rollback delete, which fails the resource and can leave the old one
|
|
13203
|
+
* untracked — there "drop the record with 'cdkd state orphan'" is not the
|
|
13204
|
+
* remedy, deleting the resource by hand is.
|
|
13204
13205
|
*/
|
|
13205
13206
|
function compositeIdFormatMessage(format, logicalId, physicalId, options) {
|
|
13206
13207
|
const accepted = format.alsoAccepts ? `"${formatShape(format.segments)}" or ${format.alsoAccepts}` : `"${formatShape(format.segments)}"`;
|
|
13207
13208
|
const head = `Invalid physicalId format for ${format.label} ${logicalId}: expected ${accepted}, got "${physicalId}"`;
|
|
13208
13209
|
if (!options?.skipping) return head;
|
|
13209
|
-
return `${head}. Skipping the delete — no AWS call is issued, so the resource is LEFT IN PLACE.
|
|
13210
|
+
return `${head}. Skipping the delete — no AWS call is issued, so the resource is LEFT IN PLACE. The state record is KEPT and the run reports the skip: on 'cdkd destroy' / 'cdkd state destroy' (which exits non-zero) and, since issue 1762, on the plain DELETE of a resource removed from the template during cdkd deploy (which re-attempts it on the next deploy). So repair the id in state.json and re-run, or delete the resource by hand and drop the record with 'cdkd state orphan'. NOTE a deploy-side REPLACEMENT or rollback delete instead FAILS the resource (https://github.com/go-to-k/cdkd/issues/1762) — the old resource is left untracked there, so delete it by hand.`;
|
|
13210
13211
|
}
|
|
13211
13212
|
/**
|
|
13212
13213
|
* The short `ResourceDeleteResult.reason` every malformed-composite-id DELETE
|
|
@@ -53907,7 +53908,8 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
53907
53908
|
});
|
|
53908
53909
|
renderer.removeTask(logicalId);
|
|
53909
53910
|
if (deleteResult?.outcome === "skipped") {
|
|
53910
|
-
|
|
53911
|
+
const skipReason = deleteSkipReason(deleteResult) ?? "no reason reported by the provider";
|
|
53912
|
+
logger.info(` ${formatResourceLine("skipped", logicalId, resource.resourceType, `skipped (${skipReason})`)}`);
|
|
53911
53913
|
result.skippedCount++;
|
|
53912
53914
|
skippedStateTargets.add(stateTargetFor(logicalId, resource.resourceType));
|
|
53913
53915
|
ctx.eventRecorder?.record({
|
|
@@ -53918,7 +53920,7 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
53918
53920
|
resourceType: resource.resourceType,
|
|
53919
53921
|
...resource.provisionedBy && { provisionedBy: resource.provisionedBy },
|
|
53920
53922
|
...resource.physicalId && { physicalId: resource.physicalId },
|
|
53921
|
-
reason:
|
|
53923
|
+
reason: skipReason,
|
|
53922
53924
|
durationMs: Date.now() - resourceStartedAt
|
|
53923
53925
|
});
|
|
53924
53926
|
return;
|
|
@@ -55458,6 +55460,7 @@ async function deployCommand(stacks, options) {
|
|
|
55458
55460
|
logger.info(` Created: ${deployResult.created > 0 ? green(deployResult.created) : gray(deployResult.created)}`);
|
|
55459
55461
|
logger.info(` Updated: ${deployResult.updated > 0 ? yellow(deployResult.updated) : gray(deployResult.updated)}`);
|
|
55460
55462
|
logger.info(` Deleted: ${deployResult.deleted > 0 ? red(deployResult.deleted) : gray(deployResult.deleted)}`);
|
|
55463
|
+
if (deployResult.deleteSkipped > 0) logger.info(` Skipped (not deleted): ${yellow(deployResult.deleteSkipped)}`);
|
|
55461
55464
|
logger.info(` Unchanged: ${gray(deployResult.unchanged)}`);
|
|
55462
55465
|
logger.info(` Duration: ${cyan((deployResult.durationMs / 1e3).toFixed(2) + "s")}`);
|
|
55463
55466
|
if (deployResult.attributeFallbackCount > 0) logger.warn(`${deployResult.attributeFallbackCount} attribute resolution(s) fell back to the physical ID (potentially wrong values); re-run with --strict-getatt to fail on these`);
|
|
@@ -55470,7 +55473,8 @@ async function deployCommand(stacks, options) {
|
|
|
55470
55473
|
recordRunSucceeded(eventRecorder, stackInfo.stackName, {
|
|
55471
55474
|
created: deployResult.created,
|
|
55472
55475
|
updated: deployResult.updated,
|
|
55473
|
-
deleted: deployResult.deleted
|
|
55476
|
+
deleted: deployResult.deleted,
|
|
55477
|
+
...deployResult.deleteSkipped > 0 && { skipped: deployResult.deleteSkipped }
|
|
55474
55478
|
}, deployResult.durationMs);
|
|
55475
55479
|
} catch (deployError) {
|
|
55476
55480
|
if (deployError instanceof DeployCancelledError) return;
|
|
@@ -77185,7 +77189,7 @@ function createMigrateCommand() {
|
|
|
77185
77189
|
*/
|
|
77186
77190
|
function buildProgram() {
|
|
77187
77191
|
const program = new Command();
|
|
77188
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.283.
|
|
77192
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.283.8");
|
|
77189
77193
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
77190
77194
|
const { profile } = actionCommand.optsWithGlobals();
|
|
77191
77195
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|