@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
|
@@ -24,6 +24,10 @@
|
|
|
24
24
|
* none, before any target runs; `--require-provenance` refuses instead
|
|
25
25
|
* (`publish-provenance-missing`). Without either, provenance is only the
|
|
26
26
|
* plan's `provenance` field.
|
|
27
|
+
* When `release.signing` or `supply-chain` asks for Sigstore signing and an
|
|
28
|
+
* OCI, forge or pypi target is declared (#5164, ./publish-signing.ts), a run that
|
|
29
|
+
* can't sign keylessly is refused (`publish-signing-no-oidc`,
|
|
30
|
+
* `publish-signing-tool-missing`).
|
|
27
31
|
* The targets come from {@link releasePublishTargets}: the member declares them under `release.publish` in its `chant.config.ts` (#4047).
|
|
28
32
|
* With a target, the checkout must be the release's commit with a clean
|
|
29
33
|
* tree ({@link checkCheckoutIsRelease}), every target is planned before any
|
|
@@ -41,6 +45,7 @@
|
|
|
41
45
|
import type { Release } from "./release-store.js";
|
|
42
46
|
import { type ReleaseVersionConfig } from "./release-version.js";
|
|
43
47
|
import { type Redactor } from "./publish-credentials.js";
|
|
48
|
+
import { type MemberTags } from "./release-tag.js";
|
|
44
49
|
/** Whether this run can sign provenance with an OIDC token, and why not when it can't. */
|
|
45
50
|
export interface ProvenanceCheck {
|
|
46
51
|
/** True when the run has an OIDC token a registry accepts for provenance. */
|
|
@@ -70,8 +75,24 @@ export interface PublishItem {
|
|
|
70
75
|
present?: boolean;
|
|
71
76
|
/** True when the destination refused it and the target turns a refusal into a warning (a marketplace's `onRefusal: "warn"`, #4698), so it was not published. */
|
|
72
77
|
refused?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Set on a file attached to what the target publishes: an SBOM or the
|
|
80
|
+
* release's provenance statement (#4049), or a Sigstore bundle (#5164), a
|
|
81
|
+
* `signature` over a file or an image, or an `attestation`, SLSA provenance.
|
|
82
|
+
*/
|
|
83
|
+
attachment?: "sbom" | "provenance" | "signature" | "attestation";
|
|
84
|
+
/** On a Sigstore bundle (#5164): what it signs, each name and digest. An image is named `<repository>@<digest>`. */
|
|
85
|
+
signs?: Array<{
|
|
86
|
+
name: string;
|
|
87
|
+
digest: string;
|
|
88
|
+
}>;
|
|
89
|
+
/** On a Sigstore bundle over a statement (#5164): the statement's predicate type. */
|
|
90
|
+
predicateType?: string;
|
|
91
|
+
/** On a Sigstore bundle (#5164): the OIDC issuer and the identity (a regular expression) its certificate was issued to. */
|
|
92
|
+
sigstore?: {
|
|
93
|
+
issuer: string;
|
|
94
|
+
identity: string;
|
|
95
|
+
};
|
|
75
96
|
/** The SBOM file an npm package carries at its root (#4049). */
|
|
76
97
|
sbom?: string;
|
|
77
98
|
/** The notes a forge release is given (#4658), which a dry run prints. */
|
|
@@ -85,6 +106,16 @@ export interface PublishCut {
|
|
|
85
106
|
runId: string | null;
|
|
86
107
|
/** The armored ssh signature in the `chant-release` namespace, or null for an unsigned cut. */
|
|
87
108
|
signature: string | null;
|
|
109
|
+
/** The green gate the cut passed (#5149), absent on a cut that recorded none. */
|
|
110
|
+
green?: import("./release-store.js").ReleaseCutGreen;
|
|
111
|
+
/** The override the cut ran under (#4693), absent on a cut of a green commit. */
|
|
112
|
+
override?: import("./release-store.js").ReleaseCutOverride;
|
|
113
|
+
/** The green lane the cut checked (#4692), absent for the full green tag. */
|
|
114
|
+
lane?: string;
|
|
115
|
+
/** The payload version the signature signs (#5177): 2 when it covers the gate; absent otherwise. */
|
|
116
|
+
sealVersion?: 2;
|
|
117
|
+
/** Whether the gate above is covered by a signature that verifies (#5177). */
|
|
118
|
+
gate?: "signed" | "unsigned";
|
|
88
119
|
}
|
|
89
120
|
/**
|
|
90
121
|
* What one target staged: its items, out where the target publishes but not
|
|
@@ -122,6 +153,8 @@ export interface PublishDeps {
|
|
|
122
153
|
npm?: string;
|
|
123
154
|
/** The vsce executable the VS Code Marketplace target runs (#4676). Default: `vsce` on `PATH`. */
|
|
124
155
|
vsce?: string;
|
|
156
|
+
/** The cargo executable the cargo target runs (#5167). Default: `cargo` on `PATH`. */
|
|
157
|
+
cargo?: string;
|
|
125
158
|
/** The git executable the homebrew target runs to push over SSH (#4699). Default: `git` on `PATH`. */
|
|
126
159
|
git?: string;
|
|
127
160
|
/** The ssh executable git runs for it (#4699). Default: `ssh` on `PATH`. */
|
|
@@ -130,6 +163,8 @@ export interface PublishDeps {
|
|
|
130
163
|
sleep?: (ms: number) => Promise<void>;
|
|
131
164
|
/** The clock a target's wait reads (#4244). Default: `Date.now`. */
|
|
132
165
|
now?: () => number;
|
|
166
|
+
/** What signs with Sigstore (#5164). Default: cosign, run keylessly (./publish-signing.ts). */
|
|
167
|
+
signer?: import("./publish-signing.js").Signer;
|
|
133
168
|
}
|
|
134
169
|
/** The subset of the WHATWG `fetch` the targets use. */
|
|
135
170
|
export type PublishFetch = (url: string, init: {
|
|
@@ -177,8 +212,14 @@ export interface PublishContextBase {
|
|
|
177
212
|
export interface PublishContext extends PublishContextBase {
|
|
178
213
|
release: Release;
|
|
179
214
|
label: string | null;
|
|
180
|
-
/** The tag the cut made for the release, `release/<label>` or `release/<member>/<label
|
|
215
|
+
/** The tag the cut made for the release, from `release.tag` (#5150; default `release/<label>` or `release/<member>/<label>`), or null for a release with no label. */
|
|
181
216
|
releaseTag: string | null;
|
|
217
|
+
/**
|
|
218
|
+
* The tag `release.tag` gives another label of this member (#5150), such
|
|
219
|
+
* as the previous release's, which a forge's generated notes start from.
|
|
220
|
+
* Absent where the template is not known.
|
|
221
|
+
*/
|
|
222
|
+
releaseTagOf?: (label: string) => string | null;
|
|
182
223
|
/** The cut whose signature the provenance statement carries (#4049), or null when none is known. */
|
|
183
224
|
cut?: PublishCut | null;
|
|
184
225
|
/** The member's directory, which the declaration's paths are relative to. */
|
|
@@ -189,6 +230,11 @@ export interface PublishContext extends PublishContextBase {
|
|
|
189
230
|
* without an SBOM. A declared `sbom` file is attached either way.
|
|
190
231
|
*/
|
|
191
232
|
requireSbom?: boolean;
|
|
233
|
+
/**
|
|
234
|
+
* Set when the publish signs with Sigstore (#5164): the OCI and forge
|
|
235
|
+
* targets sign what they stage with it. Null or absent: nothing is signed.
|
|
236
|
+
*/
|
|
237
|
+
signing?: import("./publish-signing.js").SigningContext | null;
|
|
192
238
|
}
|
|
193
239
|
/** A target refused or failed. The message never holds a credential. */
|
|
194
240
|
export declare class PublishTargetError extends Error {
|
|
@@ -197,7 +243,7 @@ export declare class PublishTargetError extends Error {
|
|
|
197
243
|
constructor(code: string, message: string, fix?: string | undefined);
|
|
198
244
|
}
|
|
199
245
|
/** The kinds `release.publish` declares and `createPublishTargets` makes. */
|
|
200
|
-
export type ReleasePublishKind = "npm" | "oci" | "forge" | "homebrew" | "marketplace" | "tauri-updater";
|
|
246
|
+
export type ReleasePublishKind = "npm" | "oci" | "forge" | "homebrew" | "marketplace" | "tauri-updater" | "pypi" | "cargo" | "mcp-registry" | "index" | "helm" | "maven" | "nuget" | "rubygems";
|
|
201
247
|
/** The npm dist-tag a set of packages is staged under before `latest` moves (#4048), as chant's own releases do (#3903). */
|
|
202
248
|
export declare const NPM_STAGE_TAG = "next";
|
|
203
249
|
/**
|
|
@@ -255,12 +301,136 @@ export interface PublishTarget<C extends PublishContextBase = PublishContext, K
|
|
|
255
301
|
* again, it moves nothing that already moved. Throws {@link PublishTargetError}.
|
|
256
302
|
*/
|
|
257
303
|
reveal(ctx: C, staged: StagedTarget): Promise<PublishedTarget>;
|
|
304
|
+
/**
|
|
305
|
+
* True when {@link stage} already puts the items where a consumer resolves
|
|
306
|
+
* them, so there is nothing to hold back (npm under `stage: false`). A
|
|
307
|
+
* train publish (#5136) stages such a target in its dependency layer's
|
|
308
|
+
* turn, after the layers before it are visible, instead of up front.
|
|
309
|
+
*/
|
|
310
|
+
stagesVisibly?: boolean;
|
|
311
|
+
/**
|
|
312
|
+
* True when {@link stage} sends nothing and {@link reveal} is the upload,
|
|
313
|
+
* because the destination has no place to hold a release unseen (a
|
|
314
|
+
* marketplace, PyPI, a Cargo registry, #5167). Nothing of it is out
|
|
315
|
+
* between the two steps, so a check of what staged can't see it.
|
|
316
|
+
*/
|
|
317
|
+
uploadsAtReveal?: boolean;
|
|
318
|
+
/**
|
|
319
|
+
* True for a target that lists what other targets publish, so it must
|
|
320
|
+
* reveal after them (an MCP Registry entry names npm packages and images,
|
|
321
|
+
* #5162). The reveal runs these last, in the order declared, whatever
|
|
322
|
+
* their place in the list.
|
|
323
|
+
*/
|
|
324
|
+
revealsLast?: boolean;
|
|
325
|
+
/**
|
|
326
|
+
* True when a refusal from the target's destination is a warning
|
|
327
|
+
* (`onRefusal: "warn"` on an index target, #5158): the publish goes on,
|
|
328
|
+
* the target comes back with a `warning`, and its reveal is not recorded,
|
|
329
|
+
* so a run of the same publish tries it again. A refusal at the stage
|
|
330
|
+
* skips the target's reveal; one at the reveal leaves the rest revealing.
|
|
331
|
+
*/
|
|
332
|
+
refusalWarns?: boolean;
|
|
333
|
+
/**
|
|
334
|
+
* The names this target publishes and the names of others' it depends on,
|
|
335
|
+
* each `<kind>:<name>` (./publish-train-names.ts, #5165; npm: the package
|
|
336
|
+
* names, and every `dependencies`, `peerDependencies` and
|
|
337
|
+
* `optionalDependencies` key). A train publish orders its members by them
|
|
338
|
+
* (#5136), across kinds. Absent: the target neither provides nor needs anything.
|
|
339
|
+
*/
|
|
340
|
+
names?(ctx: C): Promise<{
|
|
341
|
+
provides: string[];
|
|
342
|
+
needs: string[];
|
|
343
|
+
}>;
|
|
344
|
+
/**
|
|
345
|
+
* Whether the destination already serves what this target publishes for
|
|
346
|
+
* `ctx.label`, read without checking digests, since the checkout need not
|
|
347
|
+
* be the release's commit (#5136): true, false, or null when it can't tell.
|
|
348
|
+
* A train publish asks it of a member pinned at an earlier release whose
|
|
349
|
+
* publish record does not show it revealed.
|
|
350
|
+
*/
|
|
351
|
+
published?(ctx: C): Promise<boolean | null>;
|
|
352
|
+
/**
|
|
353
|
+
* Wait until a consumer resolving the reveal's tag gets what `published`
|
|
354
|
+
* holds (npm: `dist-tags.latest` names the version; OCI: each tag names the
|
|
355
|
+
* digest; an index or registry lists the version). It reads only `ctx` and
|
|
356
|
+
* the items, which may come from the publish record of an earlier run. A
|
|
357
|
+
* train publish waits
|
|
358
|
+
* on each dependency layer before the next one reveals (#5136). Throws
|
|
359
|
+
* {@link PublishTargetError}.
|
|
360
|
+
*/
|
|
361
|
+
visible?(ctx: C, published: PublishedTarget): Promise<void>;
|
|
362
|
+
/**
|
|
363
|
+
* Deprecate, yank or restore what this target published for a release
|
|
364
|
+
* (#5163), from the publish record's items, never from the checkout. With
|
|
365
|
+
* `ctx.apply` false it asks nothing and says what it would do. Each
|
|
366
|
+
* action that is already so comes back `already`; one the destination
|
|
367
|
+
* can't do comes back `refused`. Run again, it sends nothing that is
|
|
368
|
+
* already so. Absent: the target refuses every status change.
|
|
369
|
+
*/
|
|
370
|
+
setStatus?(ctx: StatusContext): Promise<StatusAction[]>;
|
|
258
371
|
}
|
|
372
|
+
/** How a yank leaves the forge release (#5163): marked a prerelease, made a draft again, or deleted. */
|
|
373
|
+
export type ForgeYankMode = "prerelease" | "draft" | "delete";
|
|
374
|
+
/** One release as a status change sees it on one target: what its publish revealed there. */
|
|
375
|
+
export interface StatusRelease {
|
|
376
|
+
releaseDigest: string;
|
|
377
|
+
label: string | null;
|
|
378
|
+
/** The tag its cut made, or null for a release with no label. */
|
|
379
|
+
releaseTag: string | null;
|
|
380
|
+
/** The items the publish record says its reveal published on the target. */
|
|
381
|
+
items: PublishItem[];
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* What a target is given to deprecate, yank or restore a published release
|
|
385
|
+
* (#5163). It reads no file in the checkout: what went out is the publish
|
|
386
|
+
* record's, so a status change runs from any checkout of the member.
|
|
387
|
+
*/
|
|
388
|
+
export interface StatusContext extends PublishContextBase {
|
|
389
|
+
release: Release;
|
|
390
|
+
label: string | null;
|
|
391
|
+
releaseTag: string | null;
|
|
392
|
+
/** The status being set: `deprecated`, `yanked`, or `active` to restore. */
|
|
393
|
+
status: "active" | "deprecated" | "yanked";
|
|
394
|
+
/** Why, as the person gave it, or null. */
|
|
395
|
+
reason: string | null;
|
|
396
|
+
/** The release to move to instead, as the person named it, or null. */
|
|
397
|
+
replacement: string | null;
|
|
398
|
+
/** What this release's publish revealed on the target. */
|
|
399
|
+
revealed: PublishItem[];
|
|
400
|
+
/**
|
|
401
|
+
* The release the target's moving tags (npm's dist-tag, OCI tags with no
|
|
402
|
+
* `{label}`, a tap's formula, GitHub's latest) should point at once the
|
|
403
|
+
* status is set: the newest release of the same channel whose status is
|
|
404
|
+
* active, that is not revoked and that was revealed on this target. It is
|
|
405
|
+
* this release on a restore when nothing newer is active, and null when
|
|
406
|
+
* there is none.
|
|
407
|
+
*/
|
|
408
|
+
head: StatusRelease | null;
|
|
409
|
+
/** How a yank leaves a forge release. */
|
|
410
|
+
forgeYank: ForgeYankMode;
|
|
411
|
+
/** False for a dry run: describe what would be done and make no request. */
|
|
412
|
+
apply: boolean;
|
|
413
|
+
}
|
|
414
|
+
/** One thing a status change does, or would do, on a target. */
|
|
415
|
+
export interface StatusAction {
|
|
416
|
+
/** What, in a line: `npm deprecate @acme/core@1.4.0`. */
|
|
417
|
+
what: string;
|
|
418
|
+
/** True when the destination was already so, and nothing was sent. */
|
|
419
|
+
already?: boolean;
|
|
420
|
+
/** Set when the target can't do it: why, with a code, and nothing was sent for it. */
|
|
421
|
+
refused?: {
|
|
422
|
+
code: string;
|
|
423
|
+
message: string;
|
|
424
|
+
fix?: string;
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
/** The deprecation message a status change gives a version: the reason, and the release to use instead. */
|
|
428
|
+
export declare function statusMessage(ctx: Pick<StatusContext, "status" | "reason" | "replacement">): string;
|
|
259
429
|
/** The targets the member at `cwd` declares under `release.publish` in its `chant.config.ts`. */
|
|
260
430
|
export declare function releasePublishTargets(cwd: string, deps?: PublishDeps): Promise<PublishTarget[]>;
|
|
261
431
|
/** Why a publish was refused before anything ran. */
|
|
262
432
|
export interface PublishRefusal {
|
|
263
|
-
code: "release-not-found" | "release-revoked" | "release-unsigned" | "release-signature-unverified" | "publish-provenance-missing" | "publish-config-invalid" | "release-head-mismatch" | "release-worktree-dirty";
|
|
433
|
+
code: "release-not-found" | "release-revoked" | "release-unsigned" | "release-signature-unverified" | "publish-provenance-missing" | "publish-signing-no-oidc" | "publish-signing-tool-missing" | "publish-config-invalid" | "release-head-mismatch" | "release-worktree-dirty" | "release-tag-template-invalid" | "release-tag-collision";
|
|
264
434
|
message: string;
|
|
265
435
|
fix?: string;
|
|
266
436
|
}
|
|
@@ -274,23 +444,42 @@ export interface PublishPlan {
|
|
|
274
444
|
actor: string | null;
|
|
275
445
|
key: string | null;
|
|
276
446
|
reason: string;
|
|
447
|
+
gate: "signed" | "unsigned";
|
|
277
448
|
};
|
|
278
449
|
provenance: ProvenanceCheck;
|
|
279
450
|
/** The warning printed before publishing, when the run has no OIDC token and the workspace opts into `supply-chain` (#4168). */
|
|
280
451
|
warning: string | null;
|
|
281
452
|
/** The warning printed before publishing a release with no verified signature under `--allow-unsigned` (#4049). */
|
|
282
453
|
signatureWarning: string | null;
|
|
454
|
+
/**
|
|
455
|
+
* The warning printed when `verified-releases` or a release gate is on and
|
|
456
|
+
* the verified cut was signed before chant signed the green gate (#5177),
|
|
457
|
+
* so its signature does not cover the gate the cut line records.
|
|
458
|
+
*/
|
|
459
|
+
gateWarning: string | null;
|
|
283
460
|
/** The cut whose signature the provenance statement carries: the verified one, else the newest. */
|
|
284
461
|
cut: PublishCut | null;
|
|
285
462
|
/** The tag the cut made, or null for a release with no label. */
|
|
286
463
|
releaseTag: string | null;
|
|
464
|
+
/** The tag the member's `release.tag` gives another label (#5150). */
|
|
465
|
+
releaseTagOf?: (label: string) => string | null;
|
|
466
|
+
/** The floating tag `release.tag.floating` names (#5150), and whether this release moves it; null when there is none. */
|
|
467
|
+
floating?: FloatingTag | null;
|
|
287
468
|
targets: PublishTarget[];
|
|
469
|
+
/** `release.verify` (#5157): the commands run after every target has staged and before any reveals. */
|
|
470
|
+
verify?: import("./publish-verify.js").VerifyStep[];
|
|
471
|
+
/** `release.dependsOn` (#5165): the workspace members a train publish reveals before this one. */
|
|
472
|
+
dependsOn?: string[];
|
|
288
473
|
/** Masks the run's credentials in what the publish prints. */
|
|
289
474
|
redactor: Redactor;
|
|
290
475
|
/** Whether a target with no SBOM source is refused (`publish-sbom-missing`): the workspace opts into `supply-chain` (#4168). Otherwise it publishes without one. */
|
|
291
476
|
requireSbom: boolean;
|
|
292
477
|
/** The channel a cut of the release names (#4168 4.3), the tag moved in place of `latest`, or null. */
|
|
293
478
|
channel: string | null;
|
|
479
|
+
/** What the OCI and forge targets sign with (#5164), or null when the publish does not sign. */
|
|
480
|
+
signing: import("./publish-signing.js").SigningContext | null;
|
|
481
|
+
/** The warning printed when the `supply-chain` group asks for signing and `release.signing: false` turns it off. */
|
|
482
|
+
signingWarning: string | null;
|
|
294
483
|
}
|
|
295
484
|
/**
|
|
296
485
|
* Resolve `ref` (a label or a digest) in the member at `cwd` and decide
|
|
@@ -309,6 +498,13 @@ export declare function preparePublish(req: {
|
|
|
309
498
|
deps?: PublishDeps;
|
|
310
499
|
allowUnsigned?: boolean;
|
|
311
500
|
requireProvenance?: boolean;
|
|
501
|
+
/**
|
|
502
|
+
* Paths (as `git status --porcelain` prints them) other members of a
|
|
503
|
+
* release train stamped with their own labels (#5154): a train publish
|
|
504
|
+
* stamps every member it publishes in one checkout, so each member takes
|
|
505
|
+
* the others' stamps as the commit's too.
|
|
506
|
+
*/
|
|
507
|
+
alsoStamped?: ReadonlySet<string>;
|
|
312
508
|
}): Promise<PublishPlan | {
|
|
313
509
|
refusal: PublishRefusal;
|
|
314
510
|
}>;
|
|
@@ -325,7 +521,31 @@ export declare function preparePublish(req: {
|
|
|
325
521
|
export declare function checkCheckoutIsRelease(cwd: string, commit: string, name: string, o?: {
|
|
326
522
|
version?: ReleaseVersionConfig;
|
|
327
523
|
label?: string | null;
|
|
524
|
+
trains?: readonly import("./release-version.js").RangeLabels[];
|
|
525
|
+
alsoStamped?: ReadonlySet<string>;
|
|
328
526
|
}): PublishRefusal | null;
|
|
527
|
+
/** A floating tag (#5150), such as `v1`, and whether the publish moves it to the release's commit once every target has revealed. */
|
|
528
|
+
export interface FloatingTag {
|
|
529
|
+
name: string;
|
|
530
|
+
commit: string;
|
|
531
|
+
/** True when the publish moves it; false with `reason` when it leaves it. */
|
|
532
|
+
move: boolean;
|
|
533
|
+
reason: string | null;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Whether a release labelled `label` moves the member's floating tag: only
|
|
537
|
+
* a stable version, cut with no channel, whose version is the highest of its
|
|
538
|
+
* major among the member's labels, so a fix to an older line never moves
|
|
539
|
+
* `v1` back. A prerelease label leaves it where it is. Null when the member
|
|
540
|
+
* declares no floating tag or the label names no version.
|
|
541
|
+
*/
|
|
542
|
+
export declare function floatingTagPlan(tags: MemberTags, label: string, commit: string, channel: string | null, labels: readonly string[]): FloatingTag | null;
|
|
543
|
+
/**
|
|
544
|
+
* Move the floating tag to the release's commit, here and on `remote`
|
|
545
|
+
* (#5150). Returns a warning when it could not, naming the commands to run
|
|
546
|
+
* by hand; the release is published either way.
|
|
547
|
+
*/
|
|
548
|
+
export declare function moveFloatingTag(cwd: string, floating: FloatingTag, remote?: string): string | null;
|
|
329
549
|
/** The context each target is planned and published with. */
|
|
330
550
|
export declare function publishContext(plan: PublishPlan, req: {
|
|
331
551
|
cwd: string;
|
|
@@ -344,22 +564,44 @@ export interface PublishRun {
|
|
|
344
564
|
}>;
|
|
345
565
|
/** Why a record line was not written or not pushed, when one wasn't. A resume then asks the registries. */
|
|
346
566
|
recordWarning: string | null;
|
|
567
|
+
/** How `release.verify` went (#5157): `passed`, or `skipped` when a reveal was already recorded; absent with no commands. */
|
|
568
|
+
verify?: "passed" | "skipped";
|
|
347
569
|
}
|
|
348
570
|
/** A publish that stopped, with what it left staged and revealed so a run of the same command resumes. */
|
|
349
571
|
export declare class PublishRunError extends PublishTargetError {
|
|
350
|
-
readonly step: "stage" | "reveal";
|
|
572
|
+
readonly step: "stage" | "verify" | "reveal";
|
|
351
573
|
readonly staged: string[];
|
|
352
574
|
readonly revealed: string[];
|
|
353
|
-
constructor(code: string, message: string, fix: string | undefined, step: "stage" | "reveal", staged: string[], revealed: string[]);
|
|
575
|
+
constructor(code: string, message: string, fix: string | undefined, step: "stage" | "verify" | "reveal", staged: string[], revealed: string[]);
|
|
354
576
|
}
|
|
577
|
+
/**
|
|
578
|
+
* The order targets reveal in: every other target in the order declared,
|
|
579
|
+
* then the targets that upload at reveal (`uploadsAtReveal`: marketplace,
|
|
580
|
+
* PyPI, Cargo) in the order declared, then the targets that reveal last
|
|
581
|
+
* (`revealsLast`: the MCP Registry) in the order declared.
|
|
582
|
+
*
|
|
583
|
+
* An upload at reveal can't be taken back, so it waits until the reveals
|
|
584
|
+
* that only move a tag or publish a draft have gone through. A target that
|
|
585
|
+
* reveals last lists packages other targets publish, PyPI ones among them,
|
|
586
|
+
* so it goes after the uploads too.
|
|
587
|
+
*/
|
|
588
|
+
export declare function revealOrder<T extends Pick<PublishTarget, "uploadsAtReveal" | "revealsLast">>(targets: readonly T[]): T[];
|
|
355
589
|
/**
|
|
356
590
|
* Publish `targets` all or nothing (#4048), from the record of earlier runs:
|
|
357
591
|
*
|
|
358
592
|
* 1. Stage every target in the order declared, skipping one the record says
|
|
359
593
|
* staged or revealed. Each stage is recorded and pushed as it finishes.
|
|
360
|
-
* A failure here leaves nothing visible to a consumer.
|
|
361
|
-
*
|
|
362
|
-
*
|
|
594
|
+
* A failure here leaves nothing visible to a consumer. A target whose
|
|
595
|
+
* stage is already visible (`stagesVisibly`) is not staged here but just
|
|
596
|
+
* before its reveal, so it is never visible before the others have staged.
|
|
597
|
+
* 2. Run `verify` (#5157), the `release.verify` commands, with the staged
|
|
598
|
+
* references, unless the record shows a reveal. A failure is recorded
|
|
599
|
+
* and stops the publish with nothing visible.
|
|
600
|
+
* 3. Reveal each target in {@link revealOrder}, skipping one the record says
|
|
601
|
+
* revealed, and record each reveal.
|
|
602
|
+
*
|
|
603
|
+
* A target whose refusals are warnings (`refusalWarns`) does not stop
|
|
604
|
+
* either step: it comes back with a `warning` and no reveal is recorded.
|
|
363
605
|
*
|
|
364
606
|
* A run of the same publish after a failure resumes: what went out is not
|
|
365
607
|
* published again, and a stage that failed part way sends only what its
|
|
@@ -371,6 +613,10 @@ export declare function runPublish(req: {
|
|
|
371
613
|
label: string | null;
|
|
372
614
|
targets: readonly PublishTarget[];
|
|
373
615
|
ctx: PublishContext;
|
|
616
|
+
/** `release.verify` (#5157). Default none. */
|
|
617
|
+
verify?: readonly import("./publish-verify.js").VerifyStep[];
|
|
618
|
+
/** Runs one verify command; the default runs it through the shell. */
|
|
619
|
+
runVerify?: import("./publish-verify.js").VerifyRunner;
|
|
374
620
|
/** Write the record. Default true. */
|
|
375
621
|
record?: boolean;
|
|
376
622
|
/** Print one line of progress. Redacted by the caller. */
|