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

@ -17,10 +17,10 @@
import type { Protocol } from 'devtools-protocol';
import type { ProtocolMapping } from 'devtools-protocol/types/protocol-mapping.js';
import type { LoggerFn } from '../utils/log.js';
import type { ITransport } from '../utils/transport.js';
import { CdpClient, type ICdpClient } from './CdpClient.js';
export interface ICdpConnection {
getCdpClient(sessionId: Protocol.Target.SessionID): ICdpClient;
import type { Transport } from '../utils/transport.js';
import { MapperCdpClient, type CdpClient } from './CdpClient.js';
export interface CdpConnection {
getCdpClient(sessionId: Protocol.Target.SessionID): CdpClient;
}
/**
* Represents a high-level CDP connection to the browser backend.
@ -28,18 +28,18 @@ export interface ICdpConnection {
* Manages all CdpClients (each backed by a Session ID) instance for each active
* CDP session.
*/
export declare class CdpConnection implements ICdpConnection {
export declare class MapperCdpConnection implements CdpConnection {
#private;
static readonly LOGGER_PREFIX_RECV: "cdp:RECV ◂";
static readonly LOGGER_PREFIX_SEND: "cdp:SEND ▸";
constructor(transport: ITransport, logger?: LoggerFn);
constructor(transport: Transport, logger?: LoggerFn);
/** Closes the connection to the browser. */
close(): void;
createBrowserSession(): Promise<ICdpClient>;
createBrowserSession(): Promise<MapperCdpClient>;
/**
* Gets a CdpClient instance attached to the given session ID,
* or null if the session is not attached.
*/
getCdpClient(sessionId: Protocol.Target.SessionID): CdpClient;
getCdpClient(sessionId: Protocol.Target.SessionID): MapperCdpClient;
sendCommand<CdpMethod extends keyof ProtocolMapping.Commands>(method: CdpMethod, params?: ProtocolMapping.Commands[CdpMethod]['paramsType'][0], sessionId?: Protocol.Target.SessionID): Promise<object>;
}