@go-to-k/cdkd 0.288.7 → 0.289.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 +24 -14
- package/dist/{asg-provider-CRxRmEzr.js → asg-provider-1XVtAjhm.js} +3 -3
- package/dist/{asg-provider-CRxRmEzr.js.map → asg-provider-1XVtAjhm.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-BQUjVO_m.js → deploy-engine-B6pEfNd9.js} +406 -31
- package/dist/deploy-engine-B6pEfNd9.js.map +1 -0
- package/dist/index.d.ts +10 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{logger-Dw-3y48G.js → logger-D2Md1kTq.js} +77 -2
- package/dist/logger-D2Md1kTq.js.map +1 -0
- package/dist/{program-BEvh5nqs.js → program-Bg60hZhr.js} +651 -100
- package/dist/{program-BEvh5nqs.js.map → program-Bg60hZhr.js.map} +1 -1
- package/dist/{version-DPtrXz0m.js → version-CCKo6fK2.js} +2 -2
- package/dist/{version-DPtrXz0m.js.map → version-CCKo6fK2.js.map} +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-BQUjVO_m.js.map +0 -1
- package/dist/logger-Dw-3y48G.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ import { LambdaMicrovmsClient } from "@aws-sdk/client-lambda-microvms";
|
|
|
23
23
|
import { ECRClient } from "@aws-sdk/client-ecr";
|
|
24
24
|
import graphlib from "graphlib";
|
|
25
25
|
//#region src/types/state.d.ts
|
|
26
|
-
type StateSchemaVersion = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
26
|
+
type StateSchemaVersion = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10;
|
|
27
27
|
interface StateImportEntry {
|
|
28
28
|
sourceStack: string;
|
|
29
29
|
sourceRegion: string;
|
|
@@ -47,8 +47,14 @@ interface StackState {
|
|
|
47
47
|
parentStack?: string;
|
|
48
48
|
parentLogicalId?: string;
|
|
49
49
|
parentRegion?: string;
|
|
50
|
+
orphans?: StackOrphanRecord[];
|
|
50
51
|
lastModified: number;
|
|
51
52
|
}
|
|
53
|
+
interface StackOrphanRecord {
|
|
54
|
+
logicalId: string;
|
|
55
|
+
orphanedAt: number;
|
|
56
|
+
state: ResourceState;
|
|
57
|
+
}
|
|
52
58
|
interface ResourceState {
|
|
53
59
|
physicalId: string;
|
|
54
60
|
resourceType: string;
|
|
@@ -60,6 +66,7 @@ interface ResourceState {
|
|
|
60
66
|
deletionPolicy?: 'Delete' | 'Retain' | 'Snapshot' | 'RetainExceptOnCreate' | undefined;
|
|
61
67
|
updateReplacePolicy?: 'Delete' | 'Retain' | 'Snapshot' | 'RetainExceptOnCreate' | undefined;
|
|
62
68
|
provisionedBy?: 'sdk' | 'cc-api' | undefined;
|
|
69
|
+
observedBaselineRefused?: true | undefined;
|
|
63
70
|
}
|
|
64
71
|
interface LockInfo {
|
|
65
72
|
owner: string;
|
|
@@ -1147,6 +1154,7 @@ declare class DeployEngine {
|
|
|
1147
1154
|
private perResourceSecrets;
|
|
1148
1155
|
private noEchoAttributeResources;
|
|
1149
1156
|
private perResourceTemplateProps;
|
|
1157
|
+
private perResourceResolvedType;
|
|
1150
1158
|
private outputSecrets;
|
|
1151
1159
|
private outputsTemplateSource;
|
|
1152
1160
|
private resolvedExportNames;
|
|
@@ -1174,6 +1182,7 @@ declare class DeployEngine {
|
|
|
1174
1182
|
private doDeploy;
|
|
1175
1183
|
private executeDeployment;
|
|
1176
1184
|
private persistStateAfterOutputFailure;
|
|
1185
|
+
private adoptRollbackOrphans;
|
|
1177
1186
|
private performRollback;
|
|
1178
1187
|
private deleteRollbackJournalBestEffort;
|
|
1179
1188
|
private settleJournalAfterCleanRollback;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types/state.ts","../src/deployment/secret-redaction.ts","../src/provisioning/region-check.ts","../src/types/resource.ts","../src/types/config.ts","../src/utils/logger.ts","../src/utils/error-handler.ts","../src/utils/aws-clients.ts","../src/utils/aws-region-resolver.ts","../src/types/assembly.ts","../src/synthesis/stack-messages.ts","../src/synthesis/assembly-reader.ts","../src/cli/upload-cfn-template.ts","../src/synthesis/macro-expander.ts","../src/synthesis/synthesizer.ts","../src/types/deployment-events.ts","../src/provisioning/cloud-control-provider.ts","../src/provisioning/provider-registry.ts","../src/provisioning/final-snapshot.ts","../src/deployment/rollback-executor.ts","../src/types/rollback-journal.ts","../src/state/s3-noncurrent-version-purge.ts","../src/state/s3-state-backend.ts","../src/assets/asset-redirect.ts","../src/deployment/work-graph.ts","../src/assets/asset-publisher.ts","../src/state/lock-manager.ts","../src/analyzer/template-parser.ts","../src/analyzer/dag-builder.ts","../src/analyzer/diff-calculator.ts","../src/provisioning/providers/iam-role-provider.ts","../src/state/export-index-store.ts","../src/deployment/deploy-engine.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;KAuGY;UAyBK;EAEf;EAMA;EAEA;;UAsBe;EAEf;EAMA;EAEA;;UAMe;EAKf,SAAS;EAGT;EAMA;EAGA,WAAW,eAAe;EAG1B,SAAS;EAUT,UAAU;EAoBV,cAAc;EAqBd;EAyEA,iBAAiB;EAgBjB;EAcA;EAYA;EAGA;;UAMe;EAEf;EAGA;EAGA,YAAY;EAcZ,qBAAqB;EAGrB,aAAa;EAGb;EAGA,WAAW;EAmBX;EAMA;EA0CA;;UAMe;EAEf;EAGA;EAGA;EAGA;;KAMU;UAKK;EAEf;EAGA,YAAY;EAGZ;EAGA,oBAAoB;EAGpB,oBAAoB;EAGpB,kBAAkB;EAWlB,mBAAmB;;UAUJ;EAEf;EACA;EACA;;UAgGe;EAEf;EAGA;EAGA;EAGA;EAYA;;;;KC9lBU,uBAAuB;KAuyLvB,gBAAgB;;;UC10LX;EASf;EAyCA;EAwBA;EA0BA;;;;UClHe;EACf;EAC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","names":[],"sources":["../src/types/state.ts","../src/deployment/secret-redaction.ts","../src/provisioning/region-check.ts","../src/types/resource.ts","../src/types/config.ts","../src/utils/logger.ts","../src/utils/error-handler.ts","../src/utils/aws-clients.ts","../src/utils/aws-region-resolver.ts","../src/types/assembly.ts","../src/synthesis/stack-messages.ts","../src/synthesis/assembly-reader.ts","../src/cli/upload-cfn-template.ts","../src/synthesis/macro-expander.ts","../src/synthesis/synthesizer.ts","../src/types/deployment-events.ts","../src/provisioning/cloud-control-provider.ts","../src/provisioning/provider-registry.ts","../src/provisioning/final-snapshot.ts","../src/deployment/rollback-executor.ts","../src/types/rollback-journal.ts","../src/state/s3-noncurrent-version-purge.ts","../src/state/s3-state-backend.ts","../src/assets/asset-redirect.ts","../src/deployment/work-graph.ts","../src/assets/asset-publisher.ts","../src/state/lock-manager.ts","../src/analyzer/template-parser.ts","../src/analyzer/dag-builder.ts","../src/analyzer/diff-calculator.ts","../src/provisioning/providers/iam-role-provider.ts","../src/state/export-index-store.ts","../src/deployment/deploy-engine.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;KAiJY;UAyBK;EAEf;EAMA;EAEA;;UAsBe;EAEf;EAMA;EAEA;;UAMe;EAKf,SAAS;EAGT;EAMA;EAGA,WAAW,eAAe;EAG1B,SAAS;EAUT,UAAU;EAoBV,cAAc;EAqBd;EAyEA,iBAAiB;EAgBjB;EAcA;EAYA;EAwCA,UAAU;EAGV;;UASe;EAEf;EAGA;EAGA,OAAO;;UAMQ;EAEf;EAGA;EAGA,YAAY;EAcZ,qBAAqB;EAGrB,aAAa;EAGb;EAGA,WAAW;EAmBX;EAMA;EA0CA;EAwDA;;UAMe;EAEf;EAGA;EAGA;EAGA;;KAMU;UAKK;EAEf;EAGA,YAAY;EAGZ;EAGA,oBAAoB;EAGpB,oBAAoB;EAGpB,kBAAkB;EAWlB,mBAAmB;;UAUJ;EAEf;EACA;EACA;;UA+Ie;EAEf;EAGA;EAGA;EAGA;EAYA;;;;KCxyB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CA;UA4EA;UA4BM;UA6BN;UAiCA;UAmBA;UA8DA;UAiEM;UAsgBN"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import { a as setLogger, n as getLogger, t as ConsoleLogger } from "./logger-
|
|
1
|
+
import { $t as DagBuilder, Br as resolveBucketRegion, Gr as AssetError, Hr as getAwsClients, Kr as CdkdError, Lr as AssemblyReader, Nn as AssetPublisher, Q as IAMRoleProvider, Ur as resetAwsClients, Vr as AwsClients, Wr as setAwsClients, Yr as DependencyError, _n as LockManager, di as formatError, dt as CloudControlProvider, en as TemplateParser, fi as isCdkdError, ii as ProvisioningError, li as StateError, pi as normalizeAwsError, pr as Synthesizer, qr as ConfigError, qt as DiffCalculator, r as DeployEngine, ti as LockError, tt as ProviderRegistry, ui as SynthesisError, vn as S3StateBackend, zr as clearBucketRegionCache } from "./deploy-engine-B6pEfNd9.js";
|
|
2
|
+
import { a as setLogger, n as getLogger, t as ConsoleLogger } from "./logger-D2Md1kTq.js";
|
|
3
3
|
|
|
4
4
|
export { AssemblyReader, AssetError, AssetPublisher, AwsClients, CdkdError, CloudControlProvider, ConfigError, ConsoleLogger, DagBuilder, DependencyError, DeployEngine, DiffCalculator, IAMRoleProvider, LockError, LockManager, ProviderRegistry, ProvisioningError, S3StateBackend, StateError, SynthesisError, Synthesizer, TemplateParser, clearBucketRegionCache, formatError, getAwsClients, getLogger, isCdkdError, normalizeAwsError, resetAwsClients, resolveBucketRegion, setAwsClients, setLogger };
|
|
@@ -472,6 +472,81 @@ function applyDefaultNameForFallback(logicalId, resourceType, properties) {
|
|
|
472
472
|
[rule.nameProperty]: generatedName
|
|
473
473
|
};
|
|
474
474
|
}
|
|
475
|
+
/**
|
|
476
|
+
* The template property that supplies an explicit physical name for
|
|
477
|
+
* `resourceType`, or `undefined` when cdkd knows of none (issue #2934).
|
|
478
|
+
*
|
|
479
|
+
* Read by the orphan-adoption pre-pass, where it decides TWO things. It
|
|
480
|
+
* answers whether THIS template hands the resource a name or lets cdkd generate
|
|
481
|
+
* one — and, because an unknown type answers `undefined`, it is also the
|
|
482
|
+
* pre-pass's ALLOW-LIST: a type absent from both tables is NOT adopted at all.
|
|
483
|
+
*
|
|
484
|
+
* That second role inverts what an earlier version of this doc described. It
|
|
485
|
+
* said an unknown type reads as "cdkd names this" and adoption proceeds, whose
|
|
486
|
+
* failure mode is a REPLACEMENT that destroys a resource `DeletionPolicy:
|
|
487
|
+
* Retain` preserved — three review rounds each found one more type reaching it.
|
|
488
|
+
* Now an absent type costs a missed adoption (go-to-k/cdkd#2916's diagnosis
|
|
489
|
+
* still prints) rather than a deletion, so the tables may be incomplete in the
|
|
490
|
+
* safe direction only.
|
|
491
|
+
*
|
|
492
|
+
* **An entry here ADMITS a type to adoption.** Before adding one, check the
|
|
493
|
+
* three tests in `ADOPTION_REFUSED_TYPES` (`src/deployment/orphan-adoption.ts`)
|
|
494
|
+
* — create mints a new resource instead of colliding, `update()` refuses, the
|
|
495
|
+
* resulting replacement destroys the retained copy. A type meeting all three
|
|
496
|
+
* belongs in THAT set even if it is named here; `AWS::Lambda::LayerVersion` is
|
|
497
|
+
* exactly that shape and `AWS::ECS::TaskDefinition` is kept there as a belt
|
|
498
|
+
* against a future `Family` entry.
|
|
499
|
+
*/
|
|
500
|
+
function explicitNamePropertyFor(resourceType) {
|
|
501
|
+
return FALLBACK_NAME_RULES[resourceType]?.nameProperty ?? ADOPTION_ONLY_NAME_PROPERTIES[resourceType];
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Name properties known to the ADOPTION guard but not to
|
|
505
|
+
* {@link FALLBACK_NAME_RULES} (issue #2934).
|
|
506
|
+
*
|
|
507
|
+
* A separate table on purpose: `FALLBACK_NAME_RULES` decides what cdkd GENERATES
|
|
508
|
+
* when an SDK provider falls back to Cloud Control, so adding an entry there
|
|
509
|
+
* changes the name a resource is created under — a replacement for anyone
|
|
510
|
+
* already deployed. This table answers a strictly narrower question, "does the
|
|
511
|
+
* template hand this resource a name", and adding to it can only make the
|
|
512
|
+
* adoption guard MORE conservative.
|
|
513
|
+
*
|
|
514
|
+
* Found by review: the SDK providers for the entries below generate a name
|
|
515
|
+
* themselves. What that costs changed with the inversion described above, so
|
|
516
|
+
* both halves are worth stating. An ABSENT type is refused outright — the
|
|
517
|
+
* empty-`nameProperties` arm in `orphan-adoption.ts` runs BEFORE
|
|
518
|
+
* `templateStillDeclares` — costing a missed adoption, with
|
|
519
|
+
* go-to-k/cdkd#2916's diagnosis still printing. A WRONG entry is the live
|
|
520
|
+
* hazard: a non-empty list clears the empty-list arm, `templateStillDeclares` then
|
|
521
|
+
* looks for a property the template does not use, so an explicit name reads as
|
|
522
|
+
* "no explicit name", the record is adopted, and the diff turns the create-only
|
|
523
|
+
* name into a REPLACE that deletes the resource being rescued. Supplying a name
|
|
524
|
+
* is the natural user move after that diagnosis, so this is a reachable path,
|
|
525
|
+
* not a theoretical one.
|
|
526
|
+
*
|
|
527
|
+
* `AWS::Budgets::Budget` is deliberately absent rather than forgotten: its name
|
|
528
|
+
* is NESTED (`Budget.BudgetName`, create-only), which neither this flat table
|
|
529
|
+
* nor `templateStillDeclares`' top-level property read can express, so adoption
|
|
530
|
+
* of that type is unguarded today — go-to-k/cdkd#2943 carries it.
|
|
531
|
+
*
|
|
532
|
+
* `AWS::ECS::TaskDefinition` was added here and REMOVED again, which is worth
|
|
533
|
+
* recording: its physical id is the revision ARN rather than a
|
|
534
|
+
* `generateResourceName` output, so the by-construction premise this whole
|
|
535
|
+
* guard rests on is false for it and an entry here could never match. It is
|
|
536
|
+
* refused by the adoption pre-pass instead — and the ALLOW-LIST gate is what
|
|
537
|
+
* refuses it: absent from both tables here, it never reaches adoption at all.
|
|
538
|
+
* `ADOPTION_REFUSED_TYPES` in `src/deployment/orphan-adoption.ts` carries it as
|
|
539
|
+
* a BELT against a future entry here (named rather than `{@link}`-ed: this
|
|
540
|
+
* module does not import it, so the link would render as dead text).
|
|
541
|
+
*/
|
|
542
|
+
const ADOPTION_ONLY_NAME_PROPERTIES = {
|
|
543
|
+
"AWS::AutoScaling::AutoScalingGroup": "AutoScalingGroupName",
|
|
544
|
+
"AWS::CodeCommit::Repository": "RepositoryName",
|
|
545
|
+
"AWS::DynamoDB::GlobalTable": "TableName",
|
|
546
|
+
"AWS::RDS::DBProxy": "DBProxyName",
|
|
547
|
+
"AWS::RDS::DBProxyEndpoint": "DBProxyEndpointName",
|
|
548
|
+
"AWS::Scheduler::Schedule": "Name"
|
|
549
|
+
};
|
|
475
550
|
|
|
476
551
|
//#endregion
|
|
477
552
|
//#region src/utils/live-renderer.ts
|
|
@@ -997,5 +1072,5 @@ function setLogger(logger) {
|
|
|
997
1072
|
}
|
|
998
1073
|
|
|
999
1074
|
//#endregion
|
|
1000
|
-
export {
|
|
1001
|
-
//# sourceMappingURL=logger-
|
|
1075
|
+
export { withSkipPrefix as _, setLogger as a, PATTERN_B_NAME_OPTIONS as c, applyDefaultNameForFallback as d, explicitNamePropertyFor as f, looksLikeCdkdGeneratedName as g, getCurrentStackName as h, reserveStdoutForPayload as i, PATTERN_B_NAME_PROPERTIES as l, generateResourceNameWithFallback as m, getLogger as n, runStackBuffered as o, generateResourceName as p, isStdoutReservedForPayload as r, getLiveRenderer as s, ConsoleLogger as t, PATTERN_B_RESOURCE_TYPES as u, withStackName as v };
|
|
1076
|
+
//# sourceMappingURL=logger-D2Md1kTq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger-D2Md1kTq.js","names":[],"sources":["../src/provisioning/resource-name.ts","../src/utils/live-renderer.ts","../src/utils/stack-context.ts","../src/utils/logger.ts"],"sourcesContent":["import { AsyncLocalStorage } from 'node:async_hooks';\nimport { createHash } from 'node:crypto';\n\n/**\n * Per-async-context stack name. Resource-name generation reads this so that\n * concurrent deploys (`cdkd deploy --all` runs stacks in parallel up to\n * `--stack-concurrency`) don't fight over a single shared variable.\n *\n * History: this was `let currentStackName: string | undefined` until\n * 2026-05-01. Two parallel `deploy()` calls would each call\n * `setCurrentStackName(...)` and the second would overwrite the first;\n * any IAM Role / SQS Queue / etc. created by the first stack while the\n * second was active would get the second stack's prefix in its physical\n * name, then the second stack's own create attempt for the same logical\n * id would collide (\"Role with name X already exists\"). Switching to\n * `AsyncLocalStorage` scopes the value to each deploy's async chain.\n */\nconst stackNameStore = new AsyncLocalStorage<string>();\n\n/**\n * Run `fn` with `stackName` set as the stack name visible to\n * `generateResourceName` for the duration of the callback (and any\n * `await`s inside). Concurrent invocations each get an independent scope\n * — this is the safe API for parallel deploys.\n */\nexport function withStackName<T>(stackName: string, fn: () => Promise<T>): Promise<T>;\nexport function withStackName<T>(stackName: string, fn: () => T): T;\nexport function withStackName<T>(stackName: string, fn: () => T | Promise<T>): T | Promise<T> {\n return stackNameStore.run(stackName, fn);\n}\n\n/**\n * Read the current async context's stack name, if any.\n *\n * Returns `undefined` outside any `withStackName` / `setCurrentStackName`\n * scope. Used by the live renderer to scope per-stack in-flight task\n * entries so concurrent deploys don't clobber each other's tasks (same\n * `logicalId` in two stacks would collide on the singleton renderer's\n * task Map without this).\n */\nexport function getCurrentStackName(): string | undefined {\n return stackNameStore.getStore();\n}\n\n/**\n * Set the current async context's stack name.\n *\n * @deprecated Use {@link withStackName} for new code — it makes the scope\n * obvious at the call site. This setter now uses\n * `AsyncLocalStorage.enterWith` so it remains safe under\n * `--stack-concurrency > 1` (each `deploy()` call has its own async\n * resource, so the value does NOT leak across siblings), but\n * `withStackName` is structurally clearer.\n */\nexport function setCurrentStackName(stackName: string): void {\n stackNameStore.enterWith(stackName);\n}\n\n/**\n * Per-async-context \"skip the stack-name prefix on user-supplied physical\n * names\" flag. Read by `generateResourceName` when its caller passes\n * `userSupplied: true`; auto-generated-name paths\n * (`generateResourceName(logicalId, ...)`) ignore this flag.\n *\n * Scoped via AsyncLocalStorage so that `--stack-concurrency > 1` runs\n * cannot cross-contaminate — each deploy's body is wrapped in its own\n * `withSkipPrefix(...)` scope (the deploy CLI plumbs the resolved\n * `--no-prefix-user-supplied-names` value through here). Default\n * `false` preserves pre-PR behavior when the flag is not set.\n */\nconst skipPrefixStore = new AsyncLocalStorage<boolean>();\n\n/**\n * Run `fn` with the \"skip prefix on user-supplied names\" flag set to\n * `skip`. Mirrors {@link withStackName} — concurrent invocations each\n * get an independent scope so parallel deploys do not fight over a\n * single shared variable.\n *\n * Wrap this around `withStackName(...)` (innermost is `fn`) in the\n * deploy CLI: `withSkipPrefix(flag, () => withStackName(name, body))`.\n * Order does not matter — the two stores are independent — but\n * consistent ordering keeps the call sites readable.\n */\nexport function withSkipPrefix<T>(skip: boolean, fn: () => Promise<T>): Promise<T>;\nexport function withSkipPrefix<T>(skip: boolean, fn: () => T): T;\nexport function withSkipPrefix<T>(skip: boolean, fn: () => T | Promise<T>): T | Promise<T> {\n return skipPrefixStore.run(skip, fn);\n}\n\n/**\n * Read the current async context's skip-prefix flag. Defaults to\n * `false` when no `withSkipPrefix` scope is active.\n *\n * Public for unit tests; `generateResourceName` consumes this\n * internally.\n */\nexport function getCurrentSkipPrefix(): boolean {\n return skipPrefixStore.getStore() ?? false;\n}\n\n/**\n * Resource types whose pre-PR #297 code path ran user-supplied\n * physical names through `generateResourceName` (= got the stack-name\n * prefix). These are the only types affected by\n * `--no-prefix-user-supplied-names`; flipping the flag against an\n * existing stack proposes REPLACEMENT on every state resource of\n * one of these types whose `physicalId` is still prefixed.\n *\n * Pattern A providers (Lambda, S3, SNS, SQS, DynamoDB, Logs LogGroup,\n * Events Rule, etc.) historically short-circuited user-supplied names\n * **out** of `generateResourceName` entirely — those types never got\n * the prefix regardless of the flag, so they are NOT included here.\n *\n * Used by the deploy-time pre-flight migration check in\n * `src/cli/commands/prefix-migration-check.ts`. Keep in sync with the\n * Pattern B provider call sites that consume\n * `generateResourceNameWithFallback(...)`.\n */\nexport const PATTERN_B_RESOURCE_TYPES: readonly string[] = [\n 'AWS::IAM::Role',\n 'AWS::IAM::User',\n 'AWS::IAM::Group',\n 'AWS::IAM::InstanceProfile',\n 'AWS::IAM::ManagedPolicy',\n 'AWS::ElasticLoadBalancingV2::LoadBalancer',\n 'AWS::ElasticLoadBalancingV2::TargetGroup',\n] as const;\n\n/**\n * For each Pattern B resource type, the CFn template `Properties` field\n * the user sets to supply a physical name (`new iam.Role(this, 'X',\n * { roleName: 'my-role' })` → `Properties.RoleName: 'my-role'`).\n *\n * Used by the prefix-migration check to distinguish user-supplied\n * physical names (which the v0.94.0 default flip would actually\n * REPLACE on next deploy) from auto-generated logical-id-fallback\n * names (which keep the prefix in BOTH old and new default — no\n * REPLACE pending). Without this discriminator, the migration\n * check naively flags every prefix-style physicalId regardless of\n * its origin, surfacing a false-positive WARNING on auto-generated\n * names that won't actually be touched.\n *\n * Keep in sync with `PATTERN_B_RESOURCE_TYPES` and with each\n * provider's `Properties[<NameField>]` lookup in\n * `src/provisioning/providers/`.\n */\nexport const PATTERN_B_NAME_PROPERTIES: Readonly<Record<string, string>> = {\n 'AWS::IAM::Role': 'RoleName',\n 'AWS::IAM::User': 'UserName',\n 'AWS::IAM::Group': 'GroupName',\n 'AWS::IAM::InstanceProfile': 'InstanceProfileName',\n 'AWS::IAM::ManagedPolicy': 'ManagedPolicyName',\n 'AWS::ElasticLoadBalancingV2::LoadBalancer': 'Name',\n 'AWS::ElasticLoadBalancingV2::TargetGroup': 'Name',\n};\n\n/**\n * For each Pattern B resource type, the `generateResourceName` options each\n * provider passes at its name call site (maxLength + any lowercase /\n * allowedPattern). Keep in sync with the provider call sites\n * (`generateResourceNameWithFallback(...)` in\n * `src/provisioning/providers/`).\n *\n * Used by the prefix-migration check to recompute BOTH the legacy\n * (prefixed) and the post-v0.94 (unprefixed) physical name for a recorded\n * user-supplied name through the SAME sanitize / truncate pipeline the\n * provider used — so a name that needed sanitization (`my_role` ->\n * `my-role`) or hash-suffix truncation (> maxLength) is compared exactly,\n * not via a naive prefix concat / strip.\n */\nexport const PATTERN_B_NAME_OPTIONS: Readonly<Record<string, ResourceNameOptions>> = {\n 'AWS::IAM::Role': { maxLength: 64 },\n 'AWS::IAM::User': { maxLength: 64 },\n 'AWS::IAM::Group': { maxLength: 128 },\n 'AWS::IAM::InstanceProfile': { maxLength: 128 },\n 'AWS::IAM::ManagedPolicy': { maxLength: 128 },\n 'AWS::ElasticLoadBalancingV2::LoadBalancer': { maxLength: 32 },\n 'AWS::ElasticLoadBalancingV2::TargetGroup': { maxLength: 32 },\n};\n\n/**\n * Options for generating a resource name.\n */\nexport interface ResourceNameOptions {\n /** Maximum length for the name (e.g., 32 for ALB/TG, 64 for IAM, 63 for S3) */\n maxLength: number;\n /** Whether to force lowercase (e.g., S3 buckets) */\n lowercase?: boolean;\n /** Allowed character regex pattern. Characters not matching will be removed.\n * Default: /[^a-zA-Z0-9-]/ (alphanumeric + hyphen) */\n allowedPattern?: RegExp;\n /**\n * `true` when the caller is passing a name the user explicitly\n * declared in their CDK code (e.g. `new iam.Role(this, 'X', {\n * roleName: 'my-role' })`). `false` (default) when the caller is\n * passing the logical-id fallback or any other cdkd-generated value.\n *\n * Combined with the per-deploy `withSkipPrefix(true)` flag, a\n * `userSupplied: true` call skips the stack-name prefix and returns\n * the user's declared name verbatim (after the same sanitize /\n * truncate pipeline). When `userSupplied` is `false` OR\n * `withSkipPrefix` is unset / `false`, the stack-name prefix is\n * applied (pre-PR behavior).\n *\n * This split is load-bearing: cdkd's stack-scoping concern (prefix\n * for cross-stack uniqueness on auto-generated names) must stay\n * coupled to the auto-generated path, NOT to user-declared names —\n * those belong to the user.\n */\n userSupplied?: boolean;\n}\n\n/**\n * Generate a unique resource name from the logical ID.\n *\n * Generates names in CloudFormation-compatible format:\n * `{StackName}-{LogicalId}-{Hash}` (truncated to maxLength).\n *\n * @param name The raw name (from properties or logicalId fallback)\n * @param options Length and character constraints\n * @returns A sanitized, truncated name that fits the constraints\n */\nexport function generateResourceName(name: string, options: ResourceNameOptions): string {\n const {\n maxLength,\n lowercase = false,\n allowedPattern = /[^a-zA-Z0-9-]/g,\n userSupplied = false,\n } = options;\n\n // Include stack name for uniqueness (like CloudFormation does).\n //\n // The prefix is suppressed when the caller marked the name as\n // user-supplied AND the per-deploy `withSkipPrefix(true)` flag is\n // active — the user owns that name and cdkd should not rewrite it.\n // Every other path (logical-id fallback, no withSkipPrefix scope,\n // flag set to false) keeps the prefix for cross-stack uniqueness.\n const currentStackName = stackNameStore.getStore();\n const shouldPrefix = currentStackName && !(userSupplied && getCurrentSkipPrefix());\n const fullName = shouldPrefix ? `${currentStackName}-${name}` : name;\n\n // Apply lowercase BEFORE pattern matching (so A-Z aren't removed by /[^a-z0-9.-]/)\n let sanitized = lowercase ? fullName.toLowerCase() : fullName;\n sanitized = sanitized.replace(allowedPattern, '-');\n\n // Collapse consecutive hyphens and remove leading/trailing\n sanitized = sanitized.replace(/-{2,}/g, '-').replace(/^-+|-+$/g, '');\n\n if (sanitized.length <= maxLength) {\n return sanitized;\n }\n\n // Truncate with hash suffix for uniqueness\n const hash = createHash('sha256').update(fullName).digest('hex').substring(0, 8);\n const maxPrefixLength = maxLength - hash.length - 1; // -1 for separator\n const prefix = sanitized.substring(0, maxPrefixLength).replace(/-+$/, '');\n\n return `${prefix}-${hash}`;\n}\n\n/**\n * Best-effort: was this physical name GENERATED by cdkd from the logical id,\n * rather than declared in the user's template? (issue #1636)\n *\n * The replacement-collision refusals in `deploy-engine.ts` used to assert\n * \"the resource has a user-supplied physical name\" for EVERY colliding\n * resource, and then prescribe \"rename the resource in your CDK code\". For a\n * resource the template never named that is false in both halves: the name is\n * cdkd's own `{stackName}-{logicalId}` — which has no random component, so the\n * create-first attempt lands on the name the old resource still holds exactly\n * as it would for a user-named one — and \"rename\" would mean renaming the\n * CONSTRUCT (changing the logical id), a far more disruptive action than the\n * message implies. A user who reads \"user-supplied physical name\" and finds\n * none in their template cannot connect the message to their code at all.\n *\n * The test is the naming scheme run backwards: {@link generateResourceName}\n * with `userSupplied: false` always builds from `{stackName}-{logicalId}`,\n * while a template-supplied name builds from `{stackName}-{userName}` (or the\n * bare user name under `--no-prefix-user-supplied-names`). So the two differ\n * unless the declared name happens to EQUAL the logical id.\n *\n * **Deliberately approximate, and biased toward the safe answer.** The\n * per-type `maxLength` / `lowercase` / `allowedPattern` options live in the\n * providers, and the engine does not know which type maps to which — so this\n * compares case-insensitively on the alphanumeric skeleton and accepts the\n * truncated `…-<8 hex>` form by prefix. Every unresolved case answers `false`:\n * a `false` merely keeps the pre-#1636 wording, which is correct for the\n * template-named resource that is the likelier reading of an unrecognized\n * name, whereas a wrong `true` would tell a user who DID name their resource\n * to go looking for a name they never wrote.\n *\n * @param physicalId the name AWS currently holds for the existing resource\n * @param logicalId the template logical id of the resource being replaced\n * @param stackName the deploying stack's name (absent = unresolvable, `false`)\n */\nexport function looksLikeCdkdGeneratedName(\n physicalId: string,\n logicalId: string,\n stackName: string | undefined\n): boolean {\n if (!physicalId || !logicalId || !stackName) return false;\n // The skeleton drops every separator the per-type `allowedPattern` could\n // have rewritten (a hyphen, an underscore, a dot) so an S3-style\n // lowercase-and-dot name still matches its own derivation.\n const skeleton = (value: string): string => value.toLowerCase().replace(/[^a-z0-9]/g, '');\n const derived = skeleton(`${stackName}-${logicalId}`);\n const actual = skeleton(physicalId);\n if (actual === derived) return true;\n // Truncated form: `{prefix}-{8 hex}` where prefix is a cut of the same\n // derivation. Require BOTH halves — a bare prefix match would accept a\n // template-supplied name that merely starts the same way.\n const truncated = /^(.*)-([0-9a-f]{8})$/.exec(physicalId.toLowerCase());\n if (!truncated) return false;\n const prefix = skeleton(truncated[1]!);\n return prefix.length > 0 && derived.startsWith(prefix);\n}\n\n/**\n * Generate a resource name from a user-declared physical name OR\n * fall back to the logical id.\n *\n * Wraps {@link generateResourceName} to express the Pattern B call-site\n * shape (`generateResourceName((properties['Name'] as string | undefined)\n * || logicalId, opts)`) as a single typed helper. The user-supplied\n * branch passes `userSupplied: true`, which makes the per-deploy\n * `withSkipPrefix(true)` flag drop the stack-name prefix on that name.\n * The fallback (logical-id) branch is `userSupplied: false` and keeps\n * the prefix regardless of the flag — auto-generated names rely on\n * the prefix for cross-stack uniqueness.\n *\n * Use at every Pattern B provider call site (currently IAM Role, IAM\n * User, IAM Group, IAM InstanceProfile, ELBv2 LoadBalancer, ELBv2\n * TargetGroup) so the `--no-prefix-user-supplied-names` flag controls\n * those types consistently. Pattern A providers (Lambda, S3, SNS,\n * SQS, DynamoDB, etc.) do NOT need this helper — they already\n * short-circuit the user-supplied name out of the\n * `generateResourceName` call entirely, so the prefix is never\n * applied to user-supplied names regardless of the flag.\n */\nexport function generateResourceNameWithFallback(\n userSuppliedName: string | undefined,\n logicalId: string,\n options: Omit<ResourceNameOptions, 'userSupplied'>\n): string {\n if (userSuppliedName !== undefined && userSuppliedName !== '') {\n return generateResourceName(userSuppliedName, { ...options, userSupplied: true });\n }\n return generateResourceName(logicalId, { ...options, userSupplied: false });\n}\n\n/**\n * Default name generation rules for CC API fallback.\n *\n * When an SDK provider falls back to CC API, the resource may need a\n * default name that the SDK provider would have generated. This map\n * defines the name property and generation options for each resource type.\n *\n * Format: resourceType → { nameProperty, options, postProcess? }\n */\nconst FALLBACK_NAME_RULES: Record<\n string,\n {\n nameProperty: string;\n options: ResourceNameOptions;\n }\n> = {\n 'AWS::S3::Bucket': { nameProperty: 'BucketName', options: { maxLength: 63, lowercase: true } },\n 'AWS::SQS::Queue': { nameProperty: 'QueueName', options: { maxLength: 80 } },\n 'AWS::SNS::Topic': { nameProperty: 'TopicName', options: { maxLength: 256 } },\n 'AWS::Lambda::Function': { nameProperty: 'FunctionName', options: { maxLength: 64 } },\n 'AWS::Lambda::LayerVersion': { nameProperty: 'LayerName', options: { maxLength: 64 } },\n 'AWS::IAM::Role': { nameProperty: 'RoleName', options: { maxLength: 64 } },\n 'AWS::IAM::Policy': { nameProperty: 'PolicyName', options: { maxLength: 64 } },\n 'AWS::IAM::ManagedPolicy': {\n nameProperty: 'ManagedPolicyName',\n options: { maxLength: 128 },\n },\n 'AWS::IAM::User': { nameProperty: 'UserName', options: { maxLength: 64 } },\n 'AWS::IAM::Group': { nameProperty: 'GroupName', options: { maxLength: 128 } },\n 'AWS::IAM::InstanceProfile': {\n nameProperty: 'InstanceProfileName',\n options: { maxLength: 128 },\n },\n 'AWS::DynamoDB::Table': { nameProperty: 'TableName', options: { maxLength: 255 } },\n 'AWS::ECR::Repository': {\n nameProperty: 'RepositoryName',\n options: { maxLength: 256, lowercase: true },\n },\n 'AWS::ECS::Cluster': { nameProperty: 'ClusterName', options: { maxLength: 255 } },\n 'AWS::ECS::Service': { nameProperty: 'ServiceName', options: { maxLength: 255 } },\n 'AWS::Logs::LogGroup': { nameProperty: 'LogGroupName', options: { maxLength: 512 } },\n 'AWS::CloudWatch::Alarm': { nameProperty: 'AlarmName', options: { maxLength: 256 } },\n 'AWS::Events::Rule': { nameProperty: 'Name', options: { maxLength: 64 } },\n 'AWS::Events::EventBus': { nameProperty: 'Name', options: { maxLength: 256 } },\n 'AWS::Kinesis::Stream': { nameProperty: 'Name', options: { maxLength: 128 } },\n 'AWS::StepFunctions::StateMachine': {\n nameProperty: 'StateMachineName',\n options: { maxLength: 80 },\n },\n 'AWS::SecretsManager::Secret': {\n nameProperty: 'Name',\n options: { maxLength: 512, allowedPattern: /[^a-zA-Z0-9-/_]/g },\n },\n 'AWS::SSM::Parameter': { nameProperty: 'Name', options: { maxLength: 2048 } },\n 'AWS::Cognito::UserPool': { nameProperty: 'UserPoolName', options: { maxLength: 128 } },\n 'AWS::ElastiCache::SubnetGroup': {\n nameProperty: 'CacheSubnetGroupName',\n options: { maxLength: 255, lowercase: true },\n },\n 'AWS::ElastiCache::CacheCluster': {\n nameProperty: 'ClusterName',\n options: { maxLength: 40, lowercase: true },\n },\n 'AWS::RDS::DBSubnetGroup': {\n nameProperty: 'DBSubnetGroupName',\n options: { maxLength: 255, lowercase: true },\n },\n 'AWS::RDS::DBCluster': {\n nameProperty: 'DBClusterIdentifier',\n options: { maxLength: 63, lowercase: true },\n },\n 'AWS::RDS::DBInstance': {\n nameProperty: 'DBInstanceIdentifier',\n options: { maxLength: 63, lowercase: true },\n },\n // DocumentDB — RDS-shaped API; same name constraints.\n 'AWS::DocDB::DBSubnetGroup': {\n nameProperty: 'DBSubnetGroupName',\n options: { maxLength: 255, lowercase: true },\n },\n 'AWS::DocDB::DBCluster': {\n nameProperty: 'DBClusterIdentifier',\n options: { maxLength: 63, lowercase: true },\n },\n 'AWS::DocDB::DBInstance': {\n nameProperty: 'DBInstanceIdentifier',\n options: { maxLength: 63, lowercase: true },\n },\n // Neptune — RDS-shaped API; same name constraints.\n 'AWS::Neptune::DBSubnetGroup': {\n nameProperty: 'DBSubnetGroupName',\n options: { maxLength: 255, lowercase: true },\n },\n 'AWS::Neptune::DBCluster': {\n nameProperty: 'DBClusterIdentifier',\n options: { maxLength: 63, lowercase: true },\n },\n 'AWS::Neptune::DBInstance': {\n nameProperty: 'DBInstanceIdentifier',\n options: { maxLength: 63, lowercase: true },\n },\n 'AWS::ElasticLoadBalancingV2::LoadBalancer': {\n nameProperty: 'Name',\n options: { maxLength: 32 },\n },\n 'AWS::ElasticLoadBalancingV2::TargetGroup': {\n nameProperty: 'Name',\n options: { maxLength: 32 },\n },\n 'AWS::WAFv2::WebACL': { nameProperty: 'Name', options: { maxLength: 128 } },\n 'AWS::CodeBuild::Project': { nameProperty: 'Name', options: { maxLength: 255 } },\n 'AWS::S3Express::DirectoryBucket': {\n nameProperty: 'BucketName',\n options: { maxLength: 63, lowercase: true },\n },\n};\n\n/**\n * Apply default name generation for CC API fallback.\n *\n * When a resource doesn't have an explicit name property set,\n * generates the same default name that the SDK provider would have created.\n * This ensures consistent naming regardless of whether SDK or CC API handles the resource.\n *\n * @param logicalId Logical ID from the template\n * @param resourceType CloudFormation resource type\n * @param properties Resource properties (will not be mutated)\n * @returns Properties with default name applied if needed, or original properties if no rule exists\n */\nexport function applyDefaultNameForFallback(\n logicalId: string,\n resourceType: string,\n properties: Record<string, unknown>\n): Record<string, unknown> {\n const rule = FALLBACK_NAME_RULES[resourceType];\n if (!rule) return properties;\n\n // If the name property is already set, no need to generate\n if (properties[rule.nameProperty]) return properties;\n\n const generatedName = generateResourceName(logicalId, rule.options);\n\n return {\n ...properties,\n [rule.nameProperty]: generatedName,\n };\n}\n\n/**\n * The template property that supplies an explicit physical name for\n * `resourceType`, or `undefined` when cdkd knows of none (issue #2934).\n *\n * Read by the orphan-adoption pre-pass, where it decides TWO things. It\n * answers whether THIS template hands the resource a name or lets cdkd generate\n * one — and, because an unknown type answers `undefined`, it is also the\n * pre-pass's ALLOW-LIST: a type absent from both tables is NOT adopted at all.\n *\n * That second role inverts what an earlier version of this doc described. It\n * said an unknown type reads as \"cdkd names this\" and adoption proceeds, whose\n * failure mode is a REPLACEMENT that destroys a resource `DeletionPolicy:\n * Retain` preserved — three review rounds each found one more type reaching it.\n * Now an absent type costs a missed adoption (go-to-k/cdkd#2916's diagnosis\n * still prints) rather than a deletion, so the tables may be incomplete in the\n * safe direction only.\n *\n * **An entry here ADMITS a type to adoption.** Before adding one, check the\n * three tests in `ADOPTION_REFUSED_TYPES` (`src/deployment/orphan-adoption.ts`)\n * — create mints a new resource instead of colliding, `update()` refuses, the\n * resulting replacement destroys the retained copy. A type meeting all three\n * belongs in THAT set even if it is named here; `AWS::Lambda::LayerVersion` is\n * exactly that shape and `AWS::ECS::TaskDefinition` is kept there as a belt\n * against a future `Family` entry.\n */\nexport function explicitNamePropertyFor(resourceType: string): string | undefined {\n return (\n FALLBACK_NAME_RULES[resourceType]?.nameProperty ?? ADOPTION_ONLY_NAME_PROPERTIES[resourceType]\n );\n}\n\n/**\n * Name properties known to the ADOPTION guard but not to\n * {@link FALLBACK_NAME_RULES} (issue #2934).\n *\n * A separate table on purpose: `FALLBACK_NAME_RULES` decides what cdkd GENERATES\n * when an SDK provider falls back to Cloud Control, so adding an entry there\n * changes the name a resource is created under — a replacement for anyone\n * already deployed. This table answers a strictly narrower question, \"does the\n * template hand this resource a name\", and adding to it can only make the\n * adoption guard MORE conservative.\n *\n * Found by review: the SDK providers for the entries below generate a name\n * themselves. What that costs changed with the inversion described above, so\n * both halves are worth stating. An ABSENT type is refused outright — the\n * empty-`nameProperties` arm in `orphan-adoption.ts` runs BEFORE\n * `templateStillDeclares` — costing a missed adoption, with\n * go-to-k/cdkd#2916's diagnosis still printing. A WRONG entry is the live\n * hazard: a non-empty list clears the empty-list arm, `templateStillDeclares` then\n * looks for a property the template does not use, so an explicit name reads as\n * \"no explicit name\", the record is adopted, and the diff turns the create-only\n * name into a REPLACE that deletes the resource being rescued. Supplying a name\n * is the natural user move after that diagnosis, so this is a reachable path,\n * not a theoretical one.\n *\n * `AWS::Budgets::Budget` is deliberately absent rather than forgotten: its name\n * is NESTED (`Budget.BudgetName`, create-only), which neither this flat table\n * nor `templateStillDeclares`' top-level property read can express, so adoption\n * of that type is unguarded today — go-to-k/cdkd#2943 carries it.\n *\n * `AWS::ECS::TaskDefinition` was added here and REMOVED again, which is worth\n * recording: its physical id is the revision ARN rather than a\n * `generateResourceName` output, so the by-construction premise this whole\n * guard rests on is false for it and an entry here could never match. It is\n * refused by the adoption pre-pass instead — and the ALLOW-LIST gate is what\n * refuses it: absent from both tables here, it never reaches adoption at all.\n * `ADOPTION_REFUSED_TYPES` in `src/deployment/orphan-adoption.ts` carries it as\n * a BELT against a future entry here (named rather than `{@link}`-ed: this\n * module does not import it, so the link would render as dead text).\n */\nconst ADOPTION_ONLY_NAME_PROPERTIES: Record<string, string> = {\n 'AWS::AutoScaling::AutoScalingGroup': 'AutoScalingGroupName',\n 'AWS::CodeCommit::Repository': 'RepositoryName',\n 'AWS::DynamoDB::GlobalTable': 'TableName',\n 'AWS::RDS::DBProxy': 'DBProxyName',\n 'AWS::RDS::DBProxyEndpoint': 'DBProxyEndpointName',\n 'AWS::Scheduler::Schedule': 'Name',\n};\n","/**\n * Live multi-line progress renderer for the bottom of the terminal.\n *\n * Maintains a \"live area\" listing in-flight tasks (Creating MyBucket...),\n * redrawn on a spinner timer. Other log output is routed through\n * {@link LiveRenderer.printAbove} so it appears above the live area without\n * disturbing the currently-displayed in-flight tasks.\n *\n * Design notes:\n * - Multiple resources can be in flight concurrently (cdkd uses parallel DAG\n * dispatch), so a single in-place line overwrite is not enough — each\n * in-flight resource is its own line in the live area.\n * - On non-TTY (CI/log-collection), the renderer stays inactive and\n * {@link LiveRenderer.printAbove} falls through to a direct write, so output\n * matches the previous append-only behavior.\n * - In verbose mode (debug level) the caller should not start the renderer:\n * debug logs would interleave too aggressively with the live area.\n */\n\nimport { getCurrentStackName } from '../provisioning/resource-name.js';\n\nconst SPINNER_FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];\nconst FRAME_INTERVAL_MS = 80;\nconst ESC = '\\x1b[';\n\ninterface Task {\n label: string;\n startedAt: number;\n /** Stack the task belongs to (from `withStackName` AsyncLocalStorage),\n * or `undefined` when addTask was called outside any stack scope.\n * Captured at addTask time because the spinner re-draw runs on a\n * setInterval timer with no inherited async context. */\n stackName: string | undefined;\n}\n\n/**\n * Scope a task `id` to its calling stack so two stacks running in\n * parallel — `cdkd deploy --all` with `--stack-concurrency > 1` — don't\n * collide on the same `logicalId` in the renderer's task Map. Without\n * this, stack B's `addTask('MyQueue', ...)` would overwrite stack A's\n * entry, and stack A's later `removeTask('MyQueue')` would erase\n * stack B's.\n */\nfunction scopedKey(id: string, stackName: string | undefined): string {\n return stackName ? `${stackName}:${id}` : id;\n}\n\nexport class LiveRenderer {\n private tasks = new Map<string, Task>();\n private active = false;\n private spinnerIndex = 0;\n private interval: NodeJS.Timeout | null = null;\n private linesDrawn = 0;\n private cursorHidden = false;\n private exitListener: (() => void) | null = null;\n private readonly stream: NodeJS.WriteStream;\n\n constructor(stream: NodeJS.WriteStream = process.stdout) {\n this.stream = stream;\n }\n\n isActive(): boolean {\n return this.active;\n }\n\n /**\n * Enable the live renderer. No-op if stdout is not a TTY or if\n * `CDKD_NO_LIVE=1`. Returns true if successfully enabled.\n */\n start(): boolean {\n if (this.active) return true;\n if (!this.stream.isTTY) return false;\n if (process.env['CDKD_NO_LIVE'] === '1') return false;\n\n this.active = true;\n this.hideCursor();\n // Restore the cursor on abrupt process exit (e.g., uncaught exception\n // before stop() runs). Removed in stop() to avoid leaking listeners\n // across renderer instances.\n if (!this.exitListener) {\n this.exitListener = () => this.showCursor();\n process.on('exit', this.exitListener);\n }\n this.interval = setInterval(() => this.draw(), FRAME_INTERVAL_MS);\n if (typeof this.interval.unref === 'function') this.interval.unref();\n return true;\n }\n\n stop(): void {\n if (!this.active) return;\n if (this.interval) {\n clearInterval(this.interval);\n this.interval = null;\n }\n this.clear();\n this.showCursor();\n if (this.exitListener) {\n process.removeListener('exit', this.exitListener);\n this.exitListener = null;\n }\n this.tasks.clear();\n this.active = false;\n }\n\n addTask(id: string, label: string): void {\n const stackName = getCurrentStackName();\n this.tasks.set(scopedKey(id, stackName), { label, startedAt: Date.now(), stackName });\n if (this.active) this.draw();\n }\n\n removeTask(id: string): void {\n const stackName = getCurrentStackName();\n if (!this.tasks.delete(scopedKey(id, stackName))) return;\n if (this.active) this.draw();\n }\n\n /**\n * Replace the label of a previously-added task in place. No-op if the\n * task is not currently tracked (e.g. it already finished). Used by the\n * per-resource deadline wrapper to surface a \"[taking longer than\n * expected, Nm+]\" suffix without disturbing the elapsed-time counter\n * the renderer tracks via `startedAt`.\n */\n updateTaskLabel(id: string, label: string): void {\n const stackName = getCurrentStackName();\n const task = this.tasks.get(scopedKey(id, stackName));\n if (!task) return;\n task.label = label;\n if (this.active) this.draw();\n }\n\n /**\n * Print content above the live area. Clears the live area, runs the writer,\n * then redraws the live area. When the renderer is inactive, the writer\n * runs directly so callers can use this unconditionally.\n */\n printAbove(write: () => void): void {\n if (!this.active) {\n write();\n return;\n }\n this.clear();\n write();\n this.draw();\n }\n\n private clear(): void {\n if (this.linesDrawn === 0) return;\n this.stream.write('\\r');\n for (let i = 0; i < this.linesDrawn; i++) {\n this.stream.write(`${ESC}1A${ESC}2K`);\n }\n this.linesDrawn = 0;\n }\n\n private draw(): void {\n if (!this.active) return;\n this.clear();\n if (this.tasks.size === 0) return;\n\n const frame = SPINNER_FRAMES[this.spinnerIndex % SPINNER_FRAMES.length]!;\n this.spinnerIndex++;\n\n // When tasks from more than one stack are in flight at the same time,\n // prefix each line with the stack name so the user can tell them\n // apart. In single-stack runs, omit the prefix to keep the area\n // visually clean. (Detection is per-frame: as soon as a second\n // stack adds its first task, the prefix appears on every row;\n // when the second stack's tasks all complete and only one stack\n // remains, the prefix disappears.)\n const distinctStacks = new Set<string | undefined>();\n for (const task of this.tasks.values()) distinctStacks.add(task.stackName);\n const showStackPrefix = distinctStacks.size > 1;\n\n // Truncate to terminal width so a long label does not wrap and confuse\n // the line-up clear logic. Default to 80 if columns is unavailable.\n const cols = this.stream.columns ?? 80;\n const lines: string[] = [];\n for (const task of this.tasks.values()) {\n const elapsed = ((Date.now() - task.startedAt) / 1000).toFixed(1);\n const prefix = showStackPrefix && task.stackName ? `[${task.stackName}] ` : '';\n const raw = ` ${frame} ${prefix}${task.label} (${elapsed}s)`;\n lines.push(this.truncate(raw, cols));\n }\n this.stream.write(lines.join('\\n') + '\\n');\n this.linesDrawn = lines.length;\n }\n\n private truncate(s: string, maxLen: number): string {\n if (s.length <= maxLen) return s;\n if (maxLen <= 1) return '…';\n return s.substring(0, maxLen - 1) + '…';\n }\n\n private hideCursor(): void {\n if (this.cursorHidden) return;\n this.stream.write(`${ESC}?25l`);\n this.cursorHidden = true;\n }\n\n private showCursor(): void {\n if (!this.cursorHidden) return;\n this.stream.write(`${ESC}?25h`);\n this.cursorHidden = false;\n }\n}\n\nlet globalRenderer: LiveRenderer | null = null;\n\nexport function getLiveRenderer(): LiveRenderer {\n if (!globalRenderer) globalRenderer = new LiveRenderer();\n return globalRenderer;\n}\n\n/**\n * Reset the singleton (for tests).\n */\nexport function resetLiveRenderer(): void {\n if (globalRenderer) globalRenderer.stop();\n globalRenderer = null;\n}\n","import { AsyncLocalStorage } from 'node:async_hooks';\n\n/**\n * Per-stack log buffer for parallel multi-stack deploys.\n *\n * Without buffering, two concurrent `deploy()` calls interleave their\n * `logger.info(...)` lines: stack A's \"Changes: 4 to create\" appears in\n * the middle of stack B's `[N/N] ✅ ...` progress, and stack B's\n * \"Deployment completed\" lands after stack A's late progress lines. With\n * buffering, each stack's log output is captured into its own buffer\n * for the duration of the deploy and flushed atomically when the deploy\n * finishes — so the user sees one clean per-stack block.\n *\n * Single-stack deploys do NOT enable buffering (the caller checks\n * `stacks.length > 1`); real-time output is preferred when there is no\n * interleaving risk.\n */\nexport interface StackOutputBuffer {\n lines: string[];\n}\n\nconst outputBufferStore = new AsyncLocalStorage<StackOutputBuffer>();\n\n/**\n * Run `fn` with a fresh log buffer scoped to its async chain. Any\n * `logger.info / debug / warn / error` calls inside `fn` (and any\n * `await`s) push into the buffer instead of writing to stdout/stderr.\n * Returns the buffered lines (and either `result` or `error`) so the\n * caller can flush them in one block.\n */\nexport async function runStackBuffered<T>(\n fn: () => Promise<T>\n): Promise<{ lines: string[] } & ({ ok: true; result: T } | { ok: false; error: unknown })> {\n const buffer: StackOutputBuffer = { lines: [] };\n return outputBufferStore.run(buffer, async () => {\n try {\n const result = await fn();\n return { ok: true, result, lines: buffer.lines };\n } catch (error) {\n return { ok: false, error, lines: buffer.lines };\n }\n });\n}\n\n/**\n * Get the current async context's stack output buffer, or `undefined`\n * if no `runStackBuffered` is active. The logger consults this on every\n * call: present → push to buffer; absent → fall through to live\n * renderer / console.\n */\nexport function getCurrentStackOutputBuffer(): StackOutputBuffer | undefined {\n return outputBufferStore.getStore();\n}\n","import type { Logger, LogLevel } from '../types/config.js';\nimport { getLiveRenderer } from './live-renderer.js';\nimport { getCurrentStackOutputBuffer } from './stack-context.js';\n\n/**\n * ANSI color codes\n *\n * Kept internal — `ConsoleLogger.formatMessage` references these for the\n * verbose/compact mode level prefixes. For inline color wrapping in\n * production code, import from `./colors.js` instead (which lives in a\n * separate module so unit tests that mock `logger.ts` don't strip color\n * helpers as a side effect).\n */\nconst colors = {\n reset: '\\x1b[0m',\n bright: '\\x1b[1m',\n dim: '\\x1b[2m',\n red: '\\x1b[31m',\n green: '\\x1b[32m',\n yellow: '\\x1b[33m',\n blue: '\\x1b[34m',\n cyan: '\\x1b[36m',\n gray: '\\x1b[90m',\n} as const;\n\n/**\n * Whether stdout has been claimed by a machine-readable payload.\n *\n * Issue [#2230](https://github.com/go-to-k/cdkd/issues/2230). `info` and\n * `debug` resolve to `console.info` / `console.debug`, which write to\n * STDOUT — the same stream a `--json` command prints its payload on. A\n * command whose remediation path logs a status line therefore hands a pipe\n * consumer prose wrapped around the document, and the failure is silent in\n * the worst direction: the human sees correct-looking output while the\n * parser sees a syntax error, or succeeds against a truncated read.\n *\n * MODULE-LEVEL rather than an instance field on purpose. The decision is a\n * property of the PROCESS's stdout, not of one logger object: `child()`\n * hands out fresh {@link ChildLogger} instances (`role-arn`, the state\n * backend, ...) that would each need the flag set individually, and those\n * are exactly the loggers a command cannot reach from its own file.\n *\n * OPT-IN, and deliberately not derived from a `--json` flag inside the\n * logger: nothing changes for a command that does not call\n * {@link reserveStdoutForPayload}. Every `--json` surface keeps its payload\n * stream clean one way or the other, but NOT all by this mechanism, and the\n * count is easy to state one short: SEVEN call this — `cdkd drift`'s original\n * call, plus the six issue\n * [#2280](https://github.com/go-to-k/cdkd/issues/2280) added to it (`cdkd\n * list`, `cdkd events`, and the four `cdkd state {list,resources,show,info}`\n * subcommands) — while `cdkd diff` predates the mechanism and demotes the\n * logger to `warn` instead, which SUPPRESSES its info-level lines rather than\n * moving them. Do not read \"every `--json` surface\" as \"every `--json`\n * surface calls this\". Of those seven, TWO no longer consult `--json` at all\n * — see the next paragraph, which owns them.\n *\n * A `--json` flag is NOT what makes a stream a payload stream, though, and\n * issue [#2410](https://github.com/go-to-k/cdkd/issues/2410) plus issue\n * [#2435](https://github.com/go-to-k/cdkd/issues/2435) are the FIVE commands\n * where it is not involved at all: `cdkd synth` (the template), `cdkd list`\n * in EVERY mode (the YAML and the one-id-per-line spellings, not just\n * `--json`), `cdkd state list` in EVERY mode (the one-`Stack (region)`-\n * per-line spelling as much as `--json`; `--long` / `--tree` are formatted\n * views swept along, since the reservation is taken before the mode is\n * known), `cdkd local invoke` (the function response) and `cdkd local\n * invoke-agentcore` (the agent response). NOTE `cdkd list` AND `cdkd state\n * list` each appear in BOTH paragraphs and are ONE call site apiece, not two:\n * go-to-k/cdkd#2280 added both under `--json`, and go-to-k/cdkd#2410 /\n * go-to-k/cdkd#2435 respectively made those same calls unconditional. Ten\n * commands call this in total, not twelve. Those five call it\n * UNCONDITIONALLY at command entry, so for them the DEFAULT human output\n * contract is the one that moved — deliberately, and documented per command\n * in `docs/cli-reference.md`. The OTHER three `cdkd state` subcommands keep\n * the `--json` gate on the discriminator that page states: their flagless\n * output is a formatted human VIEW with no record-set mode behind it, not a\n * line-oriented RECORD SET. What has NOT changed is that the decision stays\n * with the command: a command whose stdout is a human surface (`cdkd deploy`,\n * `cdkd local start-api`, `cdkd local run-task`) still never calls this.\n */\nlet stdoutReservedForPayload = false;\n\n/**\n * Claim stdout for a machine-readable payload: `info` / `debug` lines route\n * to stderr for the rest of the process.\n *\n * The lines are MOVED, not dropped. An operator watching a terminal still\n * sees every status line; only the byte stream a pipe reads changes.\n */\nexport function reserveStdoutForPayload(): void {\n stdoutReservedForPayload = true;\n}\n\n/**\n * Hand stdout back. Exists for tests — the CLI runs one command per process\n * and never releases the reservation.\n */\nexport function releaseStdoutForPayload(): void {\n stdoutReservedForPayload = false;\n}\n\n/**\n * Whether {@link reserveStdoutForPayload} is in effect.\n *\n * Production callers exist, and the carve-out is narrow enough to state: a\n * writer that does NOT go through {@link ConsoleLogger} and therefore cannot\n * be routed by {@link ConsoleLogger.emit}. Today both live in\n * `src/utils/docker-cmd.ts` — `spawnStreaming`, which mirrors a child's\n * stdout live under `--verbose`, and `spawnForeground`, which hands the\n * child our fd 1 outright. Issue\n * [#2410](https://github.com/go-to-k/cdkd/issues/2410) routed both to stderr\n * while a command holds the reservation.\n *\n * The class is NOT closed, and saying so is the point: `streamLogs` in\n * `src/local/docker-runner.ts` is a third member — it pipes the CONTAINER's\n * stdout into ours on `cdkd local invoke` — and is deliberately NOT\n * converted, because unlike docker's own diagnostics a container's stdout\n * may BE what the user wants on that stream. That needs a per-caller\n * contract decision and a real-Docker integ round, tracked as\n * [#2419](https://github.com/go-to-k/cdkd/issues/2419).\n *\n * That is the ONLY shape this predicate is for. A COMMAND must never branch\n * on it — a command's own prose already flows through the logger, so\n * consulting this would be a second copy of a decision `emit` already makes,\n * and the two would drift. If you are reaching for it from a `commands/`\n * file, the answer is `reserveStdoutForPayload()` instead.\n *\n * Also used by tests, alongside {@link releaseStdoutForPayload}.\n */\nexport function isStdoutReservedForPayload(): boolean {\n return stdoutReservedForPayload;\n}\n\n/**\n * Format timestamp\n */\nfunction formatTimestamp(): string {\n const now = new Date();\n return now.toISOString();\n}\n\n/**\n * Console logger implementation\n *\n * Supports two output modes:\n * - verbose (debug level): timestamps, module prefixes, all details\n * - compact (info level): clean output without timestamps or prefixes\n */\nexport class ConsoleLogger implements Logger {\n private level: LogLevel;\n private useColors: boolean;\n\n constructor(level: LogLevel = 'info', useColors: boolean = true) {\n this.level = level;\n this.useColors = useColors;\n }\n\n private shouldLog(level: LogLevel): boolean {\n const levels: LogLevel[] = ['debug', 'info', 'warn', 'error'];\n const currentLevelIndex = levels.indexOf(this.level);\n const messageLevelIndex = levels.indexOf(level);\n return messageLevelIndex >= currentLevelIndex;\n }\n\n private formatMessage(level: LogLevel, message: string, ...args: unknown[]): string {\n const formattedArgs = args.length > 0 ? ' ' + args.map((a) => JSON.stringify(a)).join(' ') : '';\n\n // Verbose mode: full timestamps and level\n if (this.level === 'debug') {\n const timestamp = formatTimestamp();\n const levelStr = level.toUpperCase().padEnd(5);\n\n if (this.useColors) {\n const levelColor = {\n debug: colors.gray,\n info: colors.blue,\n warn: colors.yellow,\n error: colors.red,\n }[level];\n\n return `${colors.dim}${timestamp}${colors.reset} ${levelColor}${levelStr}${colors.reset} ${message}${formattedArgs}`;\n }\n\n return `${timestamp} ${levelStr} ${message}${formattedArgs}`;\n }\n\n // Compact mode: clean output\n if (this.useColors) {\n if (level === 'error') {\n return `${colors.red}${message}${formattedArgs}${colors.reset}`;\n }\n if (level === 'warn') {\n return `${colors.yellow}${message}${formattedArgs}${colors.reset}`;\n }\n return `${message}${formattedArgs}`;\n }\n\n return `${message}${formattedArgs}`;\n }\n\n /**\n * Route a formatted log line. When a per-stack output buffer is active in\n * the current async context (parallel multi-stack deploy), capture the\n * line into the buffer so it can be flushed as one atomic block when the\n * stack finishes. Otherwise fall through to the live renderer / console\n * as before.\n *\n * `warn` / `error` already go to stderr via `console.warn` / `console.error`.\n * `info` / `debug` go to stdout — and JOIN them on stderr while\n * {@link stdoutReservedForPayload} is set, so the reserving command's payload\n * is the only thing on stdout.\n *\n * KNOWN GAP, latent and deliberately not restructured (issues\n * [#2230](https://github.com/go-to-k/cdkd/issues/2230) and\n * [#2410](https://github.com/go-to-k/cdkd/issues/2410)): the stack-output\n * buffer short-circuits ABOVE the reservation check, so a line captured under\n * `runStackBuffered` is replayed by whatever flushes the buffer and never\n * consults the reservation at all. Unreachable today — `deploy.ts`'s\n * `runStackBuffered` call is the only thing that opens a buffer, and `deploy`\n * reserves nothing (its stdout is a human surface). A bare line number here\n * would go stale on the next edit to that file with nothing noticing, so it\n * is named by symbol instead. Because the path is unreachable, a fix would\n * be untestable and would have to guess where the flush should route.\n *\n * That rationale survives #2410 unchanged, and it is worth restating WHY,\n * because #2410 widened the reserving population from a `--json`-only set to\n * one that includes commands with no flag at all. The four it added —\n * `cdkd synth`, `cdkd list`, `cdkd local invoke`,\n * `cdkd local invoke-agentcore` — and the fifth issue\n * [#2435](https://github.com/go-to-k/cdkd/issues/2435) then added,\n * `cdkd state list`, run NO work inside `runStackBuffered`:\n * buffering exists for the parallel multi-stack deploy path, which none of\n * them enters. So the gap stays latent, and the condition for it becoming\n * REAL is unchanged in substance but wider in reach: it is no longer \"a\n * `--json` command runs work inside `runStackBuffered`\" but \"ANY reserving\n * command does\". Whoever does that must route the flush, not just call\n * {@link reserveStdoutForPayload}.\n */\n private emit(level: LogLevel, formatted: string): void {\n const buffer = getCurrentStackOutputBuffer();\n if (buffer) {\n buffer.lines.push(formatted);\n return;\n }\n getLiveRenderer().printAbove(() => {\n if (level === 'error') console.error(formatted);\n else if (level === 'warn') console.warn(formatted);\n else if (stdoutReservedForPayload) console.error(formatted);\n else if (level === 'info') console.info(formatted);\n else console.debug(formatted);\n });\n }\n\n debug(message: string, ...args: unknown[]): void {\n if (this.shouldLog('debug')) {\n this.emit('debug', this.formatMessage('debug', message, ...args));\n }\n }\n\n info(message: string, ...args: unknown[]): void {\n if (this.shouldLog('info')) {\n this.emit('info', this.formatMessage('info', message, ...args));\n }\n }\n\n warn(message: string, ...args: unknown[]): void {\n if (this.shouldLog('warn')) {\n this.emit('warn', this.formatMessage('warn', message, ...args));\n }\n }\n\n error(message: string, ...args: unknown[]): void {\n if (this.shouldLog('error')) {\n this.emit('error', this.formatMessage('error', message, ...args));\n }\n }\n\n /**\n * Set log level\n */\n setLevel(level: LogLevel): void {\n this.level = level;\n }\n\n getLevel(): LogLevel {\n return this.level;\n }\n\n /**\n * Create a child logger with a prefix\n *\n * In verbose mode, prefix is shown as [Prefix]. In compact mode, prefix is hidden.\n */\n child(prefix: string): ChildLogger {\n return new ChildLogger(prefix, this.useColors);\n }\n}\n\n/**\n * Child logger that always syncs level from global logger\n */\nclass ChildLogger extends ConsoleLogger {\n private readonly prefix: string;\n\n constructor(prefix: string, useColors: boolean) {\n super('info', useColors);\n this.prefix = prefix;\n }\n\n private syncLevel(): void {\n if (globalLogger) {\n this.setLevel(globalLogger.getLevel());\n }\n }\n\n override debug(message: string, ...args: unknown[]): void {\n this.syncLevel();\n super.debug(`[${this.prefix}] ${message}`, ...args);\n }\n\n override info(message: string, ...args: unknown[]): void {\n this.syncLevel();\n const msg = this.getLevel() === 'debug' ? `[${this.prefix}] ${message}` : message;\n super.info(msg, ...args);\n }\n\n override warn(message: string, ...args: unknown[]): void {\n this.syncLevel();\n const msg = this.getLevel() === 'debug' ? `[${this.prefix}] ${message}` : message;\n super.warn(msg, ...args);\n }\n\n override error(message: string, ...args: unknown[]): void {\n this.syncLevel();\n const msg = this.getLevel() === 'debug' ? `[${this.prefix}] ${message}` : message;\n super.error(msg, ...args);\n }\n}\n\n/**\n * Global logger instance\n */\nlet globalLogger: ConsoleLogger | null = null;\n\n/**\n * Get or create global logger\n */\nexport function getLogger(): ConsoleLogger {\n if (!globalLogger) {\n globalLogger = new ConsoleLogger();\n }\n return globalLogger;\n}\n\n/**\n * Set global logger instance\n */\nexport function setLogger(logger: ConsoleLogger): void {\n globalLogger = logger;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAiBA,MAAM,iBAAiB,IAAI,kBAA0B;AAUrD,SAAgB,cAAiB,WAAmB,IAA0C;CAC5F,OAAO,eAAe,IAAI,WAAW,EAAE;AACzC;;;;;;;;;;AAWA,SAAgB,sBAA0C;CACxD,OAAO,eAAe,SAAS;AACjC;;;;;;;;;;;;;AA4BA,MAAM,kBAAkB,IAAI,kBAA2B;AAevD,SAAgB,eAAkB,MAAe,IAA0C;CACzF,OAAO,gBAAgB,IAAI,MAAM,EAAE;AACrC;;;;;;;;AASA,SAAgB,uBAAgC;CAC9C,OAAO,gBAAgB,SAAS,KAAK;AACvC;;;;;;;;;;;;;;;;;;;AAoBA,MAAa,2BAA8C;CACzD;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;;;;;;;;;;AAoBA,MAAa,4BAA8D;CACzE,kBAAkB;CAClB,kBAAkB;CAClB,mBAAmB;CACnB,6BAA6B;CAC7B,2BAA2B;CAC3B,6CAA6C;CAC7C,4CAA4C;AAC9C;;;;;;;;;;;;;;;AAgBA,MAAa,yBAAwE;CACnF,kBAAkB,EAAE,WAAW,GAAG;CAClC,kBAAkB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