refactor(cli): group commands by noun-verb pattern #67
Reference in New Issue
Block a user
Delete Branch "refactor/cli-noun-verb-grouping"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
RFC #54 实施:CLI 子命令按资源域分组。
Phase 1: workflow 子命令
add/list/show/rm/history/rollback收归workflow下Phase 2: thread 子命令
run/list/show/rm/fork/ps/kill/live/pause/resume收归thread下Phase 3: cas gc + alias + deprecation
gc→cas gcrun/live快捷方式Testing
bun run checkcleanCloses #64, closes #65, closes #66
Ref: #54
Review 完了,代码很干净 👍
做得好的:
DEPRECATED_ALIASES设计很优雅 — 旧命令带 warning 自动代理,零代码重复run/live顶层快捷方式无 deprecation warning,正确一个小 nit(不阻塞):
WORKFLOW_SUBCOMMAND_TABLE里同时有rm和remove指向同一个 handler。建议只保留rm,remove放DEPRECATED_ALIASES跟顶层处理方式统一。LGTM ✅
—— 星月 ✨