From 69173ea009394fa262fbc97099efb0dbb058f168 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Tue, 20 Jan 2026 12:41:22 +0000 Subject: [PATCH 1/8] Refactor artifact suffix computation into `getArtifactSuffix` --- lib/analyze-action-post.js | 31 +++++++++++++----------- lib/init-action-post.js | 31 +++++++++++++----------- lib/upload-sarif-action-post.js | 31 +++++++++++++----------- src/debug-artifacts.ts | 43 +++++++++++++++++++++------------ 4 files changed, 79 insertions(+), 57 deletions(-) diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index feb45a8f0b..7c6ae02a58 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -125707,6 +125707,22 @@ async function uploadCombinedSarifArtifacts(logger, gitHubVariant, codeQlVersion }); } } +function getArtifactSuffix(matrix) { + let suffix = ""; + if (matrix) { + try { + for (const [, matrixVal] of Object.entries( + JSON.parse(matrix) + ).sort()) + suffix += `-${matrixVal}`; + } catch { + core12.info( + "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." + ); + } + } + return suffix; +} async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghVariant, codeQlVersion) { if (toUpload.length === 0) { return "no-artifacts-to-upload"; @@ -125722,20 +125738,7 @@ async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghV await scanArtifactsForTokens(toUpload, logger); core12.exportVariable("CODEQL_ACTION_ARTIFACT_SCAN_FINISHED", "true"); } - let suffix = ""; - const matrix = getOptionalInput("matrix"); - if (matrix) { - try { - for (const [, matrixVal] of Object.entries( - JSON.parse(matrix) - ).sort()) - suffix += `-${matrixVal}`; - } catch { - core12.info( - "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." - ); - } - } + const suffix = getArtifactSuffix(getOptionalInput("matrix")); const artifactUploader = await getArtifactUploaderClient(logger, ghVariant); try { await artifactUploader.uploadArtifact( diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 936790df37..e8803b8d28 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -130430,6 +130430,22 @@ async function tryUploadAllAvailableDebugArtifacts(codeql, config, logger, codeQ ); } } +function getArtifactSuffix(matrix) { + let suffix = ""; + if (matrix) { + try { + for (const [, matrixVal] of Object.entries( + JSON.parse(matrix) + ).sort()) + suffix += `-${matrixVal}`; + } catch { + core12.info( + "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." + ); + } + } + return suffix; +} async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghVariant, codeQlVersion) { if (toUpload.length === 0) { return "no-artifacts-to-upload"; @@ -130445,20 +130461,7 @@ async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghV await scanArtifactsForTokens(toUpload, logger); core12.exportVariable("CODEQL_ACTION_ARTIFACT_SCAN_FINISHED", "true"); } - let suffix = ""; - const matrix = getOptionalInput("matrix"); - if (matrix) { - try { - for (const [, matrixVal] of Object.entries( - JSON.parse(matrix) - ).sort()) - suffix += `-${matrixVal}`; - } catch { - core12.info( - "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." - ); - } - } + const suffix = getArtifactSuffix(getOptionalInput("matrix")); const artifactUploader = await getArtifactUploaderClient(logger, ghVariant); try { await artifactUploader.uploadArtifact( diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index 863caaadd7..813c9ad856 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -124642,6 +124642,22 @@ async function uploadCombinedSarifArtifacts(logger, gitHubVariant, codeQlVersion }); } } +function getArtifactSuffix(matrix) { + let suffix = ""; + if (matrix) { + try { + for (const [, matrixVal] of Object.entries( + JSON.parse(matrix) + ).sort()) + suffix += `-${matrixVal}`; + } catch { + core12.info( + "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." + ); + } + } + return suffix; +} async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghVariant, codeQlVersion) { if (toUpload.length === 0) { return "no-artifacts-to-upload"; @@ -124657,20 +124673,7 @@ async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghV await scanArtifactsForTokens(toUpload, logger); core12.exportVariable("CODEQL_ACTION_ARTIFACT_SCAN_FINISHED", "true"); } - let suffix = ""; - const matrix = getOptionalInput("matrix"); - if (matrix) { - try { - for (const [, matrixVal] of Object.entries( - JSON.parse(matrix) - ).sort()) - suffix += `-${matrixVal}`; - } catch { - core12.info( - "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." - ); - } - } + const suffix = getArtifactSuffix(getOptionalInput("matrix")); const artifactUploader = await getArtifactUploaderClient(logger, ghVariant); try { await artifactUploader.uploadArtifact( diff --git a/src/debug-artifacts.ts b/src/debug-artifacts.ts index 3534cdc027..1a1917d70c 100644 --- a/src/debug-artifacts.ts +++ b/src/debug-artifacts.ts @@ -246,6 +246,33 @@ export async function tryUploadAllAvailableDebugArtifacts( } } +/** + * When a build matrix is used, multiple different jobs arising from the matrix may attempt to upload + * workflow artifacts with the same base name. In that case, only one of the uploads will succeed and + * the others will fail. This function inspects the matrix object to compute a suffix for the artifact + * name that uniquely identifies the matrix values of the current job to avoid name clashes. + * + * @param matrix A stringified JSON value, usually the value of the `matrix` input. + * @returns A suffix that uniquely identifies the `matrix` value for the current job, or `""` if there + * is no matrix value. + */ +export function getArtifactSuffix(matrix: string | undefined): string { + let suffix = ""; + if (matrix) { + try { + for (const [, matrixVal] of Object.entries( + JSON.parse(matrix) as any[][], + ).sort()) + suffix += `-${matrixVal}`; + } catch { + core.info( + "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input.", + ); + } + } + return suffix; +} + export async function uploadDebugArtifacts( logger: Logger, toUpload: string[], @@ -279,21 +306,7 @@ export async function uploadDebugArtifacts( core.exportVariable("CODEQL_ACTION_ARTIFACT_SCAN_FINISHED", "true"); } - let suffix = ""; - const matrix = getOptionalInput("matrix"); - if (matrix) { - try { - for (const [, matrixVal] of Object.entries( - JSON.parse(matrix) as any[][], - ).sort()) - suffix += `-${matrixVal}`; - } catch { - core.info( - "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input.", - ); - } - } - + const suffix = getArtifactSuffix(getOptionalInput("matrix")); const artifactUploader = await getArtifactUploaderClient(logger, ghVariant); try { From f950f7f442a6518dcbf7be2fcfad0c08326eb01c Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Tue, 20 Jan 2026 12:41:35 +0000 Subject: [PATCH 2/8] Add unit tests for `getArtifactSuffix` --- src/debug-artifacts.test.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/debug-artifacts.test.ts b/src/debug-artifacts.test.ts index 3d1d964bcf..a2a994d258 100644 --- a/src/debug-artifacts.test.ts +++ b/src/debug-artifacts.test.ts @@ -24,6 +24,29 @@ test("sanitizeArtifactName", (t) => { ); }); +test("getArtifactSuffix", (t) => { + // No suffix if there's no `matrix` input, it is invalid, or has no keys. + t.is(debugArtifacts.getArtifactSuffix(undefined), ""); + t.is(debugArtifacts.getArtifactSuffix(""), ""); + t.is(debugArtifacts.getArtifactSuffix("invalid json"), ""); + t.is(debugArtifacts.getArtifactSuffix("{}"), ""); + + // Suffixes for non-empty, valid `matrix` inputs. + const testMatrices = [ + { language: "go" }, + { language: "javascript", "build-mode": "none" }, + ]; + + for (const testMatrix of testMatrices) { + const suffix = debugArtifacts.getArtifactSuffix(JSON.stringify(testMatrix)); + t.not(suffix, ""); + + for (const key of Object.keys(testMatrix)) { + t.assert(suffix.includes(testMatrix[key] as string)); + } + } +}); + // These next tests check the correctness of the logic to determine whether or not // artifacts are uploaded in debug mode. Since it's not easy to mock the actual // call to upload an artifact, we just check that we get an "upload-failed" result, From 13eb1818b9b1e2f1a34559581c8c23a449133491 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Tue, 20 Jan 2026 12:49:19 +0000 Subject: [PATCH 3/8] Refactor generic part of `uploadDebugArtifacts` into `uploadArtifacts` --- lib/analyze-action-post.js | 9 +++++--- lib/init-action-post.js | 9 +++++--- lib/upload-sarif-action-post.js | 9 +++++--- src/debug-artifacts.ts | 41 +++++++++++++++++++++++++-------- 4 files changed, 50 insertions(+), 18 deletions(-) diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index 7c6ae02a58..f3a8d8bda8 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -125724,9 +125724,6 @@ function getArtifactSuffix(matrix) { return suffix; } async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghVariant, codeQlVersion) { - if (toUpload.length === 0) { - return "no-artifacts-to-upload"; - } const uploadSupported = isSafeArtifactUpload(codeQlVersion); if (!uploadSupported) { core12.info( @@ -125734,6 +125731,12 @@ async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghV ); return "upload-not-supported"; } + return uploadArtifacts(logger, toUpload, rootDir, artifactName, ghVariant); +} +async function uploadArtifacts(logger, toUpload, rootDir, artifactName, ghVariant) { + if (toUpload.length === 0) { + return "no-artifacts-to-upload"; + } if (isInTestMode()) { await scanArtifactsForTokens(toUpload, logger); core12.exportVariable("CODEQL_ACTION_ARTIFACT_SCAN_FINISHED", "true"); diff --git a/lib/init-action-post.js b/lib/init-action-post.js index e8803b8d28..7a9ddd21d1 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -130447,9 +130447,6 @@ function getArtifactSuffix(matrix) { return suffix; } async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghVariant, codeQlVersion) { - if (toUpload.length === 0) { - return "no-artifacts-to-upload"; - } const uploadSupported = isSafeArtifactUpload(codeQlVersion); if (!uploadSupported) { core12.info( @@ -130457,6 +130454,12 @@ async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghV ); return "upload-not-supported"; } + return uploadArtifacts(logger, toUpload, rootDir, artifactName, ghVariant); +} +async function uploadArtifacts(logger, toUpload, rootDir, artifactName, ghVariant) { + if (toUpload.length === 0) { + return "no-artifacts-to-upload"; + } if (isInTestMode()) { await scanArtifactsForTokens(toUpload, logger); core12.exportVariable("CODEQL_ACTION_ARTIFACT_SCAN_FINISHED", "true"); diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index 813c9ad856..5464582543 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -124659,9 +124659,6 @@ function getArtifactSuffix(matrix) { return suffix; } async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghVariant, codeQlVersion) { - if (toUpload.length === 0) { - return "no-artifacts-to-upload"; - } const uploadSupported = isSafeArtifactUpload(codeQlVersion); if (!uploadSupported) { core12.info( @@ -124669,6 +124666,12 @@ async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghV ); return "upload-not-supported"; } + return uploadArtifacts(logger, toUpload, rootDir, artifactName, ghVariant); +} +async function uploadArtifacts(logger, toUpload, rootDir, artifactName, ghVariant) { + if (toUpload.length === 0) { + return "no-artifacts-to-upload"; + } if (isInTestMode()) { await scanArtifactsForTokens(toUpload, logger); core12.exportVariable("CODEQL_ACTION_ARTIFACT_SCAN_FINISHED", "true"); diff --git a/src/debug-artifacts.ts b/src/debug-artifacts.ts index 1a1917d70c..3d5d45e943 100644 --- a/src/debug-artifacts.ts +++ b/src/debug-artifacts.ts @@ -273,6 +273,12 @@ export function getArtifactSuffix(matrix: string | undefined): string { return suffix; } +// Enumerates different, possible outcomes for artifact uploads. +export type UploadArtifactsResult = + | "no-artifacts-to-upload" + | "upload-successful" + | "upload-failed"; + export async function uploadDebugArtifacts( logger: Logger, toUpload: string[], @@ -280,15 +286,7 @@ export async function uploadDebugArtifacts( artifactName: string, ghVariant: GitHubVariant, codeQlVersion: string | undefined, -): Promise< - | "no-artifacts-to-upload" - | "upload-successful" - | "upload-failed" - | "upload-not-supported" -> { - if (toUpload.length === 0) { - return "no-artifacts-to-upload"; - } +): Promise { const uploadSupported = isSafeArtifactUpload(codeQlVersion); if (!uploadSupported) { @@ -298,6 +296,31 @@ export async function uploadDebugArtifacts( return "upload-not-supported"; } + return uploadArtifacts(logger, toUpload, rootDir, artifactName, ghVariant); +} + +/** + * Uploads the specified files as a single workflow artifact. + * + * @param logger The logger to use. + * @param toUpload The list of paths to include in the artifact. + * @param rootDir The root directory of the paths to include. + * @param artifactName The base name for the artifact. + * @param ghVariant The GitHub variant. + * + * @returns The outcome of the attempt to create and upload the artifact. + */ +export async function uploadArtifacts( + logger: Logger, + toUpload: string[], + rootDir: string, + artifactName: string, + ghVariant: GitHubVariant, +): Promise { + if (toUpload.length === 0) { + return "no-artifacts-to-upload"; + } + // When running in test mode, perform a best effort scan of the debug artifacts. The artifact // scanner is basic and not reliable or fast enough for production use, but it can help catch // some issues early. From 7e96d45489a50f64b086df47b7efa2186c67ca63 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Tue, 20 Jan 2026 12:52:35 +0000 Subject: [PATCH 4/8] Use `uploadArtifacts` for `start-proxy` post action --- lib/start-proxy-action-post.js | 2803 ++++++++++++++++++-------------- src/start-proxy-action-post.ts | 15 +- 2 files changed, 1547 insertions(+), 1271 deletions(-) diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index c8ecd8bf6e..d581716db1 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -108,11 +108,11 @@ var require_command = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.issueCommand = issueCommand; exports2.issue = issue; - var os = __importStar2(require("os")); + var os2 = __importStar2(require("os")); var utils_1 = require_utils(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os.EOL); + process.stdout.write(cmd.toString() + os2.EOL); } function issue(name, message = "") { issueCommand(name, {}, message); @@ -204,18 +204,18 @@ var require_file_command = __commonJS({ exports2.issueFileCommand = issueFileCommand; exports2.prepareKeyValueMessage = prepareKeyValueMessage; var crypto2 = __importStar2(require("crypto")); - var fs2 = __importStar2(require("fs")); - var os = __importStar2(require("os")); + var fs3 = __importStar2(require("fs")); + var os2 = __importStar2(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); } - if (!fs2.existsSync(filePath)) { + if (!fs3.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs2.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { + fs3.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os2.EOL}`, { encoding: "utf8" }); } @@ -228,7 +228,7 @@ var require_file_command = __commonJS({ if (convertedValue.includes(delimiter)) { throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; + return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; } } }); @@ -1015,14 +1015,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 path2 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path4 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } - if (path2 && !path2.startsWith("/")) { - path2 = `/${path2}`; + if (path4 && !path4.startsWith("/")) { + path4 = `/${path4}`; } - url = new URL(origin + path2); + url = new URL(origin + path4); } return url; } @@ -2636,20 +2636,20 @@ var require_parseParams = __commonJS({ var require_basename = __commonJS({ "node_modules/@fastify/busboy/lib/utils/basename.js"(exports2, module2) { "use strict"; - module2.exports = function basename(path2) { - if (typeof path2 !== "string") { + module2.exports = function basename2(path4) { + if (typeof path4 !== "string") { return ""; } - for (var i = path2.length - 1; i >= 0; --i) { - switch (path2.charCodeAt(i)) { + for (var i = path4.length - 1; i >= 0; --i) { + switch (path4.charCodeAt(i)) { case 47: // '/' case 92: - path2 = path2.slice(i + 1); - return path2 === ".." || path2 === "." ? "" : path2; + path4 = path4.slice(i + 1); + return path4 === ".." || path4 === "." ? "" : path4; } } - return path2 === ".." || path2 === "." ? "" : path2; + return path4 === ".." || path4 === "." ? "" : path4; }; } }); @@ -2663,7 +2663,7 @@ var require_multipart = __commonJS({ var Dicer = require_Dicer(); var parseParams = require_parseParams(); var decodeText = require_decodeText(); - var basename = require_basename(); + var basename2 = require_basename(); var getLimit = require_getLimit(); var RE_BOUNDARY = /^boundary$/i; var RE_FIELD = /^form-data$/i; @@ -2780,7 +2780,7 @@ var require_multipart = __commonJS({ } else if (RE_FILENAME.test(parsed[i][0])) { filename = parsed[i][1]; if (!preservePath) { - filename = basename(filename); + filename = basename2(filename); } } } @@ -4042,8 +4042,8 @@ var require_util2 = __commonJS({ function createDeferredPromise() { let res; let rej; - const promise = new Promise((resolve2, reject) => { - res = resolve2; + const promise = new Promise((resolve3, reject) => { + res = resolve3; rej = reject; }); return { promise, resolve: res, reject: rej }; @@ -5547,8 +5547,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r }); } }); - const busboyResolve = new Promise((resolve2, reject) => { - busboy.on("finish", resolve2); + const busboyResolve = new Promise((resolve3, reject) => { + busboy.on("finish", resolve3); busboy.on("error", (err) => reject(new TypeError(err))); }); if (this.body !== null) for await (const chunk of consumeBody(this[kState].body)) busboy.write(chunk); @@ -5679,7 +5679,7 @@ var require_request = __commonJS({ } var Request = class _Request { constructor(origin, { - path: path2, + path: path4, method, body, headers, @@ -5693,11 +5693,11 @@ var require_request = __commonJS({ throwOnError, expectContinue }, handler) { - if (typeof path2 !== "string") { + if (typeof path4 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path2[0] !== "/" && !(path2.startsWith("http://") || path2.startsWith("https://")) && method !== "CONNECT") { + } else if (path4[0] !== "/" && !(path4.startsWith("http://") || path4.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.exec(path2) !== null) { + } else if (invalidPathRegex.exec(path4) !== null) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -5760,7 +5760,7 @@ var require_request = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? util.buildURL(path2, query) : path2; + this.path = query ? util.buildURL(path4, query) : path4; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -6082,9 +6082,9 @@ var require_dispatcher_base = __commonJS({ } close(callback) { if (callback === void 0) { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { this.close((err, data) => { - return err ? reject(err) : resolve2(data); + return err ? reject(err) : resolve3(data); }); }); } @@ -6122,12 +6122,12 @@ var require_dispatcher_base = __commonJS({ err = null; } if (callback === void 0) { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { this.destroy(err, (err2, data) => { return err2 ? ( /* istanbul ignore next: should never error */ reject(err2) - ) : resolve2(data); + ) : resolve3(data); }); }); } @@ -6768,9 +6768,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 path2 = search ? `${pathname}${search}` : pathname; + const path4 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path2; + this.opts.path = path4; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -7187,16 +7187,16 @@ var require_client = __commonJS({ return this[kNeedDrain] < 2; } async [kClose]() { - return new Promise((resolve2) => { + return new Promise((resolve3) => { if (!this[kSize]) { - resolve2(null); + resolve3(null); } else { - this[kClosedResolve] = resolve2; + this[kClosedResolve] = resolve3; } }); } async [kDestroy](err) { - return new Promise((resolve2) => { + return new Promise((resolve3) => { const requests = this[kQueue].splice(this[kPendingIdx]); for (let i = 0; i < requests.length; i++) { const request = requests[i]; @@ -7207,7 +7207,7 @@ var require_client = __commonJS({ this[kClosedResolve](); this[kClosedResolve] = null; } - resolve2(); + resolve3(); }; if (this[kHTTP2Session] != null) { util.destroy(this[kHTTP2Session], err); @@ -7787,7 +7787,7 @@ var require_client = __commonJS({ }); } try { - const socket = await new Promise((resolve2, reject) => { + const socket = await new Promise((resolve3, reject) => { client[kConnector]({ host, hostname, @@ -7799,7 +7799,7 @@ var require_client = __commonJS({ if (err) { reject(err); } else { - resolve2(socket2); + resolve3(socket2); } }); }); @@ -8010,7 +8010,7 @@ var require_client = __commonJS({ writeH2(client, client[kHTTP2Session], request); return; } - const { body, method, path: path2, host, upgrade, headers, blocking, reset } = request; + const { body, method, path: path4, host, upgrade, headers, blocking, reset } = request; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { body.read(0); @@ -8060,7 +8060,7 @@ var require_client = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path2} HTTP/1.1\r + let header = `${method} ${path4} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -8123,7 +8123,7 @@ upgrade: ${upgrade}\r return true; } function writeH2(client, session, request) { - const { body, method, path: path2, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; + const { body, method, path: path4, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; let headers; if (typeof reqHeaders === "string") headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()); else headers = reqHeaders; @@ -8166,7 +8166,7 @@ upgrade: ${upgrade}\r }); return true; } - headers[HTTP2_HEADER_PATH] = path2; + headers[HTTP2_HEADER_PATH] = path4; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -8423,12 +8423,12 @@ upgrade: ${upgrade}\r cb(); } } - const waitForDrain = () => new Promise((resolve2, reject) => { + const waitForDrain = () => new Promise((resolve3, reject) => { assert(callback === null); if (socket[kError]) { reject(socket[kError]); } else { - callback = resolve2; + callback = resolve3; } }); if (client[kHTTPConnVersion] === "h2") { @@ -8773,8 +8773,8 @@ var require_pool_base = __commonJS({ if (this[kQueue].isEmpty()) { return Promise.all(this[kClients].map((c) => c.close())); } else { - return new Promise((resolve2) => { - this[kClosedResolve] = resolve2; + return new Promise((resolve3) => { + this[kClosedResolve] = resolve3; }); } } @@ -9352,7 +9352,7 @@ var require_readable = __commonJS({ if (this.closed) { return Promise.resolve(null); } - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { const signalListenerCleanup = signal ? util.addAbortListener(signal, () => { this.destroy(); }) : noop; @@ -9361,7 +9361,7 @@ var require_readable = __commonJS({ if (signal && signal.aborted) { reject(signal.reason || Object.assign(new Error("The operation was aborted"), { name: "AbortError" })); } else { - resolve2(null); + resolve3(null); } }).on("error", noop).on("data", function(chunk) { limit -= chunk.length; @@ -9383,11 +9383,11 @@ var require_readable = __commonJS({ throw new TypeError("unusable"); } assert(!stream[kConsume]); - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { stream[kConsume] = { type: type2, stream, - resolve: resolve2, + resolve: resolve3, reject, length: 0, body: [] @@ -9422,12 +9422,12 @@ var require_readable = __commonJS({ } } function consumeEnd(consume2) { - const { type: type2, body, resolve: resolve2, stream, length } = consume2; + const { type: type2, body, resolve: resolve3, stream, length } = consume2; try { if (type2 === "text") { - resolve2(toUSVString(Buffer.concat(body))); + resolve3(toUSVString(Buffer.concat(body))); } else if (type2 === "json") { - resolve2(JSON.parse(Buffer.concat(body))); + resolve3(JSON.parse(Buffer.concat(body))); } else if (type2 === "arrayBuffer") { const dst = new Uint8Array(length); let pos = 0; @@ -9435,12 +9435,12 @@ var require_readable = __commonJS({ dst.set(buf, pos); pos += buf.byteLength; } - resolve2(dst.buffer); + resolve3(dst.buffer); } else if (type2 === "blob") { if (!Blob2) { Blob2 = require("buffer").Blob; } - resolve2(new Blob2(body, { type: stream[kContentType] })); + resolve3(new Blob2(body, { type: stream[kContentType] })); } consumeFinish(consume2); } catch (err) { @@ -9695,9 +9695,9 @@ var require_api_request = __commonJS({ }; function request(opts, callback) { if (callback === void 0) { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { request.call(this, opts, (err, data) => { - return err ? reject(err) : resolve2(data); + return err ? reject(err) : resolve3(data); }); }); } @@ -9870,9 +9870,9 @@ var require_api_stream = __commonJS({ }; function stream(opts, factory, callback) { if (callback === void 0) { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve2(data); + return err ? reject(err) : resolve3(data); }); }); } @@ -10153,9 +10153,9 @@ var require_api_upgrade = __commonJS({ }; function upgrade(opts, callback) { if (callback === void 0) { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve2(data); + return err ? reject(err) : resolve3(data); }); }); } @@ -10244,9 +10244,9 @@ var require_api_connect = __commonJS({ }; function connect(opts, callback) { if (callback === void 0) { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve2(data); + return err ? reject(err) : resolve3(data); }); }); } @@ -10406,20 +10406,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path2) { - if (typeof path2 !== "string") { - return path2; + function safeUrl(path4) { + if (typeof path4 !== "string") { + return path4; } - const pathSegments = path2.split("?"); + const pathSegments = path4.split("?"); if (pathSegments.length !== 2) { - return path2; + return path4; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path2, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path2); + function matchKey(mockDispatch2, { path: path4, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path4); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -10437,7 +10437,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: path2 }) => matchValue(safeUrl(path2), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path4 }) => matchValue(safeUrl(path4), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -10474,9 +10474,9 @@ var require_mock_utils = __commonJS({ } } function buildKey(opts) { - const { path: path2, method, body, headers, query } = opts; + const { path: path4, method, body, headers, query } = opts; return { - path: path2, + path: path4, method, body, headers, @@ -10925,10 +10925,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path2, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path4, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path2, + Path: path4, "Status code": statusCode, Persistent: persist ? "\u2705" : "\u274C", Invocations: timesInvoked, @@ -13868,7 +13868,7 @@ var require_fetch = __commonJS({ async function dispatch({ body }) { const url = requestCurrentURL(request); const agent = fetchParams.controller.dispatcher; - return new Promise((resolve2, reject) => agent.dispatch( + return new Promise((resolve3, reject) => agent.dispatch( { path: url.pathname + url.search, origin: url.origin, @@ -13944,7 +13944,7 @@ var require_fetch = __commonJS({ } } } - resolve2({ + resolve3({ status, statusText, headersList: headers[kHeadersList], @@ -13987,7 +13987,7 @@ var require_fetch = __commonJS({ const val = headersList[n + 1].toString("latin1"); headers[kHeadersList].append(key, val); } - resolve2({ + resolve3({ status, statusText: STATUS_CODES[status], headersList: headers[kHeadersList], @@ -15548,8 +15548,8 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path2) { - for (const char of path2) { + function validateCookiePath(path4) { + for (const char of path4) { const code = char.charCodeAt(0); if (code < 33 || char === ";") { throw new Error("Invalid cookie path"); @@ -17229,11 +17229,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path2 = opts.path; + let path4 = opts.path; if (!opts.path.startsWith("/")) { - path2 = `/${path2}`; + path4 = `/${path4}`; } - url = new URL(util.parseOrigin(url).origin + path2); + url = new URL(util.parseOrigin(url).origin + path4); } else { if (!opts) { opts = typeof url === "object" ? url : {}; @@ -17351,11 +17351,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -17371,7 +17371,7 @@ var require_lib = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -17458,26 +17458,26 @@ var require_lib = __commonJS({ } readBody() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve3) => __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", () => { - resolve2(output.toString()); + resolve3(output.toString()); }); })); }); } readBodyBuffer() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve3) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); }); this.message.on("end", () => { - resolve2(Buffer.concat(chunks)); + resolve3(Buffer.concat(chunks)); }); })); }); @@ -17685,14 +17685,14 @@ var require_lib = __commonJS({ */ requestRaw(info7, data) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { function callbackForResult(err, res) { if (err) { reject(err); } else if (!res) { reject(new Error("Unknown error")); } else { - resolve2(res); + resolve3(res); } } this.requestRawWithCallback(info7, data, callbackForResult); @@ -17936,12 +17936,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((resolve2) => setTimeout(() => resolve2(), ms)); + return new Promise((resolve3) => setTimeout(() => resolve3(), ms)); }); } _processResponse(res, options) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve3, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -17949,7 +17949,7 @@ var require_lib = __commonJS({ headers: {} }; if (statusCode === HttpCodes.NotFound) { - resolve2(response); + resolve3(response); } function dateTimeDeserializer(key, value) { if (typeof value === "string") { @@ -17988,7 +17988,7 @@ var require_lib = __commonJS({ err.result = response.result; reject(err); } else { - resolve2(response); + resolve3(response); } })); }); @@ -18005,11 +18005,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -18025,7 +18025,7 @@ var require_auth = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -18109,11 +18109,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -18129,7 +18129,7 @@ var require_oidc_utils = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -18207,11 +18207,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -18227,7 +18227,7 @@ var require_summary = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -18540,7 +18540,7 @@ var require_path_utils = __commonJS({ exports2.toPosixPath = toPosixPath; exports2.toWin32Path = toWin32Path; exports2.toPlatformPath = toPlatformPath; - var path2 = __importStar2(require("path")); + var path4 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -18548,7 +18548,7 @@ var require_path_utils = __commonJS({ return pth.replace(/[/]/g, "\\"); } function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path2.sep); + return pth.replace(/[/\\]/g, path4.sep); } } }); @@ -18596,11 +18596,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -18616,7 +18616,7 @@ var require_io_util = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -18630,13 +18630,13 @@ var require_io_util = __commonJS({ exports2.isRooted = isRooted; exports2.tryGetExecutablePath = tryGetExecutablePath; exports2.getCmdPath = getCmdPath; - var fs2 = __importStar2(require("fs")); - var path2 = __importStar2(require("path")); - _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + var fs3 = __importStar2(require("fs")); + var path4 = __importStar2(require("path")); + _a = fs3.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 fs2.promises.readlink(fsPath); + const result = yield fs3.promises.readlink(fsPath); if (exports2.IS_WINDOWS && !result.endsWith("\\")) { return `${result}\\`; } @@ -18644,7 +18644,7 @@ var require_io_util = __commonJS({ }); } exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs2.constants.O_RDONLY; + exports2.READONLY = fs3.constants.O_RDONLY; function exists(fsPath) { return __awaiter2(this, void 0, void 0, function* () { try { @@ -18686,7 +18686,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path2.extname(filePath).toUpperCase(); + const upperExt = path4.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -18710,11 +18710,11 @@ var require_io_util = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path2.dirname(filePath); - const upperName = path2.basename(filePath).toUpperCase(); + const directory = path4.dirname(filePath); + const upperName = path4.basename(filePath).toUpperCase(); for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path2.join(directory, actualName); + filePath = path4.join(directory, actualName); break; } } @@ -18793,11 +18793,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -18813,7 +18813,7 @@ var require_io = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -18826,7 +18826,7 @@ var require_io = __commonJS({ exports2.which = which6; exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path2 = __importStar2(require("path")); + var path4 = __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 = {}) { @@ -18835,7 +18835,7 @@ var require_io = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path4.join(dest, path4.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -18847,7 +18847,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path2.relative(source, newDest) === "") { + if (path4.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile(source, newDest, force); @@ -18859,7 +18859,7 @@ var require_io = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path2.join(dest, path2.basename(source)); + dest = path4.join(dest, path4.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -18870,7 +18870,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path2.dirname(dest)); + yield mkdirP(path4.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -18929,7 +18929,7 @@ var require_io = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path4.delimiter)) { if (extension) { extensions.push(extension); } @@ -18942,12 +18942,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path2.sep)) { + if (tool.includes(path4.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path2.delimiter)) { + for (const p of process.env.PATH.split(path4.delimiter)) { if (p) { directories.push(p); } @@ -18955,7 +18955,7 @@ var require_io = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path4.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -19054,11 +19054,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -19074,7 +19074,7 @@ var require_toolrunner = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19082,10 +19082,10 @@ var require_toolrunner = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.ToolRunner = void 0; exports2.argStringToArray = argStringToArray; - var os = __importStar2(require("os")); + var os2 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path2 = __importStar2(require("path")); + var path4 = __importStar2(require("path")); var io6 = __importStar2(require_io()); var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); @@ -19137,12 +19137,12 @@ var require_toolrunner = __commonJS({ _processLineBuffer(data, strBuffer, onLine) { try { let s = strBuffer + data.toString(); - let n = s.indexOf(os.EOL); + let n = s.indexOf(os2.EOL); while (n > -1) { const line = s.substring(0, n); onLine(line); - s = s.substring(n + os.EOL.length); - n = s.indexOf(os.EOL); + s = s.substring(n + os2.EOL.length); + n = s.indexOf(os2.EOL); } return s; } catch (err) { @@ -19300,10 +19300,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 = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path4.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io6.which(this.toolPath, true); - return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve3, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -19311,7 +19311,7 @@ var require_toolrunner = __commonJS({ } const optionsNonNull = this._cloneExecOptions(this.options); if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os2.EOL); } const state = new ExecState(optionsNonNull, this.toolPath); state.on("debug", (message) => { @@ -19386,7 +19386,7 @@ var require_toolrunner = __commonJS({ if (error3) { reject(error3); } else { - resolve2(exitCode); + resolve3(exitCode); } }); if (this.options.input) { @@ -19552,11 +19552,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -19572,7 +19572,7 @@ var require_exec = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19672,11 +19672,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -19692,7 +19692,7 @@ var require_platform = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19801,11 +19801,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -19821,7 +19821,7 @@ var require_core = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -19852,8 +19852,8 @@ var require_core = __commonJS({ var command_1 = require_command(); var file_command_1 = require_file_command(); var utils_1 = require_utils(); - var os = __importStar2(require("os")); - var path2 = __importStar2(require("path")); + var os2 = __importStar2(require("os")); + var path4 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -19879,7 +19879,7 @@ var require_core = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path4.delimiter}${process.env["PATH"]}`; } function getInput2(name, options) { const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; @@ -19914,7 +19914,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); if (filePath) { return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); } - process.stdout.write(os.EOL); + process.stdout.write(os2.EOL); (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); } function setCommandEcho(enabled) { @@ -19940,7 +19940,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } function info7(message) { - process.stdout.write(message + os.EOL); + process.stdout.write(message + os2.EOL); } function startGroup3(name) { (0, command_1.issue)("group", name); @@ -20016,8 +20016,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 path2 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path2} does not exist${os_1.EOL}`); + const path4 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path4} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -20099,11 +20099,11 @@ var require_utils3 = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -20119,7 +20119,7 @@ var require_utils3 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -27234,8 +27234,8 @@ var require_light = __commonJS({ return this.Promise.resolve(); } yieldLoop(t = 0) { - return new this.Promise(function(resolve2, reject) { - return setTimeout(resolve2, t); + return new this.Promise(function(resolve3, reject) { + return setTimeout(resolve3, t); }); } computePenalty() { @@ -27446,15 +27446,15 @@ var require_light = __commonJS({ return this._queue.length === 0; } async _tryToRun() { - var args, cb, error3, reject, resolve2, returned, task; + var args, cb, error3, reject, resolve3, returned, task; if (this._running < 1 && this._queue.length > 0) { this._running++; - ({ task, args, resolve: resolve2, reject } = this._queue.shift()); + ({ task, args, resolve: resolve3, reject } = this._queue.shift()); cb = await (async function() { try { returned = await task(...args); return function() { - return resolve2(returned); + return resolve3(returned); }; } catch (error1) { error3 = error1; @@ -27469,13 +27469,13 @@ var require_light = __commonJS({ } } schedule(task, ...args) { - var promise, reject, resolve2; - resolve2 = reject = null; + var promise, reject, resolve3; + resolve3 = reject = null; promise = new this.Promise(function(_resolve, _reject) { - resolve2 = _resolve; + resolve3 = _resolve; return reject = _reject; }); - this._queue.push({ task, args, resolve: resolve2, reject }); + this._queue.push({ task, args, resolve: resolve3, reject }); this._tryToRun(); return promise; } @@ -27876,14 +27876,14 @@ var require_light = __commonJS({ counts = this._states.counts; return counts[0] + counts[1] + counts[2] + counts[3] === at; }; - return new this.Promise((resolve2, reject) => { + return new this.Promise((resolve3, reject) => { if (finished()) { - return resolve2(); + return resolve3(); } else { return this.on("done", () => { if (finished()) { this.removeAllListeners("done"); - return resolve2(); + return resolve3(); } }); } @@ -27976,9 +27976,9 @@ var require_light = __commonJS({ options = parser$5.load(options, this.jobDefaults); } task = (...args2) => { - return new this.Promise(function(resolve2, reject) { + return new this.Promise(function(resolve3, reject) { return fn(...args2, function(...args3) { - return (args3[0] != null ? reject : resolve2)(args3); + return (args3[0] != null ? reject : resolve3)(args3); }); }); }; @@ -28307,14 +28307,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, path2, name, argument) { - if (Array.isArray(path2)) { - this.path = path2; - this.property = path2.reduce(function(sum, item) { + var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path4, name, argument) { + if (Array.isArray(path4)) { + this.path = path4; + this.property = path4.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path2 !== void 0) { - this.property = path2; + } else if (path4 !== void 0) { + this.property = path4; } if (message) { this.message = message; @@ -28405,28 +28405,28 @@ var require_helpers = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path2, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path4, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path2)) { - this.path = path2; - this.propertyPath = path2.reduce(function(sum, item) { + if (Array.isArray(path4)) { + this.path = path4; + this.propertyPath = path4.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path2; + this.propertyPath = path4; } this.base = base; this.schemas = schemas; }; - SchemaContext.prototype.resolve = function resolve2(target) { + SchemaContext.prototype.resolve = function resolve3(target) { return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path2 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path4 = 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, path2, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema2, this.options, path4, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -29517,7 +29517,7 @@ var require_validator = __commonJS({ } return schema2; }; - Validator2.prototype.resolve = function resolve2(schema2, switchSchema, ctx) { + Validator2.prototype.resolve = function resolve3(schema2, switchSchema, ctx) { switchSchema = ctx.resolve(switchSchema); if (ctx.schemas[switchSchema]) { return { subschema: ctx.schemas[switchSchema], switchSchema }; @@ -29664,11 +29664,11 @@ var require_command2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.issue = exports2.issueCommand = void 0; - var os = __importStar2(require("os")); + var os2 = __importStar2(require("os")); var utils_1 = require_utils5(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os.EOL); + process.stdout.write(cmd.toString() + os2.EOL); } exports2.issueCommand = issueCommand; function issue(name, message = "") { @@ -29751,18 +29751,18 @@ var require_file_command2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; var crypto2 = __importStar2(require("crypto")); - var fs2 = __importStar2(require("fs")); - var os = __importStar2(require("os")); + var fs3 = __importStar2(require("fs")); + var os2 = __importStar2(require("os")); var utils_1 = require_utils5(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); } - if (!fs2.existsSync(filePath)) { + if (!fs3.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs2.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { + fs3.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os2.EOL}`, { encoding: "utf8" }); } @@ -29776,7 +29776,7 @@ var require_file_command2 = __commonJS({ if (convertedValue.includes(delimiter)) { throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; + return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; } exports2.prepareKeyValueMessage = prepareKeyValueMessage; } @@ -29897,11 +29897,11 @@ var require_lib3 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -29917,7 +29917,7 @@ var require_lib3 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -30003,26 +30003,26 @@ var require_lib3 = __commonJS({ } readBody() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve3) => __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", () => { - resolve2(output.toString()); + resolve3(output.toString()); }); })); }); } readBodyBuffer() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve3) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); }); this.message.on("end", () => { - resolve2(Buffer.concat(chunks)); + resolve3(Buffer.concat(chunks)); }); })); }); @@ -30231,14 +30231,14 @@ var require_lib3 = __commonJS({ */ requestRaw(info7, data) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { function callbackForResult(err, res) { if (err) { reject(err); } else if (!res) { reject(new Error("Unknown error")); } else { - resolve2(res); + resolve3(res); } } this.requestRawWithCallback(info7, data, callbackForResult); @@ -30420,12 +30420,12 @@ var require_lib3 = __commonJS({ return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); + return new Promise((resolve3) => setTimeout(() => resolve3(), ms)); }); } _processResponse(res, options) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve3, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -30433,7 +30433,7 @@ var require_lib3 = __commonJS({ headers: {} }; if (statusCode === HttpCodes.NotFound) { - resolve2(response); + resolve3(response); } function dateTimeDeserializer(key, value) { if (typeof value === "string") { @@ -30472,7 +30472,7 @@ var require_lib3 = __commonJS({ err.result = response.result; reject(err); } else { - resolve2(response); + resolve3(response); } })); }); @@ -30489,11 +30489,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -30509,7 +30509,7 @@ var require_auth2 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -30593,11 +30593,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -30613,7 +30613,7 @@ var require_oidc_utils2 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -30691,11 +30691,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -30711,7 +30711,7 @@ var require_summary2 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -31012,7 +31012,7 @@ var require_path_utils2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path2 = __importStar2(require("path")); + var path4 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -31022,7 +31022,7 @@ var require_path_utils2 = __commonJS({ } exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path2.sep); + return pth.replace(/[/\\]/g, path4.sep); } exports2.toPlatformPath = toPlatformPath; } @@ -31057,11 +31057,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -31077,7 +31077,7 @@ var require_io_util2 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -31085,12 +31085,12 @@ var require_io_util2 = __commonJS({ var _a; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs2 = __importStar2(require("fs")); - var path2 = __importStar2(require("path")); - _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + var fs3 = __importStar2(require("fs")); + var path4 = __importStar2(require("path")); + _a = fs3.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs2.constants.O_RDONLY; + exports2.READONLY = fs3.constants.O_RDONLY; function exists(fsPath) { return __awaiter2(this, void 0, void 0, function* () { try { @@ -31135,7 +31135,7 @@ var require_io_util2 = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path2.extname(filePath).toUpperCase(); + const upperExt = path4.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -31159,11 +31159,11 @@ var require_io_util2 = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path2.dirname(filePath); - const upperName = path2.basename(filePath).toUpperCase(); + const directory = path4.dirname(filePath); + const upperName = path4.basename(filePath).toUpperCase(); for (const actualName of yield exports2.readdir(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path2.join(directory, actualName); + filePath = path4.join(directory, actualName); break; } } @@ -31230,11 +31230,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -31250,7 +31250,7 @@ var require_io2 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -31258,7 +31258,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 path2 = __importStar2(require("path")); + var path4 = __importStar2(require("path")); var ioUtil = __importStar2(require_io_util2()); function cp(source, dest, options = {}) { return __awaiter2(this, void 0, void 0, function* () { @@ -31267,7 +31267,7 @@ var require_io2 = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path4.join(dest, path4.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -31279,7 +31279,7 @@ var require_io2 = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path2.relative(source, newDest) === "") { + if (path4.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile(source, newDest, force); @@ -31292,7 +31292,7 @@ var require_io2 = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path2.join(dest, path2.basename(source)); + dest = path4.join(dest, path4.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -31303,7 +31303,7 @@ var require_io2 = __commonJS({ } } } - yield mkdirP(path2.dirname(dest)); + yield mkdirP(path4.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -31366,7 +31366,7 @@ var require_io2 = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path4.delimiter)) { if (extension) { extensions.push(extension); } @@ -31379,12 +31379,12 @@ var require_io2 = __commonJS({ } return []; } - if (tool.includes(path2.sep)) { + if (tool.includes(path4.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path2.delimiter)) { + for (const p of process.env.PATH.split(path4.delimiter)) { if (p) { directories.push(p); } @@ -31392,7 +31392,7 @@ var require_io2 = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path4.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -31478,11 +31478,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -31498,17 +31498,17 @@ var require_toolrunner2 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.argStringToArray = exports2.ToolRunner = void 0; - var os = __importStar2(require("os")); + var os2 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path2 = __importStar2(require("path")); + var path4 = __importStar2(require("path")); var io6 = __importStar2(require_io2()); var ioUtil = __importStar2(require_io_util2()); var timers_1 = require("timers"); @@ -31560,12 +31560,12 @@ var require_toolrunner2 = __commonJS({ _processLineBuffer(data, strBuffer, onLine) { try { let s = strBuffer + data.toString(); - let n = s.indexOf(os.EOL); + let n = s.indexOf(os2.EOL); while (n > -1) { const line = s.substring(0, n); onLine(line); - s = s.substring(n + os.EOL.length); - n = s.indexOf(os.EOL); + s = s.substring(n + os2.EOL.length); + n = s.indexOf(os2.EOL); } return s; } catch (err) { @@ -31723,10 +31723,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 = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path4.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io6.which(this.toolPath, true); - return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve3, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -31734,7 +31734,7 @@ var require_toolrunner2 = __commonJS({ } const optionsNonNull = this._cloneExecOptions(this.options); if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os2.EOL); } const state = new ExecState(optionsNonNull, this.toolPath); state.on("debug", (message) => { @@ -31809,7 +31809,7 @@ var require_toolrunner2 = __commonJS({ if (error3) { reject(error3); } else { - resolve2(exitCode); + resolve3(exitCode); } }); if (this.options.input) { @@ -31962,11 +31962,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -31982,7 +31982,7 @@ var require_exec2 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -32073,11 +32073,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -32093,7 +32093,7 @@ var require_platform2 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -32192,11 +32192,11 @@ var require_core2 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -32212,7 +32212,7 @@ var require_core2 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -32222,8 +32222,8 @@ var require_core2 = __commonJS({ var command_1 = require_command2(); var file_command_1 = require_file_command2(); var utils_1 = require_utils5(); - var os = __importStar2(require("os")); - var path2 = __importStar2(require("path")); + var os2 = __importStar2(require("os")); + var path4 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils2(); var ExitCode; (function(ExitCode2) { @@ -32251,7 +32251,7 @@ var require_core2 = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path4.delimiter}${process.env["PATH"]}`; } exports2.addPath = addPath; function getInput2(name, options) { @@ -32290,7 +32290,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); if (filePath) { return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); } - process.stdout.write(os.EOL); + process.stdout.write(os2.EOL); (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); } exports2.setOutput = setOutput; @@ -32324,7 +32324,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports2.notice = notice; function info7(message) { - process.stdout.write(message + os.EOL); + process.stdout.write(message + os2.EOL); } exports2.info = info7; function startGroup3(name) { @@ -32494,21 +32494,21 @@ var require_internal_path_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path2 = __importStar2(require("path")); + var path4 = __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 = path2.dirname(p); + let result = path4.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } return result; } - exports2.dirname = dirname2; + exports2.dirname = dirname3; function ensureAbsoluteRoot(root, itemPath) { (0, assert_1.default)(root, `ensureAbsoluteRoot parameter 'root' must not be empty`); (0, assert_1.default)(itemPath, `ensureAbsoluteRoot parameter 'itemPath' must not be empty`); @@ -32540,7 +32540,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 += path2.sep; + root += path4.sep; } return root + itemPath; } @@ -32578,10 +32578,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path2.sep)) { + if (!p.endsWith(path4.sep)) { return p; } - if (p === path2.sep) { + if (p === path4.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -32918,7 +32918,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path2 = (function() { + var path4 = (function() { try { return require("path"); } catch (e) { @@ -32926,7 +32926,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path2.sep; + minimatch.sep = path4.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand = require_brace_expansion(); var plTypes = { @@ -33015,8 +33015,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path2.sep !== "/") { - pattern = pattern.split(path2.sep).join("/"); + if (!options.allowWindowsEscape && path4.sep !== "/") { + pattern = pattern.split(path4.sep).join("/"); } this.options = options; this.set = []; @@ -33385,8 +33385,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path2.sep !== "/") { - f = f.split(path2.sep).join("/"); + if (path4.sep !== "/") { + f = f.split(path4.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -33522,7 +33522,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path2 = __importStar2(require("path")); + var path4 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -33537,13 +33537,13 @@ 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(path2.sep); + this.segments = itemPath.split(path4.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path2.basename(remaining); - this.segments.unshift(basename); + const basename2 = path4.basename(remaining); + this.segments.unshift(basename2); remaining = dir; dir = pathHelper.dirname(remaining); } @@ -33560,7 +33560,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(path2.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path4.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -33571,12 +33571,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path2.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path4.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path2.sep; + result += path4.sep; } result += this.segments[i]; } @@ -33623,8 +33623,8 @@ var require_internal_pattern = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; - var os = __importStar2(require("os")); - var path2 = __importStar2(require("path")); + var os2 = __importStar2(require("os")); + var path4 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); @@ -33653,7 +33653,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(path2.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path4.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -33677,8 +33677,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path2.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path2.sep}`; + if (!itemPath.endsWith(path4.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path4.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -33713,10 +33713,10 @@ 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(`.${path2.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path4.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path2.sep}`)) { - homedir = homedir || os.homedir(); + } else if (pattern === "~" || pattern.startsWith(`~${path4.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}'`); pattern = _Pattern.globEscape(homedir) + pattern.substr(1); @@ -33799,8 +33799,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path2, level) { - this.path = path2; + constructor(path4, level) { + this.path = path4; this.level = level; } }; @@ -33841,11 +33841,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -33861,7 +33861,7 @@ var require_internal_globber = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -33874,14 +33874,14 @@ var require_internal_globber = __commonJS({ }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve2, reject) { - v = o[n](v), settle(resolve2, reject, v.done, v.value); + return new Promise(function(resolve3, reject) { + v = o[n](v), settle(resolve3, reject, v.done, v.value); }); }; } - function settle(resolve2, reject, d, v) { + function settle(resolve3, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve2({ value: v2, done: d }); + resolve3({ value: v2, done: d }); }, reject); } }; @@ -33924,9 +33924,9 @@ var require_internal_globber = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core14 = __importStar2(require_core2()); - var fs2 = __importStar2(require("fs")); + var fs3 = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); - var path2 = __importStar2(require("path")); + var path4 = __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(); @@ -33978,7 +33978,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core14.debug(`Search path '${searchPath}'`); try { - yield __await2(fs2.promises.lstat(searchPath)); + yield __await2(fs3.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -34002,7 +34002,7 @@ var require_internal_globber = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path2.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path4.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -34012,7 +34012,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await2(fs2.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path2.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs3.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path4.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); @@ -34047,7 +34047,7 @@ var require_internal_globber = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs2.promises.stat(item.path); + stats = yield fs3.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -34059,10 +34059,10 @@ var require_internal_globber = __commonJS({ throw err; } } else { - stats = yield fs2.promises.lstat(item.path); + stats = yield fs3.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs2.promises.realpath(item.path); + const realPath = yield fs3.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -34113,11 +34113,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -34133,7 +34133,7 @@ var require_internal_hash_files = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -34146,14 +34146,14 @@ var require_internal_hash_files = __commonJS({ }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve2, reject) { - v = o[n](v), settle(resolve2, reject, v.done, v.value); + return new Promise(function(resolve3, reject) { + v = o[n](v), settle(resolve3, reject, v.done, v.value); }); }; } - function settle(resolve2, reject, d, v) { + function settle(resolve3, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve2({ value: v2, done: d }); + resolve3({ value: v2, done: d }); }, reject); } }; @@ -34161,10 +34161,10 @@ var require_internal_hash_files = __commonJS({ exports2.hashFiles = void 0; var crypto2 = __importStar2(require("crypto")); var core14 = __importStar2(require_core2()); - var fs2 = __importStar2(require("fs")); + var fs3 = __importStar2(require("fs")); var stream = __importStar2(require("stream")); var util = __importStar2(require("util")); - var path2 = __importStar2(require("path")); + var path4 = __importStar2(require("path")); function hashFiles2(globber, currentWorkspace, verbose = false) { var _a, e_1, _b, _c; var _d; @@ -34180,17 +34180,17 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path2.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path4.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } - if (fs2.statSync(file).isDirectory()) { + if (fs3.statSync(file).isDirectory()) { writeDelegate(`Skip directory '${file}'.`); continue; } const hash = crypto2.createHash("sha256"); const pipeline = util.promisify(stream.pipeline); - yield pipeline(fs2.createReadStream(file), hash); + yield pipeline(fs3.createReadStream(file), hash); result.write(hash.digest()); count++; if (!hasMatch) { @@ -34226,11 +34226,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -34246,7 +34246,7 @@ var require_glob = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -35507,11 +35507,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -35527,7 +35527,7 @@ var require_cacheUtils = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -35540,14 +35540,14 @@ var require_cacheUtils = __commonJS({ }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve2, reject) { - v = o[n](v), settle(resolve2, reject, v.done, v.value); + return new Promise(function(resolve3, reject) { + v = o[n](v), settle(resolve3, reject, v.done, v.value); }); }; } - function settle(resolve2, reject, d, v) { + function settle(resolve3, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve2({ value: v2, done: d }); + resolve3({ value: v2, done: d }); }, reject); } }; @@ -35567,8 +35567,8 @@ var require_cacheUtils = __commonJS({ var glob2 = __importStar2(require_glob()); var io6 = __importStar2(require_io()); var crypto2 = __importStar2(require("crypto")); - var fs2 = __importStar2(require("fs")); - var path2 = __importStar2(require("path")); + var fs3 = __importStar2(require("fs")); + var path4 = __importStar2(require("path")); var semver9 = __importStar2(require_semver3()); var util = __importStar2(require("util")); var constants_1 = require_constants7(); @@ -35588,15 +35588,15 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path2.join(baseLocation, "actions", "temp"); + tempDirectory = path4.join(baseLocation, "actions", "temp"); } - const dest = path2.join(tempDirectory, crypto2.randomUUID()); + const dest = path4.join(tempDirectory, crypto2.randomUUID()); yield io6.mkdirP(dest); return dest; }); } function getArchiveFileSizeInBytes(filePath) { - return fs2.statSync(filePath).size; + return fs3.statSync(filePath).size; } function resolvePaths(patterns) { return __awaiter2(this, void 0, void 0, function* () { @@ -35612,7 +35612,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path2.relative(workspace, file).replace(new RegExp(`\\${path2.sep}`, "g"), "/"); + const relativeFile = path4.relative(workspace, file).replace(new RegExp(`\\${path4.sep}`, "g"), "/"); core14.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -35634,7 +35634,7 @@ var require_cacheUtils = __commonJS({ } function unlinkFile(filePath) { return __awaiter2(this, void 0, void 0, function* () { - return util.promisify(fs2.unlink)(filePath); + return util.promisify(fs3.unlink)(filePath); }); } function getVersion(app_1) { @@ -35676,7 +35676,7 @@ var require_cacheUtils = __commonJS({ } function getGnuTarPathOnWindows() { return __awaiter2(this, void 0, void 0, function* () { - if (fs2.existsSync(constants_1.GnuTarPathOnWindows)) { + if (fs3.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); @@ -35829,11 +35829,11 @@ function __metadata(metadataKey, metadataValue) { } function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -35849,7 +35849,7 @@ function __awaiter(thisArg, _arguments, P, generator) { } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -36040,14 +36040,14 @@ function __asyncValues(o) { }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve2, reject) { - v = o[n](v), settle(resolve2, reject, v.done, v.value); + return new Promise(function(resolve3, reject) { + v = o[n](v), settle(resolve3, reject, v.done, v.value); }); }; } - function settle(resolve2, reject, d, v) { + function settle(resolve3, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve2({ value: v2, done: d }); + resolve3({ value: v2, done: d }); }, reject); } } @@ -36139,13 +36139,13 @@ function __disposeResources(env) { } return next(); } -function __rewriteRelativeImportExtension(path2, preserveJsx) { - if (typeof path2 === "string" && /^\.\.?\//.test(path2)) { - return path2.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { +function __rewriteRelativeImportExtension(path4, preserveJsx) { + if (typeof path4 === "string" && /^\.\.?\//.test(path4)) { + return path4.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 path2; + return path4; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -37219,9 +37219,9 @@ var require_nodeHttpClient = __commonJS({ if (stream.readable === false) { return Promise.resolve(); } - return new Promise((resolve2) => { + return new Promise((resolve3) => { const handler = () => { - resolve2(); + resolve3(); stream.removeListener("close", handler); stream.removeListener("end", handler); stream.removeListener("error", handler); @@ -37376,8 +37376,8 @@ var require_nodeHttpClient = __commonJS({ headers: request.headers.toJSON({ preserveCase: true }), ...request.requestOverrides }; - return new Promise((resolve2, reject) => { - const req = isInsecure ? node_http_1.default.request(options, resolve2) : node_https_1.default.request(options, resolve2); + return new Promise((resolve3, reject) => { + const req = isInsecure ? node_http_1.default.request(options, resolve3) : node_https_1.default.request(options, resolve3); req.once("error", (err) => { reject(new restError_js_1.RestError(err.message, { code: err.code ?? restError_js_1.RestError.REQUEST_SEND_ERROR, request })); }); @@ -37461,7 +37461,7 @@ var require_nodeHttpClient = __commonJS({ return stream; } function streamToText(stream) { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { const buffer = []; stream.on("data", (chunk) => { if (Buffer.isBuffer(chunk)) { @@ -37471,7 +37471,7 @@ var require_nodeHttpClient = __commonJS({ } }); stream.on("end", () => { - resolve2(Buffer.concat(buffer).toString("utf8")); + resolve3(Buffer.concat(buffer).toString("utf8")); }); stream.on("error", (e) => { if (e && e?.name === "AbortError") { @@ -37749,7 +37749,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((resolve2, reject) => { + return new Promise((resolve3, reject) => { let timer = void 0; let onAborted = void 0; const rejectOnAbort = () => { @@ -37772,7 +37772,7 @@ var require_helpers2 = __commonJS({ } timer = setTimeout(() => { removeListeners(); - resolve2(value); + resolve3(value); }, delayInMs); if (options?.abortSignal) { options.abortSignal.addEventListener("abort", onAborted); @@ -38592,7 +38592,7 @@ var require_has_flag = __commonJS({ var require_supports_color = __commonJS({ "node_modules/supports-color/index.js"(exports2, module2) { "use strict"; - var os = require("os"); + var os2 = require("os"); var tty = require("tty"); var hasFlag = require_has_flag(); var { env } = process; @@ -38640,7 +38640,7 @@ var require_supports_color = __commonJS({ return min; } if (process.platform === "win32") { - const osRelease = os.release().split("."); + const osRelease = os2.release().split("."); if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { return Number(osRelease[2]) >= 14931 ? 3 : 2; } @@ -38935,8 +38935,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((resolve2, reject) => { - req2.once("response", resolve2).once("error", reject).end(); + const promise = new Promise((resolve3, reject) => { + req2.once("response", resolve3).once("error", reject).end(); }); req2.then = promise.then.bind(promise); return req2; @@ -39113,7 +39113,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((resolve2, reject) => { + return new Promise((resolve3, reject) => { let buffersLength = 0; const buffers = []; function read() { @@ -39179,7 +39179,7 @@ var require_parse_proxy_response = __commonJS({ } debug4("got proxy server response: %o %o", firstLine, headers); cleanup(); - resolve2({ + resolve3({ connect: { statusCode, statusText, @@ -40559,8 +40559,8 @@ var require_getClient = __commonJS({ } const { allowInsecureConnection, httpClient } = clientOptions; const endpointUrl = clientOptions.endpoint ?? endpoint; - const client = (path2, ...args) => { - const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path2, args, { allowInsecureConnection, ...requestOptions }); + const client = (path4, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path4, args, { allowInsecureConnection, ...requestOptions }); return { get: (requestOptions = {}) => { return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); @@ -41265,7 +41265,7 @@ var require_createAbortablePromise = __commonJS({ var abort_controller_1 = require_commonjs3(); function createAbortablePromise(buildPromise, options) { const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options ?? {}; - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { function rejectOnAbort() { reject(new abort_controller_1.AbortError(abortErrorMsg ?? "The operation was aborted.")); } @@ -41283,7 +41283,7 @@ var require_createAbortablePromise = __commonJS({ try { buildPromise((x) => { removeListeners(); - resolve2(x); + resolve3(x); }, (x) => { removeListeners(); reject(x); @@ -41310,8 +41310,8 @@ var require_delay2 = __commonJS({ function delay(timeInMs, options) { let token; const { abortSignal, abortErrorMsg } = options ?? {}; - return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve2) => { - token = setTimeout(resolve2, timeInMs); + return (0, createAbortablePromise_js_1.createAbortablePromise)((resolve3) => { + token = setTimeout(resolve3, timeInMs); }, { cleanupBeforeAbort: () => clearTimeout(token), abortSignal, @@ -44431,15 +44431,15 @@ var require_urlHelpers2 = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path2 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path2.startsWith("/")) { - path2 = path2.substring(1); + let path4 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path4.startsWith("/")) { + path4 = path4.substring(1); } - if (isAbsoluteUrl(path2)) { - requestUrl = path2; + if (isAbsoluteUrl(path4)) { + requestUrl = path4; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path2); + requestUrl = appendPath(requestUrl, path4); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -44485,9 +44485,9 @@ var require_urlHelpers2 = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path2 = pathToAppend.substring(0, searchStart); + const path4 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path2; + newPath = newPath + path4; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -46716,10 +46716,10 @@ var require_utils_common = __commonJS({ var constants_js_1 = require_constants10(); function escapeURLPath(url) { const urlParsed = new URL(url); - let path2 = urlParsed.pathname; - path2 = path2 || "/"; - path2 = escape(path2); - urlParsed.pathname = path2; + let path4 = urlParsed.pathname; + path4 = path4 || "/"; + path4 = escape(path4); + urlParsed.pathname = path4; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -46804,9 +46804,9 @@ var require_utils_common = __commonJS({ } function appendToURLPath(url, name) { const urlParsed = new URL(url); - let path2 = urlParsed.pathname; - path2 = path2 ? path2.endsWith("/") ? `${path2}${name}` : `${path2}/${name}` : name; - urlParsed.pathname = path2; + let path4 = urlParsed.pathname; + path4 = path4 ? path4.endsWith("/") ? `${path4}${name}` : `${path4}/${name}` : name; + urlParsed.pathname = path4; return urlParsed.toString(); } function setURLParameter(url, name, value) { @@ -46921,7 +46921,7 @@ var require_utils_common = __commonJS({ return base64encode(res); } async function delay(timeInMs, aborter, abortError) { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { let timeout; const abortHandler = () => { if (timeout !== void 0) { @@ -46933,7 +46933,7 @@ var require_utils_common = __commonJS({ if (aborter !== void 0) { aborter.removeEventListener("abort", abortHandler); } - resolve2(); + resolve3(); }; timeout = setTimeout(resolveHandler, timeInMs); if (aborter !== void 0) { @@ -48033,9 +48033,9 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + const path4 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path2}`; + canonicalizedResourceString += `/${this.factory.accountName}${path4}`; const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { @@ -48474,7 +48474,7 @@ var require_BufferScheduler = __commonJS({ * */ async do() { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { this.readable.on("data", (data) => { data = typeof data === "string" ? Buffer.from(data, this.encoding) : data; this.appendUnresolvedData(data); @@ -48502,11 +48502,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(resolve2).catch(reject); + this.outgoingHandler(() => buffer.getReadableStream(), buffer.size, this.offset).then(resolve3).catch(reject); } else if (this.unresolvedLength >= this.bufferSize) { return; } else { - resolve2(); + resolve3(); } } }); @@ -48774,10 +48774,10 @@ var require_utils_common2 = __commonJS({ var constants_js_1 = require_constants11(); function escapeURLPath(url) { const urlParsed = new URL(url); - let path2 = urlParsed.pathname; - path2 = path2 || "/"; - path2 = escape(path2); - urlParsed.pathname = path2; + let path4 = urlParsed.pathname; + path4 = path4 || "/"; + path4 = escape(path4); + urlParsed.pathname = path4; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -48862,9 +48862,9 @@ var require_utils_common2 = __commonJS({ } function appendToURLPath(url, name) { const urlParsed = new URL(url); - let path2 = urlParsed.pathname; - path2 = path2 ? path2.endsWith("/") ? `${path2}${name}` : `${path2}/${name}` : name; - urlParsed.pathname = path2; + let path4 = urlParsed.pathname; + path4 = path4 ? path4.endsWith("/") ? `${path4}${name}` : `${path4}/${name}` : name; + urlParsed.pathname = path4; return urlParsed.toString(); } function setURLParameter(url, name, value) { @@ -48979,7 +48979,7 @@ var require_utils_common2 = __commonJS({ return base64encode(res); } async function delay(timeInMs, aborter, abortError) { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { let timeout; const abortHandler = () => { if (timeout !== void 0) { @@ -48991,7 +48991,7 @@ var require_utils_common2 = __commonJS({ if (aborter !== void 0) { aborter.removeEventListener("abort", abortHandler); } - resolve2(); + resolve3(); }; timeout = setTimeout(resolveHandler, timeInMs); if (aborter !== void 0) { @@ -49785,9 +49785,9 @@ var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + const path4 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path2}`; + canonicalizedResourceString += `/${this.factory.accountName}${path4}`; const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { @@ -50417,9 +50417,9 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + const path4 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path2}`; + canonicalizedResourceString += `/${options.accountName}${path4}`; const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { @@ -50764,9 +50764,9 @@ var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path2 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; + const path4 = (0, utils_common_js_1.getURLPath)(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path2}`; + canonicalizedResourceString += `/${options.accountName}${path4}`; const queries = (0, utils_common_js_1.getURLQueries)(request.url); const lowercaseQueries = {}; if (queries) { @@ -67189,7 +67189,7 @@ var require_AvroReadableFromStream = __commonJS({ this._position += chunk.length; return this.toUint8Array(chunk); } else { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { const cleanUp = () => { this._readable.removeListener("readable", readableCallback); this._readable.removeListener("error", rejectCallback); @@ -67204,7 +67204,7 @@ var require_AvroReadableFromStream = __commonJS({ if (callbackChunk) { this._position += callbackChunk.length; cleanUp(); - resolve2(this.toUint8Array(callbackChunk)); + resolve3(this.toUint8Array(callbackChunk)); } }; const rejectCallback = () => { @@ -68684,8 +68684,8 @@ var require_poller3 = __commonJS({ this.stopped = true; this.pollProgressCallbacks = []; this.operation = operation; - this.promise = new Promise((resolve2, reject) => { - this.resolve = resolve2; + this.promise = new Promise((resolve3, reject) => { + this.resolve = resolve3; this.reject = reject; }); this.promise.catch(() => { @@ -68938,7 +68938,7 @@ var require_lroEngine = __commonJS({ * The method used by the poller to wait before attempting to update its operation. */ delay() { - return new Promise((resolve2) => setTimeout(() => resolve2(), this.config.intervalInMs)); + return new Promise((resolve3) => setTimeout(() => resolve3(), this.config.intervalInMs)); } }; exports2.LroEngine = LroEngine; @@ -69184,8 +69184,8 @@ var require_Batch = __commonJS({ return Promise.resolve(); } this.parallelExecute(); - return new Promise((resolve2, reject) => { - this.emitter.on("finish", resolve2); + return new Promise((resolve3, reject) => { + this.emitter.on("finish", resolve3); this.emitter.on("error", (error3) => { this.state = BatchStates.Error; reject(error3); @@ -69246,12 +69246,12 @@ var require_utils7 = __commonJS({ async function streamToBuffer(stream, buffer, offset, end, encoding) { let pos = 0; const count = end - offset; - return new Promise((resolve2, reject) => { + return new Promise((resolve3, 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); - resolve2(); + resolve3(); return; } let chunk = stream.read(); @@ -69270,7 +69270,7 @@ var require_utils7 = __commonJS({ if (pos < count) { reject(new Error(`Stream drains before getting enough data needed. Data read: ${pos}, data need: ${count}`)); } - resolve2(); + resolve3(); }); stream.on("error", (msg) => { clearTimeout(timeout); @@ -69281,7 +69281,7 @@ var require_utils7 = __commonJS({ async function streamToBuffer2(stream, buffer, encoding) { let pos = 0; const bufferSize = buffer.length; - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { stream.on("readable", () => { let chunk = stream.read(); if (!chunk) { @@ -69298,25 +69298,25 @@ var require_utils7 = __commonJS({ pos += chunk.length; }); stream.on("end", () => { - resolve2(pos); + resolve3(pos); }); stream.on("error", reject); }); } async function streamToBuffer3(readableStream, encoding) { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { const chunks = []; readableStream.on("data", (data) => { chunks.push(typeof data === "string" ? Buffer.from(data, encoding) : data); }); readableStream.on("end", () => { - resolve2(Buffer.concat(chunks)); + resolve3(Buffer.concat(chunks)); }); readableStream.on("error", reject); }); } async function readStreamToLocalFile(rs, file) { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { const ws = node_fs_1.default.createWriteStream(file); rs.on("error", (err) => { reject(err); @@ -69324,7 +69324,7 @@ var require_utils7 = __commonJS({ ws.on("error", (err) => { reject(err); }); - ws.on("close", resolve2); + ws.on("close", resolve3); rs.pipe(ws); }); } @@ -70263,7 +70263,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((resolve2) => { + return new Promise((resolve3) => { 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"); } @@ -70274,7 +70274,7 @@ var require_Clients = __commonJS({ versionId: this._versionId, ...options }, this.credential).toString(); - resolve2((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve3((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -70313,7 +70313,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((resolve2) => { + return new Promise((resolve3) => { const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ containerName: this._containerName, blobName: this._name, @@ -70321,7 +70321,7 @@ var require_Clients = __commonJS({ versionId: this._versionId, ...options }, userDelegationKey, this.accountName).toString(); - resolve2((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve3((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -72176,14 +72176,14 @@ var require_Mutex = __commonJS({ * @param key - lock key */ static async lock(key) { - return new Promise((resolve2) => { + return new Promise((resolve3) => { if (this.keys[key] === void 0 || this.keys[key] === MutexLockStatus.UNLOCKED) { this.keys[key] = MutexLockStatus.LOCKED; - resolve2(); + resolve3(); } else { this.onUnlockEvent(key, () => { this.keys[key] = MutexLockStatus.LOCKED; - resolve2(); + resolve3(); }); } }); @@ -72194,12 +72194,12 @@ var require_Mutex = __commonJS({ * @param key - */ static async unlock(key) { - return new Promise((resolve2) => { + return new Promise((resolve3) => { if (this.keys[key] === MutexLockStatus.LOCKED) { this.emitUnlockEvent(key); } delete this.keys[key]; - resolve2(); + resolve3(); }); } static keys = {}; @@ -72421,8 +72421,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 path2 = (0, utils_common_js_1.getURLPath)(subRequest.url); - if (!path2 || path2 === "") { + const path4 = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path4 || path4 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -72500,8 +72500,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 path2 = (0, utils_common_js_1.getURLPath)(url); - if (path2 && path2 !== "/") { + const path4 = (0, utils_common_js_1.getURLPath)(url); + if (path4 && path4 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -73802,7 +73802,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((resolve2) => { + return new Promise((resolve3) => { 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"); } @@ -73810,7 +73810,7 @@ var require_ContainerClient = __commonJS({ containerName: this._containerName, ...options }, this.credential).toString(); - resolve2((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve3((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -73845,12 +73845,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((resolve2) => { + return new Promise((resolve3) => { const sas = (0, BlobSASSignatureValues_js_1.generateBlobSASQueryParameters)({ containerName: this._containerName, ...options }, userDelegationKey, this.accountName).toString(); - resolve2((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); + resolve3((0, utils_common_js_1.appendToURLQuery)(this.url, sas)); }); } /** @@ -75246,11 +75246,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -75266,7 +75266,7 @@ var require_uploadUtils = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -75433,11 +75433,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -75453,7 +75453,7 @@ var require_requestUtils = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -75493,7 +75493,7 @@ var require_requestUtils = __commonJS({ } function sleep(milliseconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2) => setTimeout(resolve2, milliseconds)); + return new Promise((resolve3) => setTimeout(resolve3, milliseconds)); }); } function retry3(name_1, method_1, getStatusCode_1) { @@ -75754,11 +75754,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -75774,7 +75774,7 @@ var require_downloadUtils = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -75788,7 +75788,7 @@ var require_downloadUtils = __commonJS({ var http_client_1 = require_lib(); var storage_blob_1 = require_commonjs15(); var buffer = __importStar2(require("buffer")); - var fs2 = __importStar2(require("fs")); + var fs3 = __importStar2(require("fs")); var stream = __importStar2(require("stream")); var util = __importStar2(require("util")); var utils = __importStar2(require_cacheUtils()); @@ -75899,7 +75899,7 @@ var require_downloadUtils = __commonJS({ exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { return __awaiter2(this, void 0, void 0, function* () { - const writeStream = fs2.createWriteStream(archivePath); + const writeStream = fs3.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); @@ -75924,7 +75924,7 @@ var require_downloadUtils = __commonJS({ function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { return __awaiter2(this, void 0, void 0, function* () { var _a; - const archiveDescriptor = yield fs2.promises.open(archivePath, "w"); + const archiveDescriptor = yield fs3.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true @@ -76040,7 +76040,7 @@ var require_downloadUtils = __commonJS({ } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); const downloadProgress = new DownloadProgress(contentLength); - const fd = fs2.openSync(archivePath, "w"); + const fd = fs3.openSync(archivePath, "w"); try { downloadProgress.startDisplayTimer(); const controller = new abort_controller_1.AbortController(); @@ -76058,20 +76058,20 @@ var require_downloadUtils = __commonJS({ controller.abort(); throw new Error("Aborting cache download as the download time exceeded the timeout."); } else if (Buffer.isBuffer(result)) { - fs2.writeFileSync(fd, result); + fs3.writeFileSync(fd, result); } } } finally { downloadProgress.stopDisplayTimer(); - fs2.closeSync(fd); + fs3.closeSync(fd); } } }); } var promiseWithTimeout = (timeoutMs, promise) => __awaiter2(void 0, void 0, void 0, function* () { let timeoutHandle; - const timeoutPromise = new Promise((resolve2) => { - timeoutHandle = setTimeout(() => resolve2("timeout"), timeoutMs); + const timeoutPromise = new Promise((resolve3) => { + timeoutHandle = setTimeout(() => resolve3("timeout"), timeoutMs); }); return Promise.race([promise, timeoutPromise]).then((result) => { clearTimeout(timeoutHandle); @@ -76352,11 +76352,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -76372,7 +76372,7 @@ var require_cacheHttpClient = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -76385,7 +76385,7 @@ var require_cacheHttpClient = __commonJS({ var core14 = __importStar2(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); - var fs2 = __importStar2(require("fs")); + var fs3 = __importStar2(require("fs")); var url_1 = require("url"); var utils = __importStar2(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); @@ -76520,7 +76520,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 = fs2.openSync(archivePath, "r"); + const fd = fs3.openSync(archivePath, "r"); const uploadOptions = (0, options_1.getUploadOptions)(options); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); @@ -76534,7 +76534,7 @@ Other caches with similar key:`); const start = offset; const end = offset + chunkSize - 1; offset += maxChunkSize; - yield uploadChunk(httpClient, resourceUrl, () => fs2.createReadStream(archivePath, { + yield uploadChunk(httpClient, resourceUrl, () => fs3.createReadStream(archivePath, { fd, start, end, @@ -76545,7 +76545,7 @@ Other caches with similar key:`); } }))); } finally { - fs2.closeSync(fd); + fs3.closeSync(fd); } return; }); @@ -79842,8 +79842,8 @@ var require_deferred = __commonJS({ */ constructor(preventUnhandledRejectionWarning = true) { this._state = DeferredState.PENDING; - this._promise = new Promise((resolve2, reject) => { - this._resolve = resolve2; + this._promise = new Promise((resolve3, reject) => { + this._resolve = resolve3; this._reject = reject; }); if (preventUnhandledRejectionWarning) { @@ -80058,11 +80058,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -80078,7 +80078,7 @@ var require_unary_call = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -80127,11 +80127,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -80147,7 +80147,7 @@ var require_server_streaming_call = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -80197,11 +80197,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -80217,7 +80217,7 @@ var require_client_streaming_call = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -80266,11 +80266,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -80286,7 +80286,7 @@ var require_duplex_streaming_call = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -80334,11 +80334,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -80354,7 +80354,7 @@ var require_test_transport = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -80551,11 +80551,11 @@ var require_test_transport = __commonJS({ responseTrailer: "test" }; function delay(ms, abort) { - return (v) => new Promise((resolve2, reject) => { + return (v) => new Promise((resolve3, reject) => { if (abort === null || abort === void 0 ? void 0 : abort.aborted) { reject(new rpc_error_1.RpcError("user cancel", "CANCELLED")); } else { - const id = setTimeout(() => resolve2(v), ms); + const id = setTimeout(() => resolve3(v), ms); if (abort) { abort.addEventListener("abort", (ev) => { clearTimeout(id); @@ -81553,11 +81553,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -81573,7 +81573,7 @@ var require_cacheTwirpClient = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -81713,7 +81713,7 @@ var require_cacheTwirpClient = __commonJS({ } sleep(milliseconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2) => setTimeout(resolve2, milliseconds)); + return new Promise((resolve3) => setTimeout(resolve3, milliseconds)); }); } getExponentialRetryTimeMilliseconds(attempt) { @@ -81778,11 +81778,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -81798,7 +81798,7 @@ var require_tar = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -81810,7 +81810,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io6 = __importStar2(require_io()); var fs_1 = require("fs"); - var path2 = __importStar2(require("path")); + var path4 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; @@ -81856,13 +81856,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(`\\${path2.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path4.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path4.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path4.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path2.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path4.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path4.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path4.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -81908,7 +81908,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path2.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path4.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -81917,7 +81917,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path2.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path4.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -81932,7 +81932,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path4.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -81941,7 +81941,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path2.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path4.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -81979,7 +81979,7 @@ var require_tar = __commonJS({ } function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path2.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path4.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -82030,11 +82030,11 @@ var require_cache4 = __commonJS({ })(); var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -82050,7 +82050,7 @@ var require_cache4 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -82061,7 +82061,7 @@ var require_cache4 = __commonJS({ exports2.restoreCache = restoreCache4; exports2.saveCache = saveCache4; var core14 = __importStar2(require_core()); - var path2 = __importStar2(require("path")); + var path4 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); @@ -82156,7 +82156,7 @@ var require_cache4 = __commonJS({ core14.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path2.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path4.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core14.isDebug()) { @@ -82225,7 +82225,7 @@ var require_cache4 = __commonJS({ core14.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path2.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path4.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); @@ -82287,7 +82287,7 @@ var require_cache4 = __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 = path2.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path4.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -82351,7 +82351,7 @@ var require_cache4 = __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 = path2.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path4.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -84608,13 +84608,13 @@ These characters are not allowed in the artifact name due to limitations with ce } (0, core_1.info)(`Artifact name is valid!`); } - function validateFilePath(path2) { - if (!path2) { + function validateFilePath(path4) { + if (!path4) { throw new Error(`Provided file path input during validation is empty`); } for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) { - if (path2.includes(invalidCharacterKey)) { - throw new Error(`The path for one of the files in artifact is not valid: ${path2}. Contains the following character: ${errorMessageForCharacter} + if (path4.includes(invalidCharacterKey)) { + throw new Error(`The path for one of the files in artifact is not valid: ${path4}. Contains the following character: ${errorMessageForCharacter} Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()} @@ -84963,11 +84963,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -84983,7 +84983,7 @@ var require_artifact_twirp_client2 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -85110,7 +85110,7 @@ var require_artifact_twirp_client2 = __commonJS({ } sleep(milliseconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2) => setTimeout(resolve2, milliseconds)); + return new Promise((resolve3) => setTimeout(resolve3, milliseconds)); }); } getExponentialRetryTimeMilliseconds(attempt) { @@ -85176,15 +85176,15 @@ var require_upload_zip_specification = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.validateRootDirectory = validateRootDirectory; exports2.getUploadZipSpecification = getUploadZipSpecification; - var fs2 = __importStar2(require("fs")); + var fs3 = __importStar2(require("fs")); var core_1 = require_core(); var path_1 = require("path"); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation(); function validateRootDirectory(rootDirectory) { - if (!fs2.existsSync(rootDirectory)) { + if (!fs3.existsSync(rootDirectory)) { throw new Error(`The provided rootDirectory ${rootDirectory} does not exist`); } - if (!fs2.statSync(rootDirectory).isDirectory()) { + if (!fs3.statSync(rootDirectory).isDirectory()) { throw new Error(`The provided rootDirectory ${rootDirectory} is not a valid directory`); } (0, core_1.info)(`Root directory input is valid!`); @@ -85194,7 +85194,7 @@ var require_upload_zip_specification = __commonJS({ rootDirectory = (0, path_1.normalize)(rootDirectory); rootDirectory = (0, path_1.resolve)(rootDirectory); for (let file of filesToZip) { - const stats = fs2.lstatSync(file, { throwIfNoEntry: false }); + const stats = fs3.lstatSync(file, { throwIfNoEntry: false }); if (!stats) { throw new Error(`File ${file} does not exist`); } @@ -85269,11 +85269,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -85289,7 +85289,7 @@ var require_blob_upload = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -85308,7 +85308,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((resolve2, reject) => { + return new Promise((resolve3, reject) => { const timer = setInterval(() => { if (Date.now() - lastProgressTime > interval) { reject(new Error("Upload progress stalled.")); @@ -85316,7 +85316,7 @@ var require_blob_upload = __commonJS({ }, interval); abortController.signal.addEventListener("abort", () => { clearInterval(timer); - resolve2(); + resolve3(); }); }); }); @@ -85539,8 +85539,8 @@ var require_minimatch2 = __commonJS({ return new Minimatch(pattern, options).match(p); }; module2.exports = minimatch; - var path2 = require_path(); - minimatch.sep = path2.sep; + var path4 = require_path(); + minimatch.sep = path4.sep; var GLOBSTAR = /* @__PURE__ */ Symbol("globstar **"); minimatch.GLOBSTAR = GLOBSTAR; var expand = require_brace_expansion2(); @@ -86049,8 +86049,8 @@ var require_minimatch2 = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; const options = this.options; - if (path2.sep !== "/") { - f = f.split(path2.sep).join("/"); + if (path4.sep !== "/") { + f = f.split(path4.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -86088,20 +86088,20 @@ var require_minimatch2 = __commonJS({ var require_readdir_glob = __commonJS({ "node_modules/readdir-glob/index.js"(exports2, module2) { module2.exports = readdirGlob; - var fs2 = require("fs"); + var fs3 = require("fs"); var { EventEmitter } = require("events"); var { Minimatch } = require_minimatch2(); - var { resolve: resolve2 } = require("path"); + var { resolve: resolve3 } = require("path"); function readdir(dir, strict) { - return new Promise((resolve3, reject) => { - fs2.readdir(dir, { withFileTypes: true }, (err, files) => { + return new Promise((resolve4, reject) => { + fs3.readdir(dir, { withFileTypes: true }, (err, files) => { if (err) { switch (err.code) { case "ENOTDIR": if (strict) { reject(err); } else { - resolve3([]); + resolve4([]); } break; case "ENOTSUP": @@ -86111,7 +86111,7 @@ var require_readdir_glob = __commonJS({ case "ENAMETOOLONG": // Filename too long case "UNKNOWN": - resolve3([]); + resolve4([]); break; case "ELOOP": // Too many levels of symbolic links @@ -86120,36 +86120,36 @@ var require_readdir_glob = __commonJS({ break; } } else { - resolve3(files); + resolve4(files); } }); }); } function stat(file, followSymlinks) { - return new Promise((resolve3, reject) => { - const statFunc = followSymlinks ? fs2.stat : fs2.lstat; + return new Promise((resolve4, reject) => { + const statFunc = followSymlinks ? fs3.stat : fs3.lstat; statFunc(file, (err, stats) => { if (err) { switch (err.code) { case "ENOENT": if (followSymlinks) { - resolve3(stat(file, false)); + resolve4(stat(file, false)); } else { - resolve3(null); + resolve4(null); } break; default: - resolve3(null); + resolve4(null); break; } } else { - resolve3(stats); + resolve4(stats); } }); }); } - async function* exploreWalkAsync(dir, path2, followSymlinks, useStat, shouldSkip, strict) { - let files = await readdir(path2 + dir, strict); + async function* exploreWalkAsync(dir, path4, followSymlinks, useStat, shouldSkip, strict) { + let files = await readdir(path4 + dir, strict); for (const file of files) { let name = file.name; if (name === void 0) { @@ -86158,7 +86158,7 @@ var require_readdir_glob = __commonJS({ } const filename = dir + "/" + name; const relative = filename.slice(1); - const absolute = path2 + "/" + relative; + const absolute = path4 + "/" + relative; let stats = null; if (useStat || followSymlinks) { stats = await stat(absolute, followSymlinks); @@ -86172,15 +86172,15 @@ var require_readdir_glob = __commonJS({ if (stats.isDirectory()) { if (!shouldSkip(relative)) { yield { relative, absolute, stats }; - yield* exploreWalkAsync(filename, path2, followSymlinks, useStat, shouldSkip, false); + yield* exploreWalkAsync(filename, path4, followSymlinks, useStat, shouldSkip, false); } } else { yield { relative, absolute, stats }; } } } - async function* explore(path2, followSymlinks, useStat, shouldSkip) { - yield* exploreWalkAsync("", path2, followSymlinks, useStat, shouldSkip, true); + async function* explore(path4, followSymlinks, useStat, shouldSkip) { + yield* exploreWalkAsync("", path4, followSymlinks, useStat, shouldSkip, true); } function readOptions(options) { return { @@ -86233,7 +86233,7 @@ var require_readdir_glob = __commonJS({ (skip) => new Minimatch(skip, { dot: true }) ); } - this.iterator = explore(resolve2(cwd || "."), this.options.follow, this.options.stat, this._shouldSkipDirectory.bind(this)); + this.iterator = explore(resolve3(cwd || "."), this.options.follow, this.options.stat, this._shouldSkipDirectory.bind(this)); this.paused = false; this.inactive = false; this.aborted = false; @@ -86400,10 +86400,10 @@ var require_async = __commonJS({ if (typeof args[arity - 1] === "function") { return asyncFn.apply(this, args); } - return new Promise((resolve2, reject2) => { + return new Promise((resolve3, reject2) => { args[arity - 1] = (err, ...cbArgs) => { if (err) return reject2(err); - resolve2(cbArgs.length > 1 ? cbArgs : cbArgs[0]); + resolve3(cbArgs.length > 1 ? cbArgs : cbArgs[0]); }; asyncFn.apply(this, args); }); @@ -86649,13 +86649,13 @@ var require_async = __commonJS({ var applyEachSeries = applyEach$1(mapSeries$1); const PROMISE_SYMBOL = /* @__PURE__ */ Symbol("promiseCallback"); function promiseCallback() { - let resolve2, reject2; + let resolve3, reject2; function callback(err, ...args) { if (err) return reject2(err); - resolve2(args.length > 1 ? args : args[0]); + resolve3(args.length > 1 ? args : args[0]); } callback[PROMISE_SYMBOL] = new Promise((res, rej) => { - resolve2 = res, reject2 = rej; + resolve3 = res, reject2 = rej; }); return callback; } @@ -87002,8 +87002,8 @@ var require_async = __commonJS({ }); } if (rejectOnError || !callback) { - return new Promise((resolve2, reject2) => { - res = resolve2; + return new Promise((resolve3, reject2) => { + res = resolve3; rej = reject2; }); } @@ -87042,10 +87042,10 @@ var require_async = __commonJS({ } const eventMethod = (name) => (handler) => { if (!handler) { - return new Promise((resolve2, reject2) => { + return new Promise((resolve3, reject2) => { once2(name, (err, data) => { if (err) return reject2(err); - resolve2(data); + resolve3(data); }); }); } @@ -88192,54 +88192,54 @@ var require_polyfills = __commonJS({ } var chdir; module2.exports = patch; - function patch(fs2) { + function patch(fs3) { if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs2); - } - if (!fs2.lutimes) { - patchLutimes(fs2); - } - fs2.chown = chownFix(fs2.chown); - fs2.fchown = chownFix(fs2.fchown); - fs2.lchown = chownFix(fs2.lchown); - fs2.chmod = chmodFix(fs2.chmod); - fs2.fchmod = chmodFix(fs2.fchmod); - fs2.lchmod = chmodFix(fs2.lchmod); - fs2.chownSync = chownFixSync(fs2.chownSync); - fs2.fchownSync = chownFixSync(fs2.fchownSync); - fs2.lchownSync = chownFixSync(fs2.lchownSync); - fs2.chmodSync = chmodFixSync(fs2.chmodSync); - fs2.fchmodSync = chmodFixSync(fs2.fchmodSync); - fs2.lchmodSync = chmodFixSync(fs2.lchmodSync); - fs2.stat = statFix(fs2.stat); - fs2.fstat = statFix(fs2.fstat); - fs2.lstat = statFix(fs2.lstat); - fs2.statSync = statFixSync(fs2.statSync); - fs2.fstatSync = statFixSync(fs2.fstatSync); - fs2.lstatSync = statFixSync(fs2.lstatSync); - if (fs2.chmod && !fs2.lchmod) { - fs2.lchmod = function(path2, mode, cb) { + patchLchmod(fs3); + } + if (!fs3.lutimes) { + patchLutimes(fs3); + } + fs3.chown = chownFix(fs3.chown); + fs3.fchown = chownFix(fs3.fchown); + fs3.lchown = chownFix(fs3.lchown); + fs3.chmod = chmodFix(fs3.chmod); + fs3.fchmod = chmodFix(fs3.fchmod); + fs3.lchmod = chmodFix(fs3.lchmod); + fs3.chownSync = chownFixSync(fs3.chownSync); + fs3.fchownSync = chownFixSync(fs3.fchownSync); + fs3.lchownSync = chownFixSync(fs3.lchownSync); + fs3.chmodSync = chmodFixSync(fs3.chmodSync); + fs3.fchmodSync = chmodFixSync(fs3.fchmodSync); + fs3.lchmodSync = chmodFixSync(fs3.lchmodSync); + fs3.stat = statFix(fs3.stat); + fs3.fstat = statFix(fs3.fstat); + fs3.lstat = statFix(fs3.lstat); + fs3.statSync = statFixSync(fs3.statSync); + fs3.fstatSync = statFixSync(fs3.fstatSync); + fs3.lstatSync = statFixSync(fs3.lstatSync); + if (fs3.chmod && !fs3.lchmod) { + fs3.lchmod = function(path4, mode, cb) { if (cb) process.nextTick(cb); }; - fs2.lchmodSync = function() { + fs3.lchmodSync = function() { }; } - if (fs2.chown && !fs2.lchown) { - fs2.lchown = function(path2, uid, gid, cb) { + if (fs3.chown && !fs3.lchown) { + fs3.lchown = function(path4, uid, gid, cb) { if (cb) process.nextTick(cb); }; - fs2.lchownSync = function() { + fs3.lchownSync = function() { }; } if (platform === "win32") { - fs2.rename = typeof fs2.rename !== "function" ? fs2.rename : (function(fs$rename) { + fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : (function(fs$rename) { function rename(from, to, cb) { var start = Date.now(); var backoff = 0; fs$rename(from, to, function CB(er) { if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { setTimeout(function() { - fs2.stat(to, function(stater, st) { + fs3.stat(to, function(stater, st) { if (stater && stater.code === "ENOENT") fs$rename(from, to, CB); else @@ -88255,9 +88255,9 @@ var require_polyfills = __commonJS({ } if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); return rename; - })(fs2.rename); + })(fs3.rename); } - fs2.read = typeof fs2.read !== "function" ? fs2.read : (function(fs$read) { + fs3.read = typeof fs3.read !== "function" ? fs3.read : (function(fs$read) { function read(fd, buffer, offset, length, position, callback_) { var callback; if (callback_ && typeof callback_ === "function") { @@ -88265,22 +88265,22 @@ var require_polyfills = __commonJS({ callback = function(er, _2, __) { if (er && er.code === "EAGAIN" && eagCounter < 10) { eagCounter++; - return fs$read.call(fs2, fd, buffer, offset, length, position, callback); + return fs$read.call(fs3, fd, buffer, offset, length, position, callback); } callback_.apply(this, arguments); }; } - return fs$read.call(fs2, fd, buffer, offset, length, position, callback); + return fs$read.call(fs3, fd, buffer, offset, length, position, callback); } if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); return read; - })(fs2.read); - fs2.readSync = typeof fs2.readSync !== "function" ? fs2.readSync : /* @__PURE__ */ (function(fs$readSync) { + })(fs3.read); + fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ (function(fs$readSync) { return function(fd, buffer, offset, length, position) { var eagCounter = 0; while (true) { try { - return fs$readSync.call(fs2, fd, buffer, offset, length, position); + return fs$readSync.call(fs3, fd, buffer, offset, length, position); } catch (er) { if (er.code === "EAGAIN" && eagCounter < 10) { eagCounter++; @@ -88290,11 +88290,11 @@ var require_polyfills = __commonJS({ } } }; - })(fs2.readSync); - function patchLchmod(fs3) { - fs3.lchmod = function(path2, mode, callback) { - fs3.open( - path2, + })(fs3.readSync); + function patchLchmod(fs4) { + fs4.lchmod = function(path4, mode, callback) { + fs4.open( + path4, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) { @@ -88302,80 +88302,80 @@ var require_polyfills = __commonJS({ if (callback) callback(err); return; } - fs3.fchmod(fd, mode, function(err2) { - fs3.close(fd, function(err22) { + fs4.fchmod(fd, mode, function(err2) { + fs4.close(fd, function(err22) { if (callback) callback(err2 || err22); }); }); } ); }; - fs3.lchmodSync = function(path2, mode) { - var fd = fs3.openSync(path2, constants.O_WRONLY | constants.O_SYMLINK, mode); + fs4.lchmodSync = function(path4, mode) { + var fd = fs4.openSync(path4, constants.O_WRONLY | constants.O_SYMLINK, mode); var threw = true; var ret; try { - ret = fs3.fchmodSync(fd, mode); + ret = fs4.fchmodSync(fd, mode); threw = false; } finally { if (threw) { try { - fs3.closeSync(fd); + fs4.closeSync(fd); } catch (er) { } } else { - fs3.closeSync(fd); + fs4.closeSync(fd); } } return ret; }; } - function patchLutimes(fs3) { - if (constants.hasOwnProperty("O_SYMLINK") && fs3.futimes) { - fs3.lutimes = function(path2, at, mt, cb) { - fs3.open(path2, constants.O_SYMLINK, function(er, fd) { + function patchLutimes(fs4) { + if (constants.hasOwnProperty("O_SYMLINK") && fs4.futimes) { + fs4.lutimes = function(path4, at, mt, cb) { + fs4.open(path4, constants.O_SYMLINK, function(er, fd) { if (er) { if (cb) cb(er); return; } - fs3.futimes(fd, at, mt, function(er2) { - fs3.close(fd, function(er22) { + fs4.futimes(fd, at, mt, function(er2) { + fs4.close(fd, function(er22) { if (cb) cb(er2 || er22); }); }); }); }; - fs3.lutimesSync = function(path2, at, mt) { - var fd = fs3.openSync(path2, constants.O_SYMLINK); + fs4.lutimesSync = function(path4, at, mt) { + var fd = fs4.openSync(path4, constants.O_SYMLINK); var ret; var threw = true; try { - ret = fs3.futimesSync(fd, at, mt); + ret = fs4.futimesSync(fd, at, mt); threw = false; } finally { if (threw) { try { - fs3.closeSync(fd); + fs4.closeSync(fd); } catch (er) { } } else { - fs3.closeSync(fd); + fs4.closeSync(fd); } } return ret; }; - } else if (fs3.futimes) { - fs3.lutimes = function(_a, _b, _c, cb) { + } else if (fs4.futimes) { + fs4.lutimes = function(_a, _b, _c, cb) { if (cb) process.nextTick(cb); }; - fs3.lutimesSync = function() { + fs4.lutimesSync = function() { }; } } function chmodFix(orig) { if (!orig) return orig; return function(target, mode, cb) { - return orig.call(fs2, target, mode, function(er) { + return orig.call(fs3, target, mode, function(er) { if (chownErOk(er)) er = null; if (cb) cb.apply(this, arguments); }); @@ -88385,7 +88385,7 @@ var require_polyfills = __commonJS({ if (!orig) return orig; return function(target, mode) { try { - return orig.call(fs2, target, mode); + return orig.call(fs3, target, mode); } catch (er) { if (!chownErOk(er)) throw er; } @@ -88394,7 +88394,7 @@ var require_polyfills = __commonJS({ function chownFix(orig) { if (!orig) return orig; return function(target, uid, gid, cb) { - return orig.call(fs2, target, uid, gid, function(er) { + return orig.call(fs3, target, uid, gid, function(er) { if (chownErOk(er)) er = null; if (cb) cb.apply(this, arguments); }); @@ -88404,7 +88404,7 @@ var require_polyfills = __commonJS({ if (!orig) return orig; return function(target, uid, gid) { try { - return orig.call(fs2, target, uid, gid); + return orig.call(fs3, target, uid, gid); } catch (er) { if (!chownErOk(er)) throw er; } @@ -88424,13 +88424,13 @@ var require_polyfills = __commonJS({ } if (cb) cb.apply(this, arguments); } - return options ? orig.call(fs2, target, options, callback) : orig.call(fs2, target, callback); + return options ? orig.call(fs3, target, options, callback) : orig.call(fs3, target, callback); }; } function statFixSync(orig) { if (!orig) return orig; return function(target, options) { - var stats = options ? orig.call(fs2, target, options) : orig.call(fs2, target); + var stats = options ? orig.call(fs3, target, options) : orig.call(fs3, target); if (stats) { if (stats.uid < 0) stats.uid += 4294967296; if (stats.gid < 0) stats.gid += 4294967296; @@ -88459,16 +88459,16 @@ var require_legacy_streams = __commonJS({ "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { var Stream = require("stream").Stream; module2.exports = legacy; - function legacy(fs2) { + function legacy(fs3) { return { ReadStream, WriteStream }; - function ReadStream(path2, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path2, options); + function ReadStream(path4, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path4, options); Stream.call(this); var self2 = this; - this.path = path2; + this.path = path4; this.fd = null; this.readable = true; this.paused = false; @@ -88502,7 +88502,7 @@ var require_legacy_streams = __commonJS({ }); return; } - fs2.open(this.path, this.flags, this.mode, function(err, fd) { + fs3.open(this.path, this.flags, this.mode, function(err, fd) { if (err) { self2.emit("error", err); self2.readable = false; @@ -88513,10 +88513,10 @@ var require_legacy_streams = __commonJS({ self2._read(); }); } - function WriteStream(path2, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path2, options); + function WriteStream(path4, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path4, options); Stream.call(this); - this.path = path2; + this.path = path4; this.fd = null; this.writable = true; this.flags = "w"; @@ -88541,7 +88541,7 @@ var require_legacy_streams = __commonJS({ this.busy = false; this._queue = []; if (this.fd === null) { - this._open = fs2.open; + this._open = fs3.open; this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); this.flush(); } @@ -88576,7 +88576,7 @@ var require_clone = __commonJS({ // node_modules/graceful-fs/graceful-fs.js var require_graceful_fs = __commonJS({ "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { - var fs2 = require("fs"); + var fs3 = require("fs"); var polyfills = require_polyfills(); var legacy = require_legacy_streams(); var clone = require_clone(); @@ -88608,12 +88608,12 @@ var require_graceful_fs = __commonJS({ m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); console.error(m); }; - if (!fs2[gracefulQueue]) { + if (!fs3[gracefulQueue]) { queue = global[gracefulQueue] || []; - publishQueue(fs2, queue); - fs2.close = (function(fs$close) { + publishQueue(fs3, queue); + fs3.close = (function(fs$close) { function close(fd, cb) { - return fs$close.call(fs2, fd, function(err) { + return fs$close.call(fs3, fd, function(err) { if (!err) { resetQueue(); } @@ -88625,48 +88625,48 @@ var require_graceful_fs = __commonJS({ value: fs$close }); return close; - })(fs2.close); - fs2.closeSync = (function(fs$closeSync) { + })(fs3.close); + fs3.closeSync = (function(fs$closeSync) { function closeSync(fd) { - fs$closeSync.apply(fs2, arguments); + fs$closeSync.apply(fs3, arguments); resetQueue(); } Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync }); return closeSync; - })(fs2.closeSync); + })(fs3.closeSync); if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { process.on("exit", function() { - debug4(fs2[gracefulQueue]); - require("assert").equal(fs2[gracefulQueue].length, 0); + debug4(fs3[gracefulQueue]); + require("assert").equal(fs3[gracefulQueue].length, 0); }); } } var queue; if (!global[gracefulQueue]) { - publishQueue(global, fs2[gracefulQueue]); - } - module2.exports = patch(clone(fs2)); - if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched) { - module2.exports = patch(fs2); - fs2.__patched = true; - } - function patch(fs3) { - polyfills(fs3); - fs3.gracefulify = patch; - fs3.createReadStream = createReadStream; - fs3.createWriteStream = createWriteStream; - var fs$readFile = fs3.readFile; - fs3.readFile = readFile; - function readFile(path2, options, cb) { + publishQueue(global, fs3[gracefulQueue]); + } + module2.exports = patch(clone(fs3)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs3.__patched) { + module2.exports = patch(fs3); + fs3.__patched = true; + } + function patch(fs4) { + polyfills(fs4); + fs4.gracefulify = patch; + fs4.createReadStream = createReadStream; + fs4.createWriteStream = createWriteStream2; + var fs$readFile = fs4.readFile; + fs4.readFile = readFile; + function readFile(path4, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$readFile(path2, options, cb); - function go$readFile(path3, options2, cb2, startTime) { - return fs$readFile(path3, options2, function(err) { + return go$readFile(path4, options, cb); + function go$readFile(path5, options2, cb2, startTime) { + return fs$readFile(path5, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path3, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$readFile, [path5, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -88674,16 +88674,16 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$writeFile = fs3.writeFile; - fs3.writeFile = writeFile; - function writeFile(path2, data, options, cb) { + var fs$writeFile = fs4.writeFile; + fs4.writeFile = writeFile; + function writeFile(path4, data, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$writeFile(path2, data, options, cb); - function go$writeFile(path3, data2, options2, cb2, startTime) { - return fs$writeFile(path3, data2, options2, function(err) { + return go$writeFile(path4, data, options, cb); + function go$writeFile(path5, data2, options2, cb2, startTime) { + return fs$writeFile(path5, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$writeFile, [path5, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -88691,17 +88691,17 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$appendFile = fs3.appendFile; + var fs$appendFile = fs4.appendFile; if (fs$appendFile) - fs3.appendFile = appendFile; - function appendFile(path2, data, options, cb) { + fs4.appendFile = appendFile; + function appendFile(path4, data, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$appendFile(path2, data, options, cb); - function go$appendFile(path3, data2, options2, cb2, startTime) { - return fs$appendFile(path3, data2, options2, function(err) { + return go$appendFile(path4, data, options, cb); + function go$appendFile(path5, data2, options2, cb2, startTime) { + return fs$appendFile(path5, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$appendFile, [path5, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -88709,9 +88709,9 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$copyFile = fs3.copyFile; + var fs$copyFile = fs4.copyFile; if (fs$copyFile) - fs3.copyFile = copyFile; + fs4.copyFile = copyFile; function copyFile(src, dest, flags, cb) { if (typeof flags === "function") { cb = flags; @@ -88729,34 +88729,34 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$readdir = fs3.readdir; - fs3.readdir = readdir; + var fs$readdir = fs4.readdir; + fs4.readdir = readdir; var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path2, options, cb) { + function readdir(path4, options, cb) { if (typeof options === "function") cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path3, options2, cb2, startTime) { - return fs$readdir(path3, fs$readdirCallback( - path3, + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path5, options2, cb2, startTime) { + return fs$readdir(path5, fs$readdirCallback( + path5, options2, cb2, startTime )); - } : function go$readdir2(path3, options2, cb2, startTime) { - return fs$readdir(path3, options2, fs$readdirCallback( - path3, + } : function go$readdir2(path5, options2, cb2, startTime) { + return fs$readdir(path5, options2, fs$readdirCallback( + path5, options2, cb2, startTime )); }; - return go$readdir(path2, options, cb); - function fs$readdirCallback(path3, options2, cb2, startTime) { + return go$readdir(path4, options, cb); + function fs$readdirCallback(path5, options2, cb2, startTime) { return function(err, files) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ go$readdir, - [path3, options2, cb2], + [path5, options2, cb2], err, startTime || Date.now(), Date.now() @@ -88771,21 +88771,21 @@ var require_graceful_fs = __commonJS({ } } if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs3); + var legStreams = legacy(fs4); ReadStream = legStreams.ReadStream; WriteStream = legStreams.WriteStream; } - var fs$ReadStream = fs3.ReadStream; + var fs$ReadStream = fs4.ReadStream; if (fs$ReadStream) { ReadStream.prototype = Object.create(fs$ReadStream.prototype); ReadStream.prototype.open = ReadStream$open; } - var fs$WriteStream = fs3.WriteStream; + var fs$WriteStream = fs4.WriteStream; if (fs$WriteStream) { WriteStream.prototype = Object.create(fs$WriteStream.prototype); WriteStream.prototype.open = WriteStream$open; } - Object.defineProperty(fs3, "ReadStream", { + Object.defineProperty(fs4, "ReadStream", { get: function() { return ReadStream; }, @@ -88795,7 +88795,7 @@ var require_graceful_fs = __commonJS({ enumerable: true, configurable: true }); - Object.defineProperty(fs3, "WriteStream", { + Object.defineProperty(fs4, "WriteStream", { get: function() { return WriteStream; }, @@ -88806,7 +88806,7 @@ var require_graceful_fs = __commonJS({ configurable: true }); var FileReadStream = ReadStream; - Object.defineProperty(fs3, "FileReadStream", { + Object.defineProperty(fs4, "FileReadStream", { get: function() { return FileReadStream; }, @@ -88817,7 +88817,7 @@ var require_graceful_fs = __commonJS({ configurable: true }); var FileWriteStream = WriteStream; - Object.defineProperty(fs3, "FileWriteStream", { + Object.defineProperty(fs4, "FileWriteStream", { get: function() { return FileWriteStream; }, @@ -88827,7 +88827,7 @@ var require_graceful_fs = __commonJS({ enumerable: true, configurable: true }); - function ReadStream(path2, options) { + function ReadStream(path4, options) { if (this instanceof ReadStream) return fs$ReadStream.apply(this, arguments), this; else @@ -88847,7 +88847,7 @@ var require_graceful_fs = __commonJS({ } }); } - function WriteStream(path2, options) { + function WriteStream(path4, options) { if (this instanceof WriteStream) return fs$WriteStream.apply(this, arguments), this; else @@ -88865,22 +88865,22 @@ var require_graceful_fs = __commonJS({ } }); } - function createReadStream(path2, options) { - return new fs3.ReadStream(path2, options); + function createReadStream(path4, options) { + return new fs4.ReadStream(path4, options); } - function createWriteStream(path2, options) { - return new fs3.WriteStream(path2, options); + function createWriteStream2(path4, options) { + return new fs4.WriteStream(path4, options); } - var fs$open = fs3.open; - fs3.open = open; - function open(path2, flags, mode, cb) { + var fs$open = fs4.open; + fs4.open = open; + function open(path4, flags, mode, cb) { if (typeof mode === "function") cb = mode, mode = null; - return go$open(path2, flags, mode, cb); - function go$open(path3, flags2, mode2, cb2, startTime) { - return fs$open(path3, flags2, mode2, function(err, fd) { + return go$open(path4, flags, mode, cb); + function go$open(path5, flags2, mode2, cb2, startTime) { + return fs$open(path5, flags2, mode2, function(err, fd) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path3, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$open, [path5, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -88888,20 +88888,20 @@ var require_graceful_fs = __commonJS({ }); } } - return fs3; + return fs4; } function enqueue(elem) { debug4("ENQUEUE", elem[0].name, elem[1]); - fs2[gracefulQueue].push(elem); + fs3[gracefulQueue].push(elem); retry3(); } var retryTimer; function resetQueue() { var now = Date.now(); - for (var i = 0; i < fs2[gracefulQueue].length; ++i) { - if (fs2[gracefulQueue][i].length > 2) { - fs2[gracefulQueue][i][3] = now; - fs2[gracefulQueue][i][4] = now; + for (var i = 0; i < fs3[gracefulQueue].length; ++i) { + if (fs3[gracefulQueue][i].length > 2) { + fs3[gracefulQueue][i][3] = now; + fs3[gracefulQueue][i][4] = now; } } retry3(); @@ -88909,9 +88909,9 @@ var require_graceful_fs = __commonJS({ function retry3() { clearTimeout(retryTimer); retryTimer = void 0; - if (fs2[gracefulQueue].length === 0) + if (fs3[gracefulQueue].length === 0) return; - var elem = fs2[gracefulQueue].shift(); + var elem = fs3[gracefulQueue].shift(); var fn = elem[0]; var args = elem[1]; var err = elem[2]; @@ -88933,7 +88933,7 @@ var require_graceful_fs = __commonJS({ debug4("RETRY", fn.name, args); fn.apply(null, args.concat([startTime])); } else { - fs2[gracefulQueue].push(elem); + fs3[gracefulQueue].push(elem); } } if (retryTimer === void 0) { @@ -89233,7 +89233,7 @@ var require_BufferList = __commonJS({ this.head = this.tail = null; this.length = 0; }; - BufferList.prototype.join = function join3(s) { + BufferList.prototype.join = function join4(s) { if (this.length === 0) return ""; var p = this.head; var ret = "" + p.data; @@ -90981,22 +90981,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(path2, stripTrailing) { - if (typeof path2 !== "string") { + module2.exports = function(path4, stripTrailing) { + if (typeof path4 !== "string") { throw new TypeError("expected path to be a string"); } - if (path2 === "\\" || path2 === "/") return "/"; - var len = path2.length; - if (len <= 1) return path2; + if (path4 === "\\" || path4 === "/") return "/"; + var len = path4.length; + if (len <= 1) return path4; var prefix = ""; - if (len > 4 && path2[3] === "\\") { - var ch = path2[2]; - if ((ch === "?" || ch === ".") && path2.slice(0, 2) === "\\\\") { - path2 = path2.slice(2); + if (len > 4 && path4[3] === "\\") { + var ch = path4[2]; + if ((ch === "?" || ch === ".") && path4.slice(0, 2) === "\\\\") { + path4 = path4.slice(2); prefix = "//"; } } - var segs = path2.split(/[/\\]+/); + var segs = path4.split(/[/\\]+/); if (stripTrailing !== false && segs[segs.length - 1] === "") { segs.pop(); } @@ -92564,25 +92564,25 @@ var require_util12 = __commonJS({ }; }, createDeferredPromise: function() { - let resolve2; + let resolve3; let reject; const promise = new Promise((res, rej) => { - resolve2 = res; + resolve3 = res; reject = rej; }); return { promise, - resolve: resolve2, + resolve: resolve3, reject }; }, promisify(fn) { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { fn((err, ...args) => { if (err) { return reject(err); } - return resolve2(...args); + return resolve3(...args); }); }); }, @@ -93728,7 +93728,7 @@ var require_end_of_stream = __commonJS({ validateBoolean(opts.cleanup, "cleanup"); autoCleanup = opts.cleanup; } - return new Promise2((resolve2, reject) => { + return new Promise2((resolve3, reject) => { const cleanup = eos(stream, opts, (err) => { if (autoCleanup) { cleanup(); @@ -93736,7 +93736,7 @@ var require_end_of_stream = __commonJS({ if (err) { reject(err); } else { - resolve2(); + resolve3(); } }); }); @@ -94605,7 +94605,7 @@ var require_readable3 = __commonJS({ error3 = this.readableEnded ? null : new AbortError(); this.destroy(error3); } - return new Promise2((resolve2, reject) => eos(this, (err) => err && err !== error3 ? reject(err) : resolve2(null))); + return new Promise2((resolve3, reject) => eos(this, (err) => err && err !== error3 ? reject(err) : resolve3(null))); }; Readable.prototype.push = function(chunk, encoding) { return readableAddChunk(this, chunk, encoding, false); @@ -95149,12 +95149,12 @@ var require_readable3 = __commonJS({ } async function* createAsyncIterator(stream, options) { let callback = nop; - function next(resolve2) { + function next(resolve3) { if (this === stream) { callback(); callback = nop; } else { - callback = resolve2; + callback = resolve3; } } stream.on("readable", next); @@ -96205,7 +96205,7 @@ var require_duplexify = __commonJS({ ); }; function fromAsyncGen(fn) { - let { promise, resolve: resolve2 } = createDeferredPromise(); + let { promise, resolve: resolve3 } = createDeferredPromise(); const ac = new AbortController2(); const signal = ac.signal; const value = fn( @@ -96220,7 +96220,7 @@ var require_duplexify = __commonJS({ throw new AbortError(void 0, { cause: signal.reason }); - ({ promise, resolve: resolve2 } = createDeferredPromise()); + ({ promise, resolve: resolve3 } = createDeferredPromise()); yield chunk; } })(), @@ -96231,8 +96231,8 @@ var require_duplexify = __commonJS({ return { value, write(chunk, encoding, cb) { - const _resolve = resolve2; - resolve2 = null; + const _resolve = resolve3; + resolve3 = null; _resolve({ chunk, done: false, @@ -96240,8 +96240,8 @@ var require_duplexify = __commonJS({ }); }, final(cb) { - const _resolve = resolve2; - resolve2 = null; + const _resolve = resolve3; + resolve3 = null; _resolve({ done: true, cb @@ -96692,7 +96692,7 @@ var require_pipeline4 = __commonJS({ callback(); } }; - const wait = () => new Promise2((resolve2, reject) => { + const wait = () => new Promise2((resolve3, reject) => { if (error3) { reject(error3); } else { @@ -96700,7 +96700,7 @@ var require_pipeline4 = __commonJS({ if (error3) { reject(error3); } else { - resolve2(); + resolve3(); } }; } @@ -97344,8 +97344,8 @@ var require_operators = __commonJS({ next = null; } if (!done && (queue.length >= highWaterMark || cnt >= concurrency)) { - await new Promise2((resolve2) => { - resume = resolve2; + await new Promise2((resolve3) => { + resume = resolve3; }); } } @@ -97379,8 +97379,8 @@ var require_operators = __commonJS({ queue.shift(); maybeResume(); } - await new Promise2((resolve2) => { - next = resolve2; + await new Promise2((resolve3) => { + next = resolve3; }); } } finally { @@ -97638,7 +97638,7 @@ var require_promises = __commonJS({ var { finished } = require_end_of_stream(); require_stream2(); function pipeline(...streams) { - return new Promise2((resolve2, reject) => { + return new Promise2((resolve3, reject) => { let signal; let end; const lastArg = streams[streams.length - 1]; @@ -97653,7 +97653,7 @@ var require_promises = __commonJS({ if (err) { reject(err); } else { - resolve2(value); + resolve3(value); } }, { @@ -99609,11 +99609,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 path2 = { + var path4 = { win32: { sep: "\\" }, posix: { sep: "/" } }; - exports2.sep = defaultPlatform === "win32" ? path2.win32.sep : path2.posix.sep; + exports2.sep = defaultPlatform === "win32" ? path4.win32.sep : path4.posix.sep; exports2.minimatch.sep = exports2.sep; exports2.GLOBSTAR = /* @__PURE__ */ Symbol("globstar **"); exports2.minimatch.GLOBSTAR = exports2.GLOBSTAR; @@ -102433,10 +102433,10 @@ var require_commonjs22 = __commonJS({ * Return a void Promise that resolves once the stream ends. */ async promise() { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { this.on(DESTROYED, () => reject(new Error("stream destroyed"))); this.on("error", (er) => reject(er)); - this.on("end", () => resolve2()); + this.on("end", () => resolve3()); }); } /** @@ -102460,7 +102460,7 @@ var require_commonjs22 = __commonJS({ return Promise.resolve({ done: false, value: res }); if (this[EOF]) return stop(); - let resolve2; + let resolve3; let reject; const onerr = (er) => { this.off("data", ondata); @@ -102474,19 +102474,19 @@ var require_commonjs22 = __commonJS({ this.off("end", onend); this.off(DESTROYED, ondestroy); this.pause(); - resolve2({ value, done: !!this[EOF] }); + resolve3({ value, done: !!this[EOF] }); }; const onend = () => { this.off("error", onerr); this.off("data", ondata); this.off(DESTROYED, ondestroy); stop(); - resolve2({ done: true, value: void 0 }); + resolve3({ done: true, value: void 0 }); }; const ondestroy = () => onerr(new Error("stream destroyed")); return new Promise((res2, rej) => { reject = rej; - resolve2 = res2; + resolve3 = res2; this.once(DESTROYED, ondestroy); this.once("error", onerr); this.once("end", onend); @@ -102670,7 +102670,7 @@ var require_commonjs23 = __commonJS({ var TYPEMASK = 1023; var entToType = (s) => s.isFile() ? IFREG : s.isDirectory() ? IFDIR : s.isSymbolicLink() ? IFLNK : s.isCharacterDevice() ? IFCHR : s.isBlockDevice() ? IFBLK : s.isSocket() ? IFSOCK : s.isFIFO() ? IFIFO : UNKNOWN; var normalizeCache = /* @__PURE__ */ new Map(); - var normalize = (s) => { + var normalize2 = (s) => { const c = normalizeCache.get(s); if (c) return c; @@ -102683,7 +102683,7 @@ var require_commonjs23 = __commonJS({ const c = normalizeNocaseCache.get(s); if (c) return c; - const n = normalize(s.toLowerCase()); + const n = normalize2(s.toLowerCase()); normalizeNocaseCache.set(s, n); return n; }; @@ -102854,7 +102854,7 @@ var require_commonjs23 = __commonJS({ */ constructor(name, type2 = UNKNOWN, root, roots, nocase, children, opts) { this.name = name; - this.#matchName = nocase ? normalizeNocase(name) : normalize(name); + this.#matchName = nocase ? normalizeNocase(name) : normalize2(name); this.#type = type2 & TYPEMASK; this.nocase = nocase; this.roots = roots; @@ -102891,12 +102891,12 @@ var require_commonjs23 = __commonJS({ /** * Get the Path object referenced by the string path, resolved from this Path */ - resolve(path2) { - if (!path2) { + resolve(path4) { + if (!path4) { return this; } - const rootPath = this.getRootString(path2); - const dir = path2.substring(rootPath.length); + const rootPath = this.getRootString(path4); + const dir = path4.substring(rootPath.length); const dirParts = dir.split(this.splitSep); const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts); return result; @@ -102947,7 +102947,7 @@ var require_commonjs23 = __commonJS({ return this.parent || this; } const children = this.children(); - const name = this.nocase ? normalizeNocase(pathPart) : normalize(pathPart); + const name = this.nocase ? normalizeNocase(pathPart) : normalize2(pathPart); for (const p of children) { if (p.#matchName === name) { return p; @@ -103192,7 +103192,7 @@ var require_commonjs23 = __commonJS({ * directly. */ isNamed(n) { - return !this.nocase ? this.#matchName === normalize(n) : this.#matchName === normalizeNocase(n); + return !this.nocase ? this.#matchName === normalize2(n) : this.#matchName === normalizeNocase(n); } /** * Return the Path object corresponding to the target of a symbolic link. @@ -103331,7 +103331,7 @@ var require_commonjs23 = __commonJS({ #readdirMaybePromoteChild(e, c) { for (let p = c.provisional; p < c.length; p++) { const pchild = c[p]; - const name = this.nocase ? normalizeNocase(e.name) : normalize(e.name); + const name = this.nocase ? normalizeNocase(e.name) : normalize2(e.name); if (name !== pchild.#matchName) { continue; } @@ -103500,9 +103500,9 @@ var require_commonjs23 = __commonJS({ if (this.#asyncReaddirInFlight) { await this.#asyncReaddirInFlight; } else { - let resolve2 = () => { + let resolve3 = () => { }; - this.#asyncReaddirInFlight = new Promise((res) => resolve2 = res); + this.#asyncReaddirInFlight = new Promise((res) => resolve3 = res); try { for (const e of await this.#fs.promises.readdir(fullpath, { withFileTypes: true @@ -103515,7 +103515,7 @@ var require_commonjs23 = __commonJS({ children.provisional = 0; } this.#asyncReaddirInFlight = void 0; - resolve2(); + resolve3(); } return children.slice(0, children.provisional); } @@ -103649,8 +103649,8 @@ var require_commonjs23 = __commonJS({ /** * @internal */ - getRootString(path2) { - return node_path_1.win32.parse(path2).root; + getRootString(path4) { + return node_path_1.win32.parse(path4).root; } /** * @internal @@ -103697,8 +103697,8 @@ var require_commonjs23 = __commonJS({ /** * @internal */ - getRootString(path2) { - return path2.startsWith("/") ? "/" : ""; + getRootString(path4) { + return path4.startsWith("/") ? "/" : ""; } /** * @internal @@ -103748,8 +103748,8 @@ var require_commonjs23 = __commonJS({ * * @internal */ - constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs: fs2 = defaultFS } = {}) { - this.#fs = fsFromOption(fs2); + constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs: fs3 = defaultFS } = {}) { + this.#fs = fsFromOption(fs3); if (cwd instanceof URL || cwd.startsWith("file://")) { cwd = (0, node_url_1.fileURLToPath)(cwd); } @@ -103788,11 +103788,11 @@ var require_commonjs23 = __commonJS({ /** * Get the depth of a provided path, string, or the cwd */ - depth(path2 = this.cwd) { - if (typeof path2 === "string") { - path2 = this.cwd.resolve(path2); + depth(path4 = this.cwd) { + if (typeof path4 === "string") { + path4 = this.cwd.resolve(path4); } - return path2.depth(); + return path4.depth(); } /** * Return the cache of child entries. Exposed so subclasses can create @@ -104279,9 +104279,9 @@ var require_commonjs23 = __commonJS({ process2(); return results; } - chdir(path2 = this.cwd) { + chdir(path4 = this.cwd) { const oldCwd = this.cwd; - this.cwd = typeof path2 === "string" ? this.cwd.resolve(path2) : path2; + this.cwd = typeof path4 === "string" ? this.cwd.resolve(path4) : path4; this.cwd[setAsCwd](oldCwd); } }; @@ -104308,8 +104308,8 @@ var require_commonjs23 = __commonJS({ /** * @internal */ - newRoot(fs2) { - return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs2 }); + newRoot(fs3) { + return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs3 }); } /** * Return true if the provided path string is an absolute path @@ -104338,8 +104338,8 @@ var require_commonjs23 = __commonJS({ /** * @internal */ - newRoot(fs2) { - return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs2 }); + newRoot(fs3) { + return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs3 }); } /** * Return true if the provided path string is an absolute path @@ -104669,8 +104669,8 @@ var require_processor = __commonJS({ } // match, absolute, ifdir entries() { - return [...this.store.entries()].map(([path2, n]) => [ - path2, + return [...this.store.entries()].map(([path4, n]) => [ + path4, !!(n & 2), !!(n & 1) ]); @@ -104888,9 +104888,9 @@ var require_walker = __commonJS({ signal; maxDepth; includeChildMatches; - constructor(patterns, path2, opts) { + constructor(patterns, path4, opts) { this.patterns = patterns; - this.path = path2; + this.path = path4; this.opts = opts; this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/"; this.includeChildMatches = opts.includeChildMatches !== false; @@ -104909,11 +104909,11 @@ var require_walker = __commonJS({ }); } } - #ignored(path2) { - return this.seen.has(path2) || !!this.#ignore?.ignored?.(path2); + #ignored(path4) { + return this.seen.has(path4) || !!this.#ignore?.ignored?.(path4); } - #childrenIgnored(path2) { - return !!this.#ignore?.childrenIgnored?.(path2); + #childrenIgnored(path4) { + return !!this.#ignore?.childrenIgnored?.(path4); } // backpressure mechanism pause() { @@ -105129,8 +105129,8 @@ var require_walker = __commonJS({ exports2.GlobUtil = GlobUtil; var GlobWalker = class extends GlobUtil { matches = /* @__PURE__ */ new Set(); - constructor(patterns, path2, opts) { - super(patterns, path2, opts); + constructor(patterns, path4, opts) { + super(patterns, path4, opts); } matchEmit(e) { this.matches.add(e); @@ -105168,8 +105168,8 @@ var require_walker = __commonJS({ exports2.GlobWalker = GlobWalker; var GlobStream = class extends GlobUtil { results; - constructor(patterns, path2, opts) { - super(patterns, path2, opts); + constructor(patterns, path4, opts) { + super(patterns, path4, opts); this.results = new minipass_1.Minipass({ signal: this.signal, objectMode: true @@ -105524,8 +105524,8 @@ var require_commonjs24 = __commonJS({ // node_modules/archiver-utils/file.js var require_file3 = __commonJS({ "node_modules/archiver-utils/file.js"(exports2, module2) { - var fs2 = require_graceful_fs(); - var path2 = require("path"); + var fs3 = require_graceful_fs(); + var path4 = require("path"); var flatten = require_flatten(); var difference = require_difference(); var union = require_union(); @@ -105550,8 +105550,8 @@ var require_file3 = __commonJS({ return result; }; file.exists = function() { - var filepath = path2.join.apply(path2, arguments); - return fs2.existsSync(filepath); + var filepath = path4.join.apply(path4, arguments); + return fs3.existsSync(filepath); }; file.expand = function(...args) { var options = isPlainObject(args[0]) ? args.shift() : {}; @@ -105564,12 +105564,12 @@ var require_file3 = __commonJS({ }); if (options.filter) { matches = matches.filter(function(filepath) { - filepath = path2.join(options.cwd || "", filepath); + filepath = path4.join(options.cwd || "", filepath); try { if (typeof options.filter === "function") { return options.filter(filepath); } else { - return fs2.statSync(filepath)[options.filter](); + return fs3.statSync(filepath)[options.filter](); } } catch (e) { return false; @@ -105581,7 +105581,7 @@ var require_file3 = __commonJS({ file.expandMapping = function(patterns, destBase, options) { options = Object.assign({ rename: function(destBase2, destPath) { - return path2.join(destBase2 || "", destPath); + return path4.join(destBase2 || "", destPath); } }, options); var files = []; @@ -105589,14 +105589,14 @@ var require_file3 = __commonJS({ file.expand(options, patterns).forEach(function(src) { var destPath = src; if (options.flatten) { - destPath = path2.basename(destPath); + destPath = path4.basename(destPath); } if (options.ext) { destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext); } var dest = options.rename(destBase, destPath, options); if (options.cwd) { - src = path2.join(options.cwd, src); + src = path4.join(options.cwd, src); } dest = dest.replace(pathSeparatorRe, "/"); src = src.replace(pathSeparatorRe, "/"); @@ -105677,8 +105677,8 @@ var require_file3 = __commonJS({ // node_modules/archiver-utils/index.js var require_archiver_utils = __commonJS({ "node_modules/archiver-utils/index.js"(exports2, module2) { - var fs2 = require_graceful_fs(); - var path2 = require("path"); + var fs3 = require_graceful_fs(); + var path4 = require("path"); var isStream = require_is_stream(); var lazystream = require_lazystream(); var normalizePath = require_normalize_path(); @@ -105726,7 +105726,7 @@ var require_archiver_utils = __commonJS({ }; utils.lazyReadStream = function(filepath) { return new lazystream.Readable(function() { - return fs2.createReadStream(filepath); + return fs3.createReadStream(filepath); }); }; utils.normalizeInputSource = function(source) { @@ -105754,7 +105754,7 @@ var require_archiver_utils = __commonJS({ callback = base; base = dirpath; } - fs2.readdir(dirpath, function(err, list) { + fs3.readdir(dirpath, function(err, list) { var i = 0; var file; var filepath; @@ -105766,11 +105766,11 @@ var require_archiver_utils = __commonJS({ if (!file) { return callback(null, results); } - filepath = path2.join(dirpath, file); - fs2.stat(filepath, function(err2, stats) { + filepath = path4.join(dirpath, file); + fs3.stat(filepath, function(err2, stats) { results.push({ path: filepath, - relative: path2.relative(base, filepath).replace(/\\/g, "/"), + relative: path4.relative(base, filepath).replace(/\\/g, "/"), stats }); if (stats && stats.isDirectory()) { @@ -105829,10 +105829,10 @@ var require_error3 = __commonJS({ // node_modules/archiver/lib/core.js var require_core3 = __commonJS({ "node_modules/archiver/lib/core.js"(exports2, module2) { - var fs2 = require("fs"); + var fs3 = require("fs"); var glob2 = require_readdir_glob(); var async = require_async(); - var path2 = require("path"); + var path4 = require("path"); var util = require_archiver_utils(); var inherits = require("util").inherits; var ArchiverError = require_error3(); @@ -105893,7 +105893,7 @@ var require_core3 = __commonJS({ data.sourcePath = filepath; task.data = data; this._entriesCount++; - if (data.stats && data.stats instanceof fs2.Stats) { + if (data.stats && data.stats instanceof fs3.Stats) { task = this._updateQueueTaskWithStats(task, data.stats); if (task) { if (data.stats.size) { @@ -106064,7 +106064,7 @@ var require_core3 = __commonJS({ callback(); return; } - fs2.lstat(task.filepath, function(err, stats) { + fs3.lstat(task.filepath, function(err, stats) { if (this._state.aborted) { setImmediate(callback); return; @@ -106107,10 +106107,10 @@ var require_core3 = __commonJS({ task.data.sourceType = "buffer"; task.source = Buffer.concat([]); } else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) { - var linkPath = fs2.readlinkSync(task.filepath); - var dirName = path2.dirname(task.filepath); + var linkPath = fs3.readlinkSync(task.filepath); + var dirName = path4.dirname(task.filepath); task.data.type = "symlink"; - task.data.linkname = path2.relative(dirName, path2.resolve(dirName, linkPath)); + task.data.linkname = path4.relative(dirName, path4.resolve(dirName, linkPath)); task.data.sourceType = "buffer"; task.source = Buffer.concat([]); } else { @@ -106284,11 +106284,11 @@ var require_core3 = __commonJS({ this._finalize(); } var self2 = this; - return new Promise(function(resolve2, reject) { + return new Promise(function(resolve3, reject) { var errored; self2._module.on("end", function() { if (!errored) { - resolve2(); + resolve3(); } }); self2._module.on("error", function(err) { @@ -108647,8 +108647,8 @@ var require_streamx = __commonJS({ return this; }, next() { - return new Promise(function(resolve2, reject) { - promiseResolve = resolve2; + return new Promise(function(resolve3, reject) { + promiseResolve = resolve3; promiseReject = reject; const data = stream.read(); if (data !== null) ondata(data); @@ -108677,11 +108677,11 @@ var require_streamx = __commonJS({ } function destroy(err) { stream.destroy(err); - return new Promise((resolve2, reject) => { - if (stream._duplexState & DESTROYED) return resolve2({ value: void 0, done: true }); + return new Promise((resolve3, reject) => { + if (stream._duplexState & DESTROYED) return resolve3({ value: void 0, done: true }); stream.once("close", function() { if (err) reject(err); - else resolve2({ value: void 0, done: true }); + else resolve3({ value: void 0, done: true }); }); }); } @@ -108725,8 +108725,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((resolve2) => { - state.drains.push({ writes, resolve: resolve2 }); + return new Promise((resolve3) => { + state.drains.push({ writes, resolve: resolve3 }); }); } write(data) { @@ -108831,10 +108831,10 @@ var require_streamx = __commonJS({ cb(null); } function pipelinePromise(...streams) { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { return pipeline(...streams, (err) => { if (err) return reject(err); - resolve2(); + resolve3(); }); }); } @@ -109477,16 +109477,16 @@ var require_extract = __commonJS({ entryCallback = null; cb(err); } - function onnext(resolve2, reject) { + function onnext(resolve3, reject) { if (error3) { return reject(error3); } if (entryStream) { - resolve2({ value: entryStream, done: false }); + resolve3({ value: entryStream, done: false }); entryStream = null; return; } - promiseResolve = resolve2; + promiseResolve = resolve3; promiseReject = reject; consumeCallback(null); if (extract2._finished && promiseResolve) { @@ -109514,11 +109514,11 @@ var require_extract = __commonJS({ function destroy(err) { extract2.destroy(err); consumeCallback(err); - return new Promise((resolve2, reject) => { - if (extract2.destroyed) return resolve2({ value: void 0, done: true }); + return new Promise((resolve3, reject) => { + if (extract2.destroyed) return resolve3({ value: void 0, done: true }); extract2.once("close", function() { if (err) reject(err); - else resolve2({ value: void 0, done: true }); + else resolve3({ value: void 0, done: true }); }); }); } @@ -110324,11 +110324,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -110344,7 +110344,7 @@ var require_zip2 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -110469,11 +110469,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -110489,7 +110489,7 @@ var require_upload_artifact = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -110579,8 +110579,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 path2 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path2} does not exist${os_1.EOL}`); + const path4 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path4} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -110734,11 +110734,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -110754,7 +110754,7 @@ var require_lib5 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -110840,26 +110840,26 @@ var require_lib5 = __commonJS({ } readBody() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve3) => __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", () => { - resolve2(output.toString()); + resolve3(output.toString()); }); })); }); } readBodyBuffer() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve3) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); }); this.message.on("end", () => { - resolve2(Buffer.concat(chunks)); + resolve3(Buffer.concat(chunks)); }); })); }); @@ -111068,14 +111068,14 @@ var require_lib5 = __commonJS({ */ requestRaw(info7, data) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { function callbackForResult(err, res) { if (err) { reject(err); } else if (!res) { reject(new Error("Unknown error")); } else { - resolve2(res); + resolve3(res); } } this.requestRawWithCallback(info7, data, callbackForResult); @@ -111257,12 +111257,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((resolve2) => setTimeout(() => resolve2(), ms)); + return new Promise((resolve3) => setTimeout(() => resolve3(), ms)); }); } _processResponse(res, options) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve3, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -111270,7 +111270,7 @@ var require_lib5 = __commonJS({ headers: {} }; if (statusCode === HttpCodes.NotFound) { - resolve2(response); + resolve3(response); } function dateTimeDeserializer(key, value) { if (typeof value === "string") { @@ -111309,7 +111309,7 @@ var require_lib5 = __commonJS({ err.result = response.result; reject(err); } else { - resolve2(response); + resolve3(response); } })); }); @@ -111353,11 +111353,11 @@ var require_utils9 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -111373,7 +111373,7 @@ var require_utils9 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -111666,7 +111666,7 @@ var require_traverse = __commonJS({ })(this.value); }; function walk(root, cb, immutable) { - var path2 = []; + var path4 = []; var parents = []; var alive = true; return (function walker(node_) { @@ -111675,11 +111675,11 @@ var require_traverse = __commonJS({ var state = { node, node_, - path: [].concat(path2), + path: [].concat(path4), parent: parents.slice(-1)[0], - key: path2.slice(-1)[0], - isRoot: path2.length === 0, - level: path2.length, + key: path4.slice(-1)[0], + isRoot: path4.length === 0, + level: path4.length, circular: null, update: function(x) { if (!state.isRoot) { @@ -111734,7 +111734,7 @@ var require_traverse = __commonJS({ parents.push(state); var keys = Object.keys(state.node); keys.forEach(function(key, i2) { - path2.push(key); + path4.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)) { @@ -111743,7 +111743,7 @@ var require_traverse = __commonJS({ child.isLast = i2 == keys.length - 1; child.isFirst = i2 == 0; if (modifiers.post) modifiers.post.call(state, child); - path2.pop(); + path4.pop(); }); parents.pop(); } @@ -112764,11 +112764,11 @@ var require_unzip_stream = __commonJS({ return requiredLength; case states.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX: var isUtf8 = (this.parsedEntity.flags & 2048) !== 0; - var path2 = this._decodeString(chunk.slice(0, this.parsedEntity.fileNameLength), isUtf8); + var path4 = 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) { - path2 = extra.parsed.path; + path4 = extra.parsed.path; } this.parsedEntity.extra = extra.parsed; var isUnix = (this.parsedEntity.versionMadeBy & 65280) >> 8 === 3; @@ -112780,7 +112780,7 @@ var require_unzip_stream = __commonJS({ } if (this.options.debug) { const debugObj = Object.assign({}, this.parsedEntity, { - path: path2, + path: path4, flags: "0x" + this.parsedEntity.flags.toString(16), unixAttrs: unixAttrs && "0" + unixAttrs.toString(8), isSymlink, @@ -113217,8 +113217,8 @@ var require_parser_stream = __commonJS({ // node_modules/mkdirp/index.js var require_mkdirp = __commonJS({ "node_modules/mkdirp/index.js"(exports2, module2) { - var path2 = require("path"); - var fs2 = require("fs"); + var path4 = require("path"); + var fs3 = require("fs"); var _0777 = parseInt("0777", 8); module2.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; function mkdirP(p, opts, f, made) { @@ -113229,7 +113229,7 @@ var require_mkdirp = __commonJS({ opts = { mode: opts }; } var mode = opts.mode; - var xfs = opts.fs || fs2; + var xfs = opts.fs || fs3; if (mode === void 0) { mode = _0777; } @@ -113237,7 +113237,7 @@ var require_mkdirp = __commonJS({ var cb = f || /* istanbul ignore next */ function() { }; - p = path2.resolve(p); + p = path4.resolve(p); xfs.mkdir(p, mode, function(er) { if (!er) { made = made || p; @@ -113245,8 +113245,8 @@ var require_mkdirp = __commonJS({ } switch (er.code) { case "ENOENT": - if (path2.dirname(p) === p) return cb(er); - mkdirP(path2.dirname(p), opts, function(er2, made2) { + if (path4.dirname(p) === p) return cb(er); + mkdirP(path4.dirname(p), opts, function(er2, made2) { if (er2) cb(er2, made2); else mkdirP(p, opts, cb, made2); }); @@ -113268,19 +113268,19 @@ var require_mkdirp = __commonJS({ opts = { mode: opts }; } var mode = opts.mode; - var xfs = opts.fs || fs2; + var xfs = opts.fs || fs3; if (mode === void 0) { mode = _0777; } if (!made) made = null; - p = path2.resolve(p); + p = path4.resolve(p); try { xfs.mkdirSync(p, mode); made = made || p; } catch (err0) { switch (err0.code) { case "ENOENT": - made = sync(path2.dirname(p), opts, made); + made = sync(path4.dirname(p), opts, made); sync(p, opts, made); break; // In the case of any other error, just see if there's a dir @@ -113305,8 +113305,8 @@ var require_mkdirp = __commonJS({ // node_modules/unzip-stream/lib/extract.js var require_extract2 = __commonJS({ "node_modules/unzip-stream/lib/extract.js"(exports2, module2) { - var fs2 = require("fs"); - var path2 = require("path"); + var fs3 = require("fs"); + var path4 = require("path"); var util = require("util"); var mkdirp = require_mkdirp(); var Transform = require("stream").Transform; @@ -113348,11 +113348,11 @@ var require_extract2 = __commonJS({ }; Extract.prototype._processEntry = function(entry) { var self2 = this; - var destPath = path2.join(this.opts.path, entry.path); - var directory = entry.isDirectory ? destPath : path2.dirname(destPath); + var destPath = path4.join(this.opts.path, entry.path); + var directory = entry.isDirectory ? destPath : path4.dirname(destPath); this.unfinishedEntries++; var writeFileFn = function() { - var pipedStream = fs2.createWriteStream(destPath); + var pipedStream = fs3.createWriteStream(destPath); pipedStream.on("close", function() { self2.unfinishedEntries--; self2._notifyAwaiter(); @@ -113438,11 +113438,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -113458,7 +113458,7 @@ var require_download_artifact = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -113488,10 +113488,10 @@ var require_download_artifact = __commonJS({ parsed.search = ""; return parsed.toString(); }; - function exists(path2) { + function exists(path4) { return __awaiter2(this, void 0, void 0, function* () { try { - yield promises_1.default.access(path2); + yield promises_1.default.access(path4); return true; } catch (error3) { if (error3.code === "ENOENT") { @@ -113511,7 +113511,7 @@ var require_download_artifact = __commonJS({ } catch (error3) { retryCount++; core14.debug(`Failed to download artifact after ${retryCount} retries due to ${error3.message}. Retrying in 5 seconds...`); - yield new Promise((resolve2) => setTimeout(resolve2, 5e3)); + yield new Promise((resolve3) => setTimeout(resolve3, 5e3)); } } throw new Error(`Artifact download failed after ${retryCount} retries.`); @@ -113525,7 +113525,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((resolve2, reject) => { + return new Promise((resolve3, reject) => { const timerFn = () => { const timeoutError = new Error(`Blob storage chunk did not respond in ${opts.timeout}ms`); response.message.destroy(timeoutError); @@ -113550,7 +113550,7 @@ var require_download_artifact = __commonJS({ sha256Digest = hashStream.read(); core14.info(`SHA256 digest of downloaded artifact is ${sha256Digest}`); } - resolve2({ sha256Digest: `sha256:${sha256Digest}` }); + resolve3({ sha256Digest: `sha256:${sha256Digest}` }); }).on("error", (error3) => { reject(error3); }); @@ -113729,12 +113729,12 @@ var require_dist_node16 = __commonJS({ octokit.log.debug("request", options); const start = Date.now(); const requestOptions = octokit.request.endpoint.parse(options); - const path2 = requestOptions.url.replace(options.baseUrl, ""); + const path4 = requestOptions.url.replace(options.baseUrl, ""); return request(options).then((response) => { - octokit.log.info(`${requestOptions.method} ${path2} - ${response.status} in ${Date.now() - start}ms`); + octokit.log.info(`${requestOptions.method} ${path4} - ${response.status} in ${Date.now() - start}ms`); return response; }).catch((error3) => { - octokit.log.info(`${requestOptions.method} ${path2} - ${error3.status} in ${Date.now() - start}ms`); + octokit.log.info(`${requestOptions.method} ${path4} - ${error3.status} in ${Date.now() - start}ms`); throw error3; }); }); @@ -113849,11 +113849,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -113869,7 +113869,7 @@ var require_get_artifact = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -113971,11 +113971,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -113991,7 +113991,7 @@ var require_delete_artifact = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -114076,11 +114076,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -114096,7 +114096,7 @@ var require_list_artifacts = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -114232,11 +114232,11 @@ var require_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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -114252,7 +114252,7 @@ var require_client2 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -114488,11 +114488,11 @@ var require_command3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.issue = exports2.issueCommand = void 0; - var os = __importStar2(require("os")); + var os2 = __importStar2(require("os")); var utils_1 = require_utils11(); function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); - process.stdout.write(cmd.toString() + os.EOL); + process.stdout.write(cmd.toString() + os2.EOL); } exports2.issueCommand = issueCommand; function issue(name, message = "") { @@ -114575,18 +114575,18 @@ var require_file_command3 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; var crypto2 = __importStar2(require("crypto")); - var fs2 = __importStar2(require("fs")); - var os = __importStar2(require("os")); + var fs3 = __importStar2(require("fs")); + var os2 = __importStar2(require("os")); var utils_1 = require_utils11(); function issueFileCommand(command, message) { const filePath = process.env[`GITHUB_${command}`]; if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); } - if (!fs2.existsSync(filePath)) { + if (!fs3.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs2.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os.EOL}`, { + fs3.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os2.EOL}`, { encoding: "utf8" }); } @@ -114600,7 +114600,7 @@ var require_file_command3 = __commonJS({ if (convertedValue.includes(delimiter)) { throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); } - return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; + return `${key}<<${delimiter}${os2.EOL}${convertedValue}${os2.EOL}${delimiter}`; } exports2.prepareKeyValueMessage = prepareKeyValueMessage; } @@ -114721,11 +114721,11 @@ var require_lib6 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -114741,7 +114741,7 @@ var require_lib6 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -114827,26 +114827,26 @@ var require_lib6 = __commonJS({ } readBody() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve3) => __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", () => { - resolve2(output.toString()); + resolve3(output.toString()); }); })); }); } readBodyBuffer() { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve3) => __awaiter2(this, void 0, void 0, function* () { const chunks = []; this.message.on("data", (chunk) => { chunks.push(chunk); }); this.message.on("end", () => { - resolve2(Buffer.concat(chunks)); + resolve3(Buffer.concat(chunks)); }); })); }); @@ -115055,14 +115055,14 @@ var require_lib6 = __commonJS({ */ requestRaw(info7, data) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, reject) => { function callbackForResult(err, res) { if (err) { reject(err); } else if (!res) { reject(new Error("Unknown error")); } else { - resolve2(res); + resolve3(res); } } this.requestRawWithCallback(info7, data, callbackForResult); @@ -115244,12 +115244,12 @@ var require_lib6 = __commonJS({ return __awaiter2(this, void 0, void 0, function* () { retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber); const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber); - return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); + return new Promise((resolve3) => setTimeout(() => resolve3(), ms)); }); } _processResponse(res, options) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve3, reject) => __awaiter2(this, void 0, void 0, function* () { const statusCode = res.message.statusCode || 0; const response = { statusCode, @@ -115257,7 +115257,7 @@ var require_lib6 = __commonJS({ headers: {} }; if (statusCode === HttpCodes.NotFound) { - resolve2(response); + resolve3(response); } function dateTimeDeserializer(key, value) { if (typeof value === "string") { @@ -115296,7 +115296,7 @@ var require_lib6 = __commonJS({ err.result = response.result; reject(err); } else { - resolve2(response); + resolve3(response); } })); }); @@ -115313,11 +115313,11 @@ var require_auth3 = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -115333,7 +115333,7 @@ var require_auth3 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -115417,11 +115417,11 @@ var require_oidc_utils3 = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -115437,7 +115437,7 @@ var require_oidc_utils3 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -115515,11 +115515,11 @@ var require_summary3 = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -115535,7 +115535,7 @@ var require_summary3 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -115836,7 +115836,7 @@ var require_path_utils3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path2 = __importStar2(require("path")); + var path4 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -115846,7 +115846,7 @@ var require_path_utils3 = __commonJS({ } exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path2.sep); + return pth.replace(/[/\\]/g, path4.sep); } exports2.toPlatformPath = toPlatformPath; } @@ -115881,11 +115881,11 @@ var require_io_util3 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -115901,7 +115901,7 @@ var require_io_util3 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -115909,12 +115909,12 @@ var require_io_util3 = __commonJS({ var _a; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs2 = __importStar2(require("fs")); - var path2 = __importStar2(require("path")); - _a = fs2.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + var fs3 = __importStar2(require("fs")); + var path4 = __importStar2(require("path")); + _a = fs3.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs2.constants.O_RDONLY; + exports2.READONLY = fs3.constants.O_RDONLY; function exists(fsPath) { return __awaiter2(this, void 0, void 0, function* () { try { @@ -115959,7 +115959,7 @@ var require_io_util3 = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path2.extname(filePath).toUpperCase(); + const upperExt = path4.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -115983,11 +115983,11 @@ var require_io_util3 = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path2.dirname(filePath); - const upperName = path2.basename(filePath).toUpperCase(); + const directory = path4.dirname(filePath); + const upperName = path4.basename(filePath).toUpperCase(); for (const actualName of yield exports2.readdir(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path2.join(directory, actualName); + filePath = path4.join(directory, actualName); break; } } @@ -116054,11 +116054,11 @@ var require_io3 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -116074,7 +116074,7 @@ var require_io3 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -116082,7 +116082,7 @@ var require_io3 = __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 path2 = __importStar2(require("path")); + var path4 = __importStar2(require("path")); var ioUtil = __importStar2(require_io_util3()); function cp(source, dest, options = {}) { return __awaiter2(this, void 0, void 0, function* () { @@ -116091,7 +116091,7 @@ var require_io3 = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path2.join(dest, path2.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path4.join(dest, path4.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -116103,7 +116103,7 @@ var require_io3 = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path2.relative(source, newDest) === "") { + if (path4.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile(source, newDest, force); @@ -116116,7 +116116,7 @@ var require_io3 = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path2.join(dest, path2.basename(source)); + dest = path4.join(dest, path4.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -116127,7 +116127,7 @@ var require_io3 = __commonJS({ } } } - yield mkdirP(path2.dirname(dest)); + yield mkdirP(path4.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -116190,7 +116190,7 @@ var require_io3 = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path2.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path4.delimiter)) { if (extension) { extensions.push(extension); } @@ -116203,12 +116203,12 @@ var require_io3 = __commonJS({ } return []; } - if (tool.includes(path2.sep)) { + if (tool.includes(path4.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path2.delimiter)) { + for (const p of process.env.PATH.split(path4.delimiter)) { if (p) { directories.push(p); } @@ -116216,7 +116216,7 @@ var require_io3 = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path2.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path4.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -116302,11 +116302,11 @@ var require_toolrunner3 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -116322,17 +116322,17 @@ var require_toolrunner3 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.argStringToArray = exports2.ToolRunner = void 0; - var os = __importStar2(require("os")); + var os2 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path2 = __importStar2(require("path")); + var path4 = __importStar2(require("path")); var io6 = __importStar2(require_io3()); var ioUtil = __importStar2(require_io_util3()); var timers_1 = require("timers"); @@ -116384,12 +116384,12 @@ var require_toolrunner3 = __commonJS({ _processLineBuffer(data, strBuffer, onLine) { try { let s = strBuffer + data.toString(); - let n = s.indexOf(os.EOL); + let n = s.indexOf(os2.EOL); while (n > -1) { const line = s.substring(0, n); onLine(line); - s = s.substring(n + os.EOL.length); - n = s.indexOf(os.EOL); + s = s.substring(n + os2.EOL.length); + n = s.indexOf(os2.EOL); } return s; } catch (err) { @@ -116547,10 +116547,10 @@ var require_toolrunner3 = __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 = path2.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path4.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io6.which(this.toolPath, true); - return new Promise((resolve2, reject) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve3, reject) => __awaiter2(this, void 0, void 0, function* () { this._debug(`exec tool: ${this.toolPath}`); this._debug("arguments:"); for (const arg of this.args) { @@ -116558,7 +116558,7 @@ var require_toolrunner3 = __commonJS({ } const optionsNonNull = this._cloneExecOptions(this.options); if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os.EOL); + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os2.EOL); } const state = new ExecState(optionsNonNull, this.toolPath); state.on("debug", (message) => { @@ -116633,7 +116633,7 @@ var require_toolrunner3 = __commonJS({ if (error3) { reject(error3); } else { - resolve2(exitCode); + resolve3(exitCode); } }); if (this.options.input) { @@ -116786,11 +116786,11 @@ var require_exec3 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -116806,7 +116806,7 @@ var require_exec3 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -116897,11 +116897,11 @@ var require_platform3 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -116917,7 +116917,7 @@ var require_platform3 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -117016,11 +117016,11 @@ var require_core4 = __commonJS({ }; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -117036,7 +117036,7 @@ var require_core4 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -117046,8 +117046,8 @@ var require_core4 = __commonJS({ var command_1 = require_command3(); var file_command_1 = require_file_command3(); var utils_1 = require_utils11(); - var os = __importStar2(require("os")); - var path2 = __importStar2(require("path")); + var os2 = __importStar2(require("os")); + var path4 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils3(); var ExitCode; (function(ExitCode2) { @@ -117075,7 +117075,7 @@ var require_core4 = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path2.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path4.delimiter}${process.env["PATH"]}`; } exports2.addPath = addPath; function getInput2(name, options) { @@ -117114,7 +117114,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); if (filePath) { return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); } - process.stdout.write(os.EOL); + process.stdout.write(os2.EOL); (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); } exports2.setOutput = setOutput; @@ -117148,7 +117148,7 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } exports2.notice = notice; function info7(message) { - process.stdout.write(message + os.EOL); + process.stdout.write(message + os2.EOL); } exports2.info = info7; function startGroup3(name) { @@ -117251,13 +117251,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(path2) { - if (!path2) { - throw new Error(`Artifact path: ${path2}, is incorrectly provided`); + function checkArtifactFilePath(path4) { + if (!path4) { + throw new Error(`Artifact path: ${path4}, is incorrectly provided`); } for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) { - if (path2.includes(invalidCharacterKey)) { - throw new Error(`Artifact path is not valid: ${path2}. Contains the following character: ${errorMessageForCharacter} + if (path4.includes(invalidCharacterKey)) { + throw new Error(`Artifact path is not valid: ${path4}. Contains the following character: ${errorMessageForCharacter} Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()} @@ -117303,25 +117303,25 @@ var require_upload_specification = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUploadSpecification = void 0; - var fs2 = __importStar2(require("fs")); + var fs3 = __importStar2(require("fs")); var core_1 = require_core4(); var path_1 = require("path"); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation2(); function getUploadSpecification(artifactName, rootDirectory, artifactFiles) { const specifications = []; - if (!fs2.existsSync(rootDirectory)) { + if (!fs3.existsSync(rootDirectory)) { throw new Error(`Provided rootDirectory ${rootDirectory} does not exist`); } - if (!fs2.statSync(rootDirectory).isDirectory()) { + if (!fs3.statSync(rootDirectory).isDirectory()) { throw new Error(`Provided rootDirectory ${rootDirectory} is not a valid directory`); } rootDirectory = (0, path_1.normalize)(rootDirectory); rootDirectory = (0, path_1.resolve)(rootDirectory); for (let file of artifactFiles) { - if (!fs2.existsSync(file)) { + if (!fs3.existsSync(file)) { throw new Error(`File ${file} does not exist`); } - if (!fs2.statSync(file).isDirectory()) { + if (!fs3.statSync(file).isDirectory()) { file = (0, path_1.normalize)(file); file = (0, path_1.resolve)(file); if (!file.startsWith(rootDirectory)) { @@ -117346,29 +117346,29 @@ var require_upload_specification = __commonJS({ // node_modules/tmp/lib/tmp.js var require_tmp = __commonJS({ "node_modules/tmp/lib/tmp.js"(exports2, module2) { - var fs2 = require("fs"); - var os = require("os"); - var path2 = require("path"); + var fs3 = require("fs"); + var os2 = require("os"); + var path4 = require("path"); var crypto2 = require("crypto"); - var _c = { fs: fs2.constants, os: os.constants }; + var _c = { fs: fs3.constants, os: os2.constants }; var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; var TEMPLATE_PATTERN = /XXXXXX/; var DEFAULT_TRIES = 3; var CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR); - var IS_WIN32 = os.platform() === "win32"; + var IS_WIN32 = os2.platform() === "win32"; var EBADF = _c.EBADF || _c.os.errno.EBADF; var ENOENT = _c.ENOENT || _c.os.errno.ENOENT; var DIR_MODE = 448; var FILE_MODE = 384; var EXIT = "exit"; var _removeObjects = []; - var FN_RMDIR_SYNC = fs2.rmdirSync.bind(fs2); + var FN_RMDIR_SYNC = fs3.rmdirSync.bind(fs3); var _gracefulCleanup = false; function rimraf(dirPath, callback) { - return fs2.rm(dirPath, { recursive: true }, callback); + return fs3.rm(dirPath, { recursive: true }, callback); } function FN_RIMRAF_SYNC(dirPath) { - return fs2.rmSync(dirPath, { recursive: true }); + return fs3.rmSync(dirPath, { recursive: true }); } function tmpName(options, callback) { const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; @@ -117378,7 +117378,7 @@ var require_tmp = __commonJS({ (function _getUniqueName() { try { const name = _generateTmpName(sanitizedOptions); - fs2.stat(name, function(err2) { + fs3.stat(name, function(err2) { if (!err2) { if (tries-- > 0) return _getUniqueName(); return cb(new Error("Could not get a unique tmp filename, max tries reached " + name)); @@ -117398,7 +117398,7 @@ var require_tmp = __commonJS({ do { const name = _generateTmpName(sanitizedOptions); try { - fs2.statSync(name); + fs3.statSync(name); } catch (e) { return name; } @@ -117409,10 +117409,10 @@ var require_tmp = __commonJS({ const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; tmpName(opts, function _tmpNameCreated(err, name) { if (err) return cb(err); - fs2.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) { + fs3.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) { if (err2) return cb(err2); if (opts.discardDescriptor) { - return fs2.close(fd, function _discardCallback(possibleErr) { + return fs3.close(fd, function _discardCallback(possibleErr) { return cb(possibleErr, name, void 0, _prepareTmpFileRemoveCallback(name, -1, opts, false)); }); } else { @@ -117426,9 +117426,9 @@ var require_tmp = __commonJS({ const args = _parseArguments(options), opts = args[0]; const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor; const name = tmpNameSync(opts); - let fd = fs2.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE); + let fd = fs3.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE); if (opts.discardDescriptor) { - fs2.closeSync(fd); + fs3.closeSync(fd); fd = void 0; } return { @@ -117441,7 +117441,7 @@ var require_tmp = __commonJS({ const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; tmpName(opts, function _tmpNameCreated(err, name) { if (err) return cb(err); - fs2.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) { + fs3.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) { if (err2) return cb(err2); cb(null, name, _prepareTmpDirRemoveCallback(name, opts, false)); }); @@ -117450,7 +117450,7 @@ var require_tmp = __commonJS({ function dirSync(options) { const args = _parseArguments(options), opts = args[0]; const name = tmpNameSync(opts); - fs2.mkdirSync(name, opts.mode || DIR_MODE); + fs3.mkdirSync(name, opts.mode || DIR_MODE); return { name, removeCallback: _prepareTmpDirRemoveCallback(name, opts, true) @@ -117464,20 +117464,20 @@ var require_tmp = __commonJS({ next(); }; if (0 <= fdPath[0]) - fs2.close(fdPath[0], function() { - fs2.unlink(fdPath[1], _handler); + fs3.close(fdPath[0], function() { + fs3.unlink(fdPath[1], _handler); }); - else fs2.unlink(fdPath[1], _handler); + else fs3.unlink(fdPath[1], _handler); } function _removeFileSync(fdPath) { let rethrownException = null; try { - if (0 <= fdPath[0]) fs2.closeSync(fdPath[0]); + if (0 <= fdPath[0]) fs3.closeSync(fdPath[0]); } catch (e) { if (!_isEBADF(e) && !_isENOENT(e)) throw e; } finally { try { - fs2.unlinkSync(fdPath[1]); + fs3.unlinkSync(fdPath[1]); } catch (e) { if (!_isENOENT(e)) rethrownException = e; } @@ -117493,7 +117493,7 @@ var require_tmp = __commonJS({ return sync ? removeCallbackSync : removeCallback; } function _prepareTmpDirRemoveCallback(name, opts, sync) { - const removeFunction = opts.unsafeCleanup ? rimraf : fs2.rmdir.bind(fs2); + const removeFunction = opts.unsafeCleanup ? rimraf : fs3.rmdir.bind(fs3); const removeFunctionSync = opts.unsafeCleanup ? FN_RIMRAF_SYNC : FN_RMDIR_SYNC; const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name, sync); const removeCallback = _prepareRemoveCallback(removeFunction, name, sync, removeCallbackSync); @@ -117555,35 +117555,35 @@ var require_tmp = __commonJS({ return [actualOptions, callback]; } function _resolvePath(name, tmpDir, cb) { - const pathToResolve = path2.isAbsolute(name) ? name : path2.join(tmpDir, name); - fs2.stat(pathToResolve, function(err) { + const pathToResolve = path4.isAbsolute(name) ? name : path4.join(tmpDir, name); + fs3.stat(pathToResolve, function(err) { if (err) { - fs2.realpath(path2.dirname(pathToResolve), function(err2, parentDir) { + fs3.realpath(path4.dirname(pathToResolve), function(err2, parentDir) { if (err2) return cb(err2); - cb(null, path2.join(parentDir, path2.basename(pathToResolve))); + cb(null, path4.join(parentDir, path4.basename(pathToResolve))); }); } else { - fs2.realpath(path2, cb); + fs3.realpath(path4, cb); } }); } function _resolvePathSync(name, tmpDir) { - const pathToResolve = path2.isAbsolute(name) ? name : path2.join(tmpDir, name); + const pathToResolve = path4.isAbsolute(name) ? name : path4.join(tmpDir, name); try { - fs2.statSync(pathToResolve); - return fs2.realpathSync(pathToResolve); + fs3.statSync(pathToResolve); + return fs3.realpathSync(pathToResolve); } catch (_err) { - const parentDir = fs2.realpathSync(path2.dirname(pathToResolve)); - return path2.join(parentDir, path2.basename(pathToResolve)); + const parentDir = fs3.realpathSync(path4.dirname(pathToResolve)); + return path4.join(parentDir, path4.basename(pathToResolve)); } } function _generateTmpName(opts) { const tmpDir = opts.tmpdir; if (!_isUndefined(opts.name)) { - return path2.join(tmpDir, opts.dir, opts.name); + return path4.join(tmpDir, opts.dir, opts.name); } if (!_isUndefined(opts.template)) { - return path2.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); + return path4.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); } const name = [ opts.prefix ? opts.prefix : "tmp", @@ -117593,14 +117593,14 @@ var require_tmp = __commonJS({ _randomChars(12), opts.postfix ? "-" + opts.postfix : "" ].join(""); - return path2.join(tmpDir, opts.dir, name); + return path4.join(tmpDir, opts.dir, name); } function _assertOptionsBase(options) { if (!_isUndefined(options.name)) { const name = options.name; - if (path2.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`); - const basename = path2.basename(name); - if (basename === ".." || basename === "." || basename !== name) + if (path4.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`); + const basename2 = path4.basename(name); + if (basename2 === ".." || basename2 === "." || basename2 !== name) throw new Error(`name option must not contain a path, found "${name}".`); } if (!_isUndefined(options.template) && !options.template.match(TEMPLATE_PATTERN)) { @@ -117621,7 +117621,7 @@ var require_tmp = __commonJS({ if (_isUndefined(name)) return cb(null); _resolvePath(name, tmpDir, function(err, resolvedPath) { if (err) return cb(err); - const relativePath = path2.relative(tmpDir, resolvedPath); + const relativePath = path4.relative(tmpDir, resolvedPath); if (!resolvedPath.startsWith(tmpDir)) { return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`)); } @@ -117631,7 +117631,7 @@ var require_tmp = __commonJS({ function _getRelativePathSync(option, name, tmpDir) { if (_isUndefined(name)) return; const resolvedPath = _resolvePathSync(name, tmpDir); - const relativePath = path2.relative(tmpDir, resolvedPath); + const relativePath = path4.relative(tmpDir, resolvedPath); if (!resolvedPath.startsWith(tmpDir)) { throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`); } @@ -117678,10 +117678,10 @@ var require_tmp = __commonJS({ _gracefulCleanup = true; } function _getTmpDir(options, cb) { - return fs2.realpath(options && options.tmpdir || os.tmpdir(), cb); + return fs3.realpath(options && options.tmpdir || os2.tmpdir(), cb); } function _getTmpDirSync(options) { - return fs2.realpathSync(options && options.tmpdir || os.tmpdir()); + return fs3.realpathSync(options && options.tmpdir || os2.tmpdir()); } process.addListener(EXIT, _garbageCollector); Object.defineProperty(module2.exports, "tmpdir", { @@ -117711,14 +117711,14 @@ var require_tmp_promise = __commonJS({ var fileWithOptions = promisify( (options, cb) => tmp.file( options, - (err, path2, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path2, fd, cleanup: promisify(cleanup) }) + (err, path4, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path4, fd, cleanup: promisify(cleanup) }) ) ); module2.exports.file = async (options) => fileWithOptions(options); module2.exports.withFile = async function withFile(fn, options) { - const { path: path2, fd, cleanup } = await module2.exports.file(options); + const { path: path4, fd, cleanup } = await module2.exports.file(options); try { - return await fn({ path: path2, fd }); + return await fn({ path: path4, fd }); } finally { await cleanup(); } @@ -117727,14 +117727,14 @@ var require_tmp_promise = __commonJS({ var dirWithOptions = promisify( (options, cb) => tmp.dir( options, - (err, path2, cleanup) => err ? cb(err) : cb(void 0, { path: path2, cleanup: promisify(cleanup) }) + (err, path4, cleanup) => err ? cb(err) : cb(void 0, { path: path4, cleanup: promisify(cleanup) }) ) ); module2.exports.dir = async (options) => dirWithOptions(options); module2.exports.withDir = async function withDir(fn, options) { - const { path: path2, cleanup } = await module2.exports.dir(options); + const { path: path4, cleanup } = await module2.exports.dir(options); try { - return await fn({ path: path2 }); + return await fn({ path: path4 }); } finally { await cleanup(); } @@ -118123,11 +118123,11 @@ var require_utils12 = __commonJS({ "use strict"; var __awaiter2 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -118143,7 +118143,7 @@ var require_utils12 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -118353,19 +118353,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((resolve2) => setTimeout(resolve2, milliseconds)); + return new Promise((resolve3) => setTimeout(resolve3, milliseconds)); }); } exports2.sleep = sleep; function digestForStream(stream) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => { + return new Promise((resolve3, 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", () => resolve2({ + }).on("end", () => resolve3({ crc64: crc64.digest("base64"), md5: md5.digest("base64") })).on("error", reject); @@ -118489,11 +118489,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -118509,7 +118509,7 @@ var require_upload_gzip = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -118522,23 +118522,23 @@ var require_upload_gzip = __commonJS({ }, i); function verb(n) { i[n] = o[n] && function(v) { - return new Promise(function(resolve2, reject) { - v = o[n](v), settle(resolve2, reject, v.done, v.value); + return new Promise(function(resolve3, reject) { + v = o[n](v), settle(resolve3, reject, v.done, v.value); }); }; } - function settle(resolve2, reject, d, v) { + function settle(resolve3, reject, d, v) { Promise.resolve(v).then(function(v2) { - resolve2({ value: v2, done: d }); + resolve3({ value: v2, done: d }); }, reject); } }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createGZipFileInBuffer = exports2.createGZipFileOnDisk = void 0; - var fs2 = __importStar2(require("fs")); + var fs3 = __importStar2(require("fs")); var zlib = __importStar2(require("zlib")); var util_1 = require("util"); - var stat = (0, util_1.promisify)(fs2.stat); + var stat = (0, util_1.promisify)(fs3.stat); var gzipExemptFileExtensions = [ ".gz", ".gzip", @@ -118570,14 +118570,14 @@ var require_upload_gzip = __commonJS({ return Number.MAX_SAFE_INTEGER; } } - return new Promise((resolve2, reject) => { - const inputStream = fs2.createReadStream(originalFilePath); + return new Promise((resolve3, reject) => { + const inputStream = fs3.createReadStream(originalFilePath); const gzip = zlib.createGzip(); - const outputStream = fs2.createWriteStream(tempFilePath); + const outputStream = fs3.createWriteStream(tempFilePath); inputStream.pipe(gzip).pipe(outputStream); outputStream.on("finish", () => __awaiter2(this, void 0, void 0, function* () { const size = (yield stat(tempFilePath)).size; - resolve2(size); + resolve3(size); })); outputStream.on("error", (error3) => { console.log(error3); @@ -118589,9 +118589,9 @@ var require_upload_gzip = __commonJS({ exports2.createGZipFileOnDisk = createGZipFileOnDisk; function createGZipFileInBuffer(originalFilePath) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter2(this, void 0, void 0, function* () { + return new Promise((resolve3) => __awaiter2(this, void 0, void 0, function* () { var _a, e_1, _b, _c; - const inputStream = fs2.createReadStream(originalFilePath); + const inputStream = fs3.createReadStream(originalFilePath); const gzip = zlib.createGzip(); inputStream.pipe(gzip); const chunks = []; @@ -118615,7 +118615,7 @@ var require_upload_gzip = __commonJS({ if (e_1) throw e_1.error; } } - resolve2(Buffer.concat(chunks)); + resolve3(Buffer.concat(chunks)); })); }); } @@ -118656,11 +118656,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -118676,7 +118676,7 @@ var require_requestUtils2 = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -118773,11 +118773,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -118793,14 +118793,14 @@ var require_upload_http_client = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UploadHttpClient = void 0; - var fs2 = __importStar2(require("fs")); + var fs3 = __importStar2(require("fs")); var core14 = __importStar2(require_core4()); var tmp = __importStar2(require_tmp_promise()); var stream = __importStar2(require("stream")); @@ -118814,7 +118814,7 @@ var require_upload_http_client = __commonJS({ var http_manager_1 = require_http_manager(); var upload_gzip_1 = require_upload_gzip(); var requestUtils_1 = require_requestUtils2(); - var stat = (0, util_1.promisify)(fs2.stat); + var stat = (0, util_1.promisify)(fs3.stat); var UploadHttpClient = class { constructor() { this.uploadHttpManager = new http_manager_1.HttpManager((0, config_variables_1.getUploadFileConcurrency)(), "@actions/artifact-upload"); @@ -118951,7 +118951,7 @@ var require_upload_http_client = __commonJS({ let openUploadStream; if (totalFileSize < buffer.byteLength) { core14.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); - openUploadStream = () => fs2.createReadStream(parameters.file); + openUploadStream = () => fs3.createReadStream(parameters.file); isGzip = false; uploadFileSize = totalFileSize; } else { @@ -118997,7 +118997,7 @@ var require_upload_http_client = __commonJS({ failedChunkSizes += chunkSize; continue; } - const result = yield this.uploadChunk(httpClientIndex, parameters.resourceUrl, () => fs2.createReadStream(uploadFilePath, { + const result = yield this.uploadChunk(httpClientIndex, parameters.resourceUrl, () => fs3.createReadStream(uploadFilePath, { start: startChunkIndex, end: endChunkIndex, autoClose: false @@ -119165,11 +119165,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -119185,14 +119185,14 @@ var require_download_http_client = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DownloadHttpClient = void 0; - var fs2 = __importStar2(require("fs")); + var fs3 = __importStar2(require("fs")); var core14 = __importStar2(require_core4()); var zlib = __importStar2(require("zlib")); var utils_1 = require_utils12(); @@ -119283,7 +119283,7 @@ var require_download_http_client = __commonJS({ return __awaiter2(this, void 0, void 0, function* () { let retryCount = 0; const retryLimit = (0, config_variables_1.getRetryLimit)(); - let destinationStream = fs2.createWriteStream(downloadPath); + let destinationStream = fs3.createWriteStream(downloadPath); const headers = (0, utils_1.getDownloadHeaders)("application/json", true, true); const makeDownloadRequest = () => __awaiter2(this, void 0, void 0, function* () { const client = this.downloadHttpManager.getClient(httpClientIndex); @@ -119318,14 +119318,14 @@ var require_download_http_client = __commonJS({ }; const resetDestinationStream = (fileDownloadPath) => __awaiter2(this, void 0, void 0, function* () { destinationStream.close(); - yield new Promise((resolve2) => { - destinationStream.on("close", resolve2); + yield new Promise((resolve3) => { + destinationStream.on("close", resolve3); if (destinationStream.writableFinished) { - resolve2(); + resolve3(); } }); yield (0, utils_1.rmFile)(fileDownloadPath); - destinationStream = fs2.createWriteStream(fileDownloadPath); + destinationStream = fs3.createWriteStream(fileDownloadPath); }); while (retryCount <= retryLimit) { let response; @@ -119370,7 +119370,7 @@ var require_download_http_client = __commonJS({ */ pipeResponseToFile(response, destinationStream, isGzip) { return __awaiter2(this, void 0, void 0, function* () { - yield new Promise((resolve2, reject) => { + yield new Promise((resolve3, reject) => { if (isGzip) { const gunzip = zlib.createGunzip(); response.message.on("error", (error3) => { @@ -119383,7 +119383,7 @@ var require_download_http_client = __commonJS({ destinationStream.close(); reject(error3); }).pipe(destinationStream).on("close", () => { - resolve2(); + resolve3(); }).on("error", (error3) => { core14.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); reject(error3); @@ -119394,7 +119394,7 @@ var require_download_http_client = __commonJS({ destinationStream.close(); reject(error3); }).pipe(destinationStream).on("close", () => { - resolve2(); + resolve3(); }).on("error", (error3) => { core14.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); reject(error3); @@ -119442,21 +119442,21 @@ var require_download_specification = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadSpecification = void 0; - var path2 = __importStar2(require("path")); + var path4 = __importStar2(require("path")); function getDownloadSpecification(artifactName, artifactEntries, downloadPath, includeRootDirectory) { const directories = /* @__PURE__ */ new Set(); const specifications = { - rootDownloadLocation: includeRootDirectory ? path2.join(downloadPath, artifactName) : downloadPath, + rootDownloadLocation: includeRootDirectory ? path4.join(downloadPath, artifactName) : downloadPath, directoryStructure: [], emptyFilesToCreate: [], filesToDownload: [] }; for (const entry of artifactEntries) { if (entry.path.startsWith(`${artifactName}/`) || entry.path.startsWith(`${artifactName}\\`)) { - const normalizedPathEntry = path2.normalize(entry.path); - const filePath = path2.join(downloadPath, includeRootDirectory ? normalizedPathEntry : normalizedPathEntry.replace(artifactName, "")); + const normalizedPathEntry = path4.normalize(entry.path); + const filePath = path4.join(downloadPath, includeRootDirectory ? normalizedPathEntry : normalizedPathEntry.replace(artifactName, "")); if (entry.itemType === "file") { - directories.add(path2.dirname(filePath)); + directories.add(path4.dirname(filePath)); if (entry.fileLength === 0) { specifications.emptyFilesToCreate.push(filePath); } else { @@ -119508,11 +119508,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -119528,7 +119528,7 @@ var require_artifact_client = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -119598,7 +119598,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz return uploadResponse; }); } - downloadArtifact(name, path2, options) { + downloadArtifact(name, path4, options) { return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const artifacts = yield downloadHttpClient.listArtifacts(); @@ -119612,12 +119612,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 (!path2) { - path2 = (0, config_variables_1.getWorkSpaceDirectory)(); + if (!path4) { + path4 = (0, config_variables_1.getWorkSpaceDirectory)(); } - path2 = (0, path_1.normalize)(path2); - path2 = (0, path_1.resolve)(path2); - const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path2, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); + path4 = (0, path_1.normalize)(path4); + path4 = (0, path_1.resolve)(path4); + const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path4, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); if (downloadSpecification.filesToDownload.length === 0) { core14.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`); } else { @@ -119632,7 +119632,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz }; }); } - downloadAllArtifacts(path2) { + downloadAllArtifacts(path4) { return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const response = []; @@ -119641,18 +119641,18 @@ Note: The size of downloaded zips can differ significantly from the reported siz core14.info("Unable to find any artifacts for the associated workflow"); return response; } - if (!path2) { - path2 = (0, config_variables_1.getWorkSpaceDirectory)(); + if (!path4) { + path4 = (0, config_variables_1.getWorkSpaceDirectory)(); } - path2 = (0, path_1.normalize)(path2); - path2 = (0, path_1.resolve)(path2); + path4 = (0, path_1.normalize)(path4); + path4 = (0, path_1.resolve)(path4); let downloadedArtifacts = 0; while (downloadedArtifacts < artifacts.count) { const currentArtifactToDownload = artifacts.value[downloadedArtifacts]; downloadedArtifacts += 1; core14.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`); const items = yield downloadHttpClient.getContainerItems(currentArtifactToDownload.name, currentArtifactToDownload.fileContainerResourceUrl); - const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path2, true); + const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path4, true); if (downloadSpecification.filesToDownload.length === 0) { core14.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`); } else { @@ -119730,11 +119730,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -119750,7 +119750,7 @@ var require_manifest = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -119761,12 +119761,12 @@ var require_manifest = __commonJS({ exports2._readLinuxVersionFile = _readLinuxVersionFile; var semver9 = __importStar2(require_semver2()); var core_1 = require_core(); - var os = require("os"); + var os2 = require("os"); var cp = require("child_process"); - var fs2 = require("fs"); + var fs3 = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter2(this, void 0, void 0, function* () { - const platFilter = os.platform(); + const platFilter = os2.platform(); let result; let match; let file; @@ -119802,7 +119802,7 @@ var require_manifest = __commonJS({ }); } function _getOsVersion() { - const plat = os.platform(); + const plat = os2.platform(); let version = ""; if (plat === "darwin") { version = cp.execSync("sw_vers -productVersion").toString(); @@ -119825,10 +119825,10 @@ var require_manifest = __commonJS({ const lsbReleaseFile = "/etc/lsb-release"; const osReleaseFile = "/etc/os-release"; let contents = ""; - if (fs2.existsSync(lsbReleaseFile)) { - contents = fs2.readFileSync(lsbReleaseFile).toString(); - } else if (fs2.existsSync(osReleaseFile)) { - contents = fs2.readFileSync(osReleaseFile).toString(); + if (fs3.existsSync(lsbReleaseFile)) { + contents = fs3.readFileSync(lsbReleaseFile).toString(); + } else if (fs3.existsSync(osReleaseFile)) { + contents = fs3.readFileSync(osReleaseFile).toString(); } return contents; } @@ -119878,11 +119878,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -119898,7 +119898,7 @@ var require_retry_helper = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -119943,7 +119943,7 @@ var require_retry_helper = __commonJS({ } sleep(seconds) { return __awaiter2(this, void 0, void 0, function* () { - return new Promise((resolve2) => setTimeout(resolve2, seconds * 1e3)); + return new Promise((resolve3) => setTimeout(resolve3, seconds * 1e3)); }); } }; @@ -119994,11 +119994,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(resolve2) { - resolve2(value); + return value instanceof P ? value : new P(function(resolve3) { + resolve3(value); }); } - return new (P || (P = Promise))(function(resolve2, reject) { + return new (P || (P = Promise))(function(resolve3, reject) { function fulfilled(value) { try { step(generator.next(value)); @@ -120014,7 +120014,7 @@ var require_tool_cache = __commonJS({ } } function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + result.done ? resolve3(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); @@ -120037,10 +120037,10 @@ var require_tool_cache = __commonJS({ var core14 = __importStar2(require_core()); var io6 = __importStar2(require_io()); var crypto2 = __importStar2(require("crypto")); - var fs2 = __importStar2(require("fs")); + var fs3 = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); - var os = __importStar2(require("os")); - var path2 = __importStar2(require("path")); + var os2 = __importStar2(require("os")); + var path4 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver9 = __importStar2(require_semver2()); var stream = __importStar2(require("stream")); @@ -120061,8 +120061,8 @@ var require_tool_cache = __commonJS({ var userAgent = "actions/tool-cache"; function downloadTool2(url, dest, auth, headers) { return __awaiter2(this, void 0, void 0, function* () { - dest = dest || path2.join(_getTempDirectory(), crypto2.randomUUID()); - yield io6.mkdirP(path2.dirname(dest)); + dest = dest || path4.join(_getTempDirectory(), crypto2.randomUUID()); + yield io6.mkdirP(path4.dirname(dest)); core14.debug(`Downloading ${url}`); core14.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -120083,7 +120083,7 @@ var require_tool_cache = __commonJS({ } function downloadToolAttempt(url, dest, auth, headers) { return __awaiter2(this, void 0, void 0, function* () { - if (fs2.existsSync(dest)) { + if (fs3.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } const http = new httpm.HttpClient(userAgent, [], { @@ -120107,7 +120107,7 @@ var require_tool_cache = __commonJS({ const readStream = responseMessageFactory(); let succeeded = false; try { - yield pipeline(readStream, fs2.createWriteStream(dest)); + yield pipeline(readStream, fs3.createWriteStream(dest)); core14.debug("download complete"); succeeded = true; return dest; @@ -120152,7 +120152,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path2.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path4.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}'`; @@ -120316,15 +120316,15 @@ var require_tool_cache = __commonJS({ function cacheDir(sourceDir, tool, version, arch) { return __awaiter2(this, void 0, void 0, function* () { version = semver9.clean(version) || version; - arch = arch || os.arch(); + arch = arch || os2.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch}`); core14.debug(`source dir: ${sourceDir}`); - if (!fs2.statSync(sourceDir).isDirectory()) { + if (!fs3.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } const destPath = yield _createToolPath(tool, version, arch); - for (const itemName of fs2.readdirSync(sourceDir)) { - const s = path2.join(sourceDir, itemName); + for (const itemName of fs3.readdirSync(sourceDir)) { + const s = path4.join(sourceDir, itemName); yield io6.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch); @@ -120334,14 +120334,14 @@ var require_tool_cache = __commonJS({ function cacheFile(sourceFile, targetFile, tool, version, arch) { return __awaiter2(this, void 0, void 0, function* () { version = semver9.clean(version) || version; - arch = arch || os.arch(); + arch = arch || os2.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch}`); core14.debug(`source file: ${sourceFile}`); - if (!fs2.statSync(sourceFile).isFile()) { + if (!fs3.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch); - const destPath = path2.join(destFolder, targetFile); + const destPath = path4.join(destFolder, targetFile); core14.debug(`destination file ${destPath}`); yield io6.cp(sourceFile, destPath); _completeToolPath(tool, version, arch); @@ -120355,7 +120355,7 @@ var require_tool_cache = __commonJS({ if (!versionSpec) { throw new Error("versionSpec parameter is required"); } - arch = arch || os.arch(); + arch = arch || os2.arch(); if (!isExplicitVersion(versionSpec)) { const localVersions = findAllVersions2(toolName, arch); const match = evaluateVersions(localVersions, versionSpec); @@ -120364,9 +120364,9 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver9.clean(versionSpec) || ""; - const cachePath = path2.join(_getCacheDirectory(), toolName, versionSpec, arch); + const cachePath = path4.join(_getCacheDirectory(), toolName, versionSpec, arch); core14.debug(`checking cache: ${cachePath}`); - if (fs2.existsSync(cachePath) && fs2.existsSync(`${cachePath}.complete`)) { + if (fs3.existsSync(cachePath) && fs3.existsSync(`${cachePath}.complete`)) { core14.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); toolPath = cachePath; } else { @@ -120377,14 +120377,14 @@ var require_tool_cache = __commonJS({ } function findAllVersions2(toolName, arch) { const versions = []; - arch = arch || os.arch(); - const toolPath = path2.join(_getCacheDirectory(), toolName); - if (fs2.existsSync(toolPath)) { - const children = fs2.readdirSync(toolPath); + arch = arch || os2.arch(); + const toolPath = path4.join(_getCacheDirectory(), toolName); + if (fs3.existsSync(toolPath)) { + const children = fs3.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path2.join(toolPath, child, arch || ""); - if (fs2.existsSync(fullPath) && fs2.existsSync(`${fullPath}.complete`)) { + const fullPath = path4.join(toolPath, child, arch || ""); + if (fs3.existsSync(fullPath) && fs3.existsSync(`${fullPath}.complete`)) { versions.push(child); } } @@ -120427,7 +120427,7 @@ var require_tool_cache = __commonJS({ }); } function findFromManifest(versionSpec_1, stable_1, manifest_1) { - return __awaiter2(this, arguments, void 0, function* (versionSpec, stable, manifest, archFilter = os.arch()) { + return __awaiter2(this, arguments, void 0, function* (versionSpec, stable, manifest, archFilter = os2.arch()) { const match = yield mm._findMatch(versionSpec, stable, manifest, archFilter); return match; }); @@ -120435,7 +120435,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path2.join(_getTempDirectory(), crypto2.randomUUID()); + dest = path4.join(_getTempDirectory(), crypto2.randomUUID()); } yield io6.mkdirP(dest); return dest; @@ -120443,7 +120443,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch) { return __awaiter2(this, void 0, void 0, function* () { - const folderPath = path2.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch || ""); + const folderPath = path4.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch || ""); core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io6.rmRF(folderPath); @@ -120453,9 +120453,9 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch) { - const folderPath = path2.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch || ""); + const folderPath = path4.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch || ""); const markerPath = `${folderPath}.complete`; - fs2.writeFileSync(markerPath, ""); + fs3.writeFileSync(markerPath, ""); core14.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { @@ -121081,21 +121081,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 fs2 = options.fs || await import("node:fs/promises"); + const fs3 = 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 fs2.lstat(itemPath, { bigint: true }) : await fs2.lstat(itemPath, { bigint: true }).catch((error3) => errors.push(error3)); + const stats = returnType.strict ? await fs3.lstat(itemPath, { bigint: true }) : await fs3.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 fs2.readdir(itemPath) : await fs2.readdir(itemPath).catch((error3) => errors.push(error3)); + const directoryItems = returnType.strict ? await fs3.readdir(itemPath) : await fs3.readdir(itemPath).catch((error3) => errors.push(error3)); if (typeof directoryItems !== "object") return; await Promise.all( directoryItems.map( @@ -123797,6 +123797,9 @@ var ConfigurationError = class extends Error { super(message); } }; +function isInTestMode() { + return process.env["CODEQL_ACTION_TEST_MODE" /* TEST_MODE */] === "true"; +} function getErrorMessage(error3) { return error3 instanceof Error ? error3.message : String(error3); } @@ -123810,6 +123813,10 @@ var getRequiredInput = function(name) { } return value; }; +var getOptionalInput = function(name) { + const value = core4.getInput(name); + return value.length > 0 ? value : void 0; +}; function getTemporaryDirectory() { const value = process.env["CODEQL_ACTION_TEMP"]; return value !== void 0 && value !== "" ? value : getRequiredEnvParam("RUNNER_TEMP"); @@ -124195,6 +124202,7 @@ async function getConfig(tempDir, logger) { } // src/debug-artifacts.ts +var path3 = __toESM(require("path")); var artifact = __toESM(require_artifact2()); var artifactLegacy = __toESM(require_artifact_client2()); var core12 = __toESM(require_core()); @@ -124370,9 +124378,290 @@ var actionsCache3 = __toESM(require_cache4()); var glob = __toESM(require_glob()); // src/artifact-scanner.ts +var fs2 = __toESM(require("fs")); +var os = __toESM(require("os")); +var path2 = __toESM(require("path")); var exec = __toESM(require_exec()); +var GITHUB_TOKEN_PATTERNS = [ + { + name: "Personal Access Token", + pattern: /\bghp_[a-zA-Z0-9]{36}\b/g + }, + { + name: "OAuth Access Token", + pattern: /\bgho_[a-zA-Z0-9]{36}\b/g + }, + { + name: "User-to-Server Token", + pattern: /\bghu_[a-zA-Z0-9]{36}\b/g + }, + { + name: "Server-to-Server Token", + pattern: /\bghs_[a-zA-Z0-9]{36}\b/g + }, + { + name: "Refresh Token", + pattern: /\bghr_[a-zA-Z0-9]{36}\b/g + }, + { + name: "App Installation Access Token", + pattern: /\bghs_[a-zA-Z0-9]{255}\b/g + } +]; +function scanFileForTokens(filePath, relativePath, logger) { + const findings = []; + try { + const content = fs2.readFileSync(filePath, "utf8"); + for (const { name, pattern } of GITHUB_TOKEN_PATTERNS) { + const matches = content.match(pattern); + if (matches) { + for (let i = 0; i < matches.length; i++) { + findings.push({ tokenType: name, filePath: relativePath }); + } + logger.debug(`Found ${matches.length} ${name}(s) in ${relativePath}`); + } + } + return findings; + } catch (e) { + logger.debug( + `Could not scan file ${filePath} for tokens: ${getErrorMessage(e)}` + ); + return []; + } +} +async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, logger, depth = 0) { + const MAX_DEPTH = 10; + if (depth > MAX_DEPTH) { + throw new Error( + `Maximum archive extraction depth (${MAX_DEPTH}) reached for ${archivePath}` + ); + } + const result = { + scannedFiles: 0, + findings: [] + }; + try { + const tempExtractDir = fs2.mkdtempSync( + path2.join(extractDir, `extract-${depth}-`) + ); + const fileName = path2.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], { + silent: true + }); + } else if (fileName.endsWith(".tar.zst")) { + logger.debug(`Extracting tar.zst file: ${archivePath}`); + await exec.exec( + "tar", + ["--zstd", "-xf", archivePath, "-C", tempExtractDir], + { + silent: true + } + ); + } else if (fileName.endsWith(".zst")) { + logger.debug(`Extracting zst file: ${archivePath}`); + const outputFile = path2.join( + tempExtractDir, + path2.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 = path2.join( + tempExtractDir, + path2.basename(archivePath, ".gz") + ); + await exec.exec("gunzip", ["-c", archivePath], { + outStream: fs2.createWriteStream(outputFile), + silent: true + }); + } else if (fileName.endsWith(".zip")) { + logger.debug(`Extracting zip file: ${archivePath}`); + await exec.exec( + "unzip", + ["-q", "-o", archivePath, "-d", tempExtractDir], + { + silent: true + } + ); + } + const scanResult = await scanDirectory( + tempExtractDir, + relativeArchivePath, + logger, + depth + 1 + ); + result.scannedFiles += scanResult.scannedFiles; + result.findings.push(...scanResult.findings); + fs2.rmSync(tempExtractDir, { recursive: true, force: true }); + } catch (e) { + logger.debug( + `Could not extract or scan archive file ${archivePath}: ${getErrorMessage(e)}` + ); + } + return result; +} +async function scanFile(fullPath, relativePath, extractDir, logger, depth = 0) { + const result = { + scannedFiles: 1, + findings: [] + }; + const fileName = path2.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( + fullPath, + relativePath, + extractDir, + logger, + depth + ); + result.scannedFiles += archiveResult.scannedFiles; + result.findings.push(...archiveResult.findings); + } + const fileFindings = scanFileForTokens(fullPath, relativePath, logger); + result.findings.push(...fileFindings); + return result; +} +async function scanDirectory(dirPath, baseRelativePath, logger, depth = 0) { + const result = { + scannedFiles: 0, + findings: [] + }; + const entries = fs2.readdirSync(dirPath, { withFileTypes: true }); + for (const entry of entries) { + const fullPath = path2.join(dirPath, entry.name); + const relativePath = path2.join(baseRelativePath, entry.name); + if (entry.isDirectory()) { + const subResult = await scanDirectory( + fullPath, + relativePath, + logger, + depth + ); + result.scannedFiles += subResult.scannedFiles; + result.findings.push(...subResult.findings); + } else if (entry.isFile()) { + const fileResult = await scanFile( + fullPath, + relativePath, + path2.dirname(fullPath), + logger, + depth + ); + result.scannedFiles += fileResult.scannedFiles; + result.findings.push(...fileResult.findings); + } + } + return result; +} +async function scanArtifactsForTokens(filesToScan, logger) { + logger.info( + "Starting best-effort check for potential GitHub tokens in debug artifacts (for testing purposes only)..." + ); + const result = { + scannedFiles: 0, + findings: [] + }; + const tempScanDir = fs2.mkdtempSync(path2.join(os.tmpdir(), "artifact-scan-")); + try { + for (const filePath of filesToScan) { + const stats = fs2.statSync(filePath); + const fileName = path2.basename(filePath); + if (stats.isDirectory()) { + const dirResult = await scanDirectory(filePath, fileName, logger); + result.scannedFiles += dirResult.scannedFiles; + result.findings.push(...dirResult.findings); + } else if (stats.isFile()) { + const fileResult = await scanFile( + filePath, + fileName, + tempScanDir, + logger + ); + result.scannedFiles += fileResult.scannedFiles; + result.findings.push(...fileResult.findings); + } + } + const tokenTypesCounts = /* @__PURE__ */ new Map(); + const filesWithTokens = /* @__PURE__ */ new Set(); + for (const finding of result.findings) { + tokenTypesCounts.set( + finding.tokenType, + (tokenTypesCounts.get(finding.tokenType) || 0) + 1 + ); + filesWithTokens.add(finding.filePath); + } + const tokenTypesSummary = Array.from(tokenTypesCounts.entries()).map(([type2, count]) => `${count} ${type2}${count > 1 ? "s" : ""}`).join(", "); + const baseSummary = `scanned ${result.scannedFiles} files, found ${result.findings.length} potential token(s) in ${filesWithTokens.size} file(s)`; + const summaryWithTypes = tokenTypesSummary ? `${baseSummary} (${tokenTypesSummary})` : baseSummary; + logger.info(`Artifact check complete: ${summaryWithTypes}`); + if (result.findings.length > 0) { + const fileList = Array.from(filesWithTokens).join(", "); + throw new Error( + `Found ${result.findings.length} potential GitHub token(s) (${tokenTypesSummary}) in debug artifacts at: ${fileList}. This is a best-effort check for testing purposes only.` + ); + } + } finally { + try { + fs2.rmSync(tempScanDir, { recursive: true, force: true }); + } catch (e) { + logger.debug( + `Could not clean up temporary scan directory: ${getErrorMessage(e)}` + ); + } + } +} // src/debug-artifacts.ts +function sanitizeArtifactName(name) { + return name.replace(/[^a-zA-Z0-9_-]+/g, ""); +} +function getArtifactSuffix(matrix) { + let suffix = ""; + if (matrix) { + try { + for (const [, matrixVal] of Object.entries( + JSON.parse(matrix) + ).sort()) + suffix += `-${matrixVal}`; + } catch { + core12.info( + "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." + ); + } + } + return suffix; +} +async function uploadArtifacts(logger, toUpload, rootDir, artifactName, ghVariant) { + if (toUpload.length === 0) { + return "no-artifacts-to-upload"; + } + if (isInTestMode()) { + await scanArtifactsForTokens(toUpload, logger); + core12.exportVariable("CODEQL_ACTION_ARTIFACT_SCAN_FINISHED", "true"); + } + const suffix = getArtifactSuffix(getOptionalInput("matrix")); + const artifactUploader = await getArtifactUploaderClient(logger, ghVariant); + try { + await artifactUploader.uploadArtifact( + sanitizeArtifactName(`${artifactName}${suffix}`), + toUpload.map((file) => path3.normalize(file)), + path3.normalize(rootDir), + { + // ensure we don't keep the debug artifacts around for too long since they can be large. + retentionDays: 7 + } + ); + return "upload-successful"; + } catch (e) { + core12.warning(`Failed to upload debug artifacts: ${e}`); + return "upload-failed"; + } +} async function getArtifactUploaderClient(logger, ghVariant) { if (ghVariant === "GitHub Enterprise Server" /* GHES */) { logger.info( @@ -124413,18 +124702,12 @@ async function runWrapper() { } const gitHubVersion = await getGitHubVersion(); checkGitHubVersionInRange(gitHubVersion, logger); - const artifactUploader = await getArtifactUploaderClient( + await uploadArtifacts( logger, - gitHubVersion.type - ); - await artifactUploader.uploadArtifact( - "proxy-log-file", [logFilePath], getTemporaryDirectory(), - { - // ensure we don't keep the debug artifacts around for too long since they can be large. - retentionDays: 7 - } + "proxy-log-file", + gitHubVersion.type ); } } catch (error3) { diff --git a/src/start-proxy-action-post.ts b/src/start-proxy-action-post.ts index 5042d5229f..c1e3209d1b 100644 --- a/src/start-proxy-action-post.ts +++ b/src/start-proxy-action-post.ts @@ -8,7 +8,7 @@ import * as core from "@actions/core"; import * as actionsUtil from "./actions-util"; import { getGitHubVersion } from "./api-client"; import * as configUtils from "./config-utils"; -import { getArtifactUploaderClient } from "./debug-artifacts"; +import { uploadArtifacts } from "./debug-artifacts"; import { getActionsLogger } from "./logging"; import { checkGitHubVersionInRange, getErrorMessage } from "./util"; @@ -44,19 +44,12 @@ async function runWrapper() { const gitHubVersion = await getGitHubVersion(); checkGitHubVersionInRange(gitHubVersion, logger); - const artifactUploader = await getArtifactUploaderClient( + await uploadArtifacts( logger, - gitHubVersion.type, - ); - - await artifactUploader.uploadArtifact( - "proxy-log-file", [logFilePath], actionsUtil.getTemporaryDirectory(), - { - // ensure we don't keep the debug artifacts around for too long since they can be large. - retentionDays: 7, - }, + "proxy-log-file", + gitHubVersion.type, ); } } catch (error) { From 9a57e78a04e55914eadd7e25aac42587e87a4917 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Tue, 20 Jan 2026 13:21:16 +0000 Subject: [PATCH 5/8] Improving sorting of matrix keys --- lib/analyze-action-post.js | 7 +++---- lib/init-action-post.js | 7 +++---- lib/start-proxy-action-post.js | 7 +++---- lib/upload-sarif-action-post.js | 7 +++---- src/debug-artifacts.ts | 7 +++---- 5 files changed, 15 insertions(+), 20 deletions(-) diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index f3a8d8bda8..c30cd53a4d 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -125711,10 +125711,9 @@ function getArtifactSuffix(matrix) { let suffix = ""; if (matrix) { try { - for (const [, matrixVal] of Object.entries( - JSON.parse(matrix) - ).sort()) - suffix += `-${matrixVal}`; + const matrixObject = JSON.parse(matrix); + for (const matrixKey of Object.keys(matrixObject).sort()) + suffix += `-${matrixObject[matrixKey]}`; } catch { core12.info( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 7a9ddd21d1..7deaec1204 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -130434,10 +130434,9 @@ function getArtifactSuffix(matrix) { let suffix = ""; if (matrix) { try { - for (const [, matrixVal] of Object.entries( - JSON.parse(matrix) - ).sort()) - suffix += `-${matrixVal}`; + const matrixObject = JSON.parse(matrix); + for (const matrixKey of Object.keys(matrixObject).sort()) + suffix += `-${matrixObject[matrixKey]}`; } catch { core12.info( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index d581716db1..122c056afe 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -124624,10 +124624,9 @@ function getArtifactSuffix(matrix) { let suffix = ""; if (matrix) { try { - for (const [, matrixVal] of Object.entries( - JSON.parse(matrix) - ).sort()) - suffix += `-${matrixVal}`; + const matrixObject = JSON.parse(matrix); + for (const matrixKey of Object.keys(matrixObject).sort()) + suffix += `-${matrixObject[matrixKey]}`; } catch { core12.info( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index 5464582543..1a369d7796 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -124646,10 +124646,9 @@ function getArtifactSuffix(matrix) { let suffix = ""; if (matrix) { try { - for (const [, matrixVal] of Object.entries( - JSON.parse(matrix) - ).sort()) - suffix += `-${matrixVal}`; + const matrixObject = JSON.parse(matrix); + for (const matrixKey of Object.keys(matrixObject).sort()) + suffix += `-${matrixObject[matrixKey]}`; } catch { core12.info( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." diff --git a/src/debug-artifacts.ts b/src/debug-artifacts.ts index 3d5d45e943..66b2debce7 100644 --- a/src/debug-artifacts.ts +++ b/src/debug-artifacts.ts @@ -260,10 +260,9 @@ export function getArtifactSuffix(matrix: string | undefined): string { let suffix = ""; if (matrix) { try { - for (const [, matrixVal] of Object.entries( - JSON.parse(matrix) as any[][], - ).sort()) - suffix += `-${matrixVal}`; + const matrixObject = JSON.parse(matrix) as any[][]; + for (const matrixKey of Object.keys(matrixObject).sort()) + suffix += `-${matrixObject[matrixKey]}`; } catch { core.info( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input.", From 1ac62705ed88e2025d9aaef131e0997f0897fd70 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Tue, 20 Jan 2026 13:25:25 +0000 Subject: [PATCH 6/8] Change log message to warning --- lib/analyze-action-post.js | 2 +- lib/init-action-post.js | 2 +- lib/start-proxy-action-post.js | 2 +- lib/upload-sarif-action-post.js | 2 +- src/debug-artifacts.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index c30cd53a4d..e854787df5 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -125715,7 +125715,7 @@ function getArtifactSuffix(matrix) { for (const matrixKey of Object.keys(matrixObject).sort()) suffix += `-${matrixObject[matrixKey]}`; } catch { - core12.info( + core12.warning( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." ); } diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 7deaec1204..72602bd7f6 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -130438,7 +130438,7 @@ function getArtifactSuffix(matrix) { for (const matrixKey of Object.keys(matrixObject).sort()) suffix += `-${matrixObject[matrixKey]}`; } catch { - core12.info( + core12.warning( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." ); } diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index 122c056afe..e0991d45a7 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -124628,7 +124628,7 @@ function getArtifactSuffix(matrix) { for (const matrixKey of Object.keys(matrixObject).sort()) suffix += `-${matrixObject[matrixKey]}`; } catch { - core12.info( + core12.warning( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." ); } diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index 1a369d7796..6977c55512 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -124650,7 +124650,7 @@ function getArtifactSuffix(matrix) { for (const matrixKey of Object.keys(matrixObject).sort()) suffix += `-${matrixObject[matrixKey]}`; } catch { - core12.info( + core12.warning( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." ); } diff --git a/src/debug-artifacts.ts b/src/debug-artifacts.ts index 66b2debce7..49de70c0e2 100644 --- a/src/debug-artifacts.ts +++ b/src/debug-artifacts.ts @@ -264,7 +264,7 @@ export function getArtifactSuffix(matrix: string | undefined): string { for (const matrixKey of Object.keys(matrixObject).sort()) suffix += `-${matrixObject[matrixKey]}`; } catch { - core.info( + core.warning( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input.", ); } From 9483bd5a7f06c2052f14956d210101a0632de383 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Tue, 20 Jan 2026 13:51:59 +0000 Subject: [PATCH 7/8] Check that `matrixObject` is an object --- lib/analyze-action-post.js | 8 ++++++-- lib/init-action-post.js | 8 ++++++-- lib/start-proxy-action-post.js | 8 ++++++-- lib/upload-sarif-action-post.js | 8 ++++++-- src/debug-artifacts.test.ts | 3 +++ src/debug-artifacts.ts | 10 +++++++--- 6 files changed, 34 insertions(+), 11 deletions(-) diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index e854787df5..ab2b7c3474 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -125712,8 +125712,12 @@ function getArtifactSuffix(matrix) { if (matrix) { try { const matrixObject = JSON.parse(matrix); - for (const matrixKey of Object.keys(matrixObject).sort()) - suffix += `-${matrixObject[matrixKey]}`; + if (matrixObject !== null && typeof matrixObject === "object") { + for (const matrixKey of Object.keys(matrixObject).sort()) + suffix += `-${matrixObject[matrixKey]}`; + } else { + core12.warning("User-specified `matrix` input is not an object."); + } } catch { core12.warning( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 72602bd7f6..16eecf480e 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -130435,8 +130435,12 @@ function getArtifactSuffix(matrix) { if (matrix) { try { const matrixObject = JSON.parse(matrix); - for (const matrixKey of Object.keys(matrixObject).sort()) - suffix += `-${matrixObject[matrixKey]}`; + if (matrixObject !== null && typeof matrixObject === "object") { + for (const matrixKey of Object.keys(matrixObject).sort()) + suffix += `-${matrixObject[matrixKey]}`; + } else { + core12.warning("User-specified `matrix` input is not an object."); + } } catch { core12.warning( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index e0991d45a7..50ce9f34d8 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -124625,8 +124625,12 @@ function getArtifactSuffix(matrix) { if (matrix) { try { const matrixObject = JSON.parse(matrix); - for (const matrixKey of Object.keys(matrixObject).sort()) - suffix += `-${matrixObject[matrixKey]}`; + if (matrixObject !== null && typeof matrixObject === "object") { + for (const matrixKey of Object.keys(matrixObject).sort()) + suffix += `-${matrixObject[matrixKey]}`; + } else { + core12.warning("User-specified `matrix` input is not an object."); + } } catch { core12.warning( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index 6977c55512..fe3d597b7d 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -124647,8 +124647,12 @@ function getArtifactSuffix(matrix) { if (matrix) { try { const matrixObject = JSON.parse(matrix); - for (const matrixKey of Object.keys(matrixObject).sort()) - suffix += `-${matrixObject[matrixKey]}`; + if (matrixObject !== null && typeof matrixObject === "object") { + for (const matrixKey of Object.keys(matrixObject).sort()) + suffix += `-${matrixObject[matrixKey]}`; + } else { + core12.warning("User-specified `matrix` input is not an object."); + } } catch { core12.warning( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." diff --git a/src/debug-artifacts.test.ts b/src/debug-artifacts.test.ts index a2a994d258..99989828bb 100644 --- a/src/debug-artifacts.test.ts +++ b/src/debug-artifacts.test.ts @@ -30,6 +30,9 @@ test("getArtifactSuffix", (t) => { t.is(debugArtifacts.getArtifactSuffix(""), ""); t.is(debugArtifacts.getArtifactSuffix("invalid json"), ""); t.is(debugArtifacts.getArtifactSuffix("{}"), ""); + t.is(debugArtifacts.getArtifactSuffix("null"), ""); + t.is(debugArtifacts.getArtifactSuffix("123"), ""); + t.is(debugArtifacts.getArtifactSuffix('"string"'), ""); // Suffixes for non-empty, valid `matrix` inputs. const testMatrices = [ diff --git a/src/debug-artifacts.ts b/src/debug-artifacts.ts index 49de70c0e2..769c5447c1 100644 --- a/src/debug-artifacts.ts +++ b/src/debug-artifacts.ts @@ -260,9 +260,13 @@ export function getArtifactSuffix(matrix: string | undefined): string { let suffix = ""; if (matrix) { try { - const matrixObject = JSON.parse(matrix) as any[][]; - for (const matrixKey of Object.keys(matrixObject).sort()) - suffix += `-${matrixObject[matrixKey]}`; + const matrixObject = JSON.parse(matrix); + if (matrixObject !== null && typeof matrixObject === "object") { + for (const matrixKey of Object.keys(matrixObject as object).sort()) + suffix += `-${matrixObject[matrixKey]}`; + } else { + core.warning("User-specified `matrix` input is not an object."); + } } catch { core.warning( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input.", From 1df1c9f85d02cb0f916a36c67eb5d267590fd71e Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Tue, 20 Jan 2026 13:55:25 +0000 Subject: [PATCH 8/8] Include expected suffixes in test --- src/debug-artifacts.test.ts | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/debug-artifacts.test.ts b/src/debug-artifacts.test.ts index 99989828bb..370816aef5 100644 --- a/src/debug-artifacts.test.ts +++ b/src/debug-artifacts.test.ts @@ -36,17 +36,22 @@ test("getArtifactSuffix", (t) => { // Suffixes for non-empty, valid `matrix` inputs. const testMatrices = [ - { language: "go" }, - { language: "javascript", "build-mode": "none" }, + { matrix: { language: "go" }, expected: "-go" }, + { + matrix: { language: "javascript", "build-mode": "none" }, + expected: "-none-javascript", + }, + { + matrix: { "build-mode": "none", language: "javascript" }, + expected: "-none-javascript", + }, ]; for (const testMatrix of testMatrices) { - const suffix = debugArtifacts.getArtifactSuffix(JSON.stringify(testMatrix)); - t.not(suffix, ""); - - for (const key of Object.keys(testMatrix)) { - t.assert(suffix.includes(testMatrix[key] as string)); - } + const suffix = debugArtifacts.getArtifactSuffix( + JSON.stringify(testMatrix.matrix), + ); + t.is(suffix, testMatrix.expected); } });