Skip to content

Commit

Permalink
feat: use configuration files
Browse files Browse the repository at this point in the history
  • Loading branch information
jrandolf committed Oct 20, 2022
1 parent efcbc97 commit 06b308e
Show file tree
Hide file tree
Showing 55 changed files with 913 additions and 698 deletions.
5 changes: 4 additions & 1 deletion docs/api/index.md
Expand Up @@ -30,6 +30,7 @@ sidebar_label: API
| [Keyboard](./puppeteer.keyboard.md) | Keyboard provides an api for managing a virtual keyboard. The high level api is [Keyboard.type()](./puppeteer.keyboard.type.md), which takes raw characters and generates proper keydown, keypress/input, and keyup events on your page. |
| [Mouse](./puppeteer.mouse.md) | The Mouse class operates in main-frame CSS pixels relative to the top-left corner of the viewport. |
| [Page](./puppeteer.page.md) | <p>Page provides methods to interact with a single tab or [extension background page](https://developer.chrome.com/extensions/background_pages) in Chromium.</p><p>:::note</p><p>One Browser instance might have multiple Page instances.</p><p>:::</p> |
| [ProductLauncher](./puppeteer.productlauncher.md) | Describes a launcher - a class that is able to create and launch a browser instance. |
| [ProtocolError](./puppeteer.protocolerror.md) | ProtocolError is emitted whenever there is an error from the protocol. |
| [Puppeteer](./puppeteer.puppeteer.md) | <p>The main Puppeteer class.</p><p>IMPORTANT: if you are using Puppeteer in a Node environment, you will get an instance of [PuppeteerNode](./puppeteer.puppeteernode.md) when you import or require <code>puppeteer</code>. That class extends <code>Puppeteer</code>, so has all the methods documented below as well as all that are defined on [PuppeteerNode](./puppeteer.puppeteernode.md).</p> |
| [PuppeteerNode](./puppeteer.puppeteernode.md) | <p>Extends the main [Puppeteer](./puppeteer.puppeteer.md) class with Node specific behaviour for fetching and downloading browsers.</p><p>If you're using Puppeteer in a Node environment, this is the class you'll get when you run <code>require('puppeteer')</code> (or the equivalent ES <code>import</code>).</p> |
Expand Down Expand Up @@ -72,6 +73,7 @@ sidebar_label: API
| [CDPSessionOnMessageObject](./puppeteer.cdpsessiononmessageobject.md) | |
| [ClickOptions](./puppeteer.clickoptions.md) | |
| [CommonEventEmitter](./puppeteer.commoneventemitter.md) | |
| [Configuration](./puppeteer.configuration.md) | |
| [ConnectionCallback](./puppeteer.connectioncallback.md) | |
| [ConnectionTransport](./puppeteer.connectiontransport.md) | |
| [ConnectOptions](./puppeteer.connectoptions.md) | |
Expand All @@ -86,6 +88,7 @@ sidebar_label: API
| [FrameAddStyleTagOptions](./puppeteer.frameaddstyletagoptions.md) | |
| [FrameWaitForFunctionOptions](./puppeteer.framewaitforfunctionoptions.md) | |
| [GeolocationOptions](./puppeteer.geolocationoptions.md) | |
| [InstallationConfiguration](./puppeteer.installationconfiguration.md) | |
| [InterceptResolutionState](./puppeteer.interceptresolutionstate.md) | |
| [InternalNetworkConditions](./puppeteer.internalnetworkconditions.md) | |
| [JSCoverageEntry](./puppeteer.jscoverageentry.md) | The CoverageEntry class for JavaScript |
Expand All @@ -102,7 +105,6 @@ sidebar_label: API
| [PDFOptions](./puppeteer.pdfoptions.md) | Valid options to configure PDF generation via [Page.pdf()](./puppeteer.page.pdf.md). |
| [Point](./puppeteer.point.md) | |
| [PressOptions](./puppeteer.pressoptions.md) | |
| [ProductLauncher](./puppeteer.productlauncher.md) | Describes a launcher - a class that is able to create and launch a browser instance. |
| [PuppeteerErrors](./puppeteer.puppeteererrors.md) | |
| [PuppeteerLaunchOptions](./puppeteer.puppeteerlaunchoptions.md) | |
| [RemoteAddress](./puppeteer.remoteaddress.md) | |
Expand Down Expand Up @@ -161,6 +163,7 @@ sidebar_label: API
| [Platform](./puppeteer.platform.md) | Supported platforms. |
| [Product](./puppeteer.product.md) | Supported products. |
| [ProtocolLifeCycleEvent](./puppeteer.protocollifecycleevent.md) | |
| [PuppeteerConfiguration](./puppeteer.puppeteerconfiguration.md) | |
| [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md) | |
| [PuppeteerNodeLaunchOptions](./puppeteer.puppeteernodelaunchoptions.md) | Utility type exposed to enable users to define options that can be passed to <code>puppeteer.launch</code> without having to list the set of all types. |
| [ResourceType](./puppeteer.resourcetype.md) | Resource types for HTTPRequests as perceived by the rendering engine. |
Expand Down
8 changes: 4 additions & 4 deletions docs/api/puppeteer.browserfetcher._constructor_.md
Expand Up @@ -10,12 +10,12 @@ Constructs a browser fetcher for the given options.

```typescript
class BrowserFetcher {
constructor(options?: BrowserFetcherOptions);
constructor(options: BrowserFetcherOptions);
}
```

## Parameters

| Parameter | Type | Description |
| --------- | ------------------------------------------------------------- | ----------------- |
| options | [BrowserFetcherOptions](./puppeteer.browserfetcheroptions.md) | <i>(Optional)</i> |
| Parameter | Type | Description |
| --------- | ------------------------------------------------------------- | ----------- |
| options | [BrowserFetcherOptions](./puppeteer.browserfetcheroptions.md) | |
4 changes: 2 additions & 2 deletions docs/api/puppeteer.browserfetcher.localrevisions.md
Expand Up @@ -8,13 +8,13 @@ sidebar_label: BrowserFetcher.localRevisions

```typescript
class BrowserFetcher {
localRevisions(): Promise<string[]>;
localRevisions(): string[];
}
```

**Returns:**

Promise&lt;string\[\]&gt;
string\[\]

A promise with a list of all revision strings (for the current `product`) available locally on disk.

Expand Down
2 changes: 1 addition & 1 deletion docs/api/puppeteer.browserfetcher.md
Expand Up @@ -21,7 +21,7 @@ BrowserFetcher is not designed to work concurrently with other instances of Brow
An example of using BrowserFetcher to download a specific version of Chromium and running Puppeteer against it:

```ts
const browserFetcher = new BrowserFetcher();
const browserFetcher = new BrowserFetcher({path: 'path/to/download/folder'});
const revisionInfo = await browserFetcher.download('533271');
const browser = await puppeteer.launch({
executablePath: revisionInfo.executablePath,
Expand Down
13 changes: 7 additions & 6 deletions docs/api/puppeteer.browserfetcheroptions.md
Expand Up @@ -12,9 +12,10 @@ export interface BrowserFetcherOptions

## Properties

| Property | Modifiers | Type | Description |
| ---------------------------------------------------------- | --------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------ |
| [host?](./puppeteer.browserfetcheroptions.host.md) | | string | <i>(Optional)</i> Determines the host that will be used for downloading. |
| [path?](./puppeteer.browserfetcheroptions.path.md) | | string | <i>(Optional)</i> Determines the path to download browsers to. |
| [platform?](./puppeteer.browserfetcheroptions.platform.md) | | [Platform](./puppeteer.platform.md) | <i>(Optional)</i> Determines which platform the browser will be suited for. |
| [product?](./puppeteer.browserfetcheroptions.product.md) | | 'chrome' \| 'firefox' | <i>(Optional)</i> Determines which product the [BrowserFetcher](./puppeteer.browserfetcher.md) is for. |
| Property | Modifiers | Type | Description |
| ---------------------------------------------------------------------------- | --------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------ |
| [host?](./puppeteer.browserfetcheroptions.host.md) | | string | <i>(Optional)</i> Determines the host that will be used for downloading. |
| [path](./puppeteer.browserfetcheroptions.path.md) | | string | Determines the path to download browsers to. |
| [platform?](./puppeteer.browserfetcheroptions.platform.md) | | [Platform](./puppeteer.platform.md) | <i>(Optional)</i> Determines which platform the browser will be suited for. |
| [product?](./puppeteer.browserfetcheroptions.product.md) | | 'chrome' \| 'firefox' | <i>(Optional)</i> Determines which product the [BrowserFetcher](./puppeteer.browserfetcher.md) is for. |
| [useMacOSARMBinary?](./puppeteer.browserfetcheroptions.usemacosarmbinary.md) | | boolean | <i>(Optional)</i> Enables the use of the Chromium binary for macOS ARM. |
2 changes: 1 addition & 1 deletion docs/api/puppeteer.browserfetcheroptions.path.md
Expand Up @@ -10,6 +10,6 @@ Determines the path to download browsers to.

```typescript
interface BrowserFetcherOptions {
path?: string;
path: string;
}
```
15 changes: 15 additions & 0 deletions docs/api/puppeteer.browserfetcheroptions.usemacosarmbinary.md
@@ -0,0 +1,15 @@
---
sidebar_label: BrowserFetcherOptions.useMacOSARMBinary
---

# BrowserFetcherOptions.useMacOSARMBinary property

Enables the use of the Chromium binary for macOS ARM.

**Signature:**

```typescript
interface BrowserFetcherOptions {
useMacOSARMBinary?: boolean;
}
```
13 changes: 13 additions & 0 deletions docs/api/puppeteer.configuration.browserrevision.md
@@ -0,0 +1,13 @@
---
sidebar_label: Configuration.browserRevision
---

# Configuration.browserRevision property

**Signature:**

```typescript
interface Configuration {
browserRevision?: string;
}
```
13 changes: 13 additions & 0 deletions docs/api/puppeteer.configuration.cachedirectory.md
@@ -0,0 +1,13 @@
---
sidebar_label: Configuration.cacheDirectory
---

# Configuration.cacheDirectory property

**Signature:**

```typescript
interface Configuration {
cacheDirectory?: string;
}
```
13 changes: 13 additions & 0 deletions docs/api/puppeteer.configuration.downloadhost.md
@@ -0,0 +1,13 @@
---
sidebar_label: Configuration.downloadHost
---

# Configuration.downloadHost property

**Signature:**

```typescript
interface Configuration {
downloadHost?: string;
}
```
13 changes: 13 additions & 0 deletions docs/api/puppeteer.configuration.downloadpath.md
@@ -0,0 +1,13 @@
---
sidebar_label: Configuration.downloadPath
---

# Configuration.downloadPath property

**Signature:**

```typescript
interface Configuration {
downloadPath?: string;
}
```
13 changes: 13 additions & 0 deletions docs/api/puppeteer.configuration.executablepath.md
@@ -0,0 +1,13 @@
---
sidebar_label: Configuration.executablePath
---

# Configuration.executablePath property

**Signature:**

```typescript
interface Configuration {
executablePath?: string;
}
```
15 changes: 15 additions & 0 deletions docs/api/puppeteer.configuration.experiments.md
@@ -0,0 +1,15 @@
---
sidebar_label: Configuration.experiments
---

# Configuration.experiments property

**Signature:**

```typescript
interface Configuration {
experiments?: {
macArmChromiumEnabled?: boolean;
};
}
```

0 comments on commit 06b308e

Please sign in to comment.