@go-to-k/cdkd 0.221.10 → 0.221.11

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
2
  import { A as withErrorHandling, B as generateResourceNameWithFallback, C as StackHasActiveImportsError, F as getLiveRenderer, H as withStackName, I as PATTERN_B_NAME_PROPERTIES, L as PATTERN_B_RESOURCE_TYPES, M as getLogger, P as runStackBuffered, S as ResourceUpdateNotSupportedError, V as withSkipPrefix, _ as MissingCdkCliError, a as assertRegionMatch, b as ProvisioningError, f as LocalInvokeBuildError$1, i as resolveExplicitPhysicalId, k as normalizeAwsError, l as CdkdError, m as LocalStartServiceError, n as matchesCdkPath, o as disableInstanceApiTermination, p as LocalMigrateError, r as normalizeAwsTagsToCfn, s as isTerminationProtectionPropagationError, t as CDK_PATH_TAG, v as NestedStackChildDirectDestroyError, w as StackTerminationProtectionError, x as ResourceTimeoutError, y as PartialFailureError, z as generateResourceName } from "./import-helpers-wLipXr5g.js";
3
3
  import { a as setAwsClients, i as resetAwsClients, r as getAwsClients, t as AwsClients } from "./aws-clients-pjPwZz1r.js";
4
- import { $ as AssemblyReader, A as shouldRetainResource, B as getDefaultStateBucketName, C as applyRoleArnIfSet, D as LockManager, E as TemplateParser, F as formatDockerLoginError, G as resolveStateBucketWithDefault, H as resolveApp, I as getDockerCmd, J as CFN_TEMPLATE_BODY_LIMIT, K as resolveStateBucketWithDefaultAndSource, L as runDockerForeground, M as stringifyValue, N as WorkGraph, O as S3StateBackend, P as buildDockerImage, Q as uploadCfnTemplate, R as runDockerStreaming, S as IntrinsicFunctionResolver, T as DagBuilder, U as resolveCaptureObservedState, V as getLegacyStateBucketName, W as resolveSkipPrefix, X as MIGRATE_TMP_PREFIX, Y as CFN_TEMPLATE_URL_LIMIT, Z as findLargeInlineResources, _ as IAMRoleProvider, a as withRetry, b as findActionableSilentDrops, c as computeImplicitDeleteEdges, d as bold, f as cyan, g as yellow, h as red, i as withResourceDeadline, j as AssetPublisher, k as rebuildClientForBucketRegion, l as extractDeploymentEventError, m as green, n as DEFAULT_RESOURCE_WARN_AFTER_MS, o as isRetryableTransientError, p as gray, q as warnDeprecatedNoPrefixCliFlag, r as DeployEngine, s as IMPLICIT_DELETE_DEPENDENCIES, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as resolveBucketRegion, u as formatResourceLine, v as collectInlinePolicyNamesManagedBySiblings, w as DiffCalculator, x as CloudControlProvider, y as ProviderRegistry, z as Synthesizer } from "./deploy-engine-U63EpLKn.js";
4
+ import { $ as AssemblyReader, A as shouldRetainResource, B as getDefaultStateBucketName, C as applyRoleArnIfSet, D as LockManager, E as TemplateParser, F as formatDockerLoginError, G as resolveStateBucketWithDefault, H as resolveApp, I as getDockerCmd, J as CFN_TEMPLATE_BODY_LIMIT, K as resolveStateBucketWithDefaultAndSource, L as runDockerForeground, M as stringifyValue, N as WorkGraph, O as S3StateBackend, P as buildDockerImage, Q as uploadCfnTemplate, R as runDockerStreaming, S as IntrinsicFunctionResolver, T as DagBuilder, U as resolveCaptureObservedState, V as getLegacyStateBucketName, W as resolveSkipPrefix, X as MIGRATE_TMP_PREFIX, Y as CFN_TEMPLATE_URL_LIMIT, Z as findLargeInlineResources, _ as IAMRoleProvider, a as withRetry, b as findActionableSilentDrops, c as computeImplicitDeleteEdges, d as bold, f as cyan, g as yellow, h as red, i as withResourceDeadline, j as AssetPublisher, k as rebuildClientForBucketRegion, l as extractDeploymentEventError, m as green, n as DEFAULT_RESOURCE_WARN_AFTER_MS, o as isRetryableTransientError, p as gray, q as warnDeprecatedNoPrefixCliFlag, r as DeployEngine, s as IMPLICIT_DELETE_DEPENDENCIES, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as resolveBucketRegion, u as formatResourceLine, v as collectInlinePolicyNamesManagedBySiblings, w as DiffCalculator, x as CloudControlProvider, y as ProviderRegistry, z as Synthesizer } from "./deploy-engine-C4sRo95X.js";
5
5
  import { t as ASGProvider } from "./asg-provider-B_hrCxRx.js";
6
6
  import { AsyncLocalStorage } from "node:async_hooks";
7
7
  import { randomBytes, randomUUID } from "node:crypto";
@@ -1553,7 +1553,7 @@ const FLUSH_INTERVAL_MS = 2e3;
1553
1553
  const FLUSH_EVENT_THRESHOLD = 50;
1554
1554
  /** Build-time cdkd version, with a dev fallback for non-built contexts. */
1555
1555
  function getCdkdVersion() {
1556
- return "0.221.10";
1556
+ return "0.221.11";
1557
1557
  }
1558
1558
  /**
1559
1559
  * Generate a time-sortable unique run id, e.g.
@@ -54024,7 +54024,7 @@ function reorderArgs(argv) {
54024
54024
  async function main() {
54025
54025
  installPipeCloseHandler();
54026
54026
  const program = new Command();
54027
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.221.10");
54027
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.221.11");
54028
54028
  program.addCommand(createBootstrapCommand());
54029
54029
  program.addCommand(createSynthCommand());
54030
54030
  program.addCommand(createListCommand());
@@ -11624,7 +11624,8 @@ const RETRYABLE_ERROR_MESSAGE_PATTERNS = [
11624
11624
  "Could not deliver test message",
11625
11625
  "wait 60 seconds",
11626
11626
  "concurrent update operation",
11627
- "because it is in use"
11627
+ "because it is in use",
11628
+ "Rate exceeded"
11628
11629
  ];
11629
11630
  /**
11630
11631
  * HTTP status codes that always indicate a transient failure worth retrying.
@@ -11632,18 +11633,62 @@ const RETRYABLE_ERROR_MESSAGE_PATTERNS = [
11632
11633
  */
11633
11634
  const RETRYABLE_HTTP_STATUS_CODES = new Set([429, 503]);
11634
11635
  /**
11636
+ * AWS SDK v3 canonical throttling error names. Mirrors
11637
+ * `@aws-sdk/service-error-classification`'s `THROTTLING_ERROR_CODES` — any
11638
+ * error (or wrapped cause) whose `name` is one of these is a transient rate-
11639
+ * limit rejection worth retrying with backoff. Detecting by NAME is more
11640
+ * robust than by HTTP status because most AWS throttles surface as HTTP 400
11641
+ * (not 429) with the throttling signal carried only in the error code / name
11642
+ * (e.g. SSM `ThrottlingException` for the `Rate exceeded` message).
11643
+ */
11644
+ const THROTTLING_ERROR_NAMES = new Set([
11645
+ "BandwidthLimitExceeded",
11646
+ "EC2ThrottledException",
11647
+ "LimitExceededException",
11648
+ "PriorRequestNotComplete",
11649
+ "ProvisionedThroughputExceededException",
11650
+ "RequestLimitExceeded",
11651
+ "RequestThrottled",
11652
+ "RequestThrottledException",
11653
+ "SlowDown",
11654
+ "ThrottledException",
11655
+ "Throttling",
11656
+ "ThrottlingException",
11657
+ "TooManyRequestsException",
11658
+ "TransactionInProgressException"
11659
+ ]);
11660
+ /**
11661
+ * Walk the error + its `.cause` chain (bounded) looking for an AWS SDK v3
11662
+ * throttling error `name`. cdkd wraps the original AWS error in a
11663
+ * `ProvisioningError`, so the throttling signal is typically one cause-link
11664
+ * deep; the bounded walk also tolerates SDK errors that nest a `$response`/
11665
+ * cause without exploding on a cyclic chain.
11666
+ */
11667
+ function isThrottlingError(error) {
11668
+ let current = error;
11669
+ for (let depth = 0; depth < 5 && current != null; depth++) {
11670
+ const name = current.name;
11671
+ if (typeof name === "string" && THROTTLING_ERROR_NAMES.has(name)) return true;
11672
+ current = current.cause;
11673
+ }
11674
+ return false;
11675
+ }
11676
+ /**
11635
11677
  * Determine whether an AWS error should be retried.
11636
11678
  *
11637
11679
  * Checks (in order):
11638
11680
  * 1. HTTP status code on the error itself (`$metadata.httpStatusCode`)
11639
11681
  * 2. HTTP status code on a wrapped cause (`cause.$metadata.httpStatusCode`)
11640
- * 3. Substring match against {@link RETRYABLE_ERROR_MESSAGE_PATTERNS}
11682
+ * 3. Throttling error `name` on the error or any wrapped cause (most AWS
11683
+ * throttles are HTTP 400, not 429 — see {@link THROTTLING_ERROR_NAMES})
11684
+ * 4. Substring match against {@link RETRYABLE_ERROR_MESSAGE_PATTERNS}
11641
11685
  */
11642
11686
  function isRetryableTransientError(error, message) {
11643
11687
  const statusCode = error.$metadata?.httpStatusCode;
11644
11688
  if (statusCode !== void 0 && RETRYABLE_HTTP_STATUS_CODES.has(statusCode)) return true;
11645
11689
  const causeStatus = error.cause?.$metadata?.httpStatusCode;
11646
11690
  if (causeStatus !== void 0 && RETRYABLE_HTTP_STATUS_CODES.has(causeStatus)) return true;
11691
+ if (isThrottlingError(error)) return true;
11647
11692
  return RETRYABLE_ERROR_MESSAGE_PATTERNS.some((p) => message.includes(p));
11648
11693
  }
11649
11694
 
@@ -13095,4 +13140,4 @@ var DeployEngine = class {
13095
13140
 
13096
13141
  //#endregion
13097
13142
  export { AssemblyReader as $, shouldRetainResource as A, getDefaultStateBucketName as B, applyRoleArnIfSet as C, LockManager as D, TemplateParser as E, formatDockerLoginError as F, resolveStateBucketWithDefault as G, resolveApp as H, getDockerCmd as I, CFN_TEMPLATE_BODY_LIMIT as J, resolveStateBucketWithDefaultAndSource as K, runDockerForeground as L, stringifyValue as M, WorkGraph as N, S3StateBackend as O, buildDockerImage as P, uploadCfnTemplate as Q, runDockerStreaming as R, IntrinsicFunctionResolver as S, DagBuilder as T, resolveCaptureObservedState as U, getLegacyStateBucketName as V, resolveSkipPrefix as W, MIGRATE_TMP_PREFIX as X, CFN_TEMPLATE_URL_LIMIT as Y, findLargeInlineResources as Z, IAMRoleProvider as _, withRetry as a, findActionableSilentDrops as b, computeImplicitDeleteEdges as c, bold as d, clearBucketRegionCache as et, cyan as f, yellow as g, red as h, withResourceDeadline as i, AssetPublisher as j, rebuildClientForBucketRegion as k, extractDeploymentEventError as l, green as m, DEFAULT_RESOURCE_WARN_AFTER_MS as n, isRetryableTransientError as o, gray as p, warnDeprecatedNoPrefixCliFlag as q, DeployEngine as r, IMPLICIT_DELETE_DEPENDENCIES as s, DEFAULT_RESOURCE_TIMEOUT_MS as t, resolveBucketRegion as tt, formatResourceLine as u, collectInlinePolicyNamesManagedBySiblings as v, DiffCalculator as w, CloudControlProvider as x, ProviderRegistry as y, Synthesizer as z };
13098
- //# sourceMappingURL=deploy-engine-U63EpLKn.js.map
13143
+ //# sourceMappingURL=deploy-engine-C4sRo95X.js.map