@go-to-k/cdkd 0.282.6 → 0.282.7
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/{asg-provider-Dm_dVhvQ.js → asg-provider-DulIbRCK.js} +2 -2
- package/dist/{asg-provider-Dm_dVhvQ.js.map → asg-provider-DulIbRCK.js.map} +1 -1
- package/dist/cli.js +132 -10
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-4K_iJ2rV.js → deploy-engine-NA36xDvk.js} +3 -3
- package/dist/{deploy-engine-4K_iJ2rV.js.map → deploy-engine-NA36xDvk.js.map} +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
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-
|
|
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-NA36xDvk.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-
|
|
4
|
+
import { t as ASGProvider } from "./asg-provider-DulIbRCK.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";
|
|
@@ -67076,9 +67076,127 @@ function notFoundError$1(target, stack, resources) {
|
|
|
67076
67076
|
* registry (`c2s.ic.gov` / `sc2s.sgov.gov`) never matched and the caller
|
|
67077
67077
|
* silently classified a real ECR image as a user-managed one — skipping the
|
|
67078
67078
|
* `docker login` it needs.
|
|
67079
|
+
*
|
|
67080
|
+
* KNOWN BOUND (issue #1792): the `dkr.ecr` LABELS are still matched
|
|
67081
|
+
* case-sensitively, so `<acct>.DKR.ECR.<region>.<suffix>/` does not match at
|
|
67082
|
+
* all. Audited deliberately while fixing issue #1786 rather than missed — that
|
|
67083
|
+
* issue's normalization covers the captured region + suffix, i.e. the strict
|
|
67084
|
+
* CHECK, whereas widening the shape MATCHER makes cdkd `docker login` to a
|
|
67085
|
+
* host shape it previously skipped, which is a behavior expansion wanting its
|
|
67086
|
+
* own decision. The failure direction here is the safe one: NO credentials are
|
|
67087
|
+
* sent on any of the four call sites. Traced — `local run-task` and
|
|
67088
|
+
* `local invoke-agentcore` fall through to an anonymous `docker pull` that
|
|
67089
|
+
* fails, while `local invoke` and `local start-api` REFUSE before any pull.
|
|
67079
67090
|
*/
|
|
67080
67091
|
const ECR_URI_HOST_REGEX = /^(\d{12})\.dkr\.ecr\.([^.]+)\.([^/]+)\//;
|
|
67081
67092
|
/**
|
|
67093
|
+
* A region segment cdkd is willing to treat as a region id.
|
|
67094
|
+
*
|
|
67095
|
+
* Case is not the only way the `startsWith` partition classification can be
|
|
67096
|
+
* side-stepped: any leading junk defeats it the same way, and the captured
|
|
67097
|
+
* segment does not stay inert — it becomes an `ECRClient({region})` and is
|
|
67098
|
+
* interpolated into the fallback `docker login` endpoint. Measured before this
|
|
67099
|
+
* guard: `…dkr.ecr. us-iso-east-1.amazonaws.com/…` (leading space) and a
|
|
67100
|
+
* combining-mark form both parsed, yielding regions `" us-iso-east-1"` and
|
|
67101
|
+
* `"us-i̇so-east-1"`. Neither leaks credentials — an ACCEPTED suffix is always
|
|
67102
|
+
* an AWS-owned domain — but a region id is ASCII alphanumeric plus `-`, so
|
|
67103
|
+
* anything else is a malformed host and refusing it keeps the classification
|
|
67104
|
+
* honest.
|
|
67105
|
+
*
|
|
67106
|
+
* TESTED AGAINST THE RAW SEGMENT, BEFORE `toLowerCase()`, and that order is the
|
|
67107
|
+
* whole point: `String.prototype.toLowerCase` performs full Unicode case
|
|
67108
|
+
* folding, so the Kelvin sign U+212A folds to a plain ASCII `k`. Checking the
|
|
67109
|
+
* FOLDED segment therefore accepts `us-eKst-1` and yields the region
|
|
67110
|
+
* `us-ekst-1` — a region the host does not name — which is precisely the
|
|
67111
|
+
* class of substitution this guard exists to refuse. Matching `[A-Za-z0-9-]`
|
|
67112
|
+
* on the raw capture keeps case-insensitivity (the point of issue #1786) while
|
|
67113
|
+
* admitting only characters that fold to themselves.
|
|
67114
|
+
*
|
|
67115
|
+
* ONE DELIBERATE SIDE EFFECT, called out because it is a withdrawal rather than
|
|
67116
|
+
* an addition: a malformed-region host is now classified as an ordinary public
|
|
67117
|
+
* image with NO cdkd-side signal at all — neither the ECR verdict nor the #1764
|
|
67118
|
+
* foreign-suffix diagnostic. Both arms change, not just the foreign one:
|
|
67119
|
+
* `<acct>.dkr.ecr.us_east_1.example.com/…` used to log the partition-gap
|
|
67120
|
+
* warning and now logs nothing, and `<acct>.dkr.ecr.us_east_1.amazonaws.com/…`
|
|
67121
|
+
* used to be ACCEPTED as ECR and is now refused. That is the correct verdict
|
|
67122
|
+
* rather than a regression — the diagnostic's whole subject is "this suffix does
|
|
67123
|
+
* not belong to its region's PARTITION", and a segment that is not a region id
|
|
67124
|
+
* has no partition to belong to, so reporting it would send the reader hunting
|
|
67125
|
+
* for a table entry that could never exist — but it does mean a typo'd region
|
|
67126
|
+
* gets no cdkd-side hint, only docker's own pull failure. Both arms are pinned
|
|
67127
|
+
* by tests so a future widening of the guard cannot flip them silently.
|
|
67128
|
+
*/
|
|
67129
|
+
const CANONICAL_REGION_SEGMENT = /^[A-Za-z0-9][A-Za-z0-9-]*$/;
|
|
67130
|
+
/**
|
|
67131
|
+
* A URL suffix cdkd is willing to compare against the partition table.
|
|
67132
|
+
*
|
|
67133
|
+
* The SAME raw-capture rule as the region, and for the same reason one layer
|
|
67134
|
+
* over: the suffix is folded before the comparison, so a code point folding
|
|
67135
|
+
* into ASCII can impersonate a partition's suffix. This became reachable the
|
|
67136
|
+
* moment issue #1764 landed `aws-isoe`'s `cloud.adc-e.uk` — that suffix
|
|
67137
|
+
* contains a `k`, so `…dkr.ecr.eu-isoe-west-1.cloud.adc-e.uK/…` (Kelvin
|
|
67138
|
+
* sign) folded onto it and was ACCEPTED. Not a credential leak, since UTS-46
|
|
67139
|
+
* maps U+212A to `k` too and the host resolves to the real AWS domain, but it
|
|
67140
|
+
* falsifies the invariant the region guard's comment above states, so both
|
|
67141
|
+
* captures are held to the same rule rather than only the one that was
|
|
67142
|
+
* measured first.
|
|
67143
|
+
*
|
|
67144
|
+
* Dots are admitted because a suffix is a dotted DNS name; every other
|
|
67145
|
+
* character is refused, so the accepted set stays exactly the partition
|
|
67146
|
+
* table's own literals.
|
|
67147
|
+
*/
|
|
67148
|
+
const CANONICAL_URL_SUFFIX = /^[A-Za-z0-9][A-Za-z0-9.-]*$/;
|
|
67149
|
+
/**
|
|
67150
|
+
* The ONE case-normalization boundary of this module (issue #1786).
|
|
67151
|
+
*
|
|
67152
|
+
* DNS is case-INSENSITIVE, so `US-ISO-EAST-1.amazonaws.com` and
|
|
67153
|
+
* `us-iso-east-1.amazonaws.com` name the same host — but both halves of the
|
|
67154
|
+
* #1758 suffix check were case-SENSITIVE, in OPPOSITE directions:
|
|
67155
|
+
*
|
|
67156
|
+
* - an upper-cased REGION fails every `startsWith` prefix test in
|
|
67157
|
+
* `derivePartitionAndUrlSuffix`, so it falls through to the commercial
|
|
67158
|
+
* partition whose suffix is `amazonaws.com` — which is exactly what an ISO
|
|
67159
|
+
* look-alike host carries, so the strict check ACCEPTED it (the bypass);
|
|
67160
|
+
* - an upper-cased region or SUFFIX on a GENUINE host stopped matching its own
|
|
67161
|
+
* partition's suffix, so a real ECR registry was REJECTED and the caller
|
|
67162
|
+
* silently classified it as a user-managed image — the #1758 regression, one
|
|
67163
|
+
* layer up.
|
|
67164
|
+
*
|
|
67165
|
+
* The normalization lives HERE rather than inside `derivePartitionAndUrlSuffix`
|
|
67166
|
+
* because this is the boundary where an untrusted, DNS-shaped string enters
|
|
67167
|
+
* cdkd, and keeping it in ONE function means both exported entry points below —
|
|
67168
|
+
* and the suffix COMPARISON itself — cannot drift apart.
|
|
67169
|
+
*
|
|
67170
|
+
* This does NOT duplicate `canonicalizeRegion`, which issue #1795 added inside
|
|
67171
|
+
* `derivePartitionAndUrlSuffix` so the mapping folds its own input. The two
|
|
67172
|
+
* answer different questions and both are needed: that one makes the partition
|
|
67173
|
+
* LOOKUP case-insensitive for every caller, while these guards decide whether
|
|
67174
|
+
* the captured segments are a region id and a URL suffix AT ALL. Folding alone
|
|
67175
|
+
* cannot do that — folding is precisely what turns `us-eKst-1` into the
|
|
67176
|
+
* plausible `us-ekst-1` (see the guards' own comments), so a fold-only helper
|
|
67177
|
+
* makes the substitution easier to reach, not harder. Double-folding is a
|
|
67178
|
+
* no-op, which is why the redundant `toLowerCase()` calls below are left in
|
|
67179
|
+
* rather than removed: they keep this function the single answer for the
|
|
67180
|
+
* comparison even if the helper's behaviour changes again.
|
|
67181
|
+
*
|
|
67182
|
+
* The derived suffix is lower-cased too. Every entry in the partition table is
|
|
67183
|
+
* a lower-case literal today, so that is a no-op; it is there so this function
|
|
67184
|
+
* stays the single answer even if that table ever gains a mixed-case entry.
|
|
67185
|
+
*/
|
|
67186
|
+
function matchEcrRegistryHost(imageUri) {
|
|
67187
|
+
const m = ECR_URI_HOST_REGEX.exec(imageUri);
|
|
67188
|
+
if (!m) return void 0;
|
|
67189
|
+
if (!CANONICAL_REGION_SEGMENT.test(m[2])) return void 0;
|
|
67190
|
+
if (!CANONICAL_URL_SUFFIX.test(m[3])) return void 0;
|
|
67191
|
+
const region = m[2].toLowerCase();
|
|
67192
|
+
return {
|
|
67193
|
+
accountId: m[1],
|
|
67194
|
+
region,
|
|
67195
|
+
suffix: m[3].toLowerCase(),
|
|
67196
|
+
expectedSuffix: derivePartitionAndUrlSuffix(region).urlSuffix.toLowerCase()
|
|
67197
|
+
};
|
|
67198
|
+
}
|
|
67199
|
+
/**
|
|
67082
67200
|
* The account + region of an ECR image URI, or `undefined` when the URI is not
|
|
67083
67201
|
* an ECR registry host for the region it names.
|
|
67084
67202
|
*
|
|
@@ -67094,15 +67212,19 @@ const ECR_URI_HOST_REGEX = /^(\d{12})\.dkr\.ecr\.([^.]+)\.([^/]+)\//;
|
|
|
67094
67212
|
* `ecs-task-resolver.ts` consume it without breaking the invariant that module
|
|
67095
67213
|
* documents about itself (it resolves secrets through a separate module for
|
|
67096
67214
|
* exactly that reason).
|
|
67215
|
+
*
|
|
67216
|
+
* The returned `region` is LOWER-CASED (issue #1786) — it is consumed as an SDK
|
|
67217
|
+
* client region by `ecr-puller.ts` and as the `region` of a `kind: 'ecr'` image
|
|
67218
|
+
* by `ecs-task-resolver.ts`, and the canonical spelling of an AWS region id is
|
|
67219
|
+
* lower case.
|
|
67097
67220
|
*/
|
|
67098
67221
|
function parseEcrRegistryHost(imageUri) {
|
|
67099
|
-
const m =
|
|
67222
|
+
const m = matchEcrRegistryHost(imageUri);
|
|
67100
67223
|
if (!m) return void 0;
|
|
67101
|
-
|
|
67102
|
-
if (m[3] !== derivePartitionAndUrlSuffix(region).urlSuffix) return void 0;
|
|
67224
|
+
if (m.suffix !== m.expectedSuffix) return void 0;
|
|
67103
67225
|
return {
|
|
67104
|
-
accountId: m
|
|
67105
|
-
region
|
|
67226
|
+
accountId: m.accountId,
|
|
67227
|
+
region: m.region
|
|
67106
67228
|
};
|
|
67107
67229
|
}
|
|
67108
67230
|
/**
|
|
@@ -67116,8 +67238,8 @@ function parseEcrRegistryHost(imageUri) {
|
|
|
67116
67238
|
* `undefined`, and only the second is a cdkd gap rather than a user choice.
|
|
67117
67239
|
*/
|
|
67118
67240
|
function looksLikeEcrHostWithForeignSuffix(imageUri) {
|
|
67119
|
-
const m =
|
|
67120
|
-
return m !==
|
|
67241
|
+
const m = matchEcrRegistryHost(imageUri);
|
|
67242
|
+
return m !== void 0 && m.suffix !== m.expectedSuffix;
|
|
67121
67243
|
}
|
|
67122
67244
|
|
|
67123
67245
|
//#endregion
|
|
@@ -75821,7 +75943,7 @@ function createMigrateCommand() {
|
|
|
75821
75943
|
*/
|
|
75822
75944
|
function buildProgram() {
|
|
75823
75945
|
const program = new Command();
|
|
75824
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.282.
|
|
75946
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.282.7");
|
|
75825
75947
|
program.hook("preAction", (_thisCommand, actionCommand) => {
|
|
75826
75948
|
const { profile } = actionCommand.optsWithGlobals();
|
|
75827
75949
|
if (profile !== void 0) process.env["AWS_PROFILE"] = profile;
|