File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 66import logger from 'debug' ;
77import type { Browser } from 'puppeteer' ;
88import puppeteer , { Locator } from 'puppeteer' ;
9- import type { Frame , HTTPRequest , HTTPResponse } from 'puppeteer-core' ;
9+ import type {
10+ Frame ,
11+ HTTPRequest ,
12+ HTTPResponse ,
13+ LaunchOptions ,
14+ } from 'puppeteer-core' ;
1015
1116import { McpContext } from '../src/McpContext.js' ;
1217import { McpResponse } from '../src/McpResponse.js' ;
@@ -18,11 +23,12 @@ export async function withBrowser(
1823 cb : ( response : McpResponse , context : McpContext ) => Promise < void > ,
1924 options : { debug ?: boolean ; autoOpenDevTools ?: boolean } = { } ,
2025) {
21- const launchOptions = {
26+ const launchOptions : LaunchOptions = {
2227 executablePath : process . env . PUPPETEER_EXECUTABLE_PATH ,
2328 headless : ! options . debug ,
2429 defaultViewport : null ,
2530 devtools : options . autoOpenDevTools ?? false ,
31+ pipe : true ,
2632 handleDevToolsAsPage : true ,
2733 } ;
2834 const key = JSON . stringify ( launchOptions ) ;
You can’t perform that action at this time.
0 commit comments