Skip to content

fix(push@bc7f01c): npm-publish 收窄 + SOLID(Money/信封/TxResponse/OCP) - #23

Merged
Tanya7z merged 2 commits into
mainfrom
cursor/bc-093a9d12-27d0-44a8-9d37-330eca7e6ec4-4679
Jul 22, 2026
Merged

fix(push@bc7f01c): npm-publish 收窄 + SOLID(Money/信封/TxResponse/OCP)#23
Tanya7z merged 2 commits into
mainfrom
cursor/bc-093a9d12-27d0-44a8-9d37-330eca7e6ec4-4679

Conversation

@cursor

@cursor cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

审查 main push ee8f196..bc7f01c(临时 tags: "**" + merge #22)后的补丁。

CI / wf

  • BLOCKERnpm-publish 临时 tags: ["**"] 会误触 SEA v*;改回 **sfmc-bds/**(保留跨 /)。
  • resolve-npm-publish-tag.mjs 探测 registry,写 already_published;已发布则跳过 build/publish,避免 workflow_dispatch 重跑 E403(run 29920691408)。

SOLID(DRY · OCP · DIP · LSP · Demeter)

级别 原则 修复
BLOCKER LSP Money 改走 economy.account.get/credit/debit,不再打已删 /api/sfmc/economy/*
MAJOR DRY/LSP jsonV2Fail 统一 v2 未授权/失败为 {ok:false}(index / db / module-config / service)
MAJOR LSP SAPI TxResponse.stepsresults,与 server tx-runner 对齐
MAJOR OCP BUILTIN_SERVICE_PLUGINS + registerEnabledBuiltinServices,index 不再硬编码 economy if

仍未修(架构债,非本 PR 范围)

  • DIP:host token 注入 stub;HttpDB 进程级 authToken + HOST/PORT 硬编码
  • LSP:db.tx recorder 仍返回 stub,不消费 server results(需协议改造)
  • 平台路由(modules/messages/config)仍用 success 方言(legacy)

Test plan

  • node tools/resolve-npm-publish-tag.mjs + @sfmc-bds/sdk@v0.1.0already_published=true
  • PUBLISH_TAG=v1.0.0 → exit 1(拒绝 SEA 形 tag)
  • npm run build --workspace @sfmc-bds/sdk / @sfmc-bds/db-server
  • SFMC_ROOT=$PWD node tools/check-ootb.mjs → 10/10
Open in Web View Automation 

cursoragent and others added 2 commits July 22, 2026 13:09
临时 tags:"**" 会误触 SEA v*;改回 **sfmc-bds/**。
resolve 脚本探测 registry,already_published 时跳过 publish,避免 E403。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
BLOCKER/LSP: Money 不再打已删 /api/sfmc/economy/*,改 economy.account.*。
DRY/LSP: jsonV2Fail 统一 v2 未授权/失败为 {ok:false}。
LSP: SAPI TxResponse.steps → results 与 server 对齐。
OCP: BUILTIN_SERVICE_PLUGINS 扩展点,index 不再硬编码 economy if。

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

cursor Bot commented Jul 22, 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 7a557a7 into main Jul 22, 2026
1 check passed
@Tanya7z
Tanya7z deleted the cursor/bc-093a9d12-27d0-44a8-9d37-330eca7e6ec4-4679 branch July 22, 2026 14:13
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