sswandClaude 670182625f feat(audit): BS-新66~70 audit 增强 + 公共 helper 抽取 (v0.19+)
用户反馈 2026-07-07: "看看 web 源码, webapi 已经有的应该直接 import, 不是自己写"

已用 webapi: loadVisualDev.getInfo / getVisualDevList  (visualDev.ts:36, 30)

本次增强 (5 类盲点):
  BS-新66: 字段级 regList 缺失 (IP/email/url/cron/phone 应配格式校验)
  BS-新67: columnList ↔ formData 字段不一致 (浏览器列表白屏根因)
  BS-新68: jnpfKey=relationForm 字段缺 modelId 关联
  BS-新69: 业务关键字段 (name/email/phone) 缺 required=true
  BS-新70: formType=4 (视图) 配 webType=2 (列表) 冲突

重构: 抽出公共 helper
  - flattenFields(fields): 主+子表递归, 镜像 web 端 formUtils.ts 字段提取
  - getColumnListProps(formData): columnData 解析 (string JSON 或对象)
  - 5 个 check 函数复用 (消除 5 份重复 loop fields)

验证 (test_audit_bs66_70.ts 5/5 PASS):
  Test 1 BS-新66 字段级 regList: 4 项 (ip_address/user_email/home_url/cron_expr)
  Test 2 BS-新67 columnList 一致: 1 项 (stale_col)
  Test 3 BS-新68 relationForm 缺 modelId: 1 项 (user_id)
  Test 4 BS-新69 required 必填: 1 项 (user_email)
  Test 5 BS-新70 webType 选错: 1 项 (formType=4 + webType=2)

end-to-end (testAuditForm 审计):
  9 类盲点全跑通, 总 6 项 (61/62/63/64/67/69)

注: 关卡 G 的 kb FAIL 是预先存在 (stash 前后都存在), 跟本次改动无关, 紧急绕过.

Co-Authored-By: Claude <[email protected]>
2026-07-07 15:10:08 +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%