@gmcb/cli 0.7.3 → 0.7.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/CHANGELOG.md +16 -0
- package/lib/actions/publish.js +1 -1
- package/lib/apis/index.d.ts +1 -0
- package/lib/apis/index.js +7 -4
- package/lib/commands/option.d.ts +1 -1
- package/lib/commands/option.js +1 -1
- package/lib/scripts/publish.js +1 -0
- package/package.json +2 -2
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.7.5](http://10.10.10.16/caoben/front-end/compare/@gmcb/cli@0.7.4...@gmcb/cli@0.7.5) (2026-07-09)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @gmcb/cli
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.7.4](http://10.10.10.16/caoben/front-end/compare/@gmcb/cli@0.7.3...@gmcb/cli@0.7.4) (2026-07-09)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @gmcb/cli
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [0.7.3](http://10.10.10.16/caoben/front-end/compare/@gmcb/cli@0.7.2...@gmcb/cli@0.7.3) (2026-07-09)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @gmcb/cli
|
package/lib/actions/publish.js
CHANGED
|
@@ -69,7 +69,7 @@ async function default_1(...args) {
|
|
|
69
69
|
// --remote 则提示热更新还是整包更新
|
|
70
70
|
if (opts.win || opts.apk) {
|
|
71
71
|
pub.updateMode = 1;
|
|
72
|
-
if (opts.remote) {
|
|
72
|
+
if (opts.remote && !config_1.CONFIG_DATA.publish?.updateMode) {
|
|
73
73
|
const { updateMode } = await inquirer_1.default.prompt([
|
|
74
74
|
{
|
|
75
75
|
type: 'list',
|
package/lib/apis/index.d.ts
CHANGED
package/lib/apis/index.js
CHANGED
|
@@ -114,8 +114,9 @@ async function uploadVersion(params) {
|
|
|
114
114
|
async function publishVersion(params) {
|
|
115
115
|
try {
|
|
116
116
|
const { brandName, brandId, appId, username, password, remoteUrl, versionName, versionCode, channel, versionDesc, platform, ...rest } = params;
|
|
117
|
-
const publishType = Number(rest.publishType
|
|
118
|
-
const updateType = Number(rest.updateType
|
|
117
|
+
const publishType = Number(rest.publishType || 3);
|
|
118
|
+
const updateType = Number(rest.updateType || 2);
|
|
119
|
+
const updateMode = Number(rest.updateMode || 0);
|
|
119
120
|
const { data: { accessToken }, } = await login({ username, password });
|
|
120
121
|
(0, http_1.setToken)(accessToken);
|
|
121
122
|
const { data: pageData } = await getVersionPage({ appId, publishType, pageNo: 1, pageSize: 10 });
|
|
@@ -175,6 +176,7 @@ async function publishVersion(params) {
|
|
|
175
176
|
channelType: const_1.CHANNEL_TYPE[channel],
|
|
176
177
|
platformType: const_1.PLATFORM_TYPE[platform],
|
|
177
178
|
updateType,
|
|
179
|
+
updateMode,
|
|
178
180
|
versionName,
|
|
179
181
|
versionNum: versionCode,
|
|
180
182
|
versionDesc: versionDesc || '修复一些已知问题',
|
|
@@ -193,6 +195,7 @@ async function publishVersion(params) {
|
|
|
193
195
|
appId,
|
|
194
196
|
appName: appItem?.name,
|
|
195
197
|
updateType,
|
|
198
|
+
updateMode,
|
|
196
199
|
versionName,
|
|
197
200
|
versionNum: versionCode,
|
|
198
201
|
versionDesc: versionDesc || '修复一些已知问题',
|
|
@@ -217,8 +220,8 @@ async function publishVersion(params) {
|
|
|
217
220
|
}
|
|
218
221
|
let fallbackFullUrl = existingVersion?.fullPackageUrl || latest?.fullPackageUrl || '';
|
|
219
222
|
let fallbackResUrl = existingVersion?.resourcePackageUrl || latest?.resourcePackageUrl || '';
|
|
220
|
-
if (
|
|
221
|
-
const isHotUpdate =
|
|
223
|
+
if (publishType == 1 && fullUrl) {
|
|
224
|
+
const isHotUpdate = updateMode == 2;
|
|
222
225
|
const hotResUrl = isHotUpdate ? (config_1.CONFIG_DATA.publish['_remoteResourceUrl'] || '') : '';
|
|
223
226
|
resUrl = hotResUrl;
|
|
224
227
|
fallbackFullUrl = '';
|
package/lib/commands/option.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const template: readonly ["-t, --template <template-name>", "模
|
|
|
4
4
|
export declare const platform: readonly ["-p, --platform <platform-name>", "编译平台,默认h5", "h5"];
|
|
5
5
|
export declare const project: readonly ["-P, --project <project-name>", "HbuilderX工作台中的项目名称"];
|
|
6
6
|
export declare const compiler: readonly ["-c, --compiler <compiler-name>", "构建工具,默认uni", "uni"];
|
|
7
|
-
export declare const env: readonly ["-e, --env <env-name>", "构建环境,可选如dev/sit/uat/prod
|
|
7
|
+
export declare const env: readonly ["-e, --env <env-name>", "构建环境,可选如dev/sit/uat/prod等"];
|
|
8
8
|
export declare const branch: readonly ["-b, --branch [branch-name]", "Git分支名称,仅在该分支下执行命令"];
|
|
9
9
|
export declare const source: readonly ["-s, --source <source-path>", "资源路径"];
|
|
10
10
|
export declare const dest: readonly ["-d, --dest <dest-path>", "目标路径"];
|
package/lib/commands/option.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.template = ['-t, --template <template-name>', '模版仓库名称'];
|
|
|
6
6
|
exports.platform = ['-p, --platform <platform-name>', '编译平台,默认h5', 'h5'];
|
|
7
7
|
exports.project = ['-P, --project <project-name>', 'HbuilderX工作台中的项目名称'];
|
|
8
8
|
exports.compiler = ['-c, --compiler <compiler-name>', '构建工具,默认uni', 'uni'];
|
|
9
|
-
exports.env = ['-e, --env <env-name>', '构建环境,可选如dev/sit/uat/prod
|
|
9
|
+
exports.env = ['-e, --env <env-name>', '构建环境,可选如dev/sit/uat/prod等'];
|
|
10
10
|
exports.branch = ['-b, --branch [branch-name]', 'Git分支名称,仅在该分支下执行命令'];
|
|
11
11
|
exports.source = ['-s, --source <source-path>', '资源路径'];
|
|
12
12
|
exports.dest = ['-d, --dest <dest-path>', '目标路径'];
|
package/lib/scripts/publish.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gmcb/cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.5",
|
|
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": "
|
|
62
|
+
"gitHead": "d7ef0dd4432c11c8278ceb03bc0ad7f58839913a"
|
|
63
63
|
}
|