UNPKG

3.43 kBTypeScriptView Raw
1/// <reference types="node" />
2import { Readable } from 'stream';
3import { CloseEvent, Command, CommandIdentifier, TimerEvent } from './command';
4import { concurrently as createConcurrently, 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 { RestartDelay, RestartProcess } from './flow-control/restart-process';
14import { Logger } from './logger';
15export type ConcurrentlyOptions = Omit<BaseConcurrentlyOptions, 'abortSignal' | 'hide'> & {
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 * Pads short prefixes with spaces so that all prefixes have the same length.
31 */
32 padPrefix?: boolean;
33 /**
34 * Whether output should be formatted to include prefixes and whether "event" logs will be logged.
35 */
36 raw?: boolean;
37 /**
38 * Date format used when logging date/time.
39 * @see https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
40 */
41 timestampFormat?: string;
42 defaultInputTarget?: CommandIdentifier;
43 inputStream?: Readable;
44 handleInput?: boolean;
45 pauseInputStreamOnFinish?: boolean;
46 /**
47 * How much time in milliseconds to wait before restarting a command.
48 *
49 * @see RestartProcess
50 */
51 restartDelay?: RestartDelay;
52 /**
53 * How many times commands should be restarted when they exit with a failure.
54 *
55 * @see RestartProcess
56 */
57 restartTries?: number;
58 /**
59 * Under which condition(s) should other commands be killed when the first one exits.
60 *
61 * @see KillOthers
62 */
63 killOthers?: ProcessCloseCondition | ProcessCloseCondition[];
64 /**
65 * Whether to output timing information for processes.
66 *
67 * @see LogTimings
68 */
69 timings?: boolean;
70 /**
71 * Clean up command(s) to execute before exiting concurrently.
72 * These won't be prefixed and don't affect concurrently's exit code.
73 */
74 teardown?: readonly string[];
75 /**
76 * List of additional arguments passed that will get replaced in each command.
77 * If not defined, no argument replacing will happen.
78 */
79 additionalArguments?: string[];
80};
81export declare function concurrently(commands: ConcurrentlyCommandInput[], options?: Partial<ConcurrentlyOptions>): ConcurrentlyResult;
82export { ConcurrentlyCommandInput, ConcurrentlyResult, createConcurrently, Logger };
83export { CloseEvent, Command, CommandIdentifier, TimerEvent };
84export { FlowController, InputHandler, KillOnSignal, KillOthers, LogError, LogExit, LogOutput, LogTimings, RestartProcess, };