@crouton-kit/capture 1.4.11 → 1.4.13
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 +25 -1
- package/bin/capture +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ Both still do things capture does not. Playwright MCP is cross-browser — the s
|
|
|
46
46
|
|
|
47
47
|
## See it
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Eleven short clips. Every overlay is real: the text is extracted from the command's actual stdout, the boxes are drawn at the coordinates the command printed, and the inset images are files a command actually wrote.
|
|
50
50
|
|
|
51
51
|
Each player below contains the full clip. Use its controls to play, pause, scrub, or fullscreen.
|
|
52
52
|
|
|
@@ -118,6 +118,30 @@ No storage-state dance and no separate automation profile. Attach over `--port`,
|
|
|
118
118
|
|
|
119
119
|
`capture session start --target <tab-id> --port 9860` · [full clip, 30s](demo/8-live-session.mp4)
|
|
120
120
|
|
|
121
|
+
### 9. The cards paint first. Then one image moves them 400 pixels.
|
|
122
|
+
|
|
123
|
+
<video src="https://github.com/user-attachments/assets/3257f961-a9b4-4e20-b23e-4da86622ae31" controls muted playsinline></video>
|
|
124
|
+
|
|
125
|
+
Record the load once, then ask it different questions. `perf vitals` reads the largest paint off the trace — nearly all of it one image's load, named by element and URL — and lists the shifts that image caused. `perf insights` returns the element each shift moved, with the rectangle it was in before and after: `old_rect [28,99,1224,174]` → `new_rect [28,499,1224,174]`. Then `measure explain` measures that same element on the settled page and prints `x=28 y=499.75 w=1224 h=172.64`. The trace engine and the DOM agree on where the KPI row ended up.
|
|
126
|
+
|
|
127
|
+
`capture perf insights <trace> --name CLSCulprits --full` · [full clip, 24s](demo/9-perf-vitals.mp4)
|
|
128
|
+
|
|
129
|
+
### 10. The panels are closed. The browser is still holding all five.
|
|
130
|
+
|
|
131
|
+
<video src="https://github.com/user-attachments/assets/20cccb4d-9715-4dfc-a5ec-60772b2e26e9" controls muted playsinline></video>
|
|
132
|
+
|
|
133
|
+
A console opens and closes five session panels. The deck ends empty and the page reports zero open — but two heap snapshots disagree. `heap diff` lists ten detached nodes still reachable and names each one by the constructor that built it: `<div class="panel" id="session-1">`. `heap census` puts 1,049,008 retained bytes behind one of them, and `heap retainers` walks the edge keeping it alive — a `ClosedSession` object holding the panel on its `element` property.
|
|
134
|
+
|
|
135
|
+
`capture heap retainers <snap> --node <node-id>` · [full clip, 24s](demo/10-heap-detached.mp4)
|
|
136
|
+
|
|
137
|
+
### 11. The API never answered. The dashboard didn't change by one pixel.
|
|
138
|
+
|
|
139
|
+
<video src="https://github.com/user-attachments/assets/bb29c58d-c9bb-4640-8756-d649925499d3" controls muted playsinline></video>
|
|
140
|
+
|
|
141
|
+
The agent reads `$518.40` off a revenue dashboard, installs one rule document that fails the metrics API, and reloads. The skeletons shimmer, the cards fill, and the page shows `$518.40` again. `measure diff --pixels` reports **0 changed pixels across 1280×800**, while the HAR for that one URL carries both loads side by side: `200 · 56 bytes`, then `response incomplete: failed`. Mocking the route is the setup. The measurement is what shows the failure left nothing on screen to see.
|
|
142
|
+
|
|
143
|
+
`capture tab mock start --rules <rules.json>` · [full clip, 26s](demo/11-mock-silent-failure.mp4)
|
|
144
|
+
|
|
121
145
|
## Quick start
|
|
122
146
|
|
|
123
147
|
Needs Node and a Chrome. `capture tab launch` starts a headless browser that capture owns and reaps — it looks for `$CAPTURE_BROWSER`, then a `~/.cache/puppeteer` Chrome, then a system Chrome. If a CDP-enabled browser is already running, capture can attach to that instead.
|
package/bin/capture
CHANGED
|
@@ -10512,7 +10512,7 @@ function validateHarAppendBatch(value, source) {
|
|
|
10512
10512
|
return { entries, incompleteLifecycles };
|
|
10513
10513
|
}
|
|
10514
10514
|
function captureVersion() {
|
|
10515
|
-
const version = "1.4.
|
|
10515
|
+
const version = "1.4.13";
|
|
10516
10516
|
return typeof version === "string" && version.length > 0 ? version : "development";
|
|
10517
10517
|
}
|
|
10518
10518
|
function token() {
|
|
@@ -12614,7 +12614,7 @@ function wallTime(value) {
|
|
|
12614
12614
|
}
|
|
12615
12615
|
}
|
|
12616
12616
|
function captureVersion2() {
|
|
12617
|
-
const version = "1.4.
|
|
12617
|
+
const version = "1.4.13";
|
|
12618
12618
|
return typeof version === "string" && version.length > 0 ? version : "development";
|
|
12619
12619
|
}
|
|
12620
12620
|
function deepFreeze(value) {
|
|
@@ -267296,7 +267296,7 @@ I/O contract: flags and positionals on input; one rendered prose block on stdout
|
|
|
267296
267296
|
A CDP-enabled browser must be running; \`capture tab list\` is the probe, and \`capture tab launch\` starts one capture owns and reaps when nothing is (never hand-roll a detached browser \u2014 nothing reaps that). Capture never signals a browser it did not start, so attaching to your own with --port is unchanged. CDP_PORT / CDP_TARGET pin the browser + tab for target-selecting commands \u2014 precedence: explicit flag > active session > env. \`session start\` adopts only an explicit --target.`;
|
|
267297
267297
|
}
|
|
267298
267298
|
function printVersion() {
|
|
267299
|
-
const declared = "1.4.
|
|
267299
|
+
const declared = "1.4.13";
|
|
267300
267300
|
if (declared) {
|
|
267301
267301
|
console.log(declared);
|
|
267302
267302
|
return;
|
package/package.json
CHANGED