@go-to-k/cdkd 0.280.12 → 0.280.13

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/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { $ as applyRoleArnIfSet, A as red, At as AssetManifestLoader, B as isTerminationProtectionPropagationError, Bt as resolveStateBucketWithDefault, C as isStatefulRecreateTargetSync, Ct as validateAssetBucketName, D as cyan, Dn as withErrorHandling, Dt as getDockerCmd, E as bold, En as normalizeAwsError, Et as formatDockerLoginError, F as ProviderRegistry, Ft as getLegacyStateBucketName, G as normalizeAwsTagsToCfn, Gt as CFN_TEMPLATE_BODY_LIMIT, H as cfnRefValueFromPhysicalId, Ht as resolveUseCdkBootstrapAssets, I as findActionableSilentDrops, It as resolveApp, J as readConfigString, Jt as findLargeInlineResources, K as resolveExplicitPhysicalId, Kt as CFN_TEMPLATE_URL_LIMIT, L as CloudControlProvider, Lt as resolveAutoAssetStorage, M as IAMRoleProvider, Mt as Synthesizer, N as collectInlinePolicyNamesManagedBySiblings, Nt as synthesisStatusMessage, O as gray, Ot as runDockerForeground, P as clearOnUpdateRemoval, Pt as getDefaultStateBucketName, Q as requireConfigString, Qt as processStackMessages, R as slowCcOperationTimeoutMs, Rt as resolveCaptureObservedState, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as parseBootstrapMarker, T as formatResourceLine, Tt as buildDockerImage, U as refStateLookupFromResource, Ut as stateBucketExistenceConfirmed, V as IntrinsicFunctionResolver, Vt as resolveStateBucketWithDefaultAndSource, W as WAFv2WebACLProvider, Wt as warnDeprecatedNoPrefixCliFlag, X as requireConfigArray, Xt as expectedOwnerParam, Y as replayWarn, Yt as uploadCfnTemplate, Z as requireConfigObject, Zt as AssemblyReader, _ as createPreDeleteFinalSnapshot, _n as ProvisioningError, _t as rewriteTemplateAssetReferences, a as DeploymentEventsStore, at as DagBuilder, b as unsupportedFinalSnapshotError, bn as StackHasActiveImportsError, bt as ensureAssetStorage, c as replayFailedOperations, ct as S3StateBackend, d as IMPLICIT_DELETE_DEPENDENCIES, dn as LocalMigrateError, dt as AssetPublisher, en as resolveBucketRegion, et as DiffCalculator, f as computeImplicitDeleteEdges, fn as LocalStartServiceError, ft as stringifyValue, g as ccRoutedFinalSnapshotError, gn as PartialFailureError, gt as loadPublishableAssetManifest, h as buildFinalSnapshotIdentifier, hn as NestedStackChildDirectDestroyError, ht as createAssetRedirectResolver, i as DeploymentEventsReader, in as setAwsClients, it as isThrottlingError, j as yellow, jt as getDockerImageBySourceHash, k as green, kt as runDockerStreaming, l as replayRollback, ln as DeployCancelledError, lt as rebuildClientForBucketRegion, m as PRE_DELETE_SNAPSHOT_TYPES, mn as MissingCdkCliError, mt as buildAssetRedirectMap, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as getAwsClients, nt as withRetry, o as planFailedOps, on as CdkdError, ot as TemplateParser, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pt as WorkGraph, q as assertRegionMatch, qt as MIGRATE_TMP_PREFIX, r as DeployEngine, rn as resetAwsClients, rt as isRetryableTransientError, s as planRollback, st as LockManager, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as AwsClients, tt as describeTypeWithThrottleRetry, u as withResourceDeadline, un as LocalInvokeBuildError$1, ut as shouldRetainResource, v as isFinalSnapshotError, vn as ResourceTimeoutError, vt as AssetModeResolver, w as renderStatefulReason, wt as validateContainerRepoName, x as extractDeploymentEventError, xn as StackTerminationProtectionError, xt as getBootstrapMarkerKey, y as refusesFinalSnapshot, yn as ResourceUpdateNotSupportedError, yt as BOOTSTRAP_MARKER_PREFIX, z as disableInstanceApiTermination, zt as resolveSkipPrefix } from "./deploy-engine-CHhLFsDu.js";
2
+ import { $ as applyRoleArnIfSet, A as red, At as AssetManifestLoader, B as isTerminationProtectionPropagationError, Bt as resolveStateBucketWithDefault, C as isStatefulRecreateTargetSync, Ct as validateAssetBucketName, D as cyan, Dn as withErrorHandling, Dt as getDockerCmd, E as bold, En as normalizeAwsError, Et as formatDockerLoginError, F as ProviderRegistry, Ft as getLegacyStateBucketName, G as normalizeAwsTagsToCfn, Gt as CFN_TEMPLATE_BODY_LIMIT, H as cfnRefValueFromPhysicalId, Ht as resolveUseCdkBootstrapAssets, I as findActionableSilentDrops, It as resolveApp, J as readConfigString, Jt as findLargeInlineResources, K as resolveExplicitPhysicalId, Kt as CFN_TEMPLATE_URL_LIMIT, L as CloudControlProvider, Lt as resolveAutoAssetStorage, M as IAMRoleProvider, Mt as Synthesizer, N as collectInlinePolicyNamesManagedBySiblings, Nt as synthesisStatusMessage, O as gray, Ot as runDockerForeground, P as clearOnUpdateRemoval, Pt as getDefaultStateBucketName, Q as requireConfigString, Qt as processStackMessages, R as slowCcOperationTimeoutMs, Rt as resolveCaptureObservedState, S as MULTI_REGION_RECREATE_BLOCKED_TYPES, St as parseBootstrapMarker, T as formatResourceLine, Tt as buildDockerImage, U as refStateLookupFromResource, Ut as stateBucketExistenceConfirmed, V as IntrinsicFunctionResolver, Vt as resolveStateBucketWithDefaultAndSource, W as WAFv2WebACLProvider, Wt as warnDeprecatedNoPrefixCliFlag, X as requireConfigArray, Xt as expectedOwnerParam, Y as replayWarn, Yt as uploadCfnTemplate, Z as requireConfigObject, Zt as AssemblyReader, _ as createPreDeleteFinalSnapshot, _n as ProvisioningError, _t as rewriteTemplateAssetReferences, a as DeploymentEventsStore, at as DagBuilder, b as unsupportedFinalSnapshotError, bn as StackHasActiveImportsError, bt as ensureAssetStorage, c as replayFailedOperations, ct as S3StateBackend, d as IMPLICIT_DELETE_DEPENDENCIES, dn as LocalMigrateError, dt as AssetPublisher, en as resolveBucketRegion, et as DiffCalculator, f as computeImplicitDeleteEdges, fn as LocalStartServiceError, ft as stringifyValue, g as ccRoutedFinalSnapshotError, gn as PartialFailureError, gt as loadPublishableAssetManifest, h as buildFinalSnapshotIdentifier, hn as NestedStackChildDirectDestroyError, ht as createAssetRedirectResolver, i as DeploymentEventsReader, in as setAwsClients, it as isThrottlingError, j as yellow, jt as getDockerImageBySourceHash, k as green, kt as runDockerStreaming, l as replayRollback, ln as DeployCancelledError, lt as rebuildClientForBucketRegion, m as PRE_DELETE_SNAPSHOT_TYPES, mn as MissingCdkCliError, mt as buildAssetRedirectMap, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as getAwsClients, nt as withRetry, o as planFailedOps, on as CdkdError, ot as TemplateParser, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pt as WorkGraph, q as assertRegionMatch, qt as MIGRATE_TMP_PREFIX, r as DeployEngine, rn as resetAwsClients, rt as isRetryableTransientError, s as planRollback, st as LockManager, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as AwsClients, tt as describeTypeWithThrottleRetry, u as withResourceDeadline, un as LocalInvokeBuildError$1, ut as shouldRetainResource, v as isFinalSnapshotError, vn as ResourceTimeoutError, vt as AssetModeResolver, w as renderStatefulReason, wt as validateContainerRepoName, x as extractDeploymentEventError, xn as StackTerminationProtectionError, xt as getBootstrapMarkerKey, y as refusesFinalSnapshot, yn as ResourceUpdateNotSupportedError, yt as BOOTSTRAP_MARKER_PREFIX, z as disableInstanceApiTermination, zt as resolveSkipPrefix } from "./deploy-engine-CE-J9Vlu.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-BjmkUhRq.js";
4
+ import { t as ASGProvider } from "./asg-provider-DJSCLI9C.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";
@@ -50504,32 +50504,57 @@ function isIntrinsic(value) {
50504
50504
  return keys.length === 1 && INTRINSIC_KEYS.has(keys[0]);
50505
50505
  }
50506
50506
  /**
50507
- * Strip unchanged and intrinsic-only values from a diff value.
50508
- *
50509
- * Recursively compares `value` against `other` and keeps only the keys whose
50510
- * values actually differ (excluding intrinsic vs resolved mismatches). This
50511
- * produces a minimal diff showing only real changes.
50507
+ * Per-side rendering rule for a diff side that is NOT a plain object pair
50508
+ * (primitives, arrays, intrinsics). The both-plain-objects case is handled
50509
+ * jointly by {@link stripUnchangedValuePair}, which never delegates it here.
50512
50510
  */
50513
50511
  function stripUnchangedValues(value, other) {
50514
50512
  if (value === null || value === void 0 || typeof value !== "object") return value;
50515
50513
  if (Array.isArray(value)) return value;
50516
50514
  if (isIntrinsic(value)) return void 0;
50517
50515
  if (isIntrinsic(other)) return void 0;
50518
- if (other === null || other === void 0 || typeof other !== "object" || Array.isArray(other)) return value;
50519
- const valObj = value;
50520
- const otherObj = other;
50521
- const result = {};
50522
- for (const key of Object.keys(valObj)) {
50523
- const v = valObj[key];
50524
- const o = otherObj[key];
50525
- if (isIntrinsic(v) || isIntrinsic(o)) continue;
50526
- if (JSON.stringify(v) === JSON.stringify(o)) continue;
50527
- if (typeof v === "object" && v !== null && typeof o === "object" && o !== null) {
50528
- const filtered = stripUnchangedValues(v, o);
50529
- if (filtered !== void 0 && JSON.stringify(filtered) !== "{}") result[key] = filtered;
50530
- } else result[key] = v;
50516
+ return value;
50517
+ }
50518
+ function isPlainNonIntrinsicObject(value) {
50519
+ return typeof value === "object" && value !== null && !Array.isArray(value) && !isIntrinsic(value);
50520
+ }
50521
+ /**
50522
+ * Strip unchanged and intrinsic-only keys from BOTH sides of a property
50523
+ * change in ONE walk, so the two rendered sides stay symmetric (issue #1608).
50524
+ *
50525
+ * {@link stripUnchangedValues} runs per side, so a PURE KEY ADDITION pruned
50526
+ * the new side down to the added key while the old side — whose own keys are
50527
+ * all unchanged hit the empty-result fallback and printed the FULL object.
50528
+ * That asymmetry reads as "the whole object is replaced by just the added
50529
+ * key" (i.e. everything else removed), the opposite of what deploy does.
50530
+ * Walking the UNION of keys once yields `old: {}` / `new: {AddedKey: ...}`
50531
+ * for an addition (and the mirror for a removal); the full-value fallback —
50532
+ * kept for sides differing only in key order or intrinsic-valued keys — now
50533
+ * fires only when BOTH sides pruned to nothing, so it can never be one-sided.
50534
+ * Non-object sides (primitives, arrays, intrinsics) keep the existing
50535
+ * per-side semantics via {@link stripUnchangedValues}.
50536
+ */
50537
+ function stripUnchangedValuePair(oldValue, newValue) {
50538
+ if (!isPlainNonIntrinsicObject(oldValue) || !isPlainNonIntrinsicObject(newValue)) return [stripUnchangedValues(oldValue, newValue), stripUnchangedValues(newValue, oldValue)];
50539
+ const oldResult = {};
50540
+ const newResult = {};
50541
+ const keys = [...Object.keys(oldValue), ...Object.keys(newValue).filter((k) => !Object.hasOwn(oldValue, k))];
50542
+ for (const key of keys) {
50543
+ const o = oldValue[key];
50544
+ const n = newValue[key];
50545
+ if (isIntrinsic(o) || isIntrinsic(n)) continue;
50546
+ if (JSON.stringify(o) === JSON.stringify(n)) continue;
50547
+ if (isPlainNonIntrinsicObject(o) && isPlainNonIntrinsicObject(n)) {
50548
+ const [fo, fn] = stripUnchangedValuePair(o, n);
50549
+ if (fo !== void 0 && JSON.stringify(fo) !== "{}") oldResult[key] = fo;
50550
+ if (fn !== void 0 && JSON.stringify(fn) !== "{}") newResult[key] = fn;
50551
+ } else {
50552
+ if (Object.hasOwn(oldValue, key)) oldResult[key] = o;
50553
+ if (Object.hasOwn(newValue, key)) newResult[key] = n;
50554
+ }
50531
50555
  }
50532
- return Object.keys(result).length > 0 ? result : value;
50556
+ if (Object.keys(oldResult).length === 0 && Object.keys(newResult).length === 0) return [oldValue, newValue];
50557
+ return [oldResult, newResult];
50533
50558
  }
50534
50559
  /**
50535
50560
  * Render one side of a property change for the diff output.
@@ -50538,18 +50563,18 @@ function stripUnchangedValues(value, other) {
50538
50563
  * against current state — most commonly a `Ref` / `Fn::GetAtt` to a resource
50539
50564
  * this same deploy will CREATE (the CDK logical-id-churn dance: an
50540
50565
  * `AWS::ApiGateway::Deployment` hash rotation, a `fn.currentVersion` Lambda
50541
- * Version). Rendering that via {@link stripUnchangedValues} collapsed it to
50566
+ * Version). Rendering that via the strip-unchanged pass collapsed it to
50542
50567
  * the literal string `undefined`, which reads as "this property is being
50543
50568
  * removed" (issue #1017). Instead, render the raw intrinsic compactly and —
50544
50569
  * on the NEW side — annotate that the value only exists after the deploy.
50545
- * Everything else keeps the existing strip-unchanged rendering.
50570
+ * Everything else renders the pre-filtered value computed jointly for both
50571
+ * sides by {@link stripUnchangedValuePair}.
50546
50572
  */
50547
- function renderDiffValue(own, opposite, indent, isNewSide) {
50573
+ function renderDiffValue(own, filtered, indent, isNewSide) {
50548
50574
  if (isIntrinsic(own)) {
50549
50575
  const suffix = isNewSide ? " (known after deploy)" : "";
50550
50576
  return `${JSON.stringify(own)}${suffix}`;
50551
50577
  }
50552
- const filtered = stripUnchangedValues(own, opposite);
50553
50578
  return (JSON.stringify(filtered, null, 2) ?? "undefined").replace(/\n/g, `\n${indent}`);
50554
50579
  }
50555
50580
  /**
@@ -50584,8 +50609,9 @@ function renderChangeLines(changes, logFn, ccApiRoutes) {
50584
50609
  const requiresReplace = propChange.requiresReplacement ? " [requires replacement]" : "";
50585
50610
  const propagated = propChange.replacementPropagated ? " [replacement propagated]" : "";
50586
50611
  const indent = " ";
50587
- const oldStr = renderDiffValue(propChange.oldValue, propChange.newValue, indent, false);
50588
- const newStr = renderDiffValue(propChange.newValue, propChange.oldValue, indent, true);
50612
+ const [oldFiltered, newFiltered] = stripUnchangedValuePair(propChange.oldValue, propChange.newValue);
50613
+ const oldStr = renderDiffValue(propChange.oldValue, oldFiltered, indent, false);
50614
+ const newStr = renderDiffValue(propChange.newValue, newFiltered, indent, true);
50589
50615
  logFn(` - ${propChange.path}:${requiresReplace}${propagated}`);
50590
50616
  logFn(` old: ${oldStr}`);
50591
50617
  logFn(` new: ${newStr}`);
@@ -69161,7 +69187,7 @@ function createMigrateCommand() {
69161
69187
  */
69162
69188
  function buildProgram() {
69163
69189
  const program = new Command();
69164
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.280.12");
69190
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.280.13");
69165
69191
  program.hook("preAction", (_thisCommand, actionCommand) => {
69166
69192
  const { profile } = actionCommand.optsWithGlobals();
69167
69193
  if (profile !== void 0) process.env["AWS_PROFILE"] = profile;