@go-to-k/cdkd 0.238.2 → 0.238.4
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 +40 -8
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-iPBf_Lk2.js → deploy-engine-CQuZCVUP.js} +26 -12
- package/dist/{deploy-engine-iPBf_Lk2.js.map → deploy-engine-CQuZCVUP.js.map} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { a as getLiveRenderer, c as PATTERN_B_RESOURCE_TYPES, d as generateResourceNameWithFallback, f as withSkipPrefix, i as runStackBuffered, n as getLogger, o as PATTERN_B_NAME_OPTIONS, p as withStackName, s as PATTERN_B_NAME_PROPERTIES, u as generateResourceName } from "./logger-BzO-joNR.js";
|
|
3
3
|
import { A as withErrorHandling, C as StackHasActiveImportsError, S as ResourceUpdateNotSupportedError, _ as MissingCdkCliError, a as normalizeAwsTagsToCfn, b as ProvisioningError, f as LocalInvokeBuildError$1, i as matchesCdkPath, k as normalizeAwsError, l as CdkdError, m as LocalStartServiceError, n as isTerminationProtectionPropagationError, o as resolveExplicitPhysicalId, p as LocalMigrateError, r as CDK_PATH_TAG, s as assertRegionMatch, t as disableInstanceApiTermination, v as NestedStackChildDirectDestroyError, w as StackTerminationProtectionError, x as ResourceTimeoutError, y as PartialFailureError } from "./ec2-termination-protection-q-WGWgxa.js";
|
|
4
4
|
import { a as setAwsClients, i as resetAwsClients, r as getAwsClients, t as AwsClients } from "./aws-clients-B15NAPbL.js";
|
|
5
|
-
import { $ as getDockerCmd, A as DiffCalculator, B as buildAssetRedirectMap, C as findActionableSilentDrops, Ct as resolveBucketRegion, D as refStateLookupFromResource, E as cfnRefValueFromPhysicalId, F as rebuildClientForBucketRegion, G as BOOTSTRAP_MARKER_PREFIX, H as loadPublishableAssetManifest, I as shouldRetainResource, J as parseBootstrapMarker, K as ensureAssetStorage, L as AssetPublisher, M as TemplateParser, N as LockManager, O as WAFv2WebACLProvider, P as S3StateBackend, Q as formatDockerLoginError, R as stringifyValue, S as ProviderRegistry, T as IntrinsicFunctionResolver, U as rewriteTemplateAssetReferences, V as createAssetRedirectResolver, W as AssetModeResolver, X as validateContainerRepoName, Y as validateAssetBucketName, Z as buildDockerImage, _ as green, _t as CFN_TEMPLATE_URL_LIMIT, a as withRetry, at as synthesisStatusMessage, b as IAMRoleProvider, bt as uploadCfnTemplate, c as computeImplicitDeleteEdges, ct as resolveApp, d as isStatefulRecreateTargetSync, dt as resolveSkipPrefix, et as runDockerForeground, f as renderStatefulReason, ft as resolveStateBucketWithDefault, g as gray, gt as CFN_TEMPLATE_BODY_LIMIT, h as cyan, ht as warnDeprecatedNoPrefixCliFlag, i as withResourceDeadline, it as Synthesizer, j as DagBuilder, k as applyRoleArnIfSet, l as extractDeploymentEventError, lt as resolveAutoAssetStorage, m as bold, mt as resolveUseCdkBootstrapAssets, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as AssetManifestLoader, o as isRetryableTransientError, ot as getDefaultStateBucketName, p as formatResourceLine, pt as resolveStateBucketWithDefaultAndSource, q as getBootstrapMarkerKey, r as DeployEngine, rt as getDockerImageBySourceHash, s as IMPLICIT_DELETE_DEPENDENCIES, st as getLegacyStateBucketName, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as runDockerStreaming, u as MULTI_REGION_RECREATE_BLOCKED_TYPES, ut as resolveCaptureObservedState, v as red, vt as MIGRATE_TMP_PREFIX, w as CloudControlProvider, x as collectInlinePolicyNamesManagedBySiblings, xt as AssemblyReader, y as yellow, yt as findLargeInlineResources, z as WorkGraph } from "./deploy-engine-
|
|
5
|
+
import { $ as getDockerCmd, A as DiffCalculator, B as buildAssetRedirectMap, C as findActionableSilentDrops, Ct as resolveBucketRegion, D as refStateLookupFromResource, E as cfnRefValueFromPhysicalId, F as rebuildClientForBucketRegion, G as BOOTSTRAP_MARKER_PREFIX, H as loadPublishableAssetManifest, I as shouldRetainResource, J as parseBootstrapMarker, K as ensureAssetStorage, L as AssetPublisher, M as TemplateParser, N as LockManager, O as WAFv2WebACLProvider, P as S3StateBackend, Q as formatDockerLoginError, R as stringifyValue, S as ProviderRegistry, T as IntrinsicFunctionResolver, U as rewriteTemplateAssetReferences, V as createAssetRedirectResolver, W as AssetModeResolver, X as validateContainerRepoName, Y as validateAssetBucketName, Z as buildDockerImage, _ as green, _t as CFN_TEMPLATE_URL_LIMIT, a as withRetry, at as synthesisStatusMessage, b as IAMRoleProvider, bt as uploadCfnTemplate, c as computeImplicitDeleteEdges, ct as resolveApp, d as isStatefulRecreateTargetSync, dt as resolveSkipPrefix, et as runDockerForeground, f as renderStatefulReason, ft as resolveStateBucketWithDefault, g as gray, gt as CFN_TEMPLATE_BODY_LIMIT, h as cyan, ht as warnDeprecatedNoPrefixCliFlag, i as withResourceDeadline, it as Synthesizer, j as DagBuilder, k as applyRoleArnIfSet, l as extractDeploymentEventError, lt as resolveAutoAssetStorage, m as bold, mt as resolveUseCdkBootstrapAssets, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as AssetManifestLoader, o as isRetryableTransientError, ot as getDefaultStateBucketName, p as formatResourceLine, pt as resolveStateBucketWithDefaultAndSource, q as getBootstrapMarkerKey, r as DeployEngine, rt as getDockerImageBySourceHash, s as IMPLICIT_DELETE_DEPENDENCIES, st as getLegacyStateBucketName, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as runDockerStreaming, u as MULTI_REGION_RECREATE_BLOCKED_TYPES, ut as resolveCaptureObservedState, v as red, vt as MIGRATE_TMP_PREFIX, w as CloudControlProvider, x as collectInlinePolicyNamesManagedBySiblings, xt as AssemblyReader, y as yellow, yt as findLargeInlineResources, z as WorkGraph } from "./deploy-engine-CQuZCVUP.js";
|
|
6
6
|
import { t as expectedOwnerParam } from "./expected-bucket-owner-BjEfUnkA.js";
|
|
7
7
|
import { t as ASGProvider } from "./asg-provider-Dbl1_mwT.js";
|
|
8
8
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -1885,7 +1885,7 @@ const FLUSH_INTERVAL_MS = 2e3;
|
|
|
1885
1885
|
const FLUSH_EVENT_THRESHOLD = 50;
|
|
1886
1886
|
/** Build-time cdkd version, with a dev fallback for non-built contexts. */
|
|
1887
1887
|
function getCdkdVersion() {
|
|
1888
|
-
return "0.238.
|
|
1888
|
+
return "0.238.4";
|
|
1889
1889
|
}
|
|
1890
1890
|
/**
|
|
1891
1891
|
* Generate a time-sortable unique run id, e.g.
|
|
@@ -39257,6 +39257,7 @@ async function confirmPrompt$6(prompt) {
|
|
|
39257
39257
|
|
|
39258
39258
|
//#endregion
|
|
39259
39259
|
//#region src/cli/commands/diff-recursive.ts
|
|
39260
|
+
const logger = getLogger().child("DiffRecursive");
|
|
39260
39261
|
/** Empty template used to diff a removed nested child's state → all DELETE. */
|
|
39261
39262
|
const EMPTY_TEMPLATE = { Resources: {} };
|
|
39262
39263
|
/**
|
|
@@ -39339,15 +39340,45 @@ async function loadStateOrEmpty(stackName, region, stateBackend) {
|
|
|
39339
39340
|
*/
|
|
39340
39341
|
async function computeStackDiff(currentState, template, region, stackName, stateBackend, diffCalculator, parameters) {
|
|
39341
39342
|
const intrinsicResolver = new IntrinsicFunctionResolver(region);
|
|
39343
|
+
let mergedParameters = parameters;
|
|
39344
|
+
let parametersBound = false;
|
|
39345
|
+
try {
|
|
39346
|
+
const userParameters = {};
|
|
39347
|
+
for (const [name, value] of Object.entries(parameters ?? {})) if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") userParameters[name] = String(value);
|
|
39348
|
+
const templateParameters = await intrinsicResolver.resolveParameters(template, userParameters);
|
|
39349
|
+
mergedParameters = {
|
|
39350
|
+
...parameters,
|
|
39351
|
+
...templateParameters
|
|
39352
|
+
};
|
|
39353
|
+
parametersBound = true;
|
|
39354
|
+
} catch (error) {
|
|
39355
|
+
logger.debug(`Diff parameter binding for stack ${stackName} is partial: ${error instanceof Error ? error.message : String(error)}`);
|
|
39356
|
+
}
|
|
39357
|
+
let effectiveTemplate = template;
|
|
39358
|
+
let conditions;
|
|
39359
|
+
if (parametersBound) try {
|
|
39360
|
+
conditions = await intrinsicResolver.evaluateConditions({
|
|
39361
|
+
template,
|
|
39362
|
+
resources: currentState.resources,
|
|
39363
|
+
stateBackend,
|
|
39364
|
+
stackName,
|
|
39365
|
+
bestEffort: true,
|
|
39366
|
+
...mergedParameters && { parameters: mergedParameters }
|
|
39367
|
+
});
|
|
39368
|
+
effectiveTemplate = new TemplateParser().filterResourcesByCondition(template, conditions);
|
|
39369
|
+
} catch (error) {
|
|
39370
|
+
logger.debug(`Diff condition evaluation for stack ${stackName} skipped: ${error instanceof Error ? error.message : String(error)}`);
|
|
39371
|
+
}
|
|
39342
39372
|
const resolveFn = (value) => intrinsicResolver.resolve(value, {
|
|
39343
|
-
template,
|
|
39373
|
+
template: effectiveTemplate,
|
|
39344
39374
|
resources: currentState.resources,
|
|
39345
39375
|
stateBackend,
|
|
39346
39376
|
stackName,
|
|
39347
39377
|
bestEffort: true,
|
|
39348
|
-
...
|
|
39378
|
+
...mergedParameters && { parameters: mergedParameters },
|
|
39379
|
+
...conditions && { conditions }
|
|
39349
39380
|
});
|
|
39350
|
-
return diffCalculator.calculateDiff(currentState,
|
|
39381
|
+
return diffCalculator.calculateDiff(currentState, effectiveTemplate, resolveFn);
|
|
39351
39382
|
}
|
|
39352
39383
|
/**
|
|
39353
39384
|
* Resolve a nested-stack child's input `Parameters` (declared on the parent's
|
|
@@ -47175,17 +47206,18 @@ function collectImportableResources(template) {
|
|
|
47175
47206
|
*/
|
|
47176
47207
|
function buildStackState(stackName, region, rows, templateParser, template, existingState, selectiveMode) {
|
|
47177
47208
|
const resources = selectiveMode && existingState ? { ...existingState.resources } : {};
|
|
47209
|
+
const parameterNames = new Set(Object.keys(template.Parameters ?? {}));
|
|
47178
47210
|
for (const row of rows) {
|
|
47179
47211
|
if (row.outcome !== "imported" || !row.physicalId) continue;
|
|
47180
47212
|
const tmplResource = template.Resources[row.logicalId];
|
|
47181
47213
|
if (!tmplResource) continue;
|
|
47182
|
-
const deps = templateParser.extractDependencies(tmplResource);
|
|
47214
|
+
const deps = [...templateParser.extractDependencies(tmplResource)].filter((dep) => !parameterNames.has(dep));
|
|
47183
47215
|
resources[row.logicalId] = {
|
|
47184
47216
|
physicalId: row.physicalId,
|
|
47185
47217
|
resourceType: row.resourceType,
|
|
47186
47218
|
properties: tmplResource.Properties ?? {},
|
|
47187
47219
|
attributes: {},
|
|
47188
|
-
dependencies:
|
|
47220
|
+
dependencies: deps,
|
|
47189
47221
|
provisionedBy: "sdk"
|
|
47190
47222
|
};
|
|
47191
47223
|
}
|
|
@@ -57026,7 +57058,7 @@ function reorderArgs(argv) {
|
|
|
57026
57058
|
async function main() {
|
|
57027
57059
|
installPipeCloseHandler();
|
|
57028
57060
|
const program = new Command();
|
|
57029
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.238.
|
|
57061
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.238.4");
|
|
57030
57062
|
program.addCommand(createBootstrapCommand());
|
|
57031
57063
|
program.addCommand(createSynthCommand());
|
|
57032
57064
|
program.addCommand(createListCommand());
|