Skip to content

Commit 86e61bc

Browse files
committed
Create a fresh chrome interceptor
1 parent c82ab09 commit 86e61bc

File tree

10 files changed

+633
-61
lines changed

10 files changed

+633
-61
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
declare module '@james-proxy/james-browser-launcher' {
2+
import { ChildProcess } from 'child_process';
3+
import * as stream from "stream";
4+
5+
namespace Launcher {
6+
export function detect(callback: (browsers: Browser[]) => void): void;
7+
8+
interface LaunchOptions {
9+
browser: string;
10+
11+
version?: string;
12+
proxy?: string;
13+
options?: string[];
14+
skipDefaults?: boolean;
15+
detached?: boolean;
16+
noProxy?: string | string[];
17+
headless?: boolean;
18+
}
19+
20+
function Launch(
21+
uri: string,
22+
options: string | LaunchOptions,
23+
callback: (error: Error | null, instance: Launcher.BrowserInstance
24+
) => void): void;
25+
26+
export type Launch = typeof Launch;
27+
28+
namespace Launch {
29+
export const browsers: Launcher.Browser[];
30+
}
31+
32+
export interface Browser {
33+
name: string;
34+
version: string;
35+
type: string;
36+
command: string;
37+
}
38+
39+
export interface BrowserInstance {
40+
command: string;
41+
args: string[];
42+
image: string;
43+
processName: string;
44+
pid: number;
45+
46+
process: ChildProcess;
47+
stderr: stream.Readable;
48+
stdout: stream.Readable;
49+
}
50+
}
51+
52+
function Launcher(configPath: string, callback: (error: Error | null, launch: typeof Launcher.Launch) => void): void;
53+
54+
export = Launcher;
55+
}

0 commit comments

Comments
 (0)