diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index bc69ec96d4..cca06fede2 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -18456,9 +18456,9 @@ var require_path_utils = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -18629,9 +18629,9 @@ var require_io_util = __commonJS({ } }); -// node_modules/@actions/io/lib/io.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -25234,6 +25234,464 @@ var require_github = __commonJS({ } }); +// node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs7 = __importStar4(require("fs")); + var path6 = __importStar4(require("path")); + _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + const result = yield fs7.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs7.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield (0, exports2.stat)(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + function isDirectory(fsPath_1) { + return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); + return stats.isDirectory(); + }); + } + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path6.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path6.dirname(filePath); + const upperName = path6.basename(filePath).toUpperCase(); + for (const actualName of yield (0, exports2.readdir)(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path6.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + } +}); + +// node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which6; + exports2.findInPath = findInPath; + var assert_1 = require("assert"); + var path6 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util2()); + function cp(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path6.join(dest, path6.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path6.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + function mv(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path6.join(dest, path6.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path6.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + function which6(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path6.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path6.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path6.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path6.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27201,7 +27659,7 @@ var require_package = __commonJS({ "@actions/github": "^6.0.0", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", - "@actions/io": "^1.1.3", + "@actions/io": "^2.0.0", "@actions/tool-cache": "^2.0.2", "@octokit/plugin-retry": "^6.0.0", "@octokit/request-error": "^7.0.2", @@ -31534,255 +31992,676 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve5, reject) { - v = o[n](v), settle(resolve5, reject, v.done, v.value); - }); - }; - } - function settle(resolve5, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve5({ value: v2, done: d }); - }, reject); - } - }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); - }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - }; + var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve5, reject) { + v = o[n](v), settle(resolve5, reject, v.done, v.value); + }); + }; + } + function settle(resolve5, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve5({ value: v2, done: d }); + }, reject); + } + }; + var __await4 = exports2 && exports2.__await || function(v) { + return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + }; + var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DefaultGlobber = void 0; + var core14 = __importStar4(require_core()); + var fs7 = __importStar4(require("fs")); + var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + var path6 = __importStar4(require("path")); + var patternHelper = __importStar4(require_internal_pattern_helper()); + var internal_match_kind_1 = require_internal_match_kind(); + var internal_pattern_1 = require_internal_pattern(); + var internal_search_state_1 = require_internal_search_state(); + var IS_WINDOWS = process.platform === "win32"; + var DefaultGlobber = class _DefaultGlobber { + constructor(options) { + this.patterns = []; + this.searchPaths = []; + this.options = globOptionsHelper.getOptions(options); + } + getSearchPaths() { + return this.searchPaths.slice(); + } + glob() { + var e_1, _a; + return __awaiter4(this, void 0, void 0, function* () { + const result = []; + try { + for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { + const itemPath = _c.value; + result.push(itemPath); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + } finally { + if (e_1) throw e_1.error; + } + } + return result; + }); + } + globGenerator() { + return __asyncGenerator4(this, arguments, function* globGenerator_1() { + const options = globOptionsHelper.getOptions(this.options); + const patterns = []; + for (const pattern of this.patterns) { + patterns.push(pattern); + if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { + patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); + } + } + const stack = []; + for (const searchPath of patternHelper.getSearchPaths(patterns)) { + core14.debug(`Search path '${searchPath}'`); + try { + yield __await4(fs7.promises.lstat(searchPath)); + } catch (err) { + if (err.code === "ENOENT") { + continue; + } + throw err; + } + stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + } + const traversalChain = []; + while (stack.length) { + const item = stack.pop(); + const match = patternHelper.match(patterns, item.path); + const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); + if (!match && !partialMatch) { + continue; + } + const stats = yield __await4( + _DefaultGlobber.stat(item, options, traversalChain) + // Broken symlink, or symlink cycle detected, or no longer exists + ); + if (!stats) { + continue; + } + if (stats.isDirectory()) { + if (match & internal_match_kind_1.MatchKind.Directory) { + yield yield __await4(item.path); + } else if (!partialMatch) { + continue; + } + const childLevel = item.level + 1; + const childItems = (yield __await4(fs7.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path6.join(item.path, x), childLevel)); + stack.push(...childItems.reverse()); + } else if (match & internal_match_kind_1.MatchKind.File) { + yield yield __await4(item.path); + } + } + }); + } + /** + * Constructs a DefaultGlobber + */ + static create(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + const result = new _DefaultGlobber(options); + if (IS_WINDOWS) { + patterns = patterns.replace(/\r\n/g, "\n"); + patterns = patterns.replace(/\r/g, "\n"); + } + const lines = patterns.split("\n").map((x) => x.trim()); + for (const line of lines) { + if (!line || line.startsWith("#")) { + continue; + } else { + result.patterns.push(new internal_pattern_1.Pattern(line)); + } + } + result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); + return result; + }); + } + static stat(item, options, traversalChain) { + return __awaiter4(this, void 0, void 0, function* () { + let stats; + if (options.followSymbolicLinks) { + try { + stats = yield fs7.promises.stat(item.path); + } catch (err) { + if (err.code === "ENOENT") { + if (options.omitBrokenSymbolicLinks) { + core14.debug(`Broken symlink '${item.path}'`); + return void 0; + } + throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); + } + throw err; + } + } else { + stats = yield fs7.promises.lstat(item.path); + } + if (stats.isDirectory() && options.followSymbolicLinks) { + const realPath = yield fs7.promises.realpath(item.path); + while (traversalChain.length >= item.level) { + traversalChain.pop(); + } + if (traversalChain.some((x) => x === realPath)) { + core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + return void 0; + } + traversalChain.push(realPath); + } + return stats; + }); + } + }; + exports2.DefaultGlobber = DefaultGlobber; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.create = void 0; + var internal_globber_1 = require_internal_globber(); + function create3(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); + }); + } + exports2.create = create3; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs7 = __importStar4(require("fs")); + var path6 = __importStar4(require("path")); + _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs7.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path6.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path6.dirname(filePath); + const upperName = path6.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path6.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultGlobber = void 0; - var core14 = __importStar4(require_core()); - var fs7 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); var path6 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); - var internal_match_kind_1 = require_internal_match_kind(); - var internal_pattern_1 = require_internal_pattern(); - var internal_search_state_1 = require_internal_search_state(); - var IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class _DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); - } - glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { - const result = []; - try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); - } finally { - if (e_1) throw e_1.error; - } + var ioUtil = __importStar4(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path6.join(dest, path6.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); } - return result; - }); - } - globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } + } else { + if (path6.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core14.debug(`Search path '${searchPath}'`); - try { - yield __await4(fs7.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") { - continue; - } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path6.join(dest, path6.basename(source)); + destExists = yield ioUtil.exists(dest); } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - const stats = yield __await4( - _DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - if (!stats) { - continue; - } - if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); - } else if (!partialMatch) { - continue; - } - const childLevel = item.level + 1; - const childItems = (yield __await4(fs7.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path6.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); } } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - const result = new _DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); + } + yield mkdirP(path6.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) { - if (!line || line.startsWith("#")) { - continue; + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); } else { - result.patterns.push(new internal_pattern_1.Pattern(line)); + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); } } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) { - try { - stats = yield fs7.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core14.debug(`Broken symlink '${item.path}'`); - return void 0; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path6.delimiter)) { + if (extension) { + extensions.push(extension); } - } else { - stats = yield fs7.promises.lstat(item.path); } - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs7.promises.realpath(item.path); - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - if (traversalChain.some((x) => x === realPath)) { - core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; - } - traversalChain.push(realPath); + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; } - return stats; - }); - } - }; - exports2.DefaultGlobber = DefaultGlobber; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + return []; + } + if (tool.includes(path6.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path6.delimiter)) { + if (p) { + directories.push(p); + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path6.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); } } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; - var internal_globber_1 = require_internal_globber(); - function create3(patterns, options) { + } + function copyFile(srcFile, destFile, force) { return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } }); } - exports2.create = create3; } }); @@ -33057,7 +33936,7 @@ var require_cacheUtils = __commonJS({ var core14 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob2 = __importStar4(require_glob()); - var io6 = __importStar4(require_io()); + var io6 = __importStar4(require_io3()); var crypto = __importStar4(require("crypto")); var fs7 = __importStar4(require("fs")); var path6 = __importStar4(require("path")); @@ -75604,7 +76483,7 @@ var require_tar = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createTar = exports2.extractTar = exports2.listTar = void 0; var exec_1 = require_exec(); - var io6 = __importStar4(require_io()); + var io6 = __importStar4(require_io3()); var fs_1 = require("fs"); var path6 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); @@ -76214,6 +77093,427 @@ var require_cache3 = __commonJS({ } }); +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs7 = __importStar4(require("fs")); + var path6 = __importStar4(require("path")); + _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs7.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path6.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path6.dirname(filePath); + const upperName = path6.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path6.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path6 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util4()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path6.join(dest, path6.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path6.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path6.join(dest, path6.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path6.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path6.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path6.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path6.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path6.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/@actions/tool-cache/lib/manifest.js var require_manifest = __commonJS({ "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { @@ -77221,7 +78521,7 @@ var require_tool_cache = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; var core14 = __importStar4(require_core()); - var io6 = __importStar4(require_io()); + var io6 = __importStar4(require_io4()); var crypto = __importStar4(require("crypto")); var fs7 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); @@ -115140,13 +116440,13 @@ var fs = __toESM(require("fs")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io()); +var io2 = __toESM(require_io2()); // src/util.ts var path = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); -var io = __toESM(require_io()); +var io = __toESM(require_io2()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -118351,7 +119651,7 @@ var actionsCache = __toESM(require_cache3()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io()); +var io3 = __toESM(require_io2()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -118873,7 +120173,7 @@ var semver7 = __toESM(require_semver2()); // src/tar.ts var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io()); +var io4 = __toESM(require_io2()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); @@ -119451,7 +120751,7 @@ var core12 = __toESM(require_core()); var import_archiver = __toESM(require_archiver()); // src/analyze.ts -var io5 = __toESM(require_io()); +var io5 = __toESM(require_io2()); // src/autobuild.ts var core11 = __toESM(require_core()); diff --git a/lib/analyze-action.js b/lib/analyze-action.js index 7ba430064e..1751b03359 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -18456,9 +18456,9 @@ var require_path_utils = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -18629,9 +18629,9 @@ var require_io_util = __commonJS({ } }); -// node_modules/@actions/io/lib/io.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -25234,6 +25234,464 @@ var require_github = __commonJS({ } }); +// node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs17 = __importStar4(require("fs")); + var path16 = __importStar4(require("path")); + _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + const result = yield fs17.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs17.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield (0, exports2.stat)(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + function isDirectory(fsPath_1) { + return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); + return stats.isDirectory(); + }); + } + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path16.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path16.dirname(filePath); + const upperName = path16.basename(filePath).toUpperCase(); + for (const actualName of yield (0, exports2.readdir)(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path16.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + } +}); + +// node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which7; + exports2.findInPath = findInPath; + var assert_1 = require("assert"); + var path16 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util2()); + function cp(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path16.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + function mv(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path16.join(dest, path16.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path16.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + function which7(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which7(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path16.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path16.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27201,7 +27659,7 @@ var require_package = __commonJS({ "@actions/github": "^6.0.0", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", - "@actions/io": "^1.1.3", + "@actions/io": "^2.0.0", "@actions/tool-cache": "^2.0.2", "@octokit/plugin-retry": "^6.0.0", "@octokit/request-error": "^7.0.2", @@ -31534,255 +31992,676 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve8, reject) { - v = o[n](v), settle(resolve8, reject, v.done, v.value); - }); - }; - } - function settle(resolve8, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve8({ value: v2, done: d }); - }, reject); - } - }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); - }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - }; + var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve8, reject) { + v = o[n](v), settle(resolve8, reject, v.done, v.value); + }); + }; + } + function settle(resolve8, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve8({ value: v2, done: d }); + }, reject); + } + }; + var __await4 = exports2 && exports2.__await || function(v) { + return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + }; + var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DefaultGlobber = void 0; + var core15 = __importStar4(require_core()); + var fs17 = __importStar4(require("fs")); + var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + var path16 = __importStar4(require("path")); + var patternHelper = __importStar4(require_internal_pattern_helper()); + var internal_match_kind_1 = require_internal_match_kind(); + var internal_pattern_1 = require_internal_pattern(); + var internal_search_state_1 = require_internal_search_state(); + var IS_WINDOWS = process.platform === "win32"; + var DefaultGlobber = class _DefaultGlobber { + constructor(options) { + this.patterns = []; + this.searchPaths = []; + this.options = globOptionsHelper.getOptions(options); + } + getSearchPaths() { + return this.searchPaths.slice(); + } + glob() { + var e_1, _a; + return __awaiter4(this, void 0, void 0, function* () { + const result = []; + try { + for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { + const itemPath = _c.value; + result.push(itemPath); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + } finally { + if (e_1) throw e_1.error; + } + } + return result; + }); + } + globGenerator() { + return __asyncGenerator4(this, arguments, function* globGenerator_1() { + const options = globOptionsHelper.getOptions(this.options); + const patterns = []; + for (const pattern of this.patterns) { + patterns.push(pattern); + if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { + patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); + } + } + const stack = []; + for (const searchPath of patternHelper.getSearchPaths(patterns)) { + core15.debug(`Search path '${searchPath}'`); + try { + yield __await4(fs17.promises.lstat(searchPath)); + } catch (err) { + if (err.code === "ENOENT") { + continue; + } + throw err; + } + stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + } + const traversalChain = []; + while (stack.length) { + const item = stack.pop(); + const match = patternHelper.match(patterns, item.path); + const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); + if (!match && !partialMatch) { + continue; + } + const stats = yield __await4( + _DefaultGlobber.stat(item, options, traversalChain) + // Broken symlink, or symlink cycle detected, or no longer exists + ); + if (!stats) { + continue; + } + if (stats.isDirectory()) { + if (match & internal_match_kind_1.MatchKind.Directory) { + yield yield __await4(item.path); + } else if (!partialMatch) { + continue; + } + const childLevel = item.level + 1; + const childItems = (yield __await4(fs17.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path16.join(item.path, x), childLevel)); + stack.push(...childItems.reverse()); + } else if (match & internal_match_kind_1.MatchKind.File) { + yield yield __await4(item.path); + } + } + }); + } + /** + * Constructs a DefaultGlobber + */ + static create(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + const result = new _DefaultGlobber(options); + if (IS_WINDOWS) { + patterns = patterns.replace(/\r\n/g, "\n"); + patterns = patterns.replace(/\r/g, "\n"); + } + const lines = patterns.split("\n").map((x) => x.trim()); + for (const line of lines) { + if (!line || line.startsWith("#")) { + continue; + } else { + result.patterns.push(new internal_pattern_1.Pattern(line)); + } + } + result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); + return result; + }); + } + static stat(item, options, traversalChain) { + return __awaiter4(this, void 0, void 0, function* () { + let stats; + if (options.followSymbolicLinks) { + try { + stats = yield fs17.promises.stat(item.path); + } catch (err) { + if (err.code === "ENOENT") { + if (options.omitBrokenSymbolicLinks) { + core15.debug(`Broken symlink '${item.path}'`); + return void 0; + } + throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); + } + throw err; + } + } else { + stats = yield fs17.promises.lstat(item.path); + } + if (stats.isDirectory() && options.followSymbolicLinks) { + const realPath = yield fs17.promises.realpath(item.path); + while (traversalChain.length >= item.level) { + traversalChain.pop(); + } + if (traversalChain.some((x) => x === realPath)) { + core15.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + return void 0; + } + traversalChain.push(realPath); + } + return stats; + }); + } + }; + exports2.DefaultGlobber = DefaultGlobber; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.create = void 0; + var internal_globber_1 = require_internal_globber(); + function create2(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); + }); + } + exports2.create = create2; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs17 = __importStar4(require("fs")); + var path16 = __importStar4(require("path")); + _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs17.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path16.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path16.dirname(filePath); + const upperName = path16.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path16.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultGlobber = void 0; - var core15 = __importStar4(require_core()); - var fs17 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); var path16 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); - var internal_match_kind_1 = require_internal_match_kind(); - var internal_pattern_1 = require_internal_pattern(); - var internal_search_state_1 = require_internal_search_state(); - var IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class _DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); - } - glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { - const result = []; - try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); - } finally { - if (e_1) throw e_1.error; - } + var ioUtil = __importStar4(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); } - return result; - }); - } - globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } + } else { + if (path16.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core15.debug(`Search path '${searchPath}'`); - try { - yield __await4(fs17.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") { - continue; - } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path16.join(dest, path16.basename(source)); + destExists = yield ioUtil.exists(dest); } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - const stats = yield __await4( - _DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - if (!stats) { - continue; - } - if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); - } else if (!partialMatch) { - continue; - } - const childLevel = item.level + 1; - const childItems = (yield __await4(fs17.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path16.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); } } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - const result = new _DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); + } + yield mkdirP(path16.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) { - if (!line || line.startsWith("#")) { - continue; + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which7(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which7(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); } else { - result.patterns.push(new internal_pattern_1.Pattern(line)); + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); } } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) { - try { - stats = yield fs17.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core15.debug(`Broken symlink '${item.path}'`); - return void 0; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which7; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { + if (extension) { + extensions.push(extension); } - } else { - stats = yield fs17.promises.lstat(item.path); } - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs17.promises.realpath(item.path); - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - if (traversalChain.some((x) => x === realPath)) { - core15.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; - } - traversalChain.push(realPath); + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; } - return stats; - }); - } - }; - exports2.DefaultGlobber = DefaultGlobber; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + return []; + } + if (tool.includes(path16.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path16.delimiter)) { + if (p) { + directories.push(p); + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); } } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; - var internal_globber_1 = require_internal_globber(); - function create2(patterns, options) { + } + function copyFile(srcFile, destFile, force) { return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } }); } - exports2.create = create2; } }); @@ -33057,7 +33936,7 @@ var require_cacheUtils = __commonJS({ var core15 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob2 = __importStar4(require_glob()); - var io7 = __importStar4(require_io()); + var io7 = __importStar4(require_io3()); var crypto2 = __importStar4(require("crypto")); var fs17 = __importStar4(require("fs")); var path16 = __importStar4(require("path")); @@ -75604,7 +76483,7 @@ var require_tar = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createTar = exports2.extractTar = exports2.listTar = void 0; var exec_1 = require_exec(); - var io7 = __importStar4(require_io()); + var io7 = __importStar4(require_io3()); var fs_1 = require("fs"); var path16 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); @@ -76214,6 +77093,427 @@ var require_cache3 = __commonJS({ } }); +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs17 = __importStar4(require("fs")); + var path16 = __importStar4(require("path")); + _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs17.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path16.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path16.dirname(filePath); + const upperName = path16.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path16.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path16 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util4()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path16.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path16.join(dest, path16.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path16.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which7(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which7(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which7; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path16.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path16.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/@actions/tool-cache/lib/manifest.js var require_manifest = __commonJS({ "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { @@ -77221,7 +78521,7 @@ var require_tool_cache = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; var core15 = __importStar4(require_core()); - var io7 = __importStar4(require_io()); + var io7 = __importStar4(require_io4()); var crypto2 = __importStar4(require("crypto")); var fs17 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); @@ -83028,7 +84328,7 @@ var path2 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io()); +var io2 = __toESM(require_io2()); // src/util.ts var fs = __toESM(require("fs")); @@ -83037,7 +84337,7 @@ var os = __toESM(require("os")); var path = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); -var io = __toESM(require_io()); +var io = __toESM(require_io2()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -86418,7 +87718,7 @@ var SarifScanOrder = [CodeQuality, CodeScanning]; var fs12 = __toESM(require("fs")); var path12 = __toESM(require("path")); var import_perf_hooks2 = require("perf_hooks"); -var io5 = __toESM(require_io()); +var io5 = __toESM(require_io2()); // src/autobuild.ts var core11 = __toESM(require_core()); @@ -86915,7 +88215,7 @@ var actionsCache = __toESM(require_cache3()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io()); +var io3 = __toESM(require_io2()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -88211,7 +89511,7 @@ var import_child_process = require("child_process"); var fs7 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io()); +var io4 = __toESM(require_io2()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); var MIN_REQUIRED_BSD_TAR_VERSION = "3.4.3"; @@ -91671,7 +92971,7 @@ async function addFingerprints(sarif, sourceRoot, logger) { // src/init.ts var toolrunner4 = __toESM(require_toolrunner()); -var io6 = __toESM(require_io()); +var io6 = __toESM(require_io2()); async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) { logger.startGroup("Setup CodeQL tools"); const { diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index f9430c6923..58190c45d9 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -18456,9 +18456,9 @@ var require_path_utils = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -18629,9 +18629,9 @@ var require_io_util = __commonJS({ } }); -// node_modules/@actions/io/lib/io.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -25234,6 +25234,464 @@ var require_github = __commonJS({ } }); +// node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs7 = __importStar4(require("fs")); + var path7 = __importStar4(require("path")); + _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + const result = yield fs7.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs7.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield (0, exports2.stat)(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + function isDirectory(fsPath_1) { + return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); + return stats.isDirectory(); + }); + } + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path7.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path7.dirname(filePath); + const upperName = path7.basename(filePath).toUpperCase(); + for (const actualName of yield (0, exports2.readdir)(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path7.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + } +}); + +// node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which5; + exports2.findInPath = findInPath; + var assert_1 = require("assert"); + var path7 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util2()); + function cp(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path7.join(dest, path7.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path7.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + function mv(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path7.join(dest, path7.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path7.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + function which5(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which5(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path7.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path7.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path7.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path7.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27201,7 +27659,7 @@ var require_package = __commonJS({ "@actions/github": "^6.0.0", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", - "@actions/io": "^1.1.3", + "@actions/io": "^2.0.0", "@actions/tool-cache": "^2.0.2", "@octokit/plugin-retry": "^6.0.0", "@octokit/request-error": "^7.0.2", @@ -31534,255 +31992,676 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve5, reject) { - v = o[n](v), settle(resolve5, reject, v.done, v.value); - }); - }; - } - function settle(resolve5, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve5({ value: v2, done: d }); - }, reject); - } - }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); - }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - }; + var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve5, reject) { + v = o[n](v), settle(resolve5, reject, v.done, v.value); + }); + }; + } + function settle(resolve5, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve5({ value: v2, done: d }); + }, reject); + } + }; + var __await4 = exports2 && exports2.__await || function(v) { + return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + }; + var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DefaultGlobber = void 0; + var core14 = __importStar4(require_core()); + var fs7 = __importStar4(require("fs")); + var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + var path7 = __importStar4(require("path")); + var patternHelper = __importStar4(require_internal_pattern_helper()); + var internal_match_kind_1 = require_internal_match_kind(); + var internal_pattern_1 = require_internal_pattern(); + var internal_search_state_1 = require_internal_search_state(); + var IS_WINDOWS = process.platform === "win32"; + var DefaultGlobber = class _DefaultGlobber { + constructor(options) { + this.patterns = []; + this.searchPaths = []; + this.options = globOptionsHelper.getOptions(options); + } + getSearchPaths() { + return this.searchPaths.slice(); + } + glob() { + var e_1, _a; + return __awaiter4(this, void 0, void 0, function* () { + const result = []; + try { + for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { + const itemPath = _c.value; + result.push(itemPath); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + } finally { + if (e_1) throw e_1.error; + } + } + return result; + }); + } + globGenerator() { + return __asyncGenerator4(this, arguments, function* globGenerator_1() { + const options = globOptionsHelper.getOptions(this.options); + const patterns = []; + for (const pattern of this.patterns) { + patterns.push(pattern); + if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { + patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); + } + } + const stack = []; + for (const searchPath of patternHelper.getSearchPaths(patterns)) { + core14.debug(`Search path '${searchPath}'`); + try { + yield __await4(fs7.promises.lstat(searchPath)); + } catch (err) { + if (err.code === "ENOENT") { + continue; + } + throw err; + } + stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + } + const traversalChain = []; + while (stack.length) { + const item = stack.pop(); + const match = patternHelper.match(patterns, item.path); + const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); + if (!match && !partialMatch) { + continue; + } + const stats = yield __await4( + _DefaultGlobber.stat(item, options, traversalChain) + // Broken symlink, or symlink cycle detected, or no longer exists + ); + if (!stats) { + continue; + } + if (stats.isDirectory()) { + if (match & internal_match_kind_1.MatchKind.Directory) { + yield yield __await4(item.path); + } else if (!partialMatch) { + continue; + } + const childLevel = item.level + 1; + const childItems = (yield __await4(fs7.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path7.join(item.path, x), childLevel)); + stack.push(...childItems.reverse()); + } else if (match & internal_match_kind_1.MatchKind.File) { + yield yield __await4(item.path); + } + } + }); + } + /** + * Constructs a DefaultGlobber + */ + static create(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + const result = new _DefaultGlobber(options); + if (IS_WINDOWS) { + patterns = patterns.replace(/\r\n/g, "\n"); + patterns = patterns.replace(/\r/g, "\n"); + } + const lines = patterns.split("\n").map((x) => x.trim()); + for (const line of lines) { + if (!line || line.startsWith("#")) { + continue; + } else { + result.patterns.push(new internal_pattern_1.Pattern(line)); + } + } + result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); + return result; + }); + } + static stat(item, options, traversalChain) { + return __awaiter4(this, void 0, void 0, function* () { + let stats; + if (options.followSymbolicLinks) { + try { + stats = yield fs7.promises.stat(item.path); + } catch (err) { + if (err.code === "ENOENT") { + if (options.omitBrokenSymbolicLinks) { + core14.debug(`Broken symlink '${item.path}'`); + return void 0; + } + throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); + } + throw err; + } + } else { + stats = yield fs7.promises.lstat(item.path); + } + if (stats.isDirectory() && options.followSymbolicLinks) { + const realPath = yield fs7.promises.realpath(item.path); + while (traversalChain.length >= item.level) { + traversalChain.pop(); + } + if (traversalChain.some((x) => x === realPath)) { + core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + return void 0; + } + traversalChain.push(realPath); + } + return stats; + }); + } + }; + exports2.DefaultGlobber = DefaultGlobber; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.create = void 0; + var internal_globber_1 = require_internal_globber(); + function create(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); + }); + } + exports2.create = create; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs7 = __importStar4(require("fs")); + var path7 = __importStar4(require("path")); + _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs7.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path7.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path7.dirname(filePath); + const upperName = path7.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path7.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultGlobber = void 0; - var core14 = __importStar4(require_core()); - var fs7 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); var path7 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); - var internal_match_kind_1 = require_internal_match_kind(); - var internal_pattern_1 = require_internal_pattern(); - var internal_search_state_1 = require_internal_search_state(); - var IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class _DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); - } - glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { - const result = []; - try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); - } finally { - if (e_1) throw e_1.error; - } + var ioUtil = __importStar4(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path7.join(dest, path7.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); } - return result; - }); - } - globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } + } else { + if (path7.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core14.debug(`Search path '${searchPath}'`); - try { - yield __await4(fs7.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") { - continue; - } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path7.join(dest, path7.basename(source)); + destExists = yield ioUtil.exists(dest); } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - const stats = yield __await4( - _DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - if (!stats) { - continue; - } - if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); - } else if (!partialMatch) { - continue; - } - const childLevel = item.level + 1; - const childItems = (yield __await4(fs7.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path7.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); } } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - const result = new _DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); + } + yield mkdirP(path7.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) { - if (!line || line.startsWith("#")) { - continue; + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which5(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which5(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); } else { - result.patterns.push(new internal_pattern_1.Pattern(line)); + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); } } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) { - try { - stats = yield fs7.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core14.debug(`Broken symlink '${item.path}'`); - return void 0; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which5; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path7.delimiter)) { + if (extension) { + extensions.push(extension); } - } else { - stats = yield fs7.promises.lstat(item.path); } - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs7.promises.realpath(item.path); - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - if (traversalChain.some((x) => x === realPath)) { - core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; - } - traversalChain.push(realPath); + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; } - return stats; - }); - } - }; - exports2.DefaultGlobber = DefaultGlobber; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); - }); - } - return new (P || (P = Promise))(function(resolve5, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + return []; + } + if (tool.includes(path7.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path7.delimiter)) { + if (p) { + directories.push(p); + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path7.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); } } - function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; - var internal_globber_1 = require_internal_globber(); - function create(patterns, options) { + } + function copyFile(srcFile, destFile, force) { return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } }); } - exports2.create = create; } }); @@ -33057,7 +33936,7 @@ var require_cacheUtils = __commonJS({ var core14 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob = __importStar4(require_glob()); - var io5 = __importStar4(require_io()); + var io5 = __importStar4(require_io3()); var crypto = __importStar4(require("crypto")); var fs7 = __importStar4(require("fs")); var path7 = __importStar4(require("path")); @@ -75604,7 +76483,7 @@ var require_tar = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createTar = exports2.extractTar = exports2.listTar = void 0; var exec_1 = require_exec(); - var io5 = __importStar4(require_io()); + var io5 = __importStar4(require_io3()); var fs_1 = require("fs"); var path7 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); @@ -76214,6 +77093,427 @@ var require_cache3 = __commonJS({ } }); +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs7 = __importStar4(require("fs")); + var path7 = __importStar4(require("path")); + _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs7.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path7.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path7.dirname(filePath); + const upperName = path7.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path7.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); + }); + } + return new (P || (P = Promise))(function(resolve5, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path7 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util4()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path7.join(dest, path7.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path7.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path7.join(dest, path7.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path7.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which5(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which5(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which5; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path7.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path7.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path7.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path7.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/@actions/tool-cache/lib/manifest.js var require_manifest = __commonJS({ "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { @@ -77221,7 +78521,7 @@ var require_tool_cache = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; var core14 = __importStar4(require_core()); - var io5 = __importStar4(require_io()); + var io5 = __importStar4(require_io4()); var crypto = __importStar4(require("crypto")); var fs7 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); @@ -79026,14 +80326,14 @@ var fs = __toESM(require("fs")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io()); +var io2 = __toESM(require_io2()); // src/util.ts var fsPromises = __toESM(require("fs/promises")); var path = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); -var io = __toESM(require_io()); +var io = __toESM(require_io2()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -82410,7 +83710,7 @@ var actionsCache = __toESM(require_cache3()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io()); +var io3 = __toESM(require_io2()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -83187,7 +84487,7 @@ var semver7 = __toESM(require_semver2()); // src/tar.ts var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io()); +var io4 = __toESM(require_io2()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 1692995dde..cb01600f55 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -18456,9 +18456,9 @@ var require_path_utils = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -18629,9 +18629,9 @@ var require_io_util = __commonJS({ } }); -// node_modules/@actions/io/lib/io.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -25234,6 +25234,464 @@ var require_github = __commonJS({ } }); +// node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs17 = __importStar4(require("fs")); + var path15 = __importStar4(require("path")); + _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + const result = yield fs17.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs17.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield (0, exports2.stat)(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + function isDirectory(fsPath_1) { + return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); + return stats.isDirectory(); + }); + } + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path15.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path15.dirname(filePath); + const upperName = path15.basename(filePath).toUpperCase(); + for (const actualName of yield (0, exports2.readdir)(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path15.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + } +}); + +// node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which7; + exports2.findInPath = findInPath; + var assert_1 = require("assert"); + var path15 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util2()); + function cp(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path15.join(dest, path15.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path15.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + function mv(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path15.join(dest, path15.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path15.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + function which7(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which7(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path15.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path15.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path15.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path15.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27201,7 +27659,7 @@ var require_package = __commonJS({ "@actions/github": "^6.0.0", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", - "@actions/io": "^1.1.3", + "@actions/io": "^2.0.0", "@actions/tool-cache": "^2.0.2", "@octokit/plugin-retry": "^6.0.0", "@octokit/request-error": "^7.0.2", @@ -31534,255 +31992,676 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve8, reject) { - v = o[n](v), settle(resolve8, reject, v.done, v.value); - }); - }; - } - function settle(resolve8, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve8({ value: v2, done: d }); - }, reject); - } - }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); - }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - }; + var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve8, reject) { + v = o[n](v), settle(resolve8, reject, v.done, v.value); + }); + }; + } + function settle(resolve8, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve8({ value: v2, done: d }); + }, reject); + } + }; + var __await4 = exports2 && exports2.__await || function(v) { + return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + }; + var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DefaultGlobber = void 0; + var core18 = __importStar4(require_core()); + var fs17 = __importStar4(require("fs")); + var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + var path15 = __importStar4(require("path")); + var patternHelper = __importStar4(require_internal_pattern_helper()); + var internal_match_kind_1 = require_internal_match_kind(); + var internal_pattern_1 = require_internal_pattern(); + var internal_search_state_1 = require_internal_search_state(); + var IS_WINDOWS = process.platform === "win32"; + var DefaultGlobber = class _DefaultGlobber { + constructor(options) { + this.patterns = []; + this.searchPaths = []; + this.options = globOptionsHelper.getOptions(options); + } + getSearchPaths() { + return this.searchPaths.slice(); + } + glob() { + var e_1, _a; + return __awaiter4(this, void 0, void 0, function* () { + const result = []; + try { + for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { + const itemPath = _c.value; + result.push(itemPath); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + } finally { + if (e_1) throw e_1.error; + } + } + return result; + }); + } + globGenerator() { + return __asyncGenerator4(this, arguments, function* globGenerator_1() { + const options = globOptionsHelper.getOptions(this.options); + const patterns = []; + for (const pattern of this.patterns) { + patterns.push(pattern); + if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { + patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); + } + } + const stack = []; + for (const searchPath of patternHelper.getSearchPaths(patterns)) { + core18.debug(`Search path '${searchPath}'`); + try { + yield __await4(fs17.promises.lstat(searchPath)); + } catch (err) { + if (err.code === "ENOENT") { + continue; + } + throw err; + } + stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + } + const traversalChain = []; + while (stack.length) { + const item = stack.pop(); + const match = patternHelper.match(patterns, item.path); + const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); + if (!match && !partialMatch) { + continue; + } + const stats = yield __await4( + _DefaultGlobber.stat(item, options, traversalChain) + // Broken symlink, or symlink cycle detected, or no longer exists + ); + if (!stats) { + continue; + } + if (stats.isDirectory()) { + if (match & internal_match_kind_1.MatchKind.Directory) { + yield yield __await4(item.path); + } else if (!partialMatch) { + continue; + } + const childLevel = item.level + 1; + const childItems = (yield __await4(fs17.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path15.join(item.path, x), childLevel)); + stack.push(...childItems.reverse()); + } else if (match & internal_match_kind_1.MatchKind.File) { + yield yield __await4(item.path); + } + } + }); + } + /** + * Constructs a DefaultGlobber + */ + static create(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + const result = new _DefaultGlobber(options); + if (IS_WINDOWS) { + patterns = patterns.replace(/\r\n/g, "\n"); + patterns = patterns.replace(/\r/g, "\n"); + } + const lines = patterns.split("\n").map((x) => x.trim()); + for (const line of lines) { + if (!line || line.startsWith("#")) { + continue; + } else { + result.patterns.push(new internal_pattern_1.Pattern(line)); + } + } + result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); + return result; + }); + } + static stat(item, options, traversalChain) { + return __awaiter4(this, void 0, void 0, function* () { + let stats; + if (options.followSymbolicLinks) { + try { + stats = yield fs17.promises.stat(item.path); + } catch (err) { + if (err.code === "ENOENT") { + if (options.omitBrokenSymbolicLinks) { + core18.debug(`Broken symlink '${item.path}'`); + return void 0; + } + throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); + } + throw err; + } + } else { + stats = yield fs17.promises.lstat(item.path); + } + if (stats.isDirectory() && options.followSymbolicLinks) { + const realPath = yield fs17.promises.realpath(item.path); + while (traversalChain.length >= item.level) { + traversalChain.pop(); + } + if (traversalChain.some((x) => x === realPath)) { + core18.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + return void 0; + } + traversalChain.push(realPath); + } + return stats; + }); + } + }; + exports2.DefaultGlobber = DefaultGlobber; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.create = void 0; + var internal_globber_1 = require_internal_globber(); + function create3(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); + }); + } + exports2.create = create3; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs17 = __importStar4(require("fs")); + var path15 = __importStar4(require("path")); + _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs17.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path15.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path15.dirname(filePath); + const upperName = path15.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path15.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultGlobber = void 0; - var core18 = __importStar4(require_core()); - var fs17 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); var path15 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); - var internal_match_kind_1 = require_internal_match_kind(); - var internal_pattern_1 = require_internal_pattern(); - var internal_search_state_1 = require_internal_search_state(); - var IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class _DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); - } - glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { - const result = []; - try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); - } finally { - if (e_1) throw e_1.error; - } + var ioUtil = __importStar4(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path15.join(dest, path15.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); } - return result; - }); - } - globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } + } else { + if (path15.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core18.debug(`Search path '${searchPath}'`); - try { - yield __await4(fs17.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") { - continue; - } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path15.join(dest, path15.basename(source)); + destExists = yield ioUtil.exists(dest); } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - const stats = yield __await4( - _DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - if (!stats) { - continue; - } - if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); - } else if (!partialMatch) { - continue; - } - const childLevel = item.level + 1; - const childItems = (yield __await4(fs17.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path15.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); } } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - const result = new _DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); + } + yield mkdirP(path15.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) { - if (!line || line.startsWith("#")) { - continue; + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which7(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which7(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); } else { - result.patterns.push(new internal_pattern_1.Pattern(line)); + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); } } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) { - try { - stats = yield fs17.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core18.debug(`Broken symlink '${item.path}'`); - return void 0; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which7; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path15.delimiter)) { + if (extension) { + extensions.push(extension); } - } else { - stats = yield fs17.promises.lstat(item.path); } - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs17.promises.realpath(item.path); - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - if (traversalChain.some((x) => x === realPath)) { - core18.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; - } - traversalChain.push(realPath); + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; } - return stats; - }); - } - }; - exports2.DefaultGlobber = DefaultGlobber; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve8) { - resolve8(value); - }); - } - return new (P || (P = Promise))(function(resolve8, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + return []; + } + if (tool.includes(path15.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path15.delimiter)) { + if (p) { + directories.push(p); + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path15.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); } } - function step(result) { - result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; - var internal_globber_1 = require_internal_globber(); - function create3(patterns, options) { + } + function copyFile(srcFile, destFile, force) { return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } }); } - exports2.create = create3; } }); @@ -33057,7 +33936,7 @@ var require_cacheUtils = __commonJS({ var core18 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob2 = __importStar4(require_glob()); - var io7 = __importStar4(require_io()); + var io7 = __importStar4(require_io3()); var crypto = __importStar4(require("crypto")); var fs17 = __importStar4(require("fs")); var path15 = __importStar4(require("path")); @@ -75604,7 +76483,7 @@ var require_tar = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createTar = exports2.extractTar = exports2.listTar = void 0; var exec_1 = require_exec(); - var io7 = __importStar4(require_io()); + var io7 = __importStar4(require_io3()); var fs_1 = require("fs"); var path15 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); @@ -76214,6 +77093,427 @@ var require_cache3 = __commonJS({ } }); +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs17 = __importStar4(require("fs")); + var path15 = __importStar4(require("path")); + _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs17.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path15.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path15.dirname(filePath); + const upperName = path15.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path15.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve8) { + resolve8(value); + }); + } + return new (P || (P = Promise))(function(resolve8, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve8(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path15 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util4()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path15.join(dest, path15.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path15.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path15.join(dest, path15.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path15.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which7(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which7(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which7; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path15.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path15.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path15.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path15.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/@actions/tool-cache/lib/manifest.js var require_manifest = __commonJS({ "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { @@ -77221,7 +78521,7 @@ var require_tool_cache = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; var core18 = __importStar4(require_core()); - var io7 = __importStar4(require_io()); + var io7 = __importStar4(require_io4()); var crypto = __importStar4(require("crypto")); var fs17 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); @@ -118036,7 +119336,7 @@ var path2 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io()); +var io2 = __toESM(require_io2()); // src/util.ts var fs = __toESM(require("fs")); @@ -118044,7 +119344,7 @@ var fsPromises = __toESM(require("fs/promises")); var path = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); -var io = __toESM(require_io()); +var io = __toESM(require_io2()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -121684,7 +122984,7 @@ var actionsCache = __toESM(require_cache3()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io()); +var io3 = __toESM(require_io2()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -122599,7 +123899,7 @@ var import_child_process = require("child_process"); var fs7 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io()); +var io4 = __toESM(require_io2()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); var MIN_REQUIRED_BSD_TAR_VERSION = "3.4.3"; @@ -124068,7 +125368,7 @@ var import_archiver = __toESM(require_archiver()); // src/analyze.ts var fs11 = __toESM(require("fs")); var path10 = __toESM(require("path")); -var io5 = __toESM(require_io()); +var io5 = __toESM(require_io2()); // src/autobuild.ts var core11 = __toESM(require_core()); @@ -125659,7 +126959,7 @@ async function addFingerprints(sarif, sourceRoot, logger) { // src/init.ts var toolrunner4 = __toESM(require_toolrunner()); -var io6 = __toESM(require_io()); +var io6 = __toESM(require_io2()); async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) { logger.startGroup("Setup CodeQL tools"); const { diff --git a/lib/init-action.js b/lib/init-action.js index a785c2b6cb..a3b4cf1f56 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -18456,9 +18456,9 @@ var require_path_utils = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -18629,9 +18629,9 @@ var require_io_util = __commonJS({ } }); -// node_modules/@actions/io/lib/io.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -19816,6 +19816,464 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } }); +// node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs15 = __importStar4(require("fs")); + var path16 = __importStar4(require("path")); + _a = fs15.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + const result = yield fs15.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs15.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield (0, exports2.stat)(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + function isDirectory(fsPath_1) { + return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); + return stats.isDirectory(); + }); + } + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path16.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path16.dirname(filePath); + const upperName = path16.basename(filePath).toUpperCase(); + for (const actualName of yield (0, exports2.readdir)(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path16.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + } +}); + +// node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which7; + exports2.findInPath = findInPath; + var assert_1 = require("assert"); + var path16 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util2()); + function cp(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path16.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + function mv(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path16.join(dest, path16.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path16.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + function which7(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which7(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path16.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path16.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27201,7 +27659,7 @@ var require_package = __commonJS({ "@actions/github": "^6.0.0", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", - "@actions/io": "^1.1.3", + "@actions/io": "^2.0.0", "@actions/tool-cache": "^2.0.2", "@octokit/plugin-retry": "^6.0.0", "@octokit/request-error": "^7.0.2", @@ -31685,255 +32143,676 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve9, reject) { - v = o[n](v), settle(resolve9, reject, v.done, v.value); - }); - }; - } - function settle(resolve9, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve9({ value: v2, done: d }); - }, reject); - } - }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); - }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - }; + var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve9, reject) { + v = o[n](v), settle(resolve9, reject, v.done, v.value); + }); + }; + } + function settle(resolve9, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve9({ value: v2, done: d }); + }, reject); + } + }; + var __await4 = exports2 && exports2.__await || function(v) { + return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + }; + var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DefaultGlobber = void 0; + var core14 = __importStar4(require_core()); + var fs15 = __importStar4(require("fs")); + var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + var path16 = __importStar4(require("path")); + var patternHelper = __importStar4(require_internal_pattern_helper()); + var internal_match_kind_1 = require_internal_match_kind(); + var internal_pattern_1 = require_internal_pattern(); + var internal_search_state_1 = require_internal_search_state(); + var IS_WINDOWS = process.platform === "win32"; + var DefaultGlobber = class _DefaultGlobber { + constructor(options) { + this.patterns = []; + this.searchPaths = []; + this.options = globOptionsHelper.getOptions(options); + } + getSearchPaths() { + return this.searchPaths.slice(); + } + glob() { + var e_1, _a; + return __awaiter4(this, void 0, void 0, function* () { + const result = []; + try { + for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { + const itemPath = _c.value; + result.push(itemPath); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + } finally { + if (e_1) throw e_1.error; + } + } + return result; + }); + } + globGenerator() { + return __asyncGenerator4(this, arguments, function* globGenerator_1() { + const options = globOptionsHelper.getOptions(this.options); + const patterns = []; + for (const pattern of this.patterns) { + patterns.push(pattern); + if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { + patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); + } + } + const stack = []; + for (const searchPath of patternHelper.getSearchPaths(patterns)) { + core14.debug(`Search path '${searchPath}'`); + try { + yield __await4(fs15.promises.lstat(searchPath)); + } catch (err) { + if (err.code === "ENOENT") { + continue; + } + throw err; + } + stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + } + const traversalChain = []; + while (stack.length) { + const item = stack.pop(); + const match = patternHelper.match(patterns, item.path); + const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); + if (!match && !partialMatch) { + continue; + } + const stats = yield __await4( + _DefaultGlobber.stat(item, options, traversalChain) + // Broken symlink, or symlink cycle detected, or no longer exists + ); + if (!stats) { + continue; + } + if (stats.isDirectory()) { + if (match & internal_match_kind_1.MatchKind.Directory) { + yield yield __await4(item.path); + } else if (!partialMatch) { + continue; + } + const childLevel = item.level + 1; + const childItems = (yield __await4(fs15.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path16.join(item.path, x), childLevel)); + stack.push(...childItems.reverse()); + } else if (match & internal_match_kind_1.MatchKind.File) { + yield yield __await4(item.path); + } + } + }); + } + /** + * Constructs a DefaultGlobber + */ + static create(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + const result = new _DefaultGlobber(options); + if (IS_WINDOWS) { + patterns = patterns.replace(/\r\n/g, "\n"); + patterns = patterns.replace(/\r/g, "\n"); + } + const lines = patterns.split("\n").map((x) => x.trim()); + for (const line of lines) { + if (!line || line.startsWith("#")) { + continue; + } else { + result.patterns.push(new internal_pattern_1.Pattern(line)); + } + } + result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); + return result; + }); + } + static stat(item, options, traversalChain) { + return __awaiter4(this, void 0, void 0, function* () { + let stats; + if (options.followSymbolicLinks) { + try { + stats = yield fs15.promises.stat(item.path); + } catch (err) { + if (err.code === "ENOENT") { + if (options.omitBrokenSymbolicLinks) { + core14.debug(`Broken symlink '${item.path}'`); + return void 0; + } + throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); + } + throw err; + } + } else { + stats = yield fs15.promises.lstat(item.path); + } + if (stats.isDirectory() && options.followSymbolicLinks) { + const realPath = yield fs15.promises.realpath(item.path); + while (traversalChain.length >= item.level) { + traversalChain.pop(); + } + if (traversalChain.some((x) => x === realPath)) { + core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + return void 0; + } + traversalChain.push(realPath); + } + return stats; + }); + } + }; + exports2.DefaultGlobber = DefaultGlobber; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.create = void 0; + var internal_globber_1 = require_internal_globber(); + function create2(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); + }); + } + exports2.create = create2; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs15 = __importStar4(require("fs")); + var path16 = __importStar4(require("path")); + _a = fs15.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs15.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path16.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path16.dirname(filePath); + const upperName = path16.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path16.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultGlobber = void 0; - var core14 = __importStar4(require_core()); - var fs15 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); var path16 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); - var internal_match_kind_1 = require_internal_match_kind(); - var internal_pattern_1 = require_internal_pattern(); - var internal_search_state_1 = require_internal_search_state(); - var IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class _DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); - } - glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { - const result = []; - try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); - } finally { - if (e_1) throw e_1.error; - } + var ioUtil = __importStar4(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); } - return result; - }); - } - globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } + } else { + if (path16.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core14.debug(`Search path '${searchPath}'`); - try { - yield __await4(fs15.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") { - continue; - } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path16.join(dest, path16.basename(source)); + destExists = yield ioUtil.exists(dest); } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - const stats = yield __await4( - _DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - if (!stats) { - continue; - } - if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); - } else if (!partialMatch) { - continue; - } - const childLevel = item.level + 1; - const childItems = (yield __await4(fs15.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path16.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); } } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - const result = new _DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); + } + yield mkdirP(path16.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) { - if (!line || line.startsWith("#")) { - continue; + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which7(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which7(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); } else { - result.patterns.push(new internal_pattern_1.Pattern(line)); + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); } } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) { - try { - stats = yield fs15.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core14.debug(`Broken symlink '${item.path}'`); - return void 0; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which7; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { + if (extension) { + extensions.push(extension); } - } else { - stats = yield fs15.promises.lstat(item.path); } - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs15.promises.realpath(item.path); - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - if (traversalChain.some((x) => x === realPath)) { - core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; - } - traversalChain.push(realPath); + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; } - return stats; - }); - } - }; - exports2.DefaultGlobber = DefaultGlobber; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve9) { - resolve9(value); - }); - } - return new (P || (P = Promise))(function(resolve9, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + return []; + } + if (tool.includes(path16.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path16.delimiter)) { + if (p) { + directories.push(p); + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); } } - function step(result) { - result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; - var internal_globber_1 = require_internal_globber(); - function create2(patterns, options) { + } + function copyFile(srcFile, destFile, force) { return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } }); } - exports2.create = create2; } }); @@ -33208,7 +34087,7 @@ var require_cacheUtils = __commonJS({ var core14 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob2 = __importStar4(require_glob()); - var io7 = __importStar4(require_io()); + var io7 = __importStar4(require_io3()); var crypto2 = __importStar4(require("crypto")); var fs15 = __importStar4(require("fs")); var path16 = __importStar4(require("path")); @@ -75755,7 +76634,7 @@ var require_tar = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createTar = exports2.extractTar = exports2.listTar = void 0; var exec_1 = require_exec(); - var io7 = __importStar4(require_io()); + var io7 = __importStar4(require_io3()); var fs_1 = require("fs"); var path16 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); @@ -77325,140 +78204,561 @@ var require_internal_hash_files = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve9, reject) { - v = o[n](v), settle(resolve9, reject, v.done, v.value); - }); - }; - } - function settle(resolve9, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve9({ value: v2, done: d }); - }, reject); - } - }; + var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve9, reject) { + v = o[n](v), settle(resolve9, reject, v.done, v.value); + }); + }; + } + function settle(resolve9, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve9({ value: v2, done: d }); + }, reject); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hashFiles = void 0; + var crypto2 = __importStar4(require("crypto")); + var core14 = __importStar4(require_core()); + var fs15 = __importStar4(require("fs")); + var stream2 = __importStar4(require("stream")); + var util = __importStar4(require("util")); + var path16 = __importStar4(require("path")); + function hashFiles2(globber, currentWorkspace, verbose = false) { + var _a, e_1, _b, _c; + var _d; + return __awaiter4(this, void 0, void 0, function* () { + const writeDelegate = verbose ? core14.info : core14.debug; + let hasMatch = false; + const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); + const result = crypto2.createHash("sha256"); + let count = 0; + try { + for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { + _c = _g.value; + _e = false; + const file = _c; + writeDelegate(file); + if (!file.startsWith(`${githubWorkspace}${path16.sep}`)) { + writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); + continue; + } + if (fs15.statSync(file).isDirectory()) { + writeDelegate(`Skip directory '${file}'.`); + continue; + } + const hash = crypto2.createHash("sha256"); + const pipeline = util.promisify(stream2.pipeline); + yield pipeline(fs15.createReadStream(file), hash); + result.write(hash.digest()); + count++; + if (!hasMatch) { + hasMatch = true; + } + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); + } finally { + if (e_1) throw e_1.error; + } + } + result.end(); + if (hasMatch) { + writeDelegate(`Found ${count} files to hash.`); + return result.digest("hex"); + } else { + writeDelegate(`No matches found for glob`); + return ""; + } + }); + } + exports2.hashFiles = hashFiles2; + } +}); + +// node_modules/@actions/glob/lib/glob.js +var require_glob2 = __commonJS({ + "node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.hashFiles = exports2.create = void 0; + var internal_globber_1 = require_internal_globber2(); + var internal_hash_files_1 = require_internal_hash_files(); + function create2(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); + }); + } + exports2.create = create2; + function hashFiles2(patterns, currentWorkspace = "", options, verbose = false) { + return __awaiter4(this, void 0, void 0, function* () { + let followSymbolicLinks = true; + if (options && typeof options.followSymbolicLinks === "boolean") { + followSymbolicLinks = options.followSymbolicLinks; + } + const globber = yield create2(patterns, { followSymbolicLinks }); + return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); + }); + } + exports2.hashFiles = hashFiles2; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs15 = __importStar4(require("fs")); + var path16 = __importStar4(require("path")); + _a = fs15.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs15.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path16.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path16.dirname(filePath); + const upperName = path16.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path16.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve9) { + resolve9(value); + }); + } + return new (P || (P = Promise))(function(resolve9, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.hashFiles = void 0; - var crypto2 = __importStar4(require("crypto")); - var core14 = __importStar4(require_core()); - var fs15 = __importStar4(require("fs")); - var stream2 = __importStar4(require("stream")); - var util = __importStar4(require("util")); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); var path16 = __importStar4(require("path")); - function hashFiles2(globber, currentWorkspace, verbose = false) { - var _a, e_1, _b, _c; - var _d; + var ioUtil = __importStar4(require_io_util4()); + function cp(source, dest, options = {}) { return __awaiter4(this, void 0, void 0, function* () { - const writeDelegate = verbose ? core14.info : core14.debug; - let hasMatch = false; - const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); - const result = crypto2.createHash("sha256"); - let count = 0; - try { - for (var _e = true, _f = __asyncValues4(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) { - _c = _g.value; - _e = false; - const file = _c; - writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path16.sep}`)) { - writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); - continue; - } - if (fs15.statSync(file).isDirectory()) { - writeDelegate(`Skip directory '${file}'.`); - continue; - } - const hash = crypto2.createHash("sha256"); - const pipeline = util.promisify(stream2.pipeline); - yield pipeline(fs15.createReadStream(file), hash); - result.write(hash.digest()); - count++; - if (!hasMatch) { - hasMatch = true; + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path16.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path16.join(dest, path16.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); } } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (!_e && !_a && (_b = _f.return)) yield _b.call(_f); - } finally { - if (e_1) throw e_1.error; + } + yield mkdirP(path16.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); } } - result.end(); - if (hasMatch) { - writeDelegate(`Found ${count} files to hash.`); - return result.digest("hex"); - } else { - writeDelegate(`No matches found for glob`); - return ""; + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); } }); } - exports2.hashFiles = hashFiles2; - } -}); - -// node_modules/@actions/glob/lib/glob.js -var require_glob2 = __commonJS({ - "node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve9) { - resolve9(value); - }); - } - return new (P || (P = Promise))(function(resolve9, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which7(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which7(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } } + return result; } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which7; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { + if (extension) { + extensions.push(extension); + } } } - function step(result) { - result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected); + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + if (tool.includes(path16.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path16.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.hashFiles = exports2.create = void 0; - var internal_globber_1 = require_internal_globber2(); - var internal_hash_files_1 = require_internal_hash_files(); - function create2(patterns, options) { + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); }); } - exports2.create = create2; - function hashFiles2(patterns, currentWorkspace = "", options, verbose = false) { + function copyFile(srcFile, destFile, force) { return __awaiter4(this, void 0, void 0, function* () { - let followSymbolicLinks = true; - if (options && typeof options.followSymbolicLinks === "boolean") { - followSymbolicLinks = options.followSymbolicLinks; + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); } - const globber = yield create2(patterns, { followSymbolicLinks }); - return (0, internal_hash_files_1.hashFiles)(globber, currentWorkspace, verbose); }); } - exports2.hashFiles = hashFiles2; } }); @@ -78469,7 +79769,7 @@ var require_tool_cache = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; var core14 = __importStar4(require_core()); - var io7 = __importStar4(require_io()); + var io7 = __importStar4(require_io4()); var crypto2 = __importStar4(require("crypto")); var fs15 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); @@ -80270,7 +81570,7 @@ var require_follow_redirects = __commonJS({ var fs14 = __toESM(require("fs")); var path15 = __toESM(require("path")); var core13 = __toESM(require_core()); -var io6 = __toESM(require_io()); +var io6 = __toESM(require_io2()); var semver8 = __toESM(require_semver2()); // node_modules/uuid/dist-node/stringify.js @@ -80333,7 +81633,7 @@ var path2 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io()); +var io2 = __toESM(require_io2()); // src/util.ts var fs = __toESM(require("fs")); @@ -80342,7 +81642,7 @@ var os = __toESM(require("os")); var path = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); -var io = __toESM(require_io()); +var io = __toESM(require_io2()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -84339,7 +85639,7 @@ var actionsCache = __toESM(require_cache3()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io()); +var io3 = __toESM(require_io2()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -86121,7 +87421,7 @@ function flushDiagnostics(config) { var fs12 = __toESM(require("fs")); var path13 = __toESM(require("path")); var toolrunner4 = __toESM(require_toolrunner()); -var io5 = __toESM(require_io()); +var io5 = __toESM(require_io2()); // src/codeql.ts var fs11 = __toESM(require("fs")); @@ -86381,7 +87681,7 @@ var import_child_process = require("child_process"); var fs7 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io()); +var io4 = __toESM(require_io2()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); var MIN_REQUIRED_BSD_TAR_VERSION = "3.4.3"; diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index 710f80ec07..026a624249 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -18456,9 +18456,9 @@ var require_path_utils = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -18629,9 +18629,9 @@ var require_io_util = __commonJS({ } }); -// node_modules/@actions/io/lib/io.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -25234,6 +25234,464 @@ var require_github = __commonJS({ } }); +// node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs5 = __importStar4(require("fs")); + var path5 = __importStar4(require("path")); + _a = fs5.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + const result = yield fs5.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs5.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield (0, exports2.stat)(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + function isDirectory(fsPath_1) { + return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); + return stats.isDirectory(); + }); + } + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path5.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path5.dirname(filePath); + const upperName = path5.basename(filePath).toUpperCase(); + for (const actualName of yield (0, exports2.readdir)(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path5.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + } +}); + +// node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which5; + exports2.findInPath = findInPath; + var assert_1 = require("assert"); + var path5 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util2()); + function cp(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path5.join(dest, path5.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path5.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + function mv(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path5.join(dest, path5.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path5.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + function which5(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which5(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path5.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path5.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path5.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path5.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27201,7 +27659,7 @@ var require_package = __commonJS({ "@actions/github": "^6.0.0", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", - "@actions/io": "^1.1.3", + "@actions/io": "^2.0.0", "@actions/tool-cache": "^2.0.2", "@octokit/plugin-retry": "^6.0.0", "@octokit/request-error": "^7.0.2", @@ -31534,255 +31992,676 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve4, reject) { - v = o[n](v), settle(resolve4, reject, v.done, v.value); - }); - }; - } - function settle(resolve4, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve4({ value: v2, done: d }); - }, reject); - } - }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); - }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - }; + var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve4, reject) { + v = o[n](v), settle(resolve4, reject, v.done, v.value); + }); + }; + } + function settle(resolve4, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve4({ value: v2, done: d }); + }, reject); + } + }; + var __await4 = exports2 && exports2.__await || function(v) { + return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + }; + var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DefaultGlobber = void 0; + var core13 = __importStar4(require_core()); + var fs5 = __importStar4(require("fs")); + var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + var path5 = __importStar4(require("path")); + var patternHelper = __importStar4(require_internal_pattern_helper()); + var internal_match_kind_1 = require_internal_match_kind(); + var internal_pattern_1 = require_internal_pattern(); + var internal_search_state_1 = require_internal_search_state(); + var IS_WINDOWS = process.platform === "win32"; + var DefaultGlobber = class _DefaultGlobber { + constructor(options) { + this.patterns = []; + this.searchPaths = []; + this.options = globOptionsHelper.getOptions(options); + } + getSearchPaths() { + return this.searchPaths.slice(); + } + glob() { + var e_1, _a; + return __awaiter4(this, void 0, void 0, function* () { + const result = []; + try { + for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { + const itemPath = _c.value; + result.push(itemPath); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + } finally { + if (e_1) throw e_1.error; + } + } + return result; + }); + } + globGenerator() { + return __asyncGenerator4(this, arguments, function* globGenerator_1() { + const options = globOptionsHelper.getOptions(this.options); + const patterns = []; + for (const pattern of this.patterns) { + patterns.push(pattern); + if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { + patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); + } + } + const stack = []; + for (const searchPath of patternHelper.getSearchPaths(patterns)) { + core13.debug(`Search path '${searchPath}'`); + try { + yield __await4(fs5.promises.lstat(searchPath)); + } catch (err) { + if (err.code === "ENOENT") { + continue; + } + throw err; + } + stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + } + const traversalChain = []; + while (stack.length) { + const item = stack.pop(); + const match = patternHelper.match(patterns, item.path); + const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); + if (!match && !partialMatch) { + continue; + } + const stats = yield __await4( + _DefaultGlobber.stat(item, options, traversalChain) + // Broken symlink, or symlink cycle detected, or no longer exists + ); + if (!stats) { + continue; + } + if (stats.isDirectory()) { + if (match & internal_match_kind_1.MatchKind.Directory) { + yield yield __await4(item.path); + } else if (!partialMatch) { + continue; + } + const childLevel = item.level + 1; + const childItems = (yield __await4(fs5.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path5.join(item.path, x), childLevel)); + stack.push(...childItems.reverse()); + } else if (match & internal_match_kind_1.MatchKind.File) { + yield yield __await4(item.path); + } + } + }); + } + /** + * Constructs a DefaultGlobber + */ + static create(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + const result = new _DefaultGlobber(options); + if (IS_WINDOWS) { + patterns = patterns.replace(/\r\n/g, "\n"); + patterns = patterns.replace(/\r/g, "\n"); + } + const lines = patterns.split("\n").map((x) => x.trim()); + for (const line of lines) { + if (!line || line.startsWith("#")) { + continue; + } else { + result.patterns.push(new internal_pattern_1.Pattern(line)); + } + } + result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); + return result; + }); + } + static stat(item, options, traversalChain) { + return __awaiter4(this, void 0, void 0, function* () { + let stats; + if (options.followSymbolicLinks) { + try { + stats = yield fs5.promises.stat(item.path); + } catch (err) { + if (err.code === "ENOENT") { + if (options.omitBrokenSymbolicLinks) { + core13.debug(`Broken symlink '${item.path}'`); + return void 0; + } + throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); + } + throw err; + } + } else { + stats = yield fs5.promises.lstat(item.path); + } + if (stats.isDirectory() && options.followSymbolicLinks) { + const realPath = yield fs5.promises.realpath(item.path); + while (traversalChain.length >= item.level) { + traversalChain.pop(); + } + if (traversalChain.some((x) => x === realPath)) { + core13.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + return void 0; + } + traversalChain.push(realPath); + } + return stats; + }); + } + }; + exports2.DefaultGlobber = DefaultGlobber; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.create = void 0; + var internal_globber_1 = require_internal_globber(); + function create(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); + }); + } + exports2.create = create; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs5 = __importStar4(require("fs")); + var path5 = __importStar4(require("path")); + _a = fs5.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs5.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path5.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path5.dirname(filePath); + const upperName = path5.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path5.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultGlobber = void 0; - var core13 = __importStar4(require_core()); - var fs5 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); var path5 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); - var internal_match_kind_1 = require_internal_match_kind(); - var internal_pattern_1 = require_internal_pattern(); - var internal_search_state_1 = require_internal_search_state(); - var IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class _DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); - } - glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { - const result = []; - try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); - } finally { - if (e_1) throw e_1.error; - } + var ioUtil = __importStar4(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path5.join(dest, path5.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); } - return result; - }); - } - globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } + } else { + if (path5.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core13.debug(`Search path '${searchPath}'`); - try { - yield __await4(fs5.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") { - continue; - } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path5.join(dest, path5.basename(source)); + destExists = yield ioUtil.exists(dest); } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - const stats = yield __await4( - _DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - if (!stats) { - continue; - } - if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); - } else if (!partialMatch) { - continue; - } - const childLevel = item.level + 1; - const childItems = (yield __await4(fs5.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path5.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); } } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - const result = new _DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); + } + yield mkdirP(path5.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) { - if (!line || line.startsWith("#")) { - continue; + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which5(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which5(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); } else { - result.patterns.push(new internal_pattern_1.Pattern(line)); + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); } } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) { - try { - stats = yield fs5.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core13.debug(`Broken symlink '${item.path}'`); - return void 0; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which5; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path5.delimiter)) { + if (extension) { + extensions.push(extension); } - } else { - stats = yield fs5.promises.lstat(item.path); } - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs5.promises.realpath(item.path); - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - if (traversalChain.some((x) => x === realPath)) { - core13.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; - } - traversalChain.push(realPath); + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; } - return stats; - }); - } - }; - exports2.DefaultGlobber = DefaultGlobber; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + return []; + } + if (tool.includes(path5.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path5.delimiter)) { + if (p) { + directories.push(p); + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path5.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); } } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; - var internal_globber_1 = require_internal_globber(); - function create(patterns, options) { + } + function copyFile(srcFile, destFile, force) { return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } }); } - exports2.create = create; } }); @@ -33057,7 +33936,7 @@ var require_cacheUtils = __commonJS({ var core13 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob = __importStar4(require_glob()); - var io5 = __importStar4(require_io()); + var io5 = __importStar4(require_io3()); var crypto = __importStar4(require("crypto")); var fs5 = __importStar4(require("fs")); var path5 = __importStar4(require("path")); @@ -75604,7 +76483,7 @@ var require_tar = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createTar = exports2.extractTar = exports2.listTar = void 0; var exec_1 = require_exec(); - var io5 = __importStar4(require_io()); + var io5 = __importStar4(require_io3()); var fs_1 = require("fs"); var path5 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); @@ -76214,6 +77093,427 @@ var require_cache3 = __commonJS({ } }); +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs5 = __importStar4(require("fs")); + var path5 = __importStar4(require("path")); + _a = fs5.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs5.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path5.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path5.dirname(filePath); + const upperName = path5.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path5.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path5 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util4()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path5.join(dest, path5.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path5.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path5.join(dest, path5.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path5.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which5(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which5(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which5; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path5.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path5.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path5.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path5.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/@actions/tool-cache/lib/manifest.js var require_manifest = __commonJS({ "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { @@ -77221,7 +78521,7 @@ var require_tool_cache = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; var core13 = __importStar4(require_core()); - var io5 = __importStar4(require_io()); + var io5 = __importStar4(require_io4()); var crypto = __importStar4(require("crypto")); var fs5 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); @@ -79026,14 +80326,14 @@ var fs = __toESM(require("fs")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io()); +var io2 = __toESM(require_io2()); // src/util.ts var fsPromises = __toESM(require("fs/promises")); var path = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); -var io = __toESM(require_io()); +var io = __toESM(require_io2()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -82403,7 +83703,7 @@ var actionsCache = __toESM(require_cache3()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io()); +var io3 = __toESM(require_io2()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -82919,7 +84219,7 @@ var semver7 = __toESM(require_semver2()); // src/tar.ts var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io()); +var io4 = __toESM(require_io2()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); diff --git a/lib/setup-codeql-action.js b/lib/setup-codeql-action.js index d544283173..265caf361c 100644 --- a/lib/setup-codeql-action.js +++ b/lib/setup-codeql-action.js @@ -18456,9 +18456,9 @@ var require_path_utils = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -18629,9 +18629,9 @@ var require_io_util = __commonJS({ } }); -// node_modules/@actions/io/lib/io.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -25234,6 +25234,464 @@ var require_github = __commonJS({ } }); +// node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs9 = __importStar4(require("fs")); + var path8 = __importStar4(require("path")); + _a = fs9.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + const result = yield fs9.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs9.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield (0, exports2.stat)(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + function isDirectory(fsPath_1) { + return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); + return stats.isDirectory(); + }); + } + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path8.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path8.dirname(filePath); + const upperName = path8.basename(filePath).toUpperCase(); + for (const actualName of yield (0, exports2.readdir)(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path8.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + } +}); + +// node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which6; + exports2.findInPath = findInPath; + var assert_1 = require("assert"); + var path8 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util2()); + function cp(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path8.join(dest, path8.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path8.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + function mv(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path8.join(dest, path8.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path8.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + function which6(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path8.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path8.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path8.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path8.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27201,7 +27659,7 @@ var require_package = __commonJS({ "@actions/github": "^6.0.0", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", - "@actions/io": "^1.1.3", + "@actions/io": "^2.0.0", "@actions/tool-cache": "^2.0.2", "@octokit/plugin-retry": "^6.0.0", "@octokit/request-error": "^7.0.2", @@ -30237,255 +30695,676 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve4, reject) { - v = o[n](v), settle(resolve4, reject, v.done, v.value); - }); - }; - } - function settle(resolve4, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve4({ value: v2, done: d }); - }, reject); - } - }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); - }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - }; + var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve4, reject) { + v = o[n](v), settle(resolve4, reject, v.done, v.value); + }); + }; + } + function settle(resolve4, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve4({ value: v2, done: d }); + }, reject); + } + }; + var __await4 = exports2 && exports2.__await || function(v) { + return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + }; + var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DefaultGlobber = void 0; + var core13 = __importStar4(require_core()); + var fs9 = __importStar4(require("fs")); + var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + var path8 = __importStar4(require("path")); + var patternHelper = __importStar4(require_internal_pattern_helper()); + var internal_match_kind_1 = require_internal_match_kind(); + var internal_pattern_1 = require_internal_pattern(); + var internal_search_state_1 = require_internal_search_state(); + var IS_WINDOWS = process.platform === "win32"; + var DefaultGlobber = class _DefaultGlobber { + constructor(options) { + this.patterns = []; + this.searchPaths = []; + this.options = globOptionsHelper.getOptions(options); + } + getSearchPaths() { + return this.searchPaths.slice(); + } + glob() { + var e_1, _a; + return __awaiter4(this, void 0, void 0, function* () { + const result = []; + try { + for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { + const itemPath = _c.value; + result.push(itemPath); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + } finally { + if (e_1) throw e_1.error; + } + } + return result; + }); + } + globGenerator() { + return __asyncGenerator4(this, arguments, function* globGenerator_1() { + const options = globOptionsHelper.getOptions(this.options); + const patterns = []; + for (const pattern of this.patterns) { + patterns.push(pattern); + if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { + patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); + } + } + const stack = []; + for (const searchPath of patternHelper.getSearchPaths(patterns)) { + core13.debug(`Search path '${searchPath}'`); + try { + yield __await4(fs9.promises.lstat(searchPath)); + } catch (err) { + if (err.code === "ENOENT") { + continue; + } + throw err; + } + stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + } + const traversalChain = []; + while (stack.length) { + const item = stack.pop(); + const match = patternHelper.match(patterns, item.path); + const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); + if (!match && !partialMatch) { + continue; + } + const stats = yield __await4( + _DefaultGlobber.stat(item, options, traversalChain) + // Broken symlink, or symlink cycle detected, or no longer exists + ); + if (!stats) { + continue; + } + if (stats.isDirectory()) { + if (match & internal_match_kind_1.MatchKind.Directory) { + yield yield __await4(item.path); + } else if (!partialMatch) { + continue; + } + const childLevel = item.level + 1; + const childItems = (yield __await4(fs9.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path8.join(item.path, x), childLevel)); + stack.push(...childItems.reverse()); + } else if (match & internal_match_kind_1.MatchKind.File) { + yield yield __await4(item.path); + } + } + }); + } + /** + * Constructs a DefaultGlobber + */ + static create(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + const result = new _DefaultGlobber(options); + if (IS_WINDOWS) { + patterns = patterns.replace(/\r\n/g, "\n"); + patterns = patterns.replace(/\r/g, "\n"); + } + const lines = patterns.split("\n").map((x) => x.trim()); + for (const line of lines) { + if (!line || line.startsWith("#")) { + continue; + } else { + result.patterns.push(new internal_pattern_1.Pattern(line)); + } + } + result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); + return result; + }); + } + static stat(item, options, traversalChain) { + return __awaiter4(this, void 0, void 0, function* () { + let stats; + if (options.followSymbolicLinks) { + try { + stats = yield fs9.promises.stat(item.path); + } catch (err) { + if (err.code === "ENOENT") { + if (options.omitBrokenSymbolicLinks) { + core13.debug(`Broken symlink '${item.path}'`); + return void 0; + } + throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); + } + throw err; + } + } else { + stats = yield fs9.promises.lstat(item.path); + } + if (stats.isDirectory() && options.followSymbolicLinks) { + const realPath = yield fs9.promises.realpath(item.path); + while (traversalChain.length >= item.level) { + traversalChain.pop(); + } + if (traversalChain.some((x) => x === realPath)) { + core13.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + return void 0; + } + traversalChain.push(realPath); + } + return stats; + }); + } + }; + exports2.DefaultGlobber = DefaultGlobber; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.create = void 0; + var internal_globber_1 = require_internal_globber(); + function create(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); + }); + } + exports2.create = create; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs9 = __importStar4(require("fs")); + var path8 = __importStar4(require("path")); + _a = fs9.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs9.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path8.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path8.dirname(filePath); + const upperName = path8.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path8.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultGlobber = void 0; - var core13 = __importStar4(require_core()); - var fs9 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); var path8 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); - var internal_match_kind_1 = require_internal_match_kind(); - var internal_pattern_1 = require_internal_pattern(); - var internal_search_state_1 = require_internal_search_state(); - var IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class _DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); - } - glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { - const result = []; - try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); - } finally { - if (e_1) throw e_1.error; - } + var ioUtil = __importStar4(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path8.join(dest, path8.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); } - return result; - }); - } - globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } + } else { + if (path8.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core13.debug(`Search path '${searchPath}'`); - try { - yield __await4(fs9.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") { - continue; - } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path8.join(dest, path8.basename(source)); + destExists = yield ioUtil.exists(dest); } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - const stats = yield __await4( - _DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - if (!stats) { - continue; - } - if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); - } else if (!partialMatch) { - continue; - } - const childLevel = item.level + 1; - const childItems = (yield __await4(fs9.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path8.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); } } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - const result = new _DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); + } + yield mkdirP(path8.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) { - if (!line || line.startsWith("#")) { - continue; + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); } else { - result.patterns.push(new internal_pattern_1.Pattern(line)); + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); } } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) { - try { - stats = yield fs9.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core13.debug(`Broken symlink '${item.path}'`); - return void 0; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path8.delimiter)) { + if (extension) { + extensions.push(extension); } - } else { - stats = yield fs9.promises.lstat(item.path); } - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs9.promises.realpath(item.path); - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - if (traversalChain.some((x) => x === realPath)) { - core13.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; - } - traversalChain.push(realPath); + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; } - return stats; - }); - } - }; - exports2.DefaultGlobber = DefaultGlobber; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); - }); - } - return new (P || (P = Promise))(function(resolve4, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + return []; + } + if (tool.includes(path8.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path8.delimiter)) { + if (p) { + directories.push(p); + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path8.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); } } - function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; - var internal_globber_1 = require_internal_globber(); - function create(patterns, options) { + } + function copyFile(srcFile, destFile, force) { return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } }); } - exports2.create = create; } }); @@ -31760,7 +32639,7 @@ var require_cacheUtils = __commonJS({ var core13 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob = __importStar4(require_glob()); - var io6 = __importStar4(require_io()); + var io6 = __importStar4(require_io3()); var crypto = __importStar4(require("crypto")); var fs9 = __importStar4(require("fs")); var path8 = __importStar4(require("path")); @@ -74307,7 +75186,7 @@ var require_tar = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createTar = exports2.extractTar = exports2.listTar = void 0; var exec_1 = require_exec(); - var io6 = __importStar4(require_io()); + var io6 = __importStar4(require_io3()); var fs_1 = require("fs"); var path8 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); @@ -76214,6 +77093,427 @@ var require_lib4 = __commonJS({ } }); +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs9 = __importStar4(require("fs")); + var path8 = __importStar4(require("path")); + _a = fs9.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs9.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path8.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path8.dirname(filePath); + const upperName = path8.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path8.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve4) { + resolve4(value); + }); + } + return new (P || (P = Promise))(function(resolve4, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path8 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util4()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path8.join(dest, path8.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path8.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path8.join(dest, path8.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path8.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path8.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path8.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path8.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path8.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/@actions/tool-cache/lib/manifest.js var require_manifest = __commonJS({ "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { @@ -77221,7 +78521,7 @@ var require_tool_cache = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; var core13 = __importStar4(require_core()); - var io6 = __importStar4(require_io()); + var io6 = __importStar4(require_io4()); var crypto = __importStar4(require("crypto")); var fs9 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); @@ -79081,7 +80381,7 @@ var path2 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io()); +var io2 = __toESM(require_io2()); // src/util.ts var fs = __toESM(require("fs")); @@ -79089,7 +80389,7 @@ var fsPromises = __toESM(require("fs/promises")); var path = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); -var io = __toESM(require_io()); +var io = __toESM(require_io2()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -82298,7 +83598,7 @@ var actionsCache = __toESM(require_cache3()); // src/git-utils.ts var core6 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io()); +var io3 = __toESM(require_io2()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -83011,7 +84311,7 @@ var GitHubFeatureFlags = class { // src/init.ts var toolrunner4 = __toESM(require_toolrunner()); -var io5 = __toESM(require_io()); +var io5 = __toESM(require_io2()); // src/codeql.ts var fs8 = __toESM(require("fs")); @@ -83339,7 +84639,7 @@ var import_child_process = require("child_process"); var fs5 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io()); +var io4 = __toESM(require_io2()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); var MIN_REQUIRED_BSD_TAR_VERSION = "3.4.3"; diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index 1df53ab08c..6171b2cc57 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -18456,9 +18456,9 @@ var require_path_utils = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -18629,9 +18629,9 @@ var require_io_util = __commonJS({ } }); -// node_modules/@actions/io/lib/io.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -25234,6 +25234,464 @@ var require_github = __commonJS({ } }); +// node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs2 = __importStar4(require("fs")); + var path2 = __importStar4(require("path")); + _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + const result = yield fs2.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs2.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield (0, exports2.stat)(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + function isDirectory(fsPath_1) { + return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); + return stats.isDirectory(); + }); + } + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield (0, exports2.readdir)(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + } +}); + +// node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which6; + exports2.findInPath = findInPath; + var assert_1 = require("assert"); + var path2 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util2()); + function cp(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + function mv(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + function which6(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27201,7 +27659,7 @@ var require_package = __commonJS({ "@actions/github": "^6.0.0", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", - "@actions/io": "^1.1.3", + "@actions/io": "^2.0.0", "@actions/tool-cache": "^2.0.2", "@octokit/plugin-retry": "^6.0.0", "@octokit/request-error": "^7.0.2", @@ -31534,255 +31992,676 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve2, reject) { - v = o[n](v), settle(resolve2, reject, v.done, v.value); - }); - }; - } - function settle(resolve2, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve2({ value: v2, done: d }); - }, reject); - } - }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); - }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - }; + var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve2, reject) { + v = o[n](v), settle(resolve2, reject, v.done, v.value); + }); + }; + } + function settle(resolve2, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve2({ value: v2, done: d }); + }, reject); + } + }; + var __await4 = exports2 && exports2.__await || function(v) { + return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + }; + var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DefaultGlobber = void 0; + var core14 = __importStar4(require_core()); + var fs2 = __importStar4(require("fs")); + var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + var path2 = __importStar4(require("path")); + var patternHelper = __importStar4(require_internal_pattern_helper()); + var internal_match_kind_1 = require_internal_match_kind(); + var internal_pattern_1 = require_internal_pattern(); + var internal_search_state_1 = require_internal_search_state(); + var IS_WINDOWS = process.platform === "win32"; + var DefaultGlobber = class _DefaultGlobber { + constructor(options) { + this.patterns = []; + this.searchPaths = []; + this.options = globOptionsHelper.getOptions(options); + } + getSearchPaths() { + return this.searchPaths.slice(); + } + glob() { + var e_1, _a; + return __awaiter4(this, void 0, void 0, function* () { + const result = []; + try { + for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { + const itemPath = _c.value; + result.push(itemPath); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + } finally { + if (e_1) throw e_1.error; + } + } + return result; + }); + } + globGenerator() { + return __asyncGenerator4(this, arguments, function* globGenerator_1() { + const options = globOptionsHelper.getOptions(this.options); + const patterns = []; + for (const pattern of this.patterns) { + patterns.push(pattern); + if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { + patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); + } + } + const stack = []; + for (const searchPath of patternHelper.getSearchPaths(patterns)) { + core14.debug(`Search path '${searchPath}'`); + try { + yield __await4(fs2.promises.lstat(searchPath)); + } catch (err) { + if (err.code === "ENOENT") { + continue; + } + throw err; + } + stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + } + const traversalChain = []; + while (stack.length) { + const item = stack.pop(); + const match = patternHelper.match(patterns, item.path); + const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); + if (!match && !partialMatch) { + continue; + } + const stats = yield __await4( + _DefaultGlobber.stat(item, options, traversalChain) + // Broken symlink, or symlink cycle detected, or no longer exists + ); + if (!stats) { + continue; + } + if (stats.isDirectory()) { + if (match & internal_match_kind_1.MatchKind.Directory) { + yield yield __await4(item.path); + } else if (!partialMatch) { + continue; + } + const childLevel = item.level + 1; + const childItems = (yield __await4(fs2.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path2.join(item.path, x), childLevel)); + stack.push(...childItems.reverse()); + } else if (match & internal_match_kind_1.MatchKind.File) { + yield yield __await4(item.path); + } + } + }); + } + /** + * Constructs a DefaultGlobber + */ + static create(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + const result = new _DefaultGlobber(options); + if (IS_WINDOWS) { + patterns = patterns.replace(/\r\n/g, "\n"); + patterns = patterns.replace(/\r/g, "\n"); + } + const lines = patterns.split("\n").map((x) => x.trim()); + for (const line of lines) { + if (!line || line.startsWith("#")) { + continue; + } else { + result.patterns.push(new internal_pattern_1.Pattern(line)); + } + } + result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); + return result; + }); + } + static stat(item, options, traversalChain) { + return __awaiter4(this, void 0, void 0, function* () { + let stats; + if (options.followSymbolicLinks) { + try { + stats = yield fs2.promises.stat(item.path); + } catch (err) { + if (err.code === "ENOENT") { + if (options.omitBrokenSymbolicLinks) { + core14.debug(`Broken symlink '${item.path}'`); + return void 0; + } + throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); + } + throw err; + } + } else { + stats = yield fs2.promises.lstat(item.path); + } + if (stats.isDirectory() && options.followSymbolicLinks) { + const realPath = yield fs2.promises.realpath(item.path); + while (traversalChain.length >= item.level) { + traversalChain.pop(); + } + if (traversalChain.some((x) => x === realPath)) { + core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + return void 0; + } + traversalChain.push(realPath); + } + return stats; + }); + } + }; + exports2.DefaultGlobber = DefaultGlobber; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.create = void 0; + var internal_globber_1 = require_internal_globber(); + function create3(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); + }); + } + exports2.create = create3; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs2 = __importStar4(require("fs")); + var path2 = __importStar4(require("path")); + _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs2.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultGlobber = void 0; - var core14 = __importStar4(require_core()); - var fs2 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); var path2 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); - var internal_match_kind_1 = require_internal_match_kind(); - var internal_pattern_1 = require_internal_pattern(); - var internal_search_state_1 = require_internal_search_state(); - var IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class _DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); - } - glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { - const result = []; - try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); - } finally { - if (e_1) throw e_1.error; - } + var ioUtil = __importStar4(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); } - return result; - }); - } - globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core14.debug(`Search path '${searchPath}'`); - try { - yield __await4(fs2.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") { - continue; - } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - const stats = yield __await4( - _DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - if (!stats) { - continue; - } - if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); - } else if (!partialMatch) { - continue; - } - const childLevel = item.level + 1; - const childItems = (yield __await4(fs2.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path2.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); } } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - const result = new _DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) { - if (!line || line.startsWith("#")) { - continue; + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); } else { - result.patterns.push(new internal_pattern_1.Pattern(line)); + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); } } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) { - try { - stats = yield fs2.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core14.debug(`Broken symlink '${item.path}'`); - return void 0; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); } - } else { - stats = yield fs2.promises.lstat(item.path); } - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs2.promises.realpath(item.path); - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - if (traversalChain.some((x) => x === realPath)) { - core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; - } - traversalChain.push(realPath); + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; } - return stats; - }); - } - }; - exports2.DefaultGlobber = DefaultGlobber; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); } } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; - var internal_globber_1 = require_internal_globber(); - function create3(patterns, options) { + } + function copyFile(srcFile, destFile, force) { return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } }); } - exports2.create = create3; } }); @@ -33057,7 +33936,7 @@ var require_cacheUtils = __commonJS({ var core14 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob2 = __importStar4(require_glob()); - var io6 = __importStar4(require_io()); + var io6 = __importStar4(require_io3()); var crypto = __importStar4(require("crypto")); var fs2 = __importStar4(require("fs")); var path2 = __importStar4(require("path")); @@ -75604,7 +76483,7 @@ var require_tar = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createTar = exports2.extractTar = exports2.listTar = void 0; var exec_1 = require_exec(); - var io6 = __importStar4(require_io()); + var io6 = __importStar4(require_io3()); var fs_1 = require("fs"); var path2 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); @@ -111077,156 +111956,577 @@ var require_artifact_client = __commonJS({ }); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultArtifactClient = void 0; - var core14 = __importStar4(require_core()); - var upload_specification_1 = require_upload_specification(); - var upload_http_client_1 = require_upload_http_client(); - var utils_1 = require_utils7(); - var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation2(); - var download_http_client_1 = require_download_http_client(); - var download_specification_1 = require_download_specification(); - var config_variables_1 = require_config_variables(); - var path_1 = require("path"); - var DefaultArtifactClient2 = class _DefaultArtifactClient { - /** - * Constructs a DefaultArtifactClient - */ - static create() { - return new _DefaultArtifactClient(); - } - /** - * Uploads an artifact - */ - uploadArtifact(name, files, rootDirectory, options) { - return __awaiter4(this, void 0, void 0, function* () { - core14.info(`Starting artifact upload -For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging`); - (0, path_and_artifact_name_validation_1.checkArtifactName)(name); - const uploadSpecification = (0, upload_specification_1.getUploadSpecification)(name, rootDirectory, files); - const uploadResponse = { - artifactName: name, - artifactItems: [], - size: 0, - failedItems: [] - }; - const uploadHttpClient = new upload_http_client_1.UploadHttpClient(); - if (uploadSpecification.length === 0) { - core14.warning(`No files found that can be uploaded`); + exports2.DefaultArtifactClient = void 0; + var core14 = __importStar4(require_core()); + var upload_specification_1 = require_upload_specification(); + var upload_http_client_1 = require_upload_http_client(); + var utils_1 = require_utils7(); + var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation2(); + var download_http_client_1 = require_download_http_client(); + var download_specification_1 = require_download_specification(); + var config_variables_1 = require_config_variables(); + var path_1 = require("path"); + var DefaultArtifactClient2 = class _DefaultArtifactClient { + /** + * Constructs a DefaultArtifactClient + */ + static create() { + return new _DefaultArtifactClient(); + } + /** + * Uploads an artifact + */ + uploadArtifact(name, files, rootDirectory, options) { + return __awaiter4(this, void 0, void 0, function* () { + core14.info(`Starting artifact upload +For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging`); + (0, path_and_artifact_name_validation_1.checkArtifactName)(name); + const uploadSpecification = (0, upload_specification_1.getUploadSpecification)(name, rootDirectory, files); + const uploadResponse = { + artifactName: name, + artifactItems: [], + size: 0, + failedItems: [] + }; + const uploadHttpClient = new upload_http_client_1.UploadHttpClient(); + if (uploadSpecification.length === 0) { + core14.warning(`No files found that can be uploaded`); + } else { + const response = yield uploadHttpClient.createArtifactInFileContainer(name, options); + if (!response.fileContainerResourceUrl) { + core14.debug(response.toString()); + throw new Error("No URL provided by the Artifact Service to upload an artifact to"); + } + core14.debug(`Upload Resource URL: ${response.fileContainerResourceUrl}`); + core14.info(`Container for artifact "${name}" successfully created. Starting upload of file(s)`); + const uploadResult = yield uploadHttpClient.uploadArtifactToFileContainer(response.fileContainerResourceUrl, uploadSpecification, options); + core14.info(`File upload process has finished. Finalizing the artifact upload`); + yield uploadHttpClient.patchArtifactSize(uploadResult.totalSize, name); + if (uploadResult.failedItems.length > 0) { + core14.info(`Upload finished. There were ${uploadResult.failedItems.length} items that failed to upload`); + } else { + core14.info(`Artifact has been finalized. All files have been successfully uploaded!`); + } + core14.info(` +The raw size of all the files that were specified for upload is ${uploadResult.totalSize} bytes +The size of all the files that were uploaded is ${uploadResult.uploadSize} bytes. This takes into account any gzip compression used to reduce the upload size, time and storage + +Note: The size of downloaded zips can differ significantly from the reported size. For more information see: https://github.com/actions/upload-artifact#zipped-artifact-downloads \r +`); + uploadResponse.artifactItems = uploadSpecification.map((item) => item.absoluteFilePath); + uploadResponse.size = uploadResult.uploadSize; + uploadResponse.failedItems = uploadResult.failedItems; + } + return uploadResponse; + }); + } + downloadArtifact(name, path2, options) { + return __awaiter4(this, void 0, void 0, function* () { + const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); + const artifacts = yield downloadHttpClient.listArtifacts(); + if (artifacts.count === 0) { + throw new Error(`Unable to find any artifacts for the associated workflow`); + } + const artifactToDownload = artifacts.value.find((artifact2) => { + return artifact2.name === name; + }); + if (!artifactToDownload) { + throw new Error(`Unable to find an artifact with the name: ${name}`); + } + const items = yield downloadHttpClient.getContainerItems(artifactToDownload.name, artifactToDownload.fileContainerResourceUrl); + if (!path2) { + path2 = (0, config_variables_1.getWorkSpaceDirectory)(); + } + path2 = (0, path_1.normalize)(path2); + path2 = (0, path_1.resolve)(path2); + const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path2, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); + if (downloadSpecification.filesToDownload.length === 0) { + core14.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`); + } else { + yield (0, utils_1.createDirectoriesForArtifact)(downloadSpecification.directoryStructure); + core14.info("Directory structure has been set up for the artifact"); + yield (0, utils_1.createEmptyFilesForArtifact)(downloadSpecification.emptyFilesToCreate); + yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload); + } + return { + artifactName: name, + downloadPath: downloadSpecification.rootDownloadLocation + }; + }); + } + downloadAllArtifacts(path2) { + return __awaiter4(this, void 0, void 0, function* () { + const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); + const response = []; + const artifacts = yield downloadHttpClient.listArtifacts(); + if (artifacts.count === 0) { + core14.info("Unable to find any artifacts for the associated workflow"); + return response; + } + if (!path2) { + path2 = (0, config_variables_1.getWorkSpaceDirectory)(); + } + path2 = (0, path_1.normalize)(path2); + path2 = (0, path_1.resolve)(path2); + let downloadedArtifacts = 0; + while (downloadedArtifacts < artifacts.count) { + const currentArtifactToDownload = artifacts.value[downloadedArtifacts]; + downloadedArtifacts += 1; + core14.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`); + const items = yield downloadHttpClient.getContainerItems(currentArtifactToDownload.name, currentArtifactToDownload.fileContainerResourceUrl); + const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path2, true); + if (downloadSpecification.filesToDownload.length === 0) { + core14.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`); + } else { + yield (0, utils_1.createDirectoriesForArtifact)(downloadSpecification.directoryStructure); + yield (0, utils_1.createEmptyFilesForArtifact)(downloadSpecification.emptyFilesToCreate); + yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload); + } + response.push({ + artifactName: currentArtifactToDownload.name, + downloadPath: downloadSpecification.rootDownloadLocation + }); + } + return response; + }); + } + }; + exports2.DefaultArtifactClient = DefaultArtifactClient2; + } +}); + +// node_modules/@actions/artifact-legacy/lib/artifact-client.js +var require_artifact_client2 = __commonJS({ + "node_modules/@actions/artifact-legacy/lib/artifact-client.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.create = void 0; + var artifact_client_1 = require_artifact_client(); + function create3() { + return artifact_client_1.DefaultArtifactClient.create(); + } + exports2.create = create3; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs2 = __importStar4(require("fs")); + var path2 = __importStar4(require("path")); + _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs2.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path2 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util4()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); } else { - const response = yield uploadHttpClient.createArtifactInFileContainer(name, options); - if (!response.fileContainerResourceUrl) { - core14.debug(response.toString()); - throw new Error("No URL provided by the Artifact Service to upload an artifact to"); - } - core14.debug(`Upload Resource URL: ${response.fileContainerResourceUrl}`); - core14.info(`Container for artifact "${name}" successfully created. Starting upload of file(s)`); - const uploadResult = yield uploadHttpClient.uploadArtifactToFileContainer(response.fileContainerResourceUrl, uploadSpecification, options); - core14.info(`File upload process has finished. Finalizing the artifact upload`); - yield uploadHttpClient.patchArtifactSize(uploadResult.totalSize, name); - if (uploadResult.failedItems.length > 0) { - core14.info(`Upload finished. There were ${uploadResult.failedItems.length} items that failed to upload`); + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); } else { - core14.info(`Artifact has been finalized. All files have been successfully uploaded!`); + throw new Error("Destination already exists"); } - core14.info(` -The raw size of all the files that were specified for upload is ${uploadResult.totalSize} bytes -The size of all the files that were uploaded is ${uploadResult.uploadSize} bytes. This takes into account any gzip compression used to reduce the upload size, time and storage - -Note: The size of downloaded zips can differ significantly from the reported size. For more information see: https://github.com/actions/upload-artifact#zipped-artifact-downloads \r -`); - uploadResponse.artifactItems = uploadSpecification.map((item) => item.absoluteFilePath); - uploadResponse.size = uploadResult.uploadSize; - uploadResponse.failedItems = uploadResult.failedItems; } - return uploadResponse; - }); - } - downloadArtifact(name, path2, options) { - return __awaiter4(this, void 0, void 0, function* () { - const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); - const artifacts = yield downloadHttpClient.listArtifacts(); - if (artifacts.count === 0) { - throw new Error(`Unable to find any artifacts for the associated workflow`); + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); } - const artifactToDownload = artifacts.value.find((artifact2) => { - return artifact2.name === name; + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 }); - if (!artifactToDownload) { - throw new Error(`Unable to find an artifact with the name: ${name}`); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } } - const items = yield downloadHttpClient.getContainerItems(artifactToDownload.name, artifactToDownload.fileContainerResourceUrl); - if (!path2) { - path2 = (0, config_variables_1.getWorkSpaceDirectory)(); + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); + } } - path2 = (0, path_1.normalize)(path2); - path2 = (0, path_1.resolve)(path2); - const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path2, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); - if (downloadSpecification.filesToDownload.length === 0) { - core14.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`); - } else { - yield (0, utils_1.createDirectoriesForArtifact)(downloadSpecification.directoryStructure); - core14.info("Directory structure has been set up for the artifact"); - yield (0, utils_1.createEmptyFilesForArtifact)(downloadSpecification.emptyFilesToCreate); - yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload); + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; } - return { - artifactName: name, - downloadPath: downloadSpecification.rootDownloadLocation - }; - }); - } - downloadAllArtifacts(path2) { - return __awaiter4(this, void 0, void 0, function* () { - const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); - const response = []; - const artifacts = yield downloadHttpClient.listArtifacts(); - if (artifacts.count === 0) { - core14.info("Unable to find any artifacts for the associated workflow"); - return response; + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } } - if (!path2) { - path2 = (0, config_variables_1.getWorkSpaceDirectory)(); + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); } - path2 = (0, path_1.normalize)(path2); - path2 = (0, path_1.resolve)(path2); - let downloadedArtifacts = 0; - while (downloadedArtifacts < artifacts.count) { - const currentArtifactToDownload = artifacts.value[downloadedArtifacts]; - downloadedArtifacts += 1; - core14.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`); - const items = yield downloadHttpClient.getContainerItems(currentArtifactToDownload.name, currentArtifactToDownload.fileContainerResourceUrl); - const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path2, true); - if (downloadSpecification.filesToDownload.length === 0) { - core14.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`); - } else { - yield (0, utils_1.createDirectoriesForArtifact)(downloadSpecification.directoryStructure); - yield (0, utils_1.createEmptyFilesForArtifact)(downloadSpecification.emptyFilesToCreate); - yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload); + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); } - response.push({ - artifactName: currentArtifactToDownload.name, - downloadPath: downloadSpecification.rootDownloadLocation - }); } - return response; - }); - } - }; - exports2.DefaultArtifactClient = DefaultArtifactClient2; - } -}); - -// node_modules/@actions/artifact-legacy/lib/artifact-client.js -var require_artifact_client2 = __commonJS({ - "node_modules/@actions/artifact-legacy/lib/artifact-client.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; - var artifact_client_1 = require_artifact_client(); - function create3() { - return artifact_client_1.DefaultArtifactClient.create(); + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); } - exports2.create = create3; } }); @@ -112237,7 +113537,7 @@ var require_tool_cache = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; var core14 = __importStar4(require_core()); - var io6 = __importStar4(require_io()); + var io6 = __importStar4(require_io4()); var crypto = __importStar4(require("crypto")); var fs2 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); @@ -115138,12 +116438,12 @@ var core13 = __toESM(require_core()); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io()); +var io2 = __toESM(require_io2()); // src/util.ts var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); -var io = __toESM(require_io()); +var io = __toESM(require_io2()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -117986,7 +119286,7 @@ var actionsCache = __toESM(require_cache3()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io()); +var io3 = __toESM(require_io2()); // src/logging.ts var core8 = __toESM(require_core()); @@ -118261,7 +119561,7 @@ var core12 = __toESM(require_core()); var import_archiver = __toESM(require_archiver()); // src/analyze.ts -var io5 = __toESM(require_io()); +var io5 = __toESM(require_io2()); // src/autobuild.ts var core11 = __toESM(require_core()); @@ -118413,7 +119713,7 @@ var semver7 = __toESM(require_semver2()); // src/tar.ts var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io()); +var io4 = __toESM(require_io2()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); diff --git a/lib/start-proxy-action.js b/lib/start-proxy-action.js index 76a90c041b..a22f9949eb 100644 --- a/lib/start-proxy-action.js +++ b/lib/start-proxy-action.js @@ -18456,9 +18456,9 @@ var require_path_utils = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -18629,9 +18629,9 @@ var require_io_util = __commonJS({ } }); -// node_modules/@actions/io/lib/io.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -19816,6 +19816,427 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } }); +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs = __importStar4(require("fs")); + var path2 = __importStar4(require("path")); + _a = fs.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path2 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util2()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which4(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which4(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which4; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -22753,7 +23174,7 @@ var require_tool_cache = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; var core12 = __importStar4(require_core()); - var io4 = __importStar4(require_io()); + var io4 = __importStar4(require_io2()); var crypto = __importStar4(require("crypto")); var fs = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); @@ -46401,6 +46822,464 @@ var require_github = __commonJS({ } }); +// node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs = __importStar4(require("fs")); + var path2 = __importStar4(require("path")); + _a = fs.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + const result = yield fs.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield (0, exports2.stat)(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + function isDirectory(fsPath_1) { + return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); + return stats.isDirectory(); + }); + } + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield (0, exports2.readdir)(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + } +}); + +// node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which4; + exports2.findInPath = findInPath; + var assert_1 = require("assert"); + var path2 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util3()); + function cp(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + function mv(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + function which4(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which4(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // package.json var require_package = __commonJS({ "package.json"(exports2, module2) { @@ -46438,7 +47317,7 @@ var require_package = __commonJS({ "@actions/github": "^6.0.0", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", - "@actions/io": "^1.1.3", + "@actions/io": "^2.0.0", "@actions/tool-cache": "^2.0.2", "@octokit/plugin-retry": "^6.0.0", "@octokit/request-error": "^7.0.2", @@ -50771,255 +51650,676 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve2, reject) { - v = o[n](v), settle(resolve2, reject, v.done, v.value); - }); - }; - } - function settle(resolve2, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve2({ value: v2, done: d }); - }, reject); - } - }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); - }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - }; + var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve2, reject) { + v = o[n](v), settle(resolve2, reject, v.done, v.value); + }); + }; + } + function settle(resolve2, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve2({ value: v2, done: d }); + }, reject); + } + }; + var __await4 = exports2 && exports2.__await || function(v) { + return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + }; + var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DefaultGlobber = void 0; + var core12 = __importStar4(require_core()); + var fs = __importStar4(require("fs")); + var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + var path2 = __importStar4(require("path")); + var patternHelper = __importStar4(require_internal_pattern_helper()); + var internal_match_kind_1 = require_internal_match_kind(); + var internal_pattern_1 = require_internal_pattern(); + var internal_search_state_1 = require_internal_search_state(); + var IS_WINDOWS = process.platform === "win32"; + var DefaultGlobber = class _DefaultGlobber { + constructor(options) { + this.patterns = []; + this.searchPaths = []; + this.options = globOptionsHelper.getOptions(options); + } + getSearchPaths() { + return this.searchPaths.slice(); + } + glob() { + var e_1, _a; + return __awaiter4(this, void 0, void 0, function* () { + const result = []; + try { + for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { + const itemPath = _c.value; + result.push(itemPath); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + } finally { + if (e_1) throw e_1.error; + } + } + return result; + }); + } + globGenerator() { + return __asyncGenerator4(this, arguments, function* globGenerator_1() { + const options = globOptionsHelper.getOptions(this.options); + const patterns = []; + for (const pattern of this.patterns) { + patterns.push(pattern); + if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { + patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); + } + } + const stack = []; + for (const searchPath of patternHelper.getSearchPaths(patterns)) { + core12.debug(`Search path '${searchPath}'`); + try { + yield __await4(fs.promises.lstat(searchPath)); + } catch (err) { + if (err.code === "ENOENT") { + continue; + } + throw err; + } + stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + } + const traversalChain = []; + while (stack.length) { + const item = stack.pop(); + const match = patternHelper.match(patterns, item.path); + const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); + if (!match && !partialMatch) { + continue; + } + const stats = yield __await4( + _DefaultGlobber.stat(item, options, traversalChain) + // Broken symlink, or symlink cycle detected, or no longer exists + ); + if (!stats) { + continue; + } + if (stats.isDirectory()) { + if (match & internal_match_kind_1.MatchKind.Directory) { + yield yield __await4(item.path); + } else if (!partialMatch) { + continue; + } + const childLevel = item.level + 1; + const childItems = (yield __await4(fs.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path2.join(item.path, x), childLevel)); + stack.push(...childItems.reverse()); + } else if (match & internal_match_kind_1.MatchKind.File) { + yield yield __await4(item.path); + } + } + }); + } + /** + * Constructs a DefaultGlobber + */ + static create(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + const result = new _DefaultGlobber(options); + if (IS_WINDOWS) { + patterns = patterns.replace(/\r\n/g, "\n"); + patterns = patterns.replace(/\r/g, "\n"); + } + const lines = patterns.split("\n").map((x) => x.trim()); + for (const line of lines) { + if (!line || line.startsWith("#")) { + continue; + } else { + result.patterns.push(new internal_pattern_1.Pattern(line)); + } + } + result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); + return result; + }); + } + static stat(item, options, traversalChain) { + return __awaiter4(this, void 0, void 0, function* () { + let stats; + if (options.followSymbolicLinks) { + try { + stats = yield fs.promises.stat(item.path); + } catch (err) { + if (err.code === "ENOENT") { + if (options.omitBrokenSymbolicLinks) { + core12.debug(`Broken symlink '${item.path}'`); + return void 0; + } + throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); + } + throw err; + } + } else { + stats = yield fs.promises.lstat(item.path); + } + if (stats.isDirectory() && options.followSymbolicLinks) { + const realPath = yield fs.promises.realpath(item.path); + while (traversalChain.length >= item.level) { + traversalChain.pop(); + } + if (traversalChain.some((x) => x === realPath)) { + core12.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + return void 0; + } + traversalChain.push(realPath); + } + return stats; + }); + } + }; + exports2.DefaultGlobber = DefaultGlobber; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.create = void 0; + var internal_globber_1 = require_internal_globber(); + function create(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); + }); + } + exports2.create = create; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js +var require_io_util4 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs = __importStar4(require("fs")); + var path2 = __importStar4(require("path")); + _a = fs.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js +var require_io4 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultGlobber = void 0; - var core12 = __importStar4(require_core()); - var fs = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); var path2 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); - var internal_match_kind_1 = require_internal_match_kind(); - var internal_pattern_1 = require_internal_pattern(); - var internal_search_state_1 = require_internal_search_state(); - var IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class _DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); - } - glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { - const result = []; - try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); - } finally { - if (e_1) throw e_1.error; - } + var ioUtil = __importStar4(require_io_util4()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); } - return result; - }); - } - globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core12.debug(`Search path '${searchPath}'`); - try { - yield __await4(fs.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") { - continue; - } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - const stats = yield __await4( - _DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - if (!stats) { - continue; - } - if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); - } else if (!partialMatch) { - continue; - } - const childLevel = item.level + 1; - const childItems = (yield __await4(fs.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path2.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); } } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - const result = new _DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) { - if (!line || line.startsWith("#")) { - continue; + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which4(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which4(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); } else { - result.patterns.push(new internal_pattern_1.Pattern(line)); + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); } } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) { - try { - stats = yield fs.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core12.debug(`Broken symlink '${item.path}'`); - return void 0; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which4; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); } - } else { - stats = yield fs.promises.lstat(item.path); } - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs.promises.realpath(item.path); - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - if (traversalChain.some((x) => x === realPath)) { - core12.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; - } - traversalChain.push(realPath); + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; } - return stats; - }); - } - }; - exports2.DefaultGlobber = DefaultGlobber; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); } } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; - var internal_globber_1 = require_internal_globber(); - function create(patterns, options) { + } + function copyFile(srcFile, destFile, force) { return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } }); } - exports2.create = create; } }); @@ -52294,7 +53594,7 @@ var require_cacheUtils = __commonJS({ var core12 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob = __importStar4(require_glob()); - var io4 = __importStar4(require_io()); + var io4 = __importStar4(require_io4()); var crypto = __importStar4(require("crypto")); var fs = __importStar4(require("fs")); var path2 = __importStar4(require("path")); @@ -94841,7 +96141,7 @@ var require_tar = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createTar = exports2.extractTar = exports2.listTar = void 0; var exec_1 = require_exec(); - var io4 = __importStar4(require_io()); + var io4 = __importStar4(require_io4()); var fs_1 = require("fs"); var path2 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); @@ -95462,13 +96762,13 @@ var import_node_forge = __toESM(require_lib3()); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io()); +var io2 = __toESM(require_io3()); // src/util.ts var fsPromises = __toESM(require("fs/promises")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); -var io = __toESM(require_io()); +var io = __toESM(require_io3()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -98575,7 +99875,7 @@ var actionsCache = __toESM(require_cache3()); // src/git-utils.ts var core9 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io()); +var io3 = __toESM(require_io3()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; diff --git a/lib/upload-lib.js b/lib/upload-lib.js index 89cab1ee8d..bd363f7ffe 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -18456,9 +18456,9 @@ var require_path_utils = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -18629,9 +18629,9 @@ var require_io_util = __commonJS({ } }); -// node_modules/@actions/io/lib/io.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -26531,6 +26531,464 @@ var require_github = __commonJS({ } }); +// node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs12 = __importStar4(require("fs")); + var path11 = __importStar4(require("path")); + _a = fs12.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + const result = yield fs12.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs12.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield (0, exports2.stat)(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + function isDirectory(fsPath_1) { + return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); + return stats.isDirectory(); + }); + } + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path11.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path11.dirname(filePath); + const upperName = path11.basename(filePath).toUpperCase(); + for (const actualName of yield (0, exports2.readdir)(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path11.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + } +}); + +// node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which6; + exports2.findInPath = findInPath; + var assert_1 = require("assert"); + var path11 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util2()); + function cp(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path11.join(dest, path11.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path11.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + function mv(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path11.join(dest, path11.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path11.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + function which6(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path11.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path11.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path11.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path11.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -28498,7 +28956,7 @@ var require_package = __commonJS({ "@actions/github": "^6.0.0", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", - "@actions/io": "^1.1.3", + "@actions/io": "^2.0.0", "@actions/tool-cache": "^2.0.2", "@octokit/plugin-retry": "^6.0.0", "@octokit/request-error": "^7.0.2", @@ -31534,255 +31992,676 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve6, reject) { - v = o[n](v), settle(resolve6, reject, v.done, v.value); - }); - }; - } - function settle(resolve6, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve6({ value: v2, done: d }); - }, reject); - } - }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); - }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - }; + var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve6, reject) { + v = o[n](v), settle(resolve6, reject, v.done, v.value); + }); + }; + } + function settle(resolve6, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve6({ value: v2, done: d }); + }, reject); + } + }; + var __await4 = exports2 && exports2.__await || function(v) { + return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + }; + var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DefaultGlobber = void 0; + var core12 = __importStar4(require_core()); + var fs12 = __importStar4(require("fs")); + var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + var path11 = __importStar4(require("path")); + var patternHelper = __importStar4(require_internal_pattern_helper()); + var internal_match_kind_1 = require_internal_match_kind(); + var internal_pattern_1 = require_internal_pattern(); + var internal_search_state_1 = require_internal_search_state(); + var IS_WINDOWS = process.platform === "win32"; + var DefaultGlobber = class _DefaultGlobber { + constructor(options) { + this.patterns = []; + this.searchPaths = []; + this.options = globOptionsHelper.getOptions(options); + } + getSearchPaths() { + return this.searchPaths.slice(); + } + glob() { + var e_1, _a; + return __awaiter4(this, void 0, void 0, function* () { + const result = []; + try { + for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { + const itemPath = _c.value; + result.push(itemPath); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + } finally { + if (e_1) throw e_1.error; + } + } + return result; + }); + } + globGenerator() { + return __asyncGenerator4(this, arguments, function* globGenerator_1() { + const options = globOptionsHelper.getOptions(this.options); + const patterns = []; + for (const pattern of this.patterns) { + patterns.push(pattern); + if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { + patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); + } + } + const stack = []; + for (const searchPath of patternHelper.getSearchPaths(patterns)) { + core12.debug(`Search path '${searchPath}'`); + try { + yield __await4(fs12.promises.lstat(searchPath)); + } catch (err) { + if (err.code === "ENOENT") { + continue; + } + throw err; + } + stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + } + const traversalChain = []; + while (stack.length) { + const item = stack.pop(); + const match = patternHelper.match(patterns, item.path); + const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); + if (!match && !partialMatch) { + continue; + } + const stats = yield __await4( + _DefaultGlobber.stat(item, options, traversalChain) + // Broken symlink, or symlink cycle detected, or no longer exists + ); + if (!stats) { + continue; + } + if (stats.isDirectory()) { + if (match & internal_match_kind_1.MatchKind.Directory) { + yield yield __await4(item.path); + } else if (!partialMatch) { + continue; + } + const childLevel = item.level + 1; + const childItems = (yield __await4(fs12.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path11.join(item.path, x), childLevel)); + stack.push(...childItems.reverse()); + } else if (match & internal_match_kind_1.MatchKind.File) { + yield yield __await4(item.path); + } + } + }); + } + /** + * Constructs a DefaultGlobber + */ + static create(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + const result = new _DefaultGlobber(options); + if (IS_WINDOWS) { + patterns = patterns.replace(/\r\n/g, "\n"); + patterns = patterns.replace(/\r/g, "\n"); + } + const lines = patterns.split("\n").map((x) => x.trim()); + for (const line of lines) { + if (!line || line.startsWith("#")) { + continue; + } else { + result.patterns.push(new internal_pattern_1.Pattern(line)); + } + } + result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); + return result; + }); + } + static stat(item, options, traversalChain) { + return __awaiter4(this, void 0, void 0, function* () { + let stats; + if (options.followSymbolicLinks) { + try { + stats = yield fs12.promises.stat(item.path); + } catch (err) { + if (err.code === "ENOENT") { + if (options.omitBrokenSymbolicLinks) { + core12.debug(`Broken symlink '${item.path}'`); + return void 0; + } + throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); + } + throw err; + } + } else { + stats = yield fs12.promises.lstat(item.path); + } + if (stats.isDirectory() && options.followSymbolicLinks) { + const realPath = yield fs12.promises.realpath(item.path); + while (traversalChain.length >= item.level) { + traversalChain.pop(); + } + if (traversalChain.some((x) => x === realPath)) { + core12.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + return void 0; + } + traversalChain.push(realPath); + } + return stats; + }); + } + }; + exports2.DefaultGlobber = DefaultGlobber; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.create = void 0; + var internal_globber_1 = require_internal_globber(); + function create(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); + }); + } + exports2.create = create; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs12 = __importStar4(require("fs")); + var path11 = __importStar4(require("path")); + _a = fs12.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs12.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path11.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path11.dirname(filePath); + const upperName = path11.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path11.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultGlobber = void 0; - var core12 = __importStar4(require_core()); - var fs12 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); var path11 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); - var internal_match_kind_1 = require_internal_match_kind(); - var internal_pattern_1 = require_internal_pattern(); - var internal_search_state_1 = require_internal_search_state(); - var IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class _DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); - } - glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { - const result = []; - try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); - } finally { - if (e_1) throw e_1.error; - } + var ioUtil = __importStar4(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path11.join(dest, path11.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); } - return result; - }); - } - globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } + } else { + if (path11.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core12.debug(`Search path '${searchPath}'`); - try { - yield __await4(fs12.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") { - continue; - } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path11.join(dest, path11.basename(source)); + destExists = yield ioUtil.exists(dest); } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - const stats = yield __await4( - _DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - if (!stats) { - continue; - } - if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); - } else if (!partialMatch) { - continue; - } - const childLevel = item.level + 1; - const childItems = (yield __await4(fs12.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path11.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); } } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - const result = new _DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); + } + yield mkdirP(path11.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) { - if (!line || line.startsWith("#")) { - continue; + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); } else { - result.patterns.push(new internal_pattern_1.Pattern(line)); + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); } } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) { - try { - stats = yield fs12.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core12.debug(`Broken symlink '${item.path}'`); - return void 0; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path11.delimiter)) { + if (extension) { + extensions.push(extension); } - } else { - stats = yield fs12.promises.lstat(item.path); } - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs12.promises.realpath(item.path); - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - if (traversalChain.some((x) => x === realPath)) { - core12.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; - } - traversalChain.push(realPath); + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; } - return stats; - }); - } - }; - exports2.DefaultGlobber = DefaultGlobber; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + return []; + } + if (tool.includes(path11.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path11.delimiter)) { + if (p) { + directories.push(p); + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path11.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); } } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; - var internal_globber_1 = require_internal_globber(); - function create(patterns, options) { + } + function copyFile(srcFile, destFile, force) { return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } }); } - exports2.create = create; } }); @@ -33057,7 +33936,7 @@ var require_cacheUtils = __commonJS({ var core12 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob = __importStar4(require_glob()); - var io6 = __importStar4(require_io()); + var io6 = __importStar4(require_io3()); var crypto = __importStar4(require("crypto")); var fs12 = __importStar4(require("fs")); var path11 = __importStar4(require("path")); @@ -75604,7 +76483,7 @@ var require_tar = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createTar = exports2.extractTar = exports2.listTar = void 0; var exec_1 = require_exec(); - var io6 = __importStar4(require_io()); + var io6 = __importStar4(require_io3()); var fs_1 = require("fs"); var path11 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); @@ -76214,6 +77093,427 @@ var require_cache3 = __commonJS({ } }); +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs12 = __importStar4(require("fs")); + var path11 = __importStar4(require("path")); + _a = fs12.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs12.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path11.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path11.dirname(filePath); + const upperName = path11.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path11.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path11 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util4()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path11.join(dest, path11.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path11.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path11.join(dest, path11.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path11.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path11.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path11.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path11.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path11.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/@actions/tool-cache/lib/manifest.js var require_manifest = __commonJS({ "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { @@ -77221,7 +78521,7 @@ var require_tool_cache = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; var core12 = __importStar4(require_core()); - var io6 = __importStar4(require_io()); + var io6 = __importStar4(require_io4()); var crypto = __importStar4(require("crypto")); var fs12 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); @@ -81951,14 +83251,14 @@ var path2 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io()); +var io2 = __toESM(require_io2()); // src/util.ts var fs = __toESM(require("fs")); var path = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); -var io = __toESM(require_io()); +var io = __toESM(require_io2()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -85434,7 +86734,7 @@ var actionsCache = __toESM(require_cache3()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io()); +var io3 = __toESM(require_io2()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -86056,7 +87356,7 @@ var import_child_process = require("child_process"); var fs6 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io()); +var io4 = __toESM(require_io2()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); var MIN_REQUIRED_BSD_TAR_VERSION = "3.4.3"; @@ -88638,7 +89938,7 @@ async function addFingerprints(sarif, sourceRoot, logger) { // src/init.ts var toolrunner4 = __toESM(require_toolrunner()); -var io5 = __toESM(require_io()); +var io5 = __toESM(require_io2()); async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) { logger.startGroup("Setup CodeQL tools"); const { diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index 7f423b5a8d..dd361efcd3 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -18456,9 +18456,9 @@ var require_path_utils = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -18629,9 +18629,9 @@ var require_io_util = __commonJS({ } }); -// node_modules/@actions/io/lib/io.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -25234,6 +25234,464 @@ var require_github = __commonJS({ } }); +// node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs2 = __importStar4(require("fs")); + var path2 = __importStar4(require("path")); + _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + const result = yield fs2.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs2.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield (0, exports2.stat)(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + function isDirectory(fsPath_1) { + return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); + return stats.isDirectory(); + }); + } + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield (0, exports2.readdir)(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + } +}); + +// node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which6; + exports2.findInPath = findInPath; + var assert_1 = require("assert"); + var path2 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util2()); + function cp(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + function mv(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + function which6(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27201,7 +27659,7 @@ var require_package = __commonJS({ "@actions/github": "^6.0.0", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", - "@actions/io": "^1.1.3", + "@actions/io": "^2.0.0", "@actions/tool-cache": "^2.0.2", "@octokit/plugin-retry": "^6.0.0", "@octokit/request-error": "^7.0.2", @@ -105898,255 +106356,676 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve2, reject) { - v = o[n](v), settle(resolve2, reject, v.done, v.value); - }); - }; - } - function settle(resolve2, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve2({ value: v2, done: d }); - }, reject); - } - }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); - }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - }; + var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve2, reject) { + v = o[n](v), settle(resolve2, reject, v.done, v.value); + }); + }; + } + function settle(resolve2, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve2({ value: v2, done: d }); + }, reject); + } + }; + var __await4 = exports2 && exports2.__await || function(v) { + return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + }; + var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DefaultGlobber = void 0; + var core14 = __importStar4(require_core()); + var fs2 = __importStar4(require("fs")); + var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + var path2 = __importStar4(require("path")); + var patternHelper = __importStar4(require_internal_pattern_helper()); + var internal_match_kind_1 = require_internal_match_kind(); + var internal_pattern_1 = require_internal_pattern(); + var internal_search_state_1 = require_internal_search_state(); + var IS_WINDOWS = process.platform === "win32"; + var DefaultGlobber = class _DefaultGlobber { + constructor(options) { + this.patterns = []; + this.searchPaths = []; + this.options = globOptionsHelper.getOptions(options); + } + getSearchPaths() { + return this.searchPaths.slice(); + } + glob() { + var e_1, _a; + return __awaiter4(this, void 0, void 0, function* () { + const result = []; + try { + for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { + const itemPath = _c.value; + result.push(itemPath); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + } finally { + if (e_1) throw e_1.error; + } + } + return result; + }); + } + globGenerator() { + return __asyncGenerator4(this, arguments, function* globGenerator_1() { + const options = globOptionsHelper.getOptions(this.options); + const patterns = []; + for (const pattern of this.patterns) { + patterns.push(pattern); + if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { + patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); + } + } + const stack = []; + for (const searchPath of patternHelper.getSearchPaths(patterns)) { + core14.debug(`Search path '${searchPath}'`); + try { + yield __await4(fs2.promises.lstat(searchPath)); + } catch (err) { + if (err.code === "ENOENT") { + continue; + } + throw err; + } + stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + } + const traversalChain = []; + while (stack.length) { + const item = stack.pop(); + const match = patternHelper.match(patterns, item.path); + const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); + if (!match && !partialMatch) { + continue; + } + const stats = yield __await4( + _DefaultGlobber.stat(item, options, traversalChain) + // Broken symlink, or symlink cycle detected, or no longer exists + ); + if (!stats) { + continue; + } + if (stats.isDirectory()) { + if (match & internal_match_kind_1.MatchKind.Directory) { + yield yield __await4(item.path); + } else if (!partialMatch) { + continue; + } + const childLevel = item.level + 1; + const childItems = (yield __await4(fs2.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path2.join(item.path, x), childLevel)); + stack.push(...childItems.reverse()); + } else if (match & internal_match_kind_1.MatchKind.File) { + yield yield __await4(item.path); + } + } + }); + } + /** + * Constructs a DefaultGlobber + */ + static create(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + const result = new _DefaultGlobber(options); + if (IS_WINDOWS) { + patterns = patterns.replace(/\r\n/g, "\n"); + patterns = patterns.replace(/\r/g, "\n"); + } + const lines = patterns.split("\n").map((x) => x.trim()); + for (const line of lines) { + if (!line || line.startsWith("#")) { + continue; + } else { + result.patterns.push(new internal_pattern_1.Pattern(line)); + } + } + result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); + return result; + }); + } + static stat(item, options, traversalChain) { + return __awaiter4(this, void 0, void 0, function* () { + let stats; + if (options.followSymbolicLinks) { + try { + stats = yield fs2.promises.stat(item.path); + } catch (err) { + if (err.code === "ENOENT") { + if (options.omitBrokenSymbolicLinks) { + core14.debug(`Broken symlink '${item.path}'`); + return void 0; + } + throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); + } + throw err; + } + } else { + stats = yield fs2.promises.lstat(item.path); + } + if (stats.isDirectory() && options.followSymbolicLinks) { + const realPath = yield fs2.promises.realpath(item.path); + while (traversalChain.length >= item.level) { + traversalChain.pop(); + } + if (traversalChain.some((x) => x === realPath)) { + core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + return void 0; + } + traversalChain.push(realPath); + } + return stats; + }); + } + }; + exports2.DefaultGlobber = DefaultGlobber; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js +var require_glob2 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.create = void 0; + var internal_globber_1 = require_internal_globber(); + function create3(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); + }); + } + exports2.create = create3; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs2 = __importStar4(require("fs")); + var path2 = __importStar4(require("path")); + _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs2.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultGlobber = void 0; - var core14 = __importStar4(require_core()); - var fs2 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); var path2 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); - var internal_match_kind_1 = require_internal_match_kind(); - var internal_pattern_1 = require_internal_pattern(); - var internal_search_state_1 = require_internal_search_state(); - var IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class _DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); - } - glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { - const result = []; - try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); - } finally { - if (e_1) throw e_1.error; - } + var ioUtil = __importStar4(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); } - return result; - }); - } - globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core14.debug(`Search path '${searchPath}'`); - try { - yield __await4(fs2.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") { - continue; - } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - const stats = yield __await4( - _DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - if (!stats) { - continue; - } - if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); - } else if (!partialMatch) { - continue; - } - const childLevel = item.level + 1; - const childItems = (yield __await4(fs2.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path2.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); } } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - const result = new _DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) { - if (!line || line.startsWith("#")) { - continue; + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); } else { - result.patterns.push(new internal_pattern_1.Pattern(line)); + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); } } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) { - try { - stats = yield fs2.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core14.debug(`Broken symlink '${item.path}'`); - return void 0; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); } - } else { - stats = yield fs2.promises.lstat(item.path); } - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs2.promises.realpath(item.path); - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - if (traversalChain.some((x) => x === realPath)) { - core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; - } - traversalChain.push(realPath); + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; } - return stats; - }); - } - }; - exports2.DefaultGlobber = DefaultGlobber; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob2 = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); } } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; - var internal_globber_1 = require_internal_globber(); - function create3(patterns, options) { + } + function copyFile(srcFile, destFile, force) { return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } }); } - exports2.create = create3; } }); @@ -107421,7 +108300,7 @@ var require_cacheUtils = __commonJS({ var core14 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob2 = __importStar4(require_glob2()); - var io6 = __importStar4(require_io()); + var io6 = __importStar4(require_io3()); var crypto = __importStar4(require("crypto")); var fs2 = __importStar4(require("fs")); var path2 = __importStar4(require("path")); @@ -110620,7 +111499,7 @@ var require_tar2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createTar = exports2.extractTar = exports2.listTar = void 0; var exec_1 = require_exec(); - var io6 = __importStar4(require_io()); + var io6 = __importStar4(require_io3()); var fs_1 = require("fs"); var path2 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); @@ -111230,6 +112109,427 @@ var require_cache3 = __commonJS({ } }); +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs2 = __importStar4(require("fs")); + var path2 = __importStar4(require("path")); + _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs2.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path2.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path2.dirname(filePath); + const upperName = path2.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path2.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path2 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util4()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path2.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path2.join(dest, path2.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path2.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path2.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path2.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/@actions/tool-cache/lib/manifest.js var require_manifest = __commonJS({ "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { @@ -112237,7 +113537,7 @@ var require_tool_cache = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; var core14 = __importStar4(require_core()); - var io6 = __importStar4(require_io()); + var io6 = __importStar4(require_io4()); var crypto = __importStar4(require("crypto")); var fs2 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); @@ -115138,12 +116438,12 @@ var core13 = __toESM(require_core()); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io()); +var io2 = __toESM(require_io2()); // src/util.ts var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); -var io = __toESM(require_io()); +var io = __toESM(require_io2()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -117965,7 +119265,7 @@ var core12 = __toESM(require_core()); var import_archiver = __toESM(require_archiver()); // src/analyze.ts -var io5 = __toESM(require_io()); +var io5 = __toESM(require_io2()); // src/analyses.ts var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { @@ -118140,7 +119440,7 @@ var actionsCache = __toESM(require_cache3()); // src/git-utils.ts var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io()); +var io3 = __toESM(require_io2()); // src/logging.ts var core8 = __toESM(require_core()); @@ -118403,7 +119703,7 @@ var semver7 = __toESM(require_semver2()); // src/tar.ts var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io()); +var io4 = __toESM(require_io2()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index 68a126eb86..db4a464eb1 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -18456,9 +18456,9 @@ var require_path_utils = __commonJS({ } }); -// node_modules/@actions/io/lib/io-util.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js var require_io_util = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io-util.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -18629,9 +18629,9 @@ var require_io_util = __commonJS({ } }); -// node_modules/@actions/io/lib/io.js +// node_modules/@actions/exec/node_modules/@actions/io/lib/io.js var require_io = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { + "node_modules/@actions/exec/node_modules/@actions/io/lib/io.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -25234,6 +25234,464 @@ var require_github = __commonJS({ } }); +// node_modules/@actions/io/lib/io-util.js +var require_io_util2 = __commonJS({ + "node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + exports2.readlink = readlink; + exports2.exists = exists; + exports2.isDirectory = isDirectory; + exports2.isRooted = isRooted; + exports2.tryGetExecutablePath = tryGetExecutablePath; + exports2.getCmdPath = getCmdPath; + var fs13 = __importStar4(require("fs")); + var path12 = __importStar4(require("path")); + _a = fs13.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + function readlink(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + const result = yield fs13.promises.readlink(fsPath); + if (exports2.IS_WINDOWS && !result.endsWith("\\")) { + return `${result}\\`; + } + return result; + }); + } + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs13.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield (0, exports2.stat)(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + function isDirectory(fsPath_1) { + return __awaiter4(this, arguments, void 0, function* (fsPath, useStat = false) { + const stats = useStat ? yield (0, exports2.stat)(fsPath) : yield (0, exports2.lstat)(fsPath); + return stats.isDirectory(); + }); + } + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path12.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield (0, exports2.stat)(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path12.dirname(filePath); + const upperName = path12.basename(filePath).toUpperCase(); + for (const actualName of yield (0, exports2.readdir)(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path12.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && process.getgid !== void 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && process.getuid !== void 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + } +}); + +// node_modules/@actions/io/lib/io.js +var require_io2 = __commonJS({ + "node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding4(result, mod, k[i]); + } + __setModuleDefault4(result, mod); + return result; + }; + })(); + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.cp = cp; + exports2.mv = mv; + exports2.rmRF = rmRF; + exports2.mkdirP = mkdirP; + exports2.which = which6; + exports2.findInPath = findInPath; + var assert_1 = require("assert"); + var path12 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util2()); + function cp(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path12.join(dest, path12.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path12.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + function mv(source_1, dest_1) { + return __awaiter4(this, arguments, void 0, function* (source, dest, options = {}) { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path12.join(dest, path12.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path12.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + (0, assert_1.ok)(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + function which6(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path12.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path12.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path12.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path12.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/semver/internal/constants.js var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -27201,7 +27659,7 @@ var require_package = __commonJS({ "@actions/github": "^6.0.0", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", - "@actions/io": "^1.1.3", + "@actions/io": "^2.0.0", "@actions/tool-cache": "^2.0.2", "@octokit/plugin-retry": "^6.0.0", "@octokit/request-error": "^7.0.2", @@ -30237,255 +30695,676 @@ var require_internal_globber = __commonJS({ step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; - var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i); - function verb(n) { - i[n] = o[n] && function(v) { - return new Promise(function(resolve6, reject) { - v = o[n](v), settle(resolve6, reject, v.done, v.value); - }); - }; - } - function settle(resolve6, reject, d, v) { - Promise.resolve(v).then(function(v2) { - resolve6({ value: v2, done: d }); - }, reject); - } - }; - var __await4 = exports2 && exports2.__await || function(v) { - return this instanceof __await4 ? (this.v = v, this) : new __await4(v); - }; - var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var g = generator.apply(thisArg, _arguments || []), i, q = []; - return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { - return this; - }, i; - function verb(n) { - if (g[n]) i[n] = function(v) { - return new Promise(function(a, b) { - q.push([n, v, a, b]) > 1 || resume(n, v); - }); - }; - } - function resume(n, v) { - try { - step(g[n](v)); - } catch (e) { - settle(q[0][3], e); - } - } - function step(r) { - r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); - } - function fulfill(value) { - resume("next", value); - } - function reject(value) { - resume("throw", value); - } - function settle(f, v) { - if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); - } - }; + var __asyncValues4 = exports2 && exports2.__asyncValues || function(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i); + function verb(n) { + i[n] = o[n] && function(v) { + return new Promise(function(resolve6, reject) { + v = o[n](v), settle(resolve6, reject, v.done, v.value); + }); + }; + } + function settle(resolve6, reject, d, v) { + Promise.resolve(v).then(function(v2) { + resolve6({ value: v2, done: d }); + }, reject); + } + }; + var __await4 = exports2 && exports2.__await || function(v) { + return this instanceof __await4 ? (this.v = v, this) : new __await4(v); + }; + var __asyncGenerator4 = exports2 && exports2.__asyncGenerator || function(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() { + return this; + }, i; + function verb(n) { + if (g[n]) i[n] = function(v) { + return new Promise(function(a, b) { + q.push([n, v, a, b]) > 1 || resume(n, v); + }); + }; + } + function resume(n, v) { + try { + step(g[n](v)); + } catch (e) { + settle(q[0][3], e); + } + } + function step(r) { + r.value instanceof __await4 ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); + } + function fulfill(value) { + resume("next", value); + } + function reject(value) { + resume("throw", value); + } + function settle(f, v) { + if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); + } + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DefaultGlobber = void 0; + var core14 = __importStar4(require_core()); + var fs13 = __importStar4(require("fs")); + var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + var path12 = __importStar4(require("path")); + var patternHelper = __importStar4(require_internal_pattern_helper()); + var internal_match_kind_1 = require_internal_match_kind(); + var internal_pattern_1 = require_internal_pattern(); + var internal_search_state_1 = require_internal_search_state(); + var IS_WINDOWS = process.platform === "win32"; + var DefaultGlobber = class _DefaultGlobber { + constructor(options) { + this.patterns = []; + this.searchPaths = []; + this.options = globOptionsHelper.getOptions(options); + } + getSearchPaths() { + return this.searchPaths.slice(); + } + glob() { + var e_1, _a; + return __awaiter4(this, void 0, void 0, function* () { + const result = []; + try { + for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { + const itemPath = _c.value; + result.push(itemPath); + } + } catch (e_1_1) { + e_1 = { error: e_1_1 }; + } finally { + try { + if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); + } finally { + if (e_1) throw e_1.error; + } + } + return result; + }); + } + globGenerator() { + return __asyncGenerator4(this, arguments, function* globGenerator_1() { + const options = globOptionsHelper.getOptions(this.options); + const patterns = []; + for (const pattern of this.patterns) { + patterns.push(pattern); + if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { + patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); + } + } + const stack = []; + for (const searchPath of patternHelper.getSearchPaths(patterns)) { + core14.debug(`Search path '${searchPath}'`); + try { + yield __await4(fs13.promises.lstat(searchPath)); + } catch (err) { + if (err.code === "ENOENT") { + continue; + } + throw err; + } + stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + } + const traversalChain = []; + while (stack.length) { + const item = stack.pop(); + const match = patternHelper.match(patterns, item.path); + const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); + if (!match && !partialMatch) { + continue; + } + const stats = yield __await4( + _DefaultGlobber.stat(item, options, traversalChain) + // Broken symlink, or symlink cycle detected, or no longer exists + ); + if (!stats) { + continue; + } + if (stats.isDirectory()) { + if (match & internal_match_kind_1.MatchKind.Directory) { + yield yield __await4(item.path); + } else if (!partialMatch) { + continue; + } + const childLevel = item.level + 1; + const childItems = (yield __await4(fs13.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path12.join(item.path, x), childLevel)); + stack.push(...childItems.reverse()); + } else if (match & internal_match_kind_1.MatchKind.File) { + yield yield __await4(item.path); + } + } + }); + } + /** + * Constructs a DefaultGlobber + */ + static create(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + const result = new _DefaultGlobber(options); + if (IS_WINDOWS) { + patterns = patterns.replace(/\r\n/g, "\n"); + patterns = patterns.replace(/\r/g, "\n"); + } + const lines = patterns.split("\n").map((x) => x.trim()); + for (const line of lines) { + if (!line || line.startsWith("#")) { + continue; + } else { + result.patterns.push(new internal_pattern_1.Pattern(line)); + } + } + result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); + return result; + }); + } + static stat(item, options, traversalChain) { + return __awaiter4(this, void 0, void 0, function* () { + let stats; + if (options.followSymbolicLinks) { + try { + stats = yield fs13.promises.stat(item.path); + } catch (err) { + if (err.code === "ENOENT") { + if (options.omitBrokenSymbolicLinks) { + core14.debug(`Broken symlink '${item.path}'`); + return void 0; + } + throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); + } + throw err; + } + } else { + stats = yield fs13.promises.lstat(item.path); + } + if (stats.isDirectory() && options.followSymbolicLinks) { + const realPath = yield fs13.promises.realpath(item.path); + while (traversalChain.length >= item.level) { + traversalChain.pop(); + } + if (traversalChain.some((x) => x === realPath)) { + core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + return void 0; + } + traversalChain.push(realPath); + } + return stats; + }); + } + }; + exports2.DefaultGlobber = DefaultGlobber; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js +var require_glob = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { + "use strict"; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.create = void 0; + var internal_globber_1 = require_internal_globber(); + function create(patterns, options) { + return __awaiter4(this, void 0, void 0, function* () { + return yield internal_globber_1.DefaultGlobber.create(patterns, options); + }); + } + exports2.create = create; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js +var require_io_util3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs13 = __importStar4(require("fs")); + var path12 = __importStar4(require("path")); + _a = fs13.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs13.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path12.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path12.dirname(filePath); + const upperName = path12.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path12.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/cache/node_modules/@actions/io/lib/io.js +var require_io3 = __commonJS({ + "node_modules/@actions/cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DefaultGlobber = void 0; - var core14 = __importStar4(require_core()); - var fs13 = __importStar4(require("fs")); - var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); var path12 = __importStar4(require("path")); - var patternHelper = __importStar4(require_internal_pattern_helper()); - var internal_match_kind_1 = require_internal_match_kind(); - var internal_pattern_1 = require_internal_pattern(); - var internal_search_state_1 = require_internal_search_state(); - var IS_WINDOWS = process.platform === "win32"; - var DefaultGlobber = class _DefaultGlobber { - constructor(options) { - this.patterns = []; - this.searchPaths = []; - this.options = globOptionsHelper.getOptions(options); - } - getSearchPaths() { - return this.searchPaths.slice(); - } - glob() { - var e_1, _a; - return __awaiter4(this, void 0, void 0, function* () { - const result = []; - try { - for (var _b = __asyncValues4(this.globGenerator()), _c; _c = yield _b.next(), !_c.done; ) { - const itemPath = _c.value; - result.push(itemPath); - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (_c && !_c.done && (_a = _b.return)) yield _a.call(_b); - } finally { - if (e_1) throw e_1.error; - } + var ioUtil = __importStar4(require_io_util3()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path12.join(dest, path12.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); } - return result; - }); - } - globGenerator() { - return __asyncGenerator4(this, arguments, function* globGenerator_1() { - const options = globOptionsHelper.getOptions(this.options); - const patterns = []; - for (const pattern of this.patterns) { - patterns.push(pattern); - if (options.implicitDescendants && (pattern.trailingSeparator || pattern.segments[pattern.segments.length - 1] !== "**")) { - patterns.push(new internal_pattern_1.Pattern(pattern.negate, true, pattern.segments.concat("**"))); - } + } else { + if (path12.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); } - const stack = []; - for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core14.debug(`Search path '${searchPath}'`); - try { - yield __await4(fs13.promises.lstat(searchPath)); - } catch (err) { - if (err.code === "ENOENT") { - continue; - } - throw err; - } - stack.unshift(new internal_search_state_1.SearchState(searchPath, 1)); + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path12.join(dest, path12.basename(source)); + destExists = yield ioUtil.exists(dest); } - const traversalChain = []; - while (stack.length) { - const item = stack.pop(); - const match = patternHelper.match(patterns, item.path); - const partialMatch = !!match || patternHelper.partialMatch(patterns, item.path); - if (!match && !partialMatch) { - continue; - } - const stats = yield __await4( - _DefaultGlobber.stat(item, options, traversalChain) - // Broken symlink, or symlink cycle detected, or no longer exists - ); - if (!stats) { - continue; - } - if (stats.isDirectory()) { - if (match & internal_match_kind_1.MatchKind.Directory) { - yield yield __await4(item.path); - } else if (!partialMatch) { - continue; - } - const childLevel = item.level + 1; - const childItems = (yield __await4(fs13.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path12.join(item.path, x), childLevel)); - stack.push(...childItems.reverse()); - } else if (match & internal_match_kind_1.MatchKind.File) { - yield yield __await4(item.path); + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); } } - }); - } - /** - * Constructs a DefaultGlobber - */ - static create(patterns, options) { - return __awaiter4(this, void 0, void 0, function* () { - const result = new _DefaultGlobber(options); - if (IS_WINDOWS) { - patterns = patterns.replace(/\r\n/g, "\n"); - patterns = patterns.replace(/\r/g, "\n"); + } + yield mkdirP(path12.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); } - const lines = patterns.split("\n").map((x) => x.trim()); - for (const line of lines) { - if (!line || line.startsWith("#")) { - continue; + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); } else { - result.patterns.push(new internal_pattern_1.Pattern(line)); + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); } } - result.searchPaths.push(...patternHelper.getSearchPaths(result.patterns)); return result; - }); - } - static stat(item, options, traversalChain) { - return __awaiter4(this, void 0, void 0, function* () { - let stats; - if (options.followSymbolicLinks) { - try { - stats = yield fs13.promises.stat(item.path); - } catch (err) { - if (err.code === "ENOENT") { - if (options.omitBrokenSymbolicLinks) { - core14.debug(`Broken symlink '${item.path}'`); - return void 0; - } - throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); - } - throw err; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path12.delimiter)) { + if (extension) { + extensions.push(extension); } - } else { - stats = yield fs13.promises.lstat(item.path); } - if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs13.promises.realpath(item.path); - while (traversalChain.length >= item.level) { - traversalChain.pop(); - } - if (traversalChain.some((x) => x === realPath)) { - core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); - return void 0; - } - traversalChain.push(realPath); + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; } - return stats; - }); - } - }; - exports2.DefaultGlobber = DefaultGlobber; - } -}); - -// node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob = __commonJS({ - "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { - "use strict"; - var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve6) { - resolve6(value); - }); - } - return new (P || (P = Promise))(function(resolve6, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); + return []; + } + if (tool.includes(path12.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path12.delimiter)) { + if (p) { + directories.push(p); + } } } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path12.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); } } - function step(result) { - result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } } - step((generator = generator.apply(thisArg, _arguments || [])).next()); + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.create = void 0; - var internal_globber_1 = require_internal_globber(); - function create(patterns, options) { + } + function copyFile(srcFile, destFile, force) { return __awaiter4(this, void 0, void 0, function* () { - return yield internal_globber_1.DefaultGlobber.create(patterns, options); + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } }); } - exports2.create = create; } }); @@ -31760,7 +32639,7 @@ var require_cacheUtils = __commonJS({ var core14 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob = __importStar4(require_glob()); - var io6 = __importStar4(require_io()); + var io6 = __importStar4(require_io3()); var crypto = __importStar4(require("crypto")); var fs13 = __importStar4(require("fs")); var path12 = __importStar4(require("path")); @@ -74307,7 +75186,7 @@ var require_tar = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createTar = exports2.extractTar = exports2.listTar = void 0; var exec_1 = require_exec(); - var io6 = __importStar4(require_io()); + var io6 = __importStar4(require_io3()); var fs_1 = require("fs"); var path12 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); @@ -76214,6 +77093,427 @@ var require_lib4 = __commonJS({ } }); +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js +var require_io_util4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + var _a; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; + var fs13 = __importStar4(require("fs")); + var path12 = __importStar4(require("path")); + _a = fs13.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs13.constants.O_RDONLY; + function exists(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists; + function isDirectory(fsPath, useStat = false) { + return __awaiter4(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory; + function isRooted(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted; + function tryGetExecutablePath(filePath, extensions) { + return __awaiter4(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path12.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path12.dirname(filePath); + const upperName = path12.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path12.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js +var require_io4 = __commonJS({ + "node_modules/@actions/tool-cache/node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault4 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar4 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding4(result, mod, k); + } + __setModuleDefault4(result, mod); + return result; + }; + var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); + }); + } + return new (P || (P = Promise))(function(resolve6, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; + var assert_1 = require("assert"); + var path12 = __importStar4(require("path")); + var ioUtil = __importStar4(require_io_util4()); + function cp(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path12.join(dest, path12.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path12.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter4(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path12.join(dest, path12.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path12.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter4(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter4(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which6(tool, check) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which6(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which6; + function findInPath(tool) { + return __awaiter4(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path12.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path12.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path12.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path12.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter4(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile(srcFile, destFile, force) { + return __awaiter4(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + // node_modules/@actions/tool-cache/lib/manifest.js var require_manifest = __commonJS({ "node_modules/@actions/tool-cache/lib/manifest.js"(exports2, module2) { @@ -77221,7 +78521,7 @@ var require_tool_cache = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; var core14 = __importStar4(require_core()); - var io6 = __importStar4(require_io()); + var io6 = __importStar4(require_io4()); var crypto = __importStar4(require("crypto")); var fs13 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); @@ -81923,7 +83223,7 @@ var path2 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); -var io2 = __toESM(require_io()); +var io2 = __toESM(require_io2()); // src/util.ts var fs = __toESM(require("fs")); @@ -81931,7 +83231,7 @@ var fsPromises = __toESM(require("fs/promises")); var path = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); -var io = __toESM(require_io()); +var io = __toESM(require_io2()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -85214,7 +86514,7 @@ var actionsCache = __toESM(require_cache3()); // src/git-utils.ts var core6 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); -var io3 = __toESM(require_io()); +var io3 = __toESM(require_io2()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; @@ -86573,7 +87873,7 @@ var import_child_process = require("child_process"); var fs7 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); -var io4 = __toESM(require_io()); +var io4 = __toESM(require_io2()); var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); var MIN_REQUIRED_BSD_TAR_VERSION = "3.4.3"; @@ -89155,7 +90455,7 @@ async function addFingerprints(sarif, sourceRoot, logger) { // src/init.ts var toolrunner4 = __toESM(require_toolrunner()); -var io5 = __toESM(require_io()); +var io5 = __toESM(require_io2()); async function initCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) { logger.startGroup("Setup CodeQL tools"); const { diff --git a/package-lock.json b/package-lock.json index 4a9e3a2d1a..5ce7fe06fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@actions/github": "^6.0.0", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", - "@actions/io": "^1.1.3", + "@actions/io": "^2.0.0", "@actions/tool-cache": "^2.0.2", "@octokit/plugin-retry": "^6.0.0", "@octokit/request-error": "^7.0.2", @@ -242,6 +242,12 @@ "undici": "^5.25.4" } }, + "node_modules/@actions/cache/node_modules/@actions/io": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz", + "integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==", + "license": "MIT" + }, "node_modules/@actions/cache/node_modules/semver": { "version": "6.3.1", "license": "ISC", @@ -275,6 +281,12 @@ "@actions/io": "^1.0.1" } }, + "node_modules/@actions/exec/node_modules/@actions/io": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz", + "integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==", + "license": "MIT" + }, "node_modules/@actions/github": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/@actions/github/-/github-6.0.1.tgz", @@ -426,7 +438,9 @@ } }, "node_modules/@actions/io": { - "version": "1.1.3", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-2.0.0.tgz", + "integrity": "sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg==", "license": "MIT" }, "node_modules/@actions/tool-cache": { @@ -452,6 +466,12 @@ "undici": "^5.25.4" } }, + "node_modules/@actions/tool-cache/node_modules/@actions/io": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz", + "integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==", + "license": "MIT" + }, "node_modules/@ava/typescript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/@ava/typescript/-/typescript-6.0.0.tgz", diff --git a/package.json b/package.json index 11ac61b600..7a607760ed 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@actions/github": "^6.0.0", "@actions/glob": "^0.5.0", "@actions/http-client": "^3.0.0", - "@actions/io": "^1.1.3", + "@actions/io": "^2.0.0", "@actions/tool-cache": "^2.0.2", "@octokit/plugin-retry": "^6.0.0", "@octokit/request-error": "^7.0.2",