@intentius/chant-lexicon-terraform 0.124.31 → 0.124.32
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/__fixtures__/terragrunt/affected-cases.js +111 -0
- package/dist/__fixtures__/terragrunt/record.js +57 -0
- package/dist/behaviour/index.js +6 -0
- package/dist/behaviour/kinds.js +194 -0
- package/dist/behaviour/predict.js +297 -0
- package/dist/behaviour/reference-catalog.js +178 -0
- package/dist/behaviour/request.js +482 -0
- package/dist/change-set.js +234 -0
- package/dist/changed-roots.js +97 -0
- package/dist/codegen/docs-cli.js +3 -0
- package/dist/codegen/docs.js +44 -0
- package/dist/codegen/generate-cli.js +9 -0
- package/dist/codegen/generate.js +59 -0
- package/dist/codegen/package.js +43 -0
- package/dist/commands.js +106 -0
- package/dist/components/capability-plugin.d.ts +38 -2
- package/dist/components/capability-plugin.d.ts.map +1 -1
- package/dist/components/capability-plugin.js +260 -0
- package/dist/composites/terraform-adopt-op.js +152 -0
- package/dist/composites/terraform-apply-op.js +183 -0
- package/dist/composites/terraform-pin-rollout-op.js +45 -0
- package/dist/composites/terraform-watch-op.js +219 -0
- package/dist/config.js +118 -0
- package/dist/describe-resources.js +984 -0
- package/dist/generated/index.js +1 -0
- package/dist/hcl/descend.js +208 -0
- package/dist/hcl/edges.js +287 -0
- package/dist/hcl/jsonencode.js +442 -0
- package/dist/hcl/marker.js +212 -0
- package/dist/hcl/parse.js +372 -0
- package/dist/hcl/references.js +156 -0
- package/dist/hcl/roots.js +98 -0
- package/dist/hcl/suppressions.js +189 -0
- package/dist/hcl/value.js +72 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +46 -0
- package/dist/integrity.json +2 -2
- package/dist/lint/audit-catalog.js +501 -0
- package/dist/lint/audit-lineage.js +442 -0
- package/dist/lint/post-synth/blocks.js +87 -0
- package/dist/lint/post-synth/fixtures/load.js +94 -0
- package/dist/lint/post-synth/flat-attributes.js +135 -0
- package/dist/lint/post-synth/index.js +90 -0
- package/dist/lint/post-synth/module-source.js +153 -0
- package/dist/lint/post-synth/scope.js +104 -0
- package/dist/lint/post-synth/terragrunt.js +63 -0
- package/dist/lint/post-synth/tf001.js +138 -0
- package/dist/lint/post-synth/tf002.js +143 -0
- package/dist/lint/post-synth/tf003.js +60 -0
- package/dist/lint/post-synth/tf004.js +54 -0
- package/dist/lint/post-synth/tf005.js +68 -0
- package/dist/lint/post-synth/tf006.js +43 -0
- package/dist/lint/post-synth/tf007.js +66 -0
- package/dist/lint/post-synth/tf008.js +64 -0
- package/dist/lint/post-synth/tf009.js +49 -0
- package/dist/lint/post-synth/tf010.js +40 -0
- package/dist/lint/post-synth/tf011.js +38 -0
- package/dist/lint/post-synth/tf012.js +36 -0
- package/dist/lint/post-synth/tf013.js +53 -0
- package/dist/lint/post-synth/tf014.js +61 -0
- package/dist/lint/post-synth/tf015.js +62 -0
- package/dist/lint/post-synth/tf016.js +66 -0
- package/dist/lint/post-synth/tf017.js +39 -0
- package/dist/lint/post-synth/tf018.js +63 -0
- package/dist/lint/post-synth/tf019.js +60 -0
- package/dist/lint/post-synth/tf020.js +103 -0
- package/dist/lint/post-synth/tf021.js +117 -0
- package/dist/lint/post-synth/tf022.js +51 -0
- package/dist/lint/post-synth/tf024.js +62 -0
- package/dist/lint/post-synth/tf025.js +83 -0
- package/dist/lint/post-synth/tf026.js +74 -0
- package/dist/lint/post-synth/tf027.js +66 -0
- package/dist/lint/post-synth/tf028.js +83 -0
- package/dist/lint/post-synth/tf029.js +73 -0
- package/dist/lint/post-synth/tf030.js +253 -0
- package/dist/lint/post-synth/tf031.js +332 -0
- package/dist/lint/post-synth/tf032.js +201 -0
- package/dist/lint/post-synth/tf033.js +126 -0
- package/dist/lint/post-synth/tf034.js +45 -0
- package/dist/lint/post-synth/tf035.js +63 -0
- package/dist/lint/post-synth/tf036.js +97 -0
- package/dist/lint/post-synth/tf037.js +80 -0
- package/dist/lint/post-synth/tf038.js +63 -0
- package/dist/lint/post-synth/tf039.js +55 -0
- package/dist/lint/post-synth/tf040.js +67 -0
- package/dist/lint/post-synth/tf041.js +53 -0
- package/dist/lint/post-synth/tf042.js +38 -0
- package/dist/lint/post-synth/tf043.js +45 -0
- package/dist/lint/post-synth/tf044.js +45 -0
- package/dist/lint/post-synth/tf045.js +44 -0
- package/dist/lint/rules/fixtures/load.js +50 -0
- package/dist/lint/rules/index.js +4 -0
- package/dist/lint/rules/plan-before-apply.js +136 -0
- package/dist/lint/secret-shape.js +149 -0
- package/dist/live-ownership.js +57 -0
- package/dist/lsp/completions.js +95 -0
- package/dist/lsp/context.js +358 -0
- package/dist/lsp/hover.js +45 -0
- package/dist/lsp/option-keys.js +93 -0
- package/dist/manifest.json +1 -1
- package/dist/op/activities/index.js +30 -0
- package/dist/op/activities/live-detect.js +143 -0
- package/dist/op/activities/pin-rollout.js +45 -0
- package/dist/op/activities/terraform.js +1270 -0
- package/dist/op/activity-contracts.js +162 -0
- package/dist/op/adoption.js +272 -0
- package/dist/op/builders.js +125 -0
- package/dist/op/resolve-root-mode.js +77 -0
- package/dist/package-cli.js +16 -0
- package/dist/pin/edit-ts.js +76 -0
- package/dist/pin/edit.js +118 -0
- package/dist/pin/forge.js +65 -0
- package/dist/pin/index.js +16 -0
- package/dist/pin/rollout.d.ts.map +1 -1
- package/dist/pin/rollout.js +382 -0
- package/dist/pin/scan.js +287 -0
- package/dist/pin/source.js +171 -0
- package/dist/pin/waves.js +109 -0
- package/dist/plan-digest.js +67 -0
- package/dist/plugin.js +323 -0
- package/dist/serializer.js +23 -0
- package/dist/state-ownership.js +29 -0
- package/dist/terragrunt/affected.d.ts.map +1 -1
- package/dist/terragrunt/affected.js +290 -0
- package/dist/terragrunt/index.js +10 -0
- package/dist/terragrunt/mocks.js +270 -0
- package/dist/terragrunt/run.js +264 -0
- package/dist/terragrunt/units.js +195 -0
- package/dist/terragrunt/wave.js +125 -0
- package/dist/validate-cli.js +4 -0
- package/dist/validate.js +31 -0
- package/package.json +10 -10
- package/src/codegen/package.ts +2 -2
- package/src/components/capability-plugin.test.ts +97 -2
- package/src/components/capability-plugin.ts +117 -12
- package/src/components/pr-loop.tofu.test.ts +51 -11
- package/src/index.ts +1 -0
- package/src/pin/rollout.ts +2 -1
- package/src/terragrunt/affected.test.ts +11 -0
- package/src/terragrunt/affected.ts +2 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pin edit for a root chant generates (#3189): move the pin in the
|
|
3
|
+
* module declaration of its TypeScript source, not in the `.tf` a build
|
|
4
|
+
* writes from it.
|
|
5
|
+
*
|
|
6
|
+
* A module declaration in TypeScript is an object literal with the same
|
|
7
|
+
* arguments the HCL block has: a `source` string, and a `version` string
|
|
8
|
+
* beside a registry source. Any object literal whose `source` is a plain
|
|
9
|
+
* string naming the module counts, whatever function or constructor receives
|
|
10
|
+
* it. The TypeScript compiler parses the file, so a `source:` inside a
|
|
11
|
+
* comment, a template with substitutions, or another string is never a
|
|
12
|
+
* match, and the edit replaces the string literal's content only. Every other
|
|
13
|
+
* byte of the file stays as it was.
|
|
14
|
+
*
|
|
15
|
+
* It needs the TypeScript compiler, so `./index.ts` (the bundled subpath,
|
|
16
|
+
* #3421) does not import it. The rollout takes it as `editTs`.
|
|
17
|
+
*/
|
|
18
|
+
import { ts } from "@intentius/chant/lint/typescript";
|
|
19
|
+
import { movePin } from "./source.js";
|
|
20
|
+
function propertyName(name) {
|
|
21
|
+
if (ts.isIdentifier(name) || ts.isStringLiteral(name) || ts.isNoSubstitutionTemplateLiteral(name))
|
|
22
|
+
return name.text;
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
function stringInitializer(obj, key) {
|
|
26
|
+
for (const p of obj.properties) {
|
|
27
|
+
if (!ts.isPropertyAssignment(p) || propertyName(p.name) !== key)
|
|
28
|
+
continue;
|
|
29
|
+
const init = p.initializer;
|
|
30
|
+
return ts.isStringLiteral(init) || ts.isNoSubstitutionTemplateLiteral(init) ? init : "expression";
|
|
31
|
+
}
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
/** Write a value as a literal with the same quote the old one used. */
|
|
35
|
+
function quote(value, old, file) {
|
|
36
|
+
const q = old.getText(file)[0];
|
|
37
|
+
const escaped = value.replace(/\\/g, "\\\\").replaceAll(q, `\\${q}`);
|
|
38
|
+
return `${q}${q === "`" ? escaped.replace(/\$\{/g, "\\${") : escaped}${q}`;
|
|
39
|
+
}
|
|
40
|
+
/** Move `request.module`'s pin in one TypeScript file. */
|
|
41
|
+
export function editPinsInTs(text, file, request) {
|
|
42
|
+
const sf = ts.createSourceFile(file, text, ts.ScriptTarget.Latest, true, file.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS);
|
|
43
|
+
const calls = [];
|
|
44
|
+
const splices = [];
|
|
45
|
+
const visit = (node) => {
|
|
46
|
+
if (ts.isObjectLiteralExpression(node)) {
|
|
47
|
+
const source = stringInitializer(node, "source");
|
|
48
|
+
const version = stringInitializer(node, "version");
|
|
49
|
+
if (source && source !== "expression") {
|
|
50
|
+
const call = `line ${sf.getLineAndCharacterOfPosition(node.getStart(sf)).line + 1}`;
|
|
51
|
+
const move = movePin(source.text, version && version !== "expression" ? version.text : undefined, request);
|
|
52
|
+
if (move) {
|
|
53
|
+
if (version === "expression") {
|
|
54
|
+
calls.push({ outcome: "refused", reason: "version is an expression, not a string literal", file, call });
|
|
55
|
+
}
|
|
56
|
+
else if (move.outcome === "moved") {
|
|
57
|
+
if (move.source !== source.text)
|
|
58
|
+
splices.push({ start: source.getStart(sf), end: source.getEnd(), text: quote(move.source, source, sf) });
|
|
59
|
+
if (version && move.version !== undefined && move.version !== version.text)
|
|
60
|
+
splices.push({ start: version.getStart(sf), end: version.getEnd(), text: quote(move.version, version, sf) });
|
|
61
|
+
calls.push({ ...move, file, call });
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
calls.push({ ...move, file, call });
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
ts.forEachChild(node, visit);
|
|
70
|
+
};
|
|
71
|
+
visit(sf);
|
|
72
|
+
let content = text;
|
|
73
|
+
for (const s of splices.sort((a, b) => b.start - a.start))
|
|
74
|
+
content = content.slice(0, s.start) + s.text + content.slice(s.end);
|
|
75
|
+
return { content, calls };
|
|
76
|
+
}
|
package/dist/pin/edit.js
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The pin edit for hand-written HCL (#3189): move one module's pin from an old
|
|
3
|
+
* version to a new one in a `.tf` file or a `terragrunt.hcl`, and leave every
|
|
4
|
+
* other byte of the file as it was.
|
|
5
|
+
*
|
|
6
|
+
* Three steps, each one a check on the last:
|
|
7
|
+
*
|
|
8
|
+
* 1. The HCL reader (`@cdktn/hcl2json`, the parser the rest of this lexicon
|
|
9
|
+
* reads `.tf` with) parses the file. Its tree says which calls exist and
|
|
10
|
+
* what each one's `source` and `version` are: `module "<name>"` blocks in a
|
|
11
|
+
* `.tf`, and the `terraform` block's `source` in a `terragrunt.hcl`.
|
|
12
|
+
* 2. `./source.ts` decides, per call, whether it names the module and how its
|
|
13
|
+
* pin moves. `./scan.ts` finds the byte offsets of the literal to rewrite,
|
|
14
|
+
* and its unescaped content has to equal the value the reader returned, or
|
|
15
|
+
* the call is refused rather than guessed at.
|
|
16
|
+
* 3. The edited text is parsed again. Its tree has to equal the first tree
|
|
17
|
+
* with only the moved values changed. Anything else throws, and nothing is
|
|
18
|
+
* written.
|
|
19
|
+
*
|
|
20
|
+
* The parser is passed in rather than imported. It is a 1.8 MB wasm package
|
|
21
|
+
* that core loads lazily (`loadHcl2json`), and a caller that bundles this
|
|
22
|
+
* module (terragucci's `tf-rollout` stage, #3421) decides how it is loaded.
|
|
23
|
+
*/
|
|
24
|
+
import { movePin } from "./source.js";
|
|
25
|
+
import { escapeHcl, scanBlocks, unescapeHcl } from "./scan.js";
|
|
26
|
+
/** Whether a file is read as a Terragrunt configuration rather than a `.tf` file. */
|
|
27
|
+
export function isTerragruntFile(file) {
|
|
28
|
+
return file === "terragrunt.hcl" || file.endsWith("/terragrunt.hcl");
|
|
29
|
+
}
|
|
30
|
+
function attr(block, name) {
|
|
31
|
+
return block.attributes.find((a) => a.name === name);
|
|
32
|
+
}
|
|
33
|
+
/** Pair each call in the reader's tree with the block the scanner found for it. */
|
|
34
|
+
function sites(tree, blocks, terragrunt) {
|
|
35
|
+
const out = [];
|
|
36
|
+
if (terragrunt) {
|
|
37
|
+
const bodies = tree.terraform ?? [];
|
|
38
|
+
const scanned = blocks.filter((b) => b.type === "terraform" && b.labels.length === 0);
|
|
39
|
+
bodies.forEach((body, k) => {
|
|
40
|
+
if (scanned[k])
|
|
41
|
+
out.push({ call: "terraform", block: scanned[k], body });
|
|
42
|
+
});
|
|
43
|
+
return out;
|
|
44
|
+
}
|
|
45
|
+
const modules = tree.module ?? {};
|
|
46
|
+
for (const [name, bodies] of Object.entries(modules)) {
|
|
47
|
+
const scanned = blocks.filter((b) => b.type === "module" && b.labels.length === 1 && b.labels[0] === name);
|
|
48
|
+
bodies.forEach((body, k) => {
|
|
49
|
+
if (scanned[k])
|
|
50
|
+
out.push({ call: `module.${name}`, block: scanned[k], body });
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return out.sort((a, b) => a.block.start - b.block.start);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Move `request.module`'s pin in one file. Calls that name another module are
|
|
57
|
+
* left alone and not reported. A call that names the module and cannot move
|
|
58
|
+
* is reported with its reason and left as it was.
|
|
59
|
+
*/
|
|
60
|
+
export async function editPins(text, file, request, parser) {
|
|
61
|
+
const terragrunt = isTerragruntFile(file);
|
|
62
|
+
const tree = (await parser.parse(file, text));
|
|
63
|
+
const blocks = scanBlocks(text, file);
|
|
64
|
+
const calls = [];
|
|
65
|
+
const splices = [];
|
|
66
|
+
const expected = structuredClone(tree);
|
|
67
|
+
const expectedSites = sites(expected, scanBlocks(text, file), terragrunt);
|
|
68
|
+
sites(tree, blocks, terragrunt).forEach((site, index) => {
|
|
69
|
+
const source = site.body.source;
|
|
70
|
+
const version = site.body.version;
|
|
71
|
+
if (typeof source !== "string")
|
|
72
|
+
return;
|
|
73
|
+
const move = movePin(source, typeof version === "string" ? version : undefined, request);
|
|
74
|
+
if (!move)
|
|
75
|
+
return;
|
|
76
|
+
const at = { file, call: site.call };
|
|
77
|
+
if (move.outcome !== "moved") {
|
|
78
|
+
calls.push({ ...move, ...at });
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const edits = [];
|
|
82
|
+
if (move.source !== source)
|
|
83
|
+
edits.push(["source", move.source]);
|
|
84
|
+
if (move.version !== undefined && move.version !== version)
|
|
85
|
+
edits.push(["version", move.version]);
|
|
86
|
+
for (const [name] of edits) {
|
|
87
|
+
const scanned = attr(site.block, name);
|
|
88
|
+
const was = site.body[name];
|
|
89
|
+
if (!scanned?.literal || unescapeHcl(scanned.literal.raw) !== was) {
|
|
90
|
+
calls.push({ outcome: "refused", reason: `${name} is not a plain string literal, so there is no one place to write the pin`, ...at });
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
for (const [name, value] of edits) {
|
|
95
|
+
const literal = attr(site.block, name).literal;
|
|
96
|
+
splices.push({ start: literal.start, end: literal.end, text: rewriteLiteral(literal.raw, site.body[name], value) });
|
|
97
|
+
expectedSites[index].body[name] = value;
|
|
98
|
+
}
|
|
99
|
+
calls.push({ ...move, ...at });
|
|
100
|
+
});
|
|
101
|
+
let content = text;
|
|
102
|
+
for (const s of splices.sort((a, b) => b.start - a.start))
|
|
103
|
+
content = content.slice(0, s.start) + s.text + content.slice(s.end);
|
|
104
|
+
if (splices.length > 0) {
|
|
105
|
+
const reread = (await parser.parse(file, content));
|
|
106
|
+
if (JSON.stringify(reread) !== JSON.stringify(expected)) {
|
|
107
|
+
throw new Error(`${file}: the pin edit would change more than the pin, so nothing was written`);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return { content, calls };
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* The new literal content. When the old literal needed no escapes, the old
|
|
114
|
+
* value's text is replaced in place, so any spacing (`= 1.3.0`) survives.
|
|
115
|
+
*/
|
|
116
|
+
function rewriteLiteral(raw, was, value) {
|
|
117
|
+
return raw === was ? value : escapeHcl(value);
|
|
118
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a pin-bump rollout asks the forge (#3189): find a wave's pull request
|
|
3
|
+
* by its branch, open one, and read the checks on the commit a merge made.
|
|
4
|
+
*
|
|
5
|
+
* The default answers through `gh`, the way core's `proposeWorkspaceUpgrade`
|
|
6
|
+
* (#2550) opens its pull request: `gh pr list --head`, `gh pr create`, and
|
|
7
|
+
* `gh api` for the commit's check runs and statuses. A test, or a caller with
|
|
8
|
+
* its own forge client, passes a {@link PinForge} instead.
|
|
9
|
+
*
|
|
10
|
+
* None of those calls names a host. The rollout's default runner hands `gh`
|
|
11
|
+
* the job's forge or `origin`'s host (core's `ghHostEnv`, #3798), so a GitHub
|
|
12
|
+
* Enterprise Server checkout is answered by its own instance. `gh pr` speaks
|
|
13
|
+
* GraphQL, which Forgejo does not serve, so a rollout on Forgejo passes its
|
|
14
|
+
* own {@link PinForge}.
|
|
15
|
+
*/
|
|
16
|
+
const CHECK_STATE = {
|
|
17
|
+
success: "success",
|
|
18
|
+
neutral: "success",
|
|
19
|
+
skipped: "success",
|
|
20
|
+
failure: "failure",
|
|
21
|
+
cancelled: "failure",
|
|
22
|
+
timed_out: "failure",
|
|
23
|
+
action_required: "failure",
|
|
24
|
+
startup_failure: "failure",
|
|
25
|
+
stale: "failure",
|
|
26
|
+
error: "failure",
|
|
27
|
+
pending: "pending",
|
|
28
|
+
};
|
|
29
|
+
/** A {@link PinForge} over `gh`, run in `repo`. */
|
|
30
|
+
export function ghPinForge(run, repo) {
|
|
31
|
+
return {
|
|
32
|
+
async findPullRequest(branch) {
|
|
33
|
+
const out = await run("gh", ["pr", "list", "--head", branch, "--state", "all", "--limit", "1", "--json", "url,state,body,mergeCommit"], repo);
|
|
34
|
+
const list = JSON.parse(out || "[]");
|
|
35
|
+
const pr = list[0];
|
|
36
|
+
if (!pr)
|
|
37
|
+
return null;
|
|
38
|
+
const state = pr.state.toLowerCase() === "merged" ? "merged" : pr.state.toLowerCase() === "open" ? "open" : "closed";
|
|
39
|
+
return { url: pr.url, state, body: pr.body ?? "", ...(pr.mergeCommit?.oid ? { mergeCommit: pr.mergeCommit.oid } : {}) };
|
|
40
|
+
},
|
|
41
|
+
async createPullRequest({ base, head, title, body }) {
|
|
42
|
+
const out = await run("gh", ["pr", "create", "--base", base, "--head", head, "--title", title, "--body", body], repo);
|
|
43
|
+
return out.trim().split("\n").pop() ?? "";
|
|
44
|
+
},
|
|
45
|
+
async commitChecks(sha) {
|
|
46
|
+
const checks = [];
|
|
47
|
+
const runs = await run("gh", ["api", "--paginate", `repos/{owner}/{repo}/commits/${sha}/check-runs`, "--jq", ".check_runs[] | [.name, .status, (.conclusion // \"\")] | @tsv"], repo);
|
|
48
|
+
for (const line of runs.split("\n").filter(Boolean)) {
|
|
49
|
+
const [name, status, conclusion] = line.split("\t");
|
|
50
|
+
checks.push({ name: name, state: status === "completed" ? (CHECK_STATE[conclusion ?? ""] ?? "failure") : "pending" });
|
|
51
|
+
}
|
|
52
|
+
// Statuses come newest first; the first one per context is its state.
|
|
53
|
+
const statuses = await run("gh", ["api", "--paginate", `repos/{owner}/{repo}/commits/${sha}/statuses`, "--jq", ".[] | [.context, .state] | @tsv"], repo);
|
|
54
|
+
const seen = new Set();
|
|
55
|
+
for (const line of statuses.split("\n").filter(Boolean)) {
|
|
56
|
+
const [name, state] = line.split("\t");
|
|
57
|
+
if (seen.has(name))
|
|
58
|
+
continue;
|
|
59
|
+
seen.add(name);
|
|
60
|
+
checks.push({ name: name, state: CHECK_STATE[state ?? ""] ?? "pending" });
|
|
61
|
+
}
|
|
62
|
+
return checks;
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pin-bump rollouts (#3189): the pin edit, the wave plan, and the run that
|
|
3
|
+
* opens one pull request per wave.
|
|
4
|
+
*
|
|
5
|
+
* This subpath, `@intentius/chant-lexicon-terraform/pin`, bundles without the
|
|
6
|
+
* TypeScript toolchain, zod, or chant's fold, lint and codegen modules, so
|
|
7
|
+
* terragucci's `tf-rollout` stage can run it from one bundled file (#3421).
|
|
8
|
+
* `./bundle.test.ts` holds it to that. The HCL parser is passed in, and the
|
|
9
|
+
* TypeScript editor for generated roots lives in `./edit-ts.ts`, which this
|
|
10
|
+
* index does not import.
|
|
11
|
+
*/
|
|
12
|
+
export { readModulePin, movePin, moduleOf, exactVersion, isPinValue, checkPinRequest } from "./source.js";
|
|
13
|
+
export { editPins, isTerragruntFile } from "./edit.js";
|
|
14
|
+
export { planPinWaves, wavesFromChoudoufu, restrictWaves, terragruntDependencies, PinWavePlanError } from "./waves.js";
|
|
15
|
+
export { ghPinForge } from "./forge.js";
|
|
16
|
+
export { runPinRollout, renderPinRollout, pinWaveBranch } from "./rollout.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollout.d.ts","sourceRoot":"","sources":["../../src/pin/rollout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAOH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAEpF,OAAO,EAAY,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE3F,OAAO,EAAuD,KAAK,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,SAAS,CAAC;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