Skip to content

fix(cli): list the examples init --example accepts in docs examples - #5446

Open
Muhtasim-Munif-Fahim wants to merge 1 commit into
heygen-com:mainfrom
Muhtasim-Munif-Fahim:fix/docs-examples-topic
Open

Muhtasim-Munif-Fahim wants to merge 1 commit into
heygen-com:mainfrom
Muhtasim-Munif-Fahim:fix/docs-examples-topic

Conversation

@Muhtasim-Munif-Fahim

Copy link
Copy Markdown

Summary

hyperframes docs examples listed title-card and video-edit, which init --example does not accept, and none of the eight examples that live in registry/examples/.

  • packages/cli/src/docs/examples.md now lists blank plus every example in registry/examples/ (decision-tree, kinetic-type, nyt-graph, play-mode, product-promo, swiss-grid, vignelli, warm-grain), each with the description from its registry-item.json. The usage line shows the real form, npx hyperframes init <name> --example <example>.
  • New packages/cli/src/commands/docs.test.ts (the "better still" from the issue): fails when the topic's sections and registry/examples/ disagree, or when an example's description drifts from its registry-item.json.

Fixes #5393

Verification

  • bunx vitest run src/commands/docs.test.ts (in packages/cli) → 2 passed; with the old examples.md both tests fail (expected [ 'blank', 'title-card', 'video-edit' ] to deeply equal [ 'blank', 'decision-tree', … ]).
  • oxfmt and oxlint on the changed files, fallow audit --base origin/main (no new issues), commitlint on the commit message.

AI assistance was used to help find the cause, write the patch, and run tests; I reviewed the change.

The examples topic listed title-card and video-edit, which do not exist,
and none of the eight examples in registry/examples. List blank plus the
registry examples with their registry-item descriptions, and add a test
that fails when the topic and registry/examples disagree.

Fixes heygen-com#5393

This branch has not been deployed

No deployments
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.

hyperframes docs examples lists templates that don't exist

1 participant