@@ -50261,10 +50261,10 @@ var Distributions;
5026150261})(Distributions || (Distributions = {}));
5026250262function getNodejsDistribution(installerOptions) {
5026350263 const versionSpec = installerOptions.versionSpec;
50264- if (versionSpec.includes(Distributions.NIGHTLY ||
50264+ if (versionSpec.includes(Distributions.NIGHTLY) ||
5026550265 versionSpec.includes(Distributions.CANARY) ||
50266- versionSpec.includes(Distributions.RC))) {
50267- throw Error('Only Offical Build supported for now');
50266+ versionSpec.includes(Distributions.RC)) {
50267+ throw Error('Only Official Build supported for now');
5026850268 }
5026950269 else {
5027050270 return new official_builds_1.default(installerOptions);
@@ -50331,16 +50331,10 @@ class OfficialBuilds extends base_distribution_1.default {
5033150331 let nodeJsVersions;
5033250332 const osArch = this.translateArchToDistUrl(this.nodeInfo.arch);
5033350333 if (this.isLtsAlias(this.nodeInfo.versionSpec)) {
50334- core.info('Attempt to resolve LTS alias from manifest...');
50335- // No try-catch since it's not possible to resolve LTS alias without manifest
50336- manifest = await this.getManifest();
50337- this.nodeInfo.versionSpec = this.resolveLtsAliasFromManifest(this.nodeInfo.versionSpec, this.nodeInfo.stable, manifest);
50334+ throw Error('lts/* version spec is not supported anymore.');
5033850335 }
5033950336 if (this.isLatestSyntax(this.nodeInfo.versionSpec)) {
50340- nodeJsVersions = await this.getNodeJsVersions();
50341- const versions = this.filterVersions(nodeJsVersions);
50342- this.nodeInfo.versionSpec = this.evaluateVersions(versions);
50343- core.info('getting latest node version...');
50337+ throw Error("'current/latest' version spec is not supported anymore.");
5034450338 }
5034550339 if (this.nodeInfo.checkLatest) {
5034650340 core.info('Attempt to resolve the latest version from manifest...');
@@ -50359,16 +50353,12 @@ class OfficialBuilds extends base_distribution_1.default {
5035950353 this.addToolPath(toolPath);
5036050354 return;
5036150355 }
50362- let downloadPath = '';
5036350356 try {
5036450357 core.info(`Attempting to download ${this.nodeInfo.versionSpec}...`);
5036550358 const versionInfo = await this.getInfoFromManifest(this.nodeInfo.versionSpec, this.nodeInfo.stable, osArch, manifest);
5036650359 if (versionInfo) {
50367- core.info(`Acquiring ${versionInfo.resolvedVersion} - ${versionInfo.arch} from ${versionInfo.downloadUrl}`);
50368- downloadPath = await tc.downloadTool(versionInfo.downloadUrl, undefined, this.nodeInfo.mirror ? this.nodeInfo.mirrorToken : this.nodeInfo.auth);
50369- if (downloadPath) {
50370- toolPath = await this.extractArchive(downloadPath, versionInfo, false);
50371- }
50360+ this.nodeInfo.versionSpec = versionInfo.resolvedVersion;
50361+ core.info(`Resolved ${versionInfo.resolvedVersion} from manifest. Preparing to download from ${this.getFallbackDisplayUrl()}.`);
5037250362 }
5037350363 else {
5037450364 core.info(`Not found in manifest. Falling back to download directly from ${this.getFallbackDisplayUrl()}`);
@@ -50431,15 +50421,10 @@ class OfficialBuilds extends base_distribution_1.default {
5043150421 return version;
5043250422 }
5043350423 getDistributionUrl(mirror) {
50434- if (mirror) {
50435- return `${mirror.replace(/\/$/, '')}/dist`;
50436- }
5043750424 return constants_1.DEFAULT_NODE_MIRROR;
5043850425 }
5043950426 getFallbackDisplayUrl() {
50440- return this.nodeInfo.mirror
50441- ? this.nodeInfo.mirror.replace(/\/$/, '')
50442- : constants_1.DEFAULT_NODE_MIRROR;
50427+ return constants_1.DEFAULT_NODE_MIRROR;
5044350428 }
5044450429 getManifest() {
5044550430 core.debug('Getting manifest from actions/node-versions@main');
0 commit comments