diff --git a/lib/entry-points.js b/lib/entry-points.js index b8479554ad..7877251922 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -1669,14 +1669,14 @@ var require_util = __commonJS({ } const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; let origin = url2.origin != null ? url2.origin : `${url2.protocol || ""}//${url2.hostname || ""}:${port}`; - let path30 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path31 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path30 && path30[0] !== "/") { - path30 = `/${path30}`; + if (path31 && path31[0] !== "/") { + path31 = `/${path31}`; } - return new URL(`${origin}${path30}`); + return new URL(`${origin}${path31}`); } if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); @@ -2497,9 +2497,9 @@ var require_diagnostics = __commonJS({ "undici:client:sendHeaders", (evt) => { const { - request: { method, path: path30, origin } + request: { method, path: path31, origin } } = evt; - debugLog("sending request to %s %s%s", method, origin, path30); + debugLog("sending request to %s %s%s", method, origin, path31); } ); } @@ -2517,14 +2517,14 @@ var require_diagnostics = __commonJS({ "undici:request:headers", (evt) => { const { - request: { method, path: path30, origin }, + request: { method, path: path31, origin }, response: { statusCode } } = evt; debugLog( "received response to %s %s%s - HTTP %d", method, origin, - path30, + path31, statusCode ); } @@ -2533,23 +2533,23 @@ var require_diagnostics = __commonJS({ "undici:request:trailers", (evt) => { const { - request: { method, path: path30, origin } + request: { method, path: path31, origin } } = evt; - debugLog("trailers received from %s %s%s", method, origin, path30); + debugLog("trailers received from %s %s%s", method, origin, path31); } ); diagnosticsChannel.subscribe( "undici:request:error", (evt) => { const { - request: { method, path: path30, origin }, + request: { method, path: path31, origin }, error: error3 } = evt; debugLog( "request to %s %s%s errored - %s", method, origin, - path30, + path31, error3.message ); } @@ -2664,7 +2664,7 @@ var require_request = __commonJS({ var kHandler = /* @__PURE__ */ Symbol("handler"); var Request = class { constructor(origin, { - path: path30, + path: path31, method, body, headers, @@ -2681,11 +2681,11 @@ var require_request = __commonJS({ maxRedirections, typeOfService }, handler2) { - if (typeof path30 !== "string") { + if (typeof path31 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path30[0] !== "/" && !(path30.startsWith("http://") || path30.startsWith("https://")) && method !== "CONNECT") { + } else if (path31[0] !== "/" && !(path31.startsWith("http://") || path31.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path30)) { + } else if (invalidPathRegex.test(path31)) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -2760,7 +2760,7 @@ var require_request = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? serializePathWithQuery(path30, query) : path30; + this.path = query ? serializePathWithQuery(path31, query) : path31; this.origin = origin; this.protocol = getProtocolFromUrlString(origin); this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; @@ -7985,7 +7985,7 @@ var require_client_h1 = __commonJS({ return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } function writeH1(client, request3) { - const { method, path: path30, host, upgrade, blocking, reset } = request3; + const { method, path: path31, host, upgrade, blocking, reset } = request3; let { body, headers, contentLength } = request3; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; if (util4.isFormDataLike(body)) { @@ -8063,7 +8063,7 @@ var require_client_h1 = __commonJS({ if (socket.setTypeOfService) { socket.setTypeOfService(request3.typeOfService); } - let header = `${method} ${path30} HTTP/1.1\r + let header = `${method} ${path31} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -8740,7 +8740,7 @@ var require_client_h2 = __commonJS({ const headersTimeout = request3.headersTimeout ?? client[kHeadersTimeout]; const bodyTimeout = request3.bodyTimeout ?? client[kBodyTimeout]; const session = client[kHTTP2Session]; - const { method, path: path30, host, upgrade, expectContinue, signal, protocol, headers: reqHeaders } = request3; + const { method, path: path31, host, upgrade, expectContinue, signal, protocol, headers: reqHeaders } = request3; let { body } = request3; if (upgrade != null && upgrade !== "websocket") { util4.errorRequest(client, request3, new InvalidArgumentError(`Custom upgrade "${upgrade}" not supported over HTTP/2`)); @@ -8809,7 +8809,7 @@ var require_client_h2 = __commonJS({ } headers[HTTP2_HEADER_METHOD] = "CONNECT"; headers[HTTP2_HEADER_PROTOCOL] = "websocket"; - headers[HTTP2_HEADER_PATH] = path30; + headers[HTTP2_HEADER_PATH] = path31; if (protocol === "ws:" || protocol === "wss:") { headers[HTTP2_HEADER_SCHEME] = protocol === "ws:" ? "http" : "https"; } else { @@ -8861,7 +8861,7 @@ var require_client_h2 = __commonJS({ stream2.setTimeout(headersTimeout); return true; } - headers[HTTP2_HEADER_PATH] = path30; + headers[HTTP2_HEADER_PATH] = path31; headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -11217,10 +11217,10 @@ var require_proxy_agent = __commonJS({ }; const { origin, - path: path30 = "/", + path: path31 = "/", headers = {} } = opts; - opts.path = origin + path30; + opts.path = origin + path31; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL(origin); headers.host = host; @@ -13380,20 +13380,20 @@ var require_mock_utils = __commonJS({ } return normalizedQp; } - function safeUrl(path30) { - if (typeof path30 !== "string") { - return path30; + function safeUrl(path31) { + if (typeof path31 !== "string") { + return path31; } - const pathSegments = path30.split("?", 3); + const pathSegments = path31.split("?", 3); if (pathSegments.length !== 2) { - return path30; + return path31; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path30, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path30); + function matchKey(mockDispatch2, { path: path31, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path31); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -13418,8 +13418,8 @@ var require_mock_utils = __commonJS({ const basePath = key.query ? serializePathWithQuery(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; const resolvedPathWithoutTrailingSlash = removeTrailingSlash(resolvedPath); - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path30, ignoreTrailingSlash }) => { - return ignoreTrailingSlash ? matchValue(removeTrailingSlash(safeUrl(path30)), resolvedPathWithoutTrailingSlash) : matchValue(safeUrl(path30), resolvedPath); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path31, ignoreTrailingSlash }) => { + return ignoreTrailingSlash ? matchValue(removeTrailingSlash(safeUrl(path31)), resolvedPathWithoutTrailingSlash) : matchValue(safeUrl(path31), resolvedPath); }); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); @@ -13458,19 +13458,19 @@ var require_mock_utils = __commonJS({ mockDispatches.splice(index2, 1); } } - function removeTrailingSlash(path30) { - while (path30.endsWith("/")) { - path30 = path30.slice(0, -1); + function removeTrailingSlash(path31) { + while (path31.endsWith("/")) { + path31 = path31.slice(0, -1); } - if (path30.length === 0) { - path30 = "/"; + if (path31.length === 0) { + path31 = "/"; } - return path30; + return path31; } function buildKey(opts) { - const { path: path30, method, body, headers, query } = opts; + const { path: path31, method, body, headers, query } = opts; return { - path: path30, + path: path31, method, body, headers, @@ -14160,10 +14160,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path30, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path31, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path30, + Path: path31, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -14245,9 +14245,9 @@ var require_mock_agent = __commonJS({ const acceptNonStandardSearchParameters = this[kMockAgentAcceptsNonStandardSearchParameters]; const dispatchOpts = { ...opts }; if (acceptNonStandardSearchParameters && dispatchOpts.path) { - const [path30, searchParams] = dispatchOpts.path.split("?"); + const [path31, searchParams] = dispatchOpts.path.split("?"); const normalizedSearchParams = normalizeSearchParams(searchParams, acceptNonStandardSearchParameters); - dispatchOpts.path = `${path30}?${normalizedSearchParams}`; + dispatchOpts.path = `${path31}?${normalizedSearchParams}`; } return this[kAgent].dispatch(dispatchOpts, handler2); } @@ -14648,12 +14648,12 @@ var require_snapshot_recorder = __commonJS({ * @return {Promise} - Resolves when snapshots are loaded */ async loadSnapshots(filePath) { - const path30 = filePath || this.#snapshotPath; - if (!path30) { + const path31 = filePath || this.#snapshotPath; + if (!path31) { throw new InvalidArgumentError("Snapshot path is required"); } try { - const data = await readFile(resolve15(path30), "utf8"); + const data = await readFile(resolve15(path31), "utf8"); const parsed = JSON.parse(data); if (Array.isArray(parsed)) { this.#snapshots.clear(); @@ -14667,7 +14667,7 @@ var require_snapshot_recorder = __commonJS({ if (error3.code === "ENOENT") { this.#snapshots.clear(); } else { - throw new UndiciError(`Failed to load snapshots from ${path30}`, { cause: error3 }); + throw new UndiciError(`Failed to load snapshots from ${path31}`, { cause: error3 }); } } } @@ -14678,11 +14678,11 @@ var require_snapshot_recorder = __commonJS({ * @returns {Promise} - Resolves when snapshots are saved */ async saveSnapshots(filePath) { - const path30 = filePath || this.#snapshotPath; - if (!path30) { + const path31 = filePath || this.#snapshotPath; + if (!path31) { throw new InvalidArgumentError("Snapshot path is required"); } - const resolvedPath = resolve15(path30); + const resolvedPath = resolve15(path31); await mkdir(dirname6(resolvedPath), { recursive: true }); const data = Array.from(this.#snapshots.entries()).map(([hash2, snapshot]) => ({ hash: hash2, @@ -15319,15 +15319,15 @@ var require_redirect_handler = __commonJS({ } this.history[kRedirectCacheControl].push(headers["cache-control"]); const { origin, pathname, search } = util4.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path30 = search ? `${pathname}${search}` : pathname; - const redirectUrlString = `${origin}${path30}`; + const path31 = search ? `${pathname}${search}` : pathname; + const redirectUrlString = `${origin}${path31}`; for (const historyUrl of this.history) { if (historyUrl.toString() === redirectUrlString) { throw new InvalidArgumentError(`Redirect loop detected. Cannot redirect to ${origin}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`); } } this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path30; + this.opts.path = path31; this.opts.origin = origin; this.opts.query = null; } @@ -17095,10 +17095,10 @@ var require_cache_handler = __commonJS({ } return locationUrl.pathname + locationUrl.search; } - function deleteCachedUri(store, cacheKey3, path30) { + function deleteCachedUri(store, cacheKey3, path31) { deleteCachedValue(store, { ...cacheKey3, - path: path30 + path: path31 }); for (let i = 0; i < util4.safeHTTPMethods.length; i++) { const method = util4.safeHTTPMethods[i]; @@ -17106,7 +17106,7 @@ var require_cache_handler = __commonJS({ deleteCachedValue(store, { ...cacheKey3, method, - path: path30 + path: path31 }); } } @@ -17117,9 +17117,9 @@ var require_cache_handler = __commonJS({ } const values = Array.isArray(headerValue) ? headerValue : [headerValue]; for (let i = 0; i < values.length; i++) { - const path30 = getSameOriginPath(cacheKey3, values[i]); - if (path30 !== void 0) { - deleteCachedUri(store, cacheKey3, path30); + const path31 = getSameOriginPath(cacheKey3, values[i]); + if (path31 !== void 0) { + deleteCachedUri(store, cacheKey3, path31); } } } @@ -22330,11 +22330,11 @@ var require_fetch = __commonJS({ function dispatch({ body }) { const url2 = requestCurrentURL(request3); const agent = fetchParams.controller.dispatcher; - const path30 = url2.pathname + url2.search; + const path31 = url2.pathname + url2.search; const hasTrailingQuestionMark = url2.search.length === 0 && url2.href[url2.href.length - url2.hash.length - 1] === "?"; return new Promise((resolve15, reject) => agent.dispatch( { - path: hasTrailingQuestionMark ? `${path30}?` : path30, + path: hasTrailingQuestionMark ? `${path31}?` : path31, origin: url2.origin, method: request3.method, body: agent.isMockActive ? request3.body && (request3.body.source || request3.body.stream) : body, @@ -23281,9 +23281,9 @@ var require_util4 = __commonJS({ } } } - function validateCookiePath(path30) { - for (let i = 0; i < path30.length; ++i) { - const code = path30.charCodeAt(i); + function validateCookiePath(path31) { + for (let i = 0; i < path31.length; ++i) { + const code = path31.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code > 126 || // exclude DEL and non-ascii code === 59) { @@ -26719,11 +26719,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path30 = opts.path; + let path31 = opts.path; if (!opts.path.startsWith("/")) { - path30 = `/${path30}`; + path31 = `/${path31}`; } - url2 = new URL(util4.parseOrigin(url2).origin + path30); + url2 = new URL(util4.parseOrigin(url2).origin + path31); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -28064,7 +28064,7 @@ var require_path_utils = __commonJS({ exports2.toPosixPath = toPosixPath; exports2.toWin32Path = toWin32Path; exports2.toPlatformPath = toPlatformPath; - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -28072,7 +28072,7 @@ var require_path_utils = __commonJS({ return pth.replace(/[/]/g, "\\"); } function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path30.sep); + return pth.replace(/[/\\]/g, path31.sep); } } }); @@ -28155,7 +28155,7 @@ var require_io_util = __commonJS({ exports2.tryGetExecutablePath = tryGetExecutablePath; exports2.getCmdPath = getCmdPath; var fs34 = __importStar2(require("fs")); - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); _a6 = fs34.promises, exports2.chmod = _a6.chmod, exports2.copyFile = _a6.copyFile, exports2.lstat = _a6.lstat, exports2.mkdir = _a6.mkdir, exports2.open = _a6.open, exports2.readdir = _a6.readdir, exports2.rename = _a6.rename, exports2.rm = _a6.rm, exports2.rmdir = _a6.rmdir, exports2.stat = _a6.stat, exports2.symlink = _a6.symlink, exports2.unlink = _a6.unlink; exports2.IS_WINDOWS = process.platform === "win32"; function readlink(fsPath) { @@ -28210,7 +28210,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path30.extname(filePath).toUpperCase(); + const upperExt = path31.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -28234,11 +28234,11 @@ var require_io_util = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path30.dirname(filePath); - const upperName = path30.basename(filePath).toUpperCase(); + const directory = path31.dirname(filePath); + const upperName = path31.basename(filePath).toUpperCase(); for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path30.join(directory, actualName); + filePath = path31.join(directory, actualName); break; } } @@ -28350,7 +28350,7 @@ var require_io = __commonJS({ exports2.which = which10; exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); var ioUtil = __importStar2(require_io_util()); function cp(source_1, dest_1) { return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { @@ -28359,7 +28359,7 @@ var require_io = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path30.join(dest, path30.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path31.join(dest, path31.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -28371,7 +28371,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path30.relative(source, newDest) === "") { + if (path31.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile2(source, newDest, force); @@ -28383,7 +28383,7 @@ var require_io = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path30.join(dest, path30.basename(source)); + dest = path31.join(dest, path31.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -28394,7 +28394,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path30.dirname(dest)); + yield mkdirP(path31.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -28453,7 +28453,7 @@ var require_io = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path30.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path31.delimiter)) { if (extension) { extensions.push(extension); } @@ -28466,12 +28466,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path30.sep)) { + if (tool.includes(path31.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path30.delimiter)) { + for (const p of process.env.PATH.split(path31.delimiter)) { if (p) { directories.push(p); } @@ -28479,7 +28479,7 @@ var require_io = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path30.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path31.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -28609,7 +28609,7 @@ var require_toolrunner = __commonJS({ var os8 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); var io10 = __importStar2(require_io()); var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); @@ -28824,7 +28824,7 @@ var require_toolrunner = __commonJS({ exec() { return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { - this.toolPath = path30.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path31.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io10.which(this.toolPath, true); return new Promise((resolve15, reject) => __awaiter2(this, void 0, void 0, function* () { @@ -29377,7 +29377,7 @@ var require_core = __commonJS({ var file_command_1 = require_file_command(); var utils_1 = require_utils(); var os8 = __importStar2(require("os")); - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -29403,7 +29403,7 @@ var require_core = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path30.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path31.delimiter}${process.env["PATH"]}`; } function getInput2(name, options) { const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; @@ -29540,8 +29540,8 @@ var require_context = __commonJS({ if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); } else { - const path30 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path30} does not exist${os_1.EOL}`); + const path31 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path31} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -37510,14 +37510,14 @@ var require_light = __commonJS({ var require_helpers = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { "use strict"; - var ValidationError = exports2.ValidationError = function ValidationError2(message, instance8, schema, path30, name, argument) { - if (Array.isArray(path30)) { - this.path = path30; - this.property = path30.reduce(function(sum, item) { + var ValidationError = exports2.ValidationError = function ValidationError2(message, instance8, schema, path31, name, argument) { + if (Array.isArray(path31)) { + this.path = path31; + this.property = path31.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path30 !== void 0) { - this.property = path30; + } else if (path31 !== void 0) { + this.property = path31; } if (message) { this.message = message; @@ -37610,16 +37610,16 @@ var require_helpers = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema, options, path30, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema, options, path31, base, schemas) { this.schema = schema; this.options = options; - if (Array.isArray(path30)) { - this.path = path30; - this.propertyPath = path30.reduce(function(sum, item) { + if (Array.isArray(path31)) { + this.path = path31; + this.propertyPath = path31.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path30; + this.propertyPath = path31; } this.base = base; this.schemas = schemas; @@ -37628,10 +37628,10 @@ var require_helpers = __commonJS({ return (() => resolveUrl(this.base, target))(); }; SchemaContext.prototype.makeChild = function makeChild(schema, propertyName) { - var path30 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path31 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); var id = schema.$id || schema.id; let base = (() => resolveUrl(this.base, id || ""))(); - var ctx = new SchemaContext(schema, this.options, path30, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema, this.options, path31, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema; } @@ -39092,7 +39092,7 @@ var require_internal_path_helper = __commonJS({ exports2.hasRoot = hasRoot; exports2.normalizeSeparators = normalizeSeparators; exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname6(p) { @@ -39100,7 +39100,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path30.dirname(p); + let result = path31.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -39137,7 +39137,7 @@ var require_internal_path_helper = __commonJS({ (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { - root += path30.sep; + root += path31.sep; } return root + itemPath; } @@ -39171,10 +39171,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path30.sep)) { + if (!p.endsWith(path31.sep)) { return p; } - if (p === path30.sep) { + if (p === path31.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -39633,7 +39633,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch2; minimatch2.Minimatch = Minimatch2; - var path30 = (function() { + var path31 = (function() { try { return require("path"); } catch (e) { @@ -39641,7 +39641,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch2.sep = path30.sep; + minimatch2.sep = path31.sep; var GLOBSTAR2 = minimatch2.GLOBSTAR = Minimatch2.GLOBSTAR = {}; var expand3 = require_brace_expansion(); var plTypes = { @@ -39730,8 +39730,8 @@ var require_minimatch = __commonJS({ assertValidPattern2(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path30.sep !== "/") { - pattern = pattern.split(path30.sep).join("/"); + if (!options.allowWindowsEscape && path31.sep !== "/") { + pattern = pattern.split(path31.sep).join("/"); } this.options = options; this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200; @@ -40102,8 +40102,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path30.sep !== "/") { - f = f.split(path30.sep).join("/"); + if (path31.sep !== "/") { + f = f.split(path31.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -40346,7 +40346,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -40361,12 +40361,12 @@ var require_internal_path = __commonJS({ (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path30.sep); + this.segments = itemPath.split(path31.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename2 = path30.basename(remaining); + const basename2 = path31.basename(remaining); this.segments.unshift(basename2); remaining = dir; dir = pathHelper.dirname(remaining); @@ -40384,7 +40384,7 @@ var require_internal_path = __commonJS({ (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - (0, assert_1.default)(!segment.includes(path30.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path31.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -40395,12 +40395,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path30.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path31.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path30.sep; + result += path31.sep; } result += this.segments[i]; } @@ -40458,7 +40458,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os8 = __importStar2(require("os")); - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); @@ -40487,7 +40487,7 @@ var require_internal_pattern = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir2); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path30.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path31.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -40511,8 +40511,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path30.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path30.sep}`; + if (!itemPath.endsWith(path31.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path31.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -40547,9 +40547,9 @@ var require_internal_pattern = __commonJS({ (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path30.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path31.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path30.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path31.sep}`)) { homedir2 = homedir2 || os8.homedir(); (0, assert_1.default)(homedir2, "Unable to determine HOME directory"); (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`); @@ -40633,8 +40633,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path30, level) { - this.path = path30; + constructor(path31, level) { + this.path = path31; this.level = level; } }; @@ -40778,7 +40778,7 @@ var require_internal_globber = __commonJS({ var core29 = __importStar2(require_core()); var fs34 = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); @@ -40854,7 +40854,7 @@ var require_internal_globber = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path30.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path31.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -40864,7 +40864,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await2(fs34.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path30.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs34.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path31.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match2 & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); @@ -41026,7 +41026,7 @@ var require_internal_hash_files = __commonJS({ var fs34 = __importStar2(require("fs")); var stream2 = __importStar2(require("stream")); var util4 = __importStar2(require("util")); - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); function hashFiles2(globber_1, currentWorkspace_1) { return __awaiter2(this, arguments, void 0, function* (globber, currentWorkspace, verbose = false) { var _a6, e_1, _b2, _c2; @@ -41042,7 +41042,7 @@ var require_internal_hash_files = __commonJS({ _e2 = false; const file = _c2; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path30.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path31.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } @@ -42429,7 +42429,7 @@ var require_cacheUtils = __commonJS({ var io10 = __importStar2(require_io()); var crypto3 = __importStar2(require("crypto")); var fs34 = __importStar2(require("fs")); - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); var semver13 = __importStar2(require_semver3()); var util4 = __importStar2(require("util")); var constants_1 = require_constants7(); @@ -42449,9 +42449,9 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path30.join(baseLocation, "actions", "temp"); + tempDirectory = path31.join(baseLocation, "actions", "temp"); } - const dest = path30.join(tempDirectory, crypto3.randomUUID()); + const dest = path31.join(tempDirectory, crypto3.randomUUID()); yield io10.mkdirP(dest); return dest; }); @@ -42473,7 +42473,7 @@ var require_cacheUtils = __commonJS({ _c2 = _g2.value; _e2 = false; const file = _c2; - const relativeFile = path30.relative(workspace, file).replace(new RegExp(`\\${path30.sep}`, "g"), "/"); + const relativeFile = path31.relative(workspace, file).replace(new RegExp(`\\${path31.sep}`, "g"), "/"); core29.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -48241,8 +48241,8 @@ var require_getClient = __commonJS({ const noDefaultAcceptHeader = clientOptions.internal?.noDefaultAcceptHeader ?? false; const { allowInsecureConnection, httpClient } = clientOptions; const endpointUrl = clientOptions.endpoint ?? endpoint2; - const client = (path30, ...args) => { - const getUrl = (requestOptions) => (0, import_urlHelpers.buildRequestUrl)(endpointUrl, path30, args, { allowInsecureConnection, ...requestOptions }); + const client = (path31, ...args) => { + const getUrl = (requestOptions) => (0, import_urlHelpers.buildRequestUrl)(endpointUrl, path31, args, { allowInsecureConnection, ...requestOptions }); return { get: (requestOptions = {}) => { return buildOperation( @@ -49827,13 +49827,13 @@ function __disposeResources(env) { } return next(); } -function __rewriteRelativeImportExtension(path30, preserveJsx) { - if (typeof path30 === "string" && /^\.\.?\//.test(path30)) { - return path30.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext2, cm) { +function __rewriteRelativeImportExtension(path31, preserveJsx) { + if (typeof path31 === "string" && /^\.\.?\//.test(path31)) { + return path31.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext2, cm) { return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext2 || !cm) ? m : d + ext2 + "." + cm.toLowerCase() + "js"; }); } - return path30; + return path31; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -53471,15 +53471,15 @@ var require_urlHelpers2 = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path30 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path30.startsWith("/")) { - path30 = path30.substring(1); + let path31 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path31.startsWith("/")) { + path31 = path31.substring(1); } - if (isAbsoluteUrl(path30)) { - requestUrl = path30; + if (isAbsoluteUrl(path31)) { + requestUrl = path31; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path30); + requestUrl = appendPath(requestUrl, path31); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -53525,9 +53525,9 @@ var require_urlHelpers2 = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path30 = pathToAppend.substring(0, searchStart); + const path31 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path30; + newPath = newPath + path31; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -56907,11 +56907,11 @@ var require_crc64 = __commonJS({ throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)"); } var scriptDirectory = ""; - function locateFile(path30) { + function locateFile(path31) { if (Module["locateFile"]) { - return Module["locateFile"](path30, scriptDirectory); + return Module["locateFile"](path31, scriptDirectory); } - return scriptDirectory + path30; + return scriptDirectory + path31; } var read_, readAsync, readBinary, setWindowTitle; function logExceptionOnExit(e) { @@ -60393,10 +60393,10 @@ var require_utils_common = __commonJS({ var import_constants5 = require_constants10(); function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path30 = urlParsed.pathname; - path30 = path30 || "/"; - path30 = escape3(path30); - urlParsed.pathname = path30; + let path31 = urlParsed.pathname; + path31 = path31 || "/"; + path31 = escape3(path31); + urlParsed.pathname = path31; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -60483,9 +60483,9 @@ var require_utils_common = __commonJS({ } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path30 = urlParsed.pathname; - path30 = path30 ? path30.endsWith("/") ? `${path30}${name}` : `${path30}/${name}` : name; - urlParsed.pathname = path30; + let path31 = urlParsed.pathname; + path31 = path31 ? path31.endsWith("/") ? `${path31}${name}` : `${path31}/${name}` : name; + urlParsed.pathname = path31; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -61278,9 +61278,9 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ * @param request - */ getCanonicalizedResourceString(request3) { - const path30 = (0, import_utils_common.getURLPath)(request3.url) || "/"; + const path31 = (0, import_utils_common.getURLPath)(request3.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path30}`; + canonicalizedResourceString += `/${this.factory.accountName}${path31}`; const queries = (0, import_utils_common.getURLQueries)(request3.url); const lowercaseQueries = {}; if (queries) { @@ -62071,9 +62071,9 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request3) { - const path30 = (0, import_utils_common.getURLPath)(request3.url) || "/"; + const path31 = (0, import_utils_common.getURLPath)(request3.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path30}`; + canonicalizedResourceString += `/${options.accountName}${path31}`; const queries = (0, import_utils_common.getURLQueries)(request3.url); const lowercaseQueries = {}; if (queries) { @@ -77814,10 +77814,10 @@ var require_utils_common2 = __commonJS({ ]; function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path30 = urlParsed.pathname; - path30 = path30 || "/"; - path30 = escape3(path30); - urlParsed.pathname = path30; + let path31 = urlParsed.pathname; + path31 = path31 || "/"; + path31 = escape3(path31); + urlParsed.pathname = path31; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -77904,9 +77904,9 @@ var require_utils_common2 = __commonJS({ } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path30 = urlParsed.pathname; - path30 = path30 ? path30.endsWith("/") ? `${path30}${name}` : `${path30}/${name}` : name; - urlParsed.pathname = path30; + let path31 = urlParsed.pathname; + path31 = path31 ? path31.endsWith("/") ? `${path31}${name}` : `${path31}/${name}` : name; + urlParsed.pathname = path31; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -103327,8 +103327,8 @@ var require_BlobBatch = __commonJS({ if (this.operationCount >= import_constants5.BATCH_MAX_REQUEST) { throw new RangeError(`Cannot exceed ${import_constants5.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path30 = (0, import_utils_common.getURLPath)(subRequest.url); - if (!path30 || path30 === "") { + const path31 = (0, import_utils_common.getURLPath)(subRequest.url); + if (!path31 || path31 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -103425,8 +103425,8 @@ var require_BlobBatchClient = __commonJS({ pipeline2 = (0, import_Pipeline.newPipeline)(credentialOrPipeline, options); } const storageClientContext = new import_StorageContextClient.StorageContextClient(url2, (0, import_Pipeline.getCoreClientOptions)(pipeline2)); - const path30 = (0, import_utils_common.getURLPath)(url2); - if (path30 && path30 !== "/") { + const path31 = (0, import_utils_common.getURLPath)(url2); + if (path31 && path31 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -113307,7 +113307,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io10 = __importStar2(require_io()); var fs_1 = require("fs"); - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; @@ -113353,13 +113353,13 @@ var require_tar = __commonJS({ const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (type) { case "create": - args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path30.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path30.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path30.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path31.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path31.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path31.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path30.sep}`, "g"), "/"), "-P", "-C", BSD_TAR_ZSTD ? quoteAbsolutePath(workingDirectory) : workingDirectory.replace(new RegExp(`\\${path30.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path31.sep}`, "g"), "/"), "-P", "-C", BSD_TAR_ZSTD ? quoteAbsolutePath(workingDirectory) : workingDirectory.replace(new RegExp(`\\${path31.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path30.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path31.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -113398,7 +113398,7 @@ var require_tar = __commonJS({ return (_a6 = process.env["GITHUB_WORKSPACE"]) !== null && _a6 !== void 0 ? _a6 : process.cwd(); } function quoteAbsolutePath(filePath) { - return `"${path30.resolve(filePath).replace(new RegExp(`\\${path30.sep}`, "g"), "/")}"`; + return `"${path31.resolve(filePath).replace(new RegExp(`\\${path31.sep}`, "g"), "/")}"`; } function getDecompressionProgram(tarPath, compressionMethod, archivePath) { return __awaiter2(this, void 0, void 0, function* () { @@ -113428,7 +113428,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path30.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path31.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -113437,7 +113437,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path30.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path31.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -113490,7 +113490,7 @@ var require_tar = __commonJS({ } function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path30.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path31.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const { commands } = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -113572,7 +113572,7 @@ var require_cache6 = __commonJS({ exports2.restoreCache = restoreCache5; exports2.saveCache = saveCache5; var core29 = __importStar2(require_core()); - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); @@ -113702,7 +113702,7 @@ var require_cache6 = __commonJS({ core29.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path30.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path31.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core29.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core29.isDebug()) { @@ -113781,7 +113781,7 @@ var require_cache6 = __commonJS({ core29.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path30.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path31.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core29.debug(`Archive path: ${archivePath}`); core29.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -113849,7 +113849,7 @@ var require_cache6 = __commonJS({ throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path30.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path31.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core29.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -113920,7 +113920,7 @@ var require_cache6 = __commonJS({ throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path30.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path31.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core29.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -114353,7 +114353,7 @@ var require_tool_cache = __commonJS({ var fs34 = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os8 = __importStar2(require("os")); - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver13 = __importStar2(require_semver2()); var stream2 = __importStar2(require("stream")); @@ -114374,8 +114374,8 @@ var require_tool_cache = __commonJS({ var userAgent2 = "actions/tool-cache"; function downloadTool3(url2, dest, auth2, headers) { return __awaiter2(this, void 0, void 0, function* () { - dest = dest || path30.join(_getTempDirectory(), crypto3.randomUUID()); - yield io10.mkdirP(path30.dirname(dest)); + dest = dest || path31.join(_getTempDirectory(), crypto3.randomUUID()); + yield io10.mkdirP(path31.dirname(dest)); core29.debug(`Downloading ${url2}`); core29.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -114465,7 +114465,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path30.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path31.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`; @@ -114637,7 +114637,7 @@ var require_tool_cache = __commonJS({ } const destPath = yield _createToolPath(tool, version, arch2); for (const itemName of fs34.readdirSync(sourceDir)) { - const s = path30.join(sourceDir, itemName); + const s = path31.join(sourceDir, itemName); yield io10.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -114654,7 +114654,7 @@ var require_tool_cache = __commonJS({ throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path30.join(destFolder, targetFile); + const destPath = path31.join(destFolder, targetFile); core29.debug(`destination file ${destPath}`); yield io10.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -114677,7 +114677,7 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver13.clean(versionSpec) || ""; - const cachePath = path30.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path31.join(_getCacheDirectory(), toolName, versionSpec, arch2); core29.debug(`checking cache: ${cachePath}`); if (fs34.existsSync(cachePath) && fs34.existsSync(`${cachePath}.complete`)) { core29.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); @@ -114691,12 +114691,12 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os8.arch(); - const toolPath = path30.join(_getCacheDirectory(), toolName); + const toolPath = path31.join(_getCacheDirectory(), toolName); if (fs34.existsSync(toolPath)) { const children = fs34.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path30.join(toolPath, child, arch2 || ""); + const fullPath = path31.join(toolPath, child, arch2 || ""); if (fs34.existsSync(fullPath) && fs34.existsSync(`${fullPath}.complete`)) { versions.push(child); } @@ -114748,7 +114748,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path30.join(_getTempDirectory(), crypto3.randomUUID()); + dest = path31.join(_getTempDirectory(), crypto3.randomUUID()); } yield io10.mkdirP(dest); return dest; @@ -114756,7 +114756,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter2(this, void 0, void 0, function* () { - const folderPath = path30.join(_getCacheDirectory(), tool, semver13.clean(version) || version, arch2 || ""); + const folderPath = path31.join(_getCacheDirectory(), tool, semver13.clean(version) || version, arch2 || ""); core29.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io10.rmRF(folderPath); @@ -114766,7 +114766,7 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path30.join(_getCacheDirectory(), tool, semver13.clean(version) || version, arch2 || ""); + const folderPath = path31.join(_getCacheDirectory(), tool, semver13.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; fs34.writeFileSync(markerPath, ""); core29.debug("finished caching tool"); @@ -120430,13 +120430,13 @@ These characters are not allowed in the artifact name due to limitations with ce (0, core_1.info)(`Artifact name is valid!`); } exports2.validateArtifactName = validateArtifactName; - function validateFilePath(path30) { - if (!path30) { + function validateFilePath(path31) { + if (!path31) { throw new Error(`Provided file path input during validation is empty`); } for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) { - if (path30.includes(invalidCharacterKey)) { - throw new Error(`The path for one of the files in artifact is not valid: ${path30}. Contains the following character: ${errorMessageForCharacter} + if (path31.includes(invalidCharacterKey)) { + throw new Error(`The path for one of the files in artifact is not valid: ${path31}. Contains the following character: ${errorMessageForCharacter} Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()} @@ -121429,8 +121429,8 @@ var require_minimatch2 = __commonJS({ return new Minimatch2(pattern, options).match(p); }; module2.exports = minimatch2; - var path30 = require_path(); - minimatch2.sep = path30.sep; + var path31 = require_path(); + minimatch2.sep = path31.sep; var GLOBSTAR2 = /* @__PURE__ */ Symbol("globstar **"); minimatch2.GLOBSTAR = GLOBSTAR2; var expand3 = require_brace_expansion2(); @@ -122036,8 +122036,8 @@ var require_minimatch2 = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; const options = this.options; - if (path30.sep !== "/") { - f = f.split(path30.sep).join("/"); + if (path31.sep !== "/") { + f = f.split(path31.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -122135,8 +122135,8 @@ var require_readdir_glob = __commonJS({ }); }); } - async function* exploreWalkAsync2(dir, path30, followSymlinks, useStat, shouldSkip, strict) { - let files = await readdir3(path30 + dir, strict); + async function* exploreWalkAsync2(dir, path31, followSymlinks, useStat, shouldSkip, strict) { + let files = await readdir3(path31 + dir, strict); for (const file of files) { let name = file.name; if (name === void 0) { @@ -122145,7 +122145,7 @@ var require_readdir_glob = __commonJS({ } const filename = dir + "/" + name; const relative3 = filename.slice(1); - const absolute = path30 + "/" + relative3; + const absolute = path31 + "/" + relative3; let stats = null; if (useStat || followSymlinks) { stats = await stat2(absolute, followSymlinks); @@ -122159,15 +122159,15 @@ var require_readdir_glob = __commonJS({ if (stats.isDirectory()) { if (!shouldSkip(relative3)) { yield { relative: relative3, absolute, stats }; - yield* exploreWalkAsync2(filename, path30, followSymlinks, useStat, shouldSkip, false); + yield* exploreWalkAsync2(filename, path31, followSymlinks, useStat, shouldSkip, false); } } else { yield { relative: relative3, absolute, stats }; } } } - async function* explore2(path30, followSymlinks, useStat, shouldSkip) { - yield* exploreWalkAsync2("", path30, followSymlinks, useStat, shouldSkip, true); + async function* explore2(path31, followSymlinks, useStat, shouldSkip) { + yield* exploreWalkAsync2("", path31, followSymlinks, useStat, shouldSkip, true); } function readOptions2(options) { return { @@ -124205,14 +124205,14 @@ var require_polyfills = __commonJS({ fs34.fstatSync = statFixSync(fs34.fstatSync); fs34.lstatSync = statFixSync(fs34.lstatSync); if (fs34.chmod && !fs34.lchmod) { - fs34.lchmod = function(path30, mode, cb) { + fs34.lchmod = function(path31, mode, cb) { if (cb) process.nextTick(cb); }; fs34.lchmodSync = function() { }; } if (fs34.chown && !fs34.lchown) { - fs34.lchown = function(path30, uid, gid, cb) { + fs34.lchown = function(path31, uid, gid, cb) { if (cb) process.nextTick(cb); }; fs34.lchownSync = function() { @@ -124279,9 +124279,9 @@ var require_polyfills = __commonJS({ }; })(fs34.readSync); function patchLchmod(fs35) { - fs35.lchmod = function(path30, mode, callback) { + fs35.lchmod = function(path31, mode, callback) { fs35.open( - path30, + path31, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) { @@ -124297,8 +124297,8 @@ var require_polyfills = __commonJS({ } ); }; - fs35.lchmodSync = function(path30, mode) { - var fd = fs35.openSync(path30, constants.O_WRONLY | constants.O_SYMLINK, mode); + fs35.lchmodSync = function(path31, mode) { + var fd = fs35.openSync(path31, constants.O_WRONLY | constants.O_SYMLINK, mode); var threw = true; var ret; try { @@ -124319,8 +124319,8 @@ var require_polyfills = __commonJS({ } function patchLutimes(fs35) { if (constants.hasOwnProperty("O_SYMLINK") && fs35.futimes) { - fs35.lutimes = function(path30, at, mt, cb) { - fs35.open(path30, constants.O_SYMLINK, function(er, fd) { + fs35.lutimes = function(path31, at, mt, cb) { + fs35.open(path31, constants.O_SYMLINK, function(er, fd) { if (er) { if (cb) cb(er); return; @@ -124332,8 +124332,8 @@ var require_polyfills = __commonJS({ }); }); }; - fs35.lutimesSync = function(path30, at, mt) { - var fd = fs35.openSync(path30, constants.O_SYMLINK); + fs35.lutimesSync = function(path31, at, mt) { + var fd = fs35.openSync(path31, constants.O_SYMLINK); var ret; var threw = true; try { @@ -124451,11 +124451,11 @@ var require_legacy_streams = __commonJS({ ReadStream, WriteStream }; - function ReadStream(path30, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path30, options); + function ReadStream(path31, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path31, options); Stream.call(this); var self2 = this; - this.path = path30; + this.path = path31; this.fd = null; this.readable = true; this.paused = false; @@ -124500,10 +124500,10 @@ var require_legacy_streams = __commonJS({ self2._read(); }); } - function WriteStream(path30, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path30, options); + function WriteStream(path31, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path31, options); Stream.call(this); - this.path = path30; + this.path = path31; this.fd = null; this.writable = true; this.flags = "w"; @@ -124646,14 +124646,14 @@ var require_graceful_fs = __commonJS({ fs35.createWriteStream = createWriteStream3; var fs$readFile = fs35.readFile; fs35.readFile = readFile; - function readFile(path30, options, cb) { + function readFile(path31, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$readFile(path30, options, cb); - function go$readFile(path31, options2, cb2, startTime) { - return fs$readFile(path31, options2, function(err) { + return go$readFile(path31, options, cb); + function go$readFile(path32, options2, cb2, startTime) { + return fs$readFile(path32, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path31, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$readFile, [path32, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -124663,14 +124663,14 @@ var require_graceful_fs = __commonJS({ } var fs$writeFile = fs35.writeFile; fs35.writeFile = writeFile; - function writeFile(path30, data, options, cb) { + function writeFile(path31, data, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$writeFile(path30, data, options, cb); - function go$writeFile(path31, data2, options2, cb2, startTime) { - return fs$writeFile(path31, data2, options2, function(err) { + return go$writeFile(path31, data, options, cb); + function go$writeFile(path32, data2, options2, cb2, startTime) { + return fs$writeFile(path32, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path31, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$writeFile, [path32, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -124681,14 +124681,14 @@ var require_graceful_fs = __commonJS({ var fs$appendFile = fs35.appendFile; if (fs$appendFile) fs35.appendFile = appendFile; - function appendFile(path30, data, options, cb) { + function appendFile(path31, data, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$appendFile(path30, data, options, cb); - function go$appendFile(path31, data2, options2, cb2, startTime) { - return fs$appendFile(path31, data2, options2, function(err) { + return go$appendFile(path31, data, options, cb); + function go$appendFile(path32, data2, options2, cb2, startTime) { + return fs$appendFile(path32, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path31, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$appendFile, [path32, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -124719,31 +124719,31 @@ var require_graceful_fs = __commonJS({ var fs$readdir = fs35.readdir; fs35.readdir = readdir3; var noReaddirOptionVersions = /^v[0-5]\./; - function readdir3(path30, options, cb) { + function readdir3(path31, options, cb) { if (typeof options === "function") cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path31, options2, cb2, startTime) { - return fs$readdir(path31, fs$readdirCallback( - path31, + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path32, options2, cb2, startTime) { + return fs$readdir(path32, fs$readdirCallback( + path32, options2, cb2, startTime )); - } : function go$readdir2(path31, options2, cb2, startTime) { - return fs$readdir(path31, options2, fs$readdirCallback( - path31, + } : function go$readdir2(path32, options2, cb2, startTime) { + return fs$readdir(path32, options2, fs$readdirCallback( + path32, options2, cb2, startTime )); }; - return go$readdir(path30, options, cb); - function fs$readdirCallback(path31, options2, cb2, startTime) { + return go$readdir(path31, options, cb); + function fs$readdirCallback(path32, options2, cb2, startTime) { return function(err, files) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ go$readdir, - [path31, options2, cb2], + [path32, options2, cb2], err, startTime || Date.now(), Date.now() @@ -124814,7 +124814,7 @@ var require_graceful_fs = __commonJS({ enumerable: true, configurable: true }); - function ReadStream(path30, options) { + function ReadStream(path31, options) { if (this instanceof ReadStream) return fs$ReadStream.apply(this, arguments), this; else @@ -124834,7 +124834,7 @@ var require_graceful_fs = __commonJS({ } }); } - function WriteStream(path30, options) { + function WriteStream(path31, options) { if (this instanceof WriteStream) return fs$WriteStream.apply(this, arguments), this; else @@ -124852,22 +124852,22 @@ var require_graceful_fs = __commonJS({ } }); } - function createReadStream4(path30, options) { - return new fs35.ReadStream(path30, options); + function createReadStream4(path31, options) { + return new fs35.ReadStream(path31, options); } - function createWriteStream3(path30, options) { - return new fs35.WriteStream(path30, options); + function createWriteStream3(path31, options) { + return new fs35.WriteStream(path31, options); } var fs$open = fs35.open; fs35.open = open; - function open(path30, flags, mode, cb) { + function open(path31, flags, mode, cb) { if (typeof mode === "function") cb = mode, mode = null; - return go$open(path30, flags, mode, cb); - function go$open(path31, flags2, mode2, cb2, startTime) { - return fs$open(path31, flags2, mode2, function(err, fd) { + return go$open(path31, flags, mode, cb); + function go$open(path32, flags2, mode2, cb2, startTime) { + return fs$open(path32, flags2, mode2, function(err, fd) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path31, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$open, [path32, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -126972,22 +126972,22 @@ var require_lazystream = __commonJS({ // node_modules/normalize-path/index.js var require_normalize_path = __commonJS({ "node_modules/normalize-path/index.js"(exports2, module2) { - module2.exports = function(path30, stripTrailing) { - if (typeof path30 !== "string") { + module2.exports = function(path31, stripTrailing) { + if (typeof path31 !== "string") { throw new TypeError("expected path to be a string"); } - if (path30 === "\\" || path30 === "/") return "/"; - var len = path30.length; - if (len <= 1) return path30; + if (path31 === "\\" || path31 === "/") return "/"; + var len = path31.length; + if (len <= 1) return path31; var prefix = ""; - if (len > 4 && path30[3] === "\\") { - var ch = path30[2]; - if ((ch === "?" || ch === ".") && path30.slice(0, 2) === "\\\\") { - path30 = path30.slice(2); + if (len > 4 && path31[3] === "\\") { + var ch = path31[2]; + if ((ch === "?" || ch === ".") && path31.slice(0, 2) === "\\\\") { + path31 = path31.slice(2); prefix = "//"; } } - var segs = path30.split(/[/\\]+/); + var segs = path31.split(/[/\\]+/); if (stripTrailing !== false && segs[segs.length - 1] === "") { segs.pop(); } @@ -137991,7 +137991,7 @@ globstar while`, t, d, e, u, m), this.matchOne(t.slice(d), e.slice(u), s)) retur var require_file2 = __commonJS({ "node_modules/archiver-utils/file.js"(exports2, module2) { var fs34 = require_graceful_fs(); - var path30 = require("path"); + var path31 = require("path"); var flatten = require_flatten(); var difference = require_difference(); var union = require_union(); @@ -138016,7 +138016,7 @@ var require_file2 = __commonJS({ return result; }; file.exists = function() { - var filepath = path30.join.apply(path30, arguments); + var filepath = path31.join.apply(path31, arguments); return fs34.existsSync(filepath); }; file.expand = function(...args) { @@ -138030,7 +138030,7 @@ var require_file2 = __commonJS({ }); if (options.filter) { matches = matches.filter(function(filepath) { - filepath = path30.join(options.cwd || "", filepath); + filepath = path31.join(options.cwd || "", filepath); try { if (typeof options.filter === "function") { return options.filter(filepath); @@ -138047,7 +138047,7 @@ var require_file2 = __commonJS({ file.expandMapping = function(patterns, destBase, options) { options = Object.assign({ rename: function(destBase2, destPath) { - return path30.join(destBase2 || "", destPath); + return path31.join(destBase2 || "", destPath); } }, options); var files = []; @@ -138055,14 +138055,14 @@ var require_file2 = __commonJS({ file.expand(options, patterns).forEach(function(src) { var destPath = src; if (options.flatten) { - destPath = path30.basename(destPath); + destPath = path31.basename(destPath); } if (options.ext) { destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext); } var dest = options.rename(destBase, destPath, options); if (options.cwd) { - src = path30.join(options.cwd, src); + src = path31.join(options.cwd, src); } dest = dest.replace(pathSeparatorRe, "/"); src = src.replace(pathSeparatorRe, "/"); @@ -138144,7 +138144,7 @@ var require_file2 = __commonJS({ var require_archiver_utils = __commonJS({ "node_modules/archiver-utils/index.js"(exports2, module2) { var fs34 = require_graceful_fs(); - var path30 = require("path"); + var path31 = require("path"); var isStream2 = require_is_stream(); var lazystream = require_lazystream(); var normalizePath4 = require_normalize_path(); @@ -138232,11 +138232,11 @@ var require_archiver_utils = __commonJS({ if (!file) { return callback(null, results); } - filepath = path30.join(dirpath, file); + filepath = path31.join(dirpath, file); fs34.stat(filepath, function(err2, stats) { results.push({ path: filepath, - relative: path30.relative(base, filepath).replace(/\\/g, "/"), + relative: path31.relative(base, filepath).replace(/\\/g, "/"), stats }); if (stats && stats.isDirectory()) { @@ -138298,7 +138298,7 @@ var require_core2 = __commonJS({ var fs34 = require("fs"); var glob2 = require_readdir_glob(); var async = require_async(); - var path30 = require("path"); + var path31 = require("path"); var util4 = require_archiver_utils(); var inherits = require("util").inherits; var ArchiverError2 = require_error3(); @@ -138574,9 +138574,9 @@ var require_core2 = __commonJS({ task.source = Buffer.concat([]); } else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) { var linkPath = fs34.readlinkSync(task.filepath); - var dirName = path30.dirname(task.filepath); + var dirName = path31.dirname(task.filepath); task.data.type = "symlink"; - task.data.linkname = path30.relative(dirName, path30.resolve(dirName, linkPath)); + task.data.linkname = path31.relative(dirName, path31.resolve(dirName, linkPath)); task.data.sourceType = "buffer"; task.source = Buffer.concat([]); } else { @@ -143026,8 +143026,8 @@ var require_context2 = __commonJS({ if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); } else { - const path30 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path30} does not exist${os_1.EOL}`); + const path31 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path31} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -147923,7 +147923,7 @@ var require_traverse = __commonJS({ })(this.value); }; function walk(root, cb, immutable) { - var path30 = []; + var path31 = []; var parents = []; var alive = true; return (function walker(node_) { @@ -147932,11 +147932,11 @@ var require_traverse = __commonJS({ var state = { node, node_, - path: [].concat(path30), + path: [].concat(path31), parent: parents.slice(-1)[0], - key: path30.slice(-1)[0], - isRoot: path30.length === 0, - level: path30.length, + key: path31.slice(-1)[0], + isRoot: path31.length === 0, + level: path31.length, circular: null, update: function(x) { if (!state.isRoot) { @@ -147991,7 +147991,7 @@ var require_traverse = __commonJS({ parents.push(state); var keys = Object.keys(state.node); keys.forEach(function(key, i2) { - path30.push(key); + path31.push(key); if (modifiers.pre) modifiers.pre.call(state, state.node[key], key); var child = walker(state.node[key]); if (immutable && Object.hasOwnProperty.call(state.node, key)) { @@ -148000,7 +148000,7 @@ var require_traverse = __commonJS({ child.isLast = i2 == keys.length - 1; child.isFirst = i2 == 0; if (modifiers.post) modifiers.post.call(state, child); - path30.pop(); + path31.pop(); }); parents.pop(); } @@ -149021,11 +149021,11 @@ var require_unzip_stream = __commonJS({ return requiredLength; case states.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX: var isUtf8 = (this.parsedEntity.flags & 2048) !== 0; - var path30 = this._decodeString(chunk.slice(0, this.parsedEntity.fileNameLength), isUtf8); + var path31 = this._decodeString(chunk.slice(0, this.parsedEntity.fileNameLength), isUtf8); var extraDataBuffer = chunk.slice(this.parsedEntity.fileNameLength, this.parsedEntity.fileNameLength + this.parsedEntity.extraFieldLength); var extra = this._readExtraFields(extraDataBuffer); if (extra && extra.parsed && extra.parsed.path && !isUtf8) { - path30 = extra.parsed.path; + path31 = extra.parsed.path; } this.parsedEntity.extra = extra.parsed; var isUnix = (this.parsedEntity.versionMadeBy & 65280) >> 8 === 3; @@ -149037,7 +149037,7 @@ var require_unzip_stream = __commonJS({ } if (this.options.debug) { const debugObj = Object.assign({}, this.parsedEntity, { - path: path30, + path: path31, flags: "0x" + this.parsedEntity.flags.toString(16), unixAttrs: unixAttrs && "0" + unixAttrs.toString(8), isSymlink, @@ -149474,7 +149474,7 @@ var require_parser_stream = __commonJS({ // node_modules/mkdirp/index.js var require_mkdirp = __commonJS({ "node_modules/mkdirp/index.js"(exports2, module2) { - var path30 = require("path"); + var path31 = require("path"); var fs34 = require("fs"); var _0777 = parseInt("0777", 8); module2.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; @@ -149494,7 +149494,7 @@ var require_mkdirp = __commonJS({ var cb = f || /* istanbul ignore next */ function() { }; - p = path30.resolve(p); + p = path31.resolve(p); xfs.mkdir(p, mode, function(er) { if (!er) { made = made || p; @@ -149502,8 +149502,8 @@ var require_mkdirp = __commonJS({ } switch (er.code) { case "ENOENT": - if (path30.dirname(p) === p) return cb(er); - mkdirP(path30.dirname(p), opts, function(er2, made2) { + if (path31.dirname(p) === p) return cb(er); + mkdirP(path31.dirname(p), opts, function(er2, made2) { if (er2) cb(er2, made2); else mkdirP(p, opts, cb, made2); }); @@ -149530,14 +149530,14 @@ var require_mkdirp = __commonJS({ mode = _0777; } if (!made) made = null; - p = path30.resolve(p); + p = path31.resolve(p); try { xfs.mkdirSync(p, mode); made = made || p; } catch (err0) { switch (err0.code) { case "ENOENT": - made = sync(path30.dirname(p), opts, made); + made = sync(path31.dirname(p), opts, made); sync(p, opts, made); break; // In the case of any other error, just see if there's a dir @@ -149563,7 +149563,7 @@ var require_mkdirp = __commonJS({ var require_extract2 = __commonJS({ "node_modules/unzip-stream/lib/extract.js"(exports2, module2) { var fs34 = require("fs"); - var path30 = require("path"); + var path31 = require("path"); var util4 = require("util"); var mkdirp = require_mkdirp(); var Transform5 = require("stream").Transform; @@ -149605,8 +149605,8 @@ var require_extract2 = __commonJS({ }; Extract.prototype._processEntry = function(entry) { var self2 = this; - var destPath = path30.join(this.opts.path, entry.path); - var directory = entry.isDirectory ? destPath : path30.dirname(destPath); + var destPath = path31.join(this.opts.path, entry.path); + var directory = entry.isDirectory ? destPath : path31.dirname(destPath); this.unfinishedEntries++; var writeFileFn = function() { var pipedStream = fs34.createWriteStream(destPath); @@ -149733,10 +149733,10 @@ var require_download_artifact = __commonJS({ parsed.search = ""; return parsed.toString(); }; - function exists(path30) { + function exists(path31) { return __awaiter2(this, void 0, void 0, function* () { try { - yield promises_1.default.access(path30); + yield promises_1.default.access(path31); return true; } catch (error3) { if (error3.code === "ENOENT") { @@ -149968,12 +149968,12 @@ var require_dist_node11 = __commonJS({ octokit.log.debug("request", options); const start = Date.now(); const requestOptions = octokit.request.endpoint.parse(options); - const path30 = requestOptions.url.replace(options.baseUrl, ""); + const path31 = requestOptions.url.replace(options.baseUrl, ""); return request3(options).then((response) => { - octokit.log.info(`${requestOptions.method} ${path30} - ${response.status} in ${Date.now() - start}ms`); + octokit.log.info(`${requestOptions.method} ${path31} - ${response.status} in ${Date.now() - start}ms`); return response; }).catch((error3) => { - octokit.log.info(`${requestOptions.method} ${path30} - ${error3.status} in ${Date.now() - start}ms`); + octokit.log.info(`${requestOptions.method} ${path31} - ${error3.status} in ${Date.now() - start}ms`); throw error3; }); }); @@ -152068,7 +152068,7 @@ var require_path_utils2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -152078,7 +152078,7 @@ var require_path_utils2 = __commonJS({ } exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path30.sep); + return pth.replace(/[/\\]/g, path31.sep); } exports2.toPlatformPath = toPlatformPath; } @@ -152142,7 +152142,7 @@ var require_io_util2 = __commonJS({ 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 fs34 = __importStar2(require("fs")); - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); _a6 = fs34.promises, exports2.chmod = _a6.chmod, exports2.copyFile = _a6.copyFile, exports2.lstat = _a6.lstat, exports2.mkdir = _a6.mkdir, exports2.open = _a6.open, exports2.readdir = _a6.readdir, exports2.readlink = _a6.readlink, exports2.rename = _a6.rename, exports2.rm = _a6.rm, exports2.rmdir = _a6.rmdir, exports2.stat = _a6.stat, exports2.symlink = _a6.symlink, exports2.unlink = _a6.unlink; exports2.IS_WINDOWS = process.platform === "win32"; exports2.UV_FS_O_EXLOCK = 268435456; @@ -152191,7 +152191,7 @@ var require_io_util2 = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path30.extname(filePath).toUpperCase(); + const upperExt = path31.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -152215,11 +152215,11 @@ var require_io_util2 = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path30.dirname(filePath); - const upperName = path30.basename(filePath).toUpperCase(); + const directory = path31.dirname(filePath); + const upperName = path31.basename(filePath).toUpperCase(); for (const actualName of yield exports2.readdir(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path30.join(directory, actualName); + filePath = path31.join(directory, actualName); break; } } @@ -152314,7 +152314,7 @@ var require_io2 = __commonJS({ 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 path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); var ioUtil = __importStar2(require_io_util2()); function cp(source, dest, options = {}) { return __awaiter2(this, void 0, void 0, function* () { @@ -152323,7 +152323,7 @@ var require_io2 = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path30.join(dest, path30.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path31.join(dest, path31.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -152335,7 +152335,7 @@ var require_io2 = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path30.relative(source, newDest) === "") { + if (path31.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile2(source, newDest, force); @@ -152348,7 +152348,7 @@ var require_io2 = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path30.join(dest, path30.basename(source)); + dest = path31.join(dest, path31.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -152359,7 +152359,7 @@ var require_io2 = __commonJS({ } } } - yield mkdirP(path30.dirname(dest)); + yield mkdirP(path31.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -152422,7 +152422,7 @@ var require_io2 = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path30.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path31.delimiter)) { if (extension) { extensions.push(extension); } @@ -152435,12 +152435,12 @@ var require_io2 = __commonJS({ } return []; } - if (tool.includes(path30.sep)) { + if (tool.includes(path31.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path30.delimiter)) { + for (const p of process.env.PATH.split(path31.delimiter)) { if (p) { directories.push(p); } @@ -152448,7 +152448,7 @@ var require_io2 = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path30.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path31.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -152564,7 +152564,7 @@ var require_toolrunner2 = __commonJS({ var os8 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); var io10 = __importStar2(require_io2()); var ioUtil = __importStar2(require_io_util2()); var timers_1 = require("timers"); @@ -152779,7 +152779,7 @@ var require_toolrunner2 = __commonJS({ exec() { return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { - this.toolPath = path30.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path31.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io10.which(this.toolPath, true); return new Promise((resolve15, reject) => __awaiter2(this, void 0, void 0, function* () { @@ -153279,7 +153279,7 @@ var require_core3 = __commonJS({ var file_command_1 = require_file_command2(); var utils_1 = require_utils11(); var os8 = __importStar2(require("os")); - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils2(); var ExitCode; (function(ExitCode2) { @@ -153307,7 +153307,7 @@ var require_core3 = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path30.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path31.delimiter}${process.env["PATH"]}`; } exports2.addPath = addPath2; function getInput2(name, options) { @@ -153483,13 +153483,13 @@ These characters are not allowed in the artifact name due to limitations with ce (0, core_1.info)(`Artifact name is valid!`); } exports2.checkArtifactName = checkArtifactName; - function checkArtifactFilePath(path30) { - if (!path30) { - throw new Error(`Artifact path: ${path30}, is incorrectly provided`); + function checkArtifactFilePath(path31) { + if (!path31) { + throw new Error(`Artifact path: ${path31}, is incorrectly provided`); } for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) { - if (path30.includes(invalidCharacterKey)) { - throw new Error(`Artifact path is not valid: ${path30}. Contains the following character: ${errorMessageForCharacter} + if (path31.includes(invalidCharacterKey)) { + throw new Error(`Artifact path is not valid: ${path31}. Contains the following character: ${errorMessageForCharacter} Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()} @@ -153580,7 +153580,7 @@ var require_tmp = __commonJS({ "node_modules/tmp/lib/tmp.js"(exports2, module2) { var fs34 = require("fs"); var os8 = require("os"); - var path30 = require("path"); + var path31 = require("path"); var crypto3 = require("crypto"); var _c2 = { fs: fs34.constants, os: os8.constants }; var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; @@ -153787,12 +153787,12 @@ var require_tmp = __commonJS({ return [actualOptions, callback]; } function _resolvePath(name, tmpDir, cb) { - const pathToResolve = path30.isAbsolute(name) ? name : path30.join(tmpDir, name); + const pathToResolve = path31.isAbsolute(name) ? name : path31.join(tmpDir, name); fs34.stat(pathToResolve, function(err) { if (err) { - fs34.realpath(path30.dirname(pathToResolve), function(err2, parentDir) { + fs34.realpath(path31.dirname(pathToResolve), function(err2, parentDir) { if (err2) return cb(err2); - cb(null, path30.join(parentDir, path30.basename(pathToResolve))); + cb(null, path31.join(parentDir, path31.basename(pathToResolve))); }); } else { fs34.realpath(pathToResolve, cb); @@ -153800,22 +153800,22 @@ var require_tmp = __commonJS({ }); } function _resolvePathSync(name, tmpDir) { - const pathToResolve = path30.isAbsolute(name) ? name : path30.join(tmpDir, name); + const pathToResolve = path31.isAbsolute(name) ? name : path31.join(tmpDir, name); try { fs34.statSync(pathToResolve); return fs34.realpathSync(pathToResolve); } catch (_err) { - const parentDir = fs34.realpathSync(path30.dirname(pathToResolve)); - return path30.join(parentDir, path30.basename(pathToResolve)); + const parentDir = fs34.realpathSync(path31.dirname(pathToResolve)); + return path31.join(parentDir, path31.basename(pathToResolve)); } } function _generateTmpName(opts) { const tmpDir = opts.tmpdir; if (!_isUndefined(opts.name)) { - return path30.join(tmpDir, opts.dir, opts.name); + return path31.join(tmpDir, opts.dir, opts.name); } if (!_isUndefined(opts.template)) { - return path30.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); + return path31.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); } const name = [ opts.prefix ? opts.prefix : "tmp", @@ -153825,7 +153825,7 @@ var require_tmp = __commonJS({ _randomChars(12), opts.postfix ? "-" + opts.postfix : "" ].join(""); - return path30.join(tmpDir, opts.dir, name); + return path31.join(tmpDir, opts.dir, name); } function _assertPath(option, value) { if (typeof value !== "string") { @@ -153839,8 +153839,8 @@ var require_tmp = __commonJS({ function _assertOptionsBase(options) { if (!_isUndefined(options.name)) { const name = options.name; - if (path30.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`); - const basename2 = path30.basename(name); + if (path31.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`); + const basename2 = path31.basename(name); if (basename2 === ".." || basename2 === "." || basename2 !== name) { throw new Error(`name option must not contain a path, found "${name}".`); } @@ -153869,8 +153869,8 @@ var require_tmp = __commonJS({ if (_isUndefined(name)) return cb(null); _resolvePath(name, tmpDir, function(err, resolvedPath) { if (err) return cb(err); - const relativePath2 = path30.relative(tmpDir, resolvedPath); - if (relativePath2.startsWith("..") || path30.isAbsolute(relativePath2)) { + const relativePath2 = path31.relative(tmpDir, resolvedPath); + if (relativePath2.startsWith("..") || path31.isAbsolute(relativePath2)) { return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath2}".`)); } cb(null, relativePath2); @@ -153879,8 +153879,8 @@ var require_tmp = __commonJS({ function _getRelativePathSync(option, name, tmpDir) { if (_isUndefined(name)) return; const resolvedPath = _resolvePathSync(name, tmpDir); - const relativePath2 = path30.relative(tmpDir, resolvedPath); - if (relativePath2.startsWith("..") || path30.isAbsolute(relativePath2)) { + const relativePath2 = path31.relative(tmpDir, resolvedPath); + if (relativePath2.startsWith("..") || path31.isAbsolute(relativePath2)) { throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath2}".`); } return relativePath2; @@ -153959,14 +153959,14 @@ var require_tmp_promise = __commonJS({ var fileWithOptions = promisify( (options, cb) => tmp2.file( options, - (err, path30, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path30, fd, cleanup: promisify(cleanup) }) + (err, path31, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path31, fd, cleanup: promisify(cleanup) }) ) ); module2.exports.file = async (options) => fileWithOptions(options); module2.exports.withFile = async function withFile(fn, options) { - const { path: path30, fd, cleanup } = await module2.exports.file(options); + const { path: path31, fd, cleanup } = await module2.exports.file(options); try { - return await fn({ path: path30, fd }); + return await fn({ path: path31, fd }); } finally { await cleanup(); } @@ -153975,14 +153975,14 @@ var require_tmp_promise = __commonJS({ var dirWithOptions = promisify( (options, cb) => tmp2.dir( options, - (err, path30, cleanup) => err ? cb(err) : cb(void 0, { path: path30, cleanup: promisify(cleanup) }) + (err, path31, cleanup) => err ? cb(err) : cb(void 0, { path: path31, cleanup: promisify(cleanup) }) ) ); module2.exports.dir = async (options) => dirWithOptions(options); module2.exports.withDir = async function withDir(fn, options) { - const { path: path30, cleanup } = await module2.exports.dir(options); + const { path: path31, cleanup } = await module2.exports.dir(options); try { - return await fn({ path: path30 }); + return await fn({ path: path31 }); } finally { await cleanup(); } @@ -155690,21 +155690,21 @@ var require_download_specification = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadSpecification = void 0; - var path30 = __importStar2(require("path")); + var path31 = __importStar2(require("path")); function getDownloadSpecification(artifactName, artifactEntries, downloadPath, includeRootDirectory) { const directories = /* @__PURE__ */ new Set(); const specifications = { - rootDownloadLocation: includeRootDirectory ? path30.join(downloadPath, artifactName) : downloadPath, + rootDownloadLocation: includeRootDirectory ? path31.join(downloadPath, artifactName) : downloadPath, directoryStructure: [], emptyFilesToCreate: [], filesToDownload: [] }; for (const entry of artifactEntries) { if (entry.path.startsWith(`${artifactName}/`) || entry.path.startsWith(`${artifactName}\\`)) { - const normalizedPathEntry = path30.normalize(entry.path); - const filePath = path30.join(downloadPath, includeRootDirectory ? normalizedPathEntry : normalizedPathEntry.replace(artifactName, "")); + const normalizedPathEntry = path31.normalize(entry.path); + const filePath = path31.join(downloadPath, includeRootDirectory ? normalizedPathEntry : normalizedPathEntry.replace(artifactName, "")); if (entry.itemType === "file") { - directories.add(path30.dirname(filePath)); + directories.add(path31.dirname(filePath)); if (entry.fileLength === 0) { specifications.emptyFilesToCreate.push(filePath); } else { @@ -155846,7 +155846,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz return uploadResponse; }); } - downloadArtifact(name, path30, options) { + downloadArtifact(name, path31, options) { return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const artifacts = yield downloadHttpClient.listArtifacts(); @@ -155860,12 +155860,12 @@ Note: The size of downloaded zips can differ significantly from the reported siz throw new Error(`Unable to find an artifact with the name: ${name}`); } const items = yield downloadHttpClient.getContainerItems(artifactToDownload.name, artifactToDownload.fileContainerResourceUrl); - if (!path30) { - path30 = (0, config_variables_1.getWorkSpaceDirectory)(); + if (!path31) { + path31 = (0, config_variables_1.getWorkSpaceDirectory)(); } - path30 = (0, path_1.normalize)(path30); - path30 = (0, path_1.resolve)(path30); - const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path30, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); + path31 = (0, path_1.normalize)(path31); + path31 = (0, path_1.resolve)(path31); + const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path31, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); if (downloadSpecification.filesToDownload.length === 0) { core29.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`); } else { @@ -155880,7 +155880,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz }; }); } - downloadAllArtifacts(path30) { + downloadAllArtifacts(path31) { return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const response = []; @@ -155889,18 +155889,18 @@ Note: The size of downloaded zips can differ significantly from the reported siz core29.info("Unable to find any artifacts for the associated workflow"); return response; } - if (!path30) { - path30 = (0, config_variables_1.getWorkSpaceDirectory)(); + if (!path31) { + path31 = (0, config_variables_1.getWorkSpaceDirectory)(); } - path30 = (0, path_1.normalize)(path30); - path30 = (0, path_1.resolve)(path30); + path31 = (0, path_1.normalize)(path31); + path31 = (0, path_1.resolve)(path31); let downloadedArtifacts = 0; while (downloadedArtifacts < artifacts.count) { const currentArtifactToDownload = artifacts.value[downloadedArtifacts]; downloadedArtifacts += 1; core29.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, path30, true); + const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path31, true); if (downloadSpecification.filesToDownload.length === 0) { core29.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`); } else { @@ -174018,7 +174018,7 @@ module.exports = __toCommonJS(entry_points_exports); // src/analyze-action.ts var fs25 = __toESM(require("fs")); -var import_path5 = __toESM(require("path")); +var import_path6 = __toESM(require("path")); var import_perf_hooks6 = require("perf_hooks"); var core14 = __toESM(require_core()); @@ -177442,7 +177442,7 @@ function array(validator) { }; return { validate: validate2, - check: (val, opts, path30) => { + check: (val, opts, path31) => { const result = successfulCheckSchema(); if (!isArray(val)) { result.valid = false; @@ -177450,7 +177450,7 @@ function array(validator) { } let index2 = 0; for (const e of val) { - const elementPath = `${path30}[${index2}]`; + const elementPath = `${path31}[${index2}]`; const eResult = validator.check(e, opts, `${elementPath}`); result.invalidKeys.push(...eResult.invalidKeys); result.unknownKeys.push(...eResult.unknownKeys); @@ -177476,11 +177476,11 @@ function object(schema) { validate: (val) => { return isObject2(val) && validateSchema(schema, val); }, - check: (val, opts, path30) => { + check: (val, opts, path31) => { if (!isObject2(val)) { return invalidCheckSchema(); } - return checkSchema(schema, val, opts, path30); + return checkSchema(schema, val, opts, path31); }, required: true }; @@ -177490,11 +177490,11 @@ function optionalOrNull(validator) { validate: (val) => { return val === void 0 || val === null || validator.validate(val); }, - check: (val, opts, path30) => { + check: (val, opts, path31) => { if (val === void 0 || val === null) { return successfulCheckSchema(); } - return validator.check(val, opts, path30); + return validator.check(val, opts, path31); }, required: false }; @@ -177504,11 +177504,11 @@ function optional(validator) { validate: (val) => { return val === void 0 || validator.validate(val); }, - check: (val, opts, path30) => { + check: (val, opts, path31) => { if (val === void 0) { return successfulCheckSchema(); } - return validator.check(val, opts, path30); + return validator.check(val, opts, path31); }, required: false }; @@ -177535,7 +177535,7 @@ function invalidCheckSchema() { invalidKeys: [] }; } -function checkSchema(schema, obj, options = {}, path30 = "") { +function checkSchema(schema, obj, options = {}, path31 = "") { const result = successfulCheckSchema(); const inputKeys = new Set(Object.keys(obj)); const invalidKeys = /* @__PURE__ */ new Set(); @@ -177558,7 +177558,7 @@ function checkSchema(schema, obj, options = {}, path30 = "") { continue; } if (hasKey) { - const checkResult = validator.check(obj[key], options, `${path30}.${key}`); + const checkResult = validator.check(obj[key], options, `${path31}.${key}`); result.unknownKeys.push(...checkResult.unknownKeys); result.invalidKeys.push(...checkResult.invalidKeys); if (checkResult.invalidKeys.length > 0) { @@ -177575,10 +177575,10 @@ function checkSchema(schema, obj, options = {}, path30 = "") { invalidKeys.delete(key); } for (const remainingKey of inputKeys) { - result.unknownKeys.push(`${path30}.${remainingKey}`); + result.unknownKeys.push(`${path31}.${remainingKey}`); } for (const invalidKey of invalidKeys) { - result.invalidKeys.push(`${path30}.${invalidKey}`); + result.invalidKeys.push(`${path31}.${invalidKey}`); } return result; } @@ -178226,10 +178226,6 @@ var getOptionalInput = function(name) { function getTemporaryDirectory(env = getEnv()) { return env.getOptional("CODEQL_ACTION_TEMP" /* TEMP */) ?? env.getRequired("RUNNER_TEMP" /* RUNNER_TEMP */); } -var PR_DIFF_RANGE_JSON_FILENAME = "pr-diff-range.json"; -function getDiffRangesJsonFilePath(env = getEnv()) { - return path2.join(getTemporaryDirectory(env), PR_DIFF_RANGE_JSON_FILENAME); -} function getActionVersion() { return "4.39.3"; } @@ -179833,8 +179829,8 @@ async function runInActions(action) { } // src/feature-flags.ts -var fs6 = __toESM(require("fs")); -var path6 = __toESM(require("path")); +var fs7 = __toESM(require("fs")); +var path7 = __toESM(require("path")); var semver3 = __toESM(require_semver2()); // src/defaults.json @@ -179842,8 +179838,209 @@ var bundleVersion = "codeql-bundle-v2.27.4"; var cliVersion = "2.27.4"; // src/overlay/index.ts +var fs6 = __toESM(require("fs")); +var path6 = __toESM(require("path")); + +// src/diff-informed/index.ts var fs5 = __toESM(require("fs")); -var path5 = __toESM(require("path")); +var import_path2 = __toESM(require("path")); +var PR_DIFF_RANGE_JSON_FILENAME = "pr-diff-range.json"; +function getDiffRangesJsonFilePath(env = getEnv()) { + return import_path2.default.join( + getTemporaryDirectory(env), + PR_DIFF_RANGE_JSON_FILENAME + ); +} +async function getDiffInformedAnalysisBranches(codeql, features, logger2) { + if (!await features.getValue("diff_informed_queries" /* DiffInformedQueries */, codeql)) { + return void 0; + } + const gitHubVersion = await getGitHubVersion(); + if (gitHubVersion.type === "GitHub Enterprise Server" /* GHES */ && satisfiesGHESVersion(gitHubVersion.version, "<3.19", true)) { + return void 0; + } + const branches = getPullRequestBranches(); + if (!branches) { + logger2.info( + "Not performing diff-informed analysis because we are not analyzing a pull request." + ); + } + return branches; +} +async function prepareDiffInformedAnalysis(logger2, features, codeql, jsonFilePath) { + let branches; + try { + branches = await getDiffInformedAnalysisBranches(codeql, features, logger2); + } catch (e) { + logger2.warning( + `Failed to determine branch information for diff-informed analysis: ${getErrorMessage(e)}` + ); + return false; + } + if (!branches) { + return false; + } + try { + return await computeAndPersistDiffRanges(logger2, jsonFilePath, branches); + } catch (e) { + logger2.warning( + `Failed to compute diff-informed analysis ranges: ${getErrorMessage(e)}` + ); + return false; + } +} +function writeDiffRangesJsonFile(logger2, jsonFilePath, ranges) { + const jsonContents = JSON.stringify(ranges, null, 2); + fs5.writeFileSync(jsonFilePath, jsonContents); + logger2.debug( + `Wrote pr-diff-range JSON file to ${jsonFilePath}: +${jsonContents}` + ); +} +function readDiffRangesJsonFile(logger2, jsonFilePath) { + if (!fs5.existsSync(jsonFilePath)) { + logger2.debug(`Diff ranges JSON file does not exist at ${jsonFilePath}`); + return void 0; + } + const jsonContents = fs5.readFileSync(jsonFilePath, "utf8"); + logger2.debug( + `Read pr-diff-range JSON file from ${jsonFilePath}: +${jsonContents}` + ); + try { + return JSON.parse(jsonContents); + } catch (e) { + logger2.warning( + `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` + ); + return void 0; + } +} +async function getPullRequestEditedDiffRanges(branches, logger2) { + const fileDiffs = await getFileDiffsWithBasehead(branches, logger2); + if (fileDiffs === void 0) { + return void 0; + } + if (fileDiffs.length >= 300) { + logger2.warning( + `Cannot retrieve the full diff because there are too many (${fileDiffs.length}) changed files in the pull request.` + ); + return void 0; + } + const results = []; + for (const filediff of fileDiffs) { + const diffRanges = getDiffRanges(filediff, logger2); + if (diffRanges === void 0) { + return void 0; + } + results.push(...diffRanges); + } + return results; +} +async function computeAndPersistDiffRanges(logger2, jsonFilePath, branches) { + logger2.info("Computing PR diff ranges..."); + const ranges = await getPullRequestEditedDiffRanges(branches, logger2); + if (ranges === void 0) { + return false; + } + writeDiffRangesJsonFile(logger2, jsonFilePath, ranges); + const distinctFiles = new Set(ranges.map((r) => r.path)).size; + logger2.info( + `Persisted ${ranges.length} diff range(s) across ${distinctFiles} file(s).` + ); + return true; +} +async function getFileDiffsWithBasehead(branches, logger2) { + const repositoryNwo = getRepositoryNwoFromEnv( + "CODE_SCANNING_REPOSITORY", + "GITHUB_REPOSITORY" + ); + const basehead = `${branches.base}...${branches.head}`; + try { + const response = await getApiClient().rest.repos.compareCommitsWithBasehead( + { + owner: repositoryNwo.owner, + repo: repositoryNwo.repo, + basehead, + per_page: 1 + } + ); + logger2.debug( + `Response from compareCommitsWithBasehead(${basehead}): +${JSON.stringify(response, null, 2)}` + ); + return response.data.files; + } catch (error3) { + if (error3.status) { + logger2.warning(`Error retrieving diff ${basehead}: ${error3.message}`); + logger2.debug( + `Error running compareCommitsWithBasehead(${basehead}): +Request: ${JSON.stringify(error3.request, null, 2)} +Error Response: ${JSON.stringify(error3.response, null, 2)}` + ); + return void 0; + } else { + throw error3; + } + } +} +function getDiffRanges(fileDiff, logger2) { + if (fileDiff.patch === void 0) { + if (fileDiff.changes === 0) { + return []; + } + return [ + { + path: fileDiff.filename, + startLine: 0, + endLine: 0 + } + ]; + } + let currentLine = 0; + let additionRangeStartLine = void 0; + const diffRanges = []; + const diffLines = fileDiff.patch.split("\n"); + diffLines.push(" "); + for (const diffLine of diffLines) { + if (diffLine.startsWith("-")) { + continue; + } + if (diffLine.startsWith("+")) { + if (additionRangeStartLine === void 0) { + additionRangeStartLine = currentLine; + } + currentLine++; + continue; + } + if (additionRangeStartLine !== void 0) { + diffRanges.push({ + path: fileDiff.filename, + startLine: additionRangeStartLine, + endLine: currentLine - 1 + }); + additionRangeStartLine = void 0; + } + if (diffLine.startsWith("@@ ")) { + const match2 = diffLine.match(/^@@ -\d+(?:,\d+)? \+(\d+)(?:,\d+)? @@/); + if (match2 === null) { + logger2.warning( + `Cannot parse diff hunk header for ${fileDiff.filename}: ${diffLine}` + ); + return void 0; + } + currentLine = parseInt(match2[1], 10); + continue; + } + if (diffLine.startsWith(" ")) { + currentLine++; + continue; + } + } + return diffRanges; +} + +// src/overlay/index.ts var CODEQL_OVERLAY_MINIMUM_VERSION = "2.23.8"; var CODEQL_OVERLAY_MINIMUM_VERSION_CPP = "2.25.0"; var CODEQL_OVERLAY_MINIMUM_VERSION_CSHARP = "2.24.1"; @@ -179856,12 +180053,12 @@ async function writeBaseDatabaseOidsFile(config, sourceRoot) { const gitFileOids = await getFileOidsUnderPath(sourceRoot); const gitFileOidsJson = JSON.stringify(gitFileOids); const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); - await fs5.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); + await fs6.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); } async function readBaseDatabaseOidsFile(config, logger2) { const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); try { - const contents = await fs5.promises.readFile( + const contents = await fs6.promises.readFile( baseDatabaseOidsFilePath, "utf-8" ); @@ -179883,14 +180080,14 @@ async function writeOverlayChangesFile(config, sourceRoot, logger2) { const diffRangeFiles = await getDiffRangeFilePaths(sourceRoot, logger2); const changedFiles = [.../* @__PURE__ */ new Set([...oidChangedFiles, ...diffRangeFiles])]; const changedFilesJson = JSON.stringify({ changes: changedFiles }); - const overlayChangesFile = path5.join( + const overlayChangesFile = path6.join( getTemporaryDirectory(), "overlay-changes.json" ); logger2.debug( `Writing overlay changed files to ${overlayChangesFile}: ${changedFilesJson}` ); - await fs5.promises.writeFile(overlayChangesFile, changedFilesJson); + await fs6.promises.writeFile(overlayChangesFile, changedFilesJson); return overlayChangesFile; } function computeChangedFiles(baseFileOids, overlayFileOids) { @@ -179909,7 +180106,7 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } async function getDiffRangeFilePaths(sourceRoot, logger2) { const jsonFilePath = getDiffRangesJsonFilePath(); - if (!fs5.existsSync(jsonFilePath)) { + if (!fs6.existsSync(jsonFilePath)) { logger2.debug( `No diff ranges JSON file found at ${jsonFilePath}; skipping.` ); @@ -179917,7 +180114,7 @@ async function getDiffRangeFilePaths(sourceRoot, logger2) { } let contents; try { - contents = await fs5.promises.readFile(jsonFilePath, "utf8"); + contents = await fs6.promises.readFile(jsonFilePath, "utf8"); } catch (e) { logger2.warning( `Failed to read diff ranges JSON file at ${jsonFilePath}: ${e}` @@ -179949,7 +180146,7 @@ async function getDiffRangeFilePaths(sourceRoot, logger2) { return [...new Set(diffRanges.map((r) => r.path))]; } const relativePaths = diffRanges.map( - (r) => path5.relative(sourceRoot, path5.join(repoRoot, r.path)).replaceAll(path5.sep, "/") + (r) => path6.relative(sourceRoot, path6.join(repoRoot, r.path)).replaceAll(path6.sep, "/") ).filter((rel) => !rel.startsWith("..")); return [...new Set(relativePaths)]; } @@ -180329,7 +180526,7 @@ var Features = class extends OfflineFeatures { super(logger2); this.gitHubFeatureFlags = new GitHubFeatureFlags( repositoryNwo, - path6.join(tempDir, FEATURE_FLAGS_FILE_NAME), + path7.join(tempDir, FEATURE_FLAGS_FILE_NAME), logger2 ); } @@ -180461,12 +180658,12 @@ var GitHubFeatureFlags = class { } async readLocalFlags() { try { - if (fs6.existsSync(this.featureFlagsFile)) { + if (fs7.existsSync(this.featureFlagsFile)) { this.logger.debug( `Loading feature flags from ${this.featureFlagsFile}` ); return JSON.parse( - fs6.readFileSync(this.featureFlagsFile, "utf8") + fs7.readFileSync(this.featureFlagsFile, "utf8") ); } } catch (e) { @@ -180479,7 +180676,7 @@ var GitHubFeatureFlags = class { async writeLocalFlags(flags) { try { this.logger.debug(`Writing feature flags to ${this.featureFlagsFile}`); - fs6.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); + fs7.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); } catch (e) { this.logger.warning( `Error writing cached feature flags file ${this.featureFlagsFile}: ${e}.` @@ -180695,13 +180892,13 @@ var SarifScanOrder = [ // src/analyze.ts var fs19 = __toESM(require("fs")); -var path16 = __toESM(require("path")); +var path17 = __toESM(require("path")); var import_perf_hooks5 = require("perf_hooks"); var io6 = __toESM(require_io()); // src/codeql.ts var fs18 = __toESM(require("fs")); -var path15 = __toESM(require("path")); +var path16 = __toESM(require("path")); var core12 = __toESM(require_core()); var toolrunner4 = __toESM(require_toolrunner()); var semver11 = __toESM(require_semver2()); @@ -180957,7 +181154,7 @@ function wrapCliConfigurationError(cliError) { // src/config-utils.ts var fs11 = __toESM(require("fs")); -var path11 = __toESM(require("path")); +var path12 = __toESM(require("path")); var import_perf_hooks2 = require("perf_hooks"); // src/caching-utils.ts @@ -181011,13 +181208,13 @@ function getDependencyCachingEnabled() { } // src/config/db-config.ts -var path8 = __toESM(require("path")); +var path9 = __toESM(require("path")); var jsonschema = __toESM(require_lib2()); var semver4 = __toESM(require_semver2()); // src/diagnostics.ts -var fs7 = __toESM(require("fs")); -var import_path2 = __toESM(require("path")); +var fs8 = __toESM(require("fs")); +var import_path3 = __toESM(require("path")); var TEMP_DIAGNOSTIC_DIR_NAME = "codeql-action-temp-diagnostics"; var CODEQL_ACTION_DIAGNOSTIC_SUBDIR_PARTS = [ "diagnostic", @@ -181033,28 +181230,28 @@ function makeDiagnostic(id, name, data = void 0) { }; } function getLanguageDiagnosticsPath(basePath, language) { - return import_path2.default.resolve( + return import_path3.default.resolve( basePath, language, ...CODEQL_ACTION_DIAGNOSTIC_SUBDIR_PARTS ); } function getTempDiagnosticsRoot(tmpDir) { - return import_path2.default.resolve(tmpDir, TEMP_DIAGNOSTIC_DIR_NAME); + return import_path3.default.resolve(tmpDir, TEMP_DIAGNOSTIC_DIR_NAME); } function getTempLanguageDiagnosticsPath(tmpDir, language) { const root = getTempDiagnosticsRoot(tmpDir); if (language !== void 0) { return getLanguageDiagnosticsPath(root, language); } - return import_path2.default.resolve(root, ...CODEQL_ACTION_DIAGNOSTIC_SUBDIR_PARTS); + return import_path3.default.resolve(root, ...CODEQL_ACTION_DIAGNOSTIC_SUBDIR_PARTS); } function getDatabaseDiagnosticsPath(config, language) { return getLanguageDiagnosticsPath(config.dbLocation, language); } function addDiagnostic(config, language, diagnostic, logger2 = getActionsLogger()) { const databasePath = language ? getCodeQLDatabasePath(config, language) : config.dbLocation; - if (fs7.existsSync(databasePath)) { + if (fs8.existsSync(databasePath)) { writeDiagnostic({ logger: logger2 }, config, language, diagnostic); } else { logger2.debug( @@ -181098,17 +181295,17 @@ ${JSON.stringify(diagnostic)}` } } function writeDiagnosticFile(diagnosticsPath, diagnostic) { - fs7.mkdirSync(diagnosticsPath, { recursive: true }); + fs8.mkdirSync(diagnosticsPath, { recursive: true }); const uniqueSuffix = (diagnosticCounter++).toString(); const sanitizedTimestamp = diagnostic.timestamp.replace( /[^a-zA-Z0-9.-]/g, "" ); - const jsonPath = import_path2.default.resolve( + const jsonPath = import_path3.default.resolve( diagnosticsPath, `codeql-action-${sanitizedTimestamp}-${uniqueSuffix}.json` ); - fs7.writeFileSync(jsonPath, JSON.stringify(diagnostic)); + fs8.writeFileSync(jsonPath, JSON.stringify(diagnostic)); return jsonPath; } function writeDiagnostic(action, config, language, diagnostic) { @@ -181131,7 +181328,7 @@ function logTemporaryDiagnostics(action) { ); for (const temporary of temporaryDiagnostics) { try { - action.logger.debug(fs7.readFileSync(temporary.path, "utf-8")); + action.logger.debug(fs8.readFileSync(temporary.path, "utf-8")); } catch (err) { action.logger.debug( `Failed to read diagnostics from temporary location at '${temporary.path}': ${getErrorMessage(err)}` @@ -181152,18 +181349,18 @@ function flushDiagnostics(action, config) { config, temporary.language ?? config.languages[0] ); - const filename = import_path2.default.basename(temporary.path); - const destination = import_path2.default.join(directory, filename); + const filename = import_path3.default.basename(temporary.path); + const destination = import_path3.default.join(directory, filename); try { - fs7.mkdirSync(directory, { recursive: true }); + fs8.mkdirSync(directory, { recursive: true }); try { - fs7.renameSync(temporary.path, destination); + fs8.renameSync(temporary.path, destination); } catch (renameErr) { if (!isErrnoException(renameErr) || renameErr.code !== "EXDEV") { throw renameErr; } - fs7.copyFileSync(temporary.path, destination); - fs7.unlinkSync(temporary.path); + fs8.copyFileSync(temporary.path, destination); + fs8.unlinkSync(temporary.path); } } catch (err) { action.logger.warning( @@ -181504,11 +181701,11 @@ function parsePacksSpecification(packStr) { throw new ConfigurationError(getPacksStrInvalid(packStr)); } } - if (packPath && (path8.isAbsolute(packPath) || // Permit using "/" instead of "\" on Windows + if (packPath && (path9.isAbsolute(packPath) || // Permit using "/" instead of "\" on Windows // Use `x.split(y).join(z)` as a polyfill for `x.replaceAll(y, z)` since // if we used a regex we'd need to escape the path separator on Windows // which seems more awkward. - path8.normalize(packPath).split(path8.sep).join("/") !== packPath.split(path8.sep).join("/"))) { + path9.normalize(packPath).split(path9.sep).join("/") !== packPath.split(path9.sep).join("/"))) { throw new ConfigurationError(getPacksStrInvalid(packStr)); } if (!packPath && pathStart) { @@ -181730,12 +181927,12 @@ function parseNewRemoteFileAddress(env, configFile) { return new Failure(void 0); } const owner = pieces.groups.owner?.trim(); - const path30 = pieces.groups.path?.trim(); + const path31 = pieces.groups.path?.trim(); const ref = pieces.groups.ref?.trim(); return new Success({ owner: owner || getDefaultOwner(env), repo, - path: path30 || DEFAULT_CONFIG_FILE_NAME, + path: path31 || DEFAULT_CONFIG_FILE_NAME, ref: ref || DEFAULT_CONFIG_FILE_REF }); } @@ -181833,199 +182030,6 @@ async function getRemoteConfig(actionState, configFile, apiDetails) { ); } -// src/diff-informed-analysis-utils.ts -var fs8 = __toESM(require("fs")); -async function getDiffInformedAnalysisBranches(codeql, features, logger2) { - if (!await features.getValue("diff_informed_queries" /* DiffInformedQueries */, codeql)) { - return void 0; - } - const gitHubVersion = await getGitHubVersion(); - if (gitHubVersion.type === "GitHub Enterprise Server" /* GHES */ && satisfiesGHESVersion(gitHubVersion.version, "<3.19", true)) { - return void 0; - } - const branches = getPullRequestBranches(); - if (!branches) { - logger2.info( - "Not performing diff-informed analysis because we are not analyzing a pull request." - ); - } - return branches; -} -async function prepareDiffInformedAnalysis(codeql, features, logger2) { - let branches; - try { - branches = await getDiffInformedAnalysisBranches(codeql, features, logger2); - } catch (e) { - logger2.warning( - `Failed to determine branch information for diff-informed analysis: ${getErrorMessage(e)}` - ); - return false; - } - if (!branches) { - return false; - } - try { - return await computeAndPersistDiffRanges(branches, logger2); - } catch (e) { - logger2.warning( - `Failed to compute diff-informed analysis ranges: ${getErrorMessage(e)}` - ); - return false; - } -} -function writeDiffRangesJsonFile(logger2, ranges) { - const jsonContents = JSON.stringify(ranges, null, 2); - const jsonFilePath = getDiffRangesJsonFilePath(); - fs8.writeFileSync(jsonFilePath, jsonContents); - logger2.debug( - `Wrote pr-diff-range JSON file to ${jsonFilePath}: -${jsonContents}` - ); -} -function readDiffRangesJsonFile(logger2) { - const jsonFilePath = getDiffRangesJsonFilePath(); - if (!fs8.existsSync(jsonFilePath)) { - logger2.debug(`Diff ranges JSON file does not exist at ${jsonFilePath}`); - return void 0; - } - const jsonContents = fs8.readFileSync(jsonFilePath, "utf8"); - logger2.debug( - `Read pr-diff-range JSON file from ${jsonFilePath}: -${jsonContents}` - ); - try { - return JSON.parse(jsonContents); - } catch (e) { - logger2.warning( - `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` - ); - return void 0; - } -} -async function getPullRequestEditedDiffRanges(branches, logger2) { - const fileDiffs = await getFileDiffsWithBasehead(branches, logger2); - if (fileDiffs === void 0) { - return void 0; - } - if (fileDiffs.length >= 300) { - logger2.warning( - `Cannot retrieve the full diff because there are too many (${fileDiffs.length}) changed files in the pull request.` - ); - return void 0; - } - const results = []; - for (const filediff of fileDiffs) { - const diffRanges = getDiffRanges(filediff, logger2); - if (diffRanges === void 0) { - return void 0; - } - results.push(...diffRanges); - } - return results; -} -async function computeAndPersistDiffRanges(branches, logger2) { - logger2.info("Computing PR diff ranges..."); - const ranges = await getPullRequestEditedDiffRanges(branches, logger2); - if (ranges === void 0) { - return false; - } - writeDiffRangesJsonFile(logger2, ranges); - const distinctFiles = new Set(ranges.map((r) => r.path)).size; - logger2.info( - `Persisted ${ranges.length} diff range(s) across ${distinctFiles} file(s).` - ); - return true; -} -async function getFileDiffsWithBasehead(branches, logger2) { - const repositoryNwo = getRepositoryNwoFromEnv( - "CODE_SCANNING_REPOSITORY", - "GITHUB_REPOSITORY" - ); - const basehead = `${branches.base}...${branches.head}`; - try { - const response = await getApiClient().rest.repos.compareCommitsWithBasehead( - { - owner: repositoryNwo.owner, - repo: repositoryNwo.repo, - basehead, - per_page: 1 - } - ); - logger2.debug( - `Response from compareCommitsWithBasehead(${basehead}): -${JSON.stringify(response, null, 2)}` - ); - return response.data.files; - } catch (error3) { - if (error3.status) { - logger2.warning(`Error retrieving diff ${basehead}: ${error3.message}`); - logger2.debug( - `Error running compareCommitsWithBasehead(${basehead}): -Request: ${JSON.stringify(error3.request, null, 2)} -Error Response: ${JSON.stringify(error3.response, null, 2)}` - ); - return void 0; - } else { - throw error3; - } - } -} -function getDiffRanges(fileDiff, logger2) { - if (fileDiff.patch === void 0) { - if (fileDiff.changes === 0) { - return []; - } - return [ - { - path: fileDiff.filename, - startLine: 0, - endLine: 0 - } - ]; - } - let currentLine = 0; - let additionRangeStartLine = void 0; - const diffRanges = []; - const diffLines = fileDiff.patch.split("\n"); - diffLines.push(" "); - for (const diffLine of diffLines) { - if (diffLine.startsWith("-")) { - continue; - } - if (diffLine.startsWith("+")) { - if (additionRangeStartLine === void 0) { - additionRangeStartLine = currentLine; - } - currentLine++; - continue; - } - if (additionRangeStartLine !== void 0) { - diffRanges.push({ - path: fileDiff.filename, - startLine: additionRangeStartLine, - endLine: currentLine - 1 - }); - additionRangeStartLine = void 0; - } - if (diffLine.startsWith("@@ ")) { - const match2 = diffLine.match(/^@@ -\d+(?:,\d+)? \+(\d+)(?:,\d+)? @@/); - if (match2 === null) { - logger2.warning( - `Cannot parse diff hunk header for ${fileDiff.filename}: ${diffLine}` - ); - return void 0; - } - currentLine = parseInt(match2[1], 10); - continue; - } - if (diffLine.startsWith(" ")) { - currentLine++; - continue; - } - } - return diffRanges; -} - // src/languages/builtin.json var builtin_default = { languages: [ @@ -182140,12 +182144,12 @@ Improved incremental analysis will be automatically retried when the next versio // src/overlay/status.ts var fs9 = __toESM(require("fs")); -var path9 = __toESM(require("path")); +var path10 = __toESM(require("path")); var actionsCache = __toESM(require_cache6()); var MAX_CACHE_OPERATION_MS = 3e4; var STATUS_FILE_NAME = "overlay-status.json"; function getStatusFilePath(languages) { - return path9.join( + return path10.join( getTemporaryDirectory(), "overlay-status", [...languages].sort().join("+"), @@ -182184,7 +182188,7 @@ async function getOverlayStatus(codeql, languages, diskUsage, logger2) { const cacheKey3 = await getCacheKey(codeql, languages, diskUsage); const statusFile = getStatusFilePath(languages); try { - await fs9.promises.mkdir(path9.dirname(statusFile), { recursive: true }); + await fs9.promises.mkdir(path10.dirname(statusFile), { recursive: true }); const foundKey = await waitForResultWithTimeLimit( MAX_CACHE_OPERATION_MS, actionsCache.restoreCache([statusFile], cacheKey3, [cacheKey3]), @@ -182222,7 +182226,7 @@ async function saveOverlayStatus(codeql, languages, diskUsage, status, logger2) const cacheKey3 = await getCacheKey(codeql, languages, diskUsage); const statusFile = getStatusFilePath(languages); try { - await fs9.promises.mkdir(path9.dirname(statusFile), { recursive: true }); + await fs9.promises.mkdir(path10.dirname(statusFile), { recursive: true }); await fs9.promises.writeFile(statusFile, JSON.stringify(status)); const cacheId = await waitForResultWithTimeLimit( MAX_CACHE_OPERATION_MS, @@ -182250,7 +182254,7 @@ async function getCacheKey(codeql, languages, diskUsage) { // src/trap-caching.ts var fs10 = __toESM(require("fs")); -var path10 = __toESM(require("path")); +var path11 = __toESM(require("path")); var actionsCache2 = __toESM(require_cache6()); var CACHE_VERSION = 1; var CODEQL_TRAP_CACHE_PREFIX = "codeql-trap"; @@ -182267,12 +182271,12 @@ async function downloadTrapCaches(codeql, languages, logger2, repositoryRoot) { `Found ${languagesSupportingCaching.length} languages that support TRAP caching` ); if (languagesSupportingCaching.length === 0) return result; - const cachesDir = path10.join( + const cachesDir = path11.join( getTemporaryDirectory(), "trapCaches" ); for (const language of languagesSupportingCaching) { - const cacheDir2 = path10.join(cachesDir, language); + const cacheDir2 = path11.join(cachesDir, language); fs10.mkdirSync(cacheDir2, { recursive: true }); result[language] = cacheDir2; } @@ -182285,7 +182289,7 @@ async function downloadTrapCaches(codeql, languages, logger2, repositoryRoot) { let baseSha = "unknown"; const eventPath = process.env.GITHUB_EVENT_PATH; if (getWorkflowEventName() === "pull_request" && eventPath !== void 0) { - const event = JSON.parse(fs10.readFileSync(path10.resolve(eventPath), "utf-8")); + const event = JSON.parse(fs10.readFileSync(path11.resolve(eventPath), "utf-8")); baseSha = event.pull_request?.base?.sha || baseSha; } for (const language of languages) { @@ -182446,7 +182450,7 @@ async function getSupportedLanguageMap(codeql, logger2) { } var baseWorkflowsPath = ".github/workflows"; function hasActionsWorkflows(sourceRoot) { - const workflowsPath = path11.resolve(sourceRoot, baseWorkflowsPath); + const workflowsPath = path12.resolve(sourceRoot, baseWorkflowsPath); const stats = fs11.lstatSync(workflowsPath, { throwIfNoEntry: false }); return stats !== void 0 && stats.isDirectory() && fs11.readdirSync(workflowsPath).length > 0; } @@ -182613,8 +182617,8 @@ async function downloadCacheWithTime(codeQL, languages, logger2, repositoryRoot) async function loadUserConfig(actionState, configFile, workspacePath, apiDetails, tempDir) { if (isLocal(configFile)) { if (configFile !== userConfigFromActionPath(tempDir)) { - configFile = path11.resolve(workspacePath, configFile); - if (!(configFile + path11.sep).startsWith(workspacePath + path11.sep)) { + configFile = path12.resolve(workspacePath, configFile); + if (!(configFile + path12.sep).startsWith(workspacePath + path12.sep)) { throw new ConfigurationError( getConfigFileOutsideWorkspaceErrorMessage(configFile) ); @@ -182895,10 +182899,10 @@ async function setCppTrapCachingEnvironmentVariables(config, logger2) { } } function dbLocationOrDefault(dbLocation, tempDir) { - return dbLocation || path11.resolve(tempDir, "codeql_databases"); + return dbLocation || path12.resolve(tempDir, "codeql_databases"); } function userConfigFromActionPath(tempDir) { - return path11.resolve(tempDir, "user-config-from-action.yml"); + return path12.resolve(tempDir, "user-config-from-action.yml"); } function hasQueryCustomisation(userConfig) { return isDefined2(userConfig["disable-default-queries"]) || isDefined2(userConfig.queries) || isDefined2(userConfig["query-filters"]); @@ -183066,9 +183070,10 @@ async function initConfig(actionState, inputs) { ); } const hasDiffRanges = await prepareDiffInformedAnalysis( - inputs.codeql, + logger2, inputs.features, - logger2 + inputs.codeql, + getDiffRangesJsonFilePath(actionState.env) ); await applyIncrementalAnalysisSettings( config, @@ -183121,14 +183126,14 @@ function getLocalConfig(logger2, configFile, validateConfig) { ); } function getPathToParsedConfigFile(tempDir) { - return path11.join(tempDir, "config"); + return path12.join(tempDir, "config"); } function getPathToFailedConfigFile(tempDir) { - return path11.join(tempDir, "failed-config"); + return path12.join(tempDir, "failed-config"); } function saveConfigFile(logger2, configFilePath, config) { const configString = JSON.stringify(config); - fs11.mkdirSync(path11.dirname(configFilePath), { recursive: true }); + fs11.mkdirSync(path12.dirname(configFilePath), { recursive: true }); fs11.writeFileSync(configFilePath, configString, "utf8"); logger2.debug("Saved config:"); logger2.debug(configString); @@ -183202,7 +183207,7 @@ async function generateRegistries(registriesInput, tempDir, logger2) { let qlconfigFile; if (registries) { const qlconfig = createRegistriesBlock(registries); - qlconfigFile = path11.join(tempDir, "qlconfig.yml"); + qlconfigFile = path12.join(tempDir, "qlconfig.yml"); const qlconfigContents = dump(qlconfig); fs11.writeFileSync(qlconfigFile, qlconfigContents, "utf8"); logger2.debug("Generated qlconfig.yml:"); @@ -183334,7 +183339,7 @@ async function logGeneratedFilesTelemetry(config, duration, generatedFilesCount) // src/setup-codeql.ts var fs16 = __toESM(require("fs")); -var path13 = __toESM(require("path")); +var path14 = __toESM(require("path")); var import_perf_hooks4 = require("perf_hooks"); var toolcache3 = __toESM(require_tool_cache()); var semver10 = __toESM(require_semver2()); @@ -184173,7 +184178,7 @@ function inferCompressionMethod(tarPath) { // src/tools-download.ts var fs15 = __toESM(require("fs")); var os5 = __toESM(require("os")); -var path12 = __toESM(require("path")); +var path13 = __toESM(require("path")); var import_perf_hooks3 = require("perf_hooks"); var core11 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -184299,7 +184304,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger2); } function getToolcacheToolDirectory(env) { - return path12.join( + return path13.join( env.getRequired("RUNNER_TOOL_CACHE" /* RUNNER_TOOL_CACHE */), TOOLCACHE_TOOL_NAME ); @@ -184308,7 +184313,7 @@ function getToolcacheVersionDirectoryName(version) { return semver9.clean(version) || version; } function getToolcacheDirectory(version) { - return path12.join( + return path13.join( getToolcacheToolDirectory(getEnv()), getToolcacheVersionDirectoryName(version), os5.arch() || "" @@ -184369,7 +184374,7 @@ async function deleteToolcacheBundles({ ); continue; } - const versionDirectory = path12.join(toolDirectory, entry.name); + const versionDirectory = path13.join(toolDirectory, entry.name); try { await fs15.promises.rm(versionDirectory, { force: true, @@ -184448,7 +184453,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger2) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs16.existsSync(path13.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs16.existsSync(path14.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger2.debug( @@ -185000,7 +185005,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path13.join(tempDir, v4_default()); + return path14.join(tempDir, v4_default()); } async function getLatestNightlyBundle(action, rawLanguages, otherLanguagePacksReason, variant) { const { logger: logger2 } = action; @@ -185071,7 +185076,7 @@ function isReservedToolsValue(tools) { // src/tracer-config.ts var fs17 = __toESM(require("fs")); -var path14 = __toESM(require("path")); +var path15 = __toESM(require("path")); async function shouldEnableIndirectTracing(codeql, config) { if (config.buildMode === "none" /* None */) { return false; @@ -185086,7 +185091,7 @@ async function endTracingForCluster(codeql, config, logger2) { logger2.info( "Unsetting build tracing environment variables. Subsequent steps of this job will not be traced." ); - const envVariablesFile = path14.resolve( + const envVariablesFile = path15.resolve( config.dbLocation, "temp/tracingEnvironment/end-tracing.json" ); @@ -185113,7 +185118,7 @@ async function endTracingForCluster(codeql, config, logger2) { } } async function getTracerConfigForCluster(logger2, config) { - const filePath = path14.resolve( + const filePath = path15.resolve( config.dbLocation, "temp/tracingEnvironment/start-tracing.json" ); @@ -185162,7 +185167,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV features, logger2 ); - let codeqlCmd = path15.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path16.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -185229,7 +185234,7 @@ async function getCodeQLForCmd(logger2, cmd, checkVersion, env = getEnv()) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path15.join( + const tracingConfigPath = path16.join( extractorPath, "tools", "tracing-config.lua" @@ -185315,7 +185320,7 @@ async function getCodeQLForCmd(logger2, cmd, checkVersion, env = getEnv()) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(env); - const autobuildCmd = path15.join( + const autobuildCmd = path16.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -185741,7 +185746,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path15.resolve(config.tempDir, "user-config.yaml"); + return path16.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -185849,31 +185854,31 @@ async function runAutobuild(config, language, logger2) { // src/dependency-caching.ts var os6 = __toESM(require("os")); -var import_path3 = require("path"); +var import_path4 = require("path"); var actionsCache4 = __toESM(require_cache6()); var glob = __toESM(require_glob()); var CODEQL_DEPENDENCY_CACHE_PREFIX = "codeql-dependencies"; var CODEQL_DEPENDENCY_CACHE_VERSION = 1; function getJavaTempDependencyDir() { - return (0, import_path3.join)(getTemporaryDirectory(), "codeql_java", "repository"); + return (0, import_path4.join)(getTemporaryDirectory(), "codeql_java", "repository"); } async function getJavaDependencyDirs() { return [ // Maven - (0, import_path3.join)(os6.homedir(), ".m2", "repository"), + (0, import_path4.join)(os6.homedir(), ".m2", "repository"), // Gradle - (0, import_path3.join)(os6.homedir(), ".gradle", "caches"), + (0, import_path4.join)(os6.homedir(), ".gradle", "caches"), // CodeQL Java build-mode: none getJavaTempDependencyDir() ]; } function getCsharpTempDependencyDir() { - return (0, import_path3.join)(getTemporaryDirectory(), "codeql_csharp", "repository"); + return (0, import_path4.join)(getTemporaryDirectory(), "codeql_csharp", "repository"); } async function getCsharpDependencyDirs(codeql, features) { const dirs = [ // Nuget - (0, import_path3.join)(os6.homedir(), ".nuget", "packages") + (0, import_path4.join)(os6.homedir(), ".nuget", "packages") ]; if (await features.getValue("csharp_cache_bmn" /* CsharpCacheBuildModeNone */, codeql)) { dirs.push(getCsharpTempDependencyDir()); @@ -185928,7 +185933,7 @@ var defaultCacheConfigs = { getHashPatterns: getCsharpHashPatterns }, go: { - getDependencyPaths: async () => [(0, import_path3.join)(os6.homedir(), "go", "pkg", "mod")], + getDependencyPaths: async () => [(0, import_path4.join)(os6.homedir(), "go", "pkg", "mod")], getHashPatterns: async () => internal.makePatternCheck(["**/go.sum"]) } }; @@ -186136,7 +186141,7 @@ var CodeQLAnalysisError = class extends Error { }; async function determineCheckoutPath(action, config) { const checkoutPathInput = action.actions.getRequiredInput("checkout_path"); - const absCheckoutPathInput = path16.resolve(checkoutPathInput); + const absCheckoutPathInput = path17.resolve(checkoutPathInput); const repositoryRoot = await getGitRoot(absCheckoutPathInput); if (repositoryRoot === void 0) { action.logger.warning( @@ -186214,7 +186219,7 @@ function dbIsFinalized(config, language, logger2) { const dbPath = getCodeQLDatabasePath(config, language); try { const dbInfo = load( - fs19.readFileSync(path16.resolve(dbPath, "codeql-database.yml"), "utf8") + fs19.readFileSync(path17.resolve(dbPath, "codeql-database.yml"), "utf8") ); return !("inProgress" in dbInfo); } catch { @@ -186255,7 +186260,10 @@ async function setupDiffInformedQueryRun(logger2, checkoutPath) { return await withGroupAsync( "Generating diff range extension pack", async () => { - const diffRanges = readDiffRangesJsonFile(logger2); + const diffRanges = readDiffRangesJsonFile( + logger2, + getDiffRangesJsonFilePath() + ); if (diffRanges === void 0) { logger2.info( "No precomputed diff ranges found; skipping diff-informed analysis stage." @@ -186283,7 +186291,7 @@ function diffRangeExtensionPackContents(ranges, checkoutPath) { data: `; let data = ranges.map((range2) => { - const filename = path16.join(checkoutPath, range2.path).replaceAll(path16.sep, "/"); + const filename = path17.join(checkoutPath, range2.path).replaceAll(path17.sep, "/"); return ` - [${dump(filename, { forceQuotes: true, quoteStyle: "double" }).trim()}, ${range2.startLine}, ${range2.endLine}] `; }).join(""); @@ -186296,10 +186304,10 @@ function writeDiffRangeDataExtensionPack(logger2, ranges, checkoutPath) { if (ranges.length === 0) { ranges = [{ path: "", startLine: 0, endLine: 0 }]; } - const diffRangeDir = path16.join(getTemporaryDirectory(), "pr-diff-range"); + const diffRangeDir = path17.join(getTemporaryDirectory(), "pr-diff-range"); fs19.mkdirSync(diffRangeDir, { recursive: true }); fs19.writeFileSync( - path16.join(diffRangeDir, "qlpack.yml"), + path17.join(diffRangeDir, "qlpack.yml"), ` name: codeql-action/pr-diff-range version: 0.0.0 @@ -186314,7 +186322,7 @@ dataExtensions: ranges, checkoutPath ); - const extensionFilePath = path16.join(diffRangeDir, "pr-diff-range.yml"); + const extensionFilePath = path17.join(diffRangeDir, "pr-diff-range.yml"); fs19.writeFileSync(extensionFilePath, extensionContents); logger2.debug( `Wrote pr-diff-range extension pack to ${extensionFilePath}: @@ -186431,7 +186439,7 @@ async function runQueries(sarifFolder, memoryFlag, threadsFlag, diffRangePackDir async function runInterpretResultsFor(analysis, language, queries, enableDebugLogging) { logger2.info(`Interpreting ${analysis.name} results for ${language}`); const category = analysis.fixCategory(logger2, automationDetailsId); - const sarifFile = path16.join( + const sarifFile = path17.join( sarifFolder, addSarifExtension(analysis, language) ); @@ -186719,7 +186727,7 @@ __export(upload_lib_exports, { writePostProcessedFiles: () => writePostProcessedFiles }); var fs24 = __toESM(require("fs")); -var path19 = __toESM(require("path")); +var path20 = __toESM(require("path")); var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core13 = __toESM(require_core()); @@ -186727,7 +186735,7 @@ var jsonschema2 = __toESM(require_lib2()); // src/fingerprints.ts var fs21 = __toESM(require("fs")); -var import_path4 = __toESM(require("path")); +var import_path5 = __toESM(require("path")); // node_modules/long/index.js var wasm = null; @@ -187786,7 +187794,7 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger2) { ); return void 0; } - if (!import_path4.default.isAbsolute(uri)) { + if (!import_path5.default.isAbsolute(uri)) { uri = srcRootPrefix + uri; } if (!fs21.existsSync(uri)) { @@ -187849,7 +187857,7 @@ async function addFingerprints(sarifLog, sourceRoot, logger2) { // src/init.ts var fs22 = __toESM(require("fs")); -var path18 = __toESM(require("path")); +var path19 = __toESM(require("path")); var toolrunner5 = __toESM(require_toolrunner()); var github3 = __toESM(require_github()); var io7 = __toESM(require_io()); @@ -187917,9 +187925,9 @@ async function checkPacksForOverlayCompatibility(codeql, config, logger2) { } function checkPackForOverlayCompatibility(packDir, codeQlOverlayVersion, logger2) { try { - let qlpackPath = path18.join(packDir, "qlpack.yml"); + let qlpackPath = path19.join(packDir, "qlpack.yml"); if (!fs22.existsSync(qlpackPath)) { - qlpackPath = path18.join(packDir, "codeql-pack.yml"); + qlpackPath = path19.join(packDir, "codeql-pack.yml"); } const qlpackContents = load( fs22.readFileSync(qlpackPath, "utf8") @@ -187927,7 +187935,7 @@ function checkPackForOverlayCompatibility(packDir, codeQlOverlayVersion, logger2 if (!qlpackContents.buildMetadata) { return true; } - const packInfoPath = path18.join(packDir, ".packinfo"); + const packInfoPath = path19.join(packDir, ".packinfo"); if (!fs22.existsSync(packInfoPath)) { logger2.warning( `The query pack at ${packDir} does not have a .packinfo file, so it cannot support overlay analysis. Recompiling the query pack with the latest CodeQL CLI should solve this problem.` @@ -187960,7 +187968,7 @@ function checkPackForOverlayCompatibility(packDir, codeQlOverlayVersion, logger2 } async function checkInstallPython311(languages, codeql) { if (languages.includes("python" /* python */) && process.platform === "win32" && !(await codeql.getVersion()).features?.supportsPython312) { - const script = path18.resolve( + const script = path19.resolve( __dirname, "../python-setup", "check_python12.ps1" @@ -188232,10 +188240,10 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo ); codeQL = initCodeQLResult.codeql; } - const baseTempDir = path19.resolve(tempDir, "combined-sarif"); + const baseTempDir = path20.resolve(tempDir, "combined-sarif"); fs24.mkdirSync(baseTempDir, { recursive: true }); - const outputDirectory = fs24.mkdtempSync(path19.resolve(baseTempDir, "output-")); - const outputFile = path19.resolve(outputDirectory, "combined-sarif.sarif"); + const outputDirectory = fs24.mkdtempSync(path20.resolve(baseTempDir, "output-")); + const outputFile = path20.resolve(outputDirectory, "combined-sarif.sarif"); await codeQL.mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory: true }); @@ -188266,7 +188274,7 @@ function getAutomationID2(category, analysis_key, environment) { return computeAutomationID(analysis_key, environment); } function getSavedPayloadPath(analysisKind) { - return path19.join( + return path20.join( getTemporaryDirectory(), `payload-${analysisKind}.json` ); @@ -188316,9 +188324,9 @@ function findSarifFilesInDir(sarifPath, isSarif) { const entries = fs24.readdirSync(dir, { withFileTypes: true }); for (const entry of entries) { if (entry.isFile() && isSarif(entry.name)) { - sarifFiles.push(path19.resolve(dir, entry.name)); + sarifFiles.push(path20.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - walkSarifFiles(path19.resolve(dir, entry.name)); + walkSarifFiles(path20.resolve(dir, entry.name)); } } }; @@ -188351,7 +188359,7 @@ async function getGroupedSarifFilePaths(logger2, sarifPath) { if (stats.isDirectory()) { let unassignedSarifFiles = findSarifFilesInDir( sarifPath, - (name) => path19.extname(name) === ".sarif" + (name) => path20.extname(name) === ".sarif" ); logger2.debug( `Found the following .sarif files in ${sarifPath}: ${unassignedSarifFiles.join(", ")}` @@ -188623,7 +188631,7 @@ function dumpSarifFile(sarifPayload, outputDir, logger2, uploadTarget) { `The path that processed SARIF files should be written to exists, but is not a directory: ${outputDir}` ); } - const outputFile = path19.resolve( + const outputFile = path20.resolve( outputDir, `upload${uploadTarget.sarifExtension}` ); @@ -188758,7 +188766,10 @@ function sanitize(str) { return (str ?? "_").replace(/[^a-zA-Z0-9_]/g, "_").toLocaleUpperCase(); } function filterAlertsByDiffRange(logger2, sarifLog) { - const diffRanges = readDiffRangesJsonFile(logger2); + const diffRanges = readDiffRangesJsonFile( + logger2, + getDiffRangesJsonFilePath() + ); if (!diffRanges?.length) { return sarifLog; } @@ -188877,7 +188888,7 @@ function doesGoExtractionOutputExist(config) { config, "go" /* go */ ); - const trapDirectory = import_path5.default.join( + const trapDirectory = import_path6.default.join( golangDbDirectory, "trap", "go" /* go */ @@ -189031,7 +189042,7 @@ async function run(action) { dbLocations[language] = getCodeQLDatabasePath(config, language); } core14.setOutput("db-locations", dbLocations); - core14.setOutput("sarif-output", import_path5.default.resolve(outputDir)); + core14.setOutput("sarif-output", import_path6.default.resolve(outputDir)); const uploadKind = getUploadValue( getOptionalInput("upload") ); @@ -189183,7 +189194,7 @@ var core16 = __toESM(require_core()); // src/debug-artifacts.ts var fs28 = __toESM(require("fs")); -var path23 = __toESM(require("path")); +var path24 = __toESM(require("path")); var artifact = __toESM(require_artifact2()); var artifactLegacy = __toESM(require_artifact_client2()); var core15 = __toESM(require_core()); @@ -190320,11 +190331,11 @@ var qmarksTestNoExtDot = ([$0]) => { return (f) => f.length === len && f !== "." && f !== ".."; }; var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix"; -var path21 = { +var path22 = { win32: { sep: "\\" }, posix: { sep: "/" } }; -var sep6 = defaultPlatform === "win32" ? path21.win32.sep : path21.posix.sep; +var sep6 = defaultPlatform === "win32" ? path22.win32.sep : path22.posix.sep; minimatch.sep = sep6; var GLOBSTAR = /* @__PURE__ */ Symbol("globstar **"); minimatch.GLOBSTAR = GLOBSTAR; @@ -191071,7 +191082,7 @@ minimatch.escape = escape2; minimatch.unescape = unescape2; // node_modules/readdir-glob/dist/index.mjs -var import_path6 = require("path"); +var import_path7 = require("path"); function readdir2(dir, strict) { return new Promise((resolve$1, reject) => { fs26.readdir(dir, { withFileTypes: true }, (err, files) => { @@ -191112,13 +191123,13 @@ function getStat(file, followSymlinks) { }); }); } -async function* exploreWalkAsync(dir, path30, followSymlinks, useStat, shouldSkip, strict) { - let files = await readdir2(path30 + dir, strict); +async function* exploreWalkAsync(dir, path31, followSymlinks, useStat, shouldSkip, strict) { + let files = await readdir2(path31 + dir, strict); for (const file of files) { let name = file.name; const filename = dir + "/" + name; const relative3 = filename.slice(1); - const absolute = path30 + "/" + relative3; + const absolute = path31 + "/" + relative3; let stat2 = file; if (useStat || followSymlinks) stat2 = await getStat(absolute, followSymlinks) ?? stat2; if (stat2.isDirectory()) { @@ -191128,7 +191139,7 @@ async function* exploreWalkAsync(dir, path30, followSymlinks, useStat, shouldSki absolute, stat: stat2 }; - yield* exploreWalkAsync(filename, path30, followSymlinks, useStat, shouldSkip, false); + yield* exploreWalkAsync(filename, path31, followSymlinks, useStat, shouldSkip, false); } } else yield { relative: relative3, @@ -191137,8 +191148,8 @@ async function* exploreWalkAsync(dir, path30, followSymlinks, useStat, shouldSki }; } } -async function* explore(path30, followSymlinks, useStat, shouldSkip) { - yield* exploreWalkAsync("", path30, followSymlinks, useStat, shouldSkip, true); +async function* explore(path31, followSymlinks, useStat, shouldSkip) { + yield* exploreWalkAsync("", path31, followSymlinks, useStat, shouldSkip, true); } function readOptions(options) { return { @@ -191193,7 +191204,7 @@ var ReaddirGlob = class extends import_events.EventEmitter { const skipPatterns = Array.isArray(this.options.skip) ? this.options.skip : [this.options.skip]; this.skipMatchers = skipPatterns.map((skip) => new Minimatch(skip, { dot: true })); } - this.iterator = explore((0, import_path6.resolve)(cwd || "."), this.options.follow, this.options.stat, this._shouldSkipDirectory.bind(this)); + this.iterator = explore((0, import_path7.resolve)(cwd || "."), this.options.follow, this.options.stat, this._shouldSkipDirectory.bind(this)); this.paused = false; this.inactive = false; this.aborted = false; @@ -191264,7 +191275,7 @@ var src_default = readdirGlob; // node_modules/archiver/lib/core.js var import_lazystream = __toESM(require_lazystream(), 1); var import_async = __toESM(require_async(), 1); -var import_path7 = require("path"); +var import_path8 = require("path"); // node_modules/archiver/lib/error.js var import_util37 = __toESM(require("util"), 1); @@ -191725,11 +191736,11 @@ var Archiver = class extends import_readable_stream2.Transform { task.source = Buffer.concat([]); } else if (stats.isSymbolicLink() && this._supportsSymlink) { const linkPath = (0, import_fs2.readlinkSync)(task.filepath); - const dirName = (0, import_path7.dirname)(task.filepath); + const dirName = (0, import_path8.dirname)(task.filepath); task.data.type = "symlink"; - task.data.linkname = (0, import_path7.relative)( + task.data.linkname = (0, import_path8.relative)( dirName, - (0, import_path7.resolve)(dirName, linkPath) + (0, import_path8.resolve)(dirName, linkPath) ); task.data.sourceType = "buffer"; task.source = Buffer.concat([]); @@ -193569,7 +193580,7 @@ var ZipArchive = class extends Archiver { // src/artifact-scanner.ts var fs27 = __toESM(require("fs")); var os7 = __toESM(require("os")); -var path22 = __toESM(require("path")); +var path23 = __toESM(require("path")); var exec = __toESM(require_exec()); var GITHUB_PAT_CLASSIC_PATTERN = { type: "Personal Access Token (Classic)" /* PersonalAccessClassic */, @@ -193648,9 +193659,9 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log }; try { const tempExtractDir = fs27.mkdtempSync( - path22.join(extractDir, `extract-${depth}-`) + path23.join(extractDir, `extract-${depth}-`) ); - const fileName = path22.basename(archivePath).toLowerCase(); + const fileName = path23.basename(archivePath).toLowerCase(); if (fileName.endsWith(".tar.gz") || fileName.endsWith(".tgz")) { logger2.debug(`Extracting tar.gz file: ${archivePath}`); await exec.exec("tar", ["-xzf", archivePath, "-C", tempExtractDir], { @@ -193667,18 +193678,18 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log ); } else if (fileName.endsWith(".zst")) { logger2.debug(`Extracting zst file: ${archivePath}`); - const outputFile = path22.join( + const outputFile = path23.join( tempExtractDir, - path22.basename(archivePath, ".zst") + path23.basename(archivePath, ".zst") ); await exec.exec("zstd", ["-d", archivePath, "-o", outputFile], { silent: true }); } else if (fileName.endsWith(".gz")) { logger2.debug(`Extracting gz file: ${archivePath}`); - const outputFile = path22.join( + const outputFile = path23.join( tempExtractDir, - path22.basename(archivePath, ".gz") + path23.basename(archivePath, ".gz") ); await exec.exec("gunzip", ["-c", archivePath], { outStream: fs27.createWriteStream(outputFile), @@ -193715,7 +193726,7 @@ async function scanFile(fullPath, relativePath2, extractDir, logger2, depth = 0) scannedFiles: 1, findings: [] }; - const fileName = path22.basename(fullPath).toLowerCase(); + const fileName = path23.basename(fullPath).toLowerCase(); const isArchive = fileName.endsWith(".zip") || fileName.endsWith(".tar.gz") || fileName.endsWith(".tgz") || fileName.endsWith(".tar.zst") || fileName.endsWith(".zst") || fileName.endsWith(".gz"); if (isArchive) { const archiveResult = await scanArchiveFile( @@ -193739,8 +193750,8 @@ async function scanDirectory(dirPath, baseRelativePath, logger2, depth = 0) { }; const entries = fs27.readdirSync(dirPath, { withFileTypes: true }); for (const entry of entries) { - const fullPath = path22.join(dirPath, entry.name); - const relativePath2 = path22.join(baseRelativePath, entry.name); + const fullPath = path23.join(dirPath, entry.name); + const relativePath2 = path23.join(baseRelativePath, entry.name); if (entry.isDirectory()) { const subResult = await scanDirectory( fullPath, @@ -193754,7 +193765,7 @@ async function scanDirectory(dirPath, baseRelativePath, logger2, depth = 0) { const fileResult = await scanFile( fullPath, relativePath2, - path22.dirname(fullPath), + path23.dirname(fullPath), logger2, depth ); @@ -193772,11 +193783,11 @@ async function scanArtifactsForTokens(filesToScan, logger2) { scannedFiles: 0, findings: [] }; - const tempScanDir = fs27.mkdtempSync(path22.join(os7.tmpdir(), "artifact-scan-")); + const tempScanDir = fs27.mkdtempSync(path23.join(os7.tmpdir(), "artifact-scan-")); try { for (const filePath of filesToScan) { const stats = fs27.statSync(filePath); - const fileName = path22.basename(filePath); + const fileName = path23.basename(filePath); if (stats.isDirectory()) { const dirResult = await scanDirectory(filePath, fileName, logger2); result.scannedFiles += dirResult.scannedFiles; @@ -193833,14 +193844,14 @@ async function uploadCombinedSarifArtifacts(logger2, gitHubVariant) { logger2.info( "Uploading available combined SARIF files as Actions debugging artifact..." ); - const baseTempDir = path23.resolve(tempDir, "combined-sarif"); + const baseTempDir = path24.resolve(tempDir, "combined-sarif"); const toUpload = []; if (fs28.existsSync(baseTempDir)) { const outputDirs = fs28.readdirSync(baseTempDir); for (const outputDir of outputDirs) { - const sarifFiles = fs28.readdirSync(path23.resolve(baseTempDir, outputDir)).filter((f) => path23.extname(f) === ".sarif"); + const sarifFiles = fs28.readdirSync(path24.resolve(baseTempDir, outputDir)).filter((f) => path24.extname(f) === ".sarif"); for (const sarifFile of sarifFiles) { - toUpload.push(path23.resolve(baseTempDir, outputDir, sarifFile)); + toUpload.push(path24.resolve(baseTempDir, outputDir, sarifFile)); } } } @@ -193866,12 +193877,12 @@ function tryPrepareSarifDebugArtifact(config, language, logger2) { try { const analyzeActionOutputDir = process.env["CODEQL_ACTION_SARIF_RESULTS_OUTPUT_DIR" /* SARIF_RESULTS_OUTPUT_DIR */]; if (analyzeActionOutputDir !== void 0 && fs28.existsSync(analyzeActionOutputDir) && fs28.lstatSync(analyzeActionOutputDir).isDirectory()) { - const sarifFile = path23.resolve( + const sarifFile = path24.resolve( analyzeActionOutputDir, `${language}.sarif` ); if (fs28.existsSync(sarifFile)) { - const sarifInDbLocation = path23.resolve( + const sarifInDbLocation = path24.resolve( config.dbLocation, `${language}.sarif` ); @@ -193926,13 +193937,13 @@ async function tryUploadAllAvailableDebugArtifacts(codeql, config, logger2) { } logger2.info("Preparing database logs debug artifact..."); const databaseDirectory = getCodeQLDatabasePath(config, language); - const logsDirectory = path23.resolve(databaseDirectory, "log"); + const logsDirectory = path24.resolve(databaseDirectory, "log"); if (doesDirectoryExist(logsDirectory)) { filesToUpload.push(...listFolder(logsDirectory)); logger2.info("Database logs debug artifact ready for upload."); } logger2.info("Preparing database cluster logs debug artifact..."); - const multiLanguageTracingLogsDirectory = path23.resolve( + const multiLanguageTracingLogsDirectory = path24.resolve( config.dbLocation, "log" ); @@ -194008,8 +194019,8 @@ async function uploadArtifacts(logger2, toUpload, rootDir, artifactName, ghVaria try { await artifactUploader.uploadArtifact( sanitizeArtifactName(`${artifactName}${suffix}`), - toUpload.map((file) => path23.normalize(file)), - path23.normalize(rootDir), + toUpload.map((file) => path24.normalize(file)), + path24.normalize(rootDir), { // ensure we don't keep the debug artifacts around for too long since they can be large. retentionDays: 7 @@ -194036,7 +194047,7 @@ async function getArtifactUploaderClient(logger2, ghVariant) { } async function createPartialDatabaseBundle(config, language) { const databasePath = getCodeQLDatabasePath(config, language); - const databaseBundlePath = path23.resolve( + const databaseBundlePath = path24.resolve( config.dbLocation, `${config.debugDatabaseName}-${language}-partial.zip` ); @@ -194217,7 +194228,7 @@ async function runWrapper3() { // src/init-action.ts var fs31 = __toESM(require("fs")); -var path25 = __toESM(require("path")); +var path26 = __toESM(require("path")); var core19 = __toESM(require_core()); var io8 = __toESM(require_io()); var semver12 = __toESM(require_semver2()); @@ -194430,7 +194441,7 @@ function createInitToolsDownloadFields(report, toolsFeatureFlagsValid) { // src/workflow.ts var fs30 = __toESM(require("fs")); -var path24 = __toESM(require("path")); +var path25 = __toESM(require("path")); var import_zlib3 = __toESM(require("zlib")); var core18 = __toESM(require_core()); function toCodedErrors(errors) { @@ -194585,7 +194596,7 @@ async function getWorkflow(logger2) { } async function getWorkflowAbsolutePath(logger2) { const relativePath2 = await getWorkflowRelativePath(); - const absolutePath = path24.join( + const absolutePath = path25.join( getRequiredEnvParam("GITHUB_WORKSPACE"), relativePath2 ); @@ -194810,7 +194821,7 @@ async function run3(actionState) { ); const repositoryProperties = repositoryPropertiesResult.orElse({}); actionState.env.export("CODEQL_ACTION_INIT_HAS_RUN" /* INIT_ACTION_HAS_RUN */, "true"); - sourceRoot = path25.resolve( + sourceRoot = path26.resolve( actionState.env.getRequired("GITHUB_WORKSPACE" /* GITHUB_WORKSPACE */), getOptionalInput("source-root") || "" ); @@ -195028,14 +195039,14 @@ async function run3(actionState) { )) { try { logger2.debug(`Applying static binary workaround for Go`); - const tempBinPath = path25.resolve( + const tempBinPath = path26.resolve( getTemporaryDirectory(), "codeql-action-go-tracing", "bin" ); fs31.mkdirSync(tempBinPath, { recursive: true }); core19.addPath(tempBinPath); - const goWrapperPath = path25.resolve(tempBinPath, "go"); + const goWrapperPath = path26.resolve(tempBinPath, "go"); fs31.writeFileSync( goWrapperPath, `#!/bin/bash @@ -195226,7 +195237,7 @@ var core20 = __toESM(require_core()); // src/init-action-post-helper.ts var fs32 = __toESM(require("fs")); -var import_path8 = __toESM(require("path")); +var import_path9 = __toESM(require("path")); var github4 = __toESM(require_github()); function createFailedUploadFailedSarifResult(error3) { const wrappedError = wrapError(error3); @@ -195361,8 +195372,8 @@ async function uploadSarifArtifact(logger2, prefix, failedSarif) { const name = sanitizeArtifactName(`${prefix}-${suffix}`); await client.uploadArtifact( name, - [import_path8.default.normalize(failedSarif.sarifFile)], - import_path8.default.normalize(import_path8.default.dirname(failedSarif.sarifFile)) + [import_path9.default.normalize(failedSarif.sarifFile)], + import_path9.default.normalize(import_path9.default.dirname(failedSarif.sarifFile)) ); return { sarifID: name }; } finally { @@ -195962,11 +195973,11 @@ async function runWrapper7() { // src/start-proxy-action.ts var import_child_process2 = require("child_process"); -var path29 = __toESM(require("path")); +var path30 = __toESM(require("path")); var core25 = __toESM(require_core()); // src/start-proxy.ts -var path27 = __toESM(require("path")); +var path28 = __toESM(require("path")); var toolcache4 = __toESM(require_tool_cache()); // src/start-proxy/status-report.ts @@ -196304,7 +196315,7 @@ async function getProxyBinaryPath(action, apiDetails) { logger2.info(`Extracted the authentication proxy to '${proxyDir}'.`); } return { - path: path27.join(proxyDir, proxyFileName), + path: path28.join(proxyDir, proxyFileName), version: proxyInfo.version }; } finally { @@ -196375,7 +196386,7 @@ function generateCertificateAuthority() { // src/start-proxy/environment.ts var fs33 = __toESM(require("fs")); -var path28 = __toESM(require("path")); +var path29 = __toESM(require("path")); var toolrunner6 = __toESM(require_toolrunner()); var io9 = __toESM(require_io()); function checkEnvVar(logger2, name) { @@ -196440,12 +196451,12 @@ function discoverActionsJdks() { function checkJdkSettings(logger2, jdkHome) { const filesToCheck = [ // JDK 9+ - path28.join("conf", "net.properties"), + path29.join("conf", "net.properties"), // JDK 8 and below - path28.join("lib", "net.properties") + path29.join("lib", "net.properties") ]; for (const fileToCheck of filesToCheck) { - const file = path28.join(jdkHome, fileToCheck); + const file = path29.join(jdkHome, fileToCheck); try { if (fs33.existsSync(file)) { logger2.debug(`Found '${file}'.`); @@ -196631,7 +196642,7 @@ async function run7(action) { try { persistInputs(); const tempDir = getTemporaryDirectory(); - const proxyLogFilePath = path29.resolve(tempDir, "proxy.log"); + const proxyLogFilePath = path30.resolve(tempDir, "proxy.log"); core25.saveState("proxy-log-file", proxyLogFilePath); const repositoryNwo = getRepositoryNwo(); const gitHubVersion = await getGitHubVersion(); diff --git a/package-lock.json b/package-lock.json index 2e17a0606b..f7bb64e69e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10570,7 +10570,7 @@ "@octokit/core": "^7.0.8", "@octokit/plugin-paginate-rest": ">=16.0.0", "@octokit/plugin-rest-endpoint-methods": "^18.0.0", - "glob": "^13.0.6", + "glob": "^14.0.3", "lite-matter": "^0.1.2", "mdast-util-from-markdown": "^2.1.0", "semver": "^7.8.5", diff --git a/src/actions-util.ts b/src/actions-util.ts index abd29a0522..8ac3dc097d 100644 --- a/src/actions-util.ts +++ b/src/actions-util.ts @@ -78,12 +78,6 @@ export function getTemporaryDirectory(env: ReadOnlyEnv = getEnv()): string { ); } -const PR_DIFF_RANGE_JSON_FILENAME = "pr-diff-range.json"; - -export function getDiffRangesJsonFilePath(env: Env = getEnv()): string { - return path.join(getTemporaryDirectory(env), PR_DIFF_RANGE_JSON_FILENAME); -} - export function getActionVersion(): string { return __CODEQL_ACTION_VERSION__; } diff --git a/src/analyze.ts b/src/analyze.ts index 692d2ef1db..a1b66f5431 100644 --- a/src/analyze.ts +++ b/src/analyze.ts @@ -19,9 +19,10 @@ import { } from "./dependency-caching"; import { addDiagnostic, makeDiagnostic } from "./diagnostics"; import { - DiffThunkRange, + type DiffThunkRange, + getDiffRangesJsonFilePath, readDiffRangesJsonFile, -} from "./diff-informed-analysis-utils"; +} from "./diff-informed"; import { EnvVar } from "./environment"; import { FeatureEnablement, Feature } from "./feature-flags"; import { getGitRoot } from "./git-utils"; @@ -295,7 +296,10 @@ export async function setupDiffInformedQueryRun( return await withGroupAsync( "Generating diff range extension pack", async () => { - const diffRanges = readDiffRangesJsonFile(logger); + const diffRanges = readDiffRangesJsonFile( + logger, + getDiffRangesJsonFilePath(), + ); if (diffRanges === undefined) { logger.info( "No precomputed diff ranges found; skipping diff-informed analysis stage.", diff --git a/src/config-utils.test.ts b/src/config-utils.test.ts index b66d4a797e..5922914085 100644 --- a/src/config-utils.test.ts +++ b/src/config-utils.test.ts @@ -15,6 +15,7 @@ import { createStubCodeQL } from "./codeql"; import { UserConfig } from "./config/db-config"; import * as file from "./config/file"; import * as configUtils from "./config-utils"; +import { ActionsEnvVars } from "./environment"; import * as errorMessages from "./error-messages"; import { Feature } from "./feature-flags"; import { RepositoryProperties } from "./feature-flags/properties"; @@ -42,6 +43,7 @@ import { SAMPLE_DOTCOM_API_DETAILS, AssertableTarget, RecordingLogger, + getTestEnv, } from "./testing-utils"; import { GitHubVariant, @@ -151,9 +153,11 @@ function mockListLanguages(languages: string[]) { test.serial("load empty config", async (t) => { return await withTmpDir(async (tempDir) => { const logger = new RecordingLogger(); + const state = initAllState({ logger }); + const languages = "javascript,python"; - setupActionsVars(tempDir, tempDir); + setupActionsVars(tempDir, tempDir, {}, state.env); const codeql = createStubCodeQL({ async resolveLanguages() { @@ -166,7 +170,6 @@ test.serial("load empty config", async (t) => { }, }); - const state = initAllState({ logger }); const config = await configUtils.initConfig( state, createTestInitConfigInputs({ @@ -197,9 +200,10 @@ test.serial("load empty config", async (t) => { test.serial("load code quality config", async (t) => { return await withTmpDir(async (tempDir) => { const logger = new RecordingLogger(); + const state = initAllState({ logger }); const languages = "actions"; - setupActionsVars(tempDir, tempDir); + setupActionsVars(tempDir, tempDir, {}, state.env); const codeql = createStubCodeQL({ async resolveLanguages() { @@ -211,7 +215,6 @@ test.serial("load code quality config", async (t) => { }, }); - const state = initAllState({ logger }); const config = await configUtils.initConfig( state, createTestInitConfigInputs({ @@ -253,9 +256,10 @@ test.serial( async (t) => { return await withTmpDir(async (tempDir) => { const logger = new RecordingLogger(); + const state = initAllState({ logger }); const languages = "javascript"; - setupActionsVars(tempDir, tempDir); + setupActionsVars(tempDir, tempDir, {}, state.env); const codeql = createStubCodeQL({ async resolveLanguages() { @@ -291,7 +295,6 @@ test.serial( repositoryProperties, }); - const state = initAllState({ logger }); await t.notThrowsAsync(async () => { const config = await configUtils.initConfig( state, @@ -316,6 +319,8 @@ test.serial( test.serial("loading a saved config produces the same config", async (t) => { return await withTmpDir(async (tempDir) => { const logger = new RecordingLogger(); + const state = initAllState({ logger }); + setupActionsVars(tempDir, tempDir, {}, state.env); const codeql = createStubCodeQL({ async resolveLanguages() { @@ -334,7 +339,6 @@ test.serial("loading a saved config produces the same config", async (t) => { // Sanity check that getConfig returns undefined before we have called initConfig t.deepEqual(await configUtils.getConfig(tempDir, logger), undefined); - const state = initAllState({ logger }); const config1 = await configUtils.initConfig( state, createTestInitConfigInputs({ @@ -364,6 +368,8 @@ test.serial("loading a saved config produces the same config", async (t) => { test.serial("loading config with version mismatch throws", async (t) => { return await withTmpDir(async (tempDir) => { const logger = new RecordingLogger(); + const state = initAllState({ logger }); + setupActionsVars(tempDir, tempDir, {}, state.env); const codeql = createStubCodeQL({ async resolveLanguages() { @@ -387,7 +393,6 @@ test.serial("loading config with version mismatch throws", async (t) => { .stub(actionsUtil, "getActionVersion") .returns("does-not-exist"); - const state = initAllState({ logger }); const config = await configUtils.initConfig( state, createTestInitConfigInputs({ @@ -497,7 +502,8 @@ const otherConfigFileContents = ` test.serial("load non-empty input", async (t) => { return await withTmpDir(async (tempDir) => { - setupActionsVars(tempDir, tempDir); + const state = initAllState(); + setupActionsVars(tempDir, tempDir, {}, state.env); const codeql = createStubCodeQL({ async resolveLanguages() { @@ -538,7 +544,6 @@ test.serial("load non-empty input", async (t) => { const languagesInput = "javascript"; const configFilePath = createConfigFile(otherConfigFileContents, tempDir); - const state = initAllState(); const actualConfig = await configUtils.initConfig( state, createTestInitConfigInputs({ @@ -657,7 +662,9 @@ test.serial("API client used when reading remote config", async (t) => { const configFile = "octo-org/codeql-config/config.yaml@main"; const languagesInput = "javascript"; - const state = initAllState(); + const state = initAllState({ + env: getTestEnv({ [ActionsEnvVars.RUNNER_TEMP]: tempDir }), + }); await configUtils.initConfig( state, createTestInitConfigInputs({ diff --git a/src/config-utils.ts b/src/config-utils.ts index b59149e47f..ae271a9c9c 100644 --- a/src/config-utils.ts +++ b/src/config-utils.ts @@ -48,7 +48,10 @@ import { addNoLanguageDiagnostic, makeTelemetryDiagnostic, } from "./diagnostics"; -import { prepareDiffInformedAnalysis } from "./diff-informed-analysis-utils"; +import { + getDiffRangesJsonFilePath, + prepareDiffInformedAnalysis, +} from "./diff-informed"; import { EnvVar, exportEnvVar, getEnv } from "./environment"; import * as errorMessages from "./error-messages"; import { Feature, FeatureEnablement, FeatureWithoutCLI } from "./feature-flags"; @@ -1288,9 +1291,10 @@ export async function initConfig( } const hasDiffRanges = await prepareDiffInformedAnalysis( - inputs.codeql, - inputs.features, logger, + inputs.features, + inputs.codeql, + getDiffRangesJsonFilePath(actionState.env), ); await applyIncrementalAnalysisSettings( diff --git a/src/diff-informed-analysis-utils.test.ts b/src/diff-informed/index.test.ts similarity index 94% rename from src/diff-informed-analysis-utils.test.ts rename to src/diff-informed/index.test.ts index 76e5f33b4d..f9bb52b220 100644 --- a/src/diff-informed-analysis-utils.test.ts +++ b/src/diff-informed/index.test.ts @@ -1,16 +1,12 @@ import test, { ExecutionContext } from "ava"; import * as sinon from "sinon"; -import * as actionsUtil from "./actions-util"; -import type { PullRequestBranches } from "./actions-util"; -import * as apiClient from "./api-client"; -import { - getDiffInformedAnalysisBranches, - prepareDiffInformedAnalysis, - exportedForTesting, -} from "./diff-informed-analysis-utils"; -import { Feature, FeatureEnablement, initFeatures } from "./feature-flags"; -import { parseRepositoryNwo } from "./repository"; +import * as actionsUtil from "../actions-util"; +import type { PullRequestBranches } from "../actions-util"; +import * as apiClient from "../api-client"; +import { getEnv } from "../environment"; +import { Feature, FeatureEnablement, initFeatures } from "../feature-flags"; +import { parseRepositoryNwo } from "../repository"; import { setupTests, createFeatures, @@ -19,9 +15,16 @@ import { setupActionsVars, makeMacro, RecordingLogger, -} from "./testing-utils"; -import { GitHubVariant, withTmpDir } from "./util"; -import type { GitHubVersion } from "./util"; +} from "../testing-utils"; +import { GitHubVariant, withTmpDir } from "../util"; +import type { GitHubVersion } from "../util"; + +import { + getDiffInformedAnalysisBranches, + prepareDiffInformedAnalysis, + exportedForTesting, + getDiffRangesJsonFilePath, +} from "."; setupTests(test); @@ -192,9 +195,10 @@ test.serial( .resolves({ type: GitHubVariant.DOTCOM }); const result = await prepareDiffInformedAnalysis( - codeql, - features, logger, + features, + codeql, + getDiffRangesJsonFilePath(getEnv()), ); t.false(result); @@ -222,9 +226,10 @@ test.serial( }; const result = await prepareDiffInformedAnalysis( - codeql, - features, logger, + features, + codeql, + getDiffRangesJsonFilePath(getEnv()), ); t.false(result); @@ -259,9 +264,10 @@ test.serial( } as any); const result = await prepareDiffInformedAnalysis( - codeql, - features, logger, + features, + codeql, + getDiffRangesJsonFilePath(getEnv()), ); t.true(result); @@ -296,9 +302,10 @@ test.serial( } as any); const result = await prepareDiffInformedAnalysis( - codeql, - features, logger, + features, + codeql, + getDiffRangesJsonFilePath(getEnv()), ); t.false(result); diff --git a/src/diff-informed-analysis-utils.ts b/src/diff-informed/index.ts similarity index 74% rename from src/diff-informed-analysis-utils.ts rename to src/diff-informed/index.ts index b8e9c6915d..86573b958b 100644 --- a/src/diff-informed-analysis-utils.ts +++ b/src/diff-informed/index.ts @@ -1,23 +1,43 @@ import * as fs from "fs"; +import path from "path"; -import * as actionsUtil from "./actions-util"; -import type { PullRequestBranches } from "./actions-util"; -import { getApiClient, getGitHubVersion } from "./api-client"; -import type { CodeQL } from "./codeql"; -import { Feature, FeatureEnablement } from "./feature-flags"; -import { Logger } from "./logging"; -import { getRepositoryNwoFromEnv } from "./repository"; -import { getErrorMessage, GitHubVariant, satisfiesGHESVersion } from "./util"; +import * as actionsUtil from "../actions-util"; +import type { PullRequestBranches } from "../actions-util"; +import { getApiClient, getGitHubVersion } from "../api-client"; +import type { CodeQL } from "../codeql"; +import { type Env, getEnv } from "../environment"; +import type { FeatureEnablement } from "../feature-flags"; +import { Feature } from "../feature-flags/features"; +import { Logger } from "../logging"; +import { getRepositoryNwoFromEnv } from "../repository"; +import { getErrorMessage, GitHubVariant, satisfiesGHESVersion } from "../util"; + +/** The filename used to persist PR diff ranges. */ +const PR_DIFF_RANGE_JSON_FILENAME = "pr-diff-range.json"; + +/** + * Gets the full path of the file used to persist PR diff ranges. + */ +export function getDiffRangesJsonFilePath(env: Env = getEnv()): string { + return path.join( + actionsUtil.getTemporaryDirectory(env), + PR_DIFF_RANGE_JSON_FILENAME, + ); +} /** * This interface is an abbreviated version of the file diff object returned by * the GitHub API. */ -interface FileDiff { +export interface FileDiff { + /** The name of the file that has changed. */ filename: string; + /** The number of changes. */ changes: number; - // A patch may be absent if the file is binary, if the file diff is too large, - // or if the file is unchanged. + /** + * The diff, if available. It may be absent if the file is binary, if the file diff is too large, + * or if the file is unchanged. + */ patch?: string | undefined; } @@ -63,9 +83,10 @@ export async function getDiffInformedAnalysisBranches( * and are therefore available for use, `false` otherwise. */ export async function prepareDiffInformedAnalysis( - codeql: CodeQL, - features: FeatureEnablement, logger: Logger, + features: FeatureEnablement, + codeql: CodeQL, + jsonFilePath: string, ): Promise { let branches: PullRequestBranches | undefined; try { @@ -84,7 +105,7 @@ export async function prepareDiffInformedAnalysis( } try { - return await computeAndPersistDiffRanges(branches, logger); + return await computeAndPersistDiffRanges(logger, jsonFilePath, branches); } catch (e) { logger.warning( `Failed to compute diff-informed analysis ranges: ${getErrorMessage(e)}`, @@ -93,29 +114,45 @@ export async function prepareDiffInformedAnalysis( } } +/** Describes a changed line range in a file. */ export interface DiffThunkRange { /** Relative path from the repository root, using forward slashes as separators. */ path: string; + /** The starting line of the change (1-based and inclusive). */ startLine: number; + /** The last line of the change (1-based and inclusive). */ endLine: number; } +/** + * Writes an array of {@link DiffThunkRange} objects to the file given by {@link jsonFilePath}. + * + * @param logger The logger to use. + * @param jsonFilePath The path of the file to write. + * @param ranges The changed line ranges to write. + */ export function writeDiffRangesJsonFile( logger: Logger, + jsonFilePath: string, ranges: DiffThunkRange[], ): void { const jsonContents = JSON.stringify(ranges, null, 2); - const jsonFilePath = actionsUtil.getDiffRangesJsonFilePath(); fs.writeFileSync(jsonFilePath, jsonContents); logger.debug( `Wrote pr-diff-range JSON file to ${jsonFilePath}:\n${jsonContents}`, ); } +/** + * Reads an array of {@link DiffThunkRange} objects from the file given by {@link jsonFilePath}. + * + * @param logger The logger to use. + * @returns The array of {@link DiffThunkRange} objects or `undefined` if the file couldn't be read. + */ export function readDiffRangesJsonFile( logger: Logger, + jsonFilePath: string, ): DiffThunkRange[] | undefined { - const jsonFilePath = actionsUtil.getDiffRangesJsonFilePath(); if (!fs.existsSync(jsonFilePath)) { logger.debug(`Diff ranges JSON file does not exist at ${jsonFilePath}`); return undefined; @@ -138,12 +175,12 @@ export function readDiffRangesJsonFile( * Return the file line ranges that were added or modified in the pull request. * * @param branches The base and head branches of the pull request. - * @param logger - * @returns An array of tuples, where each tuple contains the relative path of a - * file (relative to the repository root, as returned by the GitHub compare API), - * the start line and the end line (both 1-based and inclusive) of an - * added or modified range in that file. Returns `undefined` if the action was - * not triggered by a pull request or if there was an error. + * @param logger The logger to use. + * + * @returns + * An array of {@link DiffThunkRange} objects, where each describes a line range in a file + * that was changed in the pull request described by {@link branches} or `undefined` if + * we were unable to compute them. */ export async function getPullRequestEditedDiffRanges( branches: PullRequestBranches, @@ -180,22 +217,25 @@ export async function getPullRequestEditedDiffRanges( * diff from the GitHub API and writes it to the diff ranges JSON file so that * CodeQL can use it for diff-informed analysis. * + * @param logger The logger to use. + * @param jsonFilePath The path of the JSON file to write. * @param branches The base and head branches of the pull request, as returned * by `getDiffInformedAnalysisBranches`. - * @param logger + * * @returns `true` if the diff ranges were successfully computed and persisted, * otherwise `false`. */ export async function computeAndPersistDiffRanges( - branches: PullRequestBranches, logger: Logger, + jsonFilePath: string, + branches: PullRequestBranches, ): Promise { logger.info("Computing PR diff ranges..."); const ranges = await getPullRequestEditedDiffRanges(branches, logger); if (ranges === undefined) { return false; } - writeDiffRangesJsonFile(logger, ranges); + writeDiffRangesJsonFile(logger, jsonFilePath, ranges); const distinctFiles = new Set(ranges.map((r) => r.path)).size; logger.info( `Persisted ${ranges.length} diff range(s) across ${distinctFiles} file(s).`, @@ -203,6 +243,19 @@ export async function computeAndPersistDiffRanges( return true; } +/** + * Fetch an array of {@link FileDiff} objects using the GitHub API describing the changed files + * in the pull request with the base and head refs given by {@link branches}. + * + * @param branches The pull request branch refs. + * @param logger The logger to use. + * + * @throws Non-HTTP errors that occur while fetching the file diffs. + * + * @returns + * An array of {@link FileDiff} objects describing the changed files in the PR, or + * `undefined` if we couldn't obtain the changed files from the API. + */ async function getFileDiffsWithBasehead( branches: PullRequestBranches, logger: Logger, @@ -243,6 +296,16 @@ async function getFileDiffsWithBasehead( } } +/** + * Extracts an array of {@link DiffThunkRange} objects from {@link fileDiff}. + * + * @param fileDiff The {@link FileDiff} object describing changes to a particular file. + * @param logger The logger to use. + * + * @returns + * The {@link DiffThunkRange} objects extracted from {@link fileDiff}, + * or `undefined` if there are none that could be extracted. + */ function getDiffRanges( fileDiff: FileDiff, logger: Logger, diff --git a/src/overlay/index.test.ts b/src/overlay/index.test.ts index 4534006f80..daa607a1d7 100644 --- a/src/overlay/index.test.ts +++ b/src/overlay/index.test.ts @@ -5,6 +5,7 @@ import test from "ava"; import * as sinon from "sinon"; import * as actionsUtil from "../actions-util"; +import * as diffInformed from "../diff-informed"; import * as gitUtils from "../git-utils"; import { createTestConfig, @@ -60,7 +61,7 @@ test.serial( const diffRangeFilePath = path.join(tempDir, "pr-diff-range.json"); sinon.stub(actionsUtil, "getTemporaryDirectory").returns(tempDir); sinon - .stub(actionsUtil, "getDiffRangesJsonFilePath") + .stub(diffInformed, "getDiffRangesJsonFilePath") .returns(diffRangeFilePath); sinon.stub(gitUtils, "getGitRoot").resolves(sourceRoot); const changesFilePath = await writeOverlayChangesFile( @@ -126,7 +127,7 @@ test.serial( const diffRangeFilePath = path.join(tempDir, "pr-diff-range.json"); sinon.stub(actionsUtil, "getTemporaryDirectory").returns(tempDir); sinon - .stub(actionsUtil, "getDiffRangesJsonFilePath") + .stub(diffInformed, "getDiffRangesJsonFilePath") .returns(diffRangeFilePath); sinon.stub(gitUtils, "getGitRoot").resolves(sourceRoot); @@ -196,7 +197,7 @@ test.serial( const diffRangeFilePath = path.join(tempDir, "pr-diff-range.json"); sinon.stub(actionsUtil, "getTemporaryDirectory").returns(tempDir); sinon - .stub(actionsUtil, "getDiffRangesJsonFilePath") + .stub(diffInformed, "getDiffRangesJsonFilePath") .returns(diffRangeFilePath); sinon.stub(gitUtils, "getGitRoot").resolves(sourceRoot); @@ -259,7 +260,7 @@ test.serial( const diffRangeFilePath = path.join(tempDir, "pr-diff-range.json"); sinon.stub(actionsUtil, "getTemporaryDirectory").returns(tempDir); sinon - .stub(actionsUtil, "getDiffRangesJsonFilePath") + .stub(diffInformed, "getDiffRangesJsonFilePath") .returns(diffRangeFilePath); // getGitRoot returns the repo root (parent of sourceRoot) sinon.stub(gitUtils, "getGitRoot").resolves(repoRoot); diff --git a/src/overlay/index.ts b/src/overlay/index.ts index 16c4d80c1f..1f93ddb6b6 100644 --- a/src/overlay/index.ts +++ b/src/overlay/index.ts @@ -1,9 +1,9 @@ import * as fs from "fs"; import * as path from "path"; -import * as actionsUtil from "../actions-util"; import { getOptionalInput, getTemporaryDirectory } from "../actions-util"; import { type Config } from "../config-utils"; +import { getDiffRangesJsonFilePath } from "../diff-informed"; import { getFileOidsUnderPath, getGitRoot } from "../git-utils"; import { Logger } from "../logging"; import { getBaseDatabaseOidsFilePath } from "../util"; @@ -135,7 +135,7 @@ async function getDiffRangeFilePaths( sourceRoot: string, logger: Logger, ): Promise { - const jsonFilePath = actionsUtil.getDiffRangesJsonFilePath(); + const jsonFilePath = getDiffRangesJsonFilePath(); if (!fs.existsSync(jsonFilePath)) { logger.debug( diff --git a/src/upload-lib.test.ts b/src/upload-lib.test.ts index 028cce504b..04d1f76aa3 100644 --- a/src/upload-lib.test.ts +++ b/src/upload-lib.test.ts @@ -9,7 +9,7 @@ import * as sinon from "sinon"; import * as analyses from "./analyses"; import { AnalysisKind, CodeQuality, CodeScanning } from "./analyses"; import * as api from "./api-client"; -import * as diffUtils from "./diff-informed-analysis-utils"; +import * as diffUtils from "./diff-informed"; import { getEnv } from "./environment"; import { Logger } from "./logging"; import * as sarif from "./sarif"; @@ -1074,6 +1074,7 @@ function runFilterAlertsByDiffRange( logger: Logger = new RecordingLogger(), ): Partial { sinon.stub(diffUtils, "readDiffRangesJsonFile").returns(diffRanges); + sinon.stub(diffUtils, "getDiffRangesJsonFilePath").returns(""); return uploadLib.filterAlertsByDiffRange(logger, input); } diff --git a/src/upload-lib.ts b/src/upload-lib.ts index 52f6fdba66..e9b5013baa 100644 --- a/src/upload-lib.ts +++ b/src/upload-lib.ts @@ -13,7 +13,10 @@ import * as api from "./api-client"; import { getGitHubVersion, wrapApiConfigurationError } from "./api-client"; import { CodeQL, getCodeQL } from "./codeql"; import type { ActionConfig } from "./config/action-config"; -import { readDiffRangesJsonFile } from "./diff-informed-analysis-utils"; +import { + getDiffRangesJsonFilePath, + readDiffRangesJsonFile, +} from "./diff-informed"; import { ActionsEnvVars, EnvVar, exportEnvVar } from "./environment"; import { FeatureEnablement } from "./feature-flags"; import * as fingerprints from "./fingerprints"; @@ -1079,7 +1082,10 @@ export function filterAlertsByDiffRange( logger: Logger, sarifLog: Partial, ): Partial { - const diffRanges = readDiffRangesJsonFile(logger); + const diffRanges = readDiffRangesJsonFile( + logger, + getDiffRangesJsonFilePath(), + ); if (!diffRanges?.length) { return sarifLog; }