@intentius/chant-lexicon-terraform 0.80.0 → 0.81.0

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,7 +1,7 @@
1
1
  {
2
2
  "algorithm": "sha256",
3
3
  "artifacts": {
4
- "manifest.json": "d50cdb2f34e3beb02c1d213a9ba842a0b5cefe720a58392c68f5015ac25e6d89",
4
+ "manifest.json": "835f44ef66fca6500c71223d188a003cfe16f686ccd987ee5e324db5f5aa5749",
5
5
  "meta.json": "ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356",
6
6
  "types/index.d.ts": "022927e6a7b351cc4cf52d5f973f60ccd140e5810e17b32fb8868965aa1db161",
7
7
  "rules/plan-before-apply.ts": "31b1b3176799fd365b2583fe3947edd187c2a863e3dc0094ed9e91ece2464c99",
@@ -38,5 +38,5 @@
38
38
  "rules/tf029.ts": "52e02b4921a64f3f928836896b8b80682400adb50bd7a0645f3fe2e8819433c2",
39
39
  "skills/chant-terraform.md": "d9ca7b7c28aed0038ce775a3491150298492eed2858fd3651ed9bfca0e577ae8"
40
40
  },
41
- "composite": "e63ea344d94068f04c980ab438f2d76403b45041551a7131e5757991ef57c6e2"
41
+ "composite": "cd7f9cdbeb0503dc0af51fd69c48a299dd6bda865bcbc3a2701adc11aaed5b68"
42
42
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "terraform",
3
- "version": "0.80.0",
3
+ "version": "0.81.0",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "Terraform"
6
6
  }
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-terraform",
3
- "version": "0.80.0",
3
+ "version": "0.81.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "src/",
7
- "dist/"
7
+ "dist/",
8
+ "workspace-kinds.json"
8
9
  ],
9
10
  "exports": {
10
11
  ".": {
@@ -12,6 +13,7 @@
12
13
  "types": "./dist/index.d.ts",
13
14
  "default": "./src/index.ts"
14
15
  },
16
+ "./workspace-kinds": "./workspace-kinds.json",
15
17
  "./*": {
16
18
  "development": "./src/*.ts",
17
19
  "types": "./dist/*.d.ts",
@@ -55,7 +57,7 @@
55
57
  "access": "public"
56
58
  },
57
59
  "peerDependencies": {
58
- "@intentius/chant": "^0.80.0",
60
+ "@intentius/chant": "^0.81.0",
59
61
  "typescript": "^5.9.3",
60
62
  "zod": "^4.3.6"
61
63
  },
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The terraform member kind this lexicon supplies to a chant workspace
3
+ * (#2545). The kind is data in `workspace-kinds.json` at the package root,
4
+ * exported at `./workspace-kinds`; chant reads it without importing the
5
+ * lexicon.
6
+ */
7
+ import { join } from "node:path";
8
+ import { describeWorkspaceKindConformance } from "@intentius/chant-test-utils";
9
+
10
+ const main = `terraform {\n required_version = ">= 1.5.0"\n}\n\nresource "null_resource" "x" {}\n`;
11
+
12
+ describeWorkspaceKindConformance({
13
+ packageDir: join(import.meta.dirname, ".."),
14
+ scenarios: [
15
+ { name: "a root with main.tf", kind: "terraform", files: { "main.tf": main }, claims: true },
16
+ { name: "a root whose files are not named main.tf", kind: "terraform", files: { "network.tf": main, "versions.tf": "" }, claims: true },
17
+ { name: "a root that has only been planned, lock file and all", kind: "terraform", files: { "main.tf": main, ".terraform.lock.hcl": "" }, claims: true },
18
+ // chant's own precedence (500) outranks terraform's (400): no tie.
19
+ { name: "a chant project beside its .tf files", kind: "terraform", files: { "main.tf": main, "chant.config.ts": "" }, claims: true },
20
+ { name: "a directory whose modules sit one level down", kind: "terraform", files: { "modules/net/main.tf": main }, claims: false },
21
+ { name: "variable and backend files alone", kind: "terraform", files: { "terraform.tfvars": "", "backend.tfbackend": "" }, claims: false },
22
+ ],
23
+ });
@@ -0,0 +1,12 @@
1
+ {
2
+ "$comment": "Member kinds this lexicon supplies to a chant workspace (#2545). chant reads this file as data and never imports the lexicon. The probe is behold's terraform member probe, narrowed to the member's own directory.",
3
+ "schema": 1,
4
+ "kinds": [
5
+ {
6
+ "name": "terraform",
7
+ "description": "a Terraform root module, with a .tf file directly in its directory",
8
+ "precedence": 400,
9
+ "probe": { "anyFile": ["*.tf"] }
10
+ }
11
+ ]
12
+ }