1 | import { ConfigSource } from './config_source';
|
2 |
|
3 |
|
4 |
|
5 | export declare enum OS {
|
6 | Windows_NT = 0,
|
7 | Linux = 1,
|
8 | Darwin = 2,
|
9 | }
|
10 | export interface BinaryUrl {
|
11 | url: string;
|
12 | version: string;
|
13 | }
|
14 |
|
15 |
|
16 |
|
17 | export interface BinaryMap<T extends Binary> {
|
18 | [id: string]: T;
|
19 | }
|
20 | export declare abstract class Binary {
|
21 | static os: OS[];
|
22 | configSource: ConfigSource;
|
23 | ostype: string;
|
24 | osarch: string;
|
25 | alternativeDownloadUrl: string;
|
26 | cdn: string;
|
27 | name: string;
|
28 | versionDefault: string;
|
29 | versionCustom: string;
|
30 | constructor(opt_alternativeCdn?: string);
|
31 | abstract prefix(): string;
|
32 | abstract suffix(): string;
|
33 | executableSuffix(): string;
|
34 | version(): string;
|
35 | filename(): string;
|
36 | /**
|
37 | * @param ostype The operating system.
|
38 | * @returns The file name for the executable.
|
39 | */
|
40 | executableFilename(): string;
|
41 | /**
|
42 | * Gets the id of the binary.
|
43 | */
|
44 | abstract id(): string;
|
45 | /**
|
46 | * Gets the url to download the file set by the version. This will use the XML if available.
|
47 | * If not, it will download from an existing url.
|
48 | *
|
49 | * @param {string} version The version we are looking for. This could also be 'latest'.
|
50 | */
|
51 | getUrl(version?: string): Promise<BinaryUrl>;
|
52 | |
53 |
|
54 |
|
55 |
|
56 | abstract getVersionList(): Promise<string[]>;
|
57 | |
58 |
|
59 |
|
60 | remove(filename: string): void;
|
61 | |
62 |
|
63 |
|
64 |
|
65 | zipContentName(): string;
|
66 | }
|