@gmcb/cli 0.7.10 → 0.7.11

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,14 @@
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.11](http://10.10.10.16/caoben/front-end/compare/@gmcb/cli@0.7.10...@gmcb/cli@0.7.11) (2026-07-13)
7
+
8
+ **Note:** Version bump only for package @gmcb/cli
9
+
10
+
11
+
12
+
13
+
6
14
  ## [0.7.10](http://10.10.10.16/caoben/front-end/compare/@gmcb/cli@0.7.9...@gmcb/cli@0.7.10) (2026-07-12)
7
15
 
8
16
  **Note:** Version bump only for package @gmcb/cli
package/README.md CHANGED
@@ -34,6 +34,7 @@ npm i @gmcb/cli -g
34
34
  | `--wgt` | 构建移动应用热更新资源 |
35
35
  | `--zip` | 构建桌面应用热更新资源 |
36
36
  | `--apk` | 构建 Android 应用 |
37
+ | `--nobuild` | 跳过构建步骤,仅执行后续流程(打包、远程资源拉取等) |
37
38
 
38
39
  使用 `--wgt` 构建移动应用热更新资源时,会先通过 vite/uni 正常构建 app,再将构建产物(`dist/build/app` 或 `unpackage/dist/build/app-plus`)打包为 `.wgt` 文件,输出路径默认为 `unpackage/release`。
39
40
 
@@ -72,6 +73,7 @@ gmcb build -p app --wgt
72
73
  | `--zip` | 构建桌面应用热更新资源 |
73
74
  | `--apk` | 构建 Android 应用 |
74
75
  | `-a, --auto` | 自动发布,跳过所有确认提示 |
76
+ | `--nobuild` | 跳过构建步骤,仅执行后续流程(打包、远程资源拉取等) |
75
77
 
76
78
  示例:
77
79
 
@@ -396,19 +396,21 @@ async function fetchRemoteResources(opts) {
396
396
  async function default_1(...args) {
397
397
  const opts = args[0];
398
398
  const commands = await getCommands(...args);
399
- if (opts.remote && ['electron-vite', 'gradlew'].includes(opts.compiler)) {
400
- await fetchRemoteResources(opts);
401
- }
402
399
  const command = commands.join(' ');
403
- const time = Date.now();
404
- (0, utils_1.spawnSync)(command);
400
+ if (!opts.nobuild) {
401
+ const time = Date.now();
402
+ (0, utils_1.spawnSync)(command);
403
+ if ((Date.now() - time) / 1000 <= 1) {
404
+ if (command.includes(config_1.CONFIG_DATA.cli.hbuilderx)) {
405
+ utils_1.log.error('检测到您的HbuilderX未启动或项目管理器中未发现构建项目,请检查后重试!');
406
+ }
407
+ }
408
+ }
405
409
  if ((0, fs_1.existsSync)(envPath)) {
406
410
  (0, fs_1.unlinkSync)(envPath);
407
411
  }
408
- if ((Date.now() - time) / 1000 <= 1) {
409
- if (command.includes(config_1.CONFIG_DATA.cli.hbuilderx)) {
410
- utils_1.log.error('检测到您的HbuilderX未启动或项目管理器中未发现构建项目,请检查后重试!');
411
- }
412
+ if (opts.remote && ['electron-vite', 'gradlew'].includes(opts.compiler)) {
413
+ await fetchRemoteResources(opts);
412
414
  }
413
415
  // H5 构建完成后立即生成 manifest.json
414
416
  if (opts.compiler === 'uni' && opts.platform === 'h5') {
package/lib/bin.js CHANGED
@@ -51,6 +51,7 @@ program
51
51
  .option(...commands_1.linux)
52
52
  .option(...commands_1.apk)
53
53
  .option(...commands_1.remote)
54
+ .option(...commands_1.nobuild)
54
55
  .action(build_1.default);
55
56
  program
56
57
  .command('copy')
@@ -80,6 +81,7 @@ program
80
81
  .option(...commands_1.apk)
81
82
  .option(...commands_1.skip)
82
83
  .option(...commands_1.remote)
84
+ .option(...commands_1.nobuild)
83
85
  .action(publish_1.default);
84
86
  program
85
87
  .command('config [name]')
@@ -24,6 +24,7 @@ export declare const res: readonly ["--res", "是否构建移动应用本地资
24
24
  export declare const apk: readonly ["--apk", "是否构建Android应用"];
25
25
  export declare const skip: readonly ["--skip", "跳过所有确认,自动发布"];
26
26
  export declare const remote: readonly ["--remote", "是否从远程拉取资源构建"];
27
+ export declare const nobuild: readonly ["--nobuild", "跳过构建步骤"];
27
28
  export declare const hbuilderxCli: readonly ["--cli.hbuilderx <cli-path>", "HbuilderX Cli路径"];
28
29
  export declare const weixinCli: readonly ["--cli.weixin <cli-path>", "微信开发者工具 Cli路径"];
29
30
  export declare const alipayCli: readonly ["--cli.alipay <cli-path>", "支付宝开发者工具 Cli路径"];
@@ -56,6 +57,7 @@ export interface Options {
56
57
  linux: boolean;
57
58
  apk?: boolean;
58
59
  remote?: boolean;
60
+ nobuild?: boolean;
59
61
  'skill.repo'?: string;
60
62
  'template.repo'?: string;
61
63
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.templateRepo = exports.skillRepo = exports.cosSecretkey = exports.cosSecretid = exports.alipayCli = exports.weixinCli = exports.hbuilderxCli = exports.remote = exports.skip = exports.apk = exports.res = exports.wgt = exports.pack = exports.custom = exports.zip = exports.linux = exports.mac = exports.win = exports.link = exports.path = exports.name = exports.clean = exports.ignore = exports.dest = exports.source = exports.branch = exports.env = exports.compiler = exports.project = exports.platform = exports.template = exports.version = void 0;
3
+ exports.templateRepo = exports.skillRepo = exports.cosSecretkey = exports.cosSecretid = exports.alipayCli = exports.weixinCli = exports.hbuilderxCli = exports.nobuild = exports.remote = exports.skip = exports.apk = exports.res = exports.wgt = exports.pack = exports.custom = exports.zip = exports.linux = exports.mac = exports.win = exports.link = exports.path = exports.name = exports.clean = exports.ignore = exports.dest = exports.source = exports.branch = exports.env = exports.compiler = exports.project = exports.platform = exports.template = exports.version = void 0;
4
4
  exports.version = ['-v, --version', '输出版本号'];
5
5
  exports.template = ['-t, --template <template-name>', '模版仓库名称'];
6
6
  exports.platform = ['-p, --platform <platform-name>', '编译平台,默认h5', 'h5'];
@@ -26,6 +26,7 @@ exports.res = ['--res', '是否构建移动应用本地资源'];
26
26
  exports.apk = ['--apk', '是否构建Android应用'];
27
27
  exports.skip = ['--skip', '跳过所有确认,自动发布'];
28
28
  exports.remote = ['--remote', '是否从远程拉取资源构建'];
29
+ exports.nobuild = ['--nobuild', '跳过构建步骤'];
29
30
  exports.hbuilderxCli = ['--cli.hbuilderx <cli-path>', 'HbuilderX Cli路径'];
30
31
  exports.weixinCli = ['--cli.weixin <cli-path>', '微信开发者工具 Cli路径'];
31
32
  exports.alipayCli = ['--cli.alipay <cli-path>', '支付宝开发者工具 Cli路径'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gmcb/cli",
3
- "version": "0.7.10",
3
+ "version": "0.7.11",
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": "71ce7aeb811bd6fd27030b981d3545fdab4276f1"
62
+ "gitHead": "7a25dd268c4b0287563f11b1837f63186693bc86"
63
63
  }