UNPKG

847 BTypeScriptView Raw
1/// <reference types="node" />
2import { Command } from '../command';
3import { Logger } from '../logger';
4import { FlowController } from './flow-controller';
5export type ProcessCloseCondition = 'failure' | 'success';
6/**
7 * Sends a SIGTERM signal to all commands when one of the commands exits with a matching condition.
8 */
9export declare class KillOthers implements FlowController {
10 private readonly logger;
11 private readonly abortController?;
12 private readonly conditions;
13 private readonly killSignal;
14 constructor({ logger, abortController, conditions, killSignal, }: {
15 logger: Logger;
16 abortController?: AbortController;
17 conditions: ProcessCloseCondition | ProcessCloseCondition[];
18 killSignal: string | undefined;
19 });
20 handle(commands: Command[]): {
21 commands: Command[];
22 };
23}