UNPKG

1.47 kBTypeScriptView Raw
1import { CommandTrigger } from "./command.run";
2import { CrossbowConfiguration } from "./config";
3import { CrossbowInput, CLI, CrossbowReporter } from "./index";
4import { WatchRunners } from "./watch.runner";
5import { WatchTasks } from "./watch.resolve";
6import { BeforeTasks } from "./watch.before";
7import Rx = require("rx");
8import { WatchTaskReport, WatchRunnerComplete } from "./watch.file-watcher";
9import { ReportTypes } from "./reporter.resolve";
10export interface CrossbowError extends Error {
11 _cb: boolean;
12}
13export interface WatchCommandSetupErrors {
14 type: ReportTypes;
15}
16export interface WatchCommandOutput {
17 setup: WatchCommandSetup;
18 update$: Rx.Observable<WatchReport>;
19}
20export interface WatchCommandSetup {
21 beforeTasks?: BeforeTasks;
22 watchTasks?: WatchTasks;
23 watchRunners?: WatchRunners;
24 errors: WatchCommandSetupErrors[];
25}
26export declare type WatchCommmandComplete = Rx.Observable<WatchCommandOutput>;
27export interface WatchReport {
28 type: WatchCommandEventTypes;
29 data: WatchTaskReport | WatchRunnerComplete;
30}
31export declare enum WatchCommandEventTypes {
32 SetupError,
33 FileEvent,
34 WatchTaskReport,
35 WatchRunnerComplete,
36 BeforeTasksComplete,
37}
38export default function handleIncomingWatchCommand(cli: CLI, input: CrossbowInput, config: CrossbowConfiguration, reporter: CrossbowReporter): WatchCommmandComplete;
39export declare function getWatchCommandSetup(trigger: CommandTrigger): WatchCommandSetup;