@go-to-k/cdkd 0.152.1 → 0.152.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.
@@ -8530,6 +8530,32 @@ const cyan = (s) => `${codes.cyan}${s}${codes.reset}`;
8530
8530
  const gray = (s) => `${codes.gray}${s}${codes.reset}`;
8531
8531
  const bold = (s) => `${codes.bright}${s}${codes.reset}`;
8532
8532
 
8533
+ //#endregion
8534
+ //#region src/utils/resource-line.ts
8535
+ /**
8536
+ * Format the per-resource status line printed by `cdkd deploy` / `cdkd destroy`.
8537
+ *
8538
+ * All three operations share the layout `<glyph> <id> (<type>) <verb>`; callers
8539
+ * prepend their own prefix (a two-space indent, or a `[current/total] ` counter).
8540
+ *
8541
+ * Every successful op uses a green/colored check (✓), NOT a cross (✗): the op
8542
+ * succeeded, and a red ✗ reads as a failure — which is exactly what the separate
8543
+ * "✗ Failed to delete" error path prints. The op is distinguished by COLOR, not
8544
+ * glyph: green = created, yellow = updated, green-check-with-red-verb = deleted
8545
+ * (the verb stays red to keep the destructive nature of the delete visible).
8546
+ *
8547
+ * `verbOverride` replaces the default verb word (e.g. `'updated (metadata)'` for
8548
+ * a metadata-only update) while keeping the op's glyph and color.
8549
+ */
8550
+ function formatResourceLine(op, logicalId, resourceType, verbOverride) {
8551
+ const body = `${bold(logicalId)} ${gray(`(${resourceType})`)}`;
8552
+ switch (op) {
8553
+ case "created": return `${green("✓")} ${body} ${green(verbOverride ?? "created")}`;
8554
+ case "updated": return `${yellow("✓")} ${body} ${yellow(verbOverride ?? "updated")}`;
8555
+ case "deleted": return `${green("✓")} ${body} ${red(verbOverride ?? "deleted")}`;
8556
+ }
8557
+ }
8558
+
8533
8559
  //#endregion
8534
8560
  //#region src/deployment/dag-executor.ts
8535
8561
  /**
@@ -9635,7 +9661,7 @@ var DeployEngine = class {
9635
9661
  if (progress) progress.current++;
9636
9662
  const createPrefix = progress ? `[${progress.current}/${progress.total}] ` : " ";
9637
9663
  renderer.removeTask(logicalId);
9638
- this.logger.info(`${createPrefix}${green("")} ${bold(logicalId)} ${gray(`(${resourceType})`)} ${green("created")}`);
9664
+ this.logger.info(`${createPrefix}${formatResourceLine("created", logicalId, resourceType)}`);
9639
9665
  break;
9640
9666
  }
9641
9667
  case "UPDATE": {
@@ -9662,7 +9688,7 @@ var DeployEngine = class {
9662
9688
  if (progress) progress.current++;
9663
9689
  const attrPrefix = progress ? `[${progress.current}/${progress.total}] ` : " ";
9664
9690
  renderer.removeTask(logicalId);
9665
- this.logger.info(`${attrPrefix}${yellow("~")} ${bold(logicalId)} ${gray(`(${resourceType})`)} ${yellow("updated (metadata)")}`);
9691
+ this.logger.info(`${attrPrefix}${formatResourceLine("updated", logicalId, resourceType, "updated (metadata)")}`);
9666
9692
  break;
9667
9693
  }
9668
9694
  this.logger.debug(`Skipping ${logicalId}: no actual changes after intrinsic function resolution`);
@@ -9741,7 +9767,7 @@ var DeployEngine = class {
9741
9767
  if (progress) progress.current++;
9742
9768
  const updatePrefix = progress ? `[${progress.current}/${progress.total}] ` : " ";
9743
9769
  renderer.removeTask(logicalId);
9744
- this.logger.info(`${updatePrefix}${yellow("~")} ${bold(logicalId)} ${gray(`(${resourceType})`)} ${yellow("updated")}`);
9770
+ this.logger.info(`${updatePrefix}${formatResourceLine("updated", logicalId, resourceType)}`);
9745
9771
  }
9746
9772
  break;
9747
9773
  }
@@ -9767,7 +9793,7 @@ var DeployEngine = class {
9767
9793
  if (progress) progress.current++;
9768
9794
  const deletePrefix = progress ? `[${progress.current}/${progress.total}] ` : " ";
9769
9795
  renderer.removeTask(logicalId);
9770
- this.logger.info(`${deletePrefix}${red("")} ${bold(logicalId)} ${gray(`(${resourceType})`)} ${red("deleted")}`);
9796
+ this.logger.info(`${deletePrefix}${formatResourceLine("deleted", logicalId, resourceType)}`);
9771
9797
  break;
9772
9798
  }
9773
9799
  }
@@ -9973,5 +9999,5 @@ var DeployEngine = class {
9973
9999
  };
9974
10000
 
9975
10001
  //#endregion
9976
- export { ConfigError as $, AssetPublisher as A, resolveStateBucketWithDefault as B, applyRoleArnIfSet as C, LockManager as D, TemplateParser as E, getDefaultStateBucketName as F, MIGRATE_TMP_PREFIX as G, warnDeprecatedNoPrefixCliFlag as H, getLegacyStateBucketName as I, AssemblyReader as J, findLargeInlineResources as K, resolveApp as L, WorkGraph as M, buildDockerImage as N, S3StateBackend as O, Synthesizer as P, CdkdError as Q, resolveCaptureObservedState as R, IntrinsicFunctionResolver as S, DagBuilder as T, CFN_TEMPLATE_BODY_LIMIT as U, resolveStateBucketWithDefaultAndSource as V, CFN_TEMPLATE_URL_LIMIT as W, resolveBucketRegion as X, clearBucketRegionCache as Y, AssetError as Z, normalizeAwsTagsToCfn as _, isCdkdError as _t, withRetry as a, MissingCdkCliError as at, CloudControlProvider as b, cyan as c, ProvisioningError as ct, red as d, RouteDiscoveryError as dt, DependencyError as et, yellow as f, StackHasActiveImportsError as ft, matchesCdkPath as g, formatError as gt, CDK_PATH_TAG as h, SynthesisError as ht, withResourceDeadline as i, LockError as it, stringifyValue as j, shouldRetainResource as k, gray as l, ResourceTimeoutError as lt, collectInlinePolicyNamesManagedBySiblings as m, StateError as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, LocalMigrateError as nt, IMPLICIT_DELETE_DEPENDENCIES as o, NestedStackChildDirectDestroyError as ot, IAMRoleProvider as p, StackTerminationProtectionError as pt, uploadCfnTemplate as q, DeployEngine as r, LocalStartServiceError as rt, bold as s, PartialFailureError as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, LocalInvokeBuildError as tt, green as u, ResourceUpdateNotSupportedError as ut, resolveExplicitPhysicalId as v, normalizeAwsError as vt, DiffCalculator as w, assertRegionMatch as x, ProviderRegistry as y, withErrorHandling as yt, resolveSkipPrefix as z };
9977
- //# sourceMappingURL=deploy-engine-CpPWAdiO.js.map
10002
+ export { CdkdError as $, shouldRetainResource as A, resolveSkipPrefix as B, IntrinsicFunctionResolver as C, TemplateParser as D, DagBuilder as E, Synthesizer as F, CFN_TEMPLATE_URL_LIMIT as G, resolveStateBucketWithDefaultAndSource as H, getDefaultStateBucketName as I, uploadCfnTemplate as J, MIGRATE_TMP_PREFIX as K, getLegacyStateBucketName as L, stringifyValue as M, WorkGraph as N, LockManager as O, buildDockerImage as P, AssetError as Q, resolveApp as R, assertRegionMatch as S, DiffCalculator as T, warnDeprecatedNoPrefixCliFlag as U, resolveStateBucketWithDefault as V, CFN_TEMPLATE_BODY_LIMIT as W, clearBucketRegionCache as X, AssemblyReader as Y, resolveBucketRegion as Z, matchesCdkPath as _, formatError as _t, withRetry as a, LockError as at, ProviderRegistry as b, withErrorHandling as bt, bold as c, PartialFailureError as ct, green as d, ResourceUpdateNotSupportedError as dt, ConfigError as et, red as f, RouteDiscoveryError as ft, CDK_PATH_TAG as g, SynthesisError as gt, collectInlinePolicyNamesManagedBySiblings as h, StateError as ht, withResourceDeadline as i, LocalStartServiceError as it, AssetPublisher as j, S3StateBackend as k, cyan as l, ProvisioningError as lt, IAMRoleProvider as m, StackTerminationProtectionError as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, LocalInvokeBuildError as nt, IMPLICIT_DELETE_DEPENDENCIES as o, MissingCdkCliError as ot, yellow as p, StackHasActiveImportsError as pt, findLargeInlineResources as q, DeployEngine as r, LocalMigrateError as rt, formatResourceLine as s, NestedStackChildDirectDestroyError as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, DependencyError as tt, gray as u, ResourceTimeoutError as ut, normalizeAwsTagsToCfn as v, isCdkdError as vt, applyRoleArnIfSet as w, CloudControlProvider as x, resolveExplicitPhysicalId as y, normalizeAwsError as yt, resolveCaptureObservedState as z };
10003
+ //# sourceMappingURL=deploy-engine-C4yMO329.js.map