@go-to-k/cdkd 0.280.12 → 0.280.14
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-BjmkUhRq.js → asg-provider-DIMKyE07.js} +2 -2
- package/dist/{asg-provider-BjmkUhRq.js.map → asg-provider-DIMKyE07.js.map} +1 -1
- package/dist/cli.js +92 -28
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-CHhLFsDu.js → deploy-engine-D4VaoTK7.js} +59 -19
- package/dist/deploy-engine-D4VaoTK7.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-CHhLFsDu.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 requireConfigString, $t as processStackMessages, A as red, At as runDockerStreaming, B as isTerminationProtectionPropagationError, Bt as resolveSkipPrefix, C as isStatefulRecreateTargetSync, Ct as parseBootstrapMarker, D as cyan, Dn as normalizeAwsError, Dt as formatDockerLoginError, E as bold, Et as buildDockerImage, F as ProviderRegistry, Ft as getDefaultStateBucketName, G as normalizeAwsTagsToCfn, Gt as warnDeprecatedNoPrefixCliFlag, H as cfnRefValueFromPhysicalId, Ht as resolveStateBucketWithDefaultAndSource, I as findActionableSilentDrops, It as getLegacyStateBucketName, J as configStringRefusal, Jt as MIGRATE_TMP_PREFIX, K as resolveExplicitPhysicalId, Kt as CFN_TEMPLATE_BODY_LIMIT, L as CloudControlProvider, Lt as resolveApp, M as IAMRoleProvider, Mt as getDockerImageBySourceHash, N as collectInlinePolicyNamesManagedBySiblings, Nt as Synthesizer, O as gray, On as withErrorHandling, Ot as getDockerCmd, P as clearOnUpdateRemoval, Pt as synthesisStatusMessage, Q as requireConfigObject, Qt as AssemblyReader, R as slowCcOperationTimeoutMs, Rt as resolveAutoAssetStorage, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, Sn as StackTerminationProtectionError, St as getBootstrapMarkerKey, T as formatResourceLine, Tt as validateContainerRepoName, U as refStateLookupFromResource, Ut as resolveUseCdkBootstrapAssets, V as IntrinsicFunctionResolver, Vt as resolveStateBucketWithDefault, W as WAFv2WebACLProvider, Wt as stateBucketExistenceConfirmed, X as replayWarn, Xt as uploadCfnTemplate, Y as readConfigString, Yt as findLargeInlineResources, Z as requireConfigArray, Zt as expectedOwnerParam, _ as createPreDeleteFinalSnapshot, _n as PartialFailureError, _t as loadPublishableAssetManifest, a as DeploymentEventsStore, an as setAwsClients, at as isThrottlingError, b as unsupportedFinalSnapshotError, bn as ResourceUpdateNotSupportedError, bt as BOOTSTRAP_MARKER_PREFIX, c as replayFailedOperations, ct as LockManager, d as IMPLICIT_DELETE_DEPENDENCIES, dn as LocalInvokeBuildError$1, dt as shouldRetainResource, et as applyRoleArnIfSet, f as computeImplicitDeleteEdges, fn as LocalMigrateError, ft as AssetPublisher, g as ccRoutedFinalSnapshotError, gn as NestedStackChildDirectDestroyError, gt as createAssetRedirectResolver, h as buildFinalSnapshotIdentifier, hn as MissingCdkCliError, ht as buildAssetRedirectMap, i as DeploymentEventsReader, in as resetAwsClients, it as isRetryableTransientError, j as yellow, jt as AssetManifestLoader, k as green, kt as runDockerForeground, l as replayRollback, lt as S3StateBackend, m as PRE_DELETE_SNAPSHOT_TYPES, mt as WorkGraph, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as AwsClients, nt as describeTypeWithThrottleRetry, o as planFailedOps, ot as DagBuilder, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as LocalStartServiceError, pt as stringifyValue, q as assertRegionMatch, qt as CFN_TEMPLATE_URL_LIMIT, r as DeployEngine, rn as getAwsClients, rt as withRetry, s as planRollback, sn as CdkdError, st as TemplateParser, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as resolveBucketRegion, tt as DiffCalculator, u as withResourceDeadline, un as DeployCancelledError, ut as rebuildClientForBucketRegion, v as isFinalSnapshotError, vn as ProvisioningError, vt as rewriteTemplateAssetReferences, w as renderStatefulReason, wt as validateAssetBucketName, x as extractDeploymentEventError, xn as StackHasActiveImportsError, xt as ensureAssetStorage, y as refusesFinalSnapshot, yn as ResourceTimeoutError, yt as AssetModeResolver, z as disableInstanceApiTermination, zt as resolveCaptureObservedState } from "./deploy-engine-D4VaoTK7.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-DIMKyE07.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";
|
|
@@ -5065,6 +5065,40 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
5065
5065
|
this.logger.debug(`Applied CORS configuration to bucket ${bucketName}`);
|
|
5066
5066
|
}
|
|
5067
5067
|
/**
|
|
5068
|
+
* The per-item / per-rule STRING guard, with the applier's own SKIP as the
|
|
5069
|
+
* replay downgrade (issue #1595).
|
|
5070
|
+
*
|
|
5071
|
+
* Four per-item reads in this file refuse a malformed configuration ITEM
|
|
5072
|
+
* through a `readConfigString` that carries no `onUnusable`, so they threw on
|
|
5073
|
+
* the state-replay paths too — the un-rollbackable refusal every container
|
|
5074
|
+
* guard beside them exists to avoid. What they must NOT do instead is take
|
|
5075
|
+
* `readConfigString`'s own downgrade: its fallback is applied to a LIVE
|
|
5076
|
+
* resource, and each of these defaults ENABLES something (a lifecycle
|
|
5077
|
+
* expiration rule, an intelligent-tiering transition, a replication rule),
|
|
5078
|
+
* so warn-and-default is worse than the refusal it replaces. The correct
|
|
5079
|
+
* downgrade is the SKIP the sibling container guards already perform, with
|
|
5080
|
+
* the same per-applier unit — whole Put where the Put replaces every rule,
|
|
5081
|
+
* the single configuration item where the Put is per-Id.
|
|
5082
|
+
*
|
|
5083
|
+
* Returns `true` when the caller must skip. On the CREATE path (`onUnusable`
|
|
5084
|
+
* absent) it always returns `false` and the original read below still
|
|
5085
|
+
* throws, so template-borne behavior is unchanged.
|
|
5086
|
+
*
|
|
5087
|
+
* No `ConfigStringOptions` passthrough, and that is a decision rather than an
|
|
5088
|
+
* omission: a probe whose relaxations disagree with the read it fronts would
|
|
5089
|
+
* refuse exactly where the read accepts. All four sites are ENUM-valued
|
|
5090
|
+
* (`Status` / `IncludedObjectVersions`), so `coerceNumber` is wrong for them
|
|
5091
|
+
* by the rule in `config-shape.ts`'s header — a number where an enum belongs
|
|
5092
|
+
* is a bug. A site that ever needs an option must thread the SAME bag here.
|
|
5093
|
+
*/
|
|
5094
|
+
skipOnUnusableConfigString(container, key, fallback, containerPath, skipClause, onUnusable) {
|
|
5095
|
+
if (!onUnusable) return false;
|
|
5096
|
+
const refusal = configStringRefusal(container, key, fallback, containerPath);
|
|
5097
|
+
if (refusal === void 0) return false;
|
|
5098
|
+
onUnusable(`${refusal}. ${skipClause}; the same value is REFUSED on a template-path create`);
|
|
5099
|
+
return true;
|
|
5100
|
+
}
|
|
5101
|
+
/**
|
|
5068
5102
|
* Apply lifecycle configuration
|
|
5069
5103
|
*
|
|
5070
5104
|
* CFn property: LifecycleConfiguration.Rules[]
|
|
@@ -5083,6 +5117,7 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
5083
5117
|
if (rawTagFilters != null) {
|
|
5084
5118
|
if (requireConfigArray(rawTagFilters, "AWS::S3::Bucket LifecycleConfiguration.Rules[].TagFilters", { ...onUnusable ? { onUnusable } : {} }) === void 0) return;
|
|
5085
5119
|
}
|
|
5120
|
+
if (this.skipOnUnusableConfigString(rule, "Status", "Enabled", "AWS::S3::Bucket LifecycleConfiguration.Rules[]", "Leaving the whole lifecycle configuration unapplied here", onUnusable)) return;
|
|
5086
5121
|
}
|
|
5087
5122
|
const gatherScope = (rule) => {
|
|
5088
5123
|
const filter = rule["Filter"];
|
|
@@ -5511,6 +5546,7 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
5511
5546
|
async applyIntelligentTieringConfigurations(bucketName, configs, onUnusable) {
|
|
5512
5547
|
for (const config of configs) {
|
|
5513
5548
|
const id = config["Id"];
|
|
5549
|
+
if (this.skipOnUnusableConfigString(config, "Status", "Enabled", "AWS::S3::Bucket IntelligentTieringConfigurations[]", "Skipping this intelligent tiering configuration", onUnusable)) continue;
|
|
5514
5550
|
const tierings = config["Tierings"];
|
|
5515
5551
|
const itConfig = {
|
|
5516
5552
|
Id: id,
|
|
@@ -5547,6 +5583,7 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
5547
5583
|
async applyInventoryConfigurations(bucketName, configs, onUnusable) {
|
|
5548
5584
|
for (const config of configs) {
|
|
5549
5585
|
const id = config["Id"];
|
|
5586
|
+
if (this.skipOnUnusableConfigString(config, "IncludedObjectVersions", "All", "AWS::S3::Bucket InventoryConfigurations[]", "Skipping this inventory configuration", onUnusable)) continue;
|
|
5550
5587
|
const inventoryDestPath = "AWS::S3::Bucket InventoryConfigurations[].Destination";
|
|
5551
5588
|
const rawDest = config["Destination"];
|
|
5552
5589
|
const s3Dest = this.resolveS3BucketDestination(rawDest, inventoryDestPath, onUnusable);
|
|
@@ -5635,6 +5672,7 @@ var S3BucketProvider = class S3BucketProvider {
|
|
|
5635
5672
|
for (const rule of rules || []) {
|
|
5636
5673
|
const rawFilter = rule["Filter"];
|
|
5637
5674
|
if (rawFilter != null && requireConfigObject(rawFilter, "AWS::S3::Bucket ReplicationConfiguration.Rules[].Filter", { ...onUnusable ? { onUnusable } : {} }) === void 0) return;
|
|
5675
|
+
if (this.skipOnUnusableConfigString(rule, "Status", "Enabled", "AWS::S3::Bucket ReplicationConfiguration.Rules[]", "Leaving the whole replication configuration unapplied here", onUnusable)) return;
|
|
5638
5676
|
}
|
|
5639
5677
|
await this.s3Client.send(new PutBucketReplicationCommand({
|
|
5640
5678
|
Bucket: bucketName,
|
|
@@ -50504,32 +50542,57 @@ function isIntrinsic(value) {
|
|
|
50504
50542
|
return keys.length === 1 && INTRINSIC_KEYS.has(keys[0]);
|
|
50505
50543
|
}
|
|
50506
50544
|
/**
|
|
50507
|
-
*
|
|
50508
|
-
*
|
|
50509
|
-
*
|
|
50510
|
-
* values actually differ (excluding intrinsic vs resolved mismatches). This
|
|
50511
|
-
* produces a minimal diff showing only real changes.
|
|
50545
|
+
* Per-side rendering rule for a diff side that is NOT a plain object pair
|
|
50546
|
+
* (primitives, arrays, intrinsics). The both-plain-objects case is handled
|
|
50547
|
+
* jointly by {@link stripUnchangedValuePair}, which never delegates it here.
|
|
50512
50548
|
*/
|
|
50513
50549
|
function stripUnchangedValues(value, other) {
|
|
50514
50550
|
if (value === null || value === void 0 || typeof value !== "object") return value;
|
|
50515
50551
|
if (Array.isArray(value)) return value;
|
|
50516
50552
|
if (isIntrinsic(value)) return void 0;
|
|
50517
50553
|
if (isIntrinsic(other)) return void 0;
|
|
50518
|
-
|
|
50519
|
-
|
|
50520
|
-
|
|
50521
|
-
|
|
50522
|
-
|
|
50523
|
-
|
|
50524
|
-
|
|
50525
|
-
|
|
50526
|
-
|
|
50527
|
-
|
|
50528
|
-
|
|
50529
|
-
|
|
50530
|
-
|
|
50554
|
+
return value;
|
|
50555
|
+
}
|
|
50556
|
+
function isPlainNonIntrinsicObject(value) {
|
|
50557
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) && !isIntrinsic(value);
|
|
50558
|
+
}
|
|
50559
|
+
/**
|
|
50560
|
+
* Strip unchanged and intrinsic-only keys from BOTH sides of a property
|
|
50561
|
+
* change in ONE walk, so the two rendered sides stay symmetric (issue #1608).
|
|
50562
|
+
*
|
|
50563
|
+
* {@link stripUnchangedValues} runs per side, so a PURE KEY ADDITION pruned
|
|
50564
|
+
* the new side down to the added key while the old side — whose own keys are
|
|
50565
|
+
* all unchanged — hit the empty-result fallback and printed the FULL object.
|
|
50566
|
+
* That asymmetry reads as "the whole object is replaced by just the added
|
|
50567
|
+
* key" (i.e. everything else removed), the opposite of what deploy does.
|
|
50568
|
+
* Walking the UNION of keys once yields `old: {}` / `new: {AddedKey: ...}`
|
|
50569
|
+
* for an addition (and the mirror for a removal); the full-value fallback —
|
|
50570
|
+
* kept for sides differing only in key order or intrinsic-valued keys — now
|
|
50571
|
+
* fires only when BOTH sides pruned to nothing, so it can never be one-sided.
|
|
50572
|
+
* Non-object sides (primitives, arrays, intrinsics) keep the existing
|
|
50573
|
+
* per-side semantics via {@link stripUnchangedValues}.
|
|
50574
|
+
*/
|
|
50575
|
+
function stripUnchangedValuePair(oldValue, newValue) {
|
|
50576
|
+
if (!isPlainNonIntrinsicObject(oldValue) || !isPlainNonIntrinsicObject(newValue)) return [stripUnchangedValues(oldValue, newValue), stripUnchangedValues(newValue, oldValue)];
|
|
50577
|
+
const oldResult = {};
|
|
50578
|
+
const newResult = {};
|
|
50579
|
+
const keys = [...Object.keys(oldValue), ...Object.keys(newValue).filter((k) => !Object.hasOwn(oldValue, k))];
|
|
50580
|
+
for (const key of keys) {
|
|
50581
|
+
const o = oldValue[key];
|
|
50582
|
+
const n = newValue[key];
|
|
50583
|
+
if (isIntrinsic(o) || isIntrinsic(n)) continue;
|
|
50584
|
+
if (JSON.stringify(o) === JSON.stringify(n)) continue;
|
|
50585
|
+
if (isPlainNonIntrinsicObject(o) && isPlainNonIntrinsicObject(n)) {
|
|
50586
|
+
const [fo, fn] = stripUnchangedValuePair(o, n);
|
|
50587
|
+
if (fo !== void 0 && JSON.stringify(fo) !== "{}") oldResult[key] = fo;
|
|
50588
|
+
if (fn !== void 0 && JSON.stringify(fn) !== "{}") newResult[key] = fn;
|
|
50589
|
+
} else {
|
|
50590
|
+
if (Object.hasOwn(oldValue, key)) oldResult[key] = o;
|
|
50591
|
+
if (Object.hasOwn(newValue, key)) newResult[key] = n;
|
|
50592
|
+
}
|
|
50531
50593
|
}
|
|
50532
|
-
|
|
50594
|
+
if (Object.keys(oldResult).length === 0 && Object.keys(newResult).length === 0) return [oldValue, newValue];
|
|
50595
|
+
return [oldResult, newResult];
|
|
50533
50596
|
}
|
|
50534
50597
|
/**
|
|
50535
50598
|
* Render one side of a property change for the diff output.
|
|
@@ -50538,18 +50601,18 @@ function stripUnchangedValues(value, other) {
|
|
|
50538
50601
|
* against current state — most commonly a `Ref` / `Fn::GetAtt` to a resource
|
|
50539
50602
|
* this same deploy will CREATE (the CDK logical-id-churn dance: an
|
|
50540
50603
|
* `AWS::ApiGateway::Deployment` hash rotation, a `fn.currentVersion` Lambda
|
|
50541
|
-
* Version). Rendering that via
|
|
50604
|
+
* Version). Rendering that via the strip-unchanged pass collapsed it to
|
|
50542
50605
|
* the literal string `undefined`, which reads as "this property is being
|
|
50543
50606
|
* removed" (issue #1017). Instead, render the raw intrinsic compactly and —
|
|
50544
50607
|
* on the NEW side — annotate that the value only exists after the deploy.
|
|
50545
|
-
* Everything else
|
|
50608
|
+
* Everything else renders the pre-filtered value computed jointly for both
|
|
50609
|
+
* sides by {@link stripUnchangedValuePair}.
|
|
50546
50610
|
*/
|
|
50547
|
-
function renderDiffValue(own,
|
|
50611
|
+
function renderDiffValue(own, filtered, indent, isNewSide) {
|
|
50548
50612
|
if (isIntrinsic(own)) {
|
|
50549
50613
|
const suffix = isNewSide ? " (known after deploy)" : "";
|
|
50550
50614
|
return `${JSON.stringify(own)}${suffix}`;
|
|
50551
50615
|
}
|
|
50552
|
-
const filtered = stripUnchangedValues(own, opposite);
|
|
50553
50616
|
return (JSON.stringify(filtered, null, 2) ?? "undefined").replace(/\n/g, `\n${indent}`);
|
|
50554
50617
|
}
|
|
50555
50618
|
/**
|
|
@@ -50584,8 +50647,9 @@ function renderChangeLines(changes, logFn, ccApiRoutes) {
|
|
|
50584
50647
|
const requiresReplace = propChange.requiresReplacement ? " [requires replacement]" : "";
|
|
50585
50648
|
const propagated = propChange.replacementPropagated ? " [replacement propagated]" : "";
|
|
50586
50649
|
const indent = " ";
|
|
50587
|
-
const
|
|
50588
|
-
const
|
|
50650
|
+
const [oldFiltered, newFiltered] = stripUnchangedValuePair(propChange.oldValue, propChange.newValue);
|
|
50651
|
+
const oldStr = renderDiffValue(propChange.oldValue, oldFiltered, indent, false);
|
|
50652
|
+
const newStr = renderDiffValue(propChange.newValue, newFiltered, indent, true);
|
|
50589
50653
|
logFn(` - ${propChange.path}:${requiresReplace}${propagated}`);
|
|
50590
50654
|
logFn(` old: ${oldStr}`);
|
|
50591
50655
|
logFn(` new: ${newStr}`);
|
|
@@ -69161,7 +69225,7 @@ function createMigrateCommand() {
|
|
|
69161
69225
|
*/
|
|
69162
69226
|
function buildProgram() {
|
|
69163
69227
|
const program = new Command();
|
|
69164
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.280.
|
|
69228
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.280.14");
|
|
69165
69229
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
69166
69230
|
const { profile } = actionCommand.optsWithGlobals();
|
|
69167
69231
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|