mobbdev 1.0.60 → 1.0.61

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.
Files changed (2) hide show
  1. package/dist/index.mjs +12 -22
  2. package/package.json +19 -19
package/dist/index.mjs CHANGED
@@ -4,10 +4,7 @@ var __export = (target, all) => {
4
4
  for (var name in all)
5
5
  __defProp(target, name, { get: all[name], enumerable: true });
6
6
  };
7
- var __publicField = (obj, key, value) => {
8
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
9
- return value;
10
- };
7
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
11
8
 
12
9
  // src/index.ts
13
10
  import { hideBin } from "yargs/helpers";
@@ -1717,8 +1714,7 @@ import {
1717
1714
  createSpinner as _createSpinner
1718
1715
  } from "nanospinner";
1719
1716
  function printToStdError(opts) {
1720
- if (opts?.text)
1721
- console.error(opts.text);
1717
+ if (opts?.text) console.error(opts.text);
1722
1718
  }
1723
1719
  var mockSpinner = {
1724
1720
  success: (opts) => {
@@ -2090,8 +2086,7 @@ function capitalizeFirstLetter(str) {
2090
2086
  return str?.length ? str[0].toUpperCase() + str.slice(1) : "";
2091
2087
  }
2092
2088
  function lowercaseFirstLetter(str) {
2093
- if (!str)
2094
- return str;
2089
+ if (!str) return str;
2095
2090
  return `${str.charAt(0).toLowerCase()}${str.slice(1)}`;
2096
2091
  }
2097
2092
  var severityToEmoji = {
@@ -3839,11 +3834,9 @@ var parseScmURL = (scmURL, scmType) => {
3839
3834
  hostname,
3840
3835
  scmType
3841
3836
  });
3842
- if (!repo)
3843
- return null;
3837
+ if (!repo) return null;
3844
3838
  const { organization, repoName } = repo;
3845
- if (!organization || !repoName)
3846
- return null;
3839
+ if (!organization || !repoName) return null;
3847
3840
  if (!organization.match(NAME_REGEX) || !repoName.match(NAME_REGEX))
3848
3841
  return null;
3849
3842
  const res = {
@@ -5659,6 +5652,7 @@ import {
5659
5652
  createRequesterFn
5660
5653
  } from "@gitbeaker/requester-utils";
5661
5654
  import {
5655
+ AccessLevel,
5662
5656
  Gitlab
5663
5657
  } from "@gitbeaker/rest";
5664
5658
  import Debug4 from "debug";
@@ -5745,7 +5739,6 @@ async function getGitlabUsername(url, accessToken) {
5745
5739
  return res.username;
5746
5740
  }
5747
5741
  async function getGitlabIsUserCollaborator({
5748
- username,
5749
5742
  accessToken,
5750
5743
  repoUrl
5751
5744
  }) {
@@ -5753,13 +5746,12 @@ async function getGitlabIsUserCollaborator({
5753
5746
  const { projectPath } = parseGitlabOwnerAndRepo(repoUrl);
5754
5747
  const api2 = getGitBeaker({ url: repoUrl, gitlabAuthToken: accessToken });
5755
5748
  const res = await api2.Projects.show(projectPath);
5756
- const members = await api2.ProjectMembers.all(res.id, {
5757
- includeInherited: true
5758
- });
5759
- if (!username) {
5749
+ const groupAccess = res.permissions?.group_access?.access_level || 0;
5750
+ const projectAccess = res.permissions?.project_access?.access_level || 0;
5751
+ if (groupAccess >= AccessLevel.DEVELOPER || projectAccess >= AccessLevel.DEVELOPER) {
5760
5752
  return true;
5761
5753
  }
5762
- return !!members.find((member) => member.username === username);
5754
+ return false;
5763
5755
  } catch (e) {
5764
5756
  return false;
5765
5757
  }
@@ -6004,8 +5996,7 @@ async function processBody(response) {
6004
5996
  async function brokerRequestHandler(endpoint, options) {
6005
5997
  const { prefixUrl, searchParams } = options || {};
6006
5998
  let baseUrl;
6007
- if (prefixUrl)
6008
- baseUrl = prefixUrl.endsWith("/") ? prefixUrl : `${prefixUrl}/`;
5999
+ if (prefixUrl) baseUrl = prefixUrl.endsWith("/") ? prefixUrl : `${prefixUrl}/`;
6009
6000
  const url = new URL(endpoint, baseUrl);
6010
6001
  url.search = searchParams || "";
6011
6002
  const dispatcher = url && isBrokerUrl(url.href) ? new ProxyAgent({
@@ -8630,8 +8621,7 @@ async function uploadFile({
8630
8621
  // src/features/analysis/index.ts
8631
8622
  var { CliError: CliError2, Spinner: Spinner2 } = utils_exports;
8632
8623
  function _getScanSource(command, ci) {
8633
- if (command === "review")
8634
- return "AUTO_FIXER" /* AutoFixer */;
8624
+ if (command === "review") return "AUTO_FIXER" /* AutoFixer */;
8635
8625
  const envToCi = [
8636
8626
  ["GITLAB_CI", "CI_GITLAB" /* CiGitlab */],
8637
8627
  ["GITHUB_ACTIONS", "CI_GITHUB" /* CiGithub */],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobbdev",
3
- "version": "1.0.60",
3
+ "version": "1.0.61",
4
4
  "description": "Automated secure code remediation tool",
5
5
  "repository": "git+https://github.com/mobb-dev/bugsy.git",
6
6
  "main": "dist/index.js",
@@ -30,16 +30,16 @@
30
30
  "author": "",
31
31
  "license": "MIT",
32
32
  "dependencies": {
33
- "@gitbeaker/core": "42.1.0",
34
- "@gitbeaker/requester-utils": "42.1.0",
35
- "@gitbeaker/rest": "42.1.0",
33
+ "@gitbeaker/core": "42.2.0",
34
+ "@gitbeaker/requester-utils": "42.2.0",
35
+ "@gitbeaker/rest": "42.2.0",
36
36
  "@octokit/core": "5.2.0",
37
37
  "@octokit/graphql": "5.0.6",
38
38
  "@octokit/plugin-rest-endpoint-methods": "7.2.3",
39
39
  "@octokit/request-error": "5.1.1",
40
40
  "@types/libsodium-wrappers": "0.7.14",
41
41
  "adm-zip": "0.5.16",
42
- "axios": "1.8.2",
42
+ "axios": "1.8.4",
43
43
  "azure-devops-node-api": "12.1.0",
44
44
  "bitbucket": "2.11.0",
45
45
  "chalk": "5.4.1",
@@ -64,48 +64,48 @@
64
64
  "parse-diff": "0.11.1",
65
65
  "semver": "7.7.1",
66
66
  "simple-git": "3.27.0",
67
- "snyk": "1.1295.3",
67
+ "snyk": "1.1296.1",
68
68
  "supports-color": "10.0.0",
69
69
  "tar": "6.2.1",
70
70
  "tmp": "0.2.3",
71
71
  "undici": "6.21.1",
72
72
  "uuid": "11.1.0",
73
- "ws": "8.18.0",
73
+ "ws": "8.18.1",
74
74
  "xml2js": "0.6.2",
75
75
  "yargs": "17.7.2",
76
76
  "zod": "3.24.2"
77
77
  },
78
78
  "devDependencies": {
79
79
  "@graphql-codegen/cli": "5.0.5",
80
- "@graphql-codegen/typescript": "4.1.4",
80
+ "@graphql-codegen/typescript": "4.1.6",
81
81
  "@graphql-codegen/typescript-graphql-request": "6.2.0",
82
- "@graphql-codegen/typescript-operations": "4.5.0",
83
- "@octokit/types": "13.8.0",
82
+ "@graphql-codegen/typescript-operations": "4.6.0",
83
+ "@octokit/types": "13.10.0",
84
84
  "@types/adm-zip": "0.5.7",
85
85
  "@types/chalk-animation": "1.6.3",
86
86
  "@types/configstore": "6.0.2",
87
87
  "@types/debug": "4.1.12",
88
88
  "@types/inquirer": "9.0.7",
89
- "@types/semver": "7.5.8",
89
+ "@types/semver": "7.7.0",
90
90
  "@types/tar": "6.1.13",
91
91
  "@types/tmp": "0.2.6",
92
92
  "@types/uuid": "10.0.0",
93
- "@types/ws": "8.5.14",
93
+ "@types/ws": "8.18.1",
94
94
  "@types/xml2js": "0.4.14",
95
95
  "@types/yargs": "17.0.33",
96
96
  "@typescript-eslint/eslint-plugin": "7.17.0",
97
97
  "@typescript-eslint/parser": "7.17.0",
98
- "@vitest/coverage-istanbul": "3.0.6",
99
- "@vitest/ui": "3.0.6",
98
+ "@vitest/coverage-istanbul": "3.1.1",
99
+ "@vitest/ui": "3.1.1",
100
100
  "eslint": "8.57.0",
101
101
  "eslint-plugin-import": "2.31.0",
102
- "eslint-plugin-prettier": "5.2.3",
102
+ "eslint-plugin-prettier": "5.2.6",
103
103
  "eslint-plugin-simple-import-sort": "10.0.0",
104
- "nock": "14.0.1",
105
- "prettier": "3.5.1",
106
- "tsup": "7.2.0",
104
+ "nock": "14.0.3",
105
+ "prettier": "3.5.3",
106
+ "tsup": "8.4.0",
107
107
  "typescript": "4.9.5",
108
- "vitest": "3.0.6"
108
+ "vitest": "3.1.1"
109
109
  },
110
110
  "engines": {
111
111
  "node": ">=18.20.4"