import { CrossbowConfiguration } from "./config"; import { CrossbowInput, CLI } from "./index"; import { ExternalFile, ExternalFileInput, ExternalFileContent, HashDirErrorTypes } from "./file.utils"; import { TaskReport } from "./task.runner"; import { CommandTrigger } from "./command.run"; import { SequenceItem } from "./task.sequence.factories"; import { InitConfigFileExistsError, InitConfigFileTypeNotSupported } from "./command.init"; import { ParsedPath } from "path"; import { Task, TaskCollection } from "./task.resolve"; import { WatchTask, Watcher, WatchTasks } from "./watch.resolve"; import { DocsInputFileNotFoundError, DocsOutputFileExistsError } from "./command.docs"; import Rx = require("rx"); import { WatchEvent } from "./watch.file-watcher"; import { TaskCommandSetup } from "./command.tasks"; import { WatchersCommandOutput } from "./command.watchers"; import { InputError } from "./task.utils"; export interface Reporter { errors: {}[]; type: ReporterTypes; callable?: Function; sources: ExternalFile[]; } export declare enum ReporterErrorTypes { ReporterFileNotFound, ReporterTypeNotSupported, } export interface ReporterError { type: ReporterErrorTypes; file?: ExternalFile; } export interface ReporterFileNotFoundError extends ReporterError { } export interface ReporterTypeNotSupportedError extends ReporterError { } export declare enum ReporterTypes { InlineFunction, ExternalFile, UnsupportedValue, Muted, } export interface Reporters { all: Reporter[]; valid: Reporter[]; invalid: Reporter[]; } export declare enum ReportTypes { DuplicateInputFile, InputFileCreated, InitInputFileTypeNotSupported, InputError, BinOptionError, EnvFileOptionError, InputFileNotFound, InvalidReporter, InvalidBinDirectory, UsingInputFile, TaskList, TaskTree, TaskErrors, TaskReport, NoTasksAvailable, NoTasksProvided, SimpleTaskList, BeforeWatchTaskErrors, BeforeTaskList, BeforeTasksDidNotComplete, BeforeTasksSummary, WatchTaskTasksErrors, WatchTaskErrors, WatchTaskReport, NoFilesMatched, NoWatchersAvailable, NoWatchTasksProvided, Watchers, WatcherNames, WatcherTriggeredTasksCompleted, WatcherTriggeredTasks, WatcherSummary, DocsAddedToFile, DocsGenerated, DocsInputFileNotFound, DocsOutputFileExists, DocsInvalidTasksSimple, HashDirError, Summary, SignalReceived, CLIParserOutput, } export interface IncomingReport { type: ReportTypes; data?: any; } export interface OutgoingReport { origin: ReportTypes; data: string[]; } export interface UsingConfigFileReport { sources: ExternalFileInput[]; } export interface InputFileNotFoundReport { sources: ExternalFileInput[]; } export interface InputErrorReport { errors: any[]; sources: ExternalFileInput[]; } export interface TaskReportReport { report: TaskReport; config: CrossbowConfiguration; } export interface SignalReceivedReport { code: number; } export interface SummaryReport { sequence: SequenceItem[]; cli: CLI; config: CrossbowConfiguration; runtime: number; errors: TaskReport[]; } export interface BeforeTasksSummaryReport { sequence: SequenceItem[]; cli: CLI; config: CrossbowConfiguration; runtime: number; errors: TaskReport[]; } export interface WatcherSummaryReport { sequence: SequenceItem[]; cli: CLI; config: CrossbowConfiguration; runtime: number; errors: TaskReport[]; watchEvent: WatchEvent; watcher: Watcher; } export interface TaskListReport { sequence: SequenceItem[]; cli: CLI; titlePrefix: string; config: CrossbowConfiguration; } export interface SimpleTaskListReport { setup: TaskCommandSetup; } export interface BinDirectoryLookup { errors: InputError[]; input: string; resolved: string; } export interface InvalidBinDirectoryReport { lookups: { all: BinDirectoryLookup[]; valid: BinDirectoryLookup[]; invalid: BinDirectoryLookup[]; }; } export interface InvalidReporterReport { reporters: Reporters; } export interface DuplicateConfigFile { error: InitConfigFileExistsError; } export interface ConfigFileCreatedReport { parsed: ParsedPath; } export interface InitInputFileTypeNotSupportedReport { error: InitConfigFileTypeNotSupported; } export interface TaskTreeReport { tasks: Task[]; config: CrossbowConfiguration; title: string; } export interface TaskErrorsReport { tasks: Task[]; taskCollection: TaskCollection; input: CrossbowInput; config: CrossbowConfiguration; } export interface WatchersReport { watchTasks: WatchTask[]; } export interface BeforeWatchTaskErrorsReport { watchTasks: WatchTasks; trigger: CommandTrigger; } export interface BeforeTaskListReport { sequence: SequenceItem[]; cli: CLI; config: CrossbowConfiguration; } export interface BeforeTasksDidNotCompleteReport { error: Error; } export interface WatchTaskTasksErrorsReport { tasks: Task[]; runner: Watcher; config: CrossbowConfiguration; } export interface WatchTaskErrorsReport { watchTasks: WatchTask[]; } export interface WatchTaskReportReport { report: TaskReport; trigger: CommandTrigger; } export interface WatcherTriggeredTasksReport { index: number; taskCollection: TaskCollection; } export interface WatcherTriggeredTasksCompletedReport { index: number; taskCollection: TaskCollection; time: number; } export interface WatcherNamesReport { setup: WatchersCommandOutput; } export interface NoFilesMatchedReport { watcher: Watcher; } export interface DocsInputFileNotFoundReport { error: DocsInputFileNotFoundError; } export interface DocsAddedToFileReport { file: ExternalFileContent; } export interface DocsOutputFileExistsReport { error: DocsOutputFileExistsError; } export interface HashError extends Error { type: HashDirErrorTypes; } export interface HashDirErrorReport { error: HashError; cwd: string; } export declare function getReporters(config: CrossbowConfiguration): Reporters; export declare type OutgoingReporter = Rx.Subject; export declare function getDefaultReporter(): any;