import type { Argv } from "yargs"; import type { Context } from "./context.js"; import type { ConstOrDynamic } from "./shared.js"; import type { Stage } from "./stage.js"; export interface Plugin { /** A unique identifier for this plugin */ readonly id: string; /** Define which plugins are required by this plugin and need to be included */ readonly dependencies?: string[]; /** Will be called before anything else */ init?: (context: Context) => Promise | void; /** Allows a plugin to define additional CLI options */ defineCLIOptions?: (yargs: Argv) => Argv; /** Allows a plugin to define additional stages in the release process */ stages?: ConstOrDynamic; /** * For each stage, define after which plugin this one hooks into the release process. * Without dependencies, plugins are executed in the order they are defined. * * This is evaluated at the start of each stage, so a reaction to previous stage results is possible */ stageAfter?: Record>; /** * For each stage, define after which plugin this one hooks into the release process. * Without dependencies, plugins are executed in the order they are defined. * * This is evaluated at the start of each stage, so a reaction to previous stage results is possible */ stageBefore?: Record>; /** Execute the plugin for the given stage */ executeStage(context: Context, stage: Stage): Promise; } //# sourceMappingURL=plugin.d.ts.map