@go-to-k/cdkd 0.278.38 → 0.278.39
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-CaulrRij.js → asg-provider-CJJC8plY.js} +2 -2
- package/dist/{asg-provider-CaulrRij.js.map → asg-provider-CJJC8plY.js.map} +1 -1
- package/dist/cli.js +93 -38
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-DIvnBeMj.js → deploy-engine-BJVpWi-B.js} +5 -4
- package/dist/deploy-engine-BJVpWi-B.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-DIvnBeMj.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as describeTypeWithThrottleRetry, $t as AwsClients, A as red, At as Synthesizer, B as isTerminationProtectionPropagationError, Bt as resolveUseCdkBootstrapAssets, C as isStatefulRecreateTargetSync, Ct as buildDockerImage, D as cyan, Dt as runDockerStreaming, E as bold, Et as runDockerForeground, F as ProviderRegistry, Ft as resolveAutoAssetStorage, G as normalizeAwsTagsToCfn, Gt as MIGRATE_TMP_PREFIX, H as cfnRefValueFromPhysicalId, Ht as warnDeprecatedNoPrefixCliFlag, I as findActionableSilentDrops, It as resolveCaptureObservedState, J as readConfigString, Jt as expectedOwnerParam, K as resolveExplicitPhysicalId, Kt as findLargeInlineResources, L as CloudControlProvider, Lt as resolveSkipPrefix, M as IAMRoleProvider, Mt as getDefaultStateBucketName, N as collectInlinePolicyNamesManagedBySiblings, Nt as getLegacyStateBucketName, O as gray, Ot as AssetManifestLoader, P as clearOnUpdateRemoval, Pt as resolveApp, Q as DiffCalculator, Qt as resolveBucketRegion, R as slowCcOperationTimeoutMs, Rt as resolveStateBucketWithDefault, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as validateContainerRepoName, T as formatResourceLine, Tn as withErrorHandling, Tt as getDockerCmd, U as refStateLookupFromResource, Ut as CFN_TEMPLATE_BODY_LIMIT, V as IntrinsicFunctionResolver, Vt as stateBucketExistenceConfirmed, W as WAFv2WebACLProvider, Wt as CFN_TEMPLATE_URL_LIMIT, X as requireConfigString, Xt as processStackMessages, Y as requireConfigArray, Yt as AssemblyReader, Z as applyRoleArnIfSet, _ as createPreDeleteFinalSnapshot, _n as ResourceUpdateNotSupportedError, _t as BOOTSTRAP_MARKER_PREFIX, a as DeploymentEventsStore, at as LockManager, b as unsupportedFinalSnapshotError, bt as parseBootstrapMarker, c as replayFailedOperations, cn as LocalInvokeBuildError$1, ct as shouldRetainResource, d as IMPLICIT_DELETE_DEPENDENCIES, dt as WorkGraph, en as getAwsClients, et as withRetry, f as computeImplicitDeleteEdges, fn as MissingCdkCliError, ft as buildAssetRedirectMap, g as ccRoutedFinalSnapshotError, gn as ResourceTimeoutError, gt as AssetModeResolver, h as buildFinalSnapshotIdentifier, hn as ProvisioningError, ht as rewriteTemplateAssetReferences, i as DeploymentEventsReader, in as CdkdError, it as TemplateParser, j as yellow, jt as synthesisStatusMessage, k as green, kt as getDockerImageBySourceHash, l as replayRollback, ln as LocalMigrateError, lt as AssetPublisher, m as PRE_DELETE_SNAPSHOT_TYPES, mn as PartialFailureError, mt as loadPublishableAssetManifest, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as setAwsClients, nt as isThrottlingError, o as planFailedOps, ot as S3StateBackend, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as NestedStackChildDirectDestroyError, pt as createAssetRedirectResolver, q as assertRegionMatch, qt as uploadCfnTemplate, r as DeployEngine, rt as DagBuilder, s as planRollback, sn as DeployCancelledError, st as rebuildClientForBucketRegion, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as resetAwsClients, tt as isRetryableTransientError, u as withResourceDeadline, un as LocalStartServiceError, ut as stringifyValue, v as isFinalSnapshotError, vn as StackHasActiveImportsError, vt as ensureAssetStorage, w as renderStatefulReason, wn as normalizeAwsError, wt as formatDockerLoginError, x as extractDeploymentEventError, xt as validateAssetBucketName, y as refusesFinalSnapshot, yn as StackTerminationProtectionError, yt as getBootstrapMarkerKey, z as disableInstanceApiTermination, zt as resolveStateBucketWithDefaultAndSource } from "./deploy-engine-
|
|
2
|
+
import { $ as describeTypeWithThrottleRetry, $t as AwsClients, A as red, At as Synthesizer, B as isTerminationProtectionPropagationError, Bt as resolveUseCdkBootstrapAssets, C as isStatefulRecreateTargetSync, Ct as buildDockerImage, D as cyan, Dt as runDockerStreaming, E as bold, Et as runDockerForeground, F as ProviderRegistry, Ft as resolveAutoAssetStorage, G as normalizeAwsTagsToCfn, Gt as MIGRATE_TMP_PREFIX, H as cfnRefValueFromPhysicalId, Ht as warnDeprecatedNoPrefixCliFlag, I as findActionableSilentDrops, It as resolveCaptureObservedState, J as readConfigString, Jt as expectedOwnerParam, K as resolveExplicitPhysicalId, Kt as findLargeInlineResources, L as CloudControlProvider, Lt as resolveSkipPrefix, M as IAMRoleProvider, Mt as getDefaultStateBucketName, N as collectInlinePolicyNamesManagedBySiblings, Nt as getLegacyStateBucketName, O as gray, Ot as AssetManifestLoader, P as clearOnUpdateRemoval, Pt as resolveApp, Q as DiffCalculator, Qt as resolveBucketRegion, R as slowCcOperationTimeoutMs, Rt as resolveStateBucketWithDefault, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as validateContainerRepoName, T as formatResourceLine, Tn as withErrorHandling, Tt as getDockerCmd, U as refStateLookupFromResource, Ut as CFN_TEMPLATE_BODY_LIMIT, V as IntrinsicFunctionResolver, Vt as stateBucketExistenceConfirmed, W as WAFv2WebACLProvider, Wt as CFN_TEMPLATE_URL_LIMIT, X as requireConfigString, Xt as processStackMessages, Y as requireConfigArray, Yt as AssemblyReader, Z as applyRoleArnIfSet, _ as createPreDeleteFinalSnapshot, _n as ResourceUpdateNotSupportedError, _t as BOOTSTRAP_MARKER_PREFIX, a as DeploymentEventsStore, at as LockManager, b as unsupportedFinalSnapshotError, bt as parseBootstrapMarker, c as replayFailedOperations, cn as LocalInvokeBuildError$1, ct as shouldRetainResource, d as IMPLICIT_DELETE_DEPENDENCIES, dt as WorkGraph, en as getAwsClients, et as withRetry, f as computeImplicitDeleteEdges, fn as MissingCdkCliError, ft as buildAssetRedirectMap, g as ccRoutedFinalSnapshotError, gn as ResourceTimeoutError, gt as AssetModeResolver, h as buildFinalSnapshotIdentifier, hn as ProvisioningError, ht as rewriteTemplateAssetReferences, i as DeploymentEventsReader, in as CdkdError, it as TemplateParser, j as yellow, jt as synthesisStatusMessage, k as green, kt as getDockerImageBySourceHash, l as replayRollback, ln as LocalMigrateError, lt as AssetPublisher, m as PRE_DELETE_SNAPSHOT_TYPES, mn as PartialFailureError, mt as loadPublishableAssetManifest, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as setAwsClients, nt as isThrottlingError, o as planFailedOps, ot as S3StateBackend, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as NestedStackChildDirectDestroyError, pt as createAssetRedirectResolver, q as assertRegionMatch, qt as uploadCfnTemplate, r as DeployEngine, rt as DagBuilder, s as planRollback, sn as DeployCancelledError, st as rebuildClientForBucketRegion, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as resetAwsClients, tt as isRetryableTransientError, u as withResourceDeadline, un as LocalStartServiceError, ut as stringifyValue, v as isFinalSnapshotError, vn as StackHasActiveImportsError, vt as ensureAssetStorage, w as renderStatefulReason, wn as normalizeAwsError, wt as formatDockerLoginError, x as extractDeploymentEventError, xt as validateAssetBucketName, y as refusesFinalSnapshot, yn as StackTerminationProtectionError, yt as getBootstrapMarkerKey, z as disableInstanceApiTermination, zt as resolveStateBucketWithDefaultAndSource } from "./deploy-engine-BJVpWi-B.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-CJJC8plY.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";
|
|
@@ -7600,27 +7600,12 @@ var SNSTopicProvider = class {
|
|
|
7600
7600
|
AttributeValue: dataProtectionPolicy
|
|
7601
7601
|
}));
|
|
7602
7602
|
}
|
|
7603
|
-
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
AttributeName: `${protocol}SuccessFeedbackRoleArn`,
|
|
7610
|
-
AttributeValue: config["SuccessFeedbackRoleArn"]
|
|
7611
|
-
}));
|
|
7612
|
-
if (config["SuccessFeedbackSampleRate"]) await this.snsClient.send(new SetTopicAttributesCommand({
|
|
7613
|
-
TopicArn: topicArn,
|
|
7614
|
-
AttributeName: `${protocol}SuccessFeedbackSampleRate`,
|
|
7615
|
-
AttributeValue: stringifyValue(config["SuccessFeedbackSampleRate"])
|
|
7616
|
-
}));
|
|
7617
|
-
if (config["FailureFeedbackRoleArn"]) await this.snsClient.send(new SetTopicAttributesCommand({
|
|
7618
|
-
TopicArn: topicArn,
|
|
7619
|
-
AttributeName: `${protocol}FailureFeedbackRoleArn`,
|
|
7620
|
-
AttributeValue: config["FailureFeedbackRoleArn"]
|
|
7621
|
-
}));
|
|
7622
|
-
}
|
|
7623
|
-
}
|
|
7603
|
+
const deliveryStatusAttributes = buildDeliveryStatusAttributeMap(properties["DeliveryStatusLogging"], logicalId, "throw");
|
|
7604
|
+
for (const [attributeName, attributeValue] of deliveryStatusAttributes) await this.snsClient.send(new SetTopicAttributesCommand({
|
|
7605
|
+
TopicArn: topicArn,
|
|
7606
|
+
AttributeName: attributeName,
|
|
7607
|
+
AttributeValue: attributeValue
|
|
7608
|
+
}));
|
|
7624
7609
|
if (Array.isArray(properties["Subscription"])) {
|
|
7625
7610
|
const subscriptions = properties["Subscription"];
|
|
7626
7611
|
for (const sub of subscriptions) await this.subscribeInline(topicArn, sub, logicalId);
|
|
@@ -7727,24 +7712,24 @@ var SNSTopicProvider = class {
|
|
|
7727
7712
|
}
|
|
7728
7713
|
}
|
|
7729
7714
|
if (JSON.stringify(properties["DeliveryStatusLogging"]) !== JSON.stringify(previousProperties["DeliveryStatusLogging"])) {
|
|
7730
|
-
const
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
if (
|
|
7734
|
-
|
|
7735
|
-
AttributeName: `${protocol}SuccessFeedbackRoleArn`,
|
|
7736
|
-
AttributeValue: config["SuccessFeedbackRoleArn"]
|
|
7737
|
-
}));
|
|
7738
|
-
if (config["SuccessFeedbackSampleRate"]) await this.snsClient.send(new SetTopicAttributesCommand({
|
|
7715
|
+
const desiredAttributes = buildDeliveryStatusAttributeMap(properties["DeliveryStatusLogging"], logicalId, "throw");
|
|
7716
|
+
const previousAttributes = buildDeliveryStatusAttributeMap(previousProperties["DeliveryStatusLogging"], logicalId, "skip");
|
|
7717
|
+
for (const [attributeName, attributeValue] of desiredAttributes) {
|
|
7718
|
+
if (previousAttributes.get(attributeName) === attributeValue) continue;
|
|
7719
|
+
await this.snsClient.send(new SetTopicAttributesCommand({
|
|
7739
7720
|
TopicArn: physicalId,
|
|
7740
|
-
AttributeName:
|
|
7741
|
-
AttributeValue:
|
|
7721
|
+
AttributeName: attributeName,
|
|
7722
|
+
AttributeValue: attributeValue
|
|
7742
7723
|
}));
|
|
7743
|
-
|
|
7724
|
+
}
|
|
7725
|
+
for (const attributeName of previousAttributes.keys()) {
|
|
7726
|
+
if (desiredAttributes.has(attributeName)) continue;
|
|
7727
|
+
await this.snsClient.send(new SetTopicAttributesCommand({
|
|
7744
7728
|
TopicArn: physicalId,
|
|
7745
|
-
AttributeName:
|
|
7746
|
-
AttributeValue:
|
|
7729
|
+
AttributeName: attributeName,
|
|
7730
|
+
AttributeValue: deliveryStatusRemovalResetValue(attributeName)
|
|
7747
7731
|
}));
|
|
7732
|
+
this.logger.debug(`Reset removed delivery status attribute ${attributeName} for topic ${physicalId}`);
|
|
7748
7733
|
}
|
|
7749
7734
|
}
|
|
7750
7735
|
if (JSON.stringify(properties["Subscription"]) !== JSON.stringify(previousProperties["Subscription"])) await this.reconcileInlineSubscriptions(physicalId, previousProperties["Subscription"] || [], properties["Subscription"] || [], logicalId);
|
|
@@ -8075,6 +8060,76 @@ const SNS_DELIVERY_STATUS_PROTOCOLS = [
|
|
|
8075
8060
|
"SQS"
|
|
8076
8061
|
];
|
|
8077
8062
|
/**
|
|
8063
|
+
* The per-protocol attribute suffixes an inline `DeliveryStatusLogging`
|
|
8064
|
+
* entry maps to (`<Protocol><Suffix>` flat attribute names on the topic).
|
|
8065
|
+
*/
|
|
8066
|
+
const SNS_DELIVERY_STATUS_ATTRIBUTE_SUFFIXES = [
|
|
8067
|
+
"SuccessFeedbackRoleArn",
|
|
8068
|
+
"SuccessFeedbackSampleRate",
|
|
8069
|
+
"FailureFeedbackRoleArn"
|
|
8070
|
+
];
|
|
8071
|
+
/**
|
|
8072
|
+
* Flatten a CFn `DeliveryStatusLogging` array into the AWS flat attribute
|
|
8073
|
+
* map (`{LambdaSuccessFeedbackRoleArn: '...', ...}`) that
|
|
8074
|
+
* `SetTopicAttributes` consumes one entry at a time.
|
|
8075
|
+
*
|
|
8076
|
+
* Field presence is `!= null`, NOT truthiness, so
|
|
8077
|
+
* `SuccessFeedbackSampleRate: 0` is sent as `'0'` instead of being
|
|
8078
|
+
* silently skipped (the pre-#1160 truthiness gates dropped a 0 sample
|
|
8079
|
+
* rate on create and update alike).
|
|
8080
|
+
*
|
|
8081
|
+
* `onMalformed` picks the failure mode for a malformed container / entry
|
|
8082
|
+
* / unknown protocol: `'throw'` for the DESIRED side (a template error
|
|
8083
|
+
* must fail fast, naming the offending value), `'skip'` for the PREVIOUS
|
|
8084
|
+
* side (cdkd state — refusing a value an older binary recorded would make
|
|
8085
|
+
* the stack permanently undeployable, and an entry whose protocol cannot
|
|
8086
|
+
* be canonicalized maps to no attribute names anyway).
|
|
8087
|
+
*/
|
|
8088
|
+
function buildDeliveryStatusAttributeMap(logging, logicalId, onMalformed) {
|
|
8089
|
+
const map = /* @__PURE__ */ new Map();
|
|
8090
|
+
if (logging == null) return map;
|
|
8091
|
+
if (!Array.isArray(logging)) {
|
|
8092
|
+
if (onMalformed === "skip") return map;
|
|
8093
|
+
throw new Error(`SNS topic ${logicalId}: DeliveryStatusLogging must be an array of {Protocol, ...} objects, got ${JSON.stringify(logging)}`);
|
|
8094
|
+
}
|
|
8095
|
+
for (const entry of logging) {
|
|
8096
|
+
if (entry == null || typeof entry !== "object" || Array.isArray(entry)) {
|
|
8097
|
+
if (onMalformed === "skip") continue;
|
|
8098
|
+
throw new Error(`SNS topic ${logicalId}: DeliveryStatusLogging entries must be {Protocol, ...} objects, got ${JSON.stringify(entry)}`);
|
|
8099
|
+
}
|
|
8100
|
+
const config = entry;
|
|
8101
|
+
let protocol;
|
|
8102
|
+
if (onMalformed === "throw") protocol = normalizeDeliveryStatusProtocolOrThrow(config["Protocol"], logicalId);
|
|
8103
|
+
else {
|
|
8104
|
+
const normalized = normalizeDeliveryStatusProtocol(config["Protocol"]);
|
|
8105
|
+
if (normalized === void 0) continue;
|
|
8106
|
+
protocol = normalized;
|
|
8107
|
+
}
|
|
8108
|
+
for (const suffix of SNS_DELIVERY_STATUS_ATTRIBUTE_SUFFIXES) {
|
|
8109
|
+
const value = config[suffix];
|
|
8110
|
+
if (value == null) continue;
|
|
8111
|
+
map.set(`${protocol}${suffix}`, stringifyValue(value));
|
|
8112
|
+
}
|
|
8113
|
+
}
|
|
8114
|
+
return map;
|
|
8115
|
+
}
|
|
8116
|
+
/**
|
|
8117
|
+
* The `SetTopicAttributes` value that resets a REMOVED per-protocol
|
|
8118
|
+
* delivery status attribute to its CloudFormation-removal state.
|
|
8119
|
+
*
|
|
8120
|
+
* Live CFn A/B (2026-08-10, issue #1160): removing `DeliveryStatusLogging`
|
|
8121
|
+
* from a template clears both RoleArn attributes (AWS accepts `''` as the
|
|
8122
|
+
* clear sentinel — the attribute disappears from `GetTopicAttributes`) and
|
|
8123
|
+
* explicitly resets `SuccessFeedbackSampleRate` to `'0'`. The `''`
|
|
8124
|
+
* sentinel is REJECTED for the sample rate ("value provided is not an
|
|
8125
|
+
* integer between 0-100"), so the numeric reset is the only wire shape
|
|
8126
|
+
* that clears it — the `'0'` attribute itself remains visible on the
|
|
8127
|
+
* topic afterwards, exactly as it does after a CloudFormation removal.
|
|
8128
|
+
*/
|
|
8129
|
+
function deliveryStatusRemovalResetValue(attributeName) {
|
|
8130
|
+
return attributeName.endsWith("SuccessFeedbackSampleRate") ? "0" : "";
|
|
8131
|
+
}
|
|
8132
|
+
/**
|
|
8078
8133
|
* Map a (possibly-mixed-case) protocol string from a CFn template to the
|
|
8079
8134
|
* canonical PascalCase prefix AWS expects on `${Protocol}<Suffix>`
|
|
8080
8135
|
* attribute names.
|
|
@@ -67163,7 +67218,7 @@ function createMigrateCommand() {
|
|
|
67163
67218
|
*/
|
|
67164
67219
|
function buildProgram() {
|
|
67165
67220
|
const program = new Command();
|
|
67166
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.
|
|
67221
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.278.39");
|
|
67167
67222
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
67168
67223
|
const { profile } = actionCommand.optsWithGlobals();
|
|
67169
67224
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|