@huoye/app-ship 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![npm downloads](https://img.shields.io/npm/dm/@huoye/app-ship.svg)](https://www.npmjs.com/package/@huoye/app-ship)
7
7
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
8
 
9
- **Languages**: [English](README_EN.md) | 简体中文
9
+ **Languages**: [English](https://gitee.com/flu-cli/flu-cli/blob/main/packages/app-ship/README_EN.md) | 简体中文
10
10
 
11
11
  ## 特性
12
12
 
@@ -153,16 +153,16 @@ if (result.success) {
153
153
 
154
154
  ## 支持平台
155
155
 
156
- | 平台 | 文件类型 | 认证方式 | 状态 |
157
- | -------------------- | -------- | ------------------ | ----------- |
158
- | 蒲公英 (Pgyer) | APK, IPA | API Key | ✅ 已实测 |
159
- | 华为 (Huawei) | APK, AAB | OAuth2 | ✅ 已实测 |
160
- | 小米 (Xiaomi) | APK | RSA 公钥签名 | ✅ 已实测 |
161
- | OPPO | APK | HMAC-SHA256 | ✅ 已实测 |
162
- | vivo | APK | HMAC-SHA256 + MD5 | ✅ 已实测 |
163
- | 腾讯应用宝 (Tencent) | APK | HMAC-SHA256 | ✅ 已实测 |
164
- | App Store | IPA | Apple ID / API Key | ✅ 已实测 |
165
- | 鸿蒙 (Harmony) | HAP | OAuth2 | ✅ 已实测 |
156
+ | 平台 | 文件类型 | 认证方式 | 状态 |
157
+ | -------------------- | -------- | ------------------ | --------------------- |
158
+ | 蒲公英 (Pgyer) | APK, IPA | API Key | ✅ 已实测 |
159
+ | 华为 (Huawei) | APK, AAB | OAuth2 | ✅ 已实测 |
160
+ | 小米 (Xiaomi) | APK | RSA 公钥签名 | ✅ 已实测 |
161
+ | OPPO | APK | HMAC-SHA256 | ✅ 已实测 |
162
+ | vivo | APK | HMAC-SHA256 + MD5 | ✅ 已实测 |
163
+ | 腾讯应用宝 (Tencent) | APK | HMAC-SHA256 | ✅ 已实测 |
164
+ | App Store | IPA | Apple ID / API Key | ✅ 已实测 |
165
+ | 鸿蒙 (Harmony) | HAP | OAuth2 | ✅ 已实测 |
166
166
  | TestFlight | IPA | Apple API Key | ⚠️ 框架就绪(开发中) |
167
167
  | Ad Hoc | IPA | 签名证书 | ⚠️ 框架就绪(开发中) |
168
168
  | Google Play | APK, AAB | Service Account | 🔄 计划中(v0.2.0) |
@@ -490,7 +490,7 @@ pgyer:
490
490
 
491
491
  扫描下方二维码或搜索公众号**火叶**关注我们
492
492
 
493
- | 关注公众号 | 加作者微信入群 | 赞赏支持 |
493
+ | 关注公众号 | 加作者微信入群 | 赞赏支持 |
494
494
  | :------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------: |
495
495
  | <img src="https://gitee.com/flu-cli/flu-cli/raw/main/packages/vscode-extension/images/qcode-wx.png" alt="微信号" width="160"/> <br> **火叶** | <img src="https://gitee.com/flu-cli/flu-cli/raw/main/packages/vscode-extension/images/wechat-group.png" alt="微信号" width="160"/> <br> **微信**: `Huoye-TT`<br>(备注: `flu-cli`) | [给作者加鸡腿 ☕️](http://huozhiye.cn/flu-cli/advanced/rewards/rewards) |
496
496
 
package/dist/cli.js CHANGED
@@ -3794,23 +3794,38 @@ var UploadManager = class {
3794
3794
  };
3795
3795
  }
3796
3796
  const files = Array.isArray(filePaths) ? filePaths : [filePaths];
3797
- logger.info(`Processing ${files.length} file(s) for ${validPlatforms.length} platform(s)`);
3798
- const uploadPromises = validPlatforms.map((platform) => {
3797
+ const tasks = [];
3798
+ validPlatforms.forEach((platform) => {
3799
3799
  const uploader = this.uploaders.get(platform);
3800
- const targetFile = files.find((f) => uploader.canHandle(f));
3801
- if (!targetFile) {
3800
+ const matchedFiles = files.filter((f) => uploader.canHandle(f));
3801
+ if (matchedFiles.length === 0) {
3802
3802
  logger.warn(`[${platform}] No compatible file found in provided files`);
3803
- return Promise.resolve({
3804
- platform,
3805
- success: false,
3806
- message: `No compatible file found for ${platform}`
3803
+ } else {
3804
+ matchedFiles.forEach((file) => {
3805
+ tasks.push({ platform, file });
3807
3806
  });
3808
3807
  }
3809
- logger.info(`[${platform}] Matched file: ${path9.basename(targetFile)}`);
3810
- return this.uploadToPlatform(platform, targetFile, config, metadata);
3808
+ });
3809
+ if (tasks.length === 0) {
3810
+ logger.error("No valid platform-file matches found");
3811
+ return {
3812
+ totalUploads: validPlatforms.length,
3813
+ successCount: 0,
3814
+ failureCount: validPlatforms.length,
3815
+ successPlatforms: [],
3816
+ failurePlatforms: validPlatforms,
3817
+ results: [],
3818
+ totalDurationMs: Date.now() - startTime,
3819
+ summary: "No compatible files found for any of the selected platforms"
3820
+ };
3821
+ }
3822
+ logger.info(`Scheduled ${tasks.length} upload task(s) for ${validPlatforms.length} platform(s)`);
3823
+ const uploadPromises = tasks.map((task) => {
3824
+ logger.info(`[${task.platform}] Matched file: ${path9.basename(task.file)}`);
3825
+ return this.uploadToPlatform(task.platform, task.file, config, metadata);
3811
3826
  });
3812
3827
  const results = await Promise.all(uploadPromises);
3813
- const report = this.aggregateResults(results, validPlatforms.length, startTime);
3828
+ const report = this.aggregateResults(results, tasks.length, startTime);
3814
3829
  this.printReport(report);
3815
3830
  return report;
3816
3831
  }