diff --git a/docs/packages/cli.mdx b/docs/packages/cli.mdx index d7e9ece34b..7dce511e39 100644 --- a/docs/packages/cli.mdx +++ b/docs/packages/cli.mdx @@ -2432,7 +2432,6 @@ Render parameters mirror local `hyperframes render` where they overlap: | `--fps` | `30` | Integer, 1–240 | | `--quality` | `standard` | `draft`, `standard`, or `high` | | `--format` | `mp4` | `mp4`, `webm`, or `mov` | -| `--page-motion-blur` | current cloud behavior | Pass `off` to disable authored page motion blur. Omit to preserve current behavior. Sends the public API field `page_motion_blur: "off"`. | | `--resolution` | `1080p` | `1080p` or `4k`. 4k bills at 1.5×. | | `--aspect-ratio` | auto | `16:9`, `9:16`, or `1:1`. Auto-detected from a local project's `data-width` and `data-height`, so you rarely need it. The renderer cannot reshape a composition — a value that disagrees with the authored ratio is an error. With `--asset-id` or `--url` the server defaults to `16:9`. | | `--composition` / `-c` | `index.html` | Entry HTML file inside the zip | diff --git a/packages/cli/src/commands/cloud/render.pageMotionBlur.test.ts b/packages/cli/src/commands/cloud/render.pageMotionBlur.test.ts deleted file mode 100644 index 4bcd223a4a..0000000000 --- a/packages/cli/src/commands/cloud/render.pageMotionBlur.test.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { runCommand } from "citty"; -import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; -import render from "./render.js"; -import { CliUsageError, consumeCommandResult } from "../../utils/commandResult.js"; - -const bodies: unknown[] = []; -const baseArgs = ["--asset-id", "asst_fixture", "--no-wait", "--json"]; - -beforeEach(() => { - bodies.length = 0; - vi.stubEnv("HEYGEN_API_KEY", "fixture-key"); - vi.stubEnv("HEYGEN_API_URL", "https://cloud.fixture.invalid"); - vi.spyOn(console, "log").mockImplementation(() => undefined); - vi.spyOn(console, "error").mockImplementation(() => undefined); - vi.stubGlobal("fetch", async (url: unknown, init?: RequestInit) => { - expect(String(url)).toBe("https://cloud.fixture.invalid/v3/hyperframes/renders"); - expect(init?.method).toBe("POST"); - if (typeof init?.body !== "string") throw new Error("Expected a JSON submit body"); - const body: unknown = JSON.parse(init.body); - bodies.push(body); - return Response.json({ data: { render_id: "hfr_fixture" } }, { status: 202 }); - }); -}); - -afterEach(() => { - vi.unstubAllGlobals(); - vi.unstubAllEnvs(); - vi.restoreAllMocks(); - consumeCommandResult(); -}); - -describe("cloud render page motion blur", () => { - it("writes explicit off into the public API request", async () => { - await runCommand(render, { rawArgs: [...baseArgs, "--page-motion-blur", "off"] }); - expect(bodies).toHaveLength(1); - expect(bodies[0]).toHaveProperty("page_motion_blur", "off"); - expect(bodies[0]).not.toHaveProperty("pageMotionBlur"); - }); - - it("omits the override when the flag is absent", async () => { - await runCommand(render, { rawArgs: baseArgs }); - expect(bodies).toHaveLength(1); - expect(bodies[0]).not.toHaveProperty("page_motion_blur"); - }); - - it.each(["on", "false", "", "OFF"])("rejects %j before any cloud request", async (value) => { - await expect( - runCommand(render, { rawArgs: [...baseArgs, "--page-motion-blur", value] }), - ).rejects.toThrow(CliUsageError); - expect(bodies).toHaveLength(0); - }); -}); diff --git a/packages/cli/src/commands/cloud/render.ts b/packages/cli/src/commands/cloud/render.ts index 1717c03bc7..8154c38f57 100644 --- a/packages/cli/src/commands/cloud/render.ts +++ b/packages/cli/src/commands/cloud/render.ts @@ -127,11 +127,6 @@ export default defineCommand({ }, quality: { type: "string", description: "draft | standard | high (default: standard)" }, format: { type: "string", description: "mp4 | webm | mov (default: mp4)" }, - "page-motion-blur": { - type: "string", - description: - "Set off to disable authored page motion blur. Omit to keep the current cloud behavior.", - }, resolution: { type: "string", description: "Resolution tier: 1080p | 4k (default: 1080p; 4k is billed at 1.5x)", @@ -227,9 +222,6 @@ export default defineCommand({ const asJson = Boolean(args.json); const quality = parseEnumFlag(args.quality, VALID_QUALITY, { flag: "--quality" }); const format = parseEnumFlag(args.format, VALID_FORMAT, { flag: "--format" }); - const pageMotionBlur = parseEnumFlag(args["page-motion-blur"], ["off"] as const, { - flag: "--page-motion-blur", - }); const resolution = parseEnumFlag(args.resolution, VALID_RESOLUTION, { flag: "--resolution", }); @@ -309,7 +301,6 @@ export default defineCommand({ quality, format, resolution, - pageMotionBlur, aspectRatio, composition: args.composition, variables, @@ -842,7 +833,6 @@ interface SubmitOptions { fps: number | undefined; quality: "draft" | "standard" | "high" | undefined; format: "mp4" | "webm" | "mov" | undefined; - pageMotionBlur: NonNullable | undefined; resolution: CreateHyperframesRenderRequest["resolution"] | undefined; aspectRatio: CreateHyperframesRenderRequest["aspect_ratio"] | undefined; composition: string | undefined; @@ -880,7 +870,6 @@ function buildRenderBody(opts: SubmitOptions): RenderRequestBody { if (opts.fps !== undefined) body.fps = opts.fps; if (opts.quality !== undefined) body.quality = opts.quality; if (opts.format !== undefined) body.format = opts.format; - if (opts.pageMotionBlur !== undefined) body.page_motion_blur = opts.pageMotionBlur; if (opts.resolution !== undefined) body.resolution = opts.resolution; if (opts.aspectRatio !== undefined) body.aspect_ratio = opts.aspectRatio; if (opts.composition !== undefined) body.composition = opts.composition; diff --git a/scripts/check-no-main-deletions.mjs b/scripts/check-no-main-deletions.mjs index 1199e124e3..ba5d8c9d66 100644 --- a/scripts/check-no-main-deletions.mjs +++ b/scripts/check-no-main-deletions.mjs @@ -2123,6 +2123,10 @@ export const ALLOWED_DELETIONS = new Map([ "skills/remotion-to-hyperframes/scripts/render_diff.sh", "remotion-to-hyperframes now compares with `hyperframes diff` instead of its own shell scripts", ], + [ + "packages/cli/src/commands/cloud/render.pageMotionBlur.test.ts", + "tests for the removed cloud render --page-motion-blur flag; the hosted render API never accepted the field", + ], ]); export function parseBase(argv, fallback = "origin/main") {