fbf449f9e0
Settle the cast toolchain (STYLE.md #9) and build the demo pipeline end to end. Driver: autocast, chosen by spike — its !Interactive feeds keys to the running TUI and captures the redraw, the right model for a full-screen crossterm app. asciinema-automation was rejected (assumes shell echo/\n Enter; produced a garbled cast against the TUI). - add asciinema-player; Cast.astro (player island) + Demo.astro (the WASM-swap seam, ADR-website-001 §3) - casts-src/: human-readable command-lists (casts.mjs) + generate.mjs, exposed as `pnpm casts`; expands steps to autocast YAML and records to public/casts/. Command-lists are the durable source; .cast files are regenerable (final re-record sweep due once the app is locked). - quickstart.cast (create -> add columns -> insert -> show data) embedded on the landing page above the feature cards. Verified: pnpm build clean (25 pages); player + cast bundled and served; landing HTML references the cast. Visual playback check pending (no headless browser here — verify via dev server over the tunnel).
40 lines
1.4 KiB
JavaScript
40 lines
1.4 KiB
JavaScript
/**
|
|
* Cast source definitions — the durable, human-readable source for the
|
|
* asciinema demos (ADR-website-001 §2). `pnpm casts` runs `generate.mjs`,
|
|
* which turns each definition into an autocast YAML and records it to
|
|
* `public/casts/<name>.cast`. Edit these and re-run to re-record as the app
|
|
* evolves; the `.cast` files are regenerable artifacts.
|
|
*
|
|
* Step kinds:
|
|
* { wait: ms } — pause (shown in the recording)
|
|
* { type: 'text', after: ms } — type the text + press Enter, then pause
|
|
* { type: 'text', enter: false } — type without pressing Enter
|
|
* { key: 'Tab'|'Enter', after: ms } — press a single named key
|
|
*
|
|
* Every cast must end by quitting the app (a `quit` step) so the driver
|
|
* returns to the shell prompt.
|
|
*/
|
|
|
|
/** The shared library narrative, trimmed per cast. */
|
|
export const casts = [
|
|
{
|
|
name: 'quickstart',
|
|
title: 'RDBMS Playground — first table to first query',
|
|
width: 90,
|
|
height: 26,
|
|
typeSpeed: '45ms',
|
|
steps: [
|
|
{ wait: 1100 },
|
|
{ type: 'create table authors with pk', after: 1000 },
|
|
{ type: 'add column to authors: name (text)', after: 850 },
|
|
{ type: 'add column to authors: birth_year (int)', after: 900 },
|
|
{
|
|
type: "insert into authors (name, birth_year) values ('Ursula K. Le Guin', 1929)",
|
|
after: 1300,
|
|
},
|
|
{ type: 'show data authors', after: 1800 },
|
|
{ type: 'quit', after: 500 },
|
|
],
|
|
},
|
|
];
|