@intentius/chant 0.124.97 → 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 (223) 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/ci-agent.d.ts +17 -0
  14. package/dist/ci-agent.d.ts.map +1 -1
  15. package/dist/ci-agent.js +32 -0
  16. package/dist/ci-comment-allow.d.ts +88 -0
  17. package/dist/ci-comment-allow.d.ts.map +1 -0
  18. package/dist/ci-comment-allow.js +178 -0
  19. package/dist/ci-comment-commands.d.ts +12 -0
  20. package/dist/ci-comment-commands.d.ts.map +1 -1
  21. package/dist/ci-comment-commands.js +22 -0
  22. package/dist/ci-control.d.ts +6 -1
  23. package/dist/ci-control.d.ts.map +1 -1
  24. package/dist/ci-control.js +6 -1
  25. package/dist/ci-product.d.ts +3 -0
  26. package/dist/ci-product.d.ts.map +1 -1
  27. package/dist/ci-product.js +3 -0
  28. package/dist/cli/commands/audit.d.ts +3 -1
  29. package/dist/cli/commands/audit.d.ts.map +1 -1
  30. package/dist/cli/commands/audit.js +23 -6
  31. package/dist/cli/commands/import.d.ts +8 -1
  32. package/dist/cli/commands/import.d.ts.map +1 -1
  33. package/dist/cli/commands/import.js +31 -6
  34. package/dist/cli/handlers/agent.d.ts.map +1 -1
  35. package/dist/cli/handlers/agent.js +12 -2
  36. package/dist/cli/handlers/pr-comment.d.ts +6 -0
  37. package/dist/cli/handlers/pr-comment.d.ts.map +1 -1
  38. package/dist/cli/handlers/pr-comment.js +12 -0
  39. package/dist/cli/handlers/promote.d.ts.map +1 -1
  40. package/dist/cli/handlers/promote.js +53 -6
  41. package/dist/cli/main.d.ts.map +1 -1
  42. package/dist/cli/main.js +29 -6
  43. package/dist/cli/parse-args.d.ts.map +1 -1
  44. package/dist/cli/parse-args.js +23 -0
  45. package/dist/cli/registry.d.ts +8 -0
  46. package/dist/cli/registry.d.ts.map +1 -1
  47. package/dist/cloud-lister/mask.d.ts +30 -1
  48. package/dist/cloud-lister/mask.d.ts.map +1 -1
  49. package/dist/cloud-lister/mask.js +66 -3
  50. package/dist/components/driver.d.ts +8 -1
  51. package/dist/components/driver.d.ts.map +1 -1
  52. package/dist/components/driver.js +1 -0
  53. package/dist/components/product-pipeline.d.ts +23 -1
  54. package/dist/components/product-pipeline.d.ts.map +1 -1
  55. package/dist/components/product-pipeline.js +40 -7
  56. package/dist/components/product-plan.d.ts +20 -0
  57. package/dist/components/product-plan.d.ts.map +1 -1
  58. package/dist/components/product-plan.js +11 -1
  59. package/dist/control/applied.d.ts +8 -1
  60. package/dist/control/applied.d.ts.map +1 -1
  61. package/dist/control/applied.js +18 -2
  62. package/dist/control/dispatch.d.ts +52 -0
  63. package/dist/control/dispatch.d.ts.map +1 -1
  64. package/dist/control/dispatch.js +140 -4
  65. package/dist/control/train.d.ts +198 -0
  66. package/dist/control/train.d.ts.map +1 -0
  67. package/dist/control/train.js +294 -0
  68. package/dist/deep-observation.js +2 -2
  69. package/dist/floor-table.data.d.ts.map +1 -1
  70. package/dist/floor-table.data.js +11 -0
  71. package/dist/graph-detail.d.ts +9 -0
  72. package/dist/graph-detail.d.ts.map +1 -1
  73. package/dist/graph-detail.js +38 -13
  74. package/dist/graph-refs.d.ts +233 -3
  75. package/dist/graph-refs.d.ts.map +1 -1
  76. package/dist/graph-refs.js +106 -15
  77. package/dist/lint/post-synth.d.ts +22 -0
  78. package/dist/lint/post-synth.d.ts.map +1 -1
  79. package/dist/lint/rules/declarable-naming-convention.d.ts +12 -0
  80. package/dist/lint/rules/declarable-naming-convention.d.ts.map +1 -1
  81. package/dist/lint/rules/declarable-naming-convention.js +38 -8
  82. package/dist/lint/rules/imported-source.d.ts +20 -0
  83. package/dist/lint/rules/imported-source.d.ts.map +1 -0
  84. package/dist/lint/rules/imported-source.js +27 -0
  85. package/dist/lint/rules/no-unused-declarable.d.ts.map +1 -1
  86. package/dist/lint/rules/no-unused-declarable.js +3 -0
  87. package/dist/op/gate.d.ts +2 -0
  88. package/dist/op/gate.d.ts.map +1 -1
  89. package/dist/op/gate.js +8 -1
  90. package/dist/pr-forge-reads.d.ts +17 -0
  91. package/dist/pr-forge-reads.d.ts.map +1 -1
  92. package/dist/pr-forge-reads.js +55 -0
  93. package/dist/release-floors.d.ts +9 -1
  94. package/dist/release-floors.d.ts.map +1 -1
  95. package/dist/release-floors.js +9 -1
  96. package/dist/repo-path.d.ts +29 -0
  97. package/dist/repo-path.d.ts.map +1 -0
  98. package/dist/repo-path.js +81 -0
  99. package/dist/sensitive-key.d.ts +23 -0
  100. package/dist/sensitive-key.d.ts.map +1 -1
  101. package/dist/sensitive-key.js +37 -0
  102. package/dist/terraform/hcl2json.d.ts +7 -0
  103. package/dist/terraform/hcl2json.d.ts.map +1 -1
  104. package/dist/terraform/hcl2json.js +7 -0
  105. package/dist/wave-runtime.mjs +352 -345
  106. package/dist/workspace/catalog-edges.d.ts +147 -0
  107. package/dist/workspace/catalog-edges.d.ts.map +1 -0
  108. package/dist/workspace/catalog-edges.js +461 -0
  109. package/dist/workspace/compose-graph.d.ts +73 -3
  110. package/dist/workspace/compose-graph.d.ts.map +1 -1
  111. package/dist/workspace/declaration.d.ts +2 -0
  112. package/dist/workspace/declaration.d.ts.map +1 -1
  113. package/dist/workspace/declaration.js +1 -0
  114. package/dist/workspace/declaration.schema.json +6 -0
  115. package/dist/workspace/discover.d.ts +134 -0
  116. package/dist/workspace/discover.d.ts.map +1 -0
  117. package/dist/workspace/discover.js +372 -0
  118. package/dist/workspace/graph-cli.d.ts +20 -0
  119. package/dist/workspace/graph-cli.d.ts.map +1 -1
  120. package/dist/workspace/graph-cli.js +178 -20
  121. package/dist/workspace/graph.schema.json +195 -2
  122. package/dist/workspace/release-train.d.ts +214 -3
  123. package/dist/workspace/release-train.d.ts.map +1 -1
  124. package/dist/workspace/release-train.js +552 -16
  125. package/dist/workspace/repo-ref.d.ts +14 -0
  126. package/dist/workspace/repo-ref.d.ts.map +1 -1
  127. package/dist/workspace/repo-ref.js +26 -1
  128. package/dist/workspace/workspace-gates.d.ts +24 -0
  129. package/dist/workspace/workspace-gates.d.ts.map +1 -1
  130. package/dist/workspace/workspace-gates.js +29 -5
  131. package/dist/workspace/workspace-ledger.d.ts +31 -5
  132. package/dist/workspace/workspace-ledger.d.ts.map +1 -1
  133. package/dist/workspace/workspace-ledger.js +2 -1
  134. package/dist/workspace/workspace-run.d.ts +14 -0
  135. package/dist/workspace/workspace-run.d.ts.map +1 -1
  136. package/dist/workspace/workspace-run.js +2 -2
  137. package/dist/yaml.d.ts.map +1 -1
  138. package/dist/yaml.js +33 -8
  139. package/package.json +1 -1
  140. package/src/audit/core.test.ts +64 -1
  141. package/src/audit/core.ts +75 -10
  142. package/src/audit/identity.test.ts +31 -0
  143. package/src/audit/identity.ts +43 -0
  144. package/src/audit/report-html.ts +4 -2
  145. package/src/audit/report-model.ts +21 -1
  146. package/src/ci-agent.test.ts +32 -0
  147. package/src/ci-agent.ts +42 -0
  148. package/src/ci-comment-allow.test.ts +380 -0
  149. package/src/ci-comment-allow.ts +184 -0
  150. package/src/ci-comment-commands.ts +25 -0
  151. package/src/ci-control.ts +42 -0
  152. package/src/ci-product.ts +3 -0
  153. package/src/cli/commands/audit-parser-notice.test.ts +74 -0
  154. package/src/cli/commands/audit.test.ts +12 -0
  155. package/src/cli/commands/audit.ts +25 -7
  156. package/src/cli/commands/import-layout.test.ts +2 -1
  157. package/src/cli/commands/import.ts +29 -6
  158. package/src/cli/handlers/agent.ts +13 -2
  159. package/src/cli/handlers/pr-comment.ts +12 -0
  160. package/src/cli/handlers/promote.test.ts +68 -0
  161. package/src/cli/handlers/promote.ts +52 -6
  162. package/src/cli/main.test.ts +5 -0
  163. package/src/cli/main.ts +29 -6
  164. package/src/cli/parse-args.ts +18 -0
  165. package/src/cli/registry.ts +8 -0
  166. package/src/cloud-lister/kubernetes.k3d.e2e.test.ts +104 -0
  167. package/src/cloud-lister/mask-references.test.ts +132 -0
  168. package/src/cloud-lister/mask.ts +68 -3
  169. package/src/components/driver.ts +9 -1
  170. package/src/components/product-pipeline.ts +57 -7
  171. package/src/components/product-plan.ts +27 -2
  172. package/src/control/applied.ts +33 -3
  173. package/src/control/dispatch.ts +156 -5
  174. package/src/control/train.test.ts +215 -0
  175. package/src/control/train.ts +413 -0
  176. package/src/deep-observation.ts +2 -2
  177. package/src/floor-table.data.ts +6 -0
  178. package/src/graph-detail.ts +37 -12
  179. package/src/graph-refs.test.ts +45 -1
  180. package/src/graph-refs.ts +321 -14
  181. package/src/lint/post-synth.ts +20 -0
  182. package/src/lint/rules/declarable-naming-convention.test.ts +35 -1
  183. package/src/lint/rules/declarable-naming-convention.ts +35 -8
  184. package/src/lint/rules/imported-source.test.ts +22 -0
  185. package/src/lint/rules/imported-source.ts +31 -0
  186. package/src/lint/rules/no-unused-declarable.test.ts +16 -0
  187. package/src/lint/rules/no-unused-declarable.ts +7 -0
  188. package/src/op/gate.ts +10 -2
  189. package/src/pr-forge-reads.ts +62 -0
  190. package/src/release-floors.ts +13 -1
  191. package/src/repo-path.test.ts +72 -0
  192. package/src/repo-path.ts +103 -0
  193. package/src/sensitive-key.ts +38 -0
  194. package/src/terraform/hcl2json.ts +8 -0
  195. package/src/workspace/application-set.e2e.test.ts +405 -0
  196. package/src/workspace/catalog-edges.ts +507 -0
  197. package/src/workspace/ci-green-workflow.test.ts +2 -2
  198. package/src/workspace/cluster-join.e2e.test.ts +150 -0
  199. package/src/workspace/compose-graph.ts +74 -5
  200. package/src/workspace/declaration.schema.json +6 -0
  201. package/src/workspace/declaration.ts +3 -0
  202. package/src/workspace/discover.e2e.test.ts +122 -0
  203. package/src/workspace/discover.test.ts +225 -0
  204. package/src/workspace/discover.ts +406 -0
  205. package/src/workspace/external-secret-catalog.e2e.test.ts +98 -0
  206. package/src/workspace/external-secret-catalog.test.ts +142 -0
  207. package/src/workspace/graph-cli.ts +207 -21
  208. package/src/workspace/graph-contract.test.ts +92 -0
  209. package/src/workspace/graph.schema.json +195 -2
  210. package/src/workspace/helm-references.e2e.test.ts +135 -0
  211. package/src/workspace/identity-annotation-catalog.e2e.test.ts +91 -0
  212. package/src/workspace/identity-annotation-catalog.test.ts +139 -0
  213. package/src/workspace/release-train-repos.test.ts +304 -0
  214. package/src/workspace/release-train.test.ts +296 -0
  215. package/src/workspace/release-train.ts +631 -16
  216. package/src/workspace/repo-ref.ts +26 -1
  217. package/src/workspace/runs-on.test.ts +45 -0
  218. package/src/workspace/workspace-gates.ts +48 -5
  219. package/src/workspace/workspace-ledger.ts +28 -5
  220. package/src/workspace/workspace-run.test.ts +1 -1
  221. package/src/workspace/workspace-run.ts +2 -2
  222. package/src/yaml.test.ts +96 -8
  223. package/src/yaml.ts +36 -8
@@ -1,3 +1,15 @@
1
1
  import type { LintRule } from "../rule.js";
2
+ /**
3
+ * Suggest a camelCase version of a PascalCase or UPPER_SNAKE_CASE name.
4
+ *
5
+ * The name is cut at every character an identifier cannot start a word with
6
+ * (`_`, `$`), the same non-alphanumeric cut the Kubernetes importer makes in
7
+ * `toLogicalId`. A leading run of capitals is an acronym: it is lowercased up
8
+ * to the capital that begins the next word, so `TFStateBucket` gives
9
+ * `tfStateBucket` and `OBSAdminUser` gives `obsAdminUser`. That boundary is
10
+ * a case boundary inside one identifier, which `toLogicalId` (names joined
11
+ * from DNS-style segments) never has to find, so the two stay separate.
12
+ */
13
+ export declare function toCamelCase(name: string): string;
2
14
  export declare const declarableNamingConventionRule: LintRule;
3
15
  //# sourceMappingURL=declarable-naming-convention.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"declarable-naming-convention.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/declarable-naming-convention.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,SAAS,CAAC;AA2DrE,eAAO,MAAM,8BAA8B,EAAE,QAU5C,CAAC"}
1
+ {"version":3,"file":"declarable-naming-convention.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/declarable-naming-convention.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,SAAS,CAAC;AAmDrE;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAWhD;AAYD,eAAO,MAAM,8BAA8B,EAAE,QAW5C,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import * as ts from "typescript";
2
+ import { isImportedSource } from "./imported-source.js";
2
3
  /**
3
4
  * COR005: declarable-naming-convention
4
5
  *
@@ -10,6 +11,7 @@ import * as ts from "typescript";
10
11
  * OK: export const dataBucket = new Bucket({ ... })
11
12
  * OK: export const DataBucket = createBucket({ ... }) (not a new expression)
12
13
  * OK: const DataBucket = new Bucket({ ... }) (not exported)
14
+ * OK: any name in a file written by `chant import` (see imported-source.ts)
13
15
  */
14
16
  function checkNode(node, context, diagnostics) {
15
17
  if (ts.isVariableStatement(node)) {
@@ -40,14 +42,40 @@ function checkNode(node, context, diagnostics) {
40
42
  }
41
43
  ts.forEachChild(node, child => checkNode(child, context, diagnostics));
42
44
  }
43
- /** Suggest a camelCase version of a PascalCase or UPPER_SNAKE_CASE name */
44
- function toCamelCase(name) {
45
- // PascalCase -> camelCase: lowercase first char
46
- if (/^[A-Z][a-z]/.test(name)) {
47
- return name[0].toLowerCase() + name.slice(1);
48
- }
49
- // UPPER_SNAKE -> camelCase
50
- return name.toLowerCase().replace(/_([a-z])/g, (_, c) => c.toUpperCase());
45
+ /**
46
+ * Suggest a camelCase version of a PascalCase or UPPER_SNAKE_CASE name.
47
+ *
48
+ * The name is cut at every character an identifier cannot start a word with
49
+ * (`_`, `$`), the same non-alphanumeric cut the Kubernetes importer makes in
50
+ * `toLogicalId`. A leading run of capitals is an acronym: it is lowercased up
51
+ * to the capital that begins the next word, so `TFStateBucket` gives
52
+ * `tfStateBucket` and `OBSAdminUser` gives `obsAdminUser`. That boundary is
53
+ * a case boundary inside one identifier, which `toLogicalId` (names joined
54
+ * from DNS-style segments) never has to find, so the two stay separate.
55
+ */
56
+ export function toCamelCase(name) {
57
+ const words = name.split(/[^A-Za-z0-9]+/).filter((w) => w.length > 0);
58
+ if (words.length === 0)
59
+ return name;
60
+ return words
61
+ .map((word, i) => {
62
+ // A word written entirely in capitals ("BUCKET", "S3") is one word.
63
+ const allCaps = word === word.toUpperCase() && /[A-Z]/.test(word);
64
+ if (i === 0)
65
+ return lowerLeadingCapitals(word, allCaps);
66
+ return word[0].toUpperCase() + (allCaps ? word.slice(1).toLowerCase() : word.slice(1));
67
+ })
68
+ .join("");
69
+ }
70
+ /** Lowercase the leading capitals of a word, keeping the capital that starts its next word. */
71
+ function lowerLeadingCapitals(word, allCaps) {
72
+ if (allCaps)
73
+ return word.toLowerCase();
74
+ const run = /^[A-Z]+/.exec(word)?.[0] ?? "";
75
+ // "TFState": the run is "TFS", and its last capital starts "State".
76
+ const startsNextWord = run.length > 1 && /[a-z]/.test(word[run.length] ?? "");
77
+ const keep = startsNextWord ? run.length - 1 : Math.max(run.length, 1);
78
+ return word.slice(0, keep).toLowerCase() + word.slice(keep);
51
79
  }
52
80
  export const declarableNamingConventionRule = {
53
81
  id: "COR005",
@@ -56,6 +84,8 @@ export const declarableNamingConventionRule = {
56
84
  description: "Exported declarable instances must use camelCase naming",
57
85
  check(context) {
58
86
  const diagnostics = [];
87
+ if (isImportedSource(context.sourceFile))
88
+ return diagnostics;
59
89
  checkNode(context.sourceFile, context, diagnostics);
60
90
  return diagnostics;
61
91
  },
@@ -0,0 +1,20 @@
1
+ import * as ts from "typescript";
2
+ /**
3
+ * The first comment line of a file written by `chant import`.
4
+ *
5
+ * An imported declaration keeps the name the source template gave it, and the
6
+ * name is part of what the template deploys, so a naming or an
7
+ * unreferenced-declaration finding on it asks for a change that alters the
8
+ * deployed resources. COR004 and COR005 read this line and skip the file.
9
+ */
10
+ export declare const IMPORTED_SOURCE_MARKER = "// chant:imported";
11
+ /** The header `chant import` puts on a generated TypeScript file. */
12
+ export declare const IMPORTED_SOURCE_HEADER = "// chant:imported - declarations keep the names of the source template; COR004 and COR005 skip this file.\n";
13
+ /** Prefix the marker onto generated content once; other file types are returned as they are. */
14
+ export declare function markImportedSource(path: string, content: string): string;
15
+ /**
16
+ * True when the marker is one of the comments that open the file. A marker
17
+ * further down, after code, does not count.
18
+ */
19
+ export declare function isImportedSource(sourceFile: ts.SourceFile): boolean;
20
+ //# sourceMappingURL=imported-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imported-source.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/imported-source.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AAEjC;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAE1D,qEAAqE;AACrE,eAAO,MAAM,sBAAsB,gHACoF,CAAC;AAExH,gGAAgG;AAChG,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAGxE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,GAAG,OAAO,CAInE"}
@@ -0,0 +1,27 @@
1
+ import * as ts from "typescript";
2
+ /**
3
+ * The first comment line of a file written by `chant import`.
4
+ *
5
+ * An imported declaration keeps the name the source template gave it, and the
6
+ * name is part of what the template deploys, so a naming or an
7
+ * unreferenced-declaration finding on it asks for a change that alters the
8
+ * deployed resources. COR004 and COR005 read this line and skip the file.
9
+ */
10
+ export const IMPORTED_SOURCE_MARKER = "// chant:imported";
11
+ /** The header `chant import` puts on a generated TypeScript file. */
12
+ export const IMPORTED_SOURCE_HEADER = `${IMPORTED_SOURCE_MARKER} - declarations keep the names of the source template; COR004 and COR005 skip this file.\n`;
13
+ /** Prefix the marker onto generated content once; other file types are returned as they are. */
14
+ export function markImportedSource(path, content) {
15
+ if (!path.endsWith(".ts") || content.startsWith(IMPORTED_SOURCE_MARKER))
16
+ return content;
17
+ return IMPORTED_SOURCE_HEADER + content;
18
+ }
19
+ /**
20
+ * True when the marker is one of the comments that open the file. A marker
21
+ * further down, after code, does not count.
22
+ */
23
+ export function isImportedSource(sourceFile) {
24
+ const text = sourceFile.text;
25
+ const ranges = ts.getLeadingCommentRanges(text, 0) ?? [];
26
+ return ranges.some((r) => text.startsWith(IMPORTED_SOURCE_MARKER, r.pos));
27
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"no-unused-declarable.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/no-unused-declarable.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,SAAS,CAAC;AAqJrE,eAAO,MAAM,sBAAsB,EAAE,QA4BpC,CAAC"}
1
+ {"version":3,"file":"no-unused-declarable.d.ts","sourceRoot":"","sources":["../../../src/lint/rules/no-unused-declarable.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAA+B,MAAM,SAAS,CAAC;AA2JrE,eAAO,MAAM,sBAAsB,EAAE,QA6BpC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import * as ts from "typescript";
2
2
  import { isPropertyKindNew } from "./property-kind.js";
3
+ import { isImportedSource } from "./imported-source.js";
3
4
  function isCapitalized(name) {
4
5
  return name.length > 0 && name[0] === name[0].toUpperCase() && name[0] !== name[0].toLowerCase();
5
6
  }
@@ -123,6 +124,8 @@ export const noUnusedDeclarableRule = {
123
124
  description: "Detects exported declarables that are never referenced in the same file",
124
125
  check(context) {
125
126
  const diagnostics = [];
127
+ if (isImportedSource(context.sourceFile))
128
+ return diagnostics;
126
129
  const declarables = collectExportedDeclarables(context);
127
130
  for (const decl of declarables) {
128
131
  if (!collectReferences(decl.name, context.sourceFile, decl.node)) {
package/dist/op/gate.d.ts CHANGED
@@ -334,11 +334,13 @@ export interface WorkspaceGateStood {
334
334
  }
335
335
  /** See {@link GateCheckInput.workspace}. */
336
336
  export interface WorkspaceGateStandIn {
337
+ /** `releaseDigest` is set on a release gate (#4037): the approval must cover that release too. */
337
338
  standIn(q: {
338
339
  op: string;
339
340
  gate: string;
340
341
  planDigest: string;
341
342
  environment?: string;
343
+ releaseDigest?: string;
342
344
  }): Promise<WorkspaceGateStood | null>;
343
345
  }
344
346
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../../src/op/gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGvD,OAAO,EASL,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACvB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAAiF,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAG3K,OAAO,EAAqB,KAAK,YAAY,EAAE,KAAK,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACzH,OAAO,EAEL,KAAK,eAAe,EAAE,KAAK,sBAAsB,EAAE,KAAK,cAAc,EACvE,MAAM,eAAe,CAAC;AAMvB,OAAO,EAAyF,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC1J,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD;;;;;;;GAOG;AACH,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,iB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O9F"}
package/dist/op/gate.js CHANGED
@@ -639,7 +639,13 @@ export async function evaluateGate(port, input) {
639
639
  // #2554, ws-039: a workspace gate stands in only when the member opted in
640
640
  // at base and the workspace approval's digest covers this plan.
641
641
  if (input.workspace && input.planDigest !== undefined) {
642
- const stood = await input.workspace.standIn({ op: input.op, gate: input.gate, planDigest: input.planDigest, ...(env !== undefined ? { environment: env } : {}) });
642
+ const stood = await input.workspace.standIn({
643
+ op: input.op,
644
+ gate: input.gate,
645
+ planDigest: input.planDigest,
646
+ ...(env !== undefined ? { environment: env } : {}),
647
+ ...(input.releaseDigest !== undefined ? { releaseDigest: input.releaseDigest } : {}),
648
+ });
643
649
  if (stood) {
644
650
  return {
645
651
  satisfied: true,
@@ -653,6 +659,7 @@ export async function evaluateGate(port, input) {
653
659
  timestamp: stood.timestamp,
654
660
  planDigest: input.planDigest,
655
661
  ...(env !== undefined ? { environment: env } : {}),
662
+ ...(input.releaseDigest !== undefined ? { releaseDigest: input.releaseDigest } : {}),
656
663
  workspaceGate: { gate: stood.gate, digest: stood.digest },
657
664
  },
658
665
  };
@@ -18,7 +18,9 @@
18
18
  * (`./pr-forge-bundle.test.ts`, `./pr-loop-bundle.test.ts`,
19
19
  * `./review-agent-bundle.test.ts`).
20
20
  */
21
+ import { TeamReadError } from "./ci-comment-allow.js";
21
22
  import { type ForgeFetch, type ForgeKind, type ForgeTarget, type GithubForgeOptions, type GitlabForgeOptions, type OpenPullRequest } from "./pr-forge.js";
23
+ export { TeamReadError };
22
24
  /** The user a token acts as: GitHub's and Forgejo's `login`, GitLab's `username`, and the forge's numeric id. */
23
25
  export interface ForgeUser {
24
26
  login: string;
@@ -248,6 +250,21 @@ export interface ForgeReads {
248
250
  * when the forge knows no such user or member.
249
251
  */
250
252
  permission(login: string): Promise<string | undefined>;
253
+ /**
254
+ * Whether `login` is an active member of `team`, written `<org>/<team>` (a
255
+ * team's slug on GitHub, its name on Forgejo), for `comment_allow` lists
256
+ * (INTENTIUS/terragucci#1461). GitHub and Forgejo only: GitLab's reads leave it out. The team is
257
+ * looked up first, since GitHub answers 404 both for a team the token cannot
258
+ * see and for one that does not exist; if that lookup fails the read throws
259
+ * {@link TeamReadError}, and a 404 on the membership afterwards means the
260
+ * login is not in the team. A pending invitation is not membership.
261
+ *
262
+ * GitHub needs a token that can read the organization's members: a classic
263
+ * token with `read:org`, or a fine-grained token or app with the
264
+ * organization permission Members: read. The workflow's own token cannot.
265
+ * Forgejo needs `read:organization`.
266
+ */
267
+ teamMember?(team: string, login: string): Promise<boolean>;
251
268
  /** Every open pull request in the repository, into any base, ascending by number. */
252
269
  openPullRequests(): Promise<OpenPullRequest[]>;
253
270
  /** The workflow runs (GitLab's pipelines) on commit `sha`, newest first (#4846). */
@@ -1 +1 @@
1
- {"version":3,"file":"pr-forge-reads.d.ts","sourceRoot":"","sources":["../src/pr-forge-reads.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACrB,MAAM,YAAY,CAAC;AAEpB,iHAAiH;AACjH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,iFAAiF;AACjF,MAAM,WAAW,iBAAiB;IAChC,6DAA6D;IAC7D,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACpC,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qB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AE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACvE;AAkbD,+CAA+C;AAC/C,wBAAgB,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,UAAU,CAEhE;AAED,2DAA2D;AAC3D,wBAAgB,YAAY,CAAC,IAAI,EAAE,kBAAkB,GAAG,UAAU,CAEjE;AAED,+CAA+C;AAC/C,wBAAgB,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,UAAU,CA2IhE;AAED,oFAAoF;AACpF,wBAAgB,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,UAAU,GAAG,UAAU,CAOrF"}
@@ -18,7 +18,9 @@
18
18
  * (`./pr-forge-bundle.test.ts`, `./pr-loop-bundle.test.ts`,
19
19
  * `./review-agent-bundle.test.ts`).
20
20
  */
21
+ import { TeamReadError } from "./ci-comment-allow.js";
21
22
  import { ForgeApiError, } from "./pr-forge.js";
23
+ export { TeamReadError };
22
24
  function getter(base, headers, fetchImpl, pageSize, pageParams) {
23
25
  const root = base.replace(/\/+$/, "");
24
26
  const get = (async (path) => {
@@ -282,6 +284,59 @@ function githubShapedReads(kind, opts) {
282
284
  }
283
285
  return isObject(got) ? str(got.permission) : undefined;
284
286
  },
287
+ async teamMember(team, login) {
288
+ const cut = team.lastIndexOf("/");
289
+ if (cut < 1 || cut === team.length - 1)
290
+ throw new TeamReadError(`${JSON.stringify(team)} is not a team: write <org>/<team>`);
291
+ const rawOrg = team.slice(0, cut);
292
+ const org = encodeURIComponent(rawOrg);
293
+ const name = team.slice(cut + 1);
294
+ const unreadable = (what, err) => {
295
+ if (!(err instanceof ForgeApiError))
296
+ return err instanceof Error ? err : new Error(String(err));
297
+ return new TeamReadError(`${what} answered ${err.status}${err.status === 404 ? ": the team does not exist, or the token cannot see it" : ""}`);
298
+ };
299
+ if (kind === "forgejo") {
300
+ let found;
301
+ try {
302
+ found = await get(`/orgs/${org}/teams/search?q=${encodeURIComponent(name)}&limit=50`);
303
+ }
304
+ catch (err) {
305
+ throw unreadable(`searching ${rawOrg}'s teams`, err);
306
+ }
307
+ const rows = isObject(found) && Array.isArray(found.data) ? found.data.filter(isObject) : [];
308
+ const hit = rows.find((t) => String(t.name).toLowerCase() === name.toLowerCase());
309
+ const id = hit ? num(hit.id) : undefined;
310
+ if (id === undefined)
311
+ throw new TeamReadError(`${rawOrg} has no team named ${name}, or the token cannot see it`);
312
+ try {
313
+ await get(`/teams/${id}/members/${encodeURIComponent(login)}`);
314
+ return true;
315
+ }
316
+ catch (err) {
317
+ if (notFound(err))
318
+ return false;
319
+ throw unreadable(`team ${team}'s member list`, err);
320
+ }
321
+ }
322
+ try {
323
+ await get(`/orgs/${org}/teams/${encodeURIComponent(name)}`);
324
+ }
325
+ catch (err) {
326
+ throw unreadable(`GitHub team ${team}`, err);
327
+ }
328
+ let got;
329
+ try {
330
+ got = await get(`/orgs/${org}/teams/${encodeURIComponent(name)}/memberships/${encodeURIComponent(login)}`);
331
+ }
332
+ catch (err) {
333
+ if (notFound(err))
334
+ return false;
335
+ throw unreadable(`team ${team}'s membership of ${login}`, err);
336
+ }
337
+ // A pending invitation is not membership.
338
+ return isObject(got) && got.state === "active";
339
+ },
285
340
  async openPullRequests() {
286
341
  const out = [];
287
342
  for (const v of await pulls("state=open")) {
@@ -19,7 +19,7 @@
19
19
  * this constant to the next patch (#4501). The check fails while a floor
20
20
  * still names this constant after its version shipped.
21
21
  */
22
- export declare const NEXT_RELEASE = "0.124.97";
22
+ export declare const NEXT_RELEASE = "0.124.98";
23
23
  /** The first chant with `chant dev local` and `chant dev bundle-check`, `@intentius/chant/local-chant` and `@intentius/chant/bundle-check` (`chantRuntimeTarget`, `chantExternalPlugin`, `checkBundle`): a product built against a chant checkout, and its bundle checked, without its own scripts (#4787). */
24
24
  export declare const LOCAL_CHANT_FLOOR = "0.124.86";
25
25
  /** The first chant with `chant workspace ref-gate` (pre-receive, pre-push, check, status, attach, install) and `refs` in `.chant/trust.json`, the checks a ref update needs evidence for (#4867). */
@@ -180,8 +180,16 @@ export declare const OP_WAVES_CONTROL_BEFORE_MERGE_FLOOR = "0.124.95";
180
180
  export declare const WAVES_BEFORE_MERGE_LOCKS_FLOOR = "0.124.95";
181
181
  /** The first chant whose kinds file takes `drift: { reader, config }` beside `graph` and whose `chant workspace drift --member` reads a member of such a kind with that module, `(input: { dir, config, member, observedAt, read?, resource?, stack? }) => DriftReaderOutput` from `@intentius/chant/workspace/drift-reader`, checked against `drift-reader.schema.json` (#5068). */
182
182
  export declare const KIND_DRIFT_READER_FLOOR = "0.124.96";
183
+ /** The first chant whose `chant workspace graph` runs each lexicon's reference catalog over the composed declared graph, across members, on full attributes at every `--detail` (#5097): derived edges in `edges` with `origin: "derived"`, `rule` and `relation`, references to no node in `dangling` with their `rule` and `targetKind`, references to several nodes in `ambiguous` with every candidate, and `catalog` naming the lexicons and members read, each rule named, and per node the arguments not read because not literal; a catalog path takes a quoted key, `metadata.annotations["iam.gke.io/gcp-service-account"]`; and a catalog takes `scopes` and `declaredNode`. */
184
+ export declare const WORKSPACE_GRAPH_CATALOG_FLOOR = "0.124.98";
185
+ /** The first chant whose reference catalogs join an Argo CD cluster Secret to the cluster resource (#5101): an Application's `spec.destination.name` and `spec.destination.server` to the Secret whose `name` and `server` match, and the Secret's `name` (base64 `data` decoded) to a `google_container_cluster`, `aws_eks_cluster` or `azurerm_kubernetes_cluster` of that literal name, with a reference no rule of its id matched listed once in `dangling`; a member of kind `argo-app` or `manifests` reads a cluster Secret cut down to its `name` and `server`; and a workspace member entry takes `runsOn`, `<member>/<address>`, with `chant workspace graph --discover --runs-on <member>=<member>/<address>`, which draws a declared edge from each of the member's cluster Secrets to that node. */
186
+ export declare const WORKSPACE_GRAPH_CLUSTER_JOIN_FLOOR = "0.124.98";
187
+ /** The first chant whose `chant workspace graph` expands an Argo CD ApplicationSet's `list` and `clusters` generators (#5102): one node per generated Application, with `generatedBy` naming the ApplicationSet, the rule, the generator, the parameters and the cluster Secret it was made for, a derived edge from the ApplicationSet to it under `k8s:K8s::Argo::ApplicationSet:spec.generators` and from it to the cluster Secret a clusters generator selected under `k8s:K8s::Argo::ApplicationSet:generators[].clusters`, and `expansion` on the ApplicationSet with the count and what was not expanded; and whose catalogs read an Application's `spec.source.path`, `spec.sources[].path` and `helm.valueFiles`, listing a path the workspace's own repository does not have in `dangling`, with `through` and `cluster` on a generated one. */
188
+ export declare const WORKSPACE_GRAPH_APPLICATION_SET_FLOOR = "0.124.98";
183
189
  /** The first chant whose `chant run resume` (`resumeGateRun`) on GitLab retries a wave job's `<wave job>-evidence` with the wave job when the evidence job already ran, and whose `ci evidence sign --from-job` waits for a job it reads to finish, so a resumed wave's evidence job signs from the new try (#4978). */
184
190
  export declare const GITLAB_WAVE_EVIDENCE_RETRY_FLOOR = "0.124.89";
185
191
  /** The first chant whose terraform lexicon's engine runs carry what a product's own command tracing read: `runBinary` and the engine runner's `exec` and `execSync` answer stderr apart (`Ran.stderr`) and a spawn failure's message (`Ran.error`), a hook's `after` gets a binary that could not be started as a null code with `error`, `commandTrace` ends that span with the message, and `composeCommandHooks` runs a product's own hook and `commandTrace` as one `onCommand` (#5007). */
186
192
  export declare const TERRAFORM_COMMAND_TRACE_FLOOR = "0.124.91";
193
+ /** The first chant whose product pipeline limits comment commands to logins and teams on GitHub and Forgejo (INTENTIUS/terragucci#1461): `commentAllow: { allow, tokenSecret? }` in `productPipelineJobs`, where `allow` maps `plan`, `apply`, `lock`, `unlock`, `agent` and `default` to logins and `team:<org>/<team>` entries. The map is written as `CHANT_COMMENT_ALLOW` into the comment job, the product plan's re-plan decision and the agent's jobs (a spec's `agent.commentAllow`), so it is read from the workflow on the default branch. `answerProductComment` takes `allow` and replies to a commenter the list leaves out, `ForgeReads.teamMember` reads a team on GitHub and Forgejo, `CHANT_COMMENT_ALLOW_TOKEN` (`tokenSecret`) carries a token that can read teams, and a team the forge cannot answer for fails closed with a message. */
194
+ export declare const COMMENT_ALLOW_FLOOR = "0.124.98";
187
195
  //# sourceMappingURL=release-floors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"release-floors.d.ts","sourceRoot":"","sources":["../src/release-floors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,YAAY,aAAa,CAAC;AAEvC,+SAA+S;AAC/S,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAE5C,qMAAqM;AACrM,eAAO,MAAM,cAAc,aAAa,CAAC;AAEzC,8KAA8K;AAC9K,eAAO,MAAM,4BAA4B,aAAa,CAAC;AAEvD,0LAA0L;AAC1L,eAAO,MAAM,kCAAkC,aAAa,CAAC;AAE7D,6SAA6S;AAC7S,eAAO,MAAM,8BAA8B,aAAa,CAAC;AAEzD,sUAAsU;AACtU,eAAO,MAAM,4BAA4B,aAAa,CAAC;AAEvD,kdAAkd;AACld,eAAO,MAAM,6BAA6B,aAAa,CAAC;AAExD,4RAA4R;AAC5R,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAEhD,sVAAsV;AACtV,eAAO,MAAM,cAAc,aAAa,CAAC;AAEzC,8KAA8K;AAC9K,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAE5C,kQAAkQ;AAClQ,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAChD,mVAAmV;AACnV,eAAO,MAAM,8BAA8B,aAAa,CAAC;AACzD,gQAAgQ;AAChQ,eAAO,MAAM,mCAAmC,aAAa,CAAC;AAE9D,4LAA4L;AAC5L,eAAO,MAAM,oCAAoC,aAAa,CAAC;AAE/D,8LAA8L;AAC9L,eAAO,MAAM,iCAAiC,aAAa,CAAC;AAE5D,0NAA0N;AAC1N,eAAO,MAAM,sBAAsB,aAAa,CAAC;AAEjD,2LAA2L;AAC3L,eAAO,MAAM,+BAA+B,aAAa,CAAC;AAE1D,mJAAmJ;AACnJ,eAAO,MAAM,wBAAwB,aAAa,CAAC;AAEnD,yKAAyK;AACzK,eAAO,MAAM,0BAA0B,aAAa,CAA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Aa,CAAC;AAErD,yNAAyN;AACzN,eAAO,MAAM,2BAA2B,aAAa,CAAC;AAEtD,wUAAwU;AACxU,eAAO,MAAM,0BAA0B,aAAa,CAAC;AAErD,6XAA6X;AAC7X,eAAO,MAAM,wBAAwB,aAAa,CAAC;AAEnD,6YAA6Y;AAC7Y,eAAO,MAAM,qCAAqC,aAAa,CAAC;AAEhE,2oBAA2oB;AAC3oB,eAAO,MAAM,wBAAwB,aAAa,CAAC;AAEnD,+bAA+b;AAC/b,eAAO,MAAM,2BAA2B,aAAa,CAAC;AAEtD,kWAAkW;AAClW,eAAO,MAAM,+BAA+B,aAAa,CAAC;AAE1D,qXAAqX;AACrX,eAAO,MAAM,mCAAmC,aAAa,CAAC;AAE9D,0pBAA0pB;AAC1pB,eAAO,MAAM,8BAA8B,aAAa,CAAC;AAEzD,qXAAqX;AACrX,eAAO,MAAM,uBAAuB,aAAa,CAAC;AAElD,2pBAA2pB;AAC3pB,eAAO,MAAM,6BAA6B,aAAe,CAAC;AAE1D,ixBAAixB;AACjxB,eAAO,MAAM,kCAAkC,aAAe,CAAC;AAE/D,0zBAA0zB;AAC1zB,eAAO,MAAM,qCAAqC,aAAe,CAAC;AAElE,wTAAwT;AACxT,eAAO,MAAM,gCAAgC,aAAa,CAAC;AAE3D,geAAge;AAChe,eAAO,MAAM,6BAA6B,aAAa,CAAC;AAExD,8zBAA8zB;AAC9zB,eAAO,MAAM,mBAAmB,aAAe,CAAC"}
@@ -19,7 +19,7 @@
19
19
  * this constant to the next patch (#4501). The check fails while a floor
20
20
  * still names this constant after its version shipped.
21
21
  */
22
- export const NEXT_RELEASE = "0.124.97";
22
+ export const NEXT_RELEASE = "0.124.98";
23
23
  /** The first chant with `chant dev local` and `chant dev bundle-check`, `@intentius/chant/local-chant` and `@intentius/chant/bundle-check` (`chantRuntimeTarget`, `chantExternalPlugin`, `checkBundle`): a product built against a chant checkout, and its bundle checked, without its own scripts (#4787). */
24
24
  export const LOCAL_CHANT_FLOOR = "0.124.86";
25
25
  /** The first chant with `chant workspace ref-gate` (pre-receive, pre-push, check, status, attach, install) and `refs` in `.chant/trust.json`, the checks a ref update needs evidence for (#4867). */
@@ -180,7 +180,15 @@ export const OP_WAVES_CONTROL_BEFORE_MERGE_FLOOR = "0.124.95";
180
180
  export const WAVES_BEFORE_MERGE_LOCKS_FLOOR = "0.124.95";
181
181
  /** The first chant whose kinds file takes `drift: { reader, config }` beside `graph` and whose `chant workspace drift --member` reads a member of such a kind with that module, `(input: { dir, config, member, observedAt, read?, resource?, stack? }) => DriftReaderOutput` from `@intentius/chant/workspace/drift-reader`, checked against `drift-reader.schema.json` (#5068). */
182
182
  export const KIND_DRIFT_READER_FLOOR = "0.124.96";
183
+ /** The first chant whose `chant workspace graph` runs each lexicon's reference catalog over the composed declared graph, across members, on full attributes at every `--detail` (#5097): derived edges in `edges` with `origin: "derived"`, `rule` and `relation`, references to no node in `dangling` with their `rule` and `targetKind`, references to several nodes in `ambiguous` with every candidate, and `catalog` naming the lexicons and members read, each rule named, and per node the arguments not read because not literal; a catalog path takes a quoted key, `metadata.annotations["iam.gke.io/gcp-service-account"]`; and a catalog takes `scopes` and `declaredNode`. */
184
+ export const WORKSPACE_GRAPH_CATALOG_FLOOR = NEXT_RELEASE;
185
+ /** The first chant whose reference catalogs join an Argo CD cluster Secret to the cluster resource (#5101): an Application's `spec.destination.name` and `spec.destination.server` to the Secret whose `name` and `server` match, and the Secret's `name` (base64 `data` decoded) to a `google_container_cluster`, `aws_eks_cluster` or `azurerm_kubernetes_cluster` of that literal name, with a reference no rule of its id matched listed once in `dangling`; a member of kind `argo-app` or `manifests` reads a cluster Secret cut down to its `name` and `server`; and a workspace member entry takes `runsOn`, `<member>/<address>`, with `chant workspace graph --discover --runs-on <member>=<member>/<address>`, which draws a declared edge from each of the member's cluster Secrets to that node. */
186
+ export const WORKSPACE_GRAPH_CLUSTER_JOIN_FLOOR = NEXT_RELEASE;
187
+ /** The first chant whose `chant workspace graph` expands an Argo CD ApplicationSet's `list` and `clusters` generators (#5102): one node per generated Application, with `generatedBy` naming the ApplicationSet, the rule, the generator, the parameters and the cluster Secret it was made for, a derived edge from the ApplicationSet to it under `k8s:K8s::Argo::ApplicationSet:spec.generators` and from it to the cluster Secret a clusters generator selected under `k8s:K8s::Argo::ApplicationSet:generators[].clusters`, and `expansion` on the ApplicationSet with the count and what was not expanded; and whose catalogs read an Application's `spec.source.path`, `spec.sources[].path` and `helm.valueFiles`, listing a path the workspace's own repository does not have in `dangling`, with `through` and `cluster` on a generated one. */
188
+ export const WORKSPACE_GRAPH_APPLICATION_SET_FLOOR = NEXT_RELEASE;
183
189
  /** The first chant whose `chant run resume` (`resumeGateRun`) on GitLab retries a wave job's `<wave job>-evidence` with the wave job when the evidence job already ran, and whose `ci evidence sign --from-job` waits for a job it reads to finish, so a resumed wave's evidence job signs from the new try (#4978). */
184
190
  export const GITLAB_WAVE_EVIDENCE_RETRY_FLOOR = "0.124.89";
185
191
  /** The first chant whose terraform lexicon's engine runs carry what a product's own command tracing read: `runBinary` and the engine runner's `exec` and `execSync` answer stderr apart (`Ran.stderr`) and a spawn failure's message (`Ran.error`), a hook's `after` gets a binary that could not be started as a null code with `error`, `commandTrace` ends that span with the message, and `composeCommandHooks` runs a product's own hook and `commandTrace` as one `onCommand` (#5007). */
186
192
  export const TERRAFORM_COMMAND_TRACE_FLOOR = "0.124.91";
193
+ /** The first chant whose product pipeline limits comment commands to logins and teams on GitHub and Forgejo (INTENTIUS/terragucci#1461): `commentAllow: { allow, tokenSecret? }` in `productPipelineJobs`, where `allow` maps `plan`, `apply`, `lock`, `unlock`, `agent` and `default` to logins and `team:<org>/<team>` entries. The map is written as `CHANT_COMMENT_ALLOW` into the comment job, the product plan's re-plan decision and the agent's jobs (a spec's `agent.commentAllow`), so it is read from the workflow on the default branch. `answerProductComment` takes `allow` and replies to a commenter the list leaves out, `ForgeReads.teamMember` reads a team on GitHub and Forgejo, `CHANT_COMMENT_ALLOW_TOKEN` (`tokenSecret`) carries a token that can read teams, and a team the forge cannot answer for fails closed with a message. */
194
+ export const COMMENT_ALLOW_FLOOR = NEXT_RELEASE;
@@ -0,0 +1,29 @@
1
+ /** The checkout a directory is in. */
2
+ export interface RepoTree {
3
+ /** The checkout's root, or the directory itself when it is in none. */
4
+ root: string;
5
+ /** The `origin` remote's URL, when the directory is in a checkout that has one. */
6
+ origin?: string;
7
+ }
8
+ /** The checkout `dir` is in, read once per directory. */
9
+ export declare function repoTreeOf(dir: string): RepoTree;
10
+ /** Whether two repository URLs name the same repository: the same host and path, whatever the scheme, user, case or `.git` suffix. */
11
+ export declare function sameRepository(a: string | undefined, b: string | undefined): boolean;
12
+ export type RepoPathStatus = "found" | "missing" | "elsewhere";
13
+ export interface RepoPathResolution {
14
+ status: RepoPathStatus;
15
+ /** The path from the checkout's root, with `.` and `..` folded, or the path as given when it leaves the checkout. */
16
+ path: string;
17
+ }
18
+ export interface ResolveRepoPathOptions {
19
+ /** Whether the path names a directory (the default) or a file. */
20
+ type?: "dir" | "file";
21
+ /** Treat a tree with no `origin` remote as another repository. Default false. */
22
+ requireOrigin?: boolean;
23
+ }
24
+ /**
25
+ * Resolve `path`, which a manifest in the tree at `dir` names inside the
26
+ * repository `repoURL`. See the module comment for the three answers.
27
+ */
28
+ export declare function resolveRepoPath(dir: string, repoURL: string | undefined, path: string, opts?: ResolveRepoPathOptions): RepoPathResolution;
29
+ //# sourceMappingURL=repo-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repo-path.d.ts","sourceRoot":"","sources":["../src/repo-path.ts"],"names":[],"mappings":"AA4BA,sCAAsC;AACtC,MAAM,WAAW,QAAQ;IACvB,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAYD,yDAAyD;AACzD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAShD;AAED,sIAAsI;AACtI,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAKpF;AAED,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;AAE/D,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,cAAc,CAAC;IACvB,qHAAqH;IACrH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC,kEAAkE;IAClE,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACtB,iFAAiF;IACjF,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,sBAA2B,GAAG,kBAAkB,CAiB7I"}
@@ -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"}