@intentius/chant-lexicon-terraform 0.124.87 → 0.124.89

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.
Files changed (82) hide show
  1. package/dist/action-ops.d.ts.map +1 -1
  2. package/dist/action-ops.js +3 -1
  3. package/dist/chant-floors.d.ts +30 -0
  4. package/dist/chant-floors.d.ts.map +1 -0
  5. package/dist/chant-floors.js +29 -0
  6. package/dist/components/capability-plugin.d.ts +15 -1
  7. package/dist/components/capability-plugin.d.ts.map +1 -1
  8. package/dist/components/capability-plugin.js +13 -5
  9. package/dist/components/compose-group.d.ts +5 -1
  10. package/dist/components/compose-group.d.ts.map +1 -1
  11. package/dist/components/compose-group.js +7 -4
  12. package/dist/engine-runner.d.ts +86 -0
  13. package/dist/engine-runner.d.ts.map +1 -0
  14. package/dist/engine-runner.js +134 -0
  15. package/dist/engine-timings.d.ts +249 -0
  16. package/dist/engine-timings.d.ts.map +1 -0
  17. package/dist/engine-timings.js +569 -0
  18. package/dist/integrity.json +2 -2
  19. package/dist/live-roots.d.ts +143 -0
  20. package/dist/live-roots.d.ts.map +1 -0
  21. package/dist/live-roots.js +304 -0
  22. package/dist/manifest.json +1 -1
  23. package/dist/migration-history.d.ts +105 -0
  24. package/dist/migration-history.d.ts.map +1 -0
  25. package/dist/migration-history.js +159 -0
  26. package/dist/module-catalog/index.d.ts +1 -0
  27. package/dist/module-catalog/index.d.ts.map +1 -1
  28. package/dist/module-catalog/index.js +3 -1
  29. package/dist/op/activities/live-detect.d.ts +15 -0
  30. package/dist/op/activities/live-detect.d.ts.map +1 -1
  31. package/dist/op/activities/live-detect.js +94 -0
  32. package/dist/op/activities/terraform.d.ts +1 -65
  33. package/dist/op/activities/terraform.d.ts.map +1 -1
  34. package/dist/op/activities/terraform.js +4 -54
  35. package/dist/op/command-hook.d.ts +98 -0
  36. package/dist/op/command-hook.d.ts.map +1 -0
  37. package/dist/op/command-hook.js +115 -0
  38. package/dist/registry/index.d.ts +1 -0
  39. package/dist/registry/index.d.ts.map +1 -1
  40. package/dist/registry/index.js +1 -0
  41. package/dist/state/exec.d.ts +23 -0
  42. package/dist/state/exec.d.ts.map +1 -1
  43. package/dist/state/exec.js +38 -0
  44. package/dist/state-ops.d.ts.map +1 -1
  45. package/dist/state-ops.js +3 -1
  46. package/dist/terragrunt/index.d.ts +3 -1
  47. package/dist/terragrunt/index.d.ts.map +1 -1
  48. package/dist/terragrunt/index.js +3 -1
  49. package/dist/terragrunt/place.d.ts +27 -0
  50. package/dist/terragrunt/place.d.ts.map +1 -0
  51. package/dist/terragrunt/place.js +52 -0
  52. package/dist/terragrunt/run.d.ts +23 -0
  53. package/dist/terragrunt/run.d.ts.map +1 -1
  54. package/dist/terragrunt/run.js +107 -3
  55. package/package.json +2 -2
  56. package/src/action-ops.ts +3 -1
  57. package/src/chant-floors.ts +32 -0
  58. package/src/components/capability-plugin.ts +27 -6
  59. package/src/components/compose-group.test.ts +29 -0
  60. package/src/components/compose-group.ts +12 -5
  61. package/src/components/terraform-apply-command-hook.test.ts +43 -0
  62. package/src/engine-runner.test.ts +261 -0
  63. package/src/engine-runner.ts +191 -0
  64. package/src/engine-timings.test.ts +203 -0
  65. package/src/engine-timings.ts +718 -0
  66. package/src/live-record-store.test.ts +76 -0
  67. package/src/live-roots.test.ts +80 -0
  68. package/src/live-roots.ts +347 -0
  69. package/src/migration-history.test.ts +83 -0
  70. package/src/migration-history.ts +199 -0
  71. package/src/module-catalog/index.ts +4 -1
  72. package/src/op/activities/live-detect.ts +87 -0
  73. package/src/op/activities/terraform.ts +12 -111
  74. package/src/op/command-hook.ts +189 -0
  75. package/src/registry/index.ts +1 -0
  76. package/src/state/engine-env.test.ts +18 -0
  77. package/src/state/exec.ts +38 -0
  78. package/src/state-ops.ts +3 -1
  79. package/src/terragrunt/index.ts +3 -1
  80. package/src/terragrunt/place.test.ts +42 -0
  81. package/src/terragrunt/place.ts +75 -0
  82. package/src/terragrunt/run.ts +128 -4
@@ -0,0 +1,159 @@
1
+ /**
2
+ * A state migration's history, read back from the lines chant wrote
3
+ * (chant#4910): each `finished` line of the migration's gated requests
4
+ * (`_gates/<op>/applied.jsonl` on `chant/lifecycle`, written by core's
5
+ * `runStateMigration` with `migrationFacts`), as one history line per run,
6
+ * and the revert of a migration that applied, each root back to the version
7
+ * the migration recorded before it wrote.
8
+ *
9
+ * The history line is the form terragucci's `done.jsonl` has always held,
10
+ * so a product that kept such a file before chant ran its gate reads the two
11
+ * together ({@link migrationHistory}). Besides core's facts, a finished
12
+ * line's detail may carry the product's `file_digest`, its change
13
+ * (`migration_change`, else `change`) and the migration a revert put back
14
+ * (`revert`); they are read when there.
15
+ *
16
+ * Lifted from terragucci's `finishedMigrationLines`, `migrationHistory` and
17
+ * `revertMigration` (migrate.ts), so terragucci deletes its copies and keeps
18
+ * its file's words.
19
+ */
20
+ import { MigrationError } from "./state-migration.js";
21
+ /**
22
+ * The finished lines of a migration op's `applied.jsonl` as history lines,
23
+ * oldest first. A line without a `result` is skipped (the migration threw
24
+ * before it ended), and so is a run refused under the lock, which wrote
25
+ * nothing.
26
+ */
27
+ export function finishedMigrationLines(appliedText, op) {
28
+ const out = [];
29
+ for (const l of appliedText.split("\n").map((x) => x.trim()).filter(Boolean)) {
30
+ let r;
31
+ try {
32
+ r = JSON.parse(l);
33
+ }
34
+ catch {
35
+ continue;
36
+ }
37
+ if (r.version !== 1 || r.kind !== "finished" || typeof r.gate !== "string" || typeof r.timestamp !== "string")
38
+ continue;
39
+ const d = r.detail && typeof r.detail === "object" ? r.detail : {};
40
+ if (typeof d.result !== "string" || d.result === "refused")
41
+ continue;
42
+ const str = (k) => (typeof d[k] === "string" ? d[k] : null);
43
+ const roots = (str("roots") ?? "")
44
+ .split(",")
45
+ .filter(Boolean)
46
+ .map((root) => ({
47
+ root,
48
+ location: str(`${root}.location`),
49
+ before: str(`${root}.before`),
50
+ after: str(`${root}.after`),
51
+ before_digest: str(`${root}.before_digest`),
52
+ after_digest: str(`${root}.after_digest`),
53
+ ...(str(`${root}.source`) ? { source: str(`${root}.source`), source_version: str(`${root}.source_version`) } : {}),
54
+ }));
55
+ out.push({
56
+ version: 1,
57
+ kind: "migration",
58
+ op,
59
+ gate: r.gate,
60
+ timestamp: r.timestamp,
61
+ ...(typeof r.planDigest === "string" ? { planDigest: r.planDigest } : {}),
62
+ ...(str("file_digest") ? { file_digest: str("file_digest") } : {}),
63
+ result: d.result,
64
+ ...(str("approved_by") ? { approvedBy: str("approved_by") } : {}),
65
+ change: str("migration_change") ?? str("change"),
66
+ ...(str("revert") ? { revert: str("revert") } : {}),
67
+ roots,
68
+ ...(str("error") ? { error: str("error") } : {}),
69
+ source: "finished",
70
+ });
71
+ }
72
+ return out;
73
+ }
74
+ /**
75
+ * A migration op's history as history-line text, one JSON line each: the
76
+ * product's earlier lines first, then each finished line of chant's gated
77
+ * requests. The newest line of a migration wins. `show` reads a path on
78
+ * `chant/lifecycle` as the caller wants it read (the remote ref as last
79
+ * fetched, say), answering "" for a path that is not there.
80
+ */
81
+ export function migrationHistory(show, files) {
82
+ const earlier = files.earlier ? show(files.earlier).split("\n").map((l) => l.trim()).filter(Boolean) : [];
83
+ const finished = finishedMigrationLines(show(`_gates/${files.op}/applied.jsonl`), files.op).map((l) => JSON.stringify(l));
84
+ return [...earlier, ...finished].join("\n") + "\n";
85
+ }
86
+ /** The newest line of each migration that ran its writes, by name. */
87
+ export function doneMigrations(history) {
88
+ const out = new Map();
89
+ for (const line of history.split("\n").map((l) => l.trim()).filter(Boolean)) {
90
+ try {
91
+ const r = JSON.parse(line);
92
+ if (r.kind !== "migration" || typeof r.gate !== "string" || typeof r.timestamp !== "string")
93
+ continue;
94
+ out.set(r.gate, { status: String(r.result), ...(typeof r.file_digest === "string" ? { file_digest: r.file_digest } : {}), timestamp: r.timestamp });
95
+ }
96
+ catch {
97
+ continue;
98
+ }
99
+ }
100
+ return out;
101
+ }
102
+ /** The name a revert of `name` takes. */
103
+ export const revertName = (name) => `${name}-revert`;
104
+ /**
105
+ * The revert of a migration that applied, from its newest applied line in
106
+ * `history`: each root back to the version the migration recorded before it
107
+ * wrote, from the version it recorded after (the write is refused when a
108
+ * state moved past it). A backend move, a revert, an estate retag or an
109
+ * estate adoption is not put back this way, and a root whose bucket kept no
110
+ * version cannot be put back: each throws {@link MigrationError} naming why.
111
+ * `where` names the history in the refusal; `header` are the file's comment
112
+ * lines, without their `# `.
113
+ */
114
+ export function revertMigration(name, history, options = {}) {
115
+ let line;
116
+ for (const l of history.split("\n").map((x) => x.trim()).filter(Boolean)) {
117
+ try {
118
+ const r = JSON.parse(l);
119
+ if (r.kind === "migration" && r.gate === name && r.result === "applied")
120
+ line = r;
121
+ }
122
+ catch {
123
+ continue;
124
+ }
125
+ }
126
+ if (!line)
127
+ throw new MigrationError(`chant/lifecycle records no applied migration ${name}${options.where ? `, ${options.where}` : ""}`);
128
+ if (line.change === "backends")
129
+ throw new MigrationError(`${name} moved states to new backends; put it back with a backend move the other way, which reads each state where it is now`);
130
+ if (line.change === "revert")
131
+ throw new MigrationError(`${name} is a revert; apply the migration it put back again with a new migration file`);
132
+ if (line.change === "retag")
133
+ throw new MigrationError(`${name} retagged resources between estates; put it back with a moves migration the other way`);
134
+ if (line.change === "adopt")
135
+ throw new MigrationError(`${name} adopted a state into an estate and left the state where it was; to go back, put the backend block back in place of the live block`);
136
+ const roots = Array.isArray(line.roots) ? line.roots : [];
137
+ const problems = [];
138
+ const restores = roots.map((r) => {
139
+ const root = String(r.root);
140
+ if (typeof r.location !== "string" || !/^(s3|gs|az):\/\//.test(r.location))
141
+ problems.push(`${root}: its backend keeps no versions, so there is no earlier state to put back`);
142
+ if (r.before === null && r.before_digest !== null)
143
+ problems.push(`${root}: its bucket kept no version before ${name} wrote, so there is no earlier state to put back`);
144
+ if (typeof r.after !== "string")
145
+ problems.push(`${root}: ${name} recorded no version after its write, so a later change could not be told apart`);
146
+ return { root, location: String(r.location), version_id: typeof r.before === "string" ? r.before : null, from_version_id: typeof r.after === "string" ? r.after : null };
147
+ });
148
+ if (problems.length > 0)
149
+ throw new MigrationError(`${name} cannot be put back:\n ${problems.join("\n ")}`);
150
+ const q = (v) => (v === null ? "null" : JSON.stringify(v));
151
+ const text = [
152
+ ...(options.header ?? [`Puts back the states migration ${name} wrote, to the versions it recorded before it wrote them.`]).map((h) => `# ${h}`),
153
+ `revert: ${name}`,
154
+ "restores:",
155
+ ...restores.flatMap((r) => [` - root: ${r.root}`, ` location: ${r.location}`, ` version_id: ${q(r.version_id)}`, ` from_version_id: ${q(r.from_version_id)}`]),
156
+ "",
157
+ ].join("\n");
158
+ return { name: revertName(name), restores, text };
159
+ }
@@ -1,4 +1,5 @@
1
1
  import type { StaticRow } from "./types.js";
2
+ export { MODULE_CATALOG_FLOOR } from "../chant-floors.js";
2
3
  export type { StaticRefusal, StaticRow, StaticMeasurement, StaticSource } from "./types.js";
3
4
  /** Where the vendored rows came from. */
4
5
  export declare const MODULE_CATALOG_SOURCE: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/module-catalog/index.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEzF,yCAAyC;AACzC,eAAO,MAAM,qBAAqB;aAChC,IAAI,EAAE,qBAAqB;aAC3B,IAAI;aACJ,MAAM;IACN,0CAA0C;aAC1C,IAAI;IACJ,4DAA4D;aAC5D,UAAU;IACV,4EAA4E;aAC5E,WAAW;CACH,CAAC;AAEX,qDAAqD;AACrD,eAAO,MAAM,yBAAyB,8DAA8D,CAAC;AAErG,oCAAoC;AACpC,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAEzC,qCAAqC;AACrC,eAAO,MAAM,UAAU,EAAE,SAAS,SAAS,EAAgB,CAAC;AAE5D,4EAA4E;AAC5E,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AAM,EAAE,OAAO,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAoCpG"}
@@ -14,9 +14,11 @@
14
14
  * it counts static rows only.
15
15
  *
16
16
  * This subpath, `@intentius/chant-lexicon-terraform/module-catalog`, imports
17
- * nothing but its own data, so a consumer can load it on its own.
17
+ * nothing but its own data and the lexicon's floors file (#4916), so a
18
+ * consumer can load it on its own.
18
19
  */
19
20
  import { SOURCE_COMMIT, SOURCE_PATH, STATIC_MEASUREMENT, STATIC_ROWS } from "./static-tier.js";
21
+ export { MODULE_CATALOG_FLOOR } from "../chant-floors.js";
20
22
  /** Where the vendored rows came from. */
21
23
  export const MODULE_CATALOG_SOURCE = {
22
24
  repo: "INTENTIUS/choudoufu",
@@ -49,4 +49,19 @@ export interface LivePolicyVerbs {
49
49
  undeclaredUntagged?: string;
50
50
  }
51
51
  export declare function detectLivePolicyVerbs(dir: string, binary?: string): LivePolicyVerbs | undefined;
52
+ /**
53
+ * Whether the root module directory `dir` keeps its resources under
54
+ * choudoufu's live markers (chant#4910): an `estate.chdf.hcl` sidecar, or a
55
+ * `live` block in a `terraform` block, whether or not it names an estate.
56
+ */
57
+ export declare function declaresLive(dir: string, binary?: string): boolean;
58
+ /**
59
+ * Each `data "terraform_estate_outputs"` block of the root module directory
60
+ * `dir` (chant#4910): its label and the estate whose recorded outputs it
61
+ * reads. A block that names no estate as a literal is left out.
62
+ */
63
+ export declare function estateOutputReads(dir: string, binary?: string): Array<{
64
+ name: string;
65
+ estate: string;
66
+ }>;
52
67
  //# sourceMappingURL=live-detect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"live-detect.d.ts","sourceRoot":"","sources":["../../../src/op/activities/live-detect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AA2EH;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAc,GAAG,MAAM,GAAG,SAAS,CAgCtF;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,eAAe;IAC9B,+HAA+H;IAC/H,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wGAAwG;IACxG,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAc,GAAG,eAAe,GAAG,SAAS,CAgCpG"}
1
+ {"version":3,"file":"live-detect.d.ts","sourceRoot":"","sources":["../../../src/op/activities/live-detect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AA2EH;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAc,GAAG,MAAM,GAAG,SAAS,CAgCtF;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,eAAe;IAC9B,+HAA+H;IAC/H,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wGAAwG;IACxG,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAc,GAAG,eAAe,GAAG,SAAS,CAgCpG;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAc,GAAG,OAAO,CAevE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAc,GAAG,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CA2C5G"}
@@ -166,3 +166,97 @@ export function detectLivePolicyVerbs(dir, binary = "choudoufu") {
166
166
  }
167
167
  return undefined;
168
168
  }
169
+ /**
170
+ * Whether the root module directory `dir` keeps its resources under
171
+ * choudoufu's live markers (chant#4910): an `estate.chdf.hcl` sidecar, or a
172
+ * `live` block in a `terraform` block, whether or not it names an estate.
173
+ */
174
+ export function declaresLive(dir, binary = "choudoufu") {
175
+ if (existsSync(join(dir, LIVE_SIDECAR_FILENAME)))
176
+ return true;
177
+ let names;
178
+ try {
179
+ names = liveFiles(dir, binary);
180
+ }
181
+ catch {
182
+ return false;
183
+ }
184
+ return names.some((name) => {
185
+ try {
186
+ return liveBlocksOf(name, stripLineComments(name, readFileSync(join(dir, name), "utf-8"))).length > 0;
187
+ }
188
+ catch {
189
+ return false;
190
+ }
191
+ });
192
+ }
193
+ /**
194
+ * Each `data "terraform_estate_outputs"` block of the root module directory
195
+ * `dir` (chant#4910): its label and the estate whose recorded outputs it
196
+ * reads. A block that names no estate as a literal is left out.
197
+ */
198
+ export function estateOutputReads(dir, binary = "choudoufu") {
199
+ let names;
200
+ try {
201
+ names = liveFiles(dir, binary);
202
+ }
203
+ catch {
204
+ return [];
205
+ }
206
+ const out = [];
207
+ for (const name of names) {
208
+ let source;
209
+ try {
210
+ source = readFileSync(join(dir, name), "utf-8");
211
+ }
212
+ catch {
213
+ continue;
214
+ }
215
+ if (isJsonConfigFile(name)) {
216
+ let doc;
217
+ try {
218
+ doc = JSON.parse(source);
219
+ }
220
+ catch {
221
+ continue;
222
+ }
223
+ const data = [doc?.data].flat();
224
+ for (const d of data) {
225
+ const reads = d && typeof d === "object" ? d.terraform_estate_outputs : undefined;
226
+ for (const r of [reads].flat()) {
227
+ if (!r || typeof r !== "object")
228
+ continue;
229
+ for (const [label, body] of Object.entries(r)) {
230
+ const estate = [body].flat().map((b) => nonEmpty(b?.estate)).find((e) => e !== undefined);
231
+ if (estate)
232
+ out.push({ name: label, estate });
233
+ }
234
+ }
235
+ }
236
+ continue;
237
+ }
238
+ const text = stripLineComments(name, source);
239
+ for (const m of text.matchAll(/\bdata\s+"terraform_estate_outputs"\s+"([^"]+)"\s*\{/g)) {
240
+ const body = bodyAt(text, m.index + m[0].length - 1);
241
+ const estate = body === undefined ? undefined : extractEstateAttr(body);
242
+ if (estate)
243
+ out.push({ name: m[1], estate });
244
+ }
245
+ }
246
+ return out;
247
+ }
248
+ /** An HCL file's text with its `#` and `//` line comments blanked; a JSON file's as it is. */
249
+ function stripLineComments(name, source) {
250
+ return isJsonConfigFile(name) ? source : source.replace(/^\s*(#|\/\/).*$/gm, "");
251
+ }
252
+ /** The inner text of the `{ ... }` block whose opening brace is at `open`, or undefined when it never closes. */
253
+ function bodyAt(source, open) {
254
+ let depth = 0;
255
+ for (let i = open; i < source.length; i++) {
256
+ if (source[i] === "{")
257
+ depth++;
258
+ else if (source[i] === "}" && --depth === 0)
259
+ return source.slice(open + 1, i);
260
+ }
261
+ return undefined;
262
+ }
@@ -729,71 +729,7 @@ export declare function __resetChoudoufuVersionCheckForTests(): void;
729
729
  * plan document with no digest, which is what an older dev build prints.
730
730
  */
731
731
  export declare function choudoufuWavesVersionRefusal(versionOutput: string): string | undefined;
732
- /**
733
- * One engine command as a product's {@link TerraformCommandHook} sees it
734
- * before it runs (chant#4865).
735
- */
736
- export interface TerraformCommand {
737
- /** The step's root the command runs for. */
738
- root: string;
739
- /** The upstream root whose state the command reads for `root`'s `reads`, when it runs for one. */
740
- upstream?: string;
741
- /** The step method that runs it: `plan`, `run` (the apply) or `outputs`. */
742
- method: string;
743
- /** The binary, as the command line names it. */
744
- binary: string;
745
- /** The subcommand, the first argument that is not a flag: `init`, `plan`, `show`, `apply`, `output`, `workspace`, `live-plan-set`. */
746
- name: string;
747
- /** The arguments after the binary, unquoted. */
748
- args: string[];
749
- /** The command line as the shell runs it. */
750
- line: string;
751
- /** The directory it runs in. */
752
- cwd: string;
753
- /** The variables chant sets for it over the job's environment, such as `TF_IN_AUTOMATION`, `TF_WORKSPACE` and the run hook's `processEnv`. */
754
- env: Record<string, string>;
755
- }
756
- /** How a {@link TerraformCommand} came out, for the hook's `after` (chant#4865). */
757
- export interface TerraformCommandResult {
758
- /** The exit code; null when the command did not exit on its own (a signal, an abort, a spawn failure). */
759
- code: number | null;
760
- /** How long it ran, in seconds. */
761
- seconds: number;
762
- stdout: string;
763
- stderr: string;
764
- }
765
- /** What a {@link TerraformCommandHook} answers for one command (chant#4865). */
766
- export interface TerraformCommandRun {
767
- /** Variables laid over the command's own, such as a span receiver's exporter or a trace parent. */
768
- env?: Record<string, string>;
769
- /** Called once the command ends, on a failure too, before the step reads its result. */
770
- after?: (result: TerraformCommandResult) => void | Promise<void>;
771
- }
772
- /**
773
- * A product's hook around each engine command a `terraform-apply` step runs
774
- * for a root (chant#4865), `terraformApplyCapabilityWith({ onCommand })`:
775
- * called before the command with what it is, and its answer's `after` once
776
- * it ends. terragucci times each root's plan and apply with it and sets its
777
- * span receiver's variables, as its own runs of the binary did.
778
- */
779
- export type TerraformCommandHook = (command: TerraformCommand) => TerraformCommandRun | void | Promise<TerraformCommandRun | void>;
780
- /** The hook, and the root and method it is for, that the commands run in an async call see (chant#4865). */
781
- interface CommandScope {
782
- hook: TerraformCommandHook;
783
- root: string;
784
- upstream?: string;
785
- method: string;
786
- }
787
- /**
788
- * Run `fn` with every engine command it runs going through `hook`, as
789
- * commands for `scope.root` (chant#4865). Inside another scope, a field this
790
- * one leaves out (`upstream`) is not kept from the outer.
791
- */
792
- export declare function withTerraformCommandHook<T>(hook: TerraformCommandHook | undefined, scope: Omit<CommandScope, "hook">, fn: () => Promise<T>): Promise<T>;
793
- /** Run `fn` with the commands it runs marked as a read of `upstream`'s state for the scope's root (chant#4865). Outside a scope, `fn` as it is. */
794
- export declare function asUpstreamCommands<T>(upstream: string, fn: () => Promise<T>): Promise<T>;
795
- /** The words of a command line the builders here wrote: plain words, and `quoteArg`'s single-quoted ones. */
796
- export declare function commandWords(line: string): string[];
732
+ export { asUpstreamCommands, commandWords, withTerraformCommandHook, type TerraformCommand, type TerraformCommandHook, type TerraformCommandResult, type TerraformCommandRun, } from "../command-hook.js";
797
733
  /**
798
734
  * `terraform init` in the named root, with the root's `backendConfigFiles` and
799
735
  * `backendConfig` supplied as `-backend-config` flags. Uses the longInfra profile: init downloads
@@ -1 +1 @@
1
- {"version":3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;IACd,kDAAkD;IAClD,GAAG,EAAE,MAAM,CAAC;CACb,GACD;IACE,sGAAsG;IACtG,SAAS,EAAE,KAAK,CAAC;IACjB,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEN,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC/D,uFAAuF;IACvF,QAAQ,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,sBAAsB,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAkB9H;AAED;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,mBAAmB,EACzB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,qBAAqB,CAAC,CAkBhC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,kBAAkB,EACxB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,oBAAoB,CAAC,CA8C/B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,sBAAsB,EAC5B,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,wBAAwB,CAAC,CAuBnC"}
@@ -38,7 +38,6 @@
38
38
  * module load (`ensureChoudoufuVersion`) and refuses a binary older than
39
39
  * {@link MIN_CHOUDOUFU_VERSION}.
40
40
  */
41
- import { AsyncLocalStorage } from "node:async_hooks";
42
41
  import { exec } from "node:child_process";
43
42
  import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
44
43
  import { tmpdir } from "node:os";
@@ -50,6 +49,7 @@ import { liveReadKey, memoLiveRead } from "@intentius/chant/live-read-session";
50
49
  import { terraformPlanDigest } from "../../plan-digest.js";
51
50
  import { choudoufuSetPlanParts, plannerForBinary, terraformChangeSetPart } from "../../change-set.js";
52
51
  import { detectLiveEstate } from "./live-detect.js";
52
+ import { commandWords, currentCommandScope, scopedCommand } from "../command-hook.js";
53
53
  import { backendConfigValues } from "../../backend-config.js";
54
54
  import { lockTimeoutArgs } from "../../lock-timeout.js";
55
55
  import { coneArgs, readPlanCone } from "../../cone.js";
@@ -539,55 +539,7 @@ async function resolveRoot(args, signal) {
539
539
  projectRoot,
540
540
  };
541
541
  }
542
- /**
543
- * The command scope of the step call that runs the engine (chant#4865). An
544
- * async-local store, so each root a wave runs at once (chant#4864) sees its
545
- * own, and the activities need no hook argument threaded through.
546
- */
547
- const commandScope = new AsyncLocalStorage();
548
- /**
549
- * Run `fn` with every engine command it runs going through `hook`, as
550
- * commands for `scope.root` (chant#4865). Inside another scope, a field this
551
- * one leaves out (`upstream`) is not kept from the outer.
552
- */
553
- export function withTerraformCommandHook(hook, scope, fn) {
554
- if (!hook)
555
- return fn();
556
- return commandScope.run({ hook, ...scope }, fn);
557
- }
558
- /** Run `fn` with the commands it runs marked as a read of `upstream`'s state for the scope's root (chant#4865). Outside a scope, `fn` as it is. */
559
- export function asUpstreamCommands(upstream, fn) {
560
- const scope = commandScope.getStore();
561
- return scope ? commandScope.run({ ...scope, upstream }, fn) : fn();
562
- }
563
- /** The words of a command line the builders here wrote: plain words, and `quoteArg`'s single-quoted ones. */
564
- export function commandWords(line) {
565
- const words = [];
566
- let word;
567
- for (let i = 0; i < line.length; i++) {
568
- const c = line[i];
569
- if (c === " ") {
570
- if (word !== undefined)
571
- words.push(word);
572
- word = undefined;
573
- }
574
- else if (c === "'") {
575
- const end = line.indexOf("'", i + 1);
576
- const stop = end < 0 ? line.length : end;
577
- word = (word ?? "") + line.slice(i + 1, stop);
578
- i = stop;
579
- }
580
- else if (c === "\\" && i + 1 < line.length) {
581
- word = (word ?? "") + line[++i];
582
- }
583
- else {
584
- word = (word ?? "") + c;
585
- }
586
- }
587
- if (word !== undefined)
588
- words.push(word);
589
- return words;
590
- }
542
+ export { asUpstreamCommands, commandWords, withTerraformCommandHook, } from "../command-hook.js";
591
543
  /** Run `cmd` in `dir`, forwarding the signal so an abort kills the child. */
592
544
  function runPlain(cmd, dir, env, signal, unset = []) {
593
545
  const merged = { ...process.env, ...env };
@@ -601,15 +553,13 @@ function runPlain(cmd, dir, env, signal, unset = []) {
601
553
  * less `unset`, and its `after` with the exit code, time and output.
602
554
  */
603
555
  async function run(cmd, dir, env, signal, unset = []) {
604
- const scope = commandScope.getStore();
556
+ const scope = currentCommandScope();
605
557
  if (!scope)
606
558
  return runPlain(cmd, dir, env, signal, unset);
607
559
  const words = commandWords(cmd);
608
560
  const args = words.slice(1);
609
561
  const command = {
610
- root: scope.root,
611
- ...(scope.upstream !== undefined ? { upstream: scope.upstream } : {}),
612
- method: scope.method,
562
+ ...scopedCommand(scope),
613
563
  binary: words[0] ?? "",
614
564
  name: args.find((a) => !a.startsWith("-")) ?? "",
615
565
  args,
@@ -0,0 +1,98 @@
1
+ import type { BinaryExec } from "../state/exec.js";
2
+ /**
3
+ * One engine command as a product's {@link TerraformCommandHook} sees it
4
+ * before it runs (chant#4865).
5
+ */
6
+ export interface TerraformCommand {
7
+ /** The step's root the command runs for. */
8
+ root: string;
9
+ /** The upstream root whose state the command reads for `root`'s `reads`, when it runs for one. */
10
+ upstream?: string;
11
+ /**
12
+ * The roots a composed group's command runs for (chant#4887): a group's
13
+ * plan and apply run one engine command for all its members, in the
14
+ * composed directory. `root` is then the first of them.
15
+ */
16
+ members?: string[];
17
+ /** The step method that runs it: `plan`, `run` (the apply) or `outputs`. */
18
+ method: string;
19
+ /** The binary, as the command line names it. */
20
+ binary: string;
21
+ /** The subcommand, the first argument that is not a flag: `init`, `plan`, `show`, `apply`, `output`, `workspace`, `live-plan-set`. */
22
+ name: string;
23
+ /** The arguments after the binary, unquoted. */
24
+ args: string[];
25
+ /** The command line as the shell runs it. */
26
+ line: string;
27
+ /** The directory it runs in. */
28
+ cwd: string;
29
+ /** The variables chant sets for it over the job's environment, such as `TF_IN_AUTOMATION`, `TF_WORKSPACE` and the run hook's `processEnv`. */
30
+ env: Record<string, string>;
31
+ }
32
+ /** How a {@link TerraformCommand} came out, for the hook's `after` (chant#4865). */
33
+ export interface TerraformCommandResult {
34
+ /** The exit code; null when the command did not exit on its own (a signal, an abort, a spawn failure). */
35
+ code: number | null;
36
+ /** How long it ran, in seconds. */
37
+ seconds: number;
38
+ stdout: string;
39
+ stderr: string;
40
+ /**
41
+ * When it ran, in Unix milliseconds, for a command timed apart from its
42
+ * call (chant#4954): a Terragrunt unit's plan, from Terragrunt's run
43
+ * report, whose `after` is called once the whole wave ends. Unset, it ran
44
+ * from the hook's call to its `after`.
45
+ */
46
+ at?: {
47
+ start: number;
48
+ end: number;
49
+ };
50
+ }
51
+ /** What a {@link TerraformCommandHook} answers for one command (chant#4865). */
52
+ export interface TerraformCommandRun {
53
+ /** Variables laid over the command's own, such as a span receiver's exporter or a trace parent. */
54
+ env?: Record<string, string>;
55
+ /** Called once the command ends, on a failure too, before the step reads its result. */
56
+ after?: (result: TerraformCommandResult) => void | Promise<void>;
57
+ }
58
+ /**
59
+ * A product's hook around each engine command a `terraform-apply` step runs
60
+ * for a root (chant#4865), `terraformApplyCapabilityWith({ onCommand })`:
61
+ * called before the command with what it is, and its answer's `after` once
62
+ * it ends. terragucci times each root's plan and apply with it and sets its
63
+ * span receiver's variables, as its own runs of the binary did.
64
+ */
65
+ export type TerraformCommandHook = (command: TerraformCommand) => TerraformCommandRun | void | Promise<TerraformCommandRun | void>;
66
+ /** The hook, and the root and method it is for, that the commands run in an async call see (chant#4865). */
67
+ export interface CommandScope {
68
+ hook: TerraformCommandHook;
69
+ root: string;
70
+ upstream?: string;
71
+ /** The members of a composed group, for its commands (chant#4887). */
72
+ members?: string[];
73
+ method: string;
74
+ }
75
+ /**
76
+ * Run `fn` with every engine command it runs going through `hook`, as
77
+ * commands for `scope.root` (chant#4865). Inside another scope, a field this
78
+ * one leaves out (`upstream`, `members`) is not kept from the outer.
79
+ */
80
+ export declare function withTerraformCommandHook<T>(hook: TerraformCommandHook | undefined, scope: Omit<CommandScope, "hook">, fn: () => Promise<T>): Promise<T>;
81
+ /** Run `fn` with the commands it runs marked as a read of `upstream`'s state for the scope's root (chant#4865). Outside a scope, `fn` as it is. */
82
+ export declare function asUpstreamCommands<T>(upstream: string, fn: () => Promise<T>): Promise<T>;
83
+ /** The scope the current async call runs in, or undefined outside one. */
84
+ export declare function currentCommandScope(): CommandScope | undefined;
85
+ /** The fields of a {@link TerraformCommand} that come from the scope. */
86
+ export declare function scopedCommand(scope: CommandScope): Pick<TerraformCommand, "root" | "upstream" | "members" | "method">;
87
+ /**
88
+ * `exec` with each run going through the command hook of the step call it
89
+ * runs in (chant#4887), as the activities' own commands do: a composed
90
+ * group's `init`, `plan`, `show` and `apply`, and the `version` its estate
91
+ * check asks. The hook sees the variables the run sets over the job's
92
+ * environment, its variables are laid over the run's, and its `after` gets
93
+ * the exit code, time and output. Outside a scope, `exec` as it is.
94
+ */
95
+ export declare function hookedBinaryExec(exec: BinaryExec): BinaryExec;
96
+ /** The words of a command line the builders here wrote: plain words, and `quoteArg`'s single-quoted ones. */
97
+ export declare function commandWords(line: string): string[];
98
+ //# sourceMappingURL=command-hook.d.ts.map