From 585f4cda3b77a5315dac2f8efd64ba6c5dc3abc0 Mon Sep 17 00:00:00 2001 From: QQ Date: Tue, 10 Nov 2026 21:50:39 +0800 Subject: [PATCH] =?UTF-8?q?feat(workbench):=20=E5=88=86=E5=B1=82=E8=AE=B0?= =?UTF-8?q?=E5=BF=86=E2=80=94=E2=80=94=E9=95=BF=E6=9C=9F=E8=AE=B0=E5=BF=86?= =?UTF-8?q?+=E9=A1=B9=E7=9B=AE=E8=AE=B0=E5=BF=86=EF=BC=8C=E6=B4=BE?= =?UTF-8?q?=E5=8F=91=E6=B3=A8=E5=85=A5=E4=B8=8E=E6=88=90=E6=9E=9C=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E8=AE=B0=E8=B4=A6=EF=BC=880.10.0=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/workbench-preflight.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/workbench-preflight.mjs b/scripts/workbench-preflight.mjs index 574af2f..15aea9f 100644 --- a/scripts/workbench-preflight.mjs +++ b/scripts/workbench-preflight.mjs @@ -5,7 +5,7 @@ // 1. profile 里到底有没有把本插件链进去(dependencies + dsh.profile.bundles) // 2. 链接指向的目录里,exports 声明的那个文件在不在 // 3. 那个文件是不是一段能解析的 JS(语法坏了会让整页白屏,且报错很难看懂) -// 4. Host 侧装配能不能在内存账本上跑起来(13 条路由 + bootstrap 可用) +// 4. Host 侧装配能不能在内存账本上跑起来(16 条路由 + bootstrap 可用) // // 用法:node scripts/workbench-preflight.mjs // 退出码:0 全通;1 有失败项(打印哪一项失败、为什么)。 @@ -84,7 +84,7 @@ check('客户端 bundle 语法可解析(语法错会让整页白屏)', () => return `${Math.round(text.length / 1024)} KB` }) -check('Host 侧装配:内存账本上能起 13 条路由', () => { +check('Host 侧装配:内存账本上能起 16 条路由', () => { const routes = new Map() const fakeCtx = { get: () => undefined, @@ -98,7 +98,7 @@ check('Host 侧装配:内存账本上能起 13 条路由', () => { const store = new WorkbenchStore({ file: null }) const host = createWorkbenchHost(fakeCtx, { store, startReconciler: false, load: false }) try { - if (routes.size !== 13) throw new Error(`注册了 ${routes.size} 条路由,预期 13 条`) + if (routes.size !== 16) throw new Error(`注册了 ${routes.size} 条路由,预期 16 条`) // bootstrap 要落在具体项目上才有席位;这里现建一个临时项目,不写磁盘。 const project = host.service.registerProject({ hostWorkspaceId: 'preflight' }).project const boot = host.service.bootstrap(project.id)