A big commit with a bunch of node modules so I could run puppeteer for Walmart. Added some todos and Headway's templates.

This commit is contained in:
Norm Rasmussen
2024-02-28 17:13:10 -05:00
parent dbcdfc8472
commit 1184fe0cd1
1107 changed files with 76526 additions and 8934 deletions

View File

@ -83,6 +83,7 @@ class BrowserInstance {
const browserProcess = (0, browsers_1.launch)({
executablePath,
args: chromeArguments,
env: process.env,
});
const cdpEndpoint = await browserProcess.waitForLineOutput(browsers_1.CDP_WEBSOCKET_ENDPOINT_REGEX);
// There is a conflict between prettier and eslint here.
@ -91,7 +92,7 @@ class BrowserInstance {
// 2. Get `BiDi-CDP` mapper JS binaries.
const mapperTabSource = await (0, reader_js_1.getMapperTabSource)();
// 3. Run `BiDi-CDP` mapper in launched browser using `MapperRunner`.
const mapperCdpConnection = await MapperCdpConnection_js_1.MapperCdpConnection.create(cdpConnection, mapperTabSource, verbose, mapperOptions);
const mapperCdpConnection = await MapperCdpConnection_js_1.MapperServerCdpConnection.create(cdpConnection, mapperTabSource, verbose, mapperOptions);
return new BrowserInstance(mapperCdpConnection, browserProcess);
}
constructor(mapperCdpConnection, browserProcess) {
@ -115,7 +116,7 @@ class BrowserInstance {
ws.on('open', () => {
debugInternal('Session established.');
const transport = new WebsocketTransport_js_1.WebSocketTransport(ws);
const connection = new CdpConnection_js_1.CdpConnection(transport);
const connection = new CdpConnection_js_1.MapperCdpConnection(transport);
resolve(connection);
});
});