cuetake 0.0.0-stage → 0.2.0
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 +22 -0
- package/README.md +80 -2
- package/examples/basic.mjs +47 -0
- package/package.json +41 -4
- package/src/auth.js +48 -0
- package/src/camera.js +86 -0
- package/src/cli.js +62 -0
- package/src/cursor.js +57 -0
- package/src/director.js +54 -0
- package/src/edit.js +81 -0
- package/src/environment.js +36 -0
- package/src/look.js +107 -0
- package/src/pipeline.js +159 -0
- package/src/probe.js +57 -0
- package/src/recorder.js +64 -0
- package/src/render-page.js +454 -0
- package/src/render.js +92 -0
- package/src/stage.js +114 -0
- package/src/tab-capture.js +88 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 mcpware
|
|
4
|
+
Copyright (c) 2026 CueTake contributors
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,81 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CueTake
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://skills.sh/levyxdev/cuetake) [](https://www.npmjs.com/package/cuetake)
|
|
4
|
+
|
|
5
|
+
**Script the flow. Keep the take.**
|
|
6
|
+
|
|
7
|
+
Built entirely for AI agents, CueTake turns browser interactions into sharp product demo videos with a precise cursor and continuous camera moves. Give an agent a scenario, then capture, render, and verify the result locally.
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
- Retina tab capture at 30 or 60 fps and a 2× pixel scale, headless by default.
|
|
12
|
+
- An automatic camera in the style of Screen Studio: it arrives just before each click, field and drag, follows the cursor on a spring, and ends on the wide shot.
|
|
13
|
+
- The page framed in a browser or macOS window on a gradient, brand-colored or blurred background, at 16:9, 1:1 or 9:16.
|
|
14
|
+
- Cursor and click sparks drawn at Render time, so a Take can be restyled without recording again.
|
|
15
|
+
- Styling chosen in conversation: the agent shows Previews of candidate Looks side by side in about a second, and the Look you pick is saved for later Takes.
|
|
16
|
+
- Rendering in Chromium with WebGL and WebCodecs: no FFmpeg, 4K60 by default.
|
|
17
|
+
- A separate folder for every Take: Source, Timeline, Edit, Final MP4, and verification.
|
|
18
|
+
|
|
19
|
+
## For AI agents
|
|
20
|
+
|
|
21
|
+
If a user hands you this repository to set up CueTake:
|
|
22
|
+
|
|
23
|
+
1. Install the skill with `npx skills add levyxdev/cuetake`. In Claude Code you can instead run `/plugin marketplace add levyxdev/cuetake`, then `/plugin install cuetake`.
|
|
24
|
+
2. The skill's `scripts/cuetake` runs the pinned [`cuetake`](https://www.npmjs.com/package/cuetake) package with `npx`, so nothing else needs installing besides Node. To run a source checkout instead, export `CUETAKE_BIN="node /absolute/path/to/cuetake/src/cli.js"`.
|
|
25
|
+
3. Follow the skill's [setup guide](skills/cuetake/setup.md): run `scripts/cuetake doctor`, and install Node or the browser only after the user agrees to the option they pick.
|
|
26
|
+
4. Write a Scenario for the user's product with the [scenario API](skills/cuetake/scenarios.md), record it, and review the frames with `scripts/cuetake frame`.
|
|
27
|
+
|
|
28
|
+
## Run from source
|
|
29
|
+
|
|
30
|
+
Requirements: Bun for development (users run the CLI on Node 20.10+) and the Chromium build CueTake's Playwright drives. Verified on macOS, headless and headed.
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
bun install --frozen-lockfile
|
|
34
|
+
bun run doctor
|
|
35
|
+
# Only if doctor reports Chromium missing (about 150 MB):
|
|
36
|
+
bun src/cli.js install-browser
|
|
37
|
+
|
|
38
|
+
bun src/cli.js record examples/basic.mjs --out ./recordings/first-take
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The example opens `https://example.com` only for a stable HTTPS origin, then replaces the page with a small invite form, types an email and sends it, so it works without a local application server. For your own product, write a scenario using the [scenario API](skills/cuetake/scenarios.md).
|
|
42
|
+
|
|
43
|
+
Playwright is a local package dependency. Browser binaries use Playwright's normal OS cache. CueTake does not install global packages or start your application server.
|
|
44
|
+
|
|
45
|
+
## Commands
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
bun src/cli.js doctor
|
|
49
|
+
bun src/cli.js install-browser
|
|
50
|
+
bun src/cli.js record ./my-scenario.mjs --out ./recordings/my-take [--headed]
|
|
51
|
+
bun src/cli.js render ./recordings/my-take
|
|
52
|
+
bun src/cli.js verify ./recordings/my-take
|
|
53
|
+
bun src/cli.js frame ./recordings/my-take 2.5
|
|
54
|
+
bun src/cli.js login product-demo https://your-app.example/login
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`record` completes capture → render → verification and refuses an existing output folder. `render` uses the saved Source, Timeline and Edit; it replaces the final video only after encoding succeeds. Copy a Take folder to keep several edits.
|
|
58
|
+
|
|
59
|
+
A successful command is a technical check, not an editorial approval. Watch the result before publishing.
|
|
60
|
+
|
|
61
|
+
## How it works
|
|
62
|
+
|
|
63
|
+
Playwright drives an isolated Chromium tab. Chromium captures the tab at device-pixel resolution using `getDisplayMedia`; a VP9 `MediaRecorder` saves the source. An in-page probe records the pointer path, clicks, drags and typing into the Timeline. Render then composes the camera path in a headless Chromium page with WebGL and encodes H.264 with WebCodecs; see [ADR 0001](docs/adr/0001-render-in-browser-with-webgl-and-webcodecs.md).
|
|
64
|
+
|
|
65
|
+
Source capture is variable frame rate. Static scenes may drop to approximately one captured frame per second, and busy scenes can drop frames. A 60 fps output does not imply 60 unique source frames every second. Capture callback statistics and output metadata are retained in each take. No motion interpolation is used.
|
|
66
|
+
|
|
67
|
+
## Current scope
|
|
68
|
+
|
|
69
|
+
The supported workflow is a short, same-document browser demo, including SPA interactions. A full page navigation or reload destroys the in-page recorder; record those as separate takes. Audio and desktop/window capture are outside this workflow. Input inside cross-origin iframes is not seen by the Timeline probe, so the cursor and camera do not follow it there. Headless Chromium renders the generic `monospace` family as Courier rather than Menlo; record with `--headed` when a page relies on it. Browser automation and captured data stay local; the visited website still receives normal browser requests.
|
|
70
|
+
|
|
71
|
+
The bundled [agent skill](skills/cuetake/SKILL.md) teaches planning and operation; site-specific scenarios stay in your application project. See [distribution](docs/distribution.md) and [login](skills/cuetake/authentication.md).
|
|
72
|
+
|
|
73
|
+
## Development
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
bun test tests/pipeline.test.js
|
|
77
|
+
# With Playwright Chromium installed:
|
|
78
|
+
bun test tests/browser.test.js
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`pipeline.test.js` covers configuration and camera math; `browser.test.js` covers the probe, Auth profiles, and Render geometry, cursor and sparks at a 2× capture scale. No build step is required. Do not commit recordings, browser profiles, credentials, or product-specific scenarios into this generic tool repository.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// example.com only supplies a stable HTTPS origin. prepare() replaces the page
|
|
2
|
+
// with a self-contained fixture, so this take never depends on that site's markup.
|
|
3
|
+
export const config = { name: 'basic', url: 'https://example.com' };
|
|
4
|
+
|
|
5
|
+
const fixture = `<!doctype html>
|
|
6
|
+
<style>
|
|
7
|
+
body { margin:0; height:100vh; display:grid; place-items:center; font:16px/1.5 system-ui, sans-serif;
|
|
8
|
+
background:linear-gradient(135deg,#eef2ff,#fdf2f8); color:#111827 }
|
|
9
|
+
.card { width:460px; padding:32px; border-radius:20px; background:white; box-shadow:0 20px 50px #1f29371f }
|
|
10
|
+
h1 { margin:0 0 4px; font-size:24px } p { margin:0 0 24px; color:#6b7280 }
|
|
11
|
+
label { display:block; margin-bottom:6px; font-size:14px; font-weight:600 }
|
|
12
|
+
input { box-sizing:border-box; width:100%; padding:12px 14px; border:1px solid #d1d5db; border-radius:10px; font:inherit }
|
|
13
|
+
input:focus { outline:2px solid #6366f1; border-color:transparent }
|
|
14
|
+
button { margin-top:20px; width:100%; padding:14px; border:0; border-radius:10px; background:#4f46e5; color:white; font:600 16px system-ui }
|
|
15
|
+
.toast { margin-top:20px; padding:12px 14px; border-radius:10px; background:#ecfdf5; color:#065f46; display:none }
|
|
16
|
+
</style>
|
|
17
|
+
<main class="card">
|
|
18
|
+
<h1>Invite a teammate</h1>
|
|
19
|
+
<p>They will get access to the Launch workspace.</p>
|
|
20
|
+
<label for="email">Email</label>
|
|
21
|
+
<input id="email" type="email" placeholder="name@company.com">
|
|
22
|
+
<button>Send invite</button>
|
|
23
|
+
<div class="toast" role="status"></div>
|
|
24
|
+
</main>
|
|
25
|
+
<script>
|
|
26
|
+
document.querySelector('button').onclick = () => {
|
|
27
|
+
const toast = document.querySelector('.toast');
|
|
28
|
+
toast.textContent = 'Invite sent to ' + document.querySelector('#email').value;
|
|
29
|
+
toast.style.display = 'block';
|
|
30
|
+
};
|
|
31
|
+
</script>`;
|
|
32
|
+
|
|
33
|
+
export async function prepare(page) {
|
|
34
|
+
await page.setContent(fixture);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export async function run(d) {
|
|
38
|
+
await d.move(720, 640, 0);
|
|
39
|
+
await d.at(0.8);
|
|
40
|
+
await d.type(d.page.getByLabel('Email'), 'ada@example.com');
|
|
41
|
+
await d.wait(400);
|
|
42
|
+
await d.click(d.page.getByRole('button', { name: 'Send invite' }));
|
|
43
|
+
await d.wait(3000);
|
|
44
|
+
const status = await d.page.getByRole('status').textContent();
|
|
45
|
+
if (status !== 'Invite sent to ada@example.com') throw new Error(`Unexpected status: ${status}`);
|
|
46
|
+
return { status };
|
|
47
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cuetake",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Local recording runtime for AI agents: plan a browser demo, capture it, and render a finished take.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"cuetake": "./src/cli.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"src",
|
|
11
|
+
"examples",
|
|
12
|
+
"README.md",
|
|
13
|
+
"LICENSE"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"start": "bun src/cli.js",
|
|
17
|
+
"test": "bun test tests/pipeline.test.js",
|
|
18
|
+
"doctor": "bun src/cli.js doctor"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"browser",
|
|
22
|
+
"recording",
|
|
23
|
+
"demo",
|
|
24
|
+
"playwright",
|
|
25
|
+
"cuetake"
|
|
26
|
+
],
|
|
27
|
+
"author": "CueTake contributors",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"repository": {
|
|
30
|
+
"type": "git",
|
|
31
|
+
"url": "git+https://github.com/levyxdev/cuetake.git"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://github.com/levyxdev/cuetake",
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"mediabunny": "1.62.0",
|
|
36
|
+
"playwright": "1.63.0",
|
|
37
|
+
"zod": "^3.23.0"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=20.10.0"
|
|
41
|
+
},
|
|
42
|
+
"packageManager": "bun@1.3.14"
|
|
43
|
+
}
|
package/src/auth.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { chromium } from 'playwright';
|
|
2
|
+
import fs from 'node:fs/promises';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { randomUUID } from 'node:crypto';
|
|
6
|
+
import { setTimeout as sleep } from 'node:timers/promises';
|
|
7
|
+
const root = () => process.env.CUETAKE_AUTH_DIR || join(homedir(), '.local/share/cuetake/auth');
|
|
8
|
+
function profilePath(profile) {
|
|
9
|
+
if (!/^[a-z0-9][a-z0-9-]{0,63}$/.test(profile)) throw new Error('Use a short lowercase profile name, such as product-demo');
|
|
10
|
+
return join(root(), `${profile}.json`);
|
|
11
|
+
}
|
|
12
|
+
export async function resolveAuthProfile(profile) {
|
|
13
|
+
const path = profilePath(profile);
|
|
14
|
+
await fs.access(path).catch(() => { throw new Error(`Auth profile '${profile}' is missing. Run: cuetake login ${profile} <login-url>`); });
|
|
15
|
+
return path;
|
|
16
|
+
}
|
|
17
|
+
/** Accepts a browser context or an already-read storage state. */
|
|
18
|
+
export async function saveAuthState(source, profile) {
|
|
19
|
+
const path = profilePath(profile);
|
|
20
|
+
await fs.mkdir(root(), { recursive: true, mode: 0o700 });
|
|
21
|
+
const state = typeof source.storageState === 'function' ? await source.storageState({ indexedDB: true }) : source;
|
|
22
|
+
const temporary = `${path}.${randomUUID()}.tmp`;
|
|
23
|
+
try {
|
|
24
|
+
await fs.writeFile(temporary, JSON.stringify(state), { mode: 0o600 });
|
|
25
|
+
await fs.rename(temporary, path);
|
|
26
|
+
} finally { await fs.rm(temporary, { force: true }); }
|
|
27
|
+
return { profile, saved: true, note: 'Auth profile saved locally. Confirm authentication against the target page before recording.' };
|
|
28
|
+
}
|
|
29
|
+
/** Opens a headed login window and saves its state when the user closes the window. */
|
|
30
|
+
export async function login(url, profile) {
|
|
31
|
+
profilePath(profile);
|
|
32
|
+
if (!/^https?:$/.test(new URL(url).protocol)) throw new Error('Login requires HTTP(S)');
|
|
33
|
+
const browser = await chromium.launch({ headless: false });
|
|
34
|
+
try {
|
|
35
|
+
const context = await browser.newContext();
|
|
36
|
+
const page = await context.newPage();
|
|
37
|
+
await page.goto(url, { waitUntil: 'domcontentloaded' });
|
|
38
|
+
console.error('Complete login in the opened browser, then close its window. No recording is active.');
|
|
39
|
+
// The window can close at any moment, so keep the latest readable state and save that.
|
|
40
|
+
let state, open = true;
|
|
41
|
+
const closed = new Promise(resolve => { page.once('close', resolve); browser.once('disconnected', resolve); }).then(() => { open = false; });
|
|
42
|
+
while (open) {
|
|
43
|
+
state = await context.storageState({ indexedDB: true }).catch(() => state);
|
|
44
|
+
await Promise.race([closed, sleep(1000)]);
|
|
45
|
+
}
|
|
46
|
+
return await saveAuthState(state, profile);
|
|
47
|
+
} finally { await browser.close().catch(() => {}); }
|
|
48
|
+
}
|
package/src/camera.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Camera math shared by Node and the render page. Pure functions, no imports.
|
|
3
|
+
*
|
|
4
|
+
* Modeled on Screen Studio's auto zoom: zooms come from actions; actions close together form one
|
|
5
|
+
* zoom segment that moves between them and follows the cursor; the camera moves on a critically
|
|
6
|
+
* damped spring, so it never overshoots and settles quickly enough to keep text readable. Because
|
|
7
|
+
* the whole Timeline is known in advance, the camera starts moving `lead` seconds before each
|
|
8
|
+
* action and every Final ends on the wide shot.
|
|
9
|
+
*
|
|
10
|
+
* Everything here is in CSS pixels of the captured viewport and seconds since capture start.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const clamp = (value, min, max) => Math.max(min, Math.min(max, value));
|
|
14
|
+
const SAFE_AREA = 0.7; // while zoomed, the cursor stays within this central fraction of the view
|
|
15
|
+
|
|
16
|
+
/** The zoom that frames `box` with `padding` on every side, between 1 and `maxZoom`. */
|
|
17
|
+
export function fitZoom(box, viewport, { maxZoom, padding }) {
|
|
18
|
+
return clamp(Math.min(viewport.width / (box.width + 2 * padding), viewport.height / (box.height + 2 * padding)), 1, maxZoom);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** The viewport crop centered on (x, y) at `zoom`, kept inside the viewport. */
|
|
22
|
+
export function cropAround(x, y, zoom, viewport) {
|
|
23
|
+
zoom = Math.max(1, zoom);
|
|
24
|
+
const w = viewport.width / zoom, h = viewport.height / zoom;
|
|
25
|
+
return { x: clamp(x - w / 2, 0, viewport.width - w), y: clamp(y - h / 2, 0, viewport.height - h), w, h };
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Zoom segments: each target wants the camera from `lead` before it until `hold` after it (or after
|
|
30
|
+
* its typing ends); targets whose windows touch or sit within `chainGap` share one segment. Segments
|
|
31
|
+
* stop `endWide` before the Final ends, and targets that would barely zoom (below `minZoom`) stay wide.
|
|
32
|
+
*/
|
|
33
|
+
export function zoomSegments(targets, viewport, camera, duration) {
|
|
34
|
+
const { lead, hold, chainGap, minZoom, endWide } = camera;
|
|
35
|
+
const last = duration - endWide;
|
|
36
|
+
const segments = [];
|
|
37
|
+
for (const target of targets.toSorted((a, b) => a.t - b.t)) {
|
|
38
|
+
const zoom = target.zoom ?? fitZoom(target.box, viewport, camera);
|
|
39
|
+
if (zoom < minZoom || target.t - lead >= last) continue;
|
|
40
|
+
const shot = { t: target.t, box: target.box, zoom };
|
|
41
|
+
const start = Math.max(0, target.t - lead), end = Math.min(last, Math.max(target.t, target.until ?? target.t) + hold);
|
|
42
|
+
const segment = segments.at(-1);
|
|
43
|
+
if (segment && start - segment.end <= chainGap) { segment.shots.push(shot); segment.end = Math.max(segment.end, end); }
|
|
44
|
+
else segments.push({ start, end, shots: [shot] });
|
|
45
|
+
}
|
|
46
|
+
return segments;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Where the camera wants to be at `t` (center and zoom) before spring smoothing. `pointerAt(t)` may be null. */
|
|
50
|
+
export function intentAt(segments, viewport, camera, t, pointerAt) {
|
|
51
|
+
const segment = segments.find(s => t >= s.start && t < s.end);
|
|
52
|
+
if (!segment) return { x: viewport.width / 2, y: viewport.height / 2, zoom: 1 };
|
|
53
|
+
// Move to each shot `lead` before its action, so the camera arrives as the action happens.
|
|
54
|
+
const shot = segment.shots.findLast(s => s.t - camera.lead <= t) ?? segment.shots[0];
|
|
55
|
+
const { zoom } = shot;
|
|
56
|
+
const half = { x: viewport.width / (2 * zoom), y: viewport.height / (2 * zoom) };
|
|
57
|
+
let x = shot.box.x + shot.box.width / 2, y = shot.box.y + shot.box.height / 2;
|
|
58
|
+
const pointer = camera.follow ? pointerAt?.(t) : null;
|
|
59
|
+
if (pointer) {
|
|
60
|
+
x = clamp(x, pointer.x - half.x * SAFE_AREA, pointer.x + half.x * SAFE_AREA);
|
|
61
|
+
y = clamp(y, pointer.y - half.y * SAFE_AREA, pointer.y + half.y * SAFE_AREA);
|
|
62
|
+
}
|
|
63
|
+
return { x: clamp(x, half.x, viewport.width - half.x), y: clamp(y, half.y, viewport.height - half.y), zoom };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The visible viewport crop for every output frame. The intent is followed by a critically damped
|
|
68
|
+
* spring on center and log-zoom that settles in about `response` seconds.
|
|
69
|
+
*/
|
|
70
|
+
export function cameraTrack({ targets, viewport, camera, duration, fps, pointerAt }) {
|
|
71
|
+
const segments = zoomSegments(targets, viewport, camera, duration);
|
|
72
|
+
const omega = 4 / camera.response, steps = 4, dt = 1 / (fps * steps);
|
|
73
|
+
const start = intentAt(segments, viewport, camera, 0, pointerAt);
|
|
74
|
+
const state = { x: start.x, y: start.y, z: Math.log(start.zoom) }, velocity = { x: 0, y: 0, z: 0 };
|
|
75
|
+
const track = [];
|
|
76
|
+
for (let i = 0, frames = Math.round(duration * fps); i < frames; i++) {
|
|
77
|
+
const goal = intentAt(segments, viewport, camera, i / fps, pointerAt);
|
|
78
|
+
const target = { x: goal.x, y: goal.y, z: Math.log(goal.zoom) };
|
|
79
|
+
for (let step = 0; step < steps; step++) for (const key of ['x', 'y', 'z']) {
|
|
80
|
+
velocity[key] += (omega * omega * (target[key] - state[key]) - 2 * omega * velocity[key]) * dt;
|
|
81
|
+
state[key] += velocity[key] * dt;
|
|
82
|
+
}
|
|
83
|
+
track.push(cropAround(state.x, state.y, Math.exp(state.z), viewport));
|
|
84
|
+
}
|
|
85
|
+
return track;
|
|
86
|
+
}
|
package/src/cli.js
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { parseArgs } from 'node:util';
|
|
3
|
+
import pkg from '../package.json' with { type: 'json' };
|
|
4
|
+
import { recordScenario, renderTake, verifyTake, previewTake, applyLookToTake, saveLookFromTake } from './pipeline.js';
|
|
5
|
+
import { listLooks, removeLook } from './look.js';
|
|
6
|
+
import { doctor, installBrowser } from './environment.js';
|
|
7
|
+
import { login } from './auth.js';
|
|
8
|
+
import { extractFrame } from './render.js';
|
|
9
|
+
import { writeFile } from 'node:fs/promises';
|
|
10
|
+
import { join, resolve } from 'node:path';
|
|
11
|
+
|
|
12
|
+
const help = `CueTake ${pkg.version} — browser demos directed by code
|
|
13
|
+
|
|
14
|
+
cuetake doctor
|
|
15
|
+
cuetake install-browser
|
|
16
|
+
cuetake record <scenario.mjs> [--out <new-directory>] [--auth-profile <name>] [--look <name|file.json>] [--headed]
|
|
17
|
+
cuetake preview <take-directory> [--look <name|file.json>]... [--at <seconds>]
|
|
18
|
+
cuetake render <take-directory>
|
|
19
|
+
cuetake verify <take-directory>
|
|
20
|
+
cuetake frame <take-directory> <seconds> [--out <file.png>]
|
|
21
|
+
cuetake login <profile> <login-url>
|
|
22
|
+
cuetake look list
|
|
23
|
+
cuetake look save <name> <take-directory> [--global] [--replace]
|
|
24
|
+
cuetake look apply <name|file.json> <take-directory>
|
|
25
|
+
cuetake look rm <name> [--global]
|
|
26
|
+
|
|
27
|
+
install-browser downloads the Chromium build this CueTake version drives (about 150 MB).
|
|
28
|
+
record captures, renders and verifies a new take; an existing directory is never overwritten.
|
|
29
|
+
Capture runs headless; --headed shows the browser window while recording.
|
|
30
|
+
--look seeds the first Edit from a Look; fields the Scenario config names win.
|
|
31
|
+
preview writes preview.png in the take: the current Edit beside up to five Looks, at --at seconds
|
|
32
|
+
or at the end with the camera wide. It never changes edit.json or final.mp4.
|
|
33
|
+
render reuses source.webm, timeline.json and edit.json, replacing final.mp4 only on success.
|
|
34
|
+
frame saves one Final frame as a PNG for inspection.
|
|
35
|
+
login opens a separate browser; close its window after logging in to save the profile.
|
|
36
|
+
A Look is a take's reusable styling. Looks are saved locally (.cuetake/looks in this directory)
|
|
37
|
+
unless --global; a local Look hides a global one with the same name. apply rewrites edit.json.
|
|
38
|
+
Scenario files are trusted JavaScript. Recording runs locally, without audio.
|
|
39
|
+
`;
|
|
40
|
+
try {
|
|
41
|
+
const { values, positionals } = parseArgs({ args: process.argv.slice(2), allowPositionals: true, options: { out: { type: 'string' }, help: { type: 'boolean', short: 'h' }, 'auth-profile': { type: 'string' }, headed: { type: 'boolean' }, look: { type: 'string', multiple: true }, at: { type: 'string' }, global: { type: 'boolean' }, replace: { type: 'boolean' } } });
|
|
42
|
+
const [command, target] = positionals, looks = values.look ?? [];
|
|
43
|
+
const print = data => console.log(JSON.stringify(data, null, 2));
|
|
44
|
+
if (values.help || !command) console.log(help);
|
|
45
|
+
else if (command === 'doctor') { const result = await doctor(); console.log(JSON.stringify(result, null, 2)); if (!result.ok) process.exitCode = 1; }
|
|
46
|
+
else if (command === 'install-browser') console.log(JSON.stringify(await installBrowser(), null, 2));
|
|
47
|
+
else if (command === 'record' && target && looks.length <= 1) print(await recordScenario(target, values.out, { authProfile: values['auth-profile'], look: looks[0], headed: values.headed }));
|
|
48
|
+
else if (command === 'preview' && target) print(await previewTake(target, looks, { at: values.at === undefined ? undefined : Number(values.at) }));
|
|
49
|
+
else if (command === 'render' && target) { await renderTake(target); console.log(JSON.stringify(await verifyTake(target), null, 2)); }
|
|
50
|
+
else if (command === 'verify' && target) console.log(JSON.stringify(await verifyTake(target), null, 2));
|
|
51
|
+
else if (command === 'frame' && target && positionals[2]) {
|
|
52
|
+
const out = resolve(values.out || join(target, `frame-${positionals[2]}s.png`));
|
|
53
|
+
await writeFile(out, await extractFrame(join(target, 'final.mp4'), Number(positionals[2])));
|
|
54
|
+
console.log(out);
|
|
55
|
+
}
|
|
56
|
+
else if (command === 'login' && target && positionals[2]) console.log(JSON.stringify(await login(positionals[2], target), null, 2));
|
|
57
|
+
else if (command === 'look' && target === 'list') print(await listLooks());
|
|
58
|
+
else if (command === 'look' && target === 'save' && positionals[3]) print(await saveLookFromTake(positionals[2], positionals[3], { global: values.global, replace: values.replace }));
|
|
59
|
+
else if (command === 'look' && target === 'apply' && positionals[3]) print(await applyLookToTake(positionals[2], positionals[3]));
|
|
60
|
+
else if (command === 'look' && target === 'rm' && positionals[2]) print(await removeLook(positionals[2], { global: values.global }));
|
|
61
|
+
else throw new Error(`Unknown or incomplete command.\n${help}`);
|
|
62
|
+
} catch (error) { console.error(`CueTake: ${error.message}`); process.exitCode = 1; }
|
package/src/cursor.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cursor and click-effect state at a moment of a Take, derived from the Timeline.
|
|
3
|
+
* Pure functions shared by Node and the render page; CSS pixels and seconds throughout.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/** The pointer position at `t`, interpolated between samples; null before the first sample. */
|
|
7
|
+
export function pointerAt(pointer, t) {
|
|
8
|
+
if (!pointer.length || t < pointer[0][0]) return null;
|
|
9
|
+
let low = 0, high = pointer.length - 1;
|
|
10
|
+
while (low < high) { const mid = (low + high + 1) >> 1; if (pointer[mid][0] <= t) low = mid; else high = mid - 1; }
|
|
11
|
+
const [t0, x0, y0] = pointer[low], next = pointer[low + 1];
|
|
12
|
+
if (!next || next[0] === t0) return { x: x0, y: y0 };
|
|
13
|
+
const k = (t - t0) / (next[0] - t0);
|
|
14
|
+
return { x: x0 + (next[1] - x0) * k, y: y0 + (next[2] - y0) * k };
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Presses that spark: clicks at their point, drags where they start. */
|
|
18
|
+
export function presses(events) {
|
|
19
|
+
return events.flatMap(event => event.type === 'click' ? [{ t: event.t, x: event.x, y: event.y }]
|
|
20
|
+
: event.type === 'drag' ? [{ t: event.t, ...event.from }] : []);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Sparks alive at `t`, each with its progress from 0 to 1. */
|
|
24
|
+
export function sparksAt(pressList, clickEffect, t) {
|
|
25
|
+
if (clickEffect.style === 'none') return [];
|
|
26
|
+
const life = clickEffect.duration / 1000;
|
|
27
|
+
return pressList.filter(p => t >= p.t && t < p.t + life).map(p => ({ x: p.x, y: p.y, progress: (t - p.t) / life }));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Arrow outline in its 28×36 design box; the hotspot is the tip at (2, 2). */
|
|
31
|
+
export const ARROW_PATH = 'M2 2 L2 27 L8.5 21 L14 33 L19 30.5 L13.5 19 L23 19 Z';
|
|
32
|
+
|
|
33
|
+
/** Cursor sprite geometry in CSS pixels: drawn size and the hotspot offset from its top-left. */
|
|
34
|
+
export function cursorGeometry(cursor) {
|
|
35
|
+
return cursor.style === 'arrow'
|
|
36
|
+
? { width: cursor.size, height: cursor.size * 36 / 28, hotspot: { x: cursor.size * 2 / 28, y: cursor.size * 2 / 28 } }
|
|
37
|
+
: { width: cursor.size, height: cursor.size, hotspot: { x: cursor.size / 2, y: cursor.size / 2 } };
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Draws one spark centered in a 2D context whose unit is one CSS pixel. */
|
|
41
|
+
export function drawSpark(ctx, x, y, progress, clickEffect, color) {
|
|
42
|
+
const eased = 1 - (1 - progress) ** 3;
|
|
43
|
+
const distance = 5 + eased * clickEffect.radius;
|
|
44
|
+
const length = clickEffect.length * (1 - eased);
|
|
45
|
+
ctx.globalAlpha = 1 - progress;
|
|
46
|
+
ctx.lineCap = 'round';
|
|
47
|
+
for (let i = 0; i < clickEffect.count; i++) {
|
|
48
|
+
const angle = 2 * Math.PI * i / clickEffect.count + Math.PI / 8;
|
|
49
|
+
ctx.beginPath();
|
|
50
|
+
ctx.moveTo(x + distance * Math.cos(angle), y + distance * Math.sin(angle));
|
|
51
|
+
ctx.lineTo(x + (distance + length) * Math.cos(angle), y + (distance + length) * Math.sin(angle));
|
|
52
|
+
// A dark edge under a cursor-colored core stays legible on light and dark pages.
|
|
53
|
+
ctx.strokeStyle = '#171717'; ctx.lineWidth = 4.5; ctx.stroke();
|
|
54
|
+
ctx.strokeStyle = color; ctx.lineWidth = 2.5; ctx.stroke();
|
|
55
|
+
}
|
|
56
|
+
ctx.globalAlpha = 1;
|
|
57
|
+
}
|
package/src/director.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/** Timed, viewport-aligned interactions shared by all scenarios. */
|
|
2
|
+
export function createDirector(page, startedAt, fps, focusTargets, wideWindows) {
|
|
3
|
+
let cursor = { x: 0, y: 0 };
|
|
4
|
+
const wait = ms => page.waitForTimeout(Math.max(0, ms));
|
|
5
|
+
const time = () => (Date.now() - startedAt) / 1000;
|
|
6
|
+
async function move(x, y, duration = 500) {
|
|
7
|
+
const from = { ...cursor };
|
|
8
|
+
const start = Date.now();
|
|
9
|
+
const frames = Math.max(1, Math.round(duration * fps / 1000));
|
|
10
|
+
for (let i = 1; i <= frames; i++) {
|
|
11
|
+
const t = i / frames;
|
|
12
|
+
const k = t * t * (3 - 2 * t);
|
|
13
|
+
await page.mouse.move(from.x + (x - from.x) * k, from.y + (y - from.y) * k);
|
|
14
|
+
await wait(start + i * duration / frames - Date.now());
|
|
15
|
+
}
|
|
16
|
+
cursor = { x, y };
|
|
17
|
+
}
|
|
18
|
+
// Clicks, typing and drags are recorded by the in-page probe; only deliberate camera choices live here.
|
|
19
|
+
const focus = (box, t = time()) => focusTargets.push({ t, box });
|
|
20
|
+
/** Options may be a bare number for the action's main timing; `focus: false` keeps the camera wide. */
|
|
21
|
+
const options = (value, key) => typeof value === 'number' ? { [key]: value } : value ?? {};
|
|
22
|
+
async function act({ focus: follow = true }, action) {
|
|
23
|
+
const start = time();
|
|
24
|
+
try { return await action(); }
|
|
25
|
+
finally { if (follow === false) wideWindows.push({ start, end: time() }); }
|
|
26
|
+
}
|
|
27
|
+
function click(locator, opts) {
|
|
28
|
+
const { duration = 450, ...rest } = options(opts, 'duration');
|
|
29
|
+
return act(rest, async () => {
|
|
30
|
+
const target = typeof locator === 'string' ? page.locator(locator) : locator;
|
|
31
|
+
const box = await target.boundingBox();
|
|
32
|
+
if (!box) throw new Error('Click target has no visible bounding box');
|
|
33
|
+
await move(box.x + box.width / 2, box.y + box.height / 2, duration);
|
|
34
|
+
await target.click();
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function type(locator, text, opts) {
|
|
38
|
+
const { msPerChar = 70, ...rest } = options(opts, 'msPerChar');
|
|
39
|
+
return act(rest, async () => {
|
|
40
|
+
await click(locator, rest);
|
|
41
|
+
await page.keyboard.type(text, { delay: msPerChar });
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function drag(from, to, opts) {
|
|
45
|
+
const { duration = 1200, ...rest } = options(opts, 'duration');
|
|
46
|
+
return act(rest, async () => {
|
|
47
|
+
await move(from.x, from.y, 400);
|
|
48
|
+
await page.mouse.down();
|
|
49
|
+
try { await move(to.x, to.y, duration); }
|
|
50
|
+
finally { await page.mouse.up(); }
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return { page, wait, time, at: seconds => wait(seconds * 1000 - (Date.now() - startedAt)), move, click, type, drag, focus };
|
|
54
|
+
}
|
package/src/edit.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SHORT_SIDE, CHROME_HEIGHT, BACKGROUNDS } from './stage.js';
|
|
3
|
+
|
|
4
|
+
/** An Edit holds every choice Render makes; a Scenario's config only seeds the first one. */
|
|
5
|
+
export const evenSize = z.number().int().min(240).max(7680).refine(n => n % 2 === 0, 'Must be an even pixel count');
|
|
6
|
+
const box = z.object({ x: z.number(), y: z.number(), width: z.number().nonnegative(), height: z.number().nonnegative() });
|
|
7
|
+
|
|
8
|
+
// size names the Final's short side; quality is the H.264 quantizer (lower is sharper and larger).
|
|
9
|
+
export const outputFields = z.object({
|
|
10
|
+
size: z.union([z.enum(Object.keys(SHORT_SIDE)), evenSize]).default('2160p'),
|
|
11
|
+
aspect: z.enum(['16:9', '1:1', '9:16']).default('16:9'),
|
|
12
|
+
quality: z.number().int().min(10).max(40).default(22),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// The page in a window on a background. Radius is in 1080p pixels.
|
|
16
|
+
export const frameFields = z.object({
|
|
17
|
+
window: z.enum(Object.keys(CHROME_HEIGHT)).default('browser'),
|
|
18
|
+
background: z.enum([...Object.keys(BACKGROUNDS), 'auto', 'blur']).default('aurora'),
|
|
19
|
+
padding: z.number().min(0).max(0.3).default(0.08),
|
|
20
|
+
radius: z.number().min(0).max(48).default(12),
|
|
21
|
+
shadow: z.boolean().default(true),
|
|
22
|
+
url: z.string().max(200).optional(),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
/** Times are seconds except clickEffect.duration, which is milliseconds; geometry is CSS pixels. */
|
|
26
|
+
export const editFields = {
|
|
27
|
+
cursor: z.object({ style: z.enum(['arrow', 'dot']).default('arrow'), size: z.number().min(12).max(64).default(24), color: z.string().regex(/^#[a-fA-F0-9]{6}$/).default('#ffffff') }).default({}),
|
|
28
|
+
clickEffect: z.object({ style: z.enum(['spark', 'none']).default('spark'), radius: z.number().min(8).max(80).default(32), length: z.number().min(4).max(40).default(16), count: z.number().int().min(4).max(16).default(8), duration: z.number().min(150).max(1000).default(420) }).default({}),
|
|
29
|
+
output: outputFields.default({}),
|
|
30
|
+
// `false` lets the page fill the Final.
|
|
31
|
+
frame: z.union([z.literal(false), frameFields]).default({}),
|
|
32
|
+
// See camera.js. Each target is framed with `padding` CSS px around it, zooming at most `maxZoom`;
|
|
33
|
+
// fits below `minZoom` stay wide. The camera arrives `lead` before an action, holds `hold` after the
|
|
34
|
+
// last one in a segment, settles in about `response`, and returns wide `endWide` before the end.
|
|
35
|
+
camera: z.object({
|
|
36
|
+
maxZoom: z.number().min(1).max(4).default(2), minZoom: z.number().min(1).max(4).default(1.2), padding: z.number().min(0).max(400).default(48),
|
|
37
|
+
lead: z.number().min(0).max(3).default(0.6), hold: z.number().min(0).max(30).default(1.5), chainGap: z.number().min(0).max(30).default(2),
|
|
38
|
+
response: z.number().min(0.1).max(3).default(0.6), follow: z.boolean().default(true), endWide: z.number().min(0).max(10).default(1.5),
|
|
39
|
+
}).default({}),
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** A camera target is a CSS-pixel box the camera reaches at `t` seconds and holds at least until `until`, optionally at a fixed `zoom`. */
|
|
43
|
+
const target = z.object({ t: z.number().nonnegative(), box, until: z.number().nonnegative().optional(), zoom: z.number().min(1).max(4).optional() });
|
|
44
|
+
|
|
45
|
+
export const editSchema = z.object({
|
|
46
|
+
schemaVersion: z.literal(2),
|
|
47
|
+
...editFields,
|
|
48
|
+
camera: editFields.camera.removeDefault().extend({ targets: z.array(target).default([]) }).default({}),
|
|
49
|
+
// The Final's frame rate; a new Take takes it from the Scenario's capture rate.
|
|
50
|
+
output: outputFields.extend({ fps: z.union([z.literal(30), z.literal(60)]).default(60) }).default({}),
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Camera targets: observed clicks, typing and drags, except those inside a `wide` window ({ start, end }
|
|
55
|
+
* seconds) from an action with `focus: false`. Like a manual zoom in Screen Studio, an explicit focus
|
|
56
|
+
* target replaces only the automatic targets inside its own span (from `lead` before it to `hold` after).
|
|
57
|
+
*/
|
|
58
|
+
export function cameraTargets(timeline, focus, wide = [], { lead, hold } = editFields.camera.parse({})) {
|
|
59
|
+
const spans = focus.map(f => ({ start: f.t - lead, end: (f.until ?? f.t) + hold }));
|
|
60
|
+
const inside = (t, windows) => windows.some(w => t >= w.start && t <= w.end);
|
|
61
|
+
const automatic = timeline.events.filter(event => !inside(event.t, wide) && !inside(event.t, spans)).flatMap(event => {
|
|
62
|
+
if (event.type === 'click' && event.box) return [{ t: event.t, box: event.box }];
|
|
63
|
+
if (event.type === 'type' && event.box) return [{ t: event.t, box: event.box, until: event.end }];
|
|
64
|
+
if (event.type === 'drag') {
|
|
65
|
+
const x = Math.min(event.from.x, event.to.x), y = Math.min(event.from.y, event.to.y);
|
|
66
|
+
return [{ t: event.t, box: { x, y, width: Math.abs(event.to.x - event.from.x), height: Math.abs(event.to.y - event.from.y) }, until: event.end }];
|
|
67
|
+
}
|
|
68
|
+
return [];
|
|
69
|
+
});
|
|
70
|
+
return [...automatic, ...focus].sort((a, b) => a.t - b.t);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function createEdit(config, timeline, focus, wide = []) {
|
|
74
|
+
return editSchema.parse({
|
|
75
|
+
schemaVersion: 2,
|
|
76
|
+
cursor: config.cursor, clickEffect: config.clickEffect, output: { ...config.output, fps: config.capture.fps },
|
|
77
|
+
// The browser chrome shows the Scenario's host unless the config names something else.
|
|
78
|
+
frame: config.frame && { url: new URL(config.url).host, ...config.frame },
|
|
79
|
+
camera: { ...config.camera, targets: cameraTargets(timeline, focus, wide, config.camera) },
|
|
80
|
+
});
|
|
81
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
|
+
import { spawn } from 'node:child_process';
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
4
|
+
import { dirname, join } from 'node:path';
|
|
5
|
+
import { chromium } from 'playwright';
|
|
6
|
+
|
|
7
|
+
/** Checks what CueTake needs; installs nothing. Each failed check names the exact fix. */
|
|
8
|
+
export async function doctor() {
|
|
9
|
+
const checks = [];
|
|
10
|
+
const [major, minor] = process.versions.node.split('.').map(Number);
|
|
11
|
+
checks.push(major > 20 || (major === 20 && minor >= 10)
|
|
12
|
+
? { name: 'node', ok: true, version: process.versions.node }
|
|
13
|
+
: { name: 'node', ok: false, version: process.versions.node, fix: 'Install Node 20.10 or newer.' });
|
|
14
|
+
const browserPath = chromium.executablePath();
|
|
15
|
+
try { await fs.access(browserPath); checks.push({ name: 'chromium', ok: true, path: browserPath }); }
|
|
16
|
+
catch { checks.push({ name: 'chromium', ok: false, fix: 'cuetake install-browser (downloads about 150 MB; ask the user first)' }); }
|
|
17
|
+
const platform = process.platform === 'darwin'
|
|
18
|
+
? { name: 'platform', ok: true, value: 'macOS' }
|
|
19
|
+
: { name: 'platform', ok: true, value: process.platform, note: 'Only macOS is verified; capture and Render may behave differently here.' };
|
|
20
|
+
checks.push(platform);
|
|
21
|
+
return { ok: checks.every(c => c.ok), checks };
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Downloads the Chromium build that CueTake's own Playwright version drives. Running
|
|
26
|
+
* `npx playwright install` instead may resolve a newer Playwright and fetch a build CueTake never uses.
|
|
27
|
+
*/
|
|
28
|
+
export function installBrowser() {
|
|
29
|
+
const cli = join(dirname(createRequire(import.meta.url).resolve('playwright/package.json')), 'cli.js');
|
|
30
|
+
return new Promise((resolve, reject) => {
|
|
31
|
+
// Progress goes to stderr so stdout stays the JSON result.
|
|
32
|
+
const child = spawn(process.execPath, [cli, 'install', 'chromium', '--no-shell'], { stdio: ['ignore', 2, 2] });
|
|
33
|
+
child.on('error', reject);
|
|
34
|
+
child.on('close', code => code === 0 ? resolve({ installed: true, path: chromium.executablePath() }) : reject(new Error(`Browser install exited with ${code}`)));
|
|
35
|
+
});
|
|
36
|
+
}
|