-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
46 lines (37 loc) · 1.44 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
export declare const name: string;
export declare const version: string;
export declare class InvalidVersionError extends Error {}
export declare interface VersionInfo {
source: string;
version: string;
line: number
}
export declare interface VerifyResult {
consistent: boolean;
versions: VersionInfo[];
}
export declare type BumpSpecification = string;
export declare function getSources(extraSources: string[]): Promise<string[]>;
export declare function getVersion(filename: string): Promise<VersionInfo|undefined>;
export declare function getValidVersion(filename: string): Promise<VersionInfo|undefined>;
export declare function verify(filenames: string[]): Promise<VerifyResult>;
export declare function setVersion(filenames: string[], version: string): Promise<void>;
export declare function bumpVersion(version: string, bump: BumpSpecification): string;
type MessageListener = Function;
export declare interface RunnerOptions {
sources?: string[];
bump?: BumpSpecification;
tag?: boolean;
onMessage: MessageListener|MessageListener[];
}
export declare class Runner {
constructor(options: RunnerOptions);
onMessage(listener: MessageListener): void;
verify(): Promise<string>;
getSources(): Promise<string[]>;
getSourcesToModify(): Promise<string[]>;
getCurrent(): Promise<VersionInfo>;
setVersion(version: string): Promise<void>;
run(): Promise<void>;
}
export declare function run(options: RunnerOptions): Promise<void>;