@go-to-k/cdkd 0.120.0 → 0.121.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/README.md +1 -1
- package/dist/cli.js +19 -19
- package/dist/cli.js.map +1 -1
- package/dist/{deploy-engine-Chzg_hDE.js → deploy-engine-B2RZT3ai.js} +46 -11
- package/dist/deploy-engine-B2RZT3ai.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-Chzg_hDE.js.map +0 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Drop-in CDK CLI for existing CDK apps — faster deploys via AWS SDK instead of
|
|
|
6
6
|
- **Up to 15x faster deploys than the AWS CDK CLI (CloudFormation)**
|
|
7
7
|
- **Local dev for CDK apps** — invoke Lambdas, serve API Gateway routes, and run ECS tasks directly from your CDK code, no `cdk synth → sam local` round-trip.
|
|
8
8
|
|
|
9
|
-

|
|
10
10
|
|
|
11
11
|
**cdkd complements the AWS CDK CLI rather than replacing it.** Use cdkd in dev/test for rapid iteration and SAM-style local execution; use the AWS CDK CLI in production for full CloudFormation tooling. Bidirectional migration is supported — [import an existing CloudFormation stack](#importing-existing-resources) into cdkd for iteration, or [export back to CloudFormation](#exporting-a-stack-back-to-cloudformation) when ready for production.
|
|
12
12
|
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { a as setAwsClients, i as resetAwsClients, r as getAwsClients, t as AwsClients } from "./aws-clients-CuHRHcyW.js";
|
|
3
|
-
import { $ as
|
|
3
|
+
import { $ as LocalInvokeBuildError, A as stringifyValue, B as resolveApp, C as DiffCalculator, Ct as withSkipPrefix, D as S3StateBackend, E as LockManager, F as runDockerForeground, G as warnDeprecatedNoPrefixCliFlag, H as resolveSkipPrefix, I as runDockerStreaming, J as resolveBucketRegion, K as AssemblyReader, L as Synthesizer, M as buildDockerImage, N as formatDockerLoginError, O as shouldRetainResource, P as getDockerCmd, R as getDefaultStateBucketName, S as IntrinsicFunctionResolver, St as generateResourceNameWithFallback, T as TemplateParser, U as resolveStateBucketWithDefault, V as resolveCaptureObservedState, W as resolveStateBucketWithDefaultAndSource, X as CdkdError, _ as normalizeAwsTagsToCfn, _t as runStackBuffered, a as withRetry, at as RouteDiscoveryError, b as CloudControlProvider, bt as PATTERN_B_RESOURCE_TYPES, c as cyan, d as red, f as yellow, ft as normalizeAwsError, g as matchesCdkPath, h as CDK_PATH_TAG, ht as getLogger, i as withResourceDeadline, it as ResourceUpdateNotSupportedError, j as WorkGraph, k as AssetPublisher, l as gray, m as collectInlinePolicyNamesManagedBySiblings, n as DEFAULT_RESOURCE_WARN_AFTER_MS, nt as ProvisioningError, o as IMPLICIT_DELETE_DEPENDENCIES, ot as StackHasActiveImportsError, p as IAMRoleProvider, pt as withErrorHandling, r as DeployEngine, rt as ResourceTimeoutError, s as bold, st as StackTerminationProtectionError, t as DEFAULT_RESOURCE_TIMEOUT_MS, tt as PartialFailureError, u as green, v as resolveExplicitPhysicalId, vt as getLiveRenderer, w as DagBuilder, wt as withStackName, x as assertRegionMatch, xt as generateResourceName, y as ProviderRegistry, yt as PATTERN_B_NAME_PROPERTIES, z as getLegacyStateBucketName } from "./deploy-engine-B2RZT3ai.js";
|
|
4
4
|
import { createHash, createHmac, createPublicKey, createVerify, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
5
5
|
import { CopyObjectCommand, CreateBucketCommand, DeleteBucketAnalyticsConfigurationCommand, DeleteBucketCommand, DeleteBucketCorsCommand, DeleteBucketIntelligentTieringConfigurationCommand, DeleteBucketInventoryConfigurationCommand, DeleteBucketLifecycleCommand, DeleteBucketMetricsConfigurationCommand, DeleteBucketPolicyCommand, DeleteBucketReplicationCommand, DeleteBucketTaggingCommand, DeleteBucketWebsiteCommand, DeleteObjectCommand, DeleteObjectsCommand, GetBucketAccelerateConfigurationCommand, GetBucketCorsCommand, GetBucketEncryptionCommand, GetBucketLifecycleConfigurationCommand, GetBucketLocationCommand, GetBucketLoggingCommand, GetBucketNotificationConfigurationCommand, GetBucketPolicyCommand, GetBucketReplicationCommand, GetBucketTaggingCommand, GetBucketVersioningCommand, GetBucketWebsiteCommand, GetObjectCommand, GetObjectLockConfigurationCommand, GetPublicAccessBlockCommand, HeadBucketCommand, ListBucketAnalyticsConfigurationsCommand, ListBucketIntelligentTieringConfigurationsCommand, ListBucketInventoryConfigurationsCommand, ListBucketMetricsConfigurationsCommand, ListBucketsCommand, ListDirectoryBucketsCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchBucket, PutBucketAccelerateConfigurationCommand, PutBucketAnalyticsConfigurationCommand, PutBucketCorsCommand, PutBucketEncryptionCommand, PutBucketIntelligentTieringConfigurationCommand, PutBucketInventoryConfigurationCommand, PutBucketLifecycleConfigurationCommand, PutBucketLoggingCommand, PutBucketMetricsConfigurationCommand, PutBucketNotificationConfigurationCommand, PutBucketOwnershipControlsCommand, PutBucketPolicyCommand, PutBucketReplicationCommand, PutBucketTaggingCommand, PutBucketVersioningCommand, PutBucketWebsiteCommand, PutObjectCommand, PutObjectLockConfigurationCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
|
|
6
6
|
import { AddRoleToInstanceProfileCommand, AddUserToGroupCommand, AttachGroupPolicyCommand, AttachUserPolicyCommand, CreateGroupCommand, CreateInstanceProfileCommand, CreateLoginProfileCommand, CreateUserCommand, DeleteAccessKeyCommand, DeleteGroupCommand, DeleteGroupPolicyCommand, DeleteInstanceProfileCommand, DeleteLoginProfileCommand, DeleteRolePolicyCommand, DeleteUserCommand, DeleteUserPermissionsBoundaryCommand, DeleteUserPolicyCommand, DetachGroupPolicyCommand, DetachUserPolicyCommand, GetGroupCommand, GetGroupPolicyCommand, GetInstanceProfileCommand, GetRolePolicyCommand, GetUserCommand, GetUserPolicyCommand, IAMClient, ListAccessKeysCommand, ListAttachedGroupPoliciesCommand, ListAttachedUserPoliciesCommand, ListGroupPoliciesCommand, ListGroupsForUserCommand, ListInstanceProfilesCommand, ListUserPoliciesCommand, ListUserTagsCommand, ListUsersCommand, NoSuchEntityException, PutGroupPolicyCommand, PutRolePolicyCommand, PutUserPermissionsBoundaryCommand, PutUserPolicyCommand, RemoveRoleFromInstanceProfileCommand, RemoveUserFromGroupCommand, TagUserCommand, UntagUserCommand, UpdateLoginProfileCommand } from "@aws-sdk/client-iam";
|
|
@@ -696,7 +696,7 @@ async function synthCommand(options) {
|
|
|
696
696
|
const template = stacks[0].template;
|
|
697
697
|
process.stdout.write(toYaml(template));
|
|
698
698
|
}
|
|
699
|
-
logger.info(`\n
|
|
699
|
+
logger.info(`\n${green("✓")} ${bold("Synthesis complete!")} Found ${stacks.length} stack(s):`);
|
|
700
700
|
for (const stack of stacks) {
|
|
701
701
|
const resourceCount = countDeployableResources(stack.template);
|
|
702
702
|
const outputCount = Object.keys(stack.template.Outputs ?? {}).length;
|
|
@@ -30909,7 +30909,7 @@ async function deployCommand(stacks, options) {
|
|
|
30909
30909
|
};
|
|
30910
30910
|
process.on("SIGINT", topLevelSigintHandler);
|
|
30911
30911
|
try {
|
|
30912
|
-
logger.info("Synthesizing CDK app...");
|
|
30912
|
+
logger.info(cyan("Synthesizing CDK app..."));
|
|
30913
30913
|
const synthesizer = new Synthesizer();
|
|
30914
30914
|
const context = parseContextOptions(options.context);
|
|
30915
30915
|
const { stacks: allStacks } = await synthesizer.synthesize({
|
|
@@ -30995,7 +30995,7 @@ async function deployCommand(stacks, options) {
|
|
|
30995
30995
|
};
|
|
30996
30996
|
const runStackInner = async (stackInfo) => {
|
|
30997
30997
|
const stackRegion = stackInfo.region || baseRegion;
|
|
30998
|
-
logger.info(`\
|
|
30998
|
+
logger.info(`\n${cyan("Deploying stack:")} ${bold(cyan(stackInfo.stackName))}${stackRegion !== baseRegion ? gray(` (region: ${stackRegion})`) : ""}`);
|
|
30999
30999
|
switchRegion(stackRegion);
|
|
31000
31000
|
const stackAwsClients = new AwsClients({
|
|
31001
31001
|
region: stackRegion,
|
|
@@ -31032,19 +31032,19 @@ async function deployCommand(stacks, options) {
|
|
|
31032
31032
|
...options.resourceWarnAfter?.perTypeMs && { resourceWarnAfterByType: options.resourceWarnAfter.perTypeMs },
|
|
31033
31033
|
...options.resourceTimeout?.perTypeMs && { resourceTimeoutByType: options.resourceTimeout.perTypeMs }
|
|
31034
31034
|
}, stackRegion, exportIndexStore).deploy(stackInfo.stackName, stackInfo.template);
|
|
31035
|
-
logger.info("
|
|
31036
|
-
logger.info(` Stack: ${deployResult.stackName}`);
|
|
31037
|
-
logger.info(` Created: ${deployResult.created}`);
|
|
31038
|
-
logger.info(` Updated: ${deployResult.updated}`);
|
|
31039
|
-
logger.info(` Deleted: ${deployResult.deleted}`);
|
|
31040
|
-
logger.info(` Unchanged: ${deployResult.unchanged}`);
|
|
31041
|
-
logger.info(` Duration: ${(deployResult.durationMs / 1e3).toFixed(2)}
|
|
31035
|
+
logger.info(`\n${bold("Deployment Summary:")}`);
|
|
31036
|
+
logger.info(` Stack: ${bold(cyan(deployResult.stackName))}`);
|
|
31037
|
+
logger.info(` Created: ${deployResult.created > 0 ? green(deployResult.created) : gray(deployResult.created)}`);
|
|
31038
|
+
logger.info(` Updated: ${deployResult.updated > 0 ? yellow(deployResult.updated) : gray(deployResult.updated)}`);
|
|
31039
|
+
logger.info(` Deleted: ${deployResult.deleted > 0 ? red(deployResult.deleted) : gray(deployResult.deleted)}`);
|
|
31040
|
+
logger.info(` Unchanged: ${gray(deployResult.unchanged)}`);
|
|
31041
|
+
logger.info(` Duration: ${cyan((deployResult.durationMs / 1e3).toFixed(2) + "s")}`);
|
|
31042
31042
|
if (deployResult.outputs && Object.keys(deployResult.outputs).length > 0) {
|
|
31043
31043
|
logger.info("\nOutputs:");
|
|
31044
31044
|
for (const [key, value] of Object.entries(deployResult.outputs)) logger.info(` ${deployResult.stackName}.${key} = ${String(value)}`);
|
|
31045
31045
|
}
|
|
31046
|
-
if (options.dryRun) logger.info("
|
|
31047
|
-
else logger.info("
|
|
31046
|
+
if (options.dryRun) logger.info(`\n${green("✓")} ${bold("Dry run completed")} - no actual changes made`);
|
|
31047
|
+
else logger.info(`\n${green("✓")} ${bold("Deployment completed successfully")}`);
|
|
31048
31048
|
} finally {
|
|
31049
31049
|
stackAwsClients.destroy();
|
|
31050
31050
|
stateS3Client.destroy();
|
|
@@ -32239,7 +32239,7 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
32239
32239
|
if (resourceCount === 0) {
|
|
32240
32240
|
logger.info(`Stack ${stackName} has no resources, cleaning up state...`);
|
|
32241
32241
|
await ctx.stateBackend.deleteState(stackName, regionForState);
|
|
32242
|
-
logger.info("✓ State deleted
|
|
32242
|
+
logger.info(`${green("✓")} State deleted`);
|
|
32243
32243
|
result.skippedEmpty = true;
|
|
32244
32244
|
return result;
|
|
32245
32245
|
}
|
|
@@ -32399,7 +32399,7 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
32399
32399
|
onTimeout: (elapsedMs) => new ResourceTimeoutError(logicalId, resource.resourceType, stackRegion, elapsedMs, "DELETE", timeoutMs)
|
|
32400
32400
|
});
|
|
32401
32401
|
renderer.removeTask(logicalId);
|
|
32402
|
-
logger.info(`
|
|
32402
|
+
logger.info(` ${red("✗")} ${bold(logicalId)} ${gray(`(${resource.resourceType})`)} ${red("deleted")}`);
|
|
32403
32403
|
result.deletedCount++;
|
|
32404
32404
|
} catch (error) {
|
|
32405
32405
|
renderer.removeTask(logicalId);
|
|
@@ -32427,8 +32427,8 @@ async function runDestroyForStack(stackName, state, ctx) {
|
|
|
32427
32427
|
if (ctx.exportIndexStore) await ctx.exportIndexStore.removeStack(stackName, regionForState);
|
|
32428
32428
|
} else logger.warn(`${result.errorCount} resource(s) failed to delete. State preserved.`);
|
|
32429
32429
|
const retainedSuffix = result.retainedCount > 0 ? `, ${result.retainedCount} retained` : "";
|
|
32430
|
-
if (result.errorCount === 0) logger.info(`\n✓ Stack ${stackName} destroyed (${result.deletedCount} deleted${retainedSuffix}, ${result.errorCount} errors)`);
|
|
32431
|
-
else logger.warn(`\n⚠ Stack ${stackName} partially destroyed (${result.deletedCount} deleted${retainedSuffix}, ${result.errorCount} errors). State preserved — re-run 'cdkd destroy' / 'cdkd state destroy' to clean up.`);
|
|
32430
|
+
if (result.errorCount === 0) logger.info(`\n${green("✓")} ${bold(`Stack ${stackName} destroyed`)} (${green(result.deletedCount)} deleted${retainedSuffix}, ${result.errorCount} errors)`);
|
|
32431
|
+
else logger.warn(`\n${yellow("⚠")} ${bold(`Stack ${stackName} partially destroyed`)} (${green(result.deletedCount)} deleted${retainedSuffix}, ${red(result.errorCount)} errors). State preserved — re-run 'cdkd destroy' / 'cdkd state destroy' to clean up.`);
|
|
32432
32432
|
} finally {
|
|
32433
32433
|
renderer.stop();
|
|
32434
32434
|
logger.debug("Releasing lock...");
|
|
@@ -33466,7 +33466,7 @@ async function publishAssetsCommand(stacks, options) {
|
|
|
33466
33466
|
logger.info(` ${tag} ${id} — ${detail}`);
|
|
33467
33467
|
}
|
|
33468
33468
|
if (failed.length > 0) throw new PartialFailureError(`Asset publishing completed with ${failed.length} stack failure(s) (${totalAssets} asset(s) published successfully across the rest).`);
|
|
33469
|
-
logger.info(`\n
|
|
33469
|
+
logger.info(`\n${green("✓")} ${bold("Asset publishing complete")} (${totalAssets} asset(s))`);
|
|
33470
33470
|
}
|
|
33471
33471
|
/**
|
|
33472
33472
|
* Create publish-assets command.
|
|
@@ -46717,7 +46717,7 @@ function reorderArgs(argv) {
|
|
|
46717
46717
|
*/
|
|
46718
46718
|
async function main() {
|
|
46719
46719
|
const program = new Command();
|
|
46720
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
46720
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.121.0");
|
|
46721
46721
|
program.addCommand(createBootstrapCommand());
|
|
46722
46722
|
program.addCommand(createSynthCommand());
|
|
46723
46723
|
program.addCommand(createListCommand());
|