feat: upgrade embedded HiCAD to latest official source

This commit is contained in:
134 2026-07-27 19:33:41 +08:00
parent f65b9e0472
commit 957192cc5c
2 changed files with 13 additions and 2 deletions

View File

@ -18,7 +18,7 @@ import { cacheBustZooModelingAppAssets } from "./cache-bust-zoo-modeling-app-ass
const repoUrl = "https://github.com/KittyCAD/modeling-app.git";
const repoRef =
process.env.ZOO_MODELING_APP_REF ||
"6f87f4e66c07c67f09d8f7db284496a3ae3332e7";
"f2b345dbb56a851e10d8a742732ab73ee139f025";
const repoTarballUrls = [
`https://ghfast.top/https://github.com/KittyCAD/modeling-app/archive/${repoRef}.tar.gz`,
`https://github.com/KittyCAD/modeling-app/archive/${repoRef}.tar.gz`,
@ -167,7 +167,7 @@ function patchOfficialSource() {
` ws.addEventListener('open', () => {\n if (token !== '${proxyToken}') {\n ws.send(\n JSON.stringify({\n type: 'headers',\n headers: {\n Authorization: 'Bearer ' + token,\n },\n })\n )\n }\n resolve(ws)\n })`
);
replaceSource(
"src/network/websocketConnection.ts",
"src/lib/engineConnection/websocketConnection.ts",
" if (token) {",
` if (token && token !== '${proxyToken}') {`
);

View File

@ -3,8 +3,19 @@ import fs from "node:fs";
import path from "node:path";
const projectRoot = process.cwd();
const latestReviewedOfficialCommit =
"f2b345dbb56a851e10d8a742732ab73ee139f025";
test.describe("HiCAD embedded startup", () => {
test("pins the latest reviewed official Zoo Design Studio source", () => {
const vendorScript = fs.readFileSync(
path.join(projectRoot, "scripts/vendor-zoo-modeling-app.mjs"),
"utf8"
);
expect(vendorScript).toContain(latestReviewedOfficialCommit);
});
test("suppresses the upstream onboarding chooser in embedded mode", () => {
const vendorScript = fs.readFileSync(
path.join(projectRoot, "scripts/vendor-zoo-modeling-app.mjs"),