diff --git a/.github/workflows/__bundle-from-nightly.yml b/.github/workflows/__bundle-from-nightly.yml new file mode 100644 index 0000000000..e4eaf6312c --- /dev/null +++ b/.github/workflows/__bundle-from-nightly.yml @@ -0,0 +1,69 @@ +# Warning: This file is generated automatically, and should not be modified. +# Instead, please modify the template in the pr-checks directory and run: +# pr-checks/sync.sh +# to regenerate this file. + +name: 'PR Check - Bundle: From nightly' +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GO111MODULE: auto +on: + push: + branches: + - main + - releases/v* + pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review + schedule: + - cron: '0 5 * * *' + workflow_dispatch: + inputs: {} + workflow_call: + inputs: {} +defaults: + run: + shell: bash +concurrency: + cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} + group: bundle-from-nightly-${{github.ref}} +jobs: + bundle-from-nightly: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + version: linked + name: 'Bundle: From nightly' + if: github.triggering_actor != 'dependabot[bot]' + permissions: + contents: read + security-events: read + timeout-minutes: 45 + runs-on: ${{ matrix.os }} + steps: + - name: Check out repository + uses: actions/checkout@v6 + - name: Prepare test + id: prepare-test + uses: ./.github/actions/prepare-test + with: + version: ${{ matrix.version }} + use-all-platform-bundle: 'false' + setup-kotlin: 'true' + - id: init + uses: ./../action/init + env: + CODEQL_ACTION_FORCE_NIGHTLY: true + with: + tools: ${{ steps.prepare-test.outputs.tools-url }} + languages: javascript + - name: Fail if the CodeQL version is not a nightly + if: "!contains(steps.init.outputs.codeql-version, '+')" + run: exit 1 + env: + CODEQL_ACTION_TEST_MODE: true diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index 2920609e05..901f23e068 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -161566,6 +161566,11 @@ var featureConfig = { legacyApi: true, minimumVersion: void 0 }, + ["force_nightly" /* ForceNightly */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_FORCE_NIGHTLY", + minimumVersion: void 0 + }, ["ignore_generated_files" /* IgnoreGeneratedFiles */]: { defaultValue: false, envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES", diff --git a/lib/analyze-action.js b/lib/analyze-action.js index 40348b31f5..e23cafe574 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -107118,6 +107118,7 @@ function formatDuration(durationMs) { // src/diagnostics.ts var unwrittenDiagnostics = []; +var unwrittenDefaultLanguageDiagnostics = []; function makeDiagnostic(id, name, data = void 0) { return { ...data, @@ -107137,6 +107138,19 @@ function addDiagnostic(config, language, diagnostic) { unwrittenDiagnostics.push({ diagnostic, language }); } } +function addNoLanguageDiagnostic(config, diagnostic) { + if (config !== void 0) { + addDiagnostic( + config, + // Arbitrarily choose the first language. We could also choose all languages, but that + // increases the risk of misinterpreting the data. + config.languages[0], + diagnostic + ); + } else { + unwrittenDefaultLanguageDiagnostics.push(diagnostic); + } +} function writeDiagnostic(config, language, diagnostic) { const logger = getActionsLogger(); const databasePath = language ? getCodeQLDatabasePath(config, language) : config.dbLocation; @@ -107634,6 +107648,11 @@ var featureConfig = { legacyApi: true, minimumVersion: void 0 }, + ["force_nightly" /* ForceNightly */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_FORCE_NIGHTLY", + minimumVersion: void 0 + }, ["ignore_generated_files" /* IgnoreGeneratedFiles */]: { defaultValue: false, envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES", @@ -108975,10 +108994,36 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian let cliVersion2; let tagName; let url2; - if (toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput)) { - logger.info( - `Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.` - ); + const canForceNightlyWithFF = isDynamicWorkflow() || isInTestMode(); + const forceNightlyValueFF = await features.getValue("force_nightly" /* ForceNightly */); + const forceNightly = forceNightlyValueFF && canForceNightlyWithFF; + const nightlyRequestedByToolsInput = toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput); + if (forceNightly || nightlyRequestedByToolsInput) { + if (forceNightly) { + logger.info( + `Using the latest CodeQL CLI nightly, as forced by the ${"force_nightly" /* ForceNightly */} feature flag.` + ); + addNoLanguageDiagnostic( + void 0, + makeDiagnostic( + "codeql-action/forced-nightly-cli", + "A nightly release of CodeQL was used", + { + markdownMessage: "GitHub configured this analysis to use a nightly release of CodeQL to allow you to preview changes from an upcoming release.\n\nNightly releases do not undergo the same validation as regular releases and may lead to analysis instability.\n\nIf use of a nightly CodeQL release for this analysis is unexpected, please contact GitHub support.", + visibility: { + cliSummaryTable: true, + statusPage: true, + telemetry: true + }, + severity: "note" + } + ) + ); + } else { + logger.info( + `Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.` + ); + } toolsInput = await getNightlyToolsUrl(logger); } const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput); diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index 61525b980d..95bfad8d48 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -103971,6 +103971,11 @@ var featureConfig = { legacyApi: true, minimumVersion: void 0 }, + ["force_nightly" /* ForceNightly */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_FORCE_NIGHTLY", + minimumVersion: void 0 + }, ["ignore_generated_files" /* IgnoreGeneratedFiles */]: { defaultValue: false, envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES", diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 2fb2de3518..88c1970e84 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -1337,14 +1337,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 path16 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path17 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path16 && path16[0] !== "/") { - path16 = `/${path16}`; + if (path17 && path17[0] !== "/") { + path17 = `/${path17}`; } - return new URL(`${origin}${path16}`); + return new URL(`${origin}${path17}`); } if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); @@ -1795,39 +1795,39 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path16, origin } + request: { method, path: path17, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path16); + debuglog("sending request to %s %s/%s", method, origin, path17); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path16, origin }, + request: { method, path: path17, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path16, + path17, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path16, origin } + request: { method, path: path17, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path16); + debuglog("trailers received from %s %s/%s", method, origin, path17); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path16, origin }, + request: { method, path: path17, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path16, + path17, error3.message ); }); @@ -1876,9 +1876,9 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path16, origin } + request: { method, path: path17, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path16); + debuglog("sending request to %s %s/%s", method, origin, path17); }); } diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { @@ -1941,7 +1941,7 @@ var require_request = __commonJS({ var kHandler = /* @__PURE__ */ Symbol("handler"); var Request = class { constructor(origin, { - path: path16, + path: path17, method, body, headers, @@ -1956,11 +1956,11 @@ var require_request = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path16 !== "string") { + if (typeof path17 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path16[0] !== "/" && !(path16.startsWith("http://") || path16.startsWith("https://")) && method !== "CONNECT") { + } else if (path17[0] !== "/" && !(path17.startsWith("http://") || path17.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path16)) { + } else if (invalidPathRegex.test(path17)) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -2023,7 +2023,7 @@ var require_request = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? buildURL(path16, query) : path16; + this.path = query ? buildURL(path17, query) : path17; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -6536,7 +6536,7 @@ var require_client_h1 = __commonJS({ return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } function writeH1(client, request2) { - const { method, path: path16, host, upgrade, blocking, reset } = request2; + const { method, path: path17, host, upgrade, blocking, reset } = request2; let { body, headers, contentLength } = request2; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; if (util.isFormDataLike(body)) { @@ -6602,7 +6602,7 @@ var require_client_h1 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path16} HTTP/1.1\r + let header = `${method} ${path17} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -7128,7 +7128,7 @@ var require_client_h2 = __commonJS({ } function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path: path16, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path17, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; let { body } = request2; if (upgrade) { util.errorRequest(client, request2, new Error("Upgrade not supported for H2")); @@ -7195,7 +7195,7 @@ var require_client_h2 = __commonJS({ }); return true; } - headers[HTTP2_HEADER_PATH] = path16; + headers[HTTP2_HEADER_PATH] = path17; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -7548,9 +7548,9 @@ var require_redirect_handler = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path16 = search ? `${pathname}${search}` : pathname; + const path17 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path16; + this.opts.path = path17; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -8784,10 +8784,10 @@ var require_proxy_agent = __commonJS({ }; const { origin, - path: path16 = "/", + path: path17 = "/", headers = {} } = opts; - opts.path = origin + path16; + opts.path = origin + path17; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -10708,20 +10708,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path16) { - if (typeof path16 !== "string") { - return path16; + function safeUrl(path17) { + if (typeof path17 !== "string") { + return path17; } - const pathSegments = path16.split("?"); + const pathSegments = path17.split("?"); if (pathSegments.length !== 2) { - return path16; + return path17; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path16, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path16); + function matchKey(mockDispatch2, { path: path17, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path17); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -10743,7 +10743,7 @@ var require_mock_utils = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path16 }) => matchValue(safeUrl(path16), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path17 }) => matchValue(safeUrl(path17), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -10781,9 +10781,9 @@ var require_mock_utils = __commonJS({ } } function buildKey(opts) { - const { path: path16, method, body, headers, query } = opts; + const { path: path17, method, body, headers, query } = opts; return { - path: path16, + path: path17, method, body, headers, @@ -11246,10 +11246,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path16, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path17, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path16, + Path: path17, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -16130,9 +16130,9 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path16) { - for (let i = 0; i < path16.length; ++i) { - const code = path16.charCodeAt(i); + function validateCookiePath(path17) { + for (let i = 0; i < path17.length; ++i) { + const code = path17.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -18726,11 +18726,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path16 = opts.path; + let path17 = opts.path; if (!opts.path.startsWith("/")) { - path16 = `/${path16}`; + path17 = `/${path17}`; } - url2 = new URL(util.parseOrigin(url2).origin + path16); + url2 = new URL(util.parseOrigin(url2).origin + path17); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -20033,7 +20033,7 @@ var require_path_utils = __commonJS({ exports2.toPosixPath = toPosixPath; exports2.toWin32Path = toWin32Path; exports2.toPlatformPath = toPlatformPath; - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -20041,7 +20041,7 @@ var require_path_utils = __commonJS({ return pth.replace(/[/]/g, "\\"); } function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path16.sep); + return pth.replace(/[/\\]/g, path17.sep); } } }); @@ -20124,7 +20124,7 @@ var require_io_util = __commonJS({ exports2.tryGetExecutablePath = tryGetExecutablePath; exports2.getCmdPath = getCmdPath; var fs18 = __importStar2(require("fs")); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); _a = fs18.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; function readlink(fsPath) { @@ -20179,7 +20179,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path16.extname(filePath).toUpperCase(); + const upperExt = path17.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -20203,11 +20203,11 @@ var require_io_util = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path16.dirname(filePath); - const upperName = path16.basename(filePath).toUpperCase(); + const directory = path17.dirname(filePath); + const upperName = path17.basename(filePath).toUpperCase(); for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path16.join(directory, actualName); + filePath = path17.join(directory, actualName); break; } } @@ -20319,7 +20319,7 @@ var require_io = __commonJS({ exports2.which = which7; exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path16 = __importStar2(require("path")); + var path17 = __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 = {}) { @@ -20328,7 +20328,7 @@ var require_io = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path17.join(dest, path17.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -20340,7 +20340,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path16.relative(source, newDest) === "") { + if (path17.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile2(source, newDest, force); @@ -20352,7 +20352,7 @@ var require_io = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path16.join(dest, path16.basename(source)); + dest = path17.join(dest, path17.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -20363,7 +20363,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path16.dirname(dest)); + yield mkdirP(path17.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -20422,7 +20422,7 @@ var require_io = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path17.delimiter)) { if (extension) { extensions.push(extension); } @@ -20435,12 +20435,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path16.sep)) { + if (tool.includes(path17.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path16.delimiter)) { + for (const p of process.env.PATH.split(path17.delimiter)) { if (p) { directories.push(p); } @@ -20448,7 +20448,7 @@ var require_io = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path17.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -20578,7 +20578,7 @@ var require_toolrunner = __commonJS({ var os4 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var io7 = __importStar2(require_io()); var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); @@ -20793,7 +20793,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 = path16.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path17.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io7.which(this.toolPath, true); return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { @@ -21346,7 +21346,7 @@ var require_core = __commonJS({ var file_command_1 = require_file_command(); var utils_1 = require_utils(); var os4 = __importStar2(require("os")); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -21372,7 +21372,7 @@ var require_core = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path16.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path17.delimiter}${process.env["PATH"]}`; } function getInput2(name, options) { const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; @@ -21509,8 +21509,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 path16 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path16} does not exist${os_1.EOL}`); + const path17 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path17} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -22335,14 +22335,14 @@ var require_util9 = __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 path16 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path17 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path16 && path16[0] !== "/") { - path16 = `/${path16}`; + if (path17 && path17[0] !== "/") { + path17 = `/${path17}`; } - return new URL(`${origin}${path16}`); + return new URL(`${origin}${path17}`); } if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); @@ -22793,39 +22793,39 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path16, origin } + request: { method, path: path17, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path16); + debuglog("sending request to %s %s/%s", method, origin, path17); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path16, origin }, + request: { method, path: path17, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path16, + path17, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path16, origin } + request: { method, path: path17, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path16); + debuglog("trailers received from %s %s/%s", method, origin, path17); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path16, origin }, + request: { method, path: path17, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path16, + path17, error3.message ); }); @@ -22874,9 +22874,9 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path16, origin } + request: { method, path: path17, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path16); + debuglog("sending request to %s %s/%s", method, origin, path17); }); } diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { @@ -22939,7 +22939,7 @@ var require_request3 = __commonJS({ var kHandler = /* @__PURE__ */ Symbol("handler"); var Request = class { constructor(origin, { - path: path16, + path: path17, method, body, headers, @@ -22954,11 +22954,11 @@ var require_request3 = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path16 !== "string") { + if (typeof path17 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path16[0] !== "/" && !(path16.startsWith("http://") || path16.startsWith("https://")) && method !== "CONNECT") { + } else if (path17[0] !== "/" && !(path17.startsWith("http://") || path17.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path16)) { + } else if (invalidPathRegex.test(path17)) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -23021,7 +23021,7 @@ var require_request3 = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? buildURL(path16, query) : path16; + this.path = query ? buildURL(path17, query) : path17; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -27534,7 +27534,7 @@ var require_client_h12 = __commonJS({ return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } function writeH1(client, request2) { - const { method, path: path16, host, upgrade, blocking, reset } = request2; + const { method, path: path17, host, upgrade, blocking, reset } = request2; let { body, headers, contentLength } = request2; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; if (util.isFormDataLike(body)) { @@ -27600,7 +27600,7 @@ var require_client_h12 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path16} HTTP/1.1\r + let header = `${method} ${path17} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -28126,7 +28126,7 @@ var require_client_h22 = __commonJS({ } function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path: path16, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path17, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; let { body } = request2; if (upgrade) { util.errorRequest(client, request2, new Error("Upgrade not supported for H2")); @@ -28193,7 +28193,7 @@ var require_client_h22 = __commonJS({ }); return true; } - headers[HTTP2_HEADER_PATH] = path16; + headers[HTTP2_HEADER_PATH] = path17; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -28546,9 +28546,9 @@ var require_redirect_handler2 = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path16 = search ? `${pathname}${search}` : pathname; + const path17 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path16; + this.opts.path = path17; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -29782,10 +29782,10 @@ var require_proxy_agent2 = __commonJS({ }; const { origin, - path: path16 = "/", + path: path17 = "/", headers = {} } = opts; - opts.path = origin + path16; + opts.path = origin + path17; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -31706,20 +31706,20 @@ var require_mock_utils2 = __commonJS({ } return true; } - function safeUrl(path16) { - if (typeof path16 !== "string") { - return path16; + function safeUrl(path17) { + if (typeof path17 !== "string") { + return path17; } - const pathSegments = path16.split("?"); + const pathSegments = path17.split("?"); if (pathSegments.length !== 2) { - return path16; + return path17; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path16, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path16); + function matchKey(mockDispatch2, { path: path17, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path17); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -31741,7 +31741,7 @@ var require_mock_utils2 = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path16 }) => matchValue(safeUrl(path16), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path17 }) => matchValue(safeUrl(path17), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -31779,9 +31779,9 @@ var require_mock_utils2 = __commonJS({ } } function buildKey(opts) { - const { path: path16, method, body, headers, query } = opts; + const { path: path17, method, body, headers, query } = opts; return { - path: path16, + path: path17, method, body, headers, @@ -32244,10 +32244,10 @@ var require_pending_interceptors_formatter2 = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path16, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path17, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path16, + Path: path17, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -37128,9 +37128,9 @@ var require_util14 = __commonJS({ } } } - function validateCookiePath(path16) { - for (let i = 0; i < path16.length; ++i) { - const code = path16.charCodeAt(i); + function validateCookiePath(path17) { + for (let i = 0; i < path17.length; ++i) { + const code = path17.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -39724,11 +39724,11 @@ var require_undici2 = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path16 = opts.path; + let path17 = opts.path; if (!opts.path.startsWith("/")) { - path16 = `/${path16}`; + path17 = `/${path17}`; } - url2 = new URL(util.parseOrigin(url2).origin + path16); + url2 = new URL(util.parseOrigin(url2).origin + path17); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -47414,14 +47414,14 @@ var require_helpers = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { "use strict"; var uri = require("url"); - var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path16, name, argument) { - if (Array.isArray(path16)) { - this.path = path16; - this.property = path16.reduce(function(sum, item) { + var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path17, name, argument) { + if (Array.isArray(path17)) { + this.path = path17; + this.property = path17.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path16 !== void 0) { - this.property = path16; + } else if (path17 !== void 0) { + this.property = path17; } if (message) { this.message = message; @@ -47512,16 +47512,16 @@ var require_helpers = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path16, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path17, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path16)) { - this.path = path16; - this.propertyPath = path16.reduce(function(sum, item) { + if (Array.isArray(path17)) { + this.path = path17; + this.propertyPath = path17.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path16; + this.propertyPath = path17; } this.base = base; this.schemas = schemas; @@ -47530,10 +47530,10 @@ var require_helpers = __commonJS({ return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path16 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path17 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); var id = schema2.$id || schema2.id; var base = uri.resolve(this.base, id || ""); - var ctx = new SchemaContext(schema2, this.options, path16, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema2, this.options, path17, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -48836,7 +48836,7 @@ var require_internal_path_helper = __commonJS({ exports2.hasRoot = hasRoot; exports2.normalizeSeparators = normalizeSeparators; exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname4(p) { @@ -48844,7 +48844,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path16.dirname(p); + let result = path17.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -48881,7 +48881,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 += path16.sep; + root += path17.sep; } return root + itemPath; } @@ -48915,10 +48915,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path16.sep)) { + if (!p.endsWith(path17.sep)) { return p; } - if (p === path16.sep) { + if (p === path17.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -49263,7 +49263,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path16 = (function() { + var path17 = (function() { try { return require("path"); } catch (e) { @@ -49271,7 +49271,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path16.sep; + minimatch.sep = path17.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand2 = require_brace_expansion(); var plTypes = { @@ -49360,8 +49360,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path16.sep !== "/") { - pattern = pattern.split(path16.sep).join("/"); + if (!options.allowWindowsEscape && path17.sep !== "/") { + pattern = pattern.split(path17.sep).join("/"); } this.options = options; this.set = []; @@ -49730,8 +49730,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path16.sep !== "/") { - f = f.split(path16.sep).join("/"); + if (path17.sep !== "/") { + f = f.split(path17.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -49877,7 +49877,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -49892,12 +49892,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(path16.sep); + this.segments = itemPath.split(path17.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename2 = path16.basename(remaining); + const basename2 = path17.basename(remaining); this.segments.unshift(basename2); remaining = dir; dir = pathHelper.dirname(remaining); @@ -49915,7 +49915,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(path16.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path17.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -49926,12 +49926,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path16.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path17.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path16.sep; + result += path17.sep; } result += this.segments[i]; } @@ -49989,7 +49989,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os4 = __importStar2(require("os")); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); @@ -50018,7 +50018,7 @@ var require_internal_pattern = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path16.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path17.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -50042,8 +50042,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path16.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path16.sep}`; + if (!itemPath.endsWith(path17.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path17.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -50078,9 +50078,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(`.${path16.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path17.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path16.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path17.sep}`)) { homedir = homedir || os4.homedir(); (0, assert_1.default)(homedir, "Unable to determine HOME directory"); (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); @@ -50164,8 +50164,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path16, level) { - this.path = path16; + constructor(path17, level) { + this.path = path17; this.level = level; } }; @@ -50309,7 +50309,7 @@ var require_internal_globber = __commonJS({ var core17 = __importStar2(require_core()); var fs18 = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); - var path16 = __importStar2(require("path")); + var path17 = __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(); @@ -50385,7 +50385,7 @@ var require_internal_globber = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path16.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path17.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -50395,7 +50395,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await2(fs18.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path16.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs18.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path17.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); @@ -50557,7 +50557,7 @@ var require_internal_hash_files = __commonJS({ var fs18 = __importStar2(require("fs")); var stream2 = __importStar2(require("stream")); var util = __importStar2(require("util")); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); function hashFiles2(globber_1, currentWorkspace_1) { return __awaiter2(this, arguments, void 0, function* (globber, currentWorkspace, verbose = false) { var _a, e_1, _b, _c; @@ -50573,7 +50573,7 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path16.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path17.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } @@ -51959,7 +51959,7 @@ var require_cacheUtils = __commonJS({ var io7 = __importStar2(require_io()); var crypto2 = __importStar2(require("crypto")); var fs18 = __importStar2(require("fs")); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var semver9 = __importStar2(require_semver3()); var util = __importStar2(require("util")); var constants_1 = require_constants12(); @@ -51979,9 +51979,9 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path16.join(baseLocation, "actions", "temp"); + tempDirectory = path17.join(baseLocation, "actions", "temp"); } - const dest = path16.join(tempDirectory, crypto2.randomUUID()); + const dest = path17.join(tempDirectory, crypto2.randomUUID()); yield io7.mkdirP(dest); return dest; }); @@ -52003,7 +52003,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path16.relative(workspace, file).replace(new RegExp(`\\${path16.sep}`, "g"), "/"); + const relativeFile = path17.relative(workspace, file).replace(new RegExp(`\\${path17.sep}`, "g"), "/"); core17.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -52530,13 +52530,13 @@ function __disposeResources(env) { } return next(); } -function __rewriteRelativeImportExtension(path16, preserveJsx) { - if (typeof path16 === "string" && /^\.\.?\//.test(path16)) { - return path16.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { +function __rewriteRelativeImportExtension(path17, preserveJsx) { + if (typeof path17 === "string" && /^\.\.?\//.test(path17)) { + return path17.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; }); } - return path16; + return path17; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -56950,8 +56950,8 @@ var require_getClient = __commonJS({ } const { allowInsecureConnection, httpClient } = clientOptions; const endpointUrl = clientOptions.endpoint ?? endpoint2; - const client = (path16, ...args) => { - const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path16, args, { allowInsecureConnection, ...requestOptions }); + const client = (path17, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path17, args, { allowInsecureConnection, ...requestOptions }); return { get: (requestOptions = {}) => { return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); @@ -60822,15 +60822,15 @@ var require_urlHelpers2 = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path16 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path16.startsWith("/")) { - path16 = path16.substring(1); + let path17 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path17.startsWith("/")) { + path17 = path17.substring(1); } - if (isAbsoluteUrl(path16)) { - requestUrl = path16; + if (isAbsoluteUrl(path17)) { + requestUrl = path17; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path16); + requestUrl = appendPath(requestUrl, path17); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -60876,9 +60876,9 @@ var require_urlHelpers2 = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path16 = pathToAppend.substring(0, searchStart); + const path17 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path16; + newPath = newPath + path17; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -63111,10 +63111,10 @@ var require_utils_common = __commonJS({ var constants_js_1 = require_constants15(); function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path16 = urlParsed.pathname; - path16 = path16 || "/"; - path16 = escape(path16); - urlParsed.pathname = path16; + let path17 = urlParsed.pathname; + path17 = path17 || "/"; + path17 = escape(path17); + urlParsed.pathname = path17; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -63199,9 +63199,9 @@ var require_utils_common = __commonJS({ } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path16 = urlParsed.pathname; - path16 = path16 ? path16.endsWith("/") ? `${path16}${name}` : `${path16}/${name}` : name; - urlParsed.pathname = path16; + let path17 = urlParsed.pathname; + path17 = path17 ? path17.endsWith("/") ? `${path17}${name}` : `${path17}/${name}` : name; + urlParsed.pathname = path17; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -64428,9 +64428,9 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path16 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path16}`; + canonicalizedResourceString += `/${this.factory.accountName}${path17}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -65169,10 +65169,10 @@ var require_utils_common2 = __commonJS({ var constants_js_1 = require_constants16(); function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path16 = urlParsed.pathname; - path16 = path16 || "/"; - path16 = escape(path16); - urlParsed.pathname = path16; + let path17 = urlParsed.pathname; + path17 = path17 || "/"; + path17 = escape(path17); + urlParsed.pathname = path17; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -65257,9 +65257,9 @@ var require_utils_common2 = __commonJS({ } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path16 = urlParsed.pathname; - path16 = path16 ? path16.endsWith("/") ? `${path16}${name}` : `${path16}/${name}` : name; - urlParsed.pathname = path16; + let path17 = urlParsed.pathname; + path17 = path17 ? path17.endsWith("/") ? `${path17}${name}` : `${path17}/${name}` : name; + urlParsed.pathname = path17; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -66180,9 +66180,9 @@ var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path16 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path16}`; + canonicalizedResourceString += `/${this.factory.accountName}${path17}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -66812,9 +66812,9 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path16 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path16}`; + canonicalizedResourceString += `/${options.accountName}${path17}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67159,9 +67159,9 @@ var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path16 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path16}`; + canonicalizedResourceString += `/${options.accountName}${path17}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -88816,8 +88816,8 @@ var require_BlobBatch = __commonJS({ if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path16 = (0, utils_common_js_1.getURLPath)(subRequest.url); - if (!path16 || path16 === "") { + const path17 = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path17 || path17 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -88895,8 +88895,8 @@ var require_BlobBatchClient = __commonJS({ pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url2, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); - const path16 = (0, utils_common_js_1.getURLPath)(url2); - if (path16 && path16 !== "/") { + const path17 = (0, utils_common_js_1.getURLPath)(url2); + if (path17 && path17 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -98205,7 +98205,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io7 = __importStar2(require_io()); var fs_1 = require("fs"); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants12(); var IS_WINDOWS = process.platform === "win32"; @@ -98251,13 +98251,13 @@ var require_tar = __commonJS({ const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (type2) { case "create": - args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path16.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path17.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -98303,7 +98303,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path17.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -98312,7 +98312,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path17.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -98327,7 +98327,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -98336,7 +98336,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -98374,7 +98374,7 @@ var require_tar = __commonJS({ } function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path16.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path17.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -98456,7 +98456,7 @@ var require_cache5 = __commonJS({ exports2.restoreCache = restoreCache4; exports2.saveCache = saveCache4; var core17 = __importStar2(require_core()); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); @@ -98551,7 +98551,7 @@ var require_cache5 = __commonJS({ core17.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path16.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path17.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core17.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core17.isDebug()) { @@ -98620,7 +98620,7 @@ var require_cache5 = __commonJS({ core17.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path16.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path17.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core17.debug(`Archive path: ${archivePath}`); core17.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -98682,7 +98682,7 @@ var require_cache5 = __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 = path16.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path17.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core17.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -98746,7 +98746,7 @@ var require_cache5 = __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 = path16.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path17.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core17.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99173,7 +99173,7 @@ var require_tool_cache = __commonJS({ var fs18 = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os4 = __importStar2(require("os")); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver9 = __importStar2(require_semver2()); var stream2 = __importStar2(require("stream")); @@ -99194,8 +99194,8 @@ var require_tool_cache = __commonJS({ var userAgent2 = "actions/tool-cache"; function downloadTool2(url2, dest, auth2, headers) { return __awaiter2(this, void 0, void 0, function* () { - dest = dest || path16.join(_getTempDirectory(), crypto2.randomUUID()); - yield io7.mkdirP(path16.dirname(dest)); + dest = dest || path17.join(_getTempDirectory(), crypto2.randomUUID()); + yield io7.mkdirP(path17.dirname(dest)); core17.debug(`Downloading ${url2}`); core17.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -99285,7 +99285,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path16.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path17.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}'`; @@ -99457,7 +99457,7 @@ var require_tool_cache = __commonJS({ } const destPath = yield _createToolPath(tool, version, arch2); for (const itemName of fs18.readdirSync(sourceDir)) { - const s = path16.join(sourceDir, itemName); + const s = path17.join(sourceDir, itemName); yield io7.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -99474,7 +99474,7 @@ var require_tool_cache = __commonJS({ throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path16.join(destFolder, targetFile); + const destPath = path17.join(destFolder, targetFile); core17.debug(`destination file ${destPath}`); yield io7.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -99497,7 +99497,7 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver9.clean(versionSpec) || ""; - const cachePath = path16.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path17.join(_getCacheDirectory(), toolName, versionSpec, arch2); core17.debug(`checking cache: ${cachePath}`); if (fs18.existsSync(cachePath) && fs18.existsSync(`${cachePath}.complete`)) { core17.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); @@ -99511,12 +99511,12 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os4.arch(); - const toolPath = path16.join(_getCacheDirectory(), toolName); + const toolPath = path17.join(_getCacheDirectory(), toolName); if (fs18.existsSync(toolPath)) { const children = fs18.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path16.join(toolPath, child, arch2 || ""); + const fullPath = path17.join(toolPath, child, arch2 || ""); if (fs18.existsSync(fullPath) && fs18.existsSync(`${fullPath}.complete`)) { versions.push(child); } @@ -99568,7 +99568,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path16.join(_getTempDirectory(), crypto2.randomUUID()); + dest = path17.join(_getTempDirectory(), crypto2.randomUUID()); } yield io7.mkdirP(dest); return dest; @@ -99576,7 +99576,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter2(this, void 0, void 0, function* () { - const folderPath = path16.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path17.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); core17.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io7.rmRF(folderPath); @@ -99586,7 +99586,7 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path16.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path17.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; fs18.writeFileSync(markerPath, ""); core17.debug("finished caching tool"); @@ -102368,13 +102368,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(path16) { - if (!path16) { + function validateFilePath(path17) { + if (!path17) { throw new Error(`Provided file path input during validation is empty`); } for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) { - if (path16.includes(invalidCharacterKey)) { - throw new Error(`The path for one of the files in artifact is not valid: ${path16}. Contains the following character: ${errorMessageForCharacter} + if (path17.includes(invalidCharacterKey)) { + throw new Error(`The path for one of the files in artifact is not valid: ${path17}. Contains the following character: ${errorMessageForCharacter} Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()} @@ -103275,8 +103275,8 @@ var require_minimatch2 = __commonJS({ return new Minimatch(pattern, options).match(p); }; module2.exports = minimatch; - var path16 = require_path(); - minimatch.sep = path16.sep; + var path17 = require_path(); + minimatch.sep = path17.sep; var GLOBSTAR = /* @__PURE__ */ Symbol("globstar **"); minimatch.GLOBSTAR = GLOBSTAR; var expand2 = require_brace_expansion2(); @@ -103785,8 +103785,8 @@ var require_minimatch2 = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; const options = this.options; - if (path16.sep !== "/") { - f = f.split(path16.sep).join("/"); + if (path17.sep !== "/") { + f = f.split(path17.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -103884,8 +103884,8 @@ var require_readdir_glob = __commonJS({ }); }); } - async function* exploreWalkAsync(dir, path16, followSymlinks, useStat, shouldSkip, strict) { - let files = await readdir(path16 + dir, strict); + async function* exploreWalkAsync(dir, path17, followSymlinks, useStat, shouldSkip, strict) { + let files = await readdir(path17 + dir, strict); for (const file of files) { let name = file.name; if (name === void 0) { @@ -103894,7 +103894,7 @@ var require_readdir_glob = __commonJS({ } const filename = dir + "/" + name; const relative2 = filename.slice(1); - const absolute = path16 + "/" + relative2; + const absolute = path17 + "/" + relative2; let stats = null; if (useStat || followSymlinks) { stats = await stat(absolute, followSymlinks); @@ -103908,15 +103908,15 @@ var require_readdir_glob = __commonJS({ if (stats.isDirectory()) { if (!shouldSkip(relative2)) { yield { relative: relative2, absolute, stats }; - yield* exploreWalkAsync(filename, path16, followSymlinks, useStat, shouldSkip, false); + yield* exploreWalkAsync(filename, path17, followSymlinks, useStat, shouldSkip, false); } } else { yield { relative: relative2, absolute, stats }; } } } - async function* explore(path16, followSymlinks, useStat, shouldSkip) { - yield* exploreWalkAsync("", path16, followSymlinks, useStat, shouldSkip, true); + async function* explore(path17, followSymlinks, useStat, shouldSkip) { + yield* exploreWalkAsync("", path17, followSymlinks, useStat, shouldSkip, true); } function readOptions(options) { return { @@ -105954,14 +105954,14 @@ var require_polyfills = __commonJS({ fs18.fstatSync = statFixSync(fs18.fstatSync); fs18.lstatSync = statFixSync(fs18.lstatSync); if (fs18.chmod && !fs18.lchmod) { - fs18.lchmod = function(path16, mode, cb) { + fs18.lchmod = function(path17, mode, cb) { if (cb) process.nextTick(cb); }; fs18.lchmodSync = function() { }; } if (fs18.chown && !fs18.lchown) { - fs18.lchown = function(path16, uid, gid, cb) { + fs18.lchown = function(path17, uid, gid, cb) { if (cb) process.nextTick(cb); }; fs18.lchownSync = function() { @@ -106028,9 +106028,9 @@ var require_polyfills = __commonJS({ }; })(fs18.readSync); function patchLchmod(fs19) { - fs19.lchmod = function(path16, mode, callback) { + fs19.lchmod = function(path17, mode, callback) { fs19.open( - path16, + path17, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) { @@ -106046,8 +106046,8 @@ var require_polyfills = __commonJS({ } ); }; - fs19.lchmodSync = function(path16, mode) { - var fd = fs19.openSync(path16, constants.O_WRONLY | constants.O_SYMLINK, mode); + fs19.lchmodSync = function(path17, mode) { + var fd = fs19.openSync(path17, constants.O_WRONLY | constants.O_SYMLINK, mode); var threw = true; var ret; try { @@ -106068,8 +106068,8 @@ var require_polyfills = __commonJS({ } function patchLutimes(fs19) { if (constants.hasOwnProperty("O_SYMLINK") && fs19.futimes) { - fs19.lutimes = function(path16, at, mt, cb) { - fs19.open(path16, constants.O_SYMLINK, function(er, fd) { + fs19.lutimes = function(path17, at, mt, cb) { + fs19.open(path17, constants.O_SYMLINK, function(er, fd) { if (er) { if (cb) cb(er); return; @@ -106081,8 +106081,8 @@ var require_polyfills = __commonJS({ }); }); }; - fs19.lutimesSync = function(path16, at, mt) { - var fd = fs19.openSync(path16, constants.O_SYMLINK); + fs19.lutimesSync = function(path17, at, mt) { + var fd = fs19.openSync(path17, constants.O_SYMLINK); var ret; var threw = true; try { @@ -106200,11 +106200,11 @@ var require_legacy_streams = __commonJS({ ReadStream, WriteStream }; - function ReadStream(path16, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path16, options); + function ReadStream(path17, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path17, options); Stream.call(this); var self2 = this; - this.path = path16; + this.path = path17; this.fd = null; this.readable = true; this.paused = false; @@ -106249,10 +106249,10 @@ var require_legacy_streams = __commonJS({ self2._read(); }); } - function WriteStream(path16, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path16, options); + function WriteStream(path17, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path17, options); Stream.call(this); - this.path = path16; + this.path = path17; this.fd = null; this.writable = true; this.flags = "w"; @@ -106395,14 +106395,14 @@ var require_graceful_fs = __commonJS({ fs19.createWriteStream = createWriteStream3; var fs$readFile = fs19.readFile; fs19.readFile = readFile; - function readFile(path16, options, cb) { + function readFile(path17, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$readFile(path16, options, cb); - function go$readFile(path17, options2, cb2, startTime) { - return fs$readFile(path17, options2, function(err) { + return go$readFile(path17, options, cb); + function go$readFile(path18, options2, cb2, startTime) { + return fs$readFile(path18, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path17, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$readFile, [path18, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -106412,14 +106412,14 @@ var require_graceful_fs = __commonJS({ } var fs$writeFile = fs19.writeFile; fs19.writeFile = writeFile; - function writeFile(path16, data, options, cb) { + function writeFile(path17, data, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$writeFile(path16, data, options, cb); - function go$writeFile(path17, data2, options2, cb2, startTime) { - return fs$writeFile(path17, data2, options2, function(err) { + return go$writeFile(path17, data, options, cb); + function go$writeFile(path18, data2, options2, cb2, startTime) { + return fs$writeFile(path18, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path17, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$writeFile, [path18, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -106430,14 +106430,14 @@ var require_graceful_fs = __commonJS({ var fs$appendFile = fs19.appendFile; if (fs$appendFile) fs19.appendFile = appendFile; - function appendFile(path16, data, options, cb) { + function appendFile(path17, data, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$appendFile(path16, data, options, cb); - function go$appendFile(path17, data2, options2, cb2, startTime) { - return fs$appendFile(path17, data2, options2, function(err) { + return go$appendFile(path17, data, options, cb); + function go$appendFile(path18, data2, options2, cb2, startTime) { + return fs$appendFile(path18, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path17, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$appendFile, [path18, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -106468,31 +106468,31 @@ var require_graceful_fs = __commonJS({ var fs$readdir = fs19.readdir; fs19.readdir = readdir; var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path16, options, cb) { + function readdir(path17, options, cb) { if (typeof options === "function") cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path17, options2, cb2, startTime) { - return fs$readdir(path17, fs$readdirCallback( - path17, + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path18, options2, cb2, startTime) { + return fs$readdir(path18, fs$readdirCallback( + path18, options2, cb2, startTime )); - } : function go$readdir2(path17, options2, cb2, startTime) { - return fs$readdir(path17, options2, fs$readdirCallback( - path17, + } : function go$readdir2(path18, options2, cb2, startTime) { + return fs$readdir(path18, options2, fs$readdirCallback( + path18, options2, cb2, startTime )); }; - return go$readdir(path16, options, cb); - function fs$readdirCallback(path17, options2, cb2, startTime) { + return go$readdir(path17, options, cb); + function fs$readdirCallback(path18, options2, cb2, startTime) { return function(err, files) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ go$readdir, - [path17, options2, cb2], + [path18, options2, cb2], err, startTime || Date.now(), Date.now() @@ -106563,7 +106563,7 @@ var require_graceful_fs = __commonJS({ enumerable: true, configurable: true }); - function ReadStream(path16, options) { + function ReadStream(path17, options) { if (this instanceof ReadStream) return fs$ReadStream.apply(this, arguments), this; else @@ -106583,7 +106583,7 @@ var require_graceful_fs = __commonJS({ } }); } - function WriteStream(path16, options) { + function WriteStream(path17, options) { if (this instanceof WriteStream) return fs$WriteStream.apply(this, arguments), this; else @@ -106601,22 +106601,22 @@ var require_graceful_fs = __commonJS({ } }); } - function createReadStream2(path16, options) { - return new fs19.ReadStream(path16, options); + function createReadStream2(path17, options) { + return new fs19.ReadStream(path17, options); } - function createWriteStream3(path16, options) { - return new fs19.WriteStream(path16, options); + function createWriteStream3(path17, options) { + return new fs19.WriteStream(path17, options); } var fs$open = fs19.open; fs19.open = open; - function open(path16, flags, mode, cb) { + function open(path17, flags, mode, cb) { if (typeof mode === "function") cb = mode, mode = null; - return go$open(path16, flags, mode, cb); - function go$open(path17, flags2, mode2, cb2, startTime) { - return fs$open(path17, flags2, mode2, function(err, fd) { + return go$open(path17, flags, mode, cb); + function go$open(path18, flags2, mode2, cb2, startTime) { + return fs$open(path18, flags2, mode2, function(err, fd) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path17, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$open, [path18, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -108717,22 +108717,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(path16, stripTrailing) { - if (typeof path16 !== "string") { + module2.exports = function(path17, stripTrailing) { + if (typeof path17 !== "string") { throw new TypeError("expected path to be a string"); } - if (path16 === "\\" || path16 === "/") return "/"; - var len = path16.length; - if (len <= 1) return path16; + if (path17 === "\\" || path17 === "/") return "/"; + var len = path17.length; + if (len <= 1) return path17; var prefix = ""; - if (len > 4 && path16[3] === "\\") { - var ch = path16[2]; - if ((ch === "?" || ch === ".") && path16.slice(0, 2) === "\\\\") { - path16 = path16.slice(2); + if (len > 4 && path17[3] === "\\") { + var ch = path17[2]; + if ((ch === "?" || ch === ".") && path17.slice(0, 2) === "\\\\") { + path17 = path17.slice(2); prefix = "//"; } } - var segs = path16.split(/[/\\]+/); + var segs = path17.split(/[/\\]+/); if (stripTrailing !== false && segs[segs.length - 1] === "") { segs.pop(); } @@ -117348,11 +117348,11 @@ var require_commonjs20 = __commonJS({ 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 path16 = { + var path17 = { win32: { sep: "\\" }, posix: { sep: "/" } }; - exports2.sep = defaultPlatform === "win32" ? path16.win32.sep : path16.posix.sep; + exports2.sep = defaultPlatform === "win32" ? path17.win32.sep : path17.posix.sep; exports2.minimatch.sep = exports2.sep; exports2.GLOBSTAR = /* @__PURE__ */ Symbol("globstar **"); exports2.minimatch.GLOBSTAR = exports2.GLOBSTAR; @@ -120630,12 +120630,12 @@ var require_commonjs23 = __commonJS({ /** * Get the Path object referenced by the string path, resolved from this Path */ - resolve(path16) { - if (!path16) { + resolve(path17) { + if (!path17) { return this; } - const rootPath = this.getRootString(path16); - const dir = path16.substring(rootPath.length); + const rootPath = this.getRootString(path17); + const dir = path17.substring(rootPath.length); const dirParts = dir.split(this.splitSep); const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts); return result; @@ -121388,8 +121388,8 @@ var require_commonjs23 = __commonJS({ /** * @internal */ - getRootString(path16) { - return node_path_1.win32.parse(path16).root; + getRootString(path17) { + return node_path_1.win32.parse(path17).root; } /** * @internal @@ -121436,8 +121436,8 @@ var require_commonjs23 = __commonJS({ /** * @internal */ - getRootString(path16) { - return path16.startsWith("/") ? "/" : ""; + getRootString(path17) { + return path17.startsWith("/") ? "/" : ""; } /** * @internal @@ -121527,11 +121527,11 @@ var require_commonjs23 = __commonJS({ /** * Get the depth of a provided path, string, or the cwd */ - depth(path16 = this.cwd) { - if (typeof path16 === "string") { - path16 = this.cwd.resolve(path16); + depth(path17 = this.cwd) { + if (typeof path17 === "string") { + path17 = this.cwd.resolve(path17); } - return path16.depth(); + return path17.depth(); } /** * Return the cache of child entries. Exposed so subclasses can create @@ -122018,9 +122018,9 @@ var require_commonjs23 = __commonJS({ process2(); return results; } - chdir(path16 = this.cwd) { + chdir(path17 = this.cwd) { const oldCwd = this.cwd; - this.cwd = typeof path16 === "string" ? this.cwd.resolve(path16) : path16; + this.cwd = typeof path17 === "string" ? this.cwd.resolve(path17) : path17; this.cwd[setAsCwd](oldCwd); } }; @@ -122408,8 +122408,8 @@ var require_processor = __commonJS({ } // match, absolute, ifdir entries() { - return [...this.store.entries()].map(([path16, n]) => [ - path16, + return [...this.store.entries()].map(([path17, n]) => [ + path17, !!(n & 2), !!(n & 1) ]); @@ -122627,9 +122627,9 @@ var require_walker = __commonJS({ signal; maxDepth; includeChildMatches; - constructor(patterns, path16, opts) { + constructor(patterns, path17, opts) { this.patterns = patterns; - this.path = path16; + this.path = path17; this.opts = opts; this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/"; this.includeChildMatches = opts.includeChildMatches !== false; @@ -122648,11 +122648,11 @@ var require_walker = __commonJS({ }); } } - #ignored(path16) { - return this.seen.has(path16) || !!this.#ignore?.ignored?.(path16); + #ignored(path17) { + return this.seen.has(path17) || !!this.#ignore?.ignored?.(path17); } - #childrenIgnored(path16) { - return !!this.#ignore?.childrenIgnored?.(path16); + #childrenIgnored(path17) { + return !!this.#ignore?.childrenIgnored?.(path17); } // backpressure mechanism pause() { @@ -122868,8 +122868,8 @@ var require_walker = __commonJS({ exports2.GlobUtil = GlobUtil; var GlobWalker = class extends GlobUtil { matches = /* @__PURE__ */ new Set(); - constructor(patterns, path16, opts) { - super(patterns, path16, opts); + constructor(patterns, path17, opts) { + super(patterns, path17, opts); } matchEmit(e) { this.matches.add(e); @@ -122907,8 +122907,8 @@ var require_walker = __commonJS({ exports2.GlobWalker = GlobWalker; var GlobStream = class extends GlobUtil { results; - constructor(patterns, path16, opts) { - super(patterns, path16, opts); + constructor(patterns, path17, opts) { + super(patterns, path17, opts); this.results = new minipass_1.Minipass({ signal: this.signal, objectMode: true @@ -123264,7 +123264,7 @@ var require_commonjs24 = __commonJS({ var require_file4 = __commonJS({ "node_modules/archiver-utils/file.js"(exports2, module2) { var fs18 = require_graceful_fs(); - var path16 = require("path"); + var path17 = require("path"); var flatten = require_flatten(); var difference = require_difference(); var union = require_union(); @@ -123289,7 +123289,7 @@ var require_file4 = __commonJS({ return result; }; file.exists = function() { - var filepath = path16.join.apply(path16, arguments); + var filepath = path17.join.apply(path17, arguments); return fs18.existsSync(filepath); }; file.expand = function(...args) { @@ -123303,7 +123303,7 @@ var require_file4 = __commonJS({ }); if (options.filter) { matches = matches.filter(function(filepath) { - filepath = path16.join(options.cwd || "", filepath); + filepath = path17.join(options.cwd || "", filepath); try { if (typeof options.filter === "function") { return options.filter(filepath); @@ -123320,7 +123320,7 @@ var require_file4 = __commonJS({ file.expandMapping = function(patterns, destBase, options) { options = Object.assign({ rename: function(destBase2, destPath) { - return path16.join(destBase2 || "", destPath); + return path17.join(destBase2 || "", destPath); } }, options); var files = []; @@ -123328,14 +123328,14 @@ var require_file4 = __commonJS({ file.expand(options, patterns).forEach(function(src) { var destPath = src; if (options.flatten) { - destPath = path16.basename(destPath); + destPath = path17.basename(destPath); } if (options.ext) { destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext); } var dest = options.rename(destBase, destPath, options); if (options.cwd) { - src = path16.join(options.cwd, src); + src = path17.join(options.cwd, src); } dest = dest.replace(pathSeparatorRe, "/"); src = src.replace(pathSeparatorRe, "/"); @@ -123417,7 +123417,7 @@ var require_file4 = __commonJS({ var require_archiver_utils = __commonJS({ "node_modules/archiver-utils/index.js"(exports2, module2) { var fs18 = require_graceful_fs(); - var path16 = require("path"); + var path17 = require("path"); var isStream = require_is_stream(); var lazystream = require_lazystream(); var normalizePath = require_normalize_path(); @@ -123505,11 +123505,11 @@ var require_archiver_utils = __commonJS({ if (!file) { return callback(null, results); } - filepath = path16.join(dirpath, file); + filepath = path17.join(dirpath, file); fs18.stat(filepath, function(err2, stats) { results.push({ path: filepath, - relative: path16.relative(base, filepath).replace(/\\/g, "/"), + relative: path17.relative(base, filepath).replace(/\\/g, "/"), stats }); if (stats && stats.isDirectory()) { @@ -123571,7 +123571,7 @@ var require_core2 = __commonJS({ var fs18 = require("fs"); var glob2 = require_readdir_glob(); var async = require_async(); - var path16 = require("path"); + var path17 = require("path"); var util = require_archiver_utils(); var inherits = require("util").inherits; var ArchiverError = require_error3(); @@ -123847,9 +123847,9 @@ var require_core2 = __commonJS({ task.source = Buffer.concat([]); } else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) { var linkPath = fs18.readlinkSync(task.filepath); - var dirName = path16.dirname(task.filepath); + var dirName = path17.dirname(task.filepath); task.data.type = "symlink"; - task.data.linkname = path16.relative(dirName, path16.resolve(dirName, linkPath)); + task.data.linkname = path17.relative(dirName, path17.resolve(dirName, linkPath)); task.data.sourceType = "buffer"; task.source = Buffer.concat([]); } else { @@ -128299,8 +128299,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 path16 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path16} does not exist${os_1.EOL}`); + const path17 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path17} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -128885,14 +128885,14 @@ var require_util24 = __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 path16 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path17 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } - if (path16 && !path16.startsWith("/")) { - path16 = `/${path16}`; + if (path17 && !path17.startsWith("/")) { + path17 = `/${path17}`; } - url2 = new URL(origin + path16); + url2 = new URL(origin + path17); } return url2; } @@ -130506,20 +130506,20 @@ var require_parseParams = __commonJS({ var require_basename = __commonJS({ "node_modules/@fastify/busboy/lib/utils/basename.js"(exports2, module2) { "use strict"; - module2.exports = function basename2(path16) { - if (typeof path16 !== "string") { + module2.exports = function basename2(path17) { + if (typeof path17 !== "string") { return ""; } - for (var i = path16.length - 1; i >= 0; --i) { - switch (path16.charCodeAt(i)) { + for (var i = path17.length - 1; i >= 0; --i) { + switch (path17.charCodeAt(i)) { case 47: // '/' case 92: - path16 = path16.slice(i + 1); - return path16 === ".." || path16 === "." ? "" : path16; + path17 = path17.slice(i + 1); + return path17 === ".." || path17 === "." ? "" : path17; } } - return path16 === ".." || path16 === "." ? "" : path16; + return path17 === ".." || path17 === "." ? "" : path17; }; } }); @@ -133549,7 +133549,7 @@ var require_request5 = __commonJS({ } var Request = class _Request { constructor(origin, { - path: path16, + path: path17, method, body, headers, @@ -133563,11 +133563,11 @@ var require_request5 = __commonJS({ throwOnError, expectContinue }, handler2) { - if (typeof path16 !== "string") { + if (typeof path17 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path16[0] !== "/" && !(path16.startsWith("http://") || path16.startsWith("https://")) && method !== "CONNECT") { + } else if (path17[0] !== "/" && !(path17.startsWith("http://") || path17.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.exec(path16) !== null) { + } else if (invalidPathRegex.exec(path17) !== null) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -133630,7 +133630,7 @@ var require_request5 = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? util.buildURL(path16, query) : path16; + this.path = query ? util.buildURL(path17, query) : path17; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -134638,9 +134638,9 @@ var require_RedirectHandler = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path16 = search ? `${pathname}${search}` : pathname; + const path17 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path16; + this.opts.path = path17; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -135880,7 +135880,7 @@ var require_client3 = __commonJS({ writeH2(client, client[kHTTP2Session], request2); return; } - const { body, method, path: path16, host, upgrade, headers, blocking, reset } = request2; + const { body, method, path: path17, host, upgrade, headers, blocking, reset } = request2; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { body.read(0); @@ -135930,7 +135930,7 @@ var require_client3 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path16} HTTP/1.1\r + let header = `${method} ${path17} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -135993,7 +135993,7 @@ upgrade: ${upgrade}\r return true; } function writeH2(client, session, request2) { - const { body, method, path: path16, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { body, method, path: path17, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; let headers; if (typeof reqHeaders === "string") headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()); else headers = reqHeaders; @@ -136036,7 +136036,7 @@ upgrade: ${upgrade}\r }); return true; } - headers[HTTP2_HEADER_PATH] = path16; + headers[HTTP2_HEADER_PATH] = path17; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -138276,20 +138276,20 @@ var require_mock_utils3 = __commonJS({ } return true; } - function safeUrl(path16) { - if (typeof path16 !== "string") { - return path16; + function safeUrl(path17) { + if (typeof path17 !== "string") { + return path17; } - const pathSegments = path16.split("?"); + const pathSegments = path17.split("?"); if (pathSegments.length !== 2) { - return path16; + return path17; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path16, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path16); + function matchKey(mockDispatch2, { path: path17, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path17); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -138307,7 +138307,7 @@ var require_mock_utils3 = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path16 }) => matchValue(safeUrl(path16), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path17 }) => matchValue(safeUrl(path17), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -138344,9 +138344,9 @@ var require_mock_utils3 = __commonJS({ } } function buildKey(opts) { - const { path: path16, method, body, headers, query } = opts; + const { path: path17, method, body, headers, query } = opts; return { - path: path16, + path: path17, method, body, headers, @@ -138795,10 +138795,10 @@ var require_pending_interceptors_formatter3 = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path16, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path17, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path16, + Path: path17, "Status code": statusCode, Persistent: persist ? "\u2705" : "\u274C", Invocations: timesInvoked, @@ -143418,8 +143418,8 @@ var require_util29 = __commonJS({ } } } - function validateCookiePath(path16) { - for (const char of path16) { + function validateCookiePath(path17) { + for (const char of path17) { const code = char.charCodeAt(0); if (code < 33 || char === ";") { throw new Error("Invalid cookie path"); @@ -145099,11 +145099,11 @@ var require_undici3 = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path16 = opts.path; + let path17 = opts.path; if (!opts.path.startsWith("/")) { - path16 = `/${path16}`; + path17 = `/${path17}`; } - url2 = new URL(util.parseOrigin(url2).origin + path16); + url2 = new URL(util.parseOrigin(url2).origin + path17); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -149953,7 +149953,7 @@ var require_traverse = __commonJS({ })(this.value); }; function walk(root, cb, immutable) { - var path16 = []; + var path17 = []; var parents = []; var alive = true; return (function walker(node_) { @@ -149962,11 +149962,11 @@ var require_traverse = __commonJS({ var state = { node, node_, - path: [].concat(path16), + path: [].concat(path17), parent: parents.slice(-1)[0], - key: path16.slice(-1)[0], - isRoot: path16.length === 0, - level: path16.length, + key: path17.slice(-1)[0], + isRoot: path17.length === 0, + level: path17.length, circular: null, update: function(x) { if (!state.isRoot) { @@ -150021,7 +150021,7 @@ var require_traverse = __commonJS({ parents.push(state); var keys = Object.keys(state.node); keys.forEach(function(key, i2) { - path16.push(key); + path17.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)) { @@ -150030,7 +150030,7 @@ var require_traverse = __commonJS({ child.isLast = i2 == keys.length - 1; child.isFirst = i2 == 0; if (modifiers.post) modifiers.post.call(state, child); - path16.pop(); + path17.pop(); }); parents.pop(); } @@ -151051,11 +151051,11 @@ var require_unzip_stream = __commonJS({ return requiredLength; case states.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX: var isUtf8 = (this.parsedEntity.flags & 2048) !== 0; - var path16 = this._decodeString(chunk.slice(0, this.parsedEntity.fileNameLength), isUtf8); + var path17 = 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) { - path16 = extra.parsed.path; + path17 = extra.parsed.path; } this.parsedEntity.extra = extra.parsed; var isUnix = (this.parsedEntity.versionMadeBy & 65280) >> 8 === 3; @@ -151067,7 +151067,7 @@ var require_unzip_stream = __commonJS({ } if (this.options.debug) { const debugObj = Object.assign({}, this.parsedEntity, { - path: path16, + path: path17, flags: "0x" + this.parsedEntity.flags.toString(16), unixAttrs: unixAttrs && "0" + unixAttrs.toString(8), isSymlink, @@ -151504,7 +151504,7 @@ var require_parser_stream = __commonJS({ // node_modules/mkdirp/index.js var require_mkdirp = __commonJS({ "node_modules/mkdirp/index.js"(exports2, module2) { - var path16 = require("path"); + var path17 = require("path"); var fs18 = require("fs"); var _0777 = parseInt("0777", 8); module2.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; @@ -151524,7 +151524,7 @@ var require_mkdirp = __commonJS({ var cb = f || /* istanbul ignore next */ function() { }; - p = path16.resolve(p); + p = path17.resolve(p); xfs.mkdir(p, mode, function(er) { if (!er) { made = made || p; @@ -151532,8 +151532,8 @@ var require_mkdirp = __commonJS({ } switch (er.code) { case "ENOENT": - if (path16.dirname(p) === p) return cb(er); - mkdirP(path16.dirname(p), opts, function(er2, made2) { + if (path17.dirname(p) === p) return cb(er); + mkdirP(path17.dirname(p), opts, function(er2, made2) { if (er2) cb(er2, made2); else mkdirP(p, opts, cb, made2); }); @@ -151560,14 +151560,14 @@ var require_mkdirp = __commonJS({ mode = _0777; } if (!made) made = null; - p = path16.resolve(p); + p = path17.resolve(p); try { xfs.mkdirSync(p, mode); made = made || p; } catch (err0) { switch (err0.code) { case "ENOENT": - made = sync(path16.dirname(p), opts, made); + made = sync(path17.dirname(p), opts, made); sync(p, opts, made); break; // In the case of any other error, just see if there's a dir @@ -151593,7 +151593,7 @@ var require_mkdirp = __commonJS({ var require_extract2 = __commonJS({ "node_modules/unzip-stream/lib/extract.js"(exports2, module2) { var fs18 = require("fs"); - var path16 = require("path"); + var path17 = require("path"); var util = require("util"); var mkdirp = require_mkdirp(); var Transform = require("stream").Transform; @@ -151635,8 +151635,8 @@ var require_extract2 = __commonJS({ }; Extract.prototype._processEntry = function(entry) { var self2 = this; - var destPath = path16.join(this.opts.path, entry.path); - var directory = entry.isDirectory ? destPath : path16.dirname(destPath); + var destPath = path17.join(this.opts.path, entry.path); + var directory = entry.isDirectory ? destPath : path17.dirname(destPath); this.unfinishedEntries++; var writeFileFn = function() { var pipedStream = fs18.createWriteStream(destPath); @@ -151763,10 +151763,10 @@ var require_download_artifact = __commonJS({ parsed.search = ""; return parsed.toString(); }; - function exists(path16) { + function exists(path17) { return __awaiter2(this, void 0, void 0, function* () { try { - yield promises_1.default.access(path16); + yield promises_1.default.access(path17); return true; } catch (error3) { if (error3.code === "ENOENT") { @@ -151998,12 +151998,12 @@ var require_dist_node11 = __commonJS({ octokit.log.debug("request", options); const start = Date.now(); const requestOptions = octokit.request.endpoint.parse(options); - const path16 = requestOptions.url.replace(options.baseUrl, ""); + const path17 = requestOptions.url.replace(options.baseUrl, ""); return request2(options).then((response) => { - octokit.log.info(`${requestOptions.method} ${path16} - ${response.status} in ${Date.now() - start}ms`); + octokit.log.info(`${requestOptions.method} ${path17} - ${response.status} in ${Date.now() - start}ms`); return response; }).catch((error3) => { - octokit.log.info(`${requestOptions.method} ${path16} - ${error3.status} in ${Date.now() - start}ms`); + octokit.log.info(`${requestOptions.method} ${path17} - ${error3.status} in ${Date.now() - start}ms`); throw error3; }); }); @@ -154098,7 +154098,7 @@ var require_path_utils2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -154108,7 +154108,7 @@ var require_path_utils2 = __commonJS({ } exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path16.sep); + return pth.replace(/[/\\]/g, path17.sep); } exports2.toPlatformPath = toPlatformPath; } @@ -154172,7 +154172,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 fs18 = __importStar2(require("fs")); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); _a = fs18.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; exports2.UV_FS_O_EXLOCK = 268435456; @@ -154221,7 +154221,7 @@ var require_io_util2 = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path16.extname(filePath).toUpperCase(); + const upperExt = path17.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -154245,11 +154245,11 @@ var require_io_util2 = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path16.dirname(filePath); - const upperName = path16.basename(filePath).toUpperCase(); + const directory = path17.dirname(filePath); + const upperName = path17.basename(filePath).toUpperCase(); for (const actualName of yield exports2.readdir(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path16.join(directory, actualName); + filePath = path17.join(directory, actualName); break; } } @@ -154344,7 +154344,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 path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var ioUtil = __importStar2(require_io_util2()); function cp(source, dest, options = {}) { return __awaiter2(this, void 0, void 0, function* () { @@ -154353,7 +154353,7 @@ var require_io2 = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path17.join(dest, path17.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -154365,7 +154365,7 @@ var require_io2 = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path16.relative(source, newDest) === "") { + if (path17.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile2(source, newDest, force); @@ -154378,7 +154378,7 @@ var require_io2 = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path16.join(dest, path16.basename(source)); + dest = path17.join(dest, path17.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -154389,7 +154389,7 @@ var require_io2 = __commonJS({ } } } - yield mkdirP(path16.dirname(dest)); + yield mkdirP(path17.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -154452,7 +154452,7 @@ var require_io2 = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path17.delimiter)) { if (extension) { extensions.push(extension); } @@ -154465,12 +154465,12 @@ var require_io2 = __commonJS({ } return []; } - if (tool.includes(path16.sep)) { + if (tool.includes(path17.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path16.delimiter)) { + for (const p of process.env.PATH.split(path17.delimiter)) { if (p) { directories.push(p); } @@ -154478,7 +154478,7 @@ var require_io2 = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path17.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -154594,7 +154594,7 @@ var require_toolrunner2 = __commonJS({ var os4 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var io7 = __importStar2(require_io2()); var ioUtil = __importStar2(require_io_util2()); var timers_1 = require("timers"); @@ -154809,7 +154809,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 = path16.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path17.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io7.which(this.toolPath, true); return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { @@ -155309,7 +155309,7 @@ var require_core3 = __commonJS({ var file_command_1 = require_file_command2(); var utils_1 = require_utils12(); var os4 = __importStar2(require("os")); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils2(); var ExitCode; (function(ExitCode2) { @@ -155337,7 +155337,7 @@ var require_core3 = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path16.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path17.delimiter}${process.env["PATH"]}`; } exports2.addPath = addPath; function getInput2(name, options) { @@ -155513,13 +155513,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(path16) { - if (!path16) { - throw new Error(`Artifact path: ${path16}, is incorrectly provided`); + function checkArtifactFilePath(path17) { + if (!path17) { + throw new Error(`Artifact path: ${path17}, is incorrectly provided`); } for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) { - if (path16.includes(invalidCharacterKey)) { - throw new Error(`Artifact path is not valid: ${path16}. Contains the following character: ${errorMessageForCharacter} + if (path17.includes(invalidCharacterKey)) { + throw new Error(`Artifact path is not valid: ${path17}. Contains the following character: ${errorMessageForCharacter} Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()} @@ -155610,7 +155610,7 @@ var require_tmp = __commonJS({ "node_modules/tmp/lib/tmp.js"(exports2, module2) { var fs18 = require("fs"); var os4 = require("os"); - var path16 = require("path"); + var path17 = require("path"); var crypto2 = require("crypto"); var _c = { fs: fs18.constants, os: os4.constants }; var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; @@ -155817,35 +155817,35 @@ var require_tmp = __commonJS({ return [actualOptions, callback]; } function _resolvePath(name, tmpDir, cb) { - const pathToResolve = path16.isAbsolute(name) ? name : path16.join(tmpDir, name); + const pathToResolve = path17.isAbsolute(name) ? name : path17.join(tmpDir, name); fs18.stat(pathToResolve, function(err) { if (err) { - fs18.realpath(path16.dirname(pathToResolve), function(err2, parentDir) { + fs18.realpath(path17.dirname(pathToResolve), function(err2, parentDir) { if (err2) return cb(err2); - cb(null, path16.join(parentDir, path16.basename(pathToResolve))); + cb(null, path17.join(parentDir, path17.basename(pathToResolve))); }); } else { - fs18.realpath(path16, cb); + fs18.realpath(path17, cb); } }); } function _resolvePathSync(name, tmpDir) { - const pathToResolve = path16.isAbsolute(name) ? name : path16.join(tmpDir, name); + const pathToResolve = path17.isAbsolute(name) ? name : path17.join(tmpDir, name); try { fs18.statSync(pathToResolve); return fs18.realpathSync(pathToResolve); } catch (_err) { - const parentDir = fs18.realpathSync(path16.dirname(pathToResolve)); - return path16.join(parentDir, path16.basename(pathToResolve)); + const parentDir = fs18.realpathSync(path17.dirname(pathToResolve)); + return path17.join(parentDir, path17.basename(pathToResolve)); } } function _generateTmpName(opts) { const tmpDir = opts.tmpdir; if (!_isUndefined(opts.name)) { - return path16.join(tmpDir, opts.dir, opts.name); + return path17.join(tmpDir, opts.dir, opts.name); } if (!_isUndefined(opts.template)) { - return path16.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); + return path17.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); } const name = [ opts.prefix ? opts.prefix : "tmp", @@ -155855,13 +155855,13 @@ var require_tmp = __commonJS({ _randomChars(12), opts.postfix ? "-" + opts.postfix : "" ].join(""); - return path16.join(tmpDir, opts.dir, name); + return path17.join(tmpDir, opts.dir, name); } function _assertOptionsBase(options) { if (!_isUndefined(options.name)) { const name = options.name; - if (path16.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`); - const basename2 = path16.basename(name); + if (path17.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`); + const basename2 = path17.basename(name); if (basename2 === ".." || basename2 === "." || basename2 !== name) throw new Error(`name option must not contain a path, found "${name}".`); } @@ -155883,7 +155883,7 @@ var require_tmp = __commonJS({ if (_isUndefined(name)) return cb(null); _resolvePath(name, tmpDir, function(err, resolvedPath) { if (err) return cb(err); - const relativePath = path16.relative(tmpDir, resolvedPath); + const relativePath = path17.relative(tmpDir, resolvedPath); if (!resolvedPath.startsWith(tmpDir)) { return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`)); } @@ -155893,7 +155893,7 @@ var require_tmp = __commonJS({ function _getRelativePathSync(option, name, tmpDir) { if (_isUndefined(name)) return; const resolvedPath = _resolvePathSync(name, tmpDir); - const relativePath = path16.relative(tmpDir, resolvedPath); + const relativePath = path17.relative(tmpDir, resolvedPath); if (!resolvedPath.startsWith(tmpDir)) { throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`); } @@ -155973,14 +155973,14 @@ var require_tmp_promise = __commonJS({ var fileWithOptions = promisify( (options, cb) => tmp.file( options, - (err, path16, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path16, fd, cleanup: promisify(cleanup) }) + (err, path17, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path17, fd, cleanup: promisify(cleanup) }) ) ); module2.exports.file = async (options) => fileWithOptions(options); module2.exports.withFile = async function withFile(fn, options) { - const { path: path16, fd, cleanup } = await module2.exports.file(options); + const { path: path17, fd, cleanup } = await module2.exports.file(options); try { - return await fn({ path: path16, fd }); + return await fn({ path: path17, fd }); } finally { await cleanup(); } @@ -155989,14 +155989,14 @@ var require_tmp_promise = __commonJS({ var dirWithOptions = promisify( (options, cb) => tmp.dir( options, - (err, path16, cleanup) => err ? cb(err) : cb(void 0, { path: path16, cleanup: promisify(cleanup) }) + (err, path17, cleanup) => err ? cb(err) : cb(void 0, { path: path17, cleanup: promisify(cleanup) }) ) ); module2.exports.dir = async (options) => dirWithOptions(options); module2.exports.withDir = async function withDir(fn, options) { - const { path: path16, cleanup } = await module2.exports.dir(options); + const { path: path17, cleanup } = await module2.exports.dir(options); try { - return await fn({ path: path16 }); + return await fn({ path: path17 }); } finally { await cleanup(); } @@ -157704,21 +157704,21 @@ var require_download_specification = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadSpecification = void 0; - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); function getDownloadSpecification(artifactName, artifactEntries, downloadPath, includeRootDirectory) { const directories = /* @__PURE__ */ new Set(); const specifications = { - rootDownloadLocation: includeRootDirectory ? path16.join(downloadPath, artifactName) : downloadPath, + rootDownloadLocation: includeRootDirectory ? path17.join(downloadPath, artifactName) : downloadPath, directoryStructure: [], emptyFilesToCreate: [], filesToDownload: [] }; for (const entry of artifactEntries) { if (entry.path.startsWith(`${artifactName}/`) || entry.path.startsWith(`${artifactName}\\`)) { - const normalizedPathEntry = path16.normalize(entry.path); - const filePath = path16.join(downloadPath, includeRootDirectory ? normalizedPathEntry : normalizedPathEntry.replace(artifactName, "")); + const normalizedPathEntry = path17.normalize(entry.path); + const filePath = path17.join(downloadPath, includeRootDirectory ? normalizedPathEntry : normalizedPathEntry.replace(artifactName, "")); if (entry.itemType === "file") { - directories.add(path16.dirname(filePath)); + directories.add(path17.dirname(filePath)); if (entry.fileLength === 0) { specifications.emptyFilesToCreate.push(filePath); } else { @@ -157860,7 +157860,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz return uploadResponse; }); } - downloadArtifact(name, path16, options) { + downloadArtifact(name, path17, options) { return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const artifacts = yield downloadHttpClient.listArtifacts(); @@ -157874,12 +157874,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 (!path16) { - path16 = (0, config_variables_1.getWorkSpaceDirectory)(); + if (!path17) { + path17 = (0, config_variables_1.getWorkSpaceDirectory)(); } - path16 = (0, path_1.normalize)(path16); - path16 = (0, path_1.resolve)(path16); - const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path16, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); + path17 = (0, path_1.normalize)(path17); + path17 = (0, path_1.resolve)(path17); + const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path17, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); if (downloadSpecification.filesToDownload.length === 0) { core17.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`); } else { @@ -157894,7 +157894,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz }; }); } - downloadAllArtifacts(path16) { + downloadAllArtifacts(path17) { return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const response = []; @@ -157903,18 +157903,18 @@ Note: The size of downloaded zips can differ significantly from the reported siz core17.info("Unable to find any artifacts for the associated workflow"); return response; } - if (!path16) { - path16 = (0, config_variables_1.getWorkSpaceDirectory)(); + if (!path17) { + path17 = (0, config_variables_1.getWorkSpaceDirectory)(); } - path16 = (0, path_1.normalize)(path16); - path16 = (0, path_1.resolve)(path16); + path17 = (0, path_1.normalize)(path17); + path17 = (0, path_1.resolve)(path17); let downloadedArtifacts = 0; while (downloadedArtifacts < artifacts.count) { const currentArtifactToDownload = artifacts.value[downloadedArtifacts]; downloadedArtifacts += 1; core17.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, path16, true); + const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path17, true); if (downloadSpecification.filesToDownload.length === 0) { core17.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`); } else { @@ -164297,7 +164297,7 @@ var core6 = __toESM(require_core()); // src/codeql.ts var fs10 = __toESM(require("fs")); -var path9 = __toESM(require("path")); +var path10 = __toESM(require("path")); var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -164545,7 +164545,7 @@ function wrapCliConfigurationError(cliError) { // src/config-utils.ts var fs6 = __toESM(require("fs")); -var path6 = __toESM(require("path")); +var path7 = __toESM(require("path")); // src/analyses.ts var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { @@ -164583,6 +164583,10 @@ var PACK_IDENTIFIER_PATTERN = (function() { return new RegExp(`^${component}/${component}$`); })(); +// src/diagnostics.ts +var import_fs = require("fs"); +var import_path = __toESM(require("path")); + // src/logging.ts var core7 = __toESM(require_core()); function getActionsLogger() { @@ -164616,13 +164620,70 @@ function formatDuration(durationMs) { return `${minutes}m${seconds}s`; } +// src/diagnostics.ts +var unwrittenDiagnostics = []; +var unwrittenDefaultLanguageDiagnostics = []; +function makeDiagnostic(id, name, data = void 0) { + return { + ...data, + timestamp: data?.timestamp ?? (/* @__PURE__ */ new Date()).toISOString(), + source: { ...data?.source, id, name } + }; +} +function addDiagnostic(config, language, diagnostic) { + const logger = getActionsLogger(); + const databasePath = language ? getCodeQLDatabasePath(config, language) : config.dbLocation; + if ((0, import_fs.existsSync)(databasePath)) { + writeDiagnostic(config, language, diagnostic); + } else { + logger.debug( + `Writing a diagnostic for ${language}, but the database at ${databasePath} does not exist yet.` + ); + unwrittenDiagnostics.push({ diagnostic, language }); + } +} +function addNoLanguageDiagnostic(config, diagnostic) { + if (config !== void 0) { + addDiagnostic( + config, + // Arbitrarily choose the first language. We could also choose all languages, but that + // increases the risk of misinterpreting the data. + config.languages[0], + diagnostic + ); + } else { + unwrittenDefaultLanguageDiagnostics.push(diagnostic); + } +} +function writeDiagnostic(config, language, diagnostic) { + const logger = getActionsLogger(); + const databasePath = language ? getCodeQLDatabasePath(config, language) : config.dbLocation; + const diagnosticsPath = import_path.default.resolve( + databasePath, + "diagnostic", + "codeql-action" + ); + try { + (0, import_fs.mkdirSync)(diagnosticsPath, { recursive: true }); + const jsonPath = import_path.default.resolve( + diagnosticsPath, + // Remove colons from the timestamp as these are not allowed in Windows filenames. + `codeql-action-${diagnostic.timestamp.replaceAll(":", "")}.json` + ); + (0, import_fs.writeFileSync)(jsonPath, JSON.stringify(diagnostic)); + } catch (err) { + logger.warning(`Unable to write diagnostic message to database: ${err}`); + logger.debug(JSON.stringify(diagnostic)); + } +} + // src/diff-informed-analysis-utils.ts var fs5 = __toESM(require("fs")); -var path5 = __toESM(require("path")); +var path6 = __toESM(require("path")); // src/feature-flags.ts var fs4 = __toESM(require("fs")); -var path4 = __toESM(require("path")); +var path5 = __toESM(require("path")); var semver5 = __toESM(require_semver2()); // src/defaults.json @@ -164631,7 +164692,7 @@ var cliVersion = "2.24.1"; // src/overlay-database-utils.ts var fs3 = __toESM(require("fs")); -var path3 = __toESM(require("path")); +var path4 = __toESM(require("path")); var actionsCache = __toESM(require_cache5()); // src/git-utils.ts @@ -164759,8 +164820,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path16 = decodeGitFilePath(match[2]); - fileOidMap[path16] = oid; + const path17 = decodeGitFilePath(match[2]); + fileOidMap[path17] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -164866,7 +164927,7 @@ async function writeOverlayChangesFile(config, sourceRoot, logger) { `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` ); const changedFilesJson = JSON.stringify({ changes: changedFiles }); - const overlayChangesFile = path3.join( + const overlayChangesFile = path4.join( getTemporaryDirectory(), "overlay-changes.json" ); @@ -164960,6 +165021,11 @@ var featureConfig = { legacyApi: true, minimumVersion: void 0 }, + ["force_nightly" /* ForceNightly */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_FORCE_NIGHTLY", + minimumVersion: void 0 + }, ["ignore_generated_files" /* IgnoreGeneratedFiles */]: { defaultValue: false, envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES", @@ -165125,7 +165191,7 @@ var Features = class { this.gitHubFeatureFlags = new GitHubFeatureFlags( gitHubVersion, repositoryNwo, - path4.join(tempDir, FEATURE_FLAGS_FILE_NAME), + path5.join(tempDir, FEATURE_FLAGS_FILE_NAME), logger ); } @@ -165404,7 +165470,7 @@ function supportsFeatureFlags(githubVariant) { // src/diff-informed-analysis-utils.ts function getDiffRangesJsonFilePath() { - return path5.join(getTemporaryDirectory(), "pr-diff-range.json"); + return path6.join(getTemporaryDirectory(), "pr-diff-range.json"); } function readDiffRangesJsonFile(logger) { const jsonFilePath = getDiffRangesJsonFilePath(); @@ -165452,7 +165518,7 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = { swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */ }; function getPathToParsedConfigFile(tempDir) { - return path6.join(tempDir, "config"); + return path7.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); @@ -165499,7 +165565,7 @@ function isCodeScanningEnabled(config) { // src/setup-codeql.ts var fs9 = __toESM(require("fs")); -var path8 = __toESM(require("path")); +var path9 = __toESM(require("path")); var toolcache3 = __toESM(require_tool_cache()); var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var semver8 = __toESM(require_semver2()); @@ -165719,7 +165785,7 @@ function inferCompressionMethod(tarPath) { // src/tools-download.ts var fs8 = __toESM(require("fs")); var os = __toESM(require("os")); -var path7 = __toESM(require("path")); +var path8 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -165852,7 +165918,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path7.join( + return path8.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver7.clean(version) || version, @@ -165996,7 +166062,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs9.existsSync(path8.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs9.existsSync(path9.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -166037,10 +166103,36 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian let cliVersion2; let tagName; let url2; - if (toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput)) { - logger.info( - `Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.` - ); + const canForceNightlyWithFF = isDynamicWorkflow() || isInTestMode(); + const forceNightlyValueFF = await features.getValue("force_nightly" /* ForceNightly */); + const forceNightly = forceNightlyValueFF && canForceNightlyWithFF; + const nightlyRequestedByToolsInput = toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput); + if (forceNightly || nightlyRequestedByToolsInput) { + if (forceNightly) { + logger.info( + `Using the latest CodeQL CLI nightly, as forced by the ${"force_nightly" /* ForceNightly */} feature flag.` + ); + addNoLanguageDiagnostic( + void 0, + makeDiagnostic( + "codeql-action/forced-nightly-cli", + "A nightly release of CodeQL was used", + { + markdownMessage: "GitHub configured this analysis to use a nightly release of CodeQL to allow you to preview changes from an upcoming release.\n\nNightly releases do not undergo the same validation as regular releases and may lead to analysis instability.\n\nIf use of a nightly CodeQL release for this analysis is unexpected, please contact GitHub support.", + visibility: { + cliSummaryTable: true, + statusPage: true, + telemetry: true + }, + severity: "note" + } + ) + ); + } else { + logger.info( + `Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.` + ); + } toolsInput = await getNightlyToolsUrl(logger); } const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput); @@ -166369,7 +166461,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path8.join(tempDir, v4_default()); + return path9.join(tempDir, v4_default()); } async function getNightlyToolsUrl(logger) { const zstdAvailability = await isZstdAvailable(logger); @@ -166457,7 +166549,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path9.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path10.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -166519,7 +166611,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path9.join( + const tracingConfigPath = path10.join( extractorPath, "tools", "tracing-config.lua" @@ -166601,7 +166693,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path9.join( + const autobuildCmd = path10.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -167023,7 +167115,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path9.resolve(config.tempDir, "user-config.yaml"); + return path10.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -167045,7 +167137,7 @@ async function getJobRunUuidSarifOptions(codeql) { // src/debug-artifacts.ts var fs13 = __toESM(require("fs")); -var path12 = __toESM(require("path")); +var path13 = __toESM(require("path")); var artifact = __toESM(require_artifact2()); var artifactLegacy = __toESM(require_artifact_client2()); var core12 = __toESM(require_core()); @@ -167053,7 +167145,7 @@ var import_archiver = __toESM(require_archiver()); // src/analyze.ts var fs11 = __toESM(require("fs")); -var path10 = __toESM(require("path")); +var path11 = __toESM(require("path")); var io5 = __toESM(require_io()); // src/autobuild.ts @@ -167084,7 +167176,7 @@ function dbIsFinalized(config, language, logger) { const dbPath = getCodeQLDatabasePath(config, language); try { const dbInfo = load( - fs11.readFileSync(path10.resolve(dbPath, "codeql-database.yml"), "utf8") + fs11.readFileSync(path11.resolve(dbPath, "codeql-database.yml"), "utf8") ); return !("inProgress" in dbInfo); } catch { @@ -167098,7 +167190,7 @@ function dbIsFinalized(config, language, logger) { // src/artifact-scanner.ts var fs12 = __toESM(require("fs")); var os2 = __toESM(require("os")); -var path11 = __toESM(require("path")); +var path12 = __toESM(require("path")); var exec = __toESM(require_exec()); var GITHUB_PAT_CLASSIC_PATTERN = { type: "Personal Access Token (Classic)" /* PersonalAccessClassic */, @@ -167166,9 +167258,9 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log }; try { const tempExtractDir = fs12.mkdtempSync( - path11.join(extractDir, `extract-${depth}-`) + path12.join(extractDir, `extract-${depth}-`) ); - const fileName = path11.basename(archivePath).toLowerCase(); + const fileName = path12.basename(archivePath).toLowerCase(); if (fileName.endsWith(".tar.gz") || fileName.endsWith(".tgz")) { logger.debug(`Extracting tar.gz file: ${archivePath}`); await exec.exec("tar", ["-xzf", archivePath, "-C", tempExtractDir], { @@ -167185,18 +167277,18 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log ); } else if (fileName.endsWith(".zst")) { logger.debug(`Extracting zst file: ${archivePath}`); - const outputFile = path11.join( + const outputFile = path12.join( tempExtractDir, - path11.basename(archivePath, ".zst") + path12.basename(archivePath, ".zst") ); await exec.exec("zstd", ["-d", archivePath, "-o", outputFile], { silent: true }); } else if (fileName.endsWith(".gz")) { logger.debug(`Extracting gz file: ${archivePath}`); - const outputFile = path11.join( + const outputFile = path12.join( tempExtractDir, - path11.basename(archivePath, ".gz") + path12.basename(archivePath, ".gz") ); await exec.exec("gunzip", ["-c", archivePath], { outStream: fs12.createWriteStream(outputFile), @@ -167233,7 +167325,7 @@ async function scanFile(fullPath, relativePath, extractDir, logger, depth = 0) { scannedFiles: 1, findings: [] }; - const fileName = path11.basename(fullPath).toLowerCase(); + const fileName = path12.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( @@ -167257,8 +167349,8 @@ async function scanDirectory(dirPath, baseRelativePath, logger, depth = 0) { }; const entries = fs12.readdirSync(dirPath, { withFileTypes: true }); for (const entry of entries) { - const fullPath = path11.join(dirPath, entry.name); - const relativePath = path11.join(baseRelativePath, entry.name); + const fullPath = path12.join(dirPath, entry.name); + const relativePath = path12.join(baseRelativePath, entry.name); if (entry.isDirectory()) { const subResult = await scanDirectory( fullPath, @@ -167272,7 +167364,7 @@ async function scanDirectory(dirPath, baseRelativePath, logger, depth = 0) { const fileResult = await scanFile( fullPath, relativePath, - path11.dirname(fullPath), + path12.dirname(fullPath), logger, depth ); @@ -167290,11 +167382,11 @@ async function scanArtifactsForTokens(filesToScan, logger) { scannedFiles: 0, findings: [] }; - const tempScanDir = fs12.mkdtempSync(path11.join(os2.tmpdir(), "artifact-scan-")); + const tempScanDir = fs12.mkdtempSync(path12.join(os2.tmpdir(), "artifact-scan-")); try { for (const filePath of filesToScan) { const stats = fs12.statSync(filePath); - const fileName = path11.basename(filePath); + const fileName = path12.basename(filePath); if (stats.isDirectory()) { const dirResult = await scanDirectory(filePath, fileName, logger); result.scannedFiles += dirResult.scannedFiles; @@ -167348,12 +167440,12 @@ function tryPrepareSarifDebugArtifact(config, language, logger) { try { const analyzeActionOutputDir = process.env["CODEQL_ACTION_SARIF_RESULTS_OUTPUT_DIR" /* SARIF_RESULTS_OUTPUT_DIR */]; if (analyzeActionOutputDir !== void 0 && fs13.existsSync(analyzeActionOutputDir) && fs13.lstatSync(analyzeActionOutputDir).isDirectory()) { - const sarifFile = path12.resolve( + const sarifFile = path13.resolve( analyzeActionOutputDir, `${language}.sarif` ); if (fs13.existsSync(sarifFile)) { - const sarifInDbLocation = path12.resolve( + const sarifInDbLocation = path13.resolve( config.dbLocation, `${language}.sarif` ); @@ -167408,13 +167500,13 @@ async function tryUploadAllAvailableDebugArtifacts(codeql, config, logger, codeQ } logger.info("Preparing database logs debug artifact..."); const databaseDirectory = getCodeQLDatabasePath(config, language); - const logsDirectory = path12.resolve(databaseDirectory, "log"); + const logsDirectory = path13.resolve(databaseDirectory, "log"); if (doesDirectoryExist(logsDirectory)) { filesToUpload.push(...listFolder(logsDirectory)); logger.info("Database logs debug artifact ready for upload."); } logger.info("Preparing database cluster logs debug artifact..."); - const multiLanguageTracingLogsDirectory = path12.resolve( + const multiLanguageTracingLogsDirectory = path13.resolve( config.dbLocation, "log" ); @@ -167501,8 +167593,8 @@ async function uploadArtifacts(logger, toUpload, rootDir, artifactName, ghVarian try { await artifactUploader.uploadArtifact( sanitizeArtifactName(`${artifactName}${suffix}`), - toUpload.map((file) => path12.normalize(file)), - path12.normalize(rootDir), + toUpload.map((file) => path13.normalize(file)), + path13.normalize(rootDir), { // ensure we don't keep the debug artifacts around for too long since they can be large. retentionDays: 7 @@ -167529,7 +167621,7 @@ async function getArtifactUploaderClient(logger, ghVariant) { } async function createPartialDatabaseBundle(config, language) { const databasePath = getCodeQLDatabasePath(config, language); - const databaseBundlePath = path12.resolve( + const databaseBundlePath = path13.resolve( config.dbLocation, `${config.debugDatabaseName}-${language}-partial.zip` ); @@ -167570,7 +167662,7 @@ var github2 = __toESM(require_github()); // src/upload-lib.ts var fs15 = __toESM(require("fs")); -var path14 = __toESM(require("path")); +var path15 = __toESM(require("path")); var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core13 = __toESM(require_core()); @@ -167578,7 +167670,7 @@ var jsonschema2 = __toESM(require_lib2()); // src/fingerprints.ts var fs14 = __toESM(require("fs")); -var import_path = __toESM(require("path")); +var import_path2 = __toESM(require("path")); // node_modules/long/index.js var wasm = null; @@ -168637,7 +168729,7 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) { ); return void 0; } - if (!import_path.default.isAbsolute(uri)) { + if (!import_path2.default.isAbsolute(uri)) { uri = srcRootPrefix + uri; } if (!fs14.existsSync(uri)) { @@ -168867,10 +168959,10 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo ); codeQL = initCodeQLResult.codeql; } - const baseTempDir = path14.resolve(tempDir, "combined-sarif"); + const baseTempDir = path15.resolve(tempDir, "combined-sarif"); fs15.mkdirSync(baseTempDir, { recursive: true }); - const outputDirectory = fs15.mkdtempSync(path14.resolve(baseTempDir, "output-")); - const outputFile = path14.resolve(outputDirectory, "combined-sarif.sarif"); + const outputDirectory = fs15.mkdtempSync(path15.resolve(baseTempDir, "output-")); + const outputFile = path15.resolve(outputDirectory, "combined-sarif.sarif"); await codeQL.mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory: true }); @@ -168903,7 +168995,7 @@ function getAutomationID2(category, analysis_key, environment) { async function uploadPayload(payload, repositoryNwo, logger, analysis) { logger.info("Uploading results"); if (shouldSkipSarifUpload()) { - const payloadSaveFile = path14.join( + const payloadSaveFile = path15.join( getTemporaryDirectory(), `payload-${analysis.kind}.json` ); @@ -168948,9 +169040,9 @@ function findSarifFilesInDir(sarifPath, isSarif) { const entries = fs15.readdirSync(dir, { withFileTypes: true }); for (const entry of entries) { if (entry.isFile() && isSarif(entry.name)) { - sarifFiles.push(path14.resolve(dir, entry.name)); + sarifFiles.push(path15.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - walkSarifFiles(path14.resolve(dir, entry.name)); + walkSarifFiles(path15.resolve(dir, entry.name)); } } }; @@ -169320,7 +169412,7 @@ function filterAlertsByDiffRange(logger, sarif) { if (!locationUri || locationStartLine === void 0) { return false; } - const locationPath = path14.join(checkoutPath, locationUri).replaceAll(path14.sep, "/"); + const locationPath = path15.join(checkoutPath, locationUri).replaceAll(path15.sep, "/"); return diffRanges.some( (range) => range.path === locationPath && (range.startLine <= locationStartLine && range.endLine >= locationStartLine || range.startLine === 0 && range.endLine === 0) ); @@ -169333,7 +169425,7 @@ function filterAlertsByDiffRange(logger, sarif) { // src/workflow.ts var fs16 = __toESM(require("fs")); -var path15 = __toESM(require("path")); +var path16 = __toESM(require("path")); var import_zlib2 = __toESM(require("zlib")); var core14 = __toESM(require_core()); function toCodedErrors(errors) { @@ -169365,7 +169457,7 @@ async function getWorkflow(logger) { } async function getWorkflowAbsolutePath(logger) { const relativePath = await getWorkflowRelativePath(); - const absolutePath = path15.join( + const absolutePath = path16.join( getRequiredEnvParam("GITHUB_WORKSPACE"), relativePath ); diff --git a/lib/init-action.js b/lib/init-action.js index 19a73d5c41..4cb652333d 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -104575,6 +104575,7 @@ function formatDuration(durationMs) { // src/diagnostics.ts var unwrittenDiagnostics = []; +var unwrittenDefaultLanguageDiagnostics = []; function makeDiagnostic(id, name, data = void 0) { return { ...data, @@ -104595,13 +104596,17 @@ function addDiagnostic(config, language, diagnostic) { } } function addNoLanguageDiagnostic(config, diagnostic) { - addDiagnostic( - config, - // Arbitrarily choose the first language. We could also choose all languages, but that - // increases the risk of misinterpreting the data. - config.languages[0], - diagnostic - ); + if (config !== void 0) { + addDiagnostic( + config, + // Arbitrarily choose the first language. We could also choose all languages, but that + // increases the risk of misinterpreting the data. + config.languages[0], + diagnostic + ); + } else { + unwrittenDefaultLanguageDiagnostics.push(diagnostic); + } } function writeDiagnostic(config, language, diagnostic) { const logger = getActionsLogger(); @@ -104638,13 +104643,16 @@ function logUnwrittenDiagnostics() { } function flushDiagnostics(config) { const logger = getActionsLogger(); - logger.debug( - `Writing ${unwrittenDiagnostics.length} diagnostic(s) to database.` - ); + const diagnosticsCount = unwrittenDiagnostics.length + unwrittenDefaultLanguageDiagnostics.length; + logger.debug(`Writing ${diagnosticsCount} diagnostic(s) to database.`); for (const unwritten of unwrittenDiagnostics) { writeDiagnostic(config, unwritten.language, unwritten.diagnostic); } + for (const unwritten of unwrittenDefaultLanguageDiagnostics) { + addNoLanguageDiagnostic(config, unwritten); + } unwrittenDiagnostics = []; + unwrittenDefaultLanguageDiagnostics = []; } function makeTelemetryDiagnostic(id, name, attributes) { return makeDiagnostic(id, name, { @@ -105167,6 +105175,11 @@ var featureConfig = { legacyApi: true, minimumVersion: void 0 }, + ["force_nightly" /* ForceNightly */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_FORCE_NIGHTLY", + minimumVersion: void 0 + }, ["ignore_generated_files" /* IgnoreGeneratedFiles */]: { defaultValue: false, envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES", @@ -107378,10 +107391,36 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian let cliVersion2; let tagName; let url; - if (toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput)) { - logger.info( - `Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.` - ); + const canForceNightlyWithFF = isDynamicWorkflow() || isInTestMode(); + const forceNightlyValueFF = await features.getValue("force_nightly" /* ForceNightly */); + const forceNightly = forceNightlyValueFF && canForceNightlyWithFF; + const nightlyRequestedByToolsInput = toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput); + if (forceNightly || nightlyRequestedByToolsInput) { + if (forceNightly) { + logger.info( + `Using the latest CodeQL CLI nightly, as forced by the ${"force_nightly" /* ForceNightly */} feature flag.` + ); + addNoLanguageDiagnostic( + void 0, + makeDiagnostic( + "codeql-action/forced-nightly-cli", + "A nightly release of CodeQL was used", + { + markdownMessage: "GitHub configured this analysis to use a nightly release of CodeQL to allow you to preview changes from an upcoming release.\n\nNightly releases do not undergo the same validation as regular releases and may lead to analysis instability.\n\nIf use of a nightly CodeQL release for this analysis is unexpected, please contact GitHub support.", + visibility: { + cliSummaryTable: true, + statusPage: true, + telemetry: true + }, + severity: "note" + } + ) + ); + } else { + logger.info( + `Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.` + ); + } toolsInput = await getNightlyToolsUrl(logger); } const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput); diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index 2e53715e63..d1e66317df 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -103958,6 +103958,11 @@ var featureConfig = { legacyApi: true, minimumVersion: void 0 }, + ["force_nightly" /* ForceNightly */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_FORCE_NIGHTLY", + minimumVersion: void 0 + }, ["ignore_generated_files" /* IgnoreGeneratedFiles */]: { defaultValue: false, envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES", diff --git a/lib/setup-codeql-action.js b/lib/setup-codeql-action.js index 289d27e5c6..14f5451ddd 100644 --- a/lib/setup-codeql-action.js +++ b/lib/setup-codeql-action.js @@ -1337,14 +1337,14 @@ var require_util = __commonJS({ } const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; - let path8 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path9 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path8 && path8[0] !== "/") { - path8 = `/${path8}`; + if (path9 && path9[0] !== "/") { + path9 = `/${path9}`; } - return new URL(`${origin}${path8}`); + return new URL(`${origin}${path9}`); } if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); @@ -1795,39 +1795,39 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path8, origin } + request: { method, path: path9, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path8); + debuglog("sending request to %s %s/%s", method, origin, path9); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path8, origin }, + request: { method, path: path9, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path8, + path9, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path8, origin } + request: { method, path: path9, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path8); + debuglog("trailers received from %s %s/%s", method, origin, path9); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path8, origin }, + request: { method, path: path9, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path8, + path9, error3.message ); }); @@ -1876,9 +1876,9 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path8, origin } + request: { method, path: path9, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path8); + debuglog("sending request to %s %s/%s", method, origin, path9); }); } diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { @@ -1941,7 +1941,7 @@ var require_request = __commonJS({ var kHandler = /* @__PURE__ */ Symbol("handler"); var Request = class { constructor(origin, { - path: path8, + path: path9, method, body, headers, @@ -1956,11 +1956,11 @@ var require_request = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path8 !== "string") { + if (typeof path9 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path8[0] !== "/" && !(path8.startsWith("http://") || path8.startsWith("https://")) && method !== "CONNECT") { + } else if (path9[0] !== "/" && !(path9.startsWith("http://") || path9.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path8)) { + } else if (invalidPathRegex.test(path9)) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -2023,7 +2023,7 @@ var require_request = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? buildURL(path8, query) : path8; + this.path = query ? buildURL(path9, query) : path9; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -6536,7 +6536,7 @@ var require_client_h1 = __commonJS({ return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } function writeH1(client, request2) { - const { method, path: path8, host, upgrade, blocking, reset } = request2; + const { method, path: path9, host, upgrade, blocking, reset } = request2; let { body, headers, contentLength } = request2; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; if (util.isFormDataLike(body)) { @@ -6602,7 +6602,7 @@ var require_client_h1 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path8} HTTP/1.1\r + let header = `${method} ${path9} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -7128,7 +7128,7 @@ var require_client_h2 = __commonJS({ } function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path: path8, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path9, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; let { body } = request2; if (upgrade) { util.errorRequest(client, request2, new Error("Upgrade not supported for H2")); @@ -7195,7 +7195,7 @@ var require_client_h2 = __commonJS({ }); return true; } - headers[HTTP2_HEADER_PATH] = path8; + headers[HTTP2_HEADER_PATH] = path9; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -7548,9 +7548,9 @@ var require_redirect_handler = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path8 = search ? `${pathname}${search}` : pathname; + const path9 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path8; + this.opts.path = path9; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -8784,10 +8784,10 @@ var require_proxy_agent = __commonJS({ }; const { origin, - path: path8 = "/", + path: path9 = "/", headers = {} } = opts; - opts.path = origin + path8; + opts.path = origin + path9; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -10708,20 +10708,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path8) { - if (typeof path8 !== "string") { - return path8; + function safeUrl(path9) { + if (typeof path9 !== "string") { + return path9; } - const pathSegments = path8.split("?"); + const pathSegments = path9.split("?"); if (pathSegments.length !== 2) { - return path8; + return path9; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path8, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path8); + function matchKey(mockDispatch2, { path: path9, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path9); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -10743,7 +10743,7 @@ var require_mock_utils = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path8 }) => matchValue(safeUrl(path8), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path9 }) => matchValue(safeUrl(path9), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -10781,9 +10781,9 @@ var require_mock_utils = __commonJS({ } } function buildKey(opts) { - const { path: path8, method, body, headers, query } = opts; + const { path: path9, method, body, headers, query } = opts; return { - path: path8, + path: path9, method, body, headers, @@ -11246,10 +11246,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path8, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path9, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path8, + Path: path9, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -16130,9 +16130,9 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path8) { - for (let i = 0; i < path8.length; ++i) { - const code = path8.charCodeAt(i); + function validateCookiePath(path9) { + for (let i = 0; i < path9.length; ++i) { + const code = path9.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -18726,11 +18726,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path8 = opts.path; + let path9 = opts.path; if (!opts.path.startsWith("/")) { - path8 = `/${path8}`; + path9 = `/${path9}`; } - url = new URL(util.parseOrigin(url).origin + path8); + url = new URL(util.parseOrigin(url).origin + path9); } else { if (!opts) { opts = typeof url === "object" ? url : {}; @@ -20033,7 +20033,7 @@ var require_path_utils = __commonJS({ exports2.toPosixPath = toPosixPath; exports2.toWin32Path = toWin32Path; exports2.toPlatformPath = toPlatformPath; - var path8 = __importStar2(require("path")); + var path9 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -20041,7 +20041,7 @@ var require_path_utils = __commonJS({ return pth.replace(/[/]/g, "\\"); } function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path8.sep); + return pth.replace(/[/\\]/g, path9.sep); } } }); @@ -20124,7 +20124,7 @@ var require_io_util = __commonJS({ exports2.tryGetExecutablePath = tryGetExecutablePath; exports2.getCmdPath = getCmdPath; var fs9 = __importStar2(require("fs")); - var path8 = __importStar2(require("path")); + var path9 = __importStar2(require("path")); _a = fs9.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; function readlink(fsPath) { @@ -20179,7 +20179,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path8.extname(filePath).toUpperCase(); + const upperExt = path9.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -20203,11 +20203,11 @@ var require_io_util = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path8.dirname(filePath); - const upperName = path8.basename(filePath).toUpperCase(); + const directory = path9.dirname(filePath); + const upperName = path9.basename(filePath).toUpperCase(); for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path8.join(directory, actualName); + filePath = path9.join(directory, actualName); break; } } @@ -20319,7 +20319,7 @@ var require_io = __commonJS({ exports2.which = which6; exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path8 = __importStar2(require("path")); + var path9 = __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 = {}) { @@ -20328,7 +20328,7 @@ var require_io = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path8.join(dest, path8.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path9.join(dest, path9.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -20340,7 +20340,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path8.relative(source, newDest) === "") { + if (path9.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile2(source, newDest, force); @@ -20352,7 +20352,7 @@ var require_io = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path8.join(dest, path8.basename(source)); + dest = path9.join(dest, path9.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -20363,7 +20363,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path8.dirname(dest)); + yield mkdirP(path9.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -20422,7 +20422,7 @@ var require_io = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path8.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path9.delimiter)) { if (extension) { extensions.push(extension); } @@ -20435,12 +20435,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path8.sep)) { + if (tool.includes(path9.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path8.delimiter)) { + for (const p of process.env.PATH.split(path9.delimiter)) { if (p) { directories.push(p); } @@ -20448,7 +20448,7 @@ var require_io = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path8.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path9.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -20578,7 +20578,7 @@ var require_toolrunner = __commonJS({ var os3 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path8 = __importStar2(require("path")); + var path9 = __importStar2(require("path")); var io6 = __importStar2(require_io()); var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); @@ -20793,7 +20793,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 = path8.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path9.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io6.which(this.toolPath, true); return new Promise((resolve4, reject) => __awaiter2(this, void 0, void 0, function* () { @@ -21346,7 +21346,7 @@ var require_core = __commonJS({ var file_command_1 = require_file_command(); var utils_1 = require_utils(); var os3 = __importStar2(require("os")); - var path8 = __importStar2(require("path")); + var path9 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -21372,7 +21372,7 @@ var require_core = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path8.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path9.delimiter}${process.env["PATH"]}`; } function getInput2(name, options) { const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; @@ -21509,8 +21509,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 path8 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path8} does not exist${os_1.EOL}`); + const path9 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path9} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -22335,14 +22335,14 @@ var require_util9 = __commonJS({ } const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; - let path8 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path9 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path8 && path8[0] !== "/") { - path8 = `/${path8}`; + if (path9 && path9[0] !== "/") { + path9 = `/${path9}`; } - return new URL(`${origin}${path8}`); + return new URL(`${origin}${path9}`); } if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); @@ -22793,39 +22793,39 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path8, origin } + request: { method, path: path9, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path8); + debuglog("sending request to %s %s/%s", method, origin, path9); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path8, origin }, + request: { method, path: path9, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path8, + path9, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path8, origin } + request: { method, path: path9, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path8); + debuglog("trailers received from %s %s/%s", method, origin, path9); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path8, origin }, + request: { method, path: path9, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path8, + path9, error3.message ); }); @@ -22874,9 +22874,9 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path8, origin } + request: { method, path: path9, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path8); + debuglog("sending request to %s %s/%s", method, origin, path9); }); } diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { @@ -22939,7 +22939,7 @@ var require_request3 = __commonJS({ var kHandler = /* @__PURE__ */ Symbol("handler"); var Request = class { constructor(origin, { - path: path8, + path: path9, method, body, headers, @@ -22954,11 +22954,11 @@ var require_request3 = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path8 !== "string") { + if (typeof path9 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path8[0] !== "/" && !(path8.startsWith("http://") || path8.startsWith("https://")) && method !== "CONNECT") { + } else if (path9[0] !== "/" && !(path9.startsWith("http://") || path9.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path8)) { + } else if (invalidPathRegex.test(path9)) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -23021,7 +23021,7 @@ var require_request3 = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? buildURL(path8, query) : path8; + this.path = query ? buildURL(path9, query) : path9; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -27534,7 +27534,7 @@ var require_client_h12 = __commonJS({ return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } function writeH1(client, request2) { - const { method, path: path8, host, upgrade, blocking, reset } = request2; + const { method, path: path9, host, upgrade, blocking, reset } = request2; let { body, headers, contentLength } = request2; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; if (util.isFormDataLike(body)) { @@ -27600,7 +27600,7 @@ var require_client_h12 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path8} HTTP/1.1\r + let header = `${method} ${path9} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -28126,7 +28126,7 @@ var require_client_h22 = __commonJS({ } function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path: path8, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path9, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; let { body } = request2; if (upgrade) { util.errorRequest(client, request2, new Error("Upgrade not supported for H2")); @@ -28193,7 +28193,7 @@ var require_client_h22 = __commonJS({ }); return true; } - headers[HTTP2_HEADER_PATH] = path8; + headers[HTTP2_HEADER_PATH] = path9; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -28546,9 +28546,9 @@ var require_redirect_handler2 = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path8 = search ? `${pathname}${search}` : pathname; + const path9 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path8; + this.opts.path = path9; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -29782,10 +29782,10 @@ var require_proxy_agent2 = __commonJS({ }; const { origin, - path: path8 = "/", + path: path9 = "/", headers = {} } = opts; - opts.path = origin + path8; + opts.path = origin + path9; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -31706,20 +31706,20 @@ var require_mock_utils2 = __commonJS({ } return true; } - function safeUrl(path8) { - if (typeof path8 !== "string") { - return path8; + function safeUrl(path9) { + if (typeof path9 !== "string") { + return path9; } - const pathSegments = path8.split("?"); + const pathSegments = path9.split("?"); if (pathSegments.length !== 2) { - return path8; + return path9; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path8, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path8); + function matchKey(mockDispatch2, { path: path9, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path9); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -31741,7 +31741,7 @@ var require_mock_utils2 = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path8 }) => matchValue(safeUrl(path8), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path9 }) => matchValue(safeUrl(path9), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -31779,9 +31779,9 @@ var require_mock_utils2 = __commonJS({ } } function buildKey(opts) { - const { path: path8, method, body, headers, query } = opts; + const { path: path9, method, body, headers, query } = opts; return { - path: path8, + path: path9, method, body, headers, @@ -32244,10 +32244,10 @@ var require_pending_interceptors_formatter2 = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path8, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path9, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path8, + Path: path9, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -37128,9 +37128,9 @@ var require_util14 = __commonJS({ } } } - function validateCookiePath(path8) { - for (let i = 0; i < path8.length; ++i) { - const code = path8.charCodeAt(i); + function validateCookiePath(path9) { + for (let i = 0; i < path9.length; ++i) { + const code = path9.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -39724,11 +39724,11 @@ var require_undici2 = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path8 = opts.path; + let path9 = opts.path; if (!opts.path.startsWith("/")) { - path8 = `/${path8}`; + path9 = `/${path9}`; } - url = new URL(util.parseOrigin(url).origin + path8); + url = new URL(util.parseOrigin(url).origin + path9); } else { if (!opts) { opts = typeof url === "object" ? url : {}; @@ -47539,7 +47539,7 @@ var require_internal_path_helper = __commonJS({ exports2.hasRoot = hasRoot; exports2.normalizeSeparators = normalizeSeparators; exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - var path8 = __importStar2(require("path")); + var path9 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname2(p) { @@ -47547,7 +47547,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path8.dirname(p); + let result = path9.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -47584,7 +47584,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 += path8.sep; + root += path9.sep; } return root + itemPath; } @@ -47618,10 +47618,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path8.sep)) { + if (!p.endsWith(path9.sep)) { return p; } - if (p === path8.sep) { + if (p === path9.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -47966,7 +47966,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path8 = (function() { + var path9 = (function() { try { return require("path"); } catch (e) { @@ -47974,7 +47974,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path8.sep; + minimatch.sep = path9.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand2 = require_brace_expansion(); var plTypes = { @@ -48063,8 +48063,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path8.sep !== "/") { - pattern = pattern.split(path8.sep).join("/"); + if (!options.allowWindowsEscape && path9.sep !== "/") { + pattern = pattern.split(path9.sep).join("/"); } this.options = options; this.set = []; @@ -48433,8 +48433,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path8.sep !== "/") { - f = f.split(path8.sep).join("/"); + if (path9.sep !== "/") { + f = f.split(path9.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -48580,7 +48580,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path8 = __importStar2(require("path")); + var path9 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -48595,12 +48595,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(path8.sep); + this.segments = itemPath.split(path9.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path8.basename(remaining); + const basename = path9.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -48618,7 +48618,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(path8.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path9.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -48629,12 +48629,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path8.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path9.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path8.sep; + result += path9.sep; } result += this.segments[i]; } @@ -48692,7 +48692,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os3 = __importStar2(require("os")); - var path8 = __importStar2(require("path")); + var path9 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); @@ -48721,7 +48721,7 @@ var require_internal_pattern = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path8.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path9.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -48745,8 +48745,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path8.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path8.sep}`; + if (!itemPath.endsWith(path9.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path9.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -48781,9 +48781,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(`.${path8.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path9.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path8.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path9.sep}`)) { homedir = homedir || os3.homedir(); (0, assert_1.default)(homedir, "Unable to determine HOME directory"); (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); @@ -48867,8 +48867,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path8, level) { - this.path = path8; + constructor(path9, level) { + this.path = path9; this.level = level; } }; @@ -49012,7 +49012,7 @@ var require_internal_globber = __commonJS({ var core13 = __importStar2(require_core()); var fs9 = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); - var path8 = __importStar2(require("path")); + var path9 = __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(); @@ -49088,7 +49088,7 @@ var require_internal_globber = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path8.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path9.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -49098,7 +49098,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await2(fs9.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path8.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs9.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path9.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); @@ -49260,7 +49260,7 @@ var require_internal_hash_files = __commonJS({ var fs9 = __importStar2(require("fs")); var stream2 = __importStar2(require("stream")); var util = __importStar2(require("util")); - var path8 = __importStar2(require("path")); + var path9 = __importStar2(require("path")); function hashFiles(globber_1, currentWorkspace_1) { return __awaiter2(this, arguments, void 0, function* (globber, currentWorkspace, verbose = false) { var _a, e_1, _b, _c; @@ -49276,7 +49276,7 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path8.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path9.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } @@ -50662,7 +50662,7 @@ var require_cacheUtils = __commonJS({ var io6 = __importStar2(require_io()); var crypto2 = __importStar2(require("crypto")); var fs9 = __importStar2(require("fs")); - var path8 = __importStar2(require("path")); + var path9 = __importStar2(require("path")); var semver9 = __importStar2(require_semver3()); var util = __importStar2(require("util")); var constants_1 = require_constants12(); @@ -50682,9 +50682,9 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path8.join(baseLocation, "actions", "temp"); + tempDirectory = path9.join(baseLocation, "actions", "temp"); } - const dest = path8.join(tempDirectory, crypto2.randomUUID()); + const dest = path9.join(tempDirectory, crypto2.randomUUID()); yield io6.mkdirP(dest); return dest; }); @@ -50706,7 +50706,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path8.relative(workspace, file).replace(new RegExp(`\\${path8.sep}`, "g"), "/"); + const relativeFile = path9.relative(workspace, file).replace(new RegExp(`\\${path9.sep}`, "g"), "/"); core13.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -51233,13 +51233,13 @@ function __disposeResources(env) { } return next(); } -function __rewriteRelativeImportExtension(path8, preserveJsx) { - if (typeof path8 === "string" && /^\.\.?\//.test(path8)) { - return path8.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { +function __rewriteRelativeImportExtension(path9, preserveJsx) { + if (typeof path9 === "string" && /^\.\.?\//.test(path9)) { + return path9.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; }); } - return path8; + return path9; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -55653,8 +55653,8 @@ var require_getClient = __commonJS({ } const { allowInsecureConnection, httpClient } = clientOptions; const endpointUrl = clientOptions.endpoint ?? endpoint2; - const client = (path8, ...args) => { - const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path8, args, { allowInsecureConnection, ...requestOptions }); + const client = (path9, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path9, args, { allowInsecureConnection, ...requestOptions }); return { get: (requestOptions = {}) => { return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); @@ -59525,15 +59525,15 @@ var require_urlHelpers2 = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path8 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path8.startsWith("/")) { - path8 = path8.substring(1); + let path9 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path9.startsWith("/")) { + path9 = path9.substring(1); } - if (isAbsoluteUrl(path8)) { - requestUrl = path8; + if (isAbsoluteUrl(path9)) { + requestUrl = path9; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path8); + requestUrl = appendPath(requestUrl, path9); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -59579,9 +59579,9 @@ var require_urlHelpers2 = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path8 = pathToAppend.substring(0, searchStart); + const path9 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path8; + newPath = newPath + path9; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -61814,10 +61814,10 @@ var require_utils_common = __commonJS({ var constants_js_1 = require_constants15(); function escapeURLPath(url) { const urlParsed = new URL(url); - let path8 = urlParsed.pathname; - path8 = path8 || "/"; - path8 = escape(path8); - urlParsed.pathname = path8; + let path9 = urlParsed.pathname; + path9 = path9 || "/"; + path9 = escape(path9); + urlParsed.pathname = path9; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -61902,9 +61902,9 @@ var require_utils_common = __commonJS({ } function appendToURLPath(url, name) { const urlParsed = new URL(url); - let path8 = urlParsed.pathname; - path8 = path8 ? path8.endsWith("/") ? `${path8}${name}` : `${path8}/${name}` : name; - urlParsed.pathname = path8; + let path9 = urlParsed.pathname; + path9 = path9 ? path9.endsWith("/") ? `${path9}${name}` : `${path9}/${name}` : name; + urlParsed.pathname = path9; return urlParsed.toString(); } function setURLParameter(url, name, value) { @@ -63131,9 +63131,9 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path8 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path9 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path8}`; + canonicalizedResourceString += `/${this.factory.accountName}${path9}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -63872,10 +63872,10 @@ var require_utils_common2 = __commonJS({ var constants_js_1 = require_constants16(); function escapeURLPath(url) { const urlParsed = new URL(url); - let path8 = urlParsed.pathname; - path8 = path8 || "/"; - path8 = escape(path8); - urlParsed.pathname = path8; + let path9 = urlParsed.pathname; + path9 = path9 || "/"; + path9 = escape(path9); + urlParsed.pathname = path9; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -63960,9 +63960,9 @@ var require_utils_common2 = __commonJS({ } function appendToURLPath(url, name) { const urlParsed = new URL(url); - let path8 = urlParsed.pathname; - path8 = path8 ? path8.endsWith("/") ? `${path8}${name}` : `${path8}/${name}` : name; - urlParsed.pathname = path8; + let path9 = urlParsed.pathname; + path9 = path9 ? path9.endsWith("/") ? `${path9}${name}` : `${path9}/${name}` : name; + urlParsed.pathname = path9; return urlParsed.toString(); } function setURLParameter(url, name, value) { @@ -64883,9 +64883,9 @@ var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path8 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path9 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path8}`; + canonicalizedResourceString += `/${this.factory.accountName}${path9}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -65515,9 +65515,9 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path8 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path9 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path8}`; + canonicalizedResourceString += `/${options.accountName}${path9}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -65862,9 +65862,9 @@ var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path8 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path9 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path8}`; + canonicalizedResourceString += `/${options.accountName}${path9}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -87519,8 +87519,8 @@ var require_BlobBatch = __commonJS({ if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path8 = (0, utils_common_js_1.getURLPath)(subRequest.url); - if (!path8 || path8 === "") { + const path9 = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path9 || path9 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -87598,8 +87598,8 @@ var require_BlobBatchClient = __commonJS({ pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); - const path8 = (0, utils_common_js_1.getURLPath)(url); - if (path8 && path8 !== "/") { + const path9 = (0, utils_common_js_1.getURLPath)(url); + if (path9 && path9 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -96908,7 +96908,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io6 = __importStar2(require_io()); var fs_1 = require("fs"); - var path8 = __importStar2(require("path")); + var path9 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants12(); var IS_WINDOWS = process.platform === "win32"; @@ -96954,13 +96954,13 @@ var require_tar = __commonJS({ const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (type2) { case "create": - args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path8.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path8.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path8.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path9.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path9.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path9.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path8.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path8.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path9.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path9.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path8.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path9.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -97006,7 +97006,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path8.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path9.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -97015,7 +97015,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path8.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path9.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -97030,7 +97030,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path8.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path9.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -97039,7 +97039,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path8.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path9.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -97077,7 +97077,7 @@ var require_tar = __commonJS({ } function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path8.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path9.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -97159,7 +97159,7 @@ var require_cache5 = __commonJS({ exports2.restoreCache = restoreCache3; exports2.saveCache = saveCache3; var core13 = __importStar2(require_core()); - var path8 = __importStar2(require("path")); + var path9 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); @@ -97254,7 +97254,7 @@ var require_cache5 = __commonJS({ core13.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path8.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path9.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core13.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core13.isDebug()) { @@ -97323,7 +97323,7 @@ var require_cache5 = __commonJS({ core13.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path8.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path9.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core13.debug(`Archive path: ${archivePath}`); core13.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -97385,7 +97385,7 @@ var require_cache5 = __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 = path8.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path9.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core13.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -97449,7 +97449,7 @@ var require_cache5 = __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 = path8.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path9.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core13.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -97528,14 +97528,14 @@ var require_helpers3 = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { "use strict"; var uri = require("url"); - var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path8, name, argument) { - if (Array.isArray(path8)) { - this.path = path8; - this.property = path8.reduce(function(sum, item) { + var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path9, name, argument) { + if (Array.isArray(path9)) { + this.path = path9; + this.property = path9.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path8 !== void 0) { - this.property = path8; + } else if (path9 !== void 0) { + this.property = path9; } if (message) { this.message = message; @@ -97626,16 +97626,16 @@ var require_helpers3 = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path8, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path9, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path8)) { - this.path = path8; - this.propertyPath = path8.reduce(function(sum, item) { + if (Array.isArray(path9)) { + this.path = path9; + this.propertyPath = path9.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path8; + this.propertyPath = path9; } this.base = base; this.schemas = schemas; @@ -97644,10 +97644,10 @@ var require_helpers3 = __commonJS({ return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path8 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path9 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); var id = schema2.$id || schema2.id; var base = uri.resolve(this.base, id || ""); - var ctx = new SchemaContext(schema2, this.options, path8, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema2, this.options, path9, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -99173,7 +99173,7 @@ var require_tool_cache = __commonJS({ var fs9 = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os3 = __importStar2(require("os")); - var path8 = __importStar2(require("path")); + var path9 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver9 = __importStar2(require_semver2()); var stream2 = __importStar2(require("stream")); @@ -99194,8 +99194,8 @@ var require_tool_cache = __commonJS({ var userAgent2 = "actions/tool-cache"; function downloadTool2(url, dest, auth2, headers) { return __awaiter2(this, void 0, void 0, function* () { - dest = dest || path8.join(_getTempDirectory(), crypto2.randomUUID()); - yield io6.mkdirP(path8.dirname(dest)); + dest = dest || path9.join(_getTempDirectory(), crypto2.randomUUID()); + yield io6.mkdirP(path9.dirname(dest)); core13.debug(`Downloading ${url}`); core13.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -99285,7 +99285,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path8.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path9.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}'`; @@ -99457,7 +99457,7 @@ var require_tool_cache = __commonJS({ } const destPath = yield _createToolPath(tool, version, arch2); for (const itemName of fs9.readdirSync(sourceDir)) { - const s = path8.join(sourceDir, itemName); + const s = path9.join(sourceDir, itemName); yield io6.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -99474,7 +99474,7 @@ var require_tool_cache = __commonJS({ throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path8.join(destFolder, targetFile); + const destPath = path9.join(destFolder, targetFile); core13.debug(`destination file ${destPath}`); yield io6.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -99497,7 +99497,7 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver9.clean(versionSpec) || ""; - const cachePath = path8.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path9.join(_getCacheDirectory(), toolName, versionSpec, arch2); core13.debug(`checking cache: ${cachePath}`); if (fs9.existsSync(cachePath) && fs9.existsSync(`${cachePath}.complete`)) { core13.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); @@ -99511,12 +99511,12 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os3.arch(); - const toolPath = path8.join(_getCacheDirectory(), toolName); + const toolPath = path9.join(_getCacheDirectory(), toolName); if (fs9.existsSync(toolPath)) { const children = fs9.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path8.join(toolPath, child, arch2 || ""); + const fullPath = path9.join(toolPath, child, arch2 || ""); if (fs9.existsSync(fullPath) && fs9.existsSync(`${fullPath}.complete`)) { versions.push(child); } @@ -99568,7 +99568,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path8.join(_getTempDirectory(), crypto2.randomUUID()); + dest = path9.join(_getTempDirectory(), crypto2.randomUUID()); } yield io6.mkdirP(dest); return dest; @@ -99576,7 +99576,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter2(this, void 0, void 0, function* () { - const folderPath = path8.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path9.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); core13.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io6.rmRF(folderPath); @@ -99586,7 +99586,7 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path8.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path9.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; fs9.writeFileSync(markerPath, ""); core13.debug("finished caching tool"); @@ -103650,8 +103650,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path8 = decodeGitFilePath(match[2]); - fileOidMap[path8] = oid; + const path9 = decodeGitFilePath(match[2]); + fileOidMap[path9] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -103872,6 +103872,11 @@ var featureConfig = { legacyApi: true, minimumVersion: void 0 }, + ["force_nightly" /* ForceNightly */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_FORCE_NIGHTLY", + minimumVersion: void 0 + }, ["ignore_generated_files" /* IgnoreGeneratedFiles */]: { defaultValue: false, envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES", @@ -104320,7 +104325,7 @@ var io5 = __toESM(require_io()); // src/codeql.ts var fs8 = __toESM(require("fs")); -var path7 = __toESM(require("path")); +var path8 = __toESM(require("path")); var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -104584,6 +104589,65 @@ var PACK_IDENTIFIER_PATTERN = (function() { return new RegExp(`^${component}/${component}$`); })(); +// src/diagnostics.ts +var import_fs = require("fs"); +var import_path = __toESM(require("path")); +var unwrittenDiagnostics = []; +var unwrittenDefaultLanguageDiagnostics = []; +function makeDiagnostic(id, name, data = void 0) { + return { + ...data, + timestamp: data?.timestamp ?? (/* @__PURE__ */ new Date()).toISOString(), + source: { ...data?.source, id, name } + }; +} +function addDiagnostic(config, language, diagnostic) { + const logger = getActionsLogger(); + const databasePath = language ? getCodeQLDatabasePath(config, language) : config.dbLocation; + if ((0, import_fs.existsSync)(databasePath)) { + writeDiagnostic(config, language, diagnostic); + } else { + logger.debug( + `Writing a diagnostic for ${language}, but the database at ${databasePath} does not exist yet.` + ); + unwrittenDiagnostics.push({ diagnostic, language }); + } +} +function addNoLanguageDiagnostic(config, diagnostic) { + if (config !== void 0) { + addDiagnostic( + config, + // Arbitrarily choose the first language. We could also choose all languages, but that + // increases the risk of misinterpreting the data. + config.languages[0], + diagnostic + ); + } else { + unwrittenDefaultLanguageDiagnostics.push(diagnostic); + } +} +function writeDiagnostic(config, language, diagnostic) { + const logger = getActionsLogger(); + const databasePath = language ? getCodeQLDatabasePath(config, language) : config.dbLocation; + const diagnosticsPath = import_path.default.resolve( + databasePath, + "diagnostic", + "codeql-action" + ); + try { + (0, import_fs.mkdirSync)(diagnosticsPath, { recursive: true }); + const jsonPath = import_path.default.resolve( + diagnosticsPath, + // Remove colons from the timestamp as these are not allowed in Windows filenames. + `codeql-action-${diagnostic.timestamp.replaceAll(":", "")}.json` + ); + (0, import_fs.writeFileSync)(jsonPath, JSON.stringify(diagnostic)); + } catch (err) { + logger.warning(`Unable to write diagnostic message to database: ${err}`); + logger.debug(JSON.stringify(diagnostic)); + } +} + // src/trap-caching.ts var actionsCache2 = __toESM(require_cache5()); @@ -104636,7 +104700,7 @@ function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) { // src/setup-codeql.ts var fs7 = __toESM(require("fs")); -var path6 = __toESM(require("path")); +var path7 = __toESM(require("path")); var toolcache3 = __toESM(require_tool_cache()); var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var semver8 = __toESM(require_semver2()); @@ -104802,7 +104866,7 @@ function inferCompressionMethod(tarPath) { // src/tools-download.ts var fs6 = __toESM(require("fs")); var os = __toESM(require("os")); -var path5 = __toESM(require("path")); +var path6 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -104935,7 +104999,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path5.join( + return path6.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver7.clean(version) || version, @@ -105079,7 +105143,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs7.existsSync(path6.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs7.existsSync(path7.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -105120,10 +105184,36 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian let cliVersion2; let tagName; let url; - if (toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput)) { - logger.info( - `Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.` - ); + const canForceNightlyWithFF = isDynamicWorkflow() || isInTestMode(); + const forceNightlyValueFF = await features.getValue("force_nightly" /* ForceNightly */); + const forceNightly = forceNightlyValueFF && canForceNightlyWithFF; + const nightlyRequestedByToolsInput = toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput); + if (forceNightly || nightlyRequestedByToolsInput) { + if (forceNightly) { + logger.info( + `Using the latest CodeQL CLI nightly, as forced by the ${"force_nightly" /* ForceNightly */} feature flag.` + ); + addNoLanguageDiagnostic( + void 0, + makeDiagnostic( + "codeql-action/forced-nightly-cli", + "A nightly release of CodeQL was used", + { + markdownMessage: "GitHub configured this analysis to use a nightly release of CodeQL to allow you to preview changes from an upcoming release.\n\nNightly releases do not undergo the same validation as regular releases and may lead to analysis instability.\n\nIf use of a nightly CodeQL release for this analysis is unexpected, please contact GitHub support.", + visibility: { + cliSummaryTable: true, + statusPage: true, + telemetry: true + }, + severity: "note" + } + ) + ); + } else { + logger.info( + `Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.` + ); + } toolsInput = await getNightlyToolsUrl(logger); } const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput); @@ -105452,7 +105542,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path6.join(tempDir, v4_default()); + return path7.join(tempDir, v4_default()); } async function getNightlyToolsUrl(logger) { const zstdAvailability = await isZstdAvailable(logger); @@ -105540,7 +105630,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path7.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path8.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -105596,7 +105686,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path7.join( + const tracingConfigPath = path8.join( extractorPath, "tools", "tracing-config.lua" @@ -105678,7 +105768,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path7.join( + const autobuildCmd = path8.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -106100,7 +106190,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path7.resolve(config.tempDir, "user-config.yaml"); + return path8.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index 0ba8bd6e7e..6511bca4b1 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -160972,6 +160972,11 @@ var featureConfig = { legacyApi: true, minimumVersion: void 0 }, + ["force_nightly" /* ForceNightly */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_FORCE_NIGHTLY", + minimumVersion: void 0 + }, ["ignore_generated_files" /* IgnoreGeneratedFiles */]: { defaultValue: false, envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES", diff --git a/lib/start-proxy-action.js b/lib/start-proxy-action.js index 2b16dae66c..f46813ec5c 100644 --- a/lib/start-proxy-action.js +++ b/lib/start-proxy-action.js @@ -120665,6 +120665,11 @@ var featureConfig = { legacyApi: true, minimumVersion: void 0 }, + ["force_nightly" /* ForceNightly */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_FORCE_NIGHTLY", + minimumVersion: void 0 + }, ["ignore_generated_files" /* IgnoreGeneratedFiles */]: { defaultValue: false, envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES", diff --git a/lib/upload-lib.js b/lib/upload-lib.js index 730c460ab8..4ca123dd4f 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -1337,14 +1337,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 path11 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path12 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path11 && path11[0] !== "/") { - path11 = `/${path11}`; + if (path12 && path12[0] !== "/") { + path12 = `/${path12}`; } - return new URL(`${origin}${path11}`); + return new URL(`${origin}${path12}`); } if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); @@ -1795,39 +1795,39 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path11, origin } + request: { method, path: path12, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path11); + debuglog("sending request to %s %s/%s", method, origin, path12); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path11, origin }, + request: { method, path: path12, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path11, + path12, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path11, origin } + request: { method, path: path12, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path11); + debuglog("trailers received from %s %s/%s", method, origin, path12); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path11, origin }, + request: { method, path: path12, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path11, + path12, error3.message ); }); @@ -1876,9 +1876,9 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path11, origin } + request: { method, path: path12, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path11); + debuglog("sending request to %s %s/%s", method, origin, path12); }); } diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { @@ -1941,7 +1941,7 @@ var require_request = __commonJS({ var kHandler = /* @__PURE__ */ Symbol("handler"); var Request = class { constructor(origin, { - path: path11, + path: path12, method, body, headers, @@ -1956,11 +1956,11 @@ var require_request = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path11 !== "string") { + if (typeof path12 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path11[0] !== "/" && !(path11.startsWith("http://") || path11.startsWith("https://")) && method !== "CONNECT") { + } else if (path12[0] !== "/" && !(path12.startsWith("http://") || path12.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path11)) { + } else if (invalidPathRegex.test(path12)) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -2023,7 +2023,7 @@ var require_request = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? buildURL(path11, query) : path11; + this.path = query ? buildURL(path12, query) : path12; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -6536,7 +6536,7 @@ var require_client_h1 = __commonJS({ return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } function writeH1(client, request2) { - const { method, path: path11, host, upgrade, blocking, reset } = request2; + const { method, path: path12, host, upgrade, blocking, reset } = request2; let { body, headers, contentLength } = request2; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; if (util.isFormDataLike(body)) { @@ -6602,7 +6602,7 @@ var require_client_h1 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path11} HTTP/1.1\r + let header = `${method} ${path12} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -7128,7 +7128,7 @@ var require_client_h2 = __commonJS({ } function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path: path11, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path12, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; let { body } = request2; if (upgrade) { util.errorRequest(client, request2, new Error("Upgrade not supported for H2")); @@ -7195,7 +7195,7 @@ var require_client_h2 = __commonJS({ }); return true; } - headers[HTTP2_HEADER_PATH] = path11; + headers[HTTP2_HEADER_PATH] = path12; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -7548,9 +7548,9 @@ var require_redirect_handler = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path11 = search ? `${pathname}${search}` : pathname; + const path12 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path11; + this.opts.path = path12; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -8784,10 +8784,10 @@ var require_proxy_agent = __commonJS({ }; const { origin, - path: path11 = "/", + path: path12 = "/", headers = {} } = opts; - opts.path = origin + path11; + opts.path = origin + path12; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -10708,20 +10708,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path11) { - if (typeof path11 !== "string") { - return path11; + function safeUrl(path12) { + if (typeof path12 !== "string") { + return path12; } - const pathSegments = path11.split("?"); + const pathSegments = path12.split("?"); if (pathSegments.length !== 2) { - return path11; + return path12; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path11, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path11); + function matchKey(mockDispatch2, { path: path12, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path12); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -10743,7 +10743,7 @@ var require_mock_utils = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path11 }) => matchValue(safeUrl(path11), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path12 }) => matchValue(safeUrl(path12), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -10781,9 +10781,9 @@ var require_mock_utils = __commonJS({ } } function buildKey(opts) { - const { path: path11, method, body, headers, query } = opts; + const { path: path12, method, body, headers, query } = opts; return { - path: path11, + path: path12, method, body, headers, @@ -11246,10 +11246,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path11, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path12, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path11, + Path: path12, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -16130,9 +16130,9 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path11) { - for (let i = 0; i < path11.length; ++i) { - const code = path11.charCodeAt(i); + function validateCookiePath(path12) { + for (let i = 0; i < path12.length; ++i) { + const code = path12.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -18726,11 +18726,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path11 = opts.path; + let path12 = opts.path; if (!opts.path.startsWith("/")) { - path11 = `/${path11}`; + path12 = `/${path12}`; } - url2 = new URL(util.parseOrigin(url2).origin + path11); + url2 = new URL(util.parseOrigin(url2).origin + path12); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -20033,7 +20033,7 @@ var require_path_utils = __commonJS({ exports2.toPosixPath = toPosixPath; exports2.toWin32Path = toWin32Path; exports2.toPlatformPath = toPlatformPath; - var path11 = __importStar2(require("path")); + var path12 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -20041,7 +20041,7 @@ var require_path_utils = __commonJS({ return pth.replace(/[/]/g, "\\"); } function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path11.sep); + return pth.replace(/[/\\]/g, path12.sep); } } }); @@ -20124,7 +20124,7 @@ var require_io_util = __commonJS({ exports2.tryGetExecutablePath = tryGetExecutablePath; exports2.getCmdPath = getCmdPath; var fs12 = __importStar2(require("fs")); - var path11 = __importStar2(require("path")); + var path12 = __importStar2(require("path")); _a = fs12.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; function readlink(fsPath) { @@ -20179,7 +20179,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path11.extname(filePath).toUpperCase(); + const upperExt = path12.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -20203,11 +20203,11 @@ var require_io_util = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path11.dirname(filePath); - const upperName = path11.basename(filePath).toUpperCase(); + const directory = path12.dirname(filePath); + const upperName = path12.basename(filePath).toUpperCase(); for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path11.join(directory, actualName); + filePath = path12.join(directory, actualName); break; } } @@ -20319,7 +20319,7 @@ var require_io = __commonJS({ exports2.which = which6; exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path11 = __importStar2(require("path")); + var path12 = __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 = {}) { @@ -20328,7 +20328,7 @@ var require_io = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path11.join(dest, path11.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path12.join(dest, path12.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -20340,7 +20340,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path11.relative(source, newDest) === "") { + if (path12.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile(source, newDest, force); @@ -20352,7 +20352,7 @@ var require_io = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path11.join(dest, path11.basename(source)); + dest = path12.join(dest, path12.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -20363,7 +20363,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path11.dirname(dest)); + yield mkdirP(path12.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -20422,7 +20422,7 @@ var require_io = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path11.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path12.delimiter)) { if (extension) { extensions.push(extension); } @@ -20435,12 +20435,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path11.sep)) { + if (tool.includes(path12.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path11.delimiter)) { + for (const p of process.env.PATH.split(path12.delimiter)) { if (p) { directories.push(p); } @@ -20448,7 +20448,7 @@ var require_io = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path11.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path12.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -20578,7 +20578,7 @@ var require_toolrunner = __commonJS({ var os2 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path11 = __importStar2(require("path")); + var path12 = __importStar2(require("path")); var io6 = __importStar2(require_io()); var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); @@ -20793,7 +20793,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 = path11.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path12.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io6.which(this.toolPath, true); return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { @@ -21346,7 +21346,7 @@ var require_core = __commonJS({ var file_command_1 = require_file_command(); var utils_1 = require_utils(); var os2 = __importStar2(require("os")); - var path11 = __importStar2(require("path")); + var path12 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -21372,7 +21372,7 @@ var require_core = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path11.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path12.delimiter}${process.env["PATH"]}`; } function getInput2(name, options) { const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; @@ -21495,14 +21495,14 @@ var require_helpers = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { "use strict"; var uri = require("url"); - var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path11, name, argument) { - if (Array.isArray(path11)) { - this.path = path11; - this.property = path11.reduce(function(sum, item) { + var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path12, name, argument) { + if (Array.isArray(path12)) { + this.path = path12; + this.property = path12.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path11 !== void 0) { - this.property = path11; + } else if (path12 !== void 0) { + this.property = path12; } if (message) { this.message = message; @@ -21593,16 +21593,16 @@ var require_helpers = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path11, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path12, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path11)) { - this.path = path11; - this.propertyPath = path11.reduce(function(sum, item) { + if (Array.isArray(path12)) { + this.path = path12; + this.propertyPath = path12.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path11; + this.propertyPath = path12; } this.base = base; this.schemas = schemas; @@ -21611,10 +21611,10 @@ var require_helpers = __commonJS({ return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path11 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path12 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); var id = schema2.$id || schema2.id; var base = uri.resolve(this.base, id || ""); - var ctx = new SchemaContext(schema2, this.options, path11, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema2, this.options, path12, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -22806,8 +22806,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 path11 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path11} does not exist${os_1.EOL}`); + const path12 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path12} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -23632,14 +23632,14 @@ var require_util9 = __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 path11 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path12 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path11 && path11[0] !== "/") { - path11 = `/${path11}`; + if (path12 && path12[0] !== "/") { + path12 = `/${path12}`; } - return new URL(`${origin}${path11}`); + return new URL(`${origin}${path12}`); } if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); @@ -24090,39 +24090,39 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path11, origin } + request: { method, path: path12, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path11); + debuglog("sending request to %s %s/%s", method, origin, path12); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path11, origin }, + request: { method, path: path12, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path11, + path12, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path11, origin } + request: { method, path: path12, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path11); + debuglog("trailers received from %s %s/%s", method, origin, path12); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path11, origin }, + request: { method, path: path12, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path11, + path12, error3.message ); }); @@ -24171,9 +24171,9 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path11, origin } + request: { method, path: path12, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path11); + debuglog("sending request to %s %s/%s", method, origin, path12); }); } diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { @@ -24236,7 +24236,7 @@ var require_request3 = __commonJS({ var kHandler = /* @__PURE__ */ Symbol("handler"); var Request = class { constructor(origin, { - path: path11, + path: path12, method, body, headers, @@ -24251,11 +24251,11 @@ var require_request3 = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path11 !== "string") { + if (typeof path12 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path11[0] !== "/" && !(path11.startsWith("http://") || path11.startsWith("https://")) && method !== "CONNECT") { + } else if (path12[0] !== "/" && !(path12.startsWith("http://") || path12.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path11)) { + } else if (invalidPathRegex.test(path12)) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -24318,7 +24318,7 @@ var require_request3 = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? buildURL(path11, query) : path11; + this.path = query ? buildURL(path12, query) : path12; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -28831,7 +28831,7 @@ var require_client_h12 = __commonJS({ return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } function writeH1(client, request2) { - const { method, path: path11, host, upgrade, blocking, reset } = request2; + const { method, path: path12, host, upgrade, blocking, reset } = request2; let { body, headers, contentLength } = request2; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; if (util.isFormDataLike(body)) { @@ -28897,7 +28897,7 @@ var require_client_h12 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path11} HTTP/1.1\r + let header = `${method} ${path12} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -29423,7 +29423,7 @@ var require_client_h22 = __commonJS({ } function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path: path11, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path12, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; let { body } = request2; if (upgrade) { util.errorRequest(client, request2, new Error("Upgrade not supported for H2")); @@ -29490,7 +29490,7 @@ var require_client_h22 = __commonJS({ }); return true; } - headers[HTTP2_HEADER_PATH] = path11; + headers[HTTP2_HEADER_PATH] = path12; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -29843,9 +29843,9 @@ var require_redirect_handler2 = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path11 = search ? `${pathname}${search}` : pathname; + const path12 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path11; + this.opts.path = path12; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -31079,10 +31079,10 @@ var require_proxy_agent2 = __commonJS({ }; const { origin, - path: path11 = "/", + path: path12 = "/", headers = {} } = opts; - opts.path = origin + path11; + opts.path = origin + path12; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -33003,20 +33003,20 @@ var require_mock_utils2 = __commonJS({ } return true; } - function safeUrl(path11) { - if (typeof path11 !== "string") { - return path11; + function safeUrl(path12) { + if (typeof path12 !== "string") { + return path12; } - const pathSegments = path11.split("?"); + const pathSegments = path12.split("?"); if (pathSegments.length !== 2) { - return path11; + return path12; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path11, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path11); + function matchKey(mockDispatch2, { path: path12, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path12); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -33038,7 +33038,7 @@ var require_mock_utils2 = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path11 }) => matchValue(safeUrl(path11), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path12 }) => matchValue(safeUrl(path12), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -33076,9 +33076,9 @@ var require_mock_utils2 = __commonJS({ } } function buildKey(opts) { - const { path: path11, method, body, headers, query } = opts; + const { path: path12, method, body, headers, query } = opts; return { - path: path11, + path: path12, method, body, headers, @@ -33541,10 +33541,10 @@ var require_pending_interceptors_formatter2 = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path11, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path12, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path11, + Path: path12, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -38425,9 +38425,9 @@ var require_util14 = __commonJS({ } } } - function validateCookiePath(path11) { - for (let i = 0; i < path11.length; ++i) { - const code = path11.charCodeAt(i); + function validateCookiePath(path12) { + for (let i = 0; i < path12.length; ++i) { + const code = path12.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -41021,11 +41021,11 @@ var require_undici2 = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path11 = opts.path; + let path12 = opts.path; if (!opts.path.startsWith("/")) { - path11 = `/${path11}`; + path12 = `/${path12}`; } - url2 = new URL(util.parseOrigin(url2).origin + path11); + url2 = new URL(util.parseOrigin(url2).origin + path12); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -48836,7 +48836,7 @@ var require_internal_path_helper = __commonJS({ exports2.hasRoot = hasRoot; exports2.normalizeSeparators = normalizeSeparators; exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - var path11 = __importStar2(require("path")); + var path12 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -48844,7 +48844,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path11.dirname(p); + let result = path12.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -48881,7 +48881,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 += path11.sep; + root += path12.sep; } return root + itemPath; } @@ -48915,10 +48915,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path11.sep)) { + if (!p.endsWith(path12.sep)) { return p; } - if (p === path11.sep) { + if (p === path12.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -49263,7 +49263,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path11 = (function() { + var path12 = (function() { try { return require("path"); } catch (e) { @@ -49271,7 +49271,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path11.sep; + minimatch.sep = path12.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand2 = require_brace_expansion(); var plTypes = { @@ -49360,8 +49360,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path11.sep !== "/") { - pattern = pattern.split(path11.sep).join("/"); + if (!options.allowWindowsEscape && path12.sep !== "/") { + pattern = pattern.split(path12.sep).join("/"); } this.options = options; this.set = []; @@ -49730,8 +49730,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path11.sep !== "/") { - f = f.split(path11.sep).join("/"); + if (path12.sep !== "/") { + f = f.split(path12.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -49877,7 +49877,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path11 = __importStar2(require("path")); + var path12 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -49892,12 +49892,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(path11.sep); + this.segments = itemPath.split(path12.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path11.basename(remaining); + const basename = path12.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -49915,7 +49915,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(path11.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path12.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -49926,12 +49926,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path11.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path12.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path11.sep; + result += path12.sep; } result += this.segments[i]; } @@ -49989,7 +49989,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os2 = __importStar2(require("os")); - var path11 = __importStar2(require("path")); + var path12 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); @@ -50018,7 +50018,7 @@ var require_internal_pattern = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path11.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path12.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -50042,8 +50042,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path11.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path11.sep}`; + if (!itemPath.endsWith(path12.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path12.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -50078,9 +50078,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(`.${path11.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path12.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path11.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path12.sep}`)) { homedir = homedir || os2.homedir(); (0, assert_1.default)(homedir, "Unable to determine HOME directory"); (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); @@ -50164,8 +50164,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path11, level) { - this.path = path11; + constructor(path12, level) { + this.path = path12; this.level = level; } }; @@ -50309,7 +50309,7 @@ var require_internal_globber = __commonJS({ var core12 = __importStar2(require_core()); var fs12 = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); - var path11 = __importStar2(require("path")); + var path12 = __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(); @@ -50385,7 +50385,7 @@ var require_internal_globber = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path11.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path12.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -50395,7 +50395,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await2(fs12.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path11.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs12.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path12.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); @@ -50557,7 +50557,7 @@ var require_internal_hash_files = __commonJS({ var fs12 = __importStar2(require("fs")); var stream2 = __importStar2(require("stream")); var util = __importStar2(require("util")); - var path11 = __importStar2(require("path")); + var path12 = __importStar2(require("path")); function hashFiles(globber_1, currentWorkspace_1) { return __awaiter2(this, arguments, void 0, function* (globber, currentWorkspace, verbose = false) { var _a, e_1, _b, _c; @@ -50573,7 +50573,7 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path11.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path12.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } @@ -51959,7 +51959,7 @@ var require_cacheUtils = __commonJS({ var io6 = __importStar2(require_io()); var crypto2 = __importStar2(require("crypto")); var fs12 = __importStar2(require("fs")); - var path11 = __importStar2(require("path")); + var path12 = __importStar2(require("path")); var semver9 = __importStar2(require_semver3()); var util = __importStar2(require("util")); var constants_1 = require_constants12(); @@ -51979,9 +51979,9 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path11.join(baseLocation, "actions", "temp"); + tempDirectory = path12.join(baseLocation, "actions", "temp"); } - const dest = path11.join(tempDirectory, crypto2.randomUUID()); + const dest = path12.join(tempDirectory, crypto2.randomUUID()); yield io6.mkdirP(dest); return dest; }); @@ -52003,7 +52003,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path11.relative(workspace, file).replace(new RegExp(`\\${path11.sep}`, "g"), "/"); + const relativeFile = path12.relative(workspace, file).replace(new RegExp(`\\${path12.sep}`, "g"), "/"); core12.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -52530,13 +52530,13 @@ function __disposeResources(env) { } return next(); } -function __rewriteRelativeImportExtension(path11, preserveJsx) { - if (typeof path11 === "string" && /^\.\.?\//.test(path11)) { - return path11.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { +function __rewriteRelativeImportExtension(path12, preserveJsx) { + if (typeof path12 === "string" && /^\.\.?\//.test(path12)) { + return path12.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; }); } - return path11; + return path12; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -56950,8 +56950,8 @@ var require_getClient = __commonJS({ } const { allowInsecureConnection, httpClient } = clientOptions; const endpointUrl = clientOptions.endpoint ?? endpoint2; - const client = (path11, ...args) => { - const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path11, args, { allowInsecureConnection, ...requestOptions }); + const client = (path12, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path12, args, { allowInsecureConnection, ...requestOptions }); return { get: (requestOptions = {}) => { return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); @@ -60822,15 +60822,15 @@ var require_urlHelpers2 = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path11 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path11.startsWith("/")) { - path11 = path11.substring(1); + let path12 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path12.startsWith("/")) { + path12 = path12.substring(1); } - if (isAbsoluteUrl(path11)) { - requestUrl = path11; + if (isAbsoluteUrl(path12)) { + requestUrl = path12; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path11); + requestUrl = appendPath(requestUrl, path12); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -60876,9 +60876,9 @@ var require_urlHelpers2 = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path11 = pathToAppend.substring(0, searchStart); + const path12 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path11; + newPath = newPath + path12; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -63111,10 +63111,10 @@ var require_utils_common = __commonJS({ var constants_js_1 = require_constants15(); function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path11 = urlParsed.pathname; - path11 = path11 || "/"; - path11 = escape(path11); - urlParsed.pathname = path11; + let path12 = urlParsed.pathname; + path12 = path12 || "/"; + path12 = escape(path12); + urlParsed.pathname = path12; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -63199,9 +63199,9 @@ var require_utils_common = __commonJS({ } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path11 = urlParsed.pathname; - path11 = path11 ? path11.endsWith("/") ? `${path11}${name}` : `${path11}/${name}` : name; - urlParsed.pathname = path11; + let path12 = urlParsed.pathname; + path12 = path12 ? path12.endsWith("/") ? `${path12}${name}` : `${path12}/${name}` : name; + urlParsed.pathname = path12; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -64428,9 +64428,9 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path11 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path12 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path11}`; + canonicalizedResourceString += `/${this.factory.accountName}${path12}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -65169,10 +65169,10 @@ var require_utils_common2 = __commonJS({ var constants_js_1 = require_constants16(); function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path11 = urlParsed.pathname; - path11 = path11 || "/"; - path11 = escape(path11); - urlParsed.pathname = path11; + let path12 = urlParsed.pathname; + path12 = path12 || "/"; + path12 = escape(path12); + urlParsed.pathname = path12; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -65257,9 +65257,9 @@ var require_utils_common2 = __commonJS({ } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path11 = urlParsed.pathname; - path11 = path11 ? path11.endsWith("/") ? `${path11}${name}` : `${path11}/${name}` : name; - urlParsed.pathname = path11; + let path12 = urlParsed.pathname; + path12 = path12 ? path12.endsWith("/") ? `${path12}${name}` : `${path12}/${name}` : name; + urlParsed.pathname = path12; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -66180,9 +66180,9 @@ var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path11 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path12 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path11}`; + canonicalizedResourceString += `/${this.factory.accountName}${path12}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -66812,9 +66812,9 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path11 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path12 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path11}`; + canonicalizedResourceString += `/${options.accountName}${path12}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67159,9 +67159,9 @@ var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path11 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path12 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path11}`; + canonicalizedResourceString += `/${options.accountName}${path12}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -88816,8 +88816,8 @@ var require_BlobBatch = __commonJS({ if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path11 = (0, utils_common_js_1.getURLPath)(subRequest.url); - if (!path11 || path11 === "") { + const path12 = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path12 || path12 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -88895,8 +88895,8 @@ var require_BlobBatchClient = __commonJS({ pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url2, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); - const path11 = (0, utils_common_js_1.getURLPath)(url2); - if (path11 && path11 !== "/") { + const path12 = (0, utils_common_js_1.getURLPath)(url2); + if (path12 && path12 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -98205,7 +98205,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io6 = __importStar2(require_io()); var fs_1 = require("fs"); - var path11 = __importStar2(require("path")); + var path12 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants12(); var IS_WINDOWS = process.platform === "win32"; @@ -98251,13 +98251,13 @@ var require_tar = __commonJS({ const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (type2) { case "create": - args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path11.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path11.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path11.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path11.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path11.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path12.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path11.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -98303,7 +98303,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path11.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path12.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -98312,7 +98312,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path11.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path12.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -98327,7 +98327,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path11.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -98336,7 +98336,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path11.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -98374,7 +98374,7 @@ var require_tar = __commonJS({ } function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path11.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path12.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -98456,7 +98456,7 @@ var require_cache5 = __commonJS({ exports2.restoreCache = restoreCache3; exports2.saveCache = saveCache3; var core12 = __importStar2(require_core()); - var path11 = __importStar2(require("path")); + var path12 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); @@ -98551,7 +98551,7 @@ var require_cache5 = __commonJS({ core12.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path11.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path12.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core12.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core12.isDebug()) { @@ -98620,7 +98620,7 @@ var require_cache5 = __commonJS({ core12.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path11.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path12.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core12.debug(`Archive path: ${archivePath}`); core12.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -98682,7 +98682,7 @@ var require_cache5 = __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 = path11.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path12.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core12.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -98746,7 +98746,7 @@ var require_cache5 = __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 = path11.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path12.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core12.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99173,7 +99173,7 @@ var require_tool_cache = __commonJS({ var fs12 = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os2 = __importStar2(require("os")); - var path11 = __importStar2(require("path")); + var path12 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver9 = __importStar2(require_semver2()); var stream2 = __importStar2(require("stream")); @@ -99194,8 +99194,8 @@ var require_tool_cache = __commonJS({ var userAgent2 = "actions/tool-cache"; function downloadTool2(url2, dest, auth2, headers) { return __awaiter2(this, void 0, void 0, function* () { - dest = dest || path11.join(_getTempDirectory(), crypto2.randomUUID()); - yield io6.mkdirP(path11.dirname(dest)); + dest = dest || path12.join(_getTempDirectory(), crypto2.randomUUID()); + yield io6.mkdirP(path12.dirname(dest)); core12.debug(`Downloading ${url2}`); core12.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -99285,7 +99285,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path11.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path12.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}'`; @@ -99457,7 +99457,7 @@ var require_tool_cache = __commonJS({ } const destPath = yield _createToolPath(tool, version, arch2); for (const itemName of fs12.readdirSync(sourceDir)) { - const s = path11.join(sourceDir, itemName); + const s = path12.join(sourceDir, itemName); yield io6.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -99474,7 +99474,7 @@ var require_tool_cache = __commonJS({ throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path11.join(destFolder, targetFile); + const destPath = path12.join(destFolder, targetFile); core12.debug(`destination file ${destPath}`); yield io6.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -99497,7 +99497,7 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver9.clean(versionSpec) || ""; - const cachePath = path11.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path12.join(_getCacheDirectory(), toolName, versionSpec, arch2); core12.debug(`checking cache: ${cachePath}`); if (fs12.existsSync(cachePath) && fs12.existsSync(`${cachePath}.complete`)) { core12.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); @@ -99511,12 +99511,12 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os2.arch(); - const toolPath = path11.join(_getCacheDirectory(), toolName); + const toolPath = path12.join(_getCacheDirectory(), toolName); if (fs12.existsSync(toolPath)) { const children = fs12.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path11.join(toolPath, child, arch2 || ""); + const fullPath = path12.join(toolPath, child, arch2 || ""); if (fs12.existsSync(fullPath) && fs12.existsSync(`${fullPath}.complete`)) { versions.push(child); } @@ -99568,7 +99568,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path11.join(_getTempDirectory(), crypto2.randomUUID()); + dest = path12.join(_getTempDirectory(), crypto2.randomUUID()); } yield io6.mkdirP(dest); return dest; @@ -99576,7 +99576,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter2(this, void 0, void 0, function* () { - const folderPath = path11.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path12.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); core12.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io6.rmRF(folderPath); @@ -99586,7 +99586,7 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path11.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path12.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; fs12.writeFileSync(markerPath, ""); core12.debug("finished caching tool"); @@ -103113,7 +103113,7 @@ __export(upload_lib_exports, { }); module.exports = __toCommonJS(upload_lib_exports); var fs11 = __toESM(require("fs")); -var path10 = __toESM(require("path")); +var path11 = __toESM(require("path")); var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core11 = __toESM(require_core()); @@ -106414,7 +106414,7 @@ function wrapApiConfigurationError(e) { // src/codeql.ts var fs9 = __toESM(require("fs")); -var path8 = __toESM(require("path")); +var path9 = __toESM(require("path")); var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -106662,7 +106662,7 @@ function wrapCliConfigurationError(cliError) { // src/config-utils.ts var fs5 = __toESM(require("fs")); -var path5 = __toESM(require("path")); +var path6 = __toESM(require("path")); // src/caching-utils.ts var core6 = __toESM(require_core()); @@ -106677,8 +106677,23 @@ var PACK_IDENTIFIER_PATTERN = (function() { return new RegExp(`^${component}/${component}$`); })(); +// src/diagnostics.ts +var import_fs = require("fs"); +var import_path = __toESM(require("path")); + // src/logging.ts var core7 = __toESM(require_core()); +function getActionsLogger() { + return { + debug: core7.debug, + info: core7.info, + warning: core7.warning, + error: core7.error, + isDebug: core7.isDebug, + startGroup: core7.startGroup, + endGroup: core7.endGroup + }; +} function formatDuration(durationMs) { if (durationMs < 1e3) { return `${durationMs}ms`; @@ -106691,9 +106706,66 @@ function formatDuration(durationMs) { return `${minutes}m${seconds}s`; } +// src/diagnostics.ts +var unwrittenDiagnostics = []; +var unwrittenDefaultLanguageDiagnostics = []; +function makeDiagnostic(id, name, data = void 0) { + return { + ...data, + timestamp: data?.timestamp ?? (/* @__PURE__ */ new Date()).toISOString(), + source: { ...data?.source, id, name } + }; +} +function addDiagnostic(config, language, diagnostic) { + const logger = getActionsLogger(); + const databasePath = language ? getCodeQLDatabasePath(config, language) : config.dbLocation; + if ((0, import_fs.existsSync)(databasePath)) { + writeDiagnostic(config, language, diagnostic); + } else { + logger.debug( + `Writing a diagnostic for ${language}, but the database at ${databasePath} does not exist yet.` + ); + unwrittenDiagnostics.push({ diagnostic, language }); + } +} +function addNoLanguageDiagnostic(config, diagnostic) { + if (config !== void 0) { + addDiagnostic( + config, + // Arbitrarily choose the first language. We could also choose all languages, but that + // increases the risk of misinterpreting the data. + config.languages[0], + diagnostic + ); + } else { + unwrittenDefaultLanguageDiagnostics.push(diagnostic); + } +} +function writeDiagnostic(config, language, diagnostic) { + const logger = getActionsLogger(); + const databasePath = language ? getCodeQLDatabasePath(config, language) : config.dbLocation; + const diagnosticsPath = import_path.default.resolve( + databasePath, + "diagnostic", + "codeql-action" + ); + try { + (0, import_fs.mkdirSync)(diagnosticsPath, { recursive: true }); + const jsonPath = import_path.default.resolve( + diagnosticsPath, + // Remove colons from the timestamp as these are not allowed in Windows filenames. + `codeql-action-${diagnostic.timestamp.replaceAll(":", "")}.json` + ); + (0, import_fs.writeFileSync)(jsonPath, JSON.stringify(diagnostic)); + } catch (err) { + logger.warning(`Unable to write diagnostic message to database: ${err}`); + logger.debug(JSON.stringify(diagnostic)); + } +} + // src/diff-informed-analysis-utils.ts var fs4 = __toESM(require("fs")); -var path4 = __toESM(require("path")); +var path5 = __toESM(require("path")); // src/feature-flags.ts var semver5 = __toESM(require_semver2()); @@ -106704,7 +106776,7 @@ var cliVersion = "2.24.1"; // src/overlay-database-utils.ts var fs3 = __toESM(require("fs")); -var path3 = __toESM(require("path")); +var path4 = __toESM(require("path")); var actionsCache = __toESM(require_cache5()); // src/git-utils.ts @@ -106832,8 +106904,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path11 = decodeGitFilePath(match[2]); - fileOidMap[path11] = oid; + const path12 = decodeGitFilePath(match[2]); + fileOidMap[path12] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -106939,7 +107011,7 @@ async function writeOverlayChangesFile(config, sourceRoot, logger) { `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` ); const changedFilesJson = JSON.stringify({ changes: changedFiles }); - const overlayChangesFile = path3.join( + const overlayChangesFile = path4.join( getTemporaryDirectory(), "overlay-changes.json" ); @@ -107027,6 +107099,11 @@ var featureConfig = { legacyApi: true, minimumVersion: void 0 }, + ["force_nightly" /* ForceNightly */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_FORCE_NIGHTLY", + minimumVersion: void 0 + }, ["ignore_generated_files" /* IgnoreGeneratedFiles */]: { defaultValue: false, envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES", @@ -107188,7 +107265,7 @@ var featureConfig = { // src/diff-informed-analysis-utils.ts function getDiffRangesJsonFilePath() { - return path4.join(getTemporaryDirectory(), "pr-diff-range.json"); + return path5.join(getTemporaryDirectory(), "pr-diff-range.json"); } function readDiffRangesJsonFile(logger) { const jsonFilePath = getDiffRangesJsonFilePath(); @@ -107236,7 +107313,7 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = { swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */ }; function getPathToParsedConfigFile(tempDir) { - return path5.join(tempDir, "config"); + return path6.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); @@ -107280,7 +107357,7 @@ function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) { // src/setup-codeql.ts var fs8 = __toESM(require("fs")); -var path7 = __toESM(require("path")); +var path8 = __toESM(require("path")); var toolcache3 = __toESM(require_tool_cache()); var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var semver8 = __toESM(require_semver2()); @@ -107500,7 +107577,7 @@ function inferCompressionMethod(tarPath) { // src/tools-download.ts var fs7 = __toESM(require("fs")); var os = __toESM(require("os")); -var path6 = __toESM(require("path")); +var path7 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -107633,7 +107710,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path6.join( + return path7.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver7.clean(version) || version, @@ -107777,7 +107854,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs8.existsSync(path7.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs8.existsSync(path8.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -107818,10 +107895,36 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian let cliVersion2; let tagName; let url2; - if (toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput)) { - logger.info( - `Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.` - ); + const canForceNightlyWithFF = isDynamicWorkflow() || isInTestMode(); + const forceNightlyValueFF = await features.getValue("force_nightly" /* ForceNightly */); + const forceNightly = forceNightlyValueFF && canForceNightlyWithFF; + const nightlyRequestedByToolsInput = toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput); + if (forceNightly || nightlyRequestedByToolsInput) { + if (forceNightly) { + logger.info( + `Using the latest CodeQL CLI nightly, as forced by the ${"force_nightly" /* ForceNightly */} feature flag.` + ); + addNoLanguageDiagnostic( + void 0, + makeDiagnostic( + "codeql-action/forced-nightly-cli", + "A nightly release of CodeQL was used", + { + markdownMessage: "GitHub configured this analysis to use a nightly release of CodeQL to allow you to preview changes from an upcoming release.\n\nNightly releases do not undergo the same validation as regular releases and may lead to analysis instability.\n\nIf use of a nightly CodeQL release for this analysis is unexpected, please contact GitHub support.", + visibility: { + cliSummaryTable: true, + statusPage: true, + telemetry: true + }, + severity: "note" + } + ) + ); + } else { + logger.info( + `Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.` + ); + } toolsInput = await getNightlyToolsUrl(logger); } const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput); @@ -108150,7 +108253,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path7.join(tempDir, v4_default()); + return path8.join(tempDir, v4_default()); } async function getNightlyToolsUrl(logger) { const zstdAvailability = await isZstdAvailable(logger); @@ -108238,7 +108341,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path8.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path9.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -108300,7 +108403,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path8.join( + const tracingConfigPath = path9.join( extractorPath, "tools", "tracing-config.lua" @@ -108382,7 +108485,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path8.join( + const autobuildCmd = path9.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -108804,7 +108907,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path8.resolve(config.tempDir, "user-config.yaml"); + return path9.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -108826,7 +108929,7 @@ async function getJobRunUuidSarifOptions(codeql) { // src/fingerprints.ts var fs10 = __toESM(require("fs")); -var import_path = __toESM(require("path")); +var import_path2 = __toESM(require("path")); // node_modules/long/index.js var wasm = null; @@ -109885,7 +109988,7 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) { ); return void 0; } - if (!import_path.default.isAbsolute(uri)) { + if (!import_path2.default.isAbsolute(uri)) { uri = srcRootPrefix + uri; } if (!fs10.existsSync(uri)) { @@ -110115,10 +110218,10 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo ); codeQL = initCodeQLResult.codeql; } - const baseTempDir = path10.resolve(tempDir, "combined-sarif"); + const baseTempDir = path11.resolve(tempDir, "combined-sarif"); fs11.mkdirSync(baseTempDir, { recursive: true }); - const outputDirectory = fs11.mkdtempSync(path10.resolve(baseTempDir, "output-")); - const outputFile = path10.resolve(outputDirectory, "combined-sarif.sarif"); + const outputDirectory = fs11.mkdtempSync(path11.resolve(baseTempDir, "output-")); + const outputFile = path11.resolve(outputDirectory, "combined-sarif.sarif"); await codeQL.mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory: true }); @@ -110151,7 +110254,7 @@ function getAutomationID2(category, analysis_key, environment) { async function uploadPayload(payload, repositoryNwo, logger, analysis) { logger.info("Uploading results"); if (shouldSkipSarifUpload()) { - const payloadSaveFile = path10.join( + const payloadSaveFile = path11.join( getTemporaryDirectory(), `payload-${analysis.kind}.json` ); @@ -110196,9 +110299,9 @@ function findSarifFilesInDir(sarifPath, isSarif) { const entries = fs11.readdirSync(dir, { withFileTypes: true }); for (const entry of entries) { if (entry.isFile() && isSarif(entry.name)) { - sarifFiles.push(path10.resolve(dir, entry.name)); + sarifFiles.push(path11.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - walkSarifFiles(path10.resolve(dir, entry.name)); + walkSarifFiles(path11.resolve(dir, entry.name)); } } }; @@ -110231,7 +110334,7 @@ async function getGroupedSarifFilePaths(logger, sarifPath) { if (stats.isDirectory()) { let unassignedSarifFiles = findSarifFilesInDir( sarifPath, - (name) => path10.extname(name) === ".sarif" + (name) => path11.extname(name) === ".sarif" ); logger.debug( `Found the following .sarif files in ${sarifPath}: ${unassignedSarifFiles.join(", ")}` @@ -110496,7 +110599,7 @@ function dumpSarifFile(sarifPayload, outputDir, logger, uploadTarget) { `The path that processed SARIF files should be written to exists, but is not a directory: ${outputDir}` ); } - const outputFile = path10.resolve( + const outputFile = path11.resolve( outputDir, `upload${uploadTarget.sarifExtension}` ); @@ -110644,7 +110747,7 @@ function filterAlertsByDiffRange(logger, sarif) { if (!locationUri || locationStartLine === void 0) { return false; } - const locationPath = path10.join(checkoutPath, locationUri).replaceAll(path10.sep, "/"); + const locationPath = path11.join(checkoutPath, locationUri).replaceAll(path11.sep, "/"); return diffRanges.some( (range) => range.path === locationPath && (range.startLine <= locationStartLine && range.endLine >= locationStartLine || range.startLine === 0 && range.endLine === 0) ); diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index 00f580c815..5bd76e9ed9 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -161134,6 +161134,11 @@ var featureConfig = { legacyApi: true, minimumVersion: void 0 }, + ["force_nightly" /* ForceNightly */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_FORCE_NIGHTLY", + minimumVersion: void 0 + }, ["ignore_generated_files" /* IgnoreGeneratedFiles */]: { defaultValue: false, envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES", diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index 15e29edd58..12dfb750fd 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -1337,14 +1337,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 path12 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path13 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path12 && path12[0] !== "/") { - path12 = `/${path12}`; + if (path13 && path13[0] !== "/") { + path13 = `/${path13}`; } - return new URL(`${origin}${path12}`); + return new URL(`${origin}${path13}`); } if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); @@ -1795,39 +1795,39 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path12, origin } + request: { method, path: path13, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path12); + debuglog("sending request to %s %s/%s", method, origin, path13); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path12, origin }, + request: { method, path: path13, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path12, + path13, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path12, origin } + request: { method, path: path13, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path12); + debuglog("trailers received from %s %s/%s", method, origin, path13); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path12, origin }, + request: { method, path: path13, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path12, + path13, error3.message ); }); @@ -1876,9 +1876,9 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path12, origin } + request: { method, path: path13, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path12); + debuglog("sending request to %s %s/%s", method, origin, path13); }); } diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { @@ -1941,7 +1941,7 @@ var require_request = __commonJS({ var kHandler = /* @__PURE__ */ Symbol("handler"); var Request = class { constructor(origin, { - path: path12, + path: path13, method, body, headers, @@ -1956,11 +1956,11 @@ var require_request = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path12 !== "string") { + if (typeof path13 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path12[0] !== "/" && !(path12.startsWith("http://") || path12.startsWith("https://")) && method !== "CONNECT") { + } else if (path13[0] !== "/" && !(path13.startsWith("http://") || path13.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path12)) { + } else if (invalidPathRegex.test(path13)) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -2023,7 +2023,7 @@ var require_request = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? buildURL(path12, query) : path12; + this.path = query ? buildURL(path13, query) : path13; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -6536,7 +6536,7 @@ var require_client_h1 = __commonJS({ return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } function writeH1(client, request2) { - const { method, path: path12, host, upgrade, blocking, reset } = request2; + const { method, path: path13, host, upgrade, blocking, reset } = request2; let { body, headers, contentLength } = request2; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; if (util.isFormDataLike(body)) { @@ -6602,7 +6602,7 @@ var require_client_h1 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path12} HTTP/1.1\r + let header = `${method} ${path13} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -7128,7 +7128,7 @@ var require_client_h2 = __commonJS({ } function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path: path12, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path13, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; let { body } = request2; if (upgrade) { util.errorRequest(client, request2, new Error("Upgrade not supported for H2")); @@ -7195,7 +7195,7 @@ var require_client_h2 = __commonJS({ }); return true; } - headers[HTTP2_HEADER_PATH] = path12; + headers[HTTP2_HEADER_PATH] = path13; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -7548,9 +7548,9 @@ var require_redirect_handler = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path12 = search ? `${pathname}${search}` : pathname; + const path13 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path12; + this.opts.path = path13; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -8784,10 +8784,10 @@ var require_proxy_agent = __commonJS({ }; const { origin, - path: path12 = "/", + path: path13 = "/", headers = {} } = opts; - opts.path = origin + path12; + opts.path = origin + path13; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -10708,20 +10708,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path12) { - if (typeof path12 !== "string") { - return path12; + function safeUrl(path13) { + if (typeof path13 !== "string") { + return path13; } - const pathSegments = path12.split("?"); + const pathSegments = path13.split("?"); if (pathSegments.length !== 2) { - return path12; + return path13; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path12, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path12); + function matchKey(mockDispatch2, { path: path13, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path13); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -10743,7 +10743,7 @@ var require_mock_utils = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path12 }) => matchValue(safeUrl(path12), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path13 }) => matchValue(safeUrl(path13), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -10781,9 +10781,9 @@ var require_mock_utils = __commonJS({ } } function buildKey(opts) { - const { path: path12, method, body, headers, query } = opts; + const { path: path13, method, body, headers, query } = opts; return { - path: path12, + path: path13, method, body, headers, @@ -11246,10 +11246,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path12, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path13, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path12, + Path: path13, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -16130,9 +16130,9 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path12) { - for (let i = 0; i < path12.length; ++i) { - const code = path12.charCodeAt(i); + function validateCookiePath(path13) { + for (let i = 0; i < path13.length; ++i) { + const code = path13.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -18726,11 +18726,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path12 = opts.path; + let path13 = opts.path; if (!opts.path.startsWith("/")) { - path12 = `/${path12}`; + path13 = `/${path13}`; } - url2 = new URL(util.parseOrigin(url2).origin + path12); + url2 = new URL(util.parseOrigin(url2).origin + path13); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -20033,7 +20033,7 @@ var require_path_utils = __commonJS({ exports2.toPosixPath = toPosixPath; exports2.toWin32Path = toWin32Path; exports2.toPlatformPath = toPlatformPath; - var path12 = __importStar2(require("path")); + var path13 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -20041,7 +20041,7 @@ var require_path_utils = __commonJS({ return pth.replace(/[/]/g, "\\"); } function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path12.sep); + return pth.replace(/[/\\]/g, path13.sep); } } }); @@ -20124,7 +20124,7 @@ var require_io_util = __commonJS({ exports2.tryGetExecutablePath = tryGetExecutablePath; exports2.getCmdPath = getCmdPath; var fs13 = __importStar2(require("fs")); - var path12 = __importStar2(require("path")); + var path13 = __importStar2(require("path")); _a = fs13.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; function readlink(fsPath) { @@ -20179,7 +20179,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path12.extname(filePath).toUpperCase(); + const upperExt = path13.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -20203,11 +20203,11 @@ var require_io_util = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path12.dirname(filePath); - const upperName = path12.basename(filePath).toUpperCase(); + const directory = path13.dirname(filePath); + const upperName = path13.basename(filePath).toUpperCase(); for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path12.join(directory, actualName); + filePath = path13.join(directory, actualName); break; } } @@ -20319,7 +20319,7 @@ var require_io = __commonJS({ exports2.which = which6; exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path12 = __importStar2(require("path")); + var path13 = __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 = {}) { @@ -20328,7 +20328,7 @@ var require_io = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path12.join(dest, path12.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path13.join(dest, path13.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -20340,7 +20340,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path12.relative(source, newDest) === "") { + if (path13.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile2(source, newDest, force); @@ -20352,7 +20352,7 @@ var require_io = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path12.join(dest, path12.basename(source)); + dest = path13.join(dest, path13.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -20363,7 +20363,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path12.dirname(dest)); + yield mkdirP(path13.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -20422,7 +20422,7 @@ var require_io = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path12.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path13.delimiter)) { if (extension) { extensions.push(extension); } @@ -20435,12 +20435,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path12.sep)) { + if (tool.includes(path13.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path12.delimiter)) { + for (const p of process.env.PATH.split(path13.delimiter)) { if (p) { directories.push(p); } @@ -20448,7 +20448,7 @@ var require_io = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path12.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path13.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -20578,7 +20578,7 @@ var require_toolrunner = __commonJS({ var os3 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path12 = __importStar2(require("path")); + var path13 = __importStar2(require("path")); var io6 = __importStar2(require_io()); var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); @@ -20793,7 +20793,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 = path12.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path13.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io6.which(this.toolPath, true); return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { @@ -21346,7 +21346,7 @@ var require_core = __commonJS({ var file_command_1 = require_file_command(); var utils_1 = require_utils(); var os3 = __importStar2(require("os")); - var path12 = __importStar2(require("path")); + var path13 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -21372,7 +21372,7 @@ var require_core = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path12.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path13.delimiter}${process.env["PATH"]}`; } function getInput2(name, options) { const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; @@ -21509,8 +21509,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 path12 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path12} does not exist${os_1.EOL}`); + const path13 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path13} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -22335,14 +22335,14 @@ var require_util9 = __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 path12 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path13 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path12 && path12[0] !== "/") { - path12 = `/${path12}`; + if (path13 && path13[0] !== "/") { + path13 = `/${path13}`; } - return new URL(`${origin}${path12}`); + return new URL(`${origin}${path13}`); } if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); @@ -22793,39 +22793,39 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path12, origin } + request: { method, path: path13, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path12); + debuglog("sending request to %s %s/%s", method, origin, path13); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path12, origin }, + request: { method, path: path13, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path12, + path13, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path12, origin } + request: { method, path: path13, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path12); + debuglog("trailers received from %s %s/%s", method, origin, path13); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path12, origin }, + request: { method, path: path13, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path12, + path13, error3.message ); }); @@ -22874,9 +22874,9 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path12, origin } + request: { method, path: path13, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path12); + debuglog("sending request to %s %s/%s", method, origin, path13); }); } diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { @@ -22939,7 +22939,7 @@ var require_request3 = __commonJS({ var kHandler = /* @__PURE__ */ Symbol("handler"); var Request = class { constructor(origin, { - path: path12, + path: path13, method, body, headers, @@ -22954,11 +22954,11 @@ var require_request3 = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path12 !== "string") { + if (typeof path13 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path12[0] !== "/" && !(path12.startsWith("http://") || path12.startsWith("https://")) && method !== "CONNECT") { + } else if (path13[0] !== "/" && !(path13.startsWith("http://") || path13.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path12)) { + } else if (invalidPathRegex.test(path13)) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -23021,7 +23021,7 @@ var require_request3 = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? buildURL(path12, query) : path12; + this.path = query ? buildURL(path13, query) : path13; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -27534,7 +27534,7 @@ var require_client_h12 = __commonJS({ return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } function writeH1(client, request2) { - const { method, path: path12, host, upgrade, blocking, reset } = request2; + const { method, path: path13, host, upgrade, blocking, reset } = request2; let { body, headers, contentLength } = request2; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; if (util.isFormDataLike(body)) { @@ -27600,7 +27600,7 @@ var require_client_h12 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path12} HTTP/1.1\r + let header = `${method} ${path13} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -28126,7 +28126,7 @@ var require_client_h22 = __commonJS({ } function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path: path12, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path13, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; let { body } = request2; if (upgrade) { util.errorRequest(client, request2, new Error("Upgrade not supported for H2")); @@ -28193,7 +28193,7 @@ var require_client_h22 = __commonJS({ }); return true; } - headers[HTTP2_HEADER_PATH] = path12; + headers[HTTP2_HEADER_PATH] = path13; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -28546,9 +28546,9 @@ var require_redirect_handler2 = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path12 = search ? `${pathname}${search}` : pathname; + const path13 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path12; + this.opts.path = path13; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -29782,10 +29782,10 @@ var require_proxy_agent2 = __commonJS({ }; const { origin, - path: path12 = "/", + path: path13 = "/", headers = {} } = opts; - opts.path = origin + path12; + opts.path = origin + path13; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -31706,20 +31706,20 @@ var require_mock_utils2 = __commonJS({ } return true; } - function safeUrl(path12) { - if (typeof path12 !== "string") { - return path12; + function safeUrl(path13) { + if (typeof path13 !== "string") { + return path13; } - const pathSegments = path12.split("?"); + const pathSegments = path13.split("?"); if (pathSegments.length !== 2) { - return path12; + return path13; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path12, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path12); + function matchKey(mockDispatch2, { path: path13, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path13); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -31741,7 +31741,7 @@ var require_mock_utils2 = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path12 }) => matchValue(safeUrl(path12), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path13 }) => matchValue(safeUrl(path13), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -31779,9 +31779,9 @@ var require_mock_utils2 = __commonJS({ } } function buildKey(opts) { - const { path: path12, method, body, headers, query } = opts; + const { path: path13, method, body, headers, query } = opts; return { - path: path12, + path: path13, method, body, headers, @@ -32244,10 +32244,10 @@ var require_pending_interceptors_formatter2 = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path12, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path13, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path12, + Path: path13, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -37128,9 +37128,9 @@ var require_util14 = __commonJS({ } } } - function validateCookiePath(path12) { - for (let i = 0; i < path12.length; ++i) { - const code = path12.charCodeAt(i); + function validateCookiePath(path13) { + for (let i = 0; i < path13.length; ++i) { + const code = path13.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -39724,11 +39724,11 @@ var require_undici2 = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path12 = opts.path; + let path13 = opts.path; if (!opts.path.startsWith("/")) { - path12 = `/${path12}`; + path13 = `/${path13}`; } - url2 = new URL(util.parseOrigin(url2).origin + path12); + url2 = new URL(util.parseOrigin(url2).origin + path13); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -47539,7 +47539,7 @@ var require_internal_path_helper = __commonJS({ exports2.hasRoot = hasRoot; exports2.normalizeSeparators = normalizeSeparators; exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - var path12 = __importStar2(require("path")); + var path13 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -47547,7 +47547,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path12.dirname(p); + let result = path13.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -47584,7 +47584,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 += path12.sep; + root += path13.sep; } return root + itemPath; } @@ -47618,10 +47618,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path12.sep)) { + if (!p.endsWith(path13.sep)) { return p; } - if (p === path12.sep) { + if (p === path13.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -47966,7 +47966,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path12 = (function() { + var path13 = (function() { try { return require("path"); } catch (e) { @@ -47974,7 +47974,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path12.sep; + minimatch.sep = path13.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand2 = require_brace_expansion(); var plTypes = { @@ -48063,8 +48063,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path12.sep !== "/") { - pattern = pattern.split(path12.sep).join("/"); + if (!options.allowWindowsEscape && path13.sep !== "/") { + pattern = pattern.split(path13.sep).join("/"); } this.options = options; this.set = []; @@ -48433,8 +48433,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path12.sep !== "/") { - f = f.split(path12.sep).join("/"); + if (path13.sep !== "/") { + f = f.split(path13.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -48580,7 +48580,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path12 = __importStar2(require("path")); + var path13 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -48595,12 +48595,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(path12.sep); + this.segments = itemPath.split(path13.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path12.basename(remaining); + const basename = path13.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -48618,7 +48618,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(path12.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path13.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -48629,12 +48629,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path12.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path13.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path12.sep; + result += path13.sep; } result += this.segments[i]; } @@ -48692,7 +48692,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os3 = __importStar2(require("os")); - var path12 = __importStar2(require("path")); + var path13 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); @@ -48721,7 +48721,7 @@ var require_internal_pattern = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path12.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path13.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -48745,8 +48745,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path12.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path12.sep}`; + if (!itemPath.endsWith(path13.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path13.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -48781,9 +48781,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(`.${path12.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path13.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path12.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path13.sep}`)) { homedir = homedir || os3.homedir(); (0, assert_1.default)(homedir, "Unable to determine HOME directory"); (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); @@ -48867,8 +48867,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path12, level) { - this.path = path12; + constructor(path13, level) { + this.path = path13; this.level = level; } }; @@ -49012,7 +49012,7 @@ var require_internal_globber = __commonJS({ var core14 = __importStar2(require_core()); var fs13 = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); - var path12 = __importStar2(require("path")); + var path13 = __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(); @@ -49088,7 +49088,7 @@ var require_internal_globber = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path12.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path13.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -49098,7 +49098,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await2(fs13.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path12.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs13.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path13.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); @@ -49260,7 +49260,7 @@ var require_internal_hash_files = __commonJS({ var fs13 = __importStar2(require("fs")); var stream2 = __importStar2(require("stream")); var util = __importStar2(require("util")); - var path12 = __importStar2(require("path")); + var path13 = __importStar2(require("path")); function hashFiles(globber_1, currentWorkspace_1) { return __awaiter2(this, arguments, void 0, function* (globber, currentWorkspace, verbose = false) { var _a, e_1, _b, _c; @@ -49276,7 +49276,7 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path12.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path13.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } @@ -50662,7 +50662,7 @@ var require_cacheUtils = __commonJS({ var io6 = __importStar2(require_io()); var crypto2 = __importStar2(require("crypto")); var fs13 = __importStar2(require("fs")); - var path12 = __importStar2(require("path")); + var path13 = __importStar2(require("path")); var semver9 = __importStar2(require_semver3()); var util = __importStar2(require("util")); var constants_1 = require_constants12(); @@ -50682,9 +50682,9 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path12.join(baseLocation, "actions", "temp"); + tempDirectory = path13.join(baseLocation, "actions", "temp"); } - const dest = path12.join(tempDirectory, crypto2.randomUUID()); + const dest = path13.join(tempDirectory, crypto2.randomUUID()); yield io6.mkdirP(dest); return dest; }); @@ -50706,7 +50706,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path12.relative(workspace, file).replace(new RegExp(`\\${path12.sep}`, "g"), "/"); + const relativeFile = path13.relative(workspace, file).replace(new RegExp(`\\${path13.sep}`, "g"), "/"); core14.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -51233,13 +51233,13 @@ function __disposeResources(env) { } return next(); } -function __rewriteRelativeImportExtension(path12, preserveJsx) { - if (typeof path12 === "string" && /^\.\.?\//.test(path12)) { - return path12.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { +function __rewriteRelativeImportExtension(path13, preserveJsx) { + if (typeof path13 === "string" && /^\.\.?\//.test(path13)) { + return path13.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; }); } - return path12; + return path13; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -55653,8 +55653,8 @@ var require_getClient = __commonJS({ } const { allowInsecureConnection, httpClient } = clientOptions; const endpointUrl = clientOptions.endpoint ?? endpoint2; - const client = (path12, ...args) => { - const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path12, args, { allowInsecureConnection, ...requestOptions }); + const client = (path13, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path13, args, { allowInsecureConnection, ...requestOptions }); return { get: (requestOptions = {}) => { return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); @@ -59525,15 +59525,15 @@ var require_urlHelpers2 = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path12 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path12.startsWith("/")) { - path12 = path12.substring(1); + let path13 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path13.startsWith("/")) { + path13 = path13.substring(1); } - if (isAbsoluteUrl(path12)) { - requestUrl = path12; + if (isAbsoluteUrl(path13)) { + requestUrl = path13; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path12); + requestUrl = appendPath(requestUrl, path13); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -59579,9 +59579,9 @@ var require_urlHelpers2 = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path12 = pathToAppend.substring(0, searchStart); + const path13 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path12; + newPath = newPath + path13; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -61814,10 +61814,10 @@ var require_utils_common = __commonJS({ var constants_js_1 = require_constants15(); function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path12 = urlParsed.pathname; - path12 = path12 || "/"; - path12 = escape(path12); - urlParsed.pathname = path12; + let path13 = urlParsed.pathname; + path13 = path13 || "/"; + path13 = escape(path13); + urlParsed.pathname = path13; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -61902,9 +61902,9 @@ var require_utils_common = __commonJS({ } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path12 = urlParsed.pathname; - path12 = path12 ? path12.endsWith("/") ? `${path12}${name}` : `${path12}/${name}` : name; - urlParsed.pathname = path12; + let path13 = urlParsed.pathname; + path13 = path13 ? path13.endsWith("/") ? `${path13}${name}` : `${path13}/${name}` : name; + urlParsed.pathname = path13; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -63131,9 +63131,9 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path12 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path13 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path12}`; + canonicalizedResourceString += `/${this.factory.accountName}${path13}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -63872,10 +63872,10 @@ var require_utils_common2 = __commonJS({ var constants_js_1 = require_constants16(); function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path12 = urlParsed.pathname; - path12 = path12 || "/"; - path12 = escape(path12); - urlParsed.pathname = path12; + let path13 = urlParsed.pathname; + path13 = path13 || "/"; + path13 = escape(path13); + urlParsed.pathname = path13; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -63960,9 +63960,9 @@ var require_utils_common2 = __commonJS({ } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path12 = urlParsed.pathname; - path12 = path12 ? path12.endsWith("/") ? `${path12}${name}` : `${path12}/${name}` : name; - urlParsed.pathname = path12; + let path13 = urlParsed.pathname; + path13 = path13 ? path13.endsWith("/") ? `${path13}${name}` : `${path13}/${name}` : name; + urlParsed.pathname = path13; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -64883,9 +64883,9 @@ var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path12 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path13 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path12}`; + canonicalizedResourceString += `/${this.factory.accountName}${path13}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -65515,9 +65515,9 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path12 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path13 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path12}`; + canonicalizedResourceString += `/${options.accountName}${path13}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -65862,9 +65862,9 @@ var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path12 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path13 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path12}`; + canonicalizedResourceString += `/${options.accountName}${path13}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -87519,8 +87519,8 @@ var require_BlobBatch = __commonJS({ if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path12 = (0, utils_common_js_1.getURLPath)(subRequest.url); - if (!path12 || path12 === "") { + const path13 = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path13 || path13 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -87598,8 +87598,8 @@ var require_BlobBatchClient = __commonJS({ pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url2, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); - const path12 = (0, utils_common_js_1.getURLPath)(url2); - if (path12 && path12 !== "/") { + const path13 = (0, utils_common_js_1.getURLPath)(url2); + if (path13 && path13 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -96908,7 +96908,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io6 = __importStar2(require_io()); var fs_1 = require("fs"); - var path12 = __importStar2(require("path")); + var path13 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants12(); var IS_WINDOWS = process.platform === "win32"; @@ -96954,13 +96954,13 @@ var require_tar = __commonJS({ const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (type2) { case "create": - args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path13.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path13.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path13.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path12.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path13.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path13.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path13.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -97006,7 +97006,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path12.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path13.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -97015,7 +97015,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path12.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path13.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -97030,7 +97030,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path13.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -97039,7 +97039,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path13.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -97077,7 +97077,7 @@ var require_tar = __commonJS({ } function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path12.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path13.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -97159,7 +97159,7 @@ var require_cache5 = __commonJS({ exports2.restoreCache = restoreCache3; exports2.saveCache = saveCache3; var core14 = __importStar2(require_core()); - var path12 = __importStar2(require("path")); + var path13 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); @@ -97254,7 +97254,7 @@ var require_cache5 = __commonJS({ core14.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path12.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path13.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core14.isDebug()) { @@ -97323,7 +97323,7 @@ var require_cache5 = __commonJS({ core14.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path12.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path13.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core14.debug(`Archive path: ${archivePath}`); core14.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -97385,7 +97385,7 @@ var require_cache5 = __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 = path12.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path13.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -97449,7 +97449,7 @@ var require_cache5 = __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 = path12.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path13.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -97528,14 +97528,14 @@ var require_helpers3 = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { "use strict"; var uri = require("url"); - var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path12, name, argument) { - if (Array.isArray(path12)) { - this.path = path12; - this.property = path12.reduce(function(sum, item) { + var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path13, name, argument) { + if (Array.isArray(path13)) { + this.path = path13; + this.property = path13.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path12 !== void 0) { - this.property = path12; + } else if (path13 !== void 0) { + this.property = path13; } if (message) { this.message = message; @@ -97626,16 +97626,16 @@ var require_helpers3 = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path12, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path13, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path12)) { - this.path = path12; - this.propertyPath = path12.reduce(function(sum, item) { + if (Array.isArray(path13)) { + this.path = path13; + this.propertyPath = path13.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path12; + this.propertyPath = path13; } this.base = base; this.schemas = schemas; @@ -97644,10 +97644,10 @@ var require_helpers3 = __commonJS({ return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path12 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path13 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); var id = schema2.$id || schema2.id; var base = uri.resolve(this.base, id || ""); - var ctx = new SchemaContext(schema2, this.options, path12, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema2, this.options, path13, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -99173,7 +99173,7 @@ var require_tool_cache = __commonJS({ var fs13 = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os3 = __importStar2(require("os")); - var path12 = __importStar2(require("path")); + var path13 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver9 = __importStar2(require_semver2()); var stream2 = __importStar2(require("stream")); @@ -99194,8 +99194,8 @@ var require_tool_cache = __commonJS({ var userAgent2 = "actions/tool-cache"; function downloadTool2(url2, dest, auth2, headers) { return __awaiter2(this, void 0, void 0, function* () { - dest = dest || path12.join(_getTempDirectory(), crypto2.randomUUID()); - yield io6.mkdirP(path12.dirname(dest)); + dest = dest || path13.join(_getTempDirectory(), crypto2.randomUUID()); + yield io6.mkdirP(path13.dirname(dest)); core14.debug(`Downloading ${url2}`); core14.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -99285,7 +99285,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path12.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path13.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}'`; @@ -99457,7 +99457,7 @@ var require_tool_cache = __commonJS({ } const destPath = yield _createToolPath(tool, version, arch2); for (const itemName of fs13.readdirSync(sourceDir)) { - const s = path12.join(sourceDir, itemName); + const s = path13.join(sourceDir, itemName); yield io6.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -99474,7 +99474,7 @@ var require_tool_cache = __commonJS({ throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path12.join(destFolder, targetFile); + const destPath = path13.join(destFolder, targetFile); core14.debug(`destination file ${destPath}`); yield io6.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -99497,7 +99497,7 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver9.clean(versionSpec) || ""; - const cachePath = path12.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path13.join(_getCacheDirectory(), toolName, versionSpec, arch2); core14.debug(`checking cache: ${cachePath}`); if (fs13.existsSync(cachePath) && fs13.existsSync(`${cachePath}.complete`)) { core14.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); @@ -99511,12 +99511,12 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os3.arch(); - const toolPath = path12.join(_getCacheDirectory(), toolName); + const toolPath = path13.join(_getCacheDirectory(), toolName); if (fs13.existsSync(toolPath)) { const children = fs13.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path12.join(toolPath, child, arch2 || ""); + const fullPath = path13.join(toolPath, child, arch2 || ""); if (fs13.existsSync(fullPath) && fs13.existsSync(`${fullPath}.complete`)) { versions.push(child); } @@ -99568,7 +99568,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path12.join(_getTempDirectory(), crypto2.randomUUID()); + dest = path13.join(_getTempDirectory(), crypto2.randomUUID()); } yield io6.mkdirP(dest); return dest; @@ -99576,7 +99576,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter2(this, void 0, void 0, function* () { - const folderPath = path12.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path13.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io6.rmRF(folderPath); @@ -99586,7 +99586,7 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path12.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path13.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; fs13.writeFileSync(markerPath, ""); core14.debug("finished caching tool"); @@ -106600,8 +106600,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path12 = decodeGitFilePath(match[2]); - fileOidMap[path12] = oid; + const path13 = decodeGitFilePath(match[2]); + fileOidMap[path13] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -106822,6 +106822,11 @@ var featureConfig = { legacyApi: true, minimumVersion: void 0 }, + ["force_nightly" /* ForceNightly */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_FORCE_NIGHTLY", + minimumVersion: void 0 + }, ["ignore_generated_files" /* IgnoreGeneratedFiles */]: { defaultValue: false, envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES", @@ -107270,7 +107275,7 @@ var core9 = __toESM(require_core()); // src/config-utils.ts var fs6 = __toESM(require("fs")); -var path6 = __toESM(require("path")); +var path7 = __toESM(require("path")); // src/config/db-config.ts var jsonschema = __toESM(require_lib2()); @@ -107282,11 +107287,70 @@ var PACK_IDENTIFIER_PATTERN = (function() { return new RegExp(`^${component}/${component}$`); })(); +// src/diagnostics.ts +var import_fs = require("fs"); +var import_path = __toESM(require("path")); +var unwrittenDiagnostics = []; +var unwrittenDefaultLanguageDiagnostics = []; +function makeDiagnostic(id, name, data = void 0) { + return { + ...data, + timestamp: data?.timestamp ?? (/* @__PURE__ */ new Date()).toISOString(), + source: { ...data?.source, id, name } + }; +} +function addDiagnostic(config, language, diagnostic) { + const logger = getActionsLogger(); + const databasePath = language ? getCodeQLDatabasePath(config, language) : config.dbLocation; + if ((0, import_fs.existsSync)(databasePath)) { + writeDiagnostic(config, language, diagnostic); + } else { + logger.debug( + `Writing a diagnostic for ${language}, but the database at ${databasePath} does not exist yet.` + ); + unwrittenDiagnostics.push({ diagnostic, language }); + } +} +function addNoLanguageDiagnostic(config, diagnostic) { + if (config !== void 0) { + addDiagnostic( + config, + // Arbitrarily choose the first language. We could also choose all languages, but that + // increases the risk of misinterpreting the data. + config.languages[0], + diagnostic + ); + } else { + unwrittenDefaultLanguageDiagnostics.push(diagnostic); + } +} +function writeDiagnostic(config, language, diagnostic) { + const logger = getActionsLogger(); + const databasePath = language ? getCodeQLDatabasePath(config, language) : config.dbLocation; + const diagnosticsPath = import_path.default.resolve( + databasePath, + "diagnostic", + "codeql-action" + ); + try { + (0, import_fs.mkdirSync)(diagnosticsPath, { recursive: true }); + const jsonPath = import_path.default.resolve( + diagnosticsPath, + // Remove colons from the timestamp as these are not allowed in Windows filenames. + `codeql-action-${diagnostic.timestamp.replaceAll(":", "")}.json` + ); + (0, import_fs.writeFileSync)(jsonPath, JSON.stringify(diagnostic)); + } catch (err) { + logger.warning(`Unable to write diagnostic message to database: ${err}`); + logger.debug(JSON.stringify(diagnostic)); + } +} + // src/diff-informed-analysis-utils.ts var fs5 = __toESM(require("fs")); -var path5 = __toESM(require("path")); +var path6 = __toESM(require("path")); function getDiffRangesJsonFilePath() { - return path5.join(getTemporaryDirectory(), "pr-diff-range.json"); + return path6.join(getTemporaryDirectory(), "pr-diff-range.json"); } function readDiffRangesJsonFile(logger) { const jsonFilePath = getDiffRangesJsonFilePath(); @@ -107334,7 +107398,7 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = { swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */ }; function getPathToParsedConfigFile(tempDir) { - return path6.join(tempDir, "config"); + return path7.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); @@ -107586,7 +107650,7 @@ async function sendUnhandledErrorStatusReport(actionName, actionStartedAt, error // src/upload-lib.ts var fs12 = __toESM(require("fs")); -var path11 = __toESM(require("path")); +var path12 = __toESM(require("path")); var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core12 = __toESM(require_core()); @@ -107594,7 +107658,7 @@ var jsonschema2 = __toESM(require_lib2()); // src/codeql.ts var fs10 = __toESM(require("fs")); -var path9 = __toESM(require("path")); +var path10 = __toESM(require("path")); var core11 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -107842,7 +107906,7 @@ function wrapCliConfigurationError(cliError) { // src/setup-codeql.ts var fs9 = __toESM(require("fs")); -var path8 = __toESM(require("path")); +var path9 = __toESM(require("path")); var toolcache3 = __toESM(require_tool_cache()); var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var semver8 = __toESM(require_semver2()); @@ -108062,7 +108126,7 @@ function inferCompressionMethod(tarPath) { // src/tools-download.ts var fs8 = __toESM(require("fs")); var os2 = __toESM(require("os")); -var path7 = __toESM(require("path")); +var path8 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core10 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -108195,7 +108259,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path7.join( + return path8.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver7.clean(version) || version, @@ -108339,7 +108403,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs9.existsSync(path8.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs9.existsSync(path9.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -108380,10 +108444,36 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian let cliVersion2; let tagName; let url2; - if (toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput)) { - logger.info( - `Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.` - ); + const canForceNightlyWithFF = isDynamicWorkflow() || isInTestMode(); + const forceNightlyValueFF = await features.getValue("force_nightly" /* ForceNightly */); + const forceNightly = forceNightlyValueFF && canForceNightlyWithFF; + const nightlyRequestedByToolsInput = toolsInput !== void 0 && CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput); + if (forceNightly || nightlyRequestedByToolsInput) { + if (forceNightly) { + logger.info( + `Using the latest CodeQL CLI nightly, as forced by the ${"force_nightly" /* ForceNightly */} feature flag.` + ); + addNoLanguageDiagnostic( + void 0, + makeDiagnostic( + "codeql-action/forced-nightly-cli", + "A nightly release of CodeQL was used", + { + markdownMessage: "GitHub configured this analysis to use a nightly release of CodeQL to allow you to preview changes from an upcoming release.\n\nNightly releases do not undergo the same validation as regular releases and may lead to analysis instability.\n\nIf use of a nightly CodeQL release for this analysis is unexpected, please contact GitHub support.", + visibility: { + cliSummaryTable: true, + statusPage: true, + telemetry: true + }, + severity: "note" + } + ) + ); + } else { + logger.info( + `Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.` + ); + } toolsInput = await getNightlyToolsUrl(logger); } const forceShippedTools = toolsInput && CODEQL_BUNDLE_VERSION_ALIAS.includes(toolsInput); @@ -108712,7 +108802,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path8.join(tempDir, v4_default()); + return path9.join(tempDir, v4_default()); } async function getNightlyToolsUrl(logger) { const zstdAvailability = await isZstdAvailable(logger); @@ -108800,7 +108890,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path9.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path10.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -108862,7 +108952,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path9.join( + const tracingConfigPath = path10.join( extractorPath, "tools", "tracing-config.lua" @@ -108944,7 +109034,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path9.join( + const autobuildCmd = path10.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -109366,7 +109456,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path9.resolve(config.tempDir, "user-config.yaml"); + return path10.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -109388,7 +109478,7 @@ async function getJobRunUuidSarifOptions(codeql) { // src/fingerprints.ts var fs11 = __toESM(require("fs")); -var import_path = __toESM(require("path")); +var import_path2 = __toESM(require("path")); // node_modules/long/index.js var wasm = null; @@ -110447,7 +110537,7 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) { ); return void 0; } - if (!import_path.default.isAbsolute(uri)) { + if (!import_path2.default.isAbsolute(uri)) { uri = srcRootPrefix + uri; } if (!fs11.existsSync(uri)) { @@ -110677,10 +110767,10 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo ); codeQL = initCodeQLResult.codeql; } - const baseTempDir = path11.resolve(tempDir, "combined-sarif"); + const baseTempDir = path12.resolve(tempDir, "combined-sarif"); fs12.mkdirSync(baseTempDir, { recursive: true }); - const outputDirectory = fs12.mkdtempSync(path11.resolve(baseTempDir, "output-")); - const outputFile = path11.resolve(outputDirectory, "combined-sarif.sarif"); + const outputDirectory = fs12.mkdtempSync(path12.resolve(baseTempDir, "output-")); + const outputFile = path12.resolve(outputDirectory, "combined-sarif.sarif"); await codeQL.mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory: true }); @@ -110713,7 +110803,7 @@ function getAutomationID2(category, analysis_key, environment) { async function uploadPayload(payload, repositoryNwo, logger, analysis) { logger.info("Uploading results"); if (shouldSkipSarifUpload()) { - const payloadSaveFile = path11.join( + const payloadSaveFile = path12.join( getTemporaryDirectory(), `payload-${analysis.kind}.json` ); @@ -110758,9 +110848,9 @@ function findSarifFilesInDir(sarifPath, isSarif) { const entries = fs12.readdirSync(dir, { withFileTypes: true }); for (const entry of entries) { if (entry.isFile() && isSarif(entry.name)) { - sarifFiles.push(path11.resolve(dir, entry.name)); + sarifFiles.push(path12.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - walkSarifFiles(path11.resolve(dir, entry.name)); + walkSarifFiles(path12.resolve(dir, entry.name)); } } }; @@ -110776,7 +110866,7 @@ async function getGroupedSarifFilePaths(logger, sarifPath) { if (stats.isDirectory()) { let unassignedSarifFiles = findSarifFilesInDir( sarifPath, - (name) => path11.extname(name) === ".sarif" + (name) => path12.extname(name) === ".sarif" ); logger.debug( `Found the following .sarif files in ${sarifPath}: ${unassignedSarifFiles.join(", ")}` @@ -111011,7 +111101,7 @@ function dumpSarifFile(sarifPayload, outputDir, logger, uploadTarget) { `The path that processed SARIF files should be written to exists, but is not a directory: ${outputDir}` ); } - const outputFile = path11.resolve( + const outputFile = path12.resolve( outputDir, `upload${uploadTarget.sarifExtension}` ); @@ -111159,7 +111249,7 @@ function filterAlertsByDiffRange(logger, sarif) { if (!locationUri || locationStartLine === void 0) { return false; } - const locationPath = path11.join(checkoutPath, locationUri).replaceAll(path11.sep, "/"); + const locationPath = path12.join(checkoutPath, locationUri).replaceAll(path12.sep, "/"); return diffRanges.some( (range) => range.path === locationPath && (range.startLine <= locationStartLine && range.endLine >= locationStartLine || range.startLine === 0 && range.endLine === 0) ); diff --git a/pr-checks/checks/bundle-from-nightly.yml b/pr-checks/checks/bundle-from-nightly.yml new file mode 100644 index 0000000000..4f68b7829a --- /dev/null +++ b/pr-checks/checks/bundle-from-nightly.yml @@ -0,0 +1,15 @@ +name: "Bundle: From nightly" +description: "The nightly CodeQL bundle should be used when forced" +versions: + - linked # overruled by the FF set below +steps: + - id: init + uses: ./../action/init + env: + CODEQL_ACTION_FORCE_NIGHTLY: true + with: + tools: ${{ steps.prepare-test.outputs.tools-url }} + languages: javascript + - name: Fail if the CodeQL version is not a nightly + if: "!contains(steps.init.outputs.codeql-version, '+')" + run: exit 1 diff --git a/src/diagnostics.ts b/src/diagnostics.ts index bf6a4a72d0..4d8fc87b58 100644 --- a/src/diagnostics.ts +++ b/src/diagnostics.ts @@ -66,6 +66,12 @@ interface UnwrittenDiagnostic { /** A list of diagnostics which have not yet been written to disk. */ let unwrittenDiagnostics: UnwrittenDiagnostic[] = []; +/** + * A list of diagnostics which have not yet been written to disk, + * and where the language does not matter. + */ +let unwrittenDefaultLanguageDiagnostics: DiagnosticMessage[] = []; + /** * Constructs a new diagnostic message with the specified id and name, as well as optional additional data. * @@ -119,16 +125,20 @@ export function addDiagnostic( /** Adds a diagnostic that is not specific to any language. */ export function addNoLanguageDiagnostic( - config: Config, + config: Config | undefined, diagnostic: DiagnosticMessage, ) { - addDiagnostic( - config, - // Arbitrarily choose the first language. We could also choose all languages, but that - // increases the risk of misinterpreting the data. - config.languages[0], - diagnostic, - ); + if (config !== undefined) { + addDiagnostic( + config, + // Arbitrarily choose the first language. We could also choose all languages, but that + // increases the risk of misinterpreting the data. + config.languages[0], + diagnostic, + ); + } else { + unwrittenDefaultLanguageDiagnostics.push(diagnostic); + } } /** @@ -188,16 +198,21 @@ export function logUnwrittenDiagnostics() { /** Writes all unwritten diagnostics to disk. */ export function flushDiagnostics(config: Config) { const logger = getActionsLogger(); - logger.debug( - `Writing ${unwrittenDiagnostics.length} diagnostic(s) to database.`, - ); + + const diagnosticsCount = + unwrittenDiagnostics.length + unwrittenDefaultLanguageDiagnostics.length; + logger.debug(`Writing ${diagnosticsCount} diagnostic(s) to database.`); for (const unwritten of unwrittenDiagnostics) { writeDiagnostic(config, unwritten.language, unwritten.diagnostic); } + for (const unwritten of unwrittenDefaultLanguageDiagnostics) { + addNoLanguageDiagnostic(config, unwritten); + } - // Reset the unwritten diagnostics array. + // Reset the unwritten diagnostics arrays. unwrittenDiagnostics = []; + unwrittenDefaultLanguageDiagnostics = []; } /** diff --git a/src/feature-flags.ts b/src/feature-flags.ts index 04508089d9..9f0db08163 100644 --- a/src/feature-flags.ts +++ b/src/feature-flags.ts @@ -46,6 +46,7 @@ export enum Feature { DisableJavaBuildlessEnabled = "disable_java_buildless_enabled", DisableKotlinAnalysisEnabled = "disable_kotlin_analysis_enabled", ExportDiagnosticsEnabled = "export_diagnostics_enabled", + ForceNightly = "force_nightly", IgnoreGeneratedFiles = "ignore_generated_files", OverlayAnalysis = "overlay_analysis", OverlayAnalysisActions = "overlay_analysis_actions", @@ -163,6 +164,11 @@ export const featureConfig = { legacyApi: true, minimumVersion: undefined, }, + [Feature.ForceNightly]: { + defaultValue: false, + envVar: "CODEQL_ACTION_FORCE_NIGHTLY", + minimumVersion: undefined, + }, [Feature.IgnoreGeneratedFiles]: { defaultValue: false, envVar: "CODEQL_ACTION_IGNORE_GENERATED_FILES", diff --git a/src/setup-codeql.test.ts b/src/setup-codeql.test.ts index 3046b6ff56..5b1587ab0a 100644 --- a/src/setup-codeql.test.ts +++ b/src/setup-codeql.test.ts @@ -1,18 +1,22 @@ import * as path from "path"; +import * as github from "@actions/github"; import * as toolcache from "@actions/tool-cache"; import test, { ExecutionContext } from "ava"; import * as sinon from "sinon"; import * as actionsUtil from "./actions-util"; +import * as api from "./api-client"; import { Feature, FeatureEnablement } from "./feature-flags"; import { getRunnerLogger } from "./logging"; import * as setupCodeql from "./setup-codeql"; +import * as tar from "./tar"; import { LINKED_CLI_VERSION, LoggedMessage, SAMPLE_DEFAULT_CLI_VERSION, SAMPLE_DOTCOM_API_DETAILS, + checkExpectedLogMessages, createFeatures, getRecordingLogger, initializeFeatures, @@ -268,13 +272,127 @@ test("setupCodeQLBundle logs the CodeQL CLI version being used when asked to dow }); }); +test("getCodeQLSource correctly returns nightly CLI version when tools == nightly", async (t) => { + const loggedMessages: LoggedMessage[] = []; + const logger = getRecordingLogger(loggedMessages); + const features = createFeatures([]); + + const expectedDate = "30260213"; + const expectedTag = `codeql-bundle-${expectedDate}`; + + // Ensure that we consistently select "zstd" for the test. + sinon.stub(process, "platform").value("linux"); + sinon.stub(tar, "isZstdAvailable").resolves({ + available: true, + foundZstdBinary: true, + }); + + const client = github.getOctokit("123"); + const listReleases = sinon.stub(client.rest.repos, "listReleases"); + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + listReleases.resolves({ + data: [{ tag_name: expectedTag }], + } as any); + sinon.stub(api, "getApiClient").value(() => client); + + await withTmpDir(async (tmpDir) => { + setupActionsVars(tmpDir, tmpDir); + const source = await setupCodeql.getCodeQLSource( + "nightly", + SAMPLE_DEFAULT_CLI_VERSION, + SAMPLE_DOTCOM_API_DETAILS, + GitHubVariant.DOTCOM, + false, + features, + logger, + ); + + // Check that the `CodeQLToolsSource` object matches our expectations. + const expectedVersion = `0.0.0-${expectedDate}`; + const expectedURL = `https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/${expectedTag}/${setupCodeql.getCodeQLBundleName("zstd")}`; + t.deepEqual(source, { + bundleVersion: expectedDate, + cliVersion: undefined, + codeqlURL: expectedURL, + compressionMethod: "zstd", + sourceType: "download", + toolsVersion: expectedVersion, + } satisfies setupCodeql.CodeQLToolsSource); + + // Afterwards, ensure that we see the expected messages in the log. + checkExpectedLogMessages(t, loggedMessages, [ + "Using the latest CodeQL CLI nightly, as requested by 'tools: nightly'.", + `Bundle version ${expectedDate} is not in SemVer format. Will treat it as pre-release ${expectedVersion}.`, + `Attempting to obtain CodeQL tools. CLI version: unknown, bundle tag name: ${expectedTag}`, + `Using CodeQL CLI sourced from ${expectedURL}`, + ]); + }); +}); + +test("getCodeQLSource correctly returns nightly CLI version when forced by FF", async (t) => { + const loggedMessages: LoggedMessage[] = []; + const logger = getRecordingLogger(loggedMessages); + const features = createFeatures([Feature.ForceNightly]); + + const expectedDate = "30260213"; + const expectedTag = `codeql-bundle-${expectedDate}`; + + // Ensure that we consistently select "zstd" for the test. + sinon.stub(process, "platform").value("linux"); + sinon.stub(tar, "isZstdAvailable").resolves({ + available: true, + foundZstdBinary: true, + }); + + const client = github.getOctokit("123"); + const listReleases = sinon.stub(client.rest.repos, "listReleases"); + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + listReleases.resolves({ + data: [{ tag_name: expectedTag }], + } as any); + sinon.stub(api, "getApiClient").value(() => client); + + await withTmpDir(async (tmpDir) => { + setupActionsVars(tmpDir, tmpDir); + process.env["GITHUB_EVENT_NAME"] = "dynamic"; + + const source = await setupCodeql.getCodeQLSource( + undefined, + SAMPLE_DEFAULT_CLI_VERSION, + SAMPLE_DOTCOM_API_DETAILS, + GitHubVariant.DOTCOM, + false, + features, + logger, + ); + + // Check that the `CodeQLToolsSource` object matches our expectations. + const expectedVersion = `0.0.0-${expectedDate}`; + const expectedURL = `https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/${expectedTag}/${setupCodeql.getCodeQLBundleName("zstd")}`; + t.deepEqual(source, { + bundleVersion: expectedDate, + cliVersion: undefined, + codeqlURL: expectedURL, + compressionMethod: "zstd", + sourceType: "download", + toolsVersion: expectedVersion, + } satisfies setupCodeql.CodeQLToolsSource); + + // Afterwards, ensure that we see the expected messages in the log. + checkExpectedLogMessages(t, loggedMessages, [ + `Using the latest CodeQL CLI nightly, as forced by the ${Feature.ForceNightly} feature flag.`, + `Bundle version ${expectedDate} is not in SemVer format. Will treat it as pre-release ${expectedVersion}.`, + `Attempting to obtain CodeQL tools. CLI version: unknown, bundle tag name: ${expectedTag}`, + `Using CodeQL CLI sourced from ${expectedURL}`, + ]); + }); +}); + test("getCodeQLSource correctly returns latest version from toolcache when tools == toolcache", async (t) => { const loggedMessages: LoggedMessage[] = []; const logger = getRecordingLogger(loggedMessages); const features = createFeatures([Feature.AllowToolcacheInput]); - process.env["GITHUB_EVENT_NAME"] = "dynamic"; - const latestToolcacheVersion = "3.2.1"; const latestVersionPath = "/path/to/latest"; const testVersions = ["2.3.1", latestToolcacheVersion, "1.2.3"]; @@ -288,6 +406,8 @@ test("getCodeQLSource correctly returns latest version from toolcache when tools await withTmpDir(async (tmpDir) => { setupActionsVars(tmpDir, tmpDir); + process.env["GITHUB_EVENT_NAME"] = "dynamic"; + const source = await setupCodeql.getCodeQLSource( "toolcache", SAMPLE_DEFAULT_CLI_VERSION, @@ -343,16 +463,17 @@ const toolcacheInputFallbackMacro = test.macro({ const logger = getRecordingLogger(loggedMessages); const features = createFeatures(featureList); - for (const [k, v] of Object.entries(environment)) { - process.env[k] = v; - } - const findAllVersionsStub = sinon .stub(toolcache, "findAllVersions") .returns(testVersions); await withTmpDir(async (tmpDir) => { setupActionsVars(tmpDir, tmpDir); + + for (const [k, v] of Object.entries(environment)) { + process.env[k] = v; + } + const source = await setupCodeql.getCodeQLSource( "toolcache", SAMPLE_DEFAULT_CLI_VERSION, diff --git a/src/setup-codeql.ts b/src/setup-codeql.ts index 2a39673d97..4ca3302f95 100644 --- a/src/setup-codeql.ts +++ b/src/setup-codeql.ts @@ -10,6 +10,7 @@ import { v4 as uuidV4 } from "uuid"; import { isDynamicWorkflow, isRunningLocalAction } from "./actions-util"; import * as api from "./api-client"; import * as defaults from "./defaults.json"; +import { addNoLanguageDiagnostic, makeDiagnostic } from "./diagnostics"; import { CODEQL_VERSION_ZSTD_BUNDLE, CodeQLDefaultVersionInfo, @@ -55,7 +56,9 @@ function getCodeQLBundleExtension( } } -function getCodeQLBundleName(compressionMethod: tar.CompressionMethod): string { +export function getCodeQLBundleName( + compressionMethod: tar.CompressionMethod, +): string { const extension = getCodeQLBundleExtension(compressionMethod); let platform: string; @@ -196,7 +199,7 @@ export function convertToSemVer(version: string, logger: Logger): string { return s; } -type CodeQLToolsSource = +export type CodeQLToolsSource = | { codeqlTarPath: string; compressionMethod: tar.CompressionMethod; @@ -261,6 +264,20 @@ async function findOverridingToolsInCache( return undefined; } +/** + * Determines where the CodeQL CLI we want to use comes from. This can be from a local file, + * the Actions toolcache, or a download. + * + * @param toolsInput The argument provided for the `tools` input, if any. + * @param defaultCliVersion The default CLI version that's linked to the CodeQL Action. + * @param apiDetails Information about the GitHub API. + * @param variant The GitHub variant we are running on. + * @param tarSupportsZstd Whether zstd is supported by `tar`. + * @param features Information about enabled features. + * @param logger The logger to use. + * + * @returns Information about where the CodeQL CLI we want to use comes from. + */ export async function getCodeQLSource( toolsInput: string | undefined, defaultCliVersion: CodeQLDefaultVersionInfo, @@ -270,6 +287,9 @@ export async function getCodeQLSource( features: FeatureEnablement, logger: Logger, ): Promise { + // If there is an explicit `tools` input, it's not one of the reserved values, and it doesn't appear + // to point to a URL, then we assume it is a local path and use the CLI from there. + // TODO: This appears to misclassify filenames that happen to start with `http` as URLs. if ( toolsInput && !isReservedToolsValue(toolsInput) && @@ -302,13 +322,47 @@ export async function getCodeQLSource( */ let url: string | undefined; - if ( + // We allow forcing the nightly CLI via the FF for `dynamic` events (or in test mode) where the + // `tools` input cannot be adjusted to explicitly request it. + const canForceNightlyWithFF = isDynamicWorkflow() || util.isInTestMode(); + const forceNightlyValueFF = await features.getValue(Feature.ForceNightly); + const forceNightly = forceNightlyValueFF && canForceNightlyWithFF; + + // For advanced workflows, a value from `CODEQL_NIGHTLY_TOOLS_INPUTS` can be specified explicitly + // for the `tools` input in the workflow file. + const nightlyRequestedByToolsInput = toolsInput !== undefined && - CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput) - ) { - logger.info( - `Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.`, - ); + CODEQL_NIGHTLY_TOOLS_INPUTS.includes(toolsInput); + + if (forceNightly || nightlyRequestedByToolsInput) { + if (forceNightly) { + logger.info( + `Using the latest CodeQL CLI nightly, as forced by the ${Feature.ForceNightly} feature flag.`, + ); + addNoLanguageDiagnostic( + undefined, + makeDiagnostic( + "codeql-action/forced-nightly-cli", + "A nightly release of CodeQL was used", + { + markdownMessage: + "GitHub configured this analysis to use a nightly release of CodeQL to allow you to preview changes from an upcoming release.\n\n" + + "Nightly releases do not undergo the same validation as regular releases and may lead to analysis instability.\n\n" + + "If use of a nightly CodeQL release for this analysis is unexpected, please contact GitHub support.", + visibility: { + cliSummaryTable: true, + statusPage: true, + telemetry: true, + }, + severity: "note", + }, + ), + ); + } else { + logger.info( + `Using the latest CodeQL CLI nightly, as requested by 'tools: ${toolsInput}'.`, + ); + } toolsInput = await getNightlyToolsUrl(logger); } diff --git a/src/testing-utils.ts b/src/testing-utils.ts index aff7780436..d69c266a2c 100644 --- a/src/testing-utils.ts +++ b/src/testing-utils.ts @@ -145,6 +145,7 @@ export function setupActionsVars(tempDir: string, toolsDir: string) { process.env["RUNNER_TEMP"] = tempDir; process.env["RUNNER_TOOL_CACHE"] = toolsDir; process.env["GITHUB_WORKSPACE"] = tempDir; + process.env["GITHUB_EVENT_NAME"] = "push"; } export interface LoggedMessage {