flu-cli-core 1.0.3 → 1.0.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/README.md +4 -4
- package/dist/index.cjs +26 -11
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +26 -11
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -67,10 +67,10 @@ ProjectGenerator
|
|
|
67
67
|
|
|
68
68
|
## 📦 三种使用方式
|
|
69
69
|
|
|
70
|
-
| 方式 | 工具
|
|
71
|
-
| ---------- |
|
|
72
|
-
| **命令行** | flu-cli (v2)
|
|
73
|
-
| **可视化** | VSCode 插件
|
|
70
|
+
| 方式 | 工具 | 用途 |
|
|
71
|
+
| ---------- | ------------------- | ----------------- |
|
|
72
|
+
| **命令行** | flu-cli (v2) | CI/CD、自动化发版 |
|
|
73
|
+
| **可视化** | VSCode 插件 | IDE 内点击操作 |
|
|
74
74
|
| **编程** | @huoye/app-ship npm | 自建发布系统 |
|
|
75
75
|
|
|
76
76
|
## 🔗 相关资源
|
package/dist/index.cjs
CHANGED
|
@@ -5586,23 +5586,38 @@ var UploadManager = class {
|
|
|
5586
5586
|
};
|
|
5587
5587
|
}
|
|
5588
5588
|
const files = Array.isArray(filePaths) ? filePaths : [filePaths];
|
|
5589
|
-
|
|
5590
|
-
|
|
5589
|
+
const tasks = [];
|
|
5590
|
+
validPlatforms.forEach((platform) => {
|
|
5591
5591
|
const uploader = this.uploaders.get(platform);
|
|
5592
|
-
const
|
|
5593
|
-
if (
|
|
5592
|
+
const matchedFiles = files.filter((f) => uploader.canHandle(f));
|
|
5593
|
+
if (matchedFiles.length === 0) {
|
|
5594
5594
|
logger2.warn(`[${platform}] No compatible file found in provided files`);
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
message: `No compatible file found for ${platform}`
|
|
5595
|
+
} else {
|
|
5596
|
+
matchedFiles.forEach((file) => {
|
|
5597
|
+
tasks.push({ platform, file });
|
|
5599
5598
|
});
|
|
5600
5599
|
}
|
|
5601
|
-
|
|
5602
|
-
|
|
5600
|
+
});
|
|
5601
|
+
if (tasks.length === 0) {
|
|
5602
|
+
logger2.error("No valid platform-file matches found");
|
|
5603
|
+
return {
|
|
5604
|
+
totalUploads: validPlatforms.length,
|
|
5605
|
+
successCount: 0,
|
|
5606
|
+
failureCount: validPlatforms.length,
|
|
5607
|
+
successPlatforms: [],
|
|
5608
|
+
failurePlatforms: validPlatforms,
|
|
5609
|
+
results: [],
|
|
5610
|
+
totalDurationMs: Date.now() - startTime,
|
|
5611
|
+
summary: "No compatible files found for any of the selected platforms"
|
|
5612
|
+
};
|
|
5613
|
+
}
|
|
5614
|
+
logger2.info(`Scheduled ${tasks.length} upload task(s) for ${validPlatforms.length} platform(s)`);
|
|
5615
|
+
const uploadPromises = tasks.map((task) => {
|
|
5616
|
+
logger2.info(`[${task.platform}] Matched file: ${import_path37.default.basename(task.file)}`);
|
|
5617
|
+
return this.uploadToPlatform(task.platform, task.file, config, metadata);
|
|
5603
5618
|
});
|
|
5604
5619
|
const results = await Promise.all(uploadPromises);
|
|
5605
|
-
const report = this.aggregateResults(results,
|
|
5620
|
+
const report = this.aggregateResults(results, tasks.length, startTime);
|
|
5606
5621
|
this.printReport(report);
|
|
5607
5622
|
return report;
|
|
5608
5623
|
}
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -4920,23 +4920,38 @@ var UploadManager = class {
|
|
|
4920
4920
|
};
|
|
4921
4921
|
}
|
|
4922
4922
|
const files = Array.isArray(filePaths) ? filePaths : [filePaths];
|
|
4923
|
-
|
|
4924
|
-
|
|
4923
|
+
const tasks = [];
|
|
4924
|
+
validPlatforms.forEach((platform) => {
|
|
4925
4925
|
const uploader = this.uploaders.get(platform);
|
|
4926
|
-
const
|
|
4927
|
-
if (
|
|
4926
|
+
const matchedFiles = files.filter((f) => uploader.canHandle(f));
|
|
4927
|
+
if (matchedFiles.length === 0) {
|
|
4928
4928
|
logger2.warn(`[${platform}] No compatible file found in provided files`);
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
message: `No compatible file found for ${platform}`
|
|
4929
|
+
} else {
|
|
4930
|
+
matchedFiles.forEach((file) => {
|
|
4931
|
+
tasks.push({ platform, file });
|
|
4933
4932
|
});
|
|
4934
4933
|
}
|
|
4935
|
-
|
|
4936
|
-
|
|
4934
|
+
});
|
|
4935
|
+
if (tasks.length === 0) {
|
|
4936
|
+
logger2.error("No valid platform-file matches found");
|
|
4937
|
+
return {
|
|
4938
|
+
totalUploads: validPlatforms.length,
|
|
4939
|
+
successCount: 0,
|
|
4940
|
+
failureCount: validPlatforms.length,
|
|
4941
|
+
successPlatforms: [],
|
|
4942
|
+
failurePlatforms: validPlatforms,
|
|
4943
|
+
results: [],
|
|
4944
|
+
totalDurationMs: Date.now() - startTime,
|
|
4945
|
+
summary: "No compatible files found for any of the selected platforms"
|
|
4946
|
+
};
|
|
4947
|
+
}
|
|
4948
|
+
logger2.info(`Scheduled ${tasks.length} upload task(s) for ${validPlatforms.length} platform(s)`);
|
|
4949
|
+
const uploadPromises = tasks.map((task) => {
|
|
4950
|
+
logger2.info(`[${task.platform}] Matched file: ${path22.basename(task.file)}`);
|
|
4951
|
+
return this.uploadToPlatform(task.platform, task.file, config, metadata);
|
|
4937
4952
|
});
|
|
4938
4953
|
const results = await Promise.all(uploadPromises);
|
|
4939
|
-
const report = this.aggregateResults(results,
|
|
4954
|
+
const report = this.aggregateResults(results, tasks.length, startTime);
|
|
4940
4955
|
this.printReport(report);
|
|
4941
4956
|
return report;
|
|
4942
4957
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flu-cli-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Core logic for flu-cli",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"author": "火叶工作室",
|
|
37
37
|
"license": "MIT",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@huoye/app-ship": "^0.1.
|
|
39
|
+
"@huoye/app-ship": "^0.1.1",
|
|
40
40
|
"axios": "^1.13.2",
|
|
41
41
|
"chalk": "^4.1.2",
|
|
42
42
|
"form-data": "^4.0.5",
|