@freelog-cli/cli2 0.5.4 → 0.5.5
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/dist/bin/index.js +142 -101
- package/dist/bin/index.js.map +1 -1
- package/dist/docs/01-/345/277/253/351/200/237/344/270/212/346/211/213.md +2 -0
- package/dist/docs/05-/350/265/204/346/272/220/347/256/241/347/220/206.md +2 -2
- package/dist/docs/10-/345/221/275/344/273/244/345/217/202/350/200/203.md +6 -6
- package/package.json +1 -1
|
@@ -44,6 +44,8 @@ freelog-cli type info RT006003 --env dev
|
|
|
44
44
|
freelog-cli init . --artifact video.mp4 --env dev
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
`type list` 和 `type search` 的每一行都是“类型 code + 根 / … / 叶子”的完整路径,不会只显示容易重名的叶子名称。它们固定每页 50 条:交互终端可选择上一页或下一页;脚本环境只显示首页并提示剩余数量,不需要也不支持分页参数。
|
|
48
|
+
|
|
47
49
|
`type info` 会同时显示该最终叶子是否支持版本可选配置;只有显示“支持”时才可以在工作稿中使用 `version option add/set`。它不表示任意文件都能用于该类型:做可选配置真网验收时,仍要为该类型选择真实可上传的文件。
|
|
48
50
|
|
|
49
51
|
通用 `init` 必须用 `--artifact` 指向已经存在的本地文件;交互模式只会帮你选类型,不会扫描或猜测文件。它只写 `.freelog/1.json`,不会创建线上资源、上传文件或创建版本。
|
|
@@ -63,14 +63,14 @@ freelog-cli resource recover --apply --yes --env dev
|
|
|
63
63
|
|
|
64
64
|
```powershell
|
|
65
65
|
freelog-cli policy list --env dev
|
|
66
|
-
freelog-cli policy template list --
|
|
66
|
+
freelog-cli policy template list --env dev
|
|
67
67
|
freelog-cli policy template apply <templateId> --yes --env dev
|
|
68
68
|
freelog-cli policy apply --from-file .\free-policy.json --yes --env dev
|
|
69
69
|
freelog-cli policy set --id <policyId> --on --env dev
|
|
70
70
|
freelog-cli policy set --id <policyId> --off --env dev
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
`policy list` 只看当前资源已经添加的策略:一次输出全部策略,页头显示完整资源类型链,不分页。当前后端按资源类型筛选模板存在故障,`policy template list` 暂时列出平台返回的**全部**模板(固定每页 20 条;TTY 可上一页/下一页,非 TTY 输出首页和继续提示),包含带交易事件的模板,不在 CLI 按免费/付费、事件或类型猜测过滤;后端修复后再恢复按类型请求。交互执行 `policy template apply` 时可在每页选择、翻页或取消;脚本执行必须提供 `<templateId> --yes`。应用模板会先由平台重新编译,最终能否写入由平台判定;目前带事件或需要填写时间、金额等参数的模板可能受后端编译契约阻塞,CLI 不猜测转换。应用模板或 `policy apply` 都会新增一条**启用**的授权策略,但不会触发支付,也不会自动上架。
|
|
74
74
|
|
|
75
75
|
`policy apply --from-file` 接受策略文本文件,或包含 `policyName` 与 `policyText` 的 JSON 文件;若文本文件或 JSON 未提供名称,非交互模式还必须传 `--name <策略名>`。策略语义最终由平台校验。
|
|
76
76
|
|
|
@@ -38,10 +38,10 @@ freelog-cli --cli-version
|
|
|
38
38
|
| `init theme <dir> [--template <id>]` | 从主题模板创建新工程。 | 固定主题类型 `RT001` 与默认构建目录 `dist`。 |
|
|
39
39
|
| `init widget <dir> [--template <id>]` | 从插件模板创建新工程。 | 固定插件类型 `RT002` 与默认构建目录 `dist`。 |
|
|
40
40
|
| `template list` | 查看可用于主题/插件初始化的模板。 | 只读。 |
|
|
41
|
-
| `type list` |
|
|
42
|
-
| `type search [关键词]` |
|
|
43
|
-
| `type info <类型编号>` |
|
|
44
|
-
| `type pick [--type <类型编号>]` |
|
|
41
|
+
| `type list` | 列出全部可用最终叶子;每行显示 `code + 根 / … / 叶子`。固定每页 50 条,TTY 可翻页;非 TTY 输出首页和后续提示。 | 只读,需要登录。 |
|
|
42
|
+
| `type search [关键词]` | 按名称筛选最终叶子,输出与 `type list` 相同的完整路径和分页体验。 | 只读,需要登录。 |
|
|
43
|
+
| `type info <类型编号>` | 确认某个类型编号、从类型树取得的完整名称链和可选配置能力。只有详情显示“可选配置:支持”时,版本工作稿才允许 add/set 配置。 | 只读,需要登录。 |
|
|
44
|
+
| `type pick [--type <类型编号>]` | 以命令方式列出或确认一个最终叶子类型;无 `--type` 时使用与 `type list` 相同的完整路径和分页。通常 `init` 的交互选择已足够。 | 只读,需要登录。 |
|
|
45
45
|
|
|
46
46
|
## 建立或接入资源身份
|
|
47
47
|
|
|
@@ -94,8 +94,8 @@ freelog-cli --cli-version
|
|
|
94
94
|
| 命令 | 何时使用 | 影响 |
|
|
95
95
|
|---|---|---|
|
|
96
96
|
| `update [--title] [--intro] [--cover] [--tags] --yes [--resource <selector>]` | 只修改资源展示信息。 | 更新线上 listing;不发版、不改标识、不上下架。未传字段不改;`--intro ""`、`--tags ""` 清空对应字段;`--cover` 只能给工程内 JPG/PNG/静态 GIF(≤5MB),CLI 上传后写 URL,暂不支持清空封面。 |
|
|
97
|
-
| `policy list [--resource <selector>]` |
|
|
98
|
-
| `policy template list [--
|
|
97
|
+
| `policy list [--resource <selector>]` | 查看当前资源的全部授权策略;页头显示根到叶的资源类型链。 | 只读,不分页。 |
|
|
98
|
+
| `policy template list [--resource <selector>]` | 查看当前取得的全部策略模板。固定每页 20 条,TTY 可上一页/下一页;非 TTY 输出首页和继续提示。当前临时请求全量模板,待后端修复按类型筛选契约后再恢复类型参数。 | 只读。 |
|
|
99
99
|
| `policy template apply [templateId] [--name] [--resource <selector>]` | 套用一条平台模板并启用。交互可选择;脚本必须给 `<templateId> --yes`。 | 新增并启用一条策略;不付款、不上架。 |
|
|
100
100
|
| `policy apply --from-file <路径> [--name] --yes [--resource <selector>]` | 从策略文本或 JSON 文件新增策略。 | 新增并启用一条策略;策略语义由平台校验。 |
|
|
101
101
|
| `policy set --id <策略ID> --on|--off [--resource <selector>]` | 启用或停用某条策略。 | 更新线上策略状态;已上架资源不能停用到零条启用策略。 |
|