Skip to content

fix(pack): catalog 缺失时凭磁盘 manifest 卸过期 BP/RP - #45

Merged
Tanya7z merged 1 commit into
mainfrom
cursor/bc-26835ee0-8da1-42cf-8f44-65c0aa9a5233-cde7
Jul 23, 2026
Merged

fix(pack): catalog 缺失时凭磁盘 manifest 卸过期 BP/RP#45
Tanya7z merged 1 commit into
mainfrom
cursor/bc-26835ee0-8da1-42cf-8f44-65c0aa9a5233-cde7

Conversation

@cursor

@cursor cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

审查 main@5eff389(合入 #44)后的 SOLID/正确性残留,直接补丁。

ootb CI 绿,但 #44 的过期卸装路径在 deploy-catalog 缺失 时仍不完整:

BLOCKER

  • previous = readDeployedCatalog alone:升级前无 catalog、或 catalog 文件丢失时,--clear-rp 只删世界内 RP 目录,world_resource_packs.json 卸旧 UUID
  • 修复:collectDeployedPackUuids 在 deploy/clear 之前同时采集 catalog + 磁盘 BP/RP manifest.json uuid,再 disable 与 desired 不一致的项

MAJOR

  • DRYspawnWorldPack 统一 enable/disable argv;readWorldPackList 成为清单读写单一权威(has-pack / editWorldPackList / 新 list-packs
  • DemetercmdPackList 不再直接解析 world_*_packs.json,改走 list-packs CLI

Tests

bds-tools 7/7(含 list-packs + 无 catalog 卸装回归)

Review principles

DRY · OCP · DIP · LSP · Law of Demeter

Test plan

  • npm run build -w @sfmc-bds/sdk -w @sfmc-bds/bds-tools -w @sfmc-bds/cli
  • npm test -w @sfmc-bds/bds-tools
  • 有 BDS:故意删掉世界 BP 内 sfmc-deploy-catalog.jsonsfmc pack deploy(无 RP)→ 确认旧 RP uuid 从 world_resource_packs.json 消失
Open in Web View Automation 

审查 #44 合入后的残留:
- BLOCKER: deploy-catalog 缺失时 clear-rp 只删目录不卸世界清单
  → collectDeployedPackUuids 同时读 catalog + 磁盘 manifest
- MAJOR DRY: spawnWorldPack / readWorldPackList 统一清单读写
- MAJOR Demeter: cmdPackList 改走 list-packs CLI
- 回归: list-packs + 无 catalog 卸装路径 (bds-tools 7/7)

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
@Tanya7z
Tanya7z marked this pull request as ready for review July 23, 2026 11:15
@cursor

cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@Tanya7z
Tanya7z merged commit 3137643 into main Jul 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants