mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 12:54:29 +00:00
Renames the motion-surfacing tool from `hyperframes keyframes` to `hyperframes motion`, renames the implementation from keyframes*.ts to motion*.ts (keeping the keyframe data model name where still accurate), and renames the shipped skill from hyperframes-keyframes to hyperframes-motion. Expands the skill from a command reference into a full motion-design workflow: reading motion, 3D angle verification, layered GSAP motion, one-shot reference reproduction, diagnostic checks, and eval-derived craft guidance.
30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
import { readFileSync } from "node:fs";
|
|
import { dirname, join } from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
const cliSource = readFileSync(join(dirname(fileURLToPath(import.meta.url)), "cli.ts"), "utf8");
|
|
const helpSource = readFileSync(join(dirname(fileURLToPath(import.meta.url)), "help.ts"), "utf8");
|
|
|
|
function commandLoaderBlock(): string {
|
|
const match = cliSource.match(/const commandLoaders = \{([\s\S]*?)\n\};/);
|
|
expect(match).toBeTruthy();
|
|
return match![1]!;
|
|
}
|
|
|
|
describe("CLI command registration", () => {
|
|
it("registers keyframes as the only keyframe inspection command", () => {
|
|
const loaders = commandLoaderBlock();
|
|
|
|
expect(loaders).toMatch(/\bkeyframes:\s*\(\)\s*=>\s*import\("\.\/commands\/keyframes\.js"\)/);
|
|
expect(loaders).not.toMatch(/\bmotion:\s*\(\)\s*=>/);
|
|
expect(loaders).not.toContain("./commands/motion.js");
|
|
});
|
|
|
|
it("shows keyframes in root help", () => {
|
|
expect(helpSource).toContain(
|
|
'["keyframes", "Inspect keyframes and render onion-shot diagnostics"]',
|
|
);
|
|
});
|
|
});
|