@intentius/chant 0.124.96 → 0.124.98

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 (237) hide show
  1. package/dist/audit/core.d.ts +29 -0
  2. package/dist/audit/core.d.ts.map +1 -1
  3. package/dist/audit/core.js +48 -11
  4. package/dist/audit/identity.d.ts +27 -0
  5. package/dist/audit/identity.d.ts.map +1 -0
  6. package/dist/audit/identity.js +36 -0
  7. package/dist/audit/report-html.d.ts +3 -1
  8. package/dist/audit/report-html.d.ts.map +1 -1
  9. package/dist/audit/report-html.js +1 -1
  10. package/dist/audit/report-model.d.ts +16 -0
  11. package/dist/audit/report-model.d.ts.map +1 -1
  12. package/dist/audit/report-model.js +5 -1
  13. package/dist/change-set-graph.d.ts +3 -1
  14. package/dist/change-set-graph.d.ts.map +1 -1
  15. package/dist/change-set-graph.js +7 -1
  16. package/dist/change-set.d.ts +5 -2
  17. package/dist/change-set.d.ts.map +1 -1
  18. package/dist/change-set.js +6 -3
  19. package/dist/ci-agent.d.ts +17 -0
  20. package/dist/ci-agent.d.ts.map +1 -1
  21. package/dist/ci-agent.js +32 -0
  22. package/dist/ci-comment-allow.d.ts +88 -0
  23. package/dist/ci-comment-allow.d.ts.map +1 -0
  24. package/dist/ci-comment-allow.js +178 -0
  25. package/dist/ci-comment-commands.d.ts +12 -0
  26. package/dist/ci-comment-commands.d.ts.map +1 -1
  27. package/dist/ci-comment-commands.js +22 -0
  28. package/dist/ci-control.d.ts +6 -1
  29. package/dist/ci-control.d.ts.map +1 -1
  30. package/dist/ci-control.js +6 -1
  31. package/dist/ci-product.d.ts +3 -0
  32. package/dist/ci-product.d.ts.map +1 -1
  33. package/dist/ci-product.js +3 -0
  34. package/dist/cli/commands/audit.d.ts +3 -1
  35. package/dist/cli/commands/audit.d.ts.map +1 -1
  36. package/dist/cli/commands/audit.js +23 -6
  37. package/dist/cli/commands/import.d.ts +8 -1
  38. package/dist/cli/commands/import.d.ts.map +1 -1
  39. package/dist/cli/commands/import.js +31 -6
  40. package/dist/cli/handlers/agent.d.ts.map +1 -1
  41. package/dist/cli/handlers/agent.js +12 -2
  42. package/dist/cli/handlers/pr-comment.d.ts +6 -0
  43. package/dist/cli/handlers/pr-comment.d.ts.map +1 -1
  44. package/dist/cli/handlers/pr-comment.js +12 -0
  45. package/dist/cli/handlers/promote.d.ts.map +1 -1
  46. package/dist/cli/handlers/promote.js +53 -6
  47. package/dist/cli/main.d.ts.map +1 -1
  48. package/dist/cli/main.js +29 -6
  49. package/dist/cli/parse-args.d.ts.map +1 -1
  50. package/dist/cli/parse-args.js +23 -0
  51. package/dist/cli/registry.d.ts +8 -0
  52. package/dist/cli/registry.d.ts.map +1 -1
  53. package/dist/cloud-lister/mask.d.ts +30 -1
  54. package/dist/cloud-lister/mask.d.ts.map +1 -1
  55. package/dist/cloud-lister/mask.js +66 -3
  56. package/dist/components/driver.d.ts +8 -1
  57. package/dist/components/driver.d.ts.map +1 -1
  58. package/dist/components/driver.js +1 -0
  59. package/dist/components/product-pipeline.d.ts +23 -1
  60. package/dist/components/product-pipeline.d.ts.map +1 -1
  61. package/dist/components/product-pipeline.js +40 -7
  62. package/dist/components/product-plan.d.ts +20 -0
  63. package/dist/components/product-plan.d.ts.map +1 -1
  64. package/dist/components/product-plan.js +11 -1
  65. package/dist/control/applied.d.ts +8 -1
  66. package/dist/control/applied.d.ts.map +1 -1
  67. package/dist/control/applied.js +18 -2
  68. package/dist/control/dispatch.d.ts +52 -0
  69. package/dist/control/dispatch.d.ts.map +1 -1
  70. package/dist/control/dispatch.js +140 -4
  71. package/dist/control/train.d.ts +198 -0
  72. package/dist/control/train.d.ts.map +1 -0
  73. package/dist/control/train.js +294 -0
  74. package/dist/deep-observation.js +2 -2
  75. package/dist/floor-table.data.d.ts.map +1 -1
  76. package/dist/floor-table.data.js +7 -1
  77. package/dist/graph-detail.d.ts +9 -0
  78. package/dist/graph-detail.d.ts.map +1 -1
  79. package/dist/graph-detail.js +38 -13
  80. package/dist/graph-refs.d.ts +233 -3
  81. package/dist/graph-refs.d.ts.map +1 -1
  82. package/dist/graph-refs.js +106 -15
  83. package/dist/lint/post-synth.d.ts +22 -0
  84. package/dist/lint/post-synth.d.ts.map +1 -1
  85. package/dist/lint/rules/declarable-naming-convention.d.ts +12 -0
  86. package/dist/lint/rules/declarable-naming-convention.d.ts.map +1 -1
  87. package/dist/lint/rules/declarable-naming-convention.js +38 -8
  88. package/dist/lint/rules/imported-source.d.ts +20 -0
  89. package/dist/lint/rules/imported-source.d.ts.map +1 -0
  90. package/dist/lint/rules/imported-source.js +27 -0
  91. package/dist/lint/rules/no-unused-declarable.d.ts.map +1 -1
  92. package/dist/lint/rules/no-unused-declarable.js +3 -0
  93. package/dist/op/gate.d.ts +2 -0
  94. package/dist/op/gate.d.ts.map +1 -1
  95. package/dist/op/gate.js +8 -1
  96. package/dist/pr-forge-reads.d.ts +17 -0
  97. package/dist/pr-forge-reads.d.ts.map +1 -1
  98. package/dist/pr-forge-reads.js +55 -0
  99. package/dist/reconcile.d.ts +9 -0
  100. package/dist/reconcile.d.ts.map +1 -1
  101. package/dist/release-floors.d.ts +9 -1
  102. package/dist/release-floors.d.ts.map +1 -1
  103. package/dist/release-floors.js +10 -2
  104. package/dist/repo-path.d.ts +29 -0
  105. package/dist/repo-path.d.ts.map +1 -0
  106. package/dist/repo-path.js +81 -0
  107. package/dist/sensitive-key.d.ts +23 -0
  108. package/dist/sensitive-key.d.ts.map +1 -1
  109. package/dist/sensitive-key.js +37 -0
  110. package/dist/terraform/hcl2json.d.ts +7 -0
  111. package/dist/terraform/hcl2json.d.ts.map +1 -1
  112. package/dist/terraform/hcl2json.js +7 -0
  113. package/dist/wave-runtime.mjs +352 -345
  114. package/dist/workspace/catalog-edges.d.ts +147 -0
  115. package/dist/workspace/catalog-edges.d.ts.map +1 -0
  116. package/dist/workspace/catalog-edges.js +461 -0
  117. package/dist/workspace/compose-graph.d.ts +73 -3
  118. package/dist/workspace/compose-graph.d.ts.map +1 -1
  119. package/dist/workspace/declaration.d.ts +2 -0
  120. package/dist/workspace/declaration.d.ts.map +1 -1
  121. package/dist/workspace/declaration.js +1 -0
  122. package/dist/workspace/declaration.schema.json +6 -0
  123. package/dist/workspace/discover.d.ts +134 -0
  124. package/dist/workspace/discover.d.ts.map +1 -0
  125. package/dist/workspace/discover.js +372 -0
  126. package/dist/workspace/graph-cli.d.ts +20 -0
  127. package/dist/workspace/graph-cli.d.ts.map +1 -1
  128. package/dist/workspace/graph-cli.js +178 -20
  129. package/dist/workspace/graph.schema.json +195 -2
  130. package/dist/workspace/release-train.d.ts +214 -3
  131. package/dist/workspace/release-train.d.ts.map +1 -1
  132. package/dist/workspace/release-train.js +552 -16
  133. package/dist/workspace/repo-ref.d.ts +14 -0
  134. package/dist/workspace/repo-ref.d.ts.map +1 -1
  135. package/dist/workspace/repo-ref.js +26 -1
  136. package/dist/workspace/workspace-gates.d.ts +24 -0
  137. package/dist/workspace/workspace-gates.d.ts.map +1 -1
  138. package/dist/workspace/workspace-gates.js +29 -5
  139. package/dist/workspace/workspace-ledger.d.ts +31 -5
  140. package/dist/workspace/workspace-ledger.d.ts.map +1 -1
  141. package/dist/workspace/workspace-ledger.js +2 -1
  142. package/dist/workspace/workspace-run.d.ts +14 -0
  143. package/dist/workspace/workspace-run.d.ts.map +1 -1
  144. package/dist/workspace/workspace-run.js +2 -2
  145. package/dist/yaml.d.ts.map +1 -1
  146. package/dist/yaml.js +33 -8
  147. package/package.json +1 -1
  148. package/src/audit/core.test.ts +64 -1
  149. package/src/audit/core.ts +75 -10
  150. package/src/audit/identity.test.ts +31 -0
  151. package/src/audit/identity.ts +43 -0
  152. package/src/audit/report-html.ts +4 -2
  153. package/src/audit/report-model.ts +21 -1
  154. package/src/change-set-graph.test.ts +33 -1
  155. package/src/change-set-graph.ts +7 -1
  156. package/src/change-set.ts +6 -3
  157. package/src/ci-agent.test.ts +32 -0
  158. package/src/ci-agent.ts +42 -0
  159. package/src/ci-comment-allow.test.ts +380 -0
  160. package/src/ci-comment-allow.ts +184 -0
  161. package/src/ci-comment-commands.ts +25 -0
  162. package/src/ci-control.ts +42 -0
  163. package/src/ci-product.ts +3 -0
  164. package/src/cli/commands/audit-parser-notice.test.ts +74 -0
  165. package/src/cli/commands/audit.test.ts +12 -0
  166. package/src/cli/commands/audit.ts +25 -7
  167. package/src/cli/commands/import-layout.test.ts +2 -1
  168. package/src/cli/commands/import.ts +29 -6
  169. package/src/cli/handlers/agent.ts +13 -2
  170. package/src/cli/handlers/pr-before-merge.test.ts +18 -0
  171. package/src/cli/handlers/pr-comment.ts +12 -0
  172. package/src/cli/handlers/promote.test.ts +68 -0
  173. package/src/cli/handlers/promote.ts +52 -6
  174. package/src/cli/main.test.ts +5 -0
  175. package/src/cli/main.ts +29 -6
  176. package/src/cli/parse-args.ts +18 -0
  177. package/src/cli/registry.ts +8 -0
  178. package/src/cloud-lister/kubernetes.k3d.e2e.test.ts +104 -0
  179. package/src/cloud-lister/mask-references.test.ts +132 -0
  180. package/src/cloud-lister/mask.ts +68 -3
  181. package/src/components/driver.ts +9 -1
  182. package/src/components/product-pipeline.ts +57 -7
  183. package/src/components/product-plan.ts +27 -2
  184. package/src/control/applied.ts +33 -3
  185. package/src/control/dispatch.ts +156 -5
  186. package/src/control/train.test.ts +215 -0
  187. package/src/control/train.ts +413 -0
  188. package/src/deep-observation.ts +2 -2
  189. package/src/floor-table.data.ts +7 -1
  190. package/src/graph-detail.ts +37 -12
  191. package/src/graph-refs.test.ts +45 -1
  192. package/src/graph-refs.ts +321 -14
  193. package/src/lint/post-synth.ts +20 -0
  194. package/src/lint/rules/declarable-naming-convention.test.ts +35 -1
  195. package/src/lint/rules/declarable-naming-convention.ts +35 -8
  196. package/src/lint/rules/imported-source.test.ts +22 -0
  197. package/src/lint/rules/imported-source.ts +31 -0
  198. package/src/lint/rules/no-unused-declarable.test.ts +16 -0
  199. package/src/lint/rules/no-unused-declarable.ts +7 -0
  200. package/src/op/gate.ts +10 -2
  201. package/src/pr-forge-reads.ts +62 -0
  202. package/src/reconcile.ts +9 -0
  203. package/src/release-floors.ts +14 -2
  204. package/src/repo-path.test.ts +72 -0
  205. package/src/repo-path.ts +103 -0
  206. package/src/sensitive-key.ts +38 -0
  207. package/src/terraform/hcl2json.ts +8 -0
  208. package/src/workspace/application-set.e2e.test.ts +405 -0
  209. package/src/workspace/catalog-edges.ts +507 -0
  210. package/src/workspace/ci-green-workflow.test.ts +2 -2
  211. package/src/workspace/cluster-join.e2e.test.ts +150 -0
  212. package/src/workspace/compose-graph.ts +74 -5
  213. package/src/workspace/declaration.schema.json +6 -0
  214. package/src/workspace/declaration.ts +3 -0
  215. package/src/workspace/discover.e2e.test.ts +122 -0
  216. package/src/workspace/discover.test.ts +225 -0
  217. package/src/workspace/discover.ts +406 -0
  218. package/src/workspace/drift-reader.test.ts +3 -3
  219. package/src/workspace/external-secret-catalog.e2e.test.ts +98 -0
  220. package/src/workspace/external-secret-catalog.test.ts +142 -0
  221. package/src/workspace/graph-cli.ts +207 -21
  222. package/src/workspace/graph-contract.test.ts +92 -0
  223. package/src/workspace/graph.schema.json +195 -2
  224. package/src/workspace/helm-references.e2e.test.ts +135 -0
  225. package/src/workspace/identity-annotation-catalog.e2e.test.ts +91 -0
  226. package/src/workspace/identity-annotation-catalog.test.ts +139 -0
  227. package/src/workspace/release-train-repos.test.ts +304 -0
  228. package/src/workspace/release-train.test.ts +296 -0
  229. package/src/workspace/release-train.ts +631 -16
  230. package/src/workspace/repo-ref.ts +26 -1
  231. package/src/workspace/runs-on.test.ts +45 -0
  232. package/src/workspace/workspace-gates.ts +48 -5
  233. package/src/workspace/workspace-ledger.ts +28 -5
  234. package/src/workspace/workspace-run.test.ts +1 -1
  235. package/src/workspace/workspace-run.ts +2 -2
  236. package/src/yaml.test.ts +96 -8
  237. package/src/yaml.ts +36 -8
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Where a path a manifest names lives (#5109): an Argo CD Application's
3
+ * `spec.source.path` is a path inside the repository its `repoURL` names, not
4
+ * inside whatever directory a command was started from.
5
+ *
6
+ * Given the directory of a tree that is being read (the root `chant audit`
7
+ * walks), {@link resolveRepoPath} finds the checkout the tree is in and
8
+ * answers one of three things:
9
+ *
10
+ * - `found` or `missing`: the repository is this one, or no `origin` remote
11
+ * says otherwise, and the path is (or is not) a directory or file below the
12
+ * checkout's root.
13
+ * - `elsewhere`: the checkout's `origin` remote names a different repository
14
+ * than `repoURL`, so the path is in a tree that is not on disk and nothing
15
+ * can be said about it.
16
+ *
17
+ * A tree outside any checkout (an extracted archive) has no remote to compare,
18
+ * and resolves against the directory itself. `requireOrigin` turns that case
19
+ * into `elsewhere`, for a caller that wants a path read only when a remote
20
+ * says the repository is the workspace's own.
21
+ *
22
+ * Reading the remote runs `git`, once per directory.
23
+ */
24
+ import { execFileSync } from "node:child_process";
25
+ import { statSync } from "node:fs";
26
+ import { isAbsolute, relative, resolve, sep } from "node:path";
27
+ import { remoteHost, remoteRepoPath } from "./forge-remote.js";
28
+ const trees = new Map();
29
+ function git(cwd, args) {
30
+ try {
31
+ return execFileSync("git", args, { cwd, encoding: "utf-8", stdio: ["ignore", "pipe", "ignore"] }).trim() || undefined;
32
+ }
33
+ catch {
34
+ return undefined;
35
+ }
36
+ }
37
+ /** The checkout `dir` is in, read once per directory. */
38
+ export function repoTreeOf(dir) {
39
+ const abs = resolve(dir);
40
+ const known = trees.get(abs);
41
+ if (known)
42
+ return known;
43
+ const top = git(abs, ["rev-parse", "--show-toplevel"]);
44
+ const tree = top ? { root: top, origin: git(abs, ["remote", "get-url", "origin"]) } : { root: abs };
45
+ if (tree.origin === undefined)
46
+ delete tree.origin;
47
+ trees.set(abs, tree);
48
+ return tree;
49
+ }
50
+ /** Whether two repository URLs name the same repository: the same host and path, whatever the scheme, user, case or `.git` suffix. */
51
+ export function sameRepository(a, b) {
52
+ const pa = remoteRepoPath(a);
53
+ const pb = remoteRepoPath(b);
54
+ if (!pa || !pb)
55
+ return false;
56
+ return pa.toLowerCase() === pb.toLowerCase() && remoteHost(a) === remoteHost(b);
57
+ }
58
+ /**
59
+ * Resolve `path`, which a manifest in the tree at `dir` names inside the
60
+ * repository `repoURL`. See the module comment for the three answers.
61
+ */
62
+ export function resolveRepoPath(dir, repoURL, path, opts = {}) {
63
+ const tree = repoTreeOf(dir);
64
+ if (tree.origin === undefined ? opts.requireOrigin : repoURL !== undefined && repoURL !== "" && !sameRepository(tree.origin, repoURL)) {
65
+ return { status: "elsewhere", path };
66
+ }
67
+ // A path in a repository is relative to its root, with or without a leading slash.
68
+ const full = resolve(tree.root, path.replace(/^\/+/, ""));
69
+ const rel = relative(tree.root, full);
70
+ if (isAbsolute(rel) || rel === ".." || rel.startsWith(`..${sep}`))
71
+ return { status: "missing", path };
72
+ const shown = rel === "" ? "." : rel.split(sep).join("/");
73
+ try {
74
+ const stat = statSync(full);
75
+ const ok = (opts.type ?? "dir") === "dir" ? stat.isDirectory() : stat.isFile();
76
+ return { status: ok ? "found" : "missing", path: shown };
77
+ }
78
+ catch {
79
+ return { status: "missing", path: shown };
80
+ }
81
+ }
@@ -20,4 +20,27 @@
20
20
  export declare const SENSITIVE_KEY_PATTERNS: readonly RegExp[];
21
21
  /** True when a property name looks secret-bearing (see {@link SENSITIVE_KEY_PATTERNS}). */
22
22
  export declare function isSensitiveKey(key: string): boolean;
23
+ /**
24
+ * Reference fields: keys that match {@link SENSITIVE_KEY_PATTERNS} only because
25
+ * the word "secret" is in the name, and whose value names another object
26
+ * instead of holding a secret. `spec.secretStoreRef` on an ExternalSecret is
27
+ * `{ name, kind }`, the pointer to a SecretStore; a joined graph needs it.
28
+ *
29
+ * This is an exact-key allowlist, and the value must also have the shape of a
30
+ * pointer (see {@link isReferenceField}). A key outside the list stays masked
31
+ * by the patterns, so a new field is masked until someone adds it here.
32
+ * `secretKeyRef` is not on the list: its `key` names an entry inside a Secret
33
+ * and the paths that read a masked value (chant import) treat it as one.
34
+ */
35
+ export declare const REFERENCE_KEYS: ReadonlySet<string>;
36
+ /**
37
+ * True when `key` is a reference key and `value` is a pointer to an object:
38
+ * a plain object whose every field is a string named `name`, `namespace`,
39
+ * `kind` or `apiVersion` (or a list of such objects, for `imagePullSecrets`).
40
+ * Anything else under the same key, a string, a number, an object with a
41
+ * `key` or `value` field, a nested object, is not a pointer and stays masked.
42
+ * The value is not a secret, but the check is on shape so that a value that
43
+ * could be one never passes on the strength of its key.
44
+ */
45
+ export declare function isReferenceField(key: string, value: unknown): boolean;
23
46
  //# sourceMappingURL=sensitive-key.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sensitive-key.d.ts","sourceRoot":"","sources":["../src/sensitive-key.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAOnD,CAAC;AAEF,2FAA2F;AAC3F,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEnD"}
1
+ {"version":3,"file":"sensitive-key.d.ts","sourceRoot":"","sources":["../src/sensitive-key.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAOnD,CAAC;AAEF,2FAA2F;AAC3F,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEnD;AAGD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,CAAgE,CAAC;AAWhH;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAIrE"}
@@ -29,3 +29,40 @@ export const SENSITIVE_KEY_PATTERNS = [
29
29
  export function isSensitiveKey(key) {
30
30
  return SENSITIVE_KEY_PATTERNS.some((p) => p.test(key));
31
31
  }
32
+ /**
33
+ * Reference fields: keys that match {@link SENSITIVE_KEY_PATTERNS} only because
34
+ * the word "secret" is in the name, and whose value names another object
35
+ * instead of holding a secret. `spec.secretStoreRef` on an ExternalSecret is
36
+ * `{ name, kind }`, the pointer to a SecretStore; a joined graph needs it.
37
+ *
38
+ * This is an exact-key allowlist, and the value must also have the shape of a
39
+ * pointer (see {@link isReferenceField}). A key outside the list stays masked
40
+ * by the patterns, so a new field is masked until someone adds it here.
41
+ * `secretKeyRef` is not on the list: its `key` names an entry inside a Secret
42
+ * and the paths that read a masked value (chant import) treat it as one.
43
+ */
44
+ export const REFERENCE_KEYS = new Set(["secretStoreRef", "secretRef", "imagePullSecrets"]);
45
+ /** The only fields a pointer may carry. `key`, `value`, `data` and the like are not here. */
46
+ const REFERENCE_FIELDS = new Set(["name", "namespace", "kind", "apiVersion"]);
47
+ function isPointer(value) {
48
+ if (typeof value !== "object" || value === null || Array.isArray(value))
49
+ return false;
50
+ const entries = Object.entries(value);
51
+ return entries.every(([k, v]) => REFERENCE_FIELDS.has(k) && typeof v === "string");
52
+ }
53
+ /**
54
+ * True when `key` is a reference key and `value` is a pointer to an object:
55
+ * a plain object whose every field is a string named `name`, `namespace`,
56
+ * `kind` or `apiVersion` (or a list of such objects, for `imagePullSecrets`).
57
+ * Anything else under the same key, a string, a number, an object with a
58
+ * `key` or `value` field, a nested object, is not a pointer and stays masked.
59
+ * The value is not a secret, but the check is on shape so that a value that
60
+ * could be one never passes on the strength of its key.
61
+ */
62
+ export function isReferenceField(key, value) {
63
+ if (!REFERENCE_KEYS.has(key))
64
+ return false;
65
+ if (Array.isArray(value))
66
+ return value.length > 0 && value.every(isPointer);
67
+ return isPointer(value);
68
+ }
@@ -17,6 +17,13 @@ export interface Hcl2Json {
17
17
  }>>;
18
18
  }
19
19
  export declare class Hcl2JsonNotInstalled extends Error {
20
+ /**
21
+ * The npm package that is missing. `chant audit` reads this property on any
22
+ * error an entities parser throws (see `parserPackageOf` in `audit/core`),
23
+ * so a lexicon reports a missing optional parser by setting it, with no
24
+ * import of this class.
25
+ */
26
+ readonly parserPackage = "@cdktn/hcl2json";
20
27
  constructor(cause: unknown);
21
28
  }
22
29
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"hcl2json.d.ts","sourceRoot":"","sources":["../../src/terraform/hcl2json.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,wDAAwD;AACxD,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IAChE,yFAAyF;IACzF,yBAAyB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC;CACxG;AAED,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,YAAY,KAAK,EAAE,OAAO,EAOzB;CACF;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAE3D,2EAA2E;AAC3E,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAkBD;;;GAGG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,QAAQ,CAAC,CAStD"}
1
+ {"version":3,"file":"hcl2json.d.ts","sourceRoot":"","sources":["../../src/terraform/hcl2json.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,wDAAwD;AACxD,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;IAChE,yFAAyF;IACzF,yBAAyB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC;CACxG;AAED,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,qBAAqB;IAE3C,YAAY,KAAK,EAAE,OAAO,EAOzB;CACF;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB,0BAA0B,CAAC;AAE3D,2EAA2E;AAC3E,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAkBD;;;GAGG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,QAAQ,CAAC,CAStD"}
@@ -13,6 +13,13 @@ export class Hcl2JsonNotInstalled extends Error {
13
13
  super("Terraform carve-out needs the HCL parser, which is not installed.\n" +
14
14
  " Install it once: npm install -D @cdktn/hcl2json\n" +
15
15
  `(underlying error: ${cause instanceof Error ? cause.message : String(cause)})`);
16
+ /**
17
+ * The npm package that is missing. `chant audit` reads this property on any
18
+ * error an entities parser throws (see `parserPackageOf` in `audit/core`),
19
+ * so a lexicon reports a missing optional parser by setting it, with no
20
+ * import of this class.
21
+ */
22
+ this.parserPackage = "@cdktn/hcl2json";
16
23
  this.name = "Hcl2JsonNotInstalled";
17
24
  }
18
25
  }