1 |
|
2 | import { Observable } from 'rxjs';
|
3 | export * from './NodeProcess/types';
|
4 | export declare type IRunOptions = {
|
5 | cwd?: string;
|
6 | silent?: boolean;
|
7 | env?: NodeJS.ProcessEnv;
|
8 | };
|
9 | export declare type IResult = {
|
10 | ok: boolean;
|
11 | code: number;
|
12 | error?: Error;
|
13 | };
|
14 | export declare type IResultInfo = IResult & {
|
15 | info: string[];
|
16 | errors: string[];
|
17 | };
|
18 | export declare type ITask<T = any> = {
|
19 | title: string;
|
20 | task: () => Promise<T> | T;
|
21 | };
|
22 | export declare type ICommand = {
|
23 | title: string;
|
24 | cmd: string;
|
25 | };
|
26 | export declare type ICommandInfo = {
|
27 | type: 'stdout' | 'stderr';
|
28 | text: string;
|
29 | };
|
30 | export declare type ICommandPromise = Promise<IResultInfo> & IResultInfo & {
|
31 | isComplete: boolean;
|
32 | complete$: Observable<{}>;
|
33 | output$: Observable<ICommandInfo>;
|
34 | stdout$: Observable<string>;
|
35 | stderr$: Observable<string>;
|
36 | stdout: string[];
|
37 | stderr: string[];
|
38 | cwd: string;
|
39 | kill(): void;
|
40 | };
|
41 | export declare type ILog = {
|
42 | info: LogValue;
|
43 | warn: LogValue;
|
44 | error: LogValue;
|
45 | };
|
46 | export declare type LogValue = (...value: any) => void;
|
47 | export declare type ICommandListExecutionResponse = IResult & {
|
48 | ok: boolean;
|
49 | results: IListCommandResult[];
|
50 | errors: ICommandErrors;
|
51 | cwd: string;
|
52 | };
|
53 | export declare type IListCommandResult = {
|
54 | ok: boolean;
|
55 | index: number;
|
56 | cmd: string;
|
57 | data: IResultInfo;
|
58 | stdout: string[];
|
59 | stderr: string[];
|
60 | };
|
61 | export declare type ICommandErrors = ICommandError[] & {
|
62 | log: (args: {
|
63 | log?: ILog | null;
|
64 | index?: number | number[];
|
65 | header?: boolean;
|
66 | }) => string;
|
67 | };
|
68 | export declare type ICommandError = {
|
69 | index: number;
|
70 | cmd: string;
|
71 | errors: string[];
|
72 | };
|