@intentius/chant 0.124.100 → 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.
- package/dist/action-pins.d.ts +2 -0
- package/dist/action-pins.js +3 -0
- package/dist/ci-detect.d.ts +13 -0
- package/dist/ci-detect.js +12 -0
- package/dist/ci-evidence-claims.d.ts +12 -0
- package/dist/ci-evidence-claims.js +12 -0
- package/dist/ci-system.d.ts +66 -0
- package/dist/ci-system.js +61 -0
- package/dist/cli/handlers/build.js +27 -0
- package/dist/cli/handlers/release-doctor.d.ts +12 -0
- package/dist/cli/handlers/release-doctor.js +118 -0
- package/dist/cli/handlers/release-init.d.ts +10 -0
- package/dist/cli/handlers/release-init.js +374 -0
- package/dist/cli/handlers/release.d.ts +43 -2
- package/dist/cli/handlers/release.js +667 -39
- package/dist/cli/handlers/run-generate.js +11 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +44 -101
- package/dist/cli/parse-args.js +48 -0
- package/dist/cli/registry.d.ts +16 -0
- package/dist/cli/release-commands/artifacts.d.ts +3 -0
- package/dist/cli/release-commands/artifacts.js +14 -0
- package/dist/cli/release-commands/candidates.d.ts +3 -0
- package/dist/cli/release-commands/candidates.js +16 -0
- package/dist/cli/release-commands/changed.d.ts +3 -0
- package/dist/cli/release-commands/changed.js +14 -0
- package/dist/cli/release-commands/compose.d.ts +3 -0
- package/dist/cli/release-commands/compose.js +16 -0
- package/dist/cli/release-commands/cut.d.ts +3 -0
- package/dist/cli/release-commands/cut.js +50 -0
- package/dist/cli/release-commands/doctor.d.ts +3 -0
- package/dist/cli/release-commands/doctor.js +14 -0
- package/dist/cli/release-commands/export.d.ts +3 -0
- package/dist/cli/release-commands/export.js +12 -0
- package/dist/cli/release-commands/images.d.ts +3 -0
- package/dist/cli/release-commands/images.js +13 -0
- package/dist/cli/release-commands/index.d.ts +8 -0
- package/dist/cli/release-commands/index.js +52 -0
- package/dist/cli/release-commands/init.d.ts +3 -0
- package/dist/cli/release-commands/init.js +19 -0
- package/dist/cli/release-commands/list.d.ts +3 -0
- package/dist/cli/release-commands/list.js +10 -0
- package/dist/cli/release-commands/next.d.ts +3 -0
- package/dist/cli/release-commands/next.js +13 -0
- package/dist/cli/release-commands/publish.d.ts +3 -0
- package/dist/cli/release-commands/publish.js +22 -0
- package/dist/cli/release-commands/stamp.d.ts +3 -0
- package/dist/cli/release-commands/stamp.js +15 -0
- package/dist/cli/release-commands/status.d.ts +3 -0
- package/dist/cli/release-commands/status.js +17 -0
- package/dist/cli/release-commands/tag.d.ts +3 -0
- package/dist/cli/release-commands/tag.js +12 -0
- package/dist/cli/release-commands/types.d.ts +20 -0
- package/dist/cli/release-commands/types.js +1 -0
- package/dist/cli/release-commands/verify.d.ts +3 -0
- package/dist/cli/release-commands/verify.js +15 -0
- package/dist/cli/release-commands/workflow.d.ts +3 -0
- package/dist/cli/release-commands/workflow.js +15 -0
- package/dist/cloud-lister/index.d.ts +4 -1
- package/dist/cloud-lister/index.js +2 -1
- package/dist/cloud-lister/kubernetes-components.d.ts +56 -0
- package/dist/cloud-lister/kubernetes-components.js +642 -0
- package/dist/cloud-lister/kubernetes.d.ts +18 -0
- package/dist/cloud-lister/kubernetes.js +26 -1
- package/dist/cloud-lister/mask.d.ts +5 -1
- package/dist/cloud-lister/mask.js +14 -5
- package/dist/components/cli-support.d.ts +1 -1
- package/dist/components/cli-support.js +1 -1
- package/dist/config-environments.d.ts +8 -1
- package/dist/config-environments.js +2 -0
- package/dist/config-import.d.ts +1 -1
- package/dist/config-import.js +6 -2
- package/dist/config-sandbox.d.ts +1 -1
- package/dist/config-sandbox.js +3 -3
- package/dist/config.d.ts +369 -10
- package/dist/config.js +127 -7
- package/dist/deep-observation.js +9 -3
- package/dist/floor-table.data.js +21 -1
- package/dist/forge-remote.d.ts +13 -0
- package/dist/forge-remote.js +15 -0
- package/dist/lexicon.d.ts +45 -4
- package/dist/lifecycle/__fixtures__/package-files.d.ts +32 -0
- package/dist/lifecycle/__fixtures__/package-files.js +72 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.d.ts +62 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.js +275 -3
- package/dist/lifecycle/publish-attachments.d.ts +2 -1
- package/dist/lifecycle/publish-attachments.js +19 -2
- package/dist/lifecycle/publish-cargo.d.ts +99 -0
- package/dist/lifecycle/publish-cargo.js +412 -0
- package/dist/lifecycle/publish-credentials.d.ts +1 -1
- package/dist/lifecycle/publish-credentials.js +13 -0
- package/dist/lifecycle/publish-declaration.d.ts +322 -4
- package/dist/lifecycle/publish-declaration.js +340 -9
- package/dist/lifecycle/publish-forge.d.ts +45 -2
- package/dist/lifecycle/publish-forge.js +434 -34
- package/dist/lifecycle/publish-git-ssh.d.ts +15 -0
- package/dist/lifecycle/publish-git-ssh.js +30 -4
- package/dist/lifecycle/publish-github.d.ts +40 -2
- package/dist/lifecycle/publish-github.js +100 -3
- package/dist/lifecycle/publish-helm.d.ts +83 -0
- package/dist/lifecycle/publish-helm.js +452 -0
- package/dist/lifecycle/publish-homebrew.d.ts +7 -9
- package/dist/lifecycle/publish-homebrew.js +34 -197
- package/dist/lifecycle/publish-index.d.ts +141 -0
- package/dist/lifecycle/publish-index.js +719 -0
- package/dist/lifecycle/publish-marketplace.js +77 -0
- package/dist/lifecycle/publish-maven.d.ts +79 -0
- package/dist/lifecycle/publish-maven.js +364 -0
- package/dist/lifecycle/publish-mcp-registry.d.ts +66 -0
- package/dist/lifecycle/publish-mcp-registry.js +305 -0
- package/dist/lifecycle/publish-npm.d.ts +27 -1
- package/dist/lifecycle/publish-npm.js +216 -3
- package/dist/lifecycle/publish-nuget.d.ts +93 -0
- package/dist/lifecycle/publish-nuget.js +377 -0
- package/dist/lifecycle/publish-oci.d.ts +91 -2
- package/dist/lifecycle/publish-oci.js +247 -8
- package/dist/lifecycle/publish-package-files.d.ts +16 -0
- package/dist/lifecycle/publish-package-files.js +39 -0
- package/dist/lifecycle/publish-pypi.d.ts +138 -0
- package/dist/lifecycle/publish-pypi.js +657 -0
- package/dist/lifecycle/publish-record.d.ts +6 -3
- package/dist/lifecycle/publish-record.js +6 -3
- package/dist/lifecycle/publish-rubygems.d.ts +84 -0
- package/dist/lifecycle/publish-rubygems.js +366 -0
- package/dist/lifecycle/publish-signing.d.ts +147 -0
- package/dist/lifecycle/publish-signing.js +257 -0
- package/dist/lifecycle/publish-targets.d.ts +37 -1
- package/dist/lifecycle/publish-targets.js +102 -0
- package/dist/lifecycle/publish-tauri.js +43 -0
- package/dist/lifecycle/publish-train-names.d.ts +57 -0
- package/dist/lifecycle/publish-train-names.js +123 -0
- package/dist/lifecycle/publish-verify.d.ts +121 -0
- package/dist/lifecycle/publish-verify.js +130 -0
- package/dist/lifecycle/query.js +8 -0
- package/dist/lifecycle/release-artifacts.d.ts +290 -0
- package/dist/lifecycle/release-artifacts.js +808 -0
- package/dist/lifecycle/release-changelog.d.ts +13 -1
- package/dist/lifecycle/release-changelog.js +35 -2
- package/dist/lifecycle/release-cut.d.ts +64 -4
- package/dist/lifecycle/release-cut.js +147 -34
- package/dist/lifecycle/release-doctor.d.ts +113 -0
- package/dist/lifecycle/release-doctor.js +1198 -0
- package/dist/lifecycle/release-green.d.ts +86 -0
- package/dist/lifecycle/release-green.js +286 -0
- package/dist/lifecycle/release-init-registries.d.ts +48 -0
- package/dist/lifecycle/release-init-registries.js +97 -0
- package/dist/lifecycle/release-init.d.ts +275 -0
- package/dist/lifecycle/release-init.js +984 -0
- package/dist/lifecycle/release-intents.d.ts +73 -0
- package/dist/lifecycle/release-intents.js +128 -0
- package/dist/lifecycle/release-next.d.ts +111 -0
- package/dist/lifecycle/release-next.js +251 -0
- package/dist/lifecycle/release-prerelease.d.ts +19 -0
- package/dist/lifecycle/release-prerelease.js +30 -0
- package/dist/lifecycle/release-publish.d.ts +256 -10
- package/dist/lifecycle/release-publish.js +247 -35
- package/dist/lifecycle/release-status-change.d.ts +226 -0
- package/dist/lifecycle/release-status-change.js +478 -0
- package/dist/lifecycle/release-status.d.ts +11 -0
- package/dist/lifecycle/release-status.js +1 -1
- package/dist/lifecycle/release-store.d.ts +73 -2
- package/dist/lifecycle/release-store.js +32 -1
- package/dist/lifecycle/release-tag.d.ts +142 -0
- package/dist/lifecycle/release-tag.js +322 -0
- package/dist/lifecycle/release-verify.d.ts +73 -1
- package/dist/lifecycle/release-verify.js +117 -2
- package/dist/lifecycle/release-version-formats.d.ts +73 -0
- package/dist/lifecycle/release-version-formats.js +570 -0
- package/dist/lifecycle/release-version.d.ts +58 -10
- package/dist/lifecycle/release-version.js +164 -36
- package/dist/lifecycle/release-workstation.d.ts +3 -2
- package/dist/lifecycle/release-workstation.js +3 -2
- package/dist/op/generate-pipeline.js +1 -1
- package/dist/op/local-executor.d.ts +1 -1
- package/dist/op/local-executor.js +2 -2
- package/dist/op/op-waves-evidence.js +9 -2
- package/dist/pr-forge-base.js +4 -2
- package/dist/pr-forge.d.ts +20 -2
- package/dist/pr-forge.js +46 -10
- package/dist/release-floors.d.ts +8 -1
- package/dist/release-floors.js +9 -2
- package/dist/sensitive-key.d.ts +12 -0
- package/dist/sensitive-key.js +52 -0
- package/dist/tool-pins.d.ts +40 -0
- package/dist/tool-pins.js +66 -0
- package/dist/ts-loader.d.ts +8 -0
- package/dist/ts-loader.js +19 -0
- package/dist/wave-runtime.mjs +345 -342
- package/dist/workspace/ci-forge.d.ts +17 -0
- package/dist/workspace/ci-forge.js +17 -0
- package/dist/workspace/ci-init.js +1 -1
- package/dist/workspace/composites.schema.json +1 -0
- package/dist/workspace/declaration.d.ts +8 -0
- package/dist/workspace/declaration.js +12 -0
- package/dist/workspace/declaration.schema.json +8 -0
- package/dist/workspace/environments.d.ts +2 -0
- package/dist/workspace/environments.js +1 -1
- package/dist/workspace/identity-gate-rule.d.ts +61 -5
- package/dist/workspace/identity-gate-rule.js +81 -12
- package/dist/workspace/lexicon-outputs.d.ts +1 -1
- package/dist/workspace/lexicon-outputs.js +1 -1
- package/dist/workspace/member-pipeline.d.ts +2 -1
- package/dist/workspace/member-pipeline.js +5 -2
- package/dist/workspace/reason-codes.d.ts +2 -0
- package/dist/workspace/reason-codes.js +3 -1
- package/dist/workspace/release-changed.d.ts +75 -4
- package/dist/workspace/release-changed.js +205 -34
- package/dist/workspace/release-changed.schema.json +20 -2
- package/dist/workspace/release-steps/artifacts.d.ts +7 -0
- package/dist/workspace/release-steps/artifacts.js +45 -0
- package/dist/workspace/release-steps/builds.d.ts +12 -0
- package/dist/workspace/release-steps/builds.js +38 -0
- package/dist/workspace/release-steps/doctor.d.ts +8 -0
- package/dist/workspace/release-steps/doctor.js +14 -0
- package/dist/workspace/release-steps/goreleaser.d.ts +16 -0
- package/dist/workspace/release-steps/goreleaser.js +36 -0
- package/dist/workspace/release-steps/green.d.ts +3 -0
- package/dist/workspace/release-steps/green.js +6 -0
- package/dist/workspace/release-steps/images.d.ts +22 -0
- package/dist/workspace/release-steps/images.js +59 -0
- package/dist/workspace/release-steps/index.d.ts +9 -0
- package/dist/workspace/release-steps/index.js +50 -0
- package/dist/workspace/release-steps/nfpm.d.ts +13 -0
- package/dist/workspace/release-steps/nfpm.js +29 -0
- package/dist/workspace/release-steps/nuget.d.ts +14 -0
- package/dist/workspace/release-steps/nuget.js +16 -0
- package/dist/workspace/release-steps/pypi.d.ts +15 -0
- package/dist/workspace/release-steps/pypi.js +21 -0
- package/dist/workspace/release-steps/qemu.d.ts +21 -0
- package/dist/workspace/release-steps/qemu.js +35 -0
- package/dist/workspace/release-steps/signing.d.ts +18 -0
- package/dist/workspace/release-steps/signing.js +30 -0
- package/dist/workspace/release-steps/stamp.d.ts +3 -0
- package/dist/workspace/release-steps/stamp.js +4 -0
- package/dist/workspace/release-steps/targets.d.ts +31 -0
- package/dist/workspace/release-steps/targets.js +40 -0
- package/dist/workspace/release-steps/types.d.ts +104 -0
- package/dist/workspace/release-steps/types.js +2 -0
- package/dist/workspace/release-steps/verify.d.ts +3 -0
- package/dist/workspace/release-steps/verify.js +4 -0
- package/dist/workspace/release-toolchains.d.ts +59 -0
- package/dist/workspace/release-toolchains.js +133 -0
- package/dist/workspace/release-train-workflow.d.ts +36 -0
- package/dist/workspace/release-train-workflow.js +121 -0
- package/dist/workspace/release-train.d.ts +3 -1
- package/dist/workspace/release-train.js +20 -3
- package/dist/workspace/release-workflow.d.ts +183 -59
- package/dist/workspace/release-workflow.js +570 -201
- package/dist/workspace/releases.schema.json +70 -1
- package/dist/workspace/search-contract.d.ts +1 -1
- package/dist/workspace/security.js +9 -2
- package/dist/workspace/train-cut.d.ts +182 -0
- package/dist/workspace/train-cut.js +504 -0
- package/dist/workspace/train-prepare.d.ts +64 -0
- package/dist/workspace/train-prepare.js +313 -0
- package/dist/workspace/train-publish.d.ts +177 -0
- package/dist/workspace/train-publish.js +574 -0
- package/dist/workspace/train-range-labels.d.ts +33 -0
- package/dist/workspace/train-range-labels.js +109 -0
- package/dist/workspace/train-shell.d.ts +5 -0
- package/dist/workspace/train-shell.js +17 -0
- package/dist/workspace/trust/check-evidence-report.d.ts +3 -7
- package/dist/workspace/trust/check-evidence-report.js +3 -7
- package/dist/workspace/trust/seal.d.ts +13 -3
- package/dist/workspace/trust/seal.js +14 -4
- package/dist/workspace/work-cli.d.ts +3 -2
- package/dist/workspace/work-cli.js +3 -2
- package/dist/workspace/workspace-ledger.d.ts +14 -1
- package/dist/workspace/workspace-ledger.js +33 -7
- package/package.json +1 -1
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `chant release init [--yes] [--force] [--one-release] [--forge github|gitlab|forgejo] [--json]`
|
|
3
|
+
* (#5160): set up `chant release` in a project that has never used chant. A
|
|
4
|
+
* dry run unless `--yes`. An npm, pnpm or yarn workspace with several
|
|
5
|
+
* publishable packages gets a release train (#5154): a member per package
|
|
6
|
+
* and `release.train` at the root, unless `--one-release`. See
|
|
7
|
+
* ../../lifecycle/release-init.ts.
|
|
8
|
+
*/
|
|
9
|
+
import { appendFileSync, existsSync, readdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
10
|
+
import { join, relative, resolve, sep } from "node:path";
|
|
11
|
+
import { formatBold, formatError, formatSuccess, formatWarning } from "../format.js";
|
|
12
|
+
const USAGE = "chant release init [--yes] [--force] [--one-release] [--forge github|gitlab|forgejo] [--json]";
|
|
13
|
+
export async function runReleaseInit(ctx) {
|
|
14
|
+
const { args } = ctx;
|
|
15
|
+
const root = resolve(".");
|
|
16
|
+
const json = args.json === true;
|
|
17
|
+
const write = args.yes === true && args.dryRun !== true;
|
|
18
|
+
const force = args.force === true;
|
|
19
|
+
const { detectProject, planRelease, planTrain, trainFit, releaseBlockSource, } = await import("../../lifecycle/release-init.js");
|
|
20
|
+
const fail = (code, message, fix, block) => {
|
|
21
|
+
if (json)
|
|
22
|
+
console.log(JSON.stringify({ error: { code, message, ...(fix ? { fix } : {}) } }, null, 2));
|
|
23
|
+
else {
|
|
24
|
+
console.error(formatError({ message: `${message} [${code}]`, ...(fix ? { hint: fix } : {}) }));
|
|
25
|
+
if (block)
|
|
26
|
+
console.error(`\n ${block}\n`);
|
|
27
|
+
}
|
|
28
|
+
return 1;
|
|
29
|
+
};
|
|
30
|
+
if (!["package.json", "go.mod", "Cargo.toml", "pyproject.toml", "setup.py", "pom.xml", "Dockerfile", "chant.config.ts", "chant.config.json"].some((f) => existsSync(join(root, f))) && !readdirSync(root).some((f) => f.endsWith(".csproj") || f.endsWith(".gemspec")) && !existsSync(join(root, ".git"))) {
|
|
31
|
+
return fail("release-init-not-a-project", "this directory holds no package.json, go.mod, Cargo.toml, pyproject.toml, pom.xml, .csproj, .gemspec, Dockerfile or git repository", "Run chant release init in the project's root.");
|
|
32
|
+
}
|
|
33
|
+
const facts = detectProject(root);
|
|
34
|
+
if (args.forge !== undefined) {
|
|
35
|
+
if (!["github", "gitlab", "forgejo"].includes(args.forge))
|
|
36
|
+
return fail("release-init-forge-invalid", `--forge ${JSON.stringify(args.forge)} is not one of github, gitlab, forgejo`, USAGE);
|
|
37
|
+
facts.workflowForge = args.forge;
|
|
38
|
+
}
|
|
39
|
+
const { readerVersion } = await import("../../workspace/declaration.js");
|
|
40
|
+
const plan = planRelease(facts, { chantVersion: readerVersion() });
|
|
41
|
+
const block = releaseBlockSource(plan.release, " ");
|
|
42
|
+
const fit = trainFit(facts);
|
|
43
|
+
if (fit.train && args.oneRelease !== true)
|
|
44
|
+
return runTrainInit(ctx, root, planTrain(facts, { chantVersion: readerVersion() }), facts.workflowForge, fail);
|
|
45
|
+
if (!fit.train && fit.why)
|
|
46
|
+
plan.notes.push(`One release for every package, not a release train: ${fit.why}.`);
|
|
47
|
+
if (fit.train)
|
|
48
|
+
plan.reasons.unshift("--one-release: every package is released together, at one label under one tag");
|
|
49
|
+
const { typeScriptLoaderAvailable } = await import("../../ts-loader.js");
|
|
50
|
+
const canLoadTs = typeScriptLoaderAvailable();
|
|
51
|
+
const prepared = await prepareConfig(root, plan.release, force, canLoadTs);
|
|
52
|
+
if ("error" in prepared)
|
|
53
|
+
return fail(prepared.error.code, prepared.error.message, prepared.error.fix, block);
|
|
54
|
+
const { configPath, configText, configName, created } = prepared;
|
|
55
|
+
if (created && configName === "chant.config.json")
|
|
56
|
+
plan.reasons.unshift(TSX_REASON);
|
|
57
|
+
// The workflow file: one chant generated is regenerated; any other is left alone without --force,
|
|
58
|
+
// unless it is the npm publish workflow the plan adopts, which the release workflow replaces.
|
|
59
|
+
const { gitTop } = await import("../../workspace/tree.js");
|
|
60
|
+
const top = gitTop(root) ?? root;
|
|
61
|
+
const adopted = adoptedWorkflow(plan.release);
|
|
62
|
+
const handWritten = !(await workflowIsOurs(join(top, plan.workflowFile)));
|
|
63
|
+
if (handWritten && !force && !adopted) {
|
|
64
|
+
return fail("release-init-workflow-exists", `${plan.workflowFile} exists and chant did not write it`, "Run again with --force to replace it.");
|
|
65
|
+
}
|
|
66
|
+
const gr = plan.goreleaserPatch;
|
|
67
|
+
// The first label: `auto` when release next reads the previous release
|
|
68
|
+
// from the tag history (#5200), else a patch after the newest tag, else 0.1.0.
|
|
69
|
+
const newest = facts.tags.newest ? /(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/.exec(facts.tags.newest) : null;
|
|
70
|
+
const label = plan.readsHistory ? "auto" : newest ? `${newest[1]}.${newest[2]}.${Number(newest[3]) + 1}` : "0.1.0";
|
|
71
|
+
const wf = plan.workflowFile.split("/").pop();
|
|
72
|
+
const next = [
|
|
73
|
+
...(write ? [] : ["chant release init --yes"]),
|
|
74
|
+
`git add ${configName} ${plan.workflowFile}${gr?.append ? ` ${gr.file}` : ""} && git commit -m "ci: release with chant" && git push`,
|
|
75
|
+
// #5161: what the registries say of the targets, once their setup is done.
|
|
76
|
+
"chant release doctor",
|
|
77
|
+
facts.workflowForge === "github"
|
|
78
|
+
? `gh workflow run ${wf} -f label=${label}${plan.readsHistory ? ` # the label from the commits since ${facts.tags.newest}` : ""}`
|
|
79
|
+
: `start ${plan.workflowFile} by hand with the label ${label}${plan.readsHistory ? ` (the label from the commits since ${facts.tags.newest})` : ""}`,
|
|
80
|
+
facts.workflowForge === "github"
|
|
81
|
+
? `# each later release: gh workflow run ${wf} -f label=auto (the label from the commits since the previous release)`
|
|
82
|
+
: `# each later release: start ${plan.workflowFile} with the label auto (the label from the commits since the previous release)`,
|
|
83
|
+
];
|
|
84
|
+
if (json) {
|
|
85
|
+
const out = { dryRun: !write, layout: "one-release", config: configName, created, release: plan.release, reasons: plan.reasons, notes: plan.notes, registry: plan.registry, workflow: plan.workflowFile, goreleaser: gr, next };
|
|
86
|
+
if (!write) {
|
|
87
|
+
console.log(JSON.stringify(out, null, 2));
|
|
88
|
+
return 0;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
console.log(formatBold(`${write ? "" : "Dry run: "}release block for ${configName}${created ? " (a new file)" : ""}`));
|
|
93
|
+
console.log(`\n ${block}\n`);
|
|
94
|
+
console.log(formatBold("Why"));
|
|
95
|
+
for (const r of plan.reasons)
|
|
96
|
+
console.log(` - ${r}`);
|
|
97
|
+
if (plan.notes.length > 0) {
|
|
98
|
+
console.log(formatBold("\nNot covered"));
|
|
99
|
+
for (const n of plan.notes)
|
|
100
|
+
console.log(` - ${n}`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (write) {
|
|
104
|
+
writeFileSync(configPath, configText);
|
|
105
|
+
if (!json)
|
|
106
|
+
console.log(formatSuccess(`${created ? "Wrote" : "Updated"} ${configName}.`));
|
|
107
|
+
if (gr?.append) {
|
|
108
|
+
const grPath = join(root, gr.file);
|
|
109
|
+
const text = readFileSync(grPath, "utf-8");
|
|
110
|
+
appendFileSync(grPath, `${text.endsWith("\n") ? "" : "\n"}${gr.append}`);
|
|
111
|
+
if (!json)
|
|
112
|
+
console.log(formatSuccess(`Added snapshot.version_template to ${gr.file}, so the snapshot build carries the release's label.`));
|
|
113
|
+
}
|
|
114
|
+
const { runReleaseWorkflow } = await import("../../workspace/release-workflow.js");
|
|
115
|
+
const log = console.log;
|
|
116
|
+
if (json)
|
|
117
|
+
console.log = console.error;
|
|
118
|
+
let code;
|
|
119
|
+
try {
|
|
120
|
+
code = await runReleaseWorkflow({ ...ctx, args: { ...ctx.args, forge: facts.workflowForge, ...(adopted ? { force: true } : {}) } });
|
|
121
|
+
}
|
|
122
|
+
finally {
|
|
123
|
+
console.log = log;
|
|
124
|
+
}
|
|
125
|
+
if (code !== 0)
|
|
126
|
+
return code;
|
|
127
|
+
}
|
|
128
|
+
else if (!json) {
|
|
129
|
+
console.log(`\nWould write ${configName} and ${plan.workflowFile} (with chant release workflow${handWritten ? `, replacing the ${plan.workflowFile} there` : ""})${gr?.append ? `, and add snapshot.version_template to ${gr.file}` : ""}.`);
|
|
130
|
+
}
|
|
131
|
+
if (gr?.manual && !json)
|
|
132
|
+
console.log(formatWarning({ message: gr.manual }));
|
|
133
|
+
if (json) {
|
|
134
|
+
console.log(JSON.stringify({ dryRun: false, layout: "one-release", config: configName, created, release: plan.release, reasons: plan.reasons, notes: plan.notes, registry: plan.registry, workflow: plan.workflowFile, goreleaser: gr, next }, null, 2));
|
|
135
|
+
return 0;
|
|
136
|
+
}
|
|
137
|
+
if (plan.registry.length > 0) {
|
|
138
|
+
console.log(formatBold("\nOn the registries, by hand"));
|
|
139
|
+
for (const r of plan.registry)
|
|
140
|
+
console.log(` - ${r}`);
|
|
141
|
+
}
|
|
142
|
+
console.log(formatBold("\nNext"));
|
|
143
|
+
for (const n of next)
|
|
144
|
+
console.log(` ${n}`);
|
|
145
|
+
return 0;
|
|
146
|
+
}
|
|
147
|
+
/** Why init writes chant.config.json: the reason line a plan carries for it. */
|
|
148
|
+
const TSX_REASON = "chant.config.json, not chant.config.ts: tsx, which chant needs to read a TypeScript config, is not installed here, so the release block is written as JSON that this run and the workflow's jobs read without it";
|
|
149
|
+
/** The `release.workflow.file` init set to adopt the project's npm publish workflow, or null. */
|
|
150
|
+
function adoptedWorkflow(release) {
|
|
151
|
+
const file = release.workflow?.file;
|
|
152
|
+
return typeof file === "string" ? file : null;
|
|
153
|
+
}
|
|
154
|
+
/** Whether the workflow file is absent or one chant generated, so writing it replaces nothing a person wrote. */
|
|
155
|
+
async function workflowIsOurs(path) {
|
|
156
|
+
if (!existsSync(path))
|
|
157
|
+
return true;
|
|
158
|
+
const { GENERATED_MARKER } = await import("../../discovery/files.js");
|
|
159
|
+
return readFileSync(path, "utf-8").includes(GENERATED_MARKER);
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* The config of the project at `dir` with `release` written in: its
|
|
163
|
+
* chant.config.ts edited in place, its chant.config.json rewritten, or a new
|
|
164
|
+
* chant.config.ts. Without tsx (`canLoadTs` false) the new config is
|
|
165
|
+
* chant.config.json, and an existing chant.config.ts is refused, since
|
|
166
|
+
* nothing could read it back.
|
|
167
|
+
*/
|
|
168
|
+
async function prepareConfig(dir, release, force, canLoadTs) {
|
|
169
|
+
const { insertReleaseBlock, newConfigSource, ReleaseInitError } = await import("../../lifecycle/release-init.js");
|
|
170
|
+
const tsPath = join(dir, "chant.config.ts");
|
|
171
|
+
const jsonPath = join(dir, "chant.config.json");
|
|
172
|
+
let configPath;
|
|
173
|
+
let configText;
|
|
174
|
+
try {
|
|
175
|
+
if (existsSync(tsPath)) {
|
|
176
|
+
if (!canLoadTs)
|
|
177
|
+
throw new ReleaseInitError("release-init-tsx-missing", "chant.config.ts is TypeScript, and chant needs tsx to read it, which is not installed here", "Add tsx as a dev dependency (npm i -D tsx) and run again, so this run and the release workflow's jobs can read the config.");
|
|
178
|
+
configPath = tsPath;
|
|
179
|
+
const before = readFileSync(tsPath, "utf-8");
|
|
180
|
+
configText = insertReleaseBlock(before, release, force);
|
|
181
|
+
// A release the text scan can't see, such as one spread in from elsewhere, is still a release block.
|
|
182
|
+
if (!force && !/\brelease\s*:/.test(before)) {
|
|
183
|
+
try {
|
|
184
|
+
const { loadChantConfig } = await import("../../config.js");
|
|
185
|
+
const loaded = (await loadChantConfig(dir)).config.release;
|
|
186
|
+
if (loaded && Object.keys(loaded).length > 0)
|
|
187
|
+
throw new ReleaseInitError("release-init-release-exists", "chant.config.ts already declares release", "Add the fields shown here to it by hand.");
|
|
188
|
+
}
|
|
189
|
+
catch (err) {
|
|
190
|
+
if (err instanceof ReleaseInitError)
|
|
191
|
+
throw err;
|
|
192
|
+
// A config that can't be loaded here is edited by its text alone.
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
else if (existsSync(jsonPath)) {
|
|
197
|
+
configPath = jsonPath;
|
|
198
|
+
const parsed = JSON.parse(readFileSync(jsonPath, "utf-8"));
|
|
199
|
+
if (parsed.release !== undefined && !force)
|
|
200
|
+
throw new ReleaseInitError("release-init-release-exists", "chant.config.json already has a release block", "Run again with --force to replace it, or add the fields shown here to it by hand.");
|
|
201
|
+
configText = `${JSON.stringify({ ...parsed, release }, null, 2)}\n`;
|
|
202
|
+
}
|
|
203
|
+
else if (canLoadTs) {
|
|
204
|
+
configPath = tsPath;
|
|
205
|
+
configText = newConfigSource(release);
|
|
206
|
+
}
|
|
207
|
+
else {
|
|
208
|
+
configPath = jsonPath;
|
|
209
|
+
configText = `${JSON.stringify({ release }, null, 2)}\n`;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
catch (err) {
|
|
213
|
+
if (err instanceof ReleaseInitError)
|
|
214
|
+
return { error: { code: err.code, message: err.message, ...(err.fix ? { fix: err.fix } : {}) } };
|
|
215
|
+
return { error: { code: "release-init-config-unreadable", message: `the config could not be read: ${err instanceof Error ? err.message : String(err)}` } };
|
|
216
|
+
}
|
|
217
|
+
return { configPath, configText, configName: configPath === tsPath ? "chant.config.ts" : "chant.config.json", created: !existsSync(configPath) };
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* The release train (#5154): `chant.workspace.json` with a member per
|
|
221
|
+
* package, each member's `chant.config.ts`, the root's `release.train`, and
|
|
222
|
+
* the train workflow.
|
|
223
|
+
*/
|
|
224
|
+
async function runTrainInit(ctx, root, plan, fg, fail) {
|
|
225
|
+
const { args } = ctx;
|
|
226
|
+
const json = args.json === true;
|
|
227
|
+
const write = args.yes === true && args.dryRun !== true;
|
|
228
|
+
const force = args.force === true;
|
|
229
|
+
const lib = await import("../../lifecycle/release-init.js");
|
|
230
|
+
const rel = (p) => relative(root, p).split(sep).join("/");
|
|
231
|
+
// Each member's config, then the root's.
|
|
232
|
+
const { typeScriptLoaderAvailable } = await import("../../ts-loader.js");
|
|
233
|
+
const canLoadTs = typeScriptLoaderAvailable();
|
|
234
|
+
const members = [];
|
|
235
|
+
for (const m of plan.members) {
|
|
236
|
+
const prepared = await prepareConfig(join(root, m.dir), m.release, force, canLoadTs);
|
|
237
|
+
const block = lib.releaseBlockSource(m.release, " ");
|
|
238
|
+
if ("error" in prepared)
|
|
239
|
+
return fail(prepared.error.code, `${m.dir}: ${prepared.error.message}`, prepared.error.fix, block);
|
|
240
|
+
members.push({ name: m.name, dir: m.dir, package: m.package, release: m.release, path: prepared.configPath, text: prepared.configText, created: prepared.created });
|
|
241
|
+
}
|
|
242
|
+
const rootBlock = lib.releaseBlockSource(plan.release, " ");
|
|
243
|
+
const prepared = await prepareConfig(root, plan.release, force, canLoadTs);
|
|
244
|
+
if ("error" in prepared)
|
|
245
|
+
return fail(prepared.error.code, prepared.error.message, prepared.error.fix, rootBlock);
|
|
246
|
+
if (!canLoadTs) {
|
|
247
|
+
plan.reasons.unshift(TSX_REASON);
|
|
248
|
+
for (const m of members)
|
|
249
|
+
if (m.path.endsWith(".json"))
|
|
250
|
+
plan.reasons = plan.reasons.map((r) => r.replace(`${m.dir}/chant.config.ts, member`, `${m.dir}/chant.config.json, member`));
|
|
251
|
+
}
|
|
252
|
+
// chant.workspace.json: a new one, or the members added to the one there.
|
|
253
|
+
const wsPath = join(root, "chant.workspace.json");
|
|
254
|
+
const wsCreated = !existsSync(wsPath);
|
|
255
|
+
let ws;
|
|
256
|
+
try {
|
|
257
|
+
ws = wsCreated ? { name: plan.workspaceName, schema: 1, members: [] } : JSON.parse(readFileSync(wsPath, "utf-8"));
|
|
258
|
+
}
|
|
259
|
+
catch (err) {
|
|
260
|
+
return fail("release-init-config-unreadable", `chant.workspace.json could not be read: ${err instanceof Error ? err.message : String(err)}`);
|
|
261
|
+
}
|
|
262
|
+
const declared = Array.isArray(ws.members) ? [...ws.members] : [];
|
|
263
|
+
const added = [];
|
|
264
|
+
for (const m of members) {
|
|
265
|
+
const at = declared.findIndex((d) => d.dir === m.dir || d.name === m.name);
|
|
266
|
+
const entry = { name: m.name, dir: m.dir, kind: "chant" };
|
|
267
|
+
if (at < 0) {
|
|
268
|
+
declared.push(entry);
|
|
269
|
+
added.push(m.name);
|
|
270
|
+
continue;
|
|
271
|
+
}
|
|
272
|
+
const d = declared[at];
|
|
273
|
+
if (d.dir === m.dir && d.name === m.name && d.kind === "chant")
|
|
274
|
+
continue;
|
|
275
|
+
if (!force)
|
|
276
|
+
return fail("release-init-member-exists", `chant.workspace.json already declares ${JSON.stringify(d.name)} at ${JSON.stringify(d.dir)}${d.kind === undefined ? "" : ` (kind ${String(d.kind)})`}, and the train needs ${m.name} at ${m.dir} as a chant member`, "Run again with --force to replace that entry, or declare the member by hand.");
|
|
277
|
+
declared[at] = entry;
|
|
278
|
+
added.push(m.name);
|
|
279
|
+
}
|
|
280
|
+
ws.members = declared;
|
|
281
|
+
const wsText = `${JSON.stringify(ws, null, 2)}\n`;
|
|
282
|
+
const { gitTop } = await import("../../workspace/tree.js");
|
|
283
|
+
const top = gitTop(root) ?? root;
|
|
284
|
+
const adopted = adoptedWorkflow(plan.release);
|
|
285
|
+
const handWritten = !(await workflowIsOurs(join(top, plan.workflowFile)));
|
|
286
|
+
if (handWritten && !force && !adopted) {
|
|
287
|
+
return fail("release-init-workflow-exists", `${plan.workflowFile} exists and chant did not write it`, "Run again with --force to replace it.");
|
|
288
|
+
}
|
|
289
|
+
const wf = plan.workflowFile.split("/").pop();
|
|
290
|
+
const files = ["chant.workspace.json", prepared.configName, ...members.map((m) => rel(m.path)), plan.workflowFile];
|
|
291
|
+
const next = [
|
|
292
|
+
...(write ? [] : ["chant release init --yes"]),
|
|
293
|
+
`git add ${files.join(" ")} && git commit -m "ci: release with chant" && git push`,
|
|
294
|
+
`chant workspace train cut ${plan.env} # the first train's plan; nothing is cut without --yes`,
|
|
295
|
+
fg === "github"
|
|
296
|
+
? `gh workflow run ${wf} -f levels=auto # each package's level from its commits since its last release`
|
|
297
|
+
: `start ${plan.workflowFile} by hand with the levels auto (each package's level from its commits since its last release)`,
|
|
298
|
+
];
|
|
299
|
+
const memberOut = members.map((m) => ({ name: m.name, dir: m.dir, package: m.package, config: rel(m.path), created: m.created, release: m.release }));
|
|
300
|
+
const out = (dryRun) => ({
|
|
301
|
+
dryRun,
|
|
302
|
+
layout: "train",
|
|
303
|
+
workspace: { file: "chant.workspace.json", created: wsCreated, added },
|
|
304
|
+
config: prepared.configName,
|
|
305
|
+
created: prepared.created,
|
|
306
|
+
release: plan.release,
|
|
307
|
+
members: memberOut,
|
|
308
|
+
reasons: plan.reasons,
|
|
309
|
+
notes: plan.notes,
|
|
310
|
+
registry: plan.registry,
|
|
311
|
+
workflow: plan.workflowFile,
|
|
312
|
+
next,
|
|
313
|
+
});
|
|
314
|
+
if (json && !write) {
|
|
315
|
+
console.log(JSON.stringify(out(true), null, 2));
|
|
316
|
+
return 0;
|
|
317
|
+
}
|
|
318
|
+
if (!json) {
|
|
319
|
+
console.log(formatBold(`${write ? "" : "Dry run: "}a release train of ${members.length} packages, each released at its own version`));
|
|
320
|
+
console.log(formatBold(`\nchant.workspace.json${wsCreated ? " (a new file)" : added.length > 0 ? ` (adds ${added.join(", ")})` : ""}`));
|
|
321
|
+
console.log(`\n${wsText.replace(/^/gm, " ").trimEnd()}\n`);
|
|
322
|
+
console.log(formatBold(`${prepared.configName}${prepared.created ? " (a new file)" : ""}`));
|
|
323
|
+
console.log(`\n ${rootBlock}\n`);
|
|
324
|
+
for (const m of members) {
|
|
325
|
+
console.log(formatBold(`${rel(m.path)}${m.created ? " (a new file)" : ""}`));
|
|
326
|
+
console.log(`\n ${lib.releaseBlockSource(m.release, " ")}\n`);
|
|
327
|
+
}
|
|
328
|
+
console.log(formatBold("Why"));
|
|
329
|
+
for (const r of plan.reasons)
|
|
330
|
+
console.log(` - ${r}`);
|
|
331
|
+
if (plan.notes.length > 0) {
|
|
332
|
+
console.log(formatBold("\nNot covered"));
|
|
333
|
+
for (const n of plan.notes)
|
|
334
|
+
console.log(` - ${n}`);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
if (write) {
|
|
338
|
+
writeFileSync(wsPath, wsText);
|
|
339
|
+
for (const m of members)
|
|
340
|
+
writeFileSync(m.path, m.text);
|
|
341
|
+
writeFileSync(prepared.configPath, prepared.configText);
|
|
342
|
+
if (!json)
|
|
343
|
+
console.log(formatSuccess(`Wrote chant.workspace.json, ${prepared.configName} and ${members.length} member configs.`));
|
|
344
|
+
const { runReleaseWorkflow } = await import("../../workspace/release-workflow.js");
|
|
345
|
+
const log = console.log;
|
|
346
|
+
if (json)
|
|
347
|
+
console.log = console.error;
|
|
348
|
+
let code;
|
|
349
|
+
try {
|
|
350
|
+
code = await runReleaseWorkflow({ ...ctx, args: { ...ctx.args, forge: fg, ...(adopted ? { force: true } : {}) } });
|
|
351
|
+
}
|
|
352
|
+
finally {
|
|
353
|
+
console.log = log;
|
|
354
|
+
}
|
|
355
|
+
if (code !== 0)
|
|
356
|
+
return code;
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
console.log(`\nWould write chant.workspace.json, ${prepared.configName}, ${members.map((m) => rel(m.path)).join(", ")} and ${plan.workflowFile} (with chant release workflow${handWritten ? `, replacing the ${plan.workflowFile} there` : ""}). Run with --one-release to release every package together under one label instead.`);
|
|
360
|
+
}
|
|
361
|
+
if (json) {
|
|
362
|
+
console.log(JSON.stringify(out(false), null, 2));
|
|
363
|
+
return 0;
|
|
364
|
+
}
|
|
365
|
+
if (plan.registry.length > 0) {
|
|
366
|
+
console.log(formatBold("\nOn the registries, by hand"));
|
|
367
|
+
for (const r of plan.registry)
|
|
368
|
+
console.log(` - ${r}`);
|
|
369
|
+
}
|
|
370
|
+
console.log(formatBold("\nNext"));
|
|
371
|
+
for (const n of next)
|
|
372
|
+
console.log(` ${n}`);
|
|
373
|
+
return 0;
|
|
374
|
+
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* --allow-unsigned (#4049), and with a target a checkout that is not
|
|
17
17
|
* the release's commit; warns with no OIDC provenance, and refuses
|
|
18
18
|
* under --require-provenance; attaches SBOMs and provenance (#4049)
|
|
19
|
-
* release verify <label|digest> [--json]
|
|
19
|
+
* release verify <label|digest> [--sigstore [--assets <dir>]] [--json]
|
|
20
20
|
* check the release's signature offline against .chant/allowed_signers
|
|
21
21
|
* at the release's commit (#4049)
|
|
22
22
|
* release changed [--at <sha>] [--bump-member <member>=<level>]... [--json]
|
|
@@ -34,6 +34,9 @@
|
|
|
34
34
|
* `--json` prints the read contract's `releases` document
|
|
35
35
|
* release export <label|digest> --env <env> [-o <dir>] [--json]
|
|
36
36
|
* write the files the release recorded for <env>, checked against their digests (#4046)
|
|
37
|
+
* release deprecate|yank|restore <label|digest> [--yes] [--reason <text>] [--replacement <label>] [--forge-release prerelease|draft|delete] [--actor <name>] [--sign [<key file>]] [--json]
|
|
38
|
+
* set a published release's status and act on each target that can
|
|
39
|
+
* (#5163, ../../lifecycle/release-status-change.ts): a dry run unless --yes
|
|
37
40
|
* release compile --env <env> [--build <command>] [--artifacts --component <a,b>] --json
|
|
38
41
|
* internal: what the cut runs in a child process per environment
|
|
39
42
|
*
|
|
@@ -43,6 +46,8 @@
|
|
|
43
46
|
* names a `release` gate requires a signed cut by an actor in its class (#4031).
|
|
44
47
|
*/
|
|
45
48
|
import type { CommandContext } from "../registry.js";
|
|
49
|
+
/** The usage line printed with a refusal, built from ../release-commands (#5196). */
|
|
50
|
+
export declare const USAGE: string;
|
|
46
51
|
/** What to run after a cut (#4027): publish from CI, or push the tag so CI publishes, or deploy the first environment. */
|
|
47
52
|
export declare function nextCommands(req: {
|
|
48
53
|
ref: string;
|
|
@@ -52,8 +57,10 @@ export declare function nextCommands(req: {
|
|
|
52
57
|
/** A project with no components deploys with `release export`, not promote (#4046). */
|
|
53
58
|
noComponents: boolean;
|
|
54
59
|
}): string[];
|
|
55
|
-
/** The command line that ran, without `--json`, with `--yes` added: what a dry run says to run next. */
|
|
60
|
+
/** The command line that ran, without `--json` or `--dry-run`, with `--yes` added: what a dry run says to run next. */
|
|
56
61
|
export declare function sameWithYes(argv: readonly string[]): string;
|
|
62
|
+
/** How a cut's green gate reads in a line (#5149). */
|
|
63
|
+
export declare function describeGreen(green: import("../../lifecycle/release-store.js").ReleaseCutGreen | undefined | null): string;
|
|
57
64
|
/** Copy each `release.images` archive from the directory the cut built it in to the same path under `to`. */
|
|
58
65
|
export declare function copyImageArchives(images: ReadonlyArray<{
|
|
59
66
|
archive: string;
|
|
@@ -67,6 +74,17 @@ export declare function copyImageArchives(images: ReadonlyArray<{
|
|
|
67
74
|
* publish job runs it before the build that packs the package.
|
|
68
75
|
*/
|
|
69
76
|
export declare function runReleaseImages(ctx: CommandContext): Promise<number>;
|
|
77
|
+
/**
|
|
78
|
+
* `release artifacts <label|digest> [--no-build] [--from <dir>] [-o <dir>] [--json]`
|
|
79
|
+
* (#5151): the files `release.artifacts` declares, checked against the
|
|
80
|
+
* digests the release records, from the release's commit checked out here.
|
|
81
|
+
* Without a flag it builds them again; `--no-build` checks the files on
|
|
82
|
+
* disk; `--from <dir>` first copies them from a directory where the cut job
|
|
83
|
+
* staged them. `-o <dir>` stages the checked files in a directory, at their
|
|
84
|
+
* paths in the member, for the next job. A file missing or with another
|
|
85
|
+
* digest is refused.
|
|
86
|
+
*/
|
|
87
|
+
export declare function runReleaseArtifacts(ctx: CommandContext): Promise<number>;
|
|
70
88
|
/**
|
|
71
89
|
* `release stamp <label> [--json]` (#4840): write the label into the files
|
|
72
90
|
* `release.version` names, as the cut does before its build, and leave them
|
|
@@ -75,6 +93,15 @@ export declare function runReleaseImages(ctx: CommandContext): Promise<number>;
|
|
|
75
93
|
* `git checkout -- <files>` puts them back.
|
|
76
94
|
*/
|
|
77
95
|
export declare function runReleaseStamp(ctx: CommandContext): Promise<number>;
|
|
96
|
+
/**
|
|
97
|
+
* `release tag <label|digest|tag> [--json]` (#5150): the tag `release.tag`
|
|
98
|
+
* gives a release of this member, found by its label, its digest, or the tag
|
|
99
|
+
* itself. The ledger names the release: a tag is matched by rendering the
|
|
100
|
+
* template for each label the member's ledger holds, never parsed. The
|
|
101
|
+
* publish job of `chant release workflow` reads the label of the tag that
|
|
102
|
+
* started it this way.
|
|
103
|
+
*/
|
|
104
|
+
export declare function runReleaseTag(ctx: CommandContext): Promise<number>;
|
|
78
105
|
/**
|
|
79
106
|
* `release cut [<label>]` (#4026, #4027). A dry run unless `--yes`: it
|
|
80
107
|
* refuses a dirty tree, a commit that is not on trunk and pushed, and one
|
|
@@ -123,6 +150,13 @@ export declare function runReleaseVerify(ctx: CommandContext): Promise<number>;
|
|
|
123
150
|
* prints the read contract's `release-candidates` document.
|
|
124
151
|
*/
|
|
125
152
|
export declare function runReleaseCandidates(ctx: CommandContext): Promise<number>;
|
|
153
|
+
/**
|
|
154
|
+
* `release next [--at <sha>] [--pre <id>] [--json]` (#5159): the label the
|
|
155
|
+
* next release of this member carries, from the conventional commits and
|
|
156
|
+
* the intent files since its previous release. The label alone goes to
|
|
157
|
+
* stdout, so a script can read it; why goes to stderr.
|
|
158
|
+
*/
|
|
159
|
+
export declare function runReleaseNext(ctx: CommandContext): Promise<number>;
|
|
126
160
|
/**
|
|
127
161
|
* `release changed [--at <sha>] [--bump-member <member>=<level>]... [--json]`
|
|
128
162
|
* (#5134): the members a release at a commit has to cut, in publish order,
|
|
@@ -130,6 +164,13 @@ export declare function runReleaseCandidates(ctx: CommandContext): Promise<numbe
|
|
|
130
164
|
*/
|
|
131
165
|
export declare function runReleaseChanged(ctx: CommandContext): Promise<number>;
|
|
132
166
|
export declare function runReleaseList(ctx: CommandContext): Promise<number>;
|
|
167
|
+
/**
|
|
168
|
+
* `release deprecate|yank|restore <label|digest> [--yes] ...` (#5163): plan
|
|
169
|
+
* the status change and what each publish target does about it, print it,
|
|
170
|
+
* and with `--yes` write the status record and act, resumably. A target that
|
|
171
|
+
* can't do something says so with a code, as a warning, and the rest go on.
|
|
172
|
+
*/
|
|
173
|
+
export declare function runReleaseStatusChange(ctx: CommandContext, verb: import("../../lifecycle/release-status-change.js").StatusVerb): Promise<number>;
|
|
133
174
|
/**
|
|
134
175
|
* `release export <label|digest> --env <env> [-o <dir>]` (#4046): write each
|
|
135
176
|
* file the release's target for <env> records, at the path it was compiled to,
|