fix: install Studio Linux preview patch and verify all gallery pages

This commit is contained in:
Clintchiz committed 2026-10-19 14:09:46 +05:30
1 parent 953e928b05
commit fac1c4461f
7 files changed
+78 -7

No files matched your search

+18
View File
@@ -105,6 +105,24 @@ try {
!(await fetch(origin + url)).ok
)
throw Error("Studio preview was not mounted under the app path.");
for (let page = 0; page < 7; page++) {
const gallery = await fetch(origin + "/design-studio/api/preview", {
method: "POST",
headers: { "content-type": "application/json", origin },
body: JSON.stringify({
system: CORE_DESIGN_SYSTEMS.soft,
content: "catalog",
page,
}),
});
if (!gallery.ok)
throw Error(
`Component gallery page ${page + 1} failed: ${await gallery.text()}`,
);
const artifact = await gallery.json();
if (!(await fetch(origin + artifact.url)).ok)
throw Error(`Gallery page ${page + 1} did not render.`);
}
console.log(
"Compiled server serves component pages, Studio assets, export-only APIs and previews on one port.",
);