screencast-axi 0.1.2 → 0.1.4
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 +76 -66
- package/dist/src/commands/auth.js +2 -1
- package/dist/src/commands/auth.js.map +1 -1
- package/dist/src/commands/guide.js +2 -1
- package/dist/src/commands/guide.js.map +1 -1
- package/dist/src/commands/list.js +3 -0
- package/dist/src/commands/list.js.map +1 -1
- package/dist/src/commands/record.js +115 -11
- package/dist/src/commands/record.js.map +1 -1
- package/dist/src/commands/scaffold.js +16 -6
- package/dist/src/commands/scaffold.js.map +1 -1
- package/dist/src/commands/setup.js +19 -10
- package/dist/src/commands/setup.js.map +1 -1
- package/dist/src/config.js +22 -6
- package/dist/src/config.js.map +1 -1
- package/dist/src/encode.d.ts +14 -0
- package/dist/src/encode.js +5 -1
- package/dist/src/encode.js.map +1 -1
- package/dist/src/inventory.d.ts +15 -1
- package/dist/src/inventory.js +44 -4
- package/dist/src/inventory.js.map +1 -1
- package/dist/src/manifest.d.ts +13 -0
- package/dist/src/manifest.js.map +1 -1
- package/dist/src/measure.d.ts +67 -0
- package/dist/src/measure.js +69 -0
- package/dist/src/measure.js.map +1 -0
- package/dist/src/run.d.ts +11 -0
- package/dist/src/run.js +39 -8
- package/dist/src/run.js.map +1 -1
- package/dist/src/skill.d.ts +10 -0
- package/dist/src/skill.js +28 -14
- package/dist/src/skill.js.map +1 -1
- package/dist/src/types.d.ts +15 -0
- package/dist/src/types.js +24 -0
- package/dist/src/types.js.map +1 -1
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
- package/skills/screencast-axi/SKILL.md +19 -15
- package/dist/src/hooks.d.ts +0 -9
- package/dist/src/hooks.js +0 -20
- package/dist/src/hooks.js.map +0 -1
package/README.md
CHANGED
|
@@ -14,22 +14,39 @@ from [`demo/scenarios/demo.ts`](demo/scenarios/demo.ts). Re-record it with `pnpm
|
|
|
14
14
|
|
|
15
15
|
[](https://www.npmjs.com/package/screencast-axi)
|
|
16
16
|
|
|
17
|
-
> **Status: 0.x.** On npm and working end to end, but the API can still move between minor
|
|
18
|
-
> versions. See [Roadmap](#roadmap).
|
|
19
|
-
|
|
20
17
|
## Install
|
|
21
18
|
|
|
22
|
-
|
|
19
|
+
Two ways, and which one fits depends on how often you record.
|
|
20
|
+
|
|
21
|
+
**Recording regularly** - install it in the project, so the commands are short and your editor has
|
|
22
|
+
the types:
|
|
23
23
|
|
|
24
24
|
```sh
|
|
25
25
|
pnpm add -D screencast-axi playwright tsx
|
|
26
26
|
pnpm exec playwright install chromium
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
pnpm 11 refuses to run a dependency's install script until you allow it, and `tsx` brings
|
|
30
|
+
`esbuild`, which needs its script to place a binary. Run `pnpm approve-builds` and pick `esbuild`,
|
|
31
|
+
or put the same thing in `pnpm-workspace.yaml`:
|
|
32
|
+
|
|
33
|
+
```yaml
|
|
34
|
+
allowBuilds:
|
|
35
|
+
esbuild: true
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**A one-off, or a repo that should not carry the tool** - run it through `npx` and install nothing
|
|
39
|
+
in the project at all:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
npx -y -p screencast-axi -p playwright -p tsx screencast-axi record ./scenarios/product-tour.ts
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The one rule that makes the second form work: a scenario imports only **types** from the package.
|
|
46
|
+
`import type` is erased when the file is compiled, so nothing is resolved from your project at
|
|
47
|
+
runtime - which is what an npx cache cannot provide. `scaffold` writes files that way already. A
|
|
48
|
+
runtime import (`import { defineScenario } from "screencast-axi"`) resolves from _your_ project
|
|
49
|
+
and needs the first form.
|
|
33
50
|
|
|
34
51
|
`tsx` is what lets Node read a TypeScript scenario. Skip it only if you write scenarios as `.mjs`.
|
|
35
52
|
|
|
@@ -54,12 +71,16 @@ pnpm exec screencast-axi record ./scenarios/product-tour.ts
|
|
|
54
71
|
a minute - and the failure comes back with the URL it reached, a screenshot, and what each part of
|
|
55
72
|
the selector actually matched.
|
|
56
73
|
|
|
57
|
-
A
|
|
74
|
+
A clip recorded by path is a first-class clip: the manifest records which file it came from, so
|
|
75
|
+
`list`, `show`, `check` and a later `record <id>` all find it without a config listing it. Adding
|
|
76
|
+
a config later is what puts it in `record --all`.
|
|
77
|
+
|
|
78
|
+
A scenario is TypeScript, and a plain object:
|
|
58
79
|
|
|
59
80
|
```ts
|
|
60
|
-
import {
|
|
81
|
+
import type { Scenario } from "screencast-axi";
|
|
61
82
|
|
|
62
|
-
export default
|
|
83
|
+
export default {
|
|
63
84
|
id: "product-tour",
|
|
64
85
|
title: "A three-stop tour",
|
|
65
86
|
description: "The pages that matter, in order.",
|
|
@@ -72,12 +93,15 @@ export default defineScenario({
|
|
|
72
93
|
{ path: "/pricing", step: 2 },
|
|
73
94
|
]);
|
|
74
95
|
},
|
|
75
|
-
}
|
|
96
|
+
} satisfies Scenario;
|
|
76
97
|
```
|
|
77
98
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
99
|
+
`satisfies` keeps full typing - `d` is a `Director`, and a typo such as `d.gotoo` fails the
|
|
100
|
+
typecheck with a suggestion. Each line in `steps` goes on screen once, in order. The same array
|
|
101
|
+
becomes the burnt-in caption and the manifest's step list, so the written workflow cannot drift
|
|
102
|
+
from the recorded one - a take that skips a line fails.
|
|
103
|
+
|
|
104
|
+
`defineScenario` still exists for a scenario exported under a name rather than as the default.
|
|
81
105
|
|
|
82
106
|
## Prerequisites
|
|
83
107
|
|
|
@@ -160,6 +184,10 @@ site's own `@media (hover: none)` and touch rules apply at all, and it carries t
|
|
|
160
184
|
agent - so this is the mobile layout the site actually serves, not a desktop squeezed narrow.
|
|
161
185
|
Playwright ships 140+ presets; `--viewport 390x844` covers the rest.
|
|
162
186
|
|
|
187
|
+
```sh
|
|
188
|
+
screencast-axi record onboarding --device "iPhone 13" --orientation portrait
|
|
189
|
+
```
|
|
190
|
+
|
|
163
191
|
<picture>
|
|
164
192
|
<source srcset="docs/usecase-mobile.anim.webp" type="image/webp">
|
|
165
193
|
<img src="docs/usecase-mobile.gif" alt="The same workflow recorded in a portrait phone viewport." width="240">
|
|
@@ -245,6 +273,15 @@ One measuring pass, then it solves for the pace that lands near the target. A ta
|
|
|
245
273
|
the solve uses the measured split rather than assuming everything scales. Pace is clamped to a
|
|
246
274
|
watchable range, and a target outside it is reported rather than obeyed.
|
|
247
275
|
|
|
276
|
+
The measuring pass is the most expensive thing `record` does, so its result is kept and reused:
|
|
277
|
+
rehearse first and the take that follows needs one browser pass instead of two. Anything that
|
|
278
|
+
would change the timing - an edit to the scenario or its narration, another viewport, device or
|
|
279
|
+
origin, a new version of the recorder - measures again rather than trusting a stale number. The
|
|
280
|
+
output says which happened.
|
|
281
|
+
|
|
282
|
+
A scenario can carry its own `targetDurationMs` so the length lives with the clip; `--duration`
|
|
283
|
+
overrides it, and an explicit `--pace` overrides both.
|
|
284
|
+
|
|
248
285
|
### Emits what the destination needs
|
|
249
286
|
|
|
250
287
|
mp4 and webm every time, plus a poster frame. `--gif` and `--webp` add looping images for the
|
|
@@ -264,20 +301,14 @@ can be re-cut at a different length without re-deciding anything.
|
|
|
264
301
|
|
|
265
302
|
## Recording a page behind a login
|
|
266
303
|
|
|
267
|
-
|
|
268
|
-
this once:
|
|
304
|
+
`profileAuth()` needs no code for the site you are recording. A person runs this once:
|
|
269
305
|
|
|
270
306
|
```sh
|
|
271
307
|
pnpm exec screencast-axi auth login --interactive
|
|
272
308
|
```
|
|
273
309
|
|
|
274
|
-
A browser opens, they sign in however that site wants
|
|
275
|
-
|
|
276
|
-
credential is handled by this package.
|
|
277
|
-
|
|
278
|
-
`auth login` never reads stdin, so an agent can open the window on the user's screen rather than
|
|
279
|
-
making them retype a command. It cannot hang: the wait is bounded, and it refuses up front where
|
|
280
|
-
no window could appear.
|
|
310
|
+
A browser opens, they sign in however that site wants and close the window. The session lives in
|
|
311
|
+
a persistent Chrome profile, every take reuses it, and `auth check` tells you when it has expired.
|
|
281
312
|
|
|
282
313
|
Also shipped: `storageStateAuth({ path })` for a portable session file, and
|
|
283
314
|
`basicAuth({ username, password })` for staging environments. Anything else is an `AuthStrategy`
|
|
@@ -286,24 +317,16 @@ object written in the config - typed and debuggable rather than a shelled-out sc
|
|
|
286
317
|
> A scenario that creates or drags something **writes to whatever it is pointed at**. Prefer
|
|
287
318
|
> read-only scenarios against production, or point at staging.
|
|
288
319
|
|
|
289
|
-
## Seeing what a scenario does
|
|
290
|
-
|
|
291
|
-
A scenario is arbitrary code driving a real browser, often one signed into your own account, so
|
|
292
|
-
"what will this actually do" deserves a better answer than "read the TypeScript". Two:
|
|
293
|
-
|
|
294
|
-
```sh
|
|
295
|
-
screencast-axi rehearse <id> # prints every action it took
|
|
296
|
-
screencast-axi rehearse <id> --headed # and shows you it happening
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
A rehearsal prints `performed` - every goto, click, typed value, drag and scroll, in order, with
|
|
300
|
-
timings - and `hosts`, the short answer to where the script went. `--headed` opens a real window
|
|
301
|
-
and does not change the output; the clip is identical either way.
|
|
302
|
-
|
|
303
320
|
## Output formats
|
|
304
321
|
|
|
305
|
-
Every take produces an mp4, a webm and a poster. Looping images are
|
|
306
|
-
`--webp`, for the places a `<video>` does not render - a README, an npm
|
|
322
|
+
Every take produces an mp4, a webm and a poster, all three encoded at once. Looping images are
|
|
323
|
+
opt-in with `--gif` and `--webp`, for the places a `<video>` does not render - a README, an npm
|
|
324
|
+
page, an email.
|
|
325
|
+
|
|
326
|
+
The webm is offered first and the mp4 is the fallback, so the webm only earns its place by being
|
|
327
|
+
the smaller of the two. That is what `webm.crf` is tuned for: measured on a 1280x800 ten-second
|
|
328
|
+
take, the webm is 796 KB against the mp4's 1,056 KB, with no visible difference on text. VP9 and
|
|
329
|
+
h264 do not share a CRF scale, so the two numbers in the config are not comparable to each other.
|
|
307
330
|
|
|
308
331
|
Measured on a real 16.7s app screencast, all at 800px and 15fps:
|
|
309
332
|
|
|
@@ -322,10 +345,16 @@ paused, and ignores `prefers-reduced-motion`. It is an export, not a storage for
|
|
|
322
345
|
|
|
323
346
|
Optional. `screencast.config.ts` at the repo root, found by walking up from the working directory:
|
|
324
347
|
|
|
348
|
+
`init` writes one with a type-only import, so it loads in a project that has not installed the
|
|
349
|
+
package. Import `defineConfig` instead if you would rather have the call, and `profileAuth` and
|
|
350
|
+
the other auth strategies are real imports either way - a config that uses one needs the package
|
|
351
|
+
installed beside it.
|
|
352
|
+
|
|
325
353
|
```ts
|
|
326
|
-
import {
|
|
354
|
+
import type { ScreencastConfig } from "screencast-axi";
|
|
355
|
+
import { profileAuth } from "screencast-axi";
|
|
327
356
|
|
|
328
|
-
export default
|
|
357
|
+
export default {
|
|
329
358
|
baseUrl: "http://localhost:3000",
|
|
330
359
|
scenarios: ["scenarios/*.ts"],
|
|
331
360
|
outDir: "public/demos",
|
|
@@ -339,25 +368,12 @@ export default defineConfig({
|
|
|
339
368
|
// Page chrome that should not end up in the footage.
|
|
340
369
|
hideSelectors: ["#cookie-banner", "nextjs-portal"],
|
|
341
370
|
},
|
|
342
|
-
}
|
|
371
|
+
} satisfies ScreencastConfig;
|
|
343
372
|
```
|
|
344
373
|
|
|
345
374
|
Relative paths resolve against the config file, never the shell's working directory, so a command
|
|
346
375
|
means the same thing from anywhere in a repo.
|
|
347
376
|
|
|
348
|
-
## Mobile, and aiming at a length
|
|
349
|
-
|
|
350
|
-
```sh
|
|
351
|
-
screencast-axi record tour --device "iPhone 13" --orientation portrait --duration 20s
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
Device presets come from Playwright's registry, so a phone clip is captured at its real device
|
|
355
|
-
pixels rather than its CSS viewport - the difference between readable UI text and a smear.
|
|
356
|
-
|
|
357
|
-
`--duration` runs one measuring pass, then solves for the pace that lands near the target. A take
|
|
358
|
-
is `fixed + pace x scalable`: the site's own waits do not get slower because the recorder does, so
|
|
359
|
-
the solve uses the measured split rather than assuming everything scales.
|
|
360
|
-
|
|
361
377
|
## Reading the manifest
|
|
362
378
|
|
|
363
379
|
Every take writes `manifest.json` beside the clips. A site can read it at build time without
|
|
@@ -449,6 +465,7 @@ screencast-axi record <id|path...>
|
|
|
449
465
|
| `--duration <30s>` | Aim for this length, e.g. 30s (measures first, then solves for pace). |
|
|
450
466
|
| `--out <dir>` | Output directory. |
|
|
451
467
|
| `--all` | Record every scenario the config lists. |
|
|
468
|
+
| `--if-changed` | Skip clips already recorded from the current scenario. |
|
|
452
469
|
| `--full` | Include the full action log. |
|
|
453
470
|
| `--gif` | Also emit a looping GIF. |
|
|
454
471
|
| `--webp` | Also emit a looping WebP (half a GIF's size). |
|
|
@@ -517,10 +534,9 @@ Install the browser; name anything you must install yourself.
|
|
|
517
534
|
screencast-axi setup
|
|
518
535
|
```
|
|
519
536
|
|
|
520
|
-
| Flag | What it does
|
|
521
|
-
| ----------------- |
|
|
522
|
-
| `--browsers-only` | Install Chromium and stop.
|
|
523
|
-
| `--scope <s>` | For `setup hooks`: user or project. |
|
|
537
|
+
| Flag | What it does |
|
|
538
|
+
| ----------------- | -------------------------- |
|
|
539
|
+
| `--browsers-only` | Install Chromium and stop. |
|
|
524
540
|
|
|
525
541
|
#### `auth`
|
|
526
542
|
|
|
@@ -550,12 +566,6 @@ screencast-axi guide [topic]
|
|
|
550
566
|
_No flags._
|
|
551
567
|
<!-- reference:end -->
|
|
552
568
|
|
|
553
|
-
## Roadmap
|
|
554
|
-
|
|
555
|
-
`setup hooks` is declared but not implemented, and says so rather than pretending. Beyond that:
|
|
556
|
-
encoding animated WebP directly from frames rather than through the GIF pass, which measures
|
|
557
|
-
around five times smaller for the same clip.
|
|
558
|
-
|
|
559
569
|
## Contributing
|
|
560
570
|
|
|
561
571
|
```sh
|
|
@@ -5,6 +5,7 @@ import { loadConfig, selectStrategy } from "../config.js";
|
|
|
5
5
|
import { ScreencastError } from "../errors.js";
|
|
6
6
|
import { parseFlags } from "../flags.js";
|
|
7
7
|
import { parseDuration } from "../duration.js";
|
|
8
|
+
import { NPX_INVOCATION } from "../skill.js";
|
|
8
9
|
export const AUTH_FLAGS = {
|
|
9
10
|
config: { kind: "string", description: "Path to a config file", placeholder: "path" },
|
|
10
11
|
"base-url": { kind: "string", description: "Site to sign in to", placeholder: "url" },
|
|
@@ -118,7 +119,7 @@ async function login(config, strategy, viewport, authCtx, flags) {
|
|
|
118
119
|
if (!hasDisplay()) {
|
|
119
120
|
throw new ScreencastError("No display to open a browser window on", "NO_DISPLAY", [
|
|
120
121
|
"Ask the user to run this on their own machine:",
|
|
121
|
-
`
|
|
122
|
+
` ${NPX_INVOCATION} auth login --interactive --base-url ${authCtx.baseUrl}`,
|
|
122
123
|
"Or produce a session file there and point `storageStateAuth` at it",
|
|
123
124
|
]);
|
|
124
125
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/commands/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAkB,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/commands/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,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KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAChD,MAAM,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QAEpE,OAAO;YACL,WAAW,EAAE,IAAI;YACjB,QAAQ,EAAE,QAAQ,CAAC,IAAI;YACvB,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC3C,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;YACzB,UAAU,EAAE,IAAI;YAChB,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7D,IAAI,EAAE;gBACJ,sDAAsD;gBACtD,gEAAgE;aACjE;SACF,CAAC;IACJ,CAAC;YAAS,CAAC;QACT,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ScreencastError } from "../errors.js";
|
|
2
2
|
import { parseFlags } from "../flags.js";
|
|
3
|
+
import { NPX_INVOCATION } from "../skill.js";
|
|
3
4
|
const TOPICS = {
|
|
4
5
|
overview: {
|
|
5
6
|
summary: "What this tool does, and what is built so far",
|
|
@@ -140,7 +141,7 @@ const TOPICS = {
|
|
|
140
141
|
' auth: profileAuth({ signedInSelector: "[data-testid=user-menu]" }),',
|
|
141
142
|
"",
|
|
142
143
|
"Then a person runs, once, in their own terminal:",
|
|
143
|
-
|
|
144
|
+
` ${NPX_INVOCATION} auth login --interactive`,
|
|
144
145
|
"A browser opens, they sign in however that site wants - OAuth, SSO, a",
|
|
145
146
|
"magic link, two-factor - and close the window. The session lives in the",
|
|
146
147
|
"profile and every take reuses it. No credential is handled by this tool.",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guide.js","sourceRoot":"","sources":["../../../src/commands/guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAkB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"guide.js","sourceRoot":"","sources":["../../../src/commands/guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAkB,MAAM,aAAa,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAgB7C,MAAM,MAAM,GAA0B;IACpC,QAAQ,EAAE;QACR,OAAO,EAAE,+CAA+C;QACxD,IAAI,EAAE;YACJ,yEAAyE;YACzE,wEAAwE;YACxE,yEAAyE;YACzE,8CAA8C;YAC9C,EAAE;YACF,0EAA0E;YAC1E,iEAAiE;YACjE,sEAAsE;YACtE,EAAE;YACF,0EAA0E;YAC1E,uEAAuE;YACvE,uEAAuE;YACvE,YAAY;YACZ,EAAE;YACF,wEAAwE;YACxE,oDAAoD;SACrD;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,2DAA2D;QACpE,IAAI,EAAE;YACJ,yEAAyE;YACzE,8DAA8D;YAC9D,EAAE;YACF,uEAAuE;YACvE,kCAAkC;YAClC,yCAAyC;YACzC,yCAAyC;YACzC,yCAAyC;YACzC,wEAAwE;YACxE,8DAA8D;YAC9D,EAAE;YACF,sEAAsE;YACtE,wEAAwE;YACxE,yEAAyE;YACzE,yEAAyE;YACzE,iEAAiE;YACjE,+BAA+B;YAC/B,EAAE;YACF,sEAAsE;YACtE,0EAA0E;YAC1E,wEAAwE;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;QAClD,EAAE;QACF,WAAW,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;KAC5C,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACnB,CAAC"}
|
|
@@ -44,6 +44,9 @@ export async function listCommand(args) {
|
|
|
44
44
|
? {
|
|
45
45
|
title: r.title,
|
|
46
46
|
file: relative(process.cwd(), r.file),
|
|
47
|
+
// A clip recorded by path is real, but `--all` will not re-shoot
|
|
48
|
+
// it, which is the one thing worth knowing about it.
|
|
49
|
+
...(r.configured ? {} : { configured: false }),
|
|
47
50
|
...(r.staleReason ? { why: r.staleReason } : {}),
|
|
48
51
|
...(r.missing.length > 0 ? { missing: r.missing } : {}),
|
|
49
52
|
...(r.entry?.recordedAt ? { recorded: r.entry.recordedAt } : {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,SAAS,EAAqB,MAAM,iBAAiB,CAAC;AACxF,OAAO,EAAE,UAAU,EAAkB,MAAM,aAAa,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,CAAC,MAAM,UAAU,GAAc;IACnC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,EAAE;IACrF,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,0CAA0C,EAAE;IAClF,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,6BAA6B,EAAE;IACt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M,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBACzD,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAClE;YACH,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvD,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACtC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3D,IAAI,EACF,GAAG,CAAC,MAAM,KAAK,UAAU;YACvB,CAAC,CAAC,CAAC,2BAA2B,GAAG,CAAC,EAAE,iBAAiB,CAAC;YACtD,CAAC,CAAC,CAAC,6BAA6B,GAAG,CAAC,EAAE,2BAA2B,GAAG,CAAC,EAAE,IAAI,CAAC;KACjF,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
1
2
|
import { readFile } from "node:fs/promises";
|
|
2
3
|
import { isAbsolute, relative, resolve } from "node:path";
|
|
3
4
|
import { loadConfig, loadScenarioFiles, loadScenarios } from "../config.js";
|
|
4
5
|
import { ScreencastError } from "../errors.js";
|
|
5
6
|
import { parseFlags } from "../flags.js";
|
|
6
|
-
import {
|
|
7
|
+
import { baseUrlFor, runScenario, ScenarioFailure, viewportFor, } from "../run.js";
|
|
8
|
+
import { readMeasurement } from "../measure.js";
|
|
9
|
+
import { readManifest } from "../manifest.js";
|
|
10
|
+
import { buildInventory } from "../inventory.js";
|
|
7
11
|
import { parseDuration, solvePace } from "../duration.js";
|
|
8
12
|
import { detectToolchain } from "../toolchain.js";
|
|
9
13
|
const SHARED = {
|
|
@@ -30,6 +34,10 @@ export const RECORD_FLAGS = {
|
|
|
30
34
|
},
|
|
31
35
|
out: { kind: "string", description: "Output directory", placeholder: "dir" },
|
|
32
36
|
all: { kind: "boolean", description: "Record every scenario the config lists" },
|
|
37
|
+
"if-changed": {
|
|
38
|
+
kind: "boolean",
|
|
39
|
+
description: "Skip clips already recorded from the current scenario",
|
|
40
|
+
},
|
|
33
41
|
full: { kind: "boolean", description: "Include the full action log" },
|
|
34
42
|
gif: { kind: "boolean", description: "Also emit a looping GIF" },
|
|
35
43
|
webp: { kind: "boolean", description: "Also emit a looping WebP (half a GIF's size)" },
|
|
@@ -38,6 +46,26 @@ export const RECORD_FLAGS = {
|
|
|
38
46
|
"keep-raw": { kind: "boolean", description: "Keep the raw capture for inspection" },
|
|
39
47
|
};
|
|
40
48
|
export const REHEARSE_FLAGS = SHARED;
|
|
49
|
+
/**
|
|
50
|
+
* A scenario the manifest remembers recording, by id.
|
|
51
|
+
*
|
|
52
|
+
* A clip recorded by path is not in the config, so re-cutting it by id - the
|
|
53
|
+
* command `record` itself prints when it finishes - used to fail with
|
|
54
|
+
* `UNKNOWN_SCENARIO`. The manifest knows which file the clip came from, so
|
|
55
|
+
* the id is answerable without the config listing it.
|
|
56
|
+
*/
|
|
57
|
+
async function recordedAs(id, config) {
|
|
58
|
+
const entry = readManifest(config.outDir).entries.find((e) => e.id === id);
|
|
59
|
+
if (!entry?.sourceFile)
|
|
60
|
+
return null;
|
|
61
|
+
const file = isAbsolute(entry.sourceFile)
|
|
62
|
+
? entry.sourceFile
|
|
63
|
+
: resolve(config.outDir, entry.sourceFile);
|
|
64
|
+
if (!existsSync(file))
|
|
65
|
+
return null;
|
|
66
|
+
const loaded = await loadScenarioFiles([file]).catch(() => []);
|
|
67
|
+
return loaded.find((l) => l.scenario.id === id) ?? null;
|
|
68
|
+
}
|
|
41
69
|
/**
|
|
42
70
|
* Resolves ids or file paths to scenarios.
|
|
43
71
|
*
|
|
@@ -58,7 +86,7 @@ async function select(targets, config, all) {
|
|
|
58
86
|
return loaded;
|
|
59
87
|
const chosen = [];
|
|
60
88
|
for (const id of ids) {
|
|
61
|
-
const match = loaded.find((l) => l.scenario.id === id);
|
|
89
|
+
const match = loaded.find((l) => l.scenario.id === id) ?? (await recordedAs(id, config));
|
|
62
90
|
if (!match) {
|
|
63
91
|
const known = loaded.map((l) => l.scenario.id);
|
|
64
92
|
throw new ScreencastError(`Unknown scenario: ${id}`, "UNKNOWN_SCENARIO", [
|
|
@@ -77,6 +105,46 @@ async function select(targets, config, all) {
|
|
|
77
105
|
}
|
|
78
106
|
return chosen;
|
|
79
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* What a stored measurement has to match to describe this take.
|
|
110
|
+
*
|
|
111
|
+
* Null when the scenario's source could not be read: without it an edit
|
|
112
|
+
* cannot be detected, and a measurement that might describe an older version
|
|
113
|
+
* of the scenario is not one worth keeping.
|
|
114
|
+
*/
|
|
115
|
+
async function measurementKey(options, sourceText) {
|
|
116
|
+
if (sourceText === undefined)
|
|
117
|
+
return null;
|
|
118
|
+
const viewport = await viewportFor(options);
|
|
119
|
+
return {
|
|
120
|
+
scenarioId: options.scenario.id,
|
|
121
|
+
sourceText,
|
|
122
|
+
steps: options.scenario.steps,
|
|
123
|
+
baseUrl: baseUrlFor(options),
|
|
124
|
+
width: viewport.viewport.width,
|
|
125
|
+
height: viewport.viewport.height,
|
|
126
|
+
...(viewport.device ? { device: viewport.device } : {}),
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Narrows a selection to the clips that actually need re-shooting.
|
|
131
|
+
*
|
|
132
|
+
* The companion of `check`, which is where someone learns that three of
|
|
133
|
+
* fifteen clips have drifted. Without it the only way to act on that is
|
|
134
|
+
* `record --all`, which re-shoots the twelve that were fine - minutes of
|
|
135
|
+
* browser time and twelve identical files rewritten.
|
|
136
|
+
*
|
|
137
|
+
* "Changed" is the inventory's own judgement, so this and `check` cannot
|
|
138
|
+
* disagree: anything not `recorded` (stale narration, an edited scenario, a
|
|
139
|
+
* missing deliverable, never recorded at all) is in.
|
|
140
|
+
*/
|
|
141
|
+
async function onlyChanged(selected, config, flags) {
|
|
142
|
+
if (flags["if-changed"] !== true)
|
|
143
|
+
return [...selected];
|
|
144
|
+
const inventory = await buildInventory(config);
|
|
145
|
+
const needsWork = new Set(inventory.rows.filter((row) => row.status !== "recorded").map((row) => row.id));
|
|
146
|
+
return selected.filter((s) => needsWork.has(s.scenario.id));
|
|
147
|
+
}
|
|
80
148
|
function viewportOf(value) {
|
|
81
149
|
if (value === undefined)
|
|
82
150
|
return undefined;
|
|
@@ -117,7 +185,7 @@ function performed(result, full) {
|
|
|
117
185
|
function truncate(text, full) {
|
|
118
186
|
return full || text.length <= 70 ? text : `${text.slice(0, 67)}...`;
|
|
119
187
|
}
|
|
120
|
-
function describe(result, solution) {
|
|
188
|
+
function describe(result, solution, reusedMeasurement = false) {
|
|
121
189
|
const files = result.encoded
|
|
122
190
|
? Object.entries(result.encoded.sizes).map(([name, bytes]) => ({
|
|
123
191
|
file: name,
|
|
@@ -133,6 +201,8 @@ function describe(result, solution) {
|
|
|
133
201
|
? {
|
|
134
202
|
target_s: Number((solution.targetMs / 1000).toFixed(1)),
|
|
135
203
|
natural_s: Number((solution.naturalMs / 1000).toFixed(1)),
|
|
204
|
+
// Which of the two browser passes this take actually cost.
|
|
205
|
+
measured: reusedMeasurement ? "reused from an earlier pass" : "this run",
|
|
136
206
|
...(solution.warning ? { warning: solution.warning } : {}),
|
|
137
207
|
}
|
|
138
208
|
: {}),
|
|
@@ -155,16 +225,31 @@ export async function recordCommand(args, mode) {
|
|
|
155
225
|
]);
|
|
156
226
|
}
|
|
157
227
|
const config = await loadConfig(flags["config"]);
|
|
158
|
-
const selected = await select(positionals, config, all);
|
|
228
|
+
const selected = await onlyChanged(await select(positionals, config, all), config, flags);
|
|
159
229
|
if (selected.length === 0) {
|
|
160
|
-
return
|
|
230
|
+
return flags["if-changed"] === true
|
|
231
|
+
? {
|
|
232
|
+
[mode]: [],
|
|
233
|
+
totals: "nothing has changed",
|
|
234
|
+
help: ["Every configured clip is recorded from its current scenario"],
|
|
235
|
+
}
|
|
236
|
+
: { [mode]: [], totals: "0 scenarios matched", help: ["Run `screencast-axi list`"] };
|
|
161
237
|
}
|
|
162
238
|
// Probed once for the batch rather than per clip, and before any browser
|
|
163
239
|
// opens - a missing ffmpeg should not cost a forty-second take first.
|
|
164
240
|
const toolchain = mode === "record" ? await detectToolchain() : undefined;
|
|
165
241
|
const orientation = orientationOf(flags["orientation"]);
|
|
166
242
|
const viewport = viewportOf(flags["viewport"]);
|
|
167
|
-
|
|
243
|
+
// Both given is a contradiction, not a precedence question: `--pace` states
|
|
244
|
+
// the pace and `--duration` asks for one to be solved. Silently dropping
|
|
245
|
+
// either would produce a clip that is not the length the flag asked for.
|
|
246
|
+
if (flags["duration"] !== undefined && flags["pace"] !== undefined) {
|
|
247
|
+
throw new ScreencastError("`--duration` and `--pace` cannot both be given", "VALIDATION_ERROR", [
|
|
248
|
+
"`--duration 30s` solves for the pace that lands near that length",
|
|
249
|
+
"`--pace 0.8` sets it directly, leaving nothing to solve for",
|
|
250
|
+
]);
|
|
251
|
+
}
|
|
252
|
+
const flagTargetMs = flags["duration"] !== undefined ? parseDuration(flags["duration"]) : null;
|
|
168
253
|
// Looping formats are for the places a <video> does not render. They are far
|
|
169
254
|
// heavier than the mp4, so they stay opt-in per run.
|
|
170
255
|
const loops = flags["gif"] === true ||
|
|
@@ -180,6 +265,8 @@ export async function recordCommand(args, mode) {
|
|
|
180
265
|
: null;
|
|
181
266
|
const results = [];
|
|
182
267
|
const solutions = new Map();
|
|
268
|
+
/** Scenarios whose natural length came from a previous pass rather than a new one. */
|
|
269
|
+
const reused = new Set();
|
|
183
270
|
for (const { scenario, file } of selected) {
|
|
184
271
|
const sourceText = await readFile(file, "utf8").catch(() => undefined);
|
|
185
272
|
// Everything except the mode and the pace, which the measuring pass and
|
|
@@ -188,6 +275,7 @@ export async function recordCommand(args, mode) {
|
|
|
188
275
|
scenario,
|
|
189
276
|
config,
|
|
190
277
|
...(sourceText ? { sourceText } : {}),
|
|
278
|
+
sourceFile: file,
|
|
191
279
|
...(flags["base-url"] ? { baseUrl: flags["base-url"] } : {}),
|
|
192
280
|
...(flags["out"] ? { outDir: resolve(process.cwd(), flags["out"]) } : {}),
|
|
193
281
|
...(flags["device"] ? { device: flags["device"] } : {}),
|
|
@@ -206,13 +294,29 @@ export async function recordCommand(args, mode) {
|
|
|
206
294
|
log: (message) => void process.stderr.write(`${message}\n`),
|
|
207
295
|
};
|
|
208
296
|
let pace = flags["pace"];
|
|
297
|
+
// The flag wins over the scenario's own target, so a re-cut at another
|
|
298
|
+
// length needs no edit. An explicit --pace wins over both: it says what
|
|
299
|
+
// the pace is, leaving nothing to solve for.
|
|
300
|
+
const targetMs = pace !== undefined ? null : (flagTargetMs ?? scenario.targetDurationMs ?? null);
|
|
209
301
|
if (targetMs !== null) {
|
|
210
302
|
// Measured, not assumed: a scenario's length is only roughly linear in
|
|
211
303
|
// pace, because the app's own waits do not scale with it. One no-encode
|
|
212
|
-
// pass is the cheapest honest way to learn the natural length
|
|
213
|
-
|
|
214
|
-
const
|
|
215
|
-
const
|
|
304
|
+
// pass is the cheapest honest way to learn the natural length - and a
|
|
305
|
+
// rehearsal already ran one, so the answer is often already known.
|
|
306
|
+
const key = await measurementKey({ ...base, mode: "rehearse", pace: 1 }, sourceText);
|
|
307
|
+
const cached = key ? readMeasurement(config.rawDir, key) : null;
|
|
308
|
+
let natural;
|
|
309
|
+
if (cached) {
|
|
310
|
+
process.stderr.write(`${scenario.id}: reusing the measured ${(cached.durationMs / 1000).toFixed(1)}s ` +
|
|
311
|
+
`for a ${targetMs / 1000}s target\n`);
|
|
312
|
+
natural = cached;
|
|
313
|
+
reused.add(scenario.id);
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
process.stderr.write(`${scenario.id}: measuring for a ${targetMs / 1000}s target\n`);
|
|
317
|
+
natural = await runScenario({ ...base, mode: "rehearse", pace: 1 });
|
|
318
|
+
}
|
|
319
|
+
const solution = solvePace(natural.durationMs, targetMs, natural.scaledPauseMs);
|
|
216
320
|
solutions.set(scenario.id, solution);
|
|
217
321
|
pace = solution.pace;
|
|
218
322
|
if (solution.warning)
|
|
@@ -227,7 +331,7 @@ export async function recordCommand(args, mode) {
|
|
|
227
331
|
// it, so the log is the point of the output rather than an extra.
|
|
228
332
|
const showLog = mode === "rehearse" || full;
|
|
229
333
|
return {
|
|
230
|
-
...describe(only, solutions.get(only.id)),
|
|
334
|
+
...describe(only, solutions.get(only.id), reused.has(only.id)),
|
|
231
335
|
...(only.hosts.length > 0 ? { hosts: only.hosts } : {}),
|
|
232
336
|
...(showLog ? { performed: performed(only, full) } : {}),
|
|
233
337
|
help: nextSteps(only, showLog),
|