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 | InputFileNotFound,
|
53 | InvalidReporter,
|
54 | InvalidBinDirectory,
|
55 | UsingInputFile,
|
56 | TaskList,
|
57 | TaskTree,
|
58 | TaskErrors,
|
59 | TaskReport,
|
60 | NoTasksAvailable,
|
61 | NoTasksProvided,
|
62 | SimpleTaskList,
|
63 | BeforeWatchTaskErrors,
|
64 | BeforeTaskList,
|
65 | BeforeTasksDidNotComplete,
|
66 | BeforeTasksSummary,
|
67 | WatchTaskTasksErrors,
|
68 | WatchTaskErrors,
|
69 | WatchTaskReport,
|
70 | NoFilesMatched,
|
71 | NoWatchersAvailable,
|
72 | NoWatchTasksProvided,
|
73 | Watchers,
|
74 | WatcherNames,
|
75 | WatcherTriggeredTasksCompleted,
|
76 | WatcherTriggeredTasks,
|
77 | WatcherSummary,
|
78 | DocsAddedToFile,
|
79 | DocsGenerated,
|
80 | DocsInputFileNotFound,
|
81 | DocsOutputFileExists,
|
82 | DocsInvalidTasksSimple,
|
83 | HashDirError,
|
84 | Summary,
|
85 | SignalReceived,
|
86 | CLIParserOutput,
|
87 | }
|
88 | export interface IncomingReport {
|
89 | type: ReportTypes;
|
90 | data?: any;
|
91 | }
|
92 | export interface OutgoingReport {
|
93 | origin: ReportTypes;
|
94 | data: string[];
|
95 | }
|
96 | export interface UsingConfigFileReport {
|
97 | sources: ExternalFileInput[];
|
98 | }
|
99 | export interface InputFileNotFoundReport {
|
100 | sources: ExternalFileInput[];
|
101 | }
|
102 | export interface InputErrorReport {
|
103 | errors: any[];
|
104 | sources: ExternalFileInput[];
|
105 | }
|
106 | export interface TaskReportReport {
|
107 | report: TaskReport;
|
108 | config: CrossbowConfiguration;
|
109 | }
|
110 | export interface SignalReceivedReport {
|
111 | code: number;
|
112 | }
|
113 | export interface SummaryReport {
|
114 | sequence: SequenceItem[];
|
115 | cli: CLI;
|
116 | config: CrossbowConfiguration;
|
117 | runtime: number;
|
118 | errors: TaskReport[];
|
119 | }
|
120 | export interface BeforeTasksSummaryReport {
|
121 | sequence: SequenceItem[];
|
122 | cli: CLI;
|
123 | config: CrossbowConfiguration;
|
124 | runtime: number;
|
125 | errors: TaskReport[];
|
126 | }
|
127 | export interface WatcherSummaryReport {
|
128 | sequence: SequenceItem[];
|
129 | cli: CLI;
|
130 | config: CrossbowConfiguration;
|
131 | runtime: number;
|
132 | errors: TaskReport[];
|
133 | watchEvent: WatchEvent;
|
134 | watcher: Watcher;
|
135 | }
|
136 | export interface TaskListReport {
|
137 | sequence: SequenceItem[];
|
138 | cli: CLI;
|
139 | titlePrefix: string;
|
140 | config: CrossbowConfiguration;
|
141 | }
|
142 | export interface SimpleTaskListReport {
|
143 | setup: TaskCommandSetup;
|
144 | }
|
145 | export interface BinDirectoryLookup {
|
146 | errors: InputError[];
|
147 | input: string;
|
148 | resolved: string;
|
149 | }
|
150 | export interface InvalidBinDirectoryReport {
|
151 | lookups: {
|
152 | all: BinDirectoryLookup[];
|
153 | valid: BinDirectoryLookup[];
|
154 | invalid: BinDirectoryLookup[];
|
155 | };
|
156 | }
|
157 | export interface InvalidReporterReport {
|
158 | reporters: Reporters;
|
159 | }
|
160 | export interface DuplicateConfigFile {
|
161 | error: InitConfigFileExistsError;
|
162 | }
|
163 | export interface ConfigFileCreatedReport {
|
164 | parsed: ParsedPath;
|
165 | }
|
166 | export interface InitInputFileTypeNotSupportedReport {
|
167 | error: InitConfigFileTypeNotSupported;
|
168 | }
|
169 | export interface TaskTreeReport {
|
170 | tasks: Task[];
|
171 | config: CrossbowConfiguration;
|
172 | title: string;
|
173 | }
|
174 | export interface TaskErrorsReport {
|
175 | tasks: Task[];
|
176 | taskCollection: TaskCollection;
|
177 | input: CrossbowInput;
|
178 | config: CrossbowConfiguration;
|
179 | }
|
180 | export interface WatchersReport {
|
181 | watchTasks: WatchTask[];
|
182 | }
|
183 | export interface BeforeWatchTaskErrorsReport {
|
184 | watchTasks: WatchTasks;
|
185 | trigger: CommandTrigger;
|
186 | }
|
187 | export interface BeforeTaskListReport {
|
188 | sequence: SequenceItem[];
|
189 | cli: CLI;
|
190 | config: CrossbowConfiguration;
|
191 | }
|
192 | export interface BeforeTasksDidNotCompleteReport {
|
193 | error: Error;
|
194 | }
|
195 | export interface WatchTaskTasksErrorsReport {
|
196 | tasks: Task[];
|
197 | runner: Watcher;
|
198 | config: CrossbowConfiguration;
|
199 | }
|
200 | export interface WatchTaskErrorsReport {
|
201 | watchTasks: WatchTask[];
|
202 | }
|
203 | export interface WatchTaskReportReport {
|
204 | report: TaskReport;
|
205 | trigger: CommandTrigger;
|
206 | }
|
207 | export interface WatcherTriggeredTasksReport {
|
208 | index: number;
|
209 | taskCollection: TaskCollection;
|
210 | }
|
211 | export interface WatcherTriggeredTasksCompletedReport {
|
212 | index: number;
|
213 | taskCollection: TaskCollection;
|
214 | time: number;
|
215 | }
|
216 | export interface WatcherNamesReport {
|
217 | setup: WatchersCommandOutput;
|
218 | }
|
219 | export interface NoFilesMatchedReport {
|
220 | watcher: Watcher;
|
221 | }
|
222 | export interface DocsInputFileNotFoundReport {
|
223 | error: DocsInputFileNotFoundError;
|
224 | }
|
225 | export interface DocsAddedToFileReport {
|
226 | file: ExternalFileContent;
|
227 | }
|
228 | export interface DocsOutputFileExistsReport {
|
229 | error: DocsOutputFileExistsError;
|
230 | }
|
231 | export interface HashError extends Error {
|
232 | type: HashDirErrorTypes;
|
233 | }
|
234 | export interface HashDirErrorReport {
|
235 | error: HashError;
|
236 | cwd: string;
|
237 | }
|
238 | export declare function getReporters(config: CrossbowConfiguration): Reporters;
|
239 | export declare type OutgoingReporter = Rx.Subject<OutgoingReport>;
|
240 | export declare function getDefaultReporter(): any;
|