Files
dacli/src
ssw 9a59adc9ac feat(dacli): report/release.ts 完整 wrapCommand 迁移 (P6 6 exit 收口)
6 处 process.exit(1) → ctx.fail(), 写 CommandLog (L3):
- step 1: id 不存在
- step 1.5a: basic info 校验失败 (fullName/enCode/category)
- step 1.5b: numeric 校验失败 (sortCode/enabledMark)
- step 2: --type=1 必传 --cells 缺失
- step 2.5: --cells 不是合法 JSON
- step 4: 后端 code !== 200

每步 summary 含 id/type/code/msg/errors 详细 (供 dacli log last 复盘).

DEPRECATION 警告 (v0.16+) 保留在 wrapCommand 内, log.warn 进 buffer (quiet
模式下汇总输出, verbose 立即可见), 不影响 exit code.

迁移模式统一:
  - import { setupOutputFilter, addOutputOptions, wrapCommand }
  - 删本地 --json (改 addOutputOptions 注入)
  - Opts interface 加 verbose?: boolean
  - .action 开头 setupOutputFilter(opts)
  - 整块 step machine (step 1-4) wrapCommand 包 + try/catch → ctx.success/fail
  - validateBasicInfo/validateNumeric 错误保留 log.error 输出 (用户感知)

修改方式: Write 整文件重写 (Edit 工具不匹配, step machine 重排风险).

验证:
  - TS compile 0 新错误 (baseline 57 不变)
  - 73/73 单元测试 PASS

P6 累计: 剩 form/create (13) + workflow/create (9) + form/codegen (8) + workflow/update (6)
+ di/create (6) + bigscreen/construct (6) + app/create (6) + report/update (5) + report/publish (5)
+ report/create (5) + portal/setDefault (5) + form/update (5) = ~73 exit 散布 12 文件.
form/audit.ts + log/last.ts 跳过 (semantic 退出码 / meta-recursive).
2026-07-21 20:01:10 +08:00
..