@go-to-k/cdkd 0.283.2 → 0.283.3

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 configStringRefusal, $t as resolveStateBucketWithDefaultAndSource, A as green, An as NestedStackChildDirectDestroyError, At as BOOTSTRAP_MARKER_PREFIX, B as slowCcOperationTimeoutMs, Bt as runDockerForeground, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Ct as stringifyValue, D as bold, Dn as LocalStartServiceError, Dt as loadPublishableAssetManifest, E as formatResourceLine, En as LocalMigrateError, Et as createAssetRedirectResolver, F as clearOnUpdateRemoval, Fn as StackHasActiveImportsError, Ft as validateContainerRepoName, G as getAccountInfo, Gt as synthesisStatusMessage, H as isTerminationProtectionPropagationError, Hn as withErrorHandling, Ht as AssetManifestLoader, I as ProviderRegistry, In as StackTerminationProtectionError, It as buildDenyExternalAccessPolicy, J as normalizeAwsTagsToCfn, Jt as resolveApp, K as refStateLookupFromResource, Kt as getDefaultStateBucketName, L as findActionableSilentDrops, Lt as buildDockerImage, M as yellow, Mn as ProvisioningError, Mt as getBootstrapMarkerKey, N as IAMRoleProvider, Nn as ResourceTimeoutError, Nt as parseBootstrapMarker, O as cyan, Ot as rewriteTemplateAssetReferences, P as collectInlinePolicyNamesManagedBySiblings, Pn as ResourceUpdateNotSupportedError, Pt as validateAssetBucketName, Q as configBooleanRefusal, Qt as resolveStateBucketWithDefault, R as findSilentDropProperties, Rt as formatDockerLoginError, S as extractDeploymentEventError, St as AssetPublisher, T as renderStatefulReason, Tn as LocalInvokeBuildError$1, Tt as buildAssetRedirectMap, U as IntrinsicFunctionResolver, Ut as getDockerImageBySourceHash, V as disableInstanceApiTermination, Vn as normalizeAwsError, Vt as runDockerStreaming, W as cfnRefValueFromPhysicalId, Wt as Synthesizer, X as assertRegionMatch, Xt as resolveCaptureObservedState, Y as resolveExplicitPhysicalId, Yt as resolveAutoAssetStorage, Z as coerceCfnBoolean, Zt as resolveSkipPrefix, _ as createPreDeleteFinalSnapshot, _n as getAwsClients, _t as TemplateParser, a as DeploymentEventsStore, an as MIGRATE_TMP_PREFIX, at as s3BucketArn, b as unsupportedFinalSnapshotError, bt as rebuildClientForBucketRegion, c as replayFailedOperations, cn as expectedOwnerParam, ct as s3BucketRegionalDomainName, d as IMPLICIT_DELETE_DEPENDENCIES, dn as derivePartitionAndUrlSuffix, dt as DiffCalculator, en as resolveUseCdkBootstrapAssets, et as readConfigString, f as computeImplicitDeleteEdges, fn as AssemblyReader, ft as describeTypeWithThrottleRetry, g as ccRoutedFinalSnapshotError, gn as AwsClients, gt as DagBuilder, h as buildFinalSnapshotIdentifier, hn as resolveBucketRegion, ht as isThrottlingError, i as DeploymentEventsReader, in as CFN_TEMPLATE_URL_LIMIT, it as requireConfigString, j as red, jn as PartialFailureError, jt as ensureAssetStorage, k as gray, kn as MissingCdkCliError, kt as AssetModeResolver, l as replayRollback, ln as PARTITION_TABLE, lt as s3BucketWebsiteUrl, m as PRE_DELETE_SNAPSHOT_TYPES, mt as isRetryableTransientError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as warnDeprecatedNoPrefixCliFlag, nt as requireConfigArray, o as planFailedOps, on as findLargeInlineResources, ot as s3BucketDomainName, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as processStackMessages, pt as withRetry, q as WAFv2WebACLProvider, qt as getLegacyStateBucketName, r as DeployEngine, rn as CFN_TEMPLATE_BODY_LIMIT, rt as requireConfigObject, s as planRollback, sn as uploadCfnTemplate, st as s3BucketDualStackDomainName, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as stateBucketExistenceConfirmed, tt as replayWarn, u as withResourceDeadline, un as canonicalizeRegion, ut as applyRoleArnIfSet, v as isFinalSnapshotError, vn as resetAwsClients, vt as LockManager, w as isStatefulRecreateTargetSync, wn as DeployCancelledError, wt as WorkGraph, x as makeCanonicalizePropertiesFn, xn as CdkdError, xt as shouldRetainResource, y as refusesFinalSnapshot, yn as setAwsClients, yt as S3StateBackend, z as CloudControlProvider, zt as getDockerCmd } from "./deploy-engine-DuYBir2W.js";
2
+ import { $ as configStringRefusal, $t as resolveStateBucketWithDefaultAndSource, A as green, An as NestedStackChildDirectDestroyError, At as BOOTSTRAP_MARKER_PREFIX, B as slowCcOperationTimeoutMs, Bt as runDockerForeground, C as MULTI_REGION_RECREATE_BLOCKED_TYPES, Ct as stringifyValue, D as bold, Dn as LocalStartServiceError, Dt as loadPublishableAssetManifest, E as formatResourceLine, En as LocalMigrateError, Et as createAssetRedirectResolver, F as clearOnUpdateRemoval, Fn as StackHasActiveImportsError, Ft as validateContainerRepoName, G as getAccountInfo, Gt as synthesisStatusMessage, H as isTerminationProtectionPropagationError, Hn as withErrorHandling, Ht as AssetManifestLoader, I as ProviderRegistry, In as StackTerminationProtectionError, It as buildDenyExternalAccessPolicy, J as normalizeAwsTagsToCfn, Jt as resolveApp, K as refStateLookupFromResource, Kt as getDefaultStateBucketName, L as findActionableSilentDrops, Lt as buildDockerImage, M as yellow, Mn as ProvisioningError, Mt as getBootstrapMarkerKey, N as IAMRoleProvider, Nn as ResourceTimeoutError, Nt as parseBootstrapMarker, O as cyan, Ot as rewriteTemplateAssetReferences, P as collectInlinePolicyNamesManagedBySiblings, Pn as ResourceUpdateNotSupportedError, Pt as validateAssetBucketName, Q as configBooleanRefusal, Qt as resolveStateBucketWithDefault, R as findSilentDropProperties, Rt as formatDockerLoginError, S as extractDeploymentEventError, St as AssetPublisher, T as renderStatefulReason, Tn as LocalInvokeBuildError$1, Tt as buildAssetRedirectMap, U as IntrinsicFunctionResolver, Ut as getDockerImageBySourceHash, V as disableInstanceApiTermination, Vn as normalizeAwsError, Vt as runDockerStreaming, W as cfnRefValueFromPhysicalId, Wt as Synthesizer, X as assertRegionMatch, Xt as resolveCaptureObservedState, Y as resolveExplicitPhysicalId, Yt as resolveAutoAssetStorage, Z as coerceCfnBoolean, Zt as resolveSkipPrefix, _ as createPreDeleteFinalSnapshot, _n as getAwsClients, _t as TemplateParser, a as DeploymentEventsStore, an as MIGRATE_TMP_PREFIX, at as s3BucketArn, b as unsupportedFinalSnapshotError, bt as rebuildClientForBucketRegion, c as replayFailedOperations, cn as expectedOwnerParam, ct as s3BucketRegionalDomainName, d as IMPLICIT_DELETE_DEPENDENCIES, dn as derivePartitionAndUrlSuffix, dt as DiffCalculator, en as resolveUseCdkBootstrapAssets, et as readConfigString, f as computeImplicitDeleteEdges, fn as AssemblyReader, ft as describeTypeWithThrottleRetry, g as ccRoutedFinalSnapshotError, gn as AwsClients, gt as DagBuilder, h as buildFinalSnapshotIdentifier, hn as resolveBucketRegion, ht as isThrottlingError, i as DeploymentEventsReader, in as CFN_TEMPLATE_URL_LIMIT, it as requireConfigString, j as red, jn as PartialFailureError, jt as ensureAssetStorage, k as gray, kn as MissingCdkCliError, kt as AssetModeResolver, l as replayRollback, ln as PARTITION_TABLE, lt as s3BucketWebsiteUrl, m as PRE_DELETE_SNAPSHOT_TYPES, mt as isRetryableTransientError, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nn as warnDeprecatedNoPrefixCliFlag, nt as requireConfigArray, o as planFailedOps, on as findLargeInlineResources, ot as s3BucketDomainName, p as ATOMIC_FINAL_SNAPSHOT_TYPES, pn as processStackMessages, pt as withRetry, q as WAFv2WebACLProvider, qt as getLegacyStateBucketName, r as DeployEngine, rn as CFN_TEMPLATE_BODY_LIMIT, rt as requireConfigObject, s as planRollback, sn as uploadCfnTemplate, st as s3BucketDualStackDomainName, t as DEFAULT_RESOURCE_TIMEOUT_MS, tn as stateBucketExistenceConfirmed, tt as replayWarn, u as withResourceDeadline, un as canonicalizeRegion, ut as applyRoleArnIfSet, v as isFinalSnapshotError, vn as resetAwsClients, vt as LockManager, w as isStatefulRecreateTargetSync, wn as DeployCancelledError, wt as WorkGraph, x as makeCanonicalizePropertiesFn, xn as CdkdError, xt as shouldRetainResource, y as refusesFinalSnapshot, yn as setAwsClients, yt as S3StateBackend, z as CloudControlProvider, zt as getDockerCmd } from "./deploy-engine-DxpS3fJ9.js";
3
3
  import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, h as withStackName, i as runStackBuffered, m as withSkipPrefix, n as getLogger, o as PATTERN_B_NAME_OPTIONS, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-zRrlbaQt.js";
4
- import { t as ASGProvider } from "./asg-provider-Cl4ATw1l.js";
4
+ import { t as ASGProvider } from "./asg-provider-CtmogXk9.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";
@@ -67196,6 +67196,75 @@ function createLocalStateProvider$1(options, cdkdStackName, synthRegion) {
67196
67196
  return createLocalStateProvider(options, cdkdStackName, synthRegion, cdkdExtraStateProviders);
67197
67197
  }
67198
67198
 
67199
+ //#endregion
67200
+ //#region src/local/intrinsic-image.ts
67201
+ /**
67202
+ * Boundary shim over cdk-local's container-image intrinsic resolver for
67203
+ * `cdkd local invoke` / `start-api` / `run-task` — resolves the canonical
67204
+ * CDK 2.x `Fn::Join` shape for ECR image URIs (`lambda.DockerImageCode.fromEcr`
67205
+ * / ECS `ContainerImage.fromEcrRepository`) and the same-stack ECR `Fn::GetAtt`
67206
+ * Arn / RepositoryUri synthesis. The implementation lives in cdk-local and
67207
+ * cdkd consumes it instead of carrying a byte-identical copy.
67208
+ * `ImageResolutionContext` is re-exported as a type. See cdk-local's
67209
+ * `src/local/intrinsic-image.ts`.
67210
+ *
67211
+ * Two of the three symbols are bare re-exports. `derivePseudoParametersFromRegion`
67212
+ * is NOT: it is wrapped, for the reason below.
67213
+ */
67214
+ /**
67215
+ * Derive `${AWS::Region}` / `${AWS::AccountId}` / `${AWS::Partition}` /
67216
+ * `${AWS::URLSuffix}` for the `Fn::Join` `Code.ImageUri` path (issue #637),
67217
+ * with the region CANONICALIZED to its lower-case spelling first.
67218
+ *
67219
+ * ## Why this is a wrapper rather than a re-export
67220
+ *
67221
+ * Issue [#1795](https://github.com/go-to-k/cdkd/issues/1795) canonicalizes the
67222
+ * region inside `derivePartitionAndUrlSuffix` (`src/utils/aws-partition.ts`),
67223
+ * so every cdkd-OWNED region -> partition/suffix derivation inherits ONE
67224
+ * normalization point. This helper is a FOURTH derivation that the fix
67225
+ * structurally could not reach (issue
67226
+ * [#1814](https://github.com/go-to-k/cdkd/issues/1814)): the implementation is
67227
+ * cdk-local's, and it carries its own partition table whose prefix tests are
67228
+ * case-sensitive in the same direction. So an upper-cased `--region CN-NORTH-1`
67229
+ * still fell through to the commercial partition here and synthesized
67230
+ * `<acct>.dkr.ecr.CN-NORTH-1.amazonaws.com/...` — a `cn-` region carrying the
67231
+ * commercial suffix, a host that does not exist — at the five call sites, across
67232
+ * three files, that reach this symbol:
67233
+ *
67234
+ * - `src/cli/commands/local-start-api.ts` (the `Fn::Join` `Code.ImageUri` path)
67235
+ * - `src/cli/commands/local-invoke-agentcore.ts` (x3)
67236
+ * - `src/local/lambda-resolver.ts`
67237
+ *
67238
+ * The preferred fix is upstream — lower-casing the region inside cdk-local's
67239
+ * own implementation, which would keep exactly one normalization point. This
67240
+ * is the filed FALLBACK: a thin canonicalizing boundary over the re-export,
67241
+ * the same shape `docker-image-builder.ts` uses for its error-class boundary.
67242
+ * It stays correct if upstream later canonicalizes too, because
67243
+ * {@link canonicalizeRegion} is idempotent — double-folding is a no-op.
67244
+ *
67245
+ * Canonicalizing the INPUT (rather than post-processing the result) is what
67246
+ * makes this complete: the returned `region` is substituted as
67247
+ * `${AWS::Region}` into every ARN the resolver builds, so a raw upper-cased
67248
+ * value would misspell those too, not just the derived suffix.
67249
+ *
67250
+ * `undefined` passes through untouched — upstream answers `undefined` for a
67251
+ * missing region and that verdict is not this shim's to change.
67252
+ *
67253
+ * ## What this deliberately does NOT fix
67254
+ *
67255
+ * Case is only half the agreement between the two tables. cdk-local's table
67256
+ * predates the three rows cdkd's issue #1764 added, so `us-isof-` / `eu-isoe-` /
67257
+ * `eusc-` regions resolve COMMERCIAL here even when spelled canonically — a
67258
+ * table-COVERAGE divergence, orthogonal to case, filed as issue
67259
+ * [#1821](https://github.com/go-to-k/cdkd/issues/1821). Widening this wrapper
67260
+ * into a second partition authority would fix it, but that is a design call of
67261
+ * its own; the divergence is pinned by a unit case so it fails loudly rather
67262
+ * than staying latent.
67263
+ */
67264
+ function derivePseudoParametersFromRegion$1(region, accountId) {
67265
+ return derivePseudoParametersFromRegion(canonicalizeRegion(region), accountId);
67266
+ }
67267
+
67199
67268
  //#endregion
67200
67269
  //#region src/local/lambda-resolver.ts
67201
67270
  var LocalInvokeResolutionError = class LocalInvokeResolutionError extends Error {
@@ -67405,7 +67474,7 @@ function extractImageUri$1(value, logicalId, stackName, resources, region) {
67405
67474
  if (typeof sub === "string" && sub.length > 0) return sub;
67406
67475
  if (Array.isArray(sub) && typeof sub[0] === "string") return sub[0];
67407
67476
  if ("Fn::Join" in obj) {
67408
- const pseudoParameters = derivePseudoParametersFromRegion(region);
67477
+ const pseudoParameters = derivePseudoParametersFromRegion$1(region);
67409
67478
  const joinResolved = tryResolveImageFnJoin(value, resources, pseudoParameters ? { pseudoParameters } : void 0);
67410
67479
  if (joinResolved.kind === "resolved") return joinResolved.uri;
67411
67480
  if (joinResolved.kind === "needs-state") throw new LocalInvokeResolutionError(`Lambda '${logicalId}' in ${stackName} references same-stack ECR repository '${joinResolved.repoLogicalId}' via Fn::Join. cdkd local invoke cannot resolve the repository URI without state — deploy the stack first (so cdkd records the repository physical id), rebuild via lambda.DockerImageCode.fromImageAsset, or pin a public image.`);
@@ -71371,7 +71440,7 @@ function extractImageUri(value, logicalId, stackName, resources, region) {
71371
71440
  if (typeof sub === "string" && sub.length > 0) return sub;
71372
71441
  if (Array.isArray(sub) && typeof sub[0] === "string") return sub[0];
71373
71442
  if ("Fn::Join" in obj) {
71374
- const pseudoParameters = derivePseudoParametersFromRegion(region);
71443
+ const pseudoParameters = derivePseudoParametersFromRegion$1(region);
71375
71444
  const joinResolved = tryResolveImageFnJoin(value, resources, pseudoParameters ? { pseudoParameters } : void 0);
71376
71445
  if (joinResolved.kind === "resolved") return joinResolved.uri;
71377
71446
  if (joinResolved.kind === "needs-state") throw new Error(`Lambda '${logicalId}' in ${stackName} references same-stack ECR repository '${joinResolved.repoLogicalId}' via Fn::Join. cdkd local start-api cannot resolve the repository URI without state — deploy the stack first (so cdkd records the repository physical id), rebuild via lambda.DockerImageCode.fromImageAsset, or pin a public image.`);
@@ -73448,6 +73517,7 @@ async function localInvokeAgentCoreCommand(target, options) {
73448
73517
  const logger = getLogger();
73449
73518
  if (options.verbose) logger.setLevel("debug");
73450
73519
  warnIfDeprecatedRegion(options);
73520
+ if (options.region !== void 0) options.region = canonicalizeRegion(options.region);
73451
73521
  let containerId;
73452
73522
  let stopLogs;
73453
73523
  let sigintHandler;
@@ -73868,7 +73938,7 @@ async function buildSigV4HeadersIfRequested(options, resolved, loaded, host, por
73868
73938
  getLogger().warn(`Runtime '${resolved.logicalId}' declares a customJwtAuthorizer; --sigv4 ignored (JWT path takes precedence).`);
73869
73939
  return;
73870
73940
  }
73871
- const region = options.region ?? options.stackRegion ?? process.env["AWS_REGION"] ?? process.env["AWS_DEFAULT_REGION"] ?? resolved.stack.region;
73941
+ const region = canonicalizeRegion(options.region ?? options.stackRegion ?? process.env["AWS_REGION"] ?? process.env["AWS_DEFAULT_REGION"] ?? resolved.stack.region);
73872
73942
  if (!region) throw new CdkdError("--sigv4: no region resolved for the AgentCore signing scope. Pass --region <region>, set AWS_REGION, or use --from-cfn-stack with a region-bound stack.", "LOCAL_INVOKE_AGENTCORE_SIGV4_NO_REGION");
73873
73943
  const signed = await signAgentCoreInvocation({
73874
73944
  credentials: await resolveHostCredentialsForSigV4(options, resolved, loaded, region),
@@ -74014,7 +74084,7 @@ async function resolveAgentCoreCodeImageFromS3(resolved, code, s3Source, options
74014
74084
  key: s3Source.key,
74015
74085
  ...s3Source.versionId !== void 0 && { versionId: s3Source.versionId }
74016
74086
  };
74017
- const region = options.region ?? options.stackRegion ?? process.env["AWS_REGION"] ?? process.env["AWS_DEFAULT_REGION"] ?? resolved.stack.region;
74087
+ const region = canonicalizeRegion(options.region ?? options.stackRegion ?? process.env["AWS_REGION"] ?? process.env["AWS_DEFAULT_REGION"] ?? resolved.stack.region);
74018
74088
  const assumeRoleArn = resolveAssumeRoleArn(options, resolved, loaded);
74019
74089
  let credentials;
74020
74090
  if (assumeRoleArn) try {
@@ -74069,7 +74139,7 @@ async function buildContainerEnv(resolved, options, profileCredentials, profileC
74069
74139
  resources: imageContext?.stateResources ?? loaded.resources,
74070
74140
  consumerRegion: loaded.region
74071
74141
  };
74072
- const pseudo = imageContext?.pseudoParameters ?? derivePseudoParametersFromRegion(loaded.region);
74142
+ const pseudo = imageContext?.pseudoParameters ?? derivePseudoParametersFromRegion$1(loaded.region);
74073
74143
  if (pseudo) subContext.pseudoParameters = pseudo;
74074
74144
  if (imageContext?.stateParameters) subContext.parameters = imageContext.stateParameters;
74075
74145
  if (imageContext?.stateSensitiveParameters?.length) subContext.sensitiveParameters = new Set(imageContext.stateSensitiveParameters);
@@ -74125,7 +74195,7 @@ async function resolveFromS3BucketIntrinsic(resolved, stateProvider, loaded, ima
74125
74195
  resources: imageContext?.stateResources ?? loaded.resources,
74126
74196
  consumerRegion: loaded.region
74127
74197
  };
74128
- const pseudo = imageContext?.pseudoParameters ?? derivePseudoParametersFromRegion(loaded.region);
74198
+ const pseudo = imageContext?.pseudoParameters ?? derivePseudoParametersFromRegion$1(loaded.region);
74129
74199
  if (pseudo) subContext.pseudoParameters = pseudo;
74130
74200
  const crossStackResolver = await stateProvider.buildCrossStackResolver(loaded.region);
74131
74201
  if (crossStackResolver) subContext.crossStackResolver = crossStackResolver;
@@ -74153,7 +74223,7 @@ function describeIntrinsic(value) {
74153
74223
  */
74154
74224
  async function buildAgentCoreImageContext(candidate, stateProvider, options) {
74155
74225
  const logger = getLogger();
74156
- const region = options.region ?? process.env["AWS_REGION"] ?? process.env["AWS_DEFAULT_REGION"] ?? candidate.region;
74226
+ const region = canonicalizeRegion(options.region ?? process.env["AWS_REGION"] ?? process.env["AWS_DEFAULT_REGION"] ?? candidate.region);
74157
74227
  let accountId;
74158
74228
  try {
74159
74229
  accountId = await resolveCallerAccountId(region, options.profile);
@@ -74161,7 +74231,7 @@ async function buildAgentCoreImageContext(candidate, stateProvider, options) {
74161
74231
  logger.warn(`--from-cfn-stack: STS GetCallerIdentity failed: ${err instanceof Error ? err.message : String(err)}. A same-stack ECR image URI referencing \${AWS::AccountId} may not resolve.`);
74162
74232
  }
74163
74233
  const context = {};
74164
- const pseudo = derivePseudoParametersFromRegion(region, accountId);
74234
+ const pseudo = derivePseudoParametersFromRegion$1(region, accountId);
74165
74235
  if (pseudo) context.pseudoParameters = pseudo;
74166
74236
  const loaded = await stateProvider.load(candidate.stackName, candidate.region);
74167
74237
  if (loaded) {
@@ -74205,7 +74275,7 @@ async function applyAgentCoreCredentialEnv(dockerEnv, args) {
74205
74275
  const logger = getLogger();
74206
74276
  let assumeSucceeded = false;
74207
74277
  if (args.assumeRoleArn) {
74208
- const stsRegion = args.region ?? process.env["AWS_REGION"] ?? process.env["AWS_DEFAULT_REGION"];
74278
+ const stsRegion = canonicalizeRegion(args.region ?? process.env["AWS_REGION"] ?? process.env["AWS_DEFAULT_REGION"]);
74209
74279
  try {
74210
74280
  const creds = await assumeAgentCoreExecutionRole(args.assumeRoleArn, stsRegion);
74211
74281
  dockerEnv["AWS_ACCESS_KEY_ID"] = creds.accessKeyId;
@@ -76520,7 +76590,7 @@ function createMigrateCommand() {
76520
76590
  */
76521
76591
  function buildProgram() {
76522
76592
  const program = new Command();
76523
- program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.283.2");
76593
+ program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.283.3");
76524
76594
  program.hook("preAction", (_thisCommand, actionCommand) => {
76525
76595
  const { profile } = actionCommand.optsWithGlobals();
76526
76596
  if (profile !== void 0) process.env["AWS_PROFILE"] = profile;