mobbdev 0.0.119 → 0.0.121

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 +10 -1
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -3391,7 +3391,16 @@ var GithubSCMLib = class extends SCMLib {
3391
3391
  return {};
3392
3392
  }
3393
3393
  getDownloadUrl(sha) {
3394
- return Promise.resolve(`${this.url}/zipball/${sha}`);
3394
+ this.url;
3395
+ this._validateUrl();
3396
+ const res = parseScmURL(this.url, "GitHub" /* GitHub */);
3397
+ if (!res) {
3398
+ throw new InvalidRepoUrlError("invalid repo url");
3399
+ }
3400
+ const { hostname, organization, repoName } = res;
3401
+ return Promise.resolve(
3402
+ `https://api.${hostname}/repos/${organization}/${repoName}/zipball/${sha}`
3403
+ );
3395
3404
  }
3396
3405
  async _getUsernameForAuthUrl() {
3397
3406
  return this.getUsername();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobbdev",
3
- "version": "0.0.119",
3
+ "version": "0.0.121",
4
4
  "description": "Automated secure code remediation tool",
5
5
  "repository": "https://github.com/mobb-dev/bugsy",
6
6
  "main": "dist/index.js",