Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export type ChromiumExtensionRunnerParams = {|
...ExtensionRunnerParams,
// Chromium desktop CLI params.
...ChromiumSpecificRunnerParams,
|};
const log = createLogger(__filename);
const asyncMkdirp = promisify(mkdirp);
const EXCLUDED_CHROME_FLAGS = [
'--disable-extensions',
'--mute-audio',
];
export const DEFAULT_CHROME_FLAGS = ChromeLauncher.defaultFlags()
.filter((flag) => !EXCLUDED_CHROME_FLAGS.includes(flag));
/**
* Implements an IExtensionRunner which manages a Chromium instance.
*/
export class ChromiumExtensionRunner {
cleanupCallbacks: Set;
params: ChromiumExtensionRunnerParams;
chromiumInstance: LaunchedChrome;
chromiumLaunch: typeof defaultChromiumLaunch;
reloadManagerExtension: string;
wss: WebSocket.Server;
exiting: boolean;
_promiseSetupDone: ?Promise;
constructor(params: ChromiumExtensionRunnerParams) {