mobbdev 0.0.134 → 0.0.136

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 +9 -10
  2. package/package.json +6 -6
package/dist/index.mjs CHANGED
@@ -1037,15 +1037,14 @@ async function getAdoRepoDefaultBranch({
1037
1037
  orgName: owner
1038
1038
  });
1039
1039
  const git = await api2.getGitApi();
1040
- const branches = await git.getBranches(repo, projectName);
1041
- if (!branches || branches.length === 0) {
1042
- throw new InvalidRepoUrlError("no branches");
1043
- }
1044
- const res = branches.find((branch) => branch.isBaseVersion);
1045
- if (!res || !res.name) {
1040
+ const getRepositoryRes = await git.getRepository(
1041
+ decodeURI(repo),
1042
+ projectName ? decodeURI(projectName) : void 0
1043
+ );
1044
+ if (!getRepositoryRes?.defaultBranch) {
1046
1045
  throw new InvalidRepoUrlError("no default branch");
1047
1046
  }
1048
- return res.name;
1047
+ return getRepositoryRes.defaultBranch.replace("refs/heads/", "");
1049
1048
  }
1050
1049
  async function getAdoReferenceData({
1051
1050
  ref,
@@ -1148,9 +1147,9 @@ function parseAdoOwnerAndRepo(adoUrl) {
1148
1147
  }
1149
1148
  const { organization, repoName, projectName, projectPath, pathElements } = parsingResult;
1150
1149
  return {
1151
- owner: organization,
1152
- repo: repoName,
1153
- projectName,
1150
+ owner: decodeURI(organization),
1151
+ repo: decodeURI(repoName),
1152
+ projectName: projectName ? decodeURI(projectName) : void 0,
1154
1153
  projectPath,
1155
1154
  pathElements
1156
1155
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobbdev",
3
- "version": "0.0.134",
3
+ "version": "0.0.136",
4
4
  "description": "Automated secure code remediation tool",
5
5
  "repository": "https://github.com/mobb-dev/bugsy",
6
6
  "main": "dist/index.js",
@@ -39,7 +39,7 @@
39
39
  "chalk": "5.3.0",
40
40
  "chalk-animation": "2.0.3",
41
41
  "configstore": "6.0.0",
42
- "debug": "4.3.5",
42
+ "debug": "4.3.6",
43
43
  "dotenv": "16.4.5",
44
44
  "extract-zip": "2.0.1",
45
45
  "globby": "13.2.2",
@@ -62,7 +62,7 @@
62
62
  "supports-color": "9.4.0",
63
63
  "tar": "6.2.1",
64
64
  "tmp": "0.2.3",
65
- "undici": "6.19.2",
65
+ "undici": "6.19.4",
66
66
  "uuid": "10.0.0",
67
67
  "ws": "8.18.0",
68
68
  "yargs": "17.7.2",
@@ -86,11 +86,11 @@
86
86
  "@types/uuid": "10.0.0",
87
87
  "@types/ws": "8.5.11",
88
88
  "@types/yargs": "17.0.32",
89
- "@typescript-eslint/eslint-plugin": "7.16.1",
90
- "@typescript-eslint/parser": "7.16.1",
89
+ "@typescript-eslint/eslint-plugin": "7.17.0",
90
+ "@typescript-eslint/parser": "7.17.0",
91
91
  "eslint": "8.57.0",
92
92
  "eslint-plugin-import": "2.29.1",
93
- "eslint-plugin-prettier": "5.1.3",
93
+ "eslint-plugin-prettier": "5.2.1",
94
94
  "eslint-plugin-simple-import-sort": "10.0.0",
95
95
  "prettier": "3.3.3",
96
96
  "tsup": "7.2.0",