@go-to-k/cdkd 0.238.1 → 0.238.3
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 +118 -6
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-BxEZXkWw.js → deploy-engine-MEo926OW.js} +24 -13
- package/dist/{deploy-engine-BxEZXkWw.js.map → deploy-engine-MEo926OW.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-MEo926OW.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.3";
|
|
1889
1889
|
}
|
|
1890
1890
|
/**
|
|
1891
1891
|
* Generate a time-sortable unique run id, e.g.
|
|
@@ -37371,6 +37371,86 @@ var NestedStackProvider = class {
|
|
|
37371
37371
|
}
|
|
37372
37372
|
};
|
|
37373
37373
|
|
|
37374
|
+
//#endregion
|
|
37375
|
+
//#region src/provisioning/providers/wait-condition-handle-provider.ts
|
|
37376
|
+
/**
|
|
37377
|
+
* AWS::CloudFormation::WaitConditionHandle Provider (no-op placeholder).
|
|
37378
|
+
*
|
|
37379
|
+
* In CloudFormation this resource's physical id is a pre-signed S3 URL that
|
|
37380
|
+
* `cfn-signal` posts to, backed by CloudFormation's own internal signal
|
|
37381
|
+
* bucket. That URL cannot exist outside a CloudFormation deployment, so cdkd
|
|
37382
|
+
* provisions the handle as a pure no-op: no AWS API is called, and the
|
|
37383
|
+
* physical id is a synthesized opaque placeholder.
|
|
37384
|
+
*
|
|
37385
|
+
* This matches how the type is used in practice by CDK constructs — most
|
|
37386
|
+
* notably `cdk-multi-region-stack`, which emits a bare
|
|
37387
|
+
* `CfnWaitConditionHandle` only so a sibling stack never has zero resources
|
|
37388
|
+
* (CloudFormation rejects empty templates). Actual wait-condition signaling
|
|
37389
|
+
* (`AWS::CloudFormation::WaitCondition`, which blocks on signals sent to the
|
|
37390
|
+
* handle URL) remains unsupported — that semantic fundamentally requires
|
|
37391
|
+
* CloudFormation itself.
|
|
37392
|
+
*/
|
|
37393
|
+
var WaitConditionHandleProvider = class {
|
|
37394
|
+
logger = getLogger().child("WaitConditionHandleProvider");
|
|
37395
|
+
handledProperties = new Map([["AWS::CloudFormation::WaitConditionHandle", /* @__PURE__ */ new Set([])]]);
|
|
37396
|
+
/**
|
|
37397
|
+
* "Create" the handle: synthesize a unique placeholder physical id.
|
|
37398
|
+
* `Ref` on the handle resolves to this id. It is deliberately NOT
|
|
37399
|
+
* URL-shaped — a consumer that tries to `cfn-signal` it should fail
|
|
37400
|
+
* loudly rather than post to a URL that nothing polls.
|
|
37401
|
+
*/
|
|
37402
|
+
async create(logicalId, _resourceType, _properties) {
|
|
37403
|
+
const physicalId = `cdkd-wait-condition-handle-${logicalId}-${randomUUID()}`;
|
|
37404
|
+
this.logger.debug(`Created no-op WaitConditionHandle placeholder ${logicalId} (${physicalId})`);
|
|
37405
|
+
return {
|
|
37406
|
+
physicalId,
|
|
37407
|
+
attributes: {}
|
|
37408
|
+
};
|
|
37409
|
+
}
|
|
37410
|
+
/**
|
|
37411
|
+
* The type has no properties, so there is nothing to update — keep the
|
|
37412
|
+
* existing physical id.
|
|
37413
|
+
*/
|
|
37414
|
+
async update(logicalId, physicalId, _resourceType, _properties, _previousProperties) {
|
|
37415
|
+
this.logger.debug(`No-op update for WaitConditionHandle ${logicalId}`);
|
|
37416
|
+
return {
|
|
37417
|
+
physicalId,
|
|
37418
|
+
wasReplaced: false,
|
|
37419
|
+
attributes: {}
|
|
37420
|
+
};
|
|
37421
|
+
}
|
|
37422
|
+
/** Nothing was created in AWS, so there is nothing to delete. */
|
|
37423
|
+
async delete(logicalId, _physicalId, _resourceType) {
|
|
37424
|
+
this.logger.debug(`No-op delete for WaitConditionHandle ${logicalId}`);
|
|
37425
|
+
}
|
|
37426
|
+
/**
|
|
37427
|
+
* WaitConditionHandle is effectively `Ref`-only. Its CFn schema declares a
|
|
37428
|
+
* single read-only property `Id` (the primary identifier); the deploy
|
|
37429
|
+
* engine's resolver never calls this method for it (it resolves via the
|
|
37430
|
+
* physicalId fallback), so a direct call — e.g. `cdkd orphan`'s live
|
|
37431
|
+
* attribute fetch — fails loudly instead of fabricating a value.
|
|
37432
|
+
*/
|
|
37433
|
+
async getAttribute(physicalId, resourceType, attributeName) {
|
|
37434
|
+
throw new ProvisioningError(`AWS::CloudFormation::WaitConditionHandle has no Fn::GetAtt attributes (requested: ${attributeName})`, resourceType, physicalId);
|
|
37435
|
+
}
|
|
37436
|
+
/** No managed properties → nothing can drift. */
|
|
37437
|
+
async readCurrentState() {
|
|
37438
|
+
return {};
|
|
37439
|
+
}
|
|
37440
|
+
/**
|
|
37441
|
+
* Import: there is no AWS-queryable resource behind a handle, so accept a
|
|
37442
|
+
* caller-supplied physical id verbatim (for `--migrate-from-cloudformation`
|
|
37443
|
+
* this is CloudFormation's pre-signed-URL id from `DescribeStackResources`)
|
|
37444
|
+
* and synthesize a placeholder otherwise.
|
|
37445
|
+
*/
|
|
37446
|
+
async import(input) {
|
|
37447
|
+
return {
|
|
37448
|
+
physicalId: input.knownPhysicalId ?? `cdkd-wait-condition-handle-${input.logicalId}-${randomUUID()}`,
|
|
37449
|
+
attributes: {}
|
|
37450
|
+
};
|
|
37451
|
+
}
|
|
37452
|
+
};
|
|
37453
|
+
|
|
37374
37454
|
//#endregion
|
|
37375
37455
|
//#region src/provisioning/providers/acm-certificate-provider.ts
|
|
37376
37456
|
/**
|
|
@@ -37855,6 +37935,7 @@ function registerAllProviders(registry) {
|
|
|
37855
37935
|
registry.register("AWS::S3Tables::Namespace", s3TablesProvider);
|
|
37856
37936
|
registry.register("AWS::S3Tables::Table", s3TablesProvider);
|
|
37857
37937
|
registry.register("AWS::CloudFormation::Stack", new NestedStackProvider());
|
|
37938
|
+
registry.register("AWS::CloudFormation::WaitConditionHandle", new WaitConditionHandleProvider());
|
|
37858
37939
|
}
|
|
37859
37940
|
|
|
37860
37941
|
//#endregion
|
|
@@ -39176,6 +39257,7 @@ async function confirmPrompt$6(prompt) {
|
|
|
39176
39257
|
|
|
39177
39258
|
//#endregion
|
|
39178
39259
|
//#region src/cli/commands/diff-recursive.ts
|
|
39260
|
+
const logger = getLogger().child("DiffRecursive");
|
|
39179
39261
|
/** Empty template used to diff a removed nested child's state → all DELETE. */
|
|
39180
39262
|
const EMPTY_TEMPLATE = { Resources: {} };
|
|
39181
39263
|
/**
|
|
@@ -39258,15 +39340,45 @@ async function loadStateOrEmpty(stackName, region, stateBackend) {
|
|
|
39258
39340
|
*/
|
|
39259
39341
|
async function computeStackDiff(currentState, template, region, stackName, stateBackend, diffCalculator, parameters) {
|
|
39260
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
|
+
}
|
|
39261
39372
|
const resolveFn = (value) => intrinsicResolver.resolve(value, {
|
|
39262
|
-
template,
|
|
39373
|
+
template: effectiveTemplate,
|
|
39263
39374
|
resources: currentState.resources,
|
|
39264
39375
|
stateBackend,
|
|
39265
39376
|
stackName,
|
|
39266
39377
|
bestEffort: true,
|
|
39267
|
-
...
|
|
39378
|
+
...mergedParameters && { parameters: mergedParameters },
|
|
39379
|
+
...conditions && { conditions }
|
|
39268
39380
|
});
|
|
39269
|
-
return diffCalculator.calculateDiff(currentState,
|
|
39381
|
+
return diffCalculator.calculateDiff(currentState, effectiveTemplate, resolveFn);
|
|
39270
39382
|
}
|
|
39271
39383
|
/**
|
|
39272
39384
|
* Resolve a nested-stack child's input `Parameters` (declared on the parent's
|
|
@@ -56945,7 +57057,7 @@ function reorderArgs(argv) {
|
|
|
56945
57057
|
async function main() {
|
|
56946
57058
|
installPipeCloseHandler();
|
|
56947
57059
|
const program = new Command();
|
|
56948
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.238.
|
|
57060
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.238.3");
|
|
56949
57061
|
program.addCommand(createBootstrapCommand());
|
|
56950
57062
|
program.addCommand(createSynthCommand());
|
|
56951
57063
|
program.addCommand(createListCommand());
|