@go-to-k/cdkd 0.281.4 → 0.281.6
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-B1QR4dCd.js → asg-provider-bIEhcjVs.js} +2 -2
- package/dist/{asg-provider-B1QR4dCd.js.map → asg-provider-bIEhcjVs.js.map} +1 -1
- package/dist/cli.js +93 -6
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-Di4-1RJP.js → deploy-engine-BadwP9FL.js} +19 -7
- package/dist/deploy-engine-BadwP9FL.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-Di4-1RJP.js.map +0 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { $ as requireConfigArray, $t as expectedOwnerParam, A as green, An as withErrorHandling, At as getDockerCmd, B as slowCcOperationTimeoutMs, Bt as resolveAutoAssetStorage, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as StackHasActiveImportsError, Ct as ensureAssetStorage, D as bold, Dt as validateContainerRepoName, E as formatResourceLine, Et as validateAssetBucketName, F as clearOnUpdateRemoval, Ft as Synthesizer, G as refStateLookupFromResource, Gt as resolveUseCdkBootstrapAssets, H as isTerminationProtectionPropagationError, Ht as resolveSkipPrefix, I as ProviderRegistry, It as synthesisStatusMessage, J as resolveExplicitPhysicalId, Jt as CFN_TEMPLATE_BODY_LIMIT, K as WAFv2WebACLProvider, Kt as stateBucketExistenceConfirmed, L as findActionableSilentDrops, Lt as getDefaultStateBucketName, M as yellow, Mt as runDockerStreaming, N as IAMRoleProvider, Nt as AssetManifestLoader, O as cyan, Ot as buildDockerImage, P as collectInlinePolicyNamesManagedBySiblings, Pt as getDockerImageBySourceHash, Q as replayWarn, Qt as uploadCfnTemplate, R as findSilentDropProperties, Rt as getLegacyStateBucketName, S as extractDeploymentEventError, Sn as ResourceUpdateNotSupportedError, St as BOOTSTRAP_MARKER_PREFIX, T as renderStatefulReason, Tt as parseBootstrapMarker, U as IntrinsicFunctionResolver, Ut as resolveStateBucketWithDefault, V as disableInstanceApiTermination, Vt as resolveCaptureObservedState, W as cfnRefValueFromPhysicalId, Wt as resolveStateBucketWithDefaultAndSource, X as configStringRefusal, Xt as MIGRATE_TMP_PREFIX, Y as assertRegionMatch, Yt as CFN_TEMPLATE_URL_LIMIT, Z as readConfigString, Zt as findLargeInlineResources, _ as createPreDeleteFinalSnapshot, _n as MissingCdkCliError, _t as buildAssetRedirectMap, a as DeploymentEventsStore, an as getAwsClients, at as withRetry, b as unsupportedFinalSnapshotError, bn as ProvisioningError, bt as rewriteTemplateAssetReferences, c as replayFailedOperations, ct as DagBuilder, d as IMPLICIT_DELETE_DEPENDENCIES, dt as S3StateBackend, en as AssemblyReader, et as requireConfigObject, f as computeImplicitDeleteEdges, fn as DeployCancelledError, ft as rebuildClientForBucketRegion, g as ccRoutedFinalSnapshotError, gt as WorkGraph, h as buildFinalSnapshotIdentifier, hn as LocalStartServiceError, ht as stringifyValue, i as DeploymentEventsReader, in as AwsClients, it as describeTypeWithThrottleRetry, j as red, jt as runDockerForeground, k as gray, kn as normalizeAwsError, kt as formatDockerLoginError, l as replayRollback, ln as CdkdError, lt as TemplateParser, m as PRE_DELETE_SNAPSHOT_TYPES, mn as LocalMigrateError, mt as AssetPublisher, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as applyRoleArnIfSet, o as planFailedOps, on as resetAwsClients, ot as isRetryableTransientError, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as LocalInvokeBuildError$1, pt as shouldRetainResource, q as normalizeAwsTagsToCfn, qt as warnDeprecatedNoPrefixCliFlag, r as DeployEngine, rn as resolveBucketRegion, rt as DiffCalculator, s as planRollback, sn as setAwsClients, st as isThrottlingError, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as processStackMessages, tt as requireConfigString, u as withResourceDeadline, ut as LockManager, v as isFinalSnapshotError, vn as NestedStackChildDirectDestroyError, vt as createAssetRedirectResolver, w as isStatefulRecreateTargetSync, wn as StackTerminationProtectionError, wt as getBootstrapMarkerKey, x as makeCanonicalizePropertiesFn, xn as ResourceTimeoutError, xt as AssetModeResolver, y as refusesFinalSnapshot, yn as PartialFailureError, yt as loadPublishableAssetManifest, z as CloudControlProvider, zt as resolveApp } from "./deploy-engine-
|
|
2
|
+
import { $ as requireConfigArray, $t as expectedOwnerParam, A as green, An as withErrorHandling, At as getDockerCmd, B as slowCcOperationTimeoutMs, Bt as resolveAutoAssetStorage, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Cn as StackHasActiveImportsError, Ct as ensureAssetStorage, D as bold, Dt as validateContainerRepoName, E as formatResourceLine, Et as validateAssetBucketName, F as clearOnUpdateRemoval, Ft as Synthesizer, G as refStateLookupFromResource, Gt as resolveUseCdkBootstrapAssets, H as isTerminationProtectionPropagationError, Ht as resolveSkipPrefix, I as ProviderRegistry, It as synthesisStatusMessage, J as resolveExplicitPhysicalId, Jt as CFN_TEMPLATE_BODY_LIMIT, K as WAFv2WebACLProvider, Kt as stateBucketExistenceConfirmed, L as findActionableSilentDrops, Lt as getDefaultStateBucketName, M as yellow, Mt as runDockerStreaming, N as IAMRoleProvider, Nt as AssetManifestLoader, O as cyan, Ot as buildDockerImage, P as collectInlinePolicyNamesManagedBySiblings, Pt as getDockerImageBySourceHash, Q as replayWarn, Qt as uploadCfnTemplate, R as findSilentDropProperties, Rt as getLegacyStateBucketName, S as extractDeploymentEventError, Sn as ResourceUpdateNotSupportedError, St as BOOTSTRAP_MARKER_PREFIX, T as renderStatefulReason, Tt as parseBootstrapMarker, U as IntrinsicFunctionResolver, Ut as resolveStateBucketWithDefault, V as disableInstanceApiTermination, Vt as resolveCaptureObservedState, W as cfnRefValueFromPhysicalId, Wt as resolveStateBucketWithDefaultAndSource, X as configStringRefusal, Xt as MIGRATE_TMP_PREFIX, Y as assertRegionMatch, Yt as CFN_TEMPLATE_URL_LIMIT, Z as readConfigString, Zt as findLargeInlineResources, _ as createPreDeleteFinalSnapshot, _n as MissingCdkCliError, _t as buildAssetRedirectMap, a as DeploymentEventsStore, an as getAwsClients, at as withRetry, b as unsupportedFinalSnapshotError, bn as ProvisioningError, bt as rewriteTemplateAssetReferences, c as replayFailedOperations, ct as DagBuilder, d as IMPLICIT_DELETE_DEPENDENCIES, dt as S3StateBackend, en as AssemblyReader, et as requireConfigObject, f as computeImplicitDeleteEdges, fn as DeployCancelledError, ft as rebuildClientForBucketRegion, g as ccRoutedFinalSnapshotError, gt as WorkGraph, h as buildFinalSnapshotIdentifier, hn as LocalStartServiceError, ht as stringifyValue, i as DeploymentEventsReader, in as AwsClients, it as describeTypeWithThrottleRetry, j as red, jt as runDockerForeground, k as gray, kn as normalizeAwsError, kt as formatDockerLoginError, l as replayRollback, ln as CdkdError, lt as TemplateParser, m as PRE_DELETE_SNAPSHOT_TYPES, mn as LocalMigrateError, mt as AssetPublisher, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as applyRoleArnIfSet, o as planFailedOps, on as resetAwsClients, ot as isRetryableTransientError, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as LocalInvokeBuildError$1, pt as shouldRetainResource, q as normalizeAwsTagsToCfn, qt as warnDeprecatedNoPrefixCliFlag, r as DeployEngine, rn as resolveBucketRegion, rt as DiffCalculator, s as planRollback, sn as setAwsClients, st as isThrottlingError, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as processStackMessages, tt as requireConfigString, u as withResourceDeadline, ut as LockManager, v as isFinalSnapshotError, vn as NestedStackChildDirectDestroyError, vt as createAssetRedirectResolver, w as isStatefulRecreateTargetSync, wn as StackTerminationProtectionError, wt as getBootstrapMarkerKey, x as makeCanonicalizePropertiesFn, xn as ResourceTimeoutError, xt as AssetModeResolver, y as refusesFinalSnapshot, yn as PartialFailureError, yt as loadPublishableAssetManifest, z as CloudControlProvider, zt as resolveApp } from "./deploy-engine-BadwP9FL.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-bIEhcjVs.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";
|
|
@@ -5808,7 +5808,9 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
5808
5808
|
continue;
|
|
5809
5809
|
}
|
|
5810
5810
|
const frequency = useScheduleFrequency ? requireConfigString(config["ScheduleFrequency"], "Weekly", "AWS::S3::Bucket InventoryConfigurations[].ScheduleFrequency") : readConfigString(config["Schedule"], "Frequency", "Weekly", "AWS::S3::Bucket InventoryConfigurations[].Schedule");
|
|
5811
|
-
|
|
5811
|
+
const declaresSdkSchedule = config["Schedule"] !== void 0;
|
|
5812
|
+
if (scheduleFrequencyRefusal !== void 0 || declaresSdkSchedule) recordSubstitution(["ScheduleFrequency"], frequency);
|
|
5813
|
+
if (declaresSdkSchedule) sentItem = S3BucketProvider.withoutKey(sentItem ?? config, "Schedule");
|
|
5812
5814
|
const inventoryConfig = {
|
|
5813
5815
|
Id: id,
|
|
5814
5816
|
IsEnabled: config["Enabled"] ?? true,
|
|
@@ -6178,6 +6180,85 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
6178
6180
|
};
|
|
6179
6181
|
}
|
|
6180
6182
|
/**
|
|
6183
|
+
* The REMOVAL twin of {@link withDeepValue}: a copy of `container` without
|
|
6184
|
+
* `key`, sharing every surviving subtree and never mutating the input (same
|
|
6185
|
+
* reason — the input is an item of the caller's DESIRED bag).
|
|
6186
|
+
*
|
|
6187
|
+
* A substitution answers "the value we sent differs from the declared one";
|
|
6188
|
+
* this answers "the KEY we sent does not exist on the readback at all", which
|
|
6189
|
+
* is the shape-mismatch half of the same phantom-drift class (issue #1686).
|
|
6190
|
+
* Setting the key to `undefined` instead would NOT do: `deepEqual` is
|
|
6191
|
+
* `JSON.stringify`, which drops an `undefined` member — but the state record
|
|
6192
|
+
* is written from this object and a present-but-`undefined` key survives a
|
|
6193
|
+
* `structuredClone`, so the two sides would disagree on key COUNT for any
|
|
6194
|
+
* consumer that walks `Object.keys` (the `unionWalkObjects` drift path does).
|
|
6195
|
+
*/
|
|
6196
|
+
static withoutKey(container, key) {
|
|
6197
|
+
if (!(key in container)) return container;
|
|
6198
|
+
const { [key]: _dropped, ...rest } = container;
|
|
6199
|
+
return rest;
|
|
6200
|
+
}
|
|
6201
|
+
/**
|
|
6202
|
+
* The empty-collection placeholder arm of {@link applySubConfigDiffs}: the
|
|
6203
|
+
* Put is SKIPPED, so AWS still holds the previously-applied configuration and
|
|
6204
|
+
* the record must say so (issue #1671).
|
|
6205
|
+
*
|
|
6206
|
+
* Without this the engine recorded `{Rules: []}` / `{CorsRules: []}` — a Put
|
|
6207
|
+
* that never ran, written as though it had. Unlike the malformed-value skips
|
|
6208
|
+
* #1612 settled, this arm is reachable from an ORDINARY template path rather
|
|
6209
|
+
* than only a state replay: a condition-pruned or intrinsic-collapsed
|
|
6210
|
+
* template synthesizes an empty rules array.
|
|
6211
|
+
*
|
|
6212
|
+
* The issue's open question was whether an empty collection is a REMOVAL
|
|
6213
|
+
* intent, which would make the skip itself wrong. **It is not** — measured
|
|
6214
|
+
* against live CloudFormation (us-east-1, 2026-08-12): updating a deployed
|
|
6215
|
+
* bucket to `LifecycleConfiguration: { Rules: [] }` +
|
|
6216
|
+
* `CorsConfiguration: { CorsRules: [] }` drives the stack to
|
|
6217
|
+
* `UPDATE_ROLLBACK_COMPLETE`, and BOTH live configurations survive the
|
|
6218
|
+
* rollback unchanged. So CFn treats the empty collection as an INVALID
|
|
6219
|
+
* template, not as a removal, and the configuration stays. That rules out
|
|
6220
|
+
* the opposite candidate answer: turning this arm into a Delete would both
|
|
6221
|
+
* diverge from CFn and destroy a live configuration the user still wants,
|
|
6222
|
+
* on a template whose only fault is a collapsed array. The registry schema
|
|
6223
|
+
* agrees on the shape (`Rules` / `CorsRules` are REQUIRED, with no
|
|
6224
|
+
* `minItems`, so `[]` parses and only the service refuses it).
|
|
6225
|
+
*
|
|
6226
|
+
* The skip therefore stands and the previous value is what state should
|
|
6227
|
+
* describe — the #1612 UPDATE answer, now with CFn behavior behind it.
|
|
6228
|
+
* Dropping the key instead would be wrong in the other direction: a later
|
|
6229
|
+
* template that genuinely REMOVES the block would derive no removal and the
|
|
6230
|
+
* live configuration would survive forever.
|
|
6231
|
+
*
|
|
6232
|
+
* The skip is also ANNOUNCED rather than silent, because CFn's own answer to
|
|
6233
|
+
* this template is a loud failure — a user whose rules stop being applied
|
|
6234
|
+
* should not have to diff state to find out. It is a warning rather than a
|
|
6235
|
+
* throw so the `readCurrentState` round-trip this arm exists to absorb
|
|
6236
|
+
* (`cdkd drift --revert` feeds an always-emitted empty-rules block back
|
|
6237
|
+
* through `update()`) keeps working.
|
|
6238
|
+
*
|
|
6239
|
+
* `collectionPath` is the WHOLE dotted path as ONE literal
|
|
6240
|
+
* (`'CorsConfiguration.CorsRules'`), never the bare terminal segment, and
|
|
6241
|
+
* that is load-bearing rather than stylistic. `gen-nested-key-coverage`'s key
|
|
6242
|
+
* pass takes the provider's bare string literals as evidence of explicit
|
|
6243
|
+
* per-key handling and keeps the STRICT literal set (only the shape pass
|
|
6244
|
+
* dot-expands), so the two spellings are not interchangeable here. Measured
|
|
6245
|
+
* against the shipped critic: a bare `'CorsRules'` literal anywhere in this
|
|
6246
|
+
* file turns the reviewed `AWS::S3::Bucket#CorsConfiguration.CorsRules`
|
|
6247
|
+
* allow-list entry STALE, while the joined path leaves the audit unchanged.
|
|
6248
|
+
* That entry's whole rationale is that the key is delivered by TYPED PROPERTY
|
|
6249
|
+
* ACCESS in `applyCorsConfiguration` and that its only literal mention is
|
|
6250
|
+
* `readCors`, excluded as a reverse map — so satisfying the critic by
|
|
6251
|
+
* deleting the entry would leave the key classified as handled on nothing but
|
|
6252
|
+
* a warning string, and a later real drop of `CorsRules` would pass in
|
|
6253
|
+
* silence. That is the decoy-literal shape `.claude/rules/providers.md`
|
|
6254
|
+
* forbids.
|
|
6255
|
+
*/
|
|
6256
|
+
emptyCollectionSkip(key, collectionPath, previousProperties, retainPrevious) {
|
|
6257
|
+
const hadPrevious = previousProperties[key] !== void 0;
|
|
6258
|
+
this.logger.warn(`AWS::S3::Bucket ${collectionPath} declares no rules, which CloudFormation rejects outright (the collection is a required property, and an empty one is not a removal intent). Leaving the live ${key} untouched and ` + (hadPrevious ? `recording the previously-applied value` : `recording no ${key} (nothing was applied before)`) + `; remove the whole ${key} property to delete the configuration.`);
|
|
6259
|
+
retainPrevious(key);
|
|
6260
|
+
}
|
|
6261
|
+
/**
|
|
6181
6262
|
* Diff CFn-shape sub-config values between previous and new state.
|
|
6182
6263
|
*
|
|
6183
6264
|
* Four transitions:
|
|
@@ -6311,14 +6392,20 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
6311
6392
|
this.logger.debug(`Deleted bucket encryption on bucket ${bucketName}`);
|
|
6312
6393
|
});
|
|
6313
6394
|
await this.diffSubConfig(bucketName, previousProperties["LifecycleConfiguration"], properties["LifecycleConfiguration"], async (cfg) => {
|
|
6314
|
-
if (!cfg.Rules || !Array.isArray(cfg.Rules) || cfg.Rules.length === 0)
|
|
6395
|
+
if (!cfg.Rules || !Array.isArray(cfg.Rules) || cfg.Rules.length === 0) {
|
|
6396
|
+
this.emptyCollectionSkip("LifecycleConfiguration", "LifecycleConfiguration.Rules", previousProperties, retainPrevious);
|
|
6397
|
+
return;
|
|
6398
|
+
}
|
|
6315
6399
|
if (!await this.applyLifecycleConfiguration(bucketName, cfg, (m) => this.logger.warn(m))) retainPrevious("LifecycleConfiguration");
|
|
6316
6400
|
}, async () => {
|
|
6317
6401
|
await this.s3Client.send(new DeleteBucketLifecycleCommand({ Bucket: bucketName }));
|
|
6318
6402
|
this.logger.debug(`Deleted lifecycle configuration on bucket ${bucketName}`);
|
|
6319
6403
|
});
|
|
6320
6404
|
await this.diffSubConfig(bucketName, previousProperties["CorsConfiguration"], properties["CorsConfiguration"], async (cfg) => {
|
|
6321
|
-
if (!cfg.CorsRules || !Array.isArray(cfg.CorsRules) || cfg.CorsRules.length === 0)
|
|
6405
|
+
if (!cfg.CorsRules || !Array.isArray(cfg.CorsRules) || cfg.CorsRules.length === 0) {
|
|
6406
|
+
this.emptyCollectionSkip("CorsConfiguration", "CorsConfiguration.CorsRules", previousProperties, retainPrevious);
|
|
6407
|
+
return;
|
|
6408
|
+
}
|
|
6322
6409
|
await this.applyCorsConfiguration(bucketName, cfg);
|
|
6323
6410
|
}, async () => {
|
|
6324
6411
|
await this.s3Client.send(new DeleteBucketCorsCommand({ Bucket: bucketName }));
|
|
@@ -73017,7 +73104,7 @@ function createMigrateCommand() {
|
|
|
73017
73104
|
*/
|
|
73018
73105
|
function buildProgram() {
|
|
73019
73106
|
const program = new Command();
|
|
73020
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.281.
|
|
73107
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.281.6");
|
|
73021
73108
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
73022
73109
|
const { profile } = actionCommand.optsWithGlobals();
|
|
73023
73110
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|