@cnbcool/cnb-api-generate 2.18.1 → 2.18.3

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.
@@ -12,8 +12,13 @@
12
12
  * 输出内容不被截断,进程在事件循环结束后以非零码退出。
13
13
  */
14
14
 
15
- /** 退出码:与既有失败路径区分,便于脚本定位失败类型 */
16
- export const EXIT_CODE_HTTP_ERROR = 1;
15
+ /**
16
+ * 退出码:HTTP 非 2xx。
17
+ *
18
+ * 不复用 1(命令拼错 / 未登录 / 工具函数不存在)与 2(git-credential),
19
+ * 免得脚本只凭退出码区分不出「调用成功但接口报错」和其它失败;3 当前空闲。
20
+ */
21
+ export const EXIT_CODE_HTTP_ERROR = 3;
17
22
 
18
23
  /**
19
24
  * 从响应对象中解析 HTTP 状态码。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cnbcool/cnb-api-generate",
3
- "version": "2.18.1",
3
+ "version": "2.18.3",
4
4
  "main": "./built/index.js",
5
5
  "module": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -31,8 +31,7 @@ description: CNB 平台交互命令,支持代码仓库、Issue、PR、CI、制
31
31
  - 图片 `.../-/imgs/<issues|pulls>/<数字 ID>/<key>/<文件名>`
32
32
  - 附件 `.../-/files/<issues|pulls>/<数字 ID>/<key>/<文件名>`
33
33
 
34
- 参数取 `/imgs/<issues|pulls>/`、`/files/<issues|pulls>/` 之后的**完整尾段**,
35
- 首位的数字 ID 段不能省,漏掉返回 `404`。
34
+ `图片路径/附件路径`=`<数字 ID>/<key>/<文件名>`,即 `参数` 取 `<issues|pulls>/` 之后的**完整尾段**。
36
35
 
37
36
  ## 常用链接
38
37