@go-to-k/cdkd 0.265.3 → 0.267.0
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-C3MDoBIO.js → asg-provider-CBMy7ibk.js} +42 -31
- package/dist/asg-provider-CBMy7ibk.js.map +1 -0
- package/dist/cli.js +52 -80
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-CyxJwyBN.js → deploy-engine-BXgD8s_k.js} +99 -5
- package/dist/deploy-engine-BXgD8s_k.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/asg-provider-C3MDoBIO.js.map +0 -1
- package/dist/deploy-engine-CyxJwyBN.js.map +0 -1
|
@@ -1193,6 +1193,99 @@ function parseEnvironment(env) {
|
|
|
1193
1193
|
};
|
|
1194
1194
|
}
|
|
1195
1195
|
|
|
1196
|
+
//#endregion
|
|
1197
|
+
//#region src/synthesis/stack-messages.ts
|
|
1198
|
+
/**
|
|
1199
|
+
* Cloud-assembly metadata entry types that carry annotation messages.
|
|
1200
|
+
* See `ArtifactMetadataEntryType` in aws-cdk-lib's cloud-assembly-schema.
|
|
1201
|
+
*/
|
|
1202
|
+
const MESSAGE_ENTRY_TYPES = {
|
|
1203
|
+
"aws:cdk:error": "error",
|
|
1204
|
+
"aws:cdk:warning": "warning",
|
|
1205
|
+
"aws:cdk:info": "info"
|
|
1206
|
+
};
|
|
1207
|
+
/**
|
|
1208
|
+
* Collect annotation messages (`aws:cdk:error` / `aws:cdk:warning` /
|
|
1209
|
+
* `aws:cdk:info`) for one stack artifact.
|
|
1210
|
+
*
|
|
1211
|
+
* Two on-disk layouts exist and BOTH must be read (issue #1228):
|
|
1212
|
+
* - Older aws-cdk-lib embeds entries inline in the artifact's `metadata`
|
|
1213
|
+
* field in `manifest.json`.
|
|
1214
|
+
* - Current aws-cdk-lib writes them to a side file
|
|
1215
|
+
* `<artifactId>.metadata.json` referenced by the artifact's
|
|
1216
|
+
* `additionalMetadataFile` field (see `collectStackMetadata` in
|
|
1217
|
+
* aws-cdk-lib `core/lib/stack-synthesizers/_shared.js`), keeping
|
|
1218
|
+
* `manifest.json` itself slim.
|
|
1219
|
+
*
|
|
1220
|
+
* A referenced-but-unreadable side file throws: the assembly is torn, and
|
|
1221
|
+
* silently continuing could hide an error annotation that must block deploy.
|
|
1222
|
+
*/
|
|
1223
|
+
function collectStackMessages(assemblyDir, artifact) {
|
|
1224
|
+
const merged = { ...artifact.metadata ?? {} };
|
|
1225
|
+
if (artifact.additionalMetadataFile) {
|
|
1226
|
+
const metadataPath = join(assemblyDir, artifact.additionalMetadataFile);
|
|
1227
|
+
let sideFile;
|
|
1228
|
+
try {
|
|
1229
|
+
sideFile = JSON.parse(readFileSync(metadataPath, "utf-8"));
|
|
1230
|
+
if (sideFile === null || typeof sideFile !== "object" || Array.isArray(sideFile)) throw new Error("expected a JSON object mapping construct paths to metadata entry arrays");
|
|
1231
|
+
for (const [path, entries] of Object.entries(sideFile)) {
|
|
1232
|
+
if (!Array.isArray(entries)) throw new Error(`entry for path '${path}' is not an array`);
|
|
1233
|
+
merged[path] = [...merged[path] ?? [], ...entries];
|
|
1234
|
+
}
|
|
1235
|
+
} catch (error) {
|
|
1236
|
+
throw new SynthesisError(`Failed to read stack metadata file ${metadataPath}: ${error instanceof Error ? error.message : String(error)}`, error instanceof Error ? error : void 0);
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
const messages = [];
|
|
1240
|
+
for (const [path, entries] of Object.entries(merged)) {
|
|
1241
|
+
if (!Array.isArray(entries)) continue;
|
|
1242
|
+
for (const entry of entries) {
|
|
1243
|
+
const type = entry?.type ?? "";
|
|
1244
|
+
const level = Object.hasOwn(MESSAGE_ENTRY_TYPES, type) ? MESSAGE_ENTRY_TYPES[type] : void 0;
|
|
1245
|
+
if (!level) continue;
|
|
1246
|
+
messages.push({
|
|
1247
|
+
level,
|
|
1248
|
+
path,
|
|
1249
|
+
message: typeof entry.data === "string" ? entry.data : entry.data === void 0 ? "" : JSON.stringify(entry.data)
|
|
1250
|
+
});
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
return messages;
|
|
1254
|
+
}
|
|
1255
|
+
/**
|
|
1256
|
+
* Print annotation messages for the given stacks and fail per the CDK
|
|
1257
|
+
* CLI's rules (issues #1228 / #1230): every message is displayed at its
|
|
1258
|
+
* level (`[Error|Warning|Info at /path] message`); by default any error
|
|
1259
|
+
* annotation aborts with `Found errors`, `--strict` additionally aborts
|
|
1260
|
+
* on warnings with `Found warnings (--strict mode)`, and
|
|
1261
|
+
* `--ignore-errors` never aborts. Errors win over strict warnings when
|
|
1262
|
+
* both exist (CDK CLI parity).
|
|
1263
|
+
*
|
|
1264
|
+
* Call AFTER stack selection so an error in a non-selected stack does not
|
|
1265
|
+
* block the selected ones (same selection-awareness as the #1150 deferred
|
|
1266
|
+
* macro expansion).
|
|
1267
|
+
*/
|
|
1268
|
+
function processStackMessages(stacks, logger, options = {}) {
|
|
1269
|
+
let hasErrors = false;
|
|
1270
|
+
let hasWarnings = false;
|
|
1271
|
+
for (const stack of stacks) for (const msg of stack.messages ?? []) switch (msg.level) {
|
|
1272
|
+
case "warning":
|
|
1273
|
+
hasWarnings = true;
|
|
1274
|
+
logger.warn(`[Warning at ${msg.path}] ${msg.message}`);
|
|
1275
|
+
break;
|
|
1276
|
+
case "info":
|
|
1277
|
+
logger.info(`[Info at ${msg.path}] ${msg.message}`);
|
|
1278
|
+
break;
|
|
1279
|
+
case "error":
|
|
1280
|
+
hasErrors = true;
|
|
1281
|
+
logger.error(`[Error at ${msg.path}] ${msg.message}`);
|
|
1282
|
+
break;
|
|
1283
|
+
}
|
|
1284
|
+
const failAt = options.strict ? "warn" : options.ignoreErrors ? "none" : "error";
|
|
1285
|
+
if (hasErrors && failAt !== "none") throw new SynthesisError("Found errors");
|
|
1286
|
+
if (hasWarnings && failAt === "warn") throw new SynthesisError("Found warnings (--strict mode)");
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1196
1289
|
//#endregion
|
|
1197
1290
|
//#region src/synthesis/assembly-reader.ts
|
|
1198
1291
|
/**
|
|
@@ -1325,7 +1418,8 @@ var AssemblyReader = class {
|
|
|
1325
1418
|
region: env?.region !== "unknown-region" ? env?.region : void 0,
|
|
1326
1419
|
account: env?.account !== "unknown-account" ? env?.account : void 0,
|
|
1327
1420
|
...props?.terminationProtection !== void 0 && { terminationProtection: props.terminationProtection },
|
|
1328
|
-
...Object.keys(nestedTemplates).length > 0 && { nestedTemplates }
|
|
1421
|
+
...Object.keys(nestedTemplates).length > 0 && { nestedTemplates },
|
|
1422
|
+
messages: collectStackMessages(assemblyDir, artifact)
|
|
1329
1423
|
};
|
|
1330
1424
|
}
|
|
1331
1425
|
/**
|
|
@@ -11260,7 +11354,7 @@ var CloudControlProvider = class {
|
|
|
11260
11354
|
this.logger.debug(`Deleting resource ${logicalId} (${resourceType}), physical ID: ${physicalId}`);
|
|
11261
11355
|
if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
|
|
11262
11356
|
this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
|
|
11263
|
-
const { ASGProvider } = await import("./asg-provider-
|
|
11357
|
+
const { ASGProvider } = await import("./asg-provider-CBMy7ibk.js").then((n) => n.n);
|
|
11264
11358
|
await new ASGProvider().delete(logicalId, physicalId, resourceType, _properties, context);
|
|
11265
11359
|
return;
|
|
11266
11360
|
}
|
|
@@ -17143,7 +17237,7 @@ const FLUSH_INTERVAL_MS = 2e3;
|
|
|
17143
17237
|
const FLUSH_EVENT_THRESHOLD = 50;
|
|
17144
17238
|
/** Build-time cdkd version, with a dev fallback for non-built contexts. */
|
|
17145
17239
|
function getCdkdVersion() {
|
|
17146
|
-
return "0.
|
|
17240
|
+
return "0.267.0";
|
|
17147
17241
|
}
|
|
17148
17242
|
/**
|
|
17149
17243
|
* Generate a time-sortable unique run id, e.g.
|
|
@@ -19130,5 +19224,5 @@ var DeployEngine = class {
|
|
|
19130
19224
|
};
|
|
19131
19225
|
|
|
19132
19226
|
//#endregion
|
|
19133
|
-
export { createAssetRedirectResolver as $,
|
|
19134
|
-
//# sourceMappingURL=deploy-engine-
|
|
19227
|
+
export { createAssetRedirectResolver as $, ProvisioningError as $t, CloudControlProvider as A, MIGRATE_TMP_PREFIX as At, assertRegionMatch as B, resetAwsClients as Bt, green as C, resolveSkipPrefix as Ct, collectInlinePolicyNamesManagedBySiblings as D, warnDeprecatedNoPrefixCliFlag as Dt, IAMRoleProvider as E, resolveUseCdkBootstrapAssets as Et, cfnRefValueFromPhysicalId as F, processStackMessages as Ft, LockManager as G, DependencyError as Gt, DiffCalculator as H, AssetError as Ht, refStateLookupFromResource as I, clearBucketRegionCache as It, shouldRetainResource as J, LocalStartServiceError as Jt, S3StateBackend as K, LocalInvokeBuildError as Kt, WAFv2WebACLProvider as L, resolveBucketRegion as Lt, disableInstanceApiTermination as M, uploadCfnTemplate as Mt, isTerminationProtectionPropagationError as N, expectedOwnerParam as Nt, ProviderRegistry as O, CFN_TEMPLATE_BODY_LIMIT as Ot, IntrinsicFunctionResolver as P, AssemblyReader as Pt, buildAssetRedirectMap as Q, PartialFailureError as Qt, normalizeAwsTagsToCfn as R, AwsClients as Rt, gray as S, resolveCaptureObservedState as St, yellow as T, resolveStateBucketWithDefaultAndSource as Tt, DagBuilder as U, CdkdError as Ut, applyRoleArnIfSet as V, setAwsClients as Vt, TemplateParser as W, ConfigError as Wt, stringifyValue as X, MissingCdkCliError as Xt, AssetPublisher as Y, LockError as Yt, WorkGraph as Z, NestedStackChildDirectDestroyError as Zt, isStatefulRecreateTargetSync as _, synthesisStatusMessage as _t, DeploymentEventsStore as a, SynthesisError as an, getBootstrapMarkerKey as at, bold as b, resolveApp as bt, replayFailedOperations as c, normalizeAwsError as cn, validateContainerRepoName as ct, withRetry as d, getDockerCmd as dt, ResourceTimeoutError as en, loadPublishableAssetManifest as et, isRetryableTransientError as f, runDockerForeground as ft, MULTI_REGION_RECREATE_BLOCKED_TYPES as g, Synthesizer as gt, extractDeploymentEventError as h, getDockerImageBySourceHash as ht, DeploymentEventsReader as i, StateError as in, ensureAssetStorage as it, slowCcOperationTimeoutMs as j, findLargeInlineResources as jt, findActionableSilentDrops as k, CFN_TEMPLATE_URL_LIMIT as kt, replayRollback as l, withErrorHandling as ln, buildDockerImage as lt, computeImplicitDeleteEdges as m, AssetManifestLoader as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, StackHasActiveImportsError as nn, AssetModeResolver as nt, planFailedOps as o, formatError as on, parseBootstrapMarker as ot, IMPLICIT_DELETE_DEPENDENCIES as p, runDockerStreaming as pt, rebuildClientForBucketRegion as q, LocalMigrateError as qt, DeployEngine as r, StackTerminationProtectionError as rn, BOOTSTRAP_MARKER_PREFIX as rt, planRollback as s, isCdkdError as sn, validateAssetBucketName as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, ResourceUpdateNotSupportedError as tn, rewriteTemplateAssetReferences as tt, withResourceDeadline as u, __exportAll as un, formatDockerLoginError as ut, renderStatefulReason as v, getDefaultStateBucketName as vt, red as w, resolveStateBucketWithDefault as wt, cyan as x, resolveAutoAssetStorage as xt, formatResourceLine as y, getLegacyStateBucketName as yt, resolveExplicitPhysicalId as z, getAwsClients as zt };
|
|
19228
|
+
//# sourceMappingURL=deploy-engine-BXgD8s_k.js.map
|