bpmax-cli 0.2.1-beta.46 → 0.2.1-beta.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmax-cli",
3
- "version": "0.2.1-beta.46",
3
+ "version": "0.2.1-beta.48",
4
4
  "description": "CLI for BPMAX environments with multi-profile config and local login callback flow",
5
5
  "type": "module",
6
6
  "bin": {
@@ -27,6 +27,7 @@
27
27
  "node": ">=18"
28
28
  },
29
29
  "dependencies": {
30
+ "acorn": "^8.16.0",
30
31
  "@clack/prompts": "1.0.1",
31
32
  "axios": "^1.9.0",
32
33
  "commander": "^14.0.0",
@@ -26,18 +26,28 @@ metadata:
26
26
  bpmax-cli config flow-detail-template list --flow-type <flow_type> --flow-key <flow_key> --profile <profile> --format json
27
27
  bpmax-cli config flow-detail-template export --id <id> --profile <profile> --out <dir> --format json
28
28
  bpmax-cli config flow-detail-template lint --work <work.json> --format json
29
+ bpmax-cli config flow-detail-template inspect-template --work <work.json> --file <template.docx> --profile <profile> --format json
29
30
  bpmax-cli config flow-detail-template build --work <work.json> --meta <meta.json> --out <submit.json> --format json
30
31
  bpmax-cli config flow-detail-template submit --id <id> --payload <submit.json> --profile <profile> --format json
31
32
  bpmax-cli config flow-detail-template verify --id <id> --profile <profile> --format json
33
+ bpmax-cli config flow-detail-template usage --id <id> --profile <profile> --format json
34
+ bpmax-cli config flow-detail-template render --id <id> --project-id <project_id> --out <generated.docx> --profile <profile> --format json
32
35
  ```
33
36
 
34
- 新建时使用 `config flow-detail-template create` 生成 work/meta,再执行 lint、build 和带精确确认文本的 submit。删除同样必须先 dry-run,再复制 CLI 返回的确认文本。
37
+ 新建时先自行准备 `mode=create` 的 work/meta,再由 build 生成 create payload;`config flow-detail-template create` 消费 build 产物,不会替你生成 work/meta。提交前必须检查 dry-run 的 `activation_collateral`,因为 `status=1` 会让同流程范围内其他生效模板失效。删除前必须先执行 usage;仍被节点 `report_actions` 引用时不得删除。
35
38
 
36
39
  ## 门禁
37
40
 
38
41
  - work 和 readback 的 `type` 必须为 `5`。
39
- - `content` 必须是 `{ fields, templateFile }`:`fields[]` 的 `field/desc/expression` 均为非空字符串且 field 不重复;`templateFile[]` 至少包含一个带 `name/url` 的文件。
40
- - 平台生成报告时只读取 `templateFile[0]`;配置多个文件时必须确认第一个文件就是实际生效文件。
42
+ - `content` 必须是 `{ fields, templateFile }`:`fields[]` 的 `field/desc/expression` 均为非空字符串且 field 不重复。
43
+ - `expression` 是平台异步函数体,可以使用 `await`,但必须由外层函数显式 `return`;回调函数、注释、字符串或正则中的 `return` 不能代替报告字段返回。lint 只解析和编译,不执行表达式。
44
+ - `templateFile` 必须且只能有一个 `.docx`。`.doc`、`.html` 或多个文件会被阻断,因为服务端实际使用 PizZip + Docxtemplater,且只读取第一个文件。
45
+ - `inspect-template` 必须证明 DOCX ZIP 结构有效,所有占位符均有对应 `fields[].field`;未使用字段必须人工确认。
46
+ - Word 循环块 `{#items}{label}{value}{/items}` 只在 `content.fields` 配置顶层 `items`;`label/value` 来自 `items` 表达式返回的对象,不得重复配置为顶层报告字段。
41
47
  - 必须保留 `flow_type`、`flow_key`、`data_set_id` 和报告表达式的原有语义,不得套用 type=2/type=6 的 layout 模块规则。
48
+ - 节点入口使用 `data.nodes[].report_actions=[<type=5 remote id>]`。CLI 必须远端回读并确认模板存在、type=5 且 `flow_type/flow_key` 与流程一致;禁止 UUID、跨流程 ID 和同节点重复 ID。
49
+ - `report_actions` 不能单独证明按钮可见:平台旧版 `stepOperation` 支持该入口,启用 `stepFlowButtonStyle` 的 `stepOperationNew` 当前不渲染报告按钮。必须在目标流程真实页面确认;如果运行态使用新版按钮样式,需要平台前端配合恢复入口,不能靠 CLI 配置绕过。
50
+ - 项目详情入口由 type=2 模板中的 `generate-report` 模块提供。该模块按当前项目流程范围列出报告模板,不绑定单个 type=5 ID。
51
+ - 报告不会在创建、提交、审批或流程完成时自动生成,也不会自动附加、归档或发送;只有用户点击环节报告按钮或项目详情“生成报告”入口时才调用生成接口。
42
52
  - lint/build/submit/verify 任一步失败都不能宣称配置完成。
43
- - 完成后必须保留 typed readback hash;涉及真实展示效果时,再补充运行态页面证据。
53
+ - typed verify 只能证明配置写入和引用语义;完成结论还必须使用真实项目执行 `render`,验证返回文件是有效 DOCX、hash/MIME 可记录且没有未解析占位符。涉及按钮可见性时还要补真实页面点击和下载证据。