Skip to content

fix(wf@ba65eb9): @sfmc-bds/tools workspaces 发包失败 + DataAdapter / db-routes 信封 - #28

Merged
Tanya7z merged 1 commit into
mainfrom
cursor/bc-26fb0815-c4b6-4f6e-ae7b-f31433c4326f-fea2
Jul 22, 2026
Merged

fix(wf@ba65eb9): @sfmc-bds/tools workspaces 发包失败 + DataAdapter / db-routes 信封#28
Tanya7z merged 1 commit into
mainfrom
cursor/bc-26fb0815-c4b6-4f6e-ae7b-f31433c4326f-fea2

Conversation

@cursor

@cursor cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

背景

npm-publish run 29926818842 在 tag @sfmc-bds/tools@v0.1.0(main@ba65eb9)失败:

npm error No workspaces found:
npm error   --workspace=@sfmc-bds/tools

ba65eb9 已把包写入 NPM_PUBLISH_PACKAGES,但 root workspaces 未含 toolsnpm run build -w / npm publish -w 均不可用。ootb 同 commit 已绿。

本 PR 取代 #24 / #25 / #26 / #27(同批 CI 空 jobs + tools 发包 + SOLID 信封)。

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

级别 原则 处理
BLOCKER DRY tools 未进 root workspaces / pack:verify 本 PR 对齐
BLOCKER main: check-ootb.js 不存在;无可用 build 面 .mjs + bin/files + noop build
BLOCKER DRY/CI inputs.tag required:true → 空 jobs required:false + ref_type==tag
MAJOR OCP publish 强制 npm run build,纯脚本包无脚本会挂 --if-present
MAJOR DIP installHostBootstrap stub DataAdapter createHttpDataAdapter 可注入
MAJOR LSP/DRY db-routes 错误路径混用 {success:false} 统一 jsonV2Fail({ok:false})
MINOR DIP paths.ROOT 写死相对路径 优先 SFMC_ROOT
未改 LSP db.tx recorder 不回放 server results 需两阶段协议
未改 MINOR 平台 legacy 路由仍 success 方言 客户端双认

修复

  1. root workspaces + pack:verify + lock 纳入 tools
  2. tools/package.jsonmain/bin/files/noop build
  3. npm-publish.yml:空 jobs 门控 + build --if-present
  4. HttpDB DataAdapter + db-routes v2 失败信封

验证

  • PUBLISH_TAG=@sfmc-bds/tools@v0.1.0 node tools/resolve-npm-publish-tag.mjs → Version OK
  • npm run build -w @sfmc-bds/tools --if-present → ok
  • npm pack -w @sfmc-bds/tools --dry-run → 21 files
  • db-server node --test:7/7
  • SFMC_ROOT=$PWD node tools/check-ootb.mjs:10/10

合入后操作

关联

Open in Web View Automation 

npm 安装后 ROOT=SFMC_ROOT,拼 ROOT/tools 会找不到脚本;
改为相对本包目录解析 fetch-module.mjs。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/bc-26fb0815-c4b6-4f6e-ae7b-f31433c4326f-fea2 branch from ec67511 to 67ac699 Compare July 22, 2026 14:10
@Tanya7z
Tanya7z marked this pull request as ready for review July 22, 2026 14:10
@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 1c9c24d into main Jul 22, 2026
1 check passed
@Tanya7z
Tanya7z deleted the cursor/bc-26fb0815-c4b6-4f6e-ae7b-f31433c4326f-fea2 branch July 22, 2026 14:11
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