import type { Logger } from "webappwiz/log"; import type { Cut } from "../cut.js"; import type { Step } from "../step.js"; /** Use a stage to place an artifact before or after the other release work. */ export type Stage = "stamp" | "build" | "publish" | "approve" | "tag" | "notes"; /** Every stage, in the order a release runs them. */ export declare const STAGES: readonly Stage[]; /** Implement an artifact to add a publishing operation to `releases.lockstep`. */ export interface Artifact { /** What `Release.status()` calls it; its packages or its stage when omitted. */ readonly name?: string; /** The public workspace packages this artifact publishes, if any. */ readonly packages: readonly string[]; /** When this runs relative to the other artifacts; `publish` when omitted. */ readonly stage?: Stage; /** Carries this artifact out at the version in `cut`. */ publish(cut: Cut): Promise; /** * Declares finer-grained progress and resume steps. Without it, the release * wraps `publish` in one step. */ steps?(cut: Cut): readonly Step[]; /** * This artifact as `Release.publish()` runs it, from a CI job the registry * trusts. Leave it off when it goes out the same way anywhere. */ trusted?(): Artifact; /** * Has wherever this publishes trust the CI job `Release.publish()` runs in. * Leave it off when nothing about it publishes from CI. */ trust?(log: Logger): Promise; /** Removes output this artifact created, after success or failure. */ clean?(cut: Cut): Promise; /** * The version live wherever this artifact publishes to, or `undefined` when * nothing is out yet. Leave it off when there is nowhere to ask, as for a * build or a stamp, and `Release.status()` skips the artifact. */ deployed?(): Promise; }