1 |
|
2 |
|
3 | import urlMod from "url";
|
4 | import { GetText } from "./get-text";
|
5 | import { Reporter } from "./reporter";
|
6 | import { RichProcessCov } from "./spawn-inspected";
|
7 | interface Watermarks {
|
8 | lines: [number, number];
|
9 | functions: [number, number];
|
10 | branches: [number, number];
|
11 | statements: [number, number];
|
12 | }
|
13 | export interface FileConfig {
|
14 | reporters?: ReadonlyArray<string>;
|
15 | globs?: ReadonlyArray<string>;
|
16 | coverageDir?: string;
|
17 | waterMarks?: Watermarks;
|
18 | }
|
19 | export interface CliConfig {
|
20 | reporters?: ReadonlyArray<string>;
|
21 | globs?: ReadonlyArray<string>;
|
22 | coverageDir?: string;
|
23 | command: ReadonlyArray<string>;
|
24 | }
|
25 | export interface ResolvedConfig {
|
26 | reporters: ReadonlyArray<string>;
|
27 | globs: ReadonlyArray<string>;
|
28 | coverageDir: string;
|
29 | waterMarks: Watermarks;
|
30 | command: ReadonlyArray<string>;
|
31 | }
|
32 | export interface MessageAction {
|
33 | action: "message";
|
34 | message: string;
|
35 | error?: Error;
|
36 | }
|
37 | export interface RunAction {
|
38 | action: "run";
|
39 | config: ResolvedConfig;
|
40 | }
|
41 | export declare type CliAction = MessageAction | RunAction;
|
42 | export declare type ParseArgsResult = MessageAction | {
|
43 | action: "run";
|
44 | config: CliConfig;
|
45 | };
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 | export declare function execCli(args: string[], cwd: string, proc: NodeJS.Process): Promise<number>;
|
54 | export declare function report(reporter: Reporter, processCovs: ReadonlyArray<RichProcessCov>, outStream: NodeJS.WritableStream, outDir: Readonly<urlMod.URL>, getText?: GetText): Promise<void>;
|
55 | export declare function getAction(args: string[], cwd: string): Promise<CliAction>;
|
56 | export declare function parseArgs(args: string[]): ParseArgsResult;
|
57 | export {};
|