@go-to-k/cdkd 0.92.0 → 0.94.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 +77 -39
- package/dist/cli.js +188 -60
- package/dist/cli.js.map +4 -4
- package/dist/go-to-k-cdkd-0.94.0.tgz +0 -0
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/dist/go-to-k-cdkd-0.92.0.tgz +0 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# cdkd
|
|
1
|
+
# cdkd (CDK Direct)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Drop-in CDK CLI for existing CDK apps — faster deploys via AWS SDK instead of CloudFormation, with local emulation for Lambda, API Gateway, and ECS.
|
|
4
4
|
|
|
5
5
|
- **Drop-in CDK compatible** — your existing CDK app code runs as-is.
|
|
6
6
|
- **Up to 15x faster deploys than the AWS CDK CLI (CloudFormation)**
|
|
@@ -455,44 +455,82 @@ Both `cdkd destroy` (synth-driven) and `cdkd state destroy`
|
|
|
455
455
|
|
|
456
456
|
## Stack-name prefix on physical names
|
|
457
457
|
|
|
458
|
-
cdkd
|
|
459
|
-
code: `new iam.Role(this, 'CRRole', { roleName:
|
|
460
|
-
`
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
the
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
458
|
+
By default cdkd creates AWS resources with the **exact name you
|
|
459
|
+
declared** in CDK code: `new iam.Role(this, 'CRRole', { roleName:
|
|
460
|
+
'my-role' })` in stack `MyStack` produces an AWS resource named
|
|
461
|
+
`my-role`. Consistent across every resource type. This is the
|
|
462
|
+
default since **v0.94.0** (closes [#299](https://github.com/go-to-k/cdkd/issues/299)).
|
|
463
|
+
|
|
464
|
+
Pre-v0.94.0 cdkd prepended the stack name to user-declared physical
|
|
465
|
+
names on a subset of types only (Pattern B providers: IAM Role /
|
|
466
|
+
User / Group / InstanceProfile / ELBv2 LoadBalancer / TargetGroup),
|
|
467
|
+
while Pattern A providers (Lambda, S3, SNS, SQS, DynamoDB, etc.) used
|
|
468
|
+
the user's name as-is. The inconsistency was opaque to users and
|
|
469
|
+
surfaced as failures in `cdkd export` (CFn IMPORT identifier
|
|
470
|
+
mismatch). Flipping the default brings every resource type into line
|
|
471
|
+
out of the box.
|
|
472
|
+
|
|
473
|
+
`cdkd deploy --prefix-user-supplied-names` opts BACK in to the
|
|
474
|
+
legacy prefixing on Pattern B providers (matching pre-v0.94.0 cdkd).
|
|
475
|
+
Useful when migrating an existing stack that was originally deployed
|
|
476
|
+
under the legacy default and you don't want to take a one-time
|
|
477
|
+
replacement on every Pattern B resource.
|
|
478
|
+
|
|
479
|
+
| | Default (no flag) | `--prefix-user-supplied-names` |
|
|
472
480
|
| --- | --- | --- |
|
|
473
|
-
| `new iam.Role({ roleName: 'my-role' })` | `
|
|
474
|
-
| `new s3.Bucket({ bucketName: 'my-bucket' })` | `my-bucket` (
|
|
475
|
-
| `new iam.Role(...)` (no `roleName`) | `MyStack-CRRole-<hash>` (auto-generated
|
|
476
|
-
|
|
477
|
-
Resolution chain (highest wins): `--
|
|
478
|
-
CLI flag → `
|
|
479
|
-
`cdk.json` `context.cdkd.
|
|
480
|
-
`false
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
481
|
+
| `new iam.Role({ roleName: 'my-role' })` | `my-role` | `MyStack-my-role` (legacy) |
|
|
482
|
+
| `new s3.Bucket({ bucketName: 'my-bucket' })` | `my-bucket` (always — Pattern A) | `my-bucket` (unchanged) |
|
|
483
|
+
| `new iam.Role(...)` (no `roleName`) | `MyStack-CRRole-<hash>` (auto-generated; prefix kept for uniqueness) | `MyStack-CRRole-<hash>` (unchanged) |
|
|
484
|
+
|
|
485
|
+
Resolution chain (highest wins): `--prefix-user-supplied-names`
|
|
486
|
+
CLI flag → `CDKD_PREFIX_USER_SUPPLIED_NAMES=true` env var →
|
|
487
|
+
`cdk.json` `context.cdkd.prefixUserSuppliedNames: true` → default
|
|
488
|
+
`false` (skip prefix).
|
|
489
|
+
|
|
490
|
+
The deprecated `--no-prefix-user-supplied-names` flag (plus the
|
|
491
|
+
`CDKD_NO_PREFIX_USER_SUPPLIED_NAMES` env var and `cdk.json
|
|
492
|
+
context.cdkd.noPrefixUserSuppliedNames`) is still accepted but now
|
|
493
|
+
matches the default; setting it emits a deprecation warning and is a
|
|
494
|
+
no-op. Remove it from your CLI invocations and config.
|
|
495
|
+
|
|
496
|
+
### Migration from pre-v0.94.0
|
|
497
|
+
|
|
498
|
+
This is a **breaking change**: upgrading from a pre-v0.94.0 cdkd to
|
|
499
|
+
v0.94.0+ flips the AWS-resource name cdkd produces on Pattern B
|
|
500
|
+
providers (IAM Role / User / Group / InstanceProfile / ELBv2 LB / TG)
|
|
501
|
+
with user-supplied physical names. The next `cdkd deploy` against an
|
|
502
|
+
existing stack will propose REPLACEMENT on every such resource —
|
|
503
|
+
the AWS resource has the prefixed name; the new template intent has
|
|
504
|
+
the un-prefixed name.
|
|
505
|
+
|
|
506
|
+
Pick one of:
|
|
507
|
+
|
|
508
|
+
1. **Accept the one-time replacement** (simplest; only safe when the
|
|
509
|
+
types involved tolerate replacement — IAM Roles get fresh ARNs,
|
|
510
|
+
ELBv2 LBs get fresh DNS names).
|
|
511
|
+
2. **Pin legacy prefixing**: pass `--prefix-user-supplied-names`,
|
|
512
|
+
set `CDKD_PREFIX_USER_SUPPLIED_NAMES=true`, or add
|
|
513
|
+
`"prefixUserSuppliedNames": true` under `cdk.json` `context.cdkd`.
|
|
514
|
+
3. **Drop the explicit physical name** in CDK code where you don't
|
|
515
|
+
actually need a stable name — `new iam.Role(...)` without
|
|
516
|
+
`roleName` always uses the auto-generated `MyStack-CRRole-<hash>`
|
|
517
|
+
form regardless of this flag.
|
|
518
|
+
|
|
519
|
+
A migration helper (`cdkd state rename-strip-prefix <stack>`) that
|
|
520
|
+
would let an existing stack adopt the new default without replacement
|
|
521
|
+
is tracked separately in [#300](https://github.com/go-to-k/cdkd/issues/300).
|
|
522
|
+
|
|
523
|
+
### Effect on `cdkd export`
|
|
524
|
+
|
|
525
|
+
[PR #285 `cdkd export`](https://github.com/go-to-k/cdkd/pull/285)
|
|
526
|
+
surfaced the pre-v0.94.0 inconsistency: the CFn IMPORT changeset's
|
|
527
|
+
identifier check would fail on a synth `RoleName: 'my-role'` vs the
|
|
528
|
+
AWS-deployed `MyStack-my-role`, so the export command overlays
|
|
529
|
+
`ResourceIdentifier` onto `Properties` to bridge the gap. The
|
|
530
|
+
overlay is still needed for stacks deployed under the legacy default
|
|
531
|
+
(or with `--prefix-user-supplied-names`); a fresh stack deployed
|
|
532
|
+
under the v0.94.0 default has matching names and the overlay is a
|
|
533
|
+
no-op for it.
|
|
496
534
|
|
|
497
535
|
## `--remove-protection`: one-shot bypass for protected resources
|
|
498
536
|
|
package/dist/cli.js
CHANGED
|
@@ -17830,6 +17830,14 @@ function withSkipPrefix(skip, fn) {
|
|
|
17830
17830
|
function getCurrentSkipPrefix() {
|
|
17831
17831
|
return skipPrefixStore.getStore() ?? false;
|
|
17832
17832
|
}
|
|
17833
|
+
var PATTERN_B_RESOURCE_TYPES = [
|
|
17834
|
+
"AWS::IAM::Role",
|
|
17835
|
+
"AWS::IAM::User",
|
|
17836
|
+
"AWS::IAM::Group",
|
|
17837
|
+
"AWS::IAM::InstanceProfile",
|
|
17838
|
+
"AWS::ElasticLoadBalancingV2::LoadBalancer",
|
|
17839
|
+
"AWS::ElasticLoadBalancingV2::TargetGroup"
|
|
17840
|
+
];
|
|
17833
17841
|
function generateResourceName(name, options) {
|
|
17834
17842
|
const {
|
|
17835
17843
|
maxLength,
|
|
@@ -23388,9 +23396,20 @@ var deployOptions = [
|
|
|
23388
23396
|
"Skip capturing AWS-current properties after each create/update (adds a fire-and-forget readCurrentState per resource so cdkd drift can compare against the real deploy-time AWS snapshot instead of the template). On by default. Disable when deploy speed matters more than rich drift detection \u2014 falls back to comparing against template properties (the pre-v3 behavior)."
|
|
23389
23397
|
),
|
|
23390
23398
|
new Option(
|
|
23391
|
-
"--
|
|
23392
|
-
'
|
|
23393
|
-
),
|
|
23399
|
+
"--prefix-user-supplied-names",
|
|
23400
|
+
'Opt in to LEGACY behavior: prepend the stack name to physical names the user explicitly supplied in their CDK code (e.g. `new iam.Role(this, "X", { roleName: "my-role" })` \u2192 AWS resource named `MyStack-my-role` instead of `my-role`). Since v0.94.0 the default is to NOT prefix user-supplied names \u2014 this flag restores the pre-v0.94.0 behavior on Pattern B providers (IAM Role / User / Group / InstanceProfile / ELBv2 LoadBalancer / TargetGroup). Enable via this flag, CDKD_PREFIX_USER_SUPPLIED_NAMES=true, or cdk.json context.cdkd.prefixUserSuppliedNames=true. Applies to `cdkd deploy` only.'
|
|
23401
|
+
).default(false),
|
|
23402
|
+
// Note: the deprecated `--no-prefix-user-supplied-names` flag is NOT
|
|
23403
|
+
// declared as a separate Option. Commander's automatic `--no-X`
|
|
23404
|
+
// negation lets users still pass it without error — it negates the
|
|
23405
|
+
// new `--prefix-user-supplied-names` flag, leaving its default
|
|
23406
|
+
// `false` (= skip prefix) unchanged, which matches the v0.94.0
|
|
23407
|
+
// default. Detection of the literal `--no-prefix-user-supplied-names`
|
|
23408
|
+
// flag for the deprecation warning happens via the pre-parse argv
|
|
23409
|
+
// walk in `warnDeprecatedNoPrefixCliFlag` (src/cli/config-loader.ts) —
|
|
23410
|
+
// declaring both Options together would have collapsed both onto a
|
|
23411
|
+
// single Commander key, making `noPrefixUserSuppliedNames` permanently
|
|
23412
|
+
// `undefined` and silencing the warning.
|
|
23394
23413
|
noWaitOption,
|
|
23395
23414
|
aggressiveVpcParallelOption,
|
|
23396
23415
|
new Option(
|
|
@@ -23535,18 +23554,44 @@ function resolveCaptureObservedState(cliValue) {
|
|
|
23535
23554
|
return v;
|
|
23536
23555
|
return true;
|
|
23537
23556
|
}
|
|
23538
|
-
function
|
|
23539
|
-
|
|
23540
|
-
|
|
23541
|
-
|
|
23542
|
-
if (
|
|
23543
|
-
|
|
23557
|
+
function warnDeprecatedNoPrefixCliFlag(argv = process.argv) {
|
|
23558
|
+
const seen = argv.some(
|
|
23559
|
+
(a) => a === "--no-prefix-user-supplied-names" || a.startsWith("--no-prefix-user-supplied-names=")
|
|
23560
|
+
);
|
|
23561
|
+
if (seen) {
|
|
23562
|
+
getLogger().warn(
|
|
23563
|
+
"--no-prefix-user-supplied-names is deprecated since v0.94.0 \u2014 skipping the prefix is now the default. Remove the flag."
|
|
23564
|
+
);
|
|
23565
|
+
}
|
|
23566
|
+
}
|
|
23567
|
+
function resolveSkipPrefix(opts = {}) {
|
|
23568
|
+
const logger = getLogger();
|
|
23569
|
+
if (opts.prefixUserSuppliedNames === true) {
|
|
23570
|
+
return false;
|
|
23571
|
+
}
|
|
23572
|
+
const envPrefix = process.env["CDKD_PREFIX_USER_SUPPLIED_NAMES"];
|
|
23573
|
+
if (envPrefix === "true") {
|
|
23574
|
+
return false;
|
|
23575
|
+
}
|
|
23544
23576
|
const cdkJson = loadCdkJson();
|
|
23545
23577
|
const cdkdContext = cdkJson?.context?.["cdkd"];
|
|
23546
|
-
const v = cdkdContext?.["
|
|
23547
|
-
if (typeof v === "boolean" && v === true)
|
|
23548
|
-
return
|
|
23549
|
-
|
|
23578
|
+
const v = cdkdContext?.["prefixUserSuppliedNames"];
|
|
23579
|
+
if (typeof v === "boolean" && v === true) {
|
|
23580
|
+
return false;
|
|
23581
|
+
}
|
|
23582
|
+
const deprecatedEnv = process.env["CDKD_NO_PREFIX_USER_SUPPLIED_NAMES"];
|
|
23583
|
+
if (deprecatedEnv === "true") {
|
|
23584
|
+
logger.warn(
|
|
23585
|
+
"CDKD_NO_PREFIX_USER_SUPPLIED_NAMES is deprecated since v0.94.0 \u2014 skipping the prefix is now the default. Unset the env var."
|
|
23586
|
+
);
|
|
23587
|
+
}
|
|
23588
|
+
const deprecatedCdkJson = cdkdContext?.["noPrefixUserSuppliedNames"];
|
|
23589
|
+
if (typeof deprecatedCdkJson === "boolean" && deprecatedCdkJson === true) {
|
|
23590
|
+
logger.warn(
|
|
23591
|
+
"cdk.json context.cdkd.noPrefixUserSuppliedNames is deprecated since v0.94.0 \u2014 skipping the prefix is now the default. Remove the entry."
|
|
23592
|
+
);
|
|
23593
|
+
}
|
|
23594
|
+
return true;
|
|
23550
23595
|
}
|
|
23551
23596
|
function resolveStateBucketWithSource(cliBucket) {
|
|
23552
23597
|
if (cliBucket)
|
|
@@ -65471,6 +65516,72 @@ function registerAllProviders(registry) {
|
|
|
65471
65516
|
|
|
65472
65517
|
// src/cli/commands/deploy.ts
|
|
65473
65518
|
init_aws_clients();
|
|
65519
|
+
|
|
65520
|
+
// src/cli/commands/prefix-migration-check.ts
|
|
65521
|
+
import * as readline from "node:readline/promises";
|
|
65522
|
+
function findPendingPrefixRenames(stackName, state) {
|
|
65523
|
+
if (!state)
|
|
65524
|
+
return [];
|
|
65525
|
+
const patternB = new Set(PATTERN_B_RESOURCE_TYPES);
|
|
65526
|
+
const prefix = `${stackName}-`;
|
|
65527
|
+
const out = [];
|
|
65528
|
+
for (const [logicalId, resource] of Object.entries(state.resources)) {
|
|
65529
|
+
if (!patternB.has(resource.resourceType))
|
|
65530
|
+
continue;
|
|
65531
|
+
if (typeof resource.physicalId !== "string")
|
|
65532
|
+
continue;
|
|
65533
|
+
if (!resource.physicalId.startsWith(prefix))
|
|
65534
|
+
continue;
|
|
65535
|
+
const newPhysicalId = resource.physicalId.slice(prefix.length);
|
|
65536
|
+
if (newPhysicalId.length === 0)
|
|
65537
|
+
continue;
|
|
65538
|
+
out.push({
|
|
65539
|
+
logicalId,
|
|
65540
|
+
resourceType: resource.resourceType,
|
|
65541
|
+
oldPhysicalId: resource.physicalId,
|
|
65542
|
+
newPhysicalId
|
|
65543
|
+
});
|
|
65544
|
+
}
|
|
65545
|
+
return out;
|
|
65546
|
+
}
|
|
65547
|
+
async function promptMigrationConfirm(renames, opts) {
|
|
65548
|
+
if (renames.length === 0)
|
|
65549
|
+
return true;
|
|
65550
|
+
const logger = getLogger();
|
|
65551
|
+
logger.warn("");
|
|
65552
|
+
logger.warn(
|
|
65553
|
+
`WARNING: --no-prefix-user-supplied-names will REPLACE ${renames.length} resource(s) whose AWS physical name is still prefixed with the stack name:`
|
|
65554
|
+
);
|
|
65555
|
+
for (const r of renames) {
|
|
65556
|
+
logger.warn(` - ${r.logicalId} (${r.resourceType}): ${r.oldPhysicalId} -> ${r.newPhysicalId}`);
|
|
65557
|
+
}
|
|
65558
|
+
logger.warn(
|
|
65559
|
+
"These resources will be REPLACED because the new naming convention drops the stack-name prefix."
|
|
65560
|
+
);
|
|
65561
|
+
if (opts.yes)
|
|
65562
|
+
return true;
|
|
65563
|
+
if (process.stdin.isTTY !== true) {
|
|
65564
|
+
throw new Error(
|
|
65565
|
+
"--no-prefix-user-supplied-names migration confirm prompt cannot run in a non-interactive environment. Pass --yes / -y to confirm the REPLACEMENT, or run the deploy from a real terminal."
|
|
65566
|
+
);
|
|
65567
|
+
}
|
|
65568
|
+
const rl = readline.createInterface({
|
|
65569
|
+
input: process.stdin,
|
|
65570
|
+
output: process.stdout
|
|
65571
|
+
});
|
|
65572
|
+
try {
|
|
65573
|
+
const answer = await rl.question("\nContinue? (y/N): ");
|
|
65574
|
+
const trimmed = answer.trim().toLowerCase();
|
|
65575
|
+
if (trimmed === "y" || trimmed === "yes")
|
|
65576
|
+
return true;
|
|
65577
|
+
logger.info("Deploy cancelled \u2014 no resources modified.");
|
|
65578
|
+
return false;
|
|
65579
|
+
} finally {
|
|
65580
|
+
rl.close();
|
|
65581
|
+
}
|
|
65582
|
+
}
|
|
65583
|
+
|
|
65584
|
+
// src/cli/commands/deploy.ts
|
|
65474
65585
|
async function deployCommand(stacks, options) {
|
|
65475
65586
|
const logger = getLogger();
|
|
65476
65587
|
if (options.verbose) {
|
|
@@ -65483,10 +65594,17 @@ async function deployCommand(stacks, options) {
|
|
|
65483
65594
|
if (!options.wait) {
|
|
65484
65595
|
process.env["CDKD_NO_WAIT"] = "true";
|
|
65485
65596
|
}
|
|
65486
|
-
|
|
65597
|
+
warnDeprecatedNoPrefixCliFlag();
|
|
65598
|
+
const skipPrefix = resolveSkipPrefix({
|
|
65599
|
+
prefixUserSuppliedNames: options.prefixUserSuppliedNames
|
|
65600
|
+
});
|
|
65487
65601
|
if (skipPrefix) {
|
|
65488
65602
|
logger.debug(
|
|
65489
|
-
"Skipping stack-name prefix on user-supplied physical names (
|
|
65603
|
+
"Skipping stack-name prefix on user-supplied physical names (default since v0.94.0)"
|
|
65604
|
+
);
|
|
65605
|
+
} else {
|
|
65606
|
+
logger.debug(
|
|
65607
|
+
"Keeping legacy stack-name prefix on user-supplied physical names (--prefix-user-supplied-names / CDKD_PREFIX_USER_SUPPLIED_NAMES / cdk.json context.cdkd.prefixUserSuppliedNames)"
|
|
65490
65608
|
);
|
|
65491
65609
|
}
|
|
65492
65610
|
const app = resolveApp(options.app);
|
|
@@ -65674,33 +65792,43 @@ Deploying stack: ${stackInfo.stackName}${stackRegion !== baseRegion ? ` (region:
|
|
|
65674
65792
|
const stackProviderRegistry = new ProviderRegistry();
|
|
65675
65793
|
registerAllProviders(stackProviderRegistry);
|
|
65676
65794
|
stackProviderRegistry.setCustomResourceResponseBucket(stateBucket, baseRegion);
|
|
65677
|
-
const stackDeployEngine = new DeployEngine(
|
|
65678
|
-
stackStateBackend,
|
|
65679
|
-
stackLockManager,
|
|
65680
|
-
dagBuilder,
|
|
65681
|
-
diffCalculator,
|
|
65682
|
-
stackProviderRegistry,
|
|
65683
|
-
{
|
|
65684
|
-
concurrency: options.concurrency,
|
|
65685
|
-
dryRun: options.dryRun,
|
|
65686
|
-
noRollback: !options.rollback,
|
|
65687
|
-
captureObservedState: resolveCaptureObservedState(options.captureObservedState),
|
|
65688
|
-
...options.resourceWarnAfter?.globalMs !== void 0 && {
|
|
65689
|
-
resourceWarnAfterMs: options.resourceWarnAfter.globalMs
|
|
65690
|
-
},
|
|
65691
|
-
...options.resourceTimeout?.globalMs !== void 0 && {
|
|
65692
|
-
resourceTimeoutMs: options.resourceTimeout.globalMs
|
|
65693
|
-
},
|
|
65694
|
-
...options.resourceWarnAfter?.perTypeMs && {
|
|
65695
|
-
resourceWarnAfterByType: options.resourceWarnAfter.perTypeMs
|
|
65696
|
-
},
|
|
65697
|
-
...options.resourceTimeout?.perTypeMs && {
|
|
65698
|
-
resourceTimeoutByType: options.resourceTimeout.perTypeMs
|
|
65699
|
-
}
|
|
65700
|
-
},
|
|
65701
|
-
stackRegion
|
|
65702
|
-
);
|
|
65703
65795
|
try {
|
|
65796
|
+
if (skipPrefix) {
|
|
65797
|
+
const existing = await stackStateBackend.getState(stackInfo.stackName, stackRegion);
|
|
65798
|
+
const pending = findPendingPrefixRenames(stackInfo.stackName, existing?.state);
|
|
65799
|
+
if (pending.length > 0) {
|
|
65800
|
+
const proceed = await promptMigrationConfirm(pending, { yes: options.yes });
|
|
65801
|
+
if (!proceed) {
|
|
65802
|
+
return;
|
|
65803
|
+
}
|
|
65804
|
+
}
|
|
65805
|
+
}
|
|
65806
|
+
const stackDeployEngine = new DeployEngine(
|
|
65807
|
+
stackStateBackend,
|
|
65808
|
+
stackLockManager,
|
|
65809
|
+
dagBuilder,
|
|
65810
|
+
diffCalculator,
|
|
65811
|
+
stackProviderRegistry,
|
|
65812
|
+
{
|
|
65813
|
+
concurrency: options.concurrency,
|
|
65814
|
+
dryRun: options.dryRun,
|
|
65815
|
+
noRollback: !options.rollback,
|
|
65816
|
+
captureObservedState: resolveCaptureObservedState(options.captureObservedState),
|
|
65817
|
+
...options.resourceWarnAfter?.globalMs !== void 0 && {
|
|
65818
|
+
resourceWarnAfterMs: options.resourceWarnAfter.globalMs
|
|
65819
|
+
},
|
|
65820
|
+
...options.resourceTimeout?.globalMs !== void 0 && {
|
|
65821
|
+
resourceTimeoutMs: options.resourceTimeout.globalMs
|
|
65822
|
+
},
|
|
65823
|
+
...options.resourceWarnAfter?.perTypeMs && {
|
|
65824
|
+
resourceWarnAfterByType: options.resourceWarnAfter.perTypeMs
|
|
65825
|
+
},
|
|
65826
|
+
...options.resourceTimeout?.perTypeMs && {
|
|
65827
|
+
resourceTimeoutByType: options.resourceTimeout.perTypeMs
|
|
65828
|
+
}
|
|
65829
|
+
},
|
|
65830
|
+
stackRegion
|
|
65831
|
+
);
|
|
65704
65832
|
const deployResult = await stackDeployEngine.deploy(
|
|
65705
65833
|
stackInfo.stackName,
|
|
65706
65834
|
stackInfo.template
|
|
@@ -65985,7 +66113,7 @@ function createDiffCommand() {
|
|
|
65985
66113
|
}
|
|
65986
66114
|
|
|
65987
66115
|
// src/cli/commands/drift.ts
|
|
65988
|
-
import * as
|
|
66116
|
+
import * as readline2 from "node:readline/promises";
|
|
65989
66117
|
import { Command as Command6, Option as Option3 } from "commander";
|
|
65990
66118
|
init_aws_clients();
|
|
65991
66119
|
|
|
@@ -66694,7 +66822,7 @@ async function runWithConcurrency(tasks, concurrency) {
|
|
|
66694
66822
|
await Promise.all(workers);
|
|
66695
66823
|
}
|
|
66696
66824
|
async function confirmPrompt(prompt) {
|
|
66697
|
-
const rl =
|
|
66825
|
+
const rl = readline2.createInterface({ input: process.stdin, output: process.stdout });
|
|
66698
66826
|
try {
|
|
66699
66827
|
const ans = await rl.question(`${prompt} [y/N] `);
|
|
66700
66828
|
return /^y(es)?$/i.test(ans.trim());
|
|
@@ -66807,7 +66935,7 @@ import { Command as Command7 } from "commander";
|
|
|
66807
66935
|
init_aws_clients();
|
|
66808
66936
|
|
|
66809
66937
|
// src/cli/commands/destroy-runner.ts
|
|
66810
|
-
import * as
|
|
66938
|
+
import * as readline3 from "node:readline/promises";
|
|
66811
66939
|
init_aws_clients();
|
|
66812
66940
|
var PROTECTION_PROPERTY_BY_TYPE = {
|
|
66813
66941
|
"AWS::Logs::LogGroup": "DeletionProtectionEnabled",
|
|
@@ -66879,7 +67007,7 @@ Resources to be deleted (${resourceCount}):`);
|
|
|
66879
67007
|
}
|
|
66880
67008
|
const protectedCount = ctx.removeProtection ? countProtectedResources(state) : 0;
|
|
66881
67009
|
if (!ctx.skipConfirmation) {
|
|
66882
|
-
const rl =
|
|
67010
|
+
const rl = readline3.createInterface({
|
|
66883
67011
|
input: process.stdin,
|
|
66884
67012
|
output: process.stdout
|
|
66885
67013
|
});
|
|
@@ -67313,7 +67441,7 @@ function createDestroyCommand() {
|
|
|
67313
67441
|
}
|
|
67314
67442
|
|
|
67315
67443
|
// src/cli/commands/orphan.ts
|
|
67316
|
-
import * as
|
|
67444
|
+
import * as readline4 from "node:readline/promises";
|
|
67317
67445
|
import { Command as Command8 } from "commander";
|
|
67318
67446
|
init_aws_clients();
|
|
67319
67447
|
|
|
@@ -67986,7 +68114,7 @@ function stringifyForAudit(value) {
|
|
|
67986
68114
|
return JSON.stringify(value);
|
|
67987
68115
|
}
|
|
67988
68116
|
async function confirmPrompt2(prompt) {
|
|
67989
|
-
const rl =
|
|
68117
|
+
const rl = readline4.createInterface({ input: process.stdin, output: process.stdout });
|
|
67990
68118
|
try {
|
|
67991
68119
|
const ans = await rl.question(`${prompt} [y/N] `);
|
|
67992
68120
|
return /^y(es)?$/i.test(ans.trim());
|
|
@@ -68261,7 +68389,7 @@ function createForceUnlockCommand() {
|
|
|
68261
68389
|
}
|
|
68262
68390
|
|
|
68263
68391
|
// src/cli/commands/state.ts
|
|
68264
|
-
import * as
|
|
68392
|
+
import * as readline6 from "node:readline/promises";
|
|
68265
68393
|
import { Command as Command12, Option as Option6 } from "commander";
|
|
68266
68394
|
import {
|
|
68267
68395
|
GetBucketLocationCommand as GetBucketLocationCommand2,
|
|
@@ -68271,7 +68399,7 @@ import {
|
|
|
68271
68399
|
init_aws_clients();
|
|
68272
68400
|
|
|
68273
68401
|
// src/cli/commands/state-migrate.ts
|
|
68274
|
-
import * as
|
|
68402
|
+
import * as readline5 from "node:readline/promises";
|
|
68275
68403
|
import { Command as Command11 } from "commander";
|
|
68276
68404
|
import {
|
|
68277
68405
|
CopyObjectCommand,
|
|
@@ -68547,7 +68675,7 @@ async function emptyBucketAllVersions(s3, bucket) {
|
|
|
68547
68675
|
} while (keyMarker || versionIdMarker);
|
|
68548
68676
|
}
|
|
68549
68677
|
async function confirmPrompt3(prompt) {
|
|
68550
|
-
const rl =
|
|
68678
|
+
const rl = readline5.createInterface({ input: process.stdin, output: process.stdout });
|
|
68551
68679
|
try {
|
|
68552
68680
|
const ans = await rl.question(`${prompt} [y/N] `);
|
|
68553
68681
|
return /^y(es)?$/i.test(ans.trim());
|
|
@@ -68955,7 +69083,7 @@ Use 'cdkd destroy ${stackName}' if you want to delete the actual resources.
|
|
|
68955
69083
|
|
|
68956
69084
|
`
|
|
68957
69085
|
);
|
|
68958
|
-
const rl =
|
|
69086
|
+
const rl = readline6.createInterface({
|
|
68959
69087
|
input: process.stdin,
|
|
68960
69088
|
output: process.stdout
|
|
68961
69089
|
});
|
|
@@ -69043,7 +69171,7 @@ WARNING: This destroys ${stackNames.length} stack(s) and removes their state rec
|
|
|
69043
69171
|
`);
|
|
69044
69172
|
}
|
|
69045
69173
|
process.stdout.write("\n");
|
|
69046
|
-
const rl =
|
|
69174
|
+
const rl = readline6.createInterface({
|
|
69047
69175
|
input: process.stdin,
|
|
69048
69176
|
output: process.stdout
|
|
69049
69177
|
});
|
|
@@ -69469,7 +69597,7 @@ async function refreshObservedForStack(stackName, region, stateBackend, lockMana
|
|
|
69469
69597
|
}
|
|
69470
69598
|
}
|
|
69471
69599
|
async function confirmRefresh(prompt) {
|
|
69472
|
-
const rl =
|
|
69600
|
+
const rl = readline6.createInterface({ input: process.stdin, output: process.stdout });
|
|
69473
69601
|
try {
|
|
69474
69602
|
const ans = await rl.question(`${prompt} [y/N] `);
|
|
69475
69603
|
return /^y(es)?$/i.test(ans.trim());
|
|
@@ -69500,12 +69628,12 @@ function createStateCommand() {
|
|
|
69500
69628
|
|
|
69501
69629
|
// src/cli/commands/import.ts
|
|
69502
69630
|
import { readFileSync as readFileSync5, writeFileSync as writeFileSync4 } from "node:fs";
|
|
69503
|
-
import * as
|
|
69631
|
+
import * as readline8 from "node:readline/promises";
|
|
69504
69632
|
import { Command as Command13 } from "commander";
|
|
69505
69633
|
init_aws_clients();
|
|
69506
69634
|
|
|
69507
69635
|
// src/cli/commands/retire-cfn-stack.ts
|
|
69508
|
-
import * as
|
|
69636
|
+
import * as readline7 from "node:readline/promises";
|
|
69509
69637
|
import {
|
|
69510
69638
|
DescribeStacksCommand,
|
|
69511
69639
|
DescribeStackResourcesCommand,
|
|
@@ -69711,7 +69839,7 @@ async function getCloudFormationResourceMapping(cfnStackName, cfnClient) {
|
|
|
69711
69839
|
return map;
|
|
69712
69840
|
}
|
|
69713
69841
|
async function confirmPrompt4(prompt) {
|
|
69714
|
-
const rl =
|
|
69842
|
+
const rl = readline7.createInterface({ input: process.stdin, output: process.stdout });
|
|
69715
69843
|
try {
|
|
69716
69844
|
const ans = await rl.question(`${prompt} [y/N] `);
|
|
69717
69845
|
return /^y(es)?$/i.test(ans.trim());
|
|
@@ -70173,7 +70301,7 @@ function formatOutcome(outcome) {
|
|
|
70173
70301
|
}
|
|
70174
70302
|
}
|
|
70175
70303
|
async function confirmPrompt5(prompt) {
|
|
70176
|
-
const rl =
|
|
70304
|
+
const rl = readline8.createInterface({ input: process.stdin, output: process.stdout });
|
|
70177
70305
|
try {
|
|
70178
70306
|
const ans = await rl.question(`${prompt} [y/N] `);
|
|
70179
70307
|
return /^y(es)?$/i.test(ans.trim());
|
|
@@ -79836,7 +79964,7 @@ function createLocalCommand() {
|
|
|
79836
79964
|
}
|
|
79837
79965
|
|
|
79838
79966
|
// src/cli/commands/export.ts
|
|
79839
|
-
import * as
|
|
79967
|
+
import * as readline9 from "node:readline/promises";
|
|
79840
79968
|
import { readFileSync as readFileSync9 } from "node:fs";
|
|
79841
79969
|
import { Command as Command17 } from "commander";
|
|
79842
79970
|
import {
|
|
@@ -80781,7 +80909,7 @@ function printNextSteps(args) {
|
|
|
80781
80909
|
logger.info("");
|
|
80782
80910
|
}
|
|
80783
80911
|
async function confirmPrompt6(prompt) {
|
|
80784
|
-
const rl =
|
|
80912
|
+
const rl = readline9.createInterface({ input: process.stdin, output: process.stdout });
|
|
80785
80913
|
try {
|
|
80786
80914
|
const ans = await rl.question(`${prompt} [y/N] `);
|
|
80787
80915
|
return /^y(es)?$/i.test(ans.trim());
|
|
@@ -80854,7 +80982,7 @@ function reorderArgs(argv) {
|
|
|
80854
80982
|
}
|
|
80855
80983
|
async function main() {
|
|
80856
80984
|
const program = new Command18();
|
|
80857
|
-
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.
|
|
80985
|
+
program.name("cdkd").description("CDK Direct - Deploy AWS CDK apps directly via SDK/Cloud Control API").version("0.94.0");
|
|
80858
80986
|
program.addCommand(createBootstrapCommand());
|
|
80859
80987
|
program.addCommand(createSynthCommand());
|
|
80860
80988
|
program.addCommand(createListCommand());
|