mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 16:08:56 +00:00
* feat(cli): share rendered videos through unified reviews (#7135) * feat(share): attach editable project sources to reviews (#7137) * feat(share): measure local sharing outcomes (#7138) * feat(cli): stage the sixty-day publish transition (#7136) * feat(studio): share review pages from local preview (#7140) Advertise the CLI sharing bridge before bootstrapping it so standalone Studio does not request unsupported routes. Preserve origin and session checks. Budget the intended sharing artifact: clean main packs at 8,060,519 bytes versus 8,162,979 with sharing (8,169,168 in CI). Required policy and Unicode tables, bundled sharing code, and Studio controls account for the growth. Set the packed-only budget to 8,577,627, following the 5% headroom convention; retain the unpacked cap and all package checks. * fix(share): persist refusals and improve CLI retry feedback * fix(ci): restore render diagnostics and include sharing workspace * fix(cli): keep sharing owner error codes stable * fix(share): clarify update feedback and align audience changes * fix(share): clarify updates and avoid scratch-file rerenders * fix(cli): report active shares and preserve update channels * fix(cli): resolve update channel when checking registry * fix(ci): refresh sharing package budgets after rebase * fix(share): require consent before uploading project files
71 lines
2.6 KiB
JavaScript
71 lines
2.6 KiB
JavaScript
import assert from "node:assert/strict";
|
|
import { describe, it } from "node:test";
|
|
import {
|
|
isExpectedStudioSmokeError,
|
|
SMOKE_COMPOSITION_HTML,
|
|
studioSmokeApiResponse,
|
|
} from "./studio-runtime-smoke.mjs";
|
|
|
|
function bodyOf(method, path) {
|
|
const response = studioSmokeApiResponse(method, `http://localhost:5199${path}`);
|
|
assert.ok(response);
|
|
return JSON.parse(response.body);
|
|
}
|
|
|
|
describe("Studio runtime smoke fixtures", () => {
|
|
it("bootstraps the sharing entry point without credentials", () => {
|
|
assert.deepEqual(bodyOf("GET", "/api/share/bootstrap"), { csrf: "s".repeat(43) });
|
|
});
|
|
it("matches the collection and project-detail API schemas", () => {
|
|
assert.deepEqual(bodyOf("GET", "/api/projects"), {
|
|
projects: [{ id: "smoke-test", dir: "/tmp/smoke-test", title: "Smoke test" }],
|
|
});
|
|
assert.deepEqual(bodyOf("GET", "/api/projects/smoke-test"), {
|
|
id: "smoke-test",
|
|
dir: "/tmp/smoke-test",
|
|
title: "Smoke test",
|
|
files: ["index.html"],
|
|
compositions: ["index.html"],
|
|
});
|
|
});
|
|
|
|
it("returns file content rather than the unrelated file-tree shape", () => {
|
|
assert.deepEqual(bodyOf("GET", "/api/projects/smoke-test/files/index.html"), {
|
|
filename: "index.html",
|
|
content: SMOKE_COMPOSITION_HTML,
|
|
});
|
|
});
|
|
|
|
it("returns iterable collections for eager Studio queries", () => {
|
|
assert.deepEqual(bodyOf("GET", "/api/projects/smoke-test/renders"), { renders: [] });
|
|
assert.deepEqual(bodyOf("GET", "/api/projects/smoke-test/gsap-animations/index.html"), {
|
|
animations: [],
|
|
timelineVar: "tl",
|
|
preamble: "",
|
|
postamble: "",
|
|
});
|
|
assert.deepEqual(bodyOf("GET", "/api/projects/smoke-test/lint"), { findings: [] });
|
|
});
|
|
|
|
it("returns an image for composition thumbnail requests", () => {
|
|
const response = studioSmokeApiResponse(
|
|
"GET",
|
|
"http://localhost:5199/api/projects/smoke-test/thumbnail/index.html?t=3",
|
|
);
|
|
assert.ok(response);
|
|
assert.equal(response.contentType, "image/svg+xml");
|
|
});
|
|
|
|
it("marks unknown API requests as fixture failures", () => {
|
|
assert.equal(studioSmokeApiResponse("GET", "http://localhost:5199/api/new-endpoint"), null);
|
|
assert.equal(studioSmokeApiResponse("GET", "http://localhost:5199/src/main.tsx"), undefined);
|
|
});
|
|
|
|
it("does not suppress generic JavaScript or network failures", () => {
|
|
assert.equal(isExpectedStudioSmokeError("Cannot read properties of undefined"), false);
|
|
assert.equal(isExpectedStudioSmokeError("value is not iterable"), false);
|
|
assert.equal(isExpectedStudioSmokeError("Failed to fetch"), false);
|
|
assert.equal(isExpectedStudioSmokeError("GET /favicon.ico 404"), true);
|
|
});
|
|
});
|