ic-mops 0.27.1 → 0.27.3

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.
@@ -69,7 +69,14 @@ export async function install(pkg: string, version = '', {verbose = false, silen
69
69
 
70
70
  // download files
71
71
  let filesData = new Map;
72
- await parallel(16, filesIds, async (fileId: string) => {
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
+ threads = 4;
77
+ }
78
+
79
+ await parallel(threads, filesIds, async (fileId: string) => {
73
80
  let fileMetaRes = await storage.getFileMeta(fileId);
74
81
  if ('err' in fileMetaRes) {
75
82
  console.log(chalk.red('ERR: ') + fileMetaRes.err);
@@ -59,7 +59,12 @@ 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
- await parallel(16, filesIds, async (fileId) => {
62
+ let threads = 16;
63
+ // GitHub Actions fails with "fetch failed" if there are multiple concurrent actions
64
+ if (process.env.GITHUB_ENV) {
65
+ threads = 4;
66
+ }
67
+ await parallel(threads, filesIds, async (fileId) => {
63
68
  let fileMetaRes = await storage.getFileMeta(fileId);
64
69
  if ('err' in fileMetaRes) {
65
70
  console.log(chalk.red('ERR: ') + fileMetaRes.err);
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};