@intentius/chant 0.124.101 → 0.124.102

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 (101) hide show
  1. package/dist/ci-evidence-claims.d.ts +12 -0
  2. package/dist/ci-evidence-claims.js +12 -0
  3. package/dist/cli/handlers/release-init.js +50 -18
  4. package/dist/cli/handlers/release.d.ts +1 -1
  5. package/dist/cli/handlers/release.js +12 -9
  6. package/dist/cli/release-commands/cut.js +4 -3
  7. package/dist/cli/release-commands/init.js +4 -1
  8. package/dist/cli/release-commands/workflow.js +4 -2
  9. package/dist/cloud-lister/index.d.ts +4 -1
  10. package/dist/cloud-lister/index.js +2 -1
  11. package/dist/cloud-lister/kubernetes-components.d.ts +56 -0
  12. package/dist/cloud-lister/kubernetes-components.js +642 -0
  13. package/dist/cloud-lister/kubernetes.d.ts +18 -0
  14. package/dist/cloud-lister/kubernetes.js +26 -1
  15. package/dist/cloud-lister/mask.d.ts +5 -1
  16. package/dist/cloud-lister/mask.js +14 -5
  17. package/dist/config-import.d.ts +1 -1
  18. package/dist/config-import.js +6 -2
  19. package/dist/config-sandbox.d.ts +1 -1
  20. package/dist/config-sandbox.js +3 -3
  21. package/dist/config.d.ts +75 -1
  22. package/dist/config.js +27 -2
  23. package/dist/deep-observation.js +9 -3
  24. package/dist/floor-table.data.js +12 -6
  25. package/dist/lexicon.d.ts +4 -2
  26. package/dist/lifecycle/__fixtures__/package-files.d.ts +32 -0
  27. package/dist/lifecycle/__fixtures__/package-files.js +72 -0
  28. package/dist/lifecycle/__fixtures__/publish-fakes.js +5 -0
  29. package/dist/lifecycle/publish-credentials.d.ts +1 -1
  30. package/dist/lifecycle/publish-credentials.js +5 -0
  31. package/dist/lifecycle/publish-declaration.d.ts +123 -0
  32. package/dist/lifecycle/publish-declaration.js +140 -0
  33. package/dist/lifecycle/publish-helm.d.ts +83 -0
  34. package/dist/lifecycle/publish-helm.js +452 -0
  35. package/dist/lifecycle/publish-maven.d.ts +79 -0
  36. package/dist/lifecycle/publish-maven.js +364 -0
  37. package/dist/lifecycle/publish-mcp-registry.js +1 -2
  38. package/dist/lifecycle/publish-npm.d.ts +27 -1
  39. package/dist/lifecycle/publish-npm.js +51 -1
  40. package/dist/lifecycle/publish-nuget.d.ts +93 -0
  41. package/dist/lifecycle/publish-nuget.js +377 -0
  42. package/dist/lifecycle/publish-oci.d.ts +57 -1
  43. package/dist/lifecycle/publish-oci.js +1 -1
  44. package/dist/lifecycle/publish-package-files.d.ts +16 -0
  45. package/dist/lifecycle/publish-package-files.js +39 -0
  46. package/dist/lifecycle/publish-pypi.d.ts +2 -0
  47. package/dist/lifecycle/publish-pypi.js +1 -1
  48. package/dist/lifecycle/publish-rubygems.d.ts +84 -0
  49. package/dist/lifecycle/publish-rubygems.js +366 -0
  50. package/dist/lifecycle/publish-targets.d.ts +10 -0
  51. package/dist/lifecycle/publish-targets.js +22 -0
  52. package/dist/lifecycle/publish-train-names.d.ts +4 -1
  53. package/dist/lifecycle/publish-train-names.js +5 -0
  54. package/dist/lifecycle/release-artifacts.d.ts +80 -2
  55. package/dist/lifecycle/release-artifacts.js +242 -5
  56. package/dist/lifecycle/release-cut.d.ts +6 -1
  57. package/dist/lifecycle/release-cut.js +15 -0
  58. package/dist/lifecycle/release-doctor.js +208 -6
  59. package/dist/lifecycle/release-init-registries.d.ts +48 -0
  60. package/dist/lifecycle/release-init-registries.js +97 -0
  61. package/dist/lifecycle/release-init.d.ts +22 -2
  62. package/dist/lifecycle/release-init.js +132 -7
  63. package/dist/lifecycle/release-next.js +1 -2
  64. package/dist/lifecycle/release-publish.d.ts +1 -1
  65. package/dist/lifecycle/release-publish.js +1 -1
  66. package/dist/lifecycle/release-tag.js +1 -2
  67. package/dist/op/local-executor.d.ts +1 -1
  68. package/dist/op/local-executor.js +2 -2
  69. package/dist/op/op-waves-evidence.js +9 -2
  70. package/dist/release-floors.d.ts +1 -1
  71. package/dist/release-floors.js +1 -1
  72. package/dist/sensitive-key.d.ts +12 -0
  73. package/dist/sensitive-key.js +52 -0
  74. package/dist/tool-pins.d.ts +2 -0
  75. package/dist/tool-pins.js +12 -0
  76. package/dist/ts-loader.d.ts +8 -0
  77. package/dist/ts-loader.js +19 -0
  78. package/dist/wave-runtime.mjs +325 -325
  79. package/dist/workspace/lexicon-outputs.d.ts +1 -1
  80. package/dist/workspace/lexicon-outputs.js +1 -1
  81. package/dist/workspace/release-steps/index.js +4 -0
  82. package/dist/workspace/release-steps/nfpm.d.ts +13 -0
  83. package/dist/workspace/release-steps/nfpm.js +29 -0
  84. package/dist/workspace/release-steps/nuget.d.ts +14 -0
  85. package/dist/workspace/release-steps/nuget.js +16 -0
  86. package/dist/workspace/release-steps/targets.d.ts +2 -2
  87. package/dist/workspace/release-steps/targets.js +3 -3
  88. package/dist/workspace/release-train-workflow.d.ts +7 -0
  89. package/dist/workspace/release-train-workflow.js +46 -10
  90. package/dist/workspace/release-workflow.d.ts +28 -3
  91. package/dist/workspace/release-workflow.js +38 -15
  92. package/dist/workspace/train-cut.d.ts +2 -2
  93. package/dist/workspace/train-cut.js +27 -5
  94. package/dist/workspace/train-prepare.d.ts +6 -3
  95. package/dist/workspace/train-prepare.js +54 -8
  96. package/dist/workspace/train-publish.js +2 -3
  97. package/dist/workspace/train-shell.d.ts +5 -0
  98. package/dist/workspace/train-shell.js +17 -0
  99. package/dist/workspace/trust/check-evidence-report.d.ts +3 -7
  100. package/dist/workspace/trust/check-evidence-report.js +3 -7
  101. package/package.json +1 -1
@@ -0,0 +1,48 @@
1
+ /**
2
+ * What `chant release init` finds and plans for Maven, .NET and Ruby
3
+ * projects (#5232): a `pom.xml`, `*.csproj` files or a `*.gemspec` at the
4
+ * project's root, built once at the cut by a `release.artifacts` entry and
5
+ * published by a `maven`, `nuget` or `rubygems` target.
6
+ */
7
+ type Json = string | number | boolean | null | Json[] | {
8
+ [k: string]: Json;
9
+ };
10
+ /** What {@link detectRegistryProjects} found. */
11
+ export interface RegistryProjectFacts {
12
+ maven: {
13
+ groupId: string | null;
14
+ artifactId: string | null;
15
+ } | null;
16
+ /** The `.csproj` files at the root that pack, with their package ids. */
17
+ dotnet: {
18
+ projects: Array<{
19
+ file: string;
20
+ id: string;
21
+ }>;
22
+ } | null;
23
+ ruby: {
24
+ gemspec: string;
25
+ name: string;
26
+ } | null;
27
+ }
28
+ /** The project's own `groupId` and `artifactId` in a `pom.xml`, its parent's `groupId` when it has none. */
29
+ export declare function pomFacts(text: string): NonNullable<RegistryProjectFacts["maven"]>;
30
+ /** The Maven, .NET and Ruby projects at `root`. */
31
+ export declare function detectRegistryProjects(root: string): RegistryProjectFacts;
32
+ /** What the plan adds for these projects. */
33
+ export interface RegistryPlan {
34
+ artifacts: Json[];
35
+ publish: Json[];
36
+ reasons: string[];
37
+ notes: string[];
38
+ registry: string[];
39
+ /** Variables for `release.workflow.env`, on GitHub and Forgejo. */
40
+ env: Record<string, string>;
41
+ }
42
+ /** The artifacts, targets and steps for the Maven, .NET and Ruby projects found. */
43
+ export declare function planRegistryTargets(facts: RegistryProjectFacts, o: {
44
+ forge: "github" | "gitlab" | "forgejo";
45
+ repo: string;
46
+ workflowName: string;
47
+ }): RegistryPlan;
48
+ export {};
@@ -0,0 +1,97 @@
1
+ /**
2
+ * What `chant release init` finds and plans for Maven, .NET and Ruby
3
+ * projects (#5232): a `pom.xml`, `*.csproj` files or a `*.gemspec` at the
4
+ * project's root, built once at the cut by a `release.artifacts` entry and
5
+ * published by a `maven`, `nuget` or `rubygems` target.
6
+ */
7
+ import { existsSync, readdirSync, readFileSync } from "node:fs";
8
+ import { join } from "node:path";
9
+ const read = (p) => {
10
+ try {
11
+ return readFileSync(p, "utf-8");
12
+ }
13
+ catch {
14
+ return null;
15
+ }
16
+ };
17
+ /** The project's own `groupId` and `artifactId` in a `pom.xml`, its parent's `groupId` when it has none. */
18
+ export function pomFacts(text) {
19
+ const body = text.replace(/<!--[\s\S]*?-->/g, "");
20
+ const top = body.replace(/<parent>[\s\S]*?<\/parent>/, "").replace(/<(dependencies|dependencyManagement|build|profiles|plugins|modules)>[\s\S]*?<\/\1>/g, "");
21
+ const get = (s, tag) => new RegExp(`<${tag}>\\s*([^<]+?)\\s*</${tag}>`).exec(s)?.[1] ?? null;
22
+ const parent = /<parent>([\s\S]*?)<\/parent>/.exec(body)?.[1] ?? "";
23
+ return { groupId: get(top, "groupId") ?? get(parent, "groupId"), artifactId: get(top, "artifactId") };
24
+ }
25
+ /** The Maven, .NET and Ruby projects at `root`. */
26
+ export function detectRegistryProjects(root) {
27
+ const pom = read(join(root, "pom.xml"));
28
+ const files = existsSync(root) ? readdirSync(root).sort() : [];
29
+ const projects = files
30
+ .filter((f) => f.endsWith(".csproj"))
31
+ .map((file) => ({ file, text: read(join(root, file)) ?? "" }))
32
+ .filter((p) => !/<IsPackable>\s*false\s*<\/IsPackable>/i.test(p.text))
33
+ .map((p) => ({ file: p.file, id: /<PackageId>\s*([^<]+?)\s*<\/PackageId>/.exec(p.text)?.[1] ?? p.file.slice(0, -".csproj".length) }));
34
+ const gemspec = files.find((f) => f.endsWith(".gemspec"));
35
+ const gemName = gemspec ? (/\.name\s*=\s*["']([^"']+)["']/.exec(read(join(root, gemspec)) ?? "")?.[1] ?? gemspec.slice(0, -".gemspec".length)) : null;
36
+ return {
37
+ maven: pom === null ? null : pomFacts(pom),
38
+ dotnet: projects.length > 0 ? { projects } : null,
39
+ ruby: gemspec && gemName ? { gemspec, name: gemName } : null,
40
+ };
41
+ }
42
+ /** The artifacts, targets and steps for the Maven, .NET and Ruby projects found. */
43
+ export function planRegistryTargets(facts, o) {
44
+ const plan = { artifacts: [], publish: [], reasons: [], notes: [], registry: [], env: {} };
45
+ const secret = (name) => {
46
+ if (o.forge !== "gitlab")
47
+ plan.env[name] = `\${{ secrets.${name} }}`;
48
+ };
49
+ const store = o.forge === "gitlab" ? "masked CI/CD variable" : "secret";
50
+ const trusted = o.forge === "gitlab" ? `GitLab CI/CD naming ${o.repo} and the top-level pipeline file .gitlab-ci.yml` : `GitHub Actions naming ${o.repo} and the workflow file ${o.workflowName}`;
51
+ const mv = facts.maven;
52
+ if (mv) {
53
+ const coord = mv.groupId && mv.artifactId ? `${mv.groupId}:${mv.artifactId}` : "the project";
54
+ plan.artifacts.push({ name: "maven", build: "mvn -B -ntp deploy -DaltDeploymentRepository=local::file:./target/staging-deploy && cd target/staging-deploy && zip -qr ../central-bundle.zip .", outputs: ["target/central-bundle.zip"] });
55
+ plan.publish.push({ type: "maven", bundle: "artifact:maven" });
56
+ plan.reasons.push(`release.artifacts: ${coord} is deployed once at the cut into target/staging-deploy, zipped as a Central Portal bundle that the release records`);
57
+ plan.reasons.push(`maven target: the bundle, uploaded to the Central Portal and validated at the stage, published to Maven Central at the reveal`);
58
+ plan.notes.push("pom.xml's version is published as written: set it to the release's label before the cut, or use ${revision} and pass -Drevision=\"$CHANT_RELEASE_LABEL\" in the build. Maven Central takes only signed files: the build must sign them, such as with maven-gpg-plugin.");
59
+ secret("MAVEN_CENTRAL_USERNAME");
60
+ secret("MAVEN_CENTRAL_PASSWORD");
61
+ plan.registry.push(`Maven Central ${coord}: verify the namespace ${mv.groupId ?? "<groupId>"} at https://central.sonatype.com, generate a user token, and store its name and password as the ${store}s MAVEN_CENTRAL_USERNAME and MAVEN_CENTRAL_PASSWORD. Give the cut job the GPG key the build signs with, and publish the key's public half to a keyserver.`);
62
+ }
63
+ const dn = facts.dotnet;
64
+ if (dn) {
65
+ const ids = dn.projects.map((p) => p.id).join(", ");
66
+ const pack = dn.projects.map((p) => `dotnet pack ${p.file} -c Release -o dist/nuget -p:Version="$CHANT_RELEASE_LABEL"`).join(" && ");
67
+ plan.artifacts.push({ name: "nuget", build: pack, outputs: ["dist/nuget/*.nupkg"] });
68
+ const tp = o.forge !== "forgejo";
69
+ plan.publish.push({ type: "nuget", packages: ["artifact:nuget"], auth: tp ? "trusted-publishing" : "token" });
70
+ plan.reasons.push(`release.artifacts: ${ids} packed once at the cut with dotnet pack, at the release's label, and the release records each .nupkg`);
71
+ plan.reasons.push(`nuget target: the recorded packages, pushed to nuget.org ${tp ? "with trusted publishing" : "with the API key in NUGET_API_KEY"}`);
72
+ if (tp) {
73
+ secret("NUGET_USER");
74
+ plan.registry.push(`nuget.org ${ids}: add a trusted publishing policy for ${trusted}, and store the nuget.org profile name of the user who created it (not the email address) as the ${store} NUGET_USER.`);
75
+ }
76
+ else {
77
+ secret("NUGET_API_KEY");
78
+ plan.registry.push(`nuget.org ${ids}: create an API key that may push ${dn.projects.length === 1 ? "the package" : "the packages"} and store it as the secret NUGET_API_KEY; nuget.org has no trusted publishing for this forge.`);
79
+ }
80
+ }
81
+ const rb = facts.ruby;
82
+ if (rb) {
83
+ plan.artifacts.push({ name: "gem", build: `gem build ${rb.gemspec} && mkdir -p dist/gem && mv ${rb.name}-*.gem dist/gem/`, outputs: ["dist/gem/*.gem"] });
84
+ const tp = o.forge === "github";
85
+ plan.publish.push({ type: "rubygems", gems: ["artifact:gem"], auth: tp ? "trusted-publishing" : "token" });
86
+ plan.reasons.push(`release.artifacts: ${rb.name} is built once at the cut with gem build, and the release records the .gem`);
87
+ plan.reasons.push(`rubygems target: the recorded gem, pushed to RubyGems.org ${tp ? "with trusted publishing" : "with the API key in GEM_HOST_API_KEY"}`);
88
+ plan.notes.push(`${rb.gemspec}'s version is published as the gemspec sets it: set it to the release's label before the cut, or read it from CHANT_RELEASE_LABEL in the gemspec.`);
89
+ if (tp)
90
+ plan.registry.push(`RubyGems.org ${rb.name}: add a trusted publisher for GitHub Actions naming ${o.repo} and the workflow file ${o.workflowName} (a pending trusted publisher if the gem does not exist yet).`);
91
+ else {
92
+ secret("GEM_HOST_API_KEY");
93
+ plan.registry.push(`RubyGems.org ${rb.name}: create an API key with the push scope and store it as the ${store} GEM_HOST_API_KEY; RubyGems.org has no trusted publishing for this forge.`);
94
+ }
95
+ }
96
+ return plan;
97
+ }
@@ -4,7 +4,8 @@
4
4
  *
5
5
  * It reads the project ({@link detectProject}): the package.json and its
6
6
  * npm, pnpm or yarn workspaces, go.mod, Cargo.toml, pyproject.toml,
7
- * Dockerfiles, a goreleaser config, the forge `origin` names, and the tags
7
+ * Dockerfiles, a goreleaser config, Helm charts and an nfpm config (#5233),
8
+ * the forge `origin` names, and the tags
8
9
  * releases were made under so far. From that it plans a `release` block
9
10
  * ({@link planRelease}): the tag template, `legacyTags`, the green gate, the
10
11
  * version stamping, the publish targets it can infer, and a dispatched
@@ -16,7 +17,8 @@
16
17
  * the forge. Everything it can't set up from the repository, such as an npm
17
18
  * trusted publisher, is a step printed for a person ({@link ReleaseInitPlan.registry}).
18
19
  */
19
- export type ReleaseInitCode = "release-init-release-exists" | "release-init-config-unreadable" | "release-init-workflow-exists" | "release-init-not-a-project" | "release-init-member-exists";
20
+ import { type RegistryProjectFacts } from "./release-init-registries.js";
21
+ export type ReleaseInitCode = "release-init-release-exists" | "release-init-config-unreadable" | "release-init-workflow-exists" | "release-init-not-a-project" | "release-init-member-exists" | "release-init-tsx-missing";
20
22
  /** A refusal of `chant release init`, with its code. */
21
23
  export declare class ReleaseInitError extends Error {
22
24
  readonly code: ReleaseInitCode;
@@ -56,6 +58,12 @@ export interface ProjectFacts {
56
58
  workflowForge: "github" | "gitlab" | "forgejo";
57
59
  /** Other CI files at the repository root, which give a commit checks: workflow files other than chant's release, or `.gitlab-ci.yml`. */
58
60
  ciFiles: string[];
61
+ /**
62
+ * Workflow files under `.github/workflows` that chant did not write and that
63
+ * run `npm publish` (or pnpm's or yarn's), for this project: an npm trusted
64
+ * publisher names one such file, so the release workflow takes its place.
65
+ */
66
+ publishWorkflows?: string[];
59
67
  node: {
60
68
  manager: NodeManager;
61
69
  lockfile: string | null;
@@ -96,12 +104,24 @@ export interface ProjectFacts {
96
104
  /** The config builds images (`dockers:` or `kos:`). */
97
105
  images: boolean;
98
106
  } | null;
107
+ /** Helm charts (#5233): each directory holding a `Chart.yaml`, from the project root, and the chart's name. A chart inside another's directory is its subchart and is not listed. */
108
+ charts?: Array<{
109
+ dir: string;
110
+ name: string | null;
111
+ }>;
112
+ /** An nfpm config (#5233), and whether its `version` follows the label chant passes. */
113
+ nfpm?: {
114
+ file: string;
115
+ version: boolean;
116
+ } | null;
99
117
  /** The tags releases were made under. */
100
118
  tags: TagHistory;
101
119
  /** `ci.green` is declared or `ci/green/` tags exist. */
102
120
  chantCi: boolean;
103
121
  /** `.gitignore` ignores `dist/`. */
104
122
  distIgnored: boolean;
123
+ /** A `pom.xml`, `*.csproj` files or a `*.gemspec` at the root (#5232). */
124
+ registries?: RegistryProjectFacts;
105
125
  }
106
126
  /** The release tags a repository holds, grouped by what comes before the version. */
107
127
  export interface TagHistory {
@@ -4,7 +4,8 @@
4
4
  *
5
5
  * It reads the project ({@link detectProject}): the package.json and its
6
6
  * npm, pnpm or yarn workspaces, go.mod, Cargo.toml, pyproject.toml,
7
- * Dockerfiles, a goreleaser config, the forge `origin` names, and the tags
7
+ * Dockerfiles, a goreleaser config, Helm charts and an nfpm config (#5233),
8
+ * the forge `origin` names, and the tags
8
9
  * releases were made under so far. From that it plans a `release` block
9
10
  * ({@link planRelease}): the tag template, `legacyTags`, the green gate, the
10
11
  * version stamping, the publish targets it can infer, and a dispatched
@@ -19,7 +20,9 @@
19
20
  import { execFileSync } from "node:child_process";
20
21
  import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
21
22
  import { basename, join, posix, relative, sep } from "node:path";
23
+ import { GENERATED_MARKER } from "../discovery/files.js";
22
24
  import { forgeOfRemote } from "../forge-remote.js";
25
+ import { detectRegistryProjects, planRegistryTargets } from "./release-init-registries.js";
23
26
  /** A refusal of `chant release init`, with its code. */
24
27
  export class ReleaseInitError extends Error {
25
28
  constructor(code, message, fix) {
@@ -202,6 +205,28 @@ function findDockerfiles(root) {
202
205
  walk("", 2);
203
206
  return out.sort((a, b) => a.split("/").length - b.split("/").length || a.localeCompare(b));
204
207
  }
208
+ /** Directories holding a `Chart.yaml`, up to three levels down, not looking inside a chart (#5233). */
209
+ function findCharts(root) {
210
+ const out = [];
211
+ const walk = (rel, depth) => {
212
+ const here = join(root, rel);
213
+ if (existsSync(join(here, "Chart.yaml")) && !isDir(join(here, "Chart.yaml"))) {
214
+ out.push({ dir: rel || ".", name: /^name:[ \t]*["']?([^"'\s#]+)/m.exec(readText(join(here, "Chart.yaml")) ?? "")?.[1] ?? null });
215
+ return;
216
+ }
217
+ if (depth === 0)
218
+ return;
219
+ for (const e of safeReaddir(here)) {
220
+ const p = rel ? `${rel}/${e}` : e;
221
+ if (!SKIP_DIRS.has(e) && !e.startsWith(".") && isDir(join(root, p)))
222
+ walk(p, depth - 1);
223
+ }
224
+ };
225
+ walk("", 3);
226
+ return out.sort((a, b) => a.dir.localeCompare(b.dir));
227
+ }
228
+ /** The nfpm config files `release init` looks for (#5233). */
229
+ const NFPM_FILES = ["nfpm.yaml", "nfpm.yml", ".nfpm.yaml", ".nfpm.yml"];
205
230
  const GORELEASER_FILES = [".goreleaser.yaml", ".goreleaser.yml", "goreleaser.yaml", "goreleaser.yml"];
206
231
  /** Whether a goreleaser config sets `snapshot.version_template` to the release label. */
207
232
  export function goreleaserFacts(text) {
@@ -261,6 +286,15 @@ export function detectProject(root) {
261
286
  ...[".github/workflows", ".forgejo/workflows", ".gitea/workflows"].flatMap((d) => safeReaddir(join(top, d)).filter((f) => /\.ya?ml$/.test(f) && f !== "chant-release.yml").map((f) => `${d}/${f}`)),
262
287
  ...(existsSync(join(top, ".gitlab-ci.yml")) ? [".gitlab-ci.yml"] : []),
263
288
  ];
289
+ const publishWorkflows = ciFiles.filter((f) => {
290
+ if (!f.startsWith(".github/workflows/"))
291
+ return false;
292
+ const text = readText(join(top, f));
293
+ if (text === null || text.includes(GENERATED_MARKER) || !NPM_PUBLISH.test(text))
294
+ return false;
295
+ // A project below the repository root: only a workflow that names its directory publishes it.
296
+ return path === null || text.includes(path);
297
+ });
264
298
  let node = null;
265
299
  const rootPkg = readPackage(root, ".");
266
300
  if (rootPkg) {
@@ -285,6 +319,8 @@ export function detectProject(root) {
285
319
  const python = pyproject === null ? (existsSync(join(root, "setup.py")) ? { name: null, pyproject: false, version: false } : null) : pyprojectFacts(pyproject);
286
320
  const grFile = GORELEASER_FILES.find((f) => existsSync(join(root, f)));
287
321
  const goreleaser = grFile ? { file: grFile, ...goreleaserFacts(readText(join(root, grFile)) ?? "") } : null;
322
+ const nfpmFile = NFPM_FILES.find((f) => existsSync(join(root, f)));
323
+ const nfpmVersion = nfpmFile ? /^version:[ \t]*["']?[^\n]*\$\{?CHANT_RELEASE_(VERSION|LABEL)/m.test(readText(join(root, nfpmFile)) ?? "") : false;
288
324
  const tagList = (git(top, ["tag", "--list"]) ?? "").split("\n").map((t) => t.trim()).filter(Boolean);
289
325
  const chantDecl = readJson(join(root, "chant.workspace.json"));
290
326
  const ciGreen = !!(chantDecl?.ci && typeof chantDecl.ci === "object" && chantDecl.ci.green);
@@ -294,17 +330,40 @@ export function detectProject(root) {
294
330
  origin,
295
331
  workflowForge,
296
332
  ciFiles,
333
+ publishWorkflows,
297
334
  node,
298
335
  go,
299
336
  rust,
300
337
  python,
301
338
  dockerfiles: findDockerfiles(root),
302
339
  goreleaser,
340
+ charts: findCharts(root),
341
+ nfpm: nfpmFile ? { file: nfpmFile, version: nfpmVersion } : null,
303
342
  tags: readTagHistory(tagList),
304
343
  chantCi: ciGreen || tagList.some((t) => t.startsWith("ci/green/") || /^ci\/green-[^/]+\//.test(t)),
305
344
  distIgnored: /^\/?dist\/?\s*$/m.test(gitignore) || /^\/?dist\/\*\s*$/m.test(gitignore),
345
+ registries: detectRegistryProjects(root),
306
346
  };
307
347
  }
348
+ /** A command that publishes to npm: `npm publish`, `pnpm publish`, `yarn publish` or `yarn npm publish`. */
349
+ const NPM_PUBLISH = /\b(?:npm|pnpm|yarn(?:\s+npm)?)\s+publish\b/;
350
+ /** The default release workflow file for a forge, from the repository root. */
351
+ const DEFAULT_WORKFLOW_FILES = { github: ".github/workflows/chant-release.yml", forgejo: ".forgejo/workflows/chant-release.yml", gitlab: ".gitlab/chant-release.yml" };
352
+ /**
353
+ * The workflow file a release that publishes to npm runs from: the one
354
+ * workflow under `.github/workflows` that already runs `npm publish`, since
355
+ * the package's npm trusted publisher names that file, else chant's default.
356
+ * Several such files adopt none, and say so in `notes`.
357
+ */
358
+ function releaseWorkflowFile(facts, publishesNpm, notes) {
359
+ const forge = facts.workflowForge;
360
+ const found = forge === "github" && publishesNpm ? (facts.publishWorkflows ?? []) : [];
361
+ if (found.length === 1)
362
+ return { file: found[0], adopted: true };
363
+ if (found.length > 1)
364
+ notes.push(`Several workflows run npm publish (${found.join(", ")}), so the release workflow is a new file: set release.workflow.file to the one npm's trusted publisher names to release from it instead.`);
365
+ return { file: DEFAULT_WORKFLOW_FILES[forge], adopted: false };
366
+ }
308
367
  /** Packages in dependency order: each after the packages of the list it depends on, ties by directory. */
309
368
  export function dependencyOrder(pkgs) {
310
369
  const byName = new Map(pkgs.filter((p) => p.name).map((p) => [p.name, p]));
@@ -411,10 +470,12 @@ export function planRelease(facts, opts) {
411
470
  const publish = [];
412
471
  const workflow = { trigger: "dispatch" };
413
472
  const forge = facts.workflowForge;
414
- const workflowFile = { github: ".github/workflows/chant-release.yml", forgejo: ".forgejo/workflows/chant-release.yml", gitlab: ".gitlab/chant-release.yml" }[forge];
415
- const workflowName = posix.basename(workflowFile);
416
473
  const node0 = facts.node;
417
474
  const publishedCount = node0 ? (node0.workspaces ? [...(node0.root.private ? [] : [node0.root]), ...node0.workspaces] : [node0.root]).filter((p) => p.name && !p.private && !p.vscode).length : 0;
475
+ const { file: workflowFile, adopted } = releaseWorkflowFile(facts, publishedCount > 0, notes);
476
+ const workflowName = posix.basename(workflowFile);
477
+ if (adopted)
478
+ workflow.file = workflowFile;
418
479
  const tag = tagTemplateOf(facts, publishedCount);
419
480
  release.tag = tag.template;
420
481
  reasons.push(tag.reason);
@@ -450,7 +511,9 @@ export function planRelease(facts, opts) {
450
511
  reasons.push(`release.version: the release stamps its label into ${dirs.length === 1 ? "the package's" : "each package's"} package.json, so a release needs no version commit${internal ? '; ranges "exact", so each package depends on the versions released beside it' : ""}`);
451
512
  const list = packages.map((p) => p.name).join(", ");
452
513
  const one = packages.length === 1;
453
- registry.push(`npm ${list}: on npmjs.com, add a trusted publisher to ${one ? "the package" : "each package"} for ${forge === "gitlab" ? `GitLab CI/CD naming ${facts.origin?.repo ?? "this project"} and the top-level config .gitlab-ci.yml` : `${forge === "github" ? "GitHub Actions" : "this forge"} naming ${facts.origin?.repo ?? "this repository"} and the workflow file ${workflowName}`}, and allow npm dist-tag, since the reveal moves latest. A package that is not on npm yet needs its first version published by hand before it has settings.`);
514
+ registry.push(adopted
515
+ ? `npm ${list}: the trusted publisher on npmjs.com that names ${facts.origin?.repo ?? "this repository"} and the workflow file ${workflowName} keeps working, since the release runs from that file; edit it to allow npm dist-tag, since the reveal moves latest.${one ? "" : " A package with no trusted publisher yet needs one naming the same file."}`
516
+ : `npm ${list}: on npmjs.com, add a trusted publisher to ${one ? "the package" : "each package"} for ${forge === "gitlab" ? `GitLab CI/CD naming ${facts.origin?.repo ?? "this project"} and the top-level config .gitlab-ci.yml` : `${forge === "github" ? "GitHub Actions" : "this forge"} naming ${facts.origin?.repo ?? "this repository"} and the workflow file ${workflowName}`}, and allow npm dist-tag, since the reveal moves latest. A package that is not on npm yet needs its first version published by hand before it has settings.`);
454
517
  }
455
518
  if (skipped.length > 0)
456
519
  notes.push(`Not published, being private: ${skipped.map((p) => p.name).join(", ")}.`);
@@ -516,6 +579,44 @@ export function planRelease(facts, opts) {
516
579
  else
517
580
  notes.push(`No forge release is declared for ${gr.file}'s files: origin names no GitHub, GitLab or Forgejo repository.`);
518
581
  }
582
+ // #5233: Helm charts, packed at the cut and pushed to the registry beside the images.
583
+ const charts = facts.charts ?? [];
584
+ if (charts.length > 0) {
585
+ const entries = charts.map((c, n) => ({ name: charts.length === 1 ? "chart" : `chart-${(c.name ?? `${n + 1}`).toLowerCase().replace(/[^a-z0-9._-]+/g, "-")}`, chart: c.dir }));
586
+ release.artifacts = [...(release.artifacts ?? []), ...entries.map((e) => ({ name: e.name, helm: { chart: e.chart } }))];
587
+ reasons.push(`release.artifacts: ${charts.map((c) => `${c.dir}/Chart.yaml`.replace(/^\.\//, "")).join(", ")} packed once at the cut, with the chart's version set from the label`);
588
+ const repository = imageRepository(facts.origin, "charts", false);
589
+ if (repository) {
590
+ publish.push({ type: "helm", charts: entries.map((e) => `artifact:${e.name}`), oci: { repository } });
591
+ reasons.push(`helm target: ${charts.length === 1 ? "the chart" : "each chart"} pushed to ${repository}/<chart>, tagged with its version, for helm install oci://${repository}/<chart>`);
592
+ if (repository.startsWith("ghcr.io/"))
593
+ registry.push(`${repository}: the workflow pushes the charts with the run's token. The first push makes each package private; make it public in the package's settings if it should be.`);
594
+ else
595
+ registry.push(`${repository}: set OCI_USERNAME and OCI_PASSWORD for the release workflow, as ${forge === "gitlab" ? "masked CI/CD variables" : "secrets in release.workflow.env"}, with push access to the registry.`);
596
+ }
597
+ else
598
+ notes.push(`The charts are packed into release.artifacts, and no helm target is declared: origin names no registry chant knows. Add { type: "helm", charts: [${entries.map((e) => `"artifact:${e.name}"`).join(", ")}], oci: { repository: "<registry>/<path>" } }.`);
599
+ }
600
+ // #5233: Linux packages nfpm builds, attached to the forge release.
601
+ if (facts.nfpm) {
602
+ const nf = facts.nfpm;
603
+ release.artifacts = [...(release.artifacts ?? []), { name: "packages", nfpm: nf.file === "nfpm.yaml" ? {} : { config: nf.file } }];
604
+ reasons.push(`release.artifacts: ${nf.file} packages a deb and an rpm once at the cut with nfpm, and the release records each`);
605
+ notes.push(`${nf.file} packs files the cut must build first: declare the build that writes them in release.artifacts before "packages".`);
606
+ if (!nf.version)
607
+ notes.push(`Set version: "\${CHANT_RELEASE_VERSION}" in ${nf.file}: the cut refuses a config whose packages would not carry the release's version.`);
608
+ const forgeTarget = publish.find((p) => p.type === "forge");
609
+ if (forgeTarget) {
610
+ forgeTarget.assets = [...forgeTarget.assets, "artifact:packages"];
611
+ reasons.push(`forge target: the deb and rpm packages are attached beside the other assets`);
612
+ }
613
+ else if (facts.origin) {
614
+ publish.push({ type: "forge", forge: facts.origin.kind, repo: facts.origin.repo, assets: ["artifact:packages"], notes: { generate: "forge" } });
615
+ reasons.push(`forge target: the deb and rpm packages as assets of the ${facts.origin.kind} release ${facts.origin.repo}, with generated notes`);
616
+ }
617
+ else
618
+ notes.push(`No forge release is declared for ${nf.file}'s packages: origin names no GitHub, GitLab or Forgejo repository.`);
619
+ }
519
620
  // Python and Rust packages.
520
621
  const versionFiles = [];
521
622
  const trustedRepo = facts.origin?.repo ?? "this repository";
@@ -554,6 +655,18 @@ export function planRelease(facts, opts) {
554
655
  }
555
656
  else if (rs)
556
657
  notes.push(`${rs.name ?? "The crate"} is tagged and not published to crates.io: ${rs.unpublishable ? "Cargo.toml sets publish = false" : "Cargo.toml has no [package] name or [workspace]"}.`);
658
+ // Maven, .NET and Ruby packages (#5232).
659
+ if (facts.registries) {
660
+ const r = planRegistryTargets(facts.registries, { forge, repo: trustedRepo, workflowName });
661
+ if (r.artifacts.length > 0)
662
+ release.artifacts = [...(release.artifacts ?? []), ...r.artifacts];
663
+ publish.push(...r.publish);
664
+ reasons.push(...r.reasons);
665
+ notes.push(...r.notes);
666
+ registry.push(...r.registry);
667
+ if (Object.keys(r.env).length > 0)
668
+ workflow.env = { ...(workflow.env ?? {}), ...r.env };
669
+ }
557
670
  if (versionFiles.length > 0) {
558
671
  const current = release.version ?? {};
559
672
  release.version = { ...current, files: versionFiles };
@@ -567,7 +680,9 @@ export function planRelease(facts, opts) {
567
680
  notes.push("No publish target was found: the release records the commit and makes its tag. Add targets to release.publish as the project needs them.");
568
681
  release.workflow = workflow;
569
682
  reasons.push(`release.workflow: a release started by hand with its label from ${workflowFile}, which cuts a green commit and publishes it`);
570
- if (!facts.distIgnored && (images.length > 0 || facts.goreleaser || publish.some((p) => p.type === "pypi") || publish.some((p) => p.type === "marketplace")))
683
+ if (adopted)
684
+ reasons.push(`release.workflow.file ${workflowFile}: it runs npm publish today, so the npm trusted publisher that names it keeps working; the release workflow replaces it rather than publishing from a second file`);
685
+ if (!facts.distIgnored && (images.length > 0 || facts.goreleaser || charts.length > 0 || facts.nfpm || publish.some((p) => ["pypi", "nuget", "rubygems"].includes(p.type ?? "")) || publish.some((p) => p.type === "marketplace")))
571
686
  notes.push("dist/ is not in .gitignore: the publish refuses a tree with build outputs git does not ignore.");
572
687
  if (forge === "gitlab")
573
688
  registry.push(`GitLab: include ${workflowFile} from .gitlab-ci.yml, and store a project access token with write_repository as the masked CI/CD variable CHANT_RELEASE_TOKEN; the cut and publish jobs push with it.`);
@@ -601,6 +716,10 @@ export function trainFit(facts) {
601
716
  return { train: false, why: `${facts.goreleaser.file} builds files at the cut, which the train workflow does not hand between its jobs` };
602
717
  if (facts.dockerfiles.length > 0)
603
718
  return { train: false, why: `${facts.dockerfiles[0]} is an image built at the cut, which the train workflow does not hand between its jobs` };
719
+ if ((facts.charts?.length ?? 0) > 0)
720
+ return { train: false, why: `${facts.charts[0].dir}/Chart.yaml is a chart packed at the cut, which the train workflow does not hand between its jobs` };
721
+ if (facts.nfpm)
722
+ return { train: false, why: `${facts.nfpm.file} packages files at the cut, which the train workflow does not hand between its jobs` };
604
723
  if (facts.python?.pyproject && facts.python.name)
605
724
  return { train: false, why: "pyproject.toml is built at the cut, which the train workflow does not hand between its jobs" };
606
725
  if (facts.rust && !facts.rust.unpublishable && (facts.rust.name || facts.rust.workspace))
@@ -630,7 +749,7 @@ export function planTrain(facts, opts) {
630
749
  const notes = [];
631
750
  const registry = [];
632
751
  const forge = facts.workflowForge;
633
- const workflowFile = { github: ".github/workflows/chant-release.yml", forgejo: ".forgejo/workflows/chant-release.yml", gitlab: ".gitlab/chant-release.yml" }[forge];
752
+ const { file: workflowFile, adopted } = releaseWorkflowFile(facts, true, notes);
634
753
  const workflowName = posix.basename(workflowFile);
635
754
  const env = TRAIN_ENV;
636
755
  const named = node.workspaces.filter((p) => p.name);
@@ -681,9 +800,13 @@ export function planTrain(facts, opts) {
681
800
  release.green = green;
682
801
  reasons.push(...greenReasons);
683
802
  const workflow = { trigger: "dispatch" };
803
+ if (adopted)
804
+ workflow.file = workflowFile;
684
805
  nodeWorkflow(node, opts, workflow, reasons);
685
806
  release.workflow = workflow;
686
807
  reasons.push(`release.workflow: ${workflowFile}, started by hand with the levels, cuts the train from a green commit and publishes it`);
808
+ if (adopted)
809
+ reasons.push(`release.workflow.file ${workflowFile}: it runs npm publish today, so the npm trusted publishers that name it keep working; the train workflow replaces it rather than publishing from a second file`);
687
810
  for (const m of members) {
688
811
  const tag = m.release.tag;
689
812
  const ranges = m.release.version.ranges;
@@ -697,7 +820,9 @@ export function planTrain(facts, opts) {
697
820
  notes.push(`npm packs a package's chant.config.ts with it unless package.json files or an .npmignore leaves it out: ${packed.map((p) => p.name).join(", ")} ${packed.length === 1 ? "has" : "have"} neither.`);
698
821
  const repo = facts.origin?.repo ?? "this repository";
699
822
  for (const m of members) {
700
- registry.push(`npm ${m.package}: on npmjs.com, add a trusted publisher for ${forge === "github" ? "GitHub Actions" : "this forge"} naming ${repo} and the workflow file ${workflowName}, and allow npm dist-tag, since the reveal moves latest. Every package names the same file. If ${m.package} is not on npm yet, publish its first version by hand from ${m.dir} (npm publish) so it has settings; the train labels the next past it.`);
823
+ registry.push(adopted
824
+ ? `npm ${m.package}: keep the trusted publisher on npmjs.com that names ${repo} and the workflow file ${workflowName}, or add one naming them if the package has none, and allow npm dist-tag on it, since the reveal moves latest. If ${m.package} is not on npm yet, publish its first version by hand from ${m.dir} (npm publish) so it has settings; the train labels the next past it.`
825
+ : `npm ${m.package}: on npmjs.com, add a trusted publisher for ${forge === "github" ? "GitHub Actions" : "this forge"} naming ${repo} and the workflow file ${workflowName}, and allow npm dist-tag, since the reveal moves latest. Every package names the same file. If ${m.package} is not on npm yet, publish its first version by hand from ${m.dir} (npm publish) so it has settings; the train labels the next past it.`);
701
826
  }
702
827
  const workspaceName = memberNameOf({ name: facts.origin?.repo.split("/").pop() ?? node.root.name ?? null, dir: facts.path ?? "workspace" }) || "workspace";
703
828
  return { release, members, workspaceName, reasons, notes, registry, workflowFile, env };
@@ -41,9 +41,8 @@ import { realpathSync } from "node:fs";
41
41
  import { relative } from "node:path";
42
42
  import { classifyCommit } from "./release-changelog.js";
43
43
  import { consumedIntents, maxBump, pendingIntents, readIntents } from "./release-intents.js";
44
- import { NEXT_RELEASE } from "../release-floors.js";
45
44
  /** The first chant with `chant release next` and `chant release cut auto`, the label from the conventional commits and the `.chant/release/*.md` intent files since the member's previous release; a cut records the intent files it consumed (`intents` on its cut line), `release changed` computes each member's bump from them (`bumpFrom`, `intents`, `intent-pending`), notes generated from commits lead with their summaries, and a dispatched release workflow takes the label `auto` (#5159); with no release in the ledger the previous one is the newest version tag `release.tag` or `release.legacyTags` matches (#5200), and on 0.x a breaking commit bumps minor unless `release.breakingOnZero` is `major` (#5191). */
46
- export const RELEASE_NEXT_FLOOR = NEXT_RELEASE;
45
+ export const RELEASE_NEXT_FLOOR = "0.124.101";
47
46
  export class ReleaseNextError extends Error {
48
47
  constructor(code, message, fix) {
49
48
  super(message);
@@ -243,7 +243,7 @@ export declare class PublishTargetError extends Error {
243
243
  constructor(code: string, message: string, fix?: string | undefined);
244
244
  }
245
245
  /** The kinds `release.publish` declares and `createPublishTargets` makes. */
246
- export type ReleasePublishKind = "npm" | "oci" | "forge" | "homebrew" | "marketplace" | "tauri-updater" | "pypi" | "cargo" | "mcp-registry" | "index";
246
+ export type ReleasePublishKind = "npm" | "oci" | "forge" | "homebrew" | "marketplace" | "tauri-updater" | "pypi" | "cargo" | "mcp-registry" | "index" | "helm" | "maven" | "nuget" | "rubygems";
247
247
  /** The npm dist-tag a set of packages is staged under before `latest` moves (#4048), as chant's own releases do (#3903). */
248
248
  export declare const NPM_STAGE_TAG = "next";
249
249
  /**
@@ -87,7 +87,7 @@ export function statusMessage(ctx) {
87
87
  export async function releasePublishTargets(cwd, deps = {}) {
88
88
  const { loadChantConfig } = await import("../config.js");
89
89
  const { createPublishTargets } = await import("./publish-targets.js");
90
- const { config } = await loadChantConfig(cwd);
90
+ const { config } = await loadChantConfig(cwd, { fresh: true });
91
91
  return createPublishTargets(config.release?.publish ?? [], deps);
92
92
  }
93
93
  /**
@@ -33,9 +33,8 @@ import { execFileSync } from "node:child_process";
33
33
  import { existsSync } from "node:fs";
34
34
  import { join, relative, resolve, sep } from "node:path";
35
35
  import { prereleaseOf } from "./release-prerelease.js";
36
- import { NEXT_RELEASE } from "../release-floors.js";
37
36
  /** The first chant with `release.tag` in `chant.config.ts`: the cut makes the tag the template renders (`{version}`, `{label}`, `{member}`, `{path}`), refuses one another member's template can render (`release-tag-collision`), `chant release tag` reads a release back from its tag through the ledger, `chant release publish` moves a `floating` tag at reveal, and `chant release workflow` triggers on the template's tags (#5150). */
38
- export const RELEASE_TAG_FLOOR = NEXT_RELEASE;
37
+ export const RELEASE_TAG_FLOOR = "0.124.101";
39
38
  /** A template refused. */
40
39
  export class ReleaseTagError extends Error {
41
40
  constructor(code, message, fix) {
@@ -27,7 +27,7 @@
27
27
  import type { OpConfig, ActivityStep, GateStep } from "./types.js";
28
28
  import { type ActivityFn, type ActivityProfile } from "./activity-registry.js";
29
29
  import { type GateLedgerPort, type WorkspaceGateStandIn } from "./gate.js";
30
- import { type WorkspaceRunCitation } from "./workspace-run-env.js";
30
+ import type { WorkspaceRunCitation } from "./workspace-run-env.js";
31
31
  import { type GatePointAsker } from "./gate-point-run.js";
32
32
  import type { GateBaseApproval, ResolvedGateApproval } from "./gate-approval.js";
33
33
  import { type GateQuorumSpec } from "./gate-quorum.js";
@@ -34,7 +34,6 @@ import { stepLabel, withRunConsole, withStepConsole } from "./step-console.js";
34
34
  import { stepTimeoutProblem } from "./activity-profiles.js";
35
35
  import { knownOutputsOf } from "./activity-failure.js";
36
36
  import { describeGateMismatch, evaluateGate, gateIsSealed, gitGateLedgerPort } from "./gate.js";
37
- import { resolveWorkspaceRun } from "./workspace-run-env.js";
38
37
  import { gateName } from "./gate-name.js";
39
38
  import { resolveGateAliases } from "./gate-alias.js";
40
39
  import { gatePointOf } from "./gate-point.js";
@@ -1101,7 +1100,8 @@ async function runOpInTurn(config, activities, profiles, signal, options, run, e
1101
1100
  // #4020: the CI run this one is in, in the shape a deploy record carries it.
1102
1101
  const ciRun = resolveCiRun();
1103
1102
  // #2554: the workspace run that started this one, which its record cites.
1104
- const workspaceRun = options.workspaceRun ?? resolveWorkspaceRun();
1103
+ // #5219: read when an Op runs, so a command that only loads the executor loads no workspace module.
1104
+ const workspaceRun = options.workspaceRun ?? (await import("./workspace-run-env.js")).resolveWorkspaceRun();
1105
1105
  // #4041: the run's events name it the way its run record does: its own id,
1106
1106
  // the commit, and the CI run it is in.
1107
1107
  // #4042: a run that writes to the ledger also keeps its events on this host,
@@ -24,8 +24,13 @@
24
24
  */
25
25
  import { execFileSync } from "node:child_process";
26
26
  export { opWavesEvidenceProblems } from "./op-waves-evidence-spec.js";
27
- import { WAVE_EVIDENCE_ENV, writeCheckClaimFile } from "../ci-evidence-claims.js";
28
- import { CHECK_EVIDENCE_KEY_ENV, missingCheckEvidence, recordChecks, RUNNER_IDENTITY_ENV, runnerEvidenceSigner, signChecks } from "../workspace/trust/check-evidence.js";
27
+ import { CHECK_EVIDENCE_KEY_ENV, RUNNER_IDENTITY_ENV, WAVE_EVIDENCE_ENV, writeCheckClaimFile } from "../ci-evidence-claims.js";
28
+ /**
29
+ * The signer is loaded only when a wave reads or signs evidence. A static
30
+ * import would put workspace/trust/ and its imports on every command that
31
+ * reaches the op runner, `chant build` at level 0 among them (#5219).
32
+ */
33
+ const checkEvidence = () => import("../workspace/trust/check-evidence.js");
29
34
  function top(cwd) {
30
35
  return execFileSync("git", ["rev-parse", "--show-toplevel"], { cwd, encoding: "utf-8", stdio: ["ignore", "pipe", "pipe"] }).trim();
31
36
  }
@@ -33,6 +38,7 @@ function top(cwd) {
33
38
  export async function opWaveEvidenceRefusal(cwd, head, base, requires) {
34
39
  if (!requires || requires.length === 0)
35
40
  return null;
41
+ const { missingCheckEvidence } = await checkEvidence();
36
42
  return missingCheckEvidence(top(cwd), head, base, requires);
37
43
  }
38
44
  export { WAVE_EVIDENCE_ENV };
@@ -59,6 +65,7 @@ export async function signOpWaveChecks(input) {
59
65
  if (!env[CHECK_EVIDENCE_KEY_ENV] && !env[RUNNER_IDENTITY_ENV])
60
66
  return [];
61
67
  try {
68
+ const { recordChecks, runnerEvidenceSigner, signChecks } = await checkEvidence();
62
69
  const repo = top(input.cwd);
63
70
  const signer = (await runnerEvidenceSigner(repo, input.base, { env, ...(input.fetch ? { fetch: input.fetch } : {}) }));
64
71
  const rows = [...input.policyRows.values()];
@@ -26,7 +26,7 @@
26
26
  * files rather than to the end of this one. The floors below were declared
27
27
  * here before that and keep the subpath they shipped under.
28
28
  */
29
- export declare const NEXT_RELEASE = "0.124.101";
29
+ export declare const NEXT_RELEASE = "0.124.102";
30
30
  /** 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). */
31
31
  export declare const LOCAL_CHANT_FLOOR = "0.124.86";
32
32
  /** 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). */
@@ -26,7 +26,7 @@
26
26
  * files rather than to the end of this one. The floors below were declared
27
27
  * here before that and keep the subpath they shipped under.
28
28
  */
29
- export const NEXT_RELEASE = "0.124.101";
29
+ export const NEXT_RELEASE = "0.124.102";
30
30
  /** 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). */
31
31
  export const LOCAL_CHANT_FLOOR = "0.124.86";
32
32
  /** 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). */
@@ -43,3 +43,15 @@ export declare const REFERENCE_KEYS: ReadonlySet<string>;
43
43
  * could be one never passes on the strength of its key.
44
44
  */
45
45
  export declare function isReferenceField(key: string, value: unknown): boolean;
46
+ /**
47
+ * The readable view of a Secret reference in a pod spec (chant#5252), or
48
+ * undefined when `pattern` is not one or `value` names no Secret. The name
49
+ * stays (`volumes[].secret.secretName`, `secretKeyRef.name`,
50
+ * `envFrom[].secretRef.name`, `imagePullSecrets[].name`) and every other
51
+ * field becomes `masked`, so a Secret's key names and options stay hidden
52
+ * as before. Both masking passes call it (the lister's and the deep
53
+ * observation's), on the declared and the live side alike, so the two sides
54
+ * still compare equal. A value that is already `masked` is not a view and
55
+ * gives undefined.
56
+ */
57
+ export declare function podSecretNameView(pattern: string, value: unknown, masked: string): unknown;