@gmcb/cli 0.8.2 → 0.8.4

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
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.8.4](http://10.10.10.16/caoben/front-end/compare/@gmcb/cli@0.8.3...@gmcb/cli@0.8.4) (2026-07-15)
7
+
8
+ **Note:** Version bump only for package @gmcb/cli
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.8.3](http://10.10.10.16/caoben/front-end/compare/@gmcb/cli@0.8.2...@gmcb/cli@0.8.3) (2026-07-15)
15
+
16
+ **Note:** Version bump only for package @gmcb/cli
17
+
18
+
19
+
20
+
21
+
6
22
  ## [0.8.2](http://10.10.10.16/caoben/front-end/compare/@gmcb/cli@0.8.1...@gmcb/cli@0.8.2) (2026-07-15)
7
23
 
8
24
  **Note:** Version bump only for package @gmcb/cli
@@ -273,10 +273,13 @@ async function fetchRemoteResources(opts) {
273
273
  // 查询版本数据,更新 package.json
274
274
  const appIdPkg = (0, fs_extra_1.readJsonSync)(utils_1.PACKAGE_PATH);
275
275
  const appId = appIdPkg.appId;
276
- const { versionName, versionCode } = await (0, apis_1.fetchLatestVersion)({
276
+ const { versionName, versionCode, updateMode } = await (0, apis_1.fetchLatestVersion)({
277
277
  appId,
278
278
  platform: config_1.CONFIG_DATA.publish?.platform,
279
279
  });
280
+ if (updateMode) {
281
+ config_1.CONFIG_DATA.publish.updateMode = updateMode;
282
+ }
280
283
  if (versionName && versionCode) {
281
284
  let pkgContent = (0, fs_1.readFileSync)(utils_1.PACKAGE_PATH, 'utf-8');
282
285
  pkgContent = pkgContent.replace(/"version"\s*:\s*"[^"]*"/, `"version": "${versionName}"`);
@@ -127,6 +127,7 @@ export declare function fetchLatestVersion(params: {
127
127
  }): Promise<{
128
128
  versionName: any;
129
129
  versionCode: number;
130
+ updateMode: any;
130
131
  }>;
131
132
  /**
132
133
  * 获取应用信息(自动登录)
package/lib/apis/index.js CHANGED
@@ -140,6 +140,9 @@ async function publishVersion(params) {
140
140
  const historyParams = {
141
141
  publishType: firstPage.publishType,
142
142
  appMofangId: firstPage.appMofangId,
143
+ ...(publishType == 1 && {
144
+ platformType: const_1.PLATFORM_TYPE[platform],
145
+ }),
143
146
  };
144
147
  const { data: historyData } = await getVersionHistory({ ...historyParams, pageNo: 1, pageSize: 1 });
145
148
  latest = (Array.isArray(historyData) ? historyData : historyData?.list)?.[0];
@@ -217,6 +220,7 @@ async function fetchLatestVersion(params) {
217
220
  return {
218
221
  versionName: latestVersion?.versionName ?? '',
219
222
  versionCode: Number(latestVersion?.versionNum ?? 0),
223
+ updateMode: latestVersion?.updateMode ?? 0,
220
224
  };
221
225
  }
222
226
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gmcb/cli",
3
- "version": "0.8.2",
3
+ "version": "0.8.4",
4
4
  "description": "工茂草本前端命令行工具",
5
5
  "author": "yinjiazeng@163.com",
6
6
  "license": "MIT",
@@ -59,5 +59,5 @@
59
59
  "@types/rimraf": "^4.0.5",
60
60
  "@types/user-home": "^2.0.2"
61
61
  },
62
- "gitHead": "2db6e52d994781c86d7efdd15423f32c18001d4d"
62
+ "gitHead": "7dc381685eea613e6abc5dc1c9cc8f7dd23b045b"
63
63
  }