mobbdev 0.0.120 → 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.
- package/dist/index.mjs +10 -1
- 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
|
-
|
|
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();
|