browser-pilot 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +539 -0
- package/dist/actions.cjs +277 -0
- package/dist/actions.d.cts +33 -0
- package/dist/actions.d.ts +33 -0
- package/dist/actions.mjs +8 -0
- package/dist/browser.cjs +2765 -0
- package/dist/browser.d.cts +71 -0
- package/dist/browser.d.ts +71 -0
- package/dist/browser.mjs +19 -0
- package/dist/cdp.cjs +279 -0
- package/dist/cdp.d.cts +230 -0
- package/dist/cdp.d.ts +230 -0
- package/dist/cdp.mjs +10 -0
- package/dist/chunk-BCOZUKWS.mjs +251 -0
- package/dist/chunk-FI55U7JS.mjs +2108 -0
- package/dist/chunk-R3PS4PCM.mjs +207 -0
- package/dist/chunk-YEHK2XY3.mjs +250 -0
- package/dist/chunk-ZIQA4JOT.mjs +226 -0
- package/dist/cli.cjs +3587 -0
- package/dist/cli.d.cts +23 -0
- package/dist/cli.d.ts +23 -0
- package/dist/cli.mjs +827 -0
- package/dist/client-7Nqka5MV.d.cts +53 -0
- package/dist/client-7Nqka5MV.d.ts +53 -0
- package/dist/index.cjs +3074 -0
- package/dist/index.d.cts +157 -0
- package/dist/index.d.ts +157 -0
- package/dist/index.mjs +64 -0
- package/dist/providers.cjs +238 -0
- package/dist/providers.d.cts +86 -0
- package/dist/providers.d.ts +86 -0
- package/dist/providers.mjs +16 -0
- package/dist/types-Cs89wle0.d.cts +925 -0
- package/dist/types-DL_-3BZk.d.ts +925 -0
- package/dist/types-D_uDqh0Z.d.cts +56 -0
- package/dist/types-D_uDqh0Z.d.ts +56 -0
- package/package.json +91 -0
package/dist/cdp.d.ts
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
export { C as CDPClient, a as CDPClientOptions, T as Transport, d as TransportOptions, c as createCDPClient, b as createTransport } from './client-7Nqka5MV.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* CDP Protocol type definitions
|
|
5
|
+
* Minimal subset of Chrome DevTools Protocol types needed for browser automation
|
|
6
|
+
*/
|
|
7
|
+
interface CDPRequest {
|
|
8
|
+
id: number;
|
|
9
|
+
method: string;
|
|
10
|
+
params?: Record<string, unknown>;
|
|
11
|
+
sessionId?: string;
|
|
12
|
+
}
|
|
13
|
+
interface CDPResponse {
|
|
14
|
+
id: number;
|
|
15
|
+
result?: unknown;
|
|
16
|
+
error?: CDPErrorData;
|
|
17
|
+
sessionId?: string;
|
|
18
|
+
}
|
|
19
|
+
interface CDPEvent {
|
|
20
|
+
method: string;
|
|
21
|
+
params?: Record<string, unknown>;
|
|
22
|
+
sessionId?: string;
|
|
23
|
+
}
|
|
24
|
+
interface CDPErrorData {
|
|
25
|
+
code: number;
|
|
26
|
+
message: string;
|
|
27
|
+
data?: string;
|
|
28
|
+
}
|
|
29
|
+
type CDPMessage = CDPResponse | CDPEvent;
|
|
30
|
+
declare class CDPError extends Error {
|
|
31
|
+
code: number;
|
|
32
|
+
data?: string;
|
|
33
|
+
constructor(error: CDPErrorData);
|
|
34
|
+
}
|
|
35
|
+
interface TargetInfo {
|
|
36
|
+
targetId: string;
|
|
37
|
+
type: string;
|
|
38
|
+
title: string;
|
|
39
|
+
url: string;
|
|
40
|
+
attached: boolean;
|
|
41
|
+
canAccessOpener: boolean;
|
|
42
|
+
browserContextId?: string;
|
|
43
|
+
}
|
|
44
|
+
interface DOMNode {
|
|
45
|
+
nodeId: number;
|
|
46
|
+
backendNodeId: number;
|
|
47
|
+
nodeType: number;
|
|
48
|
+
nodeName: string;
|
|
49
|
+
localName: string;
|
|
50
|
+
nodeValue: string;
|
|
51
|
+
childNodeCount?: number;
|
|
52
|
+
children?: DOMNode[];
|
|
53
|
+
attributes?: string[];
|
|
54
|
+
documentURL?: string;
|
|
55
|
+
baseURL?: string;
|
|
56
|
+
publicId?: string;
|
|
57
|
+
systemId?: string;
|
|
58
|
+
internalSubset?: string;
|
|
59
|
+
xmlVersion?: string;
|
|
60
|
+
name?: string;
|
|
61
|
+
value?: string;
|
|
62
|
+
pseudoType?: string;
|
|
63
|
+
shadowRootType?: string;
|
|
64
|
+
frameId?: string;
|
|
65
|
+
contentDocument?: DOMNode;
|
|
66
|
+
shadowRoots?: DOMNode[];
|
|
67
|
+
templateContent?: DOMNode;
|
|
68
|
+
pseudoElements?: DOMNode[];
|
|
69
|
+
importedDocument?: DOMNode;
|
|
70
|
+
distributedNodes?: BackendNode[];
|
|
71
|
+
isSVG?: boolean;
|
|
72
|
+
}
|
|
73
|
+
interface BackendNode {
|
|
74
|
+
nodeType: number;
|
|
75
|
+
nodeName: string;
|
|
76
|
+
backendNodeId: number;
|
|
77
|
+
}
|
|
78
|
+
interface AXNode {
|
|
79
|
+
nodeId: string;
|
|
80
|
+
ignored: boolean;
|
|
81
|
+
ignoredReasons?: AXProperty[];
|
|
82
|
+
role?: AXValue;
|
|
83
|
+
chromeRole?: AXValue;
|
|
84
|
+
name?: AXValue;
|
|
85
|
+
description?: AXValue;
|
|
86
|
+
value?: AXValue;
|
|
87
|
+
properties?: AXProperty[];
|
|
88
|
+
parentId?: string;
|
|
89
|
+
childIds?: string[];
|
|
90
|
+
backendDOMNodeId?: number;
|
|
91
|
+
frameId?: string;
|
|
92
|
+
}
|
|
93
|
+
interface AXValue {
|
|
94
|
+
type: string;
|
|
95
|
+
value?: unknown;
|
|
96
|
+
relatedNodes?: AXRelatedNode[];
|
|
97
|
+
sources?: AXValueSource[];
|
|
98
|
+
}
|
|
99
|
+
interface AXRelatedNode {
|
|
100
|
+
backendDOMNodeId: number;
|
|
101
|
+
idref?: string;
|
|
102
|
+
text?: string;
|
|
103
|
+
}
|
|
104
|
+
interface AXValueSource {
|
|
105
|
+
type: string;
|
|
106
|
+
value?: AXValue;
|
|
107
|
+
attribute?: string;
|
|
108
|
+
attributeValue?: AXValue;
|
|
109
|
+
superseded?: boolean;
|
|
110
|
+
nativeSource?: string;
|
|
111
|
+
nativeSourceValue?: AXValue;
|
|
112
|
+
invalid?: boolean;
|
|
113
|
+
invalidReason?: string;
|
|
114
|
+
}
|
|
115
|
+
interface AXProperty {
|
|
116
|
+
name: string;
|
|
117
|
+
value: AXValue;
|
|
118
|
+
}
|
|
119
|
+
interface RemoteObject {
|
|
120
|
+
type: string;
|
|
121
|
+
subtype?: string;
|
|
122
|
+
className?: string;
|
|
123
|
+
value?: unknown;
|
|
124
|
+
unserializableValue?: string;
|
|
125
|
+
description?: string;
|
|
126
|
+
objectId?: string;
|
|
127
|
+
preview?: ObjectPreview;
|
|
128
|
+
customPreview?: CustomPreview;
|
|
129
|
+
}
|
|
130
|
+
interface ObjectPreview {
|
|
131
|
+
type: string;
|
|
132
|
+
subtype?: string;
|
|
133
|
+
description?: string;
|
|
134
|
+
overflow: boolean;
|
|
135
|
+
properties: PropertyPreview[];
|
|
136
|
+
entries?: EntryPreview[];
|
|
137
|
+
}
|
|
138
|
+
interface PropertyPreview {
|
|
139
|
+
name: string;
|
|
140
|
+
type: string;
|
|
141
|
+
value?: string;
|
|
142
|
+
valuePreview?: ObjectPreview;
|
|
143
|
+
subtype?: string;
|
|
144
|
+
}
|
|
145
|
+
interface EntryPreview {
|
|
146
|
+
key?: ObjectPreview;
|
|
147
|
+
value: ObjectPreview;
|
|
148
|
+
}
|
|
149
|
+
interface CustomPreview {
|
|
150
|
+
header: string;
|
|
151
|
+
bodyGetterId?: string;
|
|
152
|
+
}
|
|
153
|
+
interface ExceptionDetails {
|
|
154
|
+
exceptionId: number;
|
|
155
|
+
text: string;
|
|
156
|
+
lineNumber: number;
|
|
157
|
+
columnNumber: number;
|
|
158
|
+
scriptId?: string;
|
|
159
|
+
url?: string;
|
|
160
|
+
stackTrace?: StackTrace;
|
|
161
|
+
exception?: RemoteObject;
|
|
162
|
+
executionContextId?: number;
|
|
163
|
+
}
|
|
164
|
+
interface StackTrace {
|
|
165
|
+
description?: string;
|
|
166
|
+
callFrames: CallFrame[];
|
|
167
|
+
parent?: StackTrace;
|
|
168
|
+
parentId?: StackTraceId;
|
|
169
|
+
}
|
|
170
|
+
interface CallFrame {
|
|
171
|
+
functionName: string;
|
|
172
|
+
scriptId: string;
|
|
173
|
+
url: string;
|
|
174
|
+
lineNumber: number;
|
|
175
|
+
columnNumber: number;
|
|
176
|
+
}
|
|
177
|
+
interface StackTraceId {
|
|
178
|
+
id: string;
|
|
179
|
+
debuggerId?: string;
|
|
180
|
+
}
|
|
181
|
+
type MouseButton = 'none' | 'left' | 'middle' | 'right' | 'back' | 'forward';
|
|
182
|
+
type MouseEventType = 'mousePressed' | 'mouseReleased' | 'mouseMoved' | 'mouseWheel';
|
|
183
|
+
type KeyEventType = 'keyDown' | 'keyUp' | 'rawKeyDown' | 'char';
|
|
184
|
+
interface FrameTree {
|
|
185
|
+
frame: FrameInfo;
|
|
186
|
+
childFrames?: FrameTree[];
|
|
187
|
+
}
|
|
188
|
+
interface FrameInfo {
|
|
189
|
+
id: string;
|
|
190
|
+
parentId?: string;
|
|
191
|
+
loaderId: string;
|
|
192
|
+
name?: string;
|
|
193
|
+
url: string;
|
|
194
|
+
urlFragment?: string;
|
|
195
|
+
domainAndRegistry: string;
|
|
196
|
+
securityOrigin: string;
|
|
197
|
+
mimeType: string;
|
|
198
|
+
unreachableUrl?: string;
|
|
199
|
+
adFrameStatus?: AdFrameStatus;
|
|
200
|
+
secureContextType: string;
|
|
201
|
+
crossOriginIsolatedContextType: string;
|
|
202
|
+
gatedAPIFeatures: string[];
|
|
203
|
+
}
|
|
204
|
+
interface AdFrameStatus {
|
|
205
|
+
adFrameType: string;
|
|
206
|
+
explanations?: string[];
|
|
207
|
+
}
|
|
208
|
+
interface Viewport {
|
|
209
|
+
x: number;
|
|
210
|
+
y: number;
|
|
211
|
+
width: number;
|
|
212
|
+
height: number;
|
|
213
|
+
scale: number;
|
|
214
|
+
}
|
|
215
|
+
interface BoxModel {
|
|
216
|
+
content: number[];
|
|
217
|
+
padding: number[];
|
|
218
|
+
border: number[];
|
|
219
|
+
margin: number[];
|
|
220
|
+
width: number;
|
|
221
|
+
height: number;
|
|
222
|
+
shapeOutside?: ShapeOutsideInfo;
|
|
223
|
+
}
|
|
224
|
+
interface ShapeOutsideInfo {
|
|
225
|
+
bounds: number[];
|
|
226
|
+
shape: unknown[];
|
|
227
|
+
marginShape: unknown[];
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export { type AXNode, type AXProperty, type AXRelatedNode, type AXValue, type AXValueSource, type AdFrameStatus, type BackendNode, type BoxModel, CDPError, type CDPErrorData, type CDPEvent, type CDPMessage, type CDPRequest, type CDPResponse, type CallFrame, type CustomPreview, type DOMNode, type EntryPreview, type ExceptionDetails, type FrameInfo, type FrameTree, type KeyEventType, type MouseButton, type MouseEventType, type ObjectPreview, type PropertyPreview, type RemoteObject, type ShapeOutsideInfo, type StackTrace, type StackTraceId, type TargetInfo, type Viewport };
|
package/dist/cdp.mjs
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
// src/cdp/protocol.ts
|
|
2
|
+
var CDPError = class extends Error {
|
|
3
|
+
code;
|
|
4
|
+
data;
|
|
5
|
+
constructor(error) {
|
|
6
|
+
super(error.message);
|
|
7
|
+
this.name = "CDPError";
|
|
8
|
+
this.code = error.code;
|
|
9
|
+
this.data = error.data;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
// src/cdp/transport.ts
|
|
14
|
+
function createTransport(wsUrl, options = {}) {
|
|
15
|
+
const { timeout = 3e4 } = options;
|
|
16
|
+
return new Promise((resolve, reject) => {
|
|
17
|
+
const timeoutId = setTimeout(() => {
|
|
18
|
+
reject(new Error(`WebSocket connection timeout after ${timeout}ms`));
|
|
19
|
+
}, timeout);
|
|
20
|
+
const ws = new WebSocket(wsUrl);
|
|
21
|
+
const messageHandlers = [];
|
|
22
|
+
const closeHandlers = [];
|
|
23
|
+
const errorHandlers = [];
|
|
24
|
+
ws.addEventListener("open", () => {
|
|
25
|
+
clearTimeout(timeoutId);
|
|
26
|
+
const transport = {
|
|
27
|
+
send(message) {
|
|
28
|
+
if (ws.readyState === WebSocket.OPEN) {
|
|
29
|
+
ws.send(message);
|
|
30
|
+
} else {
|
|
31
|
+
throw new Error(
|
|
32
|
+
`Cannot send message, WebSocket is ${getReadyStateString(ws.readyState)}`
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
async close() {
|
|
37
|
+
return new Promise((resolveClose) => {
|
|
38
|
+
if (ws.readyState === WebSocket.CLOSED) {
|
|
39
|
+
resolveClose();
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const onClose = () => {
|
|
43
|
+
ws.removeEventListener("close", onClose);
|
|
44
|
+
resolveClose();
|
|
45
|
+
};
|
|
46
|
+
ws.addEventListener("close", onClose);
|
|
47
|
+
ws.close();
|
|
48
|
+
setTimeout(resolveClose, 5e3);
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
onMessage(handler) {
|
|
52
|
+
messageHandlers.push(handler);
|
|
53
|
+
},
|
|
54
|
+
onClose(handler) {
|
|
55
|
+
closeHandlers.push(handler);
|
|
56
|
+
},
|
|
57
|
+
onError(handler) {
|
|
58
|
+
errorHandlers.push(handler);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
resolve(transport);
|
|
62
|
+
});
|
|
63
|
+
ws.addEventListener("message", (event) => {
|
|
64
|
+
const data = typeof event.data === "string" ? event.data : String(event.data);
|
|
65
|
+
for (const handler of messageHandlers) {
|
|
66
|
+
handler(data);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
ws.addEventListener("close", () => {
|
|
70
|
+
for (const handler of closeHandlers) {
|
|
71
|
+
handler();
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
ws.addEventListener("error", (_event) => {
|
|
75
|
+
clearTimeout(timeoutId);
|
|
76
|
+
const error = new Error("WebSocket connection error");
|
|
77
|
+
for (const handler of errorHandlers) {
|
|
78
|
+
handler(error);
|
|
79
|
+
}
|
|
80
|
+
reject(error);
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function getReadyStateString(state) {
|
|
85
|
+
switch (state) {
|
|
86
|
+
case WebSocket.CONNECTING:
|
|
87
|
+
return "CONNECTING";
|
|
88
|
+
case WebSocket.OPEN:
|
|
89
|
+
return "OPEN";
|
|
90
|
+
case WebSocket.CLOSING:
|
|
91
|
+
return "CLOSING";
|
|
92
|
+
case WebSocket.CLOSED:
|
|
93
|
+
return "CLOSED";
|
|
94
|
+
default:
|
|
95
|
+
return "UNKNOWN";
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// src/cdp/client.ts
|
|
100
|
+
async function createCDPClient(wsUrl, options = {}) {
|
|
101
|
+
const { debug = false, timeout = 3e4 } = options;
|
|
102
|
+
const transport = await createTransport(wsUrl, { timeout });
|
|
103
|
+
let messageId = 0;
|
|
104
|
+
let currentSessionId;
|
|
105
|
+
let connected = true;
|
|
106
|
+
const pending = /* @__PURE__ */ new Map();
|
|
107
|
+
const eventHandlers = /* @__PURE__ */ new Map();
|
|
108
|
+
const anyEventHandlers = /* @__PURE__ */ new Set();
|
|
109
|
+
transport.onMessage((raw) => {
|
|
110
|
+
let msg;
|
|
111
|
+
try {
|
|
112
|
+
msg = JSON.parse(raw);
|
|
113
|
+
} catch {
|
|
114
|
+
if (debug) console.error("[CDP] Failed to parse message:", raw);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (debug) {
|
|
118
|
+
console.log("[CDP] <--", JSON.stringify(msg, null, 2).slice(0, 500));
|
|
119
|
+
}
|
|
120
|
+
if ("id" in msg && typeof msg.id === "number") {
|
|
121
|
+
const response = msg;
|
|
122
|
+
const request = pending.get(response.id);
|
|
123
|
+
if (request) {
|
|
124
|
+
pending.delete(response.id);
|
|
125
|
+
clearTimeout(request.timer);
|
|
126
|
+
if (response.error) {
|
|
127
|
+
request.reject(new CDPError(response.error));
|
|
128
|
+
} else {
|
|
129
|
+
request.resolve(response.result);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
if ("method" in msg) {
|
|
135
|
+
const event = msg;
|
|
136
|
+
const params = event.params ?? {};
|
|
137
|
+
for (const handler of anyEventHandlers) {
|
|
138
|
+
try {
|
|
139
|
+
handler(event.method, params);
|
|
140
|
+
} catch (e) {
|
|
141
|
+
if (debug) console.error("[CDP] Error in any-event handler:", e);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
const handlers = eventHandlers.get(event.method);
|
|
145
|
+
if (handlers) {
|
|
146
|
+
for (const handler of handlers) {
|
|
147
|
+
try {
|
|
148
|
+
handler(params);
|
|
149
|
+
} catch (e) {
|
|
150
|
+
if (debug) console.error(`[CDP] Error in handler for ${event.method}:`, e);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
transport.onClose(() => {
|
|
157
|
+
connected = false;
|
|
158
|
+
for (const [id, request] of pending) {
|
|
159
|
+
clearTimeout(request.timer);
|
|
160
|
+
request.reject(new Error("WebSocket connection closed"));
|
|
161
|
+
pending.delete(id);
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
transport.onError((error) => {
|
|
165
|
+
if (debug) console.error("[CDP] Transport error:", error);
|
|
166
|
+
});
|
|
167
|
+
const client = {
|
|
168
|
+
async send(method, params, sessionId) {
|
|
169
|
+
if (!connected) {
|
|
170
|
+
throw new Error("CDP client is not connected");
|
|
171
|
+
}
|
|
172
|
+
const id = ++messageId;
|
|
173
|
+
const effectiveSessionId = sessionId ?? currentSessionId;
|
|
174
|
+
const request = { id, method };
|
|
175
|
+
if (params !== void 0) {
|
|
176
|
+
request.params = params;
|
|
177
|
+
}
|
|
178
|
+
if (effectiveSessionId !== void 0) {
|
|
179
|
+
request.sessionId = effectiveSessionId;
|
|
180
|
+
}
|
|
181
|
+
const message = JSON.stringify(request);
|
|
182
|
+
if (debug) {
|
|
183
|
+
console.log("[CDP] -->", message.slice(0, 500));
|
|
184
|
+
}
|
|
185
|
+
return new Promise((resolve, reject) => {
|
|
186
|
+
const timer = setTimeout(() => {
|
|
187
|
+
pending.delete(id);
|
|
188
|
+
reject(new Error(`CDP command ${method} timed out after ${timeout}ms`));
|
|
189
|
+
}, timeout);
|
|
190
|
+
pending.set(id, {
|
|
191
|
+
resolve,
|
|
192
|
+
reject,
|
|
193
|
+
method,
|
|
194
|
+
timer
|
|
195
|
+
});
|
|
196
|
+
try {
|
|
197
|
+
transport.send(message);
|
|
198
|
+
} catch (e) {
|
|
199
|
+
pending.delete(id);
|
|
200
|
+
clearTimeout(timer);
|
|
201
|
+
reject(e);
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
},
|
|
205
|
+
on(event, handler) {
|
|
206
|
+
let handlers = eventHandlers.get(event);
|
|
207
|
+
if (!handlers) {
|
|
208
|
+
handlers = /* @__PURE__ */ new Set();
|
|
209
|
+
eventHandlers.set(event, handlers);
|
|
210
|
+
}
|
|
211
|
+
handlers.add(handler);
|
|
212
|
+
},
|
|
213
|
+
off(event, handler) {
|
|
214
|
+
const handlers = eventHandlers.get(event);
|
|
215
|
+
if (handlers) {
|
|
216
|
+
handlers.delete(handler);
|
|
217
|
+
if (handlers.size === 0) {
|
|
218
|
+
eventHandlers.delete(event);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
onAny(handler) {
|
|
223
|
+
anyEventHandlers.add(handler);
|
|
224
|
+
},
|
|
225
|
+
async close() {
|
|
226
|
+
connected = false;
|
|
227
|
+
await transport.close();
|
|
228
|
+
},
|
|
229
|
+
async attachToTarget(targetId) {
|
|
230
|
+
const result = await this.send("Target.attachToTarget", {
|
|
231
|
+
targetId,
|
|
232
|
+
flatten: true
|
|
233
|
+
});
|
|
234
|
+
currentSessionId = result.sessionId;
|
|
235
|
+
return result.sessionId;
|
|
236
|
+
},
|
|
237
|
+
get sessionId() {
|
|
238
|
+
return currentSessionId;
|
|
239
|
+
},
|
|
240
|
+
get isConnected() {
|
|
241
|
+
return connected;
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
return client;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export {
|
|
248
|
+
CDPError,
|
|
249
|
+
createTransport,
|
|
250
|
+
createCDPClient
|
|
251
|
+
};
|