UNPKG

1.83 kBTypeScriptView Raw
1import { TaskRunModes } from "./task.resolve";
2import { LogLevel } from "./reporters/defaultReporter";
3import { OutgoingReport } from "./reporter.resolve";
4import { InitConfigFileTypes } from "./command.init";
5import { WatchEvent } from "./watch.file-watcher";
6import { ExternalFile } from "./file.utils";
7import Rx = require("rx");
8export declare enum SignalTypes {
9 Exit,
10 FileWrite,
11}
12export interface CBSignal<T> {
13 type: SignalTypes;
14 data?: T;
15}
16export declare type OutgoingSignals = Rx.Subject<CBSignal<ExitSignal | FileWriteSignal>>;
17export interface ExitSignal {
18 code: number;
19}
20export interface FileWriteSignal {
21 file: ExternalFile;
22 content: string;
23}
24export interface CrossbowConfiguration {
25 cwd: string;
26 runMode: TaskRunModes;
27 verbose: LogLevel;
28 parallel: boolean;
29 fail: boolean;
30 force: boolean;
31 reporter: string;
32 handoff: boolean;
33 input: string[];
34 interactive: boolean;
35 outputOnly: boolean;
36 suppressOutput: boolean;
37 progress: boolean;
38 cbfile?: string;
39 dump: boolean;
40 envPrefix: string;
41 env: any;
42 before: string[];
43 type?: InitConfigFileTypes;
44 debug: boolean;
45 reporters: Array<string | Function>;
46 skip: string[];
47 tasksDir: string[];
48 nodeModulesPaths: string[];
49 block?: boolean;
50 debounce?: boolean;
51 throttle?: boolean;
52 fromJson?: string;
53 file?: string;
54 output?: string;
55 dryRun?: boolean;
56 dryRunDuration?: number;
57 outputObserver?: Rx.Observable<OutgoingReport>;
58 fileChangeObserver?: Rx.Observable<WatchEvent>;
59 signalObserver?: OutgoingSignals;
60 scheduler?: Rx.IScheduler;
61}
62/**
63 * Merge default with incoming opts.
64 * Also deal with single char flag
65 * @returns {*}
66 */
67export declare function merge(opts: CrossbowConfiguration | any): CrossbowConfiguration;