Skip to content

fix(push@d52f8b5): @sfmc-bds/tools 发包失败 + npm-publish 空 jobs / SOLID - #26

Merged
Tanya7z merged 4 commits into
mainfrom
cursor/bc-c625db25-2632-463d-abd3-d9ad50a09f64-68b3
Jul 22, 2026
Merged

fix(push@d52f8b5): @sfmc-bds/tools 发包失败 + npm-publish 空 jobs / SOLID#26
Tanya7z merged 4 commits into
mainfrom
cursor/bc-c625db25-2632-463d-abd3-d9ad50a09f64-68b3

Conversation

@cursor

@cursor cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

背景

审查 main@d52f8b5(publish dev tools)+ tag @sfmc-bds/tools@v0.1.0

本 PR 取代 #24 / #25(同批 CI 空 jobs + DataAdapter / db-routes,已 cherry-pick 到最新 main),并修本次 tools 发包缺口。

审查结论(DRY / OCP / DIP / LSP / Demeter)

级别 原则 处理
BLOCKER DRY/CI @sfmc-bds/tools 不在 NPM_PUBLISH_PACKAGES,tag 发布直接挂 本 PR:写入清单 + workspaces + pack:verify
BLOCKER main: check-ootb.js 指向已废弃扩展名 本 PR:改为 check-ootb.mjs + bin/files
BLOCKER DRY/CI inputs.tag required:true → 空 jobs(#25 未合) 本 PR:required:false + ref_type==tag
MAJOR OCP publish workflow 强制 npm run build,纯脚本包无 build 本 PR:--if-present + noop build
MAJOR DIP installHostBootstrap stub DataAdapter 本 PR:createHttpDataAdapter 可注入
MAJOR LSP/DRY db-routes 错误路径混用 {success:false} 本 PR:统一 jsonV2Fail({ok:false})
MINOR DIP paths.ROOT 写死相对路径,npm 安装后失效 本 PR:优先 SFMC_ROOT
未改 LSP db.tx recorder 不回放 server results 需两阶段协议
未改 MINOR 平台 legacy 路由仍 success 方言 客户端双认

验证

  • db-server node --test:7/7
  • SFMC_ROOT=$PWD node tools/check-ootb.mjs:10/10
  • PUBLISH_TAG=@sfmc-bds/tools@v0.1.0 node tools/resolve-npm-publish-tag.mjs:Version OK
  • npm pack -w @sfmc-bds/tools --dry-run:打包 21 文件

合并后建议

  1. 关闭 fix(push@507a2bd): npm-publish 空 jobs + HttpDB DataAdapter / db-routes 信封 #24 / fix(push@7c6c9c1): npm-publish 空 jobs + HttpDB DataAdapter / db-routes 信封 #25(已被本 PR 取代)
  2. 重打或 workflow_dispatch 发布 @sfmc-bds/tools@v0.1.0(原 tag 推送已失败,workflow 已按该 tag 跑过)
Open in Web View Automation 

cursoragent and others added 3 commits July 22, 2026 14:01
workflow_dispatch.inputs.tag 改为非 required,publish job 增加
ref_type==tag 门控,避免改 workflow 的 branch push 被 GHA 误评估后
出现空 jobs + "workflow file issue"(如 run 29922880511)。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
- installHostBootstrap 默认注入 createHttpDataAdapter,可经
  dataAdapter / dbServerUrl 替换;HttpDB.configure 覆盖基址
- db-routes 错误路径统一 jsonV2Fail({ok:false}),支持 step extra

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
push@d52f8b5 打了 @sfmc-bds/tools@v0.1.0,但 NPM_PUBLISH_PACKAGES 未收录、
tools 未进 workspaces,导致 run 29926464473 在 parse tag 失败。

- 清单 + root workspaces + pack:verify 对齐(DRY)
- main 改为 check-ootb.mjs;补 bin / files;noop build
- npm-publish build 加 --if-present(OCP)
- paths.ROOT 尊重 SFMC_ROOT(DIP)

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Jul 22, 2026
ROOT 优先读 SFMC_ROOT;FETCH_MODULE 固定为本包路径,避免 npm 安装后
仍拼 ROOT/tools(#26 同类改法的漏洞)。补充 bin 与 README。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Jul 22, 2026
ROOT 优先读 SFMC_ROOT;FETCH_MODULE 固定为本包路径,避免 npm 安装后
仍拼 ROOT/tools(#26 同类改法的漏洞)。补充 bin 与 README。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
@Tanya7z
Tanya7z marked this pull request as ready for review July 22, 2026 14:08
@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 624493c into main Jul 22, 2026
1 check passed
@Tanya7z
Tanya7z deleted the cursor/bc-c625db25-2632-463d-abd3-d9ad50a09f64-68b3 branch July 22, 2026 14:08
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