mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs(new): add TSDoc comments to BrowserFetcher (#6078)
This commit is contained in:
parent
37f6032003
commit
73b97956cc
@ -1,21 +0,0 @@
|
|||||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
||||||
|
|
||||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcher](./puppeteer.browserfetcher.md) > [(constructor)](./puppeteer.browserfetcher._constructor_.md)
|
|
||||||
|
|
||||||
## BrowserFetcher.(constructor)
|
|
||||||
|
|
||||||
Constructs a new instance of the `BrowserFetcher` class
|
|
||||||
|
|
||||||
<b>Signature:</b>
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
constructor(projectRoot: string, options?: BrowserFetcherOptions);
|
|
||||||
```
|
|
||||||
|
|
||||||
## Parameters
|
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
|
||||||
| --- | --- | --- |
|
|
||||||
| projectRoot | string | |
|
|
||||||
| options | [BrowserFetcherOptions](./puppeteer.browserfetcheroptions.md) | |
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
||||||
|
|
||||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [BrowserFetcher](./puppeteer.browserfetcher.md) > [\_getFolderPath](./puppeteer.browserfetcher._getfolderpath.md)
|
|
||||||
|
|
||||||
## BrowserFetcher.\_getFolderPath() method
|
|
||||||
|
|
||||||
<b>Signature:</b>
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
_getFolderPath(revision: string): string;
|
|
||||||
```
|
|
||||||
|
|
||||||
## Parameters
|
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
|
||||||
| --- | --- | --- |
|
|
||||||
| revision | string | |
|
|
||||||
|
|
||||||
<b>Returns:</b>
|
|
||||||
|
|
||||||
string
|
|
||||||
|
|
||||||
{<!-- -->string<!-- -->}
|
|
||||||
|
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
## BrowserFetcher.canDownload() method
|
## BrowserFetcher.canDownload() method
|
||||||
|
|
||||||
|
Initiates a HEAD request to check if the revision is available.
|
||||||
|
|
||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
@ -14,9 +16,15 @@ canDownload(revision: string): Promise<boolean>;
|
|||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| revision | string | |
|
| revision | string | The revision to check availability for. |
|
||||||
|
|
||||||
<b>Returns:</b>
|
<b>Returns:</b>
|
||||||
|
|
||||||
Promise<boolean>
|
Promise<boolean>
|
||||||
|
|
||||||
|
A promise that resolves to `true` if the revision could be downloaded from the host.
|
||||||
|
|
||||||
|
## Remarks
|
||||||
|
|
||||||
|
This method is affected by the current `product`<!-- -->.
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
## BrowserFetcher.download() method
|
## BrowserFetcher.download() method
|
||||||
|
|
||||||
|
Initiates a GET request to download the revision from the host.
|
||||||
|
|
||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
@ -14,12 +16,16 @@ download(revision: string, progressCallback?: (x: number, y: number) => void): P
|
|||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| revision | string | |
|
| revision | string | The revision to download. |
|
||||||
| progressCallback | (x: number, y: number) => void | |
|
| progressCallback | (x: number, y: number) => void | A function that will be called with two arguments: How many bytes have been downloaded and the total number of bytes of the download. |
|
||||||
|
|
||||||
<b>Returns:</b>
|
<b>Returns:</b>
|
||||||
|
|
||||||
Promise<BrowserFetcherRevisionInfo>
|
Promise<BrowserFetcherRevisionInfo>
|
||||||
|
|
||||||
{<!-- -->!Promise<!-- --><<!-- -->!BrowserFetcher.RevisionInfo<!-- -->><!-- -->}
|
A promise with revision information when the revision is downloaded and extracted.
|
||||||
|
|
||||||
|
## Remarks
|
||||||
|
|
||||||
|
This method is affected by the current `product`<!-- -->.
|
||||||
|
|
||||||
|
@ -13,3 +13,5 @@ host(): string;
|
|||||||
|
|
||||||
string
|
string
|
||||||
|
|
||||||
|
The download host being used.
|
||||||
|
|
||||||
|
@ -13,3 +13,9 @@ localRevisions(): Promise<string[]>;
|
|||||||
|
|
||||||
Promise<string\[\]>
|
Promise<string\[\]>
|
||||||
|
|
||||||
|
A promise with a list of all revision strings (for the current `product`<!-- -->) available locally on disk.
|
||||||
|
|
||||||
|
## Remarks
|
||||||
|
|
||||||
|
This method is affected by the current `product`<!-- -->.
|
||||||
|
|
||||||
|
@ -4,25 +4,38 @@
|
|||||||
|
|
||||||
## BrowserFetcher class
|
## BrowserFetcher class
|
||||||
|
|
||||||
|
BrowserFetcher can download and manage different versions of Chromium and Firefox.
|
||||||
|
|
||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
export declare class BrowserFetcher
|
export declare class BrowserFetcher
|
||||||
```
|
```
|
||||||
|
|
||||||
## Constructors
|
## Remarks
|
||||||
|
|
||||||
| Constructor | Modifiers | Description |
|
BrowserFetcher operates on revision strings that specify a precise version of Chromium, e.g. `"533271"`<!-- -->. Revision strings can be obtained from [omahaproxy.appspot.com](http://omahaproxy.appspot.com/)<!-- -->. In the Firefox case, BrowserFetcher downloads Firefox Nightly and operates on version numbers such as `"75"`<!-- -->.
|
||||||
| --- | --- | --- |
|
|
||||||
| [(constructor)(projectRoot, options)](./puppeteer.browserfetcher._constructor_.md) | | Constructs a new instance of the <code>BrowserFetcher</code> class |
|
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `BrowserFetcher` class.
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
An example of using BrowserFetcher to download a specific version of Chromium and running Puppeteer against it:
|
||||||
|
|
||||||
|
```js
|
||||||
|
const browserFetcher = puppeteer.createBrowserFetcher();
|
||||||
|
const revisionInfo = await browserFetcher.download('533271');
|
||||||
|
const browser = await puppeteer.launch({executablePath: revisionInfo.executablePath})
|
||||||
|
|
||||||
|
```
|
||||||
|
\*\*NOTE\*\* BrowserFetcher is not designed to work concurrently with other instances of BrowserFetcher that share the same downloads directory.
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
| Method | Modifiers | Description |
|
| Method | Modifiers | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| [\_getFolderPath(revision)](./puppeteer.browserfetcher._getfolderpath.md) | | |
|
| [canDownload(revision)](./puppeteer.browserfetcher.candownload.md) | | Initiates a HEAD request to check if the revision is available. |
|
||||||
| [canDownload(revision)](./puppeteer.browserfetcher.candownload.md) | | |
|
| [download(revision, progressCallback)](./puppeteer.browserfetcher.download.md) | | Initiates a GET request to download the revision from the host. |
|
||||||
| [download(revision, progressCallback)](./puppeteer.browserfetcher.download.md) | | |
|
|
||||||
| [host()](./puppeteer.browserfetcher.host.md) | | |
|
| [host()](./puppeteer.browserfetcher.host.md) | | |
|
||||||
| [localRevisions()](./puppeteer.browserfetcher.localrevisions.md) | | |
|
| [localRevisions()](./puppeteer.browserfetcher.localrevisions.md) | | |
|
||||||
| [platform()](./puppeteer.browserfetcher.platform.md) | | |
|
| [platform()](./puppeteer.browserfetcher.platform.md) | | |
|
||||||
|
@ -7,9 +7,11 @@
|
|||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
platform(): string;
|
platform(): Platform;
|
||||||
```
|
```
|
||||||
<b>Returns:</b>
|
<b>Returns:</b>
|
||||||
|
|
||||||
string
|
Platform
|
||||||
|
|
||||||
|
Returns the current `Platform`<!-- -->.
|
||||||
|
|
||||||
|
@ -7,9 +7,11 @@
|
|||||||
<b>Signature:</b>
|
<b>Signature:</b>
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
product(): string;
|
product(): Product;
|
||||||
```
|
```
|
||||||
<b>Returns:</b>
|
<b>Returns:</b>
|
||||||
|
|
||||||
string
|
Product
|
||||||
|
|
||||||
|
Returns the current `Product`<!-- -->.
|
||||||
|
|
||||||
|
@ -14,9 +14,15 @@ remove(revision: string): Promise<void>;
|
|||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| revision | string | |
|
| revision | string | A revision to remove for the current <code>product</code>. |
|
||||||
|
|
||||||
<b>Returns:</b>
|
<b>Returns:</b>
|
||||||
|
|
||||||
Promise<void>
|
Promise<void>
|
||||||
|
|
||||||
|
A promise that resolves when the revision has been removes or throws if the revision has not been downloaded.
|
||||||
|
|
||||||
|
## Remarks
|
||||||
|
|
||||||
|
This method is affected by the current `product`<!-- -->.
|
||||||
|
|
||||||
|
@ -14,9 +14,11 @@ revisionInfo(revision: string): BrowserFetcherRevisionInfo;
|
|||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| revision | string | |
|
| revision | string | The revision to get info for. |
|
||||||
|
|
||||||
<b>Returns:</b>
|
<b>Returns:</b>
|
||||||
|
|
||||||
BrowserFetcherRevisionInfo
|
BrowserFetcherRevisionInfo
|
||||||
|
|
||||||
|
The revision info for the given revision.
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
| [Accessibility](./puppeteer.accessibility.md) | The Accessibility class provides methods for inspecting Chromium's accessibility tree. The accessibility tree is used by assistive technology such as [screen readers](https://en.wikipedia.org/wiki/Screen_reader) or [switches](https://en.wikipedia.org/wiki/Switch_access)<!-- -->. |
|
| [Accessibility](./puppeteer.accessibility.md) | The Accessibility class provides methods for inspecting Chromium's accessibility tree. The accessibility tree is used by assistive technology such as [screen readers](https://en.wikipedia.org/wiki/Screen_reader) or [switches](https://en.wikipedia.org/wiki/Switch_access)<!-- -->. |
|
||||||
| [Browser](./puppeteer.browser.md) | A Browser is created when Puppeteer connects to a Chromium instance, either through [Puppeteer.launch()](./puppeteer.puppeteer.launch.md) or [Puppeteer.connect()](./puppeteer.puppeteer.connect.md)<!-- -->. |
|
| [Browser](./puppeteer.browser.md) | A Browser is created when Puppeteer connects to a Chromium instance, either through [Puppeteer.launch()](./puppeteer.puppeteer.launch.md) or [Puppeteer.connect()](./puppeteer.puppeteer.connect.md)<!-- -->. |
|
||||||
| [BrowserContext](./puppeteer.browsercontext.md) | BrowserContexts provide a way to operate multiple independent browser sessions. When a browser is launched, it has a single BrowserContext used by default. The method [Browser.newPage](./puppeteer.browser.newpage.md) creates a page in the default browser context. |
|
| [BrowserContext](./puppeteer.browsercontext.md) | BrowserContexts provide a way to operate multiple independent browser sessions. When a browser is launched, it has a single BrowserContext used by default. The method [Browser.newPage](./puppeteer.browser.newpage.md) creates a page in the default browser context. |
|
||||||
| [BrowserFetcher](./puppeteer.browserfetcher.md) | |
|
| [BrowserFetcher](./puppeteer.browserfetcher.md) | BrowserFetcher can download and manage different versions of Chromium and Firefox. |
|
||||||
| [CDPSession](./puppeteer.cdpsession.md) | The <code>CDPSession</code> instances are used to talk raw Chrome Devtools Protocol. |
|
| [CDPSession](./puppeteer.cdpsession.md) | The <code>CDPSession</code> instances are used to talk raw Chrome Devtools Protocol. |
|
||||||
| [Connection](./puppeteer.connection.md) | |
|
| [Connection](./puppeteer.connection.md) | |
|
||||||
| [ConsoleMessage](./puppeteer.consolemessage.md) | ConsoleMessage objects are dispatched by page via the 'console' event. |
|
| [ConsoleMessage](./puppeteer.consolemessage.md) | ConsoleMessage objects are dispatched by page via the 'console' event. |
|
||||||
|
@ -59,7 +59,13 @@ const browserConfig = {
|
|||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Supported platforms.
|
||||||
|
*/
|
||||||
type Platform = 'linux' | 'mac' | 'win32' | 'win64';
|
type Platform = 'linux' | 'mac' | 'win32' | 'win64';
|
||||||
|
/**
|
||||||
|
* Supported products.
|
||||||
|
*/
|
||||||
type Product = 'chrome' | 'firefox';
|
type Product = 'chrome' | 'firefox';
|
||||||
|
|
||||||
function archiveName(
|
function archiveName(
|
||||||
@ -80,11 +86,7 @@ function archiveName(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} product
|
* @internal
|
||||||
* @param {string} platform
|
|
||||||
* @param {string} host
|
|
||||||
* @param {string} revision
|
|
||||||
* @returns {string}
|
|
||||||
*/
|
*/
|
||||||
function downloadURL(
|
function downloadURL(
|
||||||
product: Product,
|
product: Product,
|
||||||
@ -101,7 +103,10 @@ function downloadURL(
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleArm64() {
|
/**
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
function handleArm64(): void {
|
||||||
fs.stat('/usr/bin/chromium-browser', function (err, stats) {
|
fs.stat('/usr/bin/chromium-browser', function (err, stats) {
|
||||||
if (stats === undefined) {
|
if (stats === undefined) {
|
||||||
console.error(`The chromium binary is not available for arm64: `);
|
console.error(`The chromium binary is not available for arm64: `);
|
||||||
@ -138,6 +143,27 @@ interface BrowserFetcherRevisionInfo {
|
|||||||
product: string;
|
product: string;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
* BrowserFetcher can download and manage different versions of Chromium and Firefox.
|
||||||
|
*
|
||||||
|
* @remarks
|
||||||
|
* BrowserFetcher operates on revision strings that specify a precise version of Chromium, e.g. `"533271"`. Revision strings can be obtained from {@link http://omahaproxy.appspot.com/ | omahaproxy.appspot.com}.
|
||||||
|
* In the Firefox case, BrowserFetcher downloads Firefox Nightly and
|
||||||
|
* operates on version numbers such as `"75"`.
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
* An example of using BrowserFetcher to download a specific version of Chromium
|
||||||
|
* and running Puppeteer against it:
|
||||||
|
*
|
||||||
|
* ```js
|
||||||
|
* const browserFetcher = puppeteer.createBrowserFetcher();
|
||||||
|
* const revisionInfo = await browserFetcher.download('533271');
|
||||||
|
* const browser = await puppeteer.launch({executablePath: revisionInfo.executablePath})
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* **NOTE** BrowserFetcher is not designed to work concurrently with other
|
||||||
|
* instances of BrowserFetcher that share the same downloads directory.
|
||||||
|
*
|
||||||
|
* @public
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export class BrowserFetcher {
|
export class BrowserFetcher {
|
||||||
@ -146,6 +172,9 @@ export class BrowserFetcher {
|
|||||||
private _downloadHost: string;
|
private _downloadHost: string;
|
||||||
private _platform: Platform;
|
private _platform: Platform;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
constructor(projectRoot: string, options: BrowserFetcherOptions = {}) {
|
constructor(projectRoot: string, options: BrowserFetcherOptions = {}) {
|
||||||
this._product = (options.product || 'chrome').toLowerCase() as Product;
|
this._product = (options.product || 'chrome').toLowerCase() as Product;
|
||||||
assert(
|
assert(
|
||||||
@ -178,18 +207,35 @@ export class BrowserFetcher {
|
|||||||
else assert(this._platform, 'Unsupported platform: ' + os.platform());
|
else assert(this._platform, 'Unsupported platform: ' + os.platform());
|
||||||
}
|
}
|
||||||
|
|
||||||
platform(): string {
|
/**
|
||||||
|
* @returns Returns the current `Platform`.
|
||||||
|
*/
|
||||||
|
platform(): Platform {
|
||||||
return this._platform;
|
return this._platform;
|
||||||
}
|
}
|
||||||
|
|
||||||
product(): string {
|
/**
|
||||||
|
* @returns Returns the current `Product`.
|
||||||
|
*/
|
||||||
|
product(): Product {
|
||||||
return this._product;
|
return this._product;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns The download host being used.
|
||||||
|
*/
|
||||||
host(): string {
|
host(): string {
|
||||||
return this._downloadHost;
|
return this._downloadHost;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initiates a HEAD request to check if the revision is available.
|
||||||
|
* @remarks
|
||||||
|
* This method is affected by the current `product`.
|
||||||
|
* @param revision - The revision to check availability for.
|
||||||
|
* @returns A promise that resolves to `true` if the revision could be downloaded
|
||||||
|
* from the host.
|
||||||
|
*/
|
||||||
canDownload(revision: string): Promise<boolean> {
|
canDownload(revision: string): Promise<boolean> {
|
||||||
const url = downloadURL(
|
const url = downloadURL(
|
||||||
this._product,
|
this._product,
|
||||||
@ -209,9 +255,14 @@ export class BrowserFetcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} revision
|
* Initiates a GET request to download the revision from the host.
|
||||||
* @param {?function(number, number):void} progressCallback
|
* @remarks
|
||||||
* @returns {!Promise<!BrowserFetcher.RevisionInfo>}
|
* This method is affected by the current `product`.
|
||||||
|
* @param revision - The revision to download.
|
||||||
|
* @param progressCallback - A function that will be called with two arguments:
|
||||||
|
* How many bytes have been downloaded and the total number of bytes of the download.
|
||||||
|
* @returns A promise with revision information when the revision is downloaded
|
||||||
|
* and extracted.
|
||||||
*/
|
*/
|
||||||
async download(
|
async download(
|
||||||
revision: string,
|
revision: string,
|
||||||
@ -244,6 +295,12 @@ export class BrowserFetcher {
|
|||||||
return revisionInfo;
|
return revisionInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @remarks
|
||||||
|
* This method is affected by the current `product`.
|
||||||
|
* @returns A promise with a list of all revision strings (for the current `product`)
|
||||||
|
* available locally on disk.
|
||||||
|
*/
|
||||||
async localRevisions(): Promise<string[]> {
|
async localRevisions(): Promise<string[]> {
|
||||||
if (!(await existsAsync(this._downloadsFolder))) return [];
|
if (!(await existsAsync(this._downloadsFolder))) return [];
|
||||||
const fileNames = await readdirAsync(this._downloadsFolder);
|
const fileNames = await readdirAsync(this._downloadsFolder);
|
||||||
@ -253,6 +310,13 @@ export class BrowserFetcher {
|
|||||||
.map((entry) => entry.revision);
|
.map((entry) => entry.revision);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @remarks
|
||||||
|
* This method is affected by the current `product`.
|
||||||
|
* @param revision - A revision to remove for the current `product`.
|
||||||
|
* @returns A promise that resolves when the revision has been removes or
|
||||||
|
* throws if the revision has not been downloaded.
|
||||||
|
*/
|
||||||
async remove(revision: string): Promise<void> {
|
async remove(revision: string): Promise<void> {
|
||||||
const folderPath = this._getFolderPath(revision);
|
const folderPath = this._getFolderPath(revision);
|
||||||
assert(
|
assert(
|
||||||
@ -262,6 +326,10 @@ export class BrowserFetcher {
|
|||||||
await new Promise((fulfill) => removeRecursive(folderPath, fulfill));
|
await new Promise((fulfill) => removeRecursive(folderPath, fulfill));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param revision - The revision to get info for.
|
||||||
|
* @returns The revision info for the given revision.
|
||||||
|
*/
|
||||||
revisionInfo(revision: string): BrowserFetcherRevisionInfo {
|
revisionInfo(revision: string): BrowserFetcherRevisionInfo {
|
||||||
const folderPath = this._getFolderPath(revision);
|
const folderPath = this._getFolderPath(revision);
|
||||||
let executablePath = '';
|
let executablePath = '';
|
||||||
@ -331,8 +399,7 @@ export class BrowserFetcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} revision
|
* @internal
|
||||||
* @returns {string}
|
|
||||||
*/
|
*/
|
||||||
_getFolderPath(revision: string): string {
|
_getFolderPath(revision: string): string {
|
||||||
return path.join(this._downloadsFolder, this._platform + '-' + revision);
|
return path.join(this._downloadsFolder, this._platform + '-' + revision);
|
||||||
@ -352,10 +419,7 @@ function parseFolderPath(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} url
|
* @internal
|
||||||
* @param {string} destinationPath
|
|
||||||
* @param {?function(number, number):void} progressCallback
|
|
||||||
* @returns {!Promise}
|
|
||||||
*/
|
*/
|
||||||
function downloadFile(
|
function downloadFile(
|
||||||
url: string,
|
url: string,
|
||||||
@ -415,9 +479,7 @@ function install(archivePath: string, folderPath: string): Promise<unknown> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} tarPath
|
* @internal
|
||||||
* @param {string} folderPath
|
|
||||||
* @returns {!Promise<?Error>}
|
|
||||||
*/
|
*/
|
||||||
function extractTar(tarPath: string, folderPath: string): Promise<unknown> {
|
function extractTar(tarPath: string, folderPath: string): Promise<unknown> {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
@ -434,11 +496,7 @@ function extractTar(tarPath: string, folderPath: string): Promise<unknown> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Install *.app directory from dmg file
|
* @internal
|
||||||
*
|
|
||||||
* @param {string} dmgPath
|
|
||||||
* @param {string} folderPath
|
|
||||||
* @returns {!Promise<?Error>}
|
|
||||||
*/
|
*/
|
||||||
function installDMG(dmgPath: string, folderPath: string): Promise<void> {
|
function installDMG(dmgPath: string, folderPath: string): Promise<void> {
|
||||||
let mountPath;
|
let mountPath;
|
||||||
|
Loading…
Reference in New Issue
Block a user