mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-11 06:30:03 +00:00
fix(cli): avoid -V collision for init video flag
This commit is contained in:
@@ -132,6 +132,18 @@ describe("hyperframes init flag rename", () => {
|
|||||||
expect(injected).not.toContain("setTimeout");
|
expect(injected).not.toContain("setTimeout");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("-v works as the short alias for --video", () => {
|
||||||
|
const dir = mkdtempSync(join(tmpdir(), "hf-init-test-"));
|
||||||
|
const target = join(dir, "proj");
|
||||||
|
try {
|
||||||
|
const res = runInit([target, "--example", "blank", "--non-interactive", "--skip-skills", "-v", "missing.mp4"]);
|
||||||
|
expect(res.status).toBe(1);
|
||||||
|
expect(res.stderr).toContain("Video file not found: missing.mp4");
|
||||||
|
} finally {
|
||||||
|
rmSync(dir, { recursive: true, force: true });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
it("--template prints a rename hint and exits non-zero", () => {
|
it("--template prints a rename hint and exits non-zero", () => {
|
||||||
const dir = mkdtempSync(join(tmpdir(), "hf-init-test-"));
|
const dir = mkdtempSync(join(tmpdir(), "hf-init-test-"));
|
||||||
const target = join(dir, "proj");
|
const target = join(dir, "proj");
|
||||||
|
|||||||
@@ -588,7 +588,7 @@ export default defineCommand({
|
|||||||
video: {
|
video: {
|
||||||
type: "string",
|
type: "string",
|
||||||
description: "Path to a video file (MP4, WebM, MOV)",
|
description: "Path to a video file (MP4, WebM, MOV)",
|
||||||
alias: "V",
|
alias: "v",
|
||||||
},
|
},
|
||||||
audio: {
|
audio: {
|
||||||
type: "string",
|
type: "string",
|
||||||
|
|||||||
Reference in New Issue
Block a user