@go-to-k/cdkd 0.290.46 → 0.290.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as isVersionOnlyInvocation, t as getCdkdVersion } from "./version-THOL_1Cg.js";
2
+ import { n as isVersionOnlyInvocation, t as getCdkdVersion } from "./version-DpaXQZoG.js";
3
3
 
4
4
  //#region src/cli/pipe-close-handler.ts
5
5
  /**
@@ -74,7 +74,7 @@ async function main() {
74
74
  console.log(getCdkdVersion());
75
75
  return;
76
76
  }
77
- const { buildProgram } = await import("./program-OigOAssB.js");
77
+ const { buildProgram } = await import("./program-Ct6XLmfo.js");
78
78
  const program = buildProgram();
79
79
  const args = reorderArgs(process.argv);
80
80
  await program.parseAsync(args);
@@ -1,6 +1,6 @@
1
1
  import { C as displayAwsMessage, D as truncateCodePoints, E as isPasteableIdent, S as UNRENDERABLE, T as displaySafe, d as applyDefaultNameForFallback, f as explicitNamePropertyFor, g as looksLikeCdkdGeneratedName, h as getCurrentStackName, m as generateResourceNameWithFallback, n as getLogger, p as generateResourceName, r as isStdoutReservedForPayload, s as getLiveRenderer, v as withStackName, w as displayIdent, x as STACK_REF_MAX_CODE_POINTS, y as withoutGeneratedFallbackName } from "./logger-GASr9bAF.js";
2
2
  import { a as setAssumedRoleCredentials, i as getPreAssumeEnvCredentials, n as awsClientDefaults, o as setPreAssumeEnvCredentials, r as getAssumedRoleCredentials, t as SECOND_ROLE_PUBLISH_REFUSAL } from "./aws-client-defaults-BoIxyCir.js";
3
- import { t as getCdkdVersion } from "./version-THOL_1Cg.js";
3
+ import { t as getCdkdVersion } from "./version-DpaXQZoG.js";
4
4
  import { AsyncLocalStorage } from "node:async_hooks";
5
5
  import { createHash, randomUUID } from "node:crypto";
6
6
  import { CreateBucketCommand, DeleteObjectCommand, DeleteObjectsCommand, GetBucketLocationCommand, GetBucketReplicationCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectVersionsCommand, ListObjectsV2Command, NoSuchKey, PutBucketEncryptionCommand, PutBucketPolicyCommand, PutObjectCommand, PutPublicAccessBlockCommand, S3Client, S3ServiceException } from "@aws-sdk/client-s3";
@@ -22540,11 +22540,11 @@ function refuseMalformedResourcesForDeploy(state, stackName, region) {
22540
22540
  * would mean JSON-quoting a name in the one place the text is meant to read as
22541
22541
  * English (review of go-to-k/cdkd#3190).
22542
22542
  */
22543
- function malformedRenderedContainersWarning(stackName, region, containers) {
22544
- const stack = safeStackName(stackName);
22545
- const reg = safeRegion(region);
22543
+ function malformedRenderedContainersWarning(rawStackName, rawRegion, containers) {
22544
+ const stackName = absentIfEmpty(rawStackName);
22545
+ const region = absentIfEmpty(rawRegion);
22546
22546
  const names = containers.map((name) => `'${safeIdentifier(name, SHORT_NAME_MAX_CODE_POINTS)}'`).join(", ");
22547
- return `State for ${shellQuote(stack)} (${shellQuote(reg)}) has a non-object ${names} — the record is malformed or truncated. 'Object.entries' walks a string or a list as readily as a map, so rendering one INVENTS a row per character or element. Continuing with it EMPTY: this view shows no rows there, which is not the same as the record holding none. A per-resource container is named once however many resources hold one. See the stored values with: cdkd state show ${shellQuote(stack)} --stack-region ${shellQuote(reg)} --json`;
22547
+ return `${stackClause(stackName, region)} has a non-object ${names} — the record is malformed or truncated. 'Object.entries' walks a string or a list as readily as a map, so rendering one INVENTS a row per character or element. Continuing with it EMPTY: this view shows no rows there, which is not the same as the record holding none. A per-resource container is named once however many resources hold one. See the stored values with: ` + inspectCommand(stackName, region);
22548
22548
  }
22549
22549
  /**
22550
22550
  * `''` is NOT an identity, and every renderer below treats it as one
@@ -22556,6 +22556,14 @@ function malformedRenderedContainersWarning(stackName, region, containers) {
22556
22556
  * {@link stackClause} and {@link inspectCommand}, which drop the clause and
22557
22557
  * the flag, and that is the right answer for both identifiers.
22558
22558
  *
22559
+ * Every message that renders an identity calls this and then
22560
+ * {@link stackClause} / {@link inspectCommand} rather than spelling the clause
22561
+ * and the command again (go-to-k/cdkd#3526): for a present identity those two
22562
+ * render byte-identically to what each builder used to build by hand, and for
22563
+ * an absent one they give the no-identity form and the hole template instead
22564
+ * of `<unrenderable>`. That is why the per-site note is one line — the reason
22565
+ * lives here.
22566
+ *
22559
22567
  * NORMALISE AT THE BOUNDARY. `dropRecordCommand`, `identityWithheld` and
22560
22568
  * `orphanInspectClause` each carry their own `=== ''` arm on purpose, so this
22561
22569
  * is not the module's only floor — but a floor in the SHARED helpers was tried
@@ -22662,10 +22670,10 @@ function repairMalformedOutputsForReadOnly(state) {
22662
22670
  * Identifiers are sanitized and then shell-quoted and the command is emitted
22663
22671
  * LAST and UNWRAPPED, for the reasons {@link safeIdentifier}'s note gives.
22664
22672
  */
22665
- function malformedOutputsWarning(stackName, region) {
22666
- const stack = safeStackName(stackName);
22667
- const reg = safeRegion(region);
22668
- return `State for ${shellQuote(stack)} (${shellQuote(reg)}) has no readable 'outputs' map — the record is malformed or truncated. Where the stored value is a string or a list, 'Object.entries' walks it as readily as a map, so diffing it INVENTS a REMOVE row per character or element carrying the record's own characters; where it is a number, a boolean or null, it yields no comparison at all. Continuing with it EMPTY: every output this diff resolves is reported as an ADD and no stored key is reported as a REMOVE, which is not the same as the record holding none. See the stored value with: cdkd state show ${shellQuote(stack)} --stack-region ${shellQuote(reg)} --json`;
22673
+ function malformedOutputsWarning(rawStackName, rawRegion) {
22674
+ const stackName = absentIfEmpty(rawStackName);
22675
+ const region = absentIfEmpty(rawRegion);
22676
+ return `${stackClause(stackName, region)} has no readable 'outputs' map — the record is malformed or truncated. Where the stored value is a string or a list, 'Object.entries' walks it as readily as a map, so diffing it INVENTS a REMOVE row per character or element carrying the record's own characters; where it is a number, a boolean or null, it yields no comparison at all. Continuing with it EMPTY: every output this diff resolves is reported as an ADD and no stored key is reported as a REMOVE, which is not the same as the record holding none. See the stored value with: ` + inspectCommand(stackName, region);
22669
22677
  }
22670
22678
  /**
22671
22679
  * For a command that can WRITE state: refuse the record by name instead of
@@ -22709,10 +22717,10 @@ function refuseMalformedState(state, stackName, region) {
22709
22717
  * Identifiers are sanitized and THEN shell-quoted and the command is emitted
22710
22718
  * LAST and UNWRAPPED, for the reasons {@link safeIdentifier}'s note gives.
22711
22719
  */
22712
- function malformedOutputsRefusalMessage(stackName, region) {
22713
- const stack = safeStackName(stackName);
22714
- const reg = safeRegion(region);
22715
- return `State for ${shellQuote(stack)} (${shellQuote(reg)}) has no readable 'outputs' map — the record is malformed or truncated. This command can WRITE state, so it refuses rather than continuing: it REBUILDS the bag before saving, and 'Object.entries' walks a string or a list as readily as a map, so a six-character value would be saved back as a well-formed six-key map (a null one as an empty map). That replaces the only signal anything is wrong with a legitimate-looking record, permanently — and the next deploy republishes it into the shared exports index every other stack's Fn::ImportValue resolves against. Repair or remove the record first. Inspect it with: cdkd state show ${shellQuote(stack)} --stack-region ${shellQuote(reg)} --json`;
22720
+ function malformedOutputsRefusalMessage(rawStackName, rawRegion) {
22721
+ const stackName = absentIfEmpty(rawStackName);
22722
+ const region = absentIfEmpty(rawRegion);
22723
+ return `${stackClause(stackName, region)} has no readable 'outputs' map — the record is malformed or truncated. This command can WRITE state, so it refuses rather than continuing: it REBUILDS the bag before saving, and 'Object.entries' walks a string or a list as readily as a map, so a six-character value would be saved back as a well-formed six-key map (a null one as an empty map). That replaces the only signal anything is wrong with a legitimate-looking record, permanently — and the next deploy republishes it into the shared exports index every other stack's Fn::ImportValue resolves against. Repair or remove the record first. Inspect it with: ` + inspectCommand(stackName, region);
22716
22724
  }
22717
22725
  /**
22718
22726
  * The line `ExportIndexStore`'s rebuild emits for a producer record whose
@@ -22735,10 +22743,10 @@ function malformedOutputsRefusalMessage(stackName, region) {
22735
22743
  * Identifiers are sanitized and THEN shell-quoted and the command is emitted
22736
22744
  * LAST and UNWRAPPED, for the reasons {@link safeIdentifier}'s note gives.
22737
22745
  */
22738
- function malformedExportSourceWarning(stackName, region) {
22739
- const stack = safeStackName(stackName);
22740
- const reg = safeRegion(region);
22741
- return `State for ${shellQuote(stack)} (${shellQuote(reg)}) has no readable 'outputs' map or 'exportNames' list — the record is malformed or truncated. It contributes NO exports to this region's index, which is not the same as the stack exporting none: an Fn::ImportValue of a name this stack really publishes will fail in the CONSUMER stack, naming that stack rather than this record. Continuing with the other producers — enumerating a string or a list here would instead publish one FABRICATED export per character or element. See the stored values with: cdkd state show ${shellQuote(stack)} --stack-region ${shellQuote(reg)} --json`;
22746
+ function malformedExportSourceWarning(rawStackName, rawRegion) {
22747
+ const stackName = absentIfEmpty(rawStackName);
22748
+ const region = absentIfEmpty(rawRegion);
22749
+ return `${stackClause(stackName, region)} has no readable 'outputs' map or 'exportNames' list — the record is malformed or truncated. It contributes NO exports to this region's index, which is not the same as the stack exporting none: an Fn::ImportValue of a name this stack really publishes will fail in the CONSUMER stack, naming that stack rather than this record. Continuing with the other producers — enumerating a string or a list here would instead publish one FABRICATED export per character or element. See the stored values with: ` + inspectCommand(stackName, region);
22742
22750
  }
22743
22751
  /**
22744
22752
  * The line a READ-ONLY command emits when a record's `exportNames` FIELD could
@@ -22764,10 +22772,10 @@ function malformedExportSourceWarning(stackName, region) {
22764
22772
  * Identifiers are sanitized and THEN shell-quoted and the command is emitted
22765
22773
  * LAST and UNWRAPPED, for the reasons {@link safeIdentifier}'s note gives.
22766
22774
  */
22767
- function malformedExportNamesWarning(stackName, region) {
22768
- const stack = safeStackName(stackName);
22769
- const reg = safeRegion(region);
22770
- return `State for ${shellQuote(stack)} (${shellQuote(reg)}) has an unusable 'exportNames' list — the record is malformed or truncated. It is read as an EMPTY export set, which is not the same as the record holding one: no stored key is reported as an export, so a row that should carry an '[export]' tag renders without it. Reading it as UNKNOWN instead would be worse — that falls back to the pre-v9 rule where every output name is importable. See the stored value with: cdkd state show ${shellQuote(stack)} --stack-region ${shellQuote(reg)} --json`;
22775
+ function malformedExportNamesWarning(rawStackName, rawRegion) {
22776
+ const stackName = absentIfEmpty(rawStackName);
22777
+ const region = absentIfEmpty(rawRegion);
22778
+ return `${stackClause(stackName, region)} has an unusable 'exportNames' list — the record is malformed or truncated. It is read as an EMPTY export set, which is not the same as the record holding one: no stored key is reported as an export, so a row that should carry an '[export]' tag renders without it. Reading it as UNKNOWN instead would be worse — that falls back to the pre-v9 rule where every output name is importable. See the stored value with: ` + inspectCommand(stackName, region);
22771
22779
  }
22772
22780
  /**
22773
22781
  * For a command that can WRITE state: refuse a record whose `outputs` bag
@@ -22873,10 +22881,10 @@ function repairMalformedOrphansForReadOnly(state) {
22873
22881
  * Identifiers are sanitized and THEN shell-quoted and the command is emitted
22874
22882
  * LAST and UNWRAPPED, for the reasons {@link safeIdentifier}'s note gives.
22875
22883
  */
22876
- function malformedOrphansWarning(stackName, region) {
22877
- const stack = safeStackName(stackName);
22878
- const reg = safeRegion(region);
22879
- return `State for ${shellQuote(stack)} (${shellQuote(reg)}) has no readable 'orphans' list — the record is malformed or truncated. Readers reach it on a bare '?? []' or '?.length', which admits a string, a number, a plain object and null alike: a string is WALKED, one garbage orphan per character, and the others read as no orphans at all. Continuing with it EMPTY: this view previews no adoption and names no orphan, which is NOT the same as the record holding none — resources from an earlier failed deploy may still be live in AWS. See the stored value with: cdkd state show ${shellQuote(stack)} --stack-region ${shellQuote(reg)} --json`;
22884
+ function malformedOrphansWarning(rawStackName, rawRegion) {
22885
+ const stackName = absentIfEmpty(rawStackName);
22886
+ const region = absentIfEmpty(rawRegion);
22887
+ return `${stackClause(stackName, region)} has no readable 'orphans' list — the record is malformed or truncated. Readers reach it on a bare '?? []' or '?.length', which admits a string, a number, a plain object and null alike: a string is WALKED, one garbage orphan per character, and the others read as no orphans at all. Continuing with it EMPTY: this view previews no adoption and names no orphan, which is NOT the same as the record holding none — resources from an earlier failed deploy may still be live in AWS. See the stored value with: ` + inspectCommand(stackName, region);
22880
22888
  }
22881
22889
  /**
22882
22890
  * The refusal text for a command that can WRITE the record.
@@ -22893,10 +22901,10 @@ function malformedOrphansWarning(stackName, region) {
22893
22901
  * Identifiers are sanitized and THEN shell-quoted and the command is emitted
22894
22902
  * LAST and UNWRAPPED, for the reasons {@link safeIdentifier}'s note gives.
22895
22903
  */
22896
- function malformedOrphansRefusalMessage(stackName, region) {
22897
- const stack = safeStackName(stackName);
22898
- const reg = safeRegion(region);
22899
- return `State for ${shellQuote(stack)} (${shellQuote(reg)}) has no readable 'orphans' list — the record is malformed or truncated. This command can WRITE state, so it refuses rather than continuing: a string container is WALKED one character at a time and written back as a list of character-shaped orphan records, and every other unreadable shape reads as no orphans at all — so a run would delete or adopt against a record whose evidence of resources left live in AWS by an earlier failed deploy it never read. Repair or remove the record first, and no cdkd command repairs this container: rewriting it to [] by hand discards the very evidence this refusal is protecting. Inspect the record with: cdkd state show ${shellQuote(stack)} --stack-region ${shellQuote(reg)} --json`;
22904
+ function malformedOrphansRefusalMessage(rawStackName, rawRegion) {
22905
+ const stackName = absentIfEmpty(rawStackName);
22906
+ const region = absentIfEmpty(rawRegion);
22907
+ return `${stackClause(stackName, region)} has no readable 'orphans' list — the record is malformed or truncated. This command can WRITE state, so it refuses rather than continuing: a string container is WALKED one character at a time and written back as a list of character-shaped orphan records, and every other unreadable shape reads as no orphans at all — so a run would delete or adopt against a record whose evidence of resources left live in AWS by an earlier failed deploy it never read. Repair or remove the record first, and no cdkd command repairs this container: rewriting it to [] by hand discards the very evidence this refusal is protecting. Inspect the record with: ` + inspectCommand(stackName, region);
22900
22908
  }
22901
22909
  /**
22902
22910
  * The DESTROY refusal text for this container (go-to-k/cdkd#3379 review).
@@ -22979,10 +22987,10 @@ function refuseMalformedOrphans(state, stackName, region) {
22979
22987
  * Identifiers are sanitized and THEN shell-quoted and the command is emitted
22980
22988
  * LAST and UNWRAPPED, for the reasons {@link safeIdentifier}'s note gives.
22981
22989
  */
22982
- function malformedDestroyOutputsRefusalMessage(stackName, region) {
22983
- const stack = safeStackName(stackName);
22984
- const reg = safeRegion(region);
22985
- return `State for ${shellQuote(stack)} (${shellQuote(reg)}) has no readable 'outputs' map — the record is malformed or truncated. This command DELETES state, so it refuses rather than continuing: it reads this bag to decide whether the stack might export anything, and that decision gates the cross-stack check that refuses to delete a producer another stack still imports from. A string or a list invents one export name per character or element; a null, a number or a boolean reads as 'exports nothing' and SKIPS the check entirely, deleting the record while consumers still resolve against it. Repair or remove the record first. Inspect it with: cdkd state show ${shellQuote(stack)} --stack-region ${shellQuote(reg)} --json`;
22990
+ function malformedDestroyOutputsRefusalMessage(rawStackName, rawRegion) {
22991
+ const stackName = absentIfEmpty(rawStackName);
22992
+ const region = absentIfEmpty(rawRegion);
22993
+ return `${stackClause(stackName, region)} has no readable 'outputs' map — the record is malformed or truncated. This command DELETES state, so it refuses rather than continuing: it reads this bag to decide whether the stack might export anything, and that decision gates the cross-stack check that refuses to delete a producer another stack still imports from. A string or a list invents one export name per character or element; a null, a number or a boolean reads as 'exports nothing' and SKIPS the check entirely, deleting the record while consumers still resolve against it. Repair or remove the record first. Inspect it with: ` + inspectCommand(stackName, region);
22986
22994
  }
22987
22995
  /**
22988
22996
  * For `cdkd destroy` / `cdkd state destroy`: refuse a record whose `outputs`
@@ -23021,10 +23029,10 @@ function refuseMalformedOutputsForDestroy(state, stackName, region) {
23021
23029
  * Identifiers are sanitized and THEN shell-quoted and the command is emitted
23022
23030
  * LAST and UNWRAPPED, for the reasons {@link safeIdentifier}'s note gives.
23023
23031
  */
23024
- function malformedNestedChildOutputsRefusalMessage(childStackName, region) {
23025
- const stack = safeStackName(childStackName);
23026
- const reg = safeRegion(region);
23027
- return `State for nested stack child ${shellQuote(stack)} (${shellQuote(reg)}) has no readable 'outputs' map — the record is malformed or truncated. The parent's 'Outputs.<Key>' attributes are REBUILT from this bag and persisted into the PARENT's record, and 'Object.entries' walks a string or a list as readily as a map — so a six-character value would become six fabricated parent attributes that every Fn::GetAtt against this nested stack then resolves into live AWS calls. The deploy refuses rather than fabricating them. Repair or remove the child's record first. Inspect it with: cdkd state show ${shellQuote(stack)} --stack-region ${shellQuote(reg)} --json`;
23032
+ function malformedNestedChildOutputsRefusalMessage(rawChildStackName, rawRegion) {
23033
+ const childStackName = absentIfEmpty(rawChildStackName);
23034
+ const region = absentIfEmpty(rawRegion);
23035
+ return `${stackClause(childStackName, region, "nested stack child")} has no readable 'outputs' map — the record is malformed or truncated. The parent's 'Outputs.<Key>' attributes are REBUILT from this bag and persisted into the PARENT's record, and 'Object.entries' walks a string or a list as readily as a map — so a six-character value would become six fabricated parent attributes that every Fn::GetAtt against this nested stack then resolves into live AWS calls. The deploy refuses rather than fabricating them. Repair or remove the child's record first. Inspect it with: ` + inspectCommand(childStackName, region);
23028
23036
  }
23029
23037
  /**
23030
23038
  * For the nested-stack provider: refuse a CHILD record whose `outputs` bag
@@ -23072,10 +23080,10 @@ function refuseMalformedNestedChildOutputs(state, childStackName, region) {
23072
23080
  * Identifiers are sanitized and THEN shell-quoted and the command is emitted
23073
23081
  * LAST and UNWRAPPED, for the reasons {@link safeIdentifier}'s note gives.
23074
23082
  */
23075
- function malformedLocalOutputsWarning(stackName, region) {
23076
- const stack = safeStackName(stackName);
23077
- const reg = safeRegion(region);
23078
- return `State for ${shellQuote(stack)} (${shellQuote(reg)}) has no readable 'outputs' map — the record is malformed or truncated. 'Object.entries' walks a string or a list as readily as a map, so reading it would hand this local run one FABRICATED output per character or element. Continuing with it EMPTY: every reference to an output of this record resolves to nothing and is dropped, which is not the same as the record holding none. See the stored value with: cdkd state show ${shellQuote(stack)} --stack-region ${shellQuote(reg)} --json`;
23083
+ function malformedLocalOutputsWarning(rawStackName, rawRegion) {
23084
+ const stackName = absentIfEmpty(rawStackName);
23085
+ const region = absentIfEmpty(rawRegion);
23086
+ return `${stackClause(stackName, region)} has no readable 'outputs' map — the record is malformed or truncated. 'Object.entries' walks a string or a list as readily as a map, so reading it would hand this local run one FABRICATED output per character or element. Continuing with it EMPTY: every reference to an output of this record resolves to nothing and is dropped, which is not the same as the record holding none. See the stored value with: ` + inspectCommand(stackName, region);
23079
23087
  }
23080
23088
  /** How many logical ids a `properties` message names before it says "and N more". */
23081
23089
  const NAMED_UNREADABLE_PROPERTY_BAGS = 5;
@@ -23107,10 +23115,10 @@ const NAMED_UNREADABLE_PROPERTY_BAGS = 5;
23107
23115
  * a pasted command that selects no record at all, so it is dropped for the
23108
23116
  * same reason — the call go-to-k/cdkd#3226 makes for `inspectCommand`.
23109
23117
  */
23110
- function stackClause(stackName, region) {
23118
+ function stackClause(stackName, region, kind = "") {
23111
23119
  if (stackName === void 0) return "The state record this command loaded";
23112
23120
  const where = region === void 0 ? "" : ` (${shellQuote(safeRegion(region))})`;
23113
- return `State for ${shellQuote(safeStackName(stackName))}${where}`;
23121
+ return `State for ${kind ? `${kind} ` : ""}${shellQuote(safeStackName(stackName))}${where}`;
23114
23122
  }
23115
23123
  /**
23116
23124
  * The DESTRUCTIVE remedy, built the way {@link inspectCommand} builds the
@@ -23862,10 +23870,10 @@ function repairMalformedResourceEntriesForReadOnly(state) {
23862
23870
  return unreadable;
23863
23871
  }
23864
23872
  /** The warning a caller of {@link repairMalformedResourceEntriesForReadOnly} emits. */
23865
- function malformedResourceEntriesWarning(stackName, region, logicalIds) {
23866
- const stack = safeStackName(stackName);
23867
- const reg = safeRegion(region);
23868
- return `${namedEntriesClause(stackName, region, logicalIds)} Continuing WITHOUT them: this command's output describes the remaining resources only, which is not the same as the stack holding none of these. See the stored values with: cdkd state show ${shellQuote(stack)} --stack-region ${shellQuote(reg)} --json`;
23873
+ function malformedResourceEntriesWarning(rawStackName, rawRegion, logicalIds) {
23874
+ const stackName = absentIfEmpty(rawStackName);
23875
+ const region = absentIfEmpty(rawRegion);
23876
+ return `${namedEntriesClause(stackName, region, logicalIds)} Continuing WITHOUT them: this command's output describes the remaining resources only, which is not the same as the stack holding none of these. See the stored values with: ` + inspectCommand(stackName, region);
23869
23877
  }
23870
23878
  /**
23871
23879
  * The `orphans[]` twin of {@link malformedResourceEntriesWarning}, and a
@@ -23895,13 +23903,13 @@ function malformedResourceEntriesWarning(stackName, region, logicalIds) {
23895
23903
  * `logicalId` is not a string arrives as `''` and renders as the
23896
23904
  * `UNRENDERABLE` stand-in.
23897
23905
  */
23898
- function malformedOrphanRecordsWarning(stackName, region, logicalIds) {
23899
- const stack = safeStackName(stackName);
23900
- const reg = safeRegion(region);
23906
+ function malformedOrphanRecordsWarning(rawStackName, rawRegion, logicalIds) {
23907
+ const stackName = absentIfEmpty(rawStackName);
23908
+ const region = absentIfEmpty(rawRegion);
23901
23909
  const named = logicalIds.slice(0, NAMED_UNREADABLE_ENTRIES).map((id) => displayLogicalId(id)).join(", ");
23902
23910
  const rest = logicalIds.length - NAMED_UNREADABLE_ENTRIES;
23903
23911
  const more = rest > 0 ? ` and ${rest} more` : "";
23904
- return `State for ${shellQuote(stack)} (${shellQuote(reg)}) holds ${logicalIds.length} rollback-orphan record(s) in 'orphans' that cannot be read as resources — ${named}${more} — because they are not objects, or carry no resource type. Continuing WITHOUT them: they are not previewed for adoption. These ids were read from 'orphans'; the 'resources' map carries its own warning when it is damaged too. See the stored values with: cdkd state show ${shellQuote(stack)} --stack-region ${shellQuote(reg)} --json`;
23912
+ return `${stackClause(stackName, region)} holds ${logicalIds.length} rollback-orphan record(s) in 'orphans' that cannot be read as resources — ${named}${more} — because they are not objects, or carry no resource type. Continuing WITHOUT them: they are not previewed for adoption. These ids were read from 'orphans'; the 'resources' map carries its own warning when it is damaged too. See the stored values with: ` + inspectCommand(stackName, region);
23905
23913
  }
23906
23914
  /**
23907
23915
  * The half the refusal and the warning share: what is wrong and which entries.
@@ -23910,12 +23918,10 @@ function malformedOrphanRecordsWarning(stackName, region, logicalIds) {
23910
23918
  * happens NEXT, and a second copy of the diagnosis is what drifts.
23911
23919
  */
23912
23920
  function namedEntriesClause(stackName, region, logicalIds) {
23913
- const stack = safeStackName(stackName);
23914
- const reg = safeRegion(region);
23915
23921
  const named = logicalIds.slice(0, NAMED_UNREADABLE_ENTRIES).map((id) => displayLogicalId(id)).join(", ");
23916
23922
  const rest = logicalIds.length - NAMED_UNREADABLE_ENTRIES;
23917
23923
  const more = rest > 0 ? ` and ${rest} more` : "";
23918
- return `State for ${shellQuote(stack)} (${shellQuote(reg)}) holds ${logicalIds.length} resource record(s) that cannot be read as resources — ${named}${more} — because they are not objects, or carry no resource type, so nothing can tell what AWS resource they name. The record is malformed or truncated.`;
23924
+ return `${stackClause(stackName, region)} holds ${logicalIds.length} resource record(s) that cannot be read as resources — ${named}${more} — because they are not objects, or carry no resource type, so nothing can tell what AWS resource they name. The record is malformed or truncated.`;
23919
23925
  }
23920
23926
  /**
23921
23927
  * The text {@link refuseMalformedResourceEntries} raises.
@@ -23936,10 +23942,10 @@ function namedEntriesClause(stackName, region, logicalIds) {
23936
23942
  * Exported so a test can pin the wording against the producer rather than
23937
23943
  * re-spelling it, the way the other messages here are consumed.
23938
23944
  */
23939
- function malformedResourceEntriesRefusalMessage(stackName, region, logicalIds) {
23940
- const stack = safeStackName(stackName);
23941
- const reg = safeRegion(region);
23942
- return `${namedEntriesClause(stackName, region, logicalIds)} This command can WRITE state, so it refuses rather than skipping them: saving over the record would report a clean run for entries nothing could read, and would leave the next command to fail on them with no more to go on. Nothing was locked, read from AWS or written FOR THIS STACK. Inspect it with: cdkd state show ${shellQuote(stack)} --stack-region ${shellQuote(reg)} --json`;
23945
+ function malformedResourceEntriesRefusalMessage(rawStackName, rawRegion, logicalIds) {
23946
+ const stackName = absentIfEmpty(rawStackName);
23947
+ const region = absentIfEmpty(rawRegion);
23948
+ return `${namedEntriesClause(stackName, region, logicalIds)} This command can WRITE state, so it refuses rather than skipping them: saving over the record would report a clean run for entries nothing could read, and would leave the next command to fail on them with no more to go on. Nothing was locked, read from AWS or written FOR THIS STACK. Inspect it with: ` + inspectCommand(stackName, region);
23943
23949
  }
23944
23950
 
23945
23951
  //#endregion
@@ -34613,7 +34619,7 @@ var CloudControlProvider = class {
34613
34619
  const indeterminateGuard = await this.confirmDeleteTargetIdentity(logicalId, resourceType, physicalId, context);
34614
34620
  if (context?.removeProtection === true && resourceType === "AWS::AutoScaling::AutoScalingGroup") {
34615
34621
  this.logger.debug(`Delegating protected AutoScalingGroup ${logicalId} delete to the SDK ASGProvider (Cloud Control cannot force-delete a protected ASG)`);
34616
- const { ASGProvider } = await import("./asg-provider-BL_yHnHI.js").then((n) => n.n);
34622
+ const { ASGProvider } = await import("./asg-provider-LZQSJyN2.js").then((n) => n.n);
34617
34623
  const asgProvider = new ASGProvider();
34618
34624
  return withIndeterminateGuard(await asgProvider.delete(logicalId, physicalId, resourceType, _properties, context), indeterminateGuard);
34619
34625
  }
@@ -48323,4 +48329,4 @@ var DeployEngine = class DeployEngine {
48323
48329
 
48324
48330
  //#endregion
48325
48331
  export { yellow as $, AssemblyReader as $i, safeStackName as $n, assertAssetBucketRegion as $r, requireConfigObject as $t, createPreDeleteFinalSnapshot as A, ResourceTimeoutError as Aa, resolveCaptureObservedState as Ai, malformedOutputsRefusalMessage as An, formatLockExpiry as Ar, carriesDynamicReference as At, isStatefulRecreateTargetSync as B, isMarkedNonRetryable as Ba, MIGRATE_TMP_PREFIX as Bi, refuseMalformedOrphansForDestroy as Bn, isReadableBag as Br, isSettledInstanceState as Bt, namesAnyDeclaredParameter as C, LocalInvokeBuildError as Ca, getDockerImageBySourceHash as Ci, isReadableResourceEntry as Cn, LockManager as Cr, slowCcOperationTimeoutMs as Ct, PRE_DELETE_SNAPSHOT_TYPES as D, NestedStackChildDirectDestroyError as Da, getLegacyStateBucketName as Di, malformedOrphanRecordsWarning as Dn, buildForceUnlockCommand as Dr, disableInstanceApiTermination as Dt, ATOMIC_FINAL_SNAPSHOT_TYPES as E, MalformedProducerRecordRefusalError as Ea, getDefaultStateBucketName as Ei, malformedLocalOutputsWarning as En, UNREPRODUCIBLE_LOCK_CLAUSE as Er, deleteSkipReason as Et, extractDeploymentEventError as F, SynthesisError as Fa, stateBucketExistenceConfirmed as Fi, malformedResourcesWarning as Fn, hasReadableExportSet as Fr, isImpossibleEmptyStoredAttribute as Ft, toCfnInteger as G, markRedactedCause as Ga, injectiveKeyPrefix as Gi, refuseMalformedResourcesForDestroy as Gn, stringifyValue as Gr, coerceCfnBoolean as Gt, WARM_THROUGHPUT_MEMBERS as H, isThrottlingError as Ha, uploadCfnTemplate as Hi, refuseMalformedOutputsForDestroy as Hn, orphansCarriedFrom as Hr, normalizeAwsTagsToCfn as Ht, makeSiblingClaimReader as I, formatError as Ia, warnDeprecatedNoPrefixCliFlag as Ii, malformedStateRefusalMessage as In, hasReasonlessBaselineRefusal as Ir, isNamelessDynamicReferenceError as It, bold as J, safeStringify$1 as Ja, decodeListingKey as Ji, repairMalformedOutputsForReadOnly as Jn, createAssetRedirectResolver as Jr, configIntegerRefusal as Jt, toFiniteNumber as K, retryClassificationText as Ka, producerCoordinateKey as Ki, refuseMalformedState as Kn, WorkGraph as Kr, coerceCfnInteger as Kt, planOrphanAdoption as L, isCdkdError as La, ssmResolvedValueType as Li, refuseDivergentRecordRegionForDestroy as Ln, hasUnverifiableParameterRefusal as Lr, isUnboundTemplateParameter as Lt, refusesFinalSnapshot as M, StackHasActiveImportsError as Ma, resolveStateBucketWithDefault as Mi, malformedRenderedContainersWarning as Mn, CUSTOM_RESOURCE_RESPONSE_PREFIX as Mr, cfnRefValueFromPhysicalId as Mt, unsupportedFinalSnapshotError as N, StackTerminationProtectionError as Na, resolveStateBucketWithDefaultAndSource as Ni, malformedResourceEntriesWarning as Nn, DEFAULT_STATE_PREFIX as Nr, coerceParameterTypedValue as Nt, buildFinalSnapshotIdentifier as O, PartialFailureError as Oa, resolveApp as Oi, malformedOrphansRefusalMessage as On, buildLockContentionMessage as Or, isTerminationProtectionPropagationError as Ot, makeCanonicalizePropertiesFn as P, StateError as Pa, resolveUseCdkBootstrapAssets as Pi, malformedResourcePropertiesWarning as Pn, exportNamesCarriedFrom as Pr, getAccountInfo as Pt, red as Q, derivePartitionAndUrlSuffix as Qi, safeRegion as Qn, BOOTSTRAP_MARKER_PREFIX as Qr, requireConfigArray as Qt, MULTI_REGION_RECREATE_BLOCKED_TYPES as R, normalizeAwsError as Ra, CFN_TEMPLATE_BODY_LIMIT as Ri, refuseMalformedNestedChildOutputs as Rn, importableOutputKeys as Rr, parameterTypeMayLoseSecretIdentity as Rt, computeParameterTaint as S, IntrinsicResolutionRefusalError as Sa, AssetManifestLoader as Si, hasReadableResources as Sn, scrubResourceRecord as Sr, isWaitAbandonedError as St, resourcesNamingDeclaredParameter as T, LockError as Ta, synthesisStatusMessage as Ti, malformedExportSourceWarning as Tn, rebuildClientForBucketRegion as Tr, deleteIndeterminateGuards as Tt, coerceWarmThroughput as U, isTransientServerError as Ua, CUSTOM_RESOURCE_RESPONSE_OBJECT_DESCRIPTION as Ui, refuseMalformedResourceEntries as Un, shouldRetainResource as Ur, resolveExplicitPhysicalId as Ut, renderStatefulReason as V, isRetryableTransientError as Va, findLargeInlineResources as Vi, refuseMalformedOutputs as Vn, orphansAfterRollback as Vr, WAFv2WebACLProvider as Vt, isWarmThroughputDecrease as W, markNonRetryable as Wa, injectiveKey as Wi, refuseMalformedResourcePropertiesForOrphan as Wn, AssetPublisher as Wr, assertRegionMatch as Wt, gray as X, PARTITION_TABLE as Xi, repairMalformedResourcePropertiesForReadOnly as Xn, rewriteTemplateAssetReferences as Xr, readConfigString as Xt, cyan as Y, __exportAll as Ya, expectedOwnerParam as Yi, repairMalformedResourceEntriesForReadOnly as Yn, loadPublishableAssetManifest as Yr, configStringRefusal as Yt, green as Z, canonicalizeRegion as Zi, repairMalformedResourcesForReadOnly as Zn, AssetModeResolver as Zr, replayWarn as Zt, bagHoldsSecretExpression as _, ConfigError as _a, redactDockerArgvValues as _i, UNREADABLE_ORPHANS_CONTAINER_ROW as _n, maskSecretsInError as _r, endCommandInterruptScope as _t, DeploymentEventsStore as a, nullPrototypeRecord as aa, validateAssetBucketName as ai, s3BucketDomainName as an, TemplateParser as ar, secretBearingStateKeyWarning as at, mergeNoChangeOutputs as b, DeployCancelledError as ba, escapeRegExp$1 as bi, hasReadableOrphans as bn, recoverMaskedOutput as br, startInterruptWatch as bt, replayFailedOperations as c, resolveAssemblyPath as ca, buildDockerImage as ci, s3BucketWebsiteUrl as cn, STATE_SOURCED_READBACK_RULES as cr, IAMRoleProvider as ct, updatePartialMessage as d, AwsClients as da, describeDockerExecFailure as di, applyCallerIdentityCredentials as dn, createSecretMasker as dr, ProviderRegistry as dt, failedStageNote as ea, ensureAssetStorage as ei, requireConfigString as en, findActionableSilentDrops as er, collectDeclaredOutputNames as et, updatePartialReason as f, getAwsClients as fa, describeDockerFailure as fi, callerEnvCredentials as fn, dynamicReferenceTokens as fr, wouldReturnToSdkProvider as ft, computeImplicitDeleteEdges as g, CdkdError as ga, partitionSensitiveEnv as gi, STATE_RESOURCES_MALFORMED as gn, markSameGenerationBag as gr, beginCommandInterruptScope as gt, IMPLICIT_DELETE_DEPENDENCIES as h, AssetError as ha, getDockerCmd as hi, INTRINSIC_KEYS as hn, isSingleDynamicReferenceToken as hr, maskerOrIdentity as ht, DeploymentEventsReader as i, hasPlainPrototype$1 as ia, readBootstrapMarkerBody as ii, s3BucketArn as in, DagBuilder as ir, secretBearing as it, isFinalSnapshotError as j, ResourceUpdateNotSupportedError as ja, resolveSkipPrefix as ji, malformedOutputsWarning as jn, shellQuote as jr, carriesFetchableDynamicReference as jt, ccRoutedFinalSnapshotError as k, ProvisioningError as ka, resolveAutoAssetStorage as ki, malformedOrphansWarning as kn, forceQuitRecoveryClause as kr, IntrinsicFunctionResolver as kt, replayRollback as l, clearBucketRegionCache as la, resolveDockerContextDirectory as li, applyRoleArnIfSet as ln, TEMPLATE_SOURCED_RULES as lr, collectInlinePolicyNamesManagedBySiblings as lt, maskingRetryLogger as m, setAwsClients as ma, formatDockerLoginError as mi, DiffCalculator as mn, identityKeyFor as mr, maskDeep as mt, DEFAULT_RESOURCE_WARN_AFTER_MS as n, defineOwnKey as na, isCrossRegionRedirect as ni, producerRegionsFromState as nn, describeTypeWithThrottleRetry as nr, exportAliasCollisionScrubWarning as nt, planFailedOps as o, ownValue as oa, validateContainerRepoName as oi, s3BucketDualStackDomainName as on, STATE_SOURCED_BASELINE_RULES as or, secretSafeKeyDisplay as ot, withResourceDeadline as p, resetAwsClients as pa, dockerSpawnEnvWithSensitive as pi, envCredentialsAreAssumedRole as pn, errorCauseChain as pr, createMaskedRetryLogger as pt, formatResourceLine as q, describeAwsFailure as qa, producerRecordKey as qi, repairMalformedOrphansForReadOnly as qn, buildAssetRedirectMap as qr, configBooleanRefusal as qt, DeployEngine as r, hasOwnKey as ra, parseBootstrapMarker as ri, withSharedDrainBudget as rn, withRetry as rr, isExportAliasCollision as rt, planRollback as s, renderAssemblyPathEscape as sa, buildDenyExternalAccessPolicy as si, s3BucketRegionalDomainName as sn, STATE_SOURCED_CROSS_GENERATION_RULES as sr, getCurrentResourceSecrets as st, DEFAULT_RESOURCE_TIMEOUT_MS as t, processStackMessages as ta, getBootstrapMarkerKey as ti, classifyReplaySecretRegion as tn, findSilentDropProperties as tr, collectPublishedOutputNames as tt, resolveReplacementOldType as u, resolveBucketRegion as ua, describeDockerCapturedOutput as ui, AWS_CREDENTIAL_ENV_KEYS as un, carriesSecretMask as ur, clearOnUpdateRemoval as ut, isSecretBearingReferenceString as v, CrossAccountSecretRefusalError as va, runDockerForeground as vi, UNREADABLE_RESOURCES_MAP_ROW as vn, maskSecretsInText as vr, interruptWatchListenerCount as vt, reachableDivergentParameters as w, LocalStartServiceError as wa, Synthesizer as wi, malformedExportNamesWarning as wn, S3StateBackend as wr, UNSPECIFIED_SKIP_REASON as wt, bindingSkippedOutputs as x, DynamicReferenceRegionAmbiguousError as xa, stripControlChars as xi, hasReadableOutputs as xn, redactSecretsForState as xr, CloudControlProvider as xt, keptWholeReasonText as y, DependencyError as ya, runDockerStreaming as yi, displayLogicalId as yn, recordMaskOnlyValue as yr, isInterruptedWaitError as yt, isStatefulRecreateTargetForReplace as z, withErrorHandling as za, CFN_TEMPLATE_URL_LIMIT as zi, refuseMalformedOrphans as zn, importableOutputs as zr, refStateLookupFromResource as zt };
48326
- //# sourceMappingURL=deploy-engine-BRy8S7QH.js.map
48332
+ //# sourceMappingURL=deploy-engine-DzSrzD0b.js.map