UNPKG

chrome-debugging-client

Version:

An async/await friendly Chrome debugging client with TypeScript support

42 lines 3 kB
import type { AttachMessageTransport, RootConnection } from "@tracerbench/protocol-connection"; import type { Chrome, ChromeSpawnOptions, Process, Stdio } from "@tracerbench/spawn-chrome"; import type { RaceCancellation } from "race-cancellation"; export declare function spawnChrome(options?: Partial<ChromeSpawnOptions>): ChromeWithPipeConnection; export declare function spawnWithPipe(executable: string, args: string[], options?: Partial<ChromeSpawnOptions>): ProcessWithPipeConnection; export declare function spawnWithWebSocket(executable: string, args: string[], stdio?: Stdio, raceCancellation?: RaceCancellation): Promise<ProcessWithWebSocketConnection>; export declare function newProtocolConnection(attach: AttachMessageTransport, raceCancellation?: RaceCancellation): RootConnection; export { default as openWebSocket } from "@tracerbench/websocket-message-transport"; export { default as findChrome } from "@tracerbench/find-chrome"; export interface ChromeWithPipeConnection extends Chrome { /** * Connection to devtools protocol https://chromedevtools.github.io/devtools-protocol/ */ connection: RootConnection; /** * Close browser. */ close(timeout?: number, raceCancellation?: RaceCancellation): Promise<void>; } export interface ProcessWithPipeConnection extends Process { /** * Connection to devtools protocol https://chromedevtools.github.io/devtools-protocol/ */ connection: RootConnection; /** * Close browser. */ close(timeout?: number, raceCancellation?: RaceCancellation): Promise<void>; } export interface ProcessWithWebSocketConnection extends Process { /** * Connection to devtools protocol https://chromedevtools.github.io/devtools-protocol/ */ connection: RootConnection; /** * Closes the web socket. */ close(): void; } export type { AttachJsonRpcTransport, AttachMessageTransport, AttachProtocolTransport, AttachSession, Cancellation, DebugCallback, DetachSession, ErrorResponse, Notification, OnClose, OnError, OnEvent, OnMessage, OnNotification, Protocol, ProtocolMapping, ProtocolError, ProtocolTransport, RaceCancellation, Request, Response, ResponseError, SendMessage, SendMethod, SendRequest, SuccessResponse, Task, ProtocolConnection, SessionConnection, RootConnection, ProtocolConnectionBase, EventListener, EventEmitter, EventPredicate, NewEventEmitter, TargetID, TargetInfo, SessionID, Method, Event, EventMapping, RequestMapping, ResponseMapping, VoidRequestMethod, MappedRequestMethod, MaybeMappedRequestMethod, VoidResponseMethod, MappedResponseMethod, VoidRequestVoidResponseMethod, VoidRequestMappedResponseMethod, VoidEvent, MappedEvent, SessionIdentifier, } from "@tracerbench/protocol-connection"; export type { Process, ProcessWithPipeMessageTransport, ProcessWithWebSocketUrl, SpawnOptions, Stdio, Transport, TransportMapping, ArgumentOptions, ChromeSpawnOptions, Chrome, } from "@tracerbench/spawn-chrome"; //# sourceMappingURL=index.d.ts.map