Change bundle type processing for correct support JavaFX in liberica

This commit is contained in:
Daniil Razorenov 2021-11-10 12:56:55 +03:00
parent 221194fabc
commit 4b51db1630
3 changed files with 23 additions and 13 deletions

11
dist/setup/index.js vendored
View file

@ -38655,12 +38655,17 @@ class LibericaDistributions extends base_installer_1.JavaBase {
});
}
prepareAvailableVersionsUrl() {
var _a, _b;
const [bundleType, feature] = this.packageType.split('+');
const urlOptions = Object.assign(Object.assign({ os: this.getPlatformOption(), 'bundle-type': bundleType, fx: (_b = (_a = feature === null || feature === void 0 ? void 0 : feature.includes('fx')) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : 'false' }, this.getArchitectureOptions()), { 'build-type': this.stable ? 'all' : 'ea', 'installation-type': 'archive', fields: 'downloadUrl,version,featureVersion,interimVersion,updateVersion,buildVersion' });
const urlOptions = Object.assign(Object.assign({ os: this.getPlatformOption(), 'bundle-type': this.getBundleType() }, this.getArchitectureOptions()), { 'build-type': this.stable ? 'all' : 'ea', 'installation-type': 'archive', fields: 'downloadUrl,version,featureVersion,interimVersion,updateVersion,buildVersion' });
const searchParams = new URLSearchParams(urlOptions).toString();
return `https://api.bell-sw.com/v1/liberica/releases?${searchParams}`;
}
getBundleType() {
const [bundleType, feature] = this.packageType.split('+');
if (feature === null || feature === void 0 ? void 0 : feature.includes('fx')) {
return bundleType + '-full';
}
return bundleType;
}
getArchitectureOptions() {
switch (this.architecture) {
case 'x86':