mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-14 18:01:20 +08:00
505a11c700
PR 2/17 of the catalog system rollout. Physical directory rename to
make room for registry/blocks/ and registry/components/ in future PRs.
No user-visible change.
## What
- git mv templates/ registry/examples/ (all 8 example dirs + templates.json)
- Update packages/cli/src/templates/remote.ts TEMPLATES_DIR path
constant from "templates" to "registry/examples"
- Update scripts/generate-template-previews.ts remoteTemplatesDir to
resolve(repoRoot, "registry/examples")
- Comment update in packages/cli/src/templates/generators.ts
## Why
- Current templates/ dir is a flat "things that scaffold" bucket. The
registry model splits content into examples (full projects — what
today's templates are), blocks (sub-compositions), and components
(effect snippets). registry/examples/ is the canonical home for
what was previously at templates/
- Making room for registry/blocks/ and registry/components/ without
top-level clutter
## How
- git mv preserves history. Remote fetch via giget follows TEMPLATES_DIR,
so updating that one constant is enough for the CLI's remote code path
- The CLI's internal templates/ dir (packages/cli/src/templates/) is a
different thing — it holds `blank` and `_shared` bundled assets plus
the fetch code. Not touched in this PR. Renaming that module belongs
to PR 3 (registry resolver + installer) where the abstraction changes
- templates.json keeps its existing shape and location (now at
registry/examples/templates.json). PR 3 will transform it to the new
registry.json shape introduced in PR 1 and generate a per-item
registry-item.json for each example. Leaving the shape change to PR 3
keeps this PR a pure physical move
## Test plan
- [x] bun run test in packages/cli: 55 passed, 4 pre-existing failures
(SRT/VTT whisper normalizer + lintProject clean-project test) —
identical to main. No regressions
- [x] Manual smoke test: hyperframes init /tmp/x --template blank works
(bundled code path, unchanged)
- [x] bunx oxfmt + bunx oxlint on changed files: clean
- [x] bun run typecheck (core + studio, pre-commit hook): clean
- [ ] Manual smoke test for remote fetch (--template warm-grain): will
work once this PR merges — giget resolves the new path against
GitHub main. Can't be verified locally since the remote path
doesn't exist on origin/main until this lands
## Breaking / migration
None for end users. The CLI flag --template continues to accept the
same template names; the only change is where they live in the repo.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>