jev-cdp 0.1.7 → 0.1.9
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/README.md +2 -2
- package/dist/cli.js +13 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,8 +27,8 @@ This is an early experimental port. See [NOTICE.md](NOTICE.md) for source attrib
|
|
|
27
27
|
Run the published CLI without adding it to a project. Bun must be installed for either command:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
bunx jev-cdp@0.1.
|
|
31
|
-
npx -y jev-cdp@0.1.
|
|
30
|
+
bunx jev-cdp@0.1.8 help run
|
|
31
|
+
npx -y jev-cdp@0.1.8 help run
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
Chrome with a CDP endpoint and `TYPESAFE_API_KEY` are required for browser runs. FFmpeg with H.264 encoding (`libx264`) is required for `--recording`. Jev selects `-fps_mode vfr` when FFmpeg supports it and falls back to `-vsync vfr` for older builds. Run `jev-cdp doctor` to check the installed encoder with a short MP4 encode and decode.
|
package/dist/cli.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// package.json
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "jev-cdp",
|
|
6
|
-
version: "0.1.
|
|
6
|
+
version: "0.1.9",
|
|
7
7
|
description: "A small Jev-powered bridge to Chrome through the Chrome DevTools Protocol.",
|
|
8
8
|
type: "module",
|
|
9
9
|
license: "MIT",
|
|
@@ -1364,11 +1364,20 @@ ${child.text}`.slice(0, 6000);
|
|
|
1364
1364
|
return stableStringify(current) === stableStringify([page.page_key, page.guards[String(action.node)]]);
|
|
1365
1365
|
}
|
|
1366
1366
|
let marker = await this.evaluate(MARKER);
|
|
1367
|
-
|
|
1367
|
+
const frames = await this.frameStates();
|
|
1368
|
+
for (const frame of frames.filter((item) => item.parentId !== null)) {
|
|
1369
|
+
try {
|
|
1370
|
+
await this.frameScreenOffset(frame.id, frames);
|
|
1371
|
+
} catch (error) {
|
|
1372
|
+
if (error instanceof Error && error.message === "CDP -32000: Could not compute box model.")
|
|
1373
|
+
continue;
|
|
1374
|
+
return false;
|
|
1375
|
+
}
|
|
1368
1376
|
try {
|
|
1369
1377
|
const childMarker = await this.evaluateFrame(frame.id, MARKER);
|
|
1370
|
-
if (childMarker
|
|
1371
|
-
|
|
1378
|
+
if (childMarker === undefined)
|
|
1379
|
+
return false;
|
|
1380
|
+
marker = [marker ?? null, frame.id, childMarker];
|
|
1372
1381
|
} catch {
|
|
1373
1382
|
return false;
|
|
1374
1383
|
}
|