Skip to content

fix(ootb@67069bf): module/mod HELP 别名打红 + chalk.map 乱码 - #33

Merged
Tanya7z merged 3 commits into
mainfrom
cursor/bc-aa5371e8-2ece-40dc-8c19-f74db145d011-b148
Jul 22, 2026
Merged

fix(ootb@67069bf): module/mod HELP 别名打红 + chalk.map 乱码#33
Tanya7z merged 3 commits into
mainfrom
cursor/bc-aa5371e8-2ece-40dc-8c19-f74db145d011-b148

Conversation

@cursor

@cursor cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

背景

ootbmain@8fc0989 / 67069bf 连续失败(runs 2994009771429940147800)。

feat@8fc0989 把 CLI HELP 从 module list 改为 module/mod list,但 tools/check-ootb.mjs 仍用 /module\s+(list|install)/,导致「sfmc CLI module 子命令已注册」误报。

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

级别 原则 处理
BLOCKER DRY HELP 改别名后 ootb 仍硬编码 module\\s+ check-ootb 接受 module[/\|]mod + 剥 ANSI
MAJOR DRY/OCP module/mod 在 HELP、main、repl、USAGE 多处硬编码 MODULE_CMD_NAMES + isModuleCommand / paintModuleCmdAlias
MAJOR LSP .map(paint)(value,index,array) 喂给 chalk,HELP 乱码 改为 paint(name)
MINOR 误提交 sfmc-bds-sfmc-0.1.0.tgz 删除 + *.tgz gitignore

未在本 PR 重复处理:已开的 #31(模块鉴权注入 / configs/all / tx 契约)。

验证

npm run build --workspaces --if-present
SFMC_ROOT=$PWD node tools/check-ootb.mjs   # 11/11 PASS
Open in Web View Automation 

cursoragent and others added 3 commits July 22, 2026 17:00
feat@8fc0989 将 HELP 改为 module/mod 后,check-ootb 的
/module\s+(list|install)/ 误报失败。同步:
- ootb 剥离 ANSI,匹配 module[/|]mod 展示
- MODULE_CMD_NAMES 作为 HELP/分发/USAGE 唯一来源
- 移除误提交的 npm pack *.tgz 并 gitignore

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
.map(paint) 会把 (value,index,array) 传给 chalk,HELP 变成
「module 0 module,mod/...」乱码;改为显式 paint(name)。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
@Tanya7z
Tanya7z marked this pull request as ready for review July 22, 2026 17:04
@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 3d15949 into main Jul 22, 2026
1 check failed
@Tanya7z
Tanya7z deleted the cursor/bc-aa5371e8-2ece-40dc-8c19-f74db145d011-b148 branch July 22, 2026 17:06
cursor Bot pushed a commit that referenced this pull request Jul 22, 2026
#33 合入后 HELP 只走 paintModuleCmdAlias;死导出会再触发 noUnusedLocals。
与并行 #34 对齐,避免双 PR 漏删。

Co-authored-by: Shiroha <Tanya7z@users.noreply.github.com>
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