@gmcb/cli 0.9.15 → 0.9.16

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  <!-- release:insert -->
4
4
 
5
+ ## 0.9.16 [2026-11-19]
6
+ <!-- generated-by: specs -->
7
+ ### 优化
8
+ - 发布类型 2 与 3 统一按应用维度处理:不再用历史版本回填缺失的包地址,未上传任何包时直接报错。
9
+ ### 破坏性变更
10
+ - 未配置 `publish.publishType` 时,魔方发布的默认发布类型由 3 改为 2。
11
+
5
12
  ## 0.9.15 [2026-11-18]
6
13
  <!-- generated-by: specs -->
7
14
  ### 优化
package/lib/apis/index.js CHANGED
@@ -122,7 +122,7 @@ async function uploadVersion(params) {
122
122
  async function publishVersion(params) {
123
123
  try {
124
124
  const { appId, remoteUrl, versionName, versionCode, versionDesc, platform, ...rest } = params;
125
- const publishType = Number(rest.publishType || 3);
125
+ const publishType = Number(rest.publishType || 2);
126
126
  const updateType = Number(rest.updateType || 2);
127
127
  const updateMode = Number(rest.updateMode || 0);
128
128
  await ensureLoggedIn();
@@ -190,14 +190,14 @@ async function publishVersion(params) {
190
190
  fallbackFullUrl = '';
191
191
  fallbackResUrl = '';
192
192
  }
193
- // 子应用允许 wgt/zip 只发一个,禁止用历史版本补齐另一包,
193
+ // 发布类型 > 1(应用维度,如子应用)允许 wgt/zip 只发一个,禁止用历史版本补齐另一包,
194
194
  // 否则新版本链接会指向历史版本文件,客户端更新检查会一直命中历史版本。
195
- if (publishType == 3) {
195
+ if (publishType > 1) {
196
196
  fallbackFullUrl = '';
197
197
  fallbackResUrl = '';
198
198
  }
199
- if (publishType == 3 && !fullUrl && !resUrl) {
200
- throw new Error('子应用发布未上传 wgt 或 zip 文件');
199
+ if (publishType > 1 && !fullUrl && !resUrl) {
200
+ throw new Error('非主应用(publishType > 1)发布未上传 wgt 或 zip 文件');
201
201
  }
202
202
  await postVersion({
203
203
  id: versionId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gmcb/cli",
3
- "version": "0.9.15",
3
+ "version": "0.9.16",
4
4
  "description": "工茂草本前端命令行工具",
5
5
  "author": "yinjiazeng@163.com",
6
6
  "license": "UNLICENSED",