-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.d.ts
123 lines (123 loc) · 2.9 KB
/
install.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
/**
* @license
* Copyright 2017 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
import { Browser, BrowserPlatform } from './browser-data/browser-data.js';
import { InstalledBrowser } from './Cache.js';
/**
* @public
*/
export interface InstallOptions {
/**
* Determines the path to download browsers to.
*/
cacheDir: string;
/**
* Determines which platform the browser will be suited for.
*
* @defaultValue **Auto-detected.**
*/
platform?: BrowserPlatform;
/**
* Determines which browser to install.
*/
browser: Browser;
/**
* Determines which buildId to download. BuildId should uniquely identify
* binaries and they are used for caching.
*/
buildId: string;
/**
* An alias for the provided `buildId`. It will be used to maintain local
* metadata to support aliases in the `launch` command.
*
* @example 'canary'
*/
buildIdAlias?: string;
/**
* Provides information about the progress of the download.
*/
downloadProgressCallback?: (downloadedBytes: number, totalBytes: number) => void;
/**
* Determines the host that will be used for downloading.
*
* @defaultValue Either
*
* - https://storage.googleapis.com/chrome-for-testing-public or
* - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central
*
*/
baseUrl?: string;
/**
* Whether to unpack and install browser archives.
*
* @defaultValue `true`
*/
unpack?: boolean;
/**
* @internal
* @defaultValue `false`
*/
forceFallbackForTesting?: boolean;
}
/**
* @public
*/
export declare function install(options: InstallOptions & {
unpack?: true;
}): Promise<InstalledBrowser>;
/**
* @public
*/
export declare function install(options: InstallOptions & {
unpack: false;
}): Promise<string>;
/**
* @public
*/
export interface UninstallOptions {
/**
* Determines the platform for the browser binary.
*
* @defaultValue **Auto-detected.**
*/
platform?: BrowserPlatform;
/**
* The path to the root of the cache directory.
*/
cacheDir: string;
/**
* Determines which browser to uninstall.
*/
browser: Browser;
/**
* The browser build to uninstall
*/
buildId: string;
}
/**
*
* @public
*/
export declare function uninstall(options: UninstallOptions): Promise<void>;
/**
* @public
*/
export interface GetInstalledBrowsersOptions {
/**
* The path to the root of the cache directory.
*/
cacheDir: string;
}
/**
* Returns metadata about browsers installed in the cache directory.
*
* @public
*/
export declare function getInstalledBrowsers(options: GetInstalledBrowsersOptions): Promise<InstalledBrowser[]>;
/**
* @public
*/
export declare function canDownload(options: InstallOptions): Promise<boolean>;
//# sourceMappingURL=install.d.ts.map