@go-to-k/cdkd 0.285.7 → 0.285.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{asg-provider-B1EEjygi.js → asg-provider-hNkWDuAJ.js} +3 -3
- package/dist/{asg-provider-B1EEjygi.js.map → asg-provider-hNkWDuAJ.js.map} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{deploy-engine-DmWPwiyQ.js → deploy-engine-BhBR2d3w.js} +568 -17
- package/dist/deploy-engine-BhBR2d3w.js.map +1 -0
- package/dist/index.d.ts +10 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/{logger-DyTk5GeO.js → logger-Dw-3y48G.js} +23 -13
- package/dist/{logger-DyTk5GeO.js.map → logger-Dw-3y48G.js.map} +1 -1
- package/dist/{program-CjlLza5f.js → program-B9vnKc3N.js} +498 -143
- package/dist/{program-CjlLza5f.js.map → program-B9vnKc3N.js.map} +1 -1
- package/dist/{version-DlUEyyGa.js → version-BWsyP2sq.js} +2 -2
- package/dist/{version-DlUEyyGa.js.map → version-BWsyP2sq.js.map} +1 -1
- package/package.json +1 -1
- package/dist/deploy-engine-DmWPwiyQ.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -144,11 +144,15 @@ interface TemplateOutput {
|
|
|
144
144
|
interface EffectivePropertiesResult {
|
|
145
145
|
effectiveProperties?: Record<string, unknown>;
|
|
146
146
|
}
|
|
147
|
-
interface
|
|
147
|
+
interface NoEchoAttributesResult {
|
|
148
|
+
noEchoAttributes?: boolean;
|
|
149
|
+
noEchoAttributeNames?: readonly string[];
|
|
150
|
+
}
|
|
151
|
+
interface ResourceCreateResult extends EffectivePropertiesResult, NoEchoAttributesResult {
|
|
148
152
|
physicalId: string;
|
|
149
153
|
attributes?: Record<string, unknown>;
|
|
150
154
|
}
|
|
151
|
-
interface ResourceUpdateResultBase extends EffectivePropertiesResult {
|
|
155
|
+
interface ResourceUpdateResultBase extends EffectivePropertiesResult, NoEchoAttributesResult {
|
|
152
156
|
physicalId: string;
|
|
153
157
|
wasReplaced: boolean;
|
|
154
158
|
attributes?: Record<string, unknown>;
|
|
@@ -1114,6 +1118,7 @@ declare class DeployEngine {
|
|
|
1114
1118
|
private recordedImports;
|
|
1115
1119
|
private recordedOutputReads;
|
|
1116
1120
|
private perResourceSecrets;
|
|
1121
|
+
private noEchoAttributeResources;
|
|
1117
1122
|
private perResourceTemplateProps;
|
|
1118
1123
|
private outputSecrets;
|
|
1119
1124
|
private outputsTemplateSource;
|
|
@@ -1125,7 +1130,10 @@ declare class DeployEngine {
|
|
|
1125
1130
|
deploy(stackName: string, template: CloudFormationTemplate): Promise<DeployResult>;
|
|
1126
1131
|
private buildResolverContext;
|
|
1127
1132
|
private redactParametersForDiff;
|
|
1133
|
+
private rememberRecoverableMaskedOutputs;
|
|
1128
1134
|
private redactOutputs;
|
|
1135
|
+
private registerNoEchoAttributes;
|
|
1136
|
+
private refuseRedactedAttributeReads;
|
|
1129
1137
|
private redactOperationsForJournal;
|
|
1130
1138
|
private redactStateForPersist;
|
|
1131
1139
|
private withParentInfo;
|
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;EAgBA;EAcA;EAYA;EAGA;;UAMe;EAEf;EAGA;EAGA,YAAY;EAcZ,qBAAqB;EAGrB,aAAa;EAGb;EAGA,WAAW;EAmBX;EAMA;EAyBA;;UAMe;EAEf;EAGA;EAGA;EAGA;;KAMU;UAKK;EAEf;EAGA,YAAY;EAGZ;EAGA,oBAAoB;EAGpB,oBAAoB;EAGpB,kBAAkB;EAWlB,mBAAmB;;UAUJ;EAEf;EACA;EACA;;UAiFe;EAEf;EAGA;EAGA;EAGA;EAYA;;;;KC1fU,uBAAuB;KA03IvB,gBAAgB;;;UCx5IX;EASf;EAyCA;EAwBA;EA0BA;;;;UClHe;EACf;EACA;EACA,aAAa,eAAe;EAC5B,WAAW,eAAe;EAC1B,UAAU,eAAe;EACzB,aAAa;EACb,WAAW;EAWX;EACA,QAAQ;;UAMO;EACf;EACA;EACA;EACA;EACA;EACA;EAMA;;UAMe;EACf;EACA,aAAa;EACb;EACA;EACA,WAAW;EACX,iBAAiB;EACjB,eAAe;EACf;EACA;;UAMe;EACf;EACA;EAOA;EACA;IACE;;;UAgCa;EAKf,sBAAsB;;UAMP,6BAA6B;EAE5C;EAEA,aAAa;;UAOL,iCAAiC;EAEzC;EAEA;EAEA,aAAa;;KAwCH;WAGG;WAMA;;WAOA;WAaA;;KAOH,uBAAuB,2BAA2B;UAuB7C;WAQN;WAQA;;KA0DC;W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AgB,gBAChB,kBAAkB,kBAClB,SAAS,iCACT,qBACA,mBAAmB;EA+Bf,OAAO,mBAAmB,UAAU,yBAAyB,QAAQ;UA8BnE;UA0GA;UAyCA;UA8DA;UA8BA;UAkDA;UA2BA;UAkCM;UAgDA;UAsGN;UAqEM;UAqrBA;UAokBA;UA4EA;UA2BA;UA+BA;UAuCN;UA+BM;UA4CA;UAqSN;UAaA;UAmBA;UAwBA;UAyCM;UA0CA;UAwKA;UAsxCN;UA8BA;UA4BA;UAkCA;UAgCA;UAOA;UAoCA;UA4EA;UA4BM;UA6BN;UAiCA;UAmBA;UAgBA;UAwCM;UAmRN"}
|
|
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;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A;UAi0CN;UA8BA;UA4BA;UAkCA;UAgCA;UAOA;UAoCA;UA4EA;UA4BM;UA6BN;UAiCA;UAmBA;UAgBA;UAwCM;UAmRN"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as setLogger, n as getLogger, t as ConsoleLogger } from "./logger-
|
|
1
|
+
import { Br as StateError, Bt as DiffCalculator, Cr as ConfigError, Fr as ProvisioningError, Gt as TemplateParser, Hr as formatError, K as ProviderRegistry, Sr as CdkdError, Tr as DependencyError, U as IAMRoleProvider, Un as Synthesizer, Ur as isCdkdError, Vr as SynthesisError, Wr as normalizeAwsError, Wt as DagBuilder, _r as AwsClients, at as CloudControlProvider, br as setAwsClients, gr as resolveBucketRegion, hr as clearBucketRegionCache, jr as LockError, on as LockManager, pn as AssetPublisher, pr as AssemblyReader, r as DeployEngine, sn as S3StateBackend, vr as getAwsClients, xr as AssetError, yr as resetAwsClients } from "./deploy-engine-BhBR2d3w.js";
|
|
2
|
+
import { a as setLogger, n as getLogger, t as ConsoleLogger } from "./logger-Dw-3y48G.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 };
|
|
@@ -743,21 +743,29 @@ const colors = {
|
|
|
743
743
|
* subcommands) — while `cdkd diff` predates the mechanism and demotes the
|
|
744
744
|
* logger to `warn` instead, which SUPPRESSES its info-level lines rather than
|
|
745
745
|
* moving them. Do not read "every `--json` surface" as "every `--json`
|
|
746
|
-
* surface calls this".
|
|
746
|
+
* surface calls this". Of those seven, TWO no longer consult `--json` at all
|
|
747
|
+
* — see the next paragraph, which owns them.
|
|
747
748
|
*
|
|
748
749
|
* A `--json` flag is NOT what makes a stream a payload stream, though, and
|
|
749
|
-
* issue [#2410](https://github.com/go-to-k/cdkd/issues/2410)
|
|
750
|
-
*
|
|
751
|
-
*
|
|
752
|
-
*
|
|
753
|
-
* `cdkd
|
|
754
|
-
*
|
|
755
|
-
*
|
|
756
|
-
*
|
|
757
|
-
*
|
|
750
|
+
* issue [#2410](https://github.com/go-to-k/cdkd/issues/2410) plus issue
|
|
751
|
+
* [#2435](https://github.com/go-to-k/cdkd/issues/2435) are the FIVE commands
|
|
752
|
+
* where it is not involved at all: `cdkd synth` (the template), `cdkd list`
|
|
753
|
+
* in EVERY mode (the YAML and the one-id-per-line spellings, not just
|
|
754
|
+
* `--json`), `cdkd state list` in EVERY mode (the one-`Stack (region)`-
|
|
755
|
+
* per-line spelling as much as `--json`; `--long` / `--tree` are formatted
|
|
756
|
+
* views swept along, since the reservation is taken before the mode is
|
|
757
|
+
* known), `cdkd local invoke` (the function response) and `cdkd local
|
|
758
|
+
* invoke-agentcore` (the agent response). NOTE `cdkd list` AND `cdkd state
|
|
759
|
+
* list` each appear in BOTH paragraphs and are ONE call site apiece, not two:
|
|
760
|
+
* go-to-k/cdkd#2280 added both under `--json`, and go-to-k/cdkd#2410 /
|
|
761
|
+
* go-to-k/cdkd#2435 respectively made those same calls unconditional. Ten
|
|
762
|
+
* commands call this in total, not twelve. Those five call it
|
|
758
763
|
* UNCONDITIONALLY at command entry, so for them the DEFAULT human output
|
|
759
764
|
* contract is the one that moved — deliberately, and documented per command
|
|
760
|
-
* in `docs/cli-reference.md`.
|
|
765
|
+
* in `docs/cli-reference.md`. The OTHER three `cdkd state` subcommands keep
|
|
766
|
+
* the `--json` gate on the discriminator that page states: their flagless
|
|
767
|
+
* output is a formatted human VIEW with no record-set mode behind it, not a
|
|
768
|
+
* line-oriented RECORD SET. What has NOT changed is that the decision stays
|
|
761
769
|
* with the command: a command whose stdout is a human surface (`cdkd deploy`,
|
|
762
770
|
* `cdkd local start-api`, `cdkd local run-task`) still never calls this.
|
|
763
771
|
*/
|
|
@@ -884,7 +892,9 @@ var ConsoleLogger = class {
|
|
|
884
892
|
* because #2410 widened the reserving population from a `--json`-only set to
|
|
885
893
|
* one that includes commands with no flag at all. The four it added —
|
|
886
894
|
* `cdkd synth`, `cdkd list`, `cdkd local invoke`,
|
|
887
|
-
* `cdkd local invoke-agentcore` —
|
|
895
|
+
* `cdkd local invoke-agentcore` — and the fifth issue
|
|
896
|
+
* [#2435](https://github.com/go-to-k/cdkd/issues/2435) then added,
|
|
897
|
+
* `cdkd state list`, run NO work inside `runStackBuffered`:
|
|
888
898
|
* buffering exists for the parallel multi-stack deploy path, which none of
|
|
889
899
|
* them enters. So the gap stays latent, and the condition for it becoming
|
|
890
900
|
* REAL is unchanged in substance but wider in reach: it is no longer "a
|
|
@@ -988,4 +998,4 @@ function setLogger(logger) {
|
|
|
988
998
|
|
|
989
999
|
//#endregion
|
|
990
1000
|
export { withStackName as _, setLogger as a, PATTERN_B_NAME_OPTIONS as c, applyDefaultNameForFallback as d, generateResourceName as f, withSkipPrefix as g, looksLikeCdkdGeneratedName as h, reserveStdoutForPayload as i, PATTERN_B_NAME_PROPERTIES as l, getCurrentStackName as m, getLogger as n, runStackBuffered as o, generateResourceNameWithFallback as p, isStdoutReservedForPayload as r, getLiveRenderer as s, ConsoleLogger as t, PATTERN_B_RESOURCE_TYPES as u };
|
|
991
|
-
//# sourceMappingURL=logger-
|
|
1001
|
+
//# sourceMappingURL=logger-Dw-3y48G.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger-DyTk5GeO.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 * 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\".\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) is the four\n * commands where it is not involved at all: `cdkd synth` (the template),\n * `cdkd list` in EVERY mode (the YAML and the one-id-per-line spellings, not\n * just `--json`), `cdkd local invoke` (the function response) and\n * `cdkd local invoke-agentcore` (the agent response). NOTE `cdkd list`\n * appears in BOTH paragraphs and is one call site, not two: issue\n * go-to-k/cdkd#2280 added it under `--json` and issue go-to-k/cdkd#2410 made\n * that same call unconditional. Ten commands call this in total, not eleven.\n * Those four 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`. 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` — 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,EAAE,WAAW,GAAG;CAClC,mBAAmB,EAAE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AAM,SAAiB,GAAG,MAAuB;EACxD,KAAK,UAAU;EACf,MAAM,MAAM,IAAI,KAAK,OAAO,IAAI,WAAW,GAAG,IAAI;CACpD;CAEA,AAAS,KAAK,SAAiB,GAAG,MAAuB;EACvD,KAAK,UAAU;EACf,MAAM,MAAM,KAAK,SAAS,MAAM,UAAU,IAAI,KAAK,OAAO,IAAI,YAAY;EAC1E,MAAM,KAAK,KAAK,GAAG,IAAI;CACzB;CAEA,AAAS,KAAK,SAAiB,GAAG,MAAuB;EACvD,KAAK,UAAU;EACf,MAAM,MAAM,KAAK,SAAS,MAAM,UAAU,IAAI,KAAK,OAAO,IAAI,YAAY;EAC1E,MAAM,KAAK,KAAK,GAAG,IAAI;CACzB;CAEA,AAAS,MAAM,SAAiB,GAAG,MAAuB;EACxD,KAAK,UAAU;EACf,MAAM,MAAM,KAAK,SAAS,MAAM,UAAU,IAAI,KAAK,OAAO,IAAI,YAAY;EAC1E,MAAM,MAAM,KAAK,GAAG,IAAI;CAC1B;AACF;;;;AAKA,IAAI,eAAqC;;;;AAKzC,SAAgB,YAA2B;CACzC,IAAI,CAAC,cACH,eAAe,IAAI,cAAc;CAEnC,OAAO;AACT;;;;AAKA,SAAgB,UAAU,QAA6B;CACrD,eAAe;AACjB"}
|
|
1
|
+
{"version":3,"file":"logger-Dw-3y48G.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 * 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;CAC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