@go-to-k/cdkd 0.281.21 → 0.281.22

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.
@@ -2420,6 +2420,53 @@ function collectFnTransformNames(value, seen, out) {
2420
2420
  }
2421
2421
  }
2422
2422
 
2423
+ //#endregion
2424
+ //#region src/utils/aws-partition.ts
2425
+ /**
2426
+ * AWS partition / URL-suffix derivation, shared across layers.
2427
+ *
2428
+ * Lives in `src/utils/` because it has consumers in two different layers: the
2429
+ * `cdkd local *` command family (which passes a region in once to keep the STS
2430
+ * hop minimal) and the provisioning layer's `AppSyncProvider`, which rebuilds a
2431
+ * child resource's ARN when AWS did not report one.
2432
+ *
2433
+ * It was originally defined in `src/local/ecs-task-resolver.ts`, which
2434
+ * re-exports it so every existing call site is unchanged; a provisioning
2435
+ * provider importing from `src/local/**` would invert the layering.
2436
+ *
2437
+ * NOTE `getAccountInfo().partition`
2438
+ * (`src/deployment/intrinsic-function-resolver.ts`) was hardcoded to `'aws'`
2439
+ * until issue #1730, which made it derive through THIS helper — so the two now
2440
+ * agree and either spelling is correct. Prefer this one where a region is
2441
+ * already in hand, since it needs no STS round trip.
2442
+ */
2443
+ /**
2444
+ * Derive the AWS partition / URL suffix for an AWS region. Same mapping
2445
+ * CloudFormation applies to `${AWS::Partition}` / `${AWS::URLSuffix}`.
2446
+ */
2447
+ function derivePartitionAndUrlSuffix(region) {
2448
+ if (region.startsWith("cn-")) return {
2449
+ partition: "aws-cn",
2450
+ urlSuffix: "amazonaws.com.cn"
2451
+ };
2452
+ if (region.startsWith("us-gov-")) return {
2453
+ partition: "aws-us-gov",
2454
+ urlSuffix: "amazonaws.com"
2455
+ };
2456
+ if (region.startsWith("us-iso-")) return {
2457
+ partition: "aws-iso",
2458
+ urlSuffix: "c2s.ic.gov"
2459
+ };
2460
+ if (region.startsWith("us-isob-")) return {
2461
+ partition: "aws-iso-b",
2462
+ urlSuffix: "sc2s.sgov.gov"
2463
+ };
2464
+ return {
2465
+ partition: "aws",
2466
+ urlSuffix: "amazonaws.com"
2467
+ };
2468
+ }
2469
+
2423
2470
  //#endregion
2424
2471
  //#region src/utils/expected-bucket-owner.ts
2425
2472
  /**
@@ -2680,7 +2727,8 @@ async function uploadCfnTemplate(args) {
2680
2727
  s3.destroy();
2681
2728
  throw err;
2682
2729
  }
2683
- const url = `https://${bucket}.s3.${region}.amazonaws.com/${key}`;
2730
+ const { urlSuffix } = derivePartitionAndUrlSuffix(region);
2731
+ const url = `https://${bucket}.s3.${region}.${urlSuffix}/${key}`;
2684
2732
  const cleanup = async () => {
2685
2733
  try {
2686
2734
  await s3.send(new DeleteObjectCommand({
@@ -4176,53 +4224,6 @@ function cacheOptionToFlag(option) {
4176
4224
  return flag;
4177
4225
  }
4178
4226
 
4179
- //#endregion
4180
- //#region src/utils/aws-partition.ts
4181
- /**
4182
- * AWS partition / URL-suffix derivation, shared across layers.
4183
- *
4184
- * Lives in `src/utils/` because it has consumers in two different layers: the
4185
- * `cdkd local *` command family (which passes a region in once to keep the STS
4186
- * hop minimal) and the provisioning layer's `AppSyncProvider`, which rebuilds a
4187
- * child resource's ARN when AWS did not report one.
4188
- *
4189
- * It was originally defined in `src/local/ecs-task-resolver.ts`, which
4190
- * re-exports it so every existing call site is unchanged; a provisioning
4191
- * provider importing from `src/local/**` would invert the layering.
4192
- *
4193
- * NOTE `getAccountInfo().partition`
4194
- * (`src/deployment/intrinsic-function-resolver.ts`) was hardcoded to `'aws'`
4195
- * until issue #1730, which made it derive through THIS helper — so the two now
4196
- * agree and either spelling is correct. Prefer this one where a region is
4197
- * already in hand, since it needs no STS round trip.
4198
- */
4199
- /**
4200
- * Derive the AWS partition / URL suffix for an AWS region. Same mapping
4201
- * CloudFormation applies to `${AWS::Partition}` / `${AWS::URLSuffix}`.
4202
- */
4203
- function derivePartitionAndUrlSuffix(region) {
4204
- if (region.startsWith("cn-")) return {
4205
- partition: "aws-cn",
4206
- urlSuffix: "amazonaws.com.cn"
4207
- };
4208
- if (region.startsWith("us-gov-")) return {
4209
- partition: "aws-us-gov",
4210
- urlSuffix: "amazonaws.com"
4211
- };
4212
- if (region.startsWith("us-iso-")) return {
4213
- partition: "aws-iso",
4214
- urlSuffix: "c2s.ic.gov"
4215
- };
4216
- if (region.startsWith("us-isob-")) return {
4217
- partition: "aws-iso-b",
4218
- urlSuffix: "sc2s.sgov.gov"
4219
- };
4220
- return {
4221
- partition: "aws",
4222
- urlSuffix: "amazonaws.com"
4223
- };
4224
- }
4225
-
4226
4227
  //#endregion
4227
4228
  //#region src/assets/docker-asset-publisher.ts
4228
4229
  /**
@@ -13512,7 +13513,7 @@ var CloudControlProvider = class {
13512
13513
  if (context?.finalSnapshotIdentifier !== void 0) throw new ProvisioningError(`${logicalId} (${resourceType}) requires a final snapshot (DeletionPolicy: Snapshot), but the Cloud Control API delete route has no final-snapshot parameter. Re-run with --skip-final-snapshot after snapshotting manually, or retain the resource.`, resourceType, logicalId, physicalId);
13513
13514
  if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
13514
13515
  this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
13515
- const { ASGProvider } = await import("./asg-provider-CH0YfbOn.js").then((n) => n.n);
13516
+ const { ASGProvider } = await import("./asg-provider-pvAc9MXZ.js").then((n) => n.n);
13516
13517
  await new ASGProvider().delete(logicalId, physicalId, resourceType, _properties, context);
13517
13518
  return;
13518
13519
  }
@@ -20420,7 +20421,7 @@ const FLUSH_INTERVAL_MS = 2e3;
20420
20421
  const FLUSH_EVENT_THRESHOLD = 50;
20421
20422
  /** Build-time cdkd version, with a dev fallback for non-built contexts. */
20422
20423
  function getCdkdVersion() {
20423
- return "0.281.21";
20424
+ return "0.281.22";
20424
20425
  }
20425
20426
  /**
20426
20427
  * Generate a time-sortable unique run id, e.g.
@@ -22588,5 +22589,5 @@ var DeployEngine = class {
22588
22589
  };
22589
22590
 
22590
22591
  //#endregion
22591
- export { configStringRefusal as $, CFN_TEMPLATE_URL_LIMIT as $t, green as A, SynthesisError as An, validateContainerRepoName as At, slowCcOperationTimeoutMs as B, synthesisStatusMessage as Bt, MULTI_REGION_RECREATE_BLOCKED_TYPES as C, PartialFailureError as Cn, rewriteTemplateAssetReferences as Ct, bold as D, StackHasActiveImportsError as Dn, getBootstrapMarkerKey as Dt, formatResourceLine as E, ResourceUpdateNotSupportedError as En, ensureAssetStorage as Et, clearOnUpdateRemoval as F, __exportAll as Fn, runDockerForeground as Ft, getAccountInfo as G, resolveCaptureObservedState as Gt, isTerminationProtectionPropagationError as H, getLegacyStateBucketName as Ht, ProviderRegistry as I, runDockerStreaming as It, normalizeAwsTagsToCfn as J, resolveStateBucketWithDefaultAndSource as Jt, refStateLookupFromResource as K, resolveSkipPrefix as Kt, findActionableSilentDrops as L, AssetManifestLoader as Lt, yellow as M, isCdkdError as Mn, buildDockerImage as Mt, IAMRoleProvider as N, normalizeAwsError as Nn, formatDockerLoginError as Nt, cyan as O, StackTerminationProtectionError as On, parseBootstrapMarker as Ot, collectInlinePolicyNamesManagedBySiblings as P, withErrorHandling as Pn, getDockerCmd as Pt, configBooleanRefusal as Q, CFN_TEMPLATE_BODY_LIMIT as Qt, findSilentDropProperties as R, getDockerImageBySourceHash as Rt, extractDeploymentEventError as S, NestedStackChildDirectDestroyError as Sn, loadPublishableAssetManifest as St, renderStatefulReason as T, ResourceTimeoutError as Tn, BOOTSTRAP_MARKER_PREFIX as Tt, IntrinsicFunctionResolver as U, resolveApp as Ut, disableInstanceApiTermination as V, getDefaultStateBucketName as Vt, cfnRefValueFromPhysicalId as W, resolveAutoAssetStorage as Wt, assertRegionMatch as X, stateBucketExistenceConfirmed as Xt, resolveExplicitPhysicalId as Y, resolveUseCdkBootstrapAssets as Yt, coerceCfnBoolean as Z, warnDeprecatedNoPrefixCliFlag as Zt, createPreDeleteFinalSnapshot as _, LocalInvokeBuildError as _n, AssetPublisher as _t, DeploymentEventsStore as a, processStackMessages as an, applyRoleArnIfSet as at, unsupportedFinalSnapshotError as b, LockError as bn, buildAssetRedirectMap as bt, replayFailedOperations as c, AwsClients as cn, withRetry as ct, IMPLICIT_DELETE_DEPENDENCIES as d, setAwsClients as dn, DagBuilder as dt, MIGRATE_TMP_PREFIX as en, readConfigString as et, computeImplicitDeleteEdges as f, AssetError as fn, TemplateParser as ft, ccRoutedFinalSnapshotError as g, DeployCancelledError as gn, shouldRetainResource as gt, buildFinalSnapshotIdentifier as h, DependencyError as hn, rebuildClientForBucketRegion as ht, DeploymentEventsReader as i, AssemblyReader as in, requireConfigString as it, red as j, formatError as jn, derivePartitionAndUrlSuffix as jt, gray as k, StateError as kn, validateAssetBucketName as kt, replayRollback as l, getAwsClients as ln, isRetryableTransientError as lt, PRE_DELETE_SNAPSHOT_TYPES as m, ConfigError as mn, S3StateBackend as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, uploadCfnTemplate as nn, requireConfigArray as nt, planFailedOps as o, clearBucketRegionCache as on, DiffCalculator as ot, ATOMIC_FINAL_SNAPSHOT_TYPES as p, CdkdError as pn, LockManager as pt, WAFv2WebACLProvider as q, resolveStateBucketWithDefault as qt, DeployEngine as r, expectedOwnerParam as rn, requireConfigObject as rt, planRollback as s, resolveBucketRegion as sn, describeTypeWithThrottleRetry as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, findLargeInlineResources as tn, replayWarn as tt, withResourceDeadline as u, resetAwsClients as un, isThrottlingError as ut, isFinalSnapshotError as v, LocalMigrateError as vn, stringifyValue as vt, isStatefulRecreateTargetSync as w, ProvisioningError as wn, AssetModeResolver as wt, makeCanonicalizePropertiesFn as x, MissingCdkCliError as xn, createAssetRedirectResolver as xt, refusesFinalSnapshot as y, LocalStartServiceError as yn, WorkGraph as yt, CloudControlProvider as z, Synthesizer as zt };
22592
- //# sourceMappingURL=deploy-engine-Cx48pqGQ.js.map
22592
+ export { configStringRefusal as $, MIGRATE_TMP_PREFIX as $t, green as A, SynthesisError as An, validateContainerRepoName as At, slowCcOperationTimeoutMs as B, getDefaultStateBucketName as Bt, MULTI_REGION_RECREATE_BLOCKED_TYPES as C, PartialFailureError as Cn, rewriteTemplateAssetReferences as Ct, bold as D, StackHasActiveImportsError as Dn, getBootstrapMarkerKey as Dt, formatResourceLine as E, ResourceUpdateNotSupportedError as En, ensureAssetStorage as Et, clearOnUpdateRemoval as F, __exportAll as Fn, runDockerStreaming as Ft, getAccountInfo as G, resolveSkipPrefix as Gt, isTerminationProtectionPropagationError as H, resolveApp as Ht, ProviderRegistry as I, AssetManifestLoader as It, normalizeAwsTagsToCfn as J, resolveUseCdkBootstrapAssets as Jt, refStateLookupFromResource as K, resolveStateBucketWithDefault as Kt, findActionableSilentDrops as L, getDockerImageBySourceHash as Lt, yellow as M, isCdkdError as Mn, formatDockerLoginError as Mt, IAMRoleProvider as N, normalizeAwsError as Nn, getDockerCmd as Nt, cyan as O, StackTerminationProtectionError as On, parseBootstrapMarker as Ot, collectInlinePolicyNamesManagedBySiblings as P, withErrorHandling as Pn, runDockerForeground as Pt, configBooleanRefusal as Q, CFN_TEMPLATE_URL_LIMIT as Qt, findSilentDropProperties as R, Synthesizer as Rt, extractDeploymentEventError as S, NestedStackChildDirectDestroyError as Sn, loadPublishableAssetManifest as St, renderStatefulReason as T, ResourceTimeoutError as Tn, BOOTSTRAP_MARKER_PREFIX as Tt, IntrinsicFunctionResolver as U, resolveAutoAssetStorage as Ut, disableInstanceApiTermination as V, getLegacyStateBucketName as Vt, cfnRefValueFromPhysicalId as W, resolveCaptureObservedState as Wt, assertRegionMatch as X, warnDeprecatedNoPrefixCliFlag as Xt, resolveExplicitPhysicalId as Y, stateBucketExistenceConfirmed as Yt, coerceCfnBoolean as Z, CFN_TEMPLATE_BODY_LIMIT as Zt, createPreDeleteFinalSnapshot as _, LocalInvokeBuildError as _n, AssetPublisher as _t, DeploymentEventsStore as a, processStackMessages as an, applyRoleArnIfSet as at, unsupportedFinalSnapshotError as b, LockError as bn, buildAssetRedirectMap as bt, replayFailedOperations as c, AwsClients as cn, withRetry as ct, IMPLICIT_DELETE_DEPENDENCIES as d, setAwsClients as dn, DagBuilder as dt, findLargeInlineResources as en, readConfigString as et, computeImplicitDeleteEdges as f, AssetError as fn, TemplateParser as ft, ccRoutedFinalSnapshotError as g, DeployCancelledError as gn, shouldRetainResource as gt, buildFinalSnapshotIdentifier as h, DependencyError as hn, rebuildClientForBucketRegion as ht, DeploymentEventsReader as i, AssemblyReader as in, requireConfigString as it, red as j, formatError as jn, buildDockerImage as jt, gray as k, StateError as kn, validateAssetBucketName as kt, replayRollback as l, getAwsClients as ln, isRetryableTransientError as lt, PRE_DELETE_SNAPSHOT_TYPES as m, ConfigError as mn, S3StateBackend as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, expectedOwnerParam as nn, requireConfigArray as nt, planFailedOps as o, clearBucketRegionCache as on, DiffCalculator as ot, ATOMIC_FINAL_SNAPSHOT_TYPES as p, CdkdError as pn, LockManager as pt, WAFv2WebACLProvider as q, resolveStateBucketWithDefaultAndSource as qt, DeployEngine as r, derivePartitionAndUrlSuffix as rn, requireConfigObject as rt, planRollback as s, resolveBucketRegion as sn, describeTypeWithThrottleRetry as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, uploadCfnTemplate as tn, replayWarn as tt, withResourceDeadline as u, resetAwsClients as un, isThrottlingError as ut, isFinalSnapshotError as v, LocalMigrateError as vn, stringifyValue as vt, isStatefulRecreateTargetSync as w, ProvisioningError as wn, AssetModeResolver as wt, makeCanonicalizePropertiesFn as x, MissingCdkCliError as xn, createAssetRedirectResolver as xt, refusesFinalSnapshot as y, LocalStartServiceError as yn, WorkGraph as yt, CloudControlProvider as z, synthesisStatusMessage as zt };
22593
+ //# sourceMappingURL=deploy-engine-DQd1PUUv.js.map