-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
interfaces.ts
45 lines (32 loc) · 1.33 KB
/
interfaces.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import * as stream from 'stream'
/**
* Interface for exec options
*/
export interface ExecOptions {
/** optional working directory. defaults to current */
cwd?: string
/** optional envvar dictionary. defaults to current process's env */
env?: {[key: string]: string}
/** optional. defaults to false */
silent?: boolean
/** optional out stream to use. Defaults to process.stdout */
outStream?: stream.Writable
/** optional err stream to use. Defaults to process.stderr */
errStream?: stream.Writable
/** optional. whether to skip quoting/escaping arguments if needed. defaults to false. */
windowsVerbatimArguments?: boolean
/** optional. whether to fail if output to stderr. defaults to false */
failOnStdErr?: boolean
/** optional. defaults to failing on non zero. ignore will not fail leaving it up to the caller */
ignoreReturnCode?: boolean
/** optional. How long in ms to wait for STDIO streams to close after the exit event of the process before terminating. defaults to 10000 */
delay?: number
/** optional. Listeners for output. Callback functions that will be called on these events */
listeners?: {
stdout?: (data: Buffer) => void
stderr?: (data: Buffer) => void
stdline?: (data: string) => void
errline?: (data: string) => void
debug?: (data: string) => void
}
}