import { type Logger } from "webappwiz/log"; import type { Package } from "./workspace/workspace.js"; /** Where a `Cut` speaks and sits; the console and the working directory by default. */ export interface CutOptions { log?: Logger; /** The workspace root, which any path an artifact holds is relative to. */ root?: string; } /** * The release under way, as one artifact of it sees it: the version everything * goes out at, the tag that names it, and where the packages sit. By the time * an artifact is handed one, every package is stamped; everything past the * `stamp` stage sees that stamp committed too. */ export declare class Cut { /** The version every package in this release goes out at. */ readonly version: string; /** * Every package in the workspace, each one after the siblings it depends * on. An artifact that works through them in this order never reaches a * package before whatever it needs is ready. */ readonly packages: readonly Package[]; /** The tag naming this release, such as `v1.2.4`. */ readonly tag: string; /** Where an artifact says what it did. */ readonly log: Logger; /** The workspace root, which any path an artifact holds is relative to. */ readonly root: string; /** Package name to where a build put what that package publishes. */ private readonly staged; constructor( /** The version every package in this release goes out at. */ version: string, /** * Every package in the workspace, each one after the siblings it depends * on. An artifact that works through them in this order never reaches a * package before whatever it needs is ready. */ packages: readonly Package[], opts?: CutOptions); /** * Where the named package publishes from, when the workspace has it: what a * build staged for it, or its own directory when nothing built anything. */ dir(name: string): string | undefined; /** * Says the named package publishes from `dir`. A build calls this so that * the stage after it sends the built package rather than the source one. */ stage(name: string, dir: string): void; }