Files
hyperframes/packages/cli/src/capture/browserLaunchArgs.ts
T
Miguel Ángel 8be76fc86c fix(cli): pin website capture connections to public peers (#5668)
* fix(cli): pin website capture connections to public peers

* style(cli): keep capture policy explanations within comment limits

* test(cli): separate case-sensitive dotenv assertions

* fix(cli): honor capture deadlines and bootstrap isolation

* chore: trim redundant capture dotenv comments

* fix(capture): join signal cleanup and guard leading options

* docs(capture): trim redundant cleanup comment
2026-10-16 02:37:14 +00:00

20 lines
684 B
TypeScript

export function captureBrowserArgs(
disableWebgl: boolean,
viewportWidth: number,
viewportHeight: number,
platform: NodeJS.Platform = process.platform,
): string[] {
const needsLinuxSandboxException = platform === "linux";
return [
...(needsLinuxSandboxException ? ["--no-sandbox"] : []),
"--disable-dev-shm-usage",
...(disableWebgl
? ["--disable-gpu"]
: ["--enable-webgl", "--ignore-gpu-blocklist", "--use-gl=angle", "--use-angle=swiftshader"]),
"--disable-blink-features=AutomationControlled",
"--disable-background-timer-throttling",
"--disable-renderer-backgrounding",
`--window-size=${viewportWidth},${viewportHeight}`,
];
}