/// /// /// import * as childProcess from 'child_process'; import * as fs from 'fs'; import type { ChildProcess } from 'child_process'; type JSONLike = { [property: string]: JSONLike; } | readonly JSONLike[] | string | number | boolean | null; export interface Options { startingUrl?: string; edgeFlags?: Array; prefs?: Record; port?: number; portStrictMode?: boolean; handleSIGINT?: boolean; edgePath?: string; userDataDir?: string | boolean; logLevel?: 'verbose' | 'info' | 'error' | 'warn' | 'silent'; ignoreDefaultFlags?: boolean; connectionPollInterval?: number; maxConnectionRetries?: number; envVars?: { [key: string]: string | undefined; }; } export interface RemoteDebuggingPipes { incoming: NodeJS.ReadableStream; outgoing: NodeJS.WritableStream; } export interface LaunchedEdge { pid: number; port: number; process: ChildProcess; remoteDebuggingPipes: RemoteDebuggingPipes | null; kill: () => void; } export interface ModuleOverrides { fs?: typeof fs; spawn?: typeof childProcess.spawn; } declare function launch(opts?: Options): Promise; /** Returns Edge installation path that chromium-edge-launcher will launch by default. */ declare function getEdgePath(): string; declare function killAll(): Array; declare class Launcher { private opts; private tmpDirandPidFileReady; private pidFile; private startingUrl; private outFile?; private errFile?; private edgePath?; private ignoreDefaultFlags?; private edgeFlags; private prefs; private requestedPort?; private portStrictMode?; private useRemoteDebuggingPipe; private connectionPollInterval; private maxConnectionRetries; private fs; private spawn; private useDefaultProfile; private envVars; edgeProcess?: childProcess.ChildProcess; userDataDir?: string; port?: number; remoteDebuggingPipes: RemoteDebuggingPipes | null; pid?: number; constructor(opts?: Options, moduleOverrides?: ModuleOverrides); private get flags(); static defaultFlags(): string[]; /** Returns the highest priority edge installation. */ static getFirstInstallation(): string | undefined; /** Returns all available edge installations in decreasing priority order. */ static getInstallations(): string[]; makeTmpDir(): string; prepare(): void; private setBrowserPrefs; launch(): Promise; private spawnProcess; private cleanup; private isDebuggerReady; waitUntilReady(): Promise; kill(): void; destroyTmp(): void; } export default Launcher; export { Launcher, launch, killAll, getEdgePath };