1 | import { CrossbowConfiguration } from "./config";
|
2 | import { InputFiles, InputError } from "./task.utils";
|
3 | import { CrossbowInput } from "./index";
|
4 | import { ParsedPath } from "path";
|
5 | import Rx = require("rx");
|
6 | export interface ExternalFile {
|
7 | rawInput: string;
|
8 | resolved: string;
|
9 | relative: string;
|
10 | errors: InputError[];
|
11 | parsed: ParsedPath;
|
12 | }
|
13 | export interface FileNotFoundError extends InputError {
|
14 | }
|
15 | export interface BinDirectoryNotFoundError extends InputError {
|
16 | }
|
17 | export interface ExternalFileContent extends ExternalFile {
|
18 | content: string;
|
19 | data?: any;
|
20 | }
|
21 | export interface ExternalFileInput extends ExternalFile {
|
22 | input: CrossbowInput | any;
|
23 | }
|
24 |
|
25 |
|
26 |
|
27 |
|
28 | export declare function retrieveDefaultInputFiles(config: CrossbowConfiguration): InputFiles;
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 | export declare function retrieveCBFiles(config: CrossbowConfiguration): InputFiles;
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 | export declare function readInputFiles(paths: string[], cwd: string): InputFiles;
|
42 | export declare function readFileFromDiskWithContent(path: string, cwd: string): ExternalFileContent;
|
43 | export declare function readFilesFromDiskWithContent(paths: string[], cwd: string): ExternalFileContent[];
|
44 | export declare function readFileContent(file: ExternalFile): string;
|
45 | export declare function writeFileToDisk(file: ExternalFile, content: string): void;
|
46 | export declare function getStubFileWithContent(path: string, cwd: string): ExternalFileContent;
|
47 | export declare function readOrCreateJsonFile(path: string, cwd: string): ExternalFileContent;
|
48 | export declare function getStubFile(path: string, cwd: string): ExternalFile;
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 | export declare function readFilesFromDisk(paths: string[], cwd: string): ExternalFile[];
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 | export declare function getRequirePaths(config: CrossbowConfiguration): InputFiles;
|
64 | export declare function getExternalFiles(dirpaths: string[], cwd: string): ExternalFile[];
|
65 | export declare function getPossibleTasksFromDirectories(dirpaths: string[], cwd: string): string[];
|
66 | export interface IHashItem {
|
67 | userInput: string;
|
68 | resolved: string;
|
69 | hash: string;
|
70 | changed: boolean;
|
71 | }
|
72 | export interface IHashInput {
|
73 | userInput: string;
|
74 | pathObj: ExternalFile;
|
75 | }
|
76 | export interface IHashResults {
|
77 | output: IHashItem[];
|
78 | markedHashes: IHashItem[];
|
79 | }
|
80 | export declare enum HashDirErrorTypes {
|
81 | HashNotADirectory,
|
82 | HashPathNotFound,
|
83 | }
|
84 | export interface HashDirError extends Error {
|
85 | code: string;
|
86 | path: string;
|
87 | syscall: string;
|
88 | }
|
89 | export declare function hashItems(dirs: string[], cwd: string, existingHashes: IHashItem[]): Rx.Observable<IHashResults>;
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 | export declare function parseEnv(src: string): {
|
96 | [index: string]: string;
|
97 | };
|
98 | export declare const Right: (x: any) => {
|
99 | chain: (f: any) => any;
|
100 | map: (f: any) => any;
|
101 | fold: (f: any, g: any) => any;
|
102 | inspect: () => string;
|
103 | };
|
104 | export declare const Left: (x: any) => {
|
105 | chain: (f: any) => any;
|
106 | map: (f: any) => any;
|
107 | fold: (f: any, g: any) => any;
|
108 | inspect: () => string;
|
109 | };
|
110 | export declare const tryCatch: (f: any) => {
|
111 | chain: (f: any) => any;
|
112 | map: (f: any) => any;
|
113 | fold: (f: any, g: any) => any;
|
114 | inspect: () => string;
|
115 | };
|