mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs: website docs for browsers (#9986)
This commit is contained in:
parent
24bd05877d
commit
75a136e0de
21
docs/browsers-api/browsers.browser.md
Normal file
21
docs/browsers-api/browsers.browser.md
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
sidebar_label: Browser
|
||||
---
|
||||
|
||||
# Browser enum
|
||||
|
||||
Supported browsers.
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare enum Browser
|
||||
```
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
| Member | Value | Description |
|
||||
| -------- | --------------------------------- | ----------- |
|
||||
| CHROME | <code>"chrome"</code> | |
|
||||
| CHROMIUM | <code>"chromium"</code> | |
|
||||
| FIREFOX | <code>"firefox"</code> | |
|
23
docs/browsers-api/browsers.browserplatform.md
Normal file
23
docs/browsers-api/browsers.browserplatform.md
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
sidebar_label: BrowserPlatform
|
||||
---
|
||||
|
||||
# BrowserPlatform enum
|
||||
|
||||
Platform names used to identify a OS platfrom x architecture combination in the way that is relevant for the browser download.
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare enum BrowserPlatform
|
||||
```
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
| Member | Value | Description |
|
||||
| ------- | -------------------------------- | ----------- |
|
||||
| LINUX | <code>"linux"</code> | |
|
||||
| MAC | <code>"mac"</code> | |
|
||||
| MAC_ARM | <code>"mac_arm"</code> | |
|
||||
| WIN32 | <code>"win32"</code> | |
|
||||
| WIN64 | <code>"win64"</code> | |
|
21
docs/browsers-api/browsers.candownload.md
Normal file
21
docs/browsers-api/browsers.candownload.md
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
sidebar_label: canDownload
|
||||
---
|
||||
|
||||
# canDownload() function
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare function canDownload(options: InstallOptions): Promise<boolean>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---------------------------------------------- | ----------- |
|
||||
| options | [InstallOptions](./browsers.installoptions.md) | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
Promise<boolean>
|
11
docs/browsers-api/browsers.cdp_websocket_endpoint_regex.md
Normal file
11
docs/browsers-api/browsers.cdp_websocket_endpoint_regex.md
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
sidebar_label: CDP_WEBSOCKET_ENDPOINT_REGEX
|
||||
---
|
||||
|
||||
# CDP_WEBSOCKET_ENDPOINT_REGEX variable
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
CDP_WEBSOCKET_ENDPOINT_REGEX: RegExp;
|
||||
```
|
20
docs/browsers-api/browsers.chromereleasechannel.md
Normal file
20
docs/browsers-api/browsers.chromereleasechannel.md
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
sidebar_label: ChromeReleaseChannel
|
||||
---
|
||||
|
||||
# ChromeReleaseChannel enum
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare enum ChromeReleaseChannel
|
||||
```
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
| Member | Value | Description |
|
||||
| ------ | ------------------------------- | ----------- |
|
||||
| BETA | <code>"beta"</code> | |
|
||||
| CANARY | <code>"canary"</code> | |
|
||||
| DEV | <code>"dev"</code> | |
|
||||
| STABLE | <code>"stable"</code> | |
|
22
docs/browsers-api/browsers.cli._constructor_.md
Normal file
22
docs/browsers-api/browsers.cli._constructor_.md
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
sidebar_label: CLI.(constructor)
|
||||
---
|
||||
|
||||
# CLI.(constructor)
|
||||
|
||||
Constructs a new instance of the `CLI` class
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
class CLI {
|
||||
constructor(cachePath?: string, rl?: readline.Interface);
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------------------ | ------------ |
|
||||
| cachePath | string | _(Optional)_ |
|
||||
| rl | readline.Interface | _(Optional)_ |
|
23
docs/browsers-api/browsers.cli.md
Normal file
23
docs/browsers-api/browsers.cli.md
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
sidebar_label: CLI
|
||||
---
|
||||
|
||||
# CLI class
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare class CLI
|
||||
```
|
||||
|
||||
## Constructors
|
||||
|
||||
| Constructor | Modifiers | Description |
|
||||
| --------------------------------------------------------------- | --------- | ------------------------------------------------------- |
|
||||
| [(constructor)(cachePath, rl)](./browsers.cli._constructor_.md) | | Constructs a new instance of the <code>CLI</code> class |
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Modifiers | Description |
|
||||
| ---------------------------------- | --------- | ----------- |
|
||||
| [run(argv)](./browsers.cli.run.md) | | |
|
23
docs/browsers-api/browsers.cli.run.md
Normal file
23
docs/browsers-api/browsers.cli.run.md
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
sidebar_label: CLI.run
|
||||
---
|
||||
|
||||
# CLI.run() method
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
class CLI {
|
||||
run(argv: string[]): Promise<void>;
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---------- | ----------- |
|
||||
| argv | string\[\] | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
Promise<void>
|
21
docs/browsers-api/browsers.computeexecutablepath.md
Normal file
21
docs/browsers-api/browsers.computeexecutablepath.md
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
sidebar_label: computeExecutablePath
|
||||
---
|
||||
|
||||
# computeExecutablePath() function
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare function computeExecutablePath(options: Options): string;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | -------------------------------- | ----------- |
|
||||
| options | [Options](./browsers.options.md) | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
string
|
23
docs/browsers-api/browsers.computesystemexecutablepath.md
Normal file
23
docs/browsers-api/browsers.computesystemexecutablepath.md
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
sidebar_label: computeSystemExecutablePath
|
||||
---
|
||||
|
||||
# computeSystemExecutablePath() function
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare function computeSystemExecutablePath(
|
||||
options: SystemOptions
|
||||
): string;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | -------------------------------------------- | ----------- |
|
||||
| options | [SystemOptions](./browsers.systemoptions.md) | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
string
|
25
docs/browsers-api/browsers.createprofile.md
Normal file
25
docs/browsers-api/browsers.createprofile.md
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
sidebar_label: createProfile
|
||||
---
|
||||
|
||||
# createProfile() function
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare function createProfile(
|
||||
browser: Browser,
|
||||
opts: ProfileOptions
|
||||
): Promise<void>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---------------------------------------------- | ----------- |
|
||||
| browser | [Browser](./browsers.browser.md) | |
|
||||
| opts | [ProfileOptions](./browsers.profileoptions.md) | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
Promise<void>
|
15
docs/browsers-api/browsers.detectbrowserplatform.md
Normal file
15
docs/browsers-api/browsers.detectbrowserplatform.md
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
sidebar_label: detectBrowserPlatform
|
||||
---
|
||||
|
||||
# detectBrowserPlatform() function
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare function detectBrowserPlatform(): BrowserPlatform | undefined;
|
||||
```
|
||||
|
||||
**Returns:**
|
||||
|
||||
[BrowserPlatform](./browsers.browserplatform.md) \| undefined
|
23
docs/browsers-api/browsers.install.md
Normal file
23
docs/browsers-api/browsers.install.md
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
sidebar_label: install
|
||||
---
|
||||
|
||||
# install() function
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare function install(
|
||||
options: InstallOptions
|
||||
): Promise<InstalledBrowser>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---------------------------------------------- | ----------- |
|
||||
| options | [InstallOptions](./browsers.installoptions.md) | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
Promise<InstalledBrowser>
|
23
docs/browsers-api/browsers.installoptions.md
Normal file
23
docs/browsers-api/browsers.installoptions.md
Normal file
@ -0,0 +1,23 @@
|
||||
---
|
||||
sidebar_label: InstallOptions
|
||||
---
|
||||
|
||||
# InstallOptions interface
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export interface InstallOptions
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| ------------------------ | --------------------- | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| baseUrl | <code>optional</code> | string | Determines the host that will be used for downloading. | <p>Either</p><p>- https://storage.googleapis.com/chromium-browser-snapshots or - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central</p> |
|
||||
| browser | | [Browser](./browsers.browser.md) | Determines which browser to install. | |
|
||||
| buildId | | string | Determines which buildId to dowloand. BuildId should uniquely identify binaries and they are used for caching. | |
|
||||
| cacheDir | | string | Determines the path to download browsers to. | |
|
||||
| downloadProgressCallback | <code>optional</code> | (downloadedBytes: number, totalBytes: number) => void | Provides information about the progress of the download. | |
|
||||
| platform | <code>optional</code> | [BrowserPlatform](./browsers.browserplatform.md) | Determines which platform the browser will be suited for. | **Auto-detected.** |
|
||||
| unpack | <code>optional</code> | boolean | Whether to unpack and install browser archives. | <code>true</code> |
|
21
docs/browsers-api/browsers.launch.md
Normal file
21
docs/browsers-api/browsers.launch.md
Normal file
@ -0,0 +1,21 @@
|
||||
---
|
||||
sidebar_label: launch
|
||||
---
|
||||
|
||||
# launch() function
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare function launch(opts: LaunchOptions): Process;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | -------------------------------------------- | ----------- |
|
||||
| opts | [LaunchOptions](./browsers.launchoptions.md) | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
Process
|
22
docs/browsers-api/browsers.launchoptions.md
Normal file
22
docs/browsers-api/browsers.launchoptions.md
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
sidebar_label: LaunchOptions
|
||||
---
|
||||
|
||||
# LaunchOptions type
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export type LaunchOptions = {
|
||||
executablePath: string;
|
||||
pipe?: boolean;
|
||||
dumpio?: boolean;
|
||||
args?: string[];
|
||||
env?: Record<string, string | undefined>;
|
||||
handleSIGINT?: boolean;
|
||||
handleSIGTERM?: boolean;
|
||||
handleSIGHUP?: boolean;
|
||||
detached?: boolean;
|
||||
onExit?: () => Promise<void>;
|
||||
};
|
||||
```
|
25
docs/browsers-api/browsers.makeprogresscallback.md
Normal file
25
docs/browsers-api/browsers.makeprogresscallback.md
Normal file
@ -0,0 +1,25 @@
|
||||
---
|
||||
sidebar_label: makeProgressCallback
|
||||
---
|
||||
|
||||
# makeProgressCallback() function
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare function makeProgressCallback(
|
||||
browser: Browser,
|
||||
buildId: string
|
||||
): (downloadedBytes: number, totalBytes: number) => void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | -------------------------------- | ----------- |
|
||||
| browser | [Browser](./browsers.browser.md) | |
|
||||
| buildId | string | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
(downloadedBytes: number, totalBytes: number) => void
|
20
docs/browsers-api/browsers.options.md
Normal file
20
docs/browsers-api/browsers.options.md
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
sidebar_label: Options
|
||||
---
|
||||
|
||||
# Options interface
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export interface Options
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| -------- | --------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- | ------------------ |
|
||||
| browser | | [Browser](./browsers.browser.md) | Determines which browser to launch. | |
|
||||
| buildId | | string | Determines which buildId to download. BuildId should uniquely identify binaries and they are used for caching. | |
|
||||
| cacheDir | | string | Root path to the storage directory. | |
|
||||
| platform | <code>optional</code> | [BrowserPlatform](./browsers.browserplatform.md) | Determines which platform the browser will be suited for. | **Auto-detected.** |
|
18
docs/browsers-api/browsers.profileoptions.md
Normal file
18
docs/browsers-api/browsers.profileoptions.md
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
sidebar_label: ProfileOptions
|
||||
---
|
||||
|
||||
# ProfileOptions interface
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export interface ProfileOptions
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| ----------- | --------- | ----------------------------- | ----------- | ------- |
|
||||
| path | | string | | |
|
||||
| preferences | | Record<string, unknown> | | |
|
27
docs/browsers-api/browsers.resolvebuildid.md
Normal file
27
docs/browsers-api/browsers.resolvebuildid.md
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
sidebar_label: resolveBuildId
|
||||
---
|
||||
|
||||
# resolveBuildId() function
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare function resolveBuildId(
|
||||
browser: Browser,
|
||||
platform: BrowserPlatform,
|
||||
tag: string
|
||||
): Promise<string>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------------------------------------------------ | ----------- |
|
||||
| browser | [Browser](./browsers.browser.md) | |
|
||||
| platform | [BrowserPlatform](./browsers.browserplatform.md) | |
|
||||
| tag | string | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
Promise<string>
|
19
docs/browsers-api/browsers.systemoptions.md
Normal file
19
docs/browsers-api/browsers.systemoptions.md
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
sidebar_label: SystemOptions
|
||||
---
|
||||
|
||||
# SystemOptions interface
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export interface SystemOptions
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| -------- | --------------------- | ---------------------------------------------------------- | --------------------------------------------------------- | ------------------ |
|
||||
| browser | | [Browser](./browsers.browser.md) | Determines which browser to launch. | |
|
||||
| channel | | [ChromeReleaseChannel](./browsers.chromereleasechannel.md) | Release channel to look for on the system. | |
|
||||
| platform | <code>optional</code> | [BrowserPlatform](./browsers.browserplatform.md) | Determines which platform the browser will be suited for. | **Auto-detected.** |
|
17
docs/browsers-api/browsers.timeouterror.md
Normal file
17
docs/browsers-api/browsers.timeouterror.md
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
sidebar_label: TimeoutError
|
||||
---
|
||||
|
||||
# TimeoutError class
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare class TimeoutError extends Error
|
||||
```
|
||||
|
||||
**Extends:** Error
|
||||
|
||||
## Remarks
|
||||
|
||||
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `TimeoutError` class.
|
@ -0,0 +1,11 @@
|
||||
---
|
||||
sidebar_label: WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX
|
||||
---
|
||||
|
||||
# WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX variable
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX: RegExp;
|
||||
```
|
56
docs/browsers-api/index.md
Normal file
56
docs/browsers-api/index.md
Normal file
@ -0,0 +1,56 @@
|
||||
---
|
||||
sidebar_label: API
|
||||
---
|
||||
|
||||
# API Reference
|
||||
|
||||
## Classes
|
||||
|
||||
| Class | Description |
|
||||
| ------------------------------------------ | ----------- |
|
||||
| [CLI](./browsers.cli.md) | |
|
||||
| [TimeoutError](./browsers.timeouterror.md) | |
|
||||
|
||||
## Enumerations
|
||||
|
||||
| Enumeration | Description |
|
||||
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| [Browser](./browsers.browser.md) | Supported browsers. |
|
||||
| [BrowserPlatform](./browsers.browserplatform.md) | Platform names used to identify a OS platfrom x architecture combination in the way that is relevant for the browser download. |
|
||||
| [ChromeReleaseChannel](./browsers.chromereleasechannel.md) | |
|
||||
|
||||
## Functions
|
||||
|
||||
| Function | Description |
|
||||
| --------------------------------------------------------------------------------- | ----------- |
|
||||
| [canDownload(options)](./browsers.candownload.md) | |
|
||||
| [computeExecutablePath(options)](./browsers.computeexecutablepath.md) | |
|
||||
| [computeSystemExecutablePath(options)](./browsers.computesystemexecutablepath.md) | |
|
||||
| [createProfile(browser, opts)](./browsers.createprofile.md) | |
|
||||
| [detectBrowserPlatform()](./browsers.detectbrowserplatform.md) | |
|
||||
| [install(options)](./browsers.install.md) | |
|
||||
| [launch(opts)](./browsers.launch.md) | |
|
||||
| [makeProgressCallback(browser, buildId)](./browsers.makeprogresscallback.md) | |
|
||||
| [resolveBuildId(browser, platform, tag)](./browsers.resolvebuildid.md) | |
|
||||
|
||||
## Interfaces
|
||||
|
||||
| Interface | Description |
|
||||
| ---------------------------------------------- | ----------- |
|
||||
| [InstallOptions](./browsers.installoptions.md) | |
|
||||
| [Options](./browsers.options.md) | |
|
||||
| [ProfileOptions](./browsers.profileoptions.md) | |
|
||||
| [SystemOptions](./browsers.systemoptions.md) | |
|
||||
|
||||
## Variables
|
||||
|
||||
| Variable | Description |
|
||||
| ------------------------------------------------------------------------------------------------ | ----------- |
|
||||
| [CDP_WEBSOCKET_ENDPOINT_REGEX](./browsers.cdp_websocket_endpoint_regex.md) | |
|
||||
| [WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX](./browsers.webdriver_bidi_websocket_endpoint_regex.md) | |
|
||||
|
||||
## Type Aliases
|
||||
|
||||
| Type Alias | Description |
|
||||
| -------------------------------------------- | ----------- |
|
||||
| [LaunchOptions](./browsers.launchoptions.md) | |
|
@ -53,6 +53,7 @@
|
||||
},
|
||||
"build:docs": {
|
||||
"dependencies": [
|
||||
"./packages/browsers:build:docs",
|
||||
"./packages/puppeteer:build:docs",
|
||||
"./packages/puppeteer-core:build:docs"
|
||||
]
|
||||
|
15
packages/browsers/api-extractor.docs.json
Normal file
15
packages/browsers/api-extractor.docs.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
||||
"mainEntryPointFilePath": "<projectFolder>/lib/esm/main.d.ts",
|
||||
|
||||
"extends": "./api-extractor.json",
|
||||
|
||||
"dtsRollup": {
|
||||
"enabled": false
|
||||
},
|
||||
|
||||
"docModel": {
|
||||
"enabled": true,
|
||||
"apiJsonFilePath": "<projectFolder>/../../docs/<unscopedPackageName>.api.json"
|
||||
}
|
||||
}
|
40
packages/browsers/api-extractor.json
Normal file
40
packages/browsers/api-extractor.json
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
||||
"mainEntryPointFilePath": "<projectFolder>/lib/esm/main.d.ts",
|
||||
"bundledPackages": [],
|
||||
|
||||
"apiReport": {
|
||||
"enabled": false
|
||||
},
|
||||
|
||||
"docModel": {
|
||||
"enabled": false
|
||||
},
|
||||
|
||||
"tsdocMetadata": {
|
||||
"enabled": false
|
||||
},
|
||||
|
||||
"messages": {
|
||||
"compilerMessageReporting": {
|
||||
"default": {
|
||||
"logLevel": "warning"
|
||||
}
|
||||
},
|
||||
|
||||
"extractorMessageReporting": {
|
||||
"ae-internal-missing-underscore": {
|
||||
"logLevel": "none"
|
||||
},
|
||||
"default": {
|
||||
"logLevel": "warning"
|
||||
}
|
||||
},
|
||||
|
||||
"tsdocMessageReporting": {
|
||||
"default": {
|
||||
"logLevel": "warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -3,6 +3,7 @@
|
||||
"version": "0.3.2",
|
||||
"description": "Download and launch browsers",
|
||||
"scripts": {
|
||||
"build:docs": "wireit",
|
||||
"build": "wireit",
|
||||
"build:test": "wireit",
|
||||
"clean": "tsc --build --clean && rm -rf lib",
|
||||
@ -45,6 +46,17 @@
|
||||
"lib/esm/package.json"
|
||||
]
|
||||
},
|
||||
"build:docs": {
|
||||
"command": "api-extractor run --local --config \"./api-extractor.docs.json\"",
|
||||
"files": [
|
||||
"api-extractor.docs.json",
|
||||
"lib/esm/main.d.ts",
|
||||
"tsconfig.json"
|
||||
],
|
||||
"dependencies": [
|
||||
"build"
|
||||
]
|
||||
},
|
||||
"build:test": {
|
||||
"command": "tsc -b test/src/tsconfig.json",
|
||||
"files": [
|
||||
|
@ -25,6 +25,8 @@ import {
|
||||
ProfileOptions,
|
||||
} from './types.js';
|
||||
|
||||
export {ProfileOptions};
|
||||
|
||||
export const downloadUrls = {
|
||||
[Browser.CHROME]: chrome.resolveDownloadUrl,
|
||||
[Browser.CHROMIUM]: chromium.resolveDownloadUrl,
|
||||
|
@ -52,7 +52,7 @@ function debugTimeEnd(label: string) {
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface Options {
|
||||
export interface InstallOptions {
|
||||
/**
|
||||
* Determines the path to download browsers to.
|
||||
*/
|
||||
@ -104,7 +104,9 @@ export type InstalledBrowser = {
|
||||
platform: BrowserPlatform;
|
||||
};
|
||||
|
||||
export async function install(options: Options): Promise<InstalledBrowser> {
|
||||
export async function install(
|
||||
options: InstallOptions
|
||||
): Promise<InstalledBrowser> {
|
||||
options.platform ??= detectBrowserPlatform();
|
||||
options.unpack ??= true;
|
||||
if (!options.platform) {
|
||||
@ -192,7 +194,7 @@ export async function install(options: Options): Promise<InstalledBrowser> {
|
||||
};
|
||||
}
|
||||
|
||||
export async function canDownload(options: Options): Promise<boolean> {
|
||||
export async function canDownload(options: InstallOptions): Promise<boolean> {
|
||||
options.platform ??= detectBrowserPlatform();
|
||||
if (!options.platform) {
|
||||
throw new Error(
|
||||
|
@ -117,7 +117,7 @@ export function computeSystemExecutablePath(options: SystemOptions): string {
|
||||
return path;
|
||||
}
|
||||
|
||||
type LaunchOptions = {
|
||||
export type LaunchOptions = {
|
||||
executablePath: string;
|
||||
pipe?: boolean;
|
||||
dumpio?: boolean;
|
||||
|
@ -19,10 +19,13 @@ export {
|
||||
computeExecutablePath,
|
||||
computeSystemExecutablePath,
|
||||
TimeoutError,
|
||||
LaunchOptions,
|
||||
Options,
|
||||
SystemOptions,
|
||||
CDP_WEBSOCKET_ENDPOINT_REGEX,
|
||||
WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX,
|
||||
} from './launch.js';
|
||||
export {install, canDownload} from './install.js';
|
||||
export {install, canDownload, InstallOptions} from './install.js';
|
||||
export {detectBrowserPlatform} from './detectPlatform.js';
|
||||
export {
|
||||
resolveBuildId,
|
||||
@ -30,6 +33,7 @@ export {
|
||||
BrowserPlatform,
|
||||
ChromeReleaseChannel,
|
||||
createProfile,
|
||||
ProfileOptions,
|
||||
} from './browser-data/browser-data.js';
|
||||
export {CLI, makeProgressCallback} from './CLI.js';
|
||||
export {Cache} from './Cache.js';
|
||||
|
@ -118,4 +118,16 @@ function spliceIntoSection(
|
||||
])
|
||||
.outputs(['docs/api'])
|
||||
.build();
|
||||
|
||||
job('', async ({inputs, outputs}) => {
|
||||
await rm(outputs[0]!, {recursive: true, force: true});
|
||||
generateDocs(inputs[0]!, outputs[0]!);
|
||||
spawnAndLog('prettier', '--ignore-path', 'none', '--write', 'docs');
|
||||
})
|
||||
.inputs([
|
||||
'docs/browsers.api.json',
|
||||
'tools/internal/custom_markdown_documenter.ts',
|
||||
])
|
||||
.outputs(['docs/browsers-api'])
|
||||
.build();
|
||||
})();
|
||||
|
@ -92,12 +92,6 @@ const config = {
|
||||
docs: {
|
||||
async sidebarItemsGenerator({defaultSidebarItemsGenerator, ...args}) {
|
||||
const sidebarItems = await defaultSidebarItemsGenerator(args);
|
||||
const apiItem = sidebarItems.find(value => {
|
||||
return value.type === 'doc' && value.label === 'API';
|
||||
});
|
||||
if (!apiItem) {
|
||||
return sidebarItems;
|
||||
}
|
||||
|
||||
/** @type {typeof sidebarItems} */
|
||||
const apiSidebarItems = [];
|
||||
@ -112,37 +106,6 @@ const config = {
|
||||
}
|
||||
}
|
||||
|
||||
const order = [
|
||||
// PuppeteerNode and Puppeteer go first as the entrypoints into
|
||||
// the Puppeteer API.
|
||||
'PuppeteerNode',
|
||||
'Puppeteer',
|
||||
'BrowserFetcher',
|
||||
'Browser',
|
||||
'BrowserContext',
|
||||
'Page',
|
||||
'WebWorker',
|
||||
'Accessibility',
|
||||
'Keyboard',
|
||||
'Mouse',
|
||||
'Touchscreen',
|
||||
'Tracing',
|
||||
'FileChooser',
|
||||
'Dialog',
|
||||
'ConsoleMessage',
|
||||
'Frame',
|
||||
'JSHandle',
|
||||
'ElementHandle',
|
||||
'HTTPRequest',
|
||||
'HTTPResponse',
|
||||
'SecurityDetails',
|
||||
'Target',
|
||||
'CDPSession',
|
||||
'Coverage',
|
||||
'TimeoutError',
|
||||
'EventEmitter',
|
||||
];
|
||||
|
||||
function addNamespace(namespace, target) {
|
||||
let items = categories.get(namespace);
|
||||
if (!items) {
|
||||
@ -171,8 +134,73 @@ const config = {
|
||||
categories.delete(namespace);
|
||||
}
|
||||
|
||||
for (const namespace of order) {
|
||||
addNamespace(namespace, apiSidebarItems);
|
||||
if (args.item.dirName === 'browsers-api') {
|
||||
const order = [
|
||||
'launch',
|
||||
'install',
|
||||
'canDownload',
|
||||
'createProfile',
|
||||
'computeExecutablePath',
|
||||
'computeSystemExecutablePath',
|
||||
'detectBrowserPlatform',
|
||||
'resolveBuildId',
|
||||
'BrowserPlatform',
|
||||
'Browser',
|
||||
'CLI',
|
||||
];
|
||||
const apiItem = sidebarItems.find(value => {
|
||||
return value.type === 'doc' && value.label === 'API';
|
||||
});
|
||||
apiSidebarItems.push({
|
||||
type: 'category',
|
||||
label: 'API',
|
||||
items: [],
|
||||
link: apiItem
|
||||
? {
|
||||
type: 'doc',
|
||||
id: apiItem.id,
|
||||
}
|
||||
: undefined,
|
||||
});
|
||||
const container = apiSidebarItems[apiSidebarItems.length - 1];
|
||||
for (const namespace of order) {
|
||||
addNamespace(namespace, container.items);
|
||||
}
|
||||
} else {
|
||||
const order = [
|
||||
// PuppeteerNode and Puppeteer go first as the entrypoints into
|
||||
// the Puppeteer API.
|
||||
'PuppeteerNode',
|
||||
'Puppeteer',
|
||||
'BrowserFetcher',
|
||||
'Browser',
|
||||
'BrowserContext',
|
||||
'Page',
|
||||
'WebWorker',
|
||||
'Accessibility',
|
||||
'Keyboard',
|
||||
'Mouse',
|
||||
'Touchscreen',
|
||||
'Tracing',
|
||||
'FileChooser',
|
||||
'Dialog',
|
||||
'ConsoleMessage',
|
||||
'Frame',
|
||||
'JSHandle',
|
||||
'ElementHandle',
|
||||
'HTTPRequest',
|
||||
'HTTPResponse',
|
||||
'SecurityDetails',
|
||||
'Target',
|
||||
'CDPSession',
|
||||
'Coverage',
|
||||
'TimeoutError',
|
||||
'EventEmitter',
|
||||
];
|
||||
|
||||
for (const namespace of order) {
|
||||
addNamespace(namespace, apiSidebarItems);
|
||||
}
|
||||
}
|
||||
const otherItems = [];
|
||||
apiSidebarItems.push({
|
||||
@ -186,6 +214,9 @@ const config = {
|
||||
return a.localeCompare(b);
|
||||
});
|
||||
for (const namespace of remaining) {
|
||||
if (namespace === 'API') {
|
||||
continue;
|
||||
}
|
||||
addNamespace(namespace, otherItems);
|
||||
}
|
||||
return apiSidebarItems;
|
||||
@ -224,7 +255,12 @@ const config = {
|
||||
{
|
||||
type: 'docSidebar',
|
||||
sidebarId: 'api',
|
||||
label: 'API',
|
||||
label: 'Puppeteer API',
|
||||
},
|
||||
{
|
||||
type: 'docSidebar',
|
||||
sidebarId: 'browsersApi',
|
||||
label: '@puppeteer/browsers API',
|
||||
},
|
||||
].map(item => {
|
||||
return Object.assign(item, {position: 'left'});
|
||||
|
@ -32,4 +32,10 @@ module.exports = {
|
||||
dirName: 'api',
|
||||
},
|
||||
],
|
||||
browsersApi: [
|
||||
{
|
||||
type: 'autogenerated',
|
||||
dirName: 'browsers-api',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
@ -0,0 +1,21 @@
|
||||
---
|
||||
sidebar_label: Browser
|
||||
---
|
||||
|
||||
# Browser enum
|
||||
|
||||
Supported browsers.
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare enum Browser
|
||||
```
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
| Member | Value | Description |
|
||||
| -------- | --------------------------------- | ----------- |
|
||||
| CHROME | <code>"chrome"</code> | |
|
||||
| CHROMIUM | <code>"chromium"</code> | |
|
||||
| FIREFOX | <code>"firefox"</code> | |
|
@ -0,0 +1,23 @@
|
||||
---
|
||||
sidebar_label: BrowserPlatform
|
||||
---
|
||||
|
||||
# BrowserPlatform enum
|
||||
|
||||
Platform names used to identify a OS platfrom x architecture combination in the way that is relevant for the browser download.
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare enum BrowserPlatform
|
||||
```
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
| Member | Value | Description |
|
||||
| ------- | -------------------------------- | ----------- |
|
||||
| LINUX | <code>"linux"</code> | |
|
||||
| MAC | <code>"mac"</code> | |
|
||||
| MAC_ARM | <code>"mac_arm"</code> | |
|
||||
| WIN32 | <code>"win32"</code> | |
|
||||
| WIN64 | <code>"win64"</code> | |
|
@ -0,0 +1,21 @@
|
||||
---
|
||||
sidebar_label: canDownload
|
||||
---
|
||||
|
||||
# canDownload() function
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare function canDownload(options: InstallOptions): Promise<boolean>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---------------------------------------------- | ----------- |
|
||||
| options | [InstallOptions](./browsers.installoptions.md) | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
Promise<boolean>
|
@ -0,0 +1,11 @@
|
||||
---
|
||||
sidebar_label: CDP_WEBSOCKET_ENDPOINT_REGEX
|
||||
---
|
||||
|
||||
# CDP_WEBSOCKET_ENDPOINT_REGEX variable
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
CDP_WEBSOCKET_ENDPOINT_REGEX: RegExp;
|
||||
```
|
@ -0,0 +1,20 @@
|
||||
---
|
||||
sidebar_label: ChromeReleaseChannel
|
||||
---
|
||||
|
||||
# ChromeReleaseChannel enum
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare enum ChromeReleaseChannel
|
||||
```
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
| Member | Value | Description |
|
||||
| ------ | ------------------------------- | ----------- |
|
||||
| BETA | <code>"beta"</code> | |
|
||||
| CANARY | <code>"canary"</code> | |
|
||||
| DEV | <code>"dev"</code> | |
|
||||
| STABLE | <code>"stable"</code> | |
|
@ -0,0 +1,22 @@
|
||||
---
|
||||
sidebar_label: CLI.(constructor)
|
||||
---
|
||||
|
||||
# CLI.(constructor)
|
||||
|
||||
Constructs a new instance of the `CLI` class
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
class CLI {
|
||||
constructor(cachePath?: string, rl?: readline.Interface);
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------------------ | ------------ |
|
||||
| cachePath | string | _(Optional)_ |
|
||||
| rl | readline.Interface | _(Optional)_ |
|
@ -0,0 +1,23 @@
|
||||
---
|
||||
sidebar_label: CLI
|
||||
---
|
||||
|
||||
# CLI class
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare class CLI
|
||||
```
|
||||
|
||||
## Constructors
|
||||
|
||||
| Constructor | Modifiers | Description |
|
||||
| --------------------------------------------------------------- | --------- | ------------------------------------------------------- |
|
||||
| [(constructor)(cachePath, rl)](./browsers.cli._constructor_.md) | | Constructs a new instance of the <code>CLI</code> class |
|
||||
|
||||
## Methods
|
||||
|
||||
| Method | Modifiers | Description |
|
||||
| ---------------------------------- | --------- | ----------- |
|
||||
| [run(argv)](./browsers.cli.run.md) | | |
|
@ -0,0 +1,23 @@
|
||||
---
|
||||
sidebar_label: CLI.run
|
||||
---
|
||||
|
||||
# CLI.run() method
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
class CLI {
|
||||
run(argv: string[]): Promise<void>;
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---------- | ----------- |
|
||||
| argv | string\[\] | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
Promise<void>
|
@ -0,0 +1,21 @@
|
||||
---
|
||||
sidebar_label: computeExecutablePath
|
||||
---
|
||||
|
||||
# computeExecutablePath() function
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare function computeExecutablePath(options: Options): string;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | -------------------------------- | ----------- |
|
||||
| options | [Options](./browsers.options.md) | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
string
|
@ -0,0 +1,23 @@
|
||||
---
|
||||
sidebar_label: computeSystemExecutablePath
|
||||
---
|
||||
|
||||
# computeSystemExecutablePath() function
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare function computeSystemExecutablePath(
|
||||
options: SystemOptions
|
||||
): string;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | -------------------------------------------- | ----------- |
|
||||
| options | [SystemOptions](./browsers.systemoptions.md) | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
string
|
@ -0,0 +1,25 @@
|
||||
---
|
||||
sidebar_label: createProfile
|
||||
---
|
||||
|
||||
# createProfile() function
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare function createProfile(
|
||||
browser: Browser,
|
||||
opts: ProfileOptions
|
||||
): Promise<void>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---------------------------------------------- | ----------- |
|
||||
| browser | [Browser](./browsers.browser.md) | |
|
||||
| opts | [ProfileOptions](./browsers.profileoptions.md) | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
Promise<void>
|
@ -0,0 +1,15 @@
|
||||
---
|
||||
sidebar_label: detectBrowserPlatform
|
||||
---
|
||||
|
||||
# detectBrowserPlatform() function
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare function detectBrowserPlatform(): BrowserPlatform | undefined;
|
||||
```
|
||||
|
||||
**Returns:**
|
||||
|
||||
[BrowserPlatform](./browsers.browserplatform.md) \| undefined
|
@ -0,0 +1,23 @@
|
||||
---
|
||||
sidebar_label: install
|
||||
---
|
||||
|
||||
# install() function
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare function install(
|
||||
options: InstallOptions
|
||||
): Promise<InstalledBrowser>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---------------------------------------------- | ----------- |
|
||||
| options | [InstallOptions](./browsers.installoptions.md) | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
Promise<InstalledBrowser>
|
@ -0,0 +1,23 @@
|
||||
---
|
||||
sidebar_label: InstallOptions
|
||||
---
|
||||
|
||||
# InstallOptions interface
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export interface InstallOptions
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| ------------------------ | --------------------- | -------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| baseUrl | <code>optional</code> | string | Determines the host that will be used for downloading. | <p>Either</p><p>- https://storage.googleapis.com/chromium-browser-snapshots or - https://archive.mozilla.org/pub/firefox/nightly/latest-mozilla-central</p> |
|
||||
| browser | | [Browser](./browsers.browser.md) | Determines which browser to install. | |
|
||||
| buildId | | string | Determines which buildId to dowloand. BuildId should uniquely identify binaries and they are used for caching. | |
|
||||
| cacheDir | | string | Determines the path to download browsers to. | |
|
||||
| downloadProgressCallback | <code>optional</code> | (downloadedBytes: number, totalBytes: number) => void | Provides information about the progress of the download. | |
|
||||
| platform | <code>optional</code> | [BrowserPlatform](./browsers.browserplatform.md) | Determines which platform the browser will be suited for. | **Auto-detected.** |
|
||||
| unpack | <code>optional</code> | boolean | Whether to unpack and install browser archives. | <code>true</code> |
|
@ -0,0 +1,21 @@
|
||||
---
|
||||
sidebar_label: launch
|
||||
---
|
||||
|
||||
# launch() function
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare function launch(opts: LaunchOptions): Process;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | -------------------------------------------- | ----------- |
|
||||
| opts | [LaunchOptions](./browsers.launchoptions.md) | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
Process
|
@ -0,0 +1,22 @@
|
||||
---
|
||||
sidebar_label: LaunchOptions
|
||||
---
|
||||
|
||||
# LaunchOptions type
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export type LaunchOptions = {
|
||||
executablePath: string;
|
||||
pipe?: boolean;
|
||||
dumpio?: boolean;
|
||||
args?: string[];
|
||||
env?: Record<string, string | undefined>;
|
||||
handleSIGINT?: boolean;
|
||||
handleSIGTERM?: boolean;
|
||||
handleSIGHUP?: boolean;
|
||||
detached?: boolean;
|
||||
onExit?: () => Promise<void>;
|
||||
};
|
||||
```
|
@ -0,0 +1,25 @@
|
||||
---
|
||||
sidebar_label: makeProgressCallback
|
||||
---
|
||||
|
||||
# makeProgressCallback() function
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare function makeProgressCallback(
|
||||
browser: Browser,
|
||||
buildId: string
|
||||
): (downloadedBytes: number, totalBytes: number) => void;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | -------------------------------- | ----------- |
|
||||
| browser | [Browser](./browsers.browser.md) | |
|
||||
| buildId | string | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
(downloadedBytes: number, totalBytes: number) => void
|
@ -0,0 +1,20 @@
|
||||
---
|
||||
sidebar_label: Options
|
||||
---
|
||||
|
||||
# Options interface
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export interface Options
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| -------- | --------------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- | ------------------ |
|
||||
| browser | | [Browser](./browsers.browser.md) | Determines which browser to launch. | |
|
||||
| buildId | | string | Determines which buildId to download. BuildId should uniquely identify binaries and they are used for caching. | |
|
||||
| cacheDir | | string | Root path to the storage directory. | |
|
||||
| platform | <code>optional</code> | [BrowserPlatform](./browsers.browserplatform.md) | Determines which platform the browser will be suited for. | **Auto-detected.** |
|
@ -0,0 +1,18 @@
|
||||
---
|
||||
sidebar_label: ProfileOptions
|
||||
---
|
||||
|
||||
# ProfileOptions interface
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export interface ProfileOptions
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| ----------- | --------- | ----------------------------- | ----------- | ------- |
|
||||
| path | | string | | |
|
||||
| preferences | | Record<string, unknown> | | |
|
@ -0,0 +1,27 @@
|
||||
---
|
||||
sidebar_label: resolveBuildId
|
||||
---
|
||||
|
||||
# resolveBuildId() function
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare function resolveBuildId(
|
||||
browser: Browser,
|
||||
platform: BrowserPlatform,
|
||||
tag: string
|
||||
): Promise<string>;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ------------------------------------------------ | ----------- |
|
||||
| browser | [Browser](./browsers.browser.md) | |
|
||||
| platform | [BrowserPlatform](./browsers.browserplatform.md) | |
|
||||
| tag | string | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
Promise<string>
|
@ -0,0 +1,19 @@
|
||||
---
|
||||
sidebar_label: SystemOptions
|
||||
---
|
||||
|
||||
# SystemOptions interface
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export interface SystemOptions
|
||||
```
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Modifiers | Type | Description | Default |
|
||||
| -------- | --------------------- | ---------------------------------------------------------- | --------------------------------------------------------- | ------------------ |
|
||||
| browser | | [Browser](./browsers.browser.md) | Determines which browser to launch. | |
|
||||
| channel | | [ChromeReleaseChannel](./browsers.chromereleasechannel.md) | Release channel to look for on the system. | |
|
||||
| platform | <code>optional</code> | [BrowserPlatform](./browsers.browserplatform.md) | Determines which platform the browser will be suited for. | **Auto-detected.** |
|
@ -0,0 +1,17 @@
|
||||
---
|
||||
sidebar_label: TimeoutError
|
||||
---
|
||||
|
||||
# TimeoutError class
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
export declare class TimeoutError extends Error
|
||||
```
|
||||
|
||||
**Extends:** Error
|
||||
|
||||
## Remarks
|
||||
|
||||
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `TimeoutError` class.
|
@ -0,0 +1,11 @@
|
||||
---
|
||||
sidebar_label: WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX
|
||||
---
|
||||
|
||||
# WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX variable
|
||||
|
||||
#### Signature:
|
||||
|
||||
```typescript
|
||||
WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX: RegExp;
|
||||
```
|
56
website/versioned_docs/version-19.8.3/browsers-api/index.md
Normal file
56
website/versioned_docs/version-19.8.3/browsers-api/index.md
Normal file
@ -0,0 +1,56 @@
|
||||
---
|
||||
sidebar_label: API
|
||||
---
|
||||
|
||||
# API Reference
|
||||
|
||||
## Classes
|
||||
|
||||
| Class | Description |
|
||||
| ------------------------------------------ | ----------- |
|
||||
| [CLI](./browsers.cli.md) | |
|
||||
| [TimeoutError](./browsers.timeouterror.md) | |
|
||||
|
||||
## Enumerations
|
||||
|
||||
| Enumeration | Description |
|
||||
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| [Browser](./browsers.browser.md) | Supported browsers. |
|
||||
| [BrowserPlatform](./browsers.browserplatform.md) | Platform names used to identify a OS platfrom x architecture combination in the way that is relevant for the browser download. |
|
||||
| [ChromeReleaseChannel](./browsers.chromereleasechannel.md) | |
|
||||
|
||||
## Functions
|
||||
|
||||
| Function | Description |
|
||||
| --------------------------------------------------------------------------------- | ----------- |
|
||||
| [canDownload(options)](./browsers.candownload.md) | |
|
||||
| [computeExecutablePath(options)](./browsers.computeexecutablepath.md) | |
|
||||
| [computeSystemExecutablePath(options)](./browsers.computesystemexecutablepath.md) | |
|
||||
| [createProfile(browser, opts)](./browsers.createprofile.md) | |
|
||||
| [detectBrowserPlatform()](./browsers.detectbrowserplatform.md) | |
|
||||
| [install(options)](./browsers.install.md) | |
|
||||
| [launch(opts)](./browsers.launch.md) | |
|
||||
| [makeProgressCallback(browser, buildId)](./browsers.makeprogresscallback.md) | |
|
||||
| [resolveBuildId(browser, platform, tag)](./browsers.resolvebuildid.md) | |
|
||||
|
||||
## Interfaces
|
||||
|
||||
| Interface | Description |
|
||||
| ---------------------------------------------- | ----------- |
|
||||
| [InstallOptions](./browsers.installoptions.md) | |
|
||||
| [Options](./browsers.options.md) | |
|
||||
| [ProfileOptions](./browsers.profileoptions.md) | |
|
||||
| [SystemOptions](./browsers.systemoptions.md) | |
|
||||
|
||||
## Variables
|
||||
|
||||
| Variable | Description |
|
||||
| ------------------------------------------------------------------------------------------------ | ----------- |
|
||||
| [CDP_WEBSOCKET_ENDPOINT_REGEX](./browsers.cdp_websocket_endpoint_regex.md) | |
|
||||
| [WEBDRIVER_BIDI_WEBSOCKET_ENDPOINT_REGEX](./browsers.webdriver_bidi_websocket_endpoint_regex.md) | |
|
||||
|
||||
## Type Aliases
|
||||
|
||||
| Type Alias | Description |
|
||||
| -------------------------------------------- | ----------- |
|
||||
| [LaunchOptions](./browsers.launchoptions.md) | |
|
@ -32,5 +32,11 @@
|
||||
"type": "autogenerated",
|
||||
"dirName": "api"
|
||||
}
|
||||
],
|
||||
"browsersApi": [
|
||||
{
|
||||
"type": "autogenerated",
|
||||
"dirName": "browsers-api"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user