npm run build

This commit is contained in:
Gregory Mitchell 2024-11-09 02:27:07 +00:00 committed by GitHub
parent 8e2bc8fd07
commit 7e3fee94eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

74
dist/setup/index.js vendored
View File

@ -124535,6 +124535,7 @@ const path_1 = __importDefault(__nccwpck_require__(71017));
const semver_1 = __importDefault(__nccwpck_require__(11383)); const semver_1 = __importDefault(__nccwpck_require__(11383));
const base_installer_1 = __nccwpck_require__(59741); const base_installer_1 = __nccwpck_require__(59741);
const util_1 = __nccwpck_require__(92629); const util_1 = __nccwpck_require__(92629);
const http_client_1 = __nccwpck_require__(96255);
class JetBrainsDistribution extends base_installer_1.JavaBase { class JetBrainsDistribution extends base_installer_1.JavaBase {
constructor(installerOptions) { constructor(installerOptions) {
super('JetBrains', installerOptions); super('JetBrains', installerOptions);
@ -124557,7 +124558,7 @@ class JetBrainsDistribution extends base_installer_1.JavaBase {
const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null; const resolvedFullVersion = satisfiedVersions.length > 0 ? satisfiedVersions[0] : null;
if (!resolvedFullVersion) { if (!resolvedFullVersion) {
const availableOptions = versionsRaw const availableOptions = versionsRaw
.map(item => item.tag_name) .map(item => `${item.tag_name} (${item.semver}+${item.build})`)
.join(', '); .join(', ');
const availableOptionsMessage = availableOptions const availableOptionsMessage = availableOptions
? `\nAvailable versions: ${availableOptions}` ? `\nAvailable versions: ${availableOptions}`
@ -124610,44 +124611,75 @@ class JetBrainsDistribution extends base_installer_1.JavaBase {
rawVersions.push(...paginationPage); rawVersions.push(...paginationPage);
page_index++; page_index++;
} }
const versions0 = rawVersions.map(v => { const versions0 = rawVersions.map((v) => __awaiter(this, void 0, void 0, function* () {
var _a; var _a;
// Release tags look like one of these: // Release tags look like one of these:
// jbr-release-21.0.3b465.3 // jbr-release-21.0.3b465.3
// jbr17-b87.7
// jb11_0_11-b87.7 // jb11_0_11-b87.7
// jbr11_0_15b2043.56 // jbr11_0_15b2043.56
// 11_0_11b1536.2
// 11_0_11-b1522
const tag = v.tag_name; const tag = v.tag_name;
// Extract version string // Extract version string
let vstring; const vstring = tag
switch ((_a = tag.match(/-/g)) === null || _a === void 0 ? void 0 : _a.length) { .replace('jbr-release-', '')
case 2: .replace('jbr', '')
vstring = tag.substring(tag.lastIndexOf('-') + 1); .replace('jb', '')
.replace('-', '');
const vsplit = vstring.split('b');
let semver = vsplit[0];
const build = +vsplit[1];
// Normalize semver
if (!semver.includes('.') && !semver.includes('_'))
semver = `${semver}.0.0`;
// Construct URL
let type;
switch ((_a = this.packageType) !== null && _a !== void 0 ? _a : '') {
case 'jre':
type = 'jbr';
break; break;
case 1: case 'jdk+jcef':
vstring = tag.substring(2).replace(/-/g, ''); type = 'jbrsdk_jcef';
break; break;
case undefined: // 0 case 'jre+jcef':
vstring = tag.substring(3); type = 'jbr_jcef';
break;
case 'jdk+ft':
type = 'jbrsdk_ft';
break;
case 'jre+ft':
type = 'jbr_ft';
break; break;
default: default:
throw new Error(`Unrecognized tag_name: ${tag}`); type = 'jbrsdk';
break;
} }
const vsplit = vstring.split('b'); let url = `https://cache-redirector.jetbrains.com/intellij-jbr/${type}-${semver}-${platform}-${arch}-b${build}.tar.gz`;
const semver = vsplit[0]; let include = false;
const build = +vsplit[1]; const res = yield this.http.head(url);
// Construct URL if (res.message.statusCode === http_client_1.HttpCodes.OK) {
const url = `https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-${semver}-${platform}-${arch}-b${build}.tar.gz`; include = true;
return { }
else {
url = `https://cache-redirector.jetbrains.com/intellij-jbr/${type}_nomod-${semver}-${platform}-${arch}-b${build}.tar.gz`;
const res2 = yield this.http.head(url);
if (res2.message.statusCode === http_client_1.HttpCodes.OK) {
include = true;
}
}
const version = {
tag_name: tag, tag_name: tag,
semver: semver.replace(/_/g, '.'), semver: semver.replace(/_/g, '.'),
build: build, build: build,
url: url url: url
}; };
}); return {
const versions = versions0.filter((i) => __awaiter(this, void 0, void 0, function* () { item: version,
const res = yield this.http.head(i.url); include: include
return res.message.statusCode === 200; };
})); }));
const versions = yield Promise.all(versions0).then(res => res.filter(item => item.include).map(item => item.item));
if (core.isDebug()) { if (core.isDebug()) {
core.startGroup('Print information about available versions'); core.startGroup('Print information about available versions');
console.timeEnd('Retrieving available versions for JBR took'); // eslint-disable-line no-console console.timeEnd('Retrieving available versions for JBR took'); // eslint-disable-line no-console