@intentius/chant-lexicon-terraform 0.124.56 → 0.124.57
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-plugin.d.ts","sourceRoot":"","sources":["../../src/components/capability-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4HG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAiC,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAExH,OAAO,EAIL,KAAK,iBAAiB,EACvB,MAAM,2CAA2C,CAAC;AAGnD,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACzG,OAAO,KAAK,EAAmB,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AA0BlI,OAAO,EAA0D,KAAK,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAGjH,0CAA0C;AAC1C,MAAM,WAAW,uBAAuB;IACtC,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC;IACb,iFAAiF;IACjF,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,gFAAgF;IAChF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+HAA+H;IAC/H,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yGAAyG;IACzG,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC7B,qFAAqF;IACrF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gHAAgH;IAChH,KAAK,CAAC,EAAE,kBAAkB,EAAE,CAAC;CAC9B;AAED,6FAA6F;AAC7F,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAA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,eAAO,MAAM,iBAAiB,0BAA0B,CAAC;AAEzD,iHAAiH;AACjH,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC/D,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAsFD;;;;;;;GAOG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;aAEpB,IAAI,EAAE,MAAM;IADxC,QAAQ,CAAC,SAAS,QAAQ;IAC1B,YAA4B,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAGxD;CACF;AA6DD,eAAO,MAAM,wBAAwB,EAAE,UAAU,CAAC,uBAAuB,EAAE,wBAAwB,CAwHlG,CAAC;AAEF,eAAO,MAAM,uBAAuB;aAClC,KAAK,YAAG,iBAAiB;aAEzB,KAAK,YAAG,wBAAwB,EAAE,sBAAsB;aACxD,IAAI,YAAG,gBAAgB;CACf,CAAC;AAEX,eAAO,MAAM,yBAAyB,EAAE,gBAcvC,CAAC"}
|
|
@@ -134,6 +134,7 @@ import { terraformPlanMoved } from "../exit-codes.js";
|
|
|
134
134
|
import { terraformPlanShape } from "../plan-shape.js";
|
|
135
135
|
import { plannerForBinary, terraformChangeSetPart } from "../change-set.js";
|
|
136
136
|
import { terraformDefaultLockGrain, terraformLockGrainRefusal, terraformLockRows, terraformLockRowsFromPart } from "../lock-rows.js";
|
|
137
|
+
import { rootRowKey } from "@intentius/chant/lifecycle/lock-rows";
|
|
137
138
|
import { rootTexts } from "../compose/hcl.js";
|
|
138
139
|
import { declaredVariables } from "../compose/root.js";
|
|
139
140
|
import { terraformComposeGroup } from "./compose-group.js";
|
|
@@ -530,6 +531,11 @@ export const terraformApplyCapability = {
|
|
|
530
531
|
const binary = (await rootDir(input).catch(() => undefined))?.binary;
|
|
531
532
|
return terraformLockGrainRefusal(grain, await plannerOf(input, plan), binary);
|
|
532
533
|
},
|
|
534
|
+
// The ruling for ci-products (2026-10-28): a Terraform, tofu or Terragrunt root waits for its root row on the ledger in place of
|
|
535
|
+
// the backend's lock. A choudoufu root stays on the resource grain and never asks for this row.
|
|
536
|
+
targetLockRow(input) {
|
|
537
|
+
return typeof input?.root === "string" && input.root !== "" ? { key: rootRowKey(input.root), target: input.root, address: input.root } : undefined;
|
|
538
|
+
},
|
|
533
539
|
lockRows(input, plan) {
|
|
534
540
|
const kept = plan.artifact?.lockRows;
|
|
535
541
|
if (Array.isArray(kept))
|
package/dist/integrity.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "fd96faaa2af8305a7195930eb1df376fa5a0ffe710227048d672d31630c5c344",
|
|
5
5
|
"meta.json": "ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356",
|
|
6
6
|
"types/index.d.ts": "022927e6a7b351cc4cf52d5f973f60ccd140e5810e17b32fb8868965aa1db161",
|
|
7
7
|
"rules/plan-before-apply.ts": "7c10245b2c3335253b48ee7d8b075d89f43116bde20313a5d1031b343fef1282",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"rules/tf047.ts": "bfa86f85c4c5efff297280fc2f15104d6319fa96dfc444a31829fb7353224092",
|
|
60
60
|
"skills/chant-terraform.md": "53dd11c7b289652f92fdaf2c03766abda46d8964e31fe709e8b142ced4f19c50"
|
|
61
61
|
},
|
|
62
|
-
"composite": "
|
|
62
|
+
"composite": "da933455020d701804e48e82031f7a8cc1479bc7985240575245eef3216c34c4"
|
|
63
63
|
}
|
package/dist/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-terraform",
|
|
3
|
-
"version": "0.124.
|
|
3
|
+
"version": "0.124.57",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"src/",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"access": "public"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
|
-
"@intentius/chant": "^0.124.
|
|
91
|
+
"@intentius/chant": "^0.124.57",
|
|
92
92
|
"zod": "^4.3.6"
|
|
93
93
|
},
|
|
94
94
|
"description": "terraform lexicon for chant, existing Terraform root modules as declarable entities",
|
|
@@ -153,7 +153,7 @@ import { terraformPlanMoved } from "../exit-codes";
|
|
|
153
153
|
import { terraformPlanShape } from "../plan-shape";
|
|
154
154
|
import { plannerForBinary, terraformChangeSetPart } from "../change-set";
|
|
155
155
|
import { terraformDefaultLockGrain, terraformLockGrainRefusal, terraformLockRows, terraformLockRowsFromPart } from "../lock-rows";
|
|
156
|
-
import type
|
|
156
|
+
import { rootRowKey, type LockRow } from "@intentius/chant/lifecycle/lock-rows";
|
|
157
157
|
import type { TerraformConfig } from "../config";
|
|
158
158
|
import { rootTexts } from "../compose/hcl";
|
|
159
159
|
import { declaredVariables } from "../compose/root";
|
|
@@ -610,6 +610,11 @@ export const terraformApplyCapability: Capability<TerraformApplyStepInput, Terra
|
|
|
610
610
|
const binary = (await rootDir(input).catch(() => undefined))?.binary;
|
|
611
611
|
return terraformLockGrainRefusal(grain, await plannerOf(input, plan), binary);
|
|
612
612
|
},
|
|
613
|
+
// The ruling for ci-products (2026-10-28): a Terraform, tofu or Terragrunt root waits for its root row on the ledger in place of
|
|
614
|
+
// the backend's lock. A choudoufu root stays on the resource grain and never asks for this row.
|
|
615
|
+
targetLockRow(input) {
|
|
616
|
+
return typeof input?.root === "string" && input.root !== "" ? { key: rootRowKey(input.root), target: input.root, address: input.root } : undefined;
|
|
617
|
+
},
|
|
613
618
|
lockRows(input, plan) {
|
|
614
619
|
const kept = (plan.artifact as { lockRows?: LockRow[] } | undefined)?.lockRows;
|
|
615
620
|
if (Array.isArray(kept)) return kept;
|
package/src/lock-rows.test.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { describe, expect, test } from "vitest";
|
|
7
7
|
import type { ChangeSetPart } from "@intentius/chant/change-set";
|
|
8
8
|
import { terraformDefaultLockGrain, terraformLockGrainRefusal, terraformLockRows, terraformLockRowsFromPart } from "./lock-rows";
|
|
9
|
+
import { terraformApplyCapability } from "./components/capability-plugin";
|
|
9
10
|
|
|
10
11
|
const plan = {
|
|
11
12
|
resource_changes: [
|
|
@@ -68,3 +69,10 @@ describe("the grain", () => {
|
|
|
68
69
|
expect(terraformLockGrainRefusal("repo", "tofu")).toBeUndefined();
|
|
69
70
|
});
|
|
70
71
|
});
|
|
72
|
+
|
|
73
|
+
describe("the ledger lock (ruling for ci-products 2026-10-28)", () => {
|
|
74
|
+
test("a root's target row is `root <root>`, which a Terraform, tofu or Terragrunt apply waits for", async () => {
|
|
75
|
+
expect(await terraformApplyCapability.targetLockRow!({ root: "stacks/net" } as never)).toEqual({ key: "root stacks/net", target: "stacks/net", address: "stacks/net" });
|
|
76
|
+
expect(await terraformApplyCapability.targetLockRow!({ root: "" } as never)).toBeUndefined();
|
|
77
|
+
});
|
|
78
|
+
});
|