Skip to content

fix: contracts 精简后 economy 类型内聚 + 解除 qqutil 环依赖 - #46

Merged
Tanya7z merged 3 commits into
mainfrom
cursor/bc-d002d822-0c49-448d-bb4c-423ee7325fc6-117b
Jul 23, 2026
Merged

fix: contracts 精简后 economy 类型内聚 + 解除 qqutil 环依赖#46
Tanya7z merged 3 commits into
mainfrom
cursor/bc-d002d822-0c49-448d-bb4c-423ee7325fc6-117b

Conversation

@cursor

@cursor cursor Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • BLOCKER / CImain@0990780 从 SDK 移除 economy 契约后,db-server 仍从 @sfmc-bds/sdk/contracts 导入 EconomyAccountRow / EconomyTransactionRow,ootb Build all workspacestsc --emitDeclarationOnly 失败(run 29991000606)。行模型改由表所有者 db-server/src/domain/economy.ts 本地定义(DIP/DRY)。
  • MAJOR / Demeter+DIPqqutil.ts 误从 check-update.tslog,与 check-update → qqutil 形成循环依赖;改回 ./log.js,并撤销 check-update 上多余的 export const log
  • MAJOR / LSP:SEA Windows Terminal preferredPowerShell 实际返回完整 … -Command sfmc commandline;重命名为 preferredSfmcCommandline,保留已发现的 pwsh 绝对路径并加引号,避免 Program Files 安装不在 PATH 时启动失败。
  • MINOR:同步 SDK contracts 文档(仅 catalog/lock)。

审查维度

级别 原则
BLOCKER DIP/DRY economy 行类型迁入 domain
MAJOR Demeter/DIP qqutil↔check-update 环依赖
MAJOR LSP SEA 终端 commandline 契约/路径
MINOR DRY contracts 文档漂移

Test plan

  • npm run build --workspaces --if-present
  • npm test -w @sfmc-bds/db-server(13/13)
  • npm test -w @sfmc-bds/bds-tools(6/6)
  • SFMC_ROOT=$PWD node tools/check-ootb.mjs(11/11)
  • CI ootb on this PR
Open in Web View Automation 

cursoragent and others added 2 commits July 23, 2026 08:26
SDK 移除 economy 契约后 db-server 仍从 @sfmc-bds/sdk/contracts 导入,
导致 ootb 在 emitDeclarationOnly 阶段失败。行模型改由表所有者本地定义
(DIP/DRY),并同步 contracts 文档描述。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
qqutil 误从 check-update 取 log 形成环依赖(Demeter/DIP);改回 log.js。
preferredPowerShell 现返回完整 sfmc commandline,保留已发现的 pwsh 绝对路径
并加引号,避免 Program Files 路径与 PATH 不一致。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

审查结论(push main@0990780 / 742e32b

级别 原则 本 PR
BLOCKER DIP/DRY economy 行类型从已删 SDK contracts 导入 → ootb 红 ✅ 迁入 domain/economy.ts
MAJOR Demeter/DIP qqutilcheck-update 环依赖取 log ✅ 改回 ./log.js
MAJOR LSP SEA 终端 commandline 丢绝对路径 preferredSfmcCommandline
MINOR DRY contracts 文档漂移

WF:main ootb 29991000606 红;本 PR ootb 29991280475 绿

#47 重叠:#47 仅 economy 子集;请合本 PR,关闭 #47

View PR

Open in Web View Automation 

Sent by Cursor Automation: SFMC-Review

@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 22cb9fe into main Jul 23, 2026
1 check passed
@Tanya7z
Tanya7z deleted the cursor/bc-d002d822-0c49-448d-bb4c-423ee7325fc6-117b branch July 25, 2026 12:47
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