ic-mops 0.27.1 → 0.27.2
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/commands/install.ts +9 -1
- package/dist/commands/install.js +7 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/commands/install.ts
CHANGED
|
@@ -69,7 +69,15 @@ export async function install(pkg: string, version = '', {verbose = false, silen
|
|
|
69
69
|
|
|
70
70
|
// download files
|
|
71
71
|
let filesData = new Map;
|
|
72
|
-
|
|
72
|
+
let threads = 16;
|
|
73
|
+
|
|
74
|
+
// GitHub Actions fails with "fetch failed" if there are multiple concurrent actions
|
|
75
|
+
if (process.env.GITHUB_ENV) {
|
|
76
|
+
console.log('Running in GitHub Actions, reducing threads to 4');
|
|
77
|
+
threads = 4;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
await parallel(threads, filesIds, async (fileId: string) => {
|
|
73
81
|
let fileMetaRes = await storage.getFileMeta(fileId);
|
|
74
82
|
if ('err' in fileMetaRes) {
|
|
75
83
|
console.log(chalk.red('ERR: ') + fileMetaRes.err);
|
package/dist/commands/install.js
CHANGED
|
@@ -59,7 +59,13 @@ export async function install(pkg, version = '', { verbose = false, silent = fal
|
|
|
59
59
|
actor.notifyInstall(pkg, version);
|
|
60
60
|
// download files
|
|
61
61
|
let filesData = new Map;
|
|
62
|
-
|
|
62
|
+
let threads = 16;
|
|
63
|
+
// GitHub Actions fails with "fetch failed" if there are multiple concurrent actions
|
|
64
|
+
if (process.env.GITHUB_ENV) {
|
|
65
|
+
console.log('Running in GitHub Actions, reducing threads to 4');
|
|
66
|
+
threads = 4;
|
|
67
|
+
}
|
|
68
|
+
await parallel(threads, filesIds, async (fileId) => {
|
|
63
69
|
let fileMetaRes = await storage.getFileMeta(fileId);
|
|
64
70
|
if ('err' in fileMetaRes) {
|
|
65
71
|
console.log(chalk.red('ERR: ') + fileMetaRes.err);
|
package/dist/package.json
CHANGED