mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 03:33:34 +00:00 
			
		
		
		
	polish code
This commit is contained in:
		
							parent
							
								
									f3c48890ed
								
							
						
					
					
						commit
						cd6d6a6700
					
				
							
								
								
									
										64
									
								
								dist/cache-save/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										64
									
								
								dist/cache-save/index.js
									
									
									
									
										vendored
									
									
								
							@ -61019,6 +61019,25 @@ exports.fromPromise = function (fn) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
"use strict";
 | 
					"use strict";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
				
			||||||
 | 
					}) : (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    o[k2] = m[k];
 | 
				
			||||||
 | 
					}));
 | 
				
			||||||
 | 
					var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
 | 
				
			||||||
 | 
					    Object.defineProperty(o, "default", { enumerable: true, value: v });
 | 
				
			||||||
 | 
					}) : function(o, v) {
 | 
				
			||||||
 | 
					    o["default"] = v;
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					var __importStar = (this && this.__importStar) || function (mod) {
 | 
				
			||||||
 | 
					    if (mod && mod.__esModule) return mod;
 | 
				
			||||||
 | 
					    var result = {};
 | 
				
			||||||
 | 
					    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
				
			||||||
 | 
					    __setModuleDefault(result, mod);
 | 
				
			||||||
 | 
					    return result;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
 | 
					var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
 | 
				
			||||||
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
 | 
					    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
 | 
				
			||||||
    return new (P || (P = Promise))(function (resolve, reject) {
 | 
					    return new (P || (P = Promise))(function (resolve, reject) {
 | 
				
			||||||
@ -61028,17 +61047,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
 | 
				
			|||||||
        step((generator = generator.apply(thisArg, _arguments || [])).next());
 | 
					        step((generator = generator.apply(thisArg, _arguments || [])).next());
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
					 | 
				
			||||||
    if (mod && mod.__esModule) return mod;
 | 
					 | 
				
			||||||
    var result = {};
 | 
					 | 
				
			||||||
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
 | 
					 | 
				
			||||||
    result["default"] = mod;
 | 
					 | 
				
			||||||
    return result;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
 | 
					var __importDefault = (this && this.__importDefault) || function (mod) {
 | 
				
			||||||
    return (mod && mod.__esModule) ? mod : { "default": mod };
 | 
					    return (mod && mod.__esModule) ? mod : { "default": mod };
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
					Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
				
			||||||
 | 
					exports.run = void 0;
 | 
				
			||||||
const core = __importStar(__nccwpck_require__(2186));
 | 
					const core = __importStar(__nccwpck_require__(2186));
 | 
				
			||||||
const cache = __importStar(__nccwpck_require__(7799));
 | 
					const cache = __importStar(__nccwpck_require__(7799));
 | 
				
			||||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
 | 
					const fs_1 = __importDefault(__nccwpck_require__(7147));
 | 
				
			||||||
@ -61095,6 +61108,25 @@ run();
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
"use strict";
 | 
					"use strict";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
				
			||||||
 | 
					}) : (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    o[k2] = m[k];
 | 
				
			||||||
 | 
					}));
 | 
				
			||||||
 | 
					var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
 | 
				
			||||||
 | 
					    Object.defineProperty(o, "default", { enumerable: true, value: v });
 | 
				
			||||||
 | 
					}) : function(o, v) {
 | 
				
			||||||
 | 
					    o["default"] = v;
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					var __importStar = (this && this.__importStar) || function (mod) {
 | 
				
			||||||
 | 
					    if (mod && mod.__esModule) return mod;
 | 
				
			||||||
 | 
					    var result = {};
 | 
				
			||||||
 | 
					    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
				
			||||||
 | 
					    __setModuleDefault(result, mod);
 | 
				
			||||||
 | 
					    return result;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
 | 
					var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
 | 
				
			||||||
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
 | 
					    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
 | 
				
			||||||
    return new (P || (P = Promise))(function (resolve, reject) {
 | 
					    return new (P || (P = Promise))(function (resolve, reject) {
 | 
				
			||||||
@ -61104,14 +61136,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
 | 
				
			|||||||
        step((generator = generator.apply(thisArg, _arguments || [])).next());
 | 
					        step((generator = generator.apply(thisArg, _arguments || [])).next());
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
					 | 
				
			||||||
    if (mod && mod.__esModule) return mod;
 | 
					 | 
				
			||||||
    var result = {};
 | 
					 | 
				
			||||||
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
 | 
					 | 
				
			||||||
    result["default"] = mod;
 | 
					 | 
				
			||||||
    return result;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
					Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
				
			||||||
 | 
					exports.isCacheFeatureAvailable = exports.isGhes = exports.getCacheDirectoryPath = exports.getPackageManagerInfo = exports.getCommandOutput = exports.supportedPackageManagers = void 0;
 | 
				
			||||||
const core = __importStar(__nccwpck_require__(2186));
 | 
					const core = __importStar(__nccwpck_require__(2186));
 | 
				
			||||||
const exec = __importStar(__nccwpck_require__(1514));
 | 
					const exec = __importStar(__nccwpck_require__(1514));
 | 
				
			||||||
const cache = __importStar(__nccwpck_require__(7799));
 | 
					const cache = __importStar(__nccwpck_require__(7799));
 | 
				
			||||||
@ -61133,7 +61159,7 @@ exports.supportedPackageManagers = {
 | 
				
			|||||||
        getCacheFolderCommand: 'yarn config get cacheFolder'
 | 
					        getCacheFolderCommand: 'yarn config get cacheFolder'
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
exports.getCommandOutput = (toolCommand) => __awaiter(void 0, void 0, void 0, function* () {
 | 
					const getCommandOutput = (toolCommand) => __awaiter(void 0, void 0, void 0, function* () {
 | 
				
			||||||
    let { stdout, stderr, exitCode } = yield exec.getExecOutput(toolCommand, undefined, { ignoreReturnCode: true });
 | 
					    let { stdout, stderr, exitCode } = yield exec.getExecOutput(toolCommand, undefined, { ignoreReturnCode: true });
 | 
				
			||||||
    if (exitCode) {
 | 
					    if (exitCode) {
 | 
				
			||||||
        stderr = !stderr.trim()
 | 
					        stderr = !stderr.trim()
 | 
				
			||||||
@ -61143,6 +61169,7 @@ exports.getCommandOutput = (toolCommand) => __awaiter(void 0, void 0, void 0, fu
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    return stdout.trim();
 | 
					    return stdout.trim();
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					exports.getCommandOutput = getCommandOutput;
 | 
				
			||||||
const getPackageManagerVersion = (packageManager, command) => __awaiter(void 0, void 0, void 0, function* () {
 | 
					const getPackageManagerVersion = (packageManager, command) => __awaiter(void 0, void 0, void 0, function* () {
 | 
				
			||||||
    const stdOut = yield exports.getCommandOutput(`${packageManager} ${command}`);
 | 
					    const stdOut = yield exports.getCommandOutput(`${packageManager} ${command}`);
 | 
				
			||||||
    if (!stdOut) {
 | 
					    if (!stdOut) {
 | 
				
			||||||
@ -61150,7 +61177,7 @@ const getPackageManagerVersion = (packageManager, command) => __awaiter(void 0,
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    return stdOut;
 | 
					    return stdOut;
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
exports.getPackageManagerInfo = (packageManager) => __awaiter(void 0, void 0, void 0, function* () {
 | 
					const getPackageManagerInfo = (packageManager) => __awaiter(void 0, void 0, void 0, function* () {
 | 
				
			||||||
    if (packageManager === 'npm') {
 | 
					    if (packageManager === 'npm') {
 | 
				
			||||||
        return exports.supportedPackageManagers.npm;
 | 
					        return exports.supportedPackageManagers.npm;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -61171,7 +61198,8 @@ exports.getPackageManagerInfo = (packageManager) => __awaiter(void 0, void 0, vo
 | 
				
			|||||||
        return null;
 | 
					        return null;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
exports.getCacheDirectoryPath = (packageManagerInfo, packageManager) => __awaiter(void 0, void 0, void 0, function* () {
 | 
					exports.getPackageManagerInfo = getPackageManagerInfo;
 | 
				
			||||||
 | 
					const getCacheDirectoryPath = (packageManagerInfo, packageManager) => __awaiter(void 0, void 0, void 0, function* () {
 | 
				
			||||||
    const stdOut = yield exports.getCommandOutput(packageManagerInfo.getCacheFolderCommand);
 | 
					    const stdOut = yield exports.getCommandOutput(packageManagerInfo.getCacheFolderCommand);
 | 
				
			||||||
    if (!stdOut) {
 | 
					    if (!stdOut) {
 | 
				
			||||||
        throw new Error(`Could not get cache folder path for ${packageManager}`);
 | 
					        throw new Error(`Could not get cache folder path for ${packageManager}`);
 | 
				
			||||||
@ -61179,6 +61207,7 @@ exports.getCacheDirectoryPath = (packageManagerInfo, packageManager) => __awaite
 | 
				
			|||||||
    core.debug(`${packageManager} path is ${stdOut}`);
 | 
					    core.debug(`${packageManager} path is ${stdOut}`);
 | 
				
			||||||
    return stdOut.trim();
 | 
					    return stdOut.trim();
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					exports.getCacheDirectoryPath = getCacheDirectoryPath;
 | 
				
			||||||
function isGhes() {
 | 
					function isGhes() {
 | 
				
			||||||
    const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
 | 
					    const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
 | 
				
			||||||
    return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
 | 
					    return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
 | 
				
			||||||
@ -61205,6 +61234,7 @@ exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
 | 
				
			|||||||
"use strict";
 | 
					"use strict";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
					Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
				
			||||||
 | 
					exports.Outputs = exports.State = exports.LockType = void 0;
 | 
				
			||||||
var LockType;
 | 
					var LockType;
 | 
				
			||||||
(function (LockType) {
 | 
					(function (LockType) {
 | 
				
			||||||
    LockType["Npm"] = "npm";
 | 
					    LockType["Npm"] = "npm";
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										277
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										277
									
								
								dist/setup/index.js
									
									
									
									
										vendored
									
									
								
							@ -72915,14 +72915,27 @@ function wrappy (fn, cb) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
"use strict";
 | 
					"use strict";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
				
			||||||
 | 
					}) : (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    o[k2] = m[k];
 | 
				
			||||||
 | 
					}));
 | 
				
			||||||
 | 
					var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
 | 
				
			||||||
 | 
					    Object.defineProperty(o, "default", { enumerable: true, value: v });
 | 
				
			||||||
 | 
					}) : function(o, v) {
 | 
				
			||||||
 | 
					    o["default"] = v;
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
					var __importStar = (this && this.__importStar) || function (mod) {
 | 
				
			||||||
    if (mod && mod.__esModule) return mod;
 | 
					    if (mod && mod.__esModule) return mod;
 | 
				
			||||||
    var result = {};
 | 
					    var result = {};
 | 
				
			||||||
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
 | 
					    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
				
			||||||
    result["default"] = mod;
 | 
					    __setModuleDefault(result, mod);
 | 
				
			||||||
    return result;
 | 
					    return result;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
					Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
				
			||||||
 | 
					exports.configAuthentication = void 0;
 | 
				
			||||||
const fs = __importStar(__nccwpck_require__(7147));
 | 
					const fs = __importStar(__nccwpck_require__(7147));
 | 
				
			||||||
const os = __importStar(__nccwpck_require__(2037));
 | 
					const os = __importStar(__nccwpck_require__(2037));
 | 
				
			||||||
const path = __importStar(__nccwpck_require__(1017));
 | 
					const path = __importStar(__nccwpck_require__(1017));
 | 
				
			||||||
@ -72977,6 +72990,25 @@ function writeRegistryToFile(registryUrl, fileLocation, alwaysAuth) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
"use strict";
 | 
					"use strict";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
				
			||||||
 | 
					}) : (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    o[k2] = m[k];
 | 
				
			||||||
 | 
					}));
 | 
				
			||||||
 | 
					var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
 | 
				
			||||||
 | 
					    Object.defineProperty(o, "default", { enumerable: true, value: v });
 | 
				
			||||||
 | 
					}) : function(o, v) {
 | 
				
			||||||
 | 
					    o["default"] = v;
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					var __importStar = (this && this.__importStar) || function (mod) {
 | 
				
			||||||
 | 
					    if (mod && mod.__esModule) return mod;
 | 
				
			||||||
 | 
					    var result = {};
 | 
				
			||||||
 | 
					    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
				
			||||||
 | 
					    __setModuleDefault(result, mod);
 | 
				
			||||||
 | 
					    return result;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
 | 
					var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
 | 
				
			||||||
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
 | 
					    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
 | 
				
			||||||
    return new (P || (P = Promise))(function (resolve, reject) {
 | 
					    return new (P || (P = Promise))(function (resolve, reject) {
 | 
				
			||||||
@ -72986,17 +73018,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
 | 
				
			|||||||
        step((generator = generator.apply(thisArg, _arguments || [])).next());
 | 
					        step((generator = generator.apply(thisArg, _arguments || [])).next());
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
					 | 
				
			||||||
    if (mod && mod.__esModule) return mod;
 | 
					 | 
				
			||||||
    var result = {};
 | 
					 | 
				
			||||||
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
 | 
					 | 
				
			||||||
    result["default"] = mod;
 | 
					 | 
				
			||||||
    return result;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
 | 
					var __importDefault = (this && this.__importDefault) || function (mod) {
 | 
				
			||||||
    return (mod && mod.__esModule) ? mod : { "default": mod };
 | 
					    return (mod && mod.__esModule) ? mod : { "default": mod };
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
					Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
				
			||||||
 | 
					exports.restoreCache = void 0;
 | 
				
			||||||
const cache = __importStar(__nccwpck_require__(7799));
 | 
					const cache = __importStar(__nccwpck_require__(7799));
 | 
				
			||||||
const core = __importStar(__nccwpck_require__(2186));
 | 
					const core = __importStar(__nccwpck_require__(2186));
 | 
				
			||||||
const glob = __importStar(__nccwpck_require__(8090));
 | 
					const glob = __importStar(__nccwpck_require__(8090));
 | 
				
			||||||
@ -73004,7 +73030,7 @@ const path_1 = __importDefault(__nccwpck_require__(1017));
 | 
				
			|||||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
 | 
					const fs_1 = __importDefault(__nccwpck_require__(7147));
 | 
				
			||||||
const constants_1 = __nccwpck_require__(9042);
 | 
					const constants_1 = __nccwpck_require__(9042);
 | 
				
			||||||
const cache_utils_1 = __nccwpck_require__(1678);
 | 
					const cache_utils_1 = __nccwpck_require__(1678);
 | 
				
			||||||
exports.restoreCache = (packageManager, cacheDependencyPath) => __awaiter(void 0, void 0, void 0, function* () {
 | 
					const restoreCache = (packageManager, cacheDependencyPath) => __awaiter(void 0, void 0, void 0, function* () {
 | 
				
			||||||
    const packageManagerInfo = yield cache_utils_1.getPackageManagerInfo(packageManager);
 | 
					    const packageManagerInfo = yield cache_utils_1.getPackageManagerInfo(packageManager);
 | 
				
			||||||
    if (!packageManagerInfo) {
 | 
					    if (!packageManagerInfo) {
 | 
				
			||||||
        throw new Error(`Caching for '${packageManager}' is not supported`);
 | 
					        throw new Error(`Caching for '${packageManager}' is not supported`);
 | 
				
			||||||
@ -73030,6 +73056,7 @@ exports.restoreCache = (packageManager, cacheDependencyPath) => __awaiter(void 0
 | 
				
			|||||||
    core.saveState(constants_1.State.CacheMatchedKey, cacheKey);
 | 
					    core.saveState(constants_1.State.CacheMatchedKey, cacheKey);
 | 
				
			||||||
    core.info(`Cache restored from key: ${cacheKey}`);
 | 
					    core.info(`Cache restored from key: ${cacheKey}`);
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					exports.restoreCache = restoreCache;
 | 
				
			||||||
const findLockFile = (packageManager) => {
 | 
					const findLockFile = (packageManager) => {
 | 
				
			||||||
    let lockFiles = packageManager.lockFilePatterns;
 | 
					    let lockFiles = packageManager.lockFilePatterns;
 | 
				
			||||||
    const workspace = process.env.GITHUB_WORKSPACE;
 | 
					    const workspace = process.env.GITHUB_WORKSPACE;
 | 
				
			||||||
@ -73049,6 +73076,25 @@ const findLockFile = (packageManager) => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
"use strict";
 | 
					"use strict";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
				
			||||||
 | 
					}) : (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    o[k2] = m[k];
 | 
				
			||||||
 | 
					}));
 | 
				
			||||||
 | 
					var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
 | 
				
			||||||
 | 
					    Object.defineProperty(o, "default", { enumerable: true, value: v });
 | 
				
			||||||
 | 
					}) : function(o, v) {
 | 
				
			||||||
 | 
					    o["default"] = v;
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					var __importStar = (this && this.__importStar) || function (mod) {
 | 
				
			||||||
 | 
					    if (mod && mod.__esModule) return mod;
 | 
				
			||||||
 | 
					    var result = {};
 | 
				
			||||||
 | 
					    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
				
			||||||
 | 
					    __setModuleDefault(result, mod);
 | 
				
			||||||
 | 
					    return result;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
 | 
					var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
 | 
				
			||||||
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
 | 
					    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
 | 
				
			||||||
    return new (P || (P = Promise))(function (resolve, reject) {
 | 
					    return new (P || (P = Promise))(function (resolve, reject) {
 | 
				
			||||||
@ -73058,14 +73104,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
 | 
				
			|||||||
        step((generator = generator.apply(thisArg, _arguments || [])).next());
 | 
					        step((generator = generator.apply(thisArg, _arguments || [])).next());
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
					 | 
				
			||||||
    if (mod && mod.__esModule) return mod;
 | 
					 | 
				
			||||||
    var result = {};
 | 
					 | 
				
			||||||
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
 | 
					 | 
				
			||||||
    result["default"] = mod;
 | 
					 | 
				
			||||||
    return result;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
					Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
				
			||||||
 | 
					exports.isCacheFeatureAvailable = exports.isGhes = exports.getCacheDirectoryPath = exports.getPackageManagerInfo = exports.getCommandOutput = exports.supportedPackageManagers = void 0;
 | 
				
			||||||
const core = __importStar(__nccwpck_require__(2186));
 | 
					const core = __importStar(__nccwpck_require__(2186));
 | 
				
			||||||
const exec = __importStar(__nccwpck_require__(1514));
 | 
					const exec = __importStar(__nccwpck_require__(1514));
 | 
				
			||||||
const cache = __importStar(__nccwpck_require__(7799));
 | 
					const cache = __importStar(__nccwpck_require__(7799));
 | 
				
			||||||
@ -73087,7 +73127,7 @@ exports.supportedPackageManagers = {
 | 
				
			|||||||
        getCacheFolderCommand: 'yarn config get cacheFolder'
 | 
					        getCacheFolderCommand: 'yarn config get cacheFolder'
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
exports.getCommandOutput = (toolCommand) => __awaiter(void 0, void 0, void 0, function* () {
 | 
					const getCommandOutput = (toolCommand) => __awaiter(void 0, void 0, void 0, function* () {
 | 
				
			||||||
    let { stdout, stderr, exitCode } = yield exec.getExecOutput(toolCommand, undefined, { ignoreReturnCode: true });
 | 
					    let { stdout, stderr, exitCode } = yield exec.getExecOutput(toolCommand, undefined, { ignoreReturnCode: true });
 | 
				
			||||||
    if (exitCode) {
 | 
					    if (exitCode) {
 | 
				
			||||||
        stderr = !stderr.trim()
 | 
					        stderr = !stderr.trim()
 | 
				
			||||||
@ -73097,6 +73137,7 @@ exports.getCommandOutput = (toolCommand) => __awaiter(void 0, void 0, void 0, fu
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    return stdout.trim();
 | 
					    return stdout.trim();
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					exports.getCommandOutput = getCommandOutput;
 | 
				
			||||||
const getPackageManagerVersion = (packageManager, command) => __awaiter(void 0, void 0, void 0, function* () {
 | 
					const getPackageManagerVersion = (packageManager, command) => __awaiter(void 0, void 0, void 0, function* () {
 | 
				
			||||||
    const stdOut = yield exports.getCommandOutput(`${packageManager} ${command}`);
 | 
					    const stdOut = yield exports.getCommandOutput(`${packageManager} ${command}`);
 | 
				
			||||||
    if (!stdOut) {
 | 
					    if (!stdOut) {
 | 
				
			||||||
@ -73104,7 +73145,7 @@ const getPackageManagerVersion = (packageManager, command) => __awaiter(void 0,
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    return stdOut;
 | 
					    return stdOut;
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
exports.getPackageManagerInfo = (packageManager) => __awaiter(void 0, void 0, void 0, function* () {
 | 
					const getPackageManagerInfo = (packageManager) => __awaiter(void 0, void 0, void 0, function* () {
 | 
				
			||||||
    if (packageManager === 'npm') {
 | 
					    if (packageManager === 'npm') {
 | 
				
			||||||
        return exports.supportedPackageManagers.npm;
 | 
					        return exports.supportedPackageManagers.npm;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -73125,7 +73166,8 @@ exports.getPackageManagerInfo = (packageManager) => __awaiter(void 0, void 0, vo
 | 
				
			|||||||
        return null;
 | 
					        return null;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
exports.getCacheDirectoryPath = (packageManagerInfo, packageManager) => __awaiter(void 0, void 0, void 0, function* () {
 | 
					exports.getPackageManagerInfo = getPackageManagerInfo;
 | 
				
			||||||
 | 
					const getCacheDirectoryPath = (packageManagerInfo, packageManager) => __awaiter(void 0, void 0, void 0, function* () {
 | 
				
			||||||
    const stdOut = yield exports.getCommandOutput(packageManagerInfo.getCacheFolderCommand);
 | 
					    const stdOut = yield exports.getCommandOutput(packageManagerInfo.getCacheFolderCommand);
 | 
				
			||||||
    if (!stdOut) {
 | 
					    if (!stdOut) {
 | 
				
			||||||
        throw new Error(`Could not get cache folder path for ${packageManager}`);
 | 
					        throw new Error(`Could not get cache folder path for ${packageManager}`);
 | 
				
			||||||
@ -73133,6 +73175,7 @@ exports.getCacheDirectoryPath = (packageManagerInfo, packageManager) => __awaite
 | 
				
			|||||||
    core.debug(`${packageManager} path is ${stdOut}`);
 | 
					    core.debug(`${packageManager} path is ${stdOut}`);
 | 
				
			||||||
    return stdOut.trim();
 | 
					    return stdOut.trim();
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					exports.getCacheDirectoryPath = getCacheDirectoryPath;
 | 
				
			||||||
function isGhes() {
 | 
					function isGhes() {
 | 
				
			||||||
    const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
 | 
					    const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
 | 
				
			||||||
    return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
 | 
					    return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
 | 
				
			||||||
@ -73159,6 +73202,7 @@ exports.isCacheFeatureAvailable = isCacheFeatureAvailable;
 | 
				
			|||||||
"use strict";
 | 
					"use strict";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
					Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
				
			||||||
 | 
					exports.Outputs = exports.State = exports.LockType = void 0;
 | 
				
			||||||
var LockType;
 | 
					var LockType;
 | 
				
			||||||
(function (LockType) {
 | 
					(function (LockType) {
 | 
				
			||||||
    LockType["Npm"] = "npm";
 | 
					    LockType["Npm"] = "npm";
 | 
				
			||||||
@ -73183,6 +73227,25 @@ var Outputs;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
"use strict";
 | 
					"use strict";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
				
			||||||
 | 
					}) : (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    o[k2] = m[k];
 | 
				
			||||||
 | 
					}));
 | 
				
			||||||
 | 
					var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
 | 
				
			||||||
 | 
					    Object.defineProperty(o, "default", { enumerable: true, value: v });
 | 
				
			||||||
 | 
					}) : function(o, v) {
 | 
				
			||||||
 | 
					    o["default"] = v;
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					var __importStar = (this && this.__importStar) || function (mod) {
 | 
				
			||||||
 | 
					    if (mod && mod.__esModule) return mod;
 | 
				
			||||||
 | 
					    var result = {};
 | 
				
			||||||
 | 
					    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
				
			||||||
 | 
					    __setModuleDefault(result, mod);
 | 
				
			||||||
 | 
					    return result;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
 | 
					var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
 | 
				
			||||||
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
 | 
					    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
 | 
				
			||||||
    return new (P || (P = Promise))(function (resolve, reject) {
 | 
					    return new (P || (P = Promise))(function (resolve, reject) {
 | 
				
			||||||
@ -73192,13 +73255,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
 | 
				
			|||||||
        step((generator = generator.apply(thisArg, _arguments || [])).next());
 | 
					        step((generator = generator.apply(thisArg, _arguments || [])).next());
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
					 | 
				
			||||||
    if (mod && mod.__esModule) return mod;
 | 
					 | 
				
			||||||
    var result = {};
 | 
					 | 
				
			||||||
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
 | 
					 | 
				
			||||||
    result["default"] = mod;
 | 
					 | 
				
			||||||
    return result;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
 | 
					var __importDefault = (this && this.__importDefault) || function (mod) {
 | 
				
			||||||
    return (mod && mod.__esModule) ? mod : { "default": mod };
 | 
					    return (mod && mod.__esModule) ? mod : { "default": mod };
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@ -73223,8 +73279,9 @@ class BaseDistribution {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    getNodeJsInfo() {
 | 
					    getNodeJsInfo() {
 | 
				
			||||||
        return __awaiter(this, void 0, void 0, function* () {
 | 
					        return __awaiter(this, void 0, void 0, function* () {
 | 
				
			||||||
 | 
					            let nodeVersions;
 | 
				
			||||||
            if (this.nodeInfo.checkLatest) {
 | 
					            if (this.nodeInfo.checkLatest) {
 | 
				
			||||||
                const nodeVersions = yield this.getNodejsVersions();
 | 
					                nodeVersions = yield this.getNodejsVersions();
 | 
				
			||||||
                const versions = this.filterVersions(nodeVersions);
 | 
					                const versions = this.filterVersions(nodeVersions);
 | 
				
			||||||
                const evaluatedVersion = this.evaluateVersions(versions);
 | 
					                const evaluatedVersion = this.evaluateVersions(versions);
 | 
				
			||||||
                if (evaluatedVersion) {
 | 
					                if (evaluatedVersion) {
 | 
				
			||||||
@ -73236,7 +73293,7 @@ class BaseDistribution {
 | 
				
			|||||||
                core.info(`Found in cache @ ${toolPath}`);
 | 
					                core.info(`Found in cache @ ${toolPath}`);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            else {
 | 
					            else {
 | 
				
			||||||
                const nodeVersions = yield this.getNodejsVersions();
 | 
					                nodeVersions !== null && nodeVersions !== void 0 ? nodeVersions : (nodeVersions = yield this.getNodejsVersions());
 | 
				
			||||||
                const versions = this.filterVersions(nodeVersions);
 | 
					                const versions = this.filterVersions(nodeVersions);
 | 
				
			||||||
                const evaluatedVersion = this.evaluateVersions(versions);
 | 
					                const evaluatedVersion = this.evaluateVersions(versions);
 | 
				
			||||||
                if (!evaluatedVersion) {
 | 
					                if (!evaluatedVersion) {
 | 
				
			||||||
@ -73419,6 +73476,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
 | 
				
			|||||||
    return (mod && mod.__esModule) ? mod : { "default": mod };
 | 
					    return (mod && mod.__esModule) ? mod : { "default": mod };
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
					Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
				
			||||||
 | 
					exports.getNodejsDistribution = void 0;
 | 
				
			||||||
const nightly_builds_1 = __importDefault(__nccwpck_require__(1002));
 | 
					const nightly_builds_1 = __importDefault(__nccwpck_require__(1002));
 | 
				
			||||||
const official_builds_1 = __importDefault(__nccwpck_require__(9856));
 | 
					const official_builds_1 = __importDefault(__nccwpck_require__(9856));
 | 
				
			||||||
const rc_builds_1 = __importDefault(__nccwpck_require__(6235));
 | 
					const rc_builds_1 = __importDefault(__nccwpck_require__(6235));
 | 
				
			||||||
@ -73466,11 +73524,23 @@ exports.getNodejsDistribution = getNodejsDistribution;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
"use strict";
 | 
					"use strict";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
				
			||||||
 | 
					}) : (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    o[k2] = m[k];
 | 
				
			||||||
 | 
					}));
 | 
				
			||||||
 | 
					var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
 | 
				
			||||||
 | 
					    Object.defineProperty(o, "default", { enumerable: true, value: v });
 | 
				
			||||||
 | 
					}) : function(o, v) {
 | 
				
			||||||
 | 
					    o["default"] = v;
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
					var __importStar = (this && this.__importStar) || function (mod) {
 | 
				
			||||||
    if (mod && mod.__esModule) return mod;
 | 
					    if (mod && mod.__esModule) return mod;
 | 
				
			||||||
    var result = {};
 | 
					    var result = {};
 | 
				
			||||||
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
 | 
					    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
				
			||||||
    result["default"] = mod;
 | 
					    __setModuleDefault(result, mod);
 | 
				
			||||||
    return result;
 | 
					    return result;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
 | 
					var __importDefault = (this && this.__importDefault) || function (mod) {
 | 
				
			||||||
@ -73484,6 +73554,7 @@ const base_distribution_1 = __importDefault(__nccwpck_require__(8653));
 | 
				
			|||||||
class NightlyNodejs extends base_distribution_1.default {
 | 
					class NightlyNodejs extends base_distribution_1.default {
 | 
				
			||||||
    constructor(nodeInfo) {
 | 
					    constructor(nodeInfo) {
 | 
				
			||||||
        super(nodeInfo);
 | 
					        super(nodeInfo);
 | 
				
			||||||
 | 
					        this.distribution = 'nightly';
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    findVersionInHoostedToolCacheDirectory() {
 | 
					    findVersionInHoostedToolCacheDirectory() {
 | 
				
			||||||
        let toolPath = '';
 | 
					        let toolPath = '';
 | 
				
			||||||
@ -73494,7 +73565,7 @@ class NightlyNodejs extends base_distribution_1.default {
 | 
				
			|||||||
            if (!prerelease) {
 | 
					            if (!prerelease) {
 | 
				
			||||||
                return false;
 | 
					                return false;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            return prerelease[0].includes('nightly');
 | 
					            return prerelease[0].includes(this.distribution);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        localVersionPaths.sort(semver_1.default.rcompare);
 | 
					        localVersionPaths.sort(semver_1.default.rcompare);
 | 
				
			||||||
        const localVersion = this.evaluateVersions(localVersionPaths);
 | 
					        const localVersion = this.evaluateVersions(localVersionPaths);
 | 
				
			||||||
@ -73506,10 +73577,10 @@ class NightlyNodejs extends base_distribution_1.default {
 | 
				
			|||||||
    evaluateVersions(versions) {
 | 
					    evaluateVersions(versions) {
 | 
				
			||||||
        let version = '';
 | 
					        let version = '';
 | 
				
			||||||
        core.debug(`evaluating ${versions.length} versions`);
 | 
					        core.debug(`evaluating ${versions.length} versions`);
 | 
				
			||||||
        const { includePrerelease, range } = this.createRangePreRelease(this.nodeInfo.versionSpec, 'nightly');
 | 
					        const { includePrerelease, range } = this.createRangePreRelease(this.nodeInfo.versionSpec);
 | 
				
			||||||
        for (let i = 0; i < versions.length; i++) {
 | 
					        for (let i = 0; i < versions.length; i++) {
 | 
				
			||||||
            const potential = versions[i];
 | 
					            const potential = versions[i];
 | 
				
			||||||
            const satisfied = semver_1.default.satisfies(potential.replace('nightly', 'nightly.'), range, {
 | 
					            const satisfied = semver_1.default.satisfies(potential.replace(this.distribution, `${this.distribution}.`), range, {
 | 
				
			||||||
                includePrerelease: includePrerelease
 | 
					                includePrerelease: includePrerelease
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
            if (satisfied) {
 | 
					            if (satisfied) {
 | 
				
			||||||
@ -73528,16 +73599,16 @@ class NightlyNodejs extends base_distribution_1.default {
 | 
				
			|||||||
    getDistributionUrl() {
 | 
					    getDistributionUrl() {
 | 
				
			||||||
        return 'https://nodejs.org/download/nightly';
 | 
					        return 'https://nodejs.org/download/nightly';
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    createRangePreRelease(versionSpec, distribution = '') {
 | 
					    createRangePreRelease(versionSpec) {
 | 
				
			||||||
        let range;
 | 
					        let range;
 | 
				
			||||||
        const [raw, prerelease] = this.splitVersionSpec(versionSpec);
 | 
					        const [raw, prerelease] = this.splitVersionSpec(versionSpec);
 | 
				
			||||||
        const isValidVersion = semver_1.default.valid(raw);
 | 
					        const isValidVersion = semver_1.default.valid(raw);
 | 
				
			||||||
        const rawVersion = (isValidVersion ? raw : semver_1.default.coerce(raw));
 | 
					        const rawVersion = (isValidVersion ? raw : semver_1.default.coerce(raw));
 | 
				
			||||||
        if (prerelease !== distribution) {
 | 
					        if (prerelease !== this.distribution) {
 | 
				
			||||||
            range = `${rawVersion}-${prerelease.replace(distribution, `${distribution}.`)}`;
 | 
					            range = `${rawVersion}-${prerelease.replace(this.distribution, `${this.distribution}.`)}`;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else {
 | 
					        else {
 | 
				
			||||||
            range = `${semver_1.default.validRange(`^${rawVersion}-${distribution}`)}-0`;
 | 
					            range = `${semver_1.default.validRange(`^${rawVersion}-${this.distribution}`)}-0`;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return { range, includePrerelease: !isValidVersion };
 | 
					        return { range, includePrerelease: !isValidVersion };
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -73555,6 +73626,25 @@ exports["default"] = NightlyNodejs;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
"use strict";
 | 
					"use strict";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
				
			||||||
 | 
					}) : (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    o[k2] = m[k];
 | 
				
			||||||
 | 
					}));
 | 
				
			||||||
 | 
					var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
 | 
				
			||||||
 | 
					    Object.defineProperty(o, "default", { enumerable: true, value: v });
 | 
				
			||||||
 | 
					}) : function(o, v) {
 | 
				
			||||||
 | 
					    o["default"] = v;
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					var __importStar = (this && this.__importStar) || function (mod) {
 | 
				
			||||||
 | 
					    if (mod && mod.__esModule) return mod;
 | 
				
			||||||
 | 
					    var result = {};
 | 
				
			||||||
 | 
					    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
				
			||||||
 | 
					    __setModuleDefault(result, mod);
 | 
				
			||||||
 | 
					    return result;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
 | 
					var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
 | 
				
			||||||
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
 | 
					    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
 | 
				
			||||||
    return new (P || (P = Promise))(function (resolve, reject) {
 | 
					    return new (P || (P = Promise))(function (resolve, reject) {
 | 
				
			||||||
@ -73564,13 +73654,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
 | 
				
			|||||||
        step((generator = generator.apply(thisArg, _arguments || [])).next());
 | 
					        step((generator = generator.apply(thisArg, _arguments || [])).next());
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
					 | 
				
			||||||
    if (mod && mod.__esModule) return mod;
 | 
					 | 
				
			||||||
    var result = {};
 | 
					 | 
				
			||||||
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
 | 
					 | 
				
			||||||
    result["default"] = mod;
 | 
					 | 
				
			||||||
    return result;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
 | 
					var __importDefault = (this && this.__importDefault) || function (mod) {
 | 
				
			||||||
    return (mod && mod.__esModule) ? mod : { "default": mod };
 | 
					    return (mod && mod.__esModule) ? mod : { "default": mod };
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@ -73589,6 +73672,7 @@ class OfficialBuilds extends base_distribution_1.default {
 | 
				
			|||||||
        return __awaiter(this, void 0, void 0, function* () {
 | 
					        return __awaiter(this, void 0, void 0, function* () {
 | 
				
			||||||
            let manifest;
 | 
					            let manifest;
 | 
				
			||||||
            let nodeVersions;
 | 
					            let nodeVersions;
 | 
				
			||||||
 | 
					            const osArch = this.translateArchToDistUrl(this.nodeInfo.arch);
 | 
				
			||||||
            if (this.isLtsAlias(this.nodeInfo.versionSpec)) {
 | 
					            if (this.isLtsAlias(this.nodeInfo.versionSpec)) {
 | 
				
			||||||
                core.info('Attempt to resolve LTS alias from manifest...');
 | 
					                core.info('Attempt to resolve LTS alias from manifest...');
 | 
				
			||||||
                // No try-catch since it's not possible to resolve LTS alias without manifest
 | 
					                // No try-catch since it's not possible to resolve LTS alias without manifest
 | 
				
			||||||
@ -73603,7 +73687,6 @@ class OfficialBuilds extends base_distribution_1.default {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
            if (this.nodeInfo.checkLatest) {
 | 
					            if (this.nodeInfo.checkLatest) {
 | 
				
			||||||
                core.info('Attempt to resolve the latest version from manifest...');
 | 
					                core.info('Attempt to resolve the latest version from manifest...');
 | 
				
			||||||
                const osArch = this.translateArchToDistUrl(this.nodeInfo.arch);
 | 
					 | 
				
			||||||
                const resolvedVersion = yield this.resolveVersionFromManifest(this.nodeInfo.versionSpec, osArch, manifest);
 | 
					                const resolvedVersion = yield this.resolveVersionFromManifest(this.nodeInfo.versionSpec, osArch, manifest);
 | 
				
			||||||
                if (resolvedVersion) {
 | 
					                if (resolvedVersion) {
 | 
				
			||||||
                    this.nodeInfo.versionSpec = resolvedVersion;
 | 
					                    this.nodeInfo.versionSpec = resolvedVersion;
 | 
				
			||||||
@ -73621,7 +73704,6 @@ class OfficialBuilds extends base_distribution_1.default {
 | 
				
			|||||||
                let downloadPath = '';
 | 
					                let downloadPath = '';
 | 
				
			||||||
                try {
 | 
					                try {
 | 
				
			||||||
                    core.info(`Attempting to download ${this.nodeInfo.versionSpec}...`);
 | 
					                    core.info(`Attempting to download ${this.nodeInfo.versionSpec}...`);
 | 
				
			||||||
                    const osArch = this.translateArchToDistUrl(this.nodeInfo.arch);
 | 
					 | 
				
			||||||
                    const versionInfo = yield this.getInfoFromManifest(this.nodeInfo.versionSpec, osArch, manifest);
 | 
					                    const versionInfo = yield this.getInfoFromManifest(this.nodeInfo.versionSpec, osArch, manifest);
 | 
				
			||||||
                    if (versionInfo) {
 | 
					                    if (versionInfo) {
 | 
				
			||||||
                        core.info(`Acquiring ${versionInfo.resolvedVersion} - ${versionInfo.arch} from ${versionInfo.downloadUrl}`);
 | 
					                        core.info(`Acquiring ${versionInfo.resolvedVersion} - ${versionInfo.arch} from ${versionInfo.downloadUrl}`);
 | 
				
			||||||
@ -73765,11 +73847,23 @@ exports["default"] = OfficialBuilds;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
"use strict";
 | 
					"use strict";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
				
			||||||
 | 
					}) : (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    o[k2] = m[k];
 | 
				
			||||||
 | 
					}));
 | 
				
			||||||
 | 
					var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
 | 
				
			||||||
 | 
					    Object.defineProperty(o, "default", { enumerable: true, value: v });
 | 
				
			||||||
 | 
					}) : function(o, v) {
 | 
				
			||||||
 | 
					    o["default"] = v;
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
					var __importStar = (this && this.__importStar) || function (mod) {
 | 
				
			||||||
    if (mod && mod.__esModule) return mod;
 | 
					    if (mod && mod.__esModule) return mod;
 | 
				
			||||||
    var result = {};
 | 
					    var result = {};
 | 
				
			||||||
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
 | 
					    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
				
			||||||
    result["default"] = mod;
 | 
					    __setModuleDefault(result, mod);
 | 
				
			||||||
    return result;
 | 
					    return result;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
 | 
					var __importDefault = (this && this.__importDefault) || function (mod) {
 | 
				
			||||||
@ -73816,11 +73910,23 @@ exports["default"] = RcBuild;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
"use strict";
 | 
					"use strict";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
				
			||||||
 | 
					}) : (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    o[k2] = m[k];
 | 
				
			||||||
 | 
					}));
 | 
				
			||||||
 | 
					var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
 | 
				
			||||||
 | 
					    Object.defineProperty(o, "default", { enumerable: true, value: v });
 | 
				
			||||||
 | 
					}) : function(o, v) {
 | 
				
			||||||
 | 
					    o["default"] = v;
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
					var __importStar = (this && this.__importStar) || function (mod) {
 | 
				
			||||||
    if (mod && mod.__esModule) return mod;
 | 
					    if (mod && mod.__esModule) return mod;
 | 
				
			||||||
    var result = {};
 | 
					    var result = {};
 | 
				
			||||||
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
 | 
					    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
				
			||||||
    result["default"] = mod;
 | 
					    __setModuleDefault(result, mod);
 | 
				
			||||||
    return result;
 | 
					    return result;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
 | 
					var __importDefault = (this && this.__importDefault) || function (mod) {
 | 
				
			||||||
@ -73834,6 +73940,7 @@ const base_distribution_1 = __importDefault(__nccwpck_require__(8653));
 | 
				
			|||||||
class CanaryBuild extends base_distribution_1.default {
 | 
					class CanaryBuild extends base_distribution_1.default {
 | 
				
			||||||
    constructor(nodeInfo) {
 | 
					    constructor(nodeInfo) {
 | 
				
			||||||
        super(nodeInfo);
 | 
					        super(nodeInfo);
 | 
				
			||||||
 | 
					        this.distribution = 'v8-canary';
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    findVersionInHoostedToolCacheDirectory() {
 | 
					    findVersionInHoostedToolCacheDirectory() {
 | 
				
			||||||
        let toolPath = '';
 | 
					        let toolPath = '';
 | 
				
			||||||
@ -73844,7 +73951,7 @@ class CanaryBuild extends base_distribution_1.default {
 | 
				
			|||||||
            if (!prerelease) {
 | 
					            if (!prerelease) {
 | 
				
			||||||
                return false;
 | 
					                return false;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            return prerelease[0].includes('v8-canary');
 | 
					            return prerelease[0].includes(this.distribution);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        localVersionPaths.sort(semver_1.default.rcompare);
 | 
					        localVersionPaths.sort(semver_1.default.rcompare);
 | 
				
			||||||
        const localVersion = this.evaluateVersions(localVersionPaths);
 | 
					        const localVersion = this.evaluateVersions(localVersionPaths);
 | 
				
			||||||
@ -73859,10 +73966,10 @@ class CanaryBuild extends base_distribution_1.default {
 | 
				
			|||||||
    evaluateVersions(versions) {
 | 
					    evaluateVersions(versions) {
 | 
				
			||||||
        let version = '';
 | 
					        let version = '';
 | 
				
			||||||
        core.debug(`evaluating ${versions.length} versions`);
 | 
					        core.debug(`evaluating ${versions.length} versions`);
 | 
				
			||||||
        const { includePrerelease, range } = this.createRangePreRelease(this.nodeInfo.versionSpec, 'v8-canary');
 | 
					        const { includePrerelease, range } = this.createRangePreRelease(this.nodeInfo.versionSpec);
 | 
				
			||||||
        for (let i = 0; i < versions.length; i++) {
 | 
					        for (let i = 0; i < versions.length; i++) {
 | 
				
			||||||
            const potential = versions[i];
 | 
					            const potential = versions[i];
 | 
				
			||||||
            const satisfied = semver_1.default.satisfies(potential.replace('v8-canary', 'v8-canary.'), range, {
 | 
					            const satisfied = semver_1.default.satisfies(potential.replace(this.distribution, `${this.distribution}.`), range, {
 | 
				
			||||||
                includePrerelease: includePrerelease
 | 
					                includePrerelease: includePrerelease
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
            if (satisfied) {
 | 
					            if (satisfied) {
 | 
				
			||||||
@ -73878,16 +73985,16 @@ class CanaryBuild extends base_distribution_1.default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
        return version;
 | 
					        return version;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    createRangePreRelease(versionSpec, distribution = '') {
 | 
					    createRangePreRelease(versionSpec) {
 | 
				
			||||||
        let range;
 | 
					        let range;
 | 
				
			||||||
        const [raw, prerelease] = this.splitVersionSpec(versionSpec);
 | 
					        const [raw, prerelease] = this.splitVersionSpec(versionSpec);
 | 
				
			||||||
        const isValidVersion = semver_1.default.valid(raw);
 | 
					        const isValidVersion = semver_1.default.valid(raw);
 | 
				
			||||||
        const rawVersion = (isValidVersion ? raw : semver_1.default.coerce(raw));
 | 
					        const rawVersion = (isValidVersion ? raw : semver_1.default.coerce(raw));
 | 
				
			||||||
        if (prerelease !== distribution) {
 | 
					        if (prerelease !== this.distribution) {
 | 
				
			||||||
            range = `${rawVersion}-${prerelease.replace(distribution, `${distribution}.`)}`;
 | 
					            range = `${rawVersion}-${prerelease.replace(this.distribution, `${this.distribution}.`)}`;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else {
 | 
					        else {
 | 
				
			||||||
            range = `${semver_1.default.validRange(`^${rawVersion}-${distribution}`)}-0`;
 | 
					            range = `${semver_1.default.validRange(`^${rawVersion}-${this.distribution}`)}-0`;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        return { range, includePrerelease: !isValidVersion };
 | 
					        return { range, includePrerelease: !isValidVersion };
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -73905,6 +74012,25 @@ exports["default"] = CanaryBuild;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
"use strict";
 | 
					"use strict";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
				
			||||||
 | 
					}) : (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    o[k2] = m[k];
 | 
				
			||||||
 | 
					}));
 | 
				
			||||||
 | 
					var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
 | 
				
			||||||
 | 
					    Object.defineProperty(o, "default", { enumerable: true, value: v });
 | 
				
			||||||
 | 
					}) : function(o, v) {
 | 
				
			||||||
 | 
					    o["default"] = v;
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					var __importStar = (this && this.__importStar) || function (mod) {
 | 
				
			||||||
 | 
					    if (mod && mod.__esModule) return mod;
 | 
				
			||||||
 | 
					    var result = {};
 | 
				
			||||||
 | 
					    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
				
			||||||
 | 
					    __setModuleDefault(result, mod);
 | 
				
			||||||
 | 
					    return result;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
 | 
					var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
 | 
				
			||||||
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
 | 
					    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
 | 
				
			||||||
    return new (P || (P = Promise))(function (resolve, reject) {
 | 
					    return new (P || (P = Promise))(function (resolve, reject) {
 | 
				
			||||||
@ -73914,17 +74040,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
 | 
				
			|||||||
        step((generator = generator.apply(thisArg, _arguments || [])).next());
 | 
					        step((generator = generator.apply(thisArg, _arguments || [])).next());
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
					 | 
				
			||||||
    if (mod && mod.__esModule) return mod;
 | 
					 | 
				
			||||||
    var result = {};
 | 
					 | 
				
			||||||
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
 | 
					 | 
				
			||||||
    result["default"] = mod;
 | 
					 | 
				
			||||||
    return result;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
 | 
					var __importDefault = (this && this.__importDefault) || function (mod) {
 | 
				
			||||||
    return (mod && mod.__esModule) ? mod : { "default": mod };
 | 
					    return (mod && mod.__esModule) ? mod : { "default": mod };
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
					Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
				
			||||||
 | 
					exports.run = void 0;
 | 
				
			||||||
const core = __importStar(__nccwpck_require__(2186));
 | 
					const core = __importStar(__nccwpck_require__(2186));
 | 
				
			||||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
 | 
					const fs_1 = __importDefault(__nccwpck_require__(7147));
 | 
				
			||||||
const os_1 = __importDefault(__nccwpck_require__(2037));
 | 
					const os_1 = __importDefault(__nccwpck_require__(2037));
 | 
				
			||||||
@ -74014,6 +74134,25 @@ function resolveVersionInput() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
"use strict";
 | 
					"use strict";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
 | 
				
			||||||
 | 
					}) : (function(o, m, k, k2) {
 | 
				
			||||||
 | 
					    if (k2 === undefined) k2 = k;
 | 
				
			||||||
 | 
					    o[k2] = m[k];
 | 
				
			||||||
 | 
					}));
 | 
				
			||||||
 | 
					var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
 | 
				
			||||||
 | 
					    Object.defineProperty(o, "default", { enumerable: true, value: v });
 | 
				
			||||||
 | 
					}) : function(o, v) {
 | 
				
			||||||
 | 
					    o["default"] = v;
 | 
				
			||||||
 | 
					});
 | 
				
			||||||
 | 
					var __importStar = (this && this.__importStar) || function (mod) {
 | 
				
			||||||
 | 
					    if (mod && mod.__esModule) return mod;
 | 
				
			||||||
 | 
					    var result = {};
 | 
				
			||||||
 | 
					    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
 | 
				
			||||||
 | 
					    __setModuleDefault(result, mod);
 | 
				
			||||||
 | 
					    return result;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
 | 
					var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
 | 
				
			||||||
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
 | 
					    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
 | 
				
			||||||
    return new (P || (P = Promise))(function (resolve, reject) {
 | 
					    return new (P || (P = Promise))(function (resolve, reject) {
 | 
				
			||||||
@ -74023,14 +74162,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
 | 
				
			|||||||
        step((generator = generator.apply(thisArg, _arguments || [])).next());
 | 
					        step((generator = generator.apply(thisArg, _arguments || [])).next());
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
var __importStar = (this && this.__importStar) || function (mod) {
 | 
					 | 
				
			||||||
    if (mod && mod.__esModule) return mod;
 | 
					 | 
				
			||||||
    var result = {};
 | 
					 | 
				
			||||||
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
 | 
					 | 
				
			||||||
    result["default"] = mod;
 | 
					 | 
				
			||||||
    return result;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
					Object.defineProperty(exports, "__esModule", ({ value: true }));
 | 
				
			||||||
 | 
					exports.printEnvDetailsAndSetOutput = exports.parseNodeVersionFile = void 0;
 | 
				
			||||||
const core = __importStar(__nccwpck_require__(2186));
 | 
					const core = __importStar(__nccwpck_require__(2186));
 | 
				
			||||||
const exec = __importStar(__nccwpck_require__(1514));
 | 
					const exec = __importStar(__nccwpck_require__(1514));
 | 
				
			||||||
function parseNodeVersionFile(contents) {
 | 
					function parseNodeVersionFile(contents) {
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										14
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										14
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -28,7 +28,7 @@
 | 
				
			|||||||
        "jest-circus": "^27.2.5",
 | 
					        "jest-circus": "^27.2.5",
 | 
				
			||||||
        "prettier": "^1.19.1",
 | 
					        "prettier": "^1.19.1",
 | 
				
			||||||
        "ts-jest": "^27.0.5",
 | 
					        "ts-jest": "^27.0.5",
 | 
				
			||||||
        "typescript": "^3.8.3"
 | 
					        "typescript": "^4.2.3"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/@actions/cache": {
 | 
					    "node_modules/@actions/cache": {
 | 
				
			||||||
@ -4813,9 +4813,9 @@
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/typescript": {
 | 
					    "node_modules/typescript": {
 | 
				
			||||||
      "version": "3.8.3",
 | 
					      "version": "4.2.3",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz",
 | 
				
			||||||
      "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==",
 | 
					      "integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==",
 | 
				
			||||||
      "dev": true,
 | 
					      "dev": true,
 | 
				
			||||||
      "bin": {
 | 
					      "bin": {
 | 
				
			||||||
        "tsc": "bin/tsc",
 | 
					        "tsc": "bin/tsc",
 | 
				
			||||||
@ -8861,9 +8861,9 @@
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "typescript": {
 | 
					    "typescript": {
 | 
				
			||||||
      "version": "3.8.3",
 | 
					      "version": "4.2.3",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz",
 | 
				
			||||||
      "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==",
 | 
					      "integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==",
 | 
				
			||||||
      "dev": true
 | 
					      "dev": true
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "universal-user-agent": {
 | 
					    "universal-user-agent": {
 | 
				
			||||||
 | 
				
			|||||||
@ -42,6 +42,6 @@
 | 
				
			|||||||
    "jest-circus": "^27.2.5",
 | 
					    "jest-circus": "^27.2.5",
 | 
				
			||||||
    "prettier": "^1.19.1",
 | 
					    "prettier": "^1.19.1",
 | 
				
			||||||
    "ts-jest": "^27.0.5",
 | 
					    "ts-jest": "^27.0.5",
 | 
				
			||||||
    "typescript": "^3.8.3"
 | 
					    "typescript": "^4.2.3"
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -27,8 +27,9 @@ export default abstract class BaseDistribution {
 | 
				
			|||||||
  protected abstract evaluateVersions(nodeVersions: string[]): string;
 | 
					  protected abstract evaluateVersions(nodeVersions: string[]): string;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  public async getNodeJsInfo() {
 | 
					  public async getNodeJsInfo() {
 | 
				
			||||||
 | 
					    let nodeVersions: INodeVersion[] | undefined;
 | 
				
			||||||
    if (this.nodeInfo.checkLatest) {
 | 
					    if (this.nodeInfo.checkLatest) {
 | 
				
			||||||
      const nodeVersions = await this.getNodejsVersions();
 | 
					      nodeVersions = await this.getNodejsVersions();
 | 
				
			||||||
      const versions = this.filterVersions(nodeVersions);
 | 
					      const versions = this.filterVersions(nodeVersions);
 | 
				
			||||||
      const evaluatedVersion = this.evaluateVersions(versions);
 | 
					      const evaluatedVersion = this.evaluateVersions(versions);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -41,7 +42,7 @@ export default abstract class BaseDistribution {
 | 
				
			|||||||
    if (toolPath) {
 | 
					    if (toolPath) {
 | 
				
			||||||
      core.info(`Found in cache @ ${toolPath}`);
 | 
					      core.info(`Found in cache @ ${toolPath}`);
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      const nodeVersions = await this.getNodejsVersions();
 | 
					      nodeVersions ??= await this.getNodejsVersions();
 | 
				
			||||||
      const versions = this.filterVersions(nodeVersions);
 | 
					      const versions = this.filterVersions(nodeVersions);
 | 
				
			||||||
      const evaluatedVersion = this.evaluateVersions(versions);
 | 
					      const evaluatedVersion = this.evaluateVersions(versions);
 | 
				
			||||||
      if (!evaluatedVersion) {
 | 
					      if (!evaluatedVersion) {
 | 
				
			||||||
 | 
				
			|||||||
@ -7,6 +7,7 @@ import BaseDistribution from '../base-distribution';
 | 
				
			|||||||
import {INodejs} from '../base-models';
 | 
					import {INodejs} from '../base-models';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default class NightlyNodejs extends BaseDistribution {
 | 
					export default class NightlyNodejs extends BaseDistribution {
 | 
				
			||||||
 | 
					  protected distribution = 'nightly';
 | 
				
			||||||
  constructor(nodeInfo: INodejs) {
 | 
					  constructor(nodeInfo: INodejs) {
 | 
				
			||||||
    super(nodeInfo);
 | 
					    super(nodeInfo);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@ -21,7 +22,7 @@ export default class NightlyNodejs extends BaseDistribution {
 | 
				
			|||||||
          return false;
 | 
					          return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return prerelease[0].includes('nightly');
 | 
					        return prerelease[0].includes(this.distribution);
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    localVersionPaths.sort(semver.rcompare);
 | 
					    localVersionPaths.sort(semver.rcompare);
 | 
				
			||||||
    const localVersion = this.evaluateVersions(localVersionPaths);
 | 
					    const localVersion = this.evaluateVersions(localVersionPaths);
 | 
				
			||||||
@ -38,14 +39,13 @@ export default class NightlyNodejs extends BaseDistribution {
 | 
				
			|||||||
    core.debug(`evaluating ${versions.length} versions`);
 | 
					    core.debug(`evaluating ${versions.length} versions`);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const {includePrerelease, range} = this.createRangePreRelease(
 | 
					    const {includePrerelease, range} = this.createRangePreRelease(
 | 
				
			||||||
      this.nodeInfo.versionSpec,
 | 
					      this.nodeInfo.versionSpec
 | 
				
			||||||
      'nightly'
 | 
					 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (let i = 0; i < versions.length; i++) {
 | 
					    for (let i = 0; i < versions.length; i++) {
 | 
				
			||||||
      const potential: string = versions[i];
 | 
					      const potential: string = versions[i];
 | 
				
			||||||
      const satisfied: boolean = semver.satisfies(
 | 
					      const satisfied: boolean = semver.satisfies(
 | 
				
			||||||
        potential.replace('nightly', 'nightly.'),
 | 
					        potential.replace(this.distribution, `${this.distribution}.`),
 | 
				
			||||||
        range,
 | 
					        range,
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          includePrerelease: includePrerelease
 | 
					          includePrerelease: includePrerelease
 | 
				
			||||||
@ -70,22 +70,19 @@ export default class NightlyNodejs extends BaseDistribution {
 | 
				
			|||||||
    return 'https://nodejs.org/download/nightly';
 | 
					    return 'https://nodejs.org/download/nightly';
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  protected createRangePreRelease(
 | 
					  protected createRangePreRelease(versionSpec: string) {
 | 
				
			||||||
    versionSpec: string,
 | 
					 | 
				
			||||||
    distribution: string = ''
 | 
					 | 
				
			||||||
  ) {
 | 
					 | 
				
			||||||
    let range: string;
 | 
					    let range: string;
 | 
				
			||||||
    const [raw, prerelease] = this.splitVersionSpec(versionSpec);
 | 
					    const [raw, prerelease] = this.splitVersionSpec(versionSpec);
 | 
				
			||||||
    const isValidVersion = semver.valid(raw);
 | 
					    const isValidVersion = semver.valid(raw);
 | 
				
			||||||
    const rawVersion = (isValidVersion ? raw : semver.coerce(raw))!;
 | 
					    const rawVersion = (isValidVersion ? raw : semver.coerce(raw))!;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (prerelease !== distribution) {
 | 
					    if (prerelease !== this.distribution) {
 | 
				
			||||||
      range = `${rawVersion}-${prerelease.replace(
 | 
					      range = `${rawVersion}-${prerelease.replace(
 | 
				
			||||||
        distribution,
 | 
					        this.distribution,
 | 
				
			||||||
        `${distribution}.`
 | 
					        `${this.distribution}.`
 | 
				
			||||||
      )}`;
 | 
					      )}`;
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      range = `${semver.validRange(`^${rawVersion}-${distribution}`)}-0`;
 | 
					      range = `${semver.validRange(`^${rawVersion}-${this.distribution}`)}-0`;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return {range, includePrerelease: !isValidVersion};
 | 
					    return {range, includePrerelease: !isValidVersion};
 | 
				
			||||||
 | 
				
			|||||||
@ -19,6 +19,7 @@ export default class OfficialBuilds extends BaseDistribution {
 | 
				
			|||||||
  public async getNodeJsInfo() {
 | 
					  public async getNodeJsInfo() {
 | 
				
			||||||
    let manifest: tc.IToolRelease[] | undefined;
 | 
					    let manifest: tc.IToolRelease[] | undefined;
 | 
				
			||||||
    let nodeVersions: INodeVersion[] | undefined;
 | 
					    let nodeVersions: INodeVersion[] | undefined;
 | 
				
			||||||
 | 
					    const osArch = this.translateArchToDistUrl(this.nodeInfo.arch);
 | 
				
			||||||
    if (this.isLtsAlias(this.nodeInfo.versionSpec)) {
 | 
					    if (this.isLtsAlias(this.nodeInfo.versionSpec)) {
 | 
				
			||||||
      core.info('Attempt to resolve LTS alias from manifest...');
 | 
					      core.info('Attempt to resolve LTS alias from manifest...');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -42,7 +43,6 @@ export default class OfficialBuilds extends BaseDistribution {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if (this.nodeInfo.checkLatest) {
 | 
					    if (this.nodeInfo.checkLatest) {
 | 
				
			||||||
      core.info('Attempt to resolve the latest version from manifest...');
 | 
					      core.info('Attempt to resolve the latest version from manifest...');
 | 
				
			||||||
      const osArch = this.translateArchToDistUrl(this.nodeInfo.arch);
 | 
					 | 
				
			||||||
      const resolvedVersion = await this.resolveVersionFromManifest(
 | 
					      const resolvedVersion = await this.resolveVersionFromManifest(
 | 
				
			||||||
        this.nodeInfo.versionSpec,
 | 
					        this.nodeInfo.versionSpec,
 | 
				
			||||||
        osArch,
 | 
					        osArch,
 | 
				
			||||||
@ -66,7 +66,7 @@ export default class OfficialBuilds extends BaseDistribution {
 | 
				
			|||||||
      let downloadPath = '';
 | 
					      let downloadPath = '';
 | 
				
			||||||
      try {
 | 
					      try {
 | 
				
			||||||
        core.info(`Attempting to download ${this.nodeInfo.versionSpec}...`);
 | 
					        core.info(`Attempting to download ${this.nodeInfo.versionSpec}...`);
 | 
				
			||||||
        const osArch = this.translateArchToDistUrl(this.nodeInfo.arch);
 | 
					
 | 
				
			||||||
        const versionInfo = await this.getInfoFromManifest(
 | 
					        const versionInfo = await this.getInfoFromManifest(
 | 
				
			||||||
          this.nodeInfo.versionSpec,
 | 
					          this.nodeInfo.versionSpec,
 | 
				
			||||||
          osArch,
 | 
					          osArch,
 | 
				
			||||||
 | 
				
			|||||||
@ -7,6 +7,7 @@ import BaseDistribution from '../base-distribution';
 | 
				
			|||||||
import {INodejs} from '../base-models';
 | 
					import {INodejs} from '../base-models';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default class CanaryBuild extends BaseDistribution {
 | 
					export default class CanaryBuild extends BaseDistribution {
 | 
				
			||||||
 | 
					  protected distribution = 'v8-canary';
 | 
				
			||||||
  constructor(nodeInfo: INodejs) {
 | 
					  constructor(nodeInfo: INodejs) {
 | 
				
			||||||
    super(nodeInfo);
 | 
					    super(nodeInfo);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@ -21,7 +22,7 @@ export default class CanaryBuild extends BaseDistribution {
 | 
				
			|||||||
          return false;
 | 
					          return false;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return prerelease[0].includes('v8-canary');
 | 
					        return prerelease[0].includes(this.distribution);
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    localVersionPaths.sort(semver.rcompare);
 | 
					    localVersionPaths.sort(semver.rcompare);
 | 
				
			||||||
    const localVersion = this.evaluateVersions(localVersionPaths);
 | 
					    const localVersion = this.evaluateVersions(localVersionPaths);
 | 
				
			||||||
@ -42,14 +43,13 @@ export default class CanaryBuild extends BaseDistribution {
 | 
				
			|||||||
    core.debug(`evaluating ${versions.length} versions`);
 | 
					    core.debug(`evaluating ${versions.length} versions`);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const {includePrerelease, range} = this.createRangePreRelease(
 | 
					    const {includePrerelease, range} = this.createRangePreRelease(
 | 
				
			||||||
      this.nodeInfo.versionSpec,
 | 
					      this.nodeInfo.versionSpec
 | 
				
			||||||
      'v8-canary'
 | 
					 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for (let i = 0; i < versions.length; i++) {
 | 
					    for (let i = 0; i < versions.length; i++) {
 | 
				
			||||||
      const potential: string = versions[i];
 | 
					      const potential: string = versions[i];
 | 
				
			||||||
      const satisfied: boolean = semver.satisfies(
 | 
					      const satisfied: boolean = semver.satisfies(
 | 
				
			||||||
        potential.replace('v8-canary', 'v8-canary.'),
 | 
					        potential.replace(this.distribution, `${this.distribution}.`),
 | 
				
			||||||
        range,
 | 
					        range,
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          includePrerelease: includePrerelease
 | 
					          includePrerelease: includePrerelease
 | 
				
			||||||
@ -70,22 +70,19 @@ export default class CanaryBuild extends BaseDistribution {
 | 
				
			|||||||
    return version;
 | 
					    return version;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  protected createRangePreRelease(
 | 
					  protected createRangePreRelease(versionSpec: string) {
 | 
				
			||||||
    versionSpec: string,
 | 
					 | 
				
			||||||
    distribution: string = ''
 | 
					 | 
				
			||||||
  ) {
 | 
					 | 
				
			||||||
    let range: string;
 | 
					    let range: string;
 | 
				
			||||||
    const [raw, prerelease] = this.splitVersionSpec(versionSpec);
 | 
					    const [raw, prerelease] = this.splitVersionSpec(versionSpec);
 | 
				
			||||||
    const isValidVersion = semver.valid(raw);
 | 
					    const isValidVersion = semver.valid(raw);
 | 
				
			||||||
    const rawVersion = (isValidVersion ? raw : semver.coerce(raw))!;
 | 
					    const rawVersion = (isValidVersion ? raw : semver.coerce(raw))!;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (prerelease !== distribution) {
 | 
					    if (prerelease !== this.distribution) {
 | 
				
			||||||
      range = `${rawVersion}-${prerelease.replace(
 | 
					      range = `${rawVersion}-${prerelease.replace(
 | 
				
			||||||
        distribution,
 | 
					        this.distribution,
 | 
				
			||||||
        `${distribution}.`
 | 
					        `${this.distribution}.`
 | 
				
			||||||
      )}`;
 | 
					      )}`;
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      range = `${semver.validRange(`^${rawVersion}-${distribution}`)}-0`;
 | 
					      range = `${semver.validRange(`^${rawVersion}-${this.distribution}`)}-0`;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return {range, includePrerelease: !isValidVersion};
 | 
					    return {range, includePrerelease: !isValidVersion};
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user