Skip to content

fix(packs): uninstall 受保护中止 + DRY 回收站策略 - #72

Merged
Tanya7z merged 2 commits into
mainfrom
cursor/bc-06f7352c-8019-402f-9471-d0147fae270c-6b1d
Jul 24, 2026
Merged

fix(packs): uninstall 受保护中止 + DRY 回收站策略#72
Tanya7z merged 2 commits into
mainfrom
cursor/bc-06f7352c-8019-402f-9471-d0147fae270c-6b1d

Conversation

@cursor

@cursor cursor Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • 审查 main@8bb9590(世界包卸载回收站)后的 SOLID 问题并直接打补丁。
  • LSPpacks uninstallsfmc-modules / sfmc-modules-rp 在碰配对 RP / removeBinding 之前中止,避免「拒绝卸载」仍清绑定。
  • DIP:卸载结果结构化,CLI 再格式化文案;uninstallInstalledPack 去掉虚设 ok/reason
  • DRY/OCPDEFAULT_PACK_UNINSTALL + resolveUninstallTrashDir 收拢 purge/recycleBin/默认路径。
  • 删除误提交的仓根 module-lock.json,并 ignore /module-lock.json

审查(本轮 push)

级别 原则 问题
MAJOR LSP 受保护主包仍继续卸配对 RP / 清 binding
MAJOR DIP 卸载结果与彩色文案耦合;原语返回虚设 ok
MAJOR DRY/OCP packs/_trash / recycle 判定多处手写
MINOR 仓根 module-lock.json 误提交

ootb@8bb9590:success 30111027398(本轮无 wf 红)。

Test plan

  • npm run build -w @sfmc-bds/sdk -w @sfmc-bds/bds-tools -w @sfmc-bds/cli -w @sfmc-bds/db-server
  • cd bds-tools && node --test world-packs.test.mjs(7 pass)
  • cd sfmc && node --test pack-update-config.test.mjs pack-update-policy.test.mjs terminal-progress.test.mjs world-packs-uninstall.test.mjs(20 pass)
  • node --test db-server/dist/runtime.test.js(13 pass)
Open in Web View Automation 

cursoragent and others added 2 commits July 24, 2026 17:00
- Abort packs uninstall for platform packs before paired RP / binding side effects (LSP)
- Structure uninstall outcomes separately from CLI formatting (DIP)
- Centralize DEFAULT_PACK_UNINSTALL + resolveUninstallTrashDir (DRY/OCP)
- Tighten uninstallInstalledPack result type (remove unused ok/reason)
- Drop accidental root module-lock.json; ignore it going forward
- Cover trash/purge/missing + protected-folder contracts with tests

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

cursor Bot commented Jul 24, 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 de4ce76 into main Jul 24, 2026
1 check passed
@Tanya7z
Tanya7z deleted the cursor/bc-06f7352c-8019-402f-9471-d0147fae270c-6b1d branch July 24, 2026 17:24
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