update mirrorURL versions

This commit is contained in:
Aparna Jyothi 2025-01-31 11:11:24 +05:30
parent 50efbd2a86
commit 91a5e5da06
8 changed files with 304 additions and 147 deletions

View file

@ -1,7 +1,8 @@
import BasePrereleaseNodejs from '../base-distribution-prerelease';
import {NodeInputs} from '../base-models';
import * as core from '@actions/core';
export default class CanaryBuild extends BasePrereleaseNodejs {
protected distribution = 'v8-canary';
constructor(nodeInfo: NodeInputs) {
super(nodeInfo);
@ -10,4 +11,14 @@ export default class CanaryBuild extends BasePrereleaseNodejs {
protected getDistributionUrl(): string {
return 'https://nodejs.org/download/v8-canary';
}
protected getDistributionMirrorUrl(): string {
// Check if mirrorUrl exists in the nodeInfo and return it if available
const mirrorUrl = this.nodeInfo.mirrorURL;
if (mirrorUrl) {
core.info(`Using mirror URL: ${mirrorUrl}`);
return mirrorUrl;
}
return 'https://nodejs.org/download/v8-canary';
}
}