feat(workbench): 分层记忆——长期记忆+项目记忆,派发注入与成果自动记账(0.10.0)
This commit is contained in:
parent
05795c4d69
commit
585f4cda3b
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue