Skip to content

fix(cli): CLI polish — info command dimensions, all templates, non-TTY ANSI codes#136

Closed
miguel-heygen wants to merge 3 commits intomainfrom
fix/cli-polish
Closed

fix(cli): CLI polish — info command dimensions, all templates, non-TTY ANSI codes#136
miguel-heygen wants to merge 3 commits intomainfrom
fix/cli-polish

Conversation

@miguel-heygen
Copy link
Copy Markdown
Collaborator

Summary

  • hyperframes info reads actual data-width/data-height attributes
  • All 9 templates included in build output
  • ANSI escape codes suppressed in non-TTY contexts

Consolidates PRs #122, #123, #124.

🤖 Generated with Claude Code

The info command was hardcoding dimensions based on portrait/landscape
detection, which defaulted to portrait because parseHtml() doesn't read
data-width/data-height from composition root elements. Now reads the
actual attribute values from the HTML.

Reproducer:
  npx hyperframes init test --template blank --non-interactive
  cd test && npx hyperframes info
  # Shows "1080x1920" (portrait) but index.html has data-width="1920" data-height="1080"
The decision-tree, kinetic-type, product-promo, and nyt-graph templates
existed in source but were not copied to dist/templates/ during build.
Users selecting these templates from init --help got an unhandled
ENOENT crash with a raw Node.js stack trace.

Reproducer:
  npx hyperframes init test --template decision-tree --non-interactive
  # Crashes: Error: ENOENT: no such file or directory, lstat '.../dist/templates/decision-tree'
renderProgress() was writing \r\x1b[2K escape codes even when stdout
is not a TTY, corrupting output for CI pipelines and AI agents.
Now writes clean text lines at 10% intervals when not a TTY.

Reproducer:
  cd my-video
  npx hyperframes render --output out.mp4 2>&1 | cat
  # Output contained raw escape codes: \x1b[2K
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant