fix(ci): 模块外置后 npm install 崩溃 + 空 catalog OOTB/registry 对齐#15
Closed
cursor[bot] wants to merge 2 commits into
Closed
fix(ci): 模块外置后 npm install 崩溃 + 空 catalog OOTB/registry 对齐#15cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
业务包迁出 modules/packages 后 lockfile 仍保留 8 个 link:true 条目指向已删目录, 导致 npm install 在 CI 抛出 Cannot read properties of undefined (reading 'extraneous')。 同步将 remote-controller/dist/ 整目录忽略,与其余 workspace 的 dist 约定一致。 Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
业务模块外置后本地 catalog 允许为空;check-catalog/ootb/smoke/sim 不再把空数组当失败。
同时让 sfmc/src/registry.ts 按 fetch-module 契约解析 { modules: { id→{repo,tag} } },
避免 findUnknownModules 把全部已装模块误判为未知来源(DRY/LSP)。
Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
cursor Bot
pushed a commit
that referenced
this pull request
Jul 22, 2026
index.json 权威形态为 { version, modules: { id → {repo,tag} } }。
sfmc/src/registry.ts 原先把整棵 JSON 当扁平 map,导致 CLI 把 version/
generatedAt 当成模块 id(DRY/LSP 与 fetch-module 分叉)。与 #15 同修。
Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
This was referenced Jul 22, 2026
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
审查
mainpushc559ab4..afb4167(batch 模块外置到Tanya7z/sfmc-modules@modules-v0.4.0+ 删除remote-controller/dist)。ootb run 29895479322 失败于
npm install:Cannot read properties of undefined (reading 'extraneous')。审查分级(DRY / OCP / DIP / LSP / LoD)
package-lock.json残留 8 个link:true指向已删的modules/packages/*npm installcheck-catalog/check-ootb/smoke-modules/sim-new-user仍把空数组当失败modules/catalog合法;强制校验非空的services/catalog.jsonsfmc/src/registry.ts把整份 index 当成扁平 map,而tools/fetch-module.mjs正确读json.modules→findUnknownModules误判全部已装模块.gitignore只忽略remote-controller/dist/index.jsremote-controller/dist/仍未修(记录,避免与 #13/#14 重复刷)
fetch-module安装后不回写modules/catalog.json,db-server 启停 API 仍看不到新装包(需后续“安装→catalog mirror”单一写入路径)modules/packages/{feature-chat,land,gui}的补丁需 rebase/关闭过时 hunkdb.tx录制器语义 / land handlers 未注册 — 见 审查+修复:v2 SOLID(DRY/OCP/DIP/LSP/迪米特) #13验证
npm install --no-audit --no-fund成功node tools/check-catalog.js→OK (0 feature modules, 3 services)SFMC_ROOT=$PWD node tools/check-ootb.js→ 6/6 PASSnode tools/smoke-modules.js→ PASS(空 catalog 基线)npm run build --workspace=@sfmc/sdk --workspace=db-server --workspace=sfmc通过