feat: upgrade embedded HiCAD to latest official source
This commit is contained in:
parent
f65b9e0472
commit
957192cc5c
@ -18,7 +18,7 @@ import { cacheBustZooModelingAppAssets } from "./cache-bust-zoo-modeling-app-ass
|
|||||||
const repoUrl = "https://github.com/KittyCAD/modeling-app.git";
|
const repoUrl = "https://github.com/KittyCAD/modeling-app.git";
|
||||||
const repoRef =
|
const repoRef =
|
||||||
process.env.ZOO_MODELING_APP_REF ||
|
process.env.ZOO_MODELING_APP_REF ||
|
||||||
"6f87f4e66c07c67f09d8f7db284496a3ae3332e7";
|
"f2b345dbb56a851e10d8a742732ab73ee139f025";
|
||||||
const repoTarballUrls = [
|
const repoTarballUrls = [
|
||||||
`https://ghfast.top/https://github.com/KittyCAD/modeling-app/archive/${repoRef}.tar.gz`,
|
`https://ghfast.top/https://github.com/KittyCAD/modeling-app/archive/${repoRef}.tar.gz`,
|
||||||
`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 })`
|
` 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(
|
replaceSource(
|
||||||
"src/network/websocketConnection.ts",
|
"src/lib/engineConnection/websocketConnection.ts",
|
||||||
" if (token) {",
|
" if (token) {",
|
||||||
` if (token && token !== '${proxyToken}') {`
|
` if (token && token !== '${proxyToken}') {`
|
||||||
);
|
);
|
||||||
|
|||||||
@ -3,8 +3,19 @@ import fs from "node:fs";
|
|||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
|
|
||||||
const projectRoot = process.cwd();
|
const projectRoot = process.cwd();
|
||||||
|
const latestReviewedOfficialCommit =
|
||||||
|
"f2b345dbb56a851e10d8a742732ab73ee139f025";
|
||||||
|
|
||||||
test.describe("HiCAD embedded startup", () => {
|
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", () => {
|
test("suppresses the upstream onboarding chooser in embedded mode", () => {
|
||||||
const vendorScript = fs.readFileSync(
|
const vendorScript = fs.readFileSync(
|
||||||
path.join(projectRoot, "scripts/vendor-zoo-modeling-app.mjs"),
|
path.join(projectRoot, "scripts/vendor-zoo-modeling-app.mjs"),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user