From 521c3536d387ba93fa21266454b6f760bda87135 Mon Sep 17 00:00:00 2001 From: Sam Robson Date: Fri, 6 Mar 2026 16:03:16 +0000 Subject: [PATCH 1/3] feat: always include files from diff in overlay changed files --- lib/analyze-action-post.js | 108 +++- lib/analyze-action.js | 244 +++----- lib/autobuild-action.js | 64 +- lib/init-action-post.js | 117 +++- lib/init-action.js | 912 +++++++++++++++++----------- lib/resolve-environment-action.js | 64 +- lib/setup-codeql-action.js | 64 +- lib/upload-lib.js | 73 ++- lib/upload-sarif-action.js | 73 ++- src/analyze-action.ts | 11 +- src/analyze.ts | 26 +- src/diff-informed-analysis-utils.ts | 9 +- src/init-action.ts | 44 +- src/overlay/index.test.ts | 244 +++++++- src/overlay/index.ts | 71 ++- 15 files changed, 1485 insertions(+), 639 deletions(-) diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index 75be56ced1..93a741ffb5 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -100540,8 +100540,8 @@ var require_follow_redirects = __commonJS({ } return parsed; } - function resolveUrl(relative, base) { - return useNativeURL ? new URL2(relative, base) : parseUrl2(url.resolve(base, relative)); + function resolveUrl(relative2, base) { + return useNativeURL ? new URL2(relative2, base) : parseUrl2(url.resolve(base, relative2)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -104424,8 +104424,8 @@ var require_readdir_glob = __commonJS({ useStat = true; } const filename = dir + "/" + name; - const relative = filename.slice(1); - const absolute = path7 + "/" + relative; + const relative2 = filename.slice(1); + const absolute = path7 + "/" + relative2; let stats = null; if (useStat || followSymlinks) { stats = await stat(absolute, followSymlinks); @@ -104437,12 +104437,12 @@ var require_readdir_glob = __commonJS({ stats = { isDirectory: () => false }; } if (stats.isDirectory()) { - if (!shouldSkip(relative)) { - yield { relative, absolute, stats }; + if (!shouldSkip(relative2)) { + yield { relative: relative2, absolute, stats }; yield* exploreWalkAsync(filename, path7, followSymlinks, useStat, shouldSkip, false); } } else { - yield { relative, absolute, stats }; + yield { relative: relative2, absolute, stats }; } } } @@ -104512,11 +104512,11 @@ var require_readdir_glob = __commonJS({ } setTimeout(() => this._next(), 0); } - _shouldSkipDirectory(relative) { - return this.skipMatchers.some((m) => m.match(relative)); + _shouldSkipDirectory(relative2) { + return this.skipMatchers.some((m) => m.match(relative2)); } - _fileMatches(relative, isDirectory) { - const file = relative + (isDirectory ? "/" : ""); + _fileMatches(relative2, isDirectory) { + const file = relative2 + (isDirectory ? "/" : ""); return (this.matchers.length === 0 || this.matchers.some((m) => m.match(file))) && !this.ignoreMatchers.some((m) => m.match(file)) && (!this.options.nodir || !isDirectory); } _next() { @@ -104525,16 +104525,16 @@ var require_readdir_glob = __commonJS({ if (!obj.done) { const isDirectory = obj.value.stats.isDirectory(); if (this._fileMatches(obj.value.relative, isDirectory)) { - let relative = obj.value.relative; + let relative2 = obj.value.relative; let absolute = obj.value.absolute; if (this.options.mark && isDirectory) { - relative += "/"; + relative2 += "/"; absolute += "/"; } if (this.options.stat) { - this.emit("match", { relative, absolute, stat: obj.value.stats }); + this.emit("match", { relative: relative2, absolute, stat: obj.value.stats }); } else { - this.emit("match", { relative, absolute }); + this.emit("match", { relative: relative2, absolute }); } } this._next(this.iterator); @@ -110019,8 +110019,8 @@ var require_primordials = __commonJS({ ArrayPrototypeIndexOf(self2, el) { return self2.indexOf(el); }, - ArrayPrototypeJoin(self2, sep3) { - return self2.join(sep3); + ArrayPrototypeJoin(self2, sep4) { + return self2.join(sep4); }, ArrayPrototypeMap(self2, fn) { return self2.map(fn); @@ -122273,7 +122273,7 @@ var require_commonjs23 = __commonJS({ * * @internal */ - constructor(cwd = process.cwd(), pathImpl, sep3, { nocase, childrenCacheSize = 16 * 1024, fs: fs8 = defaultFS } = {}) { + constructor(cwd = process.cwd(), pathImpl, sep4, { nocase, childrenCacheSize = 16 * 1024, fs: fs8 = defaultFS } = {}) { this.#fs = fsFromOption(fs8); if (cwd instanceof URL || cwd.startsWith("file://")) { cwd = (0, node_url_1.fileURLToPath)(cwd); @@ -122284,7 +122284,7 @@ var require_commonjs23 = __commonJS({ this.#resolveCache = new ResolveCache(); this.#resolvePosixCache = new ResolveCache(); this.#children = new ChildrenCache(childrenCacheSize); - const split = cwdPath.substring(this.rootPath.length).split(sep3); + const split = cwdPath.substring(this.rootPath.length).split(sep4); if (split.length === 1 && !split[0]) { split.pop(); } @@ -123127,10 +123127,10 @@ var require_ignore = __commonJS({ ignored(p) { const fullpath = p.fullpath(); const fullpaths = `${fullpath}/`; - const relative = p.relative() || "."; - const relatives = `${relative}/`; + const relative2 = p.relative() || "."; + const relatives = `${relative2}/`; for (const m of this.relative) { - if (m.match(relative) || m.match(relatives)) + if (m.match(relative2) || m.match(relatives)) return true; } for (const m of this.absolute) { @@ -123141,9 +123141,9 @@ var require_ignore = __commonJS({ } childrenIgnored(p) { const fullpath = p.fullpath() + "/"; - const relative = (p.relative() || ".") + "/"; + const relative2 = (p.relative() || ".") + "/"; for (const m of this.relativeChildren) { - if (m.match(relative)) + if (m.match(relative2)) return true; } for (const m of this.absoluteChildren) { @@ -162155,6 +162155,18 @@ var decodeGitFilePath = function(filePath) { } return filePath; }; +var getGitRoot = async function(sourceRoot) { + try { + const stdout = await runGitCommand( + sourceRoot, + ["rev-parse", "--show-toplevel"], + `Cannot find Git repository root from the source root ${sourceRoot}.` + ); + return stdout.trim(); + } catch { + return void 0; + } +}; var getFileOidsUnderPath = async function(basePath) { const stdout = await runGitCommand( basePath, @@ -162277,10 +162289,12 @@ async function readBaseDatabaseOidsFile(config, logger) { async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); const overlayFileOids = await getFileOidsUnderPath(sourceRoot); - const changedFiles = computeChangedFiles(baseFileOids, overlayFileOids); + const oidChangedFiles = computeChangedFiles(baseFileOids, overlayFileOids); logger.info( - `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` + `Found ${oidChangedFiles.length} changed file(s) under ${sourceRoot} from OID comparison.` ); + const diffRangeFiles = await getDiffRangeFilePaths(sourceRoot, logger); + const changedFiles = [.../* @__PURE__ */ new Set([...oidChangedFiles, ...diffRangeFiles])]; const changedFilesJson = JSON.stringify({ changes: changedFiles }); const overlayChangesFile = path2.join( getTemporaryDirectory(), @@ -162306,6 +162320,48 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } return changes; } +async function getDiffRangeFilePaths(sourceRoot, logger) { + const jsonFilePath = path2.join(getTemporaryDirectory(), "pr-diff-range.json"); + if (!fs2.existsSync(jsonFilePath)) { + return []; + } + let diffRanges; + try { + diffRanges = JSON.parse(fs2.readFileSync(jsonFilePath, "utf8")); + } catch (e) { + logger.warning( + `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` + ); + return []; + } + logger.debug( + `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.` + ); + const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; + const repoRoot = await getGitRoot(sourceRoot); + if (repoRoot === void 0) { + logger.warning( + "Cannot determine git root; returning diff range paths as-is." + ); + return repoRelativePaths; + } + const sourceRootRelPrefix = path2.relative(repoRoot, sourceRoot).replaceAll(path2.sep, "/"); + if (sourceRootRelPrefix === "") { + return repoRelativePaths; + } + const prefixWithSlash = `${sourceRootRelPrefix}/`; + const result = []; + for (const p of repoRelativePaths) { + if (p.startsWith(prefixWithSlash)) { + result.push(p.slice(prefixWithSlash.length)); + } else { + logger.debug( + `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").` + ); + } + } + return result; +} // src/tools-features.ts var semver4 = __toESM(require_semver2()); diff --git a/lib/analyze-action.js b/lib/analyze-action.js index 268cfad571..c3e3a37c9a 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -100540,8 +100540,8 @@ var require_follow_redirects = __commonJS({ } return parsed; } - function resolveUrl(relative2, base) { - return useNativeURL ? new URL2(relative2, base) : parseUrl2(url2.resolve(base, relative2)); + function resolveUrl(relative3, base) { + return useNativeURL ? new URL2(relative3, base) : parseUrl2(url2.resolve(base, relative3)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -106859,29 +106859,6 @@ var persistInputs = function() { ); core4.saveState(persistedInputsKey, JSON.stringify(inputEnvironmentVariables)); }; -function getPullRequestBranches() { - const pullRequest = github.context.payload.pull_request; - if (pullRequest) { - return { - base: pullRequest.base.ref, - // We use the head label instead of the head ref here, because the head - // ref lacks owner information and by itself does not uniquely identify - // the head branch (which may be in a forked repository). - head: pullRequest.head.label - }; - } - const codeScanningRef = process.env.CODE_SCANNING_REF; - const codeScanningBaseBranch = process.env.CODE_SCANNING_BASE_BRANCH; - if (codeScanningRef && codeScanningBaseBranch) { - return { - base: codeScanningBaseBranch, - // PR analysis under Default Setup analyzes the PR head commit instead of - // the merge commit, so we can use the provided ref directly. - head: codeScanningRef - }; - } - return void 0; -} var qualityCategoryMapping = { "c#": "csharp", cpp: "c-cpp", @@ -107775,6 +107752,18 @@ var decodeGitFilePath = function(filePath) { } return filePath; }; +var getGitRoot = async function(sourceRoot) { + try { + const stdout = await runGitCommand( + sourceRoot, + ["rev-parse", "--show-toplevel"], + `Cannot find Git repository root from the source root ${sourceRoot}.` + ); + return stdout.trim(); + } catch { + return void 0; + } +}; var getFileOidsUnderPath = async function(basePath) { const stdout = await runGitCommand( basePath, @@ -107897,10 +107886,12 @@ async function readBaseDatabaseOidsFile(config, logger) { async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); const overlayFileOids = await getFileOidsUnderPath(sourceRoot); - const changedFiles = computeChangedFiles(baseFileOids, overlayFileOids); + const oidChangedFiles = computeChangedFiles(baseFileOids, overlayFileOids); logger.info( - `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` + `Found ${oidChangedFiles.length} changed file(s) under ${sourceRoot} from OID comparison.` ); + const diffRangeFiles = await getDiffRangeFilePaths(sourceRoot, logger); + const changedFiles = [.../* @__PURE__ */ new Set([...oidChangedFiles, ...diffRangeFiles])]; const changedFilesJson = JSON.stringify({ changes: changedFiles }); const overlayChangesFile = path4.join( getTemporaryDirectory(), @@ -107926,6 +107917,48 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } return changes; } +async function getDiffRangeFilePaths(sourceRoot, logger) { + const jsonFilePath = path4.join(getTemporaryDirectory(), "pr-diff-range.json"); + if (!fs3.existsSync(jsonFilePath)) { + return []; + } + let diffRanges; + try { + diffRanges = JSON.parse(fs3.readFileSync(jsonFilePath, "utf8")); + } catch (e) { + logger.warning( + `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` + ); + return []; + } + logger.debug( + `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.` + ); + const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; + const repoRoot = await getGitRoot(sourceRoot); + if (repoRoot === void 0) { + logger.warning( + "Cannot determine git root; returning diff range paths as-is." + ); + return repoRelativePaths; + } + const sourceRootRelPrefix = path4.relative(repoRoot, sourceRoot).replaceAll(path4.sep, "/"); + if (sourceRootRelPrefix === "") { + return repoRelativePaths; + } + const prefixWithSlash = `${sourceRootRelPrefix}/`; + const result = []; + for (const p of repoRelativePaths) { + if (p.startsWith(prefixWithSlash)) { + result.push(p.slice(prefixWithSlash.length)); + } else { + logger.debug( + `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").` + ); + } + } + return result; +} var CACHE_VERSION = 1; var CACHE_PREFIX = "codeql-overlay-base-database"; var MAX_CACHE_OPERATION_MS = 6e5; @@ -108611,34 +108644,9 @@ function initFeatures(gitHubVersion, repositoryNwo, tempDir, logger) { } // src/diff-informed-analysis-utils.ts -async function getDiffInformedAnalysisBranches(codeql, features, logger) { - if (!await features.getValue("diff_informed_queries" /* DiffInformedQueries */, codeql)) { - return void 0; - } - const gitHubVersion = await getGitHubVersion(); - if (gitHubVersion.type === "GitHub Enterprise Server" /* GHES */ && satisfiesGHESVersion(gitHubVersion.version, "<3.19", true)) { - return void 0; - } - const branches = getPullRequestBranches(); - if (!branches) { - logger.info( - "Not performing diff-informed analysis because we are not analyzing a pull request." - ); - } - return branches; -} function getDiffRangesJsonFilePath() { return path6.join(getTemporaryDirectory(), "pr-diff-range.json"); } -function writeDiffRangesJsonFile(logger, ranges) { - const jsonContents = JSON.stringify(ranges, null, 2); - const jsonFilePath = getDiffRangesJsonFilePath(); - fs5.writeFileSync(jsonFilePath, jsonContents); - logger.debug( - `Wrote pr-diff-range JSON file to ${jsonFilePath}: -${jsonContents}` - ); -} function readDiffRangesJsonFile(logger) { const jsonFilePath = getDiffRangesJsonFilePath(); if (!fs5.existsSync(jsonFilePath)) { @@ -108650,117 +108658,14 @@ function readDiffRangesJsonFile(logger) { `Read pr-diff-range JSON file from ${jsonFilePath}: ${jsonContents}` ); - return JSON.parse(jsonContents); -} -async function getPullRequestEditedDiffRanges(branches, logger) { - const fileDiffs = await getFileDiffsWithBasehead(branches, logger); - if (fileDiffs === void 0) { - return void 0; - } - if (fileDiffs.length >= 300) { + try { + return JSON.parse(jsonContents); + } catch (e) { logger.warning( - `Cannot retrieve the full diff because there are too many (${fileDiffs.length}) changed files in the pull request.` + `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` ); return void 0; } - const results = []; - for (const filediff of fileDiffs) { - const diffRanges = getDiffRanges(filediff, logger); - if (diffRanges === void 0) { - return void 0; - } - results.push(...diffRanges); - } - return results; -} -async function getFileDiffsWithBasehead(branches, logger) { - const repositoryNwo = getRepositoryNwoFromEnv( - "CODE_SCANNING_REPOSITORY", - "GITHUB_REPOSITORY" - ); - const basehead = `${branches.base}...${branches.head}`; - try { - const response = await getApiClient().rest.repos.compareCommitsWithBasehead( - { - owner: repositoryNwo.owner, - repo: repositoryNwo.repo, - basehead, - per_page: 1 - } - ); - logger.debug( - `Response from compareCommitsWithBasehead(${basehead}): -${JSON.stringify(response, null, 2)}` - ); - return response.data.files; - } catch (error3) { - if (error3.status) { - logger.warning(`Error retrieving diff ${basehead}: ${error3.message}`); - logger.debug( - `Error running compareCommitsWithBasehead(${basehead}): -Request: ${JSON.stringify(error3.request, null, 2)} -Error Response: ${JSON.stringify(error3.response, null, 2)}` - ); - return void 0; - } else { - throw error3; - } - } -} -function getDiffRanges(fileDiff, logger) { - if (fileDiff.patch === void 0) { - if (fileDiff.changes === 0) { - return []; - } - return [ - { - path: fileDiff.filename, - startLine: 0, - endLine: 0 - } - ]; - } - let currentLine = 0; - let additionRangeStartLine = void 0; - const diffRanges = []; - const diffLines = fileDiff.patch.split("\n"); - diffLines.push(" "); - for (const diffLine of diffLines) { - if (diffLine.startsWith("-")) { - continue; - } - if (diffLine.startsWith("+")) { - if (additionRangeStartLine === void 0) { - additionRangeStartLine = currentLine; - } - currentLine++; - continue; - } - if (additionRangeStartLine !== void 0) { - diffRanges.push({ - path: fileDiff.filename, - startLine: additionRangeStartLine, - endLine: currentLine - 1 - }); - additionRangeStartLine = void 0; - } - if (diffLine.startsWith("@@ ")) { - const match = diffLine.match(/^@@ -\d+(?:,\d+)? \+(\d+)(?:,\d+)? @@/); - if (match === null) { - logger.warning( - `Cannot parse diff hunk header for ${fileDiff.filename}: ${diffLine}` - ); - return void 0; - } - currentLine = parseInt(match[1], 10); - continue; - } - if (diffLine.startsWith(" ")) { - currentLine++; - continue; - } - } - return diffRanges; } // src/overlay/status.ts @@ -110915,14 +110820,17 @@ async function finalizeDatabaseCreation(codeql, features, config, threadsFlag, m trap_import_duration_ms: Math.round(trapImportTime) }; } -async function setupDiffInformedQueryRun(branches, logger) { +async function setupDiffInformedQueryRun(logger) { return await withGroupAsync( "Generating diff range extension pack", async () => { - logger.info( - `Calculating diff ranges for ${branches.base}...${branches.head}` - ); - const diffRanges = await getPullRequestEditedDiffRanges(branches, logger); + const diffRanges = readDiffRangesJsonFile(logger); + if (diffRanges === void 0) { + logger.info( + "No precomputed diff ranges found; skipping diff-informed analysis stage." + ); + return void 0; + } const checkoutPath = getRequiredInput("checkout_path"); const packDir = writeDiffRangeDataExtensionPack( logger, @@ -110992,7 +110900,6 @@ dataExtensions: `Wrote pr-diff-range extension pack to ${extensionFilePath}: ${extensionContents}` ); - writeDiffRangesJsonFile(logger, ranges); return diffRangeDir; } var defaultSuites = /* @__PURE__ */ new Set([ @@ -113544,12 +113451,7 @@ async function run(startedAt2) { getOptionalInput("ram") || process.env["CODEQL_RAM"], logger ); - const branches = await getDiffInformedAnalysisBranches( - codeql, - features, - logger - ); - const diffRangePackDir = branches ? await setupDiffInformedQueryRun(branches, logger) : void 0; + const diffRangePackDir = await setupDiffInformedQueryRun(logger); await warnIfGoInstalledAfterInit(config, logger); await runAutobuildIfLegacyGoWorkflow(config, logger); dbCreationTimings = await runFinalize( diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index 7720f03cb0..8b416c8d6a 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -100540,8 +100540,8 @@ var require_follow_redirects = __commonJS({ } return parsed; } - function resolveUrl(relative, base) { - return useNativeURL ? new URL2(relative, base) : parseUrl2(url.resolve(base, relative)); + function resolveUrl(relative2, base) { + return useNativeURL ? new URL2(relative2, base) : parseUrl2(url.resolve(base, relative2)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -104209,6 +104209,18 @@ var decodeGitFilePath = function(filePath) { } return filePath; }; +var getGitRoot = async function(sourceRoot) { + try { + const stdout = await runGitCommand( + sourceRoot, + ["rev-parse", "--show-toplevel"], + `Cannot find Git repository root from the source root ${sourceRoot}.` + ); + return stdout.trim(); + } catch { + return void 0; + } +}; var getFileOidsUnderPath = async function(basePath) { const stdout = await runGitCommand( basePath, @@ -104331,10 +104343,12 @@ async function readBaseDatabaseOidsFile(config, logger) { async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); const overlayFileOids = await getFileOidsUnderPath(sourceRoot); - const changedFiles = computeChangedFiles(baseFileOids, overlayFileOids); + const oidChangedFiles = computeChangedFiles(baseFileOids, overlayFileOids); logger.info( - `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` + `Found ${oidChangedFiles.length} changed file(s) under ${sourceRoot} from OID comparison.` ); + const diffRangeFiles = await getDiffRangeFilePaths(sourceRoot, logger); + const changedFiles = [.../* @__PURE__ */ new Set([...oidChangedFiles, ...diffRangeFiles])]; const changedFilesJson = JSON.stringify({ changes: changedFiles }); const overlayChangesFile = path2.join( getTemporaryDirectory(), @@ -104360,6 +104374,48 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } return changes; } +async function getDiffRangeFilePaths(sourceRoot, logger) { + const jsonFilePath = path2.join(getTemporaryDirectory(), "pr-diff-range.json"); + if (!fs2.existsSync(jsonFilePath)) { + return []; + } + let diffRanges; + try { + diffRanges = JSON.parse(fs2.readFileSync(jsonFilePath, "utf8")); + } catch (e) { + logger.warning( + `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` + ); + return []; + } + logger.debug( + `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.` + ); + const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; + const repoRoot = await getGitRoot(sourceRoot); + if (repoRoot === void 0) { + logger.warning( + "Cannot determine git root; returning diff range paths as-is." + ); + return repoRelativePaths; + } + const sourceRootRelPrefix = path2.relative(repoRoot, sourceRoot).replaceAll(path2.sep, "/"); + if (sourceRootRelPrefix === "") { + return repoRelativePaths; + } + const prefixWithSlash = `${sourceRootRelPrefix}/`; + const result = []; + for (const p of repoRelativePaths) { + if (p.startsWith(prefixWithSlash)) { + result.push(p.slice(prefixWithSlash.length)); + } else { + logger.debug( + `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").` + ); + } + } + return result; +} // src/tools-features.ts var semver4 = __toESM(require_semver2()); diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 341449f7e1..2015196f6b 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -100540,8 +100540,8 @@ var require_follow_redirects = __commonJS({ } return parsed; } - function resolveUrl(relative2, base) { - return useNativeURL ? new URL2(relative2, base) : parseUrl2(url2.resolve(base, relative2)); + function resolveUrl(relative3, base) { + return useNativeURL ? new URL2(relative3, base) : parseUrl2(url2.resolve(base, relative3)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -104424,8 +104424,8 @@ var require_readdir_glob = __commonJS({ useStat = true; } const filename = dir + "/" + name; - const relative2 = filename.slice(1); - const absolute = path19 + "/" + relative2; + const relative3 = filename.slice(1); + const absolute = path19 + "/" + relative3; let stats = null; if (useStat || followSymlinks) { stats = await stat(absolute, followSymlinks); @@ -104437,12 +104437,12 @@ var require_readdir_glob = __commonJS({ stats = { isDirectory: () => false }; } if (stats.isDirectory()) { - if (!shouldSkip(relative2)) { - yield { relative: relative2, absolute, stats }; + if (!shouldSkip(relative3)) { + yield { relative: relative3, absolute, stats }; yield* exploreWalkAsync(filename, path19, followSymlinks, useStat, shouldSkip, false); } } else { - yield { relative: relative2, absolute, stats }; + yield { relative: relative3, absolute, stats }; } } } @@ -104512,11 +104512,11 @@ var require_readdir_glob = __commonJS({ } setTimeout(() => this._next(), 0); } - _shouldSkipDirectory(relative2) { - return this.skipMatchers.some((m) => m.match(relative2)); + _shouldSkipDirectory(relative3) { + return this.skipMatchers.some((m) => m.match(relative3)); } - _fileMatches(relative2, isDirectory) { - const file = relative2 + (isDirectory ? "/" : ""); + _fileMatches(relative3, isDirectory) { + const file = relative3 + (isDirectory ? "/" : ""); return (this.matchers.length === 0 || this.matchers.some((m) => m.match(file))) && !this.ignoreMatchers.some((m) => m.match(file)) && (!this.options.nodir || !isDirectory); } _next() { @@ -104525,16 +104525,16 @@ var require_readdir_glob = __commonJS({ if (!obj.done) { const isDirectory = obj.value.stats.isDirectory(); if (this._fileMatches(obj.value.relative, isDirectory)) { - let relative2 = obj.value.relative; + let relative3 = obj.value.relative; let absolute = obj.value.absolute; if (this.options.mark && isDirectory) { - relative2 += "/"; + relative3 += "/"; absolute += "/"; } if (this.options.stat) { - this.emit("match", { relative: relative2, absolute, stat: obj.value.stats }); + this.emit("match", { relative: relative3, absolute, stat: obj.value.stats }); } else { - this.emit("match", { relative: relative2, absolute }); + this.emit("match", { relative: relative3, absolute }); } } this._next(this.iterator); @@ -110019,8 +110019,8 @@ var require_primordials = __commonJS({ ArrayPrototypeIndexOf(self2, el) { return self2.indexOf(el); }, - ArrayPrototypeJoin(self2, sep4) { - return self2.join(sep4); + ArrayPrototypeJoin(self2, sep5) { + return self2.join(sep5); }, ArrayPrototypeMap(self2, fn) { return self2.map(fn); @@ -122273,7 +122273,7 @@ var require_commonjs23 = __commonJS({ * * @internal */ - constructor(cwd = process.cwd(), pathImpl, sep4, { nocase, childrenCacheSize = 16 * 1024, fs: fs20 = defaultFS } = {}) { + constructor(cwd = process.cwd(), pathImpl, sep5, { nocase, childrenCacheSize = 16 * 1024, fs: fs20 = defaultFS } = {}) { this.#fs = fsFromOption(fs20); if (cwd instanceof URL || cwd.startsWith("file://")) { cwd = (0, node_url_1.fileURLToPath)(cwd); @@ -122284,7 +122284,7 @@ var require_commonjs23 = __commonJS({ this.#resolveCache = new ResolveCache(); this.#resolvePosixCache = new ResolveCache(); this.#children = new ChildrenCache(childrenCacheSize); - const split = cwdPath.substring(this.rootPath.length).split(sep4); + const split = cwdPath.substring(this.rootPath.length).split(sep5); if (split.length === 1 && !split[0]) { split.pop(); } @@ -123127,10 +123127,10 @@ var require_ignore = __commonJS({ ignored(p) { const fullpath = p.fullpath(); const fullpaths = `${fullpath}/`; - const relative2 = p.relative() || "."; - const relatives = `${relative2}/`; + const relative3 = p.relative() || "."; + const relatives = `${relative3}/`; for (const m of this.relative) { - if (m.match(relative2) || m.match(relatives)) + if (m.match(relative3) || m.match(relatives)) return true; } for (const m of this.absolute) { @@ -123141,9 +123141,9 @@ var require_ignore = __commonJS({ } childrenIgnored(p) { const fullpath = p.fullpath() + "/"; - const relative2 = (p.relative() || ".") + "/"; + const relative3 = (p.relative() || ".") + "/"; for (const m of this.relativeChildren) { - if (m.match(relative2)) + if (m.match(relative3)) return true; } for (const m of this.absoluteChildren) { @@ -165669,6 +165669,18 @@ var decodeGitFilePath = function(filePath) { } return filePath; }; +var getGitRoot = async function(sourceRoot) { + try { + const stdout = await runGitCommand( + sourceRoot, + ["rev-parse", "--show-toplevel"], + `Cannot find Git repository root from the source root ${sourceRoot}.` + ); + return stdout.trim(); + } catch { + return void 0; + } +}; var getFileOidsUnderPath = async function(basePath) { const stdout = await runGitCommand( basePath, @@ -165791,10 +165803,12 @@ async function readBaseDatabaseOidsFile(config, logger) { async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); const overlayFileOids = await getFileOidsUnderPath(sourceRoot); - const changedFiles = computeChangedFiles(baseFileOids, overlayFileOids); + const oidChangedFiles = computeChangedFiles(baseFileOids, overlayFileOids); logger.info( - `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` + `Found ${oidChangedFiles.length} changed file(s) under ${sourceRoot} from OID comparison.` ); + const diffRangeFiles = await getDiffRangeFilePaths(sourceRoot, logger); + const changedFiles = [.../* @__PURE__ */ new Set([...oidChangedFiles, ...diffRangeFiles])]; const changedFilesJson = JSON.stringify({ changes: changedFiles }); const overlayChangesFile = path4.join( getTemporaryDirectory(), @@ -165820,6 +165834,48 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } return changes; } +async function getDiffRangeFilePaths(sourceRoot, logger) { + const jsonFilePath = path4.join(getTemporaryDirectory(), "pr-diff-range.json"); + if (!fs3.existsSync(jsonFilePath)) { + return []; + } + let diffRanges; + try { + diffRanges = JSON.parse(fs3.readFileSync(jsonFilePath, "utf8")); + } catch (e) { + logger.warning( + `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` + ); + return []; + } + logger.debug( + `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.` + ); + const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; + const repoRoot = await getGitRoot(sourceRoot); + if (repoRoot === void 0) { + logger.warning( + "Cannot determine git root; returning diff range paths as-is." + ); + return repoRelativePaths; + } + const sourceRootRelPrefix = path4.relative(repoRoot, sourceRoot).replaceAll(path4.sep, "/"); + if (sourceRootRelPrefix === "") { + return repoRelativePaths; + } + const prefixWithSlash = `${sourceRootRelPrefix}/`; + const result = []; + for (const p of repoRelativePaths) { + if (p.startsWith(prefixWithSlash)) { + result.push(p.slice(prefixWithSlash.length)); + } else { + logger.debug( + `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").` + ); + } + } + return result; +} // src/tools-features.ts var semver4 = __toESM(require_semver2()); @@ -166388,7 +166444,14 @@ function readDiffRangesJsonFile(logger) { `Read pr-diff-range JSON file from ${jsonFilePath}: ${jsonContents}` ); - return JSON.parse(jsonContents); + try { + return JSON.parse(jsonContents); + } catch (e) { + logger.warning( + `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` + ); + return void 0; + } } // src/overlay/status.ts diff --git a/lib/init-action.js b/lib/init-action.js index ec26268cb9..8ebb9ac658 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -204,7 +204,7 @@ var require_file_command = __commonJS({ exports2.issueFileCommand = issueFileCommand; exports2.prepareKeyValueMessage = prepareKeyValueMessage; var crypto3 = __importStar2(require("crypto")); - var fs16 = __importStar2(require("fs")); + var fs17 = __importStar2(require("fs")); var os6 = __importStar2(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { @@ -212,10 +212,10 @@ var require_file_command = __commonJS({ if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); } - if (!fs16.existsSync(filePath)) { + if (!fs17.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs16.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os6.EOL}`, { + fs17.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os6.EOL}`, { encoding: "utf8" }); } @@ -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 path17 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path18 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path17 && path17[0] !== "/") { - path17 = `/${path17}`; + if (path18 && path18[0] !== "/") { + path18 = `/${path18}`; } - return new URL(`${origin}${path17}`); + return new URL(`${origin}${path18}`); } 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: path17, origin } + request: { method, path: path18, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path17); + debuglog("sending request to %s %s/%s", method, origin, path18); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path17, origin }, + request: { method, path: path18, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path17, + path18, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path17, origin } + request: { method, path: path18, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path17); + debuglog("trailers received from %s %s/%s", method, origin, path18); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path17, origin }, + request: { method, path: path18, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path17, + path18, error3.message ); }); @@ -1876,9 +1876,9 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path17, origin } + request: { method, path: path18, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path17); + debuglog("sending request to %s %s/%s", method, origin, path18); }); } 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: path17, + path: path18, method, body, headers, @@ -1956,11 +1956,11 @@ var require_request = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path17 !== "string") { + if (typeof path18 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path17[0] !== "/" && !(path17.startsWith("http://") || path17.startsWith("https://")) && method !== "CONNECT") { + } else if (path18[0] !== "/" && !(path18.startsWith("http://") || path18.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path17)) { + } else if (invalidPathRegex.test(path18)) { 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(path17, query) : path17; + this.path = query ? buildURL(path18, query) : path18; 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: path17, host, upgrade, blocking, reset } = request2; + const { method, path: path18, 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} ${path17} HTTP/1.1\r + let header = `${method} ${path18} 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: path17, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path18, 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] = path17; + headers[HTTP2_HEADER_PATH] = path18; 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 path17 = search ? `${pathname}${search}` : pathname; + const path18 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path17; + this.opts.path = path18; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -8784,10 +8784,10 @@ var require_proxy_agent = __commonJS({ }; const { origin, - path: path17 = "/", + path: path18 = "/", headers = {} } = opts; - opts.path = origin + path17; + opts.path = origin + path18; 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(path17) { - if (typeof path17 !== "string") { - return path17; + function safeUrl(path18) { + if (typeof path18 !== "string") { + return path18; } - const pathSegments = path17.split("?"); + const pathSegments = path18.split("?"); if (pathSegments.length !== 2) { - return path17; + return path18; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path17, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path17); + function matchKey(mockDispatch2, { path: path18, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path18); 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: path17 }) => matchValue(safeUrl(path17), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path18 }) => matchValue(safeUrl(path18), 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: path17, method, body, headers, query } = opts; + const { path: path18, method, body, headers, query } = opts; return { - path: path17, + path: path18, method, body, headers, @@ -11246,10 +11246,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path17, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path18, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path17, + Path: path18, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -16130,9 +16130,9 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path17) { - for (let i = 0; i < path17.length; ++i) { - const code = path17.charCodeAt(i); + function validateCookiePath(path18) { + for (let i = 0; i < path18.length; ++i) { + const code = path18.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 path17 = opts.path; + let path18 = opts.path; if (!opts.path.startsWith("/")) { - path17 = `/${path17}`; + path18 = `/${path18}`; } - url = new URL(util.parseOrigin(url).origin + path17); + url = new URL(util.parseOrigin(url).origin + path18); } 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 path17 = __importStar2(require("path")); + var path18 = __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, path17.sep); + return pth.replace(/[/\\]/g, path18.sep); } } }); @@ -20123,13 +20123,13 @@ var require_io_util = __commonJS({ exports2.isRooted = isRooted; exports2.tryGetExecutablePath = tryGetExecutablePath; exports2.getCmdPath = getCmdPath; - var fs16 = __importStar2(require("fs")); - var path17 = __importStar2(require("path")); - _a = fs16.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; + var fs17 = __importStar2(require("fs")); + var path18 = __importStar2(require("path")); + _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; function readlink(fsPath) { return __awaiter2(this, void 0, void 0, function* () { - const result = yield fs16.promises.readlink(fsPath); + const result = yield fs17.promises.readlink(fsPath); if (exports2.IS_WINDOWS && !result.endsWith("\\")) { return `${result}\\`; } @@ -20137,7 +20137,7 @@ var require_io_util = __commonJS({ }); } exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs16.constants.O_RDONLY; + exports2.READONLY = fs17.constants.O_RDONLY; function exists(fsPath) { return __awaiter2(this, void 0, void 0, function* () { try { @@ -20179,7 +20179,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path17.extname(filePath).toUpperCase(); + const upperExt = path18.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 = path17.dirname(filePath); - const upperName = path17.basename(filePath).toUpperCase(); + const directory = path18.dirname(filePath); + const upperName = path18.basename(filePath).toUpperCase(); for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path17.join(directory, actualName); + filePath = path18.join(directory, actualName); break; } } @@ -20319,7 +20319,7 @@ var require_io = __commonJS({ exports2.which = which7; exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path17 = __importStar2(require("path")); + var path18 = __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 ? path17.join(dest, path17.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path18.join(dest, path18.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 (path17.relative(source, newDest) === "") { + if (path18.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 = path17.join(dest, path17.basename(source)); + dest = path18.join(dest, path18.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -20363,7 +20363,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path17.dirname(dest)); + yield mkdirP(path18.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(path17.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path18.delimiter)) { if (extension) { extensions.push(extension); } @@ -20435,12 +20435,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path17.sep)) { + if (tool.includes(path18.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path17.delimiter)) { + for (const p of process.env.PATH.split(path18.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(path17.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path18.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -20578,7 +20578,7 @@ var require_toolrunner = __commonJS({ var os6 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path17 = __importStar2(require("path")); + var path18 = __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 = path17.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path18.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io7.which(this.toolPath, true); return new Promise((resolve9, 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 os6 = __importStar2(require("os")); - var path17 = __importStar2(require("path")); + var path18 = __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}${path17.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path18.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 path17 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path17} does not exist${os_1.EOL}`); + const path18 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path18} 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 path17 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path18 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path17 && path17[0] !== "/") { - path17 = `/${path17}`; + if (path18 && path18[0] !== "/") { + path18 = `/${path18}`; } - return new URL(`${origin}${path17}`); + return new URL(`${origin}${path18}`); } 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: path17, origin } + request: { method, path: path18, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path17); + debuglog("sending request to %s %s/%s", method, origin, path18); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path17, origin }, + request: { method, path: path18, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path17, + path18, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path17, origin } + request: { method, path: path18, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path17); + debuglog("trailers received from %s %s/%s", method, origin, path18); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path17, origin }, + request: { method, path: path18, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path17, + path18, error3.message ); }); @@ -22874,9 +22874,9 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path17, origin } + request: { method, path: path18, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path17); + debuglog("sending request to %s %s/%s", method, origin, path18); }); } 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: path17, + path: path18, method, body, headers, @@ -22954,11 +22954,11 @@ var require_request3 = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path17 !== "string") { + if (typeof path18 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path17[0] !== "/" && !(path17.startsWith("http://") || path17.startsWith("https://")) && method !== "CONNECT") { + } else if (path18[0] !== "/" && !(path18.startsWith("http://") || path18.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path17)) { + } else if (invalidPathRegex.test(path18)) { 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(path17, query) : path17; + this.path = query ? buildURL(path18, query) : path18; 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: path17, host, upgrade, blocking, reset } = request2; + const { method, path: path18, 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} ${path17} HTTP/1.1\r + let header = `${method} ${path18} 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: path17, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path18, 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] = path17; + headers[HTTP2_HEADER_PATH] = path18; 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 path17 = search ? `${pathname}${search}` : pathname; + const path18 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path17; + this.opts.path = path18; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -29782,10 +29782,10 @@ var require_proxy_agent2 = __commonJS({ }; const { origin, - path: path17 = "/", + path: path18 = "/", headers = {} } = opts; - opts.path = origin + path17; + opts.path = origin + path18; 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(path17) { - if (typeof path17 !== "string") { - return path17; + function safeUrl(path18) { + if (typeof path18 !== "string") { + return path18; } - const pathSegments = path17.split("?"); + const pathSegments = path18.split("?"); if (pathSegments.length !== 2) { - return path17; + return path18; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path17, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path17); + function matchKey(mockDispatch2, { path: path18, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path18); 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: path17 }) => matchValue(safeUrl(path17), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path18 }) => matchValue(safeUrl(path18), 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: path17, method, body, headers, query } = opts; + const { path: path18, method, body, headers, query } = opts; return { - path: path17, + path: path18, method, body, headers, @@ -32244,10 +32244,10 @@ var require_pending_interceptors_formatter2 = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path17, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path18, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path17, + Path: path18, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -37128,9 +37128,9 @@ var require_util14 = __commonJS({ } } } - function validateCookiePath(path17) { - for (let i = 0; i < path17.length; ++i) { - const code = path17.charCodeAt(i); + function validateCookiePath(path18) { + for (let i = 0; i < path18.length; ++i) { + const code = path18.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 path17 = opts.path; + let path18 = opts.path; if (!opts.path.startsWith("/")) { - path17 = `/${path17}`; + path18 = `/${path18}`; } - url = new URL(util.parseOrigin(url).origin + path17); + url = new URL(util.parseOrigin(url).origin + path18); } else { if (!opts) { opts = typeof url === "object" ? url : {}; @@ -47305,14 +47305,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, path17, name, argument) { - if (Array.isArray(path17)) { - this.path = path17; - this.property = path17.reduce(function(sum, item) { + var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path18, name, argument) { + if (Array.isArray(path18)) { + this.path = path18; + this.property = path18.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path17 !== void 0) { - this.property = path17; + } else if (path18 !== void 0) { + this.property = path18; } if (message) { this.message = message; @@ -47403,16 +47403,16 @@ var require_helpers = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path17, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path18, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path17)) { - this.path = path17; - this.propertyPath = path17.reduce(function(sum, item) { + if (Array.isArray(path18)) { + this.path = path18; + this.propertyPath = path18.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path17; + this.propertyPath = path18; } this.base = base; this.schemas = schemas; @@ -47421,10 +47421,10 @@ var require_helpers = __commonJS({ return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path17 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path18 = 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, path17, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema2, this.options, path18, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -48878,7 +48878,7 @@ var require_internal_path_helper = __commonJS({ exports2.hasRoot = hasRoot; exports2.normalizeSeparators = normalizeSeparators; exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname4(p) { @@ -48886,7 +48886,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path17.dirname(p); + let result = path18.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -48923,7 +48923,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 += path17.sep; + root += path18.sep; } return root + itemPath; } @@ -48957,10 +48957,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path17.sep)) { + if (!p.endsWith(path18.sep)) { return p; } - if (p === path17.sep) { + if (p === path18.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -49305,7 +49305,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path17 = (function() { + var path18 = (function() { try { return require("path"); } catch (e) { @@ -49313,7 +49313,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path17.sep; + minimatch.sep = path18.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand2 = require_brace_expansion(); var plTypes = { @@ -49402,8 +49402,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path17.sep !== "/") { - pattern = pattern.split(path17.sep).join("/"); + if (!options.allowWindowsEscape && path18.sep !== "/") { + pattern = pattern.split(path18.sep).join("/"); } this.options = options; this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200; @@ -49774,8 +49774,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path17.sep !== "/") { - f = f.split(path17.sep).join("/"); + if (path18.sep !== "/") { + f = f.split(path18.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -50018,7 +50018,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -50033,12 +50033,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(path17.sep); + this.segments = itemPath.split(path18.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path17.basename(remaining); + const basename = path18.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -50056,7 +50056,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(path17.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path18.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -50067,12 +50067,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path17.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path18.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path17.sep; + result += path18.sep; } result += this.segments[i]; } @@ -50130,7 +50130,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os6 = __importStar2(require("os")); - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); @@ -50159,7 +50159,7 @@ var require_internal_pattern = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir2); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path17.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path18.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -50183,8 +50183,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path17.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path17.sep}`; + if (!itemPath.endsWith(path18.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path18.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -50219,9 +50219,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(`.${path17.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path18.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path17.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path18.sep}`)) { homedir2 = homedir2 || os6.homedir(); (0, assert_1.default)(homedir2, "Unable to determine HOME directory"); (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`); @@ -50305,8 +50305,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path17, level) { - this.path = path17; + constructor(path18, level) { + this.path = path18; this.level = level; } }; @@ -50448,9 +50448,9 @@ var require_internal_globber = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core16 = __importStar2(require_core()); - var fs16 = __importStar2(require("fs")); + var fs17 = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); - var path17 = __importStar2(require("path")); + var path18 = __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(); @@ -50502,7 +50502,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core16.debug(`Search path '${searchPath}'`); try { - yield __await2(fs16.promises.lstat(searchPath)); + yield __await2(fs17.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -50526,7 +50526,7 @@ var require_internal_globber = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path17.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path18.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -50536,7 +50536,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await2(fs16.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path17.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs17.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path18.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); @@ -50571,7 +50571,7 @@ var require_internal_globber = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs16.promises.stat(item.path); + stats = yield fs17.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -50583,10 +50583,10 @@ var require_internal_globber = __commonJS({ throw err; } } else { - stats = yield fs16.promises.lstat(item.path); + stats = yield fs17.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs16.promises.realpath(item.path); + const realPath = yield fs17.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -50695,10 +50695,10 @@ var require_internal_hash_files = __commonJS({ exports2.hashFiles = hashFiles2; var crypto3 = __importStar2(require("crypto")); var core16 = __importStar2(require_core()); - var fs16 = __importStar2(require("fs")); + var fs17 = __importStar2(require("fs")); var stream2 = __importStar2(require("stream")); var util = __importStar2(require("util")); - var path17 = __importStar2(require("path")); + var path18 = __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; @@ -50714,17 +50714,17 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path17.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path18.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } - if (fs16.statSync(file).isDirectory()) { + if (fs17.statSync(file).isDirectory()) { writeDelegate(`Skip directory '${file}'.`); continue; } const hash = crypto3.createHash("sha256"); const pipeline = util.promisify(stream2.pipeline); - yield pipeline(fs16.createReadStream(file), hash); + yield pipeline(fs17.createReadStream(file), hash); result.write(hash.digest()); count++; if (!hasMatch) { @@ -52099,8 +52099,8 @@ var require_cacheUtils = __commonJS({ var glob2 = __importStar2(require_glob()); var io7 = __importStar2(require_io()); var crypto3 = __importStar2(require("crypto")); - var fs16 = __importStar2(require("fs")); - var path17 = __importStar2(require("path")); + var fs17 = __importStar2(require("fs")); + var path18 = __importStar2(require("path")); var semver10 = __importStar2(require_semver3()); var util = __importStar2(require("util")); var constants_1 = require_constants12(); @@ -52120,15 +52120,15 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path17.join(baseLocation, "actions", "temp"); + tempDirectory = path18.join(baseLocation, "actions", "temp"); } - const dest = path17.join(tempDirectory, crypto3.randomUUID()); + const dest = path18.join(tempDirectory, crypto3.randomUUID()); yield io7.mkdirP(dest); return dest; }); } function getArchiveFileSizeInBytes(filePath) { - return fs16.statSync(filePath).size; + return fs17.statSync(filePath).size; } function resolvePaths(patterns) { return __awaiter2(this, void 0, void 0, function* () { @@ -52144,7 +52144,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path17.relative(workspace, file).replace(new RegExp(`\\${path17.sep}`, "g"), "/"); + const relativeFile = path18.relative(workspace, file).replace(new RegExp(`\\${path18.sep}`, "g"), "/"); core16.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -52166,7 +52166,7 @@ var require_cacheUtils = __commonJS({ } function unlinkFile(filePath) { return __awaiter2(this, void 0, void 0, function* () { - return util.promisify(fs16.unlink)(filePath); + return util.promisify(fs17.unlink)(filePath); }); } function getVersion(app_1) { @@ -52208,7 +52208,7 @@ var require_cacheUtils = __commonJS({ } function getGnuTarPathOnWindows() { return __awaiter2(this, void 0, void 0, function* () { - if (fs16.existsSync(constants_1.GnuTarPathOnWindows)) { + if (fs17.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); @@ -52671,13 +52671,13 @@ function __disposeResources(env) { } return next(); } -function __rewriteRelativeImportExtension(path17, preserveJsx) { - if (typeof path17 === "string" && /^\.\.?\//.test(path17)) { - return path17.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { +function __rewriteRelativeImportExtension(path18, preserveJsx) { + if (typeof path18 === "string" && /^\.\.?\//.test(path18)) { + return path18.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 path17; + return path18; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -57091,8 +57091,8 @@ var require_getClient = __commonJS({ } const { allowInsecureConnection, httpClient } = clientOptions; const endpointUrl = clientOptions.endpoint ?? endpoint2; - const client = (path17, ...args) => { - const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path17, args, { allowInsecureConnection, ...requestOptions }); + const client = (path18, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path18, args, { allowInsecureConnection, ...requestOptions }); return { get: (requestOptions = {}) => { return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); @@ -60963,15 +60963,15 @@ var require_urlHelpers2 = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path17 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path17.startsWith("/")) { - path17 = path17.substring(1); + let path18 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path18.startsWith("/")) { + path18 = path18.substring(1); } - if (isAbsoluteUrl(path17)) { - requestUrl = path17; + if (isAbsoluteUrl(path18)) { + requestUrl = path18; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path17); + requestUrl = appendPath(requestUrl, path18); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -61017,9 +61017,9 @@ var require_urlHelpers2 = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path17 = pathToAppend.substring(0, searchStart); + const path18 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path17; + newPath = newPath + path18; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -63696,10 +63696,10 @@ var require_utils_common = __commonJS({ var constants_js_1 = require_constants15(); function escapeURLPath(url) { const urlParsed = new URL(url); - let path17 = urlParsed.pathname; - path17 = path17 || "/"; - path17 = escape(path17); - urlParsed.pathname = path17; + let path18 = urlParsed.pathname; + path18 = path18 || "/"; + path18 = escape(path18); + urlParsed.pathname = path18; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -63784,9 +63784,9 @@ var require_utils_common = __commonJS({ } function appendToURLPath(url, name) { const urlParsed = new URL(url); - let path17 = urlParsed.pathname; - path17 = path17 ? path17.endsWith("/") ? `${path17}${name}` : `${path17}/${name}` : name; - urlParsed.pathname = path17; + let path18 = urlParsed.pathname; + path18 = path18 ? path18.endsWith("/") ? `${path18}${name}` : `${path18}/${name}` : name; + urlParsed.pathname = path18; return urlParsed.toString(); } function setURLParameter(url, name, value) { @@ -65013,9 +65013,9 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path18 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path17}`; + canonicalizedResourceString += `/${this.factory.accountName}${path18}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -65754,10 +65754,10 @@ var require_utils_common2 = __commonJS({ var constants_js_1 = require_constants16(); function escapeURLPath(url) { const urlParsed = new URL(url); - let path17 = urlParsed.pathname; - path17 = path17 || "/"; - path17 = escape(path17); - urlParsed.pathname = path17; + let path18 = urlParsed.pathname; + path18 = path18 || "/"; + path18 = escape(path18); + urlParsed.pathname = path18; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -65842,9 +65842,9 @@ var require_utils_common2 = __commonJS({ } function appendToURLPath(url, name) { const urlParsed = new URL(url); - let path17 = urlParsed.pathname; - path17 = path17 ? path17.endsWith("/") ? `${path17}${name}` : `${path17}/${name}` : name; - urlParsed.pathname = path17; + let path18 = urlParsed.pathname; + path18 = path18 ? path18.endsWith("/") ? `${path18}${name}` : `${path18}/${name}` : name; + urlParsed.pathname = path18; return urlParsed.toString(); } function setURLParameter(url, name, value) { @@ -66765,9 +66765,9 @@ var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path18 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path17}`; + canonicalizedResourceString += `/${this.factory.accountName}${path18}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67397,9 +67397,9 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path18 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path17}`; + canonicalizedResourceString += `/${options.accountName}${path18}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67744,9 +67744,9 @@ var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path18 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path17}`; + canonicalizedResourceString += `/${options.accountName}${path18}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -89401,8 +89401,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 path17 = (0, utils_common_js_1.getURLPath)(subRequest.url); - if (!path17 || path17 === "") { + const path18 = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path18 || path18 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -89480,8 +89480,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 path17 = (0, utils_common_js_1.getURLPath)(url); - if (path17 && path17 !== "/") { + const path18 = (0, utils_common_js_1.getURLPath)(url); + if (path18 && path18 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -92768,7 +92768,7 @@ var require_downloadUtils = __commonJS({ var http_client_1 = require_lib(); var storage_blob_1 = require_commonjs15(); var buffer = __importStar2(require("buffer")); - var fs16 = __importStar2(require("fs")); + var fs17 = __importStar2(require("fs")); var stream2 = __importStar2(require("stream")); var util = __importStar2(require("util")); var utils = __importStar2(require_cacheUtils()); @@ -92879,7 +92879,7 @@ var require_downloadUtils = __commonJS({ exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { return __awaiter2(this, void 0, void 0, function* () { - const writeStream = fs16.createWriteStream(archivePath); + const writeStream = fs17.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter2(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); @@ -92904,7 +92904,7 @@ var require_downloadUtils = __commonJS({ function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { return __awaiter2(this, void 0, void 0, function* () { var _a; - const archiveDescriptor = yield fs16.promises.open(archivePath, "w"); + const archiveDescriptor = yield fs17.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true @@ -93020,7 +93020,7 @@ var require_downloadUtils = __commonJS({ } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); const downloadProgress = new DownloadProgress(contentLength); - const fd = fs16.openSync(archivePath, "w"); + const fd = fs17.openSync(archivePath, "w"); try { downloadProgress.startDisplayTimer(); const controller = new abort_controller_1.AbortController(); @@ -93038,12 +93038,12 @@ var require_downloadUtils = __commonJS({ controller.abort(); throw new Error("Aborting cache download as the download time exceeded the timeout."); } else if (Buffer.isBuffer(result)) { - fs16.writeFileSync(fd, result); + fs17.writeFileSync(fd, result); } } } finally { downloadProgress.stopDisplayTimer(); - fs16.closeSync(fd); + fs17.closeSync(fd); } } }); @@ -93365,7 +93365,7 @@ var require_cacheHttpClient = __commonJS({ var core16 = __importStar2(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); - var fs16 = __importStar2(require("fs")); + var fs17 = __importStar2(require("fs")); var url_1 = require("url"); var utils = __importStar2(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); @@ -93500,7 +93500,7 @@ Other caches with similar key:`); return __awaiter2(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); - const fd = fs16.openSync(archivePath, "r"); + const fd = fs17.openSync(archivePath, "r"); const uploadOptions = (0, options_1.getUploadOptions)(options); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); @@ -93514,7 +93514,7 @@ Other caches with similar key:`); const start = offset; const end = offset + chunkSize - 1; offset += maxChunkSize; - yield uploadChunk(httpClient, resourceUrl, () => fs16.createReadStream(archivePath, { + yield uploadChunk(httpClient, resourceUrl, () => fs17.createReadStream(archivePath, { fd, start, end, @@ -93525,7 +93525,7 @@ Other caches with similar key:`); } }))); } finally { - fs16.closeSync(fd); + fs17.closeSync(fd); } return; }); @@ -98790,7 +98790,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io7 = __importStar2(require_io()); var fs_1 = require("fs"); - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants12(); var IS_WINDOWS = process.platform === "win32"; @@ -98836,13 +98836,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(`\\${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); + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path17.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path18.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -98888,7 +98888,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path17.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path18.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -98897,7 +98897,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path17.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path18.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -98912,7 +98912,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -98921,7 +98921,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -98959,7 +98959,7 @@ var require_tar = __commonJS({ } function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path17.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path18.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -99041,7 +99041,7 @@ var require_cache5 = __commonJS({ exports2.restoreCache = restoreCache5; exports2.saveCache = saveCache5; var core16 = __importStar2(require_core()); - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); @@ -99136,7 +99136,7 @@ var require_cache5 = __commonJS({ core16.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path17.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path18.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core16.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core16.isDebug()) { @@ -99205,7 +99205,7 @@ var require_cache5 = __commonJS({ core16.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path17.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path18.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core16.debug(`Archive path: ${archivePath}`); core16.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -99267,7 +99267,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 = path17.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path18.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core16.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99331,7 +99331,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 = path17.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path18.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core16.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99481,7 +99481,7 @@ var require_manifest = __commonJS({ var core_1 = require_core(); var os6 = require("os"); var cp = require("child_process"); - var fs16 = require("fs"); + var fs17 = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter2(this, void 0, void 0, function* () { const platFilter = os6.platform(); @@ -99543,10 +99543,10 @@ var require_manifest = __commonJS({ const lsbReleaseFile = "/etc/lsb-release"; const osReleaseFile = "/etc/os-release"; let contents = ""; - if (fs16.existsSync(lsbReleaseFile)) { - contents = fs16.readFileSync(lsbReleaseFile).toString(); - } else if (fs16.existsSync(osReleaseFile)) { - contents = fs16.readFileSync(osReleaseFile).toString(); + if (fs17.existsSync(lsbReleaseFile)) { + contents = fs17.readFileSync(lsbReleaseFile).toString(); + } else if (fs17.existsSync(osReleaseFile)) { + contents = fs17.readFileSync(osReleaseFile).toString(); } return contents; } @@ -99755,10 +99755,10 @@ var require_tool_cache = __commonJS({ var core16 = __importStar2(require_core()); var io7 = __importStar2(require_io()); var crypto3 = __importStar2(require("crypto")); - var fs16 = __importStar2(require("fs")); + var fs17 = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os6 = __importStar2(require("os")); - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver10 = __importStar2(require_semver2()); var stream2 = __importStar2(require("stream")); @@ -99779,8 +99779,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 || path17.join(_getTempDirectory(), crypto3.randomUUID()); - yield io7.mkdirP(path17.dirname(dest)); + dest = dest || path18.join(_getTempDirectory(), crypto3.randomUUID()); + yield io7.mkdirP(path18.dirname(dest)); core16.debug(`Downloading ${url}`); core16.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -99801,7 +99801,7 @@ var require_tool_cache = __commonJS({ } function downloadToolAttempt(url, dest, auth2, headers) { return __awaiter2(this, void 0, void 0, function* () { - if (fs16.existsSync(dest)) { + if (fs17.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } const http = new httpm.HttpClient(userAgent2, [], { @@ -99825,7 +99825,7 @@ var require_tool_cache = __commonJS({ const readStream = responseMessageFactory(); let succeeded = false; try { - yield pipeline(readStream, fs16.createWriteStream(dest)); + yield pipeline(readStream, fs17.createWriteStream(dest)); core16.debug("download complete"); succeeded = true; return dest; @@ -99870,7 +99870,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path17.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path18.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}'`; @@ -100037,12 +100037,12 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os6.arch(); core16.debug(`Caching tool ${tool} ${version} ${arch2}`); core16.debug(`source dir: ${sourceDir}`); - if (!fs16.statSync(sourceDir).isDirectory()) { + if (!fs17.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } const destPath = yield _createToolPath(tool, version, arch2); - for (const itemName of fs16.readdirSync(sourceDir)) { - const s = path17.join(sourceDir, itemName); + for (const itemName of fs17.readdirSync(sourceDir)) { + const s = path18.join(sourceDir, itemName); yield io7.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -100055,11 +100055,11 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os6.arch(); core16.debug(`Caching tool ${tool} ${version} ${arch2}`); core16.debug(`source file: ${sourceFile}`); - if (!fs16.statSync(sourceFile).isFile()) { + if (!fs17.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path17.join(destFolder, targetFile); + const destPath = path18.join(destFolder, targetFile); core16.debug(`destination file ${destPath}`); yield io7.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -100082,9 +100082,9 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver10.clean(versionSpec) || ""; - const cachePath = path17.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path18.join(_getCacheDirectory(), toolName, versionSpec, arch2); core16.debug(`checking cache: ${cachePath}`); - if (fs16.existsSync(cachePath) && fs16.existsSync(`${cachePath}.complete`)) { + if (fs17.existsSync(cachePath) && fs17.existsSync(`${cachePath}.complete`)) { core16.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { @@ -100096,13 +100096,13 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os6.arch(); - const toolPath = path17.join(_getCacheDirectory(), toolName); - if (fs16.existsSync(toolPath)) { - const children = fs16.readdirSync(toolPath); + const toolPath = path18.join(_getCacheDirectory(), toolName); + if (fs17.existsSync(toolPath)) { + const children = fs17.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path17.join(toolPath, child, arch2 || ""); - if (fs16.existsSync(fullPath) && fs16.existsSync(`${fullPath}.complete`)) { + const fullPath = path18.join(toolPath, child, arch2 || ""); + if (fs17.existsSync(fullPath) && fs17.existsSync(`${fullPath}.complete`)) { versions.push(child); } } @@ -100153,7 +100153,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path17.join(_getTempDirectory(), crypto3.randomUUID()); + dest = path18.join(_getTempDirectory(), crypto3.randomUUID()); } yield io7.mkdirP(dest); return dest; @@ -100161,7 +100161,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter2(this, void 0, void 0, function* () { - const folderPath = path17.join(_getCacheDirectory(), tool, semver10.clean(version) || version, arch2 || ""); + const folderPath = path18.join(_getCacheDirectory(), tool, semver10.clean(version) || version, arch2 || ""); core16.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io7.rmRF(folderPath); @@ -100171,9 +100171,9 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path17.join(_getCacheDirectory(), tool, semver10.clean(version) || version, arch2 || ""); + const folderPath = path18.join(_getCacheDirectory(), tool, semver10.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; - fs16.writeFileSync(markerPath, ""); + fs17.writeFileSync(markerPath, ""); core16.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { @@ -100691,8 +100691,8 @@ var require_follow_redirects = __commonJS({ } return parsed; } - function resolveUrl(relative2, base) { - return useNativeURL ? new URL2(relative2, base) : parseUrl2(url.resolve(base, relative2)); + function resolveUrl(relative3, base) { + return useNativeURL ? new URL2(relative3, base) : parseUrl2(url.resolve(base, relative3)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -100784,8 +100784,8 @@ __export(init_action_exports, { CODEQL_VERSION_JAR_MINIMIZATION: () => CODEQL_VERSION_JAR_MINIMIZATION }); module.exports = __toCommonJS(init_action_exports); -var fs15 = __toESM(require("fs")); -var path16 = __toESM(require("path")); +var fs16 = __toESM(require("fs")); +var path17 = __toESM(require("path")); var core15 = __toESM(require_core()); var github3 = __toESM(require_github()); var io6 = __toESM(require_io()); @@ -100869,21 +100869,21 @@ async function getFolderSize(itemPath, options) { getFolderSize.loose = async (itemPath, options) => await core(itemPath, options); getFolderSize.strict = async (itemPath, options) => await core(itemPath, options, { strict: true }); async function core(rootItemPath, options = {}, returnType = {}) { - const fs16 = options.fs || await import("node:fs/promises"); + const fs17 = options.fs || await import("node:fs/promises"); let folderSize = 0n; const foundInos = /* @__PURE__ */ new Set(); const errors = []; await processItem(rootItemPath); async function processItem(itemPath) { if (options.ignore?.test(itemPath)) return; - const stats = returnType.strict ? await fs16.lstat(itemPath, { bigint: true }) : await fs16.lstat(itemPath, { bigint: true }).catch((error3) => errors.push(error3)); + const stats = returnType.strict ? await fs17.lstat(itemPath, { bigint: true }) : await fs17.lstat(itemPath, { bigint: true }).catch((error3) => errors.push(error3)); if (typeof stats !== "object") return; if (!foundInos.has(stats.ino)) { foundInos.add(stats.ino); folderSize += stats.size; } if (stats.isDirectory()) { - const directoryItems = returnType.strict ? await fs16.readdir(itemPath) : await fs16.readdir(itemPath).catch((error3) => errors.push(error3)); + const directoryItems = returnType.strict ? await fs17.readdir(itemPath) : await fs17.readdir(itemPath).catch((error3) => errors.push(error3)); if (typeof directoryItems !== "object") return; await Promise.all( directoryItems.map( @@ -104641,8 +104641,8 @@ function getDependencyCachingEnabled() { } // src/config-utils.ts -var fs7 = __toESM(require("fs")); -var path9 = __toESM(require("path")); +var fs8 = __toESM(require("fs")); +var path10 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core9 = __toESM(require_core()); @@ -105176,6 +105176,10 @@ function makeTelemetryDiagnostic(id, name, attributes) { }); } +// src/diff-informed-analysis-utils.ts +var fs5 = __toESM(require("fs")); +var path7 = __toESM(require("path")); + // src/feature-flags.ts var fs4 = __toESM(require("fs")); var path6 = __toESM(require("path")); @@ -105316,8 +105320,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path17 = decodeGitFilePath(match[2]); - fileOidMap[path17] = oid; + const path18 = decodeGitFilePath(match[2]); + fileOidMap[path18] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -105451,10 +105455,12 @@ async function readBaseDatabaseOidsFile(config, logger) { async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); const overlayFileOids = await getFileOidsUnderPath(sourceRoot); - const changedFiles = computeChangedFiles(baseFileOids, overlayFileOids); + const oidChangedFiles = computeChangedFiles(baseFileOids, overlayFileOids); logger.info( - `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` + `Found ${oidChangedFiles.length} changed file(s) under ${sourceRoot} from OID comparison.` ); + const diffRangeFiles = await getDiffRangeFilePaths(sourceRoot, logger); + const changedFiles = [.../* @__PURE__ */ new Set([...oidChangedFiles, ...diffRangeFiles])]; const changedFilesJson = JSON.stringify({ changes: changedFiles }); const overlayChangesFile = path5.join( getTemporaryDirectory(), @@ -105480,6 +105486,48 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } return changes; } +async function getDiffRangeFilePaths(sourceRoot, logger) { + const jsonFilePath = path5.join(getTemporaryDirectory(), "pr-diff-range.json"); + if (!fs3.existsSync(jsonFilePath)) { + return []; + } + let diffRanges; + try { + diffRanges = JSON.parse(fs3.readFileSync(jsonFilePath, "utf8")); + } catch (e) { + logger.warning( + `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` + ); + return []; + } + logger.debug( + `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.` + ); + const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; + const repoRoot = await getGitRoot(sourceRoot); + if (repoRoot === void 0) { + logger.warning( + "Cannot determine git root; returning diff range paths as-is." + ); + return repoRelativePaths; + } + const sourceRootRelPrefix = path5.relative(repoRoot, sourceRoot).replaceAll(path5.sep, "/"); + if (sourceRootRelPrefix === "") { + return repoRelativePaths; + } + const prefixWithSlash = `${sourceRootRelPrefix}/`; + const result = []; + for (const p of repoRelativePaths) { + if (p.startsWith(prefixWithSlash)) { + result.push(p.slice(prefixWithSlash.length)); + } else { + logger.debug( + `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").` + ); + } + } + return result; +} var CACHE_VERSION = 1; var CACHE_PREFIX = "codeql-overlay-base-database"; var MAX_CACHE_OPERATION_MS = 6e5; @@ -106196,6 +106244,128 @@ async function getDiffInformedAnalysisBranches(codeql, features, logger) { } return branches; } +function getDiffRangesJsonFilePath() { + return path7.join(getTemporaryDirectory(), "pr-diff-range.json"); +} +function writeDiffRangesJsonFile(logger, ranges) { + const jsonContents = JSON.stringify(ranges, null, 2); + const jsonFilePath = getDiffRangesJsonFilePath(); + fs5.writeFileSync(jsonFilePath, jsonContents); + logger.debug( + `Wrote pr-diff-range JSON file to ${jsonFilePath}: +${jsonContents}` + ); +} +async function getPullRequestEditedDiffRanges(branches, logger) { + const fileDiffs = await getFileDiffsWithBasehead(branches, logger); + if (fileDiffs === void 0) { + return void 0; + } + if (fileDiffs.length >= 300) { + logger.warning( + `Cannot retrieve the full diff because there are too many (${fileDiffs.length}) changed files in the pull request.` + ); + return void 0; + } + const results = []; + for (const filediff of fileDiffs) { + const diffRanges = getDiffRanges(filediff, logger); + if (diffRanges === void 0) { + return void 0; + } + results.push(...diffRanges); + } + return results; +} +async function getFileDiffsWithBasehead(branches, logger) { + const repositoryNwo = getRepositoryNwoFromEnv( + "CODE_SCANNING_REPOSITORY", + "GITHUB_REPOSITORY" + ); + const basehead = `${branches.base}...${branches.head}`; + try { + const response = await getApiClient().rest.repos.compareCommitsWithBasehead( + { + owner: repositoryNwo.owner, + repo: repositoryNwo.repo, + basehead, + per_page: 1 + } + ); + logger.debug( + `Response from compareCommitsWithBasehead(${basehead}): +${JSON.stringify(response, null, 2)}` + ); + return response.data.files; + } catch (error3) { + if (error3.status) { + logger.warning(`Error retrieving diff ${basehead}: ${error3.message}`); + logger.debug( + `Error running compareCommitsWithBasehead(${basehead}): +Request: ${JSON.stringify(error3.request, null, 2)} +Error Response: ${JSON.stringify(error3.response, null, 2)}` + ); + return void 0; + } else { + throw error3; + } + } +} +function getDiffRanges(fileDiff, logger) { + if (fileDiff.patch === void 0) { + if (fileDiff.changes === 0) { + return []; + } + return [ + { + path: fileDiff.filename, + startLine: 0, + endLine: 0 + } + ]; + } + let currentLine = 0; + let additionRangeStartLine = void 0; + const diffRanges = []; + const diffLines = fileDiff.patch.split("\n"); + diffLines.push(" "); + for (const diffLine of diffLines) { + if (diffLine.startsWith("-")) { + continue; + } + if (diffLine.startsWith("+")) { + if (additionRangeStartLine === void 0) { + additionRangeStartLine = currentLine; + } + currentLine++; + continue; + } + if (additionRangeStartLine !== void 0) { + diffRanges.push({ + path: fileDiff.filename, + startLine: additionRangeStartLine, + endLine: currentLine - 1 + }); + additionRangeStartLine = void 0; + } + if (diffLine.startsWith("@@ ")) { + const match = diffLine.match(/^@@ -\d+(?:,\d+)? \+(\d+)(?:,\d+)? @@/); + if (match === null) { + logger.warning( + `Cannot parse diff hunk header for ${fileDiff.filename}: ${diffLine}` + ); + return void 0; + } + currentLine = parseInt(match[1], 10); + continue; + } + if (diffLine.startsWith(" ")) { + currentLine++; + continue; + } + } + return diffRanges; +} // src/languages.ts var KnownLanguage = /* @__PURE__ */ ((KnownLanguage2) => { @@ -106271,13 +106441,13 @@ Improved incremental analysis will be automatically retried when the next versio } // src/overlay/status.ts -var fs5 = __toESM(require("fs")); -var path7 = __toESM(require("path")); +var fs6 = __toESM(require("fs")); +var path8 = __toESM(require("path")); var actionsCache2 = __toESM(require_cache5()); var MAX_CACHE_OPERATION_MS2 = 3e4; var STATUS_FILE_NAME = "overlay-status.json"; function getStatusFilePath(languages) { - return path7.join( + return path8.join( getTemporaryDirectory(), "overlay-status", [...languages].sort().join("+"), @@ -106304,7 +106474,7 @@ async function getOverlayStatus(codeql, languages, diskUsage, logger) { const cacheKey3 = await getCacheKey(codeql, languages, diskUsage); const statusFile = getStatusFilePath(languages); try { - await fs5.promises.mkdir(path7.dirname(statusFile), { recursive: true }); + await fs6.promises.mkdir(path8.dirname(statusFile), { recursive: true }); const foundKey = await waitForResultWithTimeLimit( MAX_CACHE_OPERATION_MS2, actionsCache2.restoreCache([statusFile], cacheKey3), @@ -106316,13 +106486,13 @@ async function getOverlayStatus(codeql, languages, diskUsage, logger) { logger.debug("No overlay status found in Actions cache."); return void 0; } - if (!fs5.existsSync(statusFile)) { + if (!fs6.existsSync(statusFile)) { logger.debug( "Overlay status cache entry found but status file is missing." ); return void 0; } - const contents = await fs5.promises.readFile(statusFile, "utf-8"); + const contents = await fs6.promises.readFile(statusFile, "utf-8"); const parsed = JSON.parse(contents); if (!isObject2(parsed) || typeof parsed["attemptedToBuildOverlayBaseDatabase"] !== "boolean" || typeof parsed["builtOverlayBaseDatabase"] !== "boolean") { logger.debug( @@ -106344,8 +106514,8 @@ async function getCacheKey(codeql, languages, diskUsage) { } // src/trap-caching.ts -var fs6 = __toESM(require("fs")); -var path8 = __toESM(require("path")); +var fs7 = __toESM(require("fs")); +var path9 = __toESM(require("path")); var actionsCache3 = __toESM(require_cache5()); var CACHE_VERSION2 = 1; var CODEQL_TRAP_CACHE_PREFIX = "codeql-trap"; @@ -106361,13 +106531,13 @@ async function downloadTrapCaches(codeql, languages, logger) { `Found ${languagesSupportingCaching.length} languages that support TRAP caching` ); if (languagesSupportingCaching.length === 0) return result; - const cachesDir = path8.join( + const cachesDir = path9.join( getTemporaryDirectory(), "trapCaches" ); for (const language of languagesSupportingCaching) { - const cacheDir = path8.join(cachesDir, language); - fs6.mkdirSync(cacheDir, { recursive: true }); + const cacheDir = path9.join(cachesDir, language); + fs7.mkdirSync(cacheDir, { recursive: true }); result[language] = cacheDir; } if (await isAnalyzingDefaultBranch()) { @@ -106379,7 +106549,7 @@ async function downloadTrapCaches(codeql, languages, logger) { let baseSha = "unknown"; const eventPath = process.env.GITHUB_EVENT_PATH; if (getWorkflowEventName() === "pull_request" && eventPath !== void 0) { - const event = JSON.parse(fs6.readFileSync(path8.resolve(eventPath), "utf-8")); + const event = JSON.parse(fs7.readFileSync(path9.resolve(eventPath), "utf-8")); baseSha = event.pull_request?.base?.sha || baseSha; } for (const language of languages) { @@ -106486,9 +106656,9 @@ async function getSupportedLanguageMap(codeql, logger) { } var baseWorkflowsPath = ".github/workflows"; function hasActionsWorkflows(sourceRoot) { - const workflowsPath = path9.resolve(sourceRoot, baseWorkflowsPath); - const stats = fs7.lstatSync(workflowsPath, { throwIfNoEntry: false }); - return stats !== void 0 && stats.isDirectory() && fs7.readdirSync(workflowsPath).length > 0; + const workflowsPath = path10.resolve(sourceRoot, baseWorkflowsPath); + const stats = fs8.lstatSync(workflowsPath, { throwIfNoEntry: false }); + return stats !== void 0 && stats.isDirectory() && fs8.readdirSync(workflowsPath).length > 0; } async function getRawLanguagesInRepo(repository, sourceRoot, logger) { logger.debug( @@ -106644,8 +106814,8 @@ async function downloadCacheWithTime(codeQL, languages, logger) { async function loadUserConfig(logger, configFile, workspacePath, apiDetails, tempDir, validateConfig) { if (isLocal(configFile)) { if (configFile !== userConfigFromActionPath(tempDir)) { - configFile = path9.resolve(workspacePath, configFile); - if (!(configFile + path9.sep).startsWith(workspacePath + path9.sep)) { + configFile = path10.resolve(workspacePath, configFile); + if (!(configFile + path10.sep).startsWith(workspacePath + path10.sep)) { throw new ConfigurationError( getConfigFileOutsideWorkspaceErrorMessage(configFile) ); @@ -106911,10 +107081,10 @@ async function setCppTrapCachingEnvironmentVariables(config, logger) { } } function dbLocationOrDefault(dbLocation, tempDir) { - return dbLocation || path9.resolve(tempDir, "codeql_databases"); + return dbLocation || path10.resolve(tempDir, "codeql_databases"); } function userConfigFromActionPath(tempDir) { - return path9.resolve(tempDir, "user-config-from-action.yml"); + return path10.resolve(tempDir, "user-config-from-action.yml"); } function hasQueryCustomisation(userConfig) { return isDefined2(userConfig["disable-default-queries"]) || isDefined2(userConfig.queries) || isDefined2(userConfig["query-filters"]); @@ -106928,7 +107098,7 @@ async function initConfig(features, inputs) { ); } inputs.configFile = userConfigFromActionPath(tempDir); - fs7.writeFileSync(inputs.configFile, inputs.configInput); + fs8.writeFileSync(inputs.configFile, inputs.configInput); logger.debug(`Using config from action input: ${inputs.configFile}`); } let userConfig = {}; @@ -107071,7 +107241,7 @@ function isLocal(configPath) { return configPath.indexOf("@") === -1; } function getLocalConfig(logger, configFile, validateConfig) { - if (!fs7.existsSync(configFile)) { + if (!fs8.existsSync(configFile)) { throw new ConfigurationError( getConfigFileDoesNotExistErrorMessage(configFile) ); @@ -107079,7 +107249,7 @@ function getLocalConfig(logger, configFile, validateConfig) { return parseUserConfig( logger, configFile, - fs7.readFileSync(configFile, "utf-8"), + fs8.readFileSync(configFile, "utf-8"), validateConfig ); } @@ -107119,13 +107289,13 @@ async function getRemoteConfig(logger, configFile, apiDetails, validateConfig) { ); } function getPathToParsedConfigFile(tempDir) { - return path9.join(tempDir, "config"); + return path10.join(tempDir, "config"); } async function saveConfig(config, logger) { const configString = JSON.stringify(config); const configFile = getPathToParsedConfigFile(config.tempDir); - fs7.mkdirSync(path9.dirname(configFile), { recursive: true }); - fs7.writeFileSync(configFile, configString, "utf8"); + fs8.mkdirSync(path10.dirname(configFile), { recursive: true }); + fs8.writeFileSync(configFile, configString, "utf8"); logger.debug("Saved config:"); logger.debug(configString); } @@ -107135,9 +107305,9 @@ async function generateRegistries(registriesInput, tempDir, logger) { let qlconfigFile; if (registries) { const qlconfig = createRegistriesBlock(registries); - qlconfigFile = path9.join(tempDir, "qlconfig.yml"); + qlconfigFile = path10.join(tempDir, "qlconfig.yml"); const qlconfigContents = dump(qlconfig); - fs7.writeFileSync(qlconfigFile, qlconfigContents, "utf8"); + fs8.writeFileSync(qlconfigFile, qlconfigContents, "utf8"); logger.debug("Generated qlconfig.yml:"); logger.debug(qlconfigContents); registriesAuthTokens = registries.map((registry) => `${registry.url}=${registry.token}`).join(","); @@ -107455,16 +107625,16 @@ var internal = { }; // src/init.ts -var fs13 = __toESM(require("fs")); -var path14 = __toESM(require("path")); +var fs14 = __toESM(require("fs")); +var path15 = __toESM(require("path")); var core12 = __toESM(require_core()); var toolrunner4 = __toESM(require_toolrunner()); var github2 = __toESM(require_github()); var io5 = __toESM(require_io()); // src/codeql.ts -var fs12 = __toESM(require("fs")); -var path13 = __toESM(require("path")); +var fs13 = __toESM(require("fs")); +var path14 = __toESM(require("path")); var core11 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -107711,15 +107881,15 @@ function wrapCliConfigurationError(cliError) { } // src/setup-codeql.ts -var fs10 = __toESM(require("fs")); -var path11 = __toESM(require("path")); +var fs11 = __toESM(require("fs")); +var path12 = __toESM(require("path")); var toolcache3 = __toESM(require_tool_cache()); var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var semver8 = __toESM(require_semver2()); // src/tar.ts var import_child_process = require("child_process"); -var fs8 = __toESM(require("fs")); +var fs9 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); var io4 = __toESM(require_io()); @@ -107792,7 +107962,7 @@ async function isZstdAvailable(logger) { } } async function extract(tarPath, dest, compressionMethod, tarVersion, logger) { - fs8.mkdirSync(dest, { recursive: true }); + fs9.mkdirSync(dest, { recursive: true }); switch (compressionMethod) { case "gzip": return await toolcache.extractTar(tarPath, dest); @@ -107876,9 +108046,9 @@ function inferCompressionMethod(tarPath) { } // src/tools-download.ts -var fs9 = __toESM(require("fs")); +var fs10 = __toESM(require("fs")); var os4 = __toESM(require("os")); -var path10 = __toESM(require("path")); +var path11 = __toESM(require("path")); var import_perf_hooks2 = require("perf_hooks"); var core10 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -107983,7 +108153,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorization, headers, tarVersion, logger) { - fs9.mkdirSync(dest, { recursive: true }); + fs10.mkdirSync(dest, { recursive: true }); const agent = new import_http_client.HttpClient().getAgent(codeqlURL); headers = Object.assign( { "User-Agent": "CodeQL Action" }, @@ -108011,7 +108181,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path10.join( + return path11.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver7.clean(version) || version, @@ -108020,7 +108190,7 @@ function getToolcacheDirectory(version) { } function writeToolcacheMarkerFile(extractedPath, logger) { const markerFilePath = `${extractedPath}.complete`; - fs9.writeFileSync(markerFilePath, ""); + fs10.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } function sanitizeUrlForStatusReport(url) { @@ -108155,7 +108325,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs10.existsSync(path11.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs11.existsSync(path12.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -108554,7 +108724,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path11.join(tempDir, v4_default()); + return path12.join(tempDir, v4_default()); } async function getNightlyToolsUrl(logger) { const zstdAvailability = await isZstdAvailable(logger); @@ -108602,8 +108772,8 @@ function isReservedToolsValue(tools) { } // src/tracer-config.ts -var fs11 = __toESM(require("fs")); -var path12 = __toESM(require("path")); +var fs12 = __toESM(require("fs")); +var path13 = __toESM(require("path")); async function shouldEnableIndirectTracing(codeql, config) { if (config.buildMode === "none" /* None */) { return false; @@ -108615,8 +108785,8 @@ async function shouldEnableIndirectTracing(codeql, config) { } async function getTracerConfigForCluster(config) { const tracingEnvVariables = JSON.parse( - fs11.readFileSync( - path12.resolve( + fs12.readFileSync( + path13.resolve( config.dbLocation, "temp/tracingEnvironment/start-tracing.json" ), @@ -108663,7 +108833,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path13.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path14.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -108719,12 +108889,12 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path13.join( + const tracingConfigPath = path14.join( extractorPath, "tools", "tracing-config.lua" ); - return fs12.existsSync(tracingConfigPath); + return fs13.existsSync(tracingConfigPath); }, async isScannedLanguage(language) { return !await this.isTracedLanguage(language); @@ -108801,7 +108971,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path13.join( + const autobuildCmd = path14.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -109200,7 +109370,7 @@ async function writeCodeScanningConfigFile(config, logger) { logger.startGroup("Augmented user configuration file contents"); logger.info(dump(augmentedConfig)); logger.endGroup(); - fs12.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); + fs13.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); return codeScanningConfigFile; } var TRAP_CACHE_SIZE_MB = 1024; @@ -109223,7 +109393,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path13.resolve(config.tempDir, "user-config.yaml"); + return path14.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -109278,7 +109448,7 @@ async function initConfig2(features, inputs) { }); } async function runDatabaseInitCluster(databaseInitEnvironment, codeql, config, sourceRoot, processName, qlconfigFile, logger) { - fs13.mkdirSync(config.dbLocation, { recursive: true }); + fs14.mkdirSync(config.dbLocation, { recursive: true }); await wrapEnvironment( databaseInitEnvironment, async () => await codeql.databaseInitCluster( @@ -109313,25 +109483,25 @@ async function checkPacksForOverlayCompatibility(codeql, config, logger) { } function checkPackForOverlayCompatibility(packDir, codeQlOverlayVersion, logger) { try { - let qlpackPath = path14.join(packDir, "qlpack.yml"); - if (!fs13.existsSync(qlpackPath)) { - qlpackPath = path14.join(packDir, "codeql-pack.yml"); + let qlpackPath = path15.join(packDir, "qlpack.yml"); + if (!fs14.existsSync(qlpackPath)) { + qlpackPath = path15.join(packDir, "codeql-pack.yml"); } const qlpackContents = load( - fs13.readFileSync(qlpackPath, "utf8") + fs14.readFileSync(qlpackPath, "utf8") ); if (!qlpackContents.buildMetadata) { return true; } - const packInfoPath = path14.join(packDir, ".packinfo"); - if (!fs13.existsSync(packInfoPath)) { + const packInfoPath = path15.join(packDir, ".packinfo"); + if (!fs14.existsSync(packInfoPath)) { logger.warning( `The query pack at ${packDir} does not have a .packinfo file, so it cannot support overlay analysis. Recompiling the query pack with the latest CodeQL CLI should solve this problem.` ); return false; } const packInfoFileContents = JSON.parse( - fs13.readFileSync(packInfoPath, "utf8") + fs14.readFileSync(packInfoPath, "utf8") ); const packOverlayVersion = packInfoFileContents.overlayVersion; if (typeof packOverlayVersion !== "number") { @@ -109356,7 +109526,7 @@ function checkPackForOverlayCompatibility(packDir, codeQlOverlayVersion, logger) } async function checkInstallPython311(languages, codeql) { if (languages.includes("python" /* python */) && process.platform === "win32" && !(await codeql.getVersion()).features?.supportsPython312) { - const script = path14.resolve( + const script = path15.resolve( __dirname, "../python-setup", "check_python12.ps1" @@ -109366,8 +109536,8 @@ async function checkInstallPython311(languages, codeql) { ]).exec(); } } -function cleanupDatabaseClusterDirectory(config, logger, options = {}, rmSync2 = fs13.rmSync) { - if (fs13.existsSync(config.dbLocation) && (fs13.statSync(config.dbLocation).isFile() || fs13.readdirSync(config.dbLocation).length > 0)) { +function cleanupDatabaseClusterDirectory(config, logger, options = {}, rmSync2 = fs14.rmSync) { + if (fs14.existsSync(config.dbLocation) && (fs14.statSync(config.dbLocation).isFile() || fs14.readdirSync(config.dbLocation).length > 0)) { if (!options.disableExistingDirectoryWarning) { logger.warning( `The database cluster directory ${config.dbLocation} must be empty. Attempting to clean it up.` @@ -109725,8 +109895,8 @@ async function sendUnhandledErrorStatusReport(actionName, actionStartedAt, error } // src/workflow.ts -var fs14 = __toESM(require("fs")); -var path15 = __toESM(require("path")); +var fs15 = __toESM(require("fs")); +var path16 = __toESM(require("path")); var import_zlib = __toESM(require("zlib")); var core14 = __toESM(require_core()); function toCodedErrors(errors) { @@ -109877,15 +110047,15 @@ async function getWorkflow(logger) { ); } const workflowPath = await getWorkflowAbsolutePath(logger); - return load(fs14.readFileSync(workflowPath, "utf-8")); + return load(fs15.readFileSync(workflowPath, "utf-8")); } async function getWorkflowAbsolutePath(logger) { const relativePath = await getWorkflowRelativePath(); - const absolutePath = path15.join( + const absolutePath = path16.join( getRequiredEnvParam("GITHUB_WORKSPACE"), relativePath ); - if (fs14.existsSync(absolutePath)) { + if (fs15.existsSync(absolutePath)) { logger.debug( `Derived the following absolute path for the currently executing workflow: ${absolutePath}.` ); @@ -110020,7 +110190,7 @@ async function run(startedAt) { core15.exportVariable("JOB_RUN_UUID" /* JOB_RUN_UUID */, jobRunUuid); core15.exportVariable("CODEQL_ACTION_INIT_HAS_RUN" /* INIT_ACTION_HAS_RUN */, "true"); configFile = getOptionalInput("config-file"); - sourceRoot = path16.resolve( + sourceRoot = path17.resolve( getRequiredEnvParam("GITHUB_WORKSPACE"), getOptionalInput("source-root") || "" ); @@ -110140,6 +110310,7 @@ async function run(startedAt) { logFileCoverageOnPrsDeprecationWarning(logger); } await checkInstallPython311(config.languages, codeql); + await computeAndPersistDiffRanges(codeql, features, logger); } catch (unwrappedError) { const error3 = wrapError(unwrappedError); core15.setFailed(error3.message); @@ -110211,21 +110382,21 @@ async function run(startedAt) { )) { try { logger.debug(`Applying static binary workaround for Go`); - const tempBinPath = path16.resolve( + const tempBinPath = path17.resolve( getTemporaryDirectory(), "codeql-action-go-tracing", "bin" ); - fs15.mkdirSync(tempBinPath, { recursive: true }); + fs16.mkdirSync(tempBinPath, { recursive: true }); core15.addPath(tempBinPath); - const goWrapperPath = path16.resolve(tempBinPath, "go"); - fs15.writeFileSync( + const goWrapperPath = path17.resolve(tempBinPath, "go"); + fs16.writeFileSync( goWrapperPath, `#!/bin/bash exec ${goBinaryPath} "$@"` ); - fs15.chmodSync(goWrapperPath, "755"); + fs16.chmodSync(goWrapperPath, "755"); core15.exportVariable("CODEQL_ACTION_GO_BINARY" /* GO_BINARY_LOCATION */, goWrapperPath); } catch (e) { logger.warning( @@ -110426,6 +110597,33 @@ async function loadRepositoryProperties(repositoryNwo, logger) { return new Failure(error3); } } +async function computeAndPersistDiffRanges(codeql, features, logger) { + try { + await withGroupAsync("Compute PR diff ranges", async () => { + const branches = await getDiffInformedAnalysisBranches( + codeql, + features, + logger + ); + if (!branches) { + return; + } + const ranges = await getPullRequestEditedDiffRanges(branches, logger); + if (ranges === void 0) { + return; + } + writeDiffRangesJsonFile(logger, ranges); + const distinctFiles = new Set(ranges.map((r) => r.path)).size; + logger.info( + `Persisted ${ranges.length} diff range(s) across ${distinctFiles} file(s).` + ); + }); + } catch (e) { + logger.warning( + `Failed to compute and persist PR diff ranges: ${getErrorMessage(e)}` + ); + } +} async function recordZstdAvailability(config, zstdAvailability) { addNoLanguageDiagnostic( config, diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index cefba2d562..ce30730883 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -100540,8 +100540,8 @@ var require_follow_redirects = __commonJS({ } return parsed; } - function resolveUrl(relative, base) { - return useNativeURL ? new URL2(relative, base) : parseUrl2(url.resolve(base, relative)); + function resolveUrl(relative2, base) { + return useNativeURL ? new URL2(relative2, base) : parseUrl2(url.resolve(base, relative2)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -104202,6 +104202,18 @@ var decodeGitFilePath = function(filePath) { } return filePath; }; +var getGitRoot = async function(sourceRoot) { + try { + const stdout = await runGitCommand( + sourceRoot, + ["rev-parse", "--show-toplevel"], + `Cannot find Git repository root from the source root ${sourceRoot}.` + ); + return stdout.trim(); + } catch { + return void 0; + } +}; var getFileOidsUnderPath = async function(basePath) { const stdout = await runGitCommand( basePath, @@ -104324,10 +104336,12 @@ async function readBaseDatabaseOidsFile(config, logger) { async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); const overlayFileOids = await getFileOidsUnderPath(sourceRoot); - const changedFiles = computeChangedFiles(baseFileOids, overlayFileOids); + const oidChangedFiles = computeChangedFiles(baseFileOids, overlayFileOids); logger.info( - `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` + `Found ${oidChangedFiles.length} changed file(s) under ${sourceRoot} from OID comparison.` ); + const diffRangeFiles = await getDiffRangeFilePaths(sourceRoot, logger); + const changedFiles = [.../* @__PURE__ */ new Set([...oidChangedFiles, ...diffRangeFiles])]; const changedFilesJson = JSON.stringify({ changes: changedFiles }); const overlayChangesFile = path2.join( getTemporaryDirectory(), @@ -104353,6 +104367,48 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } return changes; } +async function getDiffRangeFilePaths(sourceRoot, logger) { + const jsonFilePath = path2.join(getTemporaryDirectory(), "pr-diff-range.json"); + if (!fs2.existsSync(jsonFilePath)) { + return []; + } + let diffRanges; + try { + diffRanges = JSON.parse(fs2.readFileSync(jsonFilePath, "utf8")); + } catch (e) { + logger.warning( + `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` + ); + return []; + } + logger.debug( + `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.` + ); + const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; + const repoRoot = await getGitRoot(sourceRoot); + if (repoRoot === void 0) { + logger.warning( + "Cannot determine git root; returning diff range paths as-is." + ); + return repoRelativePaths; + } + const sourceRootRelPrefix = path2.relative(repoRoot, sourceRoot).replaceAll(path2.sep, "/"); + if (sourceRootRelPrefix === "") { + return repoRelativePaths; + } + const prefixWithSlash = `${sourceRootRelPrefix}/`; + const result = []; + for (const p of repoRelativePaths) { + if (p.startsWith(prefixWithSlash)) { + result.push(p.slice(prefixWithSlash.length)); + } else { + logger.debug( + `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").` + ); + } + } + return result; +} // src/tools-features.ts var semver4 = __toESM(require_semver2()); diff --git a/lib/setup-codeql-action.js b/lib/setup-codeql-action.js index 8fcb624980..25807f6acc 100644 --- a/lib/setup-codeql-action.js +++ b/lib/setup-codeql-action.js @@ -100540,8 +100540,8 @@ var require_follow_redirects = __commonJS({ } return parsed; } - function resolveUrl(relative2, base) { - return useNativeURL ? new URL2(relative2, base) : parseUrl2(url.resolve(base, relative2)); + function resolveUrl(relative3, base) { + return useNativeURL ? new URL2(relative3, base) : parseUrl2(url.resolve(base, relative3)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -104069,6 +104069,18 @@ var decodeGitFilePath = function(filePath) { } return filePath; }; +var getGitRoot = async function(sourceRoot) { + try { + const stdout = await runGitCommand( + sourceRoot, + ["rev-parse", "--show-toplevel"], + `Cannot find Git repository root from the source root ${sourceRoot}.` + ); + return stdout.trim(); + } catch { + return void 0; + } +}; var getFileOidsUnderPath = async function(basePath) { const stdout = await runGitCommand( basePath, @@ -104216,10 +104228,12 @@ async function readBaseDatabaseOidsFile(config, logger) { async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); const overlayFileOids = await getFileOidsUnderPath(sourceRoot); - const changedFiles = computeChangedFiles(baseFileOids, overlayFileOids); + const oidChangedFiles = computeChangedFiles(baseFileOids, overlayFileOids); logger.info( - `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` + `Found ${oidChangedFiles.length} changed file(s) under ${sourceRoot} from OID comparison.` ); + const diffRangeFiles = await getDiffRangeFilePaths(sourceRoot, logger); + const changedFiles = [.../* @__PURE__ */ new Set([...oidChangedFiles, ...diffRangeFiles])]; const changedFilesJson = JSON.stringify({ changes: changedFiles }); const overlayChangesFile = path3.join( getTemporaryDirectory(), @@ -104245,6 +104259,48 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } return changes; } +async function getDiffRangeFilePaths(sourceRoot, logger) { + const jsonFilePath = path3.join(getTemporaryDirectory(), "pr-diff-range.json"); + if (!fs3.existsSync(jsonFilePath)) { + return []; + } + let diffRanges; + try { + diffRanges = JSON.parse(fs3.readFileSync(jsonFilePath, "utf8")); + } catch (e) { + logger.warning( + `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` + ); + return []; + } + logger.debug( + `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.` + ); + const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; + const repoRoot = await getGitRoot(sourceRoot); + if (repoRoot === void 0) { + logger.warning( + "Cannot determine git root; returning diff range paths as-is." + ); + return repoRelativePaths; + } + const sourceRootRelPrefix = path3.relative(repoRoot, sourceRoot).replaceAll(path3.sep, "/"); + if (sourceRootRelPrefix === "") { + return repoRelativePaths; + } + const prefixWithSlash = `${sourceRootRelPrefix}/`; + const result = []; + for (const p of repoRelativePaths) { + if (p.startsWith(prefixWithSlash)) { + result.push(p.slice(prefixWithSlash.length)); + } else { + logger.debug( + `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").` + ); + } + } + return result; +} // src/tools-features.ts var semver3 = __toESM(require_semver2()); diff --git a/lib/upload-lib.js b/lib/upload-lib.js index 3527c53649..4b0cfa3454 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -100540,8 +100540,8 @@ var require_follow_redirects = __commonJS({ } return parsed; } - function resolveUrl(relative2, base) { - return useNativeURL ? new URL2(relative2, base) : parseUrl2(url2.resolve(base, relative2)); + function resolveUrl(relative3, base) { + return useNativeURL ? new URL2(relative3, base) : parseUrl2(url2.resolve(base, relative3)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -107360,6 +107360,18 @@ var decodeGitFilePath = function(filePath) { } return filePath; }; +var getGitRoot = async function(sourceRoot) { + try { + const stdout = await runGitCommand( + sourceRoot, + ["rev-parse", "--show-toplevel"], + `Cannot find Git repository root from the source root ${sourceRoot}.` + ); + return stdout.trim(); + } catch { + return void 0; + } +}; var getFileOidsUnderPath = async function(basePath) { const stdout = await runGitCommand( basePath, @@ -107482,10 +107494,12 @@ async function readBaseDatabaseOidsFile(config, logger) { async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); const overlayFileOids = await getFileOidsUnderPath(sourceRoot); - const changedFiles = computeChangedFiles(baseFileOids, overlayFileOids); + const oidChangedFiles = computeChangedFiles(baseFileOids, overlayFileOids); logger.info( - `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` + `Found ${oidChangedFiles.length} changed file(s) under ${sourceRoot} from OID comparison.` ); + const diffRangeFiles = await getDiffRangeFilePaths(sourceRoot, logger); + const changedFiles = [.../* @__PURE__ */ new Set([...oidChangedFiles, ...diffRangeFiles])]; const changedFilesJson = JSON.stringify({ changes: changedFiles }); const overlayChangesFile = path4.join( getTemporaryDirectory(), @@ -107511,6 +107525,48 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } return changes; } +async function getDiffRangeFilePaths(sourceRoot, logger) { + const jsonFilePath = path4.join(getTemporaryDirectory(), "pr-diff-range.json"); + if (!fs3.existsSync(jsonFilePath)) { + return []; + } + let diffRanges; + try { + diffRanges = JSON.parse(fs3.readFileSync(jsonFilePath, "utf8")); + } catch (e) { + logger.warning( + `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` + ); + return []; + } + logger.debug( + `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.` + ); + const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; + const repoRoot = await getGitRoot(sourceRoot); + if (repoRoot === void 0) { + logger.warning( + "Cannot determine git root; returning diff range paths as-is." + ); + return repoRelativePaths; + } + const sourceRootRelPrefix = path4.relative(repoRoot, sourceRoot).replaceAll(path4.sep, "/"); + if (sourceRootRelPrefix === "") { + return repoRelativePaths; + } + const prefixWithSlash = `${sourceRootRelPrefix}/`; + const result = []; + for (const p of repoRelativePaths) { + if (p.startsWith(prefixWithSlash)) { + result.push(p.slice(prefixWithSlash.length)); + } else { + logger.debug( + `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").` + ); + } + } + return result; +} // src/tools-features.ts var semver4 = __toESM(require_semver2()); @@ -107750,7 +107806,14 @@ function readDiffRangesJsonFile(logger) { `Read pr-diff-range JSON file from ${jsonFilePath}: ${jsonContents}` ); - return JSON.parse(jsonContents); + try { + return JSON.parse(jsonContents); + } catch (e) { + logger.warning( + `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` + ); + return void 0; + } } // src/overlay/status.ts diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index da345bf9a9..5f495c7b41 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -100540,8 +100540,8 @@ var require_follow_redirects = __commonJS({ } return parsed; } - function resolveUrl(relative2, base) { - return useNativeURL ? new URL2(relative2, base) : parseUrl2(url2.resolve(base, relative2)); + function resolveUrl(relative3, base) { + return useNativeURL ? new URL2(relative3, base) : parseUrl2(url2.resolve(base, relative3)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -107044,6 +107044,18 @@ var decodeGitFilePath = function(filePath) { } return filePath; }; +var getGitRoot = async function(sourceRoot) { + try { + const stdout = await runGitCommand( + sourceRoot, + ["rev-parse", "--show-toplevel"], + `Cannot find Git repository root from the source root ${sourceRoot}.` + ); + return stdout.trim(); + } catch { + return void 0; + } +}; var getFileOidsUnderPath = async function(basePath) { const stdout = await runGitCommand( basePath, @@ -107191,10 +107203,12 @@ async function readBaseDatabaseOidsFile(config, logger) { async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); const overlayFileOids = await getFileOidsUnderPath(sourceRoot); - const changedFiles = computeChangedFiles(baseFileOids, overlayFileOids); + const oidChangedFiles = computeChangedFiles(baseFileOids, overlayFileOids); logger.info( - `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` + `Found ${oidChangedFiles.length} changed file(s) under ${sourceRoot} from OID comparison.` ); + const diffRangeFiles = await getDiffRangeFilePaths(sourceRoot, logger); + const changedFiles = [.../* @__PURE__ */ new Set([...oidChangedFiles, ...diffRangeFiles])]; const changedFilesJson = JSON.stringify({ changes: changedFiles }); const overlayChangesFile = path3.join( getTemporaryDirectory(), @@ -107220,6 +107234,48 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } return changes; } +async function getDiffRangeFilePaths(sourceRoot, logger) { + const jsonFilePath = path3.join(getTemporaryDirectory(), "pr-diff-range.json"); + if (!fs3.existsSync(jsonFilePath)) { + return []; + } + let diffRanges; + try { + diffRanges = JSON.parse(fs3.readFileSync(jsonFilePath, "utf8")); + } catch (e) { + logger.warning( + `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` + ); + return []; + } + logger.debug( + `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.` + ); + const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; + const repoRoot = await getGitRoot(sourceRoot); + if (repoRoot === void 0) { + logger.warning( + "Cannot determine git root; returning diff range paths as-is." + ); + return repoRelativePaths; + } + const sourceRootRelPrefix = path3.relative(repoRoot, sourceRoot).replaceAll(path3.sep, "/"); + if (sourceRootRelPrefix === "") { + return repoRelativePaths; + } + const prefixWithSlash = `${sourceRootRelPrefix}/`; + const result = []; + for (const p of repoRelativePaths) { + if (p.startsWith(prefixWithSlash)) { + result.push(p.slice(prefixWithSlash.length)); + } else { + logger.debug( + `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").` + ); + } + } + return result; +} // src/tools-features.ts var semver3 = __toESM(require_semver2()); @@ -107948,7 +108004,14 @@ function readDiffRangesJsonFile(logger) { `Read pr-diff-range JSON file from ${jsonFilePath}: ${jsonContents}` ); - return JSON.parse(jsonContents); + try { + return JSON.parse(jsonContents); + } catch (e) { + logger.warning( + `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` + ); + return void 0; + } } // src/overlay/status.ts diff --git a/src/analyze-action.ts b/src/analyze-action.ts index cf8e388438..24f8fe612b 100644 --- a/src/analyze-action.ts +++ b/src/analyze-action.ts @@ -28,7 +28,6 @@ import { DependencyCacheUploadStatusReport, uploadDependencyCaches, } from "./dependency-caching"; -import { getDiffInformedAnalysisBranches } from "./diff-informed-analysis-utils"; import { EnvVar } from "./environment"; import { initFeatures } from "./feature-flags"; import { KnownLanguage } from "./languages"; @@ -305,14 +304,8 @@ async function run(startedAt: Date) { logger, ); - const branches = await getDiffInformedAnalysisBranches( - codeql, - features, - logger, - ); - const diffRangePackDir = branches - ? await setupDiffInformedQueryRun(branches, logger) - : undefined; + // Setup diff informed analysis if needed (based on whether init created the file) + const diffRangePackDir = await setupDiffInformedQueryRun(logger); await warnIfGoInstalledAfterInit(config, logger); await runAutobuildIfLegacyGoWorkflow(config, logger); diff --git a/src/analyze.ts b/src/analyze.ts index 8de1b98e81..d2088c3a3a 100644 --- a/src/analyze.ts +++ b/src/analyze.ts @@ -5,11 +5,7 @@ import { performance } from "perf_hooks"; import * as io from "@actions/io"; import * as yaml from "js-yaml"; -import { - getTemporaryDirectory, - getRequiredInput, - PullRequestBranches, -} from "./actions-util"; +import { getTemporaryDirectory, getRequiredInput } from "./actions-util"; import * as analyses from "./analyses"; import { setupCppAutobuild } from "./autobuild"; import { type CodeQL } from "./codeql"; @@ -21,8 +17,7 @@ import { import { addDiagnostic, makeDiagnostic } from "./diagnostics"; import { DiffThunkRange, - writeDiffRangesJsonFile, - getPullRequestEditedDiffRanges, + readDiffRangesJsonFile, } from "./diff-informed-analysis-utils"; import { EnvVar } from "./environment"; import { FeatureEnablement, Feature } from "./feature-flags"; @@ -237,16 +232,19 @@ async function finalizeDatabaseCreation( * the diff range information, or `undefined` if the feature is disabled. */ export async function setupDiffInformedQueryRun( - branches: PullRequestBranches, logger: Logger, ): Promise { return await withGroupAsync( "Generating diff range extension pack", async () => { - logger.info( - `Calculating diff ranges for ${branches.base}...${branches.head}`, - ); - const diffRanges = await getPullRequestEditedDiffRanges(branches, logger); + const diffRanges = readDiffRangesJsonFile(logger); + if (diffRanges === undefined) { + logger.info( + "No precomputed diff ranges found; skipping diff-informed analysis stage.", + ); + return undefined; + } + const checkoutPath = getRequiredInput("checkout_path"); const packDir = writeDiffRangeDataExtensionPack( logger, @@ -368,10 +366,6 @@ dataExtensions: `Wrote pr-diff-range extension pack to ${extensionFilePath}:\n${extensionContents}`, ); - // Write the diff ranges to a JSON file, for action-side alert filtering by the - // upload-lib module. - writeDiffRangesJsonFile(logger, ranges); - return diffRangeDir; } diff --git a/src/diff-informed-analysis-utils.ts b/src/diff-informed-analysis-utils.ts index ac0eb1ea26..adae032dcd 100644 --- a/src/diff-informed-analysis-utils.ts +++ b/src/diff-informed-analysis-utils.ts @@ -105,7 +105,14 @@ export function readDiffRangesJsonFile( logger.debug( `Read pr-diff-range JSON file from ${jsonFilePath}:\n${jsonContents}`, ); - return JSON.parse(jsonContents) as DiffThunkRange[]; + try { + return JSON.parse(jsonContents) as DiffThunkRange[]; + } catch (e) { + logger.warning( + `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}`, + ); + return undefined; + } } /** diff --git a/src/init-action.ts b/src/init-action.ts index 6fe89165bd..2dddc888a5 100644 --- a/src/init-action.ts +++ b/src/init-action.ts @@ -37,6 +37,11 @@ import { makeDiagnostic, makeTelemetryDiagnostic, } from "./diagnostics"; +import { + getDiffInformedAnalysisBranches, + getPullRequestEditedDiffRanges, + writeDiffRangesJsonFile, +} from "./diff-informed-analysis-utils"; import { EnvVar } from "./environment"; import { Feature, FeatureEnablement, initFeatures } from "./feature-flags"; import { @@ -54,7 +59,7 @@ import { runDatabaseInitCluster, } from "./init"; import { JavaEnvVars, KnownLanguage } from "./languages"; -import { getActionsLogger, Logger } from "./logging"; +import { getActionsLogger, Logger, withGroupAsync } from "./logging"; import { downloadOverlayBaseDatabaseFromCache, OverlayBaseDatabaseDownloadStats, @@ -413,6 +418,7 @@ async function run(startedAt: Date) { } await checkInstallPython311(config.languages, codeql); + await computeAndPersistDiffRanges(codeql, features, logger); } catch (unwrappedError) { const error = wrapError(unwrappedError); core.setFailed(error.message); @@ -833,6 +839,42 @@ async function loadRepositoryProperties( } } +/** + * Compute and persist diff ranges when diff-informed analysis is enabled + * (feature flag + PR context). This writes the standard pr-diff-range.json + * file for later reuse in the analyze step. Failures are logged but non-fatal. + */ +async function computeAndPersistDiffRanges( + codeql: CodeQL, + features: FeatureEnablement, + logger: Logger, +): Promise { + try { + await withGroupAsync("Compute PR diff ranges", async () => { + const branches = await getDiffInformedAnalysisBranches( + codeql, + features, + logger, + ); + if (!branches) { + return; + } + const ranges = await getPullRequestEditedDiffRanges(branches, logger); + if (ranges === undefined) { + return; + } + writeDiffRangesJsonFile(logger, ranges); + const distinctFiles = new Set(ranges.map((r) => r.path)).size; + logger.info( + `Persisted ${ranges.length} diff range(s) across ${distinctFiles} file(s).`, + ); + }); + } catch (e) { + logger.warning( + `Failed to compute and persist PR diff ranges: ${getErrorMessage(e)}`, + ); + } +} async function recordZstdAvailability( config: configUtils.Config, zstdAvailability: ZstdAvailability, diff --git a/src/overlay/index.test.ts b/src/overlay/index.test.ts index 8e92a69e27..088a3828bb 100644 --- a/src/overlay/index.test.ts +++ b/src/overlay/index.test.ts @@ -34,12 +34,14 @@ test.serial( "writeOverlayChangesFile generates correct changes file", async (t) => { await withTmpDir(async (tmpDir) => { - const dbLocation = path.join(tmpDir, "db"); - await fs.promises.mkdir(dbLocation, { recursive: true }); - const sourceRoot = path.join(tmpDir, "src"); - await fs.promises.mkdir(sourceRoot, { recursive: true }); - const tempDir = path.join(tmpDir, "temp"); - await fs.promises.mkdir(tempDir, { recursive: true }); + const [dbLocation, sourceRoot, tempDir] = ["db", "src", "temp"].map((d) => + path.join(tmpDir, d), + ); + await Promise.all( + [dbLocation, sourceRoot, tempDir].map((d) => + fs.promises.mkdir(d, { recursive: true }), + ), + ); const logger = getRunnerLogger(true); const config = createTestConfig({ dbLocation }); @@ -73,6 +75,9 @@ test.serial( const getTempDirStub = sinon .stub(actionsUtil, "getTemporaryDirectory") .returns(tempDir); + const getGitRootStub = sinon + .stub(gitUtils, "getGitRoot") + .resolves(sourceRoot); const changesFilePath = await writeOverlayChangesFile( config, sourceRoot, @@ -80,6 +85,7 @@ test.serial( ); getFileOidsStubForOverlay.restore(); getTempDirStub.restore(); + getGitRootStub.restore(); const fileContent = await fs.promises.readFile(changesFilePath, "utf-8"); const parsedContent = JSON.parse(fileContent) as { changes: string[] }; @@ -93,6 +99,232 @@ test.serial( }, ); +test.serial( + "writeOverlayChangesFile merges additional diff files into overlay changes", + async (t) => { + await withTmpDir(async (tmpDir) => { + const [dbLocation, sourceRoot, tempDir] = ["db", "src", "temp"].map((d) => + path.join(tmpDir, d), + ); + await Promise.all( + [dbLocation, sourceRoot, tempDir].map((d) => + fs.promises.mkdir(d, { recursive: true }), + ), + ); + + const logger = getRunnerLogger(true); + const config = createTestConfig({ dbLocation }); + + // Mock the getFileOidsUnderPath function to return base OIDs + // "reverted.js" has the same OID in both base and current, simulating + // a revert PR where the file content matches the overlay-base + const baseOids = { + "unchanged.js": "aaa111", + "modified.js": "bbb222", + "reverted.js": "eee555", + }; + const getFileOidsStubForBase = sinon + .stub(gitUtils, "getFileOidsUnderPath") + .resolves(baseOids); + + // Write the base database OIDs file + await writeBaseDatabaseOidsFile(config, sourceRoot); + getFileOidsStubForBase.restore(); + + // Mock the getFileOidsUnderPath function to return overlay OIDs + // "reverted.js" has the same OID as the base -- OID comparison alone + // would NOT include it, only additionalChangedFiles causes it to appear + const currentOids = { + "unchanged.js": "aaa111", + "modified.js": "ddd444", // Changed OID + "reverted.js": "eee555", // Same OID as base -- not detected by OID comparison + }; + const getFileOidsStubForOverlay = sinon + .stub(gitUtils, "getFileOidsUnderPath") + .resolves(currentOids); + + const getTempDirStub = sinon + .stub(actionsUtil, "getTemporaryDirectory") + .returns(tempDir); + const getGitRootStub = sinon + .stub(gitUtils, "getGitRoot") + .resolves(sourceRoot); + + // Write a pr-diff-range.json file with diff ranges including + // "reverted.js" (unchanged OIDs) and "modified.js" (already in OID changes) + await fs.promises.writeFile( + path.join(tempDir, "pr-diff-range.json"), + JSON.stringify([ + { path: "reverted.js", startLine: 1, endLine: 10 }, + { path: "modified.js", startLine: 1, endLine: 5 }, + { path: "diff-only.js", startLine: 1, endLine: 3 }, + ]), + ); + + const changesFilePath = await writeOverlayChangesFile( + config, + sourceRoot, + logger, + ); + getFileOidsStubForOverlay.restore(); + getTempDirStub.restore(); + getGitRootStub.restore(); + + const fileContent = await fs.promises.readFile(changesFilePath, "utf-8"); + const parsedContent = JSON.parse(fileContent) as { changes: string[] }; + + t.deepEqual( + parsedContent.changes.sort(), + ["diff-only.js", "modified.js", "reverted.js"], + "Should include OID-changed files, diff-only files, and deduplicate overlapping files", + ); + }); + }, +); + +test.serial( + "writeOverlayChangesFile works without additional diff files", + async (t) => { + await withTmpDir(async (tmpDir) => { + const [dbLocation, sourceRoot, tempDir] = ["db", "src", "temp"].map((d) => + path.join(tmpDir, d), + ); + await Promise.all( + [dbLocation, sourceRoot, tempDir].map((d) => + fs.promises.mkdir(d, { recursive: true }), + ), + ); + + const logger = getRunnerLogger(true); + const config = createTestConfig({ dbLocation }); + + // Mock the getFileOidsUnderPath function to return base OIDs + const baseOids = { + "unchanged.js": "aaa111", + "modified.js": "bbb222", + }; + const getFileOidsStubForBase = sinon + .stub(gitUtils, "getFileOidsUnderPath") + .resolves(baseOids); + + await writeBaseDatabaseOidsFile(config, sourceRoot); + getFileOidsStubForBase.restore(); + + const currentOids = { + "unchanged.js": "aaa111", + "modified.js": "ddd444", + }; + const getFileOidsStubForOverlay = sinon + .stub(gitUtils, "getFileOidsUnderPath") + .resolves(currentOids); + + const getTempDirStub = sinon + .stub(actionsUtil, "getTemporaryDirectory") + .returns(tempDir); + const getGitRootStub = sinon + .stub(gitUtils, "getGitRoot") + .resolves(sourceRoot); + + // No pr-diff-range.json file exists - should work the same as before + const changesFilePath = await writeOverlayChangesFile( + config, + sourceRoot, + logger, + ); + getFileOidsStubForOverlay.restore(); + getTempDirStub.restore(); + getGitRootStub.restore(); + + const fileContent = await fs.promises.readFile(changesFilePath, "utf-8"); + const parsedContent = JSON.parse(fileContent) as { changes: string[] }; + + t.deepEqual( + parsedContent.changes.sort(), + ["modified.js"], + "Should only include OID-changed files when no additional files provided", + ); + }); + }, +); + +test.serial( + "writeOverlayChangesFile converts diff range paths to sourceRoot-relative when sourceRoot is a subdirectory", + async (t) => { + await withTmpDir(async (tmpDir) => { + // Simulate: repo root = tmpDir, sourceRoot = tmpDir/src + const repoRoot = tmpDir; + const sourceRoot = path.join(tmpDir, "src"); + const [dbLocation, tempDir] = ["db", "temp"].map((d) => + path.join(tmpDir, d), + ); + await Promise.all( + [dbLocation, sourceRoot, tempDir].map((d) => + fs.promises.mkdir(d, { recursive: true }), + ), + ); + + const logger = getRunnerLogger(true); + const config = createTestConfig({ dbLocation }); + + // Base OIDs (sourceRoot-relative paths) + const baseOids = { + "app.js": "aaa111", + "lib/util.js": "bbb222", + }; + const getFileOidsStubForBase = sinon + .stub(gitUtils, "getFileOidsUnderPath") + .resolves(baseOids); + await writeBaseDatabaseOidsFile(config, sourceRoot); + getFileOidsStubForBase.restore(); + + // Current OIDs — same as base (no OID changes) + const currentOids = { + "app.js": "aaa111", + "lib/util.js": "bbb222", + }; + const getFileOidsStubForOverlay = sinon + .stub(gitUtils, "getFileOidsUnderPath") + .resolves(currentOids); + + const getTempDirStub = sinon + .stub(actionsUtil, "getTemporaryDirectory") + .returns(tempDir); + // getGitRoot returns the repo root (parent of sourceRoot) + const getGitRootStub = sinon + .stub(gitUtils, "getGitRoot") + .resolves(repoRoot); + + // Diff ranges use repo-root-relative paths (as returned by the GitHub compare API) + await fs.promises.writeFile( + path.join(tempDir, "pr-diff-range.json"), + JSON.stringify([ + { path: "src/app.js", startLine: 1, endLine: 10 }, + { path: "src/lib/util.js", startLine: 5, endLine: 8 }, + { path: "other/outside.js", startLine: 1, endLine: 3 }, // not under sourceRoot + ]), + ); + + const changesFilePath = await writeOverlayChangesFile( + config, + sourceRoot, + logger, + ); + getFileOidsStubForOverlay.restore(); + getTempDirStub.restore(); + getGitRootStub.restore(); + + const fileContent = await fs.promises.readFile(changesFilePath, "utf-8"); + const parsedContent = JSON.parse(fileContent) as { changes: string[] }; + + t.deepEqual( + parsedContent.changes.sort(), + ["app.js", "lib/util.js"], + "Should convert repo-root-relative paths to sourceRoot-relative and filter out files outside sourceRoot", + ); + }); + }, +); + interface DownloadOverlayBaseDatabaseTestCase { overlayDatabaseMode: OverlayDatabaseMode; useOverlayDatabaseCaching: boolean; diff --git a/src/overlay/index.ts b/src/overlay/index.ts index 63a46b2b39..df2f073598 100644 --- a/src/overlay/index.ts +++ b/src/overlay/index.ts @@ -13,7 +13,7 @@ import { getAutomationID } from "../api-client"; import { createCacheKeyHash } from "../caching-utils"; import { type CodeQL } from "../codeql"; import { type Config } from "../config-utils"; -import { getCommitOid, getFileOidsUnderPath } from "../git-utils"; +import { getCommitOid, getFileOidsUnderPath, getGitRoot } from "../git-utils"; import { Logger, withGroupAsync } from "../logging"; import { CleanupLevel, @@ -130,11 +130,17 @@ export async function writeOverlayChangesFile( ): Promise { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); const overlayFileOids = await getFileOidsUnderPath(sourceRoot); - const changedFiles = computeChangedFiles(baseFileOids, overlayFileOids); + const oidChangedFiles = computeChangedFiles(baseFileOids, overlayFileOids); logger.info( - `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.`, + `Found ${oidChangedFiles.length} changed file(s) under ${sourceRoot} from OID comparison.`, ); + // Merge in any file paths from precomputed PR diff ranges to ensure the + // overlay always includes all files from the PR diff, even in edge cases + // like revert PRs where OID comparison shows no change. + const diffRangeFiles = await getDiffRangeFilePaths(sourceRoot, logger); + const changedFiles = [...new Set([...oidChangedFiles, ...diffRangeFiles])]; + const changedFilesJson = JSON.stringify({ changes: changedFiles }); const overlayChangesFile = path.join( getTemporaryDirectory(), @@ -165,6 +171,65 @@ function computeChangedFiles( return changes; } +async function getDiffRangeFilePaths( + sourceRoot: string, + logger: Logger, +): Promise { + const jsonFilePath = path.join(getTemporaryDirectory(), "pr-diff-range.json"); + if (!fs.existsSync(jsonFilePath)) { + return []; + } + let diffRanges: Array<{ path: string }>; + try { + diffRanges = JSON.parse(fs.readFileSync(jsonFilePath, "utf8")) as Array<{ + path: string; + }>; + } catch (e) { + logger.warning( + `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}`, + ); + return []; + } + logger.debug( + `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.`, + ); + const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; + + // Diff-range paths are relative to the repo root (from the GitHub compare + // API), but overlay changed files must be relative to sourceRoot (to match + // getFileOidsUnderPath output). Convert and filter accordingly. + const repoRoot = await getGitRoot(sourceRoot); + if (repoRoot === undefined) { + logger.warning( + "Cannot determine git root; returning diff range paths as-is.", + ); + return repoRelativePaths; + } + + // e.g. if repoRoot=/workspace and sourceRoot=/workspace/src, prefix="src" + const sourceRootRelPrefix = path + .relative(repoRoot, sourceRoot) + .replaceAll(path.sep, "/"); + + // If sourceRoot IS the repo root, prefix is "" and all paths pass through. + if (sourceRootRelPrefix === "") { + return repoRelativePaths; + } + + const prefixWithSlash = `${sourceRootRelPrefix}/`; + const result: string[] = []; + for (const p of repoRelativePaths) { + if (p.startsWith(prefixWithSlash)) { + result.push(p.slice(prefixWithSlash.length)); + } else { + logger.debug( + `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").`, + ); + } + } + return result; +} + // Constants for database caching const CACHE_VERSION = 1; const CACHE_PREFIX = "codeql-overlay-base-database"; From d5bb39fa0b22a80973c7598d7b60a9bec2778bef Mon Sep 17 00:00:00 2001 From: Sam Robson Date: Wed, 25 Mar 2026 15:42:39 +0000 Subject: [PATCH 2/3] refactor: single source of truth for getDiffRangesJsonFilePath and simplified getDiffRangeFilePaths --- lib/analyze-action-post.js | 2227 +++++++++++++-------------- lib/analyze-action.js | 554 ++++--- lib/autobuild-action.js | 1149 +++++++------- lib/init-action-post.js | 1078 +++++++------ lib/init-action.js | 572 ++++--- lib/resolve-environment-action.js | 1145 +++++++------- lib/setup-codeql-action.js | 36 +- lib/upload-lib.js | 536 ++++--- lib/upload-sarif-action.js | 536 ++++--- src/actions-util.ts | 6 + src/diff-informed-analysis-utils.ts | 9 +- src/overlay/index.test.ts | 24 +- src/overlay/index.ts | 47 +- 13 files changed, 3929 insertions(+), 3990 deletions(-) diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index 93a741ffb5..904a09bb1d 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.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 path7 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path8 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path7 && path7[0] !== "/") { - path7 = `/${path7}`; + if (path8 && path8[0] !== "/") { + path8 = `/${path8}`; } - return new URL(`${origin}${path7}`); + return new URL(`${origin}${path8}`); } 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: path7, origin } + request: { method, path: path8, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path7); + debuglog("sending request to %s %s/%s", method, origin, path8); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path7, origin }, + request: { method, path: path8, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path7, + path8, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path7, origin } + request: { method, path: path8, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path7); + debuglog("trailers received from %s %s/%s", method, origin, path8); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path7, origin }, + request: { method, path: path8, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path7, + path8, error3.message ); }); @@ -1876,9 +1876,9 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path7, origin } + request: { method, path: path8, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path7); + debuglog("sending request to %s %s/%s", method, origin, path8); }); } 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: path7, + path: path8, method, body, headers, @@ -1956,11 +1956,11 @@ var require_request = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path7 !== "string") { + if (typeof path8 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path7[0] !== "/" && !(path7.startsWith("http://") || path7.startsWith("https://")) && method !== "CONNECT") { + } else if (path8[0] !== "/" && !(path8.startsWith("http://") || path8.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path7)) { + } else if (invalidPathRegex.test(path8)) { 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(path7, query) : path7; + this.path = query ? buildURL(path8, query) : path8; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -2335,9 +2335,9 @@ var require_dispatcher_base = __commonJS({ } close(callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { this.close((err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -2375,12 +2375,12 @@ var require_dispatcher_base = __commonJS({ err = null; } if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { this.destroy(err, (err2, data) => { return err2 ? ( /* istanbul ignore next: should never error */ reject(err2) - ) : resolve5(data); + ) : resolve6(data); }); }); } @@ -4647,8 +4647,8 @@ var require_util2 = __commonJS({ function createDeferredPromise() { let res; let rej; - const promise = new Promise((resolve5, reject) => { - res = resolve5; + const promise = new Promise((resolve6, reject) => { + res = resolve6; rej = reject; }); return { promise, resolve: res, reject: rej }; @@ -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: path7, host, upgrade, blocking, reset } = request2; + const { method, path: path8, 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} ${path7} HTTP/1.1\r + let header = `${method} ${path8} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -6789,12 +6789,12 @@ upgrade: ${upgrade}\r cb(); } } - const waitForDrain = () => new Promise((resolve5, reject) => { + const waitForDrain = () => new Promise((resolve6, reject) => { assert(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve5; + callback = resolve6; } }); socket.on("close", onDrain).on("drain", onDrain); @@ -7128,7 +7128,7 @@ var require_client_h2 = __commonJS({ } function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path: path7, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path8, 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] = path7; + headers[HTTP2_HEADER_PATH] = path8; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -7431,12 +7431,12 @@ var require_client_h2 = __commonJS({ cb(); } } - const waitForDrain = () => new Promise((resolve5, reject) => { + const waitForDrain = () => new Promise((resolve6, reject) => { assert(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve5; + callback = resolve6; } }); h2stream.on("close", onDrain).on("drain", onDrain); @@ -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 path7 = search ? `${pathname}${search}` : pathname; + const path8 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path7; + this.opts.path = path8; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -7913,16 +7913,16 @@ var require_client = __commonJS({ return this[kNeedDrain] < 2; } async [kClose]() { - return new Promise((resolve5) => { + return new Promise((resolve6) => { if (this[kSize]) { - this[kClosedResolve] = resolve5; + this[kClosedResolve] = resolve6; } else { - resolve5(null); + resolve6(null); } }); } async [kDestroy](err) { - return new Promise((resolve5) => { + return new Promise((resolve6) => { const requests = this[kQueue].splice(this[kPendingIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; @@ -7933,7 +7933,7 @@ var require_client = __commonJS({ this[kClosedResolve](); this[kClosedResolve] = null; } - resolve5(null); + resolve6(null); }; if (this[kHTTPContext]) { this[kHTTPContext].destroy(err, callback); @@ -7984,7 +7984,7 @@ var require_client = __commonJS({ }); } try { - const socket = await new Promise((resolve5, reject) => { + const socket = await new Promise((resolve6, reject) => { client[kConnector]({ host, hostname, @@ -7996,7 +7996,7 @@ var require_client = __commonJS({ if (err) { reject(err); } else { - resolve5(socket2); + resolve6(socket2); } }); }); @@ -8332,8 +8332,8 @@ var require_pool_base = __commonJS({ if (this[kQueue].isEmpty()) { await Promise.all(this[kClients].map((c) => c.close())); } else { - await new Promise((resolve5) => { - this[kClosedResolve] = resolve5; + await new Promise((resolve6) => { + this[kClosedResolve] = resolve6; }); } } @@ -8784,10 +8784,10 @@ var require_proxy_agent = __commonJS({ }; const { origin, - path: path7 = "/", + path: path8 = "/", headers = {} } = opts; - opts.path = origin + path7; + opts.path = origin + path8; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -9548,7 +9548,7 @@ var require_readable = __commonJS({ if (this._readableState.closeEmitted) { return null; } - return await new Promise((resolve5, reject) => { + return await new Promise((resolve6, reject) => { if (this[kContentLength] > limit) { this.destroy(new AbortError()); } @@ -9561,7 +9561,7 @@ var require_readable = __commonJS({ if (signal?.aborted) { reject(signal.reason ?? new AbortError()); } else { - resolve5(null); + resolve6(null); } }).on("error", noop3).on("data", function(chunk) { limit -= chunk.length; @@ -9580,7 +9580,7 @@ var require_readable = __commonJS({ } async function consume(stream, type2) { assert(!stream[kConsume]); - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { if (isUnusable(stream)) { const rState = stream._readableState; if (rState.destroyed && rState.closeEmitted === false) { @@ -9597,7 +9597,7 @@ var require_readable = __commonJS({ stream[kConsume] = { type: type2, stream, - resolve: resolve5, + resolve: resolve6, reject, length: 0, body: [] @@ -9667,18 +9667,18 @@ var require_readable = __commonJS({ return buffer; } function consumeEnd(consume2) { - const { type: type2, body, resolve: resolve5, stream, length } = consume2; + const { type: type2, body, resolve: resolve6, stream, length } = consume2; try { if (type2 === "text") { - resolve5(chunksDecode(body, length)); + resolve6(chunksDecode(body, length)); } else if (type2 === "json") { - resolve5(JSON.parse(chunksDecode(body, length))); + resolve6(JSON.parse(chunksDecode(body, length))); } else if (type2 === "arrayBuffer") { - resolve5(chunksConcat(body, length).buffer); + resolve6(chunksConcat(body, length).buffer); } else if (type2 === "blob") { - resolve5(new Blob(body, { type: stream[kContentType] })); + resolve6(new Blob(body, { type: stream[kContentType] })); } else if (type2 === "bytes") { - resolve5(chunksConcat(body, length)); + resolve6(chunksConcat(body, length)); } consumeFinish(consume2); } catch (err) { @@ -9935,9 +9935,9 @@ var require_api_request = __commonJS({ }; function request2(opts, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { request2.call(this, opts, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -10160,9 +10160,9 @@ var require_api_stream = __commonJS({ }; function stream(opts, factory, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -10447,9 +10447,9 @@ var require_api_upgrade = __commonJS({ }; function upgrade(opts, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -10541,9 +10541,9 @@ var require_api_connect = __commonJS({ }; function connect(opts, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -10708,20 +10708,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path7) { - if (typeof path7 !== "string") { - return path7; + function safeUrl(path8) { + if (typeof path8 !== "string") { + return path8; } - const pathSegments = path7.split("?"); + const pathSegments = path8.split("?"); if (pathSegments.length !== 2) { - return path7; + return path8; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path7, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path7); + function matchKey(mockDispatch2, { path: path8, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path8); 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: path7 }) => matchValue(safeUrl(path7), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path8 }) => matchValue(safeUrl(path8), 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: path7, method, body, headers, query } = opts; + const { path: path8, method, body, headers, query } = opts; return { - path: path7, + path: path8, method, body, headers, @@ -11246,10 +11246,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path7, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path8, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path7, + Path: path8, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -14405,7 +14405,7 @@ var require_fetch = __commonJS({ function dispatch({ body }) { const url = requestCurrentURL(request2); const agent = fetchParams.controller.dispatcher; - return new Promise((resolve5, reject) => agent.dispatch( + return new Promise((resolve6, reject) => agent.dispatch( { path: url.pathname + url.search, origin: url.origin, @@ -14481,7 +14481,7 @@ var require_fetch = __commonJS({ } } const onError = this.onError.bind(this); - resolve5({ + resolve6({ status, statusText, headersList, @@ -14527,7 +14527,7 @@ var require_fetch = __commonJS({ for (let i = 0; i < rawHeaders.length; i += 2) { headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); } - resolve5({ + resolve6({ status, statusText: STATUS_CODES[status], headersList, @@ -16130,9 +16130,9 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path7) { - for (let i = 0; i < path7.length; ++i) { - const code = path7.charCodeAt(i); + function validateCookiePath(path8) { + for (let i = 0; i < path8.length; ++i) { + const code = path8.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -18120,8 +18120,8 @@ var require_util8 = __commonJS({ return true; } function delay(ms) { - return new Promise((resolve5) => { - setTimeout(resolve5, ms).unref(); + return new Promise((resolve6) => { + setTimeout(resolve6, ms).unref(); }); } module2.exports = { @@ -18726,11 +18726,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path7 = opts.path; + let path8 = opts.path; if (!opts.path.startsWith("/")) { - path7 = `/${path7}`; + path8 = `/${path8}`; } - url = new URL(util.parseOrigin(url).origin + path7); + url = new URL(util.parseOrigin(url).origin + path8); } else { if (!opts) { opts = typeof url === "object" ? url : {}; @@ -18844,11 +18844,11 @@ var require_lib = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -18864,7 +18864,7 @@ var require_lib = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -18951,26 +18951,26 @@ var require_lib = __commonJS({ } readBody() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); }); this.message.on("end", () => { - resolve5(output.toString()); + resolve6(output.toString()); }); })); }); } readBodyBuffer() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); }); this.message.on("end", () => { - resolve5(Buffer.concat(chunks)); + resolve6(Buffer.concat(chunks)); }); })); }); @@ -19178,14 +19178,14 @@ var require_lib = __commonJS({ */ requestRaw(info7, data) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { function callbackForResult(err, res) { if (err) { reject(err); } else if (!res) { reject(new Error("Unknown error")); } else { - resolve5(res); + resolve6(res); } } this.requestRawWithCallback(info7, data, callbackForResult); @@ -19429,12 +19429,12 @@ var require_lib = __commonJS({ return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); + return new Promise((resolve6) => setTimeout(() => resolve6(), ms)); }); } _processResponse(res, options) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -19442,7 +19442,7 @@ var require_lib = __commonJS({ headers: {} }; if (statusCode === HttpCodes.NotFound) { - resolve5(response); + resolve6(response); } function dateTimeDeserializer(key, value) { if (typeof value === "string") { @@ -19481,7 +19481,7 @@ var require_lib = __commonJS({ err.result = response.result; reject(err); } else { - resolve5(response); + resolve6(response); } })); }); @@ -19498,11 +19498,11 @@ var require_auth = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -19518,7 +19518,7 @@ var require_auth = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19602,11 +19602,11 @@ var require_oidc_utils = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -19622,7 +19622,7 @@ var require_oidc_utils = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19700,11 +19700,11 @@ var require_summary = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -19720,7 +19720,7 @@ var require_summary = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -20033,7 +20033,7 @@ var require_path_utils = __commonJS({ exports2.toPosixPath = toPosixPath; exports2.toWin32Path = toWin32Path; exports2.toPlatformPath = toPlatformPath; - var path7 = __importStar2(require("path")); + var path8 = __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, path7.sep); + return pth.replace(/[/\\]/g, path8.sep); } } }); @@ -20089,11 +20089,11 @@ var require_io_util = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -20109,7 +20109,7 @@ var require_io_util = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -20124,7 +20124,7 @@ var require_io_util = __commonJS({ exports2.tryGetExecutablePath = tryGetExecutablePath; exports2.getCmdPath = getCmdPath; var fs8 = __importStar2(require("fs")); - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); _a = fs8.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 = path7.extname(filePath).toUpperCase(); + const upperExt = path8.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 = path7.dirname(filePath); - const upperName = path7.basename(filePath).toUpperCase(); + const directory = path8.dirname(filePath); + const upperName = path8.basename(filePath).toUpperCase(); for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path7.join(directory, actualName); + filePath = path8.join(directory, actualName); break; } } @@ -20286,11 +20286,11 @@ var require_io = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -20306,7 +20306,7 @@ var require_io = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -20319,7 +20319,7 @@ var require_io = __commonJS({ exports2.which = which6; exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path7 = __importStar2(require("path")); + var path8 = __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 ? path7.join(dest, path7.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path8.join(dest, path8.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -20340,7 +20340,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path7.relative(source, newDest) === "") { + if (path8.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 = path7.join(dest, path7.basename(source)); + dest = path8.join(dest, path8.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -20363,7 +20363,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path7.dirname(dest)); + yield mkdirP(path8.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(path7.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path8.delimiter)) { if (extension) { extensions.push(extension); } @@ -20435,12 +20435,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path7.sep)) { + if (tool.includes(path8.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path7.delimiter)) { + for (const p of process.env.PATH.split(path8.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(path7.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path8.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -20547,11 +20547,11 @@ var require_toolrunner = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -20567,7 +20567,7 @@ var require_toolrunner = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -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 path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var io6 = __importStar2(require_io()); var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); @@ -20793,10 +20793,10 @@ 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 = path7.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path8.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io6.which(this.toolPath, true); - return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -20879,7 +20879,7 @@ var require_toolrunner = __commonJS({ if (error3) { reject(error3); } else { - resolve5(exitCode); + resolve6(exitCode); } }); if (this.options.input) { @@ -21045,11 +21045,11 @@ var require_exec = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -21065,7 +21065,7 @@ var require_exec = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -21165,11 +21165,11 @@ var require_platform = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -21185,7 +21185,7 @@ var require_platform = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -21294,11 +21294,11 @@ var require_core = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -21314,7 +21314,7 @@ var require_core = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -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 path7 = __importStar2(require("path")); + var path8 = __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}${path7.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path8.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 path7 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path7} does not exist${os_1.EOL}`); + const path8 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path8} 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 path7 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path8 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path7 && path7[0] !== "/") { - path7 = `/${path7}`; + if (path8 && path8[0] !== "/") { + path8 = `/${path8}`; } - return new URL(`${origin}${path7}`); + return new URL(`${origin}${path8}`); } 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: path7, origin } + request: { method, path: path8, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path7); + debuglog("sending request to %s %s/%s", method, origin, path8); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path7, origin }, + request: { method, path: path8, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path7, + path8, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path7, origin } + request: { method, path: path8, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path7); + debuglog("trailers received from %s %s/%s", method, origin, path8); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path7, origin }, + request: { method, path: path8, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path7, + path8, error3.message ); }); @@ -22874,9 +22874,9 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path7, origin } + request: { method, path: path8, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path7); + debuglog("sending request to %s %s/%s", method, origin, path8); }); } 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: path7, + path: path8, method, body, headers, @@ -22954,11 +22954,11 @@ var require_request3 = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path7 !== "string") { + if (typeof path8 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path7[0] !== "/" && !(path7.startsWith("http://") || path7.startsWith("https://")) && method !== "CONNECT") { + } else if (path8[0] !== "/" && !(path8.startsWith("http://") || path8.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path7)) { + } else if (invalidPathRegex.test(path8)) { 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(path7, query) : path7; + this.path = query ? buildURL(path8, query) : path8; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -23333,9 +23333,9 @@ var require_dispatcher_base2 = __commonJS({ } close(callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { this.close((err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -23373,12 +23373,12 @@ var require_dispatcher_base2 = __commonJS({ err = null; } if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { this.destroy(err, (err2, data) => { return err2 ? ( /* istanbul ignore next: should never error */ reject(err2) - ) : resolve5(data); + ) : resolve6(data); }); }); } @@ -25645,8 +25645,8 @@ var require_util10 = __commonJS({ function createDeferredPromise() { let res; let rej; - const promise = new Promise((resolve5, reject) => { - res = resolve5; + const promise = new Promise((resolve6, reject) => { + res = resolve6; rej = reject; }); return { promise, resolve: res, reject: rej }; @@ -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: path7, host, upgrade, blocking, reset } = request2; + const { method, path: path8, 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} ${path7} HTTP/1.1\r + let header = `${method} ${path8} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -27787,12 +27787,12 @@ upgrade: ${upgrade}\r cb(); } } - const waitForDrain = () => new Promise((resolve5, reject) => { + const waitForDrain = () => new Promise((resolve6, reject) => { assert(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve5; + callback = resolve6; } }); socket.on("close", onDrain).on("drain", onDrain); @@ -28126,7 +28126,7 @@ var require_client_h22 = __commonJS({ } function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path: path7, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path8, 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] = path7; + headers[HTTP2_HEADER_PATH] = path8; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -28429,12 +28429,12 @@ var require_client_h22 = __commonJS({ cb(); } } - const waitForDrain = () => new Promise((resolve5, reject) => { + const waitForDrain = () => new Promise((resolve6, reject) => { assert(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve5; + callback = resolve6; } }); h2stream.on("close", onDrain).on("drain", onDrain); @@ -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 path7 = search ? `${pathname}${search}` : pathname; + const path8 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path7; + this.opts.path = path8; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -28911,16 +28911,16 @@ var require_client2 = __commonJS({ return this[kNeedDrain] < 2; } async [kClose]() { - return new Promise((resolve5) => { + return new Promise((resolve6) => { if (this[kSize]) { - this[kClosedResolve] = resolve5; + this[kClosedResolve] = resolve6; } else { - resolve5(null); + resolve6(null); } }); } async [kDestroy](err) { - return new Promise((resolve5) => { + return new Promise((resolve6) => { const requests = this[kQueue].splice(this[kPendingIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; @@ -28931,7 +28931,7 @@ var require_client2 = __commonJS({ this[kClosedResolve](); this[kClosedResolve] = null; } - resolve5(null); + resolve6(null); }; if (this[kHTTPContext]) { this[kHTTPContext].destroy(err, callback); @@ -28982,7 +28982,7 @@ var require_client2 = __commonJS({ }); } try { - const socket = await new Promise((resolve5, reject) => { + const socket = await new Promise((resolve6, reject) => { client[kConnector]({ host, hostname, @@ -28994,7 +28994,7 @@ var require_client2 = __commonJS({ if (err) { reject(err); } else { - resolve5(socket2); + resolve6(socket2); } }); }); @@ -29330,8 +29330,8 @@ var require_pool_base2 = __commonJS({ if (this[kQueue].isEmpty()) { await Promise.all(this[kClients].map((c) => c.close())); } else { - await new Promise((resolve5) => { - this[kClosedResolve] = resolve5; + await new Promise((resolve6) => { + this[kClosedResolve] = resolve6; }); } } @@ -29782,10 +29782,10 @@ var require_proxy_agent2 = __commonJS({ }; const { origin, - path: path7 = "/", + path: path8 = "/", headers = {} } = opts; - opts.path = origin + path7; + opts.path = origin + path8; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -30546,7 +30546,7 @@ var require_readable2 = __commonJS({ if (this._readableState.closeEmitted) { return null; } - return await new Promise((resolve5, reject) => { + return await new Promise((resolve6, reject) => { if (this[kContentLength] > limit) { this.destroy(new AbortError()); } @@ -30559,7 +30559,7 @@ var require_readable2 = __commonJS({ if (signal?.aborted) { reject(signal.reason ?? new AbortError()); } else { - resolve5(null); + resolve6(null); } }).on("error", noop3).on("data", function(chunk) { limit -= chunk.length; @@ -30578,7 +30578,7 @@ var require_readable2 = __commonJS({ } async function consume(stream, type2) { assert(!stream[kConsume]); - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { if (isUnusable(stream)) { const rState = stream._readableState; if (rState.destroyed && rState.closeEmitted === false) { @@ -30595,7 +30595,7 @@ var require_readable2 = __commonJS({ stream[kConsume] = { type: type2, stream, - resolve: resolve5, + resolve: resolve6, reject, length: 0, body: [] @@ -30665,18 +30665,18 @@ var require_readable2 = __commonJS({ return buffer; } function consumeEnd(consume2) { - const { type: type2, body, resolve: resolve5, stream, length } = consume2; + const { type: type2, body, resolve: resolve6, stream, length } = consume2; try { if (type2 === "text") { - resolve5(chunksDecode(body, length)); + resolve6(chunksDecode(body, length)); } else if (type2 === "json") { - resolve5(JSON.parse(chunksDecode(body, length))); + resolve6(JSON.parse(chunksDecode(body, length))); } else if (type2 === "arrayBuffer") { - resolve5(chunksConcat(body, length).buffer); + resolve6(chunksConcat(body, length).buffer); } else if (type2 === "blob") { - resolve5(new Blob(body, { type: stream[kContentType] })); + resolve6(new Blob(body, { type: stream[kContentType] })); } else if (type2 === "bytes") { - resolve5(chunksConcat(body, length)); + resolve6(chunksConcat(body, length)); } consumeFinish(consume2); } catch (err) { @@ -30933,9 +30933,9 @@ var require_api_request2 = __commonJS({ }; function request2(opts, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { request2.call(this, opts, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -31158,9 +31158,9 @@ var require_api_stream2 = __commonJS({ }; function stream(opts, factory, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -31445,9 +31445,9 @@ var require_api_upgrade2 = __commonJS({ }; function upgrade(opts, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -31539,9 +31539,9 @@ var require_api_connect2 = __commonJS({ }; function connect(opts, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -31706,20 +31706,20 @@ var require_mock_utils2 = __commonJS({ } return true; } - function safeUrl(path7) { - if (typeof path7 !== "string") { - return path7; + function safeUrl(path8) { + if (typeof path8 !== "string") { + return path8; } - const pathSegments = path7.split("?"); + const pathSegments = path8.split("?"); if (pathSegments.length !== 2) { - return path7; + return path8; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path7, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path7); + function matchKey(mockDispatch2, { path: path8, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path8); 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: path7 }) => matchValue(safeUrl(path7), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path8 }) => matchValue(safeUrl(path8), 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: path7, method, body, headers, query } = opts; + const { path: path8, method, body, headers, query } = opts; return { - path: path7, + path: path8, method, body, headers, @@ -32244,10 +32244,10 @@ var require_pending_interceptors_formatter2 = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path7, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path8, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path7, + Path: path8, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -35403,7 +35403,7 @@ var require_fetch2 = __commonJS({ function dispatch({ body }) { const url = requestCurrentURL(request2); const agent = fetchParams.controller.dispatcher; - return new Promise((resolve5, reject) => agent.dispatch( + return new Promise((resolve6, reject) => agent.dispatch( { path: url.pathname + url.search, origin: url.origin, @@ -35479,7 +35479,7 @@ var require_fetch2 = __commonJS({ } } const onError = this.onError.bind(this); - resolve5({ + resolve6({ status, statusText, headersList, @@ -35525,7 +35525,7 @@ var require_fetch2 = __commonJS({ for (let i = 0; i < rawHeaders.length; i += 2) { headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); } - resolve5({ + resolve6({ status, statusText: STATUS_CODES[status], headersList, @@ -37128,9 +37128,9 @@ var require_util14 = __commonJS({ } } } - function validateCookiePath(path7) { - for (let i = 0; i < path7.length; ++i) { - const code = path7.charCodeAt(i); + function validateCookiePath(path8) { + for (let i = 0; i < path8.length; ++i) { + const code = path8.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -39118,8 +39118,8 @@ var require_util16 = __commonJS({ return true; } function delay(ms) { - return new Promise((resolve5) => { - setTimeout(resolve5, ms).unref(); + return new Promise((resolve6) => { + setTimeout(resolve6, ms).unref(); }); } module2.exports = { @@ -39724,11 +39724,11 @@ var require_undici2 = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path7 = opts.path; + let path8 = opts.path; if (!opts.path.startsWith("/")) { - path7 = `/${path7}`; + path8 = `/${path8}`; } - url = new URL(util.parseOrigin(url).origin + path7); + url = new URL(util.parseOrigin(url).origin + path8); } else { if (!opts) { opts = typeof url === "object" ? url : {}; @@ -39842,11 +39842,11 @@ var require_utils4 = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -39862,7 +39862,7 @@ var require_utils4 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -46434,8 +46434,8 @@ var require_light = __commonJS({ return this.Promise.resolve(); } yieldLoop(t = 0) { - return new this.Promise(function(resolve5, reject) { - return setTimeout(resolve5, t); + return new this.Promise(function(resolve6, reject) { + return setTimeout(resolve6, t); }); } computePenalty() { @@ -46646,15 +46646,15 @@ var require_light = __commonJS({ return this._queue.length === 0; } async _tryToRun() { - var args, cb, error3, reject, resolve5, returned, task; + var args, cb, error3, reject, resolve6, returned, task; if (this._running < 1 && this._queue.length > 0) { this._running++; - ({ task, args, resolve: resolve5, reject } = this._queue.shift()); + ({ task, args, resolve: resolve6, reject } = this._queue.shift()); cb = await (async function() { try { returned = await task(...args); return function() { - return resolve5(returned); + return resolve6(returned); }; } catch (error1) { error3 = error1; @@ -46669,13 +46669,13 @@ var require_light = __commonJS({ } } schedule(task, ...args) { - var promise, reject, resolve5; - resolve5 = reject = null; + var promise, reject, resolve6; + resolve6 = reject = null; promise = new this.Promise(function(_resolve, _reject) { - resolve5 = _resolve; + resolve6 = _resolve; return reject = _reject; }); - this._queue.push({ task, args, resolve: resolve5, reject }); + this._queue.push({ task, args, resolve: resolve6, reject }); this._tryToRun(); return promise; } @@ -47076,14 +47076,14 @@ var require_light = __commonJS({ counts = this._states.counts; return counts[0] + counts[1] + counts[2] + counts[3] === at; }; - return new this.Promise((resolve5, reject) => { + return new this.Promise((resolve6, reject) => { if (finished()) { - return resolve5(); + return resolve6(); } else { return this.on("done", () => { if (finished()) { this.removeAllListeners("done"); - return resolve5(); + return resolve6(); } }); } @@ -47176,9 +47176,9 @@ var require_light = __commonJS({ options = parser$5.load(options, this.jobDefaults); } task = (...args2) => { - return new this.Promise(function(resolve5, reject) { + return new this.Promise(function(resolve6, reject) { return fn(...args2, function(...args3) { - return (args3[0] != null ? reject : resolve5)(args3); + return (args3[0] != null ? reject : resolve6)(args3); }); }); }; @@ -47305,14 +47305,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, path7, name, argument) { - if (Array.isArray(path7)) { - this.path = path7; - this.property = path7.reduce(function(sum, item) { + 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) { return sum + makeSuffix(item); }, "instance"); - } else if (path7 !== void 0) { - this.property = path7; + } else if (path8 !== void 0) { + this.property = path8; } if (message) { this.message = message; @@ -47403,28 +47403,28 @@ var require_helpers = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path7, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path8, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path7)) { - this.path = path7; - this.propertyPath = path7.reduce(function(sum, item) { + if (Array.isArray(path8)) { + this.path = path8; + this.propertyPath = path8.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path7; + this.propertyPath = path8; } this.base = base; this.schemas = schemas; }; - SchemaContext.prototype.resolve = function resolve5(target) { + SchemaContext.prototype.resolve = function resolve6(target) { return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path7 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path8 = 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, path7, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema2, this.options, path8, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -48515,7 +48515,7 @@ var require_validator = __commonJS({ } return schema2; }; - Validator2.prototype.resolve = function resolve5(schema2, switchSchema, ctx) { + Validator2.prototype.resolve = function resolve6(schema2, switchSchema, ctx) { switchSchema = ctx.resolve(switchSchema); if (ctx.schemas[switchSchema]) { return { subschema: ctx.schemas[switchSchema], switchSchema }; @@ -48721,21 +48721,21 @@ var require_internal_path_helper = __commonJS({ return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.dirname = dirname3; + exports2.dirname = dirname4; exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; exports2.hasAbsoluteRoot = hasAbsoluteRoot; exports2.hasRoot = hasRoot; exports2.normalizeSeparators = normalizeSeparators; exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; - function dirname3(p) { + function dirname4(p) { p = safeTrimTrailingSeparator(p); if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path7.dirname(p); + let result = path8.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -48772,7 +48772,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 += path7.sep; + root += path8.sep; } return root + itemPath; } @@ -48806,10 +48806,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path7.sep)) { + if (!p.endsWith(path8.sep)) { return p; } - if (p === path7.sep) { + if (p === path8.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -49154,7 +49154,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path7 = (function() { + var path8 = (function() { try { return require("path"); } catch (e) { @@ -49162,7 +49162,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path7.sep; + minimatch.sep = path8.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand2 = require_brace_expansion(); var plTypes = { @@ -49251,8 +49251,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path7.sep !== "/") { - pattern = pattern.split(path7.sep).join("/"); + if (!options.allowWindowsEscape && path8.sep !== "/") { + pattern = pattern.split(path8.sep).join("/"); } this.options = options; this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200; @@ -49623,8 +49623,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path7.sep !== "/") { - f = f.split(path7.sep).join("/"); + if (path8.sep !== "/") { + f = f.split(path8.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -49867,7 +49867,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -49882,12 +49882,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(path7.sep); + this.segments = itemPath.split(path8.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename2 = path7.basename(remaining); + const basename2 = path8.basename(remaining); this.segments.unshift(basename2); remaining = dir; dir = pathHelper.dirname(remaining); @@ -49905,7 +49905,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(path7.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path8.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -49916,12 +49916,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path7.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path8.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path7.sep; + result += path8.sep; } result += this.segments[i]; } @@ -49979,7 +49979,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os2 = __importStar2(require("os")); - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); @@ -50008,7 +50008,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(path7.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path8.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -50032,8 +50032,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path7.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path7.sep}`; + if (!itemPath.endsWith(path8.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path8.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -50068,9 +50068,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(`.${path7.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path8.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path7.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path8.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}'`); @@ -50154,8 +50154,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path7, level) { - this.path = path7; + constructor(path8, level) { + this.path = path8; this.level = level; } }; @@ -50206,11 +50206,11 @@ var require_internal_globber = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -50226,7 +50226,7 @@ var require_internal_globber = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -50239,14 +50239,14 @@ var require_internal_globber = __commonJS({ }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve5, reject) { - v = o[n](v), settle(resolve5, reject, v.done, v.value); + return new Promise(function(resolve6, reject) { + v = o[n](v), settle(resolve6, reject, v.done, v.value); }); }; } - function settle(resolve5, reject, d, v) { + function settle(resolve6, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve5({ value: v2, done: d }); + resolve6({ value: v2, done: d }); }, reject); } }; @@ -50299,7 +50299,7 @@ var require_internal_globber = __commonJS({ var core15 = __importStar2(require_core()); var fs8 = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); - var path7 = __importStar2(require("path")); + var path8 = __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(); @@ -50375,7 +50375,7 @@ var require_internal_globber = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path7.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path8.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -50385,7 +50385,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await2(fs8.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path7.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs8.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path8.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); @@ -50496,11 +50496,11 @@ var require_internal_hash_files = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -50516,7 +50516,7 @@ var require_internal_hash_files = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -50529,14 +50529,14 @@ var require_internal_hash_files = __commonJS({ }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve5, reject) { - v = o[n](v), settle(resolve5, reject, v.done, v.value); + return new Promise(function(resolve6, reject) { + v = o[n](v), settle(resolve6, reject, v.done, v.value); }); }; } - function settle(resolve5, reject, d, v) { + function settle(resolve6, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve5({ value: v2, done: d }); + resolve6({ value: v2, done: d }); }, reject); } }; @@ -50547,7 +50547,7 @@ var require_internal_hash_files = __commonJS({ var fs8 = __importStar2(require("fs")); var stream = __importStar2(require("stream")); var util = __importStar2(require("util")); - var path7 = __importStar2(require("path")); + var path8 = __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; @@ -50563,7 +50563,7 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path7.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path8.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } @@ -50608,11 +50608,11 @@ var require_glob = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -50628,7 +50628,7 @@ var require_glob = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -51888,11 +51888,11 @@ var require_cacheUtils = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -51908,7 +51908,7 @@ var require_cacheUtils = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -51921,14 +51921,14 @@ var require_cacheUtils = __commonJS({ }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve5, reject) { - v = o[n](v), settle(resolve5, reject, v.done, v.value); + return new Promise(function(resolve6, reject) { + v = o[n](v), settle(resolve6, reject, v.done, v.value); }); }; } - function settle(resolve5, reject, d, v) { + function settle(resolve6, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve5({ value: v2, done: d }); + resolve6({ value: v2, done: d }); }, reject); } }; @@ -51949,7 +51949,7 @@ var require_cacheUtils = __commonJS({ var io6 = __importStar2(require_io()); var crypto2 = __importStar2(require("crypto")); var fs8 = __importStar2(require("fs")); - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var semver9 = __importStar2(require_semver3()); var util = __importStar2(require("util")); var constants_1 = require_constants12(); @@ -51969,9 +51969,9 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path7.join(baseLocation, "actions", "temp"); + tempDirectory = path8.join(baseLocation, "actions", "temp"); } - const dest = path7.join(tempDirectory, crypto2.randomUUID()); + const dest = path8.join(tempDirectory, crypto2.randomUUID()); yield io6.mkdirP(dest); return dest; }); @@ -51993,7 +51993,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path7.relative(workspace, file).replace(new RegExp(`\\${path7.sep}`, "g"), "/"); + const relativeFile = path8.relative(workspace, file).replace(new RegExp(`\\${path8.sep}`, "g"), "/"); core15.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -52210,11 +52210,11 @@ function __metadata(metadataKey, metadataValue) { } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -52230,7 +52230,7 @@ function __awaiter(thisArg, _arguments, P, generator) { } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -52421,14 +52421,14 @@ function __asyncValues(o) { }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve5, reject) { - v = o[n](v), settle(resolve5, reject, v.done, v.value); + return new Promise(function(resolve6, reject) { + v = o[n](v), settle(resolve6, reject, v.done, v.value); }); }; } - function settle(resolve5, reject, d, v) { + function settle(resolve6, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve5({ value: v2, done: d }); + resolve6({ value: v2, done: d }); }, reject); } } @@ -52520,13 +52520,13 @@ function __disposeResources(env) { } return next(); } -function __rewriteRelativeImportExtension(path7, preserveJsx) { - if (typeof path7 === "string" && /^\.\.?\//.test(path7)) { - return path7.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { +function __rewriteRelativeImportExtension(path8, preserveJsx) { + if (typeof path8 === "string" && /^\.\.?\//.test(path8)) { + return path8.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 path7; + return path8; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -53600,9 +53600,9 @@ var require_nodeHttpClient = __commonJS({ if (stream.readable === false) { return Promise.resolve(); } - return new Promise((resolve5) => { + return new Promise((resolve6) => { const handler2 = () => { - resolve5(); + resolve6(); stream.removeListener("close", handler2); stream.removeListener("end", handler2); stream.removeListener("error", handler2); @@ -53757,8 +53757,8 @@ var require_nodeHttpClient = __commonJS({ headers: request2.headers.toJSON({ preserveCase: true }), ...request2.requestOverrides }; - return new Promise((resolve5, reject) => { - const req = isInsecure ? node_http_1.default.request(options, resolve5) : node_https_1.default.request(options, resolve5); + return new Promise((resolve6, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve6) : node_https_1.default.request(options, resolve6); req.once("error", (err) => { reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request: request2 })); }); @@ -53842,7 +53842,7 @@ var require_nodeHttpClient = __commonJS({ return stream; } function streamToText(stream) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { const buffer = []; stream.on("data", (chunk) => { if (Buffer.isBuffer(chunk)) { @@ -53852,7 +53852,7 @@ var require_nodeHttpClient = __commonJS({ } }); stream.on("end", () => { - resolve5(Buffer.concat(buffer).toString("utf8")); + resolve6(Buffer.concat(buffer).toString("utf8")); }); stream.on("error", (e) => { if (e && e?.name === "AbortError") { @@ -54130,7 +54130,7 @@ var require_helpers2 = __commonJS({ var AbortError_js_1 = require_AbortError(); var StandardAbortMessage = "The operation was aborted."; function delay(delayInMs, value, options) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { let timer = void 0; let onAborted = void 0; const rejectOnAbort = () => { @@ -54153,7 +54153,7 @@ var require_helpers2 = __commonJS({ } timer = setTimeout(() => { removeListeners(); - resolve5(value); + resolve6(value); }, delayInMs); if (options?.abortSignal) { options.abortSignal.addEventListener("abort", onAborted); @@ -55316,8 +55316,8 @@ var require_helpers3 = __commonJS({ function req(url, opts = {}) { const href = typeof url === "string" ? url : url.href; const req2 = (href.startsWith("https:") ? https2 : http).request(url, opts); - const promise = new Promise((resolve5, reject) => { - req2.once("response", resolve5).once("error", reject).end(); + const promise = new Promise((resolve6, reject) => { + req2.once("response", resolve6).once("error", reject).end(); }); req2.then = promise.then.bind(promise); return req2; @@ -55494,7 +55494,7 @@ var require_parse_proxy_response = __commonJS({ var debug_1 = __importDefault2(require_src()); var debug4 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { let buffersLength = 0; const buffers = []; function read() { @@ -55560,7 +55560,7 @@ var require_parse_proxy_response = __commonJS({ } debug4("got proxy server response: %o %o", firstLine, headers); cleanup(); - resolve5({ + resolve6({ connect: { statusCode, statusText, @@ -56940,8 +56940,8 @@ var require_getClient = __commonJS({ } const { allowInsecureConnection, httpClient } = clientOptions; const endpointUrl = clientOptions.endpoint ?? endpoint2; - const client = (path7, ...args) => { - const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path7, args, { allowInsecureConnection, ...requestOptions }); + const client = (path8, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path8, args, { allowInsecureConnection, ...requestOptions }); return { get: (requestOptions = {}) => { return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); @@ -57646,7 +57646,7 @@ var require_createAbortablePromise = __commonJS({ var abort_controller_1 = require_commonjs3(); function createAbortablePromise(buildPromise, options) { const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { function rejectOnAbort() { reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); } @@ -57664,7 +57664,7 @@ var require_createAbortablePromise = __commonJS({ try { buildPromise((x) => { removeListeners(); - resolve5(x); + resolve6(x); }, (x) => { removeListeners(); reject(x); @@ -57691,8 +57691,8 @@ var require_delay2 = __commonJS({ function delay(timeInMs, options) { let token; const { abortSignal, abortErrorMsg } = options ?? {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve5) => { - token = setTimeout(resolve5, timeInMs); + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve6) => { + token = setTimeout(resolve6, timeInMs); }, { cleanupBeforeAbort: () => clearTimeout(token), abortSignal, @@ -60812,15 +60812,15 @@ var require_urlHelpers2 = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path7 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path7.startsWith("/")) { - path7 = path7.substring(1); + let path8 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path8.startsWith("/")) { + path8 = path8.substring(1); } - if (isAbsoluteUrl(path7)) { - requestUrl = path7; + if (isAbsoluteUrl(path8)) { + requestUrl = path8; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path7); + requestUrl = appendPath(requestUrl, path8); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -60866,9 +60866,9 @@ var require_urlHelpers2 = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path7 = pathToAppend.substring(0, searchStart); + const path8 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path7; + newPath = newPath + path8; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -63545,10 +63545,10 @@ var require_utils_common = __commonJS({ var constants_js_1 = require_constants15(); function escapeURLPath(url) { const urlParsed = new URL(url); - let path7 = urlParsed.pathname; - path7 = path7 || "/"; - path7 = escape(path7); - urlParsed.pathname = path7; + let path8 = urlParsed.pathname; + path8 = path8 || "/"; + path8 = escape(path8); + urlParsed.pathname = path8; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -63633,9 +63633,9 @@ var require_utils_common = __commonJS({ } function appendToURLPath(url, name) { const urlParsed = new URL(url); - let path7 = urlParsed.pathname; - path7 = path7 ? path7.endsWith("/") ? `${path7}${name}` : `${path7}/${name}` : name; - urlParsed.pathname = path7; + let path8 = urlParsed.pathname; + path8 = path8 ? path8.endsWith("/") ? `${path8}${name}` : `${path8}/${name}` : name; + urlParsed.pathname = path8; return urlParsed.toString(); } function setURLParameter(url, name, value) { @@ -63750,7 +63750,7 @@ var require_utils_common = __commonJS({ return base64encode(res); } async function delay(timeInMs, aborter, abortError) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { let timeout; const abortHandler = () => { if (timeout !== void 0) { @@ -63762,7 +63762,7 @@ var require_utils_common = __commonJS({ if (aborter !== void 0) { aborter.removeEventListener("abort", abortHandler); } - resolve5(); + resolve6(); }; timeout = setTimeout(resolveHandler, timeInMs); if (aborter !== void 0) { @@ -64862,9 +64862,9 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path7 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path8 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path7}`; + canonicalizedResourceString += `/${this.factory.accountName}${path8}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -65303,7 +65303,7 @@ var require_BufferScheduler = __commonJS({ * */ async do() { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { this.readable.on("data", (data) => { data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; this.appendUnresolvedData(data); @@ -65331,11 +65331,11 @@ var require_BufferScheduler = __commonJS({ if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { const buffer = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve5).catch(reject); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve6).catch(reject); } else if (this.unresolvedLength >= this.bufferSize) { return; } else { - resolve5(); + resolve6(); } } }); @@ -65603,10 +65603,10 @@ var require_utils_common2 = __commonJS({ var constants_js_1 = require_constants16(); function escapeURLPath(url) { const urlParsed = new URL(url); - let path7 = urlParsed.pathname; - path7 = path7 || "/"; - path7 = escape(path7); - urlParsed.pathname = path7; + let path8 = urlParsed.pathname; + path8 = path8 || "/"; + path8 = escape(path8); + urlParsed.pathname = path8; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -65691,9 +65691,9 @@ var require_utils_common2 = __commonJS({ } function appendToURLPath(url, name) { const urlParsed = new URL(url); - let path7 = urlParsed.pathname; - path7 = path7 ? path7.endsWith("/") ? `${path7}${name}` : `${path7}/${name}` : name; - urlParsed.pathname = path7; + let path8 = urlParsed.pathname; + path8 = path8 ? path8.endsWith("/") ? `${path8}${name}` : `${path8}/${name}` : name; + urlParsed.pathname = path8; return urlParsed.toString(); } function setURLParameter(url, name, value) { @@ -65808,7 +65808,7 @@ var require_utils_common2 = __commonJS({ return base64encode(res); } async function delay(timeInMs, aborter, abortError) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { let timeout; const abortHandler = () => { if (timeout !== void 0) { @@ -65820,7 +65820,7 @@ var require_utils_common2 = __commonJS({ if (aborter !== void 0) { aborter.removeEventListener("abort", abortHandler); } - resolve5(); + resolve6(); }; timeout = setTimeout(resolveHandler, timeInMs); if (aborter !== void 0) { @@ -66614,9 +66614,9 @@ var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path7 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path8 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path7}`; + canonicalizedResourceString += `/${this.factory.accountName}${path8}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67246,9 +67246,9 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path7 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path8 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path7}`; + canonicalizedResourceString += `/${options.accountName}${path8}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67593,9 +67593,9 @@ var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path7 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path8 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path7}`; + canonicalizedResourceString += `/${options.accountName}${path8}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -84018,7 +84018,7 @@ var require_AvroReadableFromStream = __commonJS({ this._position += chunk.length; return this.toUint8Array(chunk); } else { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { const cleanUp = () => { this._readable.removeListener("readable", readableCallback); this._readable.removeListener("error", rejectCallback); @@ -84033,7 +84033,7 @@ var require_AvroReadableFromStream = __commonJS({ if (callbackChunk) { this._position += callbackChunk.length; cleanUp(); - resolve5(this.toUint8Array(callbackChunk)); + resolve6(this.toUint8Array(callbackChunk)); } }; const rejectCallback = () => { @@ -85513,8 +85513,8 @@ var require_poller3 = __commonJS({ this.stopped = true; this.pollProgressCallbacks = []; this.operation = operation; - this.promise = new Promise((resolve5, reject) => { - this.resolve = resolve5; + this.promise = new Promise((resolve6, reject) => { + this.resolve = resolve6; this.reject = reject; }); this.promise.catch(() => { @@ -85767,7 +85767,7 @@ var require_lroEngine = __commonJS({ * The method used by the poller to wait before attempting to update its operation. */ delay() { - return new Promise((resolve5) => setTimeout(() => resolve5(), this.config.intervalInMs)); + return new Promise((resolve6) => setTimeout(() => resolve6(), this.config.intervalInMs)); } }; exports2.LroEngine = LroEngine; @@ -86013,8 +86013,8 @@ var require_Batch = __commonJS({ return Promise.resolve(); } this.parallelExecute(); - return new Promise((resolve5, reject) => { - this.emitter.on("finish", resolve5); + return new Promise((resolve6, reject) => { + this.emitter.on("finish", resolve6); this.emitter.on("error", (error3) => { this.state = BatchStates.Error; reject(error3); @@ -86075,12 +86075,12 @@ var require_utils7 = __commonJS({ async function streamToBuffer(stream, buffer, offset, end, encoding) { let pos = 0; const count = end - offset; - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); stream.on("readable", () => { if (pos >= count) { clearTimeout(timeout); - resolve5(); + resolve6(); return; } let chunk = stream.read(); @@ -86099,7 +86099,7 @@ var require_utils7 = __commonJS({ if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } - resolve5(); + resolve6(); }); stream.on("error", (msg) => { clearTimeout(timeout); @@ -86110,7 +86110,7 @@ var require_utils7 = __commonJS({ async function streamToBuffer2(stream, buffer, encoding) { let pos = 0; const bufferSize = buffer.length; - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { stream.on("readable", () => { let chunk = stream.read(); if (!chunk) { @@ -86127,25 +86127,25 @@ var require_utils7 = __commonJS({ pos += chunk.length; }); stream.on("end", () => { - resolve5(pos); + resolve6(pos); }); stream.on("error", reject); }); } async function streamToBuffer3(readableStream, encoding) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { const chunks = []; readableStream.on("data", (data) => { chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); }); readableStream.on("end", () => { - resolve5(Buffer.concat(chunks)); + resolve6(Buffer.concat(chunks)); }); readableStream.on("error", reject); }); } async function readStreamToLocalFile(rs, file) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { const ws = node_fs_1.default.createWriteStream(file); rs.on("error", (err) => { reject(err); @@ -86153,7 +86153,7 @@ var require_utils7 = __commonJS({ ws.on("error", (err) => { reject(err); }); - ws.on("close", resolve5); + ws.on("close", resolve6); rs.pipe(ws); }); } @@ -87092,7 +87092,7 @@ var require_Clients = __commonJS({ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { - return new Promise((resolve5) => { + return new Promise((resolve6) => { if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } @@ -87103,7 +87103,7 @@ var require_Clients = __commonJS({ versionId: this._versionId, ...options }, this.credential).toString(); - resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve6((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -87142,7 +87142,7 @@ var require_Clients = __commonJS({ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateUserDelegationSasUrl(options, userDelegationKey) { - return new Promise((resolve5) => { + return new Promise((resolve6) => { const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ containerName: this._containerName, blobName: this._name, @@ -87150,7 +87150,7 @@ var require_Clients = __commonJS({ versionId: this._versionId, ...options }, userDelegationKey, this.accountName).toString(); - resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve6((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -89005,14 +89005,14 @@ var require_Mutex = __commonJS({ * @param key - lock key */ static async lock(key) { - return new Promise((resolve5) => { + return new Promise((resolve6) => { if (this.keys[key] === void 0 || this.keys[key] === MutexLockStatus.UNLOCKED) { this.keys[key] = MutexLockStatus.LOCKED; - resolve5(); + resolve6(); } else { this.onUnlockEvent(key, () => { this.keys[key] = MutexLockStatus.LOCKED; - resolve5(); + resolve6(); }); } }); @@ -89023,12 +89023,12 @@ var require_Mutex = __commonJS({ * @param key - */ static async unlock(key) { - return new Promise((resolve5) => { + return new Promise((resolve6) => { if (this.keys[key] === MutexLockStatus.LOCKED) { this.emitUnlockEvent(key); } delete this.keys[key]; - resolve5(); + resolve6(); }); } static keys = {}; @@ -89250,8 +89250,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 path7 = (0, utils_common_js_1.getURLPath)(subRequest.url); - if (!path7 || path7 === "") { + const path8 = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path8 || path8 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -89329,8 +89329,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 path7 = (0, utils_common_js_1.getURLPath)(url); - if (path7 && path7 !== "/") { + const path8 = (0, utils_common_js_1.getURLPath)(url); + if (path8 && path8 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -90631,7 +90631,7 @@ var require_ContainerClient = __commonJS({ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { - return new Promise((resolve5) => { + return new Promise((resolve6) => { if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } @@ -90639,7 +90639,7 @@ var require_ContainerClient = __commonJS({ containerName: this._containerName, ...options }, this.credential).toString(); - resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve6((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -90674,12 +90674,12 @@ var require_ContainerClient = __commonJS({ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateUserDelegationSasUrl(options, userDelegationKey) { - return new Promise((resolve5) => { + return new Promise((resolve6) => { const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ containerName: this._containerName, ...options }, userDelegationKey, this.accountName).toString(); - resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve6((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -92075,11 +92075,11 @@ var require_uploadUtils = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -92095,7 +92095,7 @@ var require_uploadUtils = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -92262,11 +92262,11 @@ var require_requestUtils = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -92282,7 +92282,7 @@ var require_requestUtils = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -92322,7 +92322,7 @@ var require_requestUtils = __commonJS({ } function sleep(milliseconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5) => setTimeout(resolve5, milliseconds)); + return new Promise((resolve6) => setTimeout(resolve6, milliseconds)); }); } function retry2(name_1, method_1, getStatusCode_1) { @@ -92583,11 +92583,11 @@ var require_downloadUtils = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -92603,7 +92603,7 @@ var require_downloadUtils = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -92899,8 +92899,8 @@ var require_downloadUtils = __commonJS({ } var promiseWithTimeout = (timeoutMs, promise) => __awaiter2(void 0, void 0, void 0, function* () { let timeoutHandle; - const timeoutPromise = new Promise((resolve5) => { - timeoutHandle = setTimeout(() => resolve5("timeout"), timeoutMs); + const timeoutPromise = new Promise((resolve6) => { + timeoutHandle = setTimeout(() => resolve6("timeout"), timeoutMs); }); return Promise.race([promise, timeoutPromise]).then((result) => { clearTimeout(timeoutHandle); @@ -93181,11 +93181,11 @@ var require_cacheHttpClient = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -93201,7 +93201,7 @@ var require_cacheHttpClient = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -96671,8 +96671,8 @@ var require_deferred = __commonJS({ */ constructor(preventUnhandledRejectionWarning = true) { this._state = DeferredState.PENDING; - this._promise = new Promise((resolve5, reject) => { - this._resolve = resolve5; + this._promise = new Promise((resolve6, reject) => { + this._resolve = resolve6; this._reject = reject; }); if (preventUnhandledRejectionWarning) { @@ -96887,11 +96887,11 @@ var require_unary_call = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -96907,7 +96907,7 @@ var require_unary_call = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -96956,11 +96956,11 @@ var require_server_streaming_call = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -96976,7 +96976,7 @@ var require_server_streaming_call = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -97026,11 +97026,11 @@ var require_client_streaming_call = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -97046,7 +97046,7 @@ var require_client_streaming_call = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -97095,11 +97095,11 @@ var require_duplex_streaming_call = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -97115,7 +97115,7 @@ var require_duplex_streaming_call = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -97163,11 +97163,11 @@ var require_test_transport = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -97183,7 +97183,7 @@ var require_test_transport = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -97380,11 +97380,11 @@ var require_test_transport = __commonJS({ responseTrailer: "test" }; function delay(ms, abort) { - return (v) => new Promise((resolve5, reject) => { + return (v) => new Promise((resolve6, reject) => { if (abort === null || abort === void 0 ? void 0 : abort.aborted) { reject(new rpc_error_1.RpcError("user cancel", "CANCELLED")); } else { - const id = setTimeout(() => resolve5(v), ms); + const id = setTimeout(() => resolve6(v), ms); if (abort) { abort.addEventListener("abort", (ev) => { clearTimeout(id); @@ -98382,11 +98382,11 @@ var require_cacheTwirpClient = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -98402,7 +98402,7 @@ var require_cacheTwirpClient = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -98542,7 +98542,7 @@ var require_cacheTwirpClient = __commonJS({ } sleep(milliseconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5) => setTimeout(resolve5, milliseconds)); + return new Promise((resolve6) => setTimeout(resolve6, milliseconds)); }); } getExponentialRetryTimeMilliseconds(attempt) { @@ -98607,11 +98607,11 @@ var require_tar = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -98627,7 +98627,7 @@ var require_tar = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -98639,7 +98639,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io6 = __importStar2(require_io()); var fs_1 = require("fs"); - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants12(); var IS_WINDOWS = process.platform === "win32"; @@ -98685,13 +98685,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(`\\${path7.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path7.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path7.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + 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); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path7.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path7.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path8.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path8.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path7.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path8.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -98737,7 +98737,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path7.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path8.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -98746,7 +98746,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path7.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path8.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -98761,7 +98761,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path7.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path8.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -98770,7 +98770,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path7.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path8.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -98808,7 +98808,7 @@ var require_tar = __commonJS({ } function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path7.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path8.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -98859,11 +98859,11 @@ var require_cache5 = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -98879,7 +98879,7 @@ var require_cache5 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -98890,7 +98890,7 @@ var require_cache5 = __commonJS({ exports2.restoreCache = restoreCache5; exports2.saveCache = saveCache5; var core15 = __importStar2(require_core()); - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); @@ -98985,7 +98985,7 @@ var require_cache5 = __commonJS({ core15.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path7.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path8.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core15.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core15.isDebug()) { @@ -99054,7 +99054,7 @@ var require_cache5 = __commonJS({ core15.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path7.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path8.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core15.debug(`Archive path: ${archivePath}`); core15.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -99116,7 +99116,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 = path7.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path8.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core15.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99180,7 +99180,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 = path7.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path8.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core15.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99297,11 +99297,11 @@ var require_manifest = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -99317,7 +99317,7 @@ var require_manifest = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -99445,11 +99445,11 @@ var require_retry_helper = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -99465,7 +99465,7 @@ var require_retry_helper = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -99510,7 +99510,7 @@ var require_retry_helper = __commonJS({ } sleep(seconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5) => setTimeout(resolve5, seconds * 1e3)); + return new Promise((resolve6) => setTimeout(resolve6, seconds * 1e3)); }); } }; @@ -99561,11 +99561,11 @@ var require_tool_cache = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -99581,7 +99581,7 @@ var require_tool_cache = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -99607,7 +99607,7 @@ var require_tool_cache = __commonJS({ var fs8 = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os2 = __importStar2(require("os")); - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver9 = __importStar2(require_semver2()); var stream = __importStar2(require("stream")); @@ -99628,8 +99628,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 || path7.join(_getTempDirectory(), crypto2.randomUUID()); - yield io6.mkdirP(path7.dirname(dest)); + dest = dest || path8.join(_getTempDirectory(), crypto2.randomUUID()); + yield io6.mkdirP(path8.dirname(dest)); core15.debug(`Downloading ${url}`); core15.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -99719,7 +99719,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path7.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path8.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}'`; @@ -99891,7 +99891,7 @@ var require_tool_cache = __commonJS({ } const destPath = yield _createToolPath(tool, version, arch); for (const itemName of fs8.readdirSync(sourceDir)) { - const s = path7.join(sourceDir, itemName); + const s = path8.join(sourceDir, itemName); yield io6.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch); @@ -99908,7 +99908,7 @@ var require_tool_cache = __commonJS({ throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch); - const destPath = path7.join(destFolder, targetFile); + const destPath = path8.join(destFolder, targetFile); core15.debug(`destination file ${destPath}`); yield io6.cp(sourceFile, destPath); _completeToolPath(tool, version, arch); @@ -99931,7 +99931,7 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver9.clean(versionSpec) || ""; - const cachePath = path7.join(_getCacheDirectory(), toolName, versionSpec, arch); + const cachePath = path8.join(_getCacheDirectory(), toolName, versionSpec, arch); core15.debug(`checking cache: ${cachePath}`); if (fs8.existsSync(cachePath) && fs8.existsSync(`${cachePath}.complete`)) { core15.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); @@ -99945,12 +99945,12 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch) { const versions = []; arch = arch || os2.arch(); - const toolPath = path7.join(_getCacheDirectory(), toolName); + const toolPath = path8.join(_getCacheDirectory(), toolName); if (fs8.existsSync(toolPath)) { const children = fs8.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path7.join(toolPath, child, arch || ""); + const fullPath = path8.join(toolPath, child, arch || ""); if (fs8.existsSync(fullPath) && fs8.existsSync(`${fullPath}.complete`)) { versions.push(child); } @@ -100002,7 +100002,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path7.join(_getTempDirectory(), crypto2.randomUUID()); + dest = path8.join(_getTempDirectory(), crypto2.randomUUID()); } yield io6.mkdirP(dest); return dest; @@ -100010,7 +100010,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch) { return __awaiter2(this, void 0, void 0, function* () { - const folderPath = path7.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch || ""); + const folderPath = path8.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch || ""); core15.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io6.rmRF(folderPath); @@ -100020,7 +100020,7 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch) { - const folderPath = path7.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch || ""); + const folderPath = path8.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch || ""); const markerPath = `${folderPath}.complete`; fs8.writeFileSync(markerPath, ""); core15.debug("finished caching tool"); @@ -100540,8 +100540,8 @@ var require_follow_redirects = __commonJS({ } return parsed; } - function resolveUrl(relative2, base) { - return useNativeURL ? new URL2(relative2, base) : parseUrl2(url.resolve(base, relative2)); + function resolveUrl(relative3, base) { + return useNativeURL ? new URL2(relative3, base) : parseUrl2(url.resolve(base, relative3)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -102802,13 +102802,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(path7) { - if (!path7) { + function validateFilePath(path8) { + if (!path8) { throw new Error(`Provided file path input during validation is empty`); } for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) { - if (path7.includes(invalidCharacterKey)) { - throw new Error(`The path for one of the files in artifact is not valid: ${path7}. Contains the following character: ${errorMessageForCharacter} + if (path8.includes(invalidCharacterKey)) { + throw new Error(`The path for one of the files in artifact is not valid: ${path8}. Contains the following character: ${errorMessageForCharacter} Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()} @@ -103150,11 +103150,11 @@ var require_artifact_twirp_client2 = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -103170,7 +103170,7 @@ var require_artifact_twirp_client2 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -103297,7 +103297,7 @@ var require_artifact_twirp_client2 = __commonJS({ } sleep(milliseconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5) => setTimeout(resolve5, milliseconds)); + return new Promise((resolve6) => setTimeout(resolve6, milliseconds)); }); } getExponentialRetryTimeMilliseconds(attempt) { @@ -103438,11 +103438,11 @@ var require_blob_upload = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -103458,7 +103458,7 @@ var require_blob_upload = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -103477,7 +103477,7 @@ var require_blob_upload = __commonJS({ let lastProgressTime = Date.now(); const abortController = new AbortController(); const chunkTimer = (interval) => __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { const timer = setInterval(() => { if (Date.now() - lastProgressTime > interval) { reject(new Error("Upload progress stalled.")); @@ -103485,7 +103485,7 @@ var require_blob_upload = __commonJS({ }, interval); abortController.signal.addEventListener("abort", () => { clearInterval(timer); - resolve5(); + resolve6(); }); }); }); @@ -103709,8 +103709,8 @@ var require_minimatch2 = __commonJS({ return new Minimatch(pattern, options).match(p); }; module2.exports = minimatch; - var path7 = require_path(); - minimatch.sep = path7.sep; + var path8 = require_path(); + minimatch.sep = path8.sep; var GLOBSTAR = /* @__PURE__ */ Symbol("globstar **"); minimatch.GLOBSTAR = GLOBSTAR; var expand2 = require_brace_expansion2(); @@ -104316,8 +104316,8 @@ var require_minimatch2 = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; const options = this.options; - if (path7.sep !== "/") { - f = f.split(path7.sep).join("/"); + if (path8.sep !== "/") { + f = f.split(path8.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -104358,9 +104358,9 @@ var require_readdir_glob = __commonJS({ var fs8 = require("fs"); var { EventEmitter } = require("events"); var { Minimatch } = require_minimatch2(); - var { resolve: resolve5 } = require("path"); + var { resolve: resolve6 } = require("path"); function readdir(dir, strict) { - return new Promise((resolve6, reject) => { + return new Promise((resolve7, reject) => { fs8.readdir(dir, { withFileTypes: true }, (err, files) => { if (err) { switch (err.code) { @@ -104368,7 +104368,7 @@ var require_readdir_glob = __commonJS({ if (strict) { reject(err); } else { - resolve6([]); + resolve7([]); } break; case "ENOTSUP": @@ -104378,7 +104378,7 @@ var require_readdir_glob = __commonJS({ case "ENAMETOOLONG": // Filename too long case "UNKNOWN": - resolve6([]); + resolve7([]); break; case "ELOOP": // Too many levels of symbolic links @@ -104387,36 +104387,36 @@ var require_readdir_glob = __commonJS({ break; } } else { - resolve6(files); + resolve7(files); } }); }); } function stat(file, followSymlinks) { - return new Promise((resolve6, reject) => { + return new Promise((resolve7, reject) => { const statFunc = followSymlinks ? fs8.stat : fs8.lstat; statFunc(file, (err, stats) => { if (err) { switch (err.code) { case "ENOENT": if (followSymlinks) { - resolve6(stat(file, false)); + resolve7(stat(file, false)); } else { - resolve6(null); + resolve7(null); } break; default: - resolve6(null); + resolve7(null); break; } } else { - resolve6(stats); + resolve7(stats); } }); }); } - async function* exploreWalkAsync(dir, path7, followSymlinks, useStat, shouldSkip, strict) { - let files = await readdir(path7 + dir, strict); + async function* exploreWalkAsync(dir, path8, followSymlinks, useStat, shouldSkip, strict) { + let files = await readdir(path8 + dir, strict); for (const file of files) { let name = file.name; if (name === void 0) { @@ -104424,8 +104424,8 @@ var require_readdir_glob = __commonJS({ useStat = true; } const filename = dir + "/" + name; - const relative2 = filename.slice(1); - const absolute = path7 + "/" + relative2; + const relative3 = filename.slice(1); + const absolute = path8 + "/" + relative3; let stats = null; if (useStat || followSymlinks) { stats = await stat(absolute, followSymlinks); @@ -104437,17 +104437,17 @@ var require_readdir_glob = __commonJS({ stats = { isDirectory: () => false }; } if (stats.isDirectory()) { - if (!shouldSkip(relative2)) { - yield { relative: relative2, absolute, stats }; - yield* exploreWalkAsync(filename, path7, followSymlinks, useStat, shouldSkip, false); + if (!shouldSkip(relative3)) { + yield { relative: relative3, absolute, stats }; + yield* exploreWalkAsync(filename, path8, followSymlinks, useStat, shouldSkip, false); } } else { - yield { relative: relative2, absolute, stats }; + yield { relative: relative3, absolute, stats }; } } } - async function* explore(path7, followSymlinks, useStat, shouldSkip) { - yield* exploreWalkAsync("", path7, followSymlinks, useStat, shouldSkip, true); + async function* explore(path8, followSymlinks, useStat, shouldSkip) { + yield* exploreWalkAsync("", path8, followSymlinks, useStat, shouldSkip, true); } function readOptions(options) { return { @@ -104500,7 +104500,7 @@ var require_readdir_glob = __commonJS({ (skip) => new Minimatch(skip, { dot: true }) ); } - this.iterator = explore(resolve5(cwd || "."), this.options.follow, this.options.stat, this._shouldSkipDirectory.bind(this)); + this.iterator = explore(resolve6(cwd || "."), this.options.follow, this.options.stat, this._shouldSkipDirectory.bind(this)); this.paused = false; this.inactive = false; this.aborted = false; @@ -104512,11 +104512,11 @@ var require_readdir_glob = __commonJS({ } setTimeout(() => this._next(), 0); } - _shouldSkipDirectory(relative2) { - return this.skipMatchers.some((m) => m.match(relative2)); + _shouldSkipDirectory(relative3) { + return this.skipMatchers.some((m) => m.match(relative3)); } - _fileMatches(relative2, isDirectory) { - const file = relative2 + (isDirectory ? "/" : ""); + _fileMatches(relative3, isDirectory) { + const file = relative3 + (isDirectory ? "/" : ""); return (this.matchers.length === 0 || this.matchers.some((m) => m.match(file))) && !this.ignoreMatchers.some((m) => m.match(file)) && (!this.options.nodir || !isDirectory); } _next() { @@ -104525,16 +104525,16 @@ var require_readdir_glob = __commonJS({ if (!obj.done) { const isDirectory = obj.value.stats.isDirectory(); if (this._fileMatches(obj.value.relative, isDirectory)) { - let relative2 = obj.value.relative; + let relative3 = obj.value.relative; let absolute = obj.value.absolute; if (this.options.mark && isDirectory) { - relative2 += "/"; + relative3 += "/"; absolute += "/"; } if (this.options.stat) { - this.emit("match", { relative: relative2, absolute, stat: obj.value.stats }); + this.emit("match", { relative: relative3, absolute, stat: obj.value.stats }); } else { - this.emit("match", { relative: relative2, absolute }); + this.emit("match", { relative: relative3, absolute }); } } this._next(this.iterator); @@ -104667,10 +104667,10 @@ var require_async = __commonJS({ if (typeof args[arity - 1] === "function") { return asyncFn.apply(this, args); } - return new Promise((resolve5, reject2) => { + return new Promise((resolve6, reject2) => { args[arity - 1] = (err, ...cbArgs) => { if (err) return reject2(err); - resolve5(cbArgs.length > 1 ? cbArgs : cbArgs[0]); + resolve6(cbArgs.length > 1 ? cbArgs : cbArgs[0]); }; asyncFn.apply(this, args); }); @@ -104916,13 +104916,13 @@ var require_async = __commonJS({ var applyEachSeries = applyEach$1(mapSeries$1); const PROMISE_SYMBOL = /* @__PURE__ */ Symbol("promiseCallback"); function promiseCallback() { - let resolve5, reject2; + let resolve6, reject2; function callback(err, ...args) { if (err) return reject2(err); - resolve5(args.length > 1 ? args : args[0]); + resolve6(args.length > 1 ? args : args[0]); } callback[PROMISE_SYMBOL] = new Promise((res, rej) => { - resolve5 = res, reject2 = rej; + resolve6 = res, reject2 = rej; }); return callback; } @@ -105269,8 +105269,8 @@ var require_async = __commonJS({ }); } if (rejectOnError || !callback) { - return new Promise((resolve5, reject2) => { - res = resolve5; + return new Promise((resolve6, reject2) => { + res = resolve6; rej = reject2; }); } @@ -105309,10 +105309,10 @@ var require_async = __commonJS({ } const eventMethod = (name) => (handler2) => { if (!handler2) { - return new Promise((resolve5, reject2) => { + return new Promise((resolve6, reject2) => { once2(name, (err, data) => { if (err) return reject2(err); - resolve5(data); + resolve6(data); }); }); } @@ -106485,14 +106485,14 @@ var require_polyfills = __commonJS({ fs8.fstatSync = statFixSync(fs8.fstatSync); fs8.lstatSync = statFixSync(fs8.lstatSync); if (fs8.chmod && !fs8.lchmod) { - fs8.lchmod = function(path7, mode, cb) { + fs8.lchmod = function(path8, mode, cb) { if (cb) process.nextTick(cb); }; fs8.lchmodSync = function() { }; } if (fs8.chown && !fs8.lchown) { - fs8.lchown = function(path7, uid, gid, cb) { + fs8.lchown = function(path8, uid, gid, cb) { if (cb) process.nextTick(cb); }; fs8.lchownSync = function() { @@ -106559,9 +106559,9 @@ var require_polyfills = __commonJS({ }; })(fs8.readSync); function patchLchmod(fs9) { - fs9.lchmod = function(path7, mode, callback) { + fs9.lchmod = function(path8, mode, callback) { fs9.open( - path7, + path8, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) { @@ -106577,8 +106577,8 @@ var require_polyfills = __commonJS({ } ); }; - fs9.lchmodSync = function(path7, mode) { - var fd = fs9.openSync(path7, constants.O_WRONLY | constants.O_SYMLINK, mode); + fs9.lchmodSync = function(path8, mode) { + var fd = fs9.openSync(path8, constants.O_WRONLY | constants.O_SYMLINK, mode); var threw = true; var ret; try { @@ -106599,8 +106599,8 @@ var require_polyfills = __commonJS({ } function patchLutimes(fs9) { if (constants.hasOwnProperty("O_SYMLINK") && fs9.futimes) { - fs9.lutimes = function(path7, at, mt, cb) { - fs9.open(path7, constants.O_SYMLINK, function(er, fd) { + fs9.lutimes = function(path8, at, mt, cb) { + fs9.open(path8, constants.O_SYMLINK, function(er, fd) { if (er) { if (cb) cb(er); return; @@ -106612,8 +106612,8 @@ var require_polyfills = __commonJS({ }); }); }; - fs9.lutimesSync = function(path7, at, mt) { - var fd = fs9.openSync(path7, constants.O_SYMLINK); + fs9.lutimesSync = function(path8, at, mt) { + var fd = fs9.openSync(path8, constants.O_SYMLINK); var ret; var threw = true; try { @@ -106731,11 +106731,11 @@ var require_legacy_streams = __commonJS({ ReadStream, WriteStream }; - function ReadStream(path7, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path7, options); + function ReadStream(path8, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path8, options); Stream.call(this); var self2 = this; - this.path = path7; + this.path = path8; this.fd = null; this.readable = true; this.paused = false; @@ -106780,10 +106780,10 @@ var require_legacy_streams = __commonJS({ self2._read(); }); } - function WriteStream(path7, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path7, options); + function WriteStream(path8, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path8, options); Stream.call(this); - this.path = path7; + this.path = path8; this.fd = null; this.writable = true; this.flags = "w"; @@ -106926,14 +106926,14 @@ var require_graceful_fs = __commonJS({ fs9.createWriteStream = createWriteStream3; var fs$readFile = fs9.readFile; fs9.readFile = readFile; - function readFile(path7, options, cb) { + function readFile(path8, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$readFile(path7, options, cb); - function go$readFile(path8, options2, cb2, startTime) { - return fs$readFile(path8, options2, function(err) { + return go$readFile(path8, options, cb); + function go$readFile(path9, options2, cb2, startTime) { + return fs$readFile(path9, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path8, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$readFile, [path9, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -106943,14 +106943,14 @@ var require_graceful_fs = __commonJS({ } var fs$writeFile = fs9.writeFile; fs9.writeFile = writeFile; - function writeFile(path7, data, options, cb) { + function writeFile(path8, data, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$writeFile(path7, data, options, cb); - function go$writeFile(path8, data2, options2, cb2, startTime) { - return fs$writeFile(path8, data2, options2, function(err) { + return go$writeFile(path8, data, options, cb); + function go$writeFile(path9, data2, options2, cb2, startTime) { + return fs$writeFile(path9, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path8, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$writeFile, [path9, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -106961,14 +106961,14 @@ var require_graceful_fs = __commonJS({ var fs$appendFile = fs9.appendFile; if (fs$appendFile) fs9.appendFile = appendFile; - function appendFile(path7, data, options, cb) { + function appendFile(path8, data, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$appendFile(path7, data, options, cb); - function go$appendFile(path8, data2, options2, cb2, startTime) { - return fs$appendFile(path8, data2, options2, function(err) { + return go$appendFile(path8, data, options, cb); + function go$appendFile(path9, data2, options2, cb2, startTime) { + return fs$appendFile(path9, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path8, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$appendFile, [path9, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -106999,31 +106999,31 @@ var require_graceful_fs = __commonJS({ var fs$readdir = fs9.readdir; fs9.readdir = readdir; var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path7, options, cb) { + function readdir(path8, options, cb) { if (typeof options === "function") cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path8, options2, cb2, startTime) { - return fs$readdir(path8, fs$readdirCallback( - path8, + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path9, options2, cb2, startTime) { + return fs$readdir(path9, fs$readdirCallback( + path9, options2, cb2, startTime )); - } : function go$readdir2(path8, options2, cb2, startTime) { - return fs$readdir(path8, options2, fs$readdirCallback( - path8, + } : function go$readdir2(path9, options2, cb2, startTime) { + return fs$readdir(path9, options2, fs$readdirCallback( + path9, options2, cb2, startTime )); }; - return go$readdir(path7, options, cb); - function fs$readdirCallback(path8, options2, cb2, startTime) { + return go$readdir(path8, options, cb); + function fs$readdirCallback(path9, options2, cb2, startTime) { return function(err, files) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ go$readdir, - [path8, options2, cb2], + [path9, options2, cb2], err, startTime || Date.now(), Date.now() @@ -107094,7 +107094,7 @@ var require_graceful_fs = __commonJS({ enumerable: true, configurable: true }); - function ReadStream(path7, options) { + function ReadStream(path8, options) { if (this instanceof ReadStream) return fs$ReadStream.apply(this, arguments), this; else @@ -107114,7 +107114,7 @@ var require_graceful_fs = __commonJS({ } }); } - function WriteStream(path7, options) { + function WriteStream(path8, options) { if (this instanceof WriteStream) return fs$WriteStream.apply(this, arguments), this; else @@ -107132,22 +107132,22 @@ var require_graceful_fs = __commonJS({ } }); } - function createReadStream(path7, options) { - return new fs9.ReadStream(path7, options); + function createReadStream(path8, options) { + return new fs9.ReadStream(path8, options); } - function createWriteStream3(path7, options) { - return new fs9.WriteStream(path7, options); + function createWriteStream3(path8, options) { + return new fs9.WriteStream(path8, options); } var fs$open = fs9.open; fs9.open = open; - function open(path7, flags, mode, cb) { + function open(path8, flags, mode, cb) { if (typeof mode === "function") cb = mode, mode = null; - return go$open(path7, flags, mode, cb); - function go$open(path8, flags2, mode2, cb2, startTime) { - return fs$open(path8, flags2, mode2, function(err, fd) { + return go$open(path8, flags, mode, cb); + function go$open(path9, flags2, mode2, cb2, startTime) { + return fs$open(path9, flags2, mode2, function(err, fd) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path8, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$open, [path9, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -107500,7 +107500,7 @@ var require_BufferList = __commonJS({ this.head = this.tail = null; this.length = 0; }; - BufferList.prototype.join = function join8(s) { + BufferList.prototype.join = function join9(s) { if (this.length === 0) return ""; var p = this.head; var ret = "" + p.data; @@ -109248,22 +109248,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(path7, stripTrailing) { - if (typeof path7 !== "string") { + module2.exports = function(path8, stripTrailing) { + if (typeof path8 !== "string") { throw new TypeError("expected path to be a string"); } - if (path7 === "\\" || path7 === "/") return "/"; - var len = path7.length; - if (len <= 1) return path7; + if (path8 === "\\" || path8 === "/") return "/"; + var len = path8.length; + if (len <= 1) return path8; var prefix = ""; - if (len > 4 && path7[3] === "\\") { - var ch = path7[2]; - if ((ch === "?" || ch === ".") && path7.slice(0, 2) === "\\\\") { - path7 = path7.slice(2); + if (len > 4 && path8[3] === "\\") { + var ch = path8[2]; + if ((ch === "?" || ch === ".") && path8.slice(0, 2) === "\\\\") { + path8 = path8.slice(2); prefix = "//"; } } - var segs = path7.split(/[/\\]+/); + var segs = path8.split(/[/\\]+/); if (stripTrailing !== false && segs[segs.length - 1] === "") { segs.pop(); } @@ -110831,25 +110831,25 @@ var require_util21 = __commonJS({ }; }, createDeferredPromise: function() { - let resolve5; + let resolve6; let reject; const promise = new Promise((res, rej) => { - resolve5 = res; + resolve6 = res; reject = rej; }); return { promise, - resolve: resolve5, + resolve: resolve6, reject }; }, promisify(fn) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { fn((err, ...args) => { if (err) { return reject(err); } - return resolve5(...args); + return resolve6(...args); }); }); }, @@ -111995,7 +111995,7 @@ var require_end_of_stream = __commonJS({ validateBoolean(opts.cleanup, "cleanup"); autoCleanup = opts.cleanup; } - return new Promise2((resolve5, reject) => { + return new Promise2((resolve6, reject) => { const cleanup = eos(stream, opts, (err) => { if (autoCleanup) { cleanup(); @@ -112003,7 +112003,7 @@ var require_end_of_stream = __commonJS({ if (err) { reject(err); } else { - resolve5(); + resolve6(); } }); }); @@ -112872,7 +112872,7 @@ var require_readable4 = __commonJS({ error3 = this.readableEnded ? null : new AbortError(); this.destroy(error3); } - return new Promise2((resolve5, reject) => eos(this, (err) => err && err !== error3 ? reject(err) : resolve5(null))); + return new Promise2((resolve6, reject) => eos(this, (err) => err && err !== error3 ? reject(err) : resolve6(null))); }; Readable.prototype.push = function(chunk, encoding) { return readableAddChunk(this, chunk, encoding, false); @@ -113416,12 +113416,12 @@ var require_readable4 = __commonJS({ } async function* createAsyncIterator(stream, options) { let callback = nop; - function next(resolve5) { + function next(resolve6) { if (this === stream) { callback(); callback = nop; } else { - callback = resolve5; + callback = resolve6; } } stream.on("readable", next); @@ -114472,7 +114472,7 @@ var require_duplexify = __commonJS({ ); }; function fromAsyncGen(fn) { - let { promise, resolve: resolve5 } = createDeferredPromise(); + let { promise, resolve: resolve6 } = createDeferredPromise(); const ac = new AbortController2(); const signal = ac.signal; const value = fn( @@ -114487,7 +114487,7 @@ var require_duplexify = __commonJS({ throw new AbortError(void 0, { cause: signal.reason }); - ({ promise, resolve: resolve5 } = createDeferredPromise()); + ({ promise, resolve: resolve6 } = createDeferredPromise()); yield chunk; } })(), @@ -114498,8 +114498,8 @@ var require_duplexify = __commonJS({ return { value, write(chunk, encoding, cb) { - const _resolve = resolve5; - resolve5 = null; + const _resolve = resolve6; + resolve6 = null; _resolve({ chunk, done: false, @@ -114507,8 +114507,8 @@ var require_duplexify = __commonJS({ }); }, final(cb) { - const _resolve = resolve5; - resolve5 = null; + const _resolve = resolve6; + resolve6 = null; _resolve({ done: true, cb @@ -114959,7 +114959,7 @@ var require_pipeline4 = __commonJS({ callback(); } }; - const wait = () => new Promise2((resolve5, reject) => { + const wait = () => new Promise2((resolve6, reject) => { if (error3) { reject(error3); } else { @@ -114967,7 +114967,7 @@ var require_pipeline4 = __commonJS({ if (error3) { reject(error3); } else { - resolve5(); + resolve6(); } }; } @@ -115611,8 +115611,8 @@ var require_operators = __commonJS({ next = null; } if (!done && (queue.length >= highWaterMark || cnt >= concurrency)) { - await new Promise2((resolve5) => { - resume = resolve5; + await new Promise2((resolve6) => { + resume = resolve6; }); } } @@ -115646,8 +115646,8 @@ var require_operators = __commonJS({ queue.shift(); maybeResume(); } - await new Promise2((resolve5) => { - next = resolve5; + await new Promise2((resolve6) => { + next = resolve6; }); } } finally { @@ -115905,7 +115905,7 @@ var require_promises = __commonJS({ var { finished } = require_end_of_stream(); require_stream2(); function pipeline(...streams) { - return new Promise2((resolve5, reject) => { + return new Promise2((resolve6, reject) => { let signal; let end; const lastArg = streams[streams.length - 1]; @@ -115920,7 +115920,7 @@ var require_promises = __commonJS({ if (err) { reject(err); } else { - resolve5(value); + resolve6(value); } }, { @@ -118053,11 +118053,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 path7 = { + var path8 = { win32: { sep: "\\" }, posix: { sep: "/" } }; - exports2.sep = defaultPlatform === "win32" ? path7.win32.sep : path7.posix.sep; + exports2.sep = defaultPlatform === "win32" ? path8.win32.sep : path8.posix.sep; exports2.minimatch.sep = exports2.sep; exports2.GLOBSTAR = /* @__PURE__ */ Symbol("globstar **"); exports2.minimatch.GLOBSTAR = exports2.GLOBSTAR; @@ -120958,10 +120958,10 @@ var require_commonjs22 = __commonJS({ * Return a void Promise that resolves once the stream ends. */ async promise() { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { this.on(DESTROYED, () => reject(new Error("stream destroyed"))); this.on("error", (er) => reject(er)); - this.on("end", () => resolve5()); + this.on("end", () => resolve6()); }); } /** @@ -120985,7 +120985,7 @@ var require_commonjs22 = __commonJS({ return Promise.resolve({ done: false, value: res }); if (this[EOF]) return stop(); - let resolve5; + let resolve6; let reject; const onerr = (er) => { this.off("data", ondata); @@ -120999,19 +120999,19 @@ var require_commonjs22 = __commonJS({ this.off("end", onend); this.off(DESTROYED, ondestroy); this.pause(); - resolve5({ value, done: !!this[EOF] }); + resolve6({ value, done: !!this[EOF] }); }; const onend = () => { this.off("error", onerr); this.off("data", ondata); this.off(DESTROYED, ondestroy); stop(); - resolve5({ done: true, value: void 0 }); + resolve6({ done: true, value: void 0 }); }; const ondestroy = () => onerr(new Error("stream destroyed")); return new Promise((res2, rej) => { reject = rej; - resolve5 = res2; + resolve6 = res2; this.once(DESTROYED, ondestroy); this.once("error", onerr); this.once("end", onend); @@ -121416,12 +121416,12 @@ var require_commonjs23 = __commonJS({ /** * Get the Path object referenced by the string path, resolved from this Path */ - resolve(path7) { - if (!path7) { + resolve(path8) { + if (!path8) { return this; } - const rootPath = this.getRootString(path7); - const dir = path7.substring(rootPath.length); + const rootPath = this.getRootString(path8); + const dir = path8.substring(rootPath.length); const dirParts = dir.split(this.splitSep); const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts); return result; @@ -122025,9 +122025,9 @@ var require_commonjs23 = __commonJS({ if (this.#asyncReaddirInFlight) { await this.#asyncReaddirInFlight; } else { - let resolve5 = () => { + let resolve6 = () => { }; - this.#asyncReaddirInFlight = new Promise((res) => resolve5 = res); + this.#asyncReaddirInFlight = new Promise((res) => resolve6 = res); try { for (const e of await this.#fs.promises.readdir(fullpath, { withFileTypes: true @@ -122040,7 +122040,7 @@ var require_commonjs23 = __commonJS({ children.provisional = 0; } this.#asyncReaddirInFlight = void 0; - resolve5(); + resolve6(); } return children.slice(0, children.provisional); } @@ -122174,8 +122174,8 @@ var require_commonjs23 = __commonJS({ /** * @internal */ - getRootString(path7) { - return node_path_1.win32.parse(path7).root; + getRootString(path8) { + return node_path_1.win32.parse(path8).root; } /** * @internal @@ -122222,8 +122222,8 @@ var require_commonjs23 = __commonJS({ /** * @internal */ - getRootString(path7) { - return path7.startsWith("/") ? "/" : ""; + getRootString(path8) { + return path8.startsWith("/") ? "/" : ""; } /** * @internal @@ -122313,11 +122313,11 @@ var require_commonjs23 = __commonJS({ /** * Get the depth of a provided path, string, or the cwd */ - depth(path7 = this.cwd) { - if (typeof path7 === "string") { - path7 = this.cwd.resolve(path7); + depth(path8 = this.cwd) { + if (typeof path8 === "string") { + path8 = this.cwd.resolve(path8); } - return path7.depth(); + return path8.depth(); } /** * Return the cache of child entries. Exposed so subclasses can create @@ -122804,9 +122804,9 @@ var require_commonjs23 = __commonJS({ process2(); return results; } - chdir(path7 = this.cwd) { + chdir(path8 = this.cwd) { const oldCwd = this.cwd; - this.cwd = typeof path7 === "string" ? this.cwd.resolve(path7) : path7; + this.cwd = typeof path8 === "string" ? this.cwd.resolve(path8) : path8; this.cwd[setAsCwd](oldCwd); } }; @@ -123127,10 +123127,10 @@ var require_ignore = __commonJS({ ignored(p) { const fullpath = p.fullpath(); const fullpaths = `${fullpath}/`; - const relative2 = p.relative() || "."; - const relatives = `${relative2}/`; + const relative3 = p.relative() || "."; + const relatives = `${relative3}/`; for (const m of this.relative) { - if (m.match(relative2) || m.match(relatives)) + if (m.match(relative3) || m.match(relatives)) return true; } for (const m of this.absolute) { @@ -123141,9 +123141,9 @@ var require_ignore = __commonJS({ } childrenIgnored(p) { const fullpath = p.fullpath() + "/"; - const relative2 = (p.relative() || ".") + "/"; + const relative3 = (p.relative() || ".") + "/"; for (const m of this.relativeChildren) { - if (m.match(relative2)) + if (m.match(relative3)) return true; } for (const m of this.absoluteChildren) { @@ -123194,8 +123194,8 @@ var require_processor = __commonJS({ } // match, absolute, ifdir entries() { - return [...this.store.entries()].map(([path7, n]) => [ - path7, + return [...this.store.entries()].map(([path8, n]) => [ + path8, !!(n & 2), !!(n & 1) ]); @@ -123413,9 +123413,9 @@ var require_walker = __commonJS({ signal; maxDepth; includeChildMatches; - constructor(patterns, path7, opts) { + constructor(patterns, path8, opts) { this.patterns = patterns; - this.path = path7; + this.path = path8; this.opts = opts; this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/"; this.includeChildMatches = opts.includeChildMatches !== false; @@ -123434,11 +123434,11 @@ var require_walker = __commonJS({ }); } } - #ignored(path7) { - return this.seen.has(path7) || !!this.#ignore?.ignored?.(path7); + #ignored(path8) { + return this.seen.has(path8) || !!this.#ignore?.ignored?.(path8); } - #childrenIgnored(path7) { - return !!this.#ignore?.childrenIgnored?.(path7); + #childrenIgnored(path8) { + return !!this.#ignore?.childrenIgnored?.(path8); } // backpressure mechanism pause() { @@ -123654,8 +123654,8 @@ var require_walker = __commonJS({ exports2.GlobUtil = GlobUtil; var GlobWalker = class extends GlobUtil { matches = /* @__PURE__ */ new Set(); - constructor(patterns, path7, opts) { - super(patterns, path7, opts); + constructor(patterns, path8, opts) { + super(patterns, path8, opts); } matchEmit(e) { this.matches.add(e); @@ -123693,8 +123693,8 @@ var require_walker = __commonJS({ exports2.GlobWalker = GlobWalker; var GlobStream = class extends GlobUtil { results; - constructor(patterns, path7, opts) { - super(patterns, path7, opts); + constructor(patterns, path8, opts) { + super(patterns, path8, opts); this.results = new minipass_1.Minipass({ signal: this.signal, objectMode: true @@ -124050,7 +124050,7 @@ var require_commonjs24 = __commonJS({ var require_file4 = __commonJS({ "node_modules/archiver-utils/file.js"(exports2, module2) { var fs8 = require_graceful_fs(); - var path7 = require("path"); + var path8 = require("path"); var flatten = require_flatten(); var difference = require_difference(); var union = require_union(); @@ -124075,7 +124075,7 @@ var require_file4 = __commonJS({ return result; }; file.exists = function() { - var filepath = path7.join.apply(path7, arguments); + var filepath = path8.join.apply(path8, arguments); return fs8.existsSync(filepath); }; file.expand = function(...args) { @@ -124089,7 +124089,7 @@ var require_file4 = __commonJS({ }); if (options.filter) { matches = matches.filter(function(filepath) { - filepath = path7.join(options.cwd || "", filepath); + filepath = path8.join(options.cwd || "", filepath); try { if (typeof options.filter === "function") { return options.filter(filepath); @@ -124106,7 +124106,7 @@ var require_file4 = __commonJS({ file.expandMapping = function(patterns, destBase, options) { options = Object.assign({ rename: function(destBase2, destPath) { - return path7.join(destBase2 || "", destPath); + return path8.join(destBase2 || "", destPath); } }, options); var files = []; @@ -124114,14 +124114,14 @@ var require_file4 = __commonJS({ file.expand(options, patterns).forEach(function(src) { var destPath = src; if (options.flatten) { - destPath = path7.basename(destPath); + destPath = path8.basename(destPath); } if (options.ext) { destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext); } var dest = options.rename(destBase, destPath, options); if (options.cwd) { - src = path7.join(options.cwd, src); + src = path8.join(options.cwd, src); } dest = dest.replace(pathSeparatorRe, "/"); src = src.replace(pathSeparatorRe, "/"); @@ -124203,7 +124203,7 @@ var require_file4 = __commonJS({ var require_archiver_utils = __commonJS({ "node_modules/archiver-utils/index.js"(exports2, module2) { var fs8 = require_graceful_fs(); - var path7 = require("path"); + var path8 = require("path"); var isStream = require_is_stream(); var lazystream = require_lazystream(); var normalizePath = require_normalize_path(); @@ -124291,11 +124291,11 @@ var require_archiver_utils = __commonJS({ if (!file) { return callback(null, results); } - filepath = path7.join(dirpath, file); + filepath = path8.join(dirpath, file); fs8.stat(filepath, function(err2, stats) { results.push({ path: filepath, - relative: path7.relative(base, filepath).replace(/\\/g, "/"), + relative: path8.relative(base, filepath).replace(/\\/g, "/"), stats }); if (stats && stats.isDirectory()) { @@ -124357,7 +124357,7 @@ var require_core2 = __commonJS({ var fs8 = require("fs"); var glob2 = require_readdir_glob(); var async = require_async(); - var path7 = require("path"); + var path8 = require("path"); var util = require_archiver_utils(); var inherits = require("util").inherits; var ArchiverError = require_error3(); @@ -124633,9 +124633,9 @@ var require_core2 = __commonJS({ task.source = Buffer.concat([]); } else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) { var linkPath = fs8.readlinkSync(task.filepath); - var dirName = path7.dirname(task.filepath); + var dirName = path8.dirname(task.filepath); task.data.type = "symlink"; - task.data.linkname = path7.relative(dirName, path7.resolve(dirName, linkPath)); + task.data.linkname = path8.relative(dirName, path8.resolve(dirName, linkPath)); task.data.sourceType = "buffer"; task.source = Buffer.concat([]); } else { @@ -124809,11 +124809,11 @@ var require_core2 = __commonJS({ this._finalize(); } var self2 = this; - return new Promise(function(resolve5, reject) { + return new Promise(function(resolve6, reject) { var errored; self2._module.on("end", function() { if (!errored) { - resolve5(); + resolve6(); } }); self2._module.on("error", function(err) { @@ -127172,8 +127172,8 @@ var require_streamx = __commonJS({ return this; }, next() { - return new Promise(function(resolve5, reject) { - promiseResolve = resolve5; + return new Promise(function(resolve6, reject) { + promiseResolve = resolve6; promiseReject = reject; const data = stream.read(); if (data !== null) ondata(data); @@ -127202,11 +127202,11 @@ var require_streamx = __commonJS({ } function destroy(err) { stream.destroy(err); - return new Promise((resolve5, reject) => { - if (stream._duplexState & DESTROYED) return resolve5({ value: void 0, done: true }); + return new Promise((resolve6, reject) => { + if (stream._duplexState & DESTROYED) return resolve6({ value: void 0, done: true }); stream.once("close", function() { if (err) reject(err); - else resolve5({ value: void 0, done: true }); + else resolve6({ value: void 0, done: true }); }); }); } @@ -127250,8 +127250,8 @@ var require_streamx = __commonJS({ const writes = pending + (ws._duplexState & WRITE_WRITING ? 1 : 0); if (writes === 0) return Promise.resolve(true); if (state.drains === null) state.drains = []; - return new Promise((resolve5) => { - state.drains.push({ writes, resolve: resolve5 }); + return new Promise((resolve6) => { + state.drains.push({ writes, resolve: resolve6 }); }); } write(data) { @@ -127356,10 +127356,10 @@ var require_streamx = __commonJS({ cb(null); } function pipelinePromise(...streams) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { return pipeline(...streams, (err) => { if (err) return reject(err); - resolve5(); + resolve6(); }); }); } @@ -128002,16 +128002,16 @@ var require_extract = __commonJS({ entryCallback = null; cb(err); } - function onnext(resolve5, reject) { + function onnext(resolve6, reject) { if (error3) { return reject(error3); } if (entryStream) { - resolve5({ value: entryStream, done: false }); + resolve6({ value: entryStream, done: false }); entryStream = null; return; } - promiseResolve = resolve5; + promiseResolve = resolve6; promiseReject = reject; consumeCallback(null); if (extract2._finished && promiseResolve) { @@ -128039,11 +128039,11 @@ var require_extract = __commonJS({ function destroy(err) { extract2.destroy(err); consumeCallback(err); - return new Promise((resolve5, reject) => { - if (extract2.destroyed) return resolve5({ value: void 0, done: true }); + return new Promise((resolve6, reject) => { + if (extract2.destroyed) return resolve6({ value: void 0, done: true }); extract2.once("close", function() { if (err) reject(err); - else resolve5({ value: void 0, done: true }); + else resolve6({ value: void 0, done: true }); }); }); } @@ -128839,11 +128839,11 @@ var require_zip2 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -128859,7 +128859,7 @@ var require_zip2 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -128974,11 +128974,11 @@ var require_upload_artifact = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -128994,7 +128994,7 @@ var require_upload_artifact = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -129085,8 +129085,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 path7 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path7} does not exist${os_1.EOL}`); + const path8 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path8} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -129671,14 +129671,14 @@ var require_util24 = __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 path7 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path8 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } - if (path7 && !path7.startsWith("/")) { - path7 = `/${path7}`; + if (path8 && !path8.startsWith("/")) { + path8 = `/${path8}`; } - url = new URL(origin + path7); + url = new URL(origin + path8); } return url; } @@ -131292,20 +131292,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(path7) { - if (typeof path7 !== "string") { + module2.exports = function basename2(path8) { + if (typeof path8 !== "string") { return ""; } - for (var i = path7.length - 1; i >= 0; --i) { - switch (path7.charCodeAt(i)) { + for (var i = path8.length - 1; i >= 0; --i) { + switch (path8.charCodeAt(i)) { case 47: // '/' case 92: - path7 = path7.slice(i + 1); - return path7 === ".." || path7 === "." ? "" : path7; + path8 = path8.slice(i + 1); + return path8 === ".." || path8 === "." ? "" : path8; } } - return path7 === ".." || path7 === "." ? "" : path7; + return path8 === ".." || path8 === "." ? "" : path8; }; } }); @@ -132698,8 +132698,8 @@ var require_util25 = __commonJS({ function createDeferredPromise() { let res; let rej; - const promise = new Promise((resolve5, reject) => { - res = resolve5; + const promise = new Promise((resolve6, reject) => { + res = resolve6; rej = reject; }); return { promise, resolve: res, reject: rej }; @@ -134203,8 +134203,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r }); } }); - const busboyResolve = new Promise((resolve5, reject) => { - busboy.on("finish", resolve5); + const busboyResolve = new Promise((resolve6, reject) => { + busboy.on("finish", resolve6); busboy.on("error", (err) => reject(new TypeError(err))); }); if (this.body !== null) for await (const chunk of consumeBody(this[kState].body)) busboy.write(chunk); @@ -134335,7 +134335,7 @@ var require_request5 = __commonJS({ } var Request = class _Request { constructor(origin, { - path: path7, + path: path8, method, body, headers, @@ -134349,11 +134349,11 @@ var require_request5 = __commonJS({ throwOnError, expectContinue }, handler2) { - if (typeof path7 !== "string") { + if (typeof path8 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path7[0] !== "/" && !(path7.startsWith("http://") || path7.startsWith("https://")) && method !== "CONNECT") { + } else if (path8[0] !== "/" && !(path8.startsWith("http://") || path8.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.exec(path7) !== null) { + } else if (invalidPathRegex.exec(path8) !== null) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -134416,7 +134416,7 @@ var require_request5 = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? util.buildURL(path7, query) : path7; + this.path = query ? util.buildURL(path8, query) : path8; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -134738,9 +134738,9 @@ var require_dispatcher_base3 = __commonJS({ } close(callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { this.close((err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -134778,12 +134778,12 @@ var require_dispatcher_base3 = __commonJS({ err = null; } if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { this.destroy(err, (err2, data) => { return err2 ? ( /* istanbul ignore next: should never error */ reject(err2) - ) : resolve5(data); + ) : resolve6(data); }); }); } @@ -135424,9 +135424,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 path7 = search ? `${pathname}${search}` : pathname; + const path8 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path7; + this.opts.path = path8; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -135843,16 +135843,16 @@ var require_client3 = __commonJS({ return this[kNeedDrain] < 2; } async [kClose]() { - return new Promise((resolve5) => { + return new Promise((resolve6) => { if (!this[kSize]) { - resolve5(null); + resolve6(null); } else { - this[kClosedResolve] = resolve5; + this[kClosedResolve] = resolve6; } }); } async [kDestroy](err) { - return new Promise((resolve5) => { + return new Promise((resolve6) => { const requests = this[kQueue].splice(this[kPendingIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; @@ -135863,7 +135863,7 @@ var require_client3 = __commonJS({ this[kClosedResolve](); this[kClosedResolve] = null; } - resolve5(); + resolve6(); }; if (this[kHTTP2Session] != null) { util.destroy(this[kHTTP2Session], err); @@ -136443,7 +136443,7 @@ var require_client3 = __commonJS({ }); } try { - const socket = await new Promise((resolve5, reject) => { + const socket = await new Promise((resolve6, reject) => { client[kConnector]({ host, hostname, @@ -136455,7 +136455,7 @@ var require_client3 = __commonJS({ if (err) { reject(err); } else { - resolve5(socket2); + resolve6(socket2); } }); }); @@ -136666,7 +136666,7 @@ var require_client3 = __commonJS({ writeH2(client, client[kHTTP2Session], request2); return; } - const { body, method, path: path7, host, upgrade, headers, blocking, reset } = request2; + const { body, method, path: path8, host, upgrade, headers, blocking, reset } = request2; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { body.read(0); @@ -136716,7 +136716,7 @@ var require_client3 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path7} HTTP/1.1\r + let header = `${method} ${path8} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -136779,7 +136779,7 @@ upgrade: ${upgrade}\r return true; } function writeH2(client, session, request2) { - const { body, method, path: path7, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { body, method, path: path8, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; let headers; if (typeof reqHeaders === "string") headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()); else headers = reqHeaders; @@ -136822,7 +136822,7 @@ upgrade: ${upgrade}\r }); return true; } - headers[HTTP2_HEADER_PATH] = path7; + headers[HTTP2_HEADER_PATH] = path8; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -137079,12 +137079,12 @@ upgrade: ${upgrade}\r cb(); } } - const waitForDrain = () => new Promise((resolve5, reject) => { + const waitForDrain = () => new Promise((resolve6, reject) => { assert(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve5; + callback = resolve6; } }); if (client[kHTTPConnVersion] === "h2") { @@ -137429,8 +137429,8 @@ var require_pool_base3 = __commonJS({ if (this[kQueue].isEmpty()) { return Promise.all(this[kClients].map((c) => c.close())); } else { - return new Promise((resolve5) => { - this[kClosedResolve] = resolve5; + return new Promise((resolve6) => { + this[kClosedResolve] = resolve6; }); } } @@ -138008,7 +138008,7 @@ var require_readable5 = __commonJS({ if (this.closed) { return Promise.resolve(null); } - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { const signalListenerCleanup = signal ? util.addAbortListener(signal, () => { this.destroy(); }) : noop3; @@ -138017,7 +138017,7 @@ var require_readable5 = __commonJS({ if (signal && signal.aborted) { reject(signal.reason || Object.assign(new Error("The operation was aborted"), { name: "AbortError" })); } else { - resolve5(null); + resolve6(null); } }).on("error", noop3).on("data", function(chunk) { limit -= chunk.length; @@ -138039,11 +138039,11 @@ var require_readable5 = __commonJS({ throw new TypeError("unusable"); } assert(!stream[kConsume]); - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { stream[kConsume] = { type: type2, stream, - resolve: resolve5, + resolve: resolve6, reject, length: 0, body: [] @@ -138078,12 +138078,12 @@ var require_readable5 = __commonJS({ } } function consumeEnd(consume2) { - const { type: type2, body, resolve: resolve5, stream, length } = consume2; + const { type: type2, body, resolve: resolve6, stream, length } = consume2; try { if (type2 === "text") { - resolve5(toUSVString(Buffer.concat(body))); + resolve6(toUSVString(Buffer.concat(body))); } else if (type2 === "json") { - resolve5(JSON.parse(Buffer.concat(body))); + resolve6(JSON.parse(Buffer.concat(body))); } else if (type2 === "arrayBuffer") { const dst = new Uint8Array(length); let pos = 0; @@ -138091,12 +138091,12 @@ var require_readable5 = __commonJS({ dst.set(buf, pos); pos += buf.byteLength; } - resolve5(dst.buffer); + resolve6(dst.buffer); } else if (type2 === "blob") { if (!Blob2) { Blob2 = require("buffer").Blob; } - resolve5(new Blob2(body, { type: stream[kContentType] })); + resolve6(new Blob2(body, { type: stream[kContentType] })); } consumeFinish(consume2); } catch (err) { @@ -138351,9 +138351,9 @@ var require_api_request3 = __commonJS({ }; function request2(opts, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { request2.call(this, opts, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -138526,9 +138526,9 @@ var require_api_stream3 = __commonJS({ }; function stream(opts, factory, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -138809,9 +138809,9 @@ var require_api_upgrade3 = __commonJS({ }; function upgrade(opts, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -138900,9 +138900,9 @@ var require_api_connect3 = __commonJS({ }; function connect(opts, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -139062,20 +139062,20 @@ var require_mock_utils3 = __commonJS({ } return true; } - function safeUrl(path7) { - if (typeof path7 !== "string") { - return path7; + function safeUrl(path8) { + if (typeof path8 !== "string") { + return path8; } - const pathSegments = path7.split("?"); + const pathSegments = path8.split("?"); if (pathSegments.length !== 2) { - return path7; + return path8; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path7, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path7); + function matchKey(mockDispatch2, { path: path8, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path8); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -139093,7 +139093,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: path7 }) => matchValue(safeUrl(path7), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path8 }) => matchValue(safeUrl(path8), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -139130,9 +139130,9 @@ var require_mock_utils3 = __commonJS({ } } function buildKey(opts) { - const { path: path7, method, body, headers, query } = opts; + const { path: path8, method, body, headers, query } = opts; return { - path: path7, + path: path8, method, body, headers, @@ -139581,10 +139581,10 @@ var require_pending_interceptors_formatter3 = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path7, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path8, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path7, + Path: path8, "Status code": statusCode, Persistent: persist ? "\u2705" : "\u274C", Invocations: timesInvoked, @@ -142524,7 +142524,7 @@ var require_fetch3 = __commonJS({ async function dispatch({ body }) { const url = requestCurrentURL(request2); const agent = fetchParams.controller.dispatcher; - return new Promise((resolve5, reject) => agent.dispatch( + return new Promise((resolve6, reject) => agent.dispatch( { path: url.pathname + url.search, origin: url.origin, @@ -142600,7 +142600,7 @@ var require_fetch3 = __commonJS({ } } } - resolve5({ + resolve6({ status, statusText, headersList: headers[kHeadersList], @@ -142643,7 +142643,7 @@ var require_fetch3 = __commonJS({ const val = headersList[n + 1].toString("latin1"); headers[kHeadersList].append(key, val); } - resolve5({ + resolve6({ status, statusText: STATUS_CODES[status], headersList: headers[kHeadersList], @@ -144204,8 +144204,8 @@ var require_util29 = __commonJS({ } } } - function validateCookiePath(path7) { - for (const char of path7) { + function validateCookiePath(path8) { + for (const char of path8) { const code = char.charCodeAt(0); if (code < 33 || char === ";") { throw new Error("Invalid cookie path"); @@ -145885,11 +145885,11 @@ var require_undici3 = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path7 = opts.path; + let path8 = opts.path; if (!opts.path.startsWith("/")) { - path7 = `/${path7}`; + path8 = `/${path8}`; } - url = new URL(util.parseOrigin(url).origin + path7); + url = new URL(util.parseOrigin(url).origin + path8); } else { if (!opts) { opts = typeof url === "object" ? url : {}; @@ -145997,11 +145997,11 @@ var require_lib4 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -146017,7 +146017,7 @@ var require_lib4 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -146103,26 +146103,26 @@ var require_lib4 = __commonJS({ } readBody() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); }); this.message.on("end", () => { - resolve5(output.toString()); + resolve6(output.toString()); }); })); }); } readBodyBuffer() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); }); this.message.on("end", () => { - resolve5(Buffer.concat(chunks)); + resolve6(Buffer.concat(chunks)); }); })); }); @@ -146331,14 +146331,14 @@ var require_lib4 = __commonJS({ */ requestRaw(info7, data) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { function callbackForResult(err, res) { if (err) { reject(err); } else if (!res) { reject(new Error("Unknown error")); } else { - resolve5(res); + resolve6(res); } } this.requestRawWithCallback(info7, data, callbackForResult); @@ -146520,12 +146520,12 @@ var require_lib4 = __commonJS({ return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); + return new Promise((resolve6) => setTimeout(() => resolve6(), ms)); }); } _processResponse(res, options) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -146533,7 +146533,7 @@ var require_lib4 = __commonJS({ headers: {} }; if (statusCode === HttpCodes.NotFound) { - resolve5(response); + resolve6(response); } function dateTimeDeserializer(key, value) { if (typeof value === "string") { @@ -146572,7 +146572,7 @@ var require_lib4 = __commonJS({ err.result = response.result; reject(err); } else { - resolve5(response); + resolve6(response); } })); }); @@ -146616,11 +146616,11 @@ var require_utils10 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -146636,7 +146636,7 @@ var require_utils10 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -150739,7 +150739,7 @@ var require_traverse = __commonJS({ })(this.value); }; function walk(root, cb, immutable) { - var path7 = []; + var path8 = []; var parents = []; var alive = true; return (function walker(node_) { @@ -150748,11 +150748,11 @@ var require_traverse = __commonJS({ var state = { node, node_, - path: [].concat(path7), + path: [].concat(path8), parent: parents.slice(-1)[0], - key: path7.slice(-1)[0], - isRoot: path7.length === 0, - level: path7.length, + key: path8.slice(-1)[0], + isRoot: path8.length === 0, + level: path8.length, circular: null, update: function(x) { if (!state.isRoot) { @@ -150807,7 +150807,7 @@ var require_traverse = __commonJS({ parents.push(state); var keys = Object.keys(state.node); keys.forEach(function(key, i2) { - path7.push(key); + path8.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)) { @@ -150816,7 +150816,7 @@ var require_traverse = __commonJS({ child.isLast = i2 == keys.length - 1; child.isFirst = i2 == 0; if (modifiers.post) modifiers.post.call(state, child); - path7.pop(); + path8.pop(); }); parents.pop(); } @@ -151837,11 +151837,11 @@ var require_unzip_stream = __commonJS({ return requiredLength; case states.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX: var isUtf8 = (this.parsedEntity.flags & 2048) !== 0; - var path7 = this._decodeString(chunk.slice(0, this.parsedEntity.fileNameLength), isUtf8); + var path8 = 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) { - path7 = extra.parsed.path; + path8 = extra.parsed.path; } this.parsedEntity.extra = extra.parsed; var isUnix = (this.parsedEntity.versionMadeBy & 65280) >> 8 === 3; @@ -151853,7 +151853,7 @@ var require_unzip_stream = __commonJS({ } if (this.options.debug) { const debugObj = Object.assign({}, this.parsedEntity, { - path: path7, + path: path8, flags: "0x" + this.parsedEntity.flags.toString(16), unixAttrs: unixAttrs && "0" + unixAttrs.toString(8), isSymlink, @@ -152290,7 +152290,7 @@ var require_parser_stream = __commonJS({ // node_modules/mkdirp/index.js var require_mkdirp = __commonJS({ "node_modules/mkdirp/index.js"(exports2, module2) { - var path7 = require("path"); + var path8 = require("path"); var fs8 = require("fs"); var _0777 = parseInt("0777", 8); module2.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; @@ -152310,7 +152310,7 @@ var require_mkdirp = __commonJS({ var cb = f || /* istanbul ignore next */ function() { }; - p = path7.resolve(p); + p = path8.resolve(p); xfs.mkdir(p, mode, function(er) { if (!er) { made = made || p; @@ -152318,8 +152318,8 @@ var require_mkdirp = __commonJS({ } switch (er.code) { case "ENOENT": - if (path7.dirname(p) === p) return cb(er); - mkdirP(path7.dirname(p), opts, function(er2, made2) { + if (path8.dirname(p) === p) return cb(er); + mkdirP(path8.dirname(p), opts, function(er2, made2) { if (er2) cb(er2, made2); else mkdirP(p, opts, cb, made2); }); @@ -152346,14 +152346,14 @@ var require_mkdirp = __commonJS({ mode = _0777; } if (!made) made = null; - p = path7.resolve(p); + p = path8.resolve(p); try { xfs.mkdirSync(p, mode); made = made || p; } catch (err0) { switch (err0.code) { case "ENOENT": - made = sync(path7.dirname(p), opts, made); + made = sync(path8.dirname(p), opts, made); sync(p, opts, made); break; // In the case of any other error, just see if there's a dir @@ -152379,7 +152379,7 @@ var require_mkdirp = __commonJS({ var require_extract2 = __commonJS({ "node_modules/unzip-stream/lib/extract.js"(exports2, module2) { var fs8 = require("fs"); - var path7 = require("path"); + var path8 = require("path"); var util = require("util"); var mkdirp = require_mkdirp(); var Transform = require("stream").Transform; @@ -152421,8 +152421,8 @@ var require_extract2 = __commonJS({ }; Extract.prototype._processEntry = function(entry) { var self2 = this; - var destPath = path7.join(this.opts.path, entry.path); - var directory = entry.isDirectory ? destPath : path7.dirname(destPath); + var destPath = path8.join(this.opts.path, entry.path); + var directory = entry.isDirectory ? destPath : path8.dirname(destPath); this.unfinishedEntries++; var writeFileFn = function() { var pipedStream = fs8.createWriteStream(destPath); @@ -152501,11 +152501,11 @@ var require_download_artifact = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -152521,7 +152521,7 @@ var require_download_artifact = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -152549,10 +152549,10 @@ var require_download_artifact = __commonJS({ parsed.search = ""; return parsed.toString(); }; - function exists(path7) { + function exists(path8) { return __awaiter2(this, void 0, void 0, function* () { try { - yield promises_1.default.access(path7); + yield promises_1.default.access(path8); return true; } catch (error3) { if (error3.code === "ENOENT") { @@ -152572,7 +152572,7 @@ var require_download_artifact = __commonJS({ } catch (error3) { retryCount++; core15.debug(`Failed to download artifact after ${retryCount} retries due to ${error3.message}. Retrying in 5 seconds...`); - yield new Promise((resolve5) => setTimeout(resolve5, 5e3)); + yield new Promise((resolve6) => setTimeout(resolve6, 5e3)); } } throw new Error(`Artifact download failed after ${retryCount} retries.`); @@ -152586,7 +152586,7 @@ var require_download_artifact = __commonJS({ throw new Error(`Unexpected HTTP response from blob storage: ${response.message.statusCode} ${response.message.statusMessage}`); } let sha256Digest = void 0; - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { const timerFn = () => { const timeoutError = new Error(`Blob storage chunk did not respond in ${opts.timeout}ms`); response.message.destroy(timeoutError); @@ -152611,7 +152611,7 @@ var require_download_artifact = __commonJS({ sha256Digest = hashStream.read(); core15.info(`SHA256 digest of downloaded artifact is ${sha256Digest}`); } - resolve5({ sha256Digest: `sha256:${sha256Digest}` }); + resolve6({ sha256Digest: `sha256:${sha256Digest}` }); }).on("error", (error3) => { reject(error3); }); @@ -152784,12 +152784,12 @@ var require_dist_node11 = __commonJS({ octokit.log.debug("request", options); const start = Date.now(); const requestOptions = octokit.request.endpoint.parse(options); - const path7 = requestOptions.url.replace(options.baseUrl, ""); + const path8 = requestOptions.url.replace(options.baseUrl, ""); return request2(options).then((response) => { - octokit.log.info(`${requestOptions.method} ${path7} - ${response.status} in ${Date.now() - start}ms`); + octokit.log.info(`${requestOptions.method} ${path8} - ${response.status} in ${Date.now() - start}ms`); return response; }).catch((error3) => { - octokit.log.info(`${requestOptions.method} ${path7} - ${error3.status} in ${Date.now() - start}ms`); + octokit.log.info(`${requestOptions.method} ${path8} - ${error3.status} in ${Date.now() - start}ms`); throw error3; }); }); @@ -152894,11 +152894,11 @@ var require_get_artifact = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -152914,7 +152914,7 @@ var require_get_artifact = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -153017,11 +153017,11 @@ var require_delete_artifact = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -153037,7 +153037,7 @@ var require_delete_artifact = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -153123,11 +153123,11 @@ var require_list_artifacts = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -153143,7 +153143,7 @@ var require_list_artifacts = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -153280,11 +153280,11 @@ var require_client4 = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -153300,7 +153300,7 @@ var require_client4 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -153769,11 +153769,11 @@ var require_lib5 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -153789,7 +153789,7 @@ var require_lib5 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -153875,26 +153875,26 @@ var require_lib5 = __commonJS({ } readBody() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); }); this.message.on("end", () => { - resolve5(output.toString()); + resolve6(output.toString()); }); })); }); } readBodyBuffer() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); }); this.message.on("end", () => { - resolve5(Buffer.concat(chunks)); + resolve6(Buffer.concat(chunks)); }); })); }); @@ -154103,14 +154103,14 @@ var require_lib5 = __commonJS({ */ requestRaw(info7, data) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { function callbackForResult(err, res) { if (err) { reject(err); } else if (!res) { reject(new Error("Unknown error")); } else { - resolve5(res); + resolve6(res); } } this.requestRawWithCallback(info7, data, callbackForResult); @@ -154292,12 +154292,12 @@ var require_lib5 = __commonJS({ return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); + return new Promise((resolve6) => setTimeout(() => resolve6(), ms)); }); } _processResponse(res, options) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -154305,7 +154305,7 @@ var require_lib5 = __commonJS({ headers: {} }; if (statusCode === HttpCodes.NotFound) { - resolve5(response); + resolve6(response); } function dateTimeDeserializer(key, value) { if (typeof value === "string") { @@ -154344,7 +154344,7 @@ var require_lib5 = __commonJS({ err.result = response.result; reject(err); } else { - resolve5(response); + resolve6(response); } })); }); @@ -154361,11 +154361,11 @@ var require_auth2 = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -154381,7 +154381,7 @@ var require_auth2 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -154465,11 +154465,11 @@ var require_oidc_utils2 = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -154485,7 +154485,7 @@ var require_oidc_utils2 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -154563,11 +154563,11 @@ var require_summary2 = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -154583,7 +154583,7 @@ var require_summary2 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -154884,7 +154884,7 @@ var require_path_utils2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -154894,7 +154894,7 @@ var require_path_utils2 = __commonJS({ } exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path7.sep); + return pth.replace(/[/\\]/g, path8.sep); } exports2.toPlatformPath = toPlatformPath; } @@ -154929,11 +154929,11 @@ var require_io_util2 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -154949,7 +154949,7 @@ var require_io_util2 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -154958,7 +154958,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 fs8 = __importStar2(require("fs")); - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); _a = fs8.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; @@ -155007,7 +155007,7 @@ var require_io_util2 = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path7.extname(filePath).toUpperCase(); + const upperExt = path8.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -155031,11 +155031,11 @@ var require_io_util2 = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path7.dirname(filePath); - const upperName = path7.basename(filePath).toUpperCase(); + const directory = path8.dirname(filePath); + const upperName = path8.basename(filePath).toUpperCase(); for (const actualName of yield exports2.readdir(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path7.join(directory, actualName); + filePath = path8.join(directory, actualName); break; } } @@ -155102,11 +155102,11 @@ var require_io2 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -155122,7 +155122,7 @@ var require_io2 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -155130,7 +155130,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 path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var ioUtil = __importStar2(require_io_util2()); function cp(source, dest, options = {}) { return __awaiter2(this, void 0, void 0, function* () { @@ -155139,7 +155139,7 @@ var require_io2 = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path7.join(dest, path7.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path8.join(dest, path8.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -155151,7 +155151,7 @@ var require_io2 = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path7.relative(source, newDest) === "") { + if (path8.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile(source, newDest, force); @@ -155164,7 +155164,7 @@ var require_io2 = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path7.join(dest, path7.basename(source)); + dest = path8.join(dest, path8.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -155175,7 +155175,7 @@ var require_io2 = __commonJS({ } } } - yield mkdirP(path7.dirname(dest)); + yield mkdirP(path8.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -155238,7 +155238,7 @@ var require_io2 = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path7.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path8.delimiter)) { if (extension) { extensions.push(extension); } @@ -155251,12 +155251,12 @@ var require_io2 = __commonJS({ } return []; } - if (tool.includes(path7.sep)) { + if (tool.includes(path8.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path7.delimiter)) { + for (const p of process.env.PATH.split(path8.delimiter)) { if (p) { directories.push(p); } @@ -155264,7 +155264,7 @@ var require_io2 = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path7.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path8.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -155350,11 +155350,11 @@ var require_toolrunner2 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -155370,7 +155370,7 @@ var require_toolrunner2 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -155380,7 +155380,7 @@ var require_toolrunner2 = __commonJS({ var os2 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var io6 = __importStar2(require_io2()); var ioUtil = __importStar2(require_io_util2()); var timers_1 = require("timers"); @@ -155595,10 +155595,10 @@ 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 = path7.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path8.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io6.which(this.toolPath, true); - return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -155681,7 +155681,7 @@ var require_toolrunner2 = __commonJS({ if (error3) { reject(error3); } else { - resolve5(exitCode); + resolve6(exitCode); } }); if (this.options.input) { @@ -155834,11 +155834,11 @@ var require_exec2 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -155854,7 +155854,7 @@ var require_exec2 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -155945,11 +155945,11 @@ var require_platform2 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -155965,7 +155965,7 @@ var require_platform2 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -156064,11 +156064,11 @@ var require_core3 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -156084,7 +156084,7 @@ var require_core3 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -156095,7 +156095,7 @@ var require_core3 = __commonJS({ var file_command_1 = require_file_command2(); var utils_1 = require_utils12(); var os2 = __importStar2(require("os")); - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils2(); var ExitCode; (function(ExitCode2) { @@ -156123,7 +156123,7 @@ var require_core3 = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path7.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path8.delimiter}${process.env["PATH"]}`; } exports2.addPath = addPath; function getInput2(name, options) { @@ -156299,13 +156299,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(path7) { - if (!path7) { - throw new Error(`Artifact path: ${path7}, is incorrectly provided`); + function checkArtifactFilePath(path8) { + if (!path8) { + throw new Error(`Artifact path: ${path8}, is incorrectly provided`); } for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) { - if (path7.includes(invalidCharacterKey)) { - throw new Error(`Artifact path is not valid: ${path7}. Contains the following character: ${errorMessageForCharacter} + if (path8.includes(invalidCharacterKey)) { + throw new Error(`Artifact path is not valid: ${path8}. Contains the following character: ${errorMessageForCharacter} Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()} @@ -156396,7 +156396,7 @@ var require_tmp = __commonJS({ "node_modules/tmp/lib/tmp.js"(exports2, module2) { var fs8 = require("fs"); var os2 = require("os"); - var path7 = require("path"); + var path8 = require("path"); var crypto2 = require("crypto"); var _c = { fs: fs8.constants, os: os2.constants }; var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; @@ -156603,35 +156603,35 @@ var require_tmp = __commonJS({ return [actualOptions, callback]; } function _resolvePath(name, tmpDir, cb) { - const pathToResolve = path7.isAbsolute(name) ? name : path7.join(tmpDir, name); + const pathToResolve = path8.isAbsolute(name) ? name : path8.join(tmpDir, name); fs8.stat(pathToResolve, function(err) { if (err) { - fs8.realpath(path7.dirname(pathToResolve), function(err2, parentDir) { + fs8.realpath(path8.dirname(pathToResolve), function(err2, parentDir) { if (err2) return cb(err2); - cb(null, path7.join(parentDir, path7.basename(pathToResolve))); + cb(null, path8.join(parentDir, path8.basename(pathToResolve))); }); } else { - fs8.realpath(path7, cb); + fs8.realpath(path8, cb); } }); } function _resolvePathSync(name, tmpDir) { - const pathToResolve = path7.isAbsolute(name) ? name : path7.join(tmpDir, name); + const pathToResolve = path8.isAbsolute(name) ? name : path8.join(tmpDir, name); try { fs8.statSync(pathToResolve); return fs8.realpathSync(pathToResolve); } catch (_err) { - const parentDir = fs8.realpathSync(path7.dirname(pathToResolve)); - return path7.join(parentDir, path7.basename(pathToResolve)); + const parentDir = fs8.realpathSync(path8.dirname(pathToResolve)); + return path8.join(parentDir, path8.basename(pathToResolve)); } } function _generateTmpName(opts) { const tmpDir = opts.tmpdir; if (!_isUndefined(opts.name)) { - return path7.join(tmpDir, opts.dir, opts.name); + return path8.join(tmpDir, opts.dir, opts.name); } if (!_isUndefined(opts.template)) { - return path7.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); + return path8.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); } const name = [ opts.prefix ? opts.prefix : "tmp", @@ -156641,13 +156641,13 @@ var require_tmp = __commonJS({ _randomChars(12), opts.postfix ? "-" + opts.postfix : "" ].join(""); - return path7.join(tmpDir, opts.dir, name); + return path8.join(tmpDir, opts.dir, name); } function _assertOptionsBase(options) { if (!_isUndefined(options.name)) { const name = options.name; - if (path7.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`); - const basename2 = path7.basename(name); + if (path8.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`); + const basename2 = path8.basename(name); if (basename2 === ".." || basename2 === "." || basename2 !== name) throw new Error(`name option must not contain a path, found "${name}".`); } @@ -156669,7 +156669,7 @@ var require_tmp = __commonJS({ if (_isUndefined(name)) return cb(null); _resolvePath(name, tmpDir, function(err, resolvedPath) { if (err) return cb(err); - const relativePath = path7.relative(tmpDir, resolvedPath); + const relativePath = path8.relative(tmpDir, resolvedPath); if (!resolvedPath.startsWith(tmpDir)) { return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`)); } @@ -156679,7 +156679,7 @@ var require_tmp = __commonJS({ function _getRelativePathSync(option, name, tmpDir) { if (_isUndefined(name)) return; const resolvedPath = _resolvePathSync(name, tmpDir); - const relativePath = path7.relative(tmpDir, resolvedPath); + const relativePath = path8.relative(tmpDir, resolvedPath); if (!resolvedPath.startsWith(tmpDir)) { throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`); } @@ -156759,14 +156759,14 @@ var require_tmp_promise = __commonJS({ var fileWithOptions = promisify( (options, cb) => tmp.file( options, - (err, path7, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path7, fd, cleanup: promisify(cleanup) }) + (err, path8, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path8, fd, cleanup: promisify(cleanup) }) ) ); module2.exports.file = async (options) => fileWithOptions(options); module2.exports.withFile = async function withFile(fn, options) { - const { path: path7, fd, cleanup } = await module2.exports.file(options); + const { path: path8, fd, cleanup } = await module2.exports.file(options); try { - return await fn({ path: path7, fd }); + return await fn({ path: path8, fd }); } finally { await cleanup(); } @@ -156775,14 +156775,14 @@ var require_tmp_promise = __commonJS({ var dirWithOptions = promisify( (options, cb) => tmp.dir( options, - (err, path7, cleanup) => err ? cb(err) : cb(void 0, { path: path7, cleanup: promisify(cleanup) }) + (err, path8, cleanup) => err ? cb(err) : cb(void 0, { path: path8, cleanup: promisify(cleanup) }) ) ); module2.exports.dir = async (options) => dirWithOptions(options); module2.exports.withDir = async function withDir(fn, options) { - const { path: path7, cleanup } = await module2.exports.dir(options); + const { path: path8, cleanup } = await module2.exports.dir(options); try { - return await fn({ path: path7 }); + return await fn({ path: path8 }); } finally { await cleanup(); } @@ -157171,11 +157171,11 @@ var require_utils13 = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -157191,7 +157191,7 @@ var require_utils13 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -157401,19 +157401,19 @@ Header Information: ${JSON.stringify(response.message.headers, void 0, 2)} exports2.getProperRetention = getProperRetention; function sleep(milliseconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5) => setTimeout(resolve5, milliseconds)); + return new Promise((resolve6) => setTimeout(resolve6, milliseconds)); }); } exports2.sleep = sleep; function digestForStream(stream) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { const crc64 = new crc64_1.default(); const md5 = crypto_1.default.createHash("md5"); stream.on("data", (data) => { crc64.update(data); md5.update(data); - }).on("end", () => resolve5({ + }).on("end", () => resolve6({ crc64: crc64.digest("base64"), md5: md5.digest("base64") })).on("error", reject); @@ -157537,11 +157537,11 @@ var require_upload_gzip = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -157557,7 +157557,7 @@ var require_upload_gzip = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -157570,14 +157570,14 @@ var require_upload_gzip = __commonJS({ }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve5, reject) { - v = o[n](v), settle(resolve5, reject, v.done, v.value); + return new Promise(function(resolve6, reject) { + v = o[n](v), settle(resolve6, reject, v.done, v.value); }); }; } - function settle(resolve5, reject, d, v) { + function settle(resolve6, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve5({ value: v2, done: d }); + resolve6({ value: v2, done: d }); }, reject); } }; @@ -157618,14 +157618,14 @@ var require_upload_gzip = __commonJS({ return Number.MAX_SAFE_INTEGER; } } - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { const inputStream = fs8.createReadStream(originalFilePath); const gzip = zlib.createGzip(); const outputStream = fs8.createWriteStream(tempFilePath); inputStream.pipe(gzip).pipe(outputStream); outputStream.on("finish", () => __awaiter2(this, void 0, void 0, function* () { const size = (yield stat(tempFilePath)).size; - resolve5(size); + resolve6(size); })); outputStream.on("error", (error3) => { console.log(error3); @@ -157637,7 +157637,7 @@ var require_upload_gzip = __commonJS({ exports2.createGZipFileOnDisk = createGZipFileOnDisk; function createGZipFileInBuffer(originalFilePath) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { var _a, e_1, _b, _c; const inputStream = fs8.createReadStream(originalFilePath); const gzip = zlib.createGzip(); @@ -157663,7 +157663,7 @@ var require_upload_gzip = __commonJS({ if (e_1) throw e_1.error; } } - resolve5(Buffer.concat(chunks)); + resolve6(Buffer.concat(chunks)); })); }); } @@ -157704,11 +157704,11 @@ var require_requestUtils2 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -157724,7 +157724,7 @@ var require_requestUtils2 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -157821,11 +157821,11 @@ var require_upload_http_client = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -157841,7 +157841,7 @@ var require_upload_http_client = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -158213,11 +158213,11 @@ var require_download_http_client = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -158233,7 +158233,7 @@ var require_download_http_client = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -158366,10 +158366,10 @@ var require_download_http_client = __commonJS({ }; const resetDestinationStream = (fileDownloadPath) => __awaiter2(this, void 0, void 0, function* () { destinationStream.close(); - yield new Promise((resolve5) => { - destinationStream.on("close", resolve5); + yield new Promise((resolve6) => { + destinationStream.on("close", resolve6); if (destinationStream.writableFinished) { - resolve5(); + resolve6(); } }); yield (0, utils_1.rmFile)(fileDownloadPath); @@ -158418,7 +158418,7 @@ var require_download_http_client = __commonJS({ */ pipeResponseToFile(response, destinationStream, isGzip) { return __awaiter2(this, void 0, void 0, function* () { - yield new Promise((resolve5, reject) => { + yield new Promise((resolve6, reject) => { if (isGzip) { const gunzip = zlib.createGunzip(); response.message.on("error", (error3) => { @@ -158431,7 +158431,7 @@ var require_download_http_client = __commonJS({ destinationStream.close(); reject(error3); }).pipe(destinationStream).on("close", () => { - resolve5(); + resolve6(); }).on("error", (error3) => { core15.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); reject(error3); @@ -158442,7 +158442,7 @@ var require_download_http_client = __commonJS({ destinationStream.close(); reject(error3); }).pipe(destinationStream).on("close", () => { - resolve5(); + resolve6(); }).on("error", (error3) => { core15.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); reject(error3); @@ -158490,21 +158490,21 @@ var require_download_specification = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadSpecification = void 0; - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); function getDownloadSpecification(artifactName, artifactEntries, downloadPath, includeRootDirectory) { const directories = /* @__PURE__ */ new Set(); const specifications = { - rootDownloadLocation: includeRootDirectory ? path7.join(downloadPath, artifactName) : downloadPath, + rootDownloadLocation: includeRootDirectory ? path8.join(downloadPath, artifactName) : downloadPath, directoryStructure: [], emptyFilesToCreate: [], filesToDownload: [] }; for (const entry of artifactEntries) { if (entry.path.startsWith(`${artifactName}/`) || entry.path.startsWith(`${artifactName}\\`)) { - const normalizedPathEntry = path7.normalize(entry.path); - const filePath = path7.join(downloadPath, includeRootDirectory ? normalizedPathEntry : normalizedPathEntry.replace(artifactName, "")); + const normalizedPathEntry = path8.normalize(entry.path); + const filePath = path8.join(downloadPath, includeRootDirectory ? normalizedPathEntry : normalizedPathEntry.replace(artifactName, "")); if (entry.itemType === "file") { - directories.add(path7.dirname(filePath)); + directories.add(path8.dirname(filePath)); if (entry.fileLength === 0) { specifications.emptyFilesToCreate.push(filePath); } else { @@ -158556,11 +158556,11 @@ var require_artifact_client = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -158576,7 +158576,7 @@ var require_artifact_client = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -158646,7 +158646,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz return uploadResponse; }); } - downloadArtifact(name, path7, options) { + downloadArtifact(name, path8, options) { return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const artifacts = yield downloadHttpClient.listArtifacts(); @@ -158660,12 +158660,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 (!path7) { - path7 = (0, config_variables_1.getWorkSpaceDirectory)(); + if (!path8) { + path8 = (0, config_variables_1.getWorkSpaceDirectory)(); } - path7 = (0, path_1.normalize)(path7); - path7 = (0, path_1.resolve)(path7); - const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path7, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); + path8 = (0, path_1.normalize)(path8); + path8 = (0, path_1.resolve)(path8); + const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path8, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); if (downloadSpecification.filesToDownload.length === 0) { core15.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`); } else { @@ -158680,7 +158680,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz }; }); } - downloadAllArtifacts(path7) { + downloadAllArtifacts(path8) { return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const response = []; @@ -158689,18 +158689,18 @@ Note: The size of downloaded zips can differ significantly from the reported siz core15.info("Unable to find any artifacts for the associated workflow"); return response; } - if (!path7) { - path7 = (0, config_variables_1.getWorkSpaceDirectory)(); + if (!path8) { + path8 = (0, config_variables_1.getWorkSpaceDirectory)(); } - path7 = (0, path_1.normalize)(path7); - path7 = (0, path_1.resolve)(path7); + path8 = (0, path_1.normalize)(path8); + path8 = (0, path_1.resolve)(path8); let downloadedArtifacts = 0; while (downloadedArtifacts < artifacts.count) { const currentArtifactToDownload = artifacts.value[downloadedArtifacts]; downloadedArtifacts += 1; core15.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, path7, true); + const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path8, true); if (downloadSpecification.filesToDownload.length === 0) { core15.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`); } else { @@ -158741,6 +158741,7 @@ var core14 = __toESM(require_core()); // src/actions-util.ts var fs = __toESM(require("fs")); +var path2 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); @@ -161545,6 +161546,10 @@ function getTemporaryDirectory() { const value = process.env["CODEQL_ACTION_TEMP"]; return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } +var PR_DIFF_RANGE_JSON_FILENAME = "pr-diff-range.json"; +function getDiffRangesJsonFilePath() { + return path2.join(getTemporaryDirectory(), PR_DIFF_RANGE_JSON_FILENAME); +} function getActionVersion() { return "4.34.2"; } @@ -161761,7 +161766,7 @@ async function getGitHubVersion() { // src/codeql.ts var fs4 = __toESM(require("fs")); -var path4 = __toESM(require("path")); +var path5 = __toESM(require("path")); var core11 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -162009,7 +162014,7 @@ function wrapCliConfigurationError(cliError) { // src/config-utils.ts var fs3 = __toESM(require("fs")); -var path3 = __toESM(require("path")); +var path4 = __toESM(require("path")); var core9 = __toESM(require_core()); // src/analyses.ts @@ -162074,7 +162079,7 @@ var semver5 = __toESM(require_semver2()); // src/overlay/index.ts var fs2 = __toESM(require("fs")); -var path2 = __toESM(require("path")); +var path3 = __toESM(require("path")); var actionsCache = __toESM(require_cache5()); // src/git-utils.ts @@ -162180,8 +162185,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path7 = decodeGitFilePath(match[2]); - fileOidMap[path7] = oid; + const path8 = decodeGitFilePath(match[2]); + fileOidMap[path8] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -162296,7 +162301,7 @@ async function writeOverlayChangesFile(config, sourceRoot, logger) { const diffRangeFiles = await getDiffRangeFilePaths(sourceRoot, logger); const changedFiles = [.../* @__PURE__ */ new Set([...oidChangedFiles, ...diffRangeFiles])]; const changedFilesJson = JSON.stringify({ changes: changedFiles }); - const overlayChangesFile = path2.join( + const overlayChangesFile = path3.join( getTemporaryDirectory(), "overlay-changes.json" ); @@ -162321,13 +162326,16 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { return changes; } async function getDiffRangeFilePaths(sourceRoot, logger) { - const jsonFilePath = path2.join(getTemporaryDirectory(), "pr-diff-range.json"); - if (!fs2.existsSync(jsonFilePath)) { + const jsonFilePath = getDiffRangesJsonFilePath(); + let contents; + try { + contents = await fs2.promises.readFile(jsonFilePath, "utf8"); + } catch { return []; } let diffRanges; try { - diffRanges = JSON.parse(fs2.readFileSync(jsonFilePath, "utf8")); + diffRanges = JSON.parse(contents); } catch (e) { logger.warning( `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` @@ -162337,30 +162345,17 @@ async function getDiffRangeFilePaths(sourceRoot, logger) { logger.debug( `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.` ); - const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === void 0) { logger.warning( "Cannot determine git root; returning diff range paths as-is." ); - return repoRelativePaths; - } - const sourceRootRelPrefix = path2.relative(repoRoot, sourceRoot).replaceAll(path2.sep, "/"); - if (sourceRootRelPrefix === "") { - return repoRelativePaths; + return [...new Set(diffRanges.map((r) => r.path))]; } - const prefixWithSlash = `${sourceRootRelPrefix}/`; - const result = []; - for (const p of repoRelativePaths) { - if (p.startsWith(prefixWithSlash)) { - result.push(p.slice(prefixWithSlash.length)); - } else { - logger.debug( - `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").` - ); - } - } - return result; + const relativePaths = diffRanges.map( + (r) => path3.relative(sourceRoot, path3.join(repoRoot, r.path)).replaceAll(path3.sep, "/") + ).filter((rel) => !rel.startsWith("..")); + return [...new Set(relativePaths)]; } // src/tools-features.ts @@ -162620,7 +162615,7 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = { ruby: "overlay_analysis_code_scanning_ruby" /* OverlayAnalysisCodeScanningRuby */ }; function getPathToParsedConfigFile(tempDir) { - return path3.join(tempDir, "config"); + return path4.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); @@ -162735,7 +162730,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path4.join( + const tracingConfigPath = path5.join( extractorPath, "tools", "tracing-config.lua" @@ -162817,7 +162812,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path4.join( + const autobuildCmd = path5.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -163239,7 +163234,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path4.resolve(config.tempDir, "user-config.yaml"); + return path5.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -163261,7 +163256,7 @@ async function getJobRunUuidSarifOptions(codeql) { // src/debug-artifacts.ts var fs6 = __toESM(require("fs")); -var path6 = __toESM(require("path")); +var path7 = __toESM(require("path")); var artifact = __toESM(require_artifact2()); var artifactLegacy = __toESM(require_artifact_client2()); var core13 = __toESM(require_core()); @@ -163287,7 +163282,7 @@ function getCsharpTempDependencyDir() { // src/artifact-scanner.ts var fs5 = __toESM(require("fs")); var os = __toESM(require("os")); -var path5 = __toESM(require("path")); +var path6 = __toESM(require("path")); var exec = __toESM(require_exec()); var GITHUB_PAT_CLASSIC_PATTERN = { type: "Personal Access Token (Classic)" /* PersonalAccessClassic */, @@ -163355,9 +163350,9 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log }; try { const tempExtractDir = fs5.mkdtempSync( - path5.join(extractDir, `extract-${depth}-`) + path6.join(extractDir, `extract-${depth}-`) ); - const fileName = path5.basename(archivePath).toLowerCase(); + const fileName = path6.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], { @@ -163374,18 +163369,18 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log ); } else if (fileName.endsWith(".zst")) { logger.debug(`Extracting zst file: ${archivePath}`); - const outputFile = path5.join( + const outputFile = path6.join( tempExtractDir, - path5.basename(archivePath, ".zst") + path6.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 = path5.join( + const outputFile = path6.join( tempExtractDir, - path5.basename(archivePath, ".gz") + path6.basename(archivePath, ".gz") ); await exec.exec("gunzip", ["-c", archivePath], { outStream: fs5.createWriteStream(outputFile), @@ -163422,7 +163417,7 @@ async function scanFile(fullPath, relativePath, extractDir, logger, depth = 0) { scannedFiles: 1, findings: [] }; - const fileName = path5.basename(fullPath).toLowerCase(); + const fileName = path6.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( @@ -163446,8 +163441,8 @@ async function scanDirectory(dirPath, baseRelativePath, logger, depth = 0) { }; const entries = fs5.readdirSync(dirPath, { withFileTypes: true }); for (const entry of entries) { - const fullPath = path5.join(dirPath, entry.name); - const relativePath = path5.join(baseRelativePath, entry.name); + const fullPath = path6.join(dirPath, entry.name); + const relativePath = path6.join(baseRelativePath, entry.name); if (entry.isDirectory()) { const subResult = await scanDirectory( fullPath, @@ -163461,7 +163456,7 @@ async function scanDirectory(dirPath, baseRelativePath, logger, depth = 0) { const fileResult = await scanFile( fullPath, relativePath, - path5.dirname(fullPath), + path6.dirname(fullPath), logger, depth ); @@ -163479,11 +163474,11 @@ async function scanArtifactsForTokens(filesToScan, logger) { scannedFiles: 0, findings: [] }; - const tempScanDir = fs5.mkdtempSync(path5.join(os.tmpdir(), "artifact-scan-")); + const tempScanDir = fs5.mkdtempSync(path6.join(os.tmpdir(), "artifact-scan-")); try { for (const filePath of filesToScan) { const stats = fs5.statSync(filePath); - const fileName = path5.basename(filePath); + const fileName = path6.basename(filePath); if (stats.isDirectory()) { const dirResult = await scanDirectory(filePath, fileName, logger); result.scannedFiles += dirResult.scannedFiles; @@ -163540,14 +163535,14 @@ async function uploadCombinedSarifArtifacts(logger, gitHubVariant, codeQlVersion logger.info( "Uploading available combined SARIF files as Actions debugging artifact..." ); - const baseTempDir = path6.resolve(tempDir, "combined-sarif"); + const baseTempDir = path7.resolve(tempDir, "combined-sarif"); const toUpload = []; if (fs6.existsSync(baseTempDir)) { const outputDirs = fs6.readdirSync(baseTempDir); for (const outputDir of outputDirs) { - const sarifFiles = fs6.readdirSync(path6.resolve(baseTempDir, outputDir)).filter((f) => path6.extname(f) === ".sarif"); + const sarifFiles = fs6.readdirSync(path7.resolve(baseTempDir, outputDir)).filter((f) => path7.extname(f) === ".sarif"); for (const sarifFile of sarifFiles) { - toUpload.push(path6.resolve(baseTempDir, outputDir, sarifFile)); + toUpload.push(path7.resolve(baseTempDir, outputDir, sarifFile)); } } } @@ -163612,8 +163607,8 @@ async function uploadArtifacts(logger, toUpload, rootDir, artifactName, ghVarian try { await artifactUploader.uploadArtifact( sanitizeArtifactName(`${artifactName}${suffix}`), - toUpload.map((file) => path6.normalize(file)), - path6.normalize(rootDir), + toUpload.map((file) => path7.normalize(file)), + path7.normalize(rootDir), { // ensure we don't keep the debug artifacts around for too long since they can be large. retentionDays: 7 diff --git a/lib/analyze-action.js b/lib/analyze-action.js index c3e3a37c9a..a665a6ef96 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-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 path16 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path15 = 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 (path15 && path15[0] !== "/") { + path15 = `/${path15}`; } - return new URL(`${origin}${path16}`); + return new URL(`${origin}${path15}`); } 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: path15, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path16); + debuglog("sending request to %s %s/%s", method, origin, path15); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path16, origin }, + request: { method, path: path15, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path16, + path15, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path16, origin } + request: { method, path: path15, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path16); + debuglog("trailers received from %s %s/%s", method, origin, path15); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path16, origin }, + request: { method, path: path15, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path16, + path15, 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: path15, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path16); + debuglog("sending request to %s %s/%s", method, origin, path15); }); } 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: path15, method, body, headers, @@ -1956,11 +1956,11 @@ var require_request = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path16 !== "string") { + if (typeof path15 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path16[0] !== "/" && !(path16.startsWith("http://") || path16.startsWith("https://")) && method !== "CONNECT") { + } else if (path15[0] !== "/" && !(path15.startsWith("http://") || path15.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(path15)) { 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(path15, query) : path15; 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: path15, 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} ${path15} 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: path15, 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] = path15; 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 path15 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path16; + this.opts.path = path15; 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: path15 = "/", headers = {} } = opts; - opts.path = origin + path16; + opts.path = origin + path15; 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(path15) { + if (typeof path15 !== "string") { + return path15; } - const pathSegments = path16.split("?"); + const pathSegments = path15.split("?"); if (pathSegments.length !== 2) { - return path16; + return path15; } 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: path15, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path15); 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: path15 }) => matchValue(safeUrl(path15), 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: path15, method, body, headers, query } = opts; return { - path: path16, + path: path15, 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: path15, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path16, + Path: path15, "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(path15) { + for (let i = 0; i < path15.length; ++i) { + const code = path15.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 path15 = opts.path; if (!opts.path.startsWith("/")) { - path16 = `/${path16}`; + path15 = `/${path15}`; } - url2 = new URL(util.parseOrigin(url2).origin + path16); + url2 = new URL(util.parseOrigin(url2).origin + path15); } 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 path15 = __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, path15.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 path15 = __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 = path15.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 = path15.dirname(filePath); + const upperName = path15.basename(filePath).toUpperCase(); for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path16.join(directory, actualName); + filePath = path15.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 path15 = __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 ? path15.join(dest, path15.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 (path15.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 = path15.join(dest, path15.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -20363,7 +20363,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path16.dirname(dest)); + yield mkdirP(path15.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(path15.delimiter)) { if (extension) { extensions.push(extension); } @@ -20435,12 +20435,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path16.sep)) { + if (tool.includes(path15.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(path15.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(path15.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -20578,7 +20578,7 @@ var require_toolrunner = __commonJS({ var os5 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path16 = __importStar2(require("path")); + var path15 = __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 = path15.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 os5 = __importStar2(require("os")); - var path16 = __importStar2(require("path")); + var path15 = __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}${path15.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 path15 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path15} 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 path15 = 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 (path15 && path15[0] !== "/") { + path15 = `/${path15}`; } - return new URL(`${origin}${path16}`); + return new URL(`${origin}${path15}`); } 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: path15, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path16); + debuglog("sending request to %s %s/%s", method, origin, path15); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path16, origin }, + request: { method, path: path15, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path16, + path15, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path16, origin } + request: { method, path: path15, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path16); + debuglog("trailers received from %s %s/%s", method, origin, path15); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path16, origin }, + request: { method, path: path15, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path16, + path15, 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: path15, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path16); + debuglog("sending request to %s %s/%s", method, origin, path15); }); } 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: path15, method, body, headers, @@ -22954,11 +22954,11 @@ var require_request3 = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path16 !== "string") { + if (typeof path15 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path16[0] !== "/" && !(path16.startsWith("http://") || path16.startsWith("https://")) && method !== "CONNECT") { + } else if (path15[0] !== "/" && !(path15.startsWith("http://") || path15.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(path15)) { 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(path15, query) : path15; 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: path15, 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} ${path15} 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: path15, 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] = path15; 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 path15 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path16; + this.opts.path = path15; 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: path15 = "/", headers = {} } = opts; - opts.path = origin + path16; + opts.path = origin + path15; 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(path15) { + if (typeof path15 !== "string") { + return path15; } - const pathSegments = path16.split("?"); + const pathSegments = path15.split("?"); if (pathSegments.length !== 2) { - return path16; + return path15; } 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: path15, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path15); 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: path15 }) => matchValue(safeUrl(path15), 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: path15, method, body, headers, query } = opts; return { - path: path16, + path: path15, 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: path15, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path16, + Path: path15, "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(path15) { + for (let i = 0; i < path15.length; ++i) { + const code = path15.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 path15 = opts.path; if (!opts.path.startsWith("/")) { - path16 = `/${path16}`; + path15 = `/${path15}`; } - url2 = new URL(util.parseOrigin(url2).origin + path16); + url2 = new URL(util.parseOrigin(url2).origin + path15); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -47305,14 +47305,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, path15, name, argument) { + if (Array.isArray(path15)) { + this.path = path15; + this.property = path15.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path16 !== void 0) { - this.property = path16; + } else if (path15 !== void 0) { + this.property = path15; } if (message) { this.message = message; @@ -47403,16 +47403,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, path15, 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(path15)) { + this.path = path15; + this.propertyPath = path15.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path16; + this.propertyPath = path15; } this.base = base; this.schemas = schemas; @@ -47421,10 +47421,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 path15 = 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, path15, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -48727,7 +48727,7 @@ var require_internal_path_helper = __commonJS({ exports2.hasRoot = hasRoot; exports2.normalizeSeparators = normalizeSeparators; exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - var path16 = __importStar2(require("path")); + var path15 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -48735,7 +48735,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path16.dirname(p); + let result = path15.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -48772,7 +48772,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 += path15.sep; } return root + itemPath; } @@ -48806,10 +48806,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path16.sep)) { + if (!p.endsWith(path15.sep)) { return p; } - if (p === path16.sep) { + if (p === path15.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -49154,7 +49154,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path16 = (function() { + var path15 = (function() { try { return require("path"); } catch (e) { @@ -49162,7 +49162,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path16.sep; + minimatch.sep = path15.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand2 = require_brace_expansion(); var plTypes = { @@ -49251,8 +49251,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 && path15.sep !== "/") { + pattern = pattern.split(path15.sep).join("/"); } this.options = options; this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200; @@ -49623,8 +49623,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 (path15.sep !== "/") { + f = f.split(path15.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -49867,7 +49867,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path16 = __importStar2(require("path")); + var path15 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -49882,12 +49882,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(path15.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path16.basename(remaining); + const basename = path15.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -49905,7 +49905,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(path15.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -49916,12 +49916,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(path15.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 += path15.sep; } result += this.segments[i]; } @@ -49979,7 +49979,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os5 = __importStar2(require("os")); - var path16 = __importStar2(require("path")); + var path15 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); @@ -50008,7 +50008,7 @@ var require_internal_pattern = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir2); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path16.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path15.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -50032,8 +50032,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(path15.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path15.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -50068,9 +50068,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(`.${path15.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path16.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path15.sep}`)) { homedir2 = homedir2 || os5.homedir(); (0, assert_1.default)(homedir2, "Unable to determine HOME directory"); (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`); @@ -50154,8 +50154,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(path15, level) { + this.path = path15; this.level = level; } }; @@ -50299,7 +50299,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 path15 = __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(); @@ -50375,7 +50375,7 @@ var require_internal_globber = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path16.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path15.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -50385,7 +50385,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(path15.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); @@ -50547,7 +50547,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 path15 = __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; @@ -50563,7 +50563,7 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path16.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path15.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } @@ -51949,7 +51949,7 @@ var require_cacheUtils = __commonJS({ var io7 = __importStar2(require_io()); var crypto3 = __importStar2(require("crypto")); var fs18 = __importStar2(require("fs")); - var path16 = __importStar2(require("path")); + var path15 = __importStar2(require("path")); var semver9 = __importStar2(require_semver3()); var util = __importStar2(require("util")); var constants_1 = require_constants12(); @@ -51969,9 +51969,9 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path16.join(baseLocation, "actions", "temp"); + tempDirectory = path15.join(baseLocation, "actions", "temp"); } - const dest = path16.join(tempDirectory, crypto3.randomUUID()); + const dest = path15.join(tempDirectory, crypto3.randomUUID()); yield io7.mkdirP(dest); return dest; }); @@ -51993,7 +51993,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 = path15.relative(workspace, file).replace(new RegExp(`\\${path15.sep}`, "g"), "/"); core17.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -52520,13 +52520,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(path15, preserveJsx) { + if (typeof path15 === "string" && /^\.\.?\//.test(path15)) { + return path15.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 path15; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -56940,8 +56940,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 = (path15, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path15, args, { allowInsecureConnection, ...requestOptions }); return { get: (requestOptions = {}) => { return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); @@ -60812,15 +60812,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 path15 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path15.startsWith("/")) { + path15 = path15.substring(1); } - if (isAbsoluteUrl(path16)) { - requestUrl = path16; + if (isAbsoluteUrl(path15)) { + requestUrl = path15; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path16); + requestUrl = appendPath(requestUrl, path15); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -60866,9 +60866,9 @@ var require_urlHelpers2 = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path16 = pathToAppend.substring(0, searchStart); + const path15 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path16; + newPath = newPath + path15; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -63545,10 +63545,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 path15 = urlParsed.pathname; + path15 = path15 || "/"; + path15 = escape(path15); + urlParsed.pathname = path15; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -63633,9 +63633,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 path15 = urlParsed.pathname; + path15 = path15 ? path15.endsWith("/") ? `${path15}${name}` : `${path15}/${name}` : name; + urlParsed.pathname = path15; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -64862,9 +64862,9 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path16 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path15 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path16}`; + canonicalizedResourceString += `/${this.factory.accountName}${path15}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -65603,10 +65603,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 path15 = urlParsed.pathname; + path15 = path15 || "/"; + path15 = escape(path15); + urlParsed.pathname = path15; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -65691,9 +65691,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 path15 = urlParsed.pathname; + path15 = path15 ? path15.endsWith("/") ? `${path15}${name}` : `${path15}/${name}` : name; + urlParsed.pathname = path15; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -66614,9 +66614,9 @@ var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path16 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path15 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path16}`; + canonicalizedResourceString += `/${this.factory.accountName}${path15}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67246,9 +67246,9 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path16 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path15 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path16}`; + canonicalizedResourceString += `/${options.accountName}${path15}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67593,9 +67593,9 @@ var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path16 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path15 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path16}`; + canonicalizedResourceString += `/${options.accountName}${path15}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -89250,8 +89250,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 path15 = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path15 || path15 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -89329,8 +89329,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 path15 = (0, utils_common_js_1.getURLPath)(url2); + if (path15 && path15 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -98639,7 +98639,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 path15 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants12(); var IS_WINDOWS = process.platform === "win32"; @@ -98685,13 +98685,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(`\\${path15.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path15.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(`\\${path15.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path15.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(`\\${path15.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -98737,7 +98737,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(`\\${path15.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -98746,7 +98746,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(`\\${path15.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -98761,7 +98761,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(`\\${path15.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -98770,7 +98770,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(`\\${path15.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -98808,7 +98808,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)(path15.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -98890,7 +98890,7 @@ var require_cache5 = __commonJS({ exports2.restoreCache = restoreCache5; exports2.saveCache = saveCache5; var core17 = __importStar2(require_core()); - var path16 = __importStar2(require("path")); + var path15 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); @@ -98985,7 +98985,7 @@ var require_cache5 = __commonJS({ core17.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path16.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path15.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core17.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core17.isDebug()) { @@ -99054,7 +99054,7 @@ var require_cache5 = __commonJS({ core17.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path16.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path15.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); @@ -99116,7 +99116,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 = path15.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core17.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99180,7 +99180,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 = path15.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core17.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99607,7 +99607,7 @@ var require_tool_cache = __commonJS({ var fs18 = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os5 = __importStar2(require("os")); - var path16 = __importStar2(require("path")); + var path15 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver9 = __importStar2(require_semver2()); var stream2 = __importStar2(require("stream")); @@ -99628,8 +99628,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(), crypto3.randomUUID()); - yield io7.mkdirP(path16.dirname(dest)); + dest = dest || path15.join(_getTempDirectory(), crypto3.randomUUID()); + yield io7.mkdirP(path15.dirname(dest)); core17.debug(`Downloading ${url2}`); core17.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -99719,7 +99719,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 = path15.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}'`; @@ -99891,7 +99891,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 = path15.join(sourceDir, itemName); yield io7.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -99908,7 +99908,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 = path15.join(destFolder, targetFile); core17.debug(`destination file ${destPath}`); yield io7.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -99931,7 +99931,7 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver9.clean(versionSpec) || ""; - const cachePath = path16.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path15.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}`); @@ -99945,12 +99945,12 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os5.arch(); - const toolPath = path16.join(_getCacheDirectory(), toolName); + const toolPath = path15.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 = path15.join(toolPath, child, arch2 || ""); if (fs18.existsSync(fullPath) && fs18.existsSync(`${fullPath}.complete`)) { versions.push(child); } @@ -100002,7 +100002,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path16.join(_getTempDirectory(), crypto3.randomUUID()); + dest = path15.join(_getTempDirectory(), crypto3.randomUUID()); } yield io7.mkdirP(dest); return dest; @@ -100010,7 +100010,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 = path15.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); core17.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io7.rmRF(folderPath); @@ -100020,7 +100020,7 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path16.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path15.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; fs18.writeFileSync(markerPath, ""); core17.debug("finished caching tool"); @@ -106714,6 +106714,10 @@ function getTemporaryDirectory() { const value = process.env["CODEQL_ACTION_TEMP"]; return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } +var PR_DIFF_RANGE_JSON_FILENAME = "pr-diff-range.json"; +function getDiffRangesJsonFilePath() { + return path2.join(getTemporaryDirectory(), PR_DIFF_RANGE_JSON_FILENAME); +} function getActionVersion() { return "4.34.2"; } @@ -106956,7 +106960,7 @@ var SarifScanOrder = [ // src/analyze.ts var fs12 = __toESM(require("fs")); -var path12 = __toESM(require("path")); +var path11 = __toESM(require("path")); var import_perf_hooks2 = require("perf_hooks"); var io5 = __toESM(require_io()); @@ -107236,7 +107240,7 @@ function wrapApiConfigurationError(e) { // src/codeql.ts var fs11 = __toESM(require("fs")); -var path11 = __toESM(require("path")); +var path10 = __toESM(require("path")); var core11 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -107484,7 +107488,7 @@ function wrapCliConfigurationError(cliError) { // src/config-utils.ts var fs6 = __toESM(require("fs")); -var path7 = __toESM(require("path")); +var path6 = __toESM(require("path")); var core9 = __toESM(require_core()); // src/caching-utils.ts @@ -107624,7 +107628,6 @@ function writeDiagnostic(config, language, diagnostic) { // src/diff-informed-analysis-utils.ts var fs5 = __toESM(require("fs")); -var path6 = __toESM(require("path")); // src/feature-flags.ts var fs4 = __toESM(require("fs")); @@ -107777,8 +107780,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 path15 = decodeGitFilePath(match[2]); + fileOidMap[path15] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -107918,13 +107921,16 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { return changes; } async function getDiffRangeFilePaths(sourceRoot, logger) { - const jsonFilePath = path4.join(getTemporaryDirectory(), "pr-diff-range.json"); - if (!fs3.existsSync(jsonFilePath)) { + const jsonFilePath = getDiffRangesJsonFilePath(); + let contents; + try { + contents = await fs3.promises.readFile(jsonFilePath, "utf8"); + } catch { return []; } let diffRanges; try { - diffRanges = JSON.parse(fs3.readFileSync(jsonFilePath, "utf8")); + diffRanges = JSON.parse(contents); } catch (e) { logger.warning( `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` @@ -107934,30 +107940,17 @@ async function getDiffRangeFilePaths(sourceRoot, logger) { logger.debug( `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.` ); - const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === void 0) { logger.warning( "Cannot determine git root; returning diff range paths as-is." ); - return repoRelativePaths; + return [...new Set(diffRanges.map((r) => r.path))]; } - const sourceRootRelPrefix = path4.relative(repoRoot, sourceRoot).replaceAll(path4.sep, "/"); - if (sourceRootRelPrefix === "") { - return repoRelativePaths; - } - const prefixWithSlash = `${sourceRootRelPrefix}/`; - const result = []; - for (const p of repoRelativePaths) { - if (p.startsWith(prefixWithSlash)) { - result.push(p.slice(prefixWithSlash.length)); - } else { - logger.debug( - `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").` - ); - } - } - return result; + const relativePaths = diffRanges.map( + (r) => path4.relative(sourceRoot, path4.join(repoRoot, r.path)).replaceAll(path4.sep, "/") + ).filter((rel) => !rel.startsWith("..")); + return [...new Set(relativePaths)]; } var CACHE_VERSION = 1; var CACHE_PREFIX = "codeql-overlay-base-database"; @@ -108644,9 +108637,6 @@ function initFeatures(gitHubVersion, repositoryNwo, tempDir, logger) { } // src/diff-informed-analysis-utils.ts -function getDiffRangesJsonFilePath() { - return path6.join(getTemporaryDirectory(), "pr-diff-range.json"); -} function readDiffRangesJsonFile(logger) { const jsonFilePath = getDiffRangesJsonFilePath(); if (!fs5.existsSync(jsonFilePath)) { @@ -108818,7 +108808,7 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = { ruby: "overlay_analysis_code_scanning_ruby" /* OverlayAnalysisCodeScanningRuby */ }; function getPathToParsedConfigFile(tempDir) { - return path7.join(tempDir, "config"); + return path6.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); @@ -108877,7 +108867,7 @@ function getPrimaryAnalysisConfig(config) { // src/setup-codeql.ts var fs9 = __toESM(require("fs")); -var path9 = __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()); @@ -109097,7 +109087,7 @@ function inferCompressionMethod(tarPath) { // src/tools-download.ts var fs8 = __toESM(require("fs")); var os2 = __toESM(require("os")); -var path8 = __toESM(require("path")); +var path7 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core10 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -109230,7 +109220,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path8.join( + return path7.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver7.clean(version) || version, @@ -109374,7 +109364,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(path9.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs9.existsSync(path8.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -109773,7 +109763,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path9.join(tempDir, v4_default()); + return path8.join(tempDir, v4_default()); } async function getNightlyToolsUrl(logger) { const zstdAvailability = await isZstdAvailable(logger); @@ -109822,7 +109812,7 @@ function isReservedToolsValue(tools) { // src/tracer-config.ts var fs10 = __toESM(require("fs")); -var path10 = __toESM(require("path")); +var path9 = __toESM(require("path")); async function shouldEnableIndirectTracing(codeql, config) { if (config.buildMode === "none" /* None */) { return false; @@ -109837,7 +109827,7 @@ async function endTracingForCluster(codeql, config, logger) { logger.info( "Unsetting build tracing environment variables. Subsequent steps of this job will not be traced." ); - const envVariablesFile = path10.resolve( + const envVariablesFile = path9.resolve( config.dbLocation, "temp/tracingEnvironment/end-tracing.json" ); @@ -109893,7 +109883,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path11.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") { @@ -109955,7 +109945,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path11.join( + const tracingConfigPath = path10.join( extractorPath, "tools", "tracing-config.lua" @@ -110037,7 +110027,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path11.join( + const autobuildCmd = path10.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -110459,7 +110449,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path11.resolve(config.tempDir, "user-config.yaml"); + return path10.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -110783,7 +110773,7 @@ function dbIsFinalized(config, language, logger) { const dbPath = getCodeQLDatabasePath(config, language); try { const dbInfo = load( - fs12.readFileSync(path12.resolve(dbPath, "codeql-database.yml"), "utf8") + fs12.readFileSync(path11.resolve(dbPath, "codeql-database.yml"), "utf8") ); return !("inProgress" in dbInfo); } catch { @@ -110860,7 +110850,7 @@ extensions: data: `; let data = ranges.map((range) => { - const filename = path12.join(checkoutPath, range.path).replaceAll(path12.sep, "/"); + const filename = path11.join(checkoutPath, range.path).replaceAll(path11.sep, "/"); return ` - [${dump(filename, { forceQuotes: true }).trim()}, ${range.startLine}, ${range.endLine}] `; }).join(""); @@ -110876,10 +110866,10 @@ function writeDiffRangeDataExtensionPack(logger, ranges, checkoutPath) { if (ranges.length === 0) { ranges = [{ path: "", startLine: 0, endLine: 0 }]; } - const diffRangeDir = path12.join(getTemporaryDirectory(), "pr-diff-range"); + const diffRangeDir = path11.join(getTemporaryDirectory(), "pr-diff-range"); fs12.mkdirSync(diffRangeDir, { recursive: true }); fs12.writeFileSync( - path12.join(diffRangeDir, "qlpack.yml"), + path11.join(diffRangeDir, "qlpack.yml"), ` name: codeql-action/pr-diff-range version: 0.0.0 @@ -110894,7 +110884,7 @@ dataExtensions: ranges, checkoutPath ); - const extensionFilePath = path12.join(diffRangeDir, "pr-diff-range.yml"); + const extensionFilePath = path11.join(diffRangeDir, "pr-diff-range.yml"); fs12.writeFileSync(extensionFilePath, extensionContents); logger.debug( `Wrote pr-diff-range extension pack to ${extensionFilePath}: @@ -111018,7 +111008,7 @@ async function runQueries(sarifFolder, memoryFlag, threadsFlag, diffRangePackDir async function runInterpretResultsFor(analysis, language, queries, enableDebugLogging) { logger.info(`Interpreting ${analysis.name} results for ${language}`); const category = analysis.fixCategory(logger, automationDetailsId); - const sarifFile = path12.join( + const sarifFile = path11.join( sarifFolder, addSarifExtension(analysis, language) ); @@ -111453,7 +111443,7 @@ async function sendUnhandledErrorStatusReport(actionName, actionStartedAt, error // src/upload-lib.ts var fs16 = __toESM(require("fs")); -var path14 = __toESM(require("path")); +var path13 = __toESM(require("path")); var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core15 = __toESM(require_core()); @@ -112763,10 +112753,10 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo ); codeQL = initCodeQLResult.codeql; } - const baseTempDir = path14.resolve(tempDir, "combined-sarif"); + const baseTempDir = path13.resolve(tempDir, "combined-sarif"); fs16.mkdirSync(baseTempDir, { recursive: true }); - const outputDirectory = fs16.mkdtempSync(path14.resolve(baseTempDir, "output-")); - const outputFile = path14.resolve(outputDirectory, "combined-sarif.sarif"); + const outputDirectory = fs16.mkdtempSync(path13.resolve(baseTempDir, "output-")); + const outputFile = path13.resolve(outputDirectory, "combined-sarif.sarif"); await codeQL.mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory: true }); @@ -112799,7 +112789,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 = path13.join( getTemporaryDirectory(), `payload-${analysis.kind}.json` ); @@ -112844,9 +112834,9 @@ function findSarifFilesInDir(sarifPath, isSarif) { const entries = fs16.readdirSync(dir, { withFileTypes: true }); for (const entry of entries) { if (entry.isFile() && isSarif(entry.name)) { - sarifFiles.push(path14.resolve(dir, entry.name)); + sarifFiles.push(path13.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - walkSarifFiles(path14.resolve(dir, entry.name)); + walkSarifFiles(path13.resolve(dir, entry.name)); } } }; @@ -112862,7 +112852,7 @@ async function getGroupedSarifFilePaths(logger, sarifPath) { if (stats.isDirectory()) { let unassignedSarifFiles = findSarifFilesInDir( sarifPath, - (name) => path14.extname(name) === ".sarif" + (name) => path13.extname(name) === ".sarif" ); logger.debug( `Found the following .sarif files in ${sarifPath}: ${unassignedSarifFiles.join(", ")}` @@ -113100,7 +113090,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 = path14.resolve( + const outputFile = path13.resolve( outputDir, `upload${uploadTarget.sarifExtension}` ); diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index 8b416c8d6a..0017ab87a1 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-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 path7 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path8 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path7 && path7[0] !== "/") { - path7 = `/${path7}`; + if (path8 && path8[0] !== "/") { + path8 = `/${path8}`; } - return new URL(`${origin}${path7}`); + return new URL(`${origin}${path8}`); } 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: path7, origin } + request: { method, path: path8, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path7); + debuglog("sending request to %s %s/%s", method, origin, path8); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path7, origin }, + request: { method, path: path8, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path7, + path8, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path7, origin } + request: { method, path: path8, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path7); + debuglog("trailers received from %s %s/%s", method, origin, path8); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path7, origin }, + request: { method, path: path8, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path7, + path8, error3.message ); }); @@ -1876,9 +1876,9 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path7, origin } + request: { method, path: path8, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path7); + debuglog("sending request to %s %s/%s", method, origin, path8); }); } 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: path7, + path: path8, method, body, headers, @@ -1956,11 +1956,11 @@ var require_request = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path7 !== "string") { + if (typeof path8 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path7[0] !== "/" && !(path7.startsWith("http://") || path7.startsWith("https://")) && method !== "CONNECT") { + } else if (path8[0] !== "/" && !(path8.startsWith("http://") || path8.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path7)) { + } else if (invalidPathRegex.test(path8)) { 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(path7, query) : path7; + this.path = query ? buildURL(path8, query) : path8; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -2335,9 +2335,9 @@ var require_dispatcher_base = __commonJS({ } close(callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { this.close((err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -2375,12 +2375,12 @@ var require_dispatcher_base = __commonJS({ err = null; } if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { this.destroy(err, (err2, data) => { return err2 ? ( /* istanbul ignore next: should never error */ reject(err2) - ) : resolve5(data); + ) : resolve6(data); }); }); } @@ -4647,8 +4647,8 @@ var require_util2 = __commonJS({ function createDeferredPromise() { let res; let rej; - const promise = new Promise((resolve5, reject) => { - res = resolve5; + const promise = new Promise((resolve6, reject) => { + res = resolve6; rej = reject; }); return { promise, resolve: res, reject: rej }; @@ -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: path7, host, upgrade, blocking, reset } = request2; + const { method, path: path8, 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} ${path7} HTTP/1.1\r + let header = `${method} ${path8} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -6789,12 +6789,12 @@ upgrade: ${upgrade}\r cb(); } } - const waitForDrain = () => new Promise((resolve5, reject) => { + const waitForDrain = () => new Promise((resolve6, reject) => { assert(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve5; + callback = resolve6; } }); socket.on("close", onDrain).on("drain", onDrain); @@ -7128,7 +7128,7 @@ var require_client_h2 = __commonJS({ } function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path: path7, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path8, 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] = path7; + headers[HTTP2_HEADER_PATH] = path8; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -7431,12 +7431,12 @@ var require_client_h2 = __commonJS({ cb(); } } - const waitForDrain = () => new Promise((resolve5, reject) => { + const waitForDrain = () => new Promise((resolve6, reject) => { assert(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve5; + callback = resolve6; } }); h2stream.on("close", onDrain).on("drain", onDrain); @@ -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 path7 = search ? `${pathname}${search}` : pathname; + const path8 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path7; + this.opts.path = path8; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -7913,16 +7913,16 @@ var require_client = __commonJS({ return this[kNeedDrain] < 2; } async [kClose]() { - return new Promise((resolve5) => { + return new Promise((resolve6) => { if (this[kSize]) { - this[kClosedResolve] = resolve5; + this[kClosedResolve] = resolve6; } else { - resolve5(null); + resolve6(null); } }); } async [kDestroy](err) { - return new Promise((resolve5) => { + return new Promise((resolve6) => { const requests = this[kQueue].splice(this[kPendingIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; @@ -7933,7 +7933,7 @@ var require_client = __commonJS({ this[kClosedResolve](); this[kClosedResolve] = null; } - resolve5(null); + resolve6(null); }; if (this[kHTTPContext]) { this[kHTTPContext].destroy(err, callback); @@ -7984,7 +7984,7 @@ var require_client = __commonJS({ }); } try { - const socket = await new Promise((resolve5, reject) => { + const socket = await new Promise((resolve6, reject) => { client[kConnector]({ host, hostname, @@ -7996,7 +7996,7 @@ var require_client = __commonJS({ if (err) { reject(err); } else { - resolve5(socket2); + resolve6(socket2); } }); }); @@ -8332,8 +8332,8 @@ var require_pool_base = __commonJS({ if (this[kQueue].isEmpty()) { await Promise.all(this[kClients].map((c) => c.close())); } else { - await new Promise((resolve5) => { - this[kClosedResolve] = resolve5; + await new Promise((resolve6) => { + this[kClosedResolve] = resolve6; }); } } @@ -8784,10 +8784,10 @@ var require_proxy_agent = __commonJS({ }; const { origin, - path: path7 = "/", + path: path8 = "/", headers = {} } = opts; - opts.path = origin + path7; + opts.path = origin + path8; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -9548,7 +9548,7 @@ var require_readable = __commonJS({ if (this._readableState.closeEmitted) { return null; } - return await new Promise((resolve5, reject) => { + return await new Promise((resolve6, reject) => { if (this[kContentLength] > limit) { this.destroy(new AbortError()); } @@ -9561,7 +9561,7 @@ var require_readable = __commonJS({ if (signal?.aborted) { reject(signal.reason ?? new AbortError()); } else { - resolve5(null); + resolve6(null); } }).on("error", noop3).on("data", function(chunk) { limit -= chunk.length; @@ -9580,7 +9580,7 @@ var require_readable = __commonJS({ } async function consume(stream, type2) { assert(!stream[kConsume]); - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { if (isUnusable(stream)) { const rState = stream._readableState; if (rState.destroyed && rState.closeEmitted === false) { @@ -9597,7 +9597,7 @@ var require_readable = __commonJS({ stream[kConsume] = { type: type2, stream, - resolve: resolve5, + resolve: resolve6, reject, length: 0, body: [] @@ -9667,18 +9667,18 @@ var require_readable = __commonJS({ return buffer; } function consumeEnd(consume2) { - const { type: type2, body, resolve: resolve5, stream, length } = consume2; + const { type: type2, body, resolve: resolve6, stream, length } = consume2; try { if (type2 === "text") { - resolve5(chunksDecode(body, length)); + resolve6(chunksDecode(body, length)); } else if (type2 === "json") { - resolve5(JSON.parse(chunksDecode(body, length))); + resolve6(JSON.parse(chunksDecode(body, length))); } else if (type2 === "arrayBuffer") { - resolve5(chunksConcat(body, length).buffer); + resolve6(chunksConcat(body, length).buffer); } else if (type2 === "blob") { - resolve5(new Blob(body, { type: stream[kContentType] })); + resolve6(new Blob(body, { type: stream[kContentType] })); } else if (type2 === "bytes") { - resolve5(chunksConcat(body, length)); + resolve6(chunksConcat(body, length)); } consumeFinish(consume2); } catch (err) { @@ -9935,9 +9935,9 @@ var require_api_request = __commonJS({ }; function request2(opts, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { request2.call(this, opts, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -10160,9 +10160,9 @@ var require_api_stream = __commonJS({ }; function stream(opts, factory, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -10447,9 +10447,9 @@ var require_api_upgrade = __commonJS({ }; function upgrade(opts, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -10541,9 +10541,9 @@ var require_api_connect = __commonJS({ }; function connect(opts, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -10708,20 +10708,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path7) { - if (typeof path7 !== "string") { - return path7; + function safeUrl(path8) { + if (typeof path8 !== "string") { + return path8; } - const pathSegments = path7.split("?"); + const pathSegments = path8.split("?"); if (pathSegments.length !== 2) { - return path7; + return path8; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path7, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path7); + function matchKey(mockDispatch2, { path: path8, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path8); 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: path7 }) => matchValue(safeUrl(path7), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path8 }) => matchValue(safeUrl(path8), 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: path7, method, body, headers, query } = opts; + const { path: path8, method, body, headers, query } = opts; return { - path: path7, + path: path8, method, body, headers, @@ -11246,10 +11246,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path7, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path8, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path7, + Path: path8, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -14405,7 +14405,7 @@ var require_fetch = __commonJS({ function dispatch({ body }) { const url = requestCurrentURL(request2); const agent = fetchParams.controller.dispatcher; - return new Promise((resolve5, reject) => agent.dispatch( + return new Promise((resolve6, reject) => agent.dispatch( { path: url.pathname + url.search, origin: url.origin, @@ -14481,7 +14481,7 @@ var require_fetch = __commonJS({ } } const onError = this.onError.bind(this); - resolve5({ + resolve6({ status, statusText, headersList, @@ -14527,7 +14527,7 @@ var require_fetch = __commonJS({ for (let i = 0; i < rawHeaders.length; i += 2) { headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); } - resolve5({ + resolve6({ status, statusText: STATUS_CODES[status], headersList, @@ -16130,9 +16130,9 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path7) { - for (let i = 0; i < path7.length; ++i) { - const code = path7.charCodeAt(i); + function validateCookiePath(path8) { + for (let i = 0; i < path8.length; ++i) { + const code = path8.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -18120,8 +18120,8 @@ var require_util8 = __commonJS({ return true; } function delay(ms) { - return new Promise((resolve5) => { - setTimeout(resolve5, ms).unref(); + return new Promise((resolve6) => { + setTimeout(resolve6, ms).unref(); }); } module2.exports = { @@ -18726,11 +18726,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path7 = opts.path; + let path8 = opts.path; if (!opts.path.startsWith("/")) { - path7 = `/${path7}`; + path8 = `/${path8}`; } - url = new URL(util.parseOrigin(url).origin + path7); + url = new URL(util.parseOrigin(url).origin + path8); } else { if (!opts) { opts = typeof url === "object" ? url : {}; @@ -18844,11 +18844,11 @@ var require_lib = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -18864,7 +18864,7 @@ var require_lib = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -18951,26 +18951,26 @@ var require_lib = __commonJS({ } readBody() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); }); this.message.on("end", () => { - resolve5(output.toString()); + resolve6(output.toString()); }); })); }); } readBodyBuffer() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); }); this.message.on("end", () => { - resolve5(Buffer.concat(chunks)); + resolve6(Buffer.concat(chunks)); }); })); }); @@ -19178,14 +19178,14 @@ var require_lib = __commonJS({ */ requestRaw(info6, data) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { function callbackForResult(err, res) { if (err) { reject(err); } else if (!res) { reject(new Error("Unknown error")); } else { - resolve5(res); + resolve6(res); } } this.requestRawWithCallback(info6, data, callbackForResult); @@ -19429,12 +19429,12 @@ var require_lib = __commonJS({ return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); + return new Promise((resolve6) => setTimeout(() => resolve6(), ms)); }); } _processResponse(res, options) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -19442,7 +19442,7 @@ var require_lib = __commonJS({ headers: {} }; if (statusCode === HttpCodes.NotFound) { - resolve5(response); + resolve6(response); } function dateTimeDeserializer(key, value) { if (typeof value === "string") { @@ -19481,7 +19481,7 @@ var require_lib = __commonJS({ err.result = response.result; reject(err); } else { - resolve5(response); + resolve6(response); } })); }); @@ -19498,11 +19498,11 @@ var require_auth = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -19518,7 +19518,7 @@ var require_auth = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19602,11 +19602,11 @@ var require_oidc_utils = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -19622,7 +19622,7 @@ var require_oidc_utils = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19700,11 +19700,11 @@ var require_summary = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -19720,7 +19720,7 @@ var require_summary = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -20033,7 +20033,7 @@ var require_path_utils = __commonJS({ exports2.toPosixPath = toPosixPath; exports2.toWin32Path = toWin32Path; exports2.toPlatformPath = toPlatformPath; - var path7 = __importStar2(require("path")); + var path8 = __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, path7.sep); + return pth.replace(/[/\\]/g, path8.sep); } } }); @@ -20089,11 +20089,11 @@ var require_io_util = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -20109,7 +20109,7 @@ var require_io_util = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -20124,7 +20124,7 @@ var require_io_util = __commonJS({ exports2.tryGetExecutablePath = tryGetExecutablePath; exports2.getCmdPath = getCmdPath; var fs7 = __importStar2(require("fs")); - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); _a = fs7.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; function readlink(fsPath) { @@ -20179,7 +20179,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path7.extname(filePath).toUpperCase(); + const upperExt = path8.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 = path7.dirname(filePath); - const upperName = path7.basename(filePath).toUpperCase(); + const directory = path8.dirname(filePath); + const upperName = path8.basename(filePath).toUpperCase(); for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path7.join(directory, actualName); + filePath = path8.join(directory, actualName); break; } } @@ -20286,11 +20286,11 @@ var require_io = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -20306,7 +20306,7 @@ var require_io = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -20319,7 +20319,7 @@ var require_io = __commonJS({ exports2.which = which5; exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path7 = __importStar2(require("path")); + var path8 = __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 ? path7.join(dest, path7.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path8.join(dest, path8.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -20340,7 +20340,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path7.relative(source, newDest) === "") { + if (path8.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 = path7.join(dest, path7.basename(source)); + dest = path8.join(dest, path8.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -20363,7 +20363,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path7.dirname(dest)); + yield mkdirP(path8.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(path7.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path8.delimiter)) { if (extension) { extensions.push(extension); } @@ -20435,12 +20435,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path7.sep)) { + if (tool.includes(path8.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path7.delimiter)) { + for (const p of process.env.PATH.split(path8.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(path7.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path8.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -20547,11 +20547,11 @@ var require_toolrunner = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -20567,7 +20567,7 @@ var require_toolrunner = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -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 path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var io5 = __importStar2(require_io()); var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); @@ -20793,10 +20793,10 @@ 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 = path7.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path8.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io5.which(this.toolPath, true); - return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve6, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -20879,7 +20879,7 @@ var require_toolrunner = __commonJS({ if (error3) { reject(error3); } else { - resolve5(exitCode); + resolve6(exitCode); } }); if (this.options.input) { @@ -21045,11 +21045,11 @@ var require_exec = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -21065,7 +21065,7 @@ var require_exec = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -21165,11 +21165,11 @@ var require_platform = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -21185,7 +21185,7 @@ var require_platform = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -21294,11 +21294,11 @@ var require_core = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -21314,7 +21314,7 @@ var require_core = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -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 path7 = __importStar2(require("path")); + var path8 = __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}${path7.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path8.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 path7 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path7} does not exist${os_1.EOL}`); + const path8 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path8} 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 path7 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path8 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path7 && path7[0] !== "/") { - path7 = `/${path7}`; + if (path8 && path8[0] !== "/") { + path8 = `/${path8}`; } - return new URL(`${origin}${path7}`); + return new URL(`${origin}${path8}`); } 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: path7, origin } + request: { method, path: path8, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path7); + debuglog("sending request to %s %s/%s", method, origin, path8); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path7, origin }, + request: { method, path: path8, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path7, + path8, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path7, origin } + request: { method, path: path8, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path7); + debuglog("trailers received from %s %s/%s", method, origin, path8); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path7, origin }, + request: { method, path: path8, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path7, + path8, error3.message ); }); @@ -22874,9 +22874,9 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path7, origin } + request: { method, path: path8, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path7); + debuglog("sending request to %s %s/%s", method, origin, path8); }); } 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: path7, + path: path8, method, body, headers, @@ -22954,11 +22954,11 @@ var require_request3 = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path7 !== "string") { + if (typeof path8 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path7[0] !== "/" && !(path7.startsWith("http://") || path7.startsWith("https://")) && method !== "CONNECT") { + } else if (path8[0] !== "/" && !(path8.startsWith("http://") || path8.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path7)) { + } else if (invalidPathRegex.test(path8)) { 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(path7, query) : path7; + this.path = query ? buildURL(path8, query) : path8; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -23333,9 +23333,9 @@ var require_dispatcher_base2 = __commonJS({ } close(callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { this.close((err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -23373,12 +23373,12 @@ var require_dispatcher_base2 = __commonJS({ err = null; } if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { this.destroy(err, (err2, data) => { return err2 ? ( /* istanbul ignore next: should never error */ reject(err2) - ) : resolve5(data); + ) : resolve6(data); }); }); } @@ -25645,8 +25645,8 @@ var require_util10 = __commonJS({ function createDeferredPromise() { let res; let rej; - const promise = new Promise((resolve5, reject) => { - res = resolve5; + const promise = new Promise((resolve6, reject) => { + res = resolve6; rej = reject; }); return { promise, resolve: res, reject: rej }; @@ -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: path7, host, upgrade, blocking, reset } = request2; + const { method, path: path8, 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} ${path7} HTTP/1.1\r + let header = `${method} ${path8} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -27787,12 +27787,12 @@ upgrade: ${upgrade}\r cb(); } } - const waitForDrain = () => new Promise((resolve5, reject) => { + const waitForDrain = () => new Promise((resolve6, reject) => { assert(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve5; + callback = resolve6; } }); socket.on("close", onDrain).on("drain", onDrain); @@ -28126,7 +28126,7 @@ var require_client_h22 = __commonJS({ } function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path: path7, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path8, 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] = path7; + headers[HTTP2_HEADER_PATH] = path8; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -28429,12 +28429,12 @@ var require_client_h22 = __commonJS({ cb(); } } - const waitForDrain = () => new Promise((resolve5, reject) => { + const waitForDrain = () => new Promise((resolve6, reject) => { assert(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve5; + callback = resolve6; } }); h2stream.on("close", onDrain).on("drain", onDrain); @@ -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 path7 = search ? `${pathname}${search}` : pathname; + const path8 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path7; + this.opts.path = path8; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -28911,16 +28911,16 @@ var require_client2 = __commonJS({ return this[kNeedDrain] < 2; } async [kClose]() { - return new Promise((resolve5) => { + return new Promise((resolve6) => { if (this[kSize]) { - this[kClosedResolve] = resolve5; + this[kClosedResolve] = resolve6; } else { - resolve5(null); + resolve6(null); } }); } async [kDestroy](err) { - return new Promise((resolve5) => { + return new Promise((resolve6) => { const requests = this[kQueue].splice(this[kPendingIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; @@ -28931,7 +28931,7 @@ var require_client2 = __commonJS({ this[kClosedResolve](); this[kClosedResolve] = null; } - resolve5(null); + resolve6(null); }; if (this[kHTTPContext]) { this[kHTTPContext].destroy(err, callback); @@ -28982,7 +28982,7 @@ var require_client2 = __commonJS({ }); } try { - const socket = await new Promise((resolve5, reject) => { + const socket = await new Promise((resolve6, reject) => { client[kConnector]({ host, hostname, @@ -28994,7 +28994,7 @@ var require_client2 = __commonJS({ if (err) { reject(err); } else { - resolve5(socket2); + resolve6(socket2); } }); }); @@ -29330,8 +29330,8 @@ var require_pool_base2 = __commonJS({ if (this[kQueue].isEmpty()) { await Promise.all(this[kClients].map((c) => c.close())); } else { - await new Promise((resolve5) => { - this[kClosedResolve] = resolve5; + await new Promise((resolve6) => { + this[kClosedResolve] = resolve6; }); } } @@ -29782,10 +29782,10 @@ var require_proxy_agent2 = __commonJS({ }; const { origin, - path: path7 = "/", + path: path8 = "/", headers = {} } = opts; - opts.path = origin + path7; + opts.path = origin + path8; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -30546,7 +30546,7 @@ var require_readable2 = __commonJS({ if (this._readableState.closeEmitted) { return null; } - return await new Promise((resolve5, reject) => { + return await new Promise((resolve6, reject) => { if (this[kContentLength] > limit) { this.destroy(new AbortError()); } @@ -30559,7 +30559,7 @@ var require_readable2 = __commonJS({ if (signal?.aborted) { reject(signal.reason ?? new AbortError()); } else { - resolve5(null); + resolve6(null); } }).on("error", noop3).on("data", function(chunk) { limit -= chunk.length; @@ -30578,7 +30578,7 @@ var require_readable2 = __commonJS({ } async function consume(stream, type2) { assert(!stream[kConsume]); - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { if (isUnusable(stream)) { const rState = stream._readableState; if (rState.destroyed && rState.closeEmitted === false) { @@ -30595,7 +30595,7 @@ var require_readable2 = __commonJS({ stream[kConsume] = { type: type2, stream, - resolve: resolve5, + resolve: resolve6, reject, length: 0, body: [] @@ -30665,18 +30665,18 @@ var require_readable2 = __commonJS({ return buffer; } function consumeEnd(consume2) { - const { type: type2, body, resolve: resolve5, stream, length } = consume2; + const { type: type2, body, resolve: resolve6, stream, length } = consume2; try { if (type2 === "text") { - resolve5(chunksDecode(body, length)); + resolve6(chunksDecode(body, length)); } else if (type2 === "json") { - resolve5(JSON.parse(chunksDecode(body, length))); + resolve6(JSON.parse(chunksDecode(body, length))); } else if (type2 === "arrayBuffer") { - resolve5(chunksConcat(body, length).buffer); + resolve6(chunksConcat(body, length).buffer); } else if (type2 === "blob") { - resolve5(new Blob(body, { type: stream[kContentType] })); + resolve6(new Blob(body, { type: stream[kContentType] })); } else if (type2 === "bytes") { - resolve5(chunksConcat(body, length)); + resolve6(chunksConcat(body, length)); } consumeFinish(consume2); } catch (err) { @@ -30933,9 +30933,9 @@ var require_api_request2 = __commonJS({ }; function request2(opts, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { request2.call(this, opts, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -31158,9 +31158,9 @@ var require_api_stream2 = __commonJS({ }; function stream(opts, factory, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -31445,9 +31445,9 @@ var require_api_upgrade2 = __commonJS({ }; function upgrade(opts, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -31539,9 +31539,9 @@ var require_api_connect2 = __commonJS({ }; function connect(opts, callback) { if (callback === void 0) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve5(data); + return err ? reject(err) : resolve6(data); }); }); } @@ -31706,20 +31706,20 @@ var require_mock_utils2 = __commonJS({ } return true; } - function safeUrl(path7) { - if (typeof path7 !== "string") { - return path7; + function safeUrl(path8) { + if (typeof path8 !== "string") { + return path8; } - const pathSegments = path7.split("?"); + const pathSegments = path8.split("?"); if (pathSegments.length !== 2) { - return path7; + return path8; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path7, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path7); + function matchKey(mockDispatch2, { path: path8, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path8); 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: path7 }) => matchValue(safeUrl(path7), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path8 }) => matchValue(safeUrl(path8), 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: path7, method, body, headers, query } = opts; + const { path: path8, method, body, headers, query } = opts; return { - path: path7, + path: path8, method, body, headers, @@ -32244,10 +32244,10 @@ var require_pending_interceptors_formatter2 = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path7, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path8, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path7, + Path: path8, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -35403,7 +35403,7 @@ var require_fetch2 = __commonJS({ function dispatch({ body }) { const url = requestCurrentURL(request2); const agent = fetchParams.controller.dispatcher; - return new Promise((resolve5, reject) => agent.dispatch( + return new Promise((resolve6, reject) => agent.dispatch( { path: url.pathname + url.search, origin: url.origin, @@ -35479,7 +35479,7 @@ var require_fetch2 = __commonJS({ } } const onError = this.onError.bind(this); - resolve5({ + resolve6({ status, statusText, headersList, @@ -35525,7 +35525,7 @@ var require_fetch2 = __commonJS({ for (let i = 0; i < rawHeaders.length; i += 2) { headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); } - resolve5({ + resolve6({ status, statusText: STATUS_CODES[status], headersList, @@ -37128,9 +37128,9 @@ var require_util14 = __commonJS({ } } } - function validateCookiePath(path7) { - for (let i = 0; i < path7.length; ++i) { - const code = path7.charCodeAt(i); + function validateCookiePath(path8) { + for (let i = 0; i < path8.length; ++i) { + const code = path8.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -39118,8 +39118,8 @@ var require_util16 = __commonJS({ return true; } function delay(ms) { - return new Promise((resolve5) => { - setTimeout(resolve5, ms).unref(); + return new Promise((resolve6) => { + setTimeout(resolve6, ms).unref(); }); } module2.exports = { @@ -39724,11 +39724,11 @@ var require_undici2 = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path7 = opts.path; + let path8 = opts.path; if (!opts.path.startsWith("/")) { - path7 = `/${path7}`; + path8 = `/${path8}`; } - url = new URL(util.parseOrigin(url).origin + path7); + url = new URL(util.parseOrigin(url).origin + path8); } else { if (!opts) { opts = typeof url === "object" ? url : {}; @@ -39842,11 +39842,11 @@ var require_utils4 = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -39862,7 +39862,7 @@ var require_utils4 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -46434,8 +46434,8 @@ var require_light = __commonJS({ return this.Promise.resolve(); } yieldLoop(t = 0) { - return new this.Promise(function(resolve5, reject) { - return setTimeout(resolve5, t); + return new this.Promise(function(resolve6, reject) { + return setTimeout(resolve6, t); }); } computePenalty() { @@ -46646,15 +46646,15 @@ var require_light = __commonJS({ return this._queue.length === 0; } async _tryToRun() { - var args, cb, error3, reject, resolve5, returned, task; + var args, cb, error3, reject, resolve6, returned, task; if (this._running < 1 && this._queue.length > 0) { this._running++; - ({ task, args, resolve: resolve5, reject } = this._queue.shift()); + ({ task, args, resolve: resolve6, reject } = this._queue.shift()); cb = await (async function() { try { returned = await task(...args); return function() { - return resolve5(returned); + return resolve6(returned); }; } catch (error1) { error3 = error1; @@ -46669,13 +46669,13 @@ var require_light = __commonJS({ } } schedule(task, ...args) { - var promise, reject, resolve5; - resolve5 = reject = null; + var promise, reject, resolve6; + resolve6 = reject = null; promise = new this.Promise(function(_resolve, _reject) { - resolve5 = _resolve; + resolve6 = _resolve; return reject = _reject; }); - this._queue.push({ task, args, resolve: resolve5, reject }); + this._queue.push({ task, args, resolve: resolve6, reject }); this._tryToRun(); return promise; } @@ -47076,14 +47076,14 @@ var require_light = __commonJS({ counts = this._states.counts; return counts[0] + counts[1] + counts[2] + counts[3] === at; }; - return new this.Promise((resolve5, reject) => { + return new this.Promise((resolve6, reject) => { if (finished()) { - return resolve5(); + return resolve6(); } else { return this.on("done", () => { if (finished()) { this.removeAllListeners("done"); - return resolve5(); + return resolve6(); } }); } @@ -47176,9 +47176,9 @@ var require_light = __commonJS({ options = parser$5.load(options, this.jobDefaults); } task = (...args2) => { - return new this.Promise(function(resolve5, reject) { + return new this.Promise(function(resolve6, reject) { return fn(...args2, function(...args3) { - return (args3[0] != null ? reject : resolve5)(args3); + return (args3[0] != null ? reject : resolve6)(args3); }); }); }; @@ -47305,14 +47305,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, path7, name, argument) { - if (Array.isArray(path7)) { - this.path = path7; - this.property = path7.reduce(function(sum, item) { + 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) { return sum + makeSuffix(item); }, "instance"); - } else if (path7 !== void 0) { - this.property = path7; + } else if (path8 !== void 0) { + this.property = path8; } if (message) { this.message = message; @@ -47403,28 +47403,28 @@ var require_helpers = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path7, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path8, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path7)) { - this.path = path7; - this.propertyPath = path7.reduce(function(sum, item) { + if (Array.isArray(path8)) { + this.path = path8; + this.propertyPath = path8.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path7; + this.propertyPath = path8; } this.base = base; this.schemas = schemas; }; - SchemaContext.prototype.resolve = function resolve5(target) { + SchemaContext.prototype.resolve = function resolve6(target) { return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path7 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path8 = 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, path7, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema2, this.options, path8, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -48515,7 +48515,7 @@ var require_validator = __commonJS({ } return schema2; }; - Validator2.prototype.resolve = function resolve5(schema2, switchSchema, ctx) { + Validator2.prototype.resolve = function resolve6(schema2, switchSchema, ctx) { switchSchema = ctx.resolve(switchSchema); if (ctx.schemas[switchSchema]) { return { subschema: ctx.schemas[switchSchema], switchSchema }; @@ -48721,21 +48721,21 @@ var require_internal_path_helper = __commonJS({ return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.dirname = dirname2; + exports2.dirname = dirname3; exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; exports2.hasAbsoluteRoot = hasAbsoluteRoot; exports2.hasRoot = hasRoot; exports2.normalizeSeparators = normalizeSeparators; exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; - function dirname2(p) { + function dirname3(p) { p = safeTrimTrailingSeparator(p); if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path7.dirname(p); + let result = path8.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -48772,7 +48772,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 += path7.sep; + root += path8.sep; } return root + itemPath; } @@ -48806,10 +48806,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path7.sep)) { + if (!p.endsWith(path8.sep)) { return p; } - if (p === path7.sep) { + if (p === path8.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -49154,7 +49154,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path7 = (function() { + var path8 = (function() { try { return require("path"); } catch (e) { @@ -49162,7 +49162,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path7.sep; + minimatch.sep = path8.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand2 = require_brace_expansion(); var plTypes = { @@ -49251,8 +49251,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path7.sep !== "/") { - pattern = pattern.split(path7.sep).join("/"); + if (!options.allowWindowsEscape && path8.sep !== "/") { + pattern = pattern.split(path8.sep).join("/"); } this.options = options; this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200; @@ -49623,8 +49623,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path7.sep !== "/") { - f = f.split(path7.sep).join("/"); + if (path8.sep !== "/") { + f = f.split(path8.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -49867,7 +49867,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -49882,12 +49882,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(path7.sep); + this.segments = itemPath.split(path8.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path7.basename(remaining); + const basename = path8.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -49905,7 +49905,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(path7.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path8.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -49916,12 +49916,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path7.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path8.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path7.sep; + result += path8.sep; } result += this.segments[i]; } @@ -49979,7 +49979,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os2 = __importStar2(require("os")); - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); @@ -50008,7 +50008,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(path7.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path8.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -50032,8 +50032,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path7.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path7.sep}`; + if (!itemPath.endsWith(path8.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path8.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -50068,9 +50068,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(`.${path7.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path8.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path7.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path8.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}'`); @@ -50154,8 +50154,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path7, level) { - this.path = path7; + constructor(path8, level) { + this.path = path8; this.level = level; } }; @@ -50206,11 +50206,11 @@ var require_internal_globber = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -50226,7 +50226,7 @@ var require_internal_globber = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -50239,14 +50239,14 @@ var require_internal_globber = __commonJS({ }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve5, reject) { - v = o[n](v), settle(resolve5, reject, v.done, v.value); + return new Promise(function(resolve6, reject) { + v = o[n](v), settle(resolve6, reject, v.done, v.value); }); }; } - function settle(resolve5, reject, d, v) { + function settle(resolve6, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve5({ value: v2, done: d }); + resolve6({ value: v2, done: d }); }, reject); } }; @@ -50299,7 +50299,7 @@ var require_internal_globber = __commonJS({ var core15 = __importStar2(require_core()); var fs7 = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); - var path7 = __importStar2(require("path")); + var path8 = __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(); @@ -50375,7 +50375,7 @@ var require_internal_globber = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path7.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path8.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -50385,7 +50385,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await2(fs7.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path7.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs7.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path8.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); @@ -50496,11 +50496,11 @@ var require_internal_hash_files = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -50516,7 +50516,7 @@ var require_internal_hash_files = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -50529,14 +50529,14 @@ var require_internal_hash_files = __commonJS({ }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve5, reject) { - v = o[n](v), settle(resolve5, reject, v.done, v.value); + return new Promise(function(resolve6, reject) { + v = o[n](v), settle(resolve6, reject, v.done, v.value); }); }; } - function settle(resolve5, reject, d, v) { + function settle(resolve6, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve5({ value: v2, done: d }); + resolve6({ value: v2, done: d }); }, reject); } }; @@ -50547,7 +50547,7 @@ var require_internal_hash_files = __commonJS({ var fs7 = __importStar2(require("fs")); var stream = __importStar2(require("stream")); var util = __importStar2(require("util")); - var path7 = __importStar2(require("path")); + var path8 = __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; @@ -50563,7 +50563,7 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path7.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path8.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } @@ -50608,11 +50608,11 @@ var require_glob = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -50628,7 +50628,7 @@ var require_glob = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -51888,11 +51888,11 @@ var require_cacheUtils = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -51908,7 +51908,7 @@ var require_cacheUtils = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -51921,14 +51921,14 @@ var require_cacheUtils = __commonJS({ }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve5, reject) { - v = o[n](v), settle(resolve5, reject, v.done, v.value); + return new Promise(function(resolve6, reject) { + v = o[n](v), settle(resolve6, reject, v.done, v.value); }); }; } - function settle(resolve5, reject, d, v) { + function settle(resolve6, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve5({ value: v2, done: d }); + resolve6({ value: v2, done: d }); }, reject); } }; @@ -51949,7 +51949,7 @@ var require_cacheUtils = __commonJS({ var io5 = __importStar2(require_io()); var crypto2 = __importStar2(require("crypto")); var fs7 = __importStar2(require("fs")); - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var semver9 = __importStar2(require_semver3()); var util = __importStar2(require("util")); var constants_1 = require_constants12(); @@ -51969,9 +51969,9 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path7.join(baseLocation, "actions", "temp"); + tempDirectory = path8.join(baseLocation, "actions", "temp"); } - const dest = path7.join(tempDirectory, crypto2.randomUUID()); + const dest = path8.join(tempDirectory, crypto2.randomUUID()); yield io5.mkdirP(dest); return dest; }); @@ -51993,7 +51993,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path7.relative(workspace, file).replace(new RegExp(`\\${path7.sep}`, "g"), "/"); + const relativeFile = path8.relative(workspace, file).replace(new RegExp(`\\${path8.sep}`, "g"), "/"); core15.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -52210,11 +52210,11 @@ function __metadata(metadataKey, metadataValue) { } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -52230,7 +52230,7 @@ function __awaiter(thisArg, _arguments, P, generator) { } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -52421,14 +52421,14 @@ function __asyncValues(o) { }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve5, reject) { - v = o[n](v), settle(resolve5, reject, v.done, v.value); + return new Promise(function(resolve6, reject) { + v = o[n](v), settle(resolve6, reject, v.done, v.value); }); }; } - function settle(resolve5, reject, d, v) { + function settle(resolve6, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve5({ value: v2, done: d }); + resolve6({ value: v2, done: d }); }, reject); } } @@ -52520,13 +52520,13 @@ function __disposeResources(env) { } return next(); } -function __rewriteRelativeImportExtension(path7, preserveJsx) { - if (typeof path7 === "string" && /^\.\.?\//.test(path7)) { - return path7.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { +function __rewriteRelativeImportExtension(path8, preserveJsx) { + if (typeof path8 === "string" && /^\.\.?\//.test(path8)) { + return path8.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 path7; + return path8; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -53600,9 +53600,9 @@ var require_nodeHttpClient = __commonJS({ if (stream.readable === false) { return Promise.resolve(); } - return new Promise((resolve5) => { + return new Promise((resolve6) => { const handler2 = () => { - resolve5(); + resolve6(); stream.removeListener("close", handler2); stream.removeListener("end", handler2); stream.removeListener("error", handler2); @@ -53757,8 +53757,8 @@ var require_nodeHttpClient = __commonJS({ headers: request2.headers.toJSON({ preserveCase: true }), ...request2.requestOverrides }; - return new Promise((resolve5, reject) => { - const req = isInsecure ? node_http_1.default.request(options, resolve5) : node_https_1.default.request(options, resolve5); + return new Promise((resolve6, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve6) : node_https_1.default.request(options, resolve6); req.once("error", (err) => { reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request: request2 })); }); @@ -53842,7 +53842,7 @@ var require_nodeHttpClient = __commonJS({ return stream; } function streamToText(stream) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { const buffer = []; stream.on("data", (chunk) => { if (Buffer.isBuffer(chunk)) { @@ -53852,7 +53852,7 @@ var require_nodeHttpClient = __commonJS({ } }); stream.on("end", () => { - resolve5(Buffer.concat(buffer).toString("utf8")); + resolve6(Buffer.concat(buffer).toString("utf8")); }); stream.on("error", (e) => { if (e && e?.name === "AbortError") { @@ -54130,7 +54130,7 @@ var require_helpers2 = __commonJS({ var AbortError_js_1 = require_AbortError(); var StandardAbortMessage = "The operation was aborted."; function delay(delayInMs, value, options) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { let timer = void 0; let onAborted = void 0; const rejectOnAbort = () => { @@ -54153,7 +54153,7 @@ var require_helpers2 = __commonJS({ } timer = setTimeout(() => { removeListeners(); - resolve5(value); + resolve6(value); }, delayInMs); if (options?.abortSignal) { options.abortSignal.addEventListener("abort", onAborted); @@ -55316,8 +55316,8 @@ var require_helpers3 = __commonJS({ function req(url, opts = {}) { const href = typeof url === "string" ? url : url.href; const req2 = (href.startsWith("https:") ? https2 : http).request(url, opts); - const promise = new Promise((resolve5, reject) => { - req2.once("response", resolve5).once("error", reject).end(); + const promise = new Promise((resolve6, reject) => { + req2.once("response", resolve6).once("error", reject).end(); }); req2.then = promise.then.bind(promise); return req2; @@ -55494,7 +55494,7 @@ var require_parse_proxy_response = __commonJS({ var debug_1 = __importDefault2(require_src()); var debug5 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { let buffersLength = 0; const buffers = []; function read() { @@ -55560,7 +55560,7 @@ var require_parse_proxy_response = __commonJS({ } debug5("got proxy server response: %o %o", firstLine, headers); cleanup(); - resolve5({ + resolve6({ connect: { statusCode, statusText, @@ -56940,8 +56940,8 @@ var require_getClient = __commonJS({ } const { allowInsecureConnection, httpClient } = clientOptions; const endpointUrl = clientOptions.endpoint ?? endpoint2; - const client = (path7, ...args) => { - const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path7, args, { allowInsecureConnection, ...requestOptions }); + const client = (path8, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path8, args, { allowInsecureConnection, ...requestOptions }); return { get: (requestOptions = {}) => { return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); @@ -57646,7 +57646,7 @@ var require_createAbortablePromise = __commonJS({ var abort_controller_1 = require_commonjs3(); function createAbortablePromise(buildPromise, options) { const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { function rejectOnAbort() { reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); } @@ -57664,7 +57664,7 @@ var require_createAbortablePromise = __commonJS({ try { buildPromise((x) => { removeListeners(); - resolve5(x); + resolve6(x); }, (x) => { removeListeners(); reject(x); @@ -57691,8 +57691,8 @@ var require_delay2 = __commonJS({ function delay(timeInMs, options) { let token; const { abortSignal, abortErrorMsg } = options ?? {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve5) => { - token = setTimeout(resolve5, timeInMs); + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve6) => { + token = setTimeout(resolve6, timeInMs); }, { cleanupBeforeAbort: () => clearTimeout(token), abortSignal, @@ -60812,15 +60812,15 @@ var require_urlHelpers2 = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path7 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path7.startsWith("/")) { - path7 = path7.substring(1); + let path8 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path8.startsWith("/")) { + path8 = path8.substring(1); } - if (isAbsoluteUrl(path7)) { - requestUrl = path7; + if (isAbsoluteUrl(path8)) { + requestUrl = path8; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path7); + requestUrl = appendPath(requestUrl, path8); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -60866,9 +60866,9 @@ var require_urlHelpers2 = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path7 = pathToAppend.substring(0, searchStart); + const path8 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path7; + newPath = newPath + path8; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -63545,10 +63545,10 @@ var require_utils_common = __commonJS({ var constants_js_1 = require_constants15(); function escapeURLPath(url) { const urlParsed = new URL(url); - let path7 = urlParsed.pathname; - path7 = path7 || "/"; - path7 = escape(path7); - urlParsed.pathname = path7; + let path8 = urlParsed.pathname; + path8 = path8 || "/"; + path8 = escape(path8); + urlParsed.pathname = path8; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -63633,9 +63633,9 @@ var require_utils_common = __commonJS({ } function appendToURLPath(url, name) { const urlParsed = new URL(url); - let path7 = urlParsed.pathname; - path7 = path7 ? path7.endsWith("/") ? `${path7}${name}` : `${path7}/${name}` : name; - urlParsed.pathname = path7; + let path8 = urlParsed.pathname; + path8 = path8 ? path8.endsWith("/") ? `${path8}${name}` : `${path8}/${name}` : name; + urlParsed.pathname = path8; return urlParsed.toString(); } function setURLParameter(url, name, value) { @@ -63750,7 +63750,7 @@ var require_utils_common = __commonJS({ return base64encode(res); } async function delay(timeInMs, aborter, abortError) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { let timeout; const abortHandler = () => { if (timeout !== void 0) { @@ -63762,7 +63762,7 @@ var require_utils_common = __commonJS({ if (aborter !== void 0) { aborter.removeEventListener("abort", abortHandler); } - resolve5(); + resolve6(); }; timeout = setTimeout(resolveHandler, timeInMs); if (aborter !== void 0) { @@ -64862,9 +64862,9 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path7 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path8 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path7}`; + canonicalizedResourceString += `/${this.factory.accountName}${path8}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -65303,7 +65303,7 @@ var require_BufferScheduler = __commonJS({ * */ async do() { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { this.readable.on("data", (data) => { data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; this.appendUnresolvedData(data); @@ -65331,11 +65331,11 @@ var require_BufferScheduler = __commonJS({ if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { const buffer = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve5).catch(reject); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve6).catch(reject); } else if (this.unresolvedLength >= this.bufferSize) { return; } else { - resolve5(); + resolve6(); } } }); @@ -65603,10 +65603,10 @@ var require_utils_common2 = __commonJS({ var constants_js_1 = require_constants16(); function escapeURLPath(url) { const urlParsed = new URL(url); - let path7 = urlParsed.pathname; - path7 = path7 || "/"; - path7 = escape(path7); - urlParsed.pathname = path7; + let path8 = urlParsed.pathname; + path8 = path8 || "/"; + path8 = escape(path8); + urlParsed.pathname = path8; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -65691,9 +65691,9 @@ var require_utils_common2 = __commonJS({ } function appendToURLPath(url, name) { const urlParsed = new URL(url); - let path7 = urlParsed.pathname; - path7 = path7 ? path7.endsWith("/") ? `${path7}${name}` : `${path7}/${name}` : name; - urlParsed.pathname = path7; + let path8 = urlParsed.pathname; + path8 = path8 ? path8.endsWith("/") ? `${path8}${name}` : `${path8}/${name}` : name; + urlParsed.pathname = path8; return urlParsed.toString(); } function setURLParameter(url, name, value) { @@ -65808,7 +65808,7 @@ var require_utils_common2 = __commonJS({ return base64encode(res); } async function delay(timeInMs, aborter, abortError) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { let timeout; const abortHandler = () => { if (timeout !== void 0) { @@ -65820,7 +65820,7 @@ var require_utils_common2 = __commonJS({ if (aborter !== void 0) { aborter.removeEventListener("abort", abortHandler); } - resolve5(); + resolve6(); }; timeout = setTimeout(resolveHandler, timeInMs); if (aborter !== void 0) { @@ -66614,9 +66614,9 @@ var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path7 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path8 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path7}`; + canonicalizedResourceString += `/${this.factory.accountName}${path8}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67246,9 +67246,9 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path7 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path8 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path7}`; + canonicalizedResourceString += `/${options.accountName}${path8}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67593,9 +67593,9 @@ var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path7 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path8 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path7}`; + canonicalizedResourceString += `/${options.accountName}${path8}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -84018,7 +84018,7 @@ var require_AvroReadableFromStream = __commonJS({ this._position += chunk.length; return this.toUint8Array(chunk); } else { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { const cleanUp = () => { this._readable.removeListener("readable", readableCallback); this._readable.removeListener("error", rejectCallback); @@ -84033,7 +84033,7 @@ var require_AvroReadableFromStream = __commonJS({ if (callbackChunk) { this._position += callbackChunk.length; cleanUp(); - resolve5(this.toUint8Array(callbackChunk)); + resolve6(this.toUint8Array(callbackChunk)); } }; const rejectCallback = () => { @@ -85513,8 +85513,8 @@ var require_poller3 = __commonJS({ this.stopped = true; this.pollProgressCallbacks = []; this.operation = operation; - this.promise = new Promise((resolve5, reject) => { - this.resolve = resolve5; + this.promise = new Promise((resolve6, reject) => { + this.resolve = resolve6; this.reject = reject; }); this.promise.catch(() => { @@ -85767,7 +85767,7 @@ var require_lroEngine = __commonJS({ * The method used by the poller to wait before attempting to update its operation. */ delay() { - return new Promise((resolve5) => setTimeout(() => resolve5(), this.config.intervalInMs)); + return new Promise((resolve6) => setTimeout(() => resolve6(), this.config.intervalInMs)); } }; exports2.LroEngine = LroEngine; @@ -86013,8 +86013,8 @@ var require_Batch = __commonJS({ return Promise.resolve(); } this.parallelExecute(); - return new Promise((resolve5, reject) => { - this.emitter.on("finish", resolve5); + return new Promise((resolve6, reject) => { + this.emitter.on("finish", resolve6); this.emitter.on("error", (error3) => { this.state = BatchStates.Error; reject(error3); @@ -86075,12 +86075,12 @@ var require_utils7 = __commonJS({ async function streamToBuffer(stream, buffer, offset, end, encoding) { let pos = 0; const count = end - offset; - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); stream.on("readable", () => { if (pos >= count) { clearTimeout(timeout); - resolve5(); + resolve6(); return; } let chunk = stream.read(); @@ -86099,7 +86099,7 @@ var require_utils7 = __commonJS({ if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } - resolve5(); + resolve6(); }); stream.on("error", (msg) => { clearTimeout(timeout); @@ -86110,7 +86110,7 @@ var require_utils7 = __commonJS({ async function streamToBuffer2(stream, buffer, encoding) { let pos = 0; const bufferSize = buffer.length; - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { stream.on("readable", () => { let chunk = stream.read(); if (!chunk) { @@ -86127,25 +86127,25 @@ var require_utils7 = __commonJS({ pos += chunk.length; }); stream.on("end", () => { - resolve5(pos); + resolve6(pos); }); stream.on("error", reject); }); } async function streamToBuffer3(readableStream, encoding) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { const chunks = []; readableStream.on("data", (data) => { chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); }); readableStream.on("end", () => { - resolve5(Buffer.concat(chunks)); + resolve6(Buffer.concat(chunks)); }); readableStream.on("error", reject); }); } async function readStreamToLocalFile(rs, file) { - return new Promise((resolve5, reject) => { + return new Promise((resolve6, reject) => { const ws = node_fs_1.default.createWriteStream(file); rs.on("error", (err) => { reject(err); @@ -86153,7 +86153,7 @@ var require_utils7 = __commonJS({ ws.on("error", (err) => { reject(err); }); - ws.on("close", resolve5); + ws.on("close", resolve6); rs.pipe(ws); }); } @@ -87092,7 +87092,7 @@ var require_Clients = __commonJS({ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { - return new Promise((resolve5) => { + return new Promise((resolve6) => { if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } @@ -87103,7 +87103,7 @@ var require_Clients = __commonJS({ versionId: this._versionId, ...options }, this.credential).toString(); - resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve6((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -87142,7 +87142,7 @@ var require_Clients = __commonJS({ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateUserDelegationSasUrl(options, userDelegationKey) { - return new Promise((resolve5) => { + return new Promise((resolve6) => { const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ containerName: this._containerName, blobName: this._name, @@ -87150,7 +87150,7 @@ var require_Clients = __commonJS({ versionId: this._versionId, ...options }, userDelegationKey, this.accountName).toString(); - resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve6((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -89005,14 +89005,14 @@ var require_Mutex = __commonJS({ * @param key - lock key */ static async lock(key) { - return new Promise((resolve5) => { + return new Promise((resolve6) => { if (this.keys[key] === void 0 || this.keys[key] === MutexLockStatus.UNLOCKED) { this.keys[key] = MutexLockStatus.LOCKED; - resolve5(); + resolve6(); } else { this.onUnlockEvent(key, () => { this.keys[key] = MutexLockStatus.LOCKED; - resolve5(); + resolve6(); }); } }); @@ -89023,12 +89023,12 @@ var require_Mutex = __commonJS({ * @param key - */ static async unlock(key) { - return new Promise((resolve5) => { + return new Promise((resolve6) => { if (this.keys[key] === MutexLockStatus.LOCKED) { this.emitUnlockEvent(key); } delete this.keys[key]; - resolve5(); + resolve6(); }); } static keys = {}; @@ -89250,8 +89250,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 path7 = (0, utils_common_js_1.getURLPath)(subRequest.url); - if (!path7 || path7 === "") { + const path8 = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path8 || path8 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -89329,8 +89329,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 path7 = (0, utils_common_js_1.getURLPath)(url); - if (path7 && path7 !== "/") { + const path8 = (0, utils_common_js_1.getURLPath)(url); + if (path8 && path8 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -90631,7 +90631,7 @@ var require_ContainerClient = __commonJS({ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { - return new Promise((resolve5) => { + return new Promise((resolve6) => { if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } @@ -90639,7 +90639,7 @@ var require_ContainerClient = __commonJS({ containerName: this._containerName, ...options }, this.credential).toString(); - resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve6((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -90674,12 +90674,12 @@ var require_ContainerClient = __commonJS({ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateUserDelegationSasUrl(options, userDelegationKey) { - return new Promise((resolve5) => { + return new Promise((resolve6) => { const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ containerName: this._containerName, ...options }, userDelegationKey, this.accountName).toString(); - resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve6((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -92075,11 +92075,11 @@ var require_uploadUtils = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -92095,7 +92095,7 @@ var require_uploadUtils = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -92262,11 +92262,11 @@ var require_requestUtils = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -92282,7 +92282,7 @@ var require_requestUtils = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -92322,7 +92322,7 @@ var require_requestUtils = __commonJS({ } function sleep(milliseconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5) => setTimeout(resolve5, milliseconds)); + return new Promise((resolve6) => setTimeout(resolve6, milliseconds)); }); } function retry2(name_1, method_1, getStatusCode_1) { @@ -92583,11 +92583,11 @@ var require_downloadUtils = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -92603,7 +92603,7 @@ var require_downloadUtils = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -92899,8 +92899,8 @@ var require_downloadUtils = __commonJS({ } var promiseWithTimeout = (timeoutMs, promise) => __awaiter2(void 0, void 0, void 0, function* () { let timeoutHandle; - const timeoutPromise = new Promise((resolve5) => { - timeoutHandle = setTimeout(() => resolve5("timeout"), timeoutMs); + const timeoutPromise = new Promise((resolve6) => { + timeoutHandle = setTimeout(() => resolve6("timeout"), timeoutMs); }); return Promise.race([promise, timeoutPromise]).then((result) => { clearTimeout(timeoutHandle); @@ -93181,11 +93181,11 @@ var require_cacheHttpClient = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -93201,7 +93201,7 @@ var require_cacheHttpClient = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -96671,8 +96671,8 @@ var require_deferred = __commonJS({ */ constructor(preventUnhandledRejectionWarning = true) { this._state = DeferredState.PENDING; - this._promise = new Promise((resolve5, reject) => { - this._resolve = resolve5; + this._promise = new Promise((resolve6, reject) => { + this._resolve = resolve6; this._reject = reject; }); if (preventUnhandledRejectionWarning) { @@ -96887,11 +96887,11 @@ var require_unary_call = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -96907,7 +96907,7 @@ var require_unary_call = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -96956,11 +96956,11 @@ var require_server_streaming_call = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -96976,7 +96976,7 @@ var require_server_streaming_call = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -97026,11 +97026,11 @@ var require_client_streaming_call = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -97046,7 +97046,7 @@ var require_client_streaming_call = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -97095,11 +97095,11 @@ var require_duplex_streaming_call = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -97115,7 +97115,7 @@ var require_duplex_streaming_call = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -97163,11 +97163,11 @@ var require_test_transport = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -97183,7 +97183,7 @@ var require_test_transport = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -97380,11 +97380,11 @@ var require_test_transport = __commonJS({ responseTrailer: "test" }; function delay(ms, abort) { - return (v) => new Promise((resolve5, reject) => { + return (v) => new Promise((resolve6, reject) => { if (abort === null || abort === void 0 ? void 0 : abort.aborted) { reject(new rpc_error_1.RpcError("user cancel", "CANCELLED")); } else { - const id = setTimeout(() => resolve5(v), ms); + const id = setTimeout(() => resolve6(v), ms); if (abort) { abort.addEventListener("abort", (ev) => { clearTimeout(id); @@ -98382,11 +98382,11 @@ var require_cacheTwirpClient = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -98402,7 +98402,7 @@ var require_cacheTwirpClient = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -98542,7 +98542,7 @@ var require_cacheTwirpClient = __commonJS({ } sleep(milliseconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5) => setTimeout(resolve5, milliseconds)); + return new Promise((resolve6) => setTimeout(resolve6, milliseconds)); }); } getExponentialRetryTimeMilliseconds(attempt) { @@ -98607,11 +98607,11 @@ var require_tar = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -98627,7 +98627,7 @@ var require_tar = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -98639,7 +98639,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io5 = __importStar2(require_io()); var fs_1 = require("fs"); - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants12(); var IS_WINDOWS = process.platform === "win32"; @@ -98685,13 +98685,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(`\\${path7.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path7.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path7.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + 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); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path7.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path7.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path8.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path8.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path7.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path8.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -98737,7 +98737,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path7.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path8.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -98746,7 +98746,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path7.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path8.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -98761,7 +98761,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path7.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path8.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -98770,7 +98770,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path7.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path8.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -98808,7 +98808,7 @@ var require_tar = __commonJS({ } function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path7.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path8.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -98859,11 +98859,11 @@ var require_cache5 = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -98879,7 +98879,7 @@ var require_cache5 = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -98890,7 +98890,7 @@ var require_cache5 = __commonJS({ exports2.restoreCache = restoreCache4; exports2.saveCache = saveCache4; var core15 = __importStar2(require_core()); - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); @@ -98985,7 +98985,7 @@ var require_cache5 = __commonJS({ core15.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path7.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path8.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core15.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core15.isDebug()) { @@ -99054,7 +99054,7 @@ var require_cache5 = __commonJS({ core15.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path7.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path8.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core15.debug(`Archive path: ${archivePath}`); core15.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -99116,7 +99116,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 = path7.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path8.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core15.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99180,7 +99180,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 = path7.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path8.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core15.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99297,11 +99297,11 @@ var require_manifest = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -99317,7 +99317,7 @@ var require_manifest = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -99445,11 +99445,11 @@ var require_retry_helper = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -99465,7 +99465,7 @@ var require_retry_helper = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -99510,7 +99510,7 @@ var require_retry_helper = __commonJS({ } sleep(seconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve5) => setTimeout(resolve5, seconds * 1e3)); + return new Promise((resolve6) => setTimeout(resolve6, seconds * 1e3)); }); } }; @@ -99561,11 +99561,11 @@ var require_tool_cache = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve5) { - resolve5(value); + return value instanceof P ? value : new P(function(resolve6) { + resolve6(value); }); } - return new (P || (P = Promise))(function(resolve5, reject) { + return new (P || (P = Promise))(function(resolve6, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -99581,7 +99581,7 @@ var require_tool_cache = __commonJS({ } } function step(result) { - result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve6(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -99607,7 +99607,7 @@ var require_tool_cache = __commonJS({ var fs7 = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os2 = __importStar2(require("os")); - var path7 = __importStar2(require("path")); + var path8 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver9 = __importStar2(require_semver2()); var stream = __importStar2(require("stream")); @@ -99628,8 +99628,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 || path7.join(_getTempDirectory(), crypto2.randomUUID()); - yield io5.mkdirP(path7.dirname(dest)); + dest = dest || path8.join(_getTempDirectory(), crypto2.randomUUID()); + yield io5.mkdirP(path8.dirname(dest)); core15.debug(`Downloading ${url}`); core15.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -99719,7 +99719,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path7.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path8.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}'`; @@ -99891,7 +99891,7 @@ var require_tool_cache = __commonJS({ } const destPath = yield _createToolPath(tool, version, arch); for (const itemName of fs7.readdirSync(sourceDir)) { - const s = path7.join(sourceDir, itemName); + const s = path8.join(sourceDir, itemName); yield io5.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch); @@ -99908,7 +99908,7 @@ var require_tool_cache = __commonJS({ throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch); - const destPath = path7.join(destFolder, targetFile); + const destPath = path8.join(destFolder, targetFile); core15.debug(`destination file ${destPath}`); yield io5.cp(sourceFile, destPath); _completeToolPath(tool, version, arch); @@ -99931,7 +99931,7 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver9.clean(versionSpec) || ""; - const cachePath = path7.join(_getCacheDirectory(), toolName, versionSpec, arch); + const cachePath = path8.join(_getCacheDirectory(), toolName, versionSpec, arch); core15.debug(`checking cache: ${cachePath}`); if (fs7.existsSync(cachePath) && fs7.existsSync(`${cachePath}.complete`)) { core15.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); @@ -99945,12 +99945,12 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch) { const versions = []; arch = arch || os2.arch(); - const toolPath = path7.join(_getCacheDirectory(), toolName); + const toolPath = path8.join(_getCacheDirectory(), toolName); if (fs7.existsSync(toolPath)) { const children = fs7.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path7.join(toolPath, child, arch || ""); + const fullPath = path8.join(toolPath, child, arch || ""); if (fs7.existsSync(fullPath) && fs7.existsSync(`${fullPath}.complete`)) { versions.push(child); } @@ -100002,7 +100002,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path7.join(_getTempDirectory(), crypto2.randomUUID()); + dest = path8.join(_getTempDirectory(), crypto2.randomUUID()); } yield io5.mkdirP(dest); return dest; @@ -100010,7 +100010,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch) { return __awaiter2(this, void 0, void 0, function* () { - const folderPath = path7.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch || ""); + const folderPath = path8.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch || ""); core15.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io5.rmRF(folderPath); @@ -100020,7 +100020,7 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch) { - const folderPath = path7.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch || ""); + const folderPath = path8.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch || ""); const markerPath = `${folderPath}.complete`; fs7.writeFileSync(markerPath, ""); core15.debug("finished caching tool"); @@ -100540,8 +100540,8 @@ var require_follow_redirects = __commonJS({ } return parsed; } - function resolveUrl(relative2, base) { - return useNativeURL ? new URL2(relative2, base) : parseUrl2(url.resolve(base, relative2)); + function resolveUrl(relative3, base) { + return useNativeURL ? new URL2(relative3, base) : parseUrl2(url.resolve(base, relative3)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -100632,6 +100632,7 @@ var core14 = __toESM(require_core()); // src/actions-util.ts var fs = __toESM(require("fs")); +var path2 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); @@ -103519,6 +103520,10 @@ function getTemporaryDirectory() { const value = process.env["CODEQL_ACTION_TEMP"]; return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } +var PR_DIFF_RANGE_JSON_FILENAME = "pr-diff-range.json"; +function getDiffRangesJsonFilePath() { + return path2.join(getTemporaryDirectory(), PR_DIFF_RANGE_JSON_FILENAME); +} function getActionVersion() { return "4.34.2"; } @@ -103817,7 +103822,7 @@ var core12 = __toESM(require_core()); // src/codeql.ts var fs6 = __toESM(require("fs")); -var path6 = __toESM(require("path")); +var path7 = __toESM(require("path")); var core11 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -104065,7 +104070,7 @@ function wrapCliConfigurationError(cliError) { // src/config-utils.ts var fs4 = __toESM(require("fs")); -var path4 = __toESM(require("path")); +var path5 = __toESM(require("path")); var core9 = __toESM(require_core()); // src/analyses.ts @@ -104119,7 +104124,7 @@ function getActionsLogger() { // src/feature-flags.ts var fs3 = __toESM(require("fs")); -var path3 = __toESM(require("path")); +var path4 = __toESM(require("path")); var semver5 = __toESM(require_semver2()); // src/defaults.json @@ -104128,7 +104133,7 @@ var cliVersion = "2.24.3"; // src/overlay/index.ts var fs2 = __toESM(require("fs")); -var path2 = __toESM(require("path")); +var path3 = __toESM(require("path")); var actionsCache = __toESM(require_cache5()); // src/git-utils.ts @@ -104234,8 +104239,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path7 = decodeGitFilePath(match[2]); - fileOidMap[path7] = oid; + const path8 = decodeGitFilePath(match[2]); + fileOidMap[path8] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -104350,7 +104355,7 @@ async function writeOverlayChangesFile(config, sourceRoot, logger) { const diffRangeFiles = await getDiffRangeFilePaths(sourceRoot, logger); const changedFiles = [.../* @__PURE__ */ new Set([...oidChangedFiles, ...diffRangeFiles])]; const changedFilesJson = JSON.stringify({ changes: changedFiles }); - const overlayChangesFile = path2.join( + const overlayChangesFile = path3.join( getTemporaryDirectory(), "overlay-changes.json" ); @@ -104375,13 +104380,16 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { return changes; } async function getDiffRangeFilePaths(sourceRoot, logger) { - const jsonFilePath = path2.join(getTemporaryDirectory(), "pr-diff-range.json"); - if (!fs2.existsSync(jsonFilePath)) { + const jsonFilePath = getDiffRangesJsonFilePath(); + let contents; + try { + contents = await fs2.promises.readFile(jsonFilePath, "utf8"); + } catch { return []; } let diffRanges; try { - diffRanges = JSON.parse(fs2.readFileSync(jsonFilePath, "utf8")); + diffRanges = JSON.parse(contents); } catch (e) { logger.warning( `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` @@ -104391,30 +104399,17 @@ async function getDiffRangeFilePaths(sourceRoot, logger) { logger.debug( `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.` ); - const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === void 0) { logger.warning( "Cannot determine git root; returning diff range paths as-is." ); - return repoRelativePaths; - } - const sourceRootRelPrefix = path2.relative(repoRoot, sourceRoot).replaceAll(path2.sep, "/"); - if (sourceRootRelPrefix === "") { - return repoRelativePaths; - } - const prefixWithSlash = `${sourceRootRelPrefix}/`; - const result = []; - for (const p of repoRelativePaths) { - if (p.startsWith(prefixWithSlash)) { - result.push(p.slice(prefixWithSlash.length)); - } else { - logger.debug( - `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").` - ); - } + return [...new Set(diffRanges.map((r) => r.path))]; } - return result; + const relativePaths = diffRanges.map( + (r) => path3.relative(sourceRoot, path3.join(repoRoot, r.path)).replaceAll(path3.sep, "/") + ).filter((rel) => !rel.startsWith("..")); + return [...new Set(relativePaths)]; } // src/tools-features.ts @@ -104749,7 +104744,7 @@ var Features = class extends OfflineFeatures { super(logger); this.gitHubFeatureFlags = new GitHubFeatureFlags( repositoryNwo, - path3.join(tempDir, FEATURE_FLAGS_FILE_NAME), + path4.join(tempDir, FEATURE_FLAGS_FILE_NAME), logger ); } @@ -104995,7 +104990,7 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = { ruby: "overlay_analysis_code_scanning_ruby" /* OverlayAnalysisCodeScanningRuby */ }; function getPathToParsedConfigFile(tempDir) { - return path4.join(tempDir, "config"); + return path5.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); @@ -105058,7 +105053,7 @@ var STREAMING_HIGH_WATERMARK_BYTES = 4 * 1024 * 1024; // src/tracer-config.ts var fs5 = __toESM(require("fs")); -var path5 = __toESM(require("path")); +var path6 = __toESM(require("path")); async function shouldEnableIndirectTracing(codeql, config) { if (config.buildMode === "none" /* None */) { return false; @@ -105073,7 +105068,7 @@ async function endTracingForCluster(codeql, config, logger) { logger.info( "Unsetting build tracing environment variables. Subsequent steps of this job will not be traced." ); - const envVariablesFile = path5.resolve( + const envVariablesFile = path6.resolve( config.dbLocation, "temp/tracingEnvironment/end-tracing.json" ); @@ -105143,7 +105138,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path6.join( + const tracingConfigPath = path7.join( extractorPath, "tools", "tracing-config.lua" @@ -105225,7 +105220,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path6.join( + const autobuildCmd = path7.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -105647,7 +105642,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path6.resolve(config.tempDir, "user-config.yaml"); + return path7.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 2015196f6b..55c74ea003 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 path19 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path18 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path19 && path19[0] !== "/") { - path19 = `/${path19}`; + if (path18 && path18[0] !== "/") { + path18 = `/${path18}`; } - return new URL(`${origin}${path19}`); + return new URL(`${origin}${path18}`); } 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: path19, origin } + request: { method, path: path18, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path19); + debuglog("sending request to %s %s/%s", method, origin, path18); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path19, origin }, + request: { method, path: path18, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path19, + path18, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path19, origin } + request: { method, path: path18, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path19); + debuglog("trailers received from %s %s/%s", method, origin, path18); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path19, origin }, + request: { method, path: path18, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path19, + path18, error3.message ); }); @@ -1876,9 +1876,9 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path19, origin } + request: { method, path: path18, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path19); + debuglog("sending request to %s %s/%s", method, origin, path18); }); } 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: path19, + path: path18, method, body, headers, @@ -1956,11 +1956,11 @@ var require_request = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path19 !== "string") { + if (typeof path18 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path19[0] !== "/" && !(path19.startsWith("http://") || path19.startsWith("https://")) && method !== "CONNECT") { + } else if (path18[0] !== "/" && !(path18.startsWith("http://") || path18.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path19)) { + } else if (invalidPathRegex.test(path18)) { 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(path19, query) : path19; + this.path = query ? buildURL(path18, query) : path18; 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: path19, host, upgrade, blocking, reset } = request2; + const { method, path: path18, 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} ${path19} HTTP/1.1\r + let header = `${method} ${path18} 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: path19, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path18, 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] = path19; + headers[HTTP2_HEADER_PATH] = path18; 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 path19 = search ? `${pathname}${search}` : pathname; + const path18 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path19; + this.opts.path = path18; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -8784,10 +8784,10 @@ var require_proxy_agent = __commonJS({ }; const { origin, - path: path19 = "/", + path: path18 = "/", headers = {} } = opts; - opts.path = origin + path19; + opts.path = origin + path18; 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(path19) { - if (typeof path19 !== "string") { - return path19; + function safeUrl(path18) { + if (typeof path18 !== "string") { + return path18; } - const pathSegments = path19.split("?"); + const pathSegments = path18.split("?"); if (pathSegments.length !== 2) { - return path19; + return path18; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path19, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path19); + function matchKey(mockDispatch2, { path: path18, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path18); 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: path19 }) => matchValue(safeUrl(path19), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path18 }) => matchValue(safeUrl(path18), 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: path19, method, body, headers, query } = opts; + const { path: path18, method, body, headers, query } = opts; return { - path: path19, + path: path18, method, body, headers, @@ -11246,10 +11246,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path19, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path18, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path19, + Path: path18, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -16130,9 +16130,9 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path19) { - for (let i = 0; i < path19.length; ++i) { - const code = path19.charCodeAt(i); + function validateCookiePath(path18) { + for (let i = 0; i < path18.length; ++i) { + const code = path18.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 path19 = opts.path; + let path18 = opts.path; if (!opts.path.startsWith("/")) { - path19 = `/${path19}`; + path18 = `/${path18}`; } - url2 = new URL(util.parseOrigin(url2).origin + path19); + url2 = new URL(util.parseOrigin(url2).origin + path18); } 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 path19 = __importStar2(require("path")); + var path18 = __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, path19.sep); + return pth.replace(/[/\\]/g, path18.sep); } } }); @@ -20124,7 +20124,7 @@ var require_io_util = __commonJS({ exports2.tryGetExecutablePath = tryGetExecutablePath; exports2.getCmdPath = getCmdPath; var fs20 = __importStar2(require("fs")); - var path19 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); _a = fs20.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 = path19.extname(filePath).toUpperCase(); + const upperExt = path18.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 = path19.dirname(filePath); - const upperName = path19.basename(filePath).toUpperCase(); + const directory = path18.dirname(filePath); + const upperName = path18.basename(filePath).toUpperCase(); for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path19.join(directory, actualName); + filePath = path18.join(directory, actualName); break; } } @@ -20319,7 +20319,7 @@ var require_io = __commonJS({ exports2.which = which7; exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path19 = __importStar2(require("path")); + var path18 = __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 ? path19.join(dest, path19.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path18.join(dest, path18.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 (path19.relative(source, newDest) === "") { + if (path18.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 = path19.join(dest, path19.basename(source)); + dest = path18.join(dest, path18.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -20363,7 +20363,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path19.dirname(dest)); + yield mkdirP(path18.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(path19.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path18.delimiter)) { if (extension) { extensions.push(extension); } @@ -20435,12 +20435,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path19.sep)) { + if (tool.includes(path18.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path19.delimiter)) { + for (const p of process.env.PATH.split(path18.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(path19.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path18.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 path19 = __importStar2(require("path")); + var path18 = __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 = path19.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path18.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 path19 = __importStar2(require("path")); + var path18 = __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}${path19.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path18.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 path19 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path19} does not exist${os_1.EOL}`); + const path18 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path18} 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 path19 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path18 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path19 && path19[0] !== "/") { - path19 = `/${path19}`; + if (path18 && path18[0] !== "/") { + path18 = `/${path18}`; } - return new URL(`${origin}${path19}`); + return new URL(`${origin}${path18}`); } 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: path19, origin } + request: { method, path: path18, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path19); + debuglog("sending request to %s %s/%s", method, origin, path18); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path19, origin }, + request: { method, path: path18, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path19, + path18, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path19, origin } + request: { method, path: path18, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path19); + debuglog("trailers received from %s %s/%s", method, origin, path18); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path19, origin }, + request: { method, path: path18, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path19, + path18, error3.message ); }); @@ -22874,9 +22874,9 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path19, origin } + request: { method, path: path18, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path19); + debuglog("sending request to %s %s/%s", method, origin, path18); }); } 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: path19, + path: path18, method, body, headers, @@ -22954,11 +22954,11 @@ var require_request3 = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path19 !== "string") { + if (typeof path18 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path19[0] !== "/" && !(path19.startsWith("http://") || path19.startsWith("https://")) && method !== "CONNECT") { + } else if (path18[0] !== "/" && !(path18.startsWith("http://") || path18.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path19)) { + } else if (invalidPathRegex.test(path18)) { 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(path19, query) : path19; + this.path = query ? buildURL(path18, query) : path18; 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: path19, host, upgrade, blocking, reset } = request2; + const { method, path: path18, 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} ${path19} HTTP/1.1\r + let header = `${method} ${path18} 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: path19, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path18, 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] = path19; + headers[HTTP2_HEADER_PATH] = path18; 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 path19 = search ? `${pathname}${search}` : pathname; + const path18 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path19; + this.opts.path = path18; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -29782,10 +29782,10 @@ var require_proxy_agent2 = __commonJS({ }; const { origin, - path: path19 = "/", + path: path18 = "/", headers = {} } = opts; - opts.path = origin + path19; + opts.path = origin + path18; 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(path19) { - if (typeof path19 !== "string") { - return path19; + function safeUrl(path18) { + if (typeof path18 !== "string") { + return path18; } - const pathSegments = path19.split("?"); + const pathSegments = path18.split("?"); if (pathSegments.length !== 2) { - return path19; + return path18; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path19, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path19); + function matchKey(mockDispatch2, { path: path18, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path18); 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: path19 }) => matchValue(safeUrl(path19), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path18 }) => matchValue(safeUrl(path18), 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: path19, method, body, headers, query } = opts; + const { path: path18, method, body, headers, query } = opts; return { - path: path19, + path: path18, method, body, headers, @@ -32244,10 +32244,10 @@ var require_pending_interceptors_formatter2 = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path19, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path18, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path19, + Path: path18, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -37128,9 +37128,9 @@ var require_util14 = __commonJS({ } } } - function validateCookiePath(path19) { - for (let i = 0; i < path19.length; ++i) { - const code = path19.charCodeAt(i); + function validateCookiePath(path18) { + for (let i = 0; i < path18.length; ++i) { + const code = path18.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 path19 = opts.path; + let path18 = opts.path; if (!opts.path.startsWith("/")) { - path19 = `/${path19}`; + path18 = `/${path18}`; } - url2 = new URL(util.parseOrigin(url2).origin + path19); + url2 = new URL(util.parseOrigin(url2).origin + path18); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -47305,14 +47305,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, path19, name, argument) { - if (Array.isArray(path19)) { - this.path = path19; - this.property = path19.reduce(function(sum, item) { + var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path18, name, argument) { + if (Array.isArray(path18)) { + this.path = path18; + this.property = path18.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path19 !== void 0) { - this.property = path19; + } else if (path18 !== void 0) { + this.property = path18; } if (message) { this.message = message; @@ -47403,16 +47403,16 @@ var require_helpers = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path19, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path18, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path19)) { - this.path = path19; - this.propertyPath = path19.reduce(function(sum, item) { + if (Array.isArray(path18)) { + this.path = path18; + this.propertyPath = path18.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path19; + this.propertyPath = path18; } this.base = base; this.schemas = schemas; @@ -47421,10 +47421,10 @@ var require_helpers = __commonJS({ return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path19 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path18 = 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, path19, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema2, this.options, path18, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -48727,7 +48727,7 @@ var require_internal_path_helper = __commonJS({ exports2.hasRoot = hasRoot; exports2.normalizeSeparators = normalizeSeparators; exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - var path19 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname5(p) { @@ -48735,7 +48735,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path19.dirname(p); + let result = path18.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -48772,7 +48772,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 += path19.sep; + root += path18.sep; } return root + itemPath; } @@ -48806,10 +48806,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path19.sep)) { + if (!p.endsWith(path18.sep)) { return p; } - if (p === path19.sep) { + if (p === path18.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -49154,7 +49154,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path19 = (function() { + var path18 = (function() { try { return require("path"); } catch (e) { @@ -49162,7 +49162,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path19.sep; + minimatch.sep = path18.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand2 = require_brace_expansion(); var plTypes = { @@ -49251,8 +49251,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path19.sep !== "/") { - pattern = pattern.split(path19.sep).join("/"); + if (!options.allowWindowsEscape && path18.sep !== "/") { + pattern = pattern.split(path18.sep).join("/"); } this.options = options; this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200; @@ -49623,8 +49623,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path19.sep !== "/") { - f = f.split(path19.sep).join("/"); + if (path18.sep !== "/") { + f = f.split(path18.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -49867,7 +49867,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path19 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -49882,12 +49882,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(path19.sep); + this.segments = itemPath.split(path18.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename2 = path19.basename(remaining); + const basename2 = path18.basename(remaining); this.segments.unshift(basename2); remaining = dir; dir = pathHelper.dirname(remaining); @@ -49905,7 +49905,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(path19.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path18.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -49916,12 +49916,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path19.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path18.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path19.sep; + result += path18.sep; } result += this.segments[i]; } @@ -49979,7 +49979,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os4 = __importStar2(require("os")); - var path19 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); @@ -50008,7 +50008,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(path19.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path18.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -50032,8 +50032,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path19.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path19.sep}`; + if (!itemPath.endsWith(path18.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path18.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -50068,9 +50068,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(`.${path19.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path18.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path19.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path18.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}'`); @@ -50154,8 +50154,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path19, level) { - this.path = path19; + constructor(path18, level) { + this.path = path18; this.level = level; } }; @@ -50299,7 +50299,7 @@ var require_internal_globber = __commonJS({ var core19 = __importStar2(require_core()); var fs20 = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); - var path19 = __importStar2(require("path")); + var path18 = __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(); @@ -50375,7 +50375,7 @@ var require_internal_globber = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path19.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path18.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -50385,7 +50385,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await2(fs20.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path19.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs20.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path18.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); @@ -50547,7 +50547,7 @@ var require_internal_hash_files = __commonJS({ var fs20 = __importStar2(require("fs")); var stream2 = __importStar2(require("stream")); var util = __importStar2(require("util")); - var path19 = __importStar2(require("path")); + var path18 = __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; @@ -50563,7 +50563,7 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path19.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path18.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } @@ -51949,7 +51949,7 @@ var require_cacheUtils = __commonJS({ var io7 = __importStar2(require_io()); var crypto2 = __importStar2(require("crypto")); var fs20 = __importStar2(require("fs")); - var path19 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var semver9 = __importStar2(require_semver3()); var util = __importStar2(require("util")); var constants_1 = require_constants12(); @@ -51969,9 +51969,9 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path19.join(baseLocation, "actions", "temp"); + tempDirectory = path18.join(baseLocation, "actions", "temp"); } - const dest = path19.join(tempDirectory, crypto2.randomUUID()); + const dest = path18.join(tempDirectory, crypto2.randomUUID()); yield io7.mkdirP(dest); return dest; }); @@ -51993,7 +51993,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path19.relative(workspace, file).replace(new RegExp(`\\${path19.sep}`, "g"), "/"); + const relativeFile = path18.relative(workspace, file).replace(new RegExp(`\\${path18.sep}`, "g"), "/"); core19.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -52520,13 +52520,13 @@ function __disposeResources(env) { } return next(); } -function __rewriteRelativeImportExtension(path19, preserveJsx) { - if (typeof path19 === "string" && /^\.\.?\//.test(path19)) { - return path19.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { +function __rewriteRelativeImportExtension(path18, preserveJsx) { + if (typeof path18 === "string" && /^\.\.?\//.test(path18)) { + return path18.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 path19; + return path18; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -56940,8 +56940,8 @@ var require_getClient = __commonJS({ } const { allowInsecureConnection, httpClient } = clientOptions; const endpointUrl = clientOptions.endpoint ?? endpoint2; - const client = (path19, ...args) => { - const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path19, args, { allowInsecureConnection, ...requestOptions }); + const client = (path18, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path18, args, { allowInsecureConnection, ...requestOptions }); return { get: (requestOptions = {}) => { return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); @@ -60812,15 +60812,15 @@ var require_urlHelpers2 = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path19 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path19.startsWith("/")) { - path19 = path19.substring(1); + let path18 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path18.startsWith("/")) { + path18 = path18.substring(1); } - if (isAbsoluteUrl(path19)) { - requestUrl = path19; + if (isAbsoluteUrl(path18)) { + requestUrl = path18; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path19); + requestUrl = appendPath(requestUrl, path18); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -60866,9 +60866,9 @@ var require_urlHelpers2 = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path19 = pathToAppend.substring(0, searchStart); + const path18 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path19; + newPath = newPath + path18; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -63545,10 +63545,10 @@ var require_utils_common = __commonJS({ var constants_js_1 = require_constants15(); function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path19 = urlParsed.pathname; - path19 = path19 || "/"; - path19 = escape(path19); - urlParsed.pathname = path19; + let path18 = urlParsed.pathname; + path18 = path18 || "/"; + path18 = escape(path18); + urlParsed.pathname = path18; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -63633,9 +63633,9 @@ var require_utils_common = __commonJS({ } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path19 = urlParsed.pathname; - path19 = path19 ? path19.endsWith("/") ? `${path19}${name}` : `${path19}/${name}` : name; - urlParsed.pathname = path19; + let path18 = urlParsed.pathname; + path18 = path18 ? path18.endsWith("/") ? `${path18}${name}` : `${path18}/${name}` : name; + urlParsed.pathname = path18; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -64862,9 +64862,9 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path19 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path18 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path19}`; + canonicalizedResourceString += `/${this.factory.accountName}${path18}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -65603,10 +65603,10 @@ var require_utils_common2 = __commonJS({ var constants_js_1 = require_constants16(); function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path19 = urlParsed.pathname; - path19 = path19 || "/"; - path19 = escape(path19); - urlParsed.pathname = path19; + let path18 = urlParsed.pathname; + path18 = path18 || "/"; + path18 = escape(path18); + urlParsed.pathname = path18; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -65691,9 +65691,9 @@ var require_utils_common2 = __commonJS({ } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path19 = urlParsed.pathname; - path19 = path19 ? path19.endsWith("/") ? `${path19}${name}` : `${path19}/${name}` : name; - urlParsed.pathname = path19; + let path18 = urlParsed.pathname; + path18 = path18 ? path18.endsWith("/") ? `${path18}${name}` : `${path18}/${name}` : name; + urlParsed.pathname = path18; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -66614,9 +66614,9 @@ var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path19 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path18 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path19}`; + canonicalizedResourceString += `/${this.factory.accountName}${path18}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67246,9 +67246,9 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path19 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path18 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path19}`; + canonicalizedResourceString += `/${options.accountName}${path18}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67593,9 +67593,9 @@ var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path19 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path18 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path19}`; + canonicalizedResourceString += `/${options.accountName}${path18}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -89250,8 +89250,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 path19 = (0, utils_common_js_1.getURLPath)(subRequest.url); - if (!path19 || path19 === "") { + const path18 = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path18 || path18 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -89329,8 +89329,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 path19 = (0, utils_common_js_1.getURLPath)(url2); - if (path19 && path19 !== "/") { + const path18 = (0, utils_common_js_1.getURLPath)(url2); + if (path18 && path18 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -98639,7 +98639,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io7 = __importStar2(require_io()); var fs_1 = require("fs"); - var path19 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants12(); var IS_WINDOWS = process.platform === "win32"; @@ -98685,13 +98685,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(`\\${path19.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path19.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path18.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -98737,7 +98737,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path19.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path18.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -98746,7 +98746,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path19.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path18.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -98761,7 +98761,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -98770,7 +98770,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -98808,7 +98808,7 @@ var require_tar = __commonJS({ } function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path19.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path18.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -98890,7 +98890,7 @@ var require_cache5 = __commonJS({ exports2.restoreCache = restoreCache5; exports2.saveCache = saveCache5; var core19 = __importStar2(require_core()); - var path19 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); @@ -98985,7 +98985,7 @@ var require_cache5 = __commonJS({ core19.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path19.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path18.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core19.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core19.isDebug()) { @@ -99054,7 +99054,7 @@ var require_cache5 = __commonJS({ core19.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path19.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path18.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core19.debug(`Archive path: ${archivePath}`); core19.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -99116,7 +99116,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 = path19.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path18.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core19.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99180,7 +99180,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 = path19.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path18.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core19.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99607,7 +99607,7 @@ var require_tool_cache = __commonJS({ var fs20 = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os4 = __importStar2(require("os")); - var path19 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver9 = __importStar2(require_semver2()); var stream2 = __importStar2(require("stream")); @@ -99628,8 +99628,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 || path19.join(_getTempDirectory(), crypto2.randomUUID()); - yield io7.mkdirP(path19.dirname(dest)); + dest = dest || path18.join(_getTempDirectory(), crypto2.randomUUID()); + yield io7.mkdirP(path18.dirname(dest)); core19.debug(`Downloading ${url2}`); core19.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -99719,7 +99719,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path19.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path18.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}'`; @@ -99891,7 +99891,7 @@ var require_tool_cache = __commonJS({ } const destPath = yield _createToolPath(tool, version, arch2); for (const itemName of fs20.readdirSync(sourceDir)) { - const s = path19.join(sourceDir, itemName); + const s = path18.join(sourceDir, itemName); yield io7.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -99908,7 +99908,7 @@ var require_tool_cache = __commonJS({ throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path19.join(destFolder, targetFile); + const destPath = path18.join(destFolder, targetFile); core19.debug(`destination file ${destPath}`); yield io7.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -99931,7 +99931,7 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver9.clean(versionSpec) || ""; - const cachePath = path19.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path18.join(_getCacheDirectory(), toolName, versionSpec, arch2); core19.debug(`checking cache: ${cachePath}`); if (fs20.existsSync(cachePath) && fs20.existsSync(`${cachePath}.complete`)) { core19.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); @@ -99945,12 +99945,12 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os4.arch(); - const toolPath = path19.join(_getCacheDirectory(), toolName); + const toolPath = path18.join(_getCacheDirectory(), toolName); if (fs20.existsSync(toolPath)) { const children = fs20.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path19.join(toolPath, child, arch2 || ""); + const fullPath = path18.join(toolPath, child, arch2 || ""); if (fs20.existsSync(fullPath) && fs20.existsSync(`${fullPath}.complete`)) { versions.push(child); } @@ -100002,7 +100002,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path19.join(_getTempDirectory(), crypto2.randomUUID()); + dest = path18.join(_getTempDirectory(), crypto2.randomUUID()); } yield io7.mkdirP(dest); return dest; @@ -100010,7 +100010,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter2(this, void 0, void 0, function* () { - const folderPath = path19.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path18.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); core19.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io7.rmRF(folderPath); @@ -100020,7 +100020,7 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path19.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path18.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; fs20.writeFileSync(markerPath, ""); core19.debug("finished caching tool"); @@ -102802,13 +102802,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(path19) { - if (!path19) { + function validateFilePath(path18) { + if (!path18) { throw new Error(`Provided file path input during validation is empty`); } for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) { - if (path19.includes(invalidCharacterKey)) { - throw new Error(`The path for one of the files in artifact is not valid: ${path19}. Contains the following character: ${errorMessageForCharacter} + if (path18.includes(invalidCharacterKey)) { + throw new Error(`The path for one of the files in artifact is not valid: ${path18}. Contains the following character: ${errorMessageForCharacter} Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()} @@ -103709,8 +103709,8 @@ var require_minimatch2 = __commonJS({ return new Minimatch(pattern, options).match(p); }; module2.exports = minimatch; - var path19 = require_path(); - minimatch.sep = path19.sep; + var path18 = require_path(); + minimatch.sep = path18.sep; var GLOBSTAR = /* @__PURE__ */ Symbol("globstar **"); minimatch.GLOBSTAR = GLOBSTAR; var expand2 = require_brace_expansion2(); @@ -104316,8 +104316,8 @@ var require_minimatch2 = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; const options = this.options; - if (path19.sep !== "/") { - f = f.split(path19.sep).join("/"); + if (path18.sep !== "/") { + f = f.split(path18.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -104415,8 +104415,8 @@ var require_readdir_glob = __commonJS({ }); }); } - async function* exploreWalkAsync(dir, path19, followSymlinks, useStat, shouldSkip, strict) { - let files = await readdir(path19 + dir, strict); + async function* exploreWalkAsync(dir, path18, followSymlinks, useStat, shouldSkip, strict) { + let files = await readdir(path18 + dir, strict); for (const file of files) { let name = file.name; if (name === void 0) { @@ -104425,7 +104425,7 @@ var require_readdir_glob = __commonJS({ } const filename = dir + "/" + name; const relative3 = filename.slice(1); - const absolute = path19 + "/" + relative3; + const absolute = path18 + "/" + relative3; let stats = null; if (useStat || followSymlinks) { stats = await stat(absolute, followSymlinks); @@ -104439,15 +104439,15 @@ var require_readdir_glob = __commonJS({ if (stats.isDirectory()) { if (!shouldSkip(relative3)) { yield { relative: relative3, absolute, stats }; - yield* exploreWalkAsync(filename, path19, followSymlinks, useStat, shouldSkip, false); + yield* exploreWalkAsync(filename, path18, followSymlinks, useStat, shouldSkip, false); } } else { yield { relative: relative3, absolute, stats }; } } } - async function* explore(path19, followSymlinks, useStat, shouldSkip) { - yield* exploreWalkAsync("", path19, followSymlinks, useStat, shouldSkip, true); + async function* explore(path18, followSymlinks, useStat, shouldSkip) { + yield* exploreWalkAsync("", path18, followSymlinks, useStat, shouldSkip, true); } function readOptions(options) { return { @@ -106485,14 +106485,14 @@ var require_polyfills = __commonJS({ fs20.fstatSync = statFixSync(fs20.fstatSync); fs20.lstatSync = statFixSync(fs20.lstatSync); if (fs20.chmod && !fs20.lchmod) { - fs20.lchmod = function(path19, mode, cb) { + fs20.lchmod = function(path18, mode, cb) { if (cb) process.nextTick(cb); }; fs20.lchmodSync = function() { }; } if (fs20.chown && !fs20.lchown) { - fs20.lchown = function(path19, uid, gid, cb) { + fs20.lchown = function(path18, uid, gid, cb) { if (cb) process.nextTick(cb); }; fs20.lchownSync = function() { @@ -106559,9 +106559,9 @@ var require_polyfills = __commonJS({ }; })(fs20.readSync); function patchLchmod(fs21) { - fs21.lchmod = function(path19, mode, callback) { + fs21.lchmod = function(path18, mode, callback) { fs21.open( - path19, + path18, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) { @@ -106577,8 +106577,8 @@ var require_polyfills = __commonJS({ } ); }; - fs21.lchmodSync = function(path19, mode) { - var fd = fs21.openSync(path19, constants.O_WRONLY | constants.O_SYMLINK, mode); + fs21.lchmodSync = function(path18, mode) { + var fd = fs21.openSync(path18, constants.O_WRONLY | constants.O_SYMLINK, mode); var threw = true; var ret; try { @@ -106599,8 +106599,8 @@ var require_polyfills = __commonJS({ } function patchLutimes(fs21) { if (constants.hasOwnProperty("O_SYMLINK") && fs21.futimes) { - fs21.lutimes = function(path19, at, mt, cb) { - fs21.open(path19, constants.O_SYMLINK, function(er, fd) { + fs21.lutimes = function(path18, at, mt, cb) { + fs21.open(path18, constants.O_SYMLINK, function(er, fd) { if (er) { if (cb) cb(er); return; @@ -106612,8 +106612,8 @@ var require_polyfills = __commonJS({ }); }); }; - fs21.lutimesSync = function(path19, at, mt) { - var fd = fs21.openSync(path19, constants.O_SYMLINK); + fs21.lutimesSync = function(path18, at, mt) { + var fd = fs21.openSync(path18, constants.O_SYMLINK); var ret; var threw = true; try { @@ -106731,11 +106731,11 @@ var require_legacy_streams = __commonJS({ ReadStream, WriteStream }; - function ReadStream(path19, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path19, options); + function ReadStream(path18, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path18, options); Stream.call(this); var self2 = this; - this.path = path19; + this.path = path18; this.fd = null; this.readable = true; this.paused = false; @@ -106780,10 +106780,10 @@ var require_legacy_streams = __commonJS({ self2._read(); }); } - function WriteStream(path19, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path19, options); + function WriteStream(path18, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path18, options); Stream.call(this); - this.path = path19; + this.path = path18; this.fd = null; this.writable = true; this.flags = "w"; @@ -106926,14 +106926,14 @@ var require_graceful_fs = __commonJS({ fs21.createWriteStream = createWriteStream3; var fs$readFile = fs21.readFile; fs21.readFile = readFile; - function readFile(path19, options, cb) { + function readFile(path18, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$readFile(path19, options, cb); - function go$readFile(path20, options2, cb2, startTime) { - return fs$readFile(path20, options2, function(err) { + return go$readFile(path18, options, cb); + function go$readFile(path19, options2, cb2, startTime) { + return fs$readFile(path19, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path20, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$readFile, [path19, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -106943,14 +106943,14 @@ var require_graceful_fs = __commonJS({ } var fs$writeFile = fs21.writeFile; fs21.writeFile = writeFile; - function writeFile(path19, data, options, cb) { + function writeFile(path18, data, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$writeFile(path19, data, options, cb); - function go$writeFile(path20, data2, options2, cb2, startTime) { - return fs$writeFile(path20, data2, options2, function(err) { + return go$writeFile(path18, data, options, cb); + function go$writeFile(path19, data2, options2, cb2, startTime) { + return fs$writeFile(path19, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path20, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$writeFile, [path19, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -106961,14 +106961,14 @@ var require_graceful_fs = __commonJS({ var fs$appendFile = fs21.appendFile; if (fs$appendFile) fs21.appendFile = appendFile; - function appendFile(path19, data, options, cb) { + function appendFile(path18, data, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$appendFile(path19, data, options, cb); - function go$appendFile(path20, data2, options2, cb2, startTime) { - return fs$appendFile(path20, data2, options2, function(err) { + return go$appendFile(path18, data, options, cb); + function go$appendFile(path19, data2, options2, cb2, startTime) { + return fs$appendFile(path19, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path20, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$appendFile, [path19, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -106999,31 +106999,31 @@ var require_graceful_fs = __commonJS({ var fs$readdir = fs21.readdir; fs21.readdir = readdir; var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path19, options, cb) { + function readdir(path18, options, cb) { if (typeof options === "function") cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path20, options2, cb2, startTime) { - return fs$readdir(path20, fs$readdirCallback( - path20, + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path19, options2, cb2, startTime) { + return fs$readdir(path19, fs$readdirCallback( + path19, options2, cb2, startTime )); - } : function go$readdir2(path20, options2, cb2, startTime) { - return fs$readdir(path20, options2, fs$readdirCallback( - path20, + } : function go$readdir2(path19, options2, cb2, startTime) { + return fs$readdir(path19, options2, fs$readdirCallback( + path19, options2, cb2, startTime )); }; - return go$readdir(path19, options, cb); - function fs$readdirCallback(path20, options2, cb2, startTime) { + return go$readdir(path18, options, cb); + function fs$readdirCallback(path19, options2, cb2, startTime) { return function(err, files) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ go$readdir, - [path20, options2, cb2], + [path19, options2, cb2], err, startTime || Date.now(), Date.now() @@ -107094,7 +107094,7 @@ var require_graceful_fs = __commonJS({ enumerable: true, configurable: true }); - function ReadStream(path19, options) { + function ReadStream(path18, options) { if (this instanceof ReadStream) return fs$ReadStream.apply(this, arguments), this; else @@ -107114,7 +107114,7 @@ var require_graceful_fs = __commonJS({ } }); } - function WriteStream(path19, options) { + function WriteStream(path18, options) { if (this instanceof WriteStream) return fs$WriteStream.apply(this, arguments), this; else @@ -107132,22 +107132,22 @@ var require_graceful_fs = __commonJS({ } }); } - function createReadStream2(path19, options) { - return new fs21.ReadStream(path19, options); + function createReadStream2(path18, options) { + return new fs21.ReadStream(path18, options); } - function createWriteStream3(path19, options) { - return new fs21.WriteStream(path19, options); + function createWriteStream3(path18, options) { + return new fs21.WriteStream(path18, options); } var fs$open = fs21.open; fs21.open = open; - function open(path19, flags, mode, cb) { + function open(path18, flags, mode, cb) { if (typeof mode === "function") cb = mode, mode = null; - return go$open(path19, flags, mode, cb); - function go$open(path20, flags2, mode2, cb2, startTime) { - return fs$open(path20, flags2, mode2, function(err, fd) { + return go$open(path18, flags, mode, cb); + function go$open(path19, flags2, mode2, cb2, startTime) { + return fs$open(path19, flags2, mode2, function(err, fd) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path20, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$open, [path19, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -107500,7 +107500,7 @@ var require_BufferList = __commonJS({ this.head = this.tail = null; this.length = 0; }; - BufferList.prototype.join = function join16(s) { + BufferList.prototype.join = function join15(s) { if (this.length === 0) return ""; var p = this.head; var ret = "" + p.data; @@ -109248,22 +109248,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(path19, stripTrailing) { - if (typeof path19 !== "string") { + module2.exports = function(path18, stripTrailing) { + if (typeof path18 !== "string") { throw new TypeError("expected path to be a string"); } - if (path19 === "\\" || path19 === "/") return "/"; - var len = path19.length; - if (len <= 1) return path19; + if (path18 === "\\" || path18 === "/") return "/"; + var len = path18.length; + if (len <= 1) return path18; var prefix = ""; - if (len > 4 && path19[3] === "\\") { - var ch = path19[2]; - if ((ch === "?" || ch === ".") && path19.slice(0, 2) === "\\\\") { - path19 = path19.slice(2); + if (len > 4 && path18[3] === "\\") { + var ch = path18[2]; + if ((ch === "?" || ch === ".") && path18.slice(0, 2) === "\\\\") { + path18 = path18.slice(2); prefix = "//"; } } - var segs = path19.split(/[/\\]+/); + var segs = path18.split(/[/\\]+/); if (stripTrailing !== false && segs[segs.length - 1] === "") { segs.pop(); } @@ -118053,11 +118053,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 path19 = { + var path18 = { win32: { sep: "\\" }, posix: { sep: "/" } }; - exports2.sep = defaultPlatform === "win32" ? path19.win32.sep : path19.posix.sep; + exports2.sep = defaultPlatform === "win32" ? path18.win32.sep : path18.posix.sep; exports2.minimatch.sep = exports2.sep; exports2.GLOBSTAR = /* @__PURE__ */ Symbol("globstar **"); exports2.minimatch.GLOBSTAR = exports2.GLOBSTAR; @@ -121416,12 +121416,12 @@ var require_commonjs23 = __commonJS({ /** * Get the Path object referenced by the string path, resolved from this Path */ - resolve(path19) { - if (!path19) { + resolve(path18) { + if (!path18) { return this; } - const rootPath = this.getRootString(path19); - const dir = path19.substring(rootPath.length); + const rootPath = this.getRootString(path18); + const dir = path18.substring(rootPath.length); const dirParts = dir.split(this.splitSep); const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts); return result; @@ -122174,8 +122174,8 @@ var require_commonjs23 = __commonJS({ /** * @internal */ - getRootString(path19) { - return node_path_1.win32.parse(path19).root; + getRootString(path18) { + return node_path_1.win32.parse(path18).root; } /** * @internal @@ -122222,8 +122222,8 @@ var require_commonjs23 = __commonJS({ /** * @internal */ - getRootString(path19) { - return path19.startsWith("/") ? "/" : ""; + getRootString(path18) { + return path18.startsWith("/") ? "/" : ""; } /** * @internal @@ -122313,11 +122313,11 @@ var require_commonjs23 = __commonJS({ /** * Get the depth of a provided path, string, or the cwd */ - depth(path19 = this.cwd) { - if (typeof path19 === "string") { - path19 = this.cwd.resolve(path19); + depth(path18 = this.cwd) { + if (typeof path18 === "string") { + path18 = this.cwd.resolve(path18); } - return path19.depth(); + return path18.depth(); } /** * Return the cache of child entries. Exposed so subclasses can create @@ -122804,9 +122804,9 @@ var require_commonjs23 = __commonJS({ process2(); return results; } - chdir(path19 = this.cwd) { + chdir(path18 = this.cwd) { const oldCwd = this.cwd; - this.cwd = typeof path19 === "string" ? this.cwd.resolve(path19) : path19; + this.cwd = typeof path18 === "string" ? this.cwd.resolve(path18) : path18; this.cwd[setAsCwd](oldCwd); } }; @@ -123194,8 +123194,8 @@ var require_processor = __commonJS({ } // match, absolute, ifdir entries() { - return [...this.store.entries()].map(([path19, n]) => [ - path19, + return [...this.store.entries()].map(([path18, n]) => [ + path18, !!(n & 2), !!(n & 1) ]); @@ -123413,9 +123413,9 @@ var require_walker = __commonJS({ signal; maxDepth; includeChildMatches; - constructor(patterns, path19, opts) { + constructor(patterns, path18, opts) { this.patterns = patterns; - this.path = path19; + this.path = path18; this.opts = opts; this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/"; this.includeChildMatches = opts.includeChildMatches !== false; @@ -123434,11 +123434,11 @@ var require_walker = __commonJS({ }); } } - #ignored(path19) { - return this.seen.has(path19) || !!this.#ignore?.ignored?.(path19); + #ignored(path18) { + return this.seen.has(path18) || !!this.#ignore?.ignored?.(path18); } - #childrenIgnored(path19) { - return !!this.#ignore?.childrenIgnored?.(path19); + #childrenIgnored(path18) { + return !!this.#ignore?.childrenIgnored?.(path18); } // backpressure mechanism pause() { @@ -123654,8 +123654,8 @@ var require_walker = __commonJS({ exports2.GlobUtil = GlobUtil; var GlobWalker = class extends GlobUtil { matches = /* @__PURE__ */ new Set(); - constructor(patterns, path19, opts) { - super(patterns, path19, opts); + constructor(patterns, path18, opts) { + super(patterns, path18, opts); } matchEmit(e) { this.matches.add(e); @@ -123693,8 +123693,8 @@ var require_walker = __commonJS({ exports2.GlobWalker = GlobWalker; var GlobStream = class extends GlobUtil { results; - constructor(patterns, path19, opts) { - super(patterns, path19, opts); + constructor(patterns, path18, opts) { + super(patterns, path18, opts); this.results = new minipass_1.Minipass({ signal: this.signal, objectMode: true @@ -124050,7 +124050,7 @@ var require_commonjs24 = __commonJS({ var require_file4 = __commonJS({ "node_modules/archiver-utils/file.js"(exports2, module2) { var fs20 = require_graceful_fs(); - var path19 = require("path"); + var path18 = require("path"); var flatten = require_flatten(); var difference = require_difference(); var union = require_union(); @@ -124075,7 +124075,7 @@ var require_file4 = __commonJS({ return result; }; file.exists = function() { - var filepath = path19.join.apply(path19, arguments); + var filepath = path18.join.apply(path18, arguments); return fs20.existsSync(filepath); }; file.expand = function(...args) { @@ -124089,7 +124089,7 @@ var require_file4 = __commonJS({ }); if (options.filter) { matches = matches.filter(function(filepath) { - filepath = path19.join(options.cwd || "", filepath); + filepath = path18.join(options.cwd || "", filepath); try { if (typeof options.filter === "function") { return options.filter(filepath); @@ -124106,7 +124106,7 @@ var require_file4 = __commonJS({ file.expandMapping = function(patterns, destBase, options) { options = Object.assign({ rename: function(destBase2, destPath) { - return path19.join(destBase2 || "", destPath); + return path18.join(destBase2 || "", destPath); } }, options); var files = []; @@ -124114,14 +124114,14 @@ var require_file4 = __commonJS({ file.expand(options, patterns).forEach(function(src) { var destPath = src; if (options.flatten) { - destPath = path19.basename(destPath); + destPath = path18.basename(destPath); } if (options.ext) { destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext); } var dest = options.rename(destBase, destPath, options); if (options.cwd) { - src = path19.join(options.cwd, src); + src = path18.join(options.cwd, src); } dest = dest.replace(pathSeparatorRe, "/"); src = src.replace(pathSeparatorRe, "/"); @@ -124203,7 +124203,7 @@ var require_file4 = __commonJS({ var require_archiver_utils = __commonJS({ "node_modules/archiver-utils/index.js"(exports2, module2) { var fs20 = require_graceful_fs(); - var path19 = require("path"); + var path18 = require("path"); var isStream = require_is_stream(); var lazystream = require_lazystream(); var normalizePath = require_normalize_path(); @@ -124291,11 +124291,11 @@ var require_archiver_utils = __commonJS({ if (!file) { return callback(null, results); } - filepath = path19.join(dirpath, file); + filepath = path18.join(dirpath, file); fs20.stat(filepath, function(err2, stats) { results.push({ path: filepath, - relative: path19.relative(base, filepath).replace(/\\/g, "/"), + relative: path18.relative(base, filepath).replace(/\\/g, "/"), stats }); if (stats && stats.isDirectory()) { @@ -124357,7 +124357,7 @@ var require_core2 = __commonJS({ var fs20 = require("fs"); var glob2 = require_readdir_glob(); var async = require_async(); - var path19 = require("path"); + var path18 = require("path"); var util = require_archiver_utils(); var inherits = require("util").inherits; var ArchiverError = require_error3(); @@ -124633,9 +124633,9 @@ var require_core2 = __commonJS({ task.source = Buffer.concat([]); } else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) { var linkPath = fs20.readlinkSync(task.filepath); - var dirName = path19.dirname(task.filepath); + var dirName = path18.dirname(task.filepath); task.data.type = "symlink"; - task.data.linkname = path19.relative(dirName, path19.resolve(dirName, linkPath)); + task.data.linkname = path18.relative(dirName, path18.resolve(dirName, linkPath)); task.data.sourceType = "buffer"; task.source = Buffer.concat([]); } else { @@ -129085,8 +129085,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 path19 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path19} does not exist${os_1.EOL}`); + const path18 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path18} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -129671,14 +129671,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 path19 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path18 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } - if (path19 && !path19.startsWith("/")) { - path19 = `/${path19}`; + if (path18 && !path18.startsWith("/")) { + path18 = `/${path18}`; } - url2 = new URL(origin + path19); + url2 = new URL(origin + path18); } return url2; } @@ -131292,20 +131292,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(path19) { - if (typeof path19 !== "string") { + module2.exports = function basename2(path18) { + if (typeof path18 !== "string") { return ""; } - for (var i = path19.length - 1; i >= 0; --i) { - switch (path19.charCodeAt(i)) { + for (var i = path18.length - 1; i >= 0; --i) { + switch (path18.charCodeAt(i)) { case 47: // '/' case 92: - path19 = path19.slice(i + 1); - return path19 === ".." || path19 === "." ? "" : path19; + path18 = path18.slice(i + 1); + return path18 === ".." || path18 === "." ? "" : path18; } } - return path19 === ".." || path19 === "." ? "" : path19; + return path18 === ".." || path18 === "." ? "" : path18; }; } }); @@ -134335,7 +134335,7 @@ var require_request5 = __commonJS({ } var Request = class _Request { constructor(origin, { - path: path19, + path: path18, method, body, headers, @@ -134349,11 +134349,11 @@ var require_request5 = __commonJS({ throwOnError, expectContinue }, handler2) { - if (typeof path19 !== "string") { + if (typeof path18 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path19[0] !== "/" && !(path19.startsWith("http://") || path19.startsWith("https://")) && method !== "CONNECT") { + } else if (path18[0] !== "/" && !(path18.startsWith("http://") || path18.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.exec(path19) !== null) { + } else if (invalidPathRegex.exec(path18) !== null) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -134416,7 +134416,7 @@ var require_request5 = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? util.buildURL(path19, query) : path19; + this.path = query ? util.buildURL(path18, query) : path18; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -135424,9 +135424,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 path19 = search ? `${pathname}${search}` : pathname; + const path18 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path19; + this.opts.path = path18; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -136666,7 +136666,7 @@ var require_client3 = __commonJS({ writeH2(client, client[kHTTP2Session], request2); return; } - const { body, method, path: path19, host, upgrade, headers, blocking, reset } = request2; + const { body, method, path: path18, host, upgrade, headers, blocking, reset } = request2; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { body.read(0); @@ -136716,7 +136716,7 @@ var require_client3 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path19} HTTP/1.1\r + let header = `${method} ${path18} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -136779,7 +136779,7 @@ upgrade: ${upgrade}\r return true; } function writeH2(client, session, request2) { - const { body, method, path: path19, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { body, method, path: path18, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; let headers; if (typeof reqHeaders === "string") headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()); else headers = reqHeaders; @@ -136822,7 +136822,7 @@ upgrade: ${upgrade}\r }); return true; } - headers[HTTP2_HEADER_PATH] = path19; + headers[HTTP2_HEADER_PATH] = path18; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -139062,20 +139062,20 @@ var require_mock_utils3 = __commonJS({ } return true; } - function safeUrl(path19) { - if (typeof path19 !== "string") { - return path19; + function safeUrl(path18) { + if (typeof path18 !== "string") { + return path18; } - const pathSegments = path19.split("?"); + const pathSegments = path18.split("?"); if (pathSegments.length !== 2) { - return path19; + return path18; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path19, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path19); + function matchKey(mockDispatch2, { path: path18, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path18); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -139093,7 +139093,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: path19 }) => matchValue(safeUrl(path19), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path18 }) => matchValue(safeUrl(path18), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -139130,9 +139130,9 @@ var require_mock_utils3 = __commonJS({ } } function buildKey(opts) { - const { path: path19, method, body, headers, query } = opts; + const { path: path18, method, body, headers, query } = opts; return { - path: path19, + path: path18, method, body, headers, @@ -139581,10 +139581,10 @@ var require_pending_interceptors_formatter3 = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path19, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path18, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path19, + Path: path18, "Status code": statusCode, Persistent: persist ? "\u2705" : "\u274C", Invocations: timesInvoked, @@ -144204,8 +144204,8 @@ var require_util29 = __commonJS({ } } } - function validateCookiePath(path19) { - for (const char of path19) { + function validateCookiePath(path18) { + for (const char of path18) { const code = char.charCodeAt(0); if (code < 33 || char === ";") { throw new Error("Invalid cookie path"); @@ -145885,11 +145885,11 @@ var require_undici3 = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path19 = opts.path; + let path18 = opts.path; if (!opts.path.startsWith("/")) { - path19 = `/${path19}`; + path18 = `/${path18}`; } - url2 = new URL(util.parseOrigin(url2).origin + path19); + url2 = new URL(util.parseOrigin(url2).origin + path18); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -150739,7 +150739,7 @@ var require_traverse = __commonJS({ })(this.value); }; function walk(root, cb, immutable) { - var path19 = []; + var path18 = []; var parents = []; var alive = true; return (function walker(node_) { @@ -150748,11 +150748,11 @@ var require_traverse = __commonJS({ var state = { node, node_, - path: [].concat(path19), + path: [].concat(path18), parent: parents.slice(-1)[0], - key: path19.slice(-1)[0], - isRoot: path19.length === 0, - level: path19.length, + key: path18.slice(-1)[0], + isRoot: path18.length === 0, + level: path18.length, circular: null, update: function(x) { if (!state.isRoot) { @@ -150807,7 +150807,7 @@ var require_traverse = __commonJS({ parents.push(state); var keys = Object.keys(state.node); keys.forEach(function(key, i2) { - path19.push(key); + path18.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)) { @@ -150816,7 +150816,7 @@ var require_traverse = __commonJS({ child.isLast = i2 == keys.length - 1; child.isFirst = i2 == 0; if (modifiers.post) modifiers.post.call(state, child); - path19.pop(); + path18.pop(); }); parents.pop(); } @@ -151837,11 +151837,11 @@ var require_unzip_stream = __commonJS({ return requiredLength; case states.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX: var isUtf8 = (this.parsedEntity.flags & 2048) !== 0; - var path19 = this._decodeString(chunk.slice(0, this.parsedEntity.fileNameLength), isUtf8); + var path18 = 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) { - path19 = extra.parsed.path; + path18 = extra.parsed.path; } this.parsedEntity.extra = extra.parsed; var isUnix = (this.parsedEntity.versionMadeBy & 65280) >> 8 === 3; @@ -151853,7 +151853,7 @@ var require_unzip_stream = __commonJS({ } if (this.options.debug) { const debugObj = Object.assign({}, this.parsedEntity, { - path: path19, + path: path18, flags: "0x" + this.parsedEntity.flags.toString(16), unixAttrs: unixAttrs && "0" + unixAttrs.toString(8), isSymlink, @@ -152290,7 +152290,7 @@ var require_parser_stream = __commonJS({ // node_modules/mkdirp/index.js var require_mkdirp = __commonJS({ "node_modules/mkdirp/index.js"(exports2, module2) { - var path19 = require("path"); + var path18 = require("path"); var fs20 = require("fs"); var _0777 = parseInt("0777", 8); module2.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; @@ -152310,7 +152310,7 @@ var require_mkdirp = __commonJS({ var cb = f || /* istanbul ignore next */ function() { }; - p = path19.resolve(p); + p = path18.resolve(p); xfs.mkdir(p, mode, function(er) { if (!er) { made = made || p; @@ -152318,8 +152318,8 @@ var require_mkdirp = __commonJS({ } switch (er.code) { case "ENOENT": - if (path19.dirname(p) === p) return cb(er); - mkdirP(path19.dirname(p), opts, function(er2, made2) { + if (path18.dirname(p) === p) return cb(er); + mkdirP(path18.dirname(p), opts, function(er2, made2) { if (er2) cb(er2, made2); else mkdirP(p, opts, cb, made2); }); @@ -152346,14 +152346,14 @@ var require_mkdirp = __commonJS({ mode = _0777; } if (!made) made = null; - p = path19.resolve(p); + p = path18.resolve(p); try { xfs.mkdirSync(p, mode); made = made || p; } catch (err0) { switch (err0.code) { case "ENOENT": - made = sync(path19.dirname(p), opts, made); + made = sync(path18.dirname(p), opts, made); sync(p, opts, made); break; // In the case of any other error, just see if there's a dir @@ -152379,7 +152379,7 @@ var require_mkdirp = __commonJS({ var require_extract2 = __commonJS({ "node_modules/unzip-stream/lib/extract.js"(exports2, module2) { var fs20 = require("fs"); - var path19 = require("path"); + var path18 = require("path"); var util = require("util"); var mkdirp = require_mkdirp(); var Transform = require("stream").Transform; @@ -152421,8 +152421,8 @@ var require_extract2 = __commonJS({ }; Extract.prototype._processEntry = function(entry) { var self2 = this; - var destPath = path19.join(this.opts.path, entry.path); - var directory = entry.isDirectory ? destPath : path19.dirname(destPath); + var destPath = path18.join(this.opts.path, entry.path); + var directory = entry.isDirectory ? destPath : path18.dirname(destPath); this.unfinishedEntries++; var writeFileFn = function() { var pipedStream = fs20.createWriteStream(destPath); @@ -152549,10 +152549,10 @@ var require_download_artifact = __commonJS({ parsed.search = ""; return parsed.toString(); }; - function exists(path19) { + function exists(path18) { return __awaiter2(this, void 0, void 0, function* () { try { - yield promises_1.default.access(path19); + yield promises_1.default.access(path18); return true; } catch (error3) { if (error3.code === "ENOENT") { @@ -152784,12 +152784,12 @@ var require_dist_node11 = __commonJS({ octokit.log.debug("request", options); const start = Date.now(); const requestOptions = octokit.request.endpoint.parse(options); - const path19 = requestOptions.url.replace(options.baseUrl, ""); + const path18 = requestOptions.url.replace(options.baseUrl, ""); return request2(options).then((response) => { - octokit.log.info(`${requestOptions.method} ${path19} - ${response.status} in ${Date.now() - start}ms`); + octokit.log.info(`${requestOptions.method} ${path18} - ${response.status} in ${Date.now() - start}ms`); return response; }).catch((error3) => { - octokit.log.info(`${requestOptions.method} ${path19} - ${error3.status} in ${Date.now() - start}ms`); + octokit.log.info(`${requestOptions.method} ${path18} - ${error3.status} in ${Date.now() - start}ms`); throw error3; }); }); @@ -154884,7 +154884,7 @@ var require_path_utils2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path19 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -154894,7 +154894,7 @@ var require_path_utils2 = __commonJS({ } exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path19.sep); + return pth.replace(/[/\\]/g, path18.sep); } exports2.toPlatformPath = toPlatformPath; } @@ -154958,7 +154958,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 fs20 = __importStar2(require("fs")); - var path19 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); _a = fs20.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; @@ -155007,7 +155007,7 @@ var require_io_util2 = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path19.extname(filePath).toUpperCase(); + const upperExt = path18.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -155031,11 +155031,11 @@ var require_io_util2 = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path19.dirname(filePath); - const upperName = path19.basename(filePath).toUpperCase(); + const directory = path18.dirname(filePath); + const upperName = path18.basename(filePath).toUpperCase(); for (const actualName of yield exports2.readdir(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path19.join(directory, actualName); + filePath = path18.join(directory, actualName); break; } } @@ -155130,7 +155130,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 path19 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var ioUtil = __importStar2(require_io_util2()); function cp(source, dest, options = {}) { return __awaiter2(this, void 0, void 0, function* () { @@ -155139,7 +155139,7 @@ var require_io2 = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path19.join(dest, path19.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path18.join(dest, path18.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -155151,7 +155151,7 @@ var require_io2 = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path19.relative(source, newDest) === "") { + if (path18.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile2(source, newDest, force); @@ -155164,7 +155164,7 @@ var require_io2 = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path19.join(dest, path19.basename(source)); + dest = path18.join(dest, path18.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -155175,7 +155175,7 @@ var require_io2 = __commonJS({ } } } - yield mkdirP(path19.dirname(dest)); + yield mkdirP(path18.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -155238,7 +155238,7 @@ var require_io2 = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path19.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path18.delimiter)) { if (extension) { extensions.push(extension); } @@ -155251,12 +155251,12 @@ var require_io2 = __commonJS({ } return []; } - if (tool.includes(path19.sep)) { + if (tool.includes(path18.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path19.delimiter)) { + for (const p of process.env.PATH.split(path18.delimiter)) { if (p) { directories.push(p); } @@ -155264,7 +155264,7 @@ var require_io2 = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path19.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path18.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -155380,7 +155380,7 @@ var require_toolrunner2 = __commonJS({ var os4 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path19 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var io7 = __importStar2(require_io2()); var ioUtil = __importStar2(require_io_util2()); var timers_1 = require("timers"); @@ -155595,7 +155595,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 = path19.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path18.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* () { @@ -156095,7 +156095,7 @@ var require_core3 = __commonJS({ var file_command_1 = require_file_command2(); var utils_1 = require_utils12(); var os4 = __importStar2(require("os")); - var path19 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils2(); var ExitCode; (function(ExitCode2) { @@ -156123,7 +156123,7 @@ var require_core3 = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path19.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path18.delimiter}${process.env["PATH"]}`; } exports2.addPath = addPath; function getInput2(name, options) { @@ -156299,13 +156299,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(path19) { - if (!path19) { - throw new Error(`Artifact path: ${path19}, is incorrectly provided`); + function checkArtifactFilePath(path18) { + if (!path18) { + throw new Error(`Artifact path: ${path18}, is incorrectly provided`); } for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) { - if (path19.includes(invalidCharacterKey)) { - throw new Error(`Artifact path is not valid: ${path19}. Contains the following character: ${errorMessageForCharacter} + if (path18.includes(invalidCharacterKey)) { + throw new Error(`Artifact path is not valid: ${path18}. Contains the following character: ${errorMessageForCharacter} Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()} @@ -156396,7 +156396,7 @@ var require_tmp = __commonJS({ "node_modules/tmp/lib/tmp.js"(exports2, module2) { var fs20 = require("fs"); var os4 = require("os"); - var path19 = require("path"); + var path18 = require("path"); var crypto2 = require("crypto"); var _c = { fs: fs20.constants, os: os4.constants }; var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; @@ -156603,35 +156603,35 @@ var require_tmp = __commonJS({ return [actualOptions, callback]; } function _resolvePath(name, tmpDir, cb) { - const pathToResolve = path19.isAbsolute(name) ? name : path19.join(tmpDir, name); + const pathToResolve = path18.isAbsolute(name) ? name : path18.join(tmpDir, name); fs20.stat(pathToResolve, function(err) { if (err) { - fs20.realpath(path19.dirname(pathToResolve), function(err2, parentDir) { + fs20.realpath(path18.dirname(pathToResolve), function(err2, parentDir) { if (err2) return cb(err2); - cb(null, path19.join(parentDir, path19.basename(pathToResolve))); + cb(null, path18.join(parentDir, path18.basename(pathToResolve))); }); } else { - fs20.realpath(path19, cb); + fs20.realpath(path18, cb); } }); } function _resolvePathSync(name, tmpDir) { - const pathToResolve = path19.isAbsolute(name) ? name : path19.join(tmpDir, name); + const pathToResolve = path18.isAbsolute(name) ? name : path18.join(tmpDir, name); try { fs20.statSync(pathToResolve); return fs20.realpathSync(pathToResolve); } catch (_err) { - const parentDir = fs20.realpathSync(path19.dirname(pathToResolve)); - return path19.join(parentDir, path19.basename(pathToResolve)); + const parentDir = fs20.realpathSync(path18.dirname(pathToResolve)); + return path18.join(parentDir, path18.basename(pathToResolve)); } } function _generateTmpName(opts) { const tmpDir = opts.tmpdir; if (!_isUndefined(opts.name)) { - return path19.join(tmpDir, opts.dir, opts.name); + return path18.join(tmpDir, opts.dir, opts.name); } if (!_isUndefined(opts.template)) { - return path19.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); + return path18.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); } const name = [ opts.prefix ? opts.prefix : "tmp", @@ -156641,13 +156641,13 @@ var require_tmp = __commonJS({ _randomChars(12), opts.postfix ? "-" + opts.postfix : "" ].join(""); - return path19.join(tmpDir, opts.dir, name); + return path18.join(tmpDir, opts.dir, name); } function _assertOptionsBase(options) { if (!_isUndefined(options.name)) { const name = options.name; - if (path19.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`); - const basename2 = path19.basename(name); + if (path18.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`); + const basename2 = path18.basename(name); if (basename2 === ".." || basename2 === "." || basename2 !== name) throw new Error(`name option must not contain a path, found "${name}".`); } @@ -156669,7 +156669,7 @@ var require_tmp = __commonJS({ if (_isUndefined(name)) return cb(null); _resolvePath(name, tmpDir, function(err, resolvedPath) { if (err) return cb(err); - const relativePath = path19.relative(tmpDir, resolvedPath); + const relativePath = path18.relative(tmpDir, resolvedPath); if (!resolvedPath.startsWith(tmpDir)) { return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`)); } @@ -156679,7 +156679,7 @@ var require_tmp = __commonJS({ function _getRelativePathSync(option, name, tmpDir) { if (_isUndefined(name)) return; const resolvedPath = _resolvePathSync(name, tmpDir); - const relativePath = path19.relative(tmpDir, resolvedPath); + const relativePath = path18.relative(tmpDir, resolvedPath); if (!resolvedPath.startsWith(tmpDir)) { throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`); } @@ -156759,14 +156759,14 @@ var require_tmp_promise = __commonJS({ var fileWithOptions = promisify( (options, cb) => tmp.file( options, - (err, path19, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path19, fd, cleanup: promisify(cleanup) }) + (err, path18, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path18, fd, cleanup: promisify(cleanup) }) ) ); module2.exports.file = async (options) => fileWithOptions(options); module2.exports.withFile = async function withFile(fn, options) { - const { path: path19, fd, cleanup } = await module2.exports.file(options); + const { path: path18, fd, cleanup } = await module2.exports.file(options); try { - return await fn({ path: path19, fd }); + return await fn({ path: path18, fd }); } finally { await cleanup(); } @@ -156775,14 +156775,14 @@ var require_tmp_promise = __commonJS({ var dirWithOptions = promisify( (options, cb) => tmp.dir( options, - (err, path19, cleanup) => err ? cb(err) : cb(void 0, { path: path19, cleanup: promisify(cleanup) }) + (err, path18, cleanup) => err ? cb(err) : cb(void 0, { path: path18, cleanup: promisify(cleanup) }) ) ); module2.exports.dir = async (options) => dirWithOptions(options); module2.exports.withDir = async function withDir(fn, options) { - const { path: path19, cleanup } = await module2.exports.dir(options); + const { path: path18, cleanup } = await module2.exports.dir(options); try { - return await fn({ path: path19 }); + return await fn({ path: path18 }); } finally { await cleanup(); } @@ -158490,21 +158490,21 @@ var require_download_specification = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadSpecification = void 0; - var path19 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); function getDownloadSpecification(artifactName, artifactEntries, downloadPath, includeRootDirectory) { const directories = /* @__PURE__ */ new Set(); const specifications = { - rootDownloadLocation: includeRootDirectory ? path19.join(downloadPath, artifactName) : downloadPath, + rootDownloadLocation: includeRootDirectory ? path18.join(downloadPath, artifactName) : downloadPath, directoryStructure: [], emptyFilesToCreate: [], filesToDownload: [] }; for (const entry of artifactEntries) { if (entry.path.startsWith(`${artifactName}/`) || entry.path.startsWith(`${artifactName}\\`)) { - const normalizedPathEntry = path19.normalize(entry.path); - const filePath = path19.join(downloadPath, includeRootDirectory ? normalizedPathEntry : normalizedPathEntry.replace(artifactName, "")); + const normalizedPathEntry = path18.normalize(entry.path); + const filePath = path18.join(downloadPath, includeRootDirectory ? normalizedPathEntry : normalizedPathEntry.replace(artifactName, "")); if (entry.itemType === "file") { - directories.add(path19.dirname(filePath)); + directories.add(path18.dirname(filePath)); if (entry.fileLength === 0) { specifications.emptyFilesToCreate.push(filePath); } else { @@ -158646,7 +158646,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz return uploadResponse; }); } - downloadArtifact(name, path19, options) { + downloadArtifact(name, path18, options) { return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const artifacts = yield downloadHttpClient.listArtifacts(); @@ -158660,12 +158660,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 (!path19) { - path19 = (0, config_variables_1.getWorkSpaceDirectory)(); + if (!path18) { + path18 = (0, config_variables_1.getWorkSpaceDirectory)(); } - path19 = (0, path_1.normalize)(path19); - path19 = (0, path_1.resolve)(path19); - const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path19, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); + path18 = (0, path_1.normalize)(path18); + path18 = (0, path_1.resolve)(path18); + const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path18, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); if (downloadSpecification.filesToDownload.length === 0) { core19.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`); } else { @@ -158680,7 +158680,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz }; }); } - downloadAllArtifacts(path19) { + downloadAllArtifacts(path18) { return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const response = []; @@ -158689,18 +158689,18 @@ Note: The size of downloaded zips can differ significantly from the reported siz core19.info("Unable to find any artifacts for the associated workflow"); return response; } - if (!path19) { - path19 = (0, config_variables_1.getWorkSpaceDirectory)(); + if (!path18) { + path18 = (0, config_variables_1.getWorkSpaceDirectory)(); } - path19 = (0, path_1.normalize)(path19); - path19 = (0, path_1.resolve)(path19); + path18 = (0, path_1.normalize)(path18); + path18 = (0, path_1.resolve)(path18); let downloadedArtifacts = 0; while (downloadedArtifacts < artifacts.count) { const currentArtifactToDownload = artifacts.value[downloadedArtifacts]; downloadedArtifacts += 1; core19.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, path19, true); + const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path18, true); if (downloadSpecification.filesToDownload.length === 0) { core19.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`); } else { @@ -164653,6 +164653,10 @@ function getTemporaryDirectory() { const value = process.env["CODEQL_ACTION_TEMP"]; return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } +var PR_DIFF_RANGE_JSON_FILENAME = "pr-diff-range.json"; +function getDiffRangesJsonFilePath() { + return path2.join(getTemporaryDirectory(), PR_DIFF_RANGE_JSON_FILENAME); +} function getActionVersion() { return "4.34.2"; } @@ -165117,7 +165121,7 @@ var core6 = __toESM(require_core()); // src/codeql.ts var fs11 = __toESM(require("fs")); -var path11 = __toESM(require("path")); +var path10 = __toESM(require("path")); var core11 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -165365,7 +165369,7 @@ function wrapCliConfigurationError(cliError) { // src/config-utils.ts var fs7 = __toESM(require("fs")); -var path8 = __toESM(require("path")); +var path7 = __toESM(require("path")); var core9 = __toESM(require_core()); // src/analyses.ts @@ -165541,7 +165545,6 @@ function writeDiagnostic(config, language, diagnostic) { // src/diff-informed-analysis-utils.ts var fs5 = __toESM(require("fs")); -var path6 = __toESM(require("path")); // src/feature-flags.ts var fs4 = __toESM(require("fs")); @@ -165694,8 +165697,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path19 = decodeGitFilePath(match[2]); - fileOidMap[path19] = oid; + const path18 = decodeGitFilePath(match[2]); + fileOidMap[path18] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -165835,13 +165838,16 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { return changes; } async function getDiffRangeFilePaths(sourceRoot, logger) { - const jsonFilePath = path4.join(getTemporaryDirectory(), "pr-diff-range.json"); - if (!fs3.existsSync(jsonFilePath)) { + const jsonFilePath = getDiffRangesJsonFilePath(); + let contents; + try { + contents = await fs3.promises.readFile(jsonFilePath, "utf8"); + } catch { return []; } let diffRanges; try { - diffRanges = JSON.parse(fs3.readFileSync(jsonFilePath, "utf8")); + diffRanges = JSON.parse(contents); } catch (e) { logger.warning( `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` @@ -165851,30 +165857,17 @@ async function getDiffRangeFilePaths(sourceRoot, logger) { logger.debug( `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.` ); - const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === void 0) { logger.warning( "Cannot determine git root; returning diff range paths as-is." ); - return repoRelativePaths; - } - const sourceRootRelPrefix = path4.relative(repoRoot, sourceRoot).replaceAll(path4.sep, "/"); - if (sourceRootRelPrefix === "") { - return repoRelativePaths; - } - const prefixWithSlash = `${sourceRootRelPrefix}/`; - const result = []; - for (const p of repoRelativePaths) { - if (p.startsWith(prefixWithSlash)) { - result.push(p.slice(prefixWithSlash.length)); - } else { - logger.debug( - `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").` - ); - } + return [...new Set(diffRanges.map((r) => r.path))]; } - return result; + const relativePaths = diffRanges.map( + (r) => path4.relative(sourceRoot, path4.join(repoRoot, r.path)).replaceAll(path4.sep, "/") + ).filter((rel) => !rel.startsWith("..")); + return [...new Set(relativePaths)]; } // src/tools-features.ts @@ -166430,9 +166423,6 @@ function initFeatures(gitHubVersion, repositoryNwo, tempDir, logger) { } // src/diff-informed-analysis-utils.ts -function getDiffRangesJsonFilePath() { - return path6.join(getTemporaryDirectory(), "pr-diff-range.json"); -} function readDiffRangesJsonFile(logger) { const jsonFilePath = getDiffRangesJsonFilePath(); if (!fs5.existsSync(jsonFilePath)) { @@ -166456,12 +166446,12 @@ ${jsonContents}` // src/overlay/status.ts var fs6 = __toESM(require("fs")); -var path7 = __toESM(require("path")); +var path6 = __toESM(require("path")); var actionsCache2 = __toESM(require_cache5()); var MAX_CACHE_OPERATION_MS = 3e4; var STATUS_FILE_NAME = "overlay-status.json"; function getStatusFilePath(languages) { - return path7.join( + return path6.join( getTemporaryDirectory(), "overlay-status", [...languages].sort().join("+"), @@ -166484,7 +166474,7 @@ async function saveOverlayStatus(codeql, languages, diskUsage, status, logger) { const cacheKey = await getCacheKey(codeql, languages, diskUsage); const statusFile = getStatusFilePath(languages); try { - await fs6.promises.mkdir(path7.dirname(statusFile), { recursive: true }); + await fs6.promises.mkdir(path6.dirname(statusFile), { recursive: true }); await fs6.promises.writeFile(statusFile, JSON.stringify(status)); const cacheId = await waitForResultWithTimeLimit( MAX_CACHE_OPERATION_MS, @@ -166538,7 +166528,7 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = { ruby: "overlay_analysis_code_scanning_ruby" /* OverlayAnalysisCodeScanningRuby */ }; function getPathToParsedConfigFile(tempDir) { - return path8.join(tempDir, "config"); + return path7.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); @@ -166588,7 +166578,7 @@ function isRiskAssessmentEnabled(config) { // src/setup-codeql.ts var fs10 = __toESM(require("fs")); -var path10 = __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()); @@ -166808,7 +166798,7 @@ function inferCompressionMethod(tarPath) { // src/tools-download.ts var fs9 = __toESM(require("fs")); var os = __toESM(require("os")); -var path9 = __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()); @@ -166941,7 +166931,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path9.join( + return path8.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver7.clean(version) || version, @@ -167085,7 +167075,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs10.existsSync(path10.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs10.existsSync(path9.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -167484,7 +167474,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path10.join(tempDir, v4_default()); + return path9.join(tempDir, v4_default()); } async function getNightlyToolsUrl(logger) { const zstdAvailability = await isZstdAvailable(logger); @@ -167571,7 +167561,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path11.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") { @@ -167633,7 +167623,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path11.join( + const tracingConfigPath = path10.join( extractorPath, "tools", "tracing-config.lua" @@ -167715,7 +167705,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path11.join( + const autobuildCmd = path10.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -168137,7 +168127,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path11.resolve(config.tempDir, "user-config.yaml"); + return path10.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -168159,7 +168149,7 @@ async function getJobRunUuidSarifOptions(codeql) { // src/debug-artifacts.ts var fs14 = __toESM(require("fs")); -var path14 = __toESM(require("path")); +var path13 = __toESM(require("path")); var artifact = __toESM(require_artifact2()); var artifactLegacy = __toESM(require_artifact_client2()); var core13 = __toESM(require_core()); @@ -168167,7 +168157,7 @@ var import_archiver = __toESM(require_archiver()); // src/analyze.ts var fs12 = __toESM(require("fs")); -var path12 = __toESM(require("path")); +var path11 = __toESM(require("path")); var io5 = __toESM(require_io()); // src/autobuild.ts @@ -168198,7 +168188,7 @@ function dbIsFinalized(config, language, logger) { const dbPath = getCodeQLDatabasePath(config, language); try { const dbInfo = load( - fs12.readFileSync(path12.resolve(dbPath, "codeql-database.yml"), "utf8") + fs12.readFileSync(path11.resolve(dbPath, "codeql-database.yml"), "utf8") ); return !("inProgress" in dbInfo); } catch { @@ -168212,7 +168202,7 @@ function dbIsFinalized(config, language, logger) { // src/artifact-scanner.ts var fs13 = __toESM(require("fs")); var os2 = __toESM(require("os")); -var path13 = __toESM(require("path")); +var path12 = __toESM(require("path")); var exec = __toESM(require_exec()); var GITHUB_PAT_CLASSIC_PATTERN = { type: "Personal Access Token (Classic)" /* PersonalAccessClassic */, @@ -168280,9 +168270,9 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log }; try { const tempExtractDir = fs13.mkdtempSync( - path13.join(extractDir, `extract-${depth}-`) + path12.join(extractDir, `extract-${depth}-`) ); - const fileName = path13.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], { @@ -168299,18 +168289,18 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log ); } else if (fileName.endsWith(".zst")) { logger.debug(`Extracting zst file: ${archivePath}`); - const outputFile = path13.join( + const outputFile = path12.join( tempExtractDir, - path13.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 = path13.join( + const outputFile = path12.join( tempExtractDir, - path13.basename(archivePath, ".gz") + path12.basename(archivePath, ".gz") ); await exec.exec("gunzip", ["-c", archivePath], { outStream: fs13.createWriteStream(outputFile), @@ -168347,7 +168337,7 @@ async function scanFile(fullPath, relativePath, extractDir, logger, depth = 0) { scannedFiles: 1, findings: [] }; - const fileName = path13.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( @@ -168371,8 +168361,8 @@ async function scanDirectory(dirPath, baseRelativePath, logger, depth = 0) { }; const entries = fs13.readdirSync(dirPath, { withFileTypes: true }); for (const entry of entries) { - const fullPath = path13.join(dirPath, entry.name); - const relativePath = path13.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, @@ -168386,7 +168376,7 @@ async function scanDirectory(dirPath, baseRelativePath, logger, depth = 0) { const fileResult = await scanFile( fullPath, relativePath, - path13.dirname(fullPath), + path12.dirname(fullPath), logger, depth ); @@ -168404,11 +168394,11 @@ async function scanArtifactsForTokens(filesToScan, logger) { scannedFiles: 0, findings: [] }; - const tempScanDir = fs13.mkdtempSync(path13.join(os2.tmpdir(), "artifact-scan-")); + const tempScanDir = fs13.mkdtempSync(path12.join(os2.tmpdir(), "artifact-scan-")); try { for (const filePath of filesToScan) { const stats = fs13.statSync(filePath); - const fileName = path13.basename(filePath); + const fileName = path12.basename(filePath); if (stats.isDirectory()) { const dirResult = await scanDirectory(filePath, fileName, logger); result.scannedFiles += dirResult.scannedFiles; @@ -168462,12 +168452,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 && fs14.existsSync(analyzeActionOutputDir) && fs14.lstatSync(analyzeActionOutputDir).isDirectory()) { - const sarifFile = path14.resolve( + const sarifFile = path13.resolve( analyzeActionOutputDir, `${language}.sarif` ); if (fs14.existsSync(sarifFile)) { - const sarifInDbLocation = path14.resolve( + const sarifInDbLocation = path13.resolve( config.dbLocation, `${language}.sarif` ); @@ -168522,13 +168512,13 @@ async function tryUploadAllAvailableDebugArtifacts(codeql, config, logger, codeQ } logger.info("Preparing database logs debug artifact..."); const databaseDirectory = getCodeQLDatabasePath(config, language); - const logsDirectory = path14.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 = path14.resolve( + const multiLanguageTracingLogsDirectory = path13.resolve( config.dbLocation, "log" ); @@ -168615,8 +168605,8 @@ async function uploadArtifacts(logger, toUpload, rootDir, artifactName, ghVarian try { await artifactUploader.uploadArtifact( sanitizeArtifactName(`${artifactName}${suffix}`), - toUpload.map((file) => path14.normalize(file)), - path14.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 @@ -168643,7 +168633,7 @@ async function getArtifactUploaderClient(logger, ghVariant) { } async function createPartialDatabaseBundle(config, language) { const databasePath = getCodeQLDatabasePath(config, language); - const databaseBundlePath = path14.resolve( + const databaseBundlePath = path13.resolve( config.dbLocation, `${config.debugDatabaseName}-${language}-partial.zip` ); @@ -168686,7 +168676,7 @@ var github3 = __toESM(require_github()); // src/upload-lib.ts var fs17 = __toESM(require("fs")); -var path16 = __toESM(require("path")); +var path15 = __toESM(require("path")); var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core15 = __toESM(require_core()); @@ -169996,10 +169986,10 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo ); codeQL = initCodeQLResult.codeql; } - const baseTempDir = path16.resolve(tempDir, "combined-sarif"); + const baseTempDir = path15.resolve(tempDir, "combined-sarif"); fs17.mkdirSync(baseTempDir, { recursive: true }); - const outputDirectory = fs17.mkdtempSync(path16.resolve(baseTempDir, "output-")); - const outputFile = path16.resolve(outputDirectory, "combined-sarif.sarif"); + const outputDirectory = fs17.mkdtempSync(path15.resolve(baseTempDir, "output-")); + const outputFile = path15.resolve(outputDirectory, "combined-sarif.sarif"); await codeQL.mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory: true }); @@ -170032,7 +170022,7 @@ function getAutomationID2(category, analysis_key, environment) { async function uploadPayload(payload, repositoryNwo, logger, analysis) { logger.info("Uploading results"); if (shouldSkipSarifUpload()) { - const payloadSaveFile = path16.join( + const payloadSaveFile = path15.join( getTemporaryDirectory(), `payload-${analysis.kind}.json` ); @@ -170077,9 +170067,9 @@ function findSarifFilesInDir(sarifPath, isSarif) { const entries = fs17.readdirSync(dir, { withFileTypes: true }); for (const entry of entries) { if (entry.isFile() && isSarif(entry.name)) { - sarifFiles.push(path16.resolve(dir, entry.name)); + sarifFiles.push(path15.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - walkSarifFiles(path16.resolve(dir, entry.name)); + walkSarifFiles(path15.resolve(dir, entry.name)); } } }; @@ -170461,7 +170451,7 @@ function filterAlertsByDiffRange(logger, sarifLog) { // src/workflow.ts var fs18 = __toESM(require("fs")); -var path17 = __toESM(require("path")); +var path16 = __toESM(require("path")); var import_zlib2 = __toESM(require("zlib")); var core16 = __toESM(require_core()); function toCodedErrors(errors) { @@ -170493,7 +170483,7 @@ async function getWorkflow(logger) { } async function getWorkflowAbsolutePath(logger) { const relativePath = await getWorkflowRelativePath(); - const absolutePath = path17.join( + const absolutePath = path16.join( getRequiredEnvParam("GITHUB_WORKSPACE"), relativePath ); diff --git a/lib/init-action.js b/lib/init-action.js index 8ebb9ac658..76ef8f9f68 100644 --- a/lib/init-action.js +++ b/lib/init-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 path18 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path17 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path18 && path18[0] !== "/") { - path18 = `/${path18}`; + if (path17 && path17[0] !== "/") { + path17 = `/${path17}`; } - return new URL(`${origin}${path18}`); + return new URL(`${origin}${path17}`); } 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: path18, origin } + request: { method, path: path17, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path18); + debuglog("sending request to %s %s/%s", method, origin, path17); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path18, origin }, + request: { method, path: path17, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path18, + path17, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path18, origin } + request: { method, path: path17, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path18); + debuglog("trailers received from %s %s/%s", method, origin, path17); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path18, origin }, + request: { method, path: path17, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path18, + path17, error3.message ); }); @@ -1876,9 +1876,9 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path18, origin } + request: { method, path: path17, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path18); + 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: path18, + path: path17, method, body, headers, @@ -1956,11 +1956,11 @@ var require_request = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path18 !== "string") { + if (typeof path17 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path18[0] !== "/" && !(path18.startsWith("http://") || path18.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(path18)) { + } 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(path18, query) : path18; + 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: path18, 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} ${path18} 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: path18, 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] = path18; + 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 path18 = 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 = path18; + 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: path18 = "/", + path: path17 = "/", headers = {} } = opts; - opts.path = origin + path18; + 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(path18) { - if (typeof path18 !== "string") { - return path18; + function safeUrl(path17) { + if (typeof path17 !== "string") { + return path17; } - const pathSegments = path18.split("?"); + const pathSegments = path17.split("?"); if (pathSegments.length !== 2) { - return path18; + return path17; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path18, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path18); + 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: path18 }) => matchValue(safeUrl(path18), 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: path18, method, body, headers, query } = opts; + const { path: path17, method, body, headers, query } = opts; return { - path: path18, + path: path17, method, body, headers, @@ -11246,10 +11246,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path18, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path17, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path18, + Path: path17, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -16130,9 +16130,9 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path18) { - for (let i = 0; i < path18.length; ++i) { - const code = path18.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 path18 = opts.path; + let path17 = opts.path; if (!opts.path.startsWith("/")) { - path18 = `/${path18}`; + path17 = `/${path17}`; } - url = new URL(util.parseOrigin(url).origin + path18); + url = new URL(util.parseOrigin(url).origin + path17); } 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 path18 = __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, path18.sep); + return pth.replace(/[/\\]/g, path17.sep); } } }); @@ -20124,7 +20124,7 @@ var require_io_util = __commonJS({ exports2.tryGetExecutablePath = tryGetExecutablePath; exports2.getCmdPath = getCmdPath; var fs17 = __importStar2(require("fs")); - var path18 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; function readlink(fsPath) { @@ -20179,7 +20179,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path18.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 = path18.dirname(filePath); - const upperName = path18.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 = path18.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 path18 = __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 ? path18.join(dest, path18.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 (path18.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 = path18.join(dest, path18.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(path18.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(path18.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(path18.sep)) { + if (tool.includes(path17.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path18.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(path18.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 os6 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path18 = __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 = path18.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((resolve9, 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 os6 = __importStar2(require("os")); - var path18 = __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}${path18.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 path18 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path18} 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 = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; - let path18 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path17 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path18 && path18[0] !== "/") { - path18 = `/${path18}`; + if (path17 && path17[0] !== "/") { + path17 = `/${path17}`; } - return new URL(`${origin}${path18}`); + return new URL(`${origin}${path17}`); } 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: path18, origin } + request: { method, path: path17, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path18); + debuglog("sending request to %s %s/%s", method, origin, path17); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path18, origin }, + request: { method, path: path17, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path18, + path17, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path18, origin } + request: { method, path: path17, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path18); + debuglog("trailers received from %s %s/%s", method, origin, path17); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path18, origin }, + request: { method, path: path17, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path18, + path17, error3.message ); }); @@ -22874,9 +22874,9 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path18, origin } + request: { method, path: path17, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path18); + 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: path18, + path: path17, method, body, headers, @@ -22954,11 +22954,11 @@ var require_request3 = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path18 !== "string") { + if (typeof path17 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path18[0] !== "/" && !(path18.startsWith("http://") || path18.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(path18)) { + } 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(path18, query) : path18; + 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: path18, 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} ${path18} 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: path18, 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] = path18; + 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 path18 = 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 = path18; + 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: path18 = "/", + path: path17 = "/", headers = {} } = opts; - opts.path = origin + path18; + 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(path18) { - if (typeof path18 !== "string") { - return path18; + function safeUrl(path17) { + if (typeof path17 !== "string") { + return path17; } - const pathSegments = path18.split("?"); + const pathSegments = path17.split("?"); if (pathSegments.length !== 2) { - return path18; + return path17; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path18, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path18); + 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: path18 }) => matchValue(safeUrl(path18), 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: path18, method, body, headers, query } = opts; + const { path: path17, method, body, headers, query } = opts; return { - path: path18, + path: path17, method, body, headers, @@ -32244,10 +32244,10 @@ var require_pending_interceptors_formatter2 = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path18, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path17, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path18, + Path: path17, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -37128,9 +37128,9 @@ var require_util14 = __commonJS({ } } } - function validateCookiePath(path18) { - for (let i = 0; i < path18.length; ++i) { - const code = path18.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 path18 = opts.path; + let path17 = opts.path; if (!opts.path.startsWith("/")) { - path18 = `/${path18}`; + path17 = `/${path17}`; } - url = new URL(util.parseOrigin(url).origin + path18); + url = new URL(util.parseOrigin(url).origin + path17); } else { if (!opts) { opts = typeof url === "object" ? url : {}; @@ -47305,14 +47305,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, path18, name, argument) { - if (Array.isArray(path18)) { - this.path = path18; - this.property = path18.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 (path18 !== void 0) { - this.property = path18; + } else if (path17 !== void 0) { + this.property = path17; } if (message) { this.message = message; @@ -47403,16 +47403,16 @@ var require_helpers = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path18, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path17, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path18)) { - this.path = path18; - this.propertyPath = path18.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 = path18; + this.propertyPath = path17; } this.base = base; this.schemas = schemas; @@ -47421,10 +47421,10 @@ var require_helpers = __commonJS({ return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path18 = 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, path18, 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; } @@ -48878,7 +48878,7 @@ var require_internal_path_helper = __commonJS({ exports2.hasRoot = hasRoot; exports2.normalizeSeparators = normalizeSeparators; exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - var path18 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname4(p) { @@ -48886,7 +48886,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path18.dirname(p); + let result = path17.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -48923,7 +48923,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 += path18.sep; + root += path17.sep; } return root + itemPath; } @@ -48957,10 +48957,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path18.sep)) { + if (!p.endsWith(path17.sep)) { return p; } - if (p === path18.sep) { + if (p === path17.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -49305,7 +49305,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path18 = (function() { + var path17 = (function() { try { return require("path"); } catch (e) { @@ -49313,7 +49313,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path18.sep; + minimatch.sep = path17.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand2 = require_brace_expansion(); var plTypes = { @@ -49402,8 +49402,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path18.sep !== "/") { - pattern = pattern.split(path18.sep).join("/"); + if (!options.allowWindowsEscape && path17.sep !== "/") { + pattern = pattern.split(path17.sep).join("/"); } this.options = options; this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200; @@ -49774,8 +49774,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path18.sep !== "/") { - f = f.split(path18.sep).join("/"); + if (path17.sep !== "/") { + f = f.split(path17.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -50018,7 +50018,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path18 = __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"; @@ -50033,12 +50033,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(path18.sep); + this.segments = itemPath.split(path17.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path18.basename(remaining); + const basename = path17.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -50056,7 +50056,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(path18.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); } } @@ -50067,12 +50067,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path18.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 += path18.sep; + result += path17.sep; } result += this.segments[i]; } @@ -50130,7 +50130,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os6 = __importStar2(require("os")); - var path18 = __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(); @@ -50159,7 +50159,7 @@ var require_internal_pattern = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir2); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path18.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 === "")); @@ -50183,8 +50183,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path18.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path18.sep}`; + if (!itemPath.endsWith(path17.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path17.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -50219,9 +50219,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(`.${path18.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path17.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path18.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path17.sep}`)) { homedir2 = homedir2 || os6.homedir(); (0, assert_1.default)(homedir2, "Unable to determine HOME directory"); (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`); @@ -50305,8 +50305,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path18, level) { - this.path = path18; + constructor(path17, level) { + this.path = path17; this.level = level; } }; @@ -50450,7 +50450,7 @@ var require_internal_globber = __commonJS({ var core16 = __importStar2(require_core()); var fs17 = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); - var path18 = __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(); @@ -50526,7 +50526,7 @@ var require_internal_globber = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path18.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path17.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -50536,7 +50536,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await2(fs17.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path18.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs17.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); @@ -50698,7 +50698,7 @@ var require_internal_hash_files = __commonJS({ var fs17 = __importStar2(require("fs")); var stream2 = __importStar2(require("stream")); var util = __importStar2(require("util")); - var path18 = __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; @@ -50714,7 +50714,7 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path18.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path17.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } @@ -52100,7 +52100,7 @@ var require_cacheUtils = __commonJS({ var io7 = __importStar2(require_io()); var crypto3 = __importStar2(require("crypto")); var fs17 = __importStar2(require("fs")); - var path18 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var semver10 = __importStar2(require_semver3()); var util = __importStar2(require("util")); var constants_1 = require_constants12(); @@ -52120,9 +52120,9 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path18.join(baseLocation, "actions", "temp"); + tempDirectory = path17.join(baseLocation, "actions", "temp"); } - const dest = path18.join(tempDirectory, crypto3.randomUUID()); + const dest = path17.join(tempDirectory, crypto3.randomUUID()); yield io7.mkdirP(dest); return dest; }); @@ -52144,7 +52144,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path18.relative(workspace, file).replace(new RegExp(`\\${path18.sep}`, "g"), "/"); + const relativeFile = path17.relative(workspace, file).replace(new RegExp(`\\${path17.sep}`, "g"), "/"); core16.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -52671,13 +52671,13 @@ function __disposeResources(env) { } return next(); } -function __rewriteRelativeImportExtension(path18, preserveJsx) { - if (typeof path18 === "string" && /^\.\.?\//.test(path18)) { - return path18.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 path18; + return path17; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -57091,8 +57091,8 @@ var require_getClient = __commonJS({ } const { allowInsecureConnection, httpClient } = clientOptions; const endpointUrl = clientOptions.endpoint ?? endpoint2; - const client = (path18, ...args) => { - const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path18, 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); @@ -60963,15 +60963,15 @@ var require_urlHelpers2 = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path18 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path18.startsWith("/")) { - path18 = path18.substring(1); + let path17 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path17.startsWith("/")) { + path17 = path17.substring(1); } - if (isAbsoluteUrl(path18)) { - requestUrl = path18; + if (isAbsoluteUrl(path17)) { + requestUrl = path17; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path18); + requestUrl = appendPath(requestUrl, path17); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -61017,9 +61017,9 @@ var require_urlHelpers2 = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path18 = pathToAppend.substring(0, searchStart); + const path17 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path18; + newPath = newPath + path17; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -63696,10 +63696,10 @@ var require_utils_common = __commonJS({ var constants_js_1 = require_constants15(); function escapeURLPath(url) { const urlParsed = new URL(url); - let path18 = urlParsed.pathname; - path18 = path18 || "/"; - path18 = escape(path18); - urlParsed.pathname = path18; + let path17 = urlParsed.pathname; + path17 = path17 || "/"; + path17 = escape(path17); + urlParsed.pathname = path17; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -63784,9 +63784,9 @@ var require_utils_common = __commonJS({ } function appendToURLPath(url, name) { const urlParsed = new URL(url); - let path18 = urlParsed.pathname; - path18 = path18 ? path18.endsWith("/") ? `${path18}${name}` : `${path18}/${name}` : name; - urlParsed.pathname = path18; + let path17 = urlParsed.pathname; + path17 = path17 ? path17.endsWith("/") ? `${path17}${name}` : `${path17}/${name}` : name; + urlParsed.pathname = path17; return urlParsed.toString(); } function setURLParameter(url, name, value) { @@ -65013,9 +65013,9 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path18 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path18}`; + canonicalizedResourceString += `/${this.factory.accountName}${path17}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -65754,10 +65754,10 @@ var require_utils_common2 = __commonJS({ var constants_js_1 = require_constants16(); function escapeURLPath(url) { const urlParsed = new URL(url); - let path18 = urlParsed.pathname; - path18 = path18 || "/"; - path18 = escape(path18); - urlParsed.pathname = path18; + let path17 = urlParsed.pathname; + path17 = path17 || "/"; + path17 = escape(path17); + urlParsed.pathname = path17; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -65842,9 +65842,9 @@ var require_utils_common2 = __commonJS({ } function appendToURLPath(url, name) { const urlParsed = new URL(url); - let path18 = urlParsed.pathname; - path18 = path18 ? path18.endsWith("/") ? `${path18}${name}` : `${path18}/${name}` : name; - urlParsed.pathname = path18; + let path17 = urlParsed.pathname; + path17 = path17 ? path17.endsWith("/") ? `${path17}${name}` : `${path17}/${name}` : name; + urlParsed.pathname = path17; return urlParsed.toString(); } function setURLParameter(url, name, value) { @@ -66765,9 +66765,9 @@ var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path18 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path18}`; + canonicalizedResourceString += `/${this.factory.accountName}${path17}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67397,9 +67397,9 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path18 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path18}`; + canonicalizedResourceString += `/${options.accountName}${path17}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67744,9 +67744,9 @@ var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path18 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path18}`; + canonicalizedResourceString += `/${options.accountName}${path17}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -89401,8 +89401,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 path18 = (0, utils_common_js_1.getURLPath)(subRequest.url); - if (!path18 || path18 === "") { + const path17 = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path17 || path17 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -89480,8 +89480,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 path18 = (0, utils_common_js_1.getURLPath)(url); - if (path18 && path18 !== "/") { + const path17 = (0, utils_common_js_1.getURLPath)(url); + if (path17 && path17 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -98790,7 +98790,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io7 = __importStar2(require_io()); var fs_1 = require("fs"); - var path18 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants12(); var IS_WINDOWS = process.platform === "win32"; @@ -98836,13 +98836,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(`\\${path18.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path18.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(`\\${path18.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path18.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(`\\${path18.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) { @@ -98888,7 +98888,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path18.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path17.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -98897,7 +98897,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path18.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path17.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -98912,7 +98912,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -98921,7 +98921,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -98959,7 +98959,7 @@ var require_tar = __commonJS({ } function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path18.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); }); @@ -99041,7 +99041,7 @@ var require_cache5 = __commonJS({ exports2.restoreCache = restoreCache5; exports2.saveCache = saveCache5; var core16 = __importStar2(require_core()); - var path18 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); @@ -99136,7 +99136,7 @@ var require_cache5 = __commonJS({ core16.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path18.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path17.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core16.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core16.isDebug()) { @@ -99205,7 +99205,7 @@ var require_cache5 = __commonJS({ core16.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path18.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path17.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core16.debug(`Archive path: ${archivePath}`); core16.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -99267,7 +99267,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 = path18.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path17.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core16.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99331,7 +99331,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 = path18.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path17.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core16.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99758,7 +99758,7 @@ var require_tool_cache = __commonJS({ var fs17 = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os6 = __importStar2(require("os")); - var path18 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver10 = __importStar2(require_semver2()); var stream2 = __importStar2(require("stream")); @@ -99779,8 +99779,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 || path18.join(_getTempDirectory(), crypto3.randomUUID()); - yield io7.mkdirP(path18.dirname(dest)); + dest = dest || path17.join(_getTempDirectory(), crypto3.randomUUID()); + yield io7.mkdirP(path17.dirname(dest)); core16.debug(`Downloading ${url}`); core16.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -99870,7 +99870,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path18.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}'`; @@ -100042,7 +100042,7 @@ var require_tool_cache = __commonJS({ } const destPath = yield _createToolPath(tool, version, arch2); for (const itemName of fs17.readdirSync(sourceDir)) { - const s = path18.join(sourceDir, itemName); + const s = path17.join(sourceDir, itemName); yield io7.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -100059,7 +100059,7 @@ var require_tool_cache = __commonJS({ throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path18.join(destFolder, targetFile); + const destPath = path17.join(destFolder, targetFile); core16.debug(`destination file ${destPath}`); yield io7.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -100082,7 +100082,7 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver10.clean(versionSpec) || ""; - const cachePath = path18.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path17.join(_getCacheDirectory(), toolName, versionSpec, arch2); core16.debug(`checking cache: ${cachePath}`); if (fs17.existsSync(cachePath) && fs17.existsSync(`${cachePath}.complete`)) { core16.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); @@ -100096,12 +100096,12 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os6.arch(); - const toolPath = path18.join(_getCacheDirectory(), toolName); + const toolPath = path17.join(_getCacheDirectory(), toolName); if (fs17.existsSync(toolPath)) { const children = fs17.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path18.join(toolPath, child, arch2 || ""); + const fullPath = path17.join(toolPath, child, arch2 || ""); if (fs17.existsSync(fullPath) && fs17.existsSync(`${fullPath}.complete`)) { versions.push(child); } @@ -100153,7 +100153,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path18.join(_getTempDirectory(), crypto3.randomUUID()); + dest = path17.join(_getTempDirectory(), crypto3.randomUUID()); } yield io7.mkdirP(dest); return dest; @@ -100161,7 +100161,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter2(this, void 0, void 0, function* () { - const folderPath = path18.join(_getCacheDirectory(), tool, semver10.clean(version) || version, arch2 || ""); + const folderPath = path17.join(_getCacheDirectory(), tool, semver10.clean(version) || version, arch2 || ""); core16.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io7.rmRF(folderPath); @@ -100171,7 +100171,7 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path18.join(_getCacheDirectory(), tool, semver10.clean(version) || version, arch2 || ""); + const folderPath = path17.join(_getCacheDirectory(), tool, semver10.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; fs17.writeFileSync(markerPath, ""); core16.debug("finished caching tool"); @@ -100785,7 +100785,7 @@ __export(init_action_exports, { }); module.exports = __toCommonJS(init_action_exports); var fs16 = __toESM(require("fs")); -var path17 = __toESM(require("path")); +var path16 = __toESM(require("path")); var core15 = __toESM(require_core()); var github3 = __toESM(require_github()); var io6 = __toESM(require_io()); @@ -104081,6 +104081,10 @@ function getTemporaryDirectory() { const value = process.env["CODEQL_ACTION_TEMP"]; return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } +var PR_DIFF_RANGE_JSON_FILENAME = "pr-diff-range.json"; +function getDiffRangesJsonFilePath() { + return path2.join(getTemporaryDirectory(), PR_DIFF_RANGE_JSON_FILENAME); +} function getActionVersion() { return "4.34.2"; } @@ -104642,7 +104646,7 @@ function getDependencyCachingEnabled() { // src/config-utils.ts var fs8 = __toESM(require("fs")); -var path10 = __toESM(require("path")); +var path9 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core9 = __toESM(require_core()); @@ -105178,7 +105182,6 @@ function makeTelemetryDiagnostic(id, name, attributes) { // src/diff-informed-analysis-utils.ts var fs5 = __toESM(require("fs")); -var path7 = __toESM(require("path")); // src/feature-flags.ts var fs4 = __toESM(require("fs")); @@ -105320,8 +105323,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path18 = decodeGitFilePath(match[2]); - fileOidMap[path18] = oid; + const path17 = decodeGitFilePath(match[2]); + fileOidMap[path17] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -105487,13 +105490,16 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { return changes; } async function getDiffRangeFilePaths(sourceRoot, logger) { - const jsonFilePath = path5.join(getTemporaryDirectory(), "pr-diff-range.json"); - if (!fs3.existsSync(jsonFilePath)) { + const jsonFilePath = getDiffRangesJsonFilePath(); + let contents; + try { + contents = await fs3.promises.readFile(jsonFilePath, "utf8"); + } catch { return []; } let diffRanges; try { - diffRanges = JSON.parse(fs3.readFileSync(jsonFilePath, "utf8")); + diffRanges = JSON.parse(contents); } catch (e) { logger.warning( `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` @@ -105503,30 +105509,17 @@ async function getDiffRangeFilePaths(sourceRoot, logger) { logger.debug( `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.` ); - const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === void 0) { logger.warning( "Cannot determine git root; returning diff range paths as-is." ); - return repoRelativePaths; + return [...new Set(diffRanges.map((r) => r.path))]; } - const sourceRootRelPrefix = path5.relative(repoRoot, sourceRoot).replaceAll(path5.sep, "/"); - if (sourceRootRelPrefix === "") { - return repoRelativePaths; - } - const prefixWithSlash = `${sourceRootRelPrefix}/`; - const result = []; - for (const p of repoRelativePaths) { - if (p.startsWith(prefixWithSlash)) { - result.push(p.slice(prefixWithSlash.length)); - } else { - logger.debug( - `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").` - ); - } - } - return result; + const relativePaths = diffRanges.map( + (r) => path5.relative(sourceRoot, path5.join(repoRoot, r.path)).replaceAll(path5.sep, "/") + ).filter((rel) => !rel.startsWith("..")); + return [...new Set(relativePaths)]; } var CACHE_VERSION = 1; var CACHE_PREFIX = "codeql-overlay-base-database"; @@ -106244,9 +106237,6 @@ async function getDiffInformedAnalysisBranches(codeql, features, logger) { } return branches; } -function getDiffRangesJsonFilePath() { - return path7.join(getTemporaryDirectory(), "pr-diff-range.json"); -} function writeDiffRangesJsonFile(logger, ranges) { const jsonContents = JSON.stringify(ranges, null, 2); const jsonFilePath = getDiffRangesJsonFilePath(); @@ -106442,12 +106432,12 @@ Improved incremental analysis will be automatically retried when the next versio // src/overlay/status.ts var fs6 = __toESM(require("fs")); -var path8 = __toESM(require("path")); +var path7 = __toESM(require("path")); var actionsCache2 = __toESM(require_cache5()); var MAX_CACHE_OPERATION_MS2 = 3e4; var STATUS_FILE_NAME = "overlay-status.json"; function getStatusFilePath(languages) { - return path8.join( + return path7.join( getTemporaryDirectory(), "overlay-status", [...languages].sort().join("+"), @@ -106474,7 +106464,7 @@ async function getOverlayStatus(codeql, languages, diskUsage, logger) { const cacheKey3 = await getCacheKey(codeql, languages, diskUsage); const statusFile = getStatusFilePath(languages); try { - await fs6.promises.mkdir(path8.dirname(statusFile), { recursive: true }); + await fs6.promises.mkdir(path7.dirname(statusFile), { recursive: true }); const foundKey = await waitForResultWithTimeLimit( MAX_CACHE_OPERATION_MS2, actionsCache2.restoreCache([statusFile], cacheKey3), @@ -106515,7 +106505,7 @@ async function getCacheKey(codeql, languages, diskUsage) { // src/trap-caching.ts var fs7 = __toESM(require("fs")); -var path9 = __toESM(require("path")); +var path8 = __toESM(require("path")); var actionsCache3 = __toESM(require_cache5()); var CACHE_VERSION2 = 1; var CODEQL_TRAP_CACHE_PREFIX = "codeql-trap"; @@ -106531,12 +106521,12 @@ async function downloadTrapCaches(codeql, languages, logger) { `Found ${languagesSupportingCaching.length} languages that support TRAP caching` ); if (languagesSupportingCaching.length === 0) return result; - const cachesDir = path9.join( + const cachesDir = path8.join( getTemporaryDirectory(), "trapCaches" ); for (const language of languagesSupportingCaching) { - const cacheDir = path9.join(cachesDir, language); + const cacheDir = path8.join(cachesDir, language); fs7.mkdirSync(cacheDir, { recursive: true }); result[language] = cacheDir; } @@ -106549,7 +106539,7 @@ async function downloadTrapCaches(codeql, languages, logger) { let baseSha = "unknown"; const eventPath = process.env.GITHUB_EVENT_PATH; if (getWorkflowEventName() === "pull_request" && eventPath !== void 0) { - const event = JSON.parse(fs7.readFileSync(path9.resolve(eventPath), "utf-8")); + const event = JSON.parse(fs7.readFileSync(path8.resolve(eventPath), "utf-8")); baseSha = event.pull_request?.base?.sha || baseSha; } for (const language of languages) { @@ -106656,7 +106646,7 @@ async function getSupportedLanguageMap(codeql, logger) { } var baseWorkflowsPath = ".github/workflows"; function hasActionsWorkflows(sourceRoot) { - const workflowsPath = path10.resolve(sourceRoot, baseWorkflowsPath); + const workflowsPath = path9.resolve(sourceRoot, baseWorkflowsPath); const stats = fs8.lstatSync(workflowsPath, { throwIfNoEntry: false }); return stats !== void 0 && stats.isDirectory() && fs8.readdirSync(workflowsPath).length > 0; } @@ -106814,8 +106804,8 @@ async function downloadCacheWithTime(codeQL, languages, logger) { async function loadUserConfig(logger, configFile, workspacePath, apiDetails, tempDir, validateConfig) { if (isLocal(configFile)) { if (configFile !== userConfigFromActionPath(tempDir)) { - configFile = path10.resolve(workspacePath, configFile); - if (!(configFile + path10.sep).startsWith(workspacePath + path10.sep)) { + configFile = path9.resolve(workspacePath, configFile); + if (!(configFile + path9.sep).startsWith(workspacePath + path9.sep)) { throw new ConfigurationError( getConfigFileOutsideWorkspaceErrorMessage(configFile) ); @@ -107081,10 +107071,10 @@ async function setCppTrapCachingEnvironmentVariables(config, logger) { } } function dbLocationOrDefault(dbLocation, tempDir) { - return dbLocation || path10.resolve(tempDir, "codeql_databases"); + return dbLocation || path9.resolve(tempDir, "codeql_databases"); } function userConfigFromActionPath(tempDir) { - return path10.resolve(tempDir, "user-config-from-action.yml"); + return path9.resolve(tempDir, "user-config-from-action.yml"); } function hasQueryCustomisation(userConfig) { return isDefined2(userConfig["disable-default-queries"]) || isDefined2(userConfig.queries) || isDefined2(userConfig["query-filters"]); @@ -107289,12 +107279,12 @@ async function getRemoteConfig(logger, configFile, apiDetails, validateConfig) { ); } function getPathToParsedConfigFile(tempDir) { - return path10.join(tempDir, "config"); + return path9.join(tempDir, "config"); } async function saveConfig(config, logger) { const configString = JSON.stringify(config); const configFile = getPathToParsedConfigFile(config.tempDir); - fs8.mkdirSync(path10.dirname(configFile), { recursive: true }); + fs8.mkdirSync(path9.dirname(configFile), { recursive: true }); fs8.writeFileSync(configFile, configString, "utf8"); logger.debug("Saved config:"); logger.debug(configString); @@ -107305,7 +107295,7 @@ async function generateRegistries(registriesInput, tempDir, logger) { let qlconfigFile; if (registries) { const qlconfig = createRegistriesBlock(registries); - qlconfigFile = path10.join(tempDir, "qlconfig.yml"); + qlconfigFile = path9.join(tempDir, "qlconfig.yml"); const qlconfigContents = dump(qlconfig); fs8.writeFileSync(qlconfigFile, qlconfigContents, "utf8"); logger.debug("Generated qlconfig.yml:"); @@ -107626,7 +107616,7 @@ var internal = { // src/init.ts var fs14 = __toESM(require("fs")); -var path15 = __toESM(require("path")); +var path14 = __toESM(require("path")); var core12 = __toESM(require_core()); var toolrunner4 = __toESM(require_toolrunner()); var github2 = __toESM(require_github()); @@ -107634,7 +107624,7 @@ var io5 = __toESM(require_io()); // src/codeql.ts var fs13 = __toESM(require("fs")); -var path14 = __toESM(require("path")); +var path13 = __toESM(require("path")); var core11 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -107882,7 +107872,7 @@ function wrapCliConfigurationError(cliError) { // src/setup-codeql.ts var fs11 = __toESM(require("fs")); -var path12 = __toESM(require("path")); +var path11 = __toESM(require("path")); var toolcache3 = __toESM(require_tool_cache()); var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var semver8 = __toESM(require_semver2()); @@ -108048,7 +108038,7 @@ function inferCompressionMethod(tarPath) { // src/tools-download.ts var fs10 = __toESM(require("fs")); var os4 = __toESM(require("os")); -var path11 = __toESM(require("path")); +var path10 = __toESM(require("path")); var import_perf_hooks2 = require("perf_hooks"); var core10 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -108181,7 +108171,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path11.join( + return path10.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver7.clean(version) || version, @@ -108325,7 +108315,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs11.existsSync(path12.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs11.existsSync(path11.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -108724,7 +108714,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path12.join(tempDir, v4_default()); + return path11.join(tempDir, v4_default()); } async function getNightlyToolsUrl(logger) { const zstdAvailability = await isZstdAvailable(logger); @@ -108773,7 +108763,7 @@ function isReservedToolsValue(tools) { // src/tracer-config.ts var fs12 = __toESM(require("fs")); -var path13 = __toESM(require("path")); +var path12 = __toESM(require("path")); async function shouldEnableIndirectTracing(codeql, config) { if (config.buildMode === "none" /* None */) { return false; @@ -108786,7 +108776,7 @@ async function shouldEnableIndirectTracing(codeql, config) { async function getTracerConfigForCluster(config) { const tracingEnvVariables = JSON.parse( fs12.readFileSync( - path13.resolve( + path12.resolve( config.dbLocation, "temp/tracingEnvironment/start-tracing.json" ), @@ -108833,7 +108823,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path14.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path13.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -108889,7 +108879,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path14.join( + const tracingConfigPath = path13.join( extractorPath, "tools", "tracing-config.lua" @@ -108971,7 +108961,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path14.join( + const autobuildCmd = path13.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -109393,7 +109383,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path14.resolve(config.tempDir, "user-config.yaml"); + return path13.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -109483,9 +109473,9 @@ async function checkPacksForOverlayCompatibility(codeql, config, logger) { } function checkPackForOverlayCompatibility(packDir, codeQlOverlayVersion, logger) { try { - let qlpackPath = path15.join(packDir, "qlpack.yml"); + let qlpackPath = path14.join(packDir, "qlpack.yml"); if (!fs14.existsSync(qlpackPath)) { - qlpackPath = path15.join(packDir, "codeql-pack.yml"); + qlpackPath = path14.join(packDir, "codeql-pack.yml"); } const qlpackContents = load( fs14.readFileSync(qlpackPath, "utf8") @@ -109493,7 +109483,7 @@ function checkPackForOverlayCompatibility(packDir, codeQlOverlayVersion, logger) if (!qlpackContents.buildMetadata) { return true; } - const packInfoPath = path15.join(packDir, ".packinfo"); + const packInfoPath = path14.join(packDir, ".packinfo"); if (!fs14.existsSync(packInfoPath)) { logger.warning( `The query pack at ${packDir} does not have a .packinfo file, so it cannot support overlay analysis. Recompiling the query pack with the latest CodeQL CLI should solve this problem.` @@ -109526,7 +109516,7 @@ function checkPackForOverlayCompatibility(packDir, codeQlOverlayVersion, logger) } async function checkInstallPython311(languages, codeql) { if (languages.includes("python" /* python */) && process.platform === "win32" && !(await codeql.getVersion()).features?.supportsPython312) { - const script = path15.resolve( + const script = path14.resolve( __dirname, "../python-setup", "check_python12.ps1" @@ -109896,7 +109886,7 @@ async function sendUnhandledErrorStatusReport(actionName, actionStartedAt, error // src/workflow.ts var fs15 = __toESM(require("fs")); -var path16 = __toESM(require("path")); +var path15 = __toESM(require("path")); var import_zlib = __toESM(require("zlib")); var core14 = __toESM(require_core()); function toCodedErrors(errors) { @@ -110051,7 +110041,7 @@ async function getWorkflow(logger) { } async function getWorkflowAbsolutePath(logger) { const relativePath = await getWorkflowRelativePath(); - const absolutePath = path16.join( + const absolutePath = path15.join( getRequiredEnvParam("GITHUB_WORKSPACE"), relativePath ); @@ -110190,7 +110180,7 @@ async function run(startedAt) { core15.exportVariable("JOB_RUN_UUID" /* JOB_RUN_UUID */, jobRunUuid); core15.exportVariable("CODEQL_ACTION_INIT_HAS_RUN" /* INIT_ACTION_HAS_RUN */, "true"); configFile = getOptionalInput("config-file"); - sourceRoot = path17.resolve( + sourceRoot = path16.resolve( getRequiredEnvParam("GITHUB_WORKSPACE"), getOptionalInput("source-root") || "" ); @@ -110382,14 +110372,14 @@ async function run(startedAt) { )) { try { logger.debug(`Applying static binary workaround for Go`); - const tempBinPath = path17.resolve( + const tempBinPath = path16.resolve( getTemporaryDirectory(), "codeql-action-go-tracing", "bin" ); fs16.mkdirSync(tempBinPath, { recursive: true }); core15.addPath(tempBinPath); - const goWrapperPath = path17.resolve(tempBinPath, "go"); + const goWrapperPath = path16.resolve(tempBinPath, "go"); fs16.writeFileSync( goWrapperPath, `#!/bin/bash diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index ce30730883..cf5710a719 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-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 path5 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path6 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path5 && path5[0] !== "/") { - path5 = `/${path5}`; + if (path6 && path6[0] !== "/") { + path6 = `/${path6}`; } - return new URL(`${origin}${path5}`); + return new URL(`${origin}${path6}`); } 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: path5, origin } + request: { method, path: path6, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path5); + debuglog("sending request to %s %s/%s", method, origin, path6); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path5, origin }, + request: { method, path: path6, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path5, + path6, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path5, origin } + request: { method, path: path6, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path5); + debuglog("trailers received from %s %s/%s", method, origin, path6); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path5, origin }, + request: { method, path: path6, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path5, + path6, error3.message ); }); @@ -1876,9 +1876,9 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path5, origin } + request: { method, path: path6, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path5); + debuglog("sending request to %s %s/%s", method, origin, path6); }); } 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: path5, + path: path6, method, body, headers, @@ -1956,11 +1956,11 @@ var require_request = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path5 !== "string") { + if (typeof path6 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path5[0] !== "/" && !(path5.startsWith("http://") || path5.startsWith("https://")) && method !== "CONNECT") { + } else if (path6[0] !== "/" && !(path6.startsWith("http://") || path6.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path5)) { + } else if (invalidPathRegex.test(path6)) { 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(path5, query) : path5; + this.path = query ? buildURL(path6, query) : path6; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -2335,9 +2335,9 @@ var require_dispatcher_base = __commonJS({ } close(callback) { if (callback === void 0) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { this.close((err, data) => { - return err ? reject(err) : resolve4(data); + return err ? reject(err) : resolve5(data); }); }); } @@ -2375,12 +2375,12 @@ var require_dispatcher_base = __commonJS({ err = null; } if (callback === void 0) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { this.destroy(err, (err2, data) => { return err2 ? ( /* istanbul ignore next: should never error */ reject(err2) - ) : resolve4(data); + ) : resolve5(data); }); }); } @@ -4647,8 +4647,8 @@ var require_util2 = __commonJS({ function createDeferredPromise() { let res; let rej; - const promise = new Promise((resolve4, reject) => { - res = resolve4; + const promise = new Promise((resolve5, reject) => { + res = resolve5; rej = reject; }); return { promise, resolve: res, reject: rej }; @@ -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: path5, host, upgrade, blocking, reset } = request2; + const { method, path: path6, 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} ${path5} HTTP/1.1\r + let header = `${method} ${path6} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -6789,12 +6789,12 @@ upgrade: ${upgrade}\r cb(); } } - const waitForDrain = () => new Promise((resolve4, reject) => { + const waitForDrain = () => new Promise((resolve5, reject) => { assert(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve4; + callback = resolve5; } }); socket.on("close", onDrain).on("drain", onDrain); @@ -7128,7 +7128,7 @@ var require_client_h2 = __commonJS({ } function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path: path5, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path6, 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] = path5; + headers[HTTP2_HEADER_PATH] = path6; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -7431,12 +7431,12 @@ var require_client_h2 = __commonJS({ cb(); } } - const waitForDrain = () => new Promise((resolve4, reject) => { + const waitForDrain = () => new Promise((resolve5, reject) => { assert(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve4; + callback = resolve5; } }); h2stream.on("close", onDrain).on("drain", onDrain); @@ -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 path5 = search ? `${pathname}${search}` : pathname; + const path6 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path5; + this.opts.path = path6; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -7913,16 +7913,16 @@ var require_client = __commonJS({ return this[kNeedDrain] < 2; } async [kClose]() { - return new Promise((resolve4) => { + return new Promise((resolve5) => { if (this[kSize]) { - this[kClosedResolve] = resolve4; + this[kClosedResolve] = resolve5; } else { - resolve4(null); + resolve5(null); } }); } async [kDestroy](err) { - return new Promise((resolve4) => { + return new Promise((resolve5) => { const requests = this[kQueue].splice(this[kPendingIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; @@ -7933,7 +7933,7 @@ var require_client = __commonJS({ this[kClosedResolve](); this[kClosedResolve] = null; } - resolve4(null); + resolve5(null); }; if (this[kHTTPContext]) { this[kHTTPContext].destroy(err, callback); @@ -7984,7 +7984,7 @@ var require_client = __commonJS({ }); } try { - const socket = await new Promise((resolve4, reject) => { + const socket = await new Promise((resolve5, reject) => { client[kConnector]({ host, hostname, @@ -7996,7 +7996,7 @@ var require_client = __commonJS({ if (err) { reject(err); } else { - resolve4(socket2); + resolve5(socket2); } }); }); @@ -8332,8 +8332,8 @@ var require_pool_base = __commonJS({ if (this[kQueue].isEmpty()) { await Promise.all(this[kClients].map((c) => c.close())); } else { - await new Promise((resolve4) => { - this[kClosedResolve] = resolve4; + await new Promise((resolve5) => { + this[kClosedResolve] = resolve5; }); } } @@ -8784,10 +8784,10 @@ var require_proxy_agent = __commonJS({ }; const { origin, - path: path5 = "/", + path: path6 = "/", headers = {} } = opts; - opts.path = origin + path5; + opts.path = origin + path6; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -9548,7 +9548,7 @@ var require_readable = __commonJS({ if (this._readableState.closeEmitted) { return null; } - return await new Promise((resolve4, reject) => { + return await new Promise((resolve5, reject) => { if (this[kContentLength] > limit) { this.destroy(new AbortError()); } @@ -9561,7 +9561,7 @@ var require_readable = __commonJS({ if (signal?.aborted) { reject(signal.reason ?? new AbortError()); } else { - resolve4(null); + resolve5(null); } }).on("error", noop3).on("data", function(chunk) { limit -= chunk.length; @@ -9580,7 +9580,7 @@ var require_readable = __commonJS({ } async function consume(stream, type2) { assert(!stream[kConsume]); - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { if (isUnusable(stream)) { const rState = stream._readableState; if (rState.destroyed && rState.closeEmitted === false) { @@ -9597,7 +9597,7 @@ var require_readable = __commonJS({ stream[kConsume] = { type: type2, stream, - resolve: resolve4, + resolve: resolve5, reject, length: 0, body: [] @@ -9667,18 +9667,18 @@ var require_readable = __commonJS({ return buffer; } function consumeEnd(consume2) { - const { type: type2, body, resolve: resolve4, stream, length } = consume2; + const { type: type2, body, resolve: resolve5, stream, length } = consume2; try { if (type2 === "text") { - resolve4(chunksDecode(body, length)); + resolve5(chunksDecode(body, length)); } else if (type2 === "json") { - resolve4(JSON.parse(chunksDecode(body, length))); + resolve5(JSON.parse(chunksDecode(body, length))); } else if (type2 === "arrayBuffer") { - resolve4(chunksConcat(body, length).buffer); + resolve5(chunksConcat(body, length).buffer); } else if (type2 === "blob") { - resolve4(new Blob(body, { type: stream[kContentType] })); + resolve5(new Blob(body, { type: stream[kContentType] })); } else if (type2 === "bytes") { - resolve4(chunksConcat(body, length)); + resolve5(chunksConcat(body, length)); } consumeFinish(consume2); } catch (err) { @@ -9935,9 +9935,9 @@ var require_api_request = __commonJS({ }; function request2(opts, callback) { if (callback === void 0) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { request2.call(this, opts, (err, data) => { - return err ? reject(err) : resolve4(data); + return err ? reject(err) : resolve5(data); }); }); } @@ -10160,9 +10160,9 @@ var require_api_stream = __commonJS({ }; function stream(opts, factory, callback) { if (callback === void 0) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve4(data); + return err ? reject(err) : resolve5(data); }); }); } @@ -10447,9 +10447,9 @@ var require_api_upgrade = __commonJS({ }; function upgrade(opts, callback) { if (callback === void 0) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve4(data); + return err ? reject(err) : resolve5(data); }); }); } @@ -10541,9 +10541,9 @@ var require_api_connect = __commonJS({ }; function connect(opts, callback) { if (callback === void 0) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve4(data); + return err ? reject(err) : resolve5(data); }); }); } @@ -10708,20 +10708,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path5) { - if (typeof path5 !== "string") { - return path5; + function safeUrl(path6) { + if (typeof path6 !== "string") { + return path6; } - const pathSegments = path5.split("?"); + const pathSegments = path6.split("?"); if (pathSegments.length !== 2) { - return path5; + return path6; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path5, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path5); + function matchKey(mockDispatch2, { path: path6, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path6); 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: path5 }) => matchValue(safeUrl(path5), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path6 }) => matchValue(safeUrl(path6), 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: path5, method, body, headers, query } = opts; + const { path: path6, method, body, headers, query } = opts; return { - path: path5, + path: path6, method, body, headers, @@ -11246,10 +11246,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path5, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path6, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path5, + Path: path6, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -14405,7 +14405,7 @@ var require_fetch = __commonJS({ function dispatch({ body }) { const url = requestCurrentURL(request2); const agent = fetchParams.controller.dispatcher; - return new Promise((resolve4, reject) => agent.dispatch( + return new Promise((resolve5, reject) => agent.dispatch( { path: url.pathname + url.search, origin: url.origin, @@ -14481,7 +14481,7 @@ var require_fetch = __commonJS({ } } const onError = this.onError.bind(this); - resolve4({ + resolve5({ status, statusText, headersList, @@ -14527,7 +14527,7 @@ var require_fetch = __commonJS({ for (let i = 0; i < rawHeaders.length; i += 2) { headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); } - resolve4({ + resolve5({ status, statusText: STATUS_CODES[status], headersList, @@ -16130,9 +16130,9 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path5) { - for (let i = 0; i < path5.length; ++i) { - const code = path5.charCodeAt(i); + function validateCookiePath(path6) { + for (let i = 0; i < path6.length; ++i) { + const code = path6.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -18120,8 +18120,8 @@ var require_util8 = __commonJS({ return true; } function delay2(ms) { - return new Promise((resolve4) => { - setTimeout(resolve4, ms).unref(); + return new Promise((resolve5) => { + setTimeout(resolve5, ms).unref(); }); } module2.exports = { @@ -18726,11 +18726,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path5 = opts.path; + let path6 = opts.path; if (!opts.path.startsWith("/")) { - path5 = `/${path5}`; + path6 = `/${path6}`; } - url = new URL(util.parseOrigin(url).origin + path5); + url = new URL(util.parseOrigin(url).origin + path6); } else { if (!opts) { opts = typeof url === "object" ? url : {}; @@ -18844,11 +18844,11 @@ var require_lib = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -18864,7 +18864,7 @@ var require_lib = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -18951,26 +18951,26 @@ var require_lib = __commonJS({ } readBody() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { let output = Buffer.alloc(0); this.message.on("data", (chunk) => { output = Buffer.concat([output, chunk]); }); this.message.on("end", () => { - resolve4(output.toString()); + resolve5(output.toString()); }); })); }); } readBodyBuffer() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve4) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); }); this.message.on("end", () => { - resolve4(Buffer.concat(chunks)); + resolve5(Buffer.concat(chunks)); }); })); }); @@ -19178,14 +19178,14 @@ var require_lib = __commonJS({ */ requestRaw(info6, data) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { function callbackForResult(err, res) { if (err) { reject(err); } else if (!res) { reject(new Error("Unknown error")); } else { - resolve4(res); + resolve5(res); } } this.requestRawWithCallback(info6, data, callbackForResult); @@ -19429,12 +19429,12 @@ var require_lib = __commonJS({ return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve4) => setTimeout(() => resolve4(), ms)); + return new Promise((resolve5) => setTimeout(() => resolve5(), ms)); }); } _processResponse(res, options) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve4, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -19442,7 +19442,7 @@ var require_lib = __commonJS({ headers: {} }; if (statusCode === HttpCodes.NotFound) { - resolve4(response); + resolve5(response); } function dateTimeDeserializer(key, value) { if (typeof value === "string") { @@ -19481,7 +19481,7 @@ var require_lib = __commonJS({ err.result = response.result; reject(err); } else { - resolve4(response); + resolve5(response); } })); }); @@ -19498,11 +19498,11 @@ var require_auth = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -19518,7 +19518,7 @@ var require_auth = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19602,11 +19602,11 @@ var require_oidc_utils = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -19622,7 +19622,7 @@ var require_oidc_utils = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19700,11 +19700,11 @@ var require_summary = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -19720,7 +19720,7 @@ var require_summary = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -20033,7 +20033,7 @@ var require_path_utils = __commonJS({ exports2.toPosixPath = toPosixPath; exports2.toWin32Path = toWin32Path; exports2.toPlatformPath = toPlatformPath; - var path5 = __importStar2(require("path")); + var path6 = __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, path5.sep); + return pth.replace(/[/\\]/g, path6.sep); } } }); @@ -20089,11 +20089,11 @@ var require_io_util = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -20109,7 +20109,7 @@ var require_io_util = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -20124,7 +20124,7 @@ var require_io_util = __commonJS({ exports2.tryGetExecutablePath = tryGetExecutablePath; exports2.getCmdPath = getCmdPath; var fs5 = __importStar2(require("fs")); - var path5 = __importStar2(require("path")); + var path6 = __importStar2(require("path")); _a = fs5.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; function readlink(fsPath) { @@ -20179,7 +20179,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path5.extname(filePath).toUpperCase(); + const upperExt = path6.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 = path5.dirname(filePath); - const upperName = path5.basename(filePath).toUpperCase(); + const directory = path6.dirname(filePath); + const upperName = path6.basename(filePath).toUpperCase(); for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path5.join(directory, actualName); + filePath = path6.join(directory, actualName); break; } } @@ -20286,11 +20286,11 @@ var require_io = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -20306,7 +20306,7 @@ var require_io = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -20319,7 +20319,7 @@ var require_io = __commonJS({ exports2.which = which5; exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path5 = __importStar2(require("path")); + var path6 = __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 ? path5.join(dest, path5.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path6.join(dest, path6.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -20340,7 +20340,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path5.relative(source, newDest) === "") { + if (path6.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 = path5.join(dest, path5.basename(source)); + dest = path6.join(dest, path6.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -20363,7 +20363,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path5.dirname(dest)); + yield mkdirP(path6.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(path5.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path6.delimiter)) { if (extension) { extensions.push(extension); } @@ -20435,12 +20435,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path5.sep)) { + if (tool.includes(path6.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path5.delimiter)) { + for (const p of process.env.PATH.split(path6.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(path5.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path6.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -20547,11 +20547,11 @@ var require_toolrunner = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -20567,7 +20567,7 @@ var require_toolrunner = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -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 path5 = __importStar2(require("path")); + var path6 = __importStar2(require("path")); var io5 = __importStar2(require_io()); var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); @@ -20793,10 +20793,10 @@ 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 = path5.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path6.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io5.which(this.toolPath, true); - return new Promise((resolve4, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve5, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -20879,7 +20879,7 @@ var require_toolrunner = __commonJS({ if (error3) { reject(error3); } else { - resolve4(exitCode); + resolve5(exitCode); } }); if (this.options.input) { @@ -21045,11 +21045,11 @@ var require_exec = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -21065,7 +21065,7 @@ var require_exec = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -21165,11 +21165,11 @@ var require_platform = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -21185,7 +21185,7 @@ var require_platform = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -21294,11 +21294,11 @@ var require_core = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -21314,7 +21314,7 @@ var require_core = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -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 path5 = __importStar2(require("path")); + var path6 = __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}${path5.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path6.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 path5 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path5} does not exist${os_1.EOL}`); + const path6 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path6} 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 path5 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path6 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path5 && path5[0] !== "/") { - path5 = `/${path5}`; + if (path6 && path6[0] !== "/") { + path6 = `/${path6}`; } - return new URL(`${origin}${path5}`); + return new URL(`${origin}${path6}`); } 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: path5, origin } + request: { method, path: path6, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path5); + debuglog("sending request to %s %s/%s", method, origin, path6); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path5, origin }, + request: { method, path: path6, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path5, + path6, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path5, origin } + request: { method, path: path6, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path5); + debuglog("trailers received from %s %s/%s", method, origin, path6); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path5, origin }, + request: { method, path: path6, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path5, + path6, error3.message ); }); @@ -22874,9 +22874,9 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path5, origin } + request: { method, path: path6, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path5); + debuglog("sending request to %s %s/%s", method, origin, path6); }); } 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: path5, + path: path6, method, body, headers, @@ -22954,11 +22954,11 @@ var require_request3 = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path5 !== "string") { + if (typeof path6 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path5[0] !== "/" && !(path5.startsWith("http://") || path5.startsWith("https://")) && method !== "CONNECT") { + } else if (path6[0] !== "/" && !(path6.startsWith("http://") || path6.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path5)) { + } else if (invalidPathRegex.test(path6)) { 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(path5, query) : path5; + this.path = query ? buildURL(path6, query) : path6; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -23333,9 +23333,9 @@ var require_dispatcher_base2 = __commonJS({ } close(callback) { if (callback === void 0) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { this.close((err, data) => { - return err ? reject(err) : resolve4(data); + return err ? reject(err) : resolve5(data); }); }); } @@ -23373,12 +23373,12 @@ var require_dispatcher_base2 = __commonJS({ err = null; } if (callback === void 0) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { this.destroy(err, (err2, data) => { return err2 ? ( /* istanbul ignore next: should never error */ reject(err2) - ) : resolve4(data); + ) : resolve5(data); }); }); } @@ -25645,8 +25645,8 @@ var require_util10 = __commonJS({ function createDeferredPromise() { let res; let rej; - const promise = new Promise((resolve4, reject) => { - res = resolve4; + const promise = new Promise((resolve5, reject) => { + res = resolve5; rej = reject; }); return { promise, resolve: res, reject: rej }; @@ -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: path5, host, upgrade, blocking, reset } = request2; + const { method, path: path6, 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} ${path5} HTTP/1.1\r + let header = `${method} ${path6} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -27787,12 +27787,12 @@ upgrade: ${upgrade}\r cb(); } } - const waitForDrain = () => new Promise((resolve4, reject) => { + const waitForDrain = () => new Promise((resolve5, reject) => { assert(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve4; + callback = resolve5; } }); socket.on("close", onDrain).on("drain", onDrain); @@ -28126,7 +28126,7 @@ var require_client_h22 = __commonJS({ } function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path: path5, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path6, 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] = path5; + headers[HTTP2_HEADER_PATH] = path6; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -28429,12 +28429,12 @@ var require_client_h22 = __commonJS({ cb(); } } - const waitForDrain = () => new Promise((resolve4, reject) => { + const waitForDrain = () => new Promise((resolve5, reject) => { assert(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve4; + callback = resolve5; } }); h2stream.on("close", onDrain).on("drain", onDrain); @@ -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 path5 = search ? `${pathname}${search}` : pathname; + const path6 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path5; + this.opts.path = path6; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -28911,16 +28911,16 @@ var require_client2 = __commonJS({ return this[kNeedDrain] < 2; } async [kClose]() { - return new Promise((resolve4) => { + return new Promise((resolve5) => { if (this[kSize]) { - this[kClosedResolve] = resolve4; + this[kClosedResolve] = resolve5; } else { - resolve4(null); + resolve5(null); } }); } async [kDestroy](err) { - return new Promise((resolve4) => { + return new Promise((resolve5) => { const requests = this[kQueue].splice(this[kPendingIdx]); for (let i = 0; i < requests.length; i++) { const request2 = requests[i]; @@ -28931,7 +28931,7 @@ var require_client2 = __commonJS({ this[kClosedResolve](); this[kClosedResolve] = null; } - resolve4(null); + resolve5(null); }; if (this[kHTTPContext]) { this[kHTTPContext].destroy(err, callback); @@ -28982,7 +28982,7 @@ var require_client2 = __commonJS({ }); } try { - const socket = await new Promise((resolve4, reject) => { + const socket = await new Promise((resolve5, reject) => { client[kConnector]({ host, hostname, @@ -28994,7 +28994,7 @@ var require_client2 = __commonJS({ if (err) { reject(err); } else { - resolve4(socket2); + resolve5(socket2); } }); }); @@ -29330,8 +29330,8 @@ var require_pool_base2 = __commonJS({ if (this[kQueue].isEmpty()) { await Promise.all(this[kClients].map((c) => c.close())); } else { - await new Promise((resolve4) => { - this[kClosedResolve] = resolve4; + await new Promise((resolve5) => { + this[kClosedResolve] = resolve5; }); } } @@ -29782,10 +29782,10 @@ var require_proxy_agent2 = __commonJS({ }; const { origin, - path: path5 = "/", + path: path6 = "/", headers = {} } = opts; - opts.path = origin + path5; + opts.path = origin + path6; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -30546,7 +30546,7 @@ var require_readable2 = __commonJS({ if (this._readableState.closeEmitted) { return null; } - return await new Promise((resolve4, reject) => { + return await new Promise((resolve5, reject) => { if (this[kContentLength] > limit) { this.destroy(new AbortError()); } @@ -30559,7 +30559,7 @@ var require_readable2 = __commonJS({ if (signal?.aborted) { reject(signal.reason ?? new AbortError()); } else { - resolve4(null); + resolve5(null); } }).on("error", noop3).on("data", function(chunk) { limit -= chunk.length; @@ -30578,7 +30578,7 @@ var require_readable2 = __commonJS({ } async function consume(stream, type2) { assert(!stream[kConsume]); - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { if (isUnusable(stream)) { const rState = stream._readableState; if (rState.destroyed && rState.closeEmitted === false) { @@ -30595,7 +30595,7 @@ var require_readable2 = __commonJS({ stream[kConsume] = { type: type2, stream, - resolve: resolve4, + resolve: resolve5, reject, length: 0, body: [] @@ -30665,18 +30665,18 @@ var require_readable2 = __commonJS({ return buffer; } function consumeEnd(consume2) { - const { type: type2, body, resolve: resolve4, stream, length } = consume2; + const { type: type2, body, resolve: resolve5, stream, length } = consume2; try { if (type2 === "text") { - resolve4(chunksDecode(body, length)); + resolve5(chunksDecode(body, length)); } else if (type2 === "json") { - resolve4(JSON.parse(chunksDecode(body, length))); + resolve5(JSON.parse(chunksDecode(body, length))); } else if (type2 === "arrayBuffer") { - resolve4(chunksConcat(body, length).buffer); + resolve5(chunksConcat(body, length).buffer); } else if (type2 === "blob") { - resolve4(new Blob(body, { type: stream[kContentType] })); + resolve5(new Blob(body, { type: stream[kContentType] })); } else if (type2 === "bytes") { - resolve4(chunksConcat(body, length)); + resolve5(chunksConcat(body, length)); } consumeFinish(consume2); } catch (err) { @@ -30933,9 +30933,9 @@ var require_api_request2 = __commonJS({ }; function request2(opts, callback) { if (callback === void 0) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { request2.call(this, opts, (err, data) => { - return err ? reject(err) : resolve4(data); + return err ? reject(err) : resolve5(data); }); }); } @@ -31158,9 +31158,9 @@ var require_api_stream2 = __commonJS({ }; function stream(opts, factory, callback) { if (callback === void 0) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve4(data); + return err ? reject(err) : resolve5(data); }); }); } @@ -31445,9 +31445,9 @@ var require_api_upgrade2 = __commonJS({ }; function upgrade(opts, callback) { if (callback === void 0) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve4(data); + return err ? reject(err) : resolve5(data); }); }); } @@ -31539,9 +31539,9 @@ var require_api_connect2 = __commonJS({ }; function connect(opts, callback) { if (callback === void 0) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve4(data); + return err ? reject(err) : resolve5(data); }); }); } @@ -31706,20 +31706,20 @@ var require_mock_utils2 = __commonJS({ } return true; } - function safeUrl(path5) { - if (typeof path5 !== "string") { - return path5; + function safeUrl(path6) { + if (typeof path6 !== "string") { + return path6; } - const pathSegments = path5.split("?"); + const pathSegments = path6.split("?"); if (pathSegments.length !== 2) { - return path5; + return path6; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path5, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path5); + function matchKey(mockDispatch2, { path: path6, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path6); 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: path5 }) => matchValue(safeUrl(path5), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path6 }) => matchValue(safeUrl(path6), 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: path5, method, body, headers, query } = opts; + const { path: path6, method, body, headers, query } = opts; return { - path: path5, + path: path6, method, body, headers, @@ -32244,10 +32244,10 @@ var require_pending_interceptors_formatter2 = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path5, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path6, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path5, + Path: path6, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -35403,7 +35403,7 @@ var require_fetch2 = __commonJS({ function dispatch({ body }) { const url = requestCurrentURL(request2); const agent = fetchParams.controller.dispatcher; - return new Promise((resolve4, reject) => agent.dispatch( + return new Promise((resolve5, reject) => agent.dispatch( { path: url.pathname + url.search, origin: url.origin, @@ -35479,7 +35479,7 @@ var require_fetch2 = __commonJS({ } } const onError = this.onError.bind(this); - resolve4({ + resolve5({ status, statusText, headersList, @@ -35525,7 +35525,7 @@ var require_fetch2 = __commonJS({ for (let i = 0; i < rawHeaders.length; i += 2) { headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); } - resolve4({ + resolve5({ status, statusText: STATUS_CODES[status], headersList, @@ -37128,9 +37128,9 @@ var require_util14 = __commonJS({ } } } - function validateCookiePath(path5) { - for (let i = 0; i < path5.length; ++i) { - const code = path5.charCodeAt(i); + function validateCookiePath(path6) { + for (let i = 0; i < path6.length; ++i) { + const code = path6.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -39118,8 +39118,8 @@ var require_util16 = __commonJS({ return true; } function delay2(ms) { - return new Promise((resolve4) => { - setTimeout(resolve4, ms).unref(); + return new Promise((resolve5) => { + setTimeout(resolve5, ms).unref(); }); } module2.exports = { @@ -39724,11 +39724,11 @@ var require_undici2 = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path5 = opts.path; + let path6 = opts.path; if (!opts.path.startsWith("/")) { - path5 = `/${path5}`; + path6 = `/${path6}`; } - url = new URL(util.parseOrigin(url).origin + path5); + url = new URL(util.parseOrigin(url).origin + path6); } else { if (!opts) { opts = typeof url === "object" ? url : {}; @@ -39842,11 +39842,11 @@ var require_utils4 = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -39862,7 +39862,7 @@ var require_utils4 = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -46434,8 +46434,8 @@ var require_light = __commonJS({ return this.Promise.resolve(); } yieldLoop(t = 0) { - return new this.Promise(function(resolve4, reject) { - return setTimeout(resolve4, t); + return new this.Promise(function(resolve5, reject) { + return setTimeout(resolve5, t); }); } computePenalty() { @@ -46646,15 +46646,15 @@ var require_light = __commonJS({ return this._queue.length === 0; } async _tryToRun() { - var args, cb, error3, reject, resolve4, returned, task; + var args, cb, error3, reject, resolve5, returned, task; if (this._running < 1 && this._queue.length > 0) { this._running++; - ({ task, args, resolve: resolve4, reject } = this._queue.shift()); + ({ task, args, resolve: resolve5, reject } = this._queue.shift()); cb = await (async function() { try { returned = await task(...args); return function() { - return resolve4(returned); + return resolve5(returned); }; } catch (error1) { error3 = error1; @@ -46669,13 +46669,13 @@ var require_light = __commonJS({ } } schedule(task, ...args) { - var promise, reject, resolve4; - resolve4 = reject = null; + var promise, reject, resolve5; + resolve5 = reject = null; promise = new this.Promise(function(_resolve, _reject) { - resolve4 = _resolve; + resolve5 = _resolve; return reject = _reject; }); - this._queue.push({ task, args, resolve: resolve4, reject }); + this._queue.push({ task, args, resolve: resolve5, reject }); this._tryToRun(); return promise; } @@ -47076,14 +47076,14 @@ var require_light = __commonJS({ counts = this._states.counts; return counts[0] + counts[1] + counts[2] + counts[3] === at; }; - return new this.Promise((resolve4, reject) => { + return new this.Promise((resolve5, reject) => { if (finished()) { - return resolve4(); + return resolve5(); } else { return this.on("done", () => { if (finished()) { this.removeAllListeners("done"); - return resolve4(); + return resolve5(); } }); } @@ -47176,9 +47176,9 @@ var require_light = __commonJS({ options = parser$5.load(options, this.jobDefaults); } task = (...args2) => { - return new this.Promise(function(resolve4, reject) { + return new this.Promise(function(resolve5, reject) { return fn(...args2, function(...args3) { - return (args3[0] != null ? reject : resolve4)(args3); + return (args3[0] != null ? reject : resolve5)(args3); }); }); }; @@ -47305,14 +47305,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, path5, name, argument) { - if (Array.isArray(path5)) { - this.path = path5; - this.property = path5.reduce(function(sum, item) { + var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path6, name, argument) { + if (Array.isArray(path6)) { + this.path = path6; + this.property = path6.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path5 !== void 0) { - this.property = path5; + } else if (path6 !== void 0) { + this.property = path6; } if (message) { this.message = message; @@ -47403,28 +47403,28 @@ var require_helpers = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path5, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path6, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path5)) { - this.path = path5; - this.propertyPath = path5.reduce(function(sum, item) { + if (Array.isArray(path6)) { + this.path = path6; + this.propertyPath = path6.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path5; + this.propertyPath = path6; } this.base = base; this.schemas = schemas; }; - SchemaContext.prototype.resolve = function resolve4(target) { + SchemaContext.prototype.resolve = function resolve5(target) { return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path5 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path6 = 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, path5, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema2, this.options, path6, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -48515,7 +48515,7 @@ var require_validator = __commonJS({ } return schema2; }; - Validator2.prototype.resolve = function resolve4(schema2, switchSchema, ctx) { + Validator2.prototype.resolve = function resolve5(schema2, switchSchema, ctx) { switchSchema = ctx.resolve(switchSchema); if (ctx.schemas[switchSchema]) { return { subschema: ctx.schemas[switchSchema], switchSchema }; @@ -48721,21 +48721,21 @@ var require_internal_path_helper = __commonJS({ return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.dirname = dirname2; + exports2.dirname = dirname3; exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; exports2.hasAbsoluteRoot = hasAbsoluteRoot; exports2.hasRoot = hasRoot; exports2.normalizeSeparators = normalizeSeparators; exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - var path5 = __importStar2(require("path")); + var path6 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; - function dirname2(p) { + function dirname3(p) { p = safeTrimTrailingSeparator(p); if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path5.dirname(p); + let result = path6.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -48772,7 +48772,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 += path5.sep; + root += path6.sep; } return root + itemPath; } @@ -48806,10 +48806,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path5.sep)) { + if (!p.endsWith(path6.sep)) { return p; } - if (p === path5.sep) { + if (p === path6.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -49154,7 +49154,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path5 = (function() { + var path6 = (function() { try { return require("path"); } catch (e) { @@ -49162,7 +49162,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path5.sep; + minimatch.sep = path6.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand2 = require_brace_expansion(); var plTypes = { @@ -49251,8 +49251,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path5.sep !== "/") { - pattern = pattern.split(path5.sep).join("/"); + if (!options.allowWindowsEscape && path6.sep !== "/") { + pattern = pattern.split(path6.sep).join("/"); } this.options = options; this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200; @@ -49623,8 +49623,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path5.sep !== "/") { - f = f.split(path5.sep).join("/"); + if (path6.sep !== "/") { + f = f.split(path6.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -49867,7 +49867,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path5 = __importStar2(require("path")); + var path6 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -49882,12 +49882,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(path5.sep); + this.segments = itemPath.split(path6.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path5.basename(remaining); + const basename = path6.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -49905,7 +49905,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(path5.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path6.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -49916,12 +49916,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path5.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path6.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path5.sep; + result += path6.sep; } result += this.segments[i]; } @@ -49979,7 +49979,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os2 = __importStar2(require("os")); - var path5 = __importStar2(require("path")); + var path6 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); @@ -50008,7 +50008,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(path5.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path6.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -50032,8 +50032,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path5.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path5.sep}`; + if (!itemPath.endsWith(path6.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path6.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -50068,9 +50068,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(`.${path5.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path6.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path5.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path6.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}'`); @@ -50154,8 +50154,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path5, level) { - this.path = path5; + constructor(path6, level) { + this.path = path6; this.level = level; } }; @@ -50206,11 +50206,11 @@ var require_internal_globber = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -50226,7 +50226,7 @@ var require_internal_globber = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -50239,14 +50239,14 @@ var require_internal_globber = __commonJS({ }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve4, reject) { - v = o[n](v), settle(resolve4, reject, v.done, v.value); + return new Promise(function(resolve5, reject) { + v = o[n](v), settle(resolve5, reject, v.done, v.value); }); }; } - function settle(resolve4, reject, d, v) { + function settle(resolve5, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve4({ value: v2, done: d }); + resolve5({ value: v2, done: d }); }, reject); } }; @@ -50299,7 +50299,7 @@ var require_internal_globber = __commonJS({ var core14 = __importStar2(require_core()); var fs5 = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); - var path5 = __importStar2(require("path")); + var path6 = __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(); @@ -50375,7 +50375,7 @@ var require_internal_globber = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path5.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path6.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -50385,7 +50385,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await2(fs5.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path5.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs5.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path6.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); @@ -50496,11 +50496,11 @@ var require_internal_hash_files = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -50516,7 +50516,7 @@ var require_internal_hash_files = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -50529,14 +50529,14 @@ var require_internal_hash_files = __commonJS({ }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve4, reject) { - v = o[n](v), settle(resolve4, reject, v.done, v.value); + return new Promise(function(resolve5, reject) { + v = o[n](v), settle(resolve5, reject, v.done, v.value); }); }; } - function settle(resolve4, reject, d, v) { + function settle(resolve5, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve4({ value: v2, done: d }); + resolve5({ value: v2, done: d }); }, reject); } }; @@ -50547,7 +50547,7 @@ var require_internal_hash_files = __commonJS({ var fs5 = __importStar2(require("fs")); var stream = __importStar2(require("stream")); var util = __importStar2(require("util")); - var path5 = __importStar2(require("path")); + var path6 = __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; @@ -50563,7 +50563,7 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path5.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path6.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } @@ -50608,11 +50608,11 @@ var require_glob = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -50628,7 +50628,7 @@ var require_glob = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -51888,11 +51888,11 @@ var require_cacheUtils = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -51908,7 +51908,7 @@ var require_cacheUtils = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -51921,14 +51921,14 @@ var require_cacheUtils = __commonJS({ }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve4, reject) { - v = o[n](v), settle(resolve4, reject, v.done, v.value); + return new Promise(function(resolve5, reject) { + v = o[n](v), settle(resolve5, reject, v.done, v.value); }); }; } - function settle(resolve4, reject, d, v) { + function settle(resolve5, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve4({ value: v2, done: d }); + resolve5({ value: v2, done: d }); }, reject); } }; @@ -51949,7 +51949,7 @@ var require_cacheUtils = __commonJS({ var io5 = __importStar2(require_io()); var crypto2 = __importStar2(require("crypto")); var fs5 = __importStar2(require("fs")); - var path5 = __importStar2(require("path")); + var path6 = __importStar2(require("path")); var semver9 = __importStar2(require_semver3()); var util = __importStar2(require("util")); var constants_1 = require_constants12(); @@ -51969,9 +51969,9 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path5.join(baseLocation, "actions", "temp"); + tempDirectory = path6.join(baseLocation, "actions", "temp"); } - const dest = path5.join(tempDirectory, crypto2.randomUUID()); + const dest = path6.join(tempDirectory, crypto2.randomUUID()); yield io5.mkdirP(dest); return dest; }); @@ -51993,7 +51993,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path5.relative(workspace, file).replace(new RegExp(`\\${path5.sep}`, "g"), "/"); + const relativeFile = path6.relative(workspace, file).replace(new RegExp(`\\${path6.sep}`, "g"), "/"); core14.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -52210,11 +52210,11 @@ function __metadata(metadataKey, metadataValue) { } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -52230,7 +52230,7 @@ function __awaiter(thisArg, _arguments, P, generator) { } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -52421,14 +52421,14 @@ function __asyncValues(o) { }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve4, reject) { - v = o[n](v), settle(resolve4, reject, v.done, v.value); + return new Promise(function(resolve5, reject) { + v = o[n](v), settle(resolve5, reject, v.done, v.value); }); }; } - function settle(resolve4, reject, d, v) { + function settle(resolve5, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve4({ value: v2, done: d }); + resolve5({ value: v2, done: d }); }, reject); } } @@ -52520,13 +52520,13 @@ function __disposeResources(env) { } return next(); } -function __rewriteRelativeImportExtension(path5, preserveJsx) { - if (typeof path5 === "string" && /^\.\.?\//.test(path5)) { - return path5.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { +function __rewriteRelativeImportExtension(path6, preserveJsx) { + if (typeof path6 === "string" && /^\.\.?\//.test(path6)) { + return path6.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 path5; + return path6; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -53600,9 +53600,9 @@ var require_nodeHttpClient = __commonJS({ if (stream.readable === false) { return Promise.resolve(); } - return new Promise((resolve4) => { + return new Promise((resolve5) => { const handler2 = () => { - resolve4(); + resolve5(); stream.removeListener("close", handler2); stream.removeListener("end", handler2); stream.removeListener("error", handler2); @@ -53757,8 +53757,8 @@ var require_nodeHttpClient = __commonJS({ headers: request2.headers.toJSON({ preserveCase: true }), ...request2.requestOverrides }; - return new Promise((resolve4, reject) => { - const req = isInsecure ? node_http_1.default.request(options, resolve4) : node_https_1.default.request(options, resolve4); + return new Promise((resolve5, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve5) : node_https_1.default.request(options, resolve5); req.once("error", (err) => { reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request: request2 })); }); @@ -53842,7 +53842,7 @@ var require_nodeHttpClient = __commonJS({ return stream; } function streamToText(stream) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { const buffer = []; stream.on("data", (chunk) => { if (Buffer.isBuffer(chunk)) { @@ -53852,7 +53852,7 @@ var require_nodeHttpClient = __commonJS({ } }); stream.on("end", () => { - resolve4(Buffer.concat(buffer).toString("utf8")); + resolve5(Buffer.concat(buffer).toString("utf8")); }); stream.on("error", (e) => { if (e && e?.name === "AbortError") { @@ -54130,7 +54130,7 @@ var require_helpers2 = __commonJS({ var AbortError_js_1 = require_AbortError(); var StandardAbortMessage = "The operation was aborted."; function delay2(delayInMs, value, options) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { let timer = void 0; let onAborted = void 0; const rejectOnAbort = () => { @@ -54153,7 +54153,7 @@ var require_helpers2 = __commonJS({ } timer = setTimeout(() => { removeListeners(); - resolve4(value); + resolve5(value); }, delayInMs); if (options?.abortSignal) { options.abortSignal.addEventListener("abort", onAborted); @@ -55316,8 +55316,8 @@ var require_helpers3 = __commonJS({ function req(url, opts = {}) { const href = typeof url === "string" ? url : url.href; const req2 = (href.startsWith("https:") ? https2 : http).request(url, opts); - const promise = new Promise((resolve4, reject) => { - req2.once("response", resolve4).once("error", reject).end(); + const promise = new Promise((resolve5, reject) => { + req2.once("response", resolve5).once("error", reject).end(); }); req2.then = promise.then.bind(promise); return req2; @@ -55494,7 +55494,7 @@ var require_parse_proxy_response = __commonJS({ var debug_1 = __importDefault2(require_src()); var debug5 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { let buffersLength = 0; const buffers = []; function read() { @@ -55560,7 +55560,7 @@ var require_parse_proxy_response = __commonJS({ } debug5("got proxy server response: %o %o", firstLine, headers); cleanup(); - resolve4({ + resolve5({ connect: { statusCode, statusText, @@ -56940,8 +56940,8 @@ var require_getClient = __commonJS({ } const { allowInsecureConnection, httpClient } = clientOptions; const endpointUrl = clientOptions.endpoint ?? endpoint2; - const client = (path5, ...args) => { - const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path5, args, { allowInsecureConnection, ...requestOptions }); + const client = (path6, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path6, args, { allowInsecureConnection, ...requestOptions }); return { get: (requestOptions = {}) => { return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); @@ -57646,7 +57646,7 @@ var require_createAbortablePromise = __commonJS({ var abort_controller_1 = require_commonjs3(); function createAbortablePromise(buildPromise, options) { const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { function rejectOnAbort() { reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); } @@ -57664,7 +57664,7 @@ var require_createAbortablePromise = __commonJS({ try { buildPromise((x) => { removeListeners(); - resolve4(x); + resolve5(x); }, (x) => { removeListeners(); reject(x); @@ -57691,8 +57691,8 @@ var require_delay2 = __commonJS({ function delay2(timeInMs, options) { let token; const { abortSignal, abortErrorMsg } = options ?? {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve4) => { - token = setTimeout(resolve4, timeInMs); + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve5) => { + token = setTimeout(resolve5, timeInMs); }, { cleanupBeforeAbort: () => clearTimeout(token), abortSignal, @@ -60812,15 +60812,15 @@ var require_urlHelpers2 = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path5 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path5.startsWith("/")) { - path5 = path5.substring(1); + let path6 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path6.startsWith("/")) { + path6 = path6.substring(1); } - if (isAbsoluteUrl(path5)) { - requestUrl = path5; + if (isAbsoluteUrl(path6)) { + requestUrl = path6; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path5); + requestUrl = appendPath(requestUrl, path6); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -60866,9 +60866,9 @@ var require_urlHelpers2 = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path5 = pathToAppend.substring(0, searchStart); + const path6 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path5; + newPath = newPath + path6; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -63545,10 +63545,10 @@ var require_utils_common = __commonJS({ var constants_js_1 = require_constants15(); function escapeURLPath(url) { const urlParsed = new URL(url); - let path5 = urlParsed.pathname; - path5 = path5 || "/"; - path5 = escape(path5); - urlParsed.pathname = path5; + let path6 = urlParsed.pathname; + path6 = path6 || "/"; + path6 = escape(path6); + urlParsed.pathname = path6; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -63633,9 +63633,9 @@ var require_utils_common = __commonJS({ } function appendToURLPath(url, name) { const urlParsed = new URL(url); - let path5 = urlParsed.pathname; - path5 = path5 ? path5.endsWith("/") ? `${path5}${name}` : `${path5}/${name}` : name; - urlParsed.pathname = path5; + let path6 = urlParsed.pathname; + path6 = path6 ? path6.endsWith("/") ? `${path6}${name}` : `${path6}/${name}` : name; + urlParsed.pathname = path6; return urlParsed.toString(); } function setURLParameter(url, name, value) { @@ -63750,7 +63750,7 @@ var require_utils_common = __commonJS({ return base64encode(res); } async function delay2(timeInMs, aborter, abortError) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { let timeout; const abortHandler = () => { if (timeout !== void 0) { @@ -63762,7 +63762,7 @@ var require_utils_common = __commonJS({ if (aborter !== void 0) { aborter.removeEventListener("abort", abortHandler); } - resolve4(); + resolve5(); }; timeout = setTimeout(resolveHandler, timeInMs); if (aborter !== void 0) { @@ -64862,9 +64862,9 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path5 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path6 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path5}`; + canonicalizedResourceString += `/${this.factory.accountName}${path6}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -65303,7 +65303,7 @@ var require_BufferScheduler = __commonJS({ * */ async do() { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { this.readable.on("data", (data) => { data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; this.appendUnresolvedData(data); @@ -65331,11 +65331,11 @@ var require_BufferScheduler = __commonJS({ if (this.isStreamEnd && this.executingOutgoingHandlers === 0) { if (this.unresolvedLength > 0 && this.unresolvedLength < this.bufferSize) { const buffer = this.shiftBufferFromUnresolvedDataArray(); - this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve4).catch(reject); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve5).catch(reject); } else if (this.unresolvedLength >= this.bufferSize) { return; } else { - resolve4(); + resolve5(); } } }); @@ -65603,10 +65603,10 @@ var require_utils_common2 = __commonJS({ var constants_js_1 = require_constants16(); function escapeURLPath(url) { const urlParsed = new URL(url); - let path5 = urlParsed.pathname; - path5 = path5 || "/"; - path5 = escape(path5); - urlParsed.pathname = path5; + let path6 = urlParsed.pathname; + path6 = path6 || "/"; + path6 = escape(path6); + urlParsed.pathname = path6; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -65691,9 +65691,9 @@ var require_utils_common2 = __commonJS({ } function appendToURLPath(url, name) { const urlParsed = new URL(url); - let path5 = urlParsed.pathname; - path5 = path5 ? path5.endsWith("/") ? `${path5}${name}` : `${path5}/${name}` : name; - urlParsed.pathname = path5; + let path6 = urlParsed.pathname; + path6 = path6 ? path6.endsWith("/") ? `${path6}${name}` : `${path6}/${name}` : name; + urlParsed.pathname = path6; return urlParsed.toString(); } function setURLParameter(url, name, value) { @@ -65808,7 +65808,7 @@ var require_utils_common2 = __commonJS({ return base64encode(res); } async function delay2(timeInMs, aborter, abortError) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { let timeout; const abortHandler = () => { if (timeout !== void 0) { @@ -65820,7 +65820,7 @@ var require_utils_common2 = __commonJS({ if (aborter !== void 0) { aborter.removeEventListener("abort", abortHandler); } - resolve4(); + resolve5(); }; timeout = setTimeout(resolveHandler, timeInMs); if (aborter !== void 0) { @@ -66614,9 +66614,9 @@ var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path5 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path6 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path5}`; + canonicalizedResourceString += `/${this.factory.accountName}${path6}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67246,9 +67246,9 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path5 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path6 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path5}`; + canonicalizedResourceString += `/${options.accountName}${path6}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67593,9 +67593,9 @@ var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path5 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path6 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path5}`; + canonicalizedResourceString += `/${options.accountName}${path6}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -84018,7 +84018,7 @@ var require_AvroReadableFromStream = __commonJS({ this._position += chunk.length; return this.toUint8Array(chunk); } else { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { const cleanUp = () => { this._readable.removeListener("readable", readableCallback); this._readable.removeListener("error", rejectCallback); @@ -84033,7 +84033,7 @@ var require_AvroReadableFromStream = __commonJS({ if (callbackChunk) { this._position += callbackChunk.length; cleanUp(); - resolve4(this.toUint8Array(callbackChunk)); + resolve5(this.toUint8Array(callbackChunk)); } }; const rejectCallback = () => { @@ -85513,8 +85513,8 @@ var require_poller3 = __commonJS({ this.stopped = true; this.pollProgressCallbacks = []; this.operation = operation; - this.promise = new Promise((resolve4, reject) => { - this.resolve = resolve4; + this.promise = new Promise((resolve5, reject) => { + this.resolve = resolve5; this.reject = reject; }); this.promise.catch(() => { @@ -85767,7 +85767,7 @@ var require_lroEngine = __commonJS({ * The method used by the poller to wait before attempting to update its operation. */ delay() { - return new Promise((resolve4) => setTimeout(() => resolve4(), this.config.intervalInMs)); + return new Promise((resolve5) => setTimeout(() => resolve5(), this.config.intervalInMs)); } }; exports2.LroEngine = LroEngine; @@ -86013,8 +86013,8 @@ var require_Batch = __commonJS({ return Promise.resolve(); } this.parallelExecute(); - return new Promise((resolve4, reject) => { - this.emitter.on("finish", resolve4); + return new Promise((resolve5, reject) => { + this.emitter.on("finish", resolve5); this.emitter.on("error", (error3) => { this.state = BatchStates.Error; reject(error3); @@ -86075,12 +86075,12 @@ var require_utils7 = __commonJS({ async function streamToBuffer(stream, buffer, offset, end, encoding) { let pos = 0; const count = end - offset; - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { const timeout = setTimeout(() => reject(new Error(`The operation cannot be completed in timeout.`)), constants_js_1.REQUEST_TIMEOUT); stream.on("readable", () => { if (pos >= count) { clearTimeout(timeout); - resolve4(); + resolve5(); return; } let chunk = stream.read(); @@ -86099,7 +86099,7 @@ var require_utils7 = __commonJS({ if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } - resolve4(); + resolve5(); }); stream.on("error", (msg) => { clearTimeout(timeout); @@ -86110,7 +86110,7 @@ var require_utils7 = __commonJS({ async function streamToBuffer2(stream, buffer, encoding) { let pos = 0; const bufferSize = buffer.length; - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { stream.on("readable", () => { let chunk = stream.read(); if (!chunk) { @@ -86127,25 +86127,25 @@ var require_utils7 = __commonJS({ pos += chunk.length; }); stream.on("end", () => { - resolve4(pos); + resolve5(pos); }); stream.on("error", reject); }); } async function streamToBuffer3(readableStream, encoding) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { const chunks = []; readableStream.on("data", (data) => { chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); }); readableStream.on("end", () => { - resolve4(Buffer.concat(chunks)); + resolve5(Buffer.concat(chunks)); }); readableStream.on("error", reject); }); } async function readStreamToLocalFile(rs, file) { - return new Promise((resolve4, reject) => { + return new Promise((resolve5, reject) => { const ws = node_fs_1.default.createWriteStream(file); rs.on("error", (err) => { reject(err); @@ -86153,7 +86153,7 @@ var require_utils7 = __commonJS({ ws.on("error", (err) => { reject(err); }); - ws.on("close", resolve4); + ws.on("close", resolve5); rs.pipe(ws); }); } @@ -87092,7 +87092,7 @@ var require_Clients = __commonJS({ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { - return new Promise((resolve4) => { + return new Promise((resolve5) => { if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } @@ -87103,7 +87103,7 @@ var require_Clients = __commonJS({ versionId: this._versionId, ...options }, this.credential).toString(); - resolve4((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -87142,7 +87142,7 @@ var require_Clients = __commonJS({ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateUserDelegationSasUrl(options, userDelegationKey) { - return new Promise((resolve4) => { + return new Promise((resolve5) => { const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ containerName: this._containerName, blobName: this._name, @@ -87150,7 +87150,7 @@ var require_Clients = __commonJS({ versionId: this._versionId, ...options }, userDelegationKey, this.accountName).toString(); - resolve4((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -89005,14 +89005,14 @@ var require_Mutex = __commonJS({ * @param key - lock key */ static async lock(key) { - return new Promise((resolve4) => { + return new Promise((resolve5) => { if (this.keys[key] === void 0 || this.keys[key] === MutexLockStatus.UNLOCKED) { this.keys[key] = MutexLockStatus.LOCKED; - resolve4(); + resolve5(); } else { this.onUnlockEvent(key, () => { this.keys[key] = MutexLockStatus.LOCKED; - resolve4(); + resolve5(); }); } }); @@ -89023,12 +89023,12 @@ var require_Mutex = __commonJS({ * @param key - */ static async unlock(key) { - return new Promise((resolve4) => { + return new Promise((resolve5) => { if (this.keys[key] === MutexLockStatus.LOCKED) { this.emitUnlockEvent(key); } delete this.keys[key]; - resolve4(); + resolve5(); }); } static keys = {}; @@ -89250,8 +89250,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 path5 = (0, utils_common_js_1.getURLPath)(subRequest.url); - if (!path5 || path5 === "") { + const path6 = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path6 || path6 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -89329,8 +89329,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 path5 = (0, utils_common_js_1.getURLPath)(url); - if (path5 && path5 !== "/") { + const path6 = (0, utils_common_js_1.getURLPath)(url); + if (path6 && path6 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -90631,7 +90631,7 @@ var require_ContainerClient = __commonJS({ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateSasUrl(options) { - return new Promise((resolve4) => { + return new Promise((resolve5) => { if (!(this.credential instanceof StorageSharedKeyCredential_js_1.StorageSharedKeyCredential)) { throw new RangeError("Can only generate the SAS when the client is initialized with a shared key credential"); } @@ -90639,7 +90639,7 @@ var require_ContainerClient = __commonJS({ containerName: this._containerName, ...options }, this.credential).toString(); - resolve4((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -90674,12 +90674,12 @@ var require_ContainerClient = __commonJS({ * @returns The SAS URI consisting of the URI to the resource represented by this client, followed by the generated SAS token. */ generateUserDelegationSasUrl(options, userDelegationKey) { - return new Promise((resolve4) => { + return new Promise((resolve5) => { const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ containerName: this._containerName, ...options }, userDelegationKey, this.accountName).toString(); - resolve4((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve5((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -92075,11 +92075,11 @@ var require_uploadUtils = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -92095,7 +92095,7 @@ var require_uploadUtils = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -92262,11 +92262,11 @@ var require_requestUtils = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -92282,7 +92282,7 @@ var require_requestUtils = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -92322,7 +92322,7 @@ var require_requestUtils = __commonJS({ } function sleep(milliseconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve4) => setTimeout(resolve4, milliseconds)); + return new Promise((resolve5) => setTimeout(resolve5, milliseconds)); }); } function retry2(name_1, method_1, getStatusCode_1) { @@ -92583,11 +92583,11 @@ var require_downloadUtils = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -92603,7 +92603,7 @@ var require_downloadUtils = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -92899,8 +92899,8 @@ var require_downloadUtils = __commonJS({ } var promiseWithTimeout = (timeoutMs, promise) => __awaiter2(void 0, void 0, void 0, function* () { let timeoutHandle; - const timeoutPromise = new Promise((resolve4) => { - timeoutHandle = setTimeout(() => resolve4("timeout"), timeoutMs); + const timeoutPromise = new Promise((resolve5) => { + timeoutHandle = setTimeout(() => resolve5("timeout"), timeoutMs); }); return Promise.race([promise, timeoutPromise]).then((result) => { clearTimeout(timeoutHandle); @@ -93181,11 +93181,11 @@ var require_cacheHttpClient = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -93201,7 +93201,7 @@ var require_cacheHttpClient = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -96671,8 +96671,8 @@ var require_deferred = __commonJS({ */ constructor(preventUnhandledRejectionWarning = true) { this._state = DeferredState.PENDING; - this._promise = new Promise((resolve4, reject) => { - this._resolve = resolve4; + this._promise = new Promise((resolve5, reject) => { + this._resolve = resolve5; this._reject = reject; }); if (preventUnhandledRejectionWarning) { @@ -96887,11 +96887,11 @@ var require_unary_call = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -96907,7 +96907,7 @@ var require_unary_call = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -96956,11 +96956,11 @@ var require_server_streaming_call = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -96976,7 +96976,7 @@ var require_server_streaming_call = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -97026,11 +97026,11 @@ var require_client_streaming_call = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -97046,7 +97046,7 @@ var require_client_streaming_call = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -97095,11 +97095,11 @@ var require_duplex_streaming_call = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -97115,7 +97115,7 @@ var require_duplex_streaming_call = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -97163,11 +97163,11 @@ var require_test_transport = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -97183,7 +97183,7 @@ var require_test_transport = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -97380,11 +97380,11 @@ var require_test_transport = __commonJS({ responseTrailer: "test" }; function delay2(ms, abort) { - return (v) => new Promise((resolve4, reject) => { + return (v) => new Promise((resolve5, reject) => { if (abort === null || abort === void 0 ? void 0 : abort.aborted) { reject(new rpc_error_1.RpcError("user cancel", "CANCELLED")); } else { - const id = setTimeout(() => resolve4(v), ms); + const id = setTimeout(() => resolve5(v), ms); if (abort) { abort.addEventListener("abort", (ev) => { clearTimeout(id); @@ -98382,11 +98382,11 @@ var require_cacheTwirpClient = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -98402,7 +98402,7 @@ var require_cacheTwirpClient = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -98542,7 +98542,7 @@ var require_cacheTwirpClient = __commonJS({ } sleep(milliseconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve4) => setTimeout(resolve4, milliseconds)); + return new Promise((resolve5) => setTimeout(resolve5, milliseconds)); }); } getExponentialRetryTimeMilliseconds(attempt) { @@ -98607,11 +98607,11 @@ var require_tar = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -98627,7 +98627,7 @@ var require_tar = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -98639,7 +98639,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io5 = __importStar2(require_io()); var fs_1 = require("fs"); - var path5 = __importStar2(require("path")); + var path6 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants12(); var IS_WINDOWS = process.platform === "win32"; @@ -98685,13 +98685,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(`\\${path5.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path5.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path5.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path6.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path6.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path6.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path5.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path5.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path6.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path6.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path5.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path6.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -98737,7 +98737,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path5.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path6.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -98746,7 +98746,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path5.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path6.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -98761,7 +98761,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path5.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path6.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -98770,7 +98770,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path5.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path6.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -98808,7 +98808,7 @@ var require_tar = __commonJS({ } function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path5.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path6.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -98859,11 +98859,11 @@ var require_cache5 = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -98879,7 +98879,7 @@ var require_cache5 = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -98890,7 +98890,7 @@ var require_cache5 = __commonJS({ exports2.restoreCache = restoreCache4; exports2.saveCache = saveCache4; var core14 = __importStar2(require_core()); - var path5 = __importStar2(require("path")); + var path6 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); @@ -98985,7 +98985,7 @@ var require_cache5 = __commonJS({ core14.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path5.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path6.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core14.isDebug()) { @@ -99054,7 +99054,7 @@ var require_cache5 = __commonJS({ core14.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path5.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path6.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); @@ -99116,7 +99116,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 = path5.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path6.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99180,7 +99180,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 = path5.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path6.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99297,11 +99297,11 @@ var require_manifest = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -99317,7 +99317,7 @@ var require_manifest = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -99445,11 +99445,11 @@ var require_retry_helper = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -99465,7 +99465,7 @@ var require_retry_helper = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -99510,7 +99510,7 @@ var require_retry_helper = __commonJS({ } sleep(seconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve4) => setTimeout(resolve4, seconds * 1e3)); + return new Promise((resolve5) => setTimeout(resolve5, seconds * 1e3)); }); } }; @@ -99561,11 +99561,11 @@ var require_tool_cache = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve4) { - resolve4(value); + return value instanceof P ? value : new P(function(resolve5) { + resolve5(value); }); } - return new (P || (P = Promise))(function(resolve4, reject) { + return new (P || (P = Promise))(function(resolve5, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -99581,7 +99581,7 @@ var require_tool_cache = __commonJS({ } } function step(result) { - result.done ? resolve4(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -99607,7 +99607,7 @@ var require_tool_cache = __commonJS({ var fs5 = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os2 = __importStar2(require("os")); - var path5 = __importStar2(require("path")); + var path6 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver9 = __importStar2(require_semver2()); var stream = __importStar2(require("stream")); @@ -99628,8 +99628,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 || path5.join(_getTempDirectory(), crypto2.randomUUID()); - yield io5.mkdirP(path5.dirname(dest)); + dest = dest || path6.join(_getTempDirectory(), crypto2.randomUUID()); + yield io5.mkdirP(path6.dirname(dest)); core14.debug(`Downloading ${url}`); core14.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -99719,7 +99719,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path5.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path6.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}'`; @@ -99891,7 +99891,7 @@ var require_tool_cache = __commonJS({ } const destPath = yield _createToolPath(tool, version, arch); for (const itemName of fs5.readdirSync(sourceDir)) { - const s = path5.join(sourceDir, itemName); + const s = path6.join(sourceDir, itemName); yield io5.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch); @@ -99908,7 +99908,7 @@ var require_tool_cache = __commonJS({ throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch); - const destPath = path5.join(destFolder, targetFile); + const destPath = path6.join(destFolder, targetFile); core14.debug(`destination file ${destPath}`); yield io5.cp(sourceFile, destPath); _completeToolPath(tool, version, arch); @@ -99931,7 +99931,7 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver9.clean(versionSpec) || ""; - const cachePath = path5.join(_getCacheDirectory(), toolName, versionSpec, arch); + const cachePath = path6.join(_getCacheDirectory(), toolName, versionSpec, arch); core14.debug(`checking cache: ${cachePath}`); if (fs5.existsSync(cachePath) && fs5.existsSync(`${cachePath}.complete`)) { core14.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); @@ -99945,12 +99945,12 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch) { const versions = []; arch = arch || os2.arch(); - const toolPath = path5.join(_getCacheDirectory(), toolName); + const toolPath = path6.join(_getCacheDirectory(), toolName); if (fs5.existsSync(toolPath)) { const children = fs5.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path5.join(toolPath, child, arch || ""); + const fullPath = path6.join(toolPath, child, arch || ""); if (fs5.existsSync(fullPath) && fs5.existsSync(`${fullPath}.complete`)) { versions.push(child); } @@ -100002,7 +100002,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path5.join(_getTempDirectory(), crypto2.randomUUID()); + dest = path6.join(_getTempDirectory(), crypto2.randomUUID()); } yield io5.mkdirP(dest); return dest; @@ -100010,7 +100010,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch) { return __awaiter2(this, void 0, void 0, function* () { - const folderPath = path5.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch || ""); + const folderPath = path6.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch || ""); core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io5.rmRF(folderPath); @@ -100020,7 +100020,7 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch) { - const folderPath = path5.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch || ""); + const folderPath = path6.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch || ""); const markerPath = `${folderPath}.complete`; fs5.writeFileSync(markerPath, ""); core14.debug("finished caching tool"); @@ -100540,8 +100540,8 @@ var require_follow_redirects = __commonJS({ } return parsed; } - function resolveUrl(relative2, base) { - return useNativeURL ? new URL2(relative2, base) : parseUrl2(url.resolve(base, relative2)); + function resolveUrl(relative3, base) { + return useNativeURL ? new URL2(relative3, base) : parseUrl2(url.resolve(base, relative3)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -100632,6 +100632,7 @@ var core13 = __toESM(require_core()); // src/actions-util.ts var fs = __toESM(require("fs")); +var path2 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); @@ -103428,8 +103429,8 @@ function getBaseDatabaseOidsFilePath(config) { } async function delay(milliseconds, opts) { const { allowProcessExit } = opts || {}; - return new Promise((resolve4) => { - const timer = setTimeout(resolve4, milliseconds); + return new Promise((resolve5) => { + const timer = setTimeout(resolve5, milliseconds); if (allowProcessExit) { timer.unref(); } @@ -103527,6 +103528,10 @@ function getTemporaryDirectory() { const value = process.env["CODEQL_ACTION_TEMP"]; return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } +var PR_DIFF_RANGE_JSON_FILENAME = "pr-diff-range.json"; +function getDiffRangesJsonFilePath() { + return path2.join(getTemporaryDirectory(), PR_DIFF_RANGE_JSON_FILENAME); +} function getActionVersion() { return "4.34.2"; } @@ -104064,7 +104069,7 @@ function wrapCliConfigurationError(cliError) { // src/config-utils.ts var fs3 = __toESM(require("fs")); -var path3 = __toESM(require("path")); +var path4 = __toESM(require("path")); var core9 = __toESM(require_core()); // src/analyses.ts @@ -104121,7 +104126,7 @@ var semver5 = __toESM(require_semver2()); // src/overlay/index.ts var fs2 = __toESM(require("fs")); -var path2 = __toESM(require("path")); +var path3 = __toESM(require("path")); var actionsCache = __toESM(require_cache5()); // src/git-utils.ts @@ -104227,8 +104232,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path5 = decodeGitFilePath(match[2]); - fileOidMap[path5] = oid; + const path6 = decodeGitFilePath(match[2]); + fileOidMap[path6] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -104343,7 +104348,7 @@ async function writeOverlayChangesFile(config, sourceRoot, logger) { const diffRangeFiles = await getDiffRangeFilePaths(sourceRoot, logger); const changedFiles = [.../* @__PURE__ */ new Set([...oidChangedFiles, ...diffRangeFiles])]; const changedFilesJson = JSON.stringify({ changes: changedFiles }); - const overlayChangesFile = path2.join( + const overlayChangesFile = path3.join( getTemporaryDirectory(), "overlay-changes.json" ); @@ -104368,13 +104373,16 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { return changes; } async function getDiffRangeFilePaths(sourceRoot, logger) { - const jsonFilePath = path2.join(getTemporaryDirectory(), "pr-diff-range.json"); - if (!fs2.existsSync(jsonFilePath)) { + const jsonFilePath = getDiffRangesJsonFilePath(); + let contents; + try { + contents = await fs2.promises.readFile(jsonFilePath, "utf8"); + } catch { return []; } let diffRanges; try { - diffRanges = JSON.parse(fs2.readFileSync(jsonFilePath, "utf8")); + diffRanges = JSON.parse(contents); } catch (e) { logger.warning( `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` @@ -104384,30 +104392,17 @@ async function getDiffRangeFilePaths(sourceRoot, logger) { logger.debug( `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.` ); - const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === void 0) { logger.warning( "Cannot determine git root; returning diff range paths as-is." ); - return repoRelativePaths; + return [...new Set(diffRanges.map((r) => r.path))]; } - const sourceRootRelPrefix = path2.relative(repoRoot, sourceRoot).replaceAll(path2.sep, "/"); - if (sourceRootRelPrefix === "") { - return repoRelativePaths; - } - const prefixWithSlash = `${sourceRootRelPrefix}/`; - const result = []; - for (const p of repoRelativePaths) { - if (p.startsWith(prefixWithSlash)) { - result.push(p.slice(prefixWithSlash.length)); - } else { - logger.debug( - `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").` - ); - } - } - return result; + const relativePaths = diffRanges.map( + (r) => path3.relative(sourceRoot, path3.join(repoRoot, r.path)).replaceAll(path3.sep, "/") + ).filter((rel) => !rel.startsWith("..")); + return [...new Set(relativePaths)]; } // src/tools-features.ts @@ -104663,7 +104658,7 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = { ruby: "overlay_analysis_code_scanning_ruby" /* OverlayAnalysisCodeScanningRuby */ }; function getPathToParsedConfigFile(tempDir) { - return path3.join(tempDir, "config"); + return path4.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); @@ -104707,7 +104702,7 @@ function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) { // src/codeql.ts var fs4 = __toESM(require("fs")); -var path4 = __toESM(require("path")); +var path5 = __toESM(require("path")); var core11 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -104784,7 +104779,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path4.join( + const tracingConfigPath = path5.join( extractorPath, "tools", "tracing-config.lua" @@ -104866,7 +104861,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path4.join( + const autobuildCmd = path5.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -105288,7 +105283,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path4.resolve(config.tempDir, "user-config.yaml"); + return path5.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; diff --git a/lib/setup-codeql-action.js b/lib/setup-codeql-action.js index 25807f6acc..bbb235feb8 100644 --- a/lib/setup-codeql-action.js +++ b/lib/setup-codeql-action.js @@ -103624,6 +103624,10 @@ function getTemporaryDirectory() { const value = process.env["CODEQL_ACTION_TEMP"]; return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } +var PR_DIFF_RANGE_JSON_FILENAME = "pr-diff-range.json"; +function getDiffRangesJsonFilePath() { + return path2.join(getTemporaryDirectory(), PR_DIFF_RANGE_JSON_FILENAME); +} function getActionVersion() { return "4.34.2"; } @@ -104260,13 +104264,16 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { return changes; } async function getDiffRangeFilePaths(sourceRoot, logger) { - const jsonFilePath = path3.join(getTemporaryDirectory(), "pr-diff-range.json"); - if (!fs3.existsSync(jsonFilePath)) { + const jsonFilePath = getDiffRangesJsonFilePath(); + let contents; + try { + contents = await fs3.promises.readFile(jsonFilePath, "utf8"); + } catch { return []; } let diffRanges; try { - diffRanges = JSON.parse(fs3.readFileSync(jsonFilePath, "utf8")); + diffRanges = JSON.parse(contents); } catch (e) { logger.warning( `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` @@ -104276,30 +104283,17 @@ async function getDiffRangeFilePaths(sourceRoot, logger) { logger.debug( `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.` ); - const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === void 0) { logger.warning( "Cannot determine git root; returning diff range paths as-is." ); - return repoRelativePaths; + return [...new Set(diffRanges.map((r) => r.path))]; } - const sourceRootRelPrefix = path3.relative(repoRoot, sourceRoot).replaceAll(path3.sep, "/"); - if (sourceRootRelPrefix === "") { - return repoRelativePaths; - } - const prefixWithSlash = `${sourceRootRelPrefix}/`; - const result = []; - for (const p of repoRelativePaths) { - if (p.startsWith(prefixWithSlash)) { - result.push(p.slice(prefixWithSlash.length)); - } else { - logger.debug( - `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").` - ); - } - } - return result; + const relativePaths = diffRanges.map( + (r) => path3.relative(sourceRoot, path3.join(repoRoot, r.path)).replaceAll(path3.sep, "/") + ).filter((rel) => !rel.startsWith("..")); + return [...new Set(relativePaths)]; } // src/tools-features.ts diff --git a/lib/upload-lib.js b/lib/upload-lib.js index 4b0cfa3454..97be959c0e 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 path12 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path11 = 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 (path11 && path11[0] !== "/") { + path11 = `/${path11}`; } - return new URL(`${origin}${path12}`); + return new URL(`${origin}${path11}`); } 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: path11, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path12); + debuglog("sending request to %s %s/%s", method, origin, path11); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path12, origin }, + request: { method, path: path11, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path12, + path11, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path12, origin } + request: { method, path: path11, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path12); + debuglog("trailers received from %s %s/%s", method, origin, path11); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path12, origin }, + request: { method, path: path11, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path12, + path11, 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: path11, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path12); + debuglog("sending request to %s %s/%s", method, origin, path11); }); } 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: path11, method, body, headers, @@ -1956,11 +1956,11 @@ var require_request = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path12 !== "string") { + if (typeof path11 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path12[0] !== "/" && !(path12.startsWith("http://") || path12.startsWith("https://")) && method !== "CONNECT") { + } else if (path11[0] !== "/" && !(path11.startsWith("http://") || path11.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(path11)) { 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(path11, query) : path11; 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: path11, 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} ${path11} 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: path11, 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] = path11; 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 path11 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path12; + this.opts.path = path11; 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: path11 = "/", headers = {} } = opts; - opts.path = origin + path12; + opts.path = origin + path11; 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(path11) { + if (typeof path11 !== "string") { + return path11; } - const pathSegments = path12.split("?"); + const pathSegments = path11.split("?"); if (pathSegments.length !== 2) { - return path12; + return path11; } 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: path11, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path11); 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: path11 }) => matchValue(safeUrl(path11), 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: path11, method, body, headers, query } = opts; return { - path: path12, + path: path11, 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: path11, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path12, + Path: path11, "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(path11) { + for (let i = 0; i < path11.length; ++i) { + const code = path11.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 path11 = opts.path; if (!opts.path.startsWith("/")) { - path12 = `/${path12}`; + path11 = `/${path11}`; } - url2 = new URL(util.parseOrigin(url2).origin + path12); + url2 = new URL(util.parseOrigin(url2).origin + path11); } 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 path11 = __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, path11.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 path11 = __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 = path11.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 = path11.dirname(filePath); + const upperName = path11.basename(filePath).toUpperCase(); for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path12.join(directory, actualName); + filePath = path11.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 path11 = __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 ? path11.join(dest, path11.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 (path11.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 = path12.join(dest, path12.basename(source)); + dest = path11.join(dest, path11.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -20363,7 +20363,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path12.dirname(dest)); + yield mkdirP(path11.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(path11.delimiter)) { if (extension) { extensions.push(extension); } @@ -20435,12 +20435,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path12.sep)) { + if (tool.includes(path11.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(path11.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(path11.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 path12 = __importStar2(require("path")); + var path11 = __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 = path11.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 path12 = __importStar2(require("path")); + var path11 = __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}${path11.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, 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, path11, name, argument) { + if (Array.isArray(path11)) { + this.path = path11; + this.property = path11.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path12 !== void 0) { - this.property = path12; + } else if (path11 !== void 0) { + this.property = path11; } 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, path12, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path11, 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(path11)) { + this.path = path11; + this.propertyPath = path11.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path12; + this.propertyPath = path11; } 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 path12 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path11 = 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, path11, 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 path12 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path12} does not exist${os_1.EOL}`); + const path11 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path11} 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 path12 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path11 = 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 (path11 && path11[0] !== "/") { + path11 = `/${path11}`; } - return new URL(`${origin}${path12}`); + return new URL(`${origin}${path11}`); } 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: path12, origin } + request: { method, path: path11, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path12); + debuglog("sending request to %s %s/%s", method, origin, path11); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path12, origin }, + request: { method, path: path11, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path12, + path11, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path12, origin } + request: { method, path: path11, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path12); + debuglog("trailers received from %s %s/%s", method, origin, path11); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path12, origin }, + request: { method, path: path11, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path12, + path11, error3.message ); }); @@ -24171,9 +24171,9 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path12, origin } + request: { method, path: path11, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path12); + debuglog("sending request to %s %s/%s", method, origin, path11); }); } 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: path12, + path: path11, method, body, headers, @@ -24251,11 +24251,11 @@ var require_request3 = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path12 !== "string") { + if (typeof path11 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path12[0] !== "/" && !(path12.startsWith("http://") || path12.startsWith("https://")) && method !== "CONNECT") { + } else if (path11[0] !== "/" && !(path11.startsWith("http://") || path11.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(path11)) { 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(path12, query) : path12; + this.path = query ? buildURL(path11, query) : path11; 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: path12, host, upgrade, blocking, reset } = request2; + const { method, path: path11, 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} ${path12} HTTP/1.1\r + let header = `${method} ${path11} 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: path12, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path11, 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] = path12; + headers[HTTP2_HEADER_PATH] = path11; 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 path12 = search ? `${pathname}${search}` : pathname; + const path11 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path12; + this.opts.path = path11; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -31079,10 +31079,10 @@ var require_proxy_agent2 = __commonJS({ }; const { origin, - path: path12 = "/", + path: path11 = "/", headers = {} } = opts; - opts.path = origin + path12; + opts.path = origin + path11; 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(path12) { - if (typeof path12 !== "string") { - return path12; + function safeUrl(path11) { + if (typeof path11 !== "string") { + return path11; } - const pathSegments = path12.split("?"); + const pathSegments = path11.split("?"); if (pathSegments.length !== 2) { - return path12; + return path11; } 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: path11, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path11); 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: path12 }) => matchValue(safeUrl(path12), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path11 }) => matchValue(safeUrl(path11), 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: path12, method, body, headers, query } = opts; + const { path: path11, method, body, headers, query } = opts; return { - path: path12, + path: path11, method, body, headers, @@ -33541,10 +33541,10 @@ var require_pending_interceptors_formatter2 = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path12, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path11, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path12, + Path: path11, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -38425,9 +38425,9 @@ var require_util14 = __commonJS({ } } } - function validateCookiePath(path12) { - for (let i = 0; i < path12.length; ++i) { - const code = path12.charCodeAt(i); + function validateCookiePath(path11) { + for (let i = 0; i < path11.length; ++i) { + const code = path11.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 path12 = opts.path; + let path11 = opts.path; if (!opts.path.startsWith("/")) { - path12 = `/${path12}`; + path11 = `/${path11}`; } - url2 = new URL(util.parseOrigin(url2).origin + path12); + url2 = new URL(util.parseOrigin(url2).origin + path11); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -48727,7 +48727,7 @@ var require_internal_path_helper = __commonJS({ exports2.hasRoot = hasRoot; exports2.normalizeSeparators = normalizeSeparators; exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - var path12 = __importStar2(require("path")); + var path11 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -48735,7 +48735,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path12.dirname(p); + let result = path11.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -48772,7 +48772,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 += path11.sep; } return root + itemPath; } @@ -48806,10 +48806,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path12.sep)) { + if (!p.endsWith(path11.sep)) { return p; } - if (p === path12.sep) { + if (p === path11.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -49154,7 +49154,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path12 = (function() { + var path11 = (function() { try { return require("path"); } catch (e) { @@ -49162,7 +49162,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path12.sep; + minimatch.sep = path11.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand2 = require_brace_expansion(); var plTypes = { @@ -49251,8 +49251,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 && path11.sep !== "/") { + pattern = pattern.split(path11.sep).join("/"); } this.options = options; this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200; @@ -49623,8 +49623,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 (path11.sep !== "/") { + f = f.split(path11.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -49867,7 +49867,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path12 = __importStar2(require("path")); + var path11 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -49882,12 +49882,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(path11.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path12.basename(remaining); + const basename = path11.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -49905,7 +49905,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(path11.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -49916,12 +49916,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(path11.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 += path11.sep; } result += this.segments[i]; } @@ -49979,7 +49979,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os2 = __importStar2(require("os")); - var path12 = __importStar2(require("path")); + var path11 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); @@ -50008,7 +50008,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(path11.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -50032,8 +50032,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(path11.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path11.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -50068,9 +50068,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(`.${path11.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path12.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path11.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}'`); @@ -50154,8 +50154,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(path11, level) { + this.path = path11; this.level = level; } }; @@ -50299,7 +50299,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 path11 = __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(); @@ -50375,7 +50375,7 @@ var require_internal_globber = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path12.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path11.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -50385,7 +50385,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(path11.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); @@ -50547,7 +50547,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 path11 = __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; @@ -50563,7 +50563,7 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path12.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path11.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } @@ -51949,7 +51949,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 path11 = __importStar2(require("path")); var semver9 = __importStar2(require_semver3()); var util = __importStar2(require("util")); var constants_1 = require_constants12(); @@ -51969,9 +51969,9 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path12.join(baseLocation, "actions", "temp"); + tempDirectory = path11.join(baseLocation, "actions", "temp"); } - const dest = path12.join(tempDirectory, crypto2.randomUUID()); + const dest = path11.join(tempDirectory, crypto2.randomUUID()); yield io6.mkdirP(dest); return dest; }); @@ -51993,7 +51993,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 = path11.relative(workspace, file).replace(new RegExp(`\\${path11.sep}`, "g"), "/"); core14.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -52520,13 +52520,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(path11, preserveJsx) { + if (typeof path11 === "string" && /^\.\.?\//.test(path11)) { + return path11.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 path11; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -56940,8 +56940,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 = (path11, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path11, args, { allowInsecureConnection, ...requestOptions }); return { get: (requestOptions = {}) => { return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); @@ -60812,15 +60812,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 path11 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path11.startsWith("/")) { + path11 = path11.substring(1); } - if (isAbsoluteUrl(path12)) { - requestUrl = path12; + if (isAbsoluteUrl(path11)) { + requestUrl = path11; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path12); + requestUrl = appendPath(requestUrl, path11); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -60866,9 +60866,9 @@ var require_urlHelpers2 = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path12 = pathToAppend.substring(0, searchStart); + const path11 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path12; + newPath = newPath + path11; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -63545,10 +63545,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 path11 = urlParsed.pathname; + path11 = path11 || "/"; + path11 = escape(path11); + urlParsed.pathname = path11; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -63633,9 +63633,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 path11 = urlParsed.pathname; + path11 = path11 ? path11.endsWith("/") ? `${path11}${name}` : `${path11}/${name}` : name; + urlParsed.pathname = path11; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -64862,9 +64862,9 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path12 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path11 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path12}`; + canonicalizedResourceString += `/${this.factory.accountName}${path11}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -65603,10 +65603,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 path11 = urlParsed.pathname; + path11 = path11 || "/"; + path11 = escape(path11); + urlParsed.pathname = path11; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -65691,9 +65691,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 path11 = urlParsed.pathname; + path11 = path11 ? path11.endsWith("/") ? `${path11}${name}` : `${path11}/${name}` : name; + urlParsed.pathname = path11; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -66614,9 +66614,9 @@ var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path12 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path11 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path12}`; + canonicalizedResourceString += `/${this.factory.accountName}${path11}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67246,9 +67246,9 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path12 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path11 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path12}`; + canonicalizedResourceString += `/${options.accountName}${path11}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67593,9 +67593,9 @@ var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path12 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path11 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path12}`; + canonicalizedResourceString += `/${options.accountName}${path11}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -89250,8 +89250,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 path11 = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path11 || path11 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -89329,8 +89329,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 path11 = (0, utils_common_js_1.getURLPath)(url2); + if (path11 && path11 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -98639,7 +98639,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 path11 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants12(); var IS_WINDOWS = process.platform === "win32"; @@ -98685,13 +98685,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(`\\${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); 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(`\\${path11.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path11.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(`\\${path11.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -98737,7 +98737,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(`\\${path11.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -98746,7 +98746,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(`\\${path11.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -98761,7 +98761,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(`\\${path11.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -98770,7 +98770,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(`\\${path11.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -98808,7 +98808,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)(path11.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -98890,7 +98890,7 @@ var require_cache5 = __commonJS({ exports2.restoreCache = restoreCache4; exports2.saveCache = saveCache4; var core14 = __importStar2(require_core()); - var path12 = __importStar2(require("path")); + var path11 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); @@ -98985,7 +98985,7 @@ var require_cache5 = __commonJS({ core14.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path12.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path11.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core14.isDebug()) { @@ -99054,7 +99054,7 @@ var require_cache5 = __commonJS({ core14.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path12.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path11.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); @@ -99116,7 +99116,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 = path11.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99180,7 +99180,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 = path11.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99607,7 +99607,7 @@ var require_tool_cache = __commonJS({ var fs13 = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os2 = __importStar2(require("os")); - var path12 = __importStar2(require("path")); + var path11 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver9 = __importStar2(require_semver2()); var stream2 = __importStar2(require("stream")); @@ -99628,8 +99628,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 || path11.join(_getTempDirectory(), crypto2.randomUUID()); + yield io6.mkdirP(path11.dirname(dest)); core14.debug(`Downloading ${url2}`); core14.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -99719,7 +99719,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 = path11.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}'`; @@ -99891,7 +99891,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 = path11.join(sourceDir, itemName); yield io6.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -99908,7 +99908,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 = path11.join(destFolder, targetFile); core14.debug(`destination file ${destPath}`); yield io6.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -99931,7 +99931,7 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver9.clean(versionSpec) || ""; - const cachePath = path12.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path11.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}`); @@ -99945,12 +99945,12 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os2.arch(); - const toolPath = path12.join(_getCacheDirectory(), toolName); + const toolPath = path11.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 = path11.join(toolPath, child, arch2 || ""); if (fs13.existsSync(fullPath) && fs13.existsSync(`${fullPath}.complete`)) { versions.push(child); } @@ -100002,7 +100002,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 = path11.join(_getTempDirectory(), crypto2.randomUUID()); } yield io6.mkdirP(dest); return dest; @@ -100010,7 +100010,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 = path11.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io6.rmRF(folderPath); @@ -100020,7 +100020,7 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path12.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path11.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; fs13.writeFileSync(markerPath, ""); core14.debug("finished caching tool"); @@ -103547,7 +103547,7 @@ __export(upload_lib_exports, { }); module.exports = __toCommonJS(upload_lib_exports); var fs12 = __toESM(require("fs")); -var path11 = __toESM(require("path")); +var path10 = __toESM(require("path")); var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core13 = __toESM(require_core()); @@ -106420,6 +106420,10 @@ function getTemporaryDirectory() { const value = process.env["CODEQL_ACTION_TEMP"]; return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } +var PR_DIFF_RANGE_JSON_FILENAME = "pr-diff-range.json"; +function getDiffRangesJsonFilePath() { + return path2.join(getTemporaryDirectory(), PR_DIFF_RANGE_JSON_FILENAME); +} function getActionVersion() { return "4.34.2"; } @@ -106869,7 +106873,7 @@ function wrapApiConfigurationError(e) { // src/codeql.ts var fs9 = __toESM(require("fs")); -var path9 = __toESM(require("path")); +var path8 = __toESM(require("path")); var core11 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -107117,7 +107121,7 @@ function wrapCliConfigurationError(cliError) { // src/config-utils.ts var fs5 = __toESM(require("fs")); -var path6 = __toESM(require("path")); +var path5 = __toESM(require("path")); var core9 = __toESM(require_core()); // src/caching-utils.ts @@ -107234,7 +107238,6 @@ function writeDiagnostic(config, language, diagnostic) { // src/diff-informed-analysis-utils.ts var fs4 = __toESM(require("fs")); -var path5 = __toESM(require("path")); // src/feature-flags.ts var semver5 = __toESM(require_semver2()); @@ -107385,8 +107388,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 path11 = decodeGitFilePath(match[2]); + fileOidMap[path11] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -107526,13 +107529,16 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { return changes; } async function getDiffRangeFilePaths(sourceRoot, logger) { - const jsonFilePath = path4.join(getTemporaryDirectory(), "pr-diff-range.json"); - if (!fs3.existsSync(jsonFilePath)) { + const jsonFilePath = getDiffRangesJsonFilePath(); + let contents; + try { + contents = await fs3.promises.readFile(jsonFilePath, "utf8"); + } catch { return []; } let diffRanges; try { - diffRanges = JSON.parse(fs3.readFileSync(jsonFilePath, "utf8")); + diffRanges = JSON.parse(contents); } catch (e) { logger.warning( `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` @@ -107542,30 +107548,17 @@ async function getDiffRangeFilePaths(sourceRoot, logger) { logger.debug( `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.` ); - const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === void 0) { logger.warning( "Cannot determine git root; returning diff range paths as-is." ); - return repoRelativePaths; + return [...new Set(diffRanges.map((r) => r.path))]; } - const sourceRootRelPrefix = path4.relative(repoRoot, sourceRoot).replaceAll(path4.sep, "/"); - if (sourceRootRelPrefix === "") { - return repoRelativePaths; - } - const prefixWithSlash = `${sourceRootRelPrefix}/`; - const result = []; - for (const p of repoRelativePaths) { - if (p.startsWith(prefixWithSlash)) { - result.push(p.slice(prefixWithSlash.length)); - } else { - logger.debug( - `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").` - ); - } - } - return result; + const relativePaths = diffRanges.map( + (r) => path4.relative(sourceRoot, path4.join(repoRoot, r.path)).replaceAll(path4.sep, "/") + ).filter((rel) => !rel.startsWith("..")); + return [...new Set(relativePaths)]; } // src/tools-features.ts @@ -107792,9 +107785,6 @@ var featureConfig = { }; // src/diff-informed-analysis-utils.ts -function getDiffRangesJsonFilePath() { - return path5.join(getTemporaryDirectory(), "pr-diff-range.json"); -} function readDiffRangesJsonFile(logger) { const jsonFilePath = getDiffRangesJsonFilePath(); if (!fs4.existsSync(jsonFilePath)) { @@ -107847,7 +107837,7 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = { ruby: "overlay_analysis_code_scanning_ruby" /* OverlayAnalysisCodeScanningRuby */ }; function getPathToParsedConfigFile(tempDir) { - return path6.join(tempDir, "config"); + return path5.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); @@ -107891,7 +107881,7 @@ function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) { // src/setup-codeql.ts var fs8 = __toESM(require("fs")); -var path8 = __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()); @@ -108111,7 +108101,7 @@ function inferCompressionMethod(tarPath) { // src/tools-download.ts var fs7 = __toESM(require("fs")); var os = __toESM(require("os")); -var path7 = __toESM(require("path")); +var path6 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core10 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -108244,7 +108234,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path7.join( + return path6.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver7.clean(version) || version, @@ -108388,7 +108378,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(path8.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs8.existsSync(path7.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -108787,7 +108777,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path8.join(tempDir, v4_default()); + return path7.join(tempDir, v4_default()); } async function getNightlyToolsUrl(logger) { const zstdAvailability = await isZstdAvailable(logger); @@ -108874,7 +108864,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path9.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") { @@ -108936,7 +108926,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path9.join( + const tracingConfigPath = path8.join( extractorPath, "tools", "tracing-config.lua" @@ -109018,7 +109008,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path9.join( + const autobuildCmd = path8.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -109440,7 +109430,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path9.resolve(config.tempDir, "user-config.yaml"); + return path8.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -110764,10 +110754,10 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo ); codeQL = initCodeQLResult.codeql; } - const baseTempDir = path11.resolve(tempDir, "combined-sarif"); + const baseTempDir = path10.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(path10.resolve(baseTempDir, "output-")); + const outputFile = path10.resolve(outputDirectory, "combined-sarif.sarif"); await codeQL.mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory: true }); @@ -110800,7 +110790,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 = path10.join( getTemporaryDirectory(), `payload-${analysis.kind}.json` ); @@ -110845,9 +110835,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(path10.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - walkSarifFiles(path11.resolve(dir, entry.name)); + walkSarifFiles(path10.resolve(dir, entry.name)); } } }; @@ -110880,7 +110870,7 @@ async function getGroupedSarifFilePaths(logger, sarifPath) { if (stats.isDirectory()) { let unassignedSarifFiles = findSarifFilesInDir( sarifPath, - (name) => path11.extname(name) === ".sarif" + (name) => path10.extname(name) === ".sarif" ); logger.debug( `Found the following .sarif files in ${sarifPath}: ${unassignedSarifFiles.join(", ")}` @@ -111148,7 +111138,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 = path10.resolve( outputDir, `upload${uploadTarget.sarifExtension}` ); diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index 5f495c7b41..6b6d24bfe6 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 path13 = 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 (path13 && path13[0] !== "/") { - path13 = `/${path13}`; + if (path12 && path12[0] !== "/") { + path12 = `/${path12}`; } - return new URL(`${origin}${path13}`); + 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: path13, origin } + request: { method, path: path12, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path13); + debuglog("sending request to %s %s/%s", method, origin, path12); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path13, origin }, + request: { method, path: path12, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path13, + path12, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path13, origin } + request: { method, path: path12, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path13); + debuglog("trailers received from %s %s/%s", method, origin, path12); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path13, origin }, + request: { method, path: path12, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path13, + path12, error3.message ); }); @@ -1876,9 +1876,9 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path13, origin } + request: { method, path: path12, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path13); + 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: path13, + path: path12, method, body, headers, @@ -1956,11 +1956,11 @@ var require_request = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path13 !== "string") { + if (typeof path12 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path13[0] !== "/" && !(path13.startsWith("http://") || path13.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(path13)) { + } 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(path13, query) : path13; + 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: path13, 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} ${path13} 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: path13, 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] = path13; + 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 path13 = 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 = path13; + 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: path13 = "/", + path: path12 = "/", headers = {} } = opts; - opts.path = origin + path13; + 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(path13) { - if (typeof path13 !== "string") { - return path13; + function safeUrl(path12) { + if (typeof path12 !== "string") { + return path12; } - const pathSegments = path13.split("?"); + const pathSegments = path12.split("?"); if (pathSegments.length !== 2) { - return path13; + return path12; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path13, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path13); + 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: path13 }) => matchValue(safeUrl(path13), 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: path13, method, body, headers, query } = opts; + const { path: path12, method, body, headers, query } = opts; return { - path: path13, + path: path12, method, body, headers, @@ -11246,10 +11246,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path13, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path12, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path13, + Path: path12, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -16130,9 +16130,9 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path13) { - for (let i = 0; i < path13.length; ++i) { - const code = path13.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 path13 = opts.path; + let path12 = opts.path; if (!opts.path.startsWith("/")) { - path13 = `/${path13}`; + path12 = `/${path12}`; } - url2 = new URL(util.parseOrigin(url2).origin + path13); + 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 path13 = __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, path13.sep); + return pth.replace(/[/\\]/g, path12.sep); } } }); @@ -20124,7 +20124,7 @@ var require_io_util = __commonJS({ exports2.tryGetExecutablePath = tryGetExecutablePath; exports2.getCmdPath = getCmdPath; var fs14 = __importStar2(require("fs")); - var path13 = __importStar2(require("path")); + var path12 = __importStar2(require("path")); _a = fs14.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 = path13.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 = path13.dirname(filePath); - const upperName = path13.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 = path13.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 path13 = __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 ? path13.join(dest, path13.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 (path13.relative(source, newDest) === "") { + if (path12.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 = path13.join(dest, path13.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(path13.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(path13.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(path13.sep)) { + if (tool.includes(path12.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path13.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(path13.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 os3 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path13 = __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 = path13.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 os3 = __importStar2(require("os")); - var path13 = __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}${path13.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()}`] || ""; @@ -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 path13 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path13} 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; @@ -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 path13 = 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 (path13 && path13[0] !== "/") { - path13 = `/${path13}`; + if (path12 && path12[0] !== "/") { + path12 = `/${path12}`; } - return new URL(`${origin}${path13}`); + 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:`."); @@ -22793,39 +22793,39 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path13, origin } + request: { method, path: path12, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path13); + debuglog("sending request to %s %s/%s", method, origin, path12); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path13, origin }, + request: { method, path: path12, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path13, + path12, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path13, origin } + request: { method, path: path12, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path13); + debuglog("trailers received from %s %s/%s", method, origin, path12); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path13, origin }, + request: { method, path: path12, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path13, + path12, error3.message ); }); @@ -22874,9 +22874,9 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path13, origin } + request: { method, path: path12, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path13); + debuglog("sending request to %s %s/%s", method, origin, path12); }); } 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: path13, + path: path12, method, body, headers, @@ -22954,11 +22954,11 @@ var require_request3 = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path13 !== "string") { + if (typeof path12 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path13[0] !== "/" && !(path13.startsWith("http://") || path13.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(path13)) { + } else if (invalidPathRegex.test(path12)) { 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(path13, query) : path13; + 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; @@ -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: path13, 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)) { @@ -27600,7 +27600,7 @@ var require_client_h12 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path13} HTTP/1.1\r + let header = `${method} ${path12} 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: path13, 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")); @@ -28193,7 +28193,7 @@ var require_client_h22 = __commonJS({ }); return true; } - headers[HTTP2_HEADER_PATH] = path13; + headers[HTTP2_HEADER_PATH] = path12; 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 path13 = 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 = path13; + this.opts.path = path12; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -29782,10 +29782,10 @@ var require_proxy_agent2 = __commonJS({ }; const { origin, - path: path13 = "/", + path: path12 = "/", headers = {} } = opts; - opts.path = origin + path13; + opts.path = origin + path12; 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(path13) { - if (typeof path13 !== "string") { - return path13; + function safeUrl(path12) { + if (typeof path12 !== "string") { + return path12; } - const pathSegments = path13.split("?"); + const pathSegments = path12.split("?"); if (pathSegments.length !== 2) { - return path13; + return path12; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path13, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path13); + 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); @@ -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: path13 }) => matchValue(safeUrl(path13), 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}'`); } @@ -31779,9 +31779,9 @@ var require_mock_utils2 = __commonJS({ } } function buildKey(opts) { - const { path: path13, method, body, headers, query } = opts; + const { path: path12, method, body, headers, query } = opts; return { - path: path13, + path: path12, method, body, headers, @@ -32244,10 +32244,10 @@ var require_pending_interceptors_formatter2 = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path13, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path12, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path13, + Path: path12, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -37128,9 +37128,9 @@ var require_util14 = __commonJS({ } } } - function validateCookiePath(path13) { - for (let i = 0; i < path13.length; ++i) { - const code = path13.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) { @@ -39724,11 +39724,11 @@ var require_undici2 = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path13 = opts.path; + let path12 = opts.path; if (!opts.path.startsWith("/")) { - path13 = `/${path13}`; + path12 = `/${path12}`; } - url2 = new URL(util.parseOrigin(url2).origin + path13); + url2 = new URL(util.parseOrigin(url2).origin + path12); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -47430,7 +47430,7 @@ var require_internal_path_helper = __commonJS({ exports2.hasRoot = hasRoot; exports2.normalizeSeparators = normalizeSeparators; exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - var path13 = __importStar2(require("path")); + var path12 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -47438,7 +47438,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path13.dirname(p); + let result = path12.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -47475,7 +47475,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 += path13.sep; + root += path12.sep; } return root + itemPath; } @@ -47509,10 +47509,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path13.sep)) { + if (!p.endsWith(path12.sep)) { return p; } - if (p === path13.sep) { + if (p === path12.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -47857,7 +47857,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path13 = (function() { + var path12 = (function() { try { return require("path"); } catch (e) { @@ -47865,7 +47865,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path13.sep; + minimatch.sep = path12.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand2 = require_brace_expansion(); var plTypes = { @@ -47954,8 +47954,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path13.sep !== "/") { - pattern = pattern.split(path13.sep).join("/"); + if (!options.allowWindowsEscape && path12.sep !== "/") { + pattern = pattern.split(path12.sep).join("/"); } this.options = options; this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200; @@ -48326,8 +48326,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path13.sep !== "/") { - f = f.split(path13.sep).join("/"); + if (path12.sep !== "/") { + f = f.split(path12.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -48570,7 +48570,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path13 = __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"; @@ -48585,12 +48585,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(path13.sep); + this.segments = itemPath.split(path12.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path13.basename(remaining); + const basename = path12.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -48608,7 +48608,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(path13.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); } } @@ -48619,12 +48619,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path13.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 += path13.sep; + result += path12.sep; } result += this.segments[i]; } @@ -48682,7 +48682,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os3 = __importStar2(require("os")); - var path13 = __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(); @@ -48711,7 +48711,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(path13.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 === "")); @@ -48735,8 +48735,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path13.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path13.sep}`; + if (!itemPath.endsWith(path12.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path12.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -48771,9 +48771,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(`.${path13.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path12.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path13.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path12.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}'`); @@ -48857,8 +48857,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path13, level) { - this.path = path13; + constructor(path12, level) { + this.path = path12; this.level = level; } }; @@ -49002,7 +49002,7 @@ var require_internal_globber = __commonJS({ var core16 = __importStar2(require_core()); var fs14 = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); - var path13 = __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(); @@ -49078,7 +49078,7 @@ var require_internal_globber = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path13.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path12.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -49088,7 +49088,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await2(fs14.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path13.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs14.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); @@ -49250,7 +49250,7 @@ var require_internal_hash_files = __commonJS({ var fs14 = __importStar2(require("fs")); var stream2 = __importStar2(require("stream")); var util = __importStar2(require("util")); - var path13 = __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; @@ -49266,7 +49266,7 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path13.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path12.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } @@ -50652,7 +50652,7 @@ var require_cacheUtils = __commonJS({ var io6 = __importStar2(require_io()); var crypto2 = __importStar2(require("crypto")); var fs14 = __importStar2(require("fs")); - var path13 = __importStar2(require("path")); + var path12 = __importStar2(require("path")); var semver9 = __importStar2(require_semver3()); var util = __importStar2(require("util")); var constants_1 = require_constants12(); @@ -50672,9 +50672,9 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path13.join(baseLocation, "actions", "temp"); + tempDirectory = path12.join(baseLocation, "actions", "temp"); } - const dest = path13.join(tempDirectory, crypto2.randomUUID()); + const dest = path12.join(tempDirectory, crypto2.randomUUID()); yield io6.mkdirP(dest); return dest; }); @@ -50696,7 +50696,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path13.relative(workspace, file).replace(new RegExp(`\\${path13.sep}`, "g"), "/"); + const relativeFile = path12.relative(workspace, file).replace(new RegExp(`\\${path12.sep}`, "g"), "/"); core16.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -51223,13 +51223,13 @@ function __disposeResources(env) { } return next(); } -function __rewriteRelativeImportExtension(path13, preserveJsx) { - if (typeof path13 === "string" && /^\.\.?\//.test(path13)) { - return path13.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 path13; + return path12; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -55643,8 +55643,8 @@ var require_getClient = __commonJS({ } const { allowInsecureConnection, httpClient } = clientOptions; const endpointUrl = clientOptions.endpoint ?? endpoint2; - const client = (path13, ...args) => { - const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path13, 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); @@ -59515,15 +59515,15 @@ var require_urlHelpers2 = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path13 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path13.startsWith("/")) { - path13 = path13.substring(1); + let path12 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path12.startsWith("/")) { + path12 = path12.substring(1); } - if (isAbsoluteUrl(path13)) { - requestUrl = path13; + if (isAbsoluteUrl(path12)) { + requestUrl = path12; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path13); + requestUrl = appendPath(requestUrl, path12); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -59569,9 +59569,9 @@ var require_urlHelpers2 = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path13 = pathToAppend.substring(0, searchStart); + const path12 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path13; + newPath = newPath + path12; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -62248,10 +62248,10 @@ var require_utils_common = __commonJS({ var constants_js_1 = require_constants15(); function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path13 = urlParsed.pathname; - path13 = path13 || "/"; - path13 = escape(path13); - urlParsed.pathname = path13; + let path12 = urlParsed.pathname; + path12 = path12 || "/"; + path12 = escape(path12); + urlParsed.pathname = path12; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -62336,9 +62336,9 @@ var require_utils_common = __commonJS({ } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path13 = urlParsed.pathname; - path13 = path13 ? path13.endsWith("/") ? `${path13}${name}` : `${path13}/${name}` : name; - urlParsed.pathname = path13; + let path12 = urlParsed.pathname; + path12 = path12 ? path12.endsWith("/") ? `${path12}${name}` : `${path12}/${name}` : name; + urlParsed.pathname = path12; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -63565,9 +63565,9 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path13 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path12 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path13}`; + canonicalizedResourceString += `/${this.factory.accountName}${path12}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -64306,10 +64306,10 @@ var require_utils_common2 = __commonJS({ var constants_js_1 = require_constants16(); function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path13 = urlParsed.pathname; - path13 = path13 || "/"; - path13 = escape(path13); - urlParsed.pathname = path13; + let path12 = urlParsed.pathname; + path12 = path12 || "/"; + path12 = escape(path12); + urlParsed.pathname = path12; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -64394,9 +64394,9 @@ var require_utils_common2 = __commonJS({ } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path13 = urlParsed.pathname; - path13 = path13 ? path13.endsWith("/") ? `${path13}${name}` : `${path13}/${name}` : name; - urlParsed.pathname = path13; + let path12 = urlParsed.pathname; + path12 = path12 ? path12.endsWith("/") ? `${path12}${name}` : `${path12}/${name}` : name; + urlParsed.pathname = path12; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -65317,9 +65317,9 @@ var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path13 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path12 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path13}`; + canonicalizedResourceString += `/${this.factory.accountName}${path12}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -65949,9 +65949,9 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path13 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path12 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path13}`; + canonicalizedResourceString += `/${options.accountName}${path12}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -66296,9 +66296,9 @@ var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path13 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path12 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path13}`; + canonicalizedResourceString += `/${options.accountName}${path12}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -87953,8 +87953,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 path13 = (0, utils_common_js_1.getURLPath)(subRequest.url); - if (!path13 || path13 === "") { + const path12 = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path12 || path12 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -88032,8 +88032,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 path13 = (0, utils_common_js_1.getURLPath)(url2); - if (path13 && path13 !== "/") { + const path12 = (0, utils_common_js_1.getURLPath)(url2); + if (path12 && path12 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -97342,7 +97342,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io6 = __importStar2(require_io()); var fs_1 = require("fs"); - var path13 = __importStar2(require("path")); + var path12 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants12(); var IS_WINDOWS = process.platform === "win32"; @@ -97388,13 +97388,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(`\\${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); + 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(`\\${path13.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path13.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(`\\${path13.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) { @@ -97440,7 +97440,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path13.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path12.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -97449,7 +97449,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path13.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path12.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -97464,7 +97464,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path13.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -97473,7 +97473,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path13.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -97511,7 +97511,7 @@ var require_tar = __commonJS({ } function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path13.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); }); @@ -97593,7 +97593,7 @@ var require_cache5 = __commonJS({ exports2.restoreCache = restoreCache4; exports2.saveCache = saveCache4; var core16 = __importStar2(require_core()); - var path13 = __importStar2(require("path")); + var path12 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); @@ -97688,7 +97688,7 @@ var require_cache5 = __commonJS({ core16.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path13.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path12.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core16.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core16.isDebug()) { @@ -97757,7 +97757,7 @@ var require_cache5 = __commonJS({ core16.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path13.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path12.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core16.debug(`Archive path: ${archivePath}`); core16.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -97819,7 +97819,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 = path13.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path12.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core16.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -97883,7 +97883,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 = path13.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path12.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core16.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -97962,14 +97962,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, path13, name, argument) { - if (Array.isArray(path13)) { - this.path = path13; - this.property = path13.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 (path13 !== void 0) { - this.property = path13; + } else if (path12 !== void 0) { + this.property = path12; } if (message) { this.message = message; @@ -98060,16 +98060,16 @@ var require_helpers3 = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path13, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path12, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path13)) { - this.path = path13; - this.propertyPath = path13.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 = path13; + this.propertyPath = path12; } this.base = base; this.schemas = schemas; @@ -98078,10 +98078,10 @@ var require_helpers3 = __commonJS({ return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path13 = 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, path13, 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; } @@ -99607,7 +99607,7 @@ var require_tool_cache = __commonJS({ var fs14 = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os3 = __importStar2(require("os")); - var path13 = __importStar2(require("path")); + var path12 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver9 = __importStar2(require_semver2()); var stream2 = __importStar2(require("stream")); @@ -99628,8 +99628,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 || path13.join(_getTempDirectory(), crypto2.randomUUID()); - yield io6.mkdirP(path13.dirname(dest)); + dest = dest || path12.join(_getTempDirectory(), crypto2.randomUUID()); + yield io6.mkdirP(path12.dirname(dest)); core16.debug(`Downloading ${url2}`); core16.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -99719,7 +99719,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path13.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}'`; @@ -99891,7 +99891,7 @@ var require_tool_cache = __commonJS({ } const destPath = yield _createToolPath(tool, version, arch2); for (const itemName of fs14.readdirSync(sourceDir)) { - const s = path13.join(sourceDir, itemName); + const s = path12.join(sourceDir, itemName); yield io6.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -99908,7 +99908,7 @@ var require_tool_cache = __commonJS({ throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path13.join(destFolder, targetFile); + const destPath = path12.join(destFolder, targetFile); core16.debug(`destination file ${destPath}`); yield io6.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -99931,7 +99931,7 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver9.clean(versionSpec) || ""; - const cachePath = path13.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path12.join(_getCacheDirectory(), toolName, versionSpec, arch2); core16.debug(`checking cache: ${cachePath}`); if (fs14.existsSync(cachePath) && fs14.existsSync(`${cachePath}.complete`)) { core16.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); @@ -99945,12 +99945,12 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os3.arch(); - const toolPath = path13.join(_getCacheDirectory(), toolName); + const toolPath = path12.join(_getCacheDirectory(), toolName); if (fs14.existsSync(toolPath)) { const children = fs14.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path13.join(toolPath, child, arch2 || ""); + const fullPath = path12.join(toolPath, child, arch2 || ""); if (fs14.existsSync(fullPath) && fs14.existsSync(`${fullPath}.complete`)) { versions.push(child); } @@ -100002,7 +100002,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path13.join(_getTempDirectory(), crypto2.randomUUID()); + dest = path12.join(_getTempDirectory(), crypto2.randomUUID()); } yield io6.mkdirP(dest); return dest; @@ -100010,7 +100010,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter2(this, void 0, void 0, function* () { - const folderPath = path13.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path12.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); core16.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io6.rmRF(folderPath); @@ -100020,7 +100020,7 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path13.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path12.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; fs14.writeFileSync(markerPath, ""); core16.debug("finished caching tool"); @@ -106448,6 +106448,10 @@ function getTemporaryDirectory() { const value = process.env["CODEQL_ACTION_TEMP"]; return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); } +var PR_DIFF_RANGE_JSON_FILENAME = "pr-diff-range.json"; +function getDiffRangesJsonFilePath() { + return path2.join(getTemporaryDirectory(), PR_DIFF_RANGE_JSON_FILENAME); +} function getActionVersion() { return "4.34.2"; } @@ -107069,8 +107073,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path13 = decodeGitFilePath(match[2]); - fileOidMap[path13] = oid; + const path12 = decodeGitFilePath(match[2]); + fileOidMap[path12] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -107235,13 +107239,16 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { return changes; } async function getDiffRangeFilePaths(sourceRoot, logger) { - const jsonFilePath = path3.join(getTemporaryDirectory(), "pr-diff-range.json"); - if (!fs3.existsSync(jsonFilePath)) { + const jsonFilePath = getDiffRangesJsonFilePath(); + let contents; + try { + contents = await fs3.promises.readFile(jsonFilePath, "utf8"); + } catch { return []; } let diffRanges; try { - diffRanges = JSON.parse(fs3.readFileSync(jsonFilePath, "utf8")); + diffRanges = JSON.parse(contents); } catch (e) { logger.warning( `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}` @@ -107251,30 +107258,17 @@ async function getDiffRangeFilePaths(sourceRoot, logger) { logger.debug( `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.` ); - const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === void 0) { logger.warning( "Cannot determine git root; returning diff range paths as-is." ); - return repoRelativePaths; - } - const sourceRootRelPrefix = path3.relative(repoRoot, sourceRoot).replaceAll(path3.sep, "/"); - if (sourceRootRelPrefix === "") { - return repoRelativePaths; - } - const prefixWithSlash = `${sourceRootRelPrefix}/`; - const result = []; - for (const p of repoRelativePaths) { - if (p.startsWith(prefixWithSlash)) { - result.push(p.slice(prefixWithSlash.length)); - } else { - logger.debug( - `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").` - ); - } + return [...new Set(diffRanges.map((r) => r.path))]; } - return result; + const relativePaths = diffRanges.map( + (r) => path3.relative(sourceRoot, path3.join(repoRoot, r.path)).replaceAll(path3.sep, "/") + ).filter((rel) => !rel.startsWith("..")); + return [...new Set(relativePaths)]; } // src/tools-features.ts @@ -107902,7 +107896,7 @@ var core10 = __toESM(require_core()); // src/config-utils.ts var fs7 = __toESM(require("fs")); -var path7 = __toESM(require("path")); +var path6 = __toESM(require("path")); var core9 = __toESM(require_core()); // src/config/db-config.ts @@ -107989,10 +107983,6 @@ function writeDiagnostic(config, language, diagnostic) { // src/diff-informed-analysis-utils.ts var fs6 = __toESM(require("fs")); -var path6 = __toESM(require("path")); -function getDiffRangesJsonFilePath() { - return path6.join(getTemporaryDirectory(), "pr-diff-range.json"); -} function readDiffRangesJsonFile(logger) { const jsonFilePath = getDiffRangesJsonFilePath(); if (!fs6.existsSync(jsonFilePath)) { @@ -108045,7 +108035,7 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = { ruby: "overlay_analysis_code_scanning_ruby" /* OverlayAnalysisCodeScanningRuby */ }; function getPathToParsedConfigFile(tempDir) { - return path7.join(tempDir, "config"); + return path6.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); @@ -108297,7 +108287,7 @@ async function sendUnhandledErrorStatusReport(actionName, actionStartedAt, error // src/upload-lib.ts var fs13 = __toESM(require("fs")); -var path12 = __toESM(require("path")); +var path11 = __toESM(require("path")); var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core14 = __toESM(require_core()); @@ -108305,7 +108295,7 @@ var jsonschema2 = __toESM(require_lib2()); // src/codeql.ts var fs11 = __toESM(require("fs")); -var path10 = __toESM(require("path")); +var path9 = __toESM(require("path")); var core12 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -108553,7 +108543,7 @@ function wrapCliConfigurationError(cliError) { // src/setup-codeql.ts var fs10 = __toESM(require("fs")); -var path9 = __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()); @@ -108773,7 +108763,7 @@ function inferCompressionMethod(tarPath) { // src/tools-download.ts var fs9 = __toESM(require("fs")); var os2 = __toESM(require("os")); -var path8 = __toESM(require("path")); +var path7 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core11 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -108906,7 +108896,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path8.join( + return path7.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver7.clean(version) || version, @@ -109050,7 +109040,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs10.existsSync(path9.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs10.existsSync(path8.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -109449,7 +109439,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path9.join(tempDir, v4_default()); + return path8.join(tempDir, v4_default()); } async function getNightlyToolsUrl(logger) { const zstdAvailability = await isZstdAvailable(logger); @@ -109536,7 +109526,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path10.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") { @@ -109598,7 +109588,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path10.join( + const tracingConfigPath = path9.join( extractorPath, "tools", "tracing-config.lua" @@ -109680,7 +109670,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path10.join( + const autobuildCmd = path9.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -110102,7 +110092,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path10.resolve(config.tempDir, "user-config.yaml"); + return path9.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -111355,10 +111345,10 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo ); codeQL = initCodeQLResult.codeql; } - const baseTempDir = path12.resolve(tempDir, "combined-sarif"); + const baseTempDir = path11.resolve(tempDir, "combined-sarif"); fs13.mkdirSync(baseTempDir, { recursive: true }); - const outputDirectory = fs13.mkdtempSync(path12.resolve(baseTempDir, "output-")); - const outputFile = path12.resolve(outputDirectory, "combined-sarif.sarif"); + const outputDirectory = fs13.mkdtempSync(path11.resolve(baseTempDir, "output-")); + const outputFile = path11.resolve(outputDirectory, "combined-sarif.sarif"); await codeQL.mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory: true }); @@ -111391,7 +111381,7 @@ function getAutomationID2(category, analysis_key, environment) { async function uploadPayload(payload, repositoryNwo, logger, analysis) { logger.info("Uploading results"); if (shouldSkipSarifUpload()) { - const payloadSaveFile = path12.join( + const payloadSaveFile = path11.join( getTemporaryDirectory(), `payload-${analysis.kind}.json` ); @@ -111436,9 +111426,9 @@ function findSarifFilesInDir(sarifPath, isSarif) { const entries = fs13.readdirSync(dir, { withFileTypes: true }); for (const entry of entries) { if (entry.isFile() && isSarif(entry.name)) { - sarifFiles.push(path12.resolve(dir, entry.name)); + sarifFiles.push(path11.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - walkSarifFiles(path12.resolve(dir, entry.name)); + walkSarifFiles(path11.resolve(dir, entry.name)); } } }; @@ -111454,7 +111444,7 @@ async function getGroupedSarifFilePaths(logger, sarifPath) { if (stats.isDirectory()) { let unassignedSarifFiles = findSarifFilesInDir( sarifPath, - (name) => path12.extname(name) === ".sarif" + (name) => path11.extname(name) === ".sarif" ); logger.debug( `Found the following .sarif files in ${sarifPath}: ${unassignedSarifFiles.join(", ")}` @@ -111692,7 +111682,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 = path12.resolve( + const outputFile = path11.resolve( outputDir, `upload${uploadTarget.sarifExtension}` ); diff --git a/src/actions-util.ts b/src/actions-util.ts index e1a7adb8f0..592a70ace3 100644 --- a/src/actions-util.ts +++ b/src/actions-util.ts @@ -53,6 +53,12 @@ export function getTemporaryDirectory(): string { : getRequiredEnvParam("RUNNER_TEMP"); } +const PR_DIFF_RANGE_JSON_FILENAME = "pr-diff-range.json"; + +export function getDiffRangesJsonFilePath(): string { + return path.join(getTemporaryDirectory(), PR_DIFF_RANGE_JSON_FILENAME); +} + export function getActionVersion(): string { return __CODEQL_ACTION_VERSION__; } diff --git a/src/diff-informed-analysis-utils.ts b/src/diff-informed-analysis-utils.ts index adae032dcd..1c98d4caca 100644 --- a/src/diff-informed-analysis-utils.ts +++ b/src/diff-informed-analysis-utils.ts @@ -1,5 +1,4 @@ import * as fs from "fs"; -import * as path from "path"; import * as actionsUtil from "./actions-util"; import type { PullRequestBranches } from "./actions-util"; @@ -77,16 +76,12 @@ export interface DiffThunkRange { endLine: number; } -function getDiffRangesJsonFilePath(): string { - return path.join(actionsUtil.getTemporaryDirectory(), "pr-diff-range.json"); -} - export function writeDiffRangesJsonFile( logger: Logger, ranges: DiffThunkRange[], ): void { const jsonContents = JSON.stringify(ranges, null, 2); - const jsonFilePath = getDiffRangesJsonFilePath(); + const jsonFilePath = actionsUtil.getDiffRangesJsonFilePath(); fs.writeFileSync(jsonFilePath, jsonContents); logger.debug( `Wrote pr-diff-range JSON file to ${jsonFilePath}:\n${jsonContents}`, @@ -96,7 +91,7 @@ export function writeDiffRangesJsonFile( export function readDiffRangesJsonFile( logger: Logger, ): DiffThunkRange[] | undefined { - const jsonFilePath = getDiffRangesJsonFilePath(); + const jsonFilePath = actionsUtil.getDiffRangesJsonFilePath(); if (!fs.existsSync(jsonFilePath)) { logger.debug(`Diff ranges JSON file does not exist at ${jsonFilePath}`); return undefined; diff --git a/src/overlay/index.test.ts b/src/overlay/index.test.ts index 088a3828bb..2d0b4d3fcb 100644 --- a/src/overlay/index.test.ts +++ b/src/overlay/index.test.ts @@ -72,9 +72,13 @@ test.serial( // Write the overlay changes file, which uses the mocked overlay OIDs // and the base database OIDs file + const diffRangeFilePath = path.join(tempDir, "pr-diff-range.json"); const getTempDirStub = sinon .stub(actionsUtil, "getTemporaryDirectory") .returns(tempDir); + const getDiffRangesStub = sinon + .stub(actionsUtil, "getDiffRangesJsonFilePath") + .returns(diffRangeFilePath); const getGitRootStub = sinon .stub(gitUtils, "getGitRoot") .resolves(sourceRoot); @@ -85,6 +89,7 @@ test.serial( ); getFileOidsStubForOverlay.restore(); getTempDirStub.restore(); + getDiffRangesStub.restore(); getGitRootStub.restore(); const fileContent = await fs.promises.readFile(changesFilePath, "utf-8"); @@ -143,9 +148,13 @@ test.serial( .stub(gitUtils, "getFileOidsUnderPath") .resolves(currentOids); + const diffRangeFilePath = path.join(tempDir, "pr-diff-range.json"); const getTempDirStub = sinon .stub(actionsUtil, "getTemporaryDirectory") .returns(tempDir); + const getDiffRangesStub = sinon + .stub(actionsUtil, "getDiffRangesJsonFilePath") + .returns(diffRangeFilePath); const getGitRootStub = sinon .stub(gitUtils, "getGitRoot") .resolves(sourceRoot); @@ -153,7 +162,7 @@ test.serial( // Write a pr-diff-range.json file with diff ranges including // "reverted.js" (unchanged OIDs) and "modified.js" (already in OID changes) await fs.promises.writeFile( - path.join(tempDir, "pr-diff-range.json"), + diffRangeFilePath, JSON.stringify([ { path: "reverted.js", startLine: 1, endLine: 10 }, { path: "modified.js", startLine: 1, endLine: 5 }, @@ -168,6 +177,7 @@ test.serial( ); getFileOidsStubForOverlay.restore(); getTempDirStub.restore(); + getDiffRangesStub.restore(); getGitRootStub.restore(); const fileContent = await fs.promises.readFile(changesFilePath, "utf-8"); @@ -218,9 +228,13 @@ test.serial( .stub(gitUtils, "getFileOidsUnderPath") .resolves(currentOids); + const diffRangeFilePath = path.join(tempDir, "pr-diff-range.json"); const getTempDirStub = sinon .stub(actionsUtil, "getTemporaryDirectory") .returns(tempDir); + const getDiffRangesStub = sinon + .stub(actionsUtil, "getDiffRangesJsonFilePath") + .returns(diffRangeFilePath); const getGitRootStub = sinon .stub(gitUtils, "getGitRoot") .resolves(sourceRoot); @@ -233,6 +247,7 @@ test.serial( ); getFileOidsStubForOverlay.restore(); getTempDirStub.restore(); + getDiffRangesStub.restore(); getGitRootStub.restore(); const fileContent = await fs.promises.readFile(changesFilePath, "utf-8"); @@ -286,9 +301,13 @@ test.serial( .stub(gitUtils, "getFileOidsUnderPath") .resolves(currentOids); + const diffRangeFilePath = path.join(tempDir, "pr-diff-range.json"); const getTempDirStub = sinon .stub(actionsUtil, "getTemporaryDirectory") .returns(tempDir); + const getDiffRangesStub = sinon + .stub(actionsUtil, "getDiffRangesJsonFilePath") + .returns(diffRangeFilePath); // getGitRoot returns the repo root (parent of sourceRoot) const getGitRootStub = sinon .stub(gitUtils, "getGitRoot") @@ -296,7 +315,7 @@ test.serial( // Diff ranges use repo-root-relative paths (as returned by the GitHub compare API) await fs.promises.writeFile( - path.join(tempDir, "pr-diff-range.json"), + diffRangeFilePath, JSON.stringify([ { path: "src/app.js", startLine: 1, endLine: 10 }, { path: "src/lib/util.js", startLine: 5, endLine: 8 }, @@ -311,6 +330,7 @@ test.serial( ); getFileOidsStubForOverlay.restore(); getTempDirStub.restore(); + getDiffRangesStub.restore(); getGitRootStub.restore(); const fileContent = await fs.promises.readFile(changesFilePath, "utf-8"); diff --git a/src/overlay/index.ts b/src/overlay/index.ts index df2f073598..6c1074e55b 100644 --- a/src/overlay/index.ts +++ b/src/overlay/index.ts @@ -3,6 +3,7 @@ import * as path from "path"; import * as actionsCache from "@actions/cache"; +import * as actionsUtil from "../actions-util"; import { getRequiredInput, getTemporaryDirectory, @@ -175,15 +176,18 @@ async function getDiffRangeFilePaths( sourceRoot: string, logger: Logger, ): Promise { - const jsonFilePath = path.join(getTemporaryDirectory(), "pr-diff-range.json"); - if (!fs.existsSync(jsonFilePath)) { + const jsonFilePath = actionsUtil.getDiffRangesJsonFilePath(); + + let contents: string; + try { + contents = await fs.promises.readFile(jsonFilePath, "utf8"); + } catch { return []; } + let diffRanges: Array<{ path: string }>; try { - diffRanges = JSON.parse(fs.readFileSync(jsonFilePath, "utf8")) as Array<{ - path: string; - }>; + diffRanges = JSON.parse(contents) as Array<{ path: string }>; } catch (e) { logger.warning( `Failed to parse diff ranges JSON file at ${jsonFilePath}: ${e}`, @@ -193,7 +197,6 @@ async function getDiffRangeFilePaths( logger.debug( `Read ${diffRanges.length} diff range(s) from ${jsonFilePath} for overlay changes.`, ); - const repoRelativePaths = [...new Set(diffRanges.map((r) => r.path))]; // Diff-range paths are relative to the repo root (from the GitHub compare // API), but overlay changed files must be relative to sourceRoot (to match @@ -203,31 +206,17 @@ async function getDiffRangeFilePaths( logger.warning( "Cannot determine git root; returning diff range paths as-is.", ); - return repoRelativePaths; - } - - // e.g. if repoRoot=/workspace and sourceRoot=/workspace/src, prefix="src" - const sourceRootRelPrefix = path - .relative(repoRoot, sourceRoot) - .replaceAll(path.sep, "/"); - - // If sourceRoot IS the repo root, prefix is "" and all paths pass through. - if (sourceRootRelPrefix === "") { - return repoRelativePaths; + return [...new Set(diffRanges.map((r) => r.path))]; } - const prefixWithSlash = `${sourceRootRelPrefix}/`; - const result: string[] = []; - for (const p of repoRelativePaths) { - if (p.startsWith(prefixWithSlash)) { - result.push(p.slice(prefixWithSlash.length)); - } else { - logger.debug( - `Skipping diff range path "${p}" (not under source root "${sourceRootRelPrefix}").`, - ); - } - } - return result; + const relativePaths = diffRanges + .map((r) => + path + .relative(sourceRoot, path.join(repoRoot, r.path)) + .replaceAll(path.sep, "/"), + ) + .filter((rel) => !rel.startsWith("..")); + return [...new Set(relativePaths)]; } // Constants for database caching From 23a0098b57aa5903397f33daf70c093ec77d2d1c Mon Sep 17 00:00:00 2001 From: Sam Robson Date: Wed, 25 Mar 2026 19:49:42 +0000 Subject: [PATCH 3/3] fix: improve error handling and logging for diff range path resolution --- lib/analyze-action-post.js | 16 +++++++++++++++- lib/analyze-action.js | 16 +++++++++++++++- lib/autobuild-action.js | 16 +++++++++++++++- lib/init-action-post.js | 16 +++++++++++++++- lib/init-action.js | 32 ++++++++++++++++++++++--------- lib/resolve-environment-action.js | 16 +++++++++++++++- lib/setup-codeql-action.js | 16 +++++++++++++++- lib/upload-lib.js | 16 +++++++++++++++- lib/upload-sarif-action.js | 16 +++++++++++++++- src/init-action.ts | 16 ++++++++-------- src/overlay/index.ts | 19 +++++++++++++++++- 11 files changed, 169 insertions(+), 26 deletions(-) diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index 904a09bb1d..87ce60ef19 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -162327,10 +162327,19 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } async function getDiffRangeFilePaths(sourceRoot, logger) { const jsonFilePath = getDiffRangesJsonFilePath(); + if (!fs2.existsSync(jsonFilePath)) { + logger.debug( + `No diff ranges JSON file found at ${jsonFilePath}; skipping.` + ); + return []; + } let contents; try { contents = await fs2.promises.readFile(jsonFilePath, "utf8"); - } catch { + } catch (e) { + logger.warning( + `Failed to read diff ranges JSON file at ${jsonFilePath}: ${e}` + ); return []; } let diffRanges; @@ -162347,6 +162356,11 @@ async function getDiffRangeFilePaths(sourceRoot, logger) { ); const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === void 0) { + if (getOptionalInput("source-root")) { + throw new Error( + "Cannot determine git root to convert diff range paths relative to source-root. Failing to avoid omitting files from the analysis." + ); + } logger.warning( "Cannot determine git root; returning diff range paths as-is." ); diff --git a/lib/analyze-action.js b/lib/analyze-action.js index a665a6ef96..7a3c36e44e 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -107922,10 +107922,19 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } async function getDiffRangeFilePaths(sourceRoot, logger) { const jsonFilePath = getDiffRangesJsonFilePath(); + if (!fs3.existsSync(jsonFilePath)) { + logger.debug( + `No diff ranges JSON file found at ${jsonFilePath}; skipping.` + ); + return []; + } let contents; try { contents = await fs3.promises.readFile(jsonFilePath, "utf8"); - } catch { + } catch (e) { + logger.warning( + `Failed to read diff ranges JSON file at ${jsonFilePath}: ${e}` + ); return []; } let diffRanges; @@ -107942,6 +107951,11 @@ async function getDiffRangeFilePaths(sourceRoot, logger) { ); const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === void 0) { + if (getOptionalInput("source-root")) { + throw new Error( + "Cannot determine git root to convert diff range paths relative to source-root. Failing to avoid omitting files from the analysis." + ); + } logger.warning( "Cannot determine git root; returning diff range paths as-is." ); diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index 0017ab87a1..8d22f42688 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -104381,10 +104381,19 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } async function getDiffRangeFilePaths(sourceRoot, logger) { const jsonFilePath = getDiffRangesJsonFilePath(); + if (!fs2.existsSync(jsonFilePath)) { + logger.debug( + `No diff ranges JSON file found at ${jsonFilePath}; skipping.` + ); + return []; + } let contents; try { contents = await fs2.promises.readFile(jsonFilePath, "utf8"); - } catch { + } catch (e) { + logger.warning( + `Failed to read diff ranges JSON file at ${jsonFilePath}: ${e}` + ); return []; } let diffRanges; @@ -104401,6 +104410,11 @@ async function getDiffRangeFilePaths(sourceRoot, logger) { ); const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === void 0) { + if (getOptionalInput("source-root")) { + throw new Error( + "Cannot determine git root to convert diff range paths relative to source-root. Failing to avoid omitting files from the analysis." + ); + } logger.warning( "Cannot determine git root; returning diff range paths as-is." ); diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 55c74ea003..8ec12eb27f 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -165839,10 +165839,19 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } async function getDiffRangeFilePaths(sourceRoot, logger) { const jsonFilePath = getDiffRangesJsonFilePath(); + if (!fs3.existsSync(jsonFilePath)) { + logger.debug( + `No diff ranges JSON file found at ${jsonFilePath}; skipping.` + ); + return []; + } let contents; try { contents = await fs3.promises.readFile(jsonFilePath, "utf8"); - } catch { + } catch (e) { + logger.warning( + `Failed to read diff ranges JSON file at ${jsonFilePath}: ${e}` + ); return []; } let diffRanges; @@ -165859,6 +165868,11 @@ async function getDiffRangeFilePaths(sourceRoot, logger) { ); const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === void 0) { + if (getOptionalInput("source-root")) { + throw new Error( + "Cannot determine git root to convert diff range paths relative to source-root. Failing to avoid omitting files from the analysis." + ); + } logger.warning( "Cannot determine git root; returning diff range paths as-is." ); diff --git a/lib/init-action.js b/lib/init-action.js index 76ef8f9f68..4d03be3eed 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -105491,10 +105491,19 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } async function getDiffRangeFilePaths(sourceRoot, logger) { const jsonFilePath = getDiffRangesJsonFilePath(); + if (!fs3.existsSync(jsonFilePath)) { + logger.debug( + `No diff ranges JSON file found at ${jsonFilePath}; skipping.` + ); + return []; + } let contents; try { contents = await fs3.promises.readFile(jsonFilePath, "utf8"); - } catch { + } catch (e) { + logger.warning( + `Failed to read diff ranges JSON file at ${jsonFilePath}: ${e}` + ); return []; } let diffRanges; @@ -105511,6 +105520,11 @@ async function getDiffRangeFilePaths(sourceRoot, logger) { ); const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === void 0) { + if (getOptionalInput("source-root")) { + throw new Error( + "Cannot determine git root to convert diff range paths relative to source-root. Failing to avoid omitting files from the analysis." + ); + } logger.warning( "Cannot determine git root; returning diff range paths as-is." ); @@ -110588,8 +110602,8 @@ async function loadRepositoryProperties(repositoryNwo, logger) { } } async function computeAndPersistDiffRanges(codeql, features, logger) { - try { - await withGroupAsync("Compute PR diff ranges", async () => { + await withGroupAsync("Computing PR diff ranges", async () => { + try { const branches = await getDiffInformedAnalysisBranches( codeql, features, @@ -110607,12 +110621,12 @@ async function computeAndPersistDiffRanges(codeql, features, logger) { logger.info( `Persisted ${ranges.length} diff range(s) across ${distinctFiles} file(s).` ); - }); - } catch (e) { - logger.warning( - `Failed to compute and persist PR diff ranges: ${getErrorMessage(e)}` - ); - } + } catch (e) { + logger.warning( + `Failed to compute and persist PR diff ranges: ${getErrorMessage(e)}` + ); + } + }); } async function recordZstdAvailability(config, zstdAvailability) { addNoLanguageDiagnostic( diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index cf5710a719..c55a0bb1a2 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -104374,10 +104374,19 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } async function getDiffRangeFilePaths(sourceRoot, logger) { const jsonFilePath = getDiffRangesJsonFilePath(); + if (!fs2.existsSync(jsonFilePath)) { + logger.debug( + `No diff ranges JSON file found at ${jsonFilePath}; skipping.` + ); + return []; + } let contents; try { contents = await fs2.promises.readFile(jsonFilePath, "utf8"); - } catch { + } catch (e) { + logger.warning( + `Failed to read diff ranges JSON file at ${jsonFilePath}: ${e}` + ); return []; } let diffRanges; @@ -104394,6 +104403,11 @@ async function getDiffRangeFilePaths(sourceRoot, logger) { ); const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === void 0) { + if (getOptionalInput("source-root")) { + throw new Error( + "Cannot determine git root to convert diff range paths relative to source-root. Failing to avoid omitting files from the analysis." + ); + } logger.warning( "Cannot determine git root; returning diff range paths as-is." ); diff --git a/lib/setup-codeql-action.js b/lib/setup-codeql-action.js index bbb235feb8..8e901cda1e 100644 --- a/lib/setup-codeql-action.js +++ b/lib/setup-codeql-action.js @@ -104265,10 +104265,19 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } async function getDiffRangeFilePaths(sourceRoot, logger) { const jsonFilePath = getDiffRangesJsonFilePath(); + if (!fs3.existsSync(jsonFilePath)) { + logger.debug( + `No diff ranges JSON file found at ${jsonFilePath}; skipping.` + ); + return []; + } let contents; try { contents = await fs3.promises.readFile(jsonFilePath, "utf8"); - } catch { + } catch (e) { + logger.warning( + `Failed to read diff ranges JSON file at ${jsonFilePath}: ${e}` + ); return []; } let diffRanges; @@ -104285,6 +104294,11 @@ async function getDiffRangeFilePaths(sourceRoot, logger) { ); const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === void 0) { + if (getOptionalInput("source-root")) { + throw new Error( + "Cannot determine git root to convert diff range paths relative to source-root. Failing to avoid omitting files from the analysis." + ); + } logger.warning( "Cannot determine git root; returning diff range paths as-is." ); diff --git a/lib/upload-lib.js b/lib/upload-lib.js index 97be959c0e..08a444719f 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -107530,10 +107530,19 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } async function getDiffRangeFilePaths(sourceRoot, logger) { const jsonFilePath = getDiffRangesJsonFilePath(); + if (!fs3.existsSync(jsonFilePath)) { + logger.debug( + `No diff ranges JSON file found at ${jsonFilePath}; skipping.` + ); + return []; + } let contents; try { contents = await fs3.promises.readFile(jsonFilePath, "utf8"); - } catch { + } catch (e) { + logger.warning( + `Failed to read diff ranges JSON file at ${jsonFilePath}: ${e}` + ); return []; } let diffRanges; @@ -107550,6 +107559,11 @@ async function getDiffRangeFilePaths(sourceRoot, logger) { ); const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === void 0) { + if (getOptionalInput("source-root")) { + throw new Error( + "Cannot determine git root to convert diff range paths relative to source-root. Failing to avoid omitting files from the analysis." + ); + } logger.warning( "Cannot determine git root; returning diff range paths as-is." ); diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index 6b6d24bfe6..808098d962 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -107240,10 +107240,19 @@ function computeChangedFiles(baseFileOids, overlayFileOids) { } async function getDiffRangeFilePaths(sourceRoot, logger) { const jsonFilePath = getDiffRangesJsonFilePath(); + if (!fs3.existsSync(jsonFilePath)) { + logger.debug( + `No diff ranges JSON file found at ${jsonFilePath}; skipping.` + ); + return []; + } let contents; try { contents = await fs3.promises.readFile(jsonFilePath, "utf8"); - } catch { + } catch (e) { + logger.warning( + `Failed to read diff ranges JSON file at ${jsonFilePath}: ${e}` + ); return []; } let diffRanges; @@ -107260,6 +107269,11 @@ async function getDiffRangeFilePaths(sourceRoot, logger) { ); const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === void 0) { + if (getOptionalInput("source-root")) { + throw new Error( + "Cannot determine git root to convert diff range paths relative to source-root. Failing to avoid omitting files from the analysis." + ); + } logger.warning( "Cannot determine git root; returning diff range paths as-is." ); diff --git a/src/init-action.ts b/src/init-action.ts index 2dddc888a5..b06903d5c5 100644 --- a/src/init-action.ts +++ b/src/init-action.ts @@ -849,8 +849,8 @@ async function computeAndPersistDiffRanges( features: FeatureEnablement, logger: Logger, ): Promise { - try { - await withGroupAsync("Compute PR diff ranges", async () => { + await withGroupAsync("Computing PR diff ranges", async () => { + try { const branches = await getDiffInformedAnalysisBranches( codeql, features, @@ -868,12 +868,12 @@ async function computeAndPersistDiffRanges( logger.info( `Persisted ${ranges.length} diff range(s) across ${distinctFiles} file(s).`, ); - }); - } catch (e) { - logger.warning( - `Failed to compute and persist PR diff ranges: ${getErrorMessage(e)}`, - ); - } + } catch (e) { + logger.warning( + `Failed to compute and persist PR diff ranges: ${getErrorMessage(e)}`, + ); + } + }); } async function recordZstdAvailability( config: configUtils.Config, diff --git a/src/overlay/index.ts b/src/overlay/index.ts index 6c1074e55b..4905b254f7 100644 --- a/src/overlay/index.ts +++ b/src/overlay/index.ts @@ -5,6 +5,7 @@ import * as actionsCache from "@actions/cache"; import * as actionsUtil from "../actions-util"; import { + getOptionalInput, getRequiredInput, getTemporaryDirectory, getWorkflowRunAttempt, @@ -178,10 +179,20 @@ async function getDiffRangeFilePaths( ): Promise { const jsonFilePath = actionsUtil.getDiffRangesJsonFilePath(); + if (!fs.existsSync(jsonFilePath)) { + logger.debug( + `No diff ranges JSON file found at ${jsonFilePath}; skipping.`, + ); + return []; + } + let contents: string; try { contents = await fs.promises.readFile(jsonFilePath, "utf8"); - } catch { + } catch (e) { + logger.warning( + `Failed to read diff ranges JSON file at ${jsonFilePath}: ${e}`, + ); return []; } @@ -203,6 +214,12 @@ async function getDiffRangeFilePaths( // getFileOidsUnderPath output). Convert and filter accordingly. const repoRoot = await getGitRoot(sourceRoot); if (repoRoot === undefined) { + if (getOptionalInput("source-root")) { + throw new Error( + "Cannot determine git root to convert diff range paths relative to source-root. " + + "Failing to avoid omitting files from the analysis.", + ); + } logger.warning( "Cannot determine git root; returning diff range paths as-is.", );