@go-to-k/cdkd 0.234.0 → 0.234.1
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.
|
@@ -3166,14 +3166,18 @@ async function ensureAssetStorage(options) {
|
|
|
3166
3166
|
* are cached per region for the process lifetime (the marker read is one
|
|
3167
3167
|
* GetObject against a bucket every deploy already reads — design §4.1).
|
|
3168
3168
|
*
|
|
3169
|
-
* In legacy mode, one `logger.info` line per
|
|
3170
|
-
* `cdk gc` hazard and the `cdkd bootstrap
|
|
3171
|
-
* users are not doing anything
|
|
3169
|
+
* In legacy mode, one `logger.info` line per legacy region per invocation
|
|
3170
|
+
* mentions the `cdk gc` hazard and the exact `cdkd bootstrap --region <r>`
|
|
3171
|
+
* opt-in command (info, not warn — existing users are not doing anything
|
|
3172
|
+
* wrong; design §12.2). Per-region because opt-in is keyed by each stack's
|
|
3173
|
+
* deploy region: a multi-region app can be opted in for one region and
|
|
3174
|
+
* legacy for another, and a region-less notice reads as a false negative to
|
|
3175
|
+
* a user who just bootstrapped a different region.
|
|
3172
3176
|
*/
|
|
3173
3177
|
var AssetModeResolver = class {
|
|
3174
3178
|
logger = getLogger().child("AssetMode");
|
|
3175
3179
|
cache = /* @__PURE__ */ new Map();
|
|
3176
|
-
|
|
3180
|
+
legacyNoticeShownRegions = /* @__PURE__ */ new Set();
|
|
3177
3181
|
stateBackend;
|
|
3178
3182
|
accountId;
|
|
3179
3183
|
profile;
|
|
@@ -3205,9 +3209,9 @@ var AssetModeResolver = class {
|
|
|
3205
3209
|
const markerKey = getBootstrapMarkerKey(region);
|
|
3206
3210
|
const body = await this.stateBackend.getRawObject(markerKey);
|
|
3207
3211
|
if (body === null) {
|
|
3208
|
-
if (!this.
|
|
3209
|
-
this.
|
|
3210
|
-
this.logger.info(
|
|
3212
|
+
if (!this.legacyNoticeShownRegions.has(region) && !this.suppressLegacyNotice) {
|
|
3213
|
+
this.legacyNoticeShownRegions.add(region);
|
|
3214
|
+
this.logger.info(`Assets for region '${region}' are published to the CDK bootstrap bucket/repo, which 'cdk gc' may garbage-collect (cdkd-deployed stacks have no CloudFormation stack for gc to scan). Run 'cdkd bootstrap --region ${region}' to create cdkd-owned asset storage that 'cdk gc' never touches.`);
|
|
3211
3215
|
}
|
|
3212
3216
|
return { mode: "legacy" };
|
|
3213
3217
|
}
|
|
@@ -7497,6 +7501,27 @@ async function getAccountInfo(overrideRegion) {
|
|
|
7497
7501
|
return cachedAccountInfo;
|
|
7498
7502
|
}
|
|
7499
7503
|
}
|
|
7504
|
+
/**
|
|
7505
|
+
* Collect every name referenced (Ref / Fn::Sub placeholder / other intrinsic
|
|
7506
|
+
* argument) by the sections cdkd actually evaluates: Resources, Outputs, and
|
|
7507
|
+
* Conditions. Deliberately excludes `Rules` (assertion-only, never evaluated
|
|
7508
|
+
* by cdkd — CloudFormation evaluates them pre-deployment, cdkd has no
|
|
7509
|
+
* equivalent gate) and `Metadata`. Used to avoid resolving template
|
|
7510
|
+
* parameters nothing consumes.
|
|
7511
|
+
*/
|
|
7512
|
+
function collectReferencedParameterNames(template) {
|
|
7513
|
+
const parser = new TemplateParser();
|
|
7514
|
+
const referenced = /* @__PURE__ */ new Set();
|
|
7515
|
+
for (const section of [
|
|
7516
|
+
template.Resources,
|
|
7517
|
+
template.Outputs,
|
|
7518
|
+
template.Conditions
|
|
7519
|
+
]) {
|
|
7520
|
+
if (!section || typeof section !== "object") continue;
|
|
7521
|
+
for (const name of parser.extractReferences(section)) referenced.add(name);
|
|
7522
|
+
}
|
|
7523
|
+
return referenced;
|
|
7524
|
+
}
|
|
7500
7525
|
var IntrinsicFunctionResolver = class {
|
|
7501
7526
|
logger = getLogger().child("IntrinsicFunctionResolver");
|
|
7502
7527
|
resolverRegion;
|
|
@@ -7517,6 +7542,7 @@ var IntrinsicFunctionResolver = class {
|
|
|
7517
7542
|
const parameters = {};
|
|
7518
7543
|
const templateParameters = template.Parameters;
|
|
7519
7544
|
if (!templateParameters || typeof templateParameters !== "object") return parameters;
|
|
7545
|
+
let referencedNames;
|
|
7520
7546
|
for (const [name, definition] of Object.entries(templateParameters)) {
|
|
7521
7547
|
const paramDef = definition;
|
|
7522
7548
|
if (userParameters && name in userParameters) {
|
|
@@ -7529,6 +7555,11 @@ var IntrinsicFunctionResolver = class {
|
|
|
7529
7555
|
}
|
|
7530
7556
|
if ("Default" in paramDef) {
|
|
7531
7557
|
if (paramDef.Type.startsWith("AWS::SSM::Parameter::Value")) {
|
|
7558
|
+
referencedNames ??= collectReferencedParameterNames(template);
|
|
7559
|
+
if (!referencedNames.has(name)) {
|
|
7560
|
+
this.logger.debug(`Parameter ${name}: skipping SSM resolution (not referenced by Resources/Outputs/Conditions)`);
|
|
7561
|
+
continue;
|
|
7562
|
+
}
|
|
7532
7563
|
const ssmPath = String(paramDef.Default);
|
|
7533
7564
|
this.logger.debug(`Parameter ${name}: resolving SSM parameter path ${ssmPath}`);
|
|
7534
7565
|
const resolved = await this.resolveSSMParameter(ssmPath);
|
|
@@ -15737,4 +15768,4 @@ var DeployEngine = class {
|
|
|
15737
15768
|
|
|
15738
15769
|
//#endregion
|
|
15739
15770
|
export { AssetManifestLoader as $, DiffCalculator as A, buildAssetRedirectMap as B, findActionableSilentDrops as C, refStateLookupFromResource as D, cfnRefValueFromPhysicalId as E, rebuildClientForBucketRegion as F, BOOTSTRAP_MARKER_PREFIX as G, loadPublishableAssetManifest as H, shouldRetainResource as I, buildDockerImage as J, ensureAssetStorage as K, AssetPublisher as L, TemplateParser as M, LockManager as N, WAFv2WebACLProvider as O, S3StateBackend as P, runDockerStreaming as Q, stringifyValue as R, ProviderRegistry as S, IntrinsicFunctionResolver as T, rewriteTemplateAssetReferences as U, createAssetRedirectResolver as V, AssetModeResolver as W, getDockerCmd as X, formatDockerLoginError as Y, runDockerForeground as Z, green as _, AssemblyReader as _t, withRetry as a, resolveApp as at, IAMRoleProvider as b, computeImplicitDeleteEdges as c, resolveStateBucketWithDefault as ct, isStatefulRecreateTargetSync as d, warnDeprecatedNoPrefixCliFlag as dt, getDockerImageBySourceHash as et, renderStatefulReason as f, CFN_TEMPLATE_BODY_LIMIT as ft, gray as g, uploadCfnTemplate as gt, cyan as h, findLargeInlineResources as ht, withResourceDeadline as i, getLegacyStateBucketName as it, DagBuilder as j, applyRoleArnIfSet as k, extractDeploymentEventError as l, resolveStateBucketWithDefaultAndSource as lt, bold as m, MIGRATE_TMP_PREFIX as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, synthesisStatusMessage as nt, isRetryableTransientError as o, resolveCaptureObservedState as ot, formatResourceLine as p, CFN_TEMPLATE_URL_LIMIT as pt, parseBootstrapMarker as q, DeployEngine as r, getDefaultStateBucketName as rt, IMPLICIT_DELETE_DEPENDENCIES as s, resolveSkipPrefix as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, Synthesizer as tt, MULTI_REGION_RECREATE_BLOCKED_TYPES as u, resolveUseCdkBootstrapAssets as ut, red as v, clearBucketRegionCache as vt, CloudControlProvider as w, collectInlinePolicyNamesManagedBySiblings as x, yellow as y, resolveBucketRegion as yt, WorkGraph as z };
|
|
15740
|
-
//# sourceMappingURL=deploy-engine-
|
|
15771
|
+
//# sourceMappingURL=deploy-engine-CdAkyW9k.js.map
|