forked from olcxjas-softworks/LarpixClient
Update gitignore (sorry)
This commit is contained in:
parent
a8f8c4d7ad
commit
cca8b02fea
6604 changed files with 1219661 additions and 4 deletions
42
electron/node_modules/electron-updater/out/providers/BitbucketProvider.js
generated
vendored
Normal file
42
electron/node_modules/electron-updater/out/providers/BitbucketProvider.js
generated
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.BitbucketProvider = void 0;
|
||||
const builder_util_runtime_1 = require("builder-util-runtime");
|
||||
const util_1 = require("../util");
|
||||
const Provider_1 = require("./Provider");
|
||||
class BitbucketProvider extends Provider_1.Provider {
|
||||
constructor(configuration, updater, runtimeOptions) {
|
||||
super({
|
||||
...runtimeOptions,
|
||||
isUseMultipleRangeRequest: false,
|
||||
});
|
||||
this.configuration = configuration;
|
||||
this.updater = updater;
|
||||
const { owner, slug } = configuration;
|
||||
this.baseUrl = util_1.newBaseUrl(`https://api.bitbucket.org/2.0/repositories/${owner}/${slug}/downloads`);
|
||||
}
|
||||
get channel() {
|
||||
return this.updater.channel || this.configuration.channel || "latest";
|
||||
}
|
||||
async getLatestVersion() {
|
||||
const cancellationToken = new builder_util_runtime_1.CancellationToken();
|
||||
const channelFile = util_1.getChannelFilename(this.getCustomChannelName(this.channel));
|
||||
const channelUrl = util_1.newUrlFromBase(channelFile, this.baseUrl, this.updater.isAddNoCacheQuery);
|
||||
try {
|
||||
const updateInfo = await this.httpRequest(channelUrl, undefined, cancellationToken);
|
||||
return Provider_1.parseUpdateInfo(updateInfo, channelFile, channelUrl);
|
||||
}
|
||||
catch (e) {
|
||||
throw builder_util_runtime_1.newError(`Unable to find latest version on ${this.toString()}, please ensure release exists: ${e.stack || e.message}`, "ERR_UPDATER_LATEST_VERSION_NOT_FOUND");
|
||||
}
|
||||
}
|
||||
resolveFiles(updateInfo) {
|
||||
return Provider_1.resolveFiles(updateInfo, this.baseUrl);
|
||||
}
|
||||
toString() {
|
||||
const { owner, slug } = this.configuration;
|
||||
return `Bitbucket (owner: ${owner}, slug: ${slug}, channel: ${this.channel})`;
|
||||
}
|
||||
}
|
||||
exports.BitbucketProvider = BitbucketProvider;
|
||||
//# sourceMappingURL=BitbucketProvider.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue