@go-to-k/cdkd 0.238.0 → 0.238.2

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
@@ -2,7 +2,7 @@
2
2
  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-BzO-joNR.js";
3
3
  import { A as withErrorHandling, C as StackHasActiveImportsError, S as ResourceUpdateNotSupportedError, _ as MissingCdkCliError, a as normalizeAwsTagsToCfn, b as ProvisioningError, f as LocalInvokeBuildError$1, i as matchesCdkPath, k as normalizeAwsError, l as CdkdError, m as LocalStartServiceError, n as isTerminationProtectionPropagationError, o as resolveExplicitPhysicalId, p as LocalMigrateError, r as CDK_PATH_TAG, s as assertRegionMatch, t as disableInstanceApiTermination, v as NestedStackChildDirectDestroyError, w as StackTerminationProtectionError, x as ResourceTimeoutError, y as PartialFailureError } from "./ec2-termination-protection-q-WGWgxa.js";
4
4
  import { a as setAwsClients, i as resetAwsClients, r as getAwsClients, t as AwsClients } from "./aws-clients-B15NAPbL.js";
5
- import { $ as getDockerCmd, A as DiffCalculator, B as buildAssetRedirectMap, C as findActionableSilentDrops, Ct as resolveBucketRegion, D as refStateLookupFromResource, E as cfnRefValueFromPhysicalId, F as rebuildClientForBucketRegion, G as BOOTSTRAP_MARKER_PREFIX, H as loadPublishableAssetManifest, I as shouldRetainResource, J as parseBootstrapMarker, K as ensureAssetStorage, L as AssetPublisher, M as TemplateParser, N as LockManager, O as WAFv2WebACLProvider, P as S3StateBackend, Q as formatDockerLoginError, R as stringifyValue, S as ProviderRegistry, T as IntrinsicFunctionResolver, U as rewriteTemplateAssetReferences, V as createAssetRedirectResolver, W as AssetModeResolver, X as validateContainerRepoName, Y as validateAssetBucketName, Z as buildDockerImage, _ as green, _t as CFN_TEMPLATE_URL_LIMIT, a as withRetry, at as synthesisStatusMessage, b as IAMRoleProvider, bt as uploadCfnTemplate, c as computeImplicitDeleteEdges, ct as resolveApp, d as isStatefulRecreateTargetSync, dt as resolveSkipPrefix, et as runDockerForeground, f as renderStatefulReason, ft as resolveStateBucketWithDefault, g as gray, gt as CFN_TEMPLATE_BODY_LIMIT, h as cyan, ht as warnDeprecatedNoPrefixCliFlag, i as withResourceDeadline, it as Synthesizer, j as DagBuilder, k as applyRoleArnIfSet, l as extractDeploymentEventError, lt as resolveAutoAssetStorage, m as bold, mt as resolveUseCdkBootstrapAssets, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as AssetManifestLoader, o as isRetryableTransientError, ot as getDefaultStateBucketName, p as formatResourceLine, pt as resolveStateBucketWithDefaultAndSource, q as getBootstrapMarkerKey, r as DeployEngine, rt as getDockerImageBySourceHash, s as IMPLICIT_DELETE_DEPENDENCIES, st as getLegacyStateBucketName, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as runDockerStreaming, u as MULTI_REGION_RECREATE_BLOCKED_TYPES, ut as resolveCaptureObservedState, v as red, vt as MIGRATE_TMP_PREFIX, w as CloudControlProvider, x as collectInlinePolicyNamesManagedBySiblings, xt as AssemblyReader, y as yellow, yt as findLargeInlineResources, z as WorkGraph } from "./deploy-engine-CX6s1TcX.js";
5
+ import { $ as getDockerCmd, A as DiffCalculator, B as buildAssetRedirectMap, C as findActionableSilentDrops, Ct as resolveBucketRegion, D as refStateLookupFromResource, E as cfnRefValueFromPhysicalId, F as rebuildClientForBucketRegion, G as BOOTSTRAP_MARKER_PREFIX, H as loadPublishableAssetManifest, I as shouldRetainResource, J as parseBootstrapMarker, K as ensureAssetStorage, L as AssetPublisher, M as TemplateParser, N as LockManager, O as WAFv2WebACLProvider, P as S3StateBackend, Q as formatDockerLoginError, R as stringifyValue, S as ProviderRegistry, T as IntrinsicFunctionResolver, U as rewriteTemplateAssetReferences, V as createAssetRedirectResolver, W as AssetModeResolver, X as validateContainerRepoName, Y as validateAssetBucketName, Z as buildDockerImage, _ as green, _t as CFN_TEMPLATE_URL_LIMIT, a as withRetry, at as synthesisStatusMessage, b as IAMRoleProvider, bt as uploadCfnTemplate, c as computeImplicitDeleteEdges, ct as resolveApp, d as isStatefulRecreateTargetSync, dt as resolveSkipPrefix, et as runDockerForeground, f as renderStatefulReason, ft as resolveStateBucketWithDefault, g as gray, gt as CFN_TEMPLATE_BODY_LIMIT, h as cyan, ht as warnDeprecatedNoPrefixCliFlag, i as withResourceDeadline, it as Synthesizer, j as DagBuilder, k as applyRoleArnIfSet, l as extractDeploymentEventError, lt as resolveAutoAssetStorage, m as bold, mt as resolveUseCdkBootstrapAssets, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as AssetManifestLoader, o as isRetryableTransientError, ot as getDefaultStateBucketName, p as formatResourceLine, pt as resolveStateBucketWithDefaultAndSource, q as getBootstrapMarkerKey, r as DeployEngine, rt as getDockerImageBySourceHash, s as IMPLICIT_DELETE_DEPENDENCIES, st as getLegacyStateBucketName, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as runDockerStreaming, u as MULTI_REGION_RECREATE_BLOCKED_TYPES, ut as resolveCaptureObservedState, v as red, vt as MIGRATE_TMP_PREFIX, w as CloudControlProvider, x as collectInlinePolicyNamesManagedBySiblings, xt as AssemblyReader, y as yellow, yt as findLargeInlineResources, z as WorkGraph } from "./deploy-engine-iPBf_Lk2.js";
6
6
  import { t as expectedOwnerParam } from "./expected-bucket-owner-BjEfUnkA.js";
7
7
  import { t as ASGProvider } from "./asg-provider-Dbl1_mwT.js";
8
8
  import { AsyncLocalStorage } from "node:async_hooks";
@@ -1885,7 +1885,7 @@ const FLUSH_INTERVAL_MS = 2e3;
1885
1885
  const FLUSH_EVENT_THRESHOLD = 50;
1886
1886
  /** Build-time cdkd version, with a dev fallback for non-built contexts. */
1887
1887
  function getCdkdVersion() {
1888
- return "0.238.0";
1888
+ return "0.238.2";
1889
1889
  }
1890
1890
  /**
1891
1891
  * Generate a time-sortable unique run id, e.g.
@@ -37371,6 +37371,86 @@ var NestedStackProvider = class {
37371
37371
  }
37372
37372
  };
37373
37373
 
37374
+ //#endregion
37375
+ //#region src/provisioning/providers/wait-condition-handle-provider.ts
37376
+ /**
37377
+ * AWS::CloudFormation::WaitConditionHandle Provider (no-op placeholder).
37378
+ *
37379
+ * In CloudFormation this resource's physical id is a pre-signed S3 URL that
37380
+ * `cfn-signal` posts to, backed by CloudFormation's own internal signal
37381
+ * bucket. That URL cannot exist outside a CloudFormation deployment, so cdkd
37382
+ * provisions the handle as a pure no-op: no AWS API is called, and the
37383
+ * physical id is a synthesized opaque placeholder.
37384
+ *
37385
+ * This matches how the type is used in practice by CDK constructs — most
37386
+ * notably `cdk-multi-region-stack`, which emits a bare
37387
+ * `CfnWaitConditionHandle` only so a sibling stack never has zero resources
37388
+ * (CloudFormation rejects empty templates). Actual wait-condition signaling
37389
+ * (`AWS::CloudFormation::WaitCondition`, which blocks on signals sent to the
37390
+ * handle URL) remains unsupported — that semantic fundamentally requires
37391
+ * CloudFormation itself.
37392
+ */
37393
+ var WaitConditionHandleProvider = class {
37394
+ logger = getLogger().child("WaitConditionHandleProvider");
37395
+ handledProperties = new Map([["AWS::CloudFormation::WaitConditionHandle", /* @__PURE__ */ new Set([])]]);
37396
+ /**
37397
+ * "Create" the handle: synthesize a unique placeholder physical id.
37398
+ * `Ref` on the handle resolves to this id. It is deliberately NOT
37399
+ * URL-shaped — a consumer that tries to `cfn-signal` it should fail
37400
+ * loudly rather than post to a URL that nothing polls.
37401
+ */
37402
+ async create(logicalId, _resourceType, _properties) {
37403
+ const physicalId = `cdkd-wait-condition-handle-${logicalId}-${randomUUID()}`;
37404
+ this.logger.debug(`Created no-op WaitConditionHandle placeholder ${logicalId} (${physicalId})`);
37405
+ return {
37406
+ physicalId,
37407
+ attributes: {}
37408
+ };
37409
+ }
37410
+ /**
37411
+ * The type has no properties, so there is nothing to update — keep the
37412
+ * existing physical id.
37413
+ */
37414
+ async update(logicalId, physicalId, _resourceType, _properties, _previousProperties) {
37415
+ this.logger.debug(`No-op update for WaitConditionHandle ${logicalId}`);
37416
+ return {
37417
+ physicalId,
37418
+ wasReplaced: false,
37419
+ attributes: {}
37420
+ };
37421
+ }
37422
+ /** Nothing was created in AWS, so there is nothing to delete. */
37423
+ async delete(logicalId, _physicalId, _resourceType) {
37424
+ this.logger.debug(`No-op delete for WaitConditionHandle ${logicalId}`);
37425
+ }
37426
+ /**
37427
+ * WaitConditionHandle is effectively `Ref`-only. Its CFn schema declares a
37428
+ * single read-only property `Id` (the primary identifier); the deploy
37429
+ * engine's resolver never calls this method for it (it resolves via the
37430
+ * physicalId fallback), so a direct call — e.g. `cdkd orphan`'s live
37431
+ * attribute fetch — fails loudly instead of fabricating a value.
37432
+ */
37433
+ async getAttribute(physicalId, resourceType, attributeName) {
37434
+ throw new ProvisioningError(`AWS::CloudFormation::WaitConditionHandle has no Fn::GetAtt attributes (requested: ${attributeName})`, resourceType, physicalId);
37435
+ }
37436
+ /** No managed properties → nothing can drift. */
37437
+ async readCurrentState() {
37438
+ return {};
37439
+ }
37440
+ /**
37441
+ * Import: there is no AWS-queryable resource behind a handle, so accept a
37442
+ * caller-supplied physical id verbatim (for `--migrate-from-cloudformation`
37443
+ * this is CloudFormation's pre-signed-URL id from `DescribeStackResources`)
37444
+ * and synthesize a placeholder otherwise.
37445
+ */
37446
+ async import(input) {
37447
+ return {
37448
+ physicalId: input.knownPhysicalId ?? `cdkd-wait-condition-handle-${input.logicalId}-${randomUUID()}`,
37449
+ attributes: {}
37450
+ };
37451
+ }
37452
+ };
37453
+
37374
37454
  //#endregion
37375
37455
  //#region src/provisioning/providers/acm-certificate-provider.ts
37376
37456
  /**
@@ -37855,6 +37935,7 @@ function registerAllProviders(registry) {
37855
37935
  registry.register("AWS::S3Tables::Namespace", s3TablesProvider);
37856
37936
  registry.register("AWS::S3Tables::Table", s3TablesProvider);
37857
37937
  registry.register("AWS::CloudFormation::Stack", new NestedStackProvider());
37938
+ registry.register("AWS::CloudFormation::WaitConditionHandle", new WaitConditionHandleProvider());
37858
37939
  }
37859
37940
 
37860
37941
  //#endregion
@@ -39263,6 +39344,7 @@ async function computeStackDiff(currentState, template, region, stackName, state
39263
39344
  resources: currentState.resources,
39264
39345
  stateBackend,
39265
39346
  stackName,
39347
+ bestEffort: true,
39266
39348
  ...parameters && { parameters }
39267
39349
  });
39268
39350
  return diffCalculator.calculateDiff(currentState, template, resolveFn);
@@ -39299,6 +39381,7 @@ async function resolveChildStackParameters(parentStackRow, parentTemplate, paren
39299
39381
  resources: parentState.resources,
39300
39382
  stateBackend,
39301
39383
  stackName: parentStackName,
39384
+ bestEffort: true,
39302
39385
  ...parentParameters && { parameters: parentParameters }
39303
39386
  });
39304
39387
  } catch {}
@@ -39523,6 +39606,27 @@ function stripUnchangedValues(value, other) {
39523
39606
  return Object.keys(result).length > 0 ? result : value;
39524
39607
  }
39525
39608
  /**
39609
+ * Render one side of a property change for the diff output.
39610
+ *
39611
+ * A side whose WHOLE value is still a raw intrinsic could not be resolved
39612
+ * against current state — most commonly a `Ref` / `Fn::GetAtt` to a resource
39613
+ * this same deploy will CREATE (the CDK logical-id-churn dance: an
39614
+ * `AWS::ApiGateway::Deployment` hash rotation, a `fn.currentVersion` Lambda
39615
+ * Version). Rendering that via {@link stripUnchangedValues} collapsed it to
39616
+ * the literal string `undefined`, which reads as "this property is being
39617
+ * removed" (issue #1017). Instead, render the raw intrinsic compactly and —
39618
+ * on the NEW side — annotate that the value only exists after the deploy.
39619
+ * Everything else keeps the existing strip-unchanged rendering.
39620
+ */
39621
+ function renderDiffValue(own, opposite, indent, isNewSide) {
39622
+ if (isIntrinsic(own)) {
39623
+ const suffix = isNewSide ? " (known after deploy)" : "";
39624
+ return `${JSON.stringify(own)}${suffix}`;
39625
+ }
39626
+ const filtered = stripUnchangedValues(own, opposite);
39627
+ return (JSON.stringify(filtered, null, 2) ?? "undefined").replace(/\n/g, `\n${indent}`);
39628
+ }
39629
+ /**
39526
39630
  * Render one resource-change map into human-readable diff lines via `logFn`,
39527
39631
  * returning the per-type counts. Shared by the root stack block and every
39528
39632
  * nested-stack block.
@@ -39553,11 +39657,9 @@ function renderChangeLines(changes, logFn, ccApiRoutes) {
39553
39657
  if (change.propertyChanges && change.propertyChanges.length > 0) for (const propChange of change.propertyChanges) {
39554
39658
  const requiresReplace = propChange.requiresReplacement ? " [requires replacement]" : "";
39555
39659
  const propagated = propChange.replacementPropagated ? " [replacement propagated]" : "";
39556
- const oldFiltered = stripUnchangedValues(propChange.oldValue, propChange.newValue);
39557
- const newFiltered = stripUnchangedValues(propChange.newValue, propChange.oldValue);
39558
39660
  const indent = " ";
39559
- const oldStr = (JSON.stringify(oldFiltered, null, 2) ?? "undefined").replace(/\n/g, `\n${indent}`);
39560
- const newStr = (JSON.stringify(newFiltered, null, 2) ?? "undefined").replace(/\n/g, `\n${indent}`);
39661
+ const oldStr = renderDiffValue(propChange.oldValue, propChange.newValue, indent, false);
39662
+ const newStr = renderDiffValue(propChange.newValue, propChange.oldValue, indent, true);
39561
39663
  logFn(` - ${propChange.path}:${requiresReplace}${propagated}`);
39562
39664
  logFn(` old: ${oldStr}`);
39563
39665
  logFn(` new: ${newStr}`);
@@ -56924,7 +57026,7 @@ function reorderArgs(argv) {
56924
57026
  async function main() {
56925
57027
  installPipeCloseHandler();
56926
57028
  const program = new Command();
56927
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.238.0");
57029
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.238.2");
56928
57030
  program.addCommand(createBootstrapCommand());
56929
57031
  program.addCommand(createSynthCommand());
56930
57032
  program.addCommand(createListCommand());