@gmcb/cli 0.9.18 → 0.10.0

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.10.0 [2026-11-22]
6
+ <!-- generated-by: specs -->
7
+ ### 优化
8
+ - 发布上传的远端文件改为按版本目录归档:`<versionName>.<versionCode>/<原文件名>`,上传文件名直接使用现有 `name` 配置;同一版本的 wgt/zip/apk/exe 共享目录并保留各自文件名。
9
+ ### 破坏性变更
10
+ - 远端文件 URL 由 `<versionName>.<versionCode>.<ext>` 改为 `<versionName>.<versionCode>/<原文件名>`;依赖旧 URL 规则的外部脚本需同步调整,历史版本 URL 不受影响。
11
+
5
12
  ## 0.9.18 [2026-11-20]
6
13
  <!-- generated-by: specs -->
7
14
  ### 修复
@@ -38,6 +38,8 @@ async function publish(options) {
38
38
  SecretKey: secretKey,
39
39
  });
40
40
  const remoteUrls = [];
41
+ // 远端按版本目录归档:<versionName>.<versionCode>/<原文件名>
42
+ const versionDir = `${versionName}.${versionCode}`;
41
43
  for (const file of options.files) {
42
44
  const appCfg = PUBLISH_APP_CFG[file.ext];
43
45
  const fileName = appCfg?.name || `${file.name}.${file.ext}`;
@@ -46,8 +48,7 @@ async function publish(options) {
46
48
  if (!(0, fs_1.existsSync)(source)) {
47
49
  utils_1.log.error(`未找到待上传文件:${source}`);
48
50
  }
49
- const destName = `${versionName}.${versionCode}.${file.ext}`;
50
- const path = `${remotePath}/${destName}`;
51
+ const path = `${remotePath}/${versionDir}/${fileName}`;
51
52
  const remoteUrl = `https://${bucket}.cos.${region}.myqcloud.com${`/${path}`.replace(/\/+/g, '/')}`;
52
53
  await new Promise((res) => {
53
54
  const spinner = (0, ora_1.default)(`资源正在上传...`).start();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gmcb/cli",
3
- "version": "0.9.18",
3
+ "version": "0.10.0",
4
4
  "description": "工茂草本前端命令行工具",
5
5
  "author": "yinjiazeng@163.com",
6
6
  "license": "UNLICENSED",
package/schema.json CHANGED
@@ -202,7 +202,7 @@
202
202
  },
203
203
  "name": {
204
204
  "type": "string",
205
- "description": "导出文件名称,默认为app-release.apk"
205
+ "description": "导出文件名称,同时作为上传后的远端文件名,默认为app-release.apk"
206
206
  },
207
207
  "path": {
208
208
  "type": "string",
@@ -252,7 +252,7 @@
252
252
  "properties": {
253
253
  "name": {
254
254
  "type": "string",
255
- "description": "导出文件名称,例如app.wgt,默认为[appid].wgt"
255
+ "description": "导出文件名称,同时作为上传后的远端文件名,例如app.wgt,默认为[appid].wgt"
256
256
  },
257
257
  "path": {
258
258
  "type": "string",
@@ -335,7 +335,7 @@
335
335
  },
336
336
  "name": {
337
337
  "type": "string",
338
- "description": "导出文件名称,默认为app-release.exe"
338
+ "description": "导出文件名称,同时作为上传后的远端文件名,默认为app-release.exe"
339
339
  },
340
340
  "path": {
341
341
  "type": "string",
@@ -367,7 +367,7 @@
367
367
  "properties": {
368
368
  "name": {
369
369
  "type": "string",
370
- "description": "导出文件名称,例如app.zip,默认为[appid].zip或[name].zip"
370
+ "description": "导出文件名称,同时作为上传后的远端文件名,例如app.zip,默认为[appid].zip或[name].zip"
371
371
  },
372
372
  "path": {
373
373
  "type": "string",