1 | import { CrossbowConfiguration } from "./config";
|
2 | import { CrossbowInput, CLI } from "./index";
|
3 | import { ExternalFile, ExternalFileInput, ExternalFileContent, HashDirErrorTypes } from "./file.utils";
|
4 | import { TaskReport } from "./task.runner";
|
5 | import { CommandTrigger } from "./command.run";
|
6 | import { SequenceItem } from "./task.sequence.factories";
|
7 | import { InitConfigFileExistsError, InitConfigFileTypeNotSupported } from "./command.init";
|
8 | import { ParsedPath } from "path";
|
9 | import { Task, TaskCollection } from "./task.resolve";
|
10 | import { WatchTask, Watcher, WatchTasks } from "./watch.resolve";
|
11 | import { DocsInputFileNotFoundError, DocsOutputFileExistsError } from "./command.docs";
|
12 | import Rx = require("rx");
|
13 | import { WatchEvent } from "./watch.file-watcher";
|
14 | import { TaskCommandSetup } from "./command.tasks";
|
15 | import { WatchersCommandOutput } from "./command.watchers";
|
16 | import { InputError } from "./task.utils";
|
17 | export interface Reporter {
|
18 | errors: {}[];
|
19 | type: ReporterTypes;
|
20 | callable?: Function;
|
21 | sources: ExternalFile[];
|
22 | }
|
23 | export declare enum ReporterErrorTypes {
|
24 | ReporterFileNotFound,
|
25 | ReporterTypeNotSupported,
|
26 | }
|
27 | export interface ReporterError {
|
28 | type: ReporterErrorTypes;
|
29 | file?: ExternalFile;
|
30 | }
|
31 | export interface ReporterFileNotFoundError extends ReporterError {
|
32 | }
|
33 | export interface ReporterTypeNotSupportedError extends ReporterError {
|
34 | }
|
35 | export declare enum ReporterTypes {
|
36 | InlineFunction,
|
37 | ExternalFile,
|
38 | UnsupportedValue,
|
39 | Muted,
|
40 | }
|
41 | export interface Reporters {
|
42 | all: Reporter[];
|
43 | valid: Reporter[];
|
44 | invalid: Reporter[];
|
45 | }
|
46 | export declare enum ReportTypes {
|
47 | DuplicateInputFile,
|
48 | InputFileCreated,
|
49 | InitInputFileTypeNotSupported,
|
50 | InputError,
|
51 | BinOptionError,
|
52 | EnvFileOptionError,
|
53 | InputFileNotFound,
|
54 | InvalidReporter,
|
55 | InvalidBinDirectory,
|
56 | UsingInputFile,
|
57 | TaskList,
|
58 | TaskTree,
|
59 | TaskErrors,
|
60 | TaskReport,
|
61 | NoTasksAvailable,
|
62 | NoTasksProvided,
|
63 | SimpleTaskList,
|
64 | BeforeWatchTaskErrors,
|
65 | BeforeTaskList,
|
66 | BeforeTasksDidNotComplete,
|
67 | BeforeTasksSummary,
|
68 | WatchTaskTasksErrors,
|
69 | WatchTaskErrors,
|
70 | WatchTaskReport,
|
71 | NoFilesMatched,
|
72 | NoWatchersAvailable,
|
73 | NoWatchTasksProvided,
|
74 | Watchers,
|
75 | WatcherNames,
|
76 | WatcherTriggeredTasksCompleted,
|
77 | WatcherTriggeredTasks,
|
78 | WatcherSummary,
|
79 | DocsAddedToFile,
|
80 | DocsGenerated,
|
81 | DocsInputFileNotFound,
|
82 | DocsOutputFileExists,
|
83 | DocsInvalidTasksSimple,
|
84 | HashDirError,
|
85 | Summary,
|
86 | SignalReceived,
|
87 | CLIParserOutput,
|
88 | }
|
89 | export interface IncomingReport {
|
90 | type: ReportTypes;
|
91 | data?: any;
|
92 | }
|
93 | export interface OutgoingReport {
|
94 | origin: ReportTypes;
|
95 | data: string[];
|
96 | }
|
97 | export interface UsingConfigFileReport {
|
98 | sources: ExternalFileInput[];
|
99 | }
|
100 | export interface InputFileNotFoundReport {
|
101 | sources: ExternalFileInput[];
|
102 | }
|
103 | export interface InputErrorReport {
|
104 | errors: any[];
|
105 | sources: ExternalFileInput[];
|
106 | }
|
107 | export interface TaskReportReport {
|
108 | report: TaskReport;
|
109 | config: CrossbowConfiguration;
|
110 | }
|
111 | export interface SignalReceivedReport {
|
112 | code: number;
|
113 | }
|
114 | export interface SummaryReport {
|
115 | sequence: SequenceItem[];
|
116 | cli: CLI;
|
117 | config: CrossbowConfiguration;
|
118 | runtime: number;
|
119 | errors: TaskReport[];
|
120 | }
|
121 | export interface BeforeTasksSummaryReport {
|
122 | sequence: SequenceItem[];
|
123 | cli: CLI;
|
124 | config: CrossbowConfiguration;
|
125 | runtime: number;
|
126 | errors: TaskReport[];
|
127 | }
|
128 | export interface WatcherSummaryReport {
|
129 | sequence: SequenceItem[];
|
130 | cli: CLI;
|
131 | config: CrossbowConfiguration;
|
132 | runtime: number;
|
133 | errors: TaskReport[];
|
134 | watchEvent: WatchEvent;
|
135 | watcher: Watcher;
|
136 | }
|
137 | export interface TaskListReport {
|
138 | sequence: SequenceItem[];
|
139 | cli: CLI;
|
140 | titlePrefix: string;
|
141 | config: CrossbowConfiguration;
|
142 | }
|
143 | export interface SimpleTaskListReport {
|
144 | setup: TaskCommandSetup;
|
145 | }
|
146 | export interface BinDirectoryLookup {
|
147 | errors: InputError[];
|
148 | input: string;
|
149 | resolved: string;
|
150 | }
|
151 | export interface InvalidBinDirectoryReport {
|
152 | lookups: {
|
153 | all: BinDirectoryLookup[];
|
154 | valid: BinDirectoryLookup[];
|
155 | invalid: BinDirectoryLookup[];
|
156 | };
|
157 | }
|
158 | export interface InvalidReporterReport {
|
159 | reporters: Reporters;
|
160 | }
|
161 | export interface DuplicateConfigFile {
|
162 | error: InitConfigFileExistsError;
|
163 | }
|
164 | export interface ConfigFileCreatedReport {
|
165 | parsed: ParsedPath;
|
166 | }
|
167 | export interface InitInputFileTypeNotSupportedReport {
|
168 | error: InitConfigFileTypeNotSupported;
|
169 | }
|
170 | export interface TaskTreeReport {
|
171 | tasks: Task[];
|
172 | config: CrossbowConfiguration;
|
173 | title: string;
|
174 | }
|
175 | export interface TaskErrorsReport {
|
176 | tasks: Task[];
|
177 | taskCollection: TaskCollection;
|
178 | input: CrossbowInput;
|
179 | config: CrossbowConfiguration;
|
180 | }
|
181 | export interface WatchersReport {
|
182 | watchTasks: WatchTask[];
|
183 | }
|
184 | export interface BeforeWatchTaskErrorsReport {
|
185 | watchTasks: WatchTasks;
|
186 | trigger: CommandTrigger;
|
187 | }
|
188 | export interface BeforeTaskListReport {
|
189 | sequence: SequenceItem[];
|
190 | cli: CLI;
|
191 | config: CrossbowConfiguration;
|
192 | }
|
193 | export interface BeforeTasksDidNotCompleteReport {
|
194 | error: Error;
|
195 | }
|
196 | export interface WatchTaskTasksErrorsReport {
|
197 | tasks: Task[];
|
198 | runner: Watcher;
|
199 | config: CrossbowConfiguration;
|
200 | }
|
201 | export interface WatchTaskErrorsReport {
|
202 | watchTasks: WatchTask[];
|
203 | }
|
204 | export interface WatchTaskReportReport {
|
205 | report: TaskReport;
|
206 | trigger: CommandTrigger;
|
207 | }
|
208 | export interface WatcherTriggeredTasksReport {
|
209 | index: number;
|
210 | taskCollection: TaskCollection;
|
211 | }
|
212 | export interface WatcherTriggeredTasksCompletedReport {
|
213 | index: number;
|
214 | taskCollection: TaskCollection;
|
215 | time: number;
|
216 | }
|
217 | export interface WatcherNamesReport {
|
218 | setup: WatchersCommandOutput;
|
219 | }
|
220 | export interface NoFilesMatchedReport {
|
221 | watcher: Watcher;
|
222 | }
|
223 | export interface DocsInputFileNotFoundReport {
|
224 | error: DocsInputFileNotFoundError;
|
225 | }
|
226 | export interface DocsAddedToFileReport {
|
227 | file: ExternalFileContent;
|
228 | }
|
229 | export interface DocsOutputFileExistsReport {
|
230 | error: DocsOutputFileExistsError;
|
231 | }
|
232 | export interface HashError extends Error {
|
233 | type: HashDirErrorTypes;
|
234 | }
|
235 | export interface HashDirErrorReport {
|
236 | error: HashError;
|
237 | cwd: string;
|
238 | }
|
239 | export declare function getReporters(config: CrossbowConfiguration): Reporters;
|
240 | export declare type OutgoingReporter = Rx.Subject<OutgoingReport>;
|
241 | export declare function getDefaultReporter(): any;
|