Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/playwright-browser-tunnel > LaunchOptionsValidator

LaunchOptionsValidator class

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Validates Playwright launch options against security allowlists. Provides utilities for managing client-side allowlist configuration.

Signature:

export declare class LaunchOptionsValidator 

Methods

Method

Modifiers

Description

addToAllowlistAsync(option)

static

(BETA) Adds an option to the allowlist.

clearAllowlistAsync()

static

(BETA) Clears the entire allowlist.

getAllowlistDescription()

static

(BETA) Gets a human-readable description of the allowlist security model.

getAllowlistFilePath()

static

(BETA) Gets the path to the allowlist file in the user's local preferences folder. This follows the pattern of playwright-browser-installed.txt but stores in user's home directory.

readAllowlistAsync()

static

(BETA) Reads the allowlist from the user's local file system. Returns an empty allowlist if the file doesn't exist or is invalid.

removeFromAllowlistAsync(option)

static

(BETA) Removes an option from the allowlist.

validateLaunchOptionsAsync(launchOptions, terminal)

static

(BETA) Validates launch options against the security allowlist. All launch options are denied by default unless explicitly allowed by the user.

writeAllowlistAsync(allowlist)

static

(BETA) Writes the allowlist to the user's local file system.