UNPKG

kist

Version:

Package Pipeline Processor

56 lines (55 loc) 1.92 kB
import { LiveServer } from "../../live/LiveServer"; import { AbstractProcess } from "../abstract/AbstractProcess"; /** * Manages the lifecycle of the pipeline process and integrates with the * LiveServer for client notifications upon pipeline events. */ export declare class PipelineManager extends AbstractProcess { private liveServer?; /** * The current instance of the pipeline process. */ private pipelineProcess; /** * Flag to prevent overlapping restarts. */ private isRestarting; /** * Initializes the PipelineManager with a LiveServer instance. * * @param liveServer - The LiveServer instance to notify when the * pipeline restarts. */ constructor(liveServer?: LiveServer | undefined); /** * Runs the pipeline using the configuration from the `ConfigStore`. * This method executes the pipeline stages directly, bypassing the CLI. */ runPipeline(): Promise<void>; /** * Restarts the pipeline process, stopping any currently running process. * Notifies connected clients via the LiveServer after restarting. */ restartPipeline(): void; /** * Attaches event listeners to the pipeline process for logging and * notification purposes. */ private attachProcessListeners; /** * Stops the currently running pipeline process, if any. * Gracefully kills the process and handles cleanup. */ stopPipeline(): void; /** * Checks if the pipeline process is currently running. * @returns True if the pipeline process is running, false otherwise. */ isPipelineRunning(): boolean; /** * Restarts the pipeline with a delay, useful for throttling restarts when * changes occur rapidly. * @param delay - The delay in milliseconds before restarting the pipeline. */ restartPipelineWithDelay(delay?: number): void; }