ssw 71874b4f96 P2-2 修复: report update/release --cells JSON 预校验 (2026-07-02)
FINDING-R4: --cells 字符串字段缺 JSON 预校验
  - 后端 ReportCrForm.cells 是 String, 期望前端传 JSON.stringify 后的结果
  - web 端: reportDesign.getData() 已经返回字符串化的 cells JSON
  - dacli 用户手动传 --cells='{"cells":[]}' (未 stringify), 后端会再 stringify 一次
  - 后续设计器读取 cells 字符串再 JSON.parse 二次解析 → 双重 stringify 嵌套 → 设计器打开报错

修复:
- update.ts: cells !== undefined 时 try JSON.parse, 失败 exit 1 + 提示
- release.ts: cells 必传校验后, 同样 try JSON.parse 预校验
- 错误消息明确: 后端期望字符串化的 JSON

审计: dacli/docs/cmd-review/v0.14-rollout-audit-2026-07-02.md §2.1 R4
2026-07-02 12:35:47 +08:00
S
Description
dacli CLI — JNPF 平台 AI 驱动开发工具 (TS 版 v0.7)
3.9 MiB
0 Stars 1 Watchers 0 Forks
Languages
TypeScript 99.4%
Shell 0.4%
Python 0.2%