@vforsh/argus-core 0.1.2 → 0.1.3
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/dist/.tsbuildinfo +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/logs/previewStringify.d.ts +11 -0
- package/dist/logs/previewStringify.d.ts.map +1 -0
- package/dist/logs/previewStringify.js +158 -0
- package/dist/logs/previewStringify.js.map +1 -0
- package/dist/protocol/http/code.d.ts +59 -0
- package/dist/protocol/http/code.d.ts.map +1 -0
- package/dist/protocol/http/code.js +2 -0
- package/dist/protocol/http/code.js.map +1 -0
- package/dist/protocol/http/dom.d.ts +392 -0
- package/dist/protocol/http/dom.d.ts.map +1 -0
- package/dist/protocol/http/dom.js +2 -0
- package/dist/protocol/http/dom.js.map +1 -0
- package/dist/protocol/http/emulation.d.ts +92 -0
- package/dist/protocol/http/emulation.d.ts.map +1 -0
- package/dist/protocol/http/emulation.js +2 -0
- package/dist/protocol/http/emulation.js.map +1 -0
- package/dist/protocol/http/errors.d.ts +9 -0
- package/dist/protocol/http/errors.d.ts.map +1 -0
- package/dist/protocol/http/errors.js +2 -0
- package/dist/protocol/http/errors.js.map +1 -0
- package/dist/protocol/http/eval.d.ts +23 -0
- package/dist/protocol/http/eval.d.ts.map +1 -0
- package/dist/protocol/http/eval.js +2 -0
- package/dist/protocol/http/eval.js.map +1 -0
- package/dist/protocol/http/logs.d.ts +15 -0
- package/dist/protocol/http/logs.d.ts.map +1 -0
- package/dist/protocol/http/logs.js +2 -0
- package/dist/protocol/http/logs.js.map +1 -0
- package/dist/protocol/http/net.d.ts +27 -0
- package/dist/protocol/http/net.d.ts.map +1 -0
- package/dist/protocol/http/net.js +2 -0
- package/dist/protocol/http/net.js.map +1 -0
- package/dist/protocol/http/screenshot.d.ts +13 -0
- package/dist/protocol/http/screenshot.d.ts.map +1 -0
- package/dist/protocol/http/screenshot.js +2 -0
- package/dist/protocol/http/screenshot.js.map +1 -0
- package/dist/protocol/http/snapshot.d.ts +40 -0
- package/dist/protocol/http/snapshot.d.ts.map +1 -0
- package/dist/protocol/http/snapshot.js +2 -0
- package/dist/protocol/http/snapshot.js.map +1 -0
- package/dist/protocol/http/status.d.ts +38 -0
- package/dist/protocol/http/status.d.ts.map +1 -0
- package/dist/protocol/http/status.js +2 -0
- package/dist/protocol/http/status.js.map +1 -0
- package/dist/protocol/http/storage.d.ts +46 -0
- package/dist/protocol/http/storage.d.ts.map +1 -0
- package/dist/protocol/http/storage.js +2 -0
- package/dist/protocol/http/storage.js.map +1 -0
- package/dist/protocol/http/throttle.d.ts +48 -0
- package/dist/protocol/http/throttle.d.ts.map +1 -0
- package/dist/protocol/http/throttle.js +2 -0
- package/dist/protocol/http/throttle.js.map +1 -0
- package/dist/protocol/http/trace.d.ts +27 -0
- package/dist/protocol/http/trace.d.ts.map +1 -0
- package/dist/protocol/http/trace.js +2 -0
- package/dist/protocol/http/trace.js.map +1 -0
- package/dist/protocol/http.d.ts +13 -41
- package/dist/protocol/http.d.ts.map +1 -1
- package/dist/protocol/version.d.ts +5 -0
- package/dist/protocol/version.d.ts.map +1 -0
- package/dist/protocol/version.js +3 -0
- package/dist/protocol/version.js.map +1 -0
- package/dist/registry/lock.d.ts +7 -0
- package/dist/registry/lock.d.ts.map +1 -0
- package/dist/registry/lock.js +87 -0
- package/dist/registry/lock.js.map +1 -0
- package/dist/registry/registry.d.ts +6 -0
- package/dist/registry/registry.d.ts.map +1 -1
- package/dist/registry/registry.js +16 -0
- package/dist/registry/registry.js.map +1 -1
- package/dist/registry/types.d.ts +26 -2
- package/dist/registry/types.d.ts.map +1 -1
- package/dist/textPattern.d.ts +23 -0
- package/dist/textPattern.d.ts.map +1 -0
- package/dist/textPattern.js +48 -0
- package/dist/textPattern.js.map +1 -0
- package/package.json +7 -1
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A node in the DOM element tree.
|
|
3
|
+
* Only contains element nodes (nodeType === 1); text/comment nodes are filtered out.
|
|
4
|
+
*/
|
|
5
|
+
export type DomNode = {
|
|
6
|
+
/** CDP node ID. */
|
|
7
|
+
nodeId: number;
|
|
8
|
+
/** Lowercased tag name (e.g. "div", "span"). */
|
|
9
|
+
tag: string;
|
|
10
|
+
/** Attribute key-value pairs. */
|
|
11
|
+
attributes: Record<string, string>;
|
|
12
|
+
/** Child element nodes. Omitted or empty if no children or truncated. */
|
|
13
|
+
children?: DomNode[];
|
|
14
|
+
/** True if children were omitted due to depth/maxNodes limits. */
|
|
15
|
+
truncated?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Detailed info about a single DOM element.
|
|
19
|
+
*/
|
|
20
|
+
export type DomElementInfo = {
|
|
21
|
+
/** CDP node ID. */
|
|
22
|
+
nodeId: number;
|
|
23
|
+
/** Lowercased tag name. */
|
|
24
|
+
tag: string;
|
|
25
|
+
/** Attribute key-value pairs. */
|
|
26
|
+
attributes: Record<string, string>;
|
|
27
|
+
/** Number of direct child element nodes. */
|
|
28
|
+
childElementCount: number;
|
|
29
|
+
/** Element's outerHTML (may be truncated or null on error). */
|
|
30
|
+
outerHTML: string | null;
|
|
31
|
+
/** True if outerHTML was truncated due to size limits. */
|
|
32
|
+
outerHTMLTruncated: boolean;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Request payload for POST /dom/tree.
|
|
36
|
+
*/
|
|
37
|
+
export type DomTreeRequest = {
|
|
38
|
+
/** CSS selector to match element(s). */
|
|
39
|
+
selector: string;
|
|
40
|
+
/** Max depth to traverse (0 = root only). Default: 2. */
|
|
41
|
+
depth?: number;
|
|
42
|
+
/** Max total nodes to return. Default: 5000. */
|
|
43
|
+
maxNodes?: number;
|
|
44
|
+
/** Allow multiple matches. If false and >1 match, error. Default: false. */
|
|
45
|
+
all?: boolean;
|
|
46
|
+
/** Filter elements by trimmed textContent. Plain string = exact match. /regex/flags = regex test. */
|
|
47
|
+
text?: string;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Response payload for POST /dom/tree.
|
|
51
|
+
*/
|
|
52
|
+
export type DomTreeResponse = {
|
|
53
|
+
ok: true;
|
|
54
|
+
/** Number of elements matched by selector. */
|
|
55
|
+
matches: number;
|
|
56
|
+
/** Subtree roots (one per match). Empty if no matches. */
|
|
57
|
+
roots: DomNode[];
|
|
58
|
+
/** True if output was truncated due to maxNodes or depth. */
|
|
59
|
+
truncated: boolean;
|
|
60
|
+
/** Reason for truncation if truncated is true. */
|
|
61
|
+
truncatedReason?: 'max_nodes' | 'depth';
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Request payload for POST /dom/info.
|
|
65
|
+
*/
|
|
66
|
+
export type DomInfoRequest = {
|
|
67
|
+
/** CSS selector to match element(s). */
|
|
68
|
+
selector: string;
|
|
69
|
+
/** Allow multiple matches. If false and >1 match, error. Default: false. */
|
|
70
|
+
all?: boolean;
|
|
71
|
+
/** Max characters for outerHTML. Default: 50000. */
|
|
72
|
+
outerHtmlMaxChars?: number;
|
|
73
|
+
/** Filter elements by trimmed textContent. Plain string = exact match. /regex/flags = regex test. */
|
|
74
|
+
text?: string;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Response payload for POST /dom/info.
|
|
78
|
+
*/
|
|
79
|
+
export type DomInfoResponse = {
|
|
80
|
+
ok: true;
|
|
81
|
+
/** Number of elements matched by selector. */
|
|
82
|
+
matches: number;
|
|
83
|
+
/** Element info (one per match). Empty if no matches. */
|
|
84
|
+
elements: DomElementInfo[];
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Request payload for POST /dom/hover.
|
|
88
|
+
*/
|
|
89
|
+
export type DomHoverRequest = {
|
|
90
|
+
/** CSS selector to match element(s). */
|
|
91
|
+
selector: string;
|
|
92
|
+
/** Allow multiple matches. If false and >1 match, error. Default: false. */
|
|
93
|
+
all?: boolean;
|
|
94
|
+
/** Filter elements by trimmed textContent. Plain string = exact match. /regex/flags = regex test. */
|
|
95
|
+
text?: string;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Response payload for POST /dom/hover.
|
|
99
|
+
*/
|
|
100
|
+
export type DomHoverResponse = {
|
|
101
|
+
ok: true;
|
|
102
|
+
/** Number of elements matched by selector. */
|
|
103
|
+
matches: number;
|
|
104
|
+
/** Number of elements hovered. */
|
|
105
|
+
hovered: number;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Request payload for POST /dom/click.
|
|
109
|
+
*/
|
|
110
|
+
/** Mouse button for click commands. Default: 'left'. */
|
|
111
|
+
export type MouseButton = 'left' | 'middle' | 'right';
|
|
112
|
+
export type DomClickRequest = {
|
|
113
|
+
/** CSS selector to match element(s). */
|
|
114
|
+
selector?: string;
|
|
115
|
+
/** Allow multiple matches. If false and >1 match, error. Default: false. */
|
|
116
|
+
all?: boolean;
|
|
117
|
+
/** Viewport x-coordinate, or x-offset from element top-left when selector is set. */
|
|
118
|
+
x?: number;
|
|
119
|
+
/** Viewport y-coordinate, or y-offset from element top-left when selector is set. */
|
|
120
|
+
y?: number;
|
|
121
|
+
/** Mouse button to click. Default: 'left'. */
|
|
122
|
+
button?: MouseButton;
|
|
123
|
+
/** Filter elements by trimmed textContent. Plain string = exact match. /regex/flags = regex test. */
|
|
124
|
+
text?: string;
|
|
125
|
+
/** Wait up to this many ms for selector to appear before executing. */
|
|
126
|
+
wait?: number;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Response payload for POST /dom/click.
|
|
130
|
+
*/
|
|
131
|
+
export type DomClickResponse = {
|
|
132
|
+
ok: true;
|
|
133
|
+
/** Number of elements matched by selector. */
|
|
134
|
+
matches: number;
|
|
135
|
+
/** Number of elements clicked. */
|
|
136
|
+
clicked: number;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Request payload for POST /dom/keydown.
|
|
140
|
+
*/
|
|
141
|
+
export type DomKeydownRequest = {
|
|
142
|
+
/** Key name (e.g. "Enter", "a", "ArrowUp"). */
|
|
143
|
+
key: string;
|
|
144
|
+
/** Optional CSS selector — focus element before dispatching. */
|
|
145
|
+
selector?: string;
|
|
146
|
+
/** Comma-separated modifier names: "shift,ctrl,alt,meta". */
|
|
147
|
+
modifiers?: string;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Response payload for POST /dom/keydown.
|
|
151
|
+
*/
|
|
152
|
+
export type DomKeydownResponse = {
|
|
153
|
+
ok: true;
|
|
154
|
+
/** The key that was dispatched. */
|
|
155
|
+
key: string;
|
|
156
|
+
/** Resolved modifier bitmask (Alt=1, Ctrl=2, Meta=4, Shift=8). */
|
|
157
|
+
modifiers: number;
|
|
158
|
+
/** Whether a selector was focused before dispatch. */
|
|
159
|
+
focused: boolean;
|
|
160
|
+
};
|
|
161
|
+
/** Valid positions for insertAdjacentHTML. */
|
|
162
|
+
export type DomInsertPosition = 'beforebegin' | 'afterbegin' | 'beforeend' | 'afterend';
|
|
163
|
+
/**
|
|
164
|
+
* Request payload for POST /dom/add.
|
|
165
|
+
*/
|
|
166
|
+
export type DomAddRequest = {
|
|
167
|
+
/** CSS selector to match target element(s). */
|
|
168
|
+
selector: string;
|
|
169
|
+
/** HTML string to insert. */
|
|
170
|
+
html: string;
|
|
171
|
+
/** Insert position relative to matched element. Default: 'beforeend'. */
|
|
172
|
+
position?: DomInsertPosition;
|
|
173
|
+
/** Allow multiple matches. If false and >1 match, error. Default: false. */
|
|
174
|
+
all?: boolean;
|
|
175
|
+
/** Zero-based index of the match to insert at (mutually exclusive with all). */
|
|
176
|
+
nth?: number;
|
|
177
|
+
/** Expected match count; request fails if mismatch (prevents accidental inserts). */
|
|
178
|
+
expect?: number;
|
|
179
|
+
/** Insert text content instead of HTML (uses insertAdjacentText). */
|
|
180
|
+
text?: boolean;
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* Response payload for POST /dom/add.
|
|
184
|
+
*/
|
|
185
|
+
export type DomAddResponse = {
|
|
186
|
+
ok: true;
|
|
187
|
+
/** Number of elements matched by selector. */
|
|
188
|
+
matches: number;
|
|
189
|
+
/** Number of elements where HTML was inserted. */
|
|
190
|
+
inserted: number;
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* Request payload for POST /dom/remove.
|
|
194
|
+
*/
|
|
195
|
+
export type DomRemoveRequest = {
|
|
196
|
+
/** CSS selector to match element(s) to remove. */
|
|
197
|
+
selector: string;
|
|
198
|
+
/** Allow multiple matches. If false and >1 match, error. Default: false. */
|
|
199
|
+
all?: boolean;
|
|
200
|
+
/** Filter elements by trimmed textContent. Plain string = exact match. /regex/flags = regex test. */
|
|
201
|
+
text?: string;
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* Response payload for POST /dom/remove.
|
|
205
|
+
*/
|
|
206
|
+
export type DomRemoveResponse = {
|
|
207
|
+
ok: true;
|
|
208
|
+
/** Number of elements matched by selector. */
|
|
209
|
+
matches: number;
|
|
210
|
+
/** Number of elements removed. */
|
|
211
|
+
removed: number;
|
|
212
|
+
};
|
|
213
|
+
/**
|
|
214
|
+
* Request payload for POST /dom/modify.
|
|
215
|
+
* Discriminated union based on 'type' field.
|
|
216
|
+
*/
|
|
217
|
+
export type DomModifyRequest = {
|
|
218
|
+
/** CSS selector to match element(s). */
|
|
219
|
+
selector: string;
|
|
220
|
+
/** Allow multiple matches. If false and >1 match, error. Default: false. */
|
|
221
|
+
all?: boolean;
|
|
222
|
+
/** Filter elements by trimmed textContent. Plain string = exact match. /regex/flags = regex test. */
|
|
223
|
+
text?: string;
|
|
224
|
+
} & ({
|
|
225
|
+
type: 'attr';
|
|
226
|
+
set?: Record<string, string | true>;
|
|
227
|
+
remove?: string[];
|
|
228
|
+
} | {
|
|
229
|
+
type: 'class';
|
|
230
|
+
add?: string[];
|
|
231
|
+
remove?: string[];
|
|
232
|
+
toggle?: string[];
|
|
233
|
+
} | {
|
|
234
|
+
type: 'style';
|
|
235
|
+
set?: Record<string, string>;
|
|
236
|
+
remove?: string[];
|
|
237
|
+
} | {
|
|
238
|
+
type: 'text';
|
|
239
|
+
value: string;
|
|
240
|
+
} | {
|
|
241
|
+
type: 'html';
|
|
242
|
+
value: string;
|
|
243
|
+
});
|
|
244
|
+
/**
|
|
245
|
+
* Response payload for POST /dom/modify.
|
|
246
|
+
*/
|
|
247
|
+
export type DomModifyResponse = {
|
|
248
|
+
ok: true;
|
|
249
|
+
/** Number of elements matched by selector. */
|
|
250
|
+
matches: number;
|
|
251
|
+
/** Number of elements modified. */
|
|
252
|
+
modified: number;
|
|
253
|
+
};
|
|
254
|
+
/**
|
|
255
|
+
* Request payload for POST /dom/set-file.
|
|
256
|
+
*/
|
|
257
|
+
export type DomSetFileRequest = {
|
|
258
|
+
/** CSS selector to match file input element(s). */
|
|
259
|
+
selector: string;
|
|
260
|
+
/** Absolute file paths to set on the input. */
|
|
261
|
+
files: string[];
|
|
262
|
+
/** Allow multiple matches. If false and >1 match, error. Default: false. */
|
|
263
|
+
all?: boolean;
|
|
264
|
+
/** Filter elements by trimmed textContent. Plain string = exact match. /regex/flags = regex test. */
|
|
265
|
+
text?: string;
|
|
266
|
+
/** Wait up to this many ms for selector to appear before executing. */
|
|
267
|
+
wait?: number;
|
|
268
|
+
};
|
|
269
|
+
/**
|
|
270
|
+
* Response payload for POST /dom/set-file.
|
|
271
|
+
*/
|
|
272
|
+
export type DomSetFileResponse = {
|
|
273
|
+
ok: true;
|
|
274
|
+
/** Number of elements matched by selector. */
|
|
275
|
+
matches: number;
|
|
276
|
+
/** Number of file inputs updated. */
|
|
277
|
+
updated: number;
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* Request payload for POST /dom/scroll-to.
|
|
281
|
+
* At least one of selector, to, or by must be provided.
|
|
282
|
+
*/
|
|
283
|
+
export type DomScrollToRequest = {
|
|
284
|
+
/** CSS selector to match element(s). */
|
|
285
|
+
selector?: string;
|
|
286
|
+
/** Allow multiple matches. If false and >1 match, error. Default: false. */
|
|
287
|
+
all?: boolean;
|
|
288
|
+
/** Filter elements by trimmed textContent. Plain string = exact match. /regex/flags = regex test. */
|
|
289
|
+
text?: string;
|
|
290
|
+
/** Scroll to absolute position { x, y }. Applies to viewport or matched element. */
|
|
291
|
+
to?: {
|
|
292
|
+
x: number;
|
|
293
|
+
y: number;
|
|
294
|
+
};
|
|
295
|
+
/** Scroll by delta { x, y }. Applies to viewport or matched element. */
|
|
296
|
+
by?: {
|
|
297
|
+
x: number;
|
|
298
|
+
y: number;
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
/**
|
|
302
|
+
* Response payload for POST /dom/scroll-to.
|
|
303
|
+
*/
|
|
304
|
+
export type DomScrollToResponse = {
|
|
305
|
+
ok: true;
|
|
306
|
+
/** Number of elements matched by selector (only when selector is used). */
|
|
307
|
+
matches?: number;
|
|
308
|
+
/** Number of elements scrolled (only when selector is used). */
|
|
309
|
+
scrolled?: number;
|
|
310
|
+
/** Final horizontal scroll position. */
|
|
311
|
+
scrollX: number;
|
|
312
|
+
/** Final vertical scroll position. */
|
|
313
|
+
scrollY: number;
|
|
314
|
+
};
|
|
315
|
+
/**
|
|
316
|
+
* Request payload for POST /dom/scroll.
|
|
317
|
+
* Emulates touch scroll gestures via CDP Input.emulateTouchScrollGesture.
|
|
318
|
+
*/
|
|
319
|
+
export type DomScrollRequest = {
|
|
320
|
+
/** CSS selector to match element(s) — scroll origin is element center. */
|
|
321
|
+
selector?: string;
|
|
322
|
+
/** Allow multiple matches. If false and >1 match, error. Default: false. */
|
|
323
|
+
all?: boolean;
|
|
324
|
+
/** Filter elements by trimmed textContent. Plain string = exact match. /regex/flags = regex test. */
|
|
325
|
+
text?: string;
|
|
326
|
+
/** Viewport x-coordinate to scroll at (alternative to selector). */
|
|
327
|
+
x?: number;
|
|
328
|
+
/** Viewport y-coordinate to scroll at (alternative to selector). */
|
|
329
|
+
y?: number;
|
|
330
|
+
/** Scroll delta. Required. Positive y = scroll down. */
|
|
331
|
+
delta: {
|
|
332
|
+
x: number;
|
|
333
|
+
y: number;
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
/**
|
|
337
|
+
* Response payload for POST /dom/scroll.
|
|
338
|
+
*/
|
|
339
|
+
export type DomScrollResponse = {
|
|
340
|
+
ok: true;
|
|
341
|
+
/** Number of elements matched by selector (only when selector is used). */
|
|
342
|
+
matches?: number;
|
|
343
|
+
/** Number of elements scrolled (only when selector is used). */
|
|
344
|
+
scrolled?: number;
|
|
345
|
+
};
|
|
346
|
+
/**
|
|
347
|
+
* Request payload for POST /dom/fill.
|
|
348
|
+
*/
|
|
349
|
+
export type DomFillRequest = {
|
|
350
|
+
/** CSS selector to match input/textarea/contenteditable element(s). */
|
|
351
|
+
selector: string;
|
|
352
|
+
/** Value to fill into the element. */
|
|
353
|
+
value: string;
|
|
354
|
+
/** Allow multiple matches. If false and >1 match, error. Default: false. */
|
|
355
|
+
all?: boolean;
|
|
356
|
+
/** Filter elements by trimmed textContent. Plain string = exact match. /regex/flags = regex test. */
|
|
357
|
+
text?: string;
|
|
358
|
+
/** Wait up to this many ms for selector to appear before executing. */
|
|
359
|
+
wait?: number;
|
|
360
|
+
};
|
|
361
|
+
/**
|
|
362
|
+
* Response payload for POST /dom/fill.
|
|
363
|
+
*/
|
|
364
|
+
export type DomFillResponse = {
|
|
365
|
+
ok: true;
|
|
366
|
+
/** Number of elements matched by selector. */
|
|
367
|
+
matches: number;
|
|
368
|
+
/** Number of elements filled. */
|
|
369
|
+
filled: number;
|
|
370
|
+
};
|
|
371
|
+
/**
|
|
372
|
+
* Request payload for POST /dom/focus.
|
|
373
|
+
*/
|
|
374
|
+
export type DomFocusRequest = {
|
|
375
|
+
/** CSS selector to match element(s). */
|
|
376
|
+
selector: string;
|
|
377
|
+
/** Allow multiple matches. If false and >1 match, error. Default: false. */
|
|
378
|
+
all?: boolean;
|
|
379
|
+
/** Filter elements by trimmed textContent. Plain string = exact match. /regex/flags = regex test. */
|
|
380
|
+
text?: string;
|
|
381
|
+
};
|
|
382
|
+
/**
|
|
383
|
+
* Response payload for POST /dom/focus.
|
|
384
|
+
*/
|
|
385
|
+
export type DomFocusResponse = {
|
|
386
|
+
ok: true;
|
|
387
|
+
/** Number of elements matched by selector. */
|
|
388
|
+
matches: number;
|
|
389
|
+
/** Number of elements focused. */
|
|
390
|
+
focused: number;
|
|
391
|
+
};
|
|
392
|
+
//# sourceMappingURL=dom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../src/protocol/http/dom.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,OAAO,GAAG;IACrB,mBAAmB;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,gDAAgD;IAChD,GAAG,EAAE,MAAM,CAAA;IACX,iCAAiC;IACjC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,yEAAyE;IACzE,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;IACpB,kEAAkE;IAClE,SAAS,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC5B,mBAAmB;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,2BAA2B;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX,iCAAiC;IACjC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,4CAA4C;IAC5C,iBAAiB,EAAE,MAAM,CAAA;IACzB,+DAA+D;IAC/D,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,0DAA0D;IAC1D,kBAAkB,EAAE,OAAO,CAAA;CAC3B,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC5B,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAA;IAChB,yDAAyD;IACzD,KAAK,C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;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC5B,uEAAuE;IACvE,QAAQ,EAAE,MAAM,CAAA;IAChB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAA;IACb,4EAA4E;IAC5E,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,qGAAqG;IACrG,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,uEAAuE;IACvE,IAAI,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B,EAAE,EAAE,IAAI,CAAA;IACR,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAA;IACf,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAA;CACd,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B,wCAAwC;IACxC,QAAQ,EAAE,MAAM,CAAA;IAChB,4EAA4E;IAC5E,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,qGAAqG;IACrG,IAAI,CAAC,EAAE,MAAM,CAAA;CACb,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC9B,EAAE,EAAE,IAAI,CAAA;IACR,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAA;IACf,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAA;CACf,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom.js","sourceRoot":"","sources":["../../../src/protocol/http/dom.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/** Viewport emulation parameters for device metrics override. */
|
|
2
|
+
export type EmulationViewport = {
|
|
3
|
+
/** Viewport width in CSS pixels. Must be a positive integer. */
|
|
4
|
+
width: number;
|
|
5
|
+
/** Viewport height in CSS pixels. Must be a positive integer. */
|
|
6
|
+
height: number;
|
|
7
|
+
/** Device scale factor (DPR). Must be a finite number greater than 0. */
|
|
8
|
+
deviceScaleFactor: number;
|
|
9
|
+
/** Whether to emulate a mobile device. */
|
|
10
|
+
mobile: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Desired emulation state sent to the watcher.
|
|
14
|
+
*
|
|
15
|
+
* Each field is independently optional:
|
|
16
|
+
* - `null` means "reset this aspect to default".
|
|
17
|
+
* - `undefined` / missing means "leave unchanged" (only meaningful for partial updates; on first set, missing = default).
|
|
18
|
+
*/
|
|
19
|
+
export type EmulationState = {
|
|
20
|
+
/** Viewport dimensions, DPR, and mobile flag. Null clears device metrics override. */
|
|
21
|
+
viewport?: EmulationViewport | null;
|
|
22
|
+
/** Touch emulation toggle. Null disables touch emulation. */
|
|
23
|
+
touch?: {
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
} | null;
|
|
26
|
+
/**
|
|
27
|
+
* User-agent override.
|
|
28
|
+
* - `{ value: "<string>" }` sets the override.
|
|
29
|
+
* - `{ value: null }` restores the baseline (pre-emulation) user-agent.
|
|
30
|
+
* - `null` / missing leaves unchanged on partial update; on clear restores baseline.
|
|
31
|
+
*/
|
|
32
|
+
userAgent?: {
|
|
33
|
+
value: string | null;
|
|
34
|
+
} | null;
|
|
35
|
+
};
|
|
36
|
+
/** POST /emulation request payload (action-based, like /storage/local). */
|
|
37
|
+
export type EmulationRequest = {
|
|
38
|
+
action: 'set';
|
|
39
|
+
state: EmulationState;
|
|
40
|
+
} | {
|
|
41
|
+
action: 'clear';
|
|
42
|
+
};
|
|
43
|
+
/** POST /emulation response for the `set` action. */
|
|
44
|
+
export type EmulationSetResponse = {
|
|
45
|
+
ok: true;
|
|
46
|
+
/** Whether the watcher is currently attached to a CDP target. */
|
|
47
|
+
attached: boolean;
|
|
48
|
+
/** Whether the emulation state was applied to the current CDP session. False if queued (detached) or apply failed. */
|
|
49
|
+
applied: boolean;
|
|
50
|
+
/** The desired emulation state after the operation. */
|
|
51
|
+
state: EmulationState | null;
|
|
52
|
+
/** Optional error details when `applied` is false due to a CDP failure. */
|
|
53
|
+
error?: {
|
|
54
|
+
message: string;
|
|
55
|
+
code?: string;
|
|
56
|
+
} | null;
|
|
57
|
+
};
|
|
58
|
+
/** POST /emulation response for the `clear` action. */
|
|
59
|
+
export type EmulationClearResponse = {
|
|
60
|
+
ok: true;
|
|
61
|
+
/** Whether the watcher is currently attached to a CDP target. */
|
|
62
|
+
attached: boolean;
|
|
63
|
+
/** Whether the clear was applied (metrics + touch + UA restored). */
|
|
64
|
+
applied: boolean;
|
|
65
|
+
/** Always null after clear. */
|
|
66
|
+
state: null;
|
|
67
|
+
/** Optional error details when `applied` is false due to a CDP failure. */
|
|
68
|
+
error?: {
|
|
69
|
+
message: string;
|
|
70
|
+
code?: string;
|
|
71
|
+
} | null;
|
|
72
|
+
};
|
|
73
|
+
/** GET /emulation response. */
|
|
74
|
+
export type EmulationStatusResponse = {
|
|
75
|
+
ok: true;
|
|
76
|
+
/** Whether the watcher is currently attached to a CDP target. */
|
|
77
|
+
attached: boolean;
|
|
78
|
+
/** Whether the desired state is currently applied to the attached target. */
|
|
79
|
+
applied: boolean;
|
|
80
|
+
/** Current desired emulation state. Null when no emulation is active. */
|
|
81
|
+
state: EmulationState | null;
|
|
82
|
+
/** Best-effort baseline values captured on attach. `userAgent` is null when detached or not yet resolved. */
|
|
83
|
+
baseline: {
|
|
84
|
+
userAgent: string | null;
|
|
85
|
+
};
|
|
86
|
+
/** Last error from a failed apply attempt, if any. */
|
|
87
|
+
lastError?: {
|
|
88
|
+
message: string;
|
|
89
|
+
code?: string;
|
|
90
|
+
} | null;
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=emulation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emulation.d.ts","sourceRoot":"","sources":["../../../src/protocol/http/emulation.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,MAAM,iBAAiB,GAAG;IAC/B,gEAAgE;IAChE,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A;IACX,2EAA2E;IAC3E,KAAK,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACjD,CAAA;AAED,+BAA+B;AAC/B,MAAM,MAAM,uBAAuB,GAAG;IACrC,EAAE,EAAE,IAAI,CAAA;IACR,iEAAiE;IACjE,QAAQ,EAAE,OAAO,CAAA;IACjB,6EAA6E;IAC7E,OAAO,EAAE,OAAO,CAAA;IAChB,yEAAyE;IACzE,KAAK,EAAE,cAAc,GAAG,IAAI,CAAA;IAC5B,6GAA6G;IAC7G,QAAQ,EAAE;QAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAA;IACtC,sDAAsD;IACtD,SAAS,CAAC,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACrD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emulation.js","sourceRoot":"","sources":["../../../src/protocol/http/emulation.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/protocol/http/errors.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,MAAM,MAAM,aAAa,GAAG;IAC3B,EAAE,EAAE,KAAK,CAAA;IACT,KAAK,EAAE;QACN,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,CAAC,EAAE,MAAM,CAAA;KACb,CAAA;CACD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/protocol/http/errors.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Request payload for POST /eval. */
|
|
2
|
+
export type EvalRequest = {
|
|
3
|
+
expression: string;
|
|
4
|
+
awaitPromise?: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Enable Chrome's REPL evaluation mode.
|
|
7
|
+
* This allows native top-level `await` and console-like repeated declarations.
|
|
8
|
+
*/
|
|
9
|
+
replMode?: boolean;
|
|
10
|
+
timeoutMs?: number;
|
|
11
|
+
returnByValue?: boolean;
|
|
12
|
+
};
|
|
13
|
+
/** Response payload for POST /eval. */
|
|
14
|
+
export type EvalResponse = {
|
|
15
|
+
ok: true;
|
|
16
|
+
result: unknown;
|
|
17
|
+
type: string | null;
|
|
18
|
+
exception: {
|
|
19
|
+
text: string;
|
|
20
|
+
details?: unknown;
|
|
21
|
+
} | null;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=eval.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eval.d.ts","sourceRoot":"","sources":["../../../src/protocol/http/eval.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,MAAM,MAAM,WAAW,GAAG;IACzB,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA;AAED,uCAAuC;AACvC,MAAM,MAAM,YAAY,GAAG;IAC1B,EAAE,EAAE,IAAI,CAAA;IACR,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,SAAS,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAA;CACrD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eval.js","sourceRoot":"","sources":["../../../src/protocol/http/eval.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { LogEvent } from '../logs.js';
|
|
2
|
+
/** Response payload for GET /logs. */
|
|
3
|
+
export type LogsResponse = {
|
|
4
|
+
ok: true;
|
|
5
|
+
events: LogEvent[];
|
|
6
|
+
nextAfter: number;
|
|
7
|
+
};
|
|
8
|
+
/** Response payload for GET /tail. */
|
|
9
|
+
export type TailResponse = {
|
|
10
|
+
ok: true;
|
|
11
|
+
events: LogEvent[];
|
|
12
|
+
nextAfter: number;
|
|
13
|
+
timedOut: boolean;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=logs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../../src/protocol/http/logs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAE1C,sCAAsC;AACtC,MAAM,MAAM,YAAY,GAAG;IAC1B,EAAE,EAAE,IAAI,CAAA;IACR,MAAM,EAAE,QAAQ,EAAE,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,sCAAsC;AACtC,MAAM,MAAM,YAAY,GAAG;IAC1B,EAAE,EAAE,IAAI,CAAA;IACR,MAAM,EAAE,QAAQ,EAAE,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,OAAO,CAAA;CACjB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../../../src/protocol/http/logs.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** Network request summary captured from CDP. */
|
|
2
|
+
export type NetworkRequestSummary = {
|
|
3
|
+
id: number;
|
|
4
|
+
ts: number;
|
|
5
|
+
requestId: string;
|
|
6
|
+
url: string;
|
|
7
|
+
method: string;
|
|
8
|
+
resourceType: string | null;
|
|
9
|
+
status: number | null;
|
|
10
|
+
encodedDataLength: number | null;
|
|
11
|
+
errorText: string | null;
|
|
12
|
+
durationMs: number | null;
|
|
13
|
+
};
|
|
14
|
+
/** Response payload for GET /net. */
|
|
15
|
+
export type NetResponse = {
|
|
16
|
+
ok: true;
|
|
17
|
+
requests: NetworkRequestSummary[];
|
|
18
|
+
nextAfter: number;
|
|
19
|
+
};
|
|
20
|
+
/** Response payload for GET /net/tail. */
|
|
21
|
+
export type NetTailResponse = {
|
|
22
|
+
ok: true;
|
|
23
|
+
requests: NetworkRequestSummary[];
|
|
24
|
+
nextAfter: number;
|
|
25
|
+
timedOut: boolean;
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=net.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"net.d.ts","sourceRoot":"","sources":["../../../src/protocol/http/net.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,MAAM,MAAM,qBAAqB,GAAG;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAEzB,CAAA;AAED,qCAAqC;AACrC,MAAM,MAAM,WAAW,GAAG;IACzB,EAAE,EAAE,IAAI,CAAA;IACR,QAAQ,EAAE,qBAAqB,EAAE,CAAA;IACjC,SAAS,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,0CAA0C;AAC1C,MAAM,MAAM,eAAe,GAAG;IAC7B,EAAE,EAAE,IAAI,CAAA;IACR,QAAQ,EAAE,qBAAqB,EAAE,CAAA;IACjC,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,OAAO,CAAA;CACjB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"net.js","sourceRoot":"","sources":["../../../src/protocol/http/net.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Request payload for POST /screenshot. */
|
|
2
|
+
export type ScreenshotRequest = {
|
|
3
|
+
outFile?: string;
|
|
4
|
+
selector?: string;
|
|
5
|
+
format?: 'png';
|
|
6
|
+
};
|
|
7
|
+
/** Response payload for POST /screenshot. */
|
|
8
|
+
export type ScreenshotResponse = {
|
|
9
|
+
ok: true;
|
|
10
|
+
outFile: string;
|
|
11
|
+
clipped: boolean;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=screenshot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenshot.d.ts","sourceRoot":"","sources":["../../../src/protocol/http/screenshot.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,MAAM,MAAM,iBAAiB,GAAG;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,KAAK,CAAA;CACd,CAAA;AAED,6CAA6C;AAC7C,MAAM,MAAM,kBAAkB,GAAG;IAChC,EAAE,EAAE,IAAI,CAAA;IACR,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,OAAO,CAAA;CAChB,CAAA"}
|