@coda-console/protocol 1.1.0 → 1.2.0

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/README.md CHANGED
@@ -27,6 +27,10 @@ pointProblem(panelsSchema, manifest.contributes.panels, 'contributes.panels', 'p
27
27
 
28
28
  `TYPES` 是 Coda 自己的类型(`contributes` 的键),`SCHEMAS` 是全部 schema(按文件名)。
29
29
 
30
+ ## 项目中的多选选项
31
+
32
+ 设置的 `items.anyOf` 选项可附带 `workflowKind`(`check`、`premerge`、`deploy`、`preview`、`release`)。全局设置显示全部选项;项目设置只显示该项目有的流程类别,未写此字段的选项始终显示。宿主负责按项目提供可选项,流程执行时仍需按运行的提交判断可用操作。
33
+
30
34
  ## 谁在用
31
35
 
32
36
  - **Coda**:读插件时用它校验清单,再整理成自己的结构;只另看插件身份(ID、设置名在 ID 之下),以及装到一台机器上才知道的(来源、已装插件的冲突)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coda-console/protocol",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Coda 的协议:插件清单的类型(JSON Schema)、通用校验器与 Agent 接入协议",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -167,7 +167,8 @@
167
167
  "properties": {
168
168
  "const": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},
169
169
  "title": {"type": "string", "maxLength": 400},
170
- "description": {"type": "string", "maxLength": 400}
170
+ "description": {"type": "string", "maxLength": 400},
171
+ "workflowKind": {"description": "在项目设置里只在该项目有这一类流程时显示;全局设置列出全部选项", "enum": ["check", "premerge", "deploy", "preview", "release"]}
171
172
  },
172
173
  "required": ["const"],
173
174
  "additionalProperties": false