@go-to-k/cdkd 0.260.12 → 0.260.14
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-BL_wheRD.js → asg-provider-Dk8OwSXQ.js} +2 -2
- package/dist/{asg-provider-BL_wheRD.js.map → asg-provider-Dk8OwSXQ.js.map} +1 -1
- package/dist/cli.js +55 -19
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-CvZzwupQ.js → deploy-engine-BiwL0VId.js} +29 -2
- package/dist/deploy-engine-BiwL0VId.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-CvZzwupQ.js.map +0 -1
|
@@ -3892,6 +3892,20 @@ function cacheOptionToFlag(option) {
|
|
|
3892
3892
|
//#endregion
|
|
3893
3893
|
//#region src/assets/docker-asset-publisher.ts
|
|
3894
3894
|
/**
|
|
3895
|
+
* Registries this process has already logged in to, keyed by registry host
|
|
3896
|
+
* (`<accountId>.dkr.ecr.<region>.amazonaws.com`, which uniquely encodes the
|
|
3897
|
+
* account + region credential context). ECR authorization tokens are valid
|
|
3898
|
+
* for ~12h and a deploy process is short-lived, so a successful login is
|
|
3899
|
+
* reused for the process lifetime — mirroring `cdk-assets`, which skips
|
|
3900
|
+
* re-login on repeat publishes. Keyed per registry (NOT globally) so that
|
|
3901
|
+
* cross-account / cross-region assets each get their own login.
|
|
3902
|
+
*
|
|
3903
|
+
* Module-level (not an instance field) because the deploy pipeline may
|
|
3904
|
+
* construct more than one `DockerAssetPublisher` per run (e.g. one per
|
|
3905
|
+
* WorkGraph asset-publish node), and the login is genuinely process-wide.
|
|
3906
|
+
*/
|
|
3907
|
+
const loggedInRegistries = /* @__PURE__ */ new Set();
|
|
3908
|
+
/**
|
|
3895
3909
|
* Publishes Docker image assets to ECR
|
|
3896
3910
|
*
|
|
3897
3911
|
* Handles:
|
|
@@ -4012,8 +4026,20 @@ var DockerAssetPublisher = class {
|
|
|
4012
4026
|
}
|
|
4013
4027
|
/**
|
|
4014
4028
|
* Authenticate with ECR via `docker login --password-stdin`.
|
|
4029
|
+
*
|
|
4030
|
+
* The login is cached per registry (`<accountId>.dkr.ecr.<region>`) for the
|
|
4031
|
+
* process lifetime: a repeat publish to the same registry returns early
|
|
4032
|
+
* without the `GetAuthorizationToken` call or the `docker login` subprocess
|
|
4033
|
+
* (mirrors `cdk-assets`). ECR tokens are valid ~12h and a deploy process is
|
|
4034
|
+
* short-lived, so this is safe. Keyed per registry so cross-account /
|
|
4035
|
+
* cross-region assets each get their own login.
|
|
4015
4036
|
*/
|
|
4016
4037
|
async ecrLogin(client, accountId, region) {
|
|
4038
|
+
const registryKey = `${accountId}.dkr.ecr.${region}.amazonaws.com`;
|
|
4039
|
+
if (loggedInRegistries.has(registryKey)) {
|
|
4040
|
+
this.logger.debug(`Reusing cached ECR login for ${registryKey}`);
|
|
4041
|
+
return;
|
|
4042
|
+
}
|
|
4017
4043
|
const authData = (await client.send(new GetAuthorizationTokenCommand({}))).authorizationData?.[0];
|
|
4018
4044
|
if (!authData?.authorizationToken) throw new AssetError("Failed to get ECR authorization token");
|
|
4019
4045
|
const [username, password] = Buffer.from(authData.authorizationToken, "base64").toString().split(":");
|
|
@@ -4027,6 +4053,7 @@ var DockerAssetPublisher = class {
|
|
|
4027
4053
|
"--password-stdin",
|
|
4028
4054
|
endpoint
|
|
4029
4055
|
], { input: password });
|
|
4056
|
+
loggedInRegistries.add(registryKey);
|
|
4030
4057
|
} catch (err) {
|
|
4031
4058
|
const e = err;
|
|
4032
4059
|
throw new AssetError(`ECR login failed: ${formatDockerLoginError(e.stderr || e.message || String(err), endpoint)}`);
|
|
@@ -11098,7 +11125,7 @@ var CloudControlProvider = class {
|
|
|
11098
11125
|
this.logger.debug(`Deleting resource ${logicalId} (${resourceType}), physical ID: ${physicalId}`);
|
|
11099
11126
|
if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
|
|
11100
11127
|
this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
|
|
11101
|
-
const { ASGProvider } = await import("./asg-provider-
|
|
11128
|
+
const { ASGProvider } = await import("./asg-provider-Dk8OwSXQ.js").then((n) => n.n);
|
|
11102
11129
|
await new ASGProvider().delete(logicalId, physicalId, resourceType, _properties, context);
|
|
11103
11130
|
return;
|
|
11104
11131
|
}
|
|
@@ -17839,4 +17866,4 @@ var DeployEngine = class {
|
|
|
17839
17866
|
|
|
17840
17867
|
//#endregion
|
|
17841
17868
|
export { getBootstrapMarkerKey as $, formatError as $t, refStateLookupFromResource as A, resolveBucketRegion as At, S3StateBackend as B, LocalMigrateError as Bt, findActionableSilentDrops as C, CFN_TEMPLATE_URL_LIMIT as Ct, isTerminationProtectionPropagationError as D, expectedOwnerParam as Dt, disableInstanceApiTermination as E, uploadCfnTemplate as Et, applyRoleArnIfSet as F, AssetError as Ft, WorkGraph as G, PartialFailureError as Gt, shouldRetainResource as H, LockError as Ht, DiffCalculator as I, CdkdError as It, loadPublishableAssetManifest as J, ResourceUpdateNotSupportedError as Jt, buildAssetRedirectMap as K, ProvisioningError as Kt, DagBuilder as L, ConfigError as Lt, normalizeAwsTagsToCfn as M, getAwsClients as Mt, resolveExplicitPhysicalId as N, resetAwsClients as Nt, IntrinsicFunctionResolver as O, AssemblyReader as Ot, assertRegionMatch as P, setAwsClients as Pt, ensureAssetStorage as Q, SynthesisError as Qt, TemplateParser as R, DependencyError as Rt, ProviderRegistry as S, CFN_TEMPLATE_BODY_LIMIT as St, slowCcOperationTimeoutMs as T, findLargeInlineResources as Tt, AssetPublisher as U, MissingCdkCliError as Ut, rebuildClientForBucketRegion as V, LocalStartServiceError as Vt, stringifyValue as W, NestedStackChildDirectDestroyError as Wt, AssetModeResolver as X, StackTerminationProtectionError as Xt, rewriteTemplateAssetReferences as Y, StackHasActiveImportsError as Yt, BOOTSTRAP_MARKER_PREFIX as Z, StateError as Zt, green as _, resolveSkipPrefix as _t, withRetry as a, getDockerCmd as at, IAMRoleProvider as b, resolveUseCdkBootstrapAssets as bt, computeImplicitDeleteEdges as c, AssetManifestLoader as ct, isStatefulRecreateTargetSync as d, synthesisStatusMessage as dt, isCdkdError as en, parseBootstrapMarker as et, renderStatefulReason as f, getDefaultStateBucketName as ft, gray as g, resolveCaptureObservedState as gt, cyan as h, resolveAutoAssetStorage as ht, withResourceDeadline as i, formatDockerLoginError as it, WAFv2WebACLProvider as j, AwsClients as jt, cfnRefValueFromPhysicalId as k, clearBucketRegionCache as kt, extractDeploymentEventError as l, getDockerImageBySourceHash as lt, bold as m, resolveApp as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, withErrorHandling as nn, validateContainerRepoName as nt, isRetryableTransientError as o, runDockerForeground as ot, formatResourceLine as p, getLegacyStateBucketName as pt, createAssetRedirectResolver as q, ResourceTimeoutError as qt, DeployEngine as r, __exportAll as rn, buildDockerImage as rt, IMPLICIT_DELETE_DEPENDENCIES as s, runDockerStreaming as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, normalizeAwsError as tn, validateAssetBucketName as tt, MULTI_REGION_RECREATE_BLOCKED_TYPES as u, Synthesizer as ut, red as v, resolveStateBucketWithDefault as vt, CloudControlProvider as w, MIGRATE_TMP_PREFIX as wt, collectInlinePolicyNamesManagedBySiblings as x, warnDeprecatedNoPrefixCliFlag as xt, yellow as y, resolveStateBucketWithDefaultAndSource as yt, LockManager as z, LocalInvokeBuildError as zt };
|
|
17842
|
-
//# sourceMappingURL=deploy-engine-
|
|
17869
|
+
//# sourceMappingURL=deploy-engine-BiwL0VId.js.map
|