fix(ci): 修复模块抽取后 ootb npm install 崩溃 + 空 catalog 工具链#16
Closed
cursor[bot] wants to merge 3 commits into
Closed
Conversation
模块抽到 Tanya7z/sfmc-modules 后 lockfile 仍保留 node_modules/@sfmc/module-* link 指向已删除的 modules/packages/*,导致 npm arborist 读取 extraneous 崩溃, ootb「Install root deps」直接失败。 Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
业务模块抽离后 catalog 为空是合法平台壳状态,但 check-catalog/ootb/smoke 仍硬性要求非空,且 fetch-module unzip 未处理 Windows 反斜杠路径。 - 新增 tools/rebuild-catalog.js:从 packages/*/sapi/manifest 生成 catalog(DRY) - fetch-module 安装后自动 rebuild;unzip 归一化 \\ → / - check-catalog / ootb / smoke / sim 允许空 catalog,并校验 services - ootb CI 在 smoke 前安装 afk fixture 覆盖启停翻转 - gitignore 忽略已安装 packages/* 与 registry 缓存 - 清理过期 _manifests(与空 packages 对齐) Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
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.
Summary
main@afb4167(模块抽到
Tanya7z/sfmc-modules)后 ootb 在 Install root deps 失败:Cannot read properties of undefined (reading 'extraneous')。根因
package-lock.json仍保留已删除modules/packages/*的 workspace link → npm arborist 崩溃。check-catalog/ootb/smoke仍硬性要求非空,与「远程拉取业务包」模型不一致。fetch-moduleunzip 未归一化 Windows\路径,Linux 写出字面量sapi\manifest.json,install 后 catalog 仍为空。修复
npm installtools/rebuild-catalog.js(packages manifest → catalog 单一真相);fetch-module/sfmc module uninstall联动\→/afkfixture 覆盖启停_manifests验证
npm install✅、check-ootb6/6 ✅、空 catalog smoke ✅、afk fixture 启停翻转 ✅SOLID 审查(本 push 范围)
_manifests残留已抽模块 → 已清空不重复 #13/#14 的 economy SQL / service 权限门改动。