UNPKG

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