mobbdev 1.1.32 → 1.1.33

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.
@@ -4644,6 +4644,7 @@ var REPORT_DEFAULT_FILE_NAME = "report.json";
4644
4644
  init_env();
4645
4645
 
4646
4646
  // src/features/analysis/scm/github/GithubSCMLib.ts
4647
+ import pLimit from "p-limit";
4647
4648
  import { z as z22 } from "zod";
4648
4649
 
4649
4650
  // src/features/analysis/scm/github/github.ts
@@ -4656,6 +4657,9 @@ import sodium from "libsodium-wrappers";
4656
4657
  import { Octokit } from "octokit";
4657
4658
  import { fetch as fetch2, ProxyAgent } from "undici";
4658
4659
 
4660
+ // src/features/analysis/scm/github/GithubSCMLib.ts
4661
+ var GITHUB_COMMIT_FETCH_CONCURRENCY = parseInt(process.env["GITHUB_COMMIT_CONCURRENCY"] || "10", 10) || 10;
4662
+
4659
4663
  // src/features/analysis/scm/gitlab/gitlab.ts
4660
4664
  import querystring3 from "querystring";
4661
4665
  import {
package/dist/index.mjs CHANGED
@@ -7700,6 +7700,7 @@ var REPORT_DEFAULT_FILE_NAME = "report.json";
7700
7700
  init_env();
7701
7701
 
7702
7702
  // src/features/analysis/scm/github/GithubSCMLib.ts
7703
+ import pLimit from "p-limit";
7703
7704
  import { z as z21 } from "zod";
7704
7705
 
7705
7706
  // src/features/analysis/scm/github/github.ts
@@ -8625,6 +8626,7 @@ function getGithubSdk(params = {}) {
8625
8626
  }
8626
8627
 
8627
8628
  // src/features/analysis/scm/github/GithubSCMLib.ts
8629
+ var GITHUB_COMMIT_FETCH_CONCURRENCY = parseInt(process.env["GITHUB_COMMIT_CONCURRENCY"] || "10", 10) || 10;
8628
8630
  function determinePrStatus(state, isDraft) {
8629
8631
  switch (state) {
8630
8632
  case "CLOSED":
@@ -8991,12 +8993,15 @@ var GithubSCMLib = class extends SCMLib {
8991
8993
  }),
8992
8994
  this.getPrDiff({ pull_number: prNumber })
8993
8995
  ]);
8996
+ const limit = pLimit(GITHUB_COMMIT_FETCH_CONCURRENCY);
8994
8997
  const commits = await Promise.all(
8995
8998
  commitsRes.data.map(
8996
- (commit) => this.getCommitDiff(commit.sha, {
8997
- repositoryCreatedAt,
8998
- parentCommitTimestamps
8999
- })
8999
+ (commit) => limit(
9000
+ () => this.getCommitDiff(commit.sha, {
9001
+ repositoryCreatedAt,
9002
+ parentCommitTimestamps
9003
+ })
9004
+ )
9000
9005
  )
9001
9006
  );
9002
9007
  const diffLines = filesRes ? await this._attributeLinesViaBlame(pr.head.ref, filesRes.data, commits) : [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobbdev",
3
- "version": "1.1.32",
3
+ "version": "1.1.33",
4
4
  "description": "Automated secure code remediation tool",
5
5
  "repository": "git+https://github.com/mobb-dev/bugsy.git",
6
6
  "main": "dist/index.mjs",
@@ -86,6 +86,7 @@
86
86
  "node-stream-zip": "1.15.0",
87
87
  "octokit": "3.2.1",
88
88
  "open": "8.4.2",
89
+ "p-limit": "3.1.0",
89
90
  "parse-diff": "0.11.1",
90
91
  "sax": "1.4.3",
91
92
  "semver": "7.7.3",