1 | import { TaskError } from "./task.errors";
|
2 | import { CrossbowInput } from "./index";
|
3 | import { CommandTrigger } from "./command.run";
|
4 | import { Task, Tasks } from "./task.resolve";
|
5 | import { ExternalFile } from "./file.utils";
|
6 |
|
7 |
|
8 |
|
9 | export interface CBFunction extends Function {
|
10 | name: string;
|
11 | }
|
12 | export declare type IncomingTaskItem = string | CBFunction | Task;
|
13 | export declare type IncomingInlineArray = {
|
14 | tasks: Array<IncomingTaskItem>;
|
15 | runMode: TaskRunModes;
|
16 | };
|
17 | export declare type TaskCollection = Array<IncomingTaskItem>;
|
18 | export declare enum TaskTypes {
|
19 | ExternalTask,
|
20 | Adaptor,
|
21 | TaskGroup,
|
22 | ParentGroup,
|
23 | InlineFunction,
|
24 | }
|
25 | export declare enum TaskOriginTypes {
|
26 | CrossbowConfig,
|
27 | NpmScripts,
|
28 | FileSystem,
|
29 | Adaptor,
|
30 | InlineFunction,
|
31 | InlineArray,
|
32 | InlineObject,
|
33 | InlineChildObject,
|
34 | }
|
35 | export declare enum TaskRunModes {
|
36 | series,
|
37 | parallel,
|
38 | }
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 | export declare function createTask(obj: any): Task;
|
45 |
|
46 |
|
47 |
|
48 | export declare function createCircularReferenceTask(incoming: Task, parents: string[]): Task;
|
49 |
|
50 |
|
51 |
|
52 | export declare function getTopLevelValue(baseTaskName: string, input: CrossbowInput): any;
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 | export declare function createAdaptorTask(taskName: any, parents: any): Task;
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 | export declare function maybeTaskNames(tasks: {}, taskName: string): string[];
|
70 | export declare function resolveTasks(taskCollection: TaskCollection, trigger: CommandTrigger): Tasks;
|
71 | export interface Task {
|
72 | adaptor?: string;
|
73 | command?: string;
|
74 | valid: boolean;
|
75 | taskName: string;
|
76 | baseTaskName: string;
|
77 | subTasks: string[];
|
78 | externalTasks: ExternalFile[];
|
79 | tasks: Task[];
|
80 | rawInput: string;
|
81 | parents: string[];
|
82 | errors: TaskError[];
|
83 | runMode: TaskRunModes;
|
84 | startTime?: number;
|
85 | endTime?: number;
|
86 | duration?: number;
|
87 | query: any;
|
88 | flags: any;
|
89 | options: any;
|
90 | cbflags: string[];
|
91 | origin: TaskOriginTypes;
|
92 | type: TaskTypes;
|
93 | inlineFunctions: Array<CBFunction>;
|
94 | env: any;
|
95 | description: string;
|
96 | skipped: boolean;
|
97 | ifChanged: string[];
|
98 | }
|
99 | export interface TasknameWithOrigin {
|
100 | items: string[];
|
101 | origin: TaskOriginTypes;
|
102 | }
|
103 | export interface Tasks {
|
104 | valid: Task[];
|
105 | invalid: Task[];
|
106 | all: Task[];
|
107 | }
|