UNPKG

3 kBTypeScriptView Raw
1/// <reference types="node" />
2import { Readable } from 'stream';
3import { CloseEvent, Command, CommandIdentifier, TimerEvent } from './command';
4import { concurrently, ConcurrentlyCommandInput, ConcurrentlyOptions as BaseConcurrentlyOptions, ConcurrentlyResult } from './concurrently';
5import { FlowController } from './flow-control/flow-controller';
6import { InputHandler } from './flow-control/input-handler';
7import { KillOnSignal } from './flow-control/kill-on-signal';
8import { KillOthers, ProcessCloseCondition } from './flow-control/kill-others';
9import { LogError } from './flow-control/log-error';
10import { LogExit } from './flow-control/log-exit';
11import { LogOutput } from './flow-control/log-output';
12import { LogTimings } from './flow-control/log-timings';
13import { RestartProcess } from './flow-control/restart-process';
14import { Logger } from './logger';
15export type ConcurrentlyOptions = BaseConcurrentlyOptions & {
16 /**
17 * Which command(s) should have their output hidden.
18 */
19 hide?: CommandIdentifier | CommandIdentifier[];
20 /**
21 * The prefix format to use when logging a command's output.
22 * Defaults to the command's index.
23 */
24 prefix?: string;
25 /**
26 * How many characters should a prefix have at most, used when the prefix format is `command`.
27 */
28 prefixLength?: number;
29 /**
30 * Whether output should be formatted to include prefixes and whether "event" logs will be logged.
31 */
32 raw?: boolean;
33 /**
34 * Date format used when logging date/time.
35 * @see https://date-fns.org/v2.0.1/docs/format
36 */
37 timestampFormat?: string;
38 defaultInputTarget?: CommandIdentifier;
39 inputStream?: Readable;
40 handleInput?: boolean;
41 pauseInputStreamOnFinish?: boolean;
42 /**
43 * How much time in milliseconds to wait before restarting a command.
44 *
45 * @see RestartProcess
46 */
47 restartDelay?: number;
48 /**
49 * How many times commands should be restarted when they exit with a failure.
50 *
51 * @see RestartProcess
52 */
53 restartTries?: number;
54 /**
55 * Under which condition(s) should other commands be killed when the first one exits.
56 *
57 * @see KillOthers
58 */
59 killOthers?: ProcessCloseCondition | ProcessCloseCondition[];
60 /**
61 * Whether to output timing information for processes.
62 *
63 * @see LogTimings
64 */
65 timings?: boolean;
66 /**
67 * List of additional arguments passed that will get replaced in each command.
68 * If not defined, no argument replacing will happen.
69 */
70 additionalArguments?: string[];
71};
72declare const _default: (commands: ConcurrentlyCommandInput[], options?: Partial<ConcurrentlyOptions>) => ConcurrentlyResult;
73export default _default;
74export { CloseEvent, Command, CommandIdentifier, concurrently, ConcurrentlyCommandInput, ConcurrentlyResult, FlowController, InputHandler, KillOnSignal, KillOthers, LogError, LogExit, Logger, LogOutput, LogTimings, RestartProcess, TimerEvent, };