diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index 2d4b62dde9..3ce175850a 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -92776,7 +92776,7 @@ var require_cacheHttpClient = __commonJS({ exports2.getCacheEntry = getCacheEntry; exports2.downloadCache = downloadCache; exports2.reserveCache = reserveCache; - exports2.saveCache = saveCache4; + exports2.saveCache = saveCache5; var core14 = __importStar2(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); @@ -92953,7 +92953,7 @@ Other caches with similar key:`); })); }); } - function saveCache4(cacheId, archivePath, signedUploadURL, options) { + function saveCache5(cacheId, archivePath, signedUploadURL, options) { return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { @@ -98453,8 +98453,8 @@ var require_cache5 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; exports2.isFeatureAvailable = isFeatureAvailable; - exports2.restoreCache = restoreCache4; - exports2.saveCache = saveCache4; + exports2.restoreCache = restoreCache5; + exports2.saveCache = saveCache5; var core14 = __importStar2(require_core()); var path7 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); @@ -98511,7 +98511,7 @@ var require_cache5 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - function restoreCache4(paths_1, primaryKey_1, restoreKeys_1, options_1) { + function restoreCache5(paths_1, primaryKey_1, restoreKeys_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); @@ -98655,7 +98655,7 @@ var require_cache5 = __commonJS({ return void 0; }); } - function saveCache4(paths_1, key_1, options_1) { + function saveCache5(paths_1, key_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); @@ -161273,7 +161273,7 @@ function withGroup(groupName, f) { // src/feature-flags.ts var semver5 = __toESM(require_semver2()); -// src/overlay-database-utils.ts +// src/overlay/index.ts var fs2 = __toESM(require("fs")); var path2 = __toESM(require("path")); var actionsCache = __toESM(require_cache5()); @@ -161443,7 +161443,7 @@ async function isAnalyzingDefaultBranch() { return currentRef === defaultBranch; } -// src/overlay-database-utils.ts +// src/overlay/index.ts var CODEQL_OVERLAY_MINIMUM_VERSION = "2.23.8"; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 7500; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6; @@ -161657,6 +161657,16 @@ var featureConfig = { envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_CSHARP", minimumVersion: void 0 }, + ["overlay_analysis_status_check" /* OverlayAnalysisStatusCheck */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_CHECK", + minimumVersion: void 0 + }, + ["overlay_analysis_status_save" /* OverlayAnalysisStatusSave */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_SAVE", + minimumVersion: void 0 + }, ["overlay_analysis_go" /* OverlayAnalysisGo */]: { defaultValue: false, envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_GO", @@ -161741,9 +161751,12 @@ var featureConfig = { } }; -// src/trap-caching.ts +// src/overlay/status.ts var actionsCache2 = __toESM(require_cache5()); +// src/trap-caching.ts +var actionsCache3 = __toESM(require_cache5()); + // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES = OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB * 1e6; @@ -162164,14 +162177,18 @@ ${output}` await runCli(cmd, codeqlArgs); } }, - async databaseBundle(databasePath, outputFilePath, databaseName, alsoIncludeRelativePaths) { + async databaseBundle(databasePath, outputFilePath, databaseName, includeDiagnostics, alsoIncludeRelativePaths) { + const includeDiagnosticsArgs = includeDiagnostics ? ["--include-diagnostics"] : []; const args = [ "database", "bundle", databasePath, `--output=${outputFilePath}`, `--name=${databaseName}`, - ...getExtraOptionsFromEnv(["database", "bundle"]) + ...includeDiagnosticsArgs, + ...getExtraOptionsFromEnv(["database", "bundle"], { + ignoringOptions: includeDiagnosticsArgs + }) ]; if (await this.supportsFeature("bundleSupportsIncludeOption" /* BundleSupportsIncludeOption */)) { args.push( @@ -162429,7 +162446,7 @@ var core11 = __toESM(require_core()); // src/dependency-caching.ts var import_path = require("path"); -var actionsCache3 = __toESM(require_cache5()); +var actionsCache4 = __toESM(require_cache5()); var glob = __toESM(require_glob()); function getJavaTempDependencyDir() { return (0, import_path.join)(getTemporaryDirectory(), "codeql_java", "repository"); diff --git a/lib/analyze-action.js b/lib/analyze-action.js index 0dfc19a91a..3006d65f33 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -92776,7 +92776,7 @@ var require_cacheHttpClient = __commonJS({ exports2.getCacheEntry = getCacheEntry; exports2.downloadCache = downloadCache; exports2.reserveCache = reserveCache; - exports2.saveCache = saveCache4; + exports2.saveCache = saveCache5; var core15 = __importStar2(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); @@ -92953,7 +92953,7 @@ Other caches with similar key:`); })); }); } - function saveCache4(cacheId, archivePath, signedUploadURL, options) { + function saveCache5(cacheId, archivePath, signedUploadURL, options) { return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { @@ -98453,8 +98453,8 @@ var require_cache5 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; exports2.isFeatureAvailable = isFeatureAvailable; - exports2.restoreCache = restoreCache4; - exports2.saveCache = saveCache4; + exports2.restoreCache = restoreCache5; + exports2.saveCache = saveCache5; var core15 = __importStar2(require_core()); var path16 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); @@ -98511,7 +98511,7 @@ var require_cache5 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - function restoreCache4(paths_1, primaryKey_1, restoreKeys_1, options_1) { + function restoreCache5(paths_1, primaryKey_1, restoreKeys_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core15.debug(`Cache service version: ${cacheServiceVersion}`); @@ -98655,7 +98655,7 @@ var require_cache5 = __commonJS({ return void 0; }); } - function saveCache4(paths_1, key_1, options_1) { + function saveCache5(paths_1, key_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core15.debug(`Cache service version: ${cacheServiceVersion}`); @@ -106084,7 +106084,7 @@ async function codeQlVersionAtLeast(codeql, requiredVersion) { function getBaseDatabaseOidsFilePath(config) { return path.join(config.dbLocation, BASE_DATABASE_OIDS_FILE_NAME); } -async function bundleDb(config, language, codeql, dbName) { +async function bundleDb(config, language, codeql, dbName, { includeDiagnostics }) { const databasePath = getCodeQLDatabasePath(config, language); const databaseBundlePath = path.resolve(config.dbLocation, `${dbName}.zip`); if (fs.existsSync(databaseBundlePath)) { @@ -106103,6 +106103,7 @@ async function bundleDb(config, language, codeql, dbName) { databasePath, databaseBundlePath, dbName, + includeDiagnostics, additionalFiles ); return databaseBundlePath; @@ -107220,7 +107221,7 @@ var semver5 = __toESM(require_semver2()); var bundleVersion = "codeql-bundle-v2.24.1"; var cliVersion = "2.24.1"; -// src/overlay-database-utils.ts +// src/overlay/index.ts var fs3 = __toESM(require("fs")); var path4 = __toESM(require("path")); var actionsCache = __toESM(require_cache5()); @@ -107424,7 +107425,7 @@ async function isAnalyzingDefaultBranch() { return currentRef === defaultBranch; } -// src/overlay-database-utils.ts +// src/overlay/index.ts var CODEQL_OVERLAY_MINIMUM_VERSION = "2.23.8"; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 7500; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6; @@ -107772,6 +107773,16 @@ var featureConfig = { envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_CSHARP", minimumVersion: void 0 }, + ["overlay_analysis_status_check" /* OverlayAnalysisStatusCheck */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_CHECK", + minimumVersion: void 0 + }, + ["overlay_analysis_status_save" /* OverlayAnalysisStatusSave */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_SAVE", + minimumVersion: void 0 + }, ["overlay_analysis_go" /* OverlayAnalysisGo */]: { defaultValue: false, envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_GO", @@ -108293,8 +108304,11 @@ function getDiffRanges(fileDiff, logger) { return diffRanges; } -// src/trap-caching.ts +// src/overlay/status.ts var actionsCache2 = __toESM(require_cache5()); + +// src/trap-caching.ts +var actionsCache3 = __toESM(require_cache5()); var CACHE_VERSION2 = 1; var CODEQL_TRAP_CACHE_PREFIX = "codeql-trap"; var MINIMUM_CACHE_MB_TO_UPLOAD = 10; @@ -108325,7 +108339,7 @@ async function uploadTrapCaches(codeql, config, logger) { logger.info(`Uploading TRAP cache to Actions cache with key ${key}`); await waitForResultWithTimeLimit( MAX_CACHE_OPERATION_MS2, - actionsCache2.saveCache([cacheDir], key), + actionsCache3.saveCache([cacheDir], key), () => { logger.info( `Timed out waiting for TRAP cache for ${language} to upload, will continue without uploading` @@ -109857,14 +109871,18 @@ ${output}` await runCli(cmd, codeqlArgs); } }, - async databaseBundle(databasePath, outputFilePath, databaseName, alsoIncludeRelativePaths) { + async databaseBundle(databasePath, outputFilePath, databaseName, includeDiagnostics, alsoIncludeRelativePaths) { + const includeDiagnosticsArgs = includeDiagnostics ? ["--include-diagnostics"] : []; const args = [ "database", "bundle", databasePath, `--output=${outputFilePath}`, `--name=${databaseName}`, - ...getExtraOptionsFromEnv(["database", "bundle"]) + ...includeDiagnosticsArgs, + ...getExtraOptionsFromEnv(["database", "bundle"], { + ignoringOptions: includeDiagnosticsArgs + }) ]; if (await this.supportsFeature("bundleSupportsIncludeOption" /* BundleSupportsIncludeOption */)) { args.push( @@ -110155,7 +110173,7 @@ async function runAutobuild(config, language, logger) { // src/dependency-caching.ts var os3 = __toESM(require("os")); var import_path2 = require("path"); -var actionsCache3 = __toESM(require_cache5()); +var actionsCache4 = __toESM(require_cache5()); var glob = __toESM(require_glob()); var CODEQL_DEPENDENCY_CACHE_PREFIX = "codeql-dependencies"; var CODEQL_DEPENDENCY_CACHE_VERSION = 1; @@ -110293,7 +110311,7 @@ async function uploadDependencyCaches(codeql, features, config, logger) { ); try { const start = performance.now(); - await actionsCache3.saveCache( + await actionsCache4.saveCache( await cacheConfig.getDependencyPaths(codeql, features), key ); @@ -110305,7 +110323,7 @@ async function uploadDependencyCaches(codeql, features, config, logger) { upload_duration_ms }); } catch (error3) { - if (error3 instanceof actionsCache3.ReserveCacheError) { + if (error3 instanceof actionsCache4.ReserveCacheError) { logger.info( `Not uploading cache for ${language}, because ${key} is already in use.` ); @@ -110773,7 +110791,9 @@ async function cleanupAndUploadDatabases(repositoryNwo, codeql, config, apiDetai for (const language of config.languages) { let bundledDbSize = void 0; try { - const bundledDb = await bundleDb(config, language, codeql, language); + const bundledDb = await bundleDb(config, language, codeql, language, { + includeDiagnostics: false + }); bundledDbSize = fs13.statSync(bundledDb).size; const bundledDbReadStream = fs13.createReadStream(bundledDb); const commitOid = await getCommitOid( @@ -112114,7 +112134,7 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) { } async function addFingerprints(sarif, sourceRoot, logger) { logger.info( - `Adding fingerprints to SARIF file. See ${"https://docs.github.com/en/enterprise-cloud@latest/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#providing-data-to-track-code-scanning-alerts-across-runs" /* TRACK_CODE_SCANNING_ALERTS_ACROSS_RUNS */} for more information.` + `Adding fingerprints to SARIF file. See ${"https://docs.github.com/en/code-security/reference/code-scanning/sarif-support-for-code-scanning#data-for-preventing-duplicated-alerts" /* TRACK_CODE_SCANNING_ALERTS_ACROSS_RUNS */} for more information.` ); const callbacksByFile = {}; for (const run2 of sarif.runs || []) { diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index a691af63b9..393400ab29 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -92776,7 +92776,7 @@ var require_cacheHttpClient = __commonJS({ exports2.getCacheEntry = getCacheEntry; exports2.downloadCache = downloadCache; exports2.reserveCache = reserveCache; - exports2.saveCache = saveCache3; + exports2.saveCache = saveCache4; var core14 = __importStar2(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); @@ -92953,7 +92953,7 @@ Other caches with similar key:`); })); }); } - function saveCache3(cacheId, archivePath, signedUploadURL, options) { + function saveCache4(cacheId, archivePath, signedUploadURL, options) { return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { @@ -98453,8 +98453,8 @@ var require_cache5 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; exports2.isFeatureAvailable = isFeatureAvailable; - exports2.restoreCache = restoreCache3; - exports2.saveCache = saveCache3; + exports2.restoreCache = restoreCache4; + exports2.saveCache = saveCache4; var core14 = __importStar2(require_core()); var path7 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); @@ -98511,7 +98511,7 @@ var require_cache5 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - function restoreCache3(paths_1, primaryKey_1, restoreKeys_1, options_1) { + function restoreCache4(paths_1, primaryKey_1, restoreKeys_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); @@ -98655,7 +98655,7 @@ var require_cache5 = __commonJS({ return void 0; }); } - function saveCache3(paths_1, key_1, options_1) { + function saveCache4(paths_1, key_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); @@ -103680,7 +103680,7 @@ var semver5 = __toESM(require_semver2()); var bundleVersion = "codeql-bundle-v2.24.1"; var cliVersion = "2.24.1"; -// src/overlay-database-utils.ts +// src/overlay/index.ts var fs2 = __toESM(require("fs")); var path2 = __toESM(require("path")); var actionsCache = __toESM(require_cache5()); @@ -103850,7 +103850,7 @@ async function isAnalyzingDefaultBranch() { return currentRef === defaultBranch; } -// src/overlay-database-utils.ts +// src/overlay/index.ts var CODEQL_OVERLAY_MINIMUM_VERSION = "2.23.8"; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 7500; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6; @@ -104062,6 +104062,16 @@ var featureConfig = { envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_CSHARP", minimumVersion: void 0 }, + ["overlay_analysis_status_check" /* OverlayAnalysisStatusCheck */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_CHECK", + minimumVersion: void 0 + }, + ["overlay_analysis_status_save" /* OverlayAnalysisStatusSave */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_SAVE", + minimumVersion: void 0 + }, ["overlay_analysis_go" /* OverlayAnalysisGo */]: { defaultValue: false, envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_GO", @@ -104429,9 +104439,12 @@ function supportsFeatureFlags(githubVariant) { return githubVariant === "GitHub.com" /* DOTCOM */ || githubVariant === "GitHub Enterprise Cloud with data residency" /* GHEC_DR */; } -// src/trap-caching.ts +// src/overlay/status.ts var actionsCache2 = __toESM(require_cache5()); +// src/trap-caching.ts +var actionsCache3 = __toESM(require_cache5()); + // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES = OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB * 1e6; @@ -104885,14 +104898,18 @@ ${output}` await runCli(cmd, codeqlArgs); } }, - async databaseBundle(databasePath, outputFilePath, databaseName, alsoIncludeRelativePaths) { + async databaseBundle(databasePath, outputFilePath, databaseName, includeDiagnostics, alsoIncludeRelativePaths) { + const includeDiagnosticsArgs = includeDiagnostics ? ["--include-diagnostics"] : []; const args = [ "database", "bundle", databasePath, `--output=${outputFilePath}`, `--name=${databaseName}`, - ...getExtraOptionsFromEnv(["database", "bundle"]) + ...includeDiagnosticsArgs, + ...getExtraOptionsFromEnv(["database", "bundle"], { + ignoringOptions: includeDiagnosticsArgs + }) ]; if (await this.supportsFeature("bundleSupportsIncludeOption" /* BundleSupportsIncludeOption */)) { args.push( diff --git a/lib/init-action-post.js b/lib/init-action-post.js index fcc3d147a5..3c2a85e926 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -204,7 +204,7 @@ var require_file_command = __commonJS({ exports2.issueFileCommand = issueFileCommand; exports2.prepareKeyValueMessage = prepareKeyValueMessage; var crypto2 = __importStar2(require("crypto")); - var fs18 = __importStar2(require("fs")); + var fs19 = __importStar2(require("fs")); var os4 = __importStar2(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { @@ -212,10 +212,10 @@ var require_file_command = __commonJS({ if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); } - if (!fs18.existsSync(filePath)) { + if (!fs19.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs18.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os4.EOL}`, { + fs19.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os4.EOL}`, { encoding: "utf8" }); } @@ -1337,14 +1337,14 @@ var require_util = __commonJS({ } const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; let origin = url2.origin != null ? url2.origin : `${url2.protocol || ""}//${url2.hostname || ""}:${port}`; - let path17 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path18 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path17 && path17[0] !== "/") { - path17 = `/${path17}`; + if (path18 && path18[0] !== "/") { + path18 = `/${path18}`; } - return new URL(`${origin}${path17}`); + return new URL(`${origin}${path18}`); } if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); @@ -1795,39 +1795,39 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path17, origin } + request: { method, path: path18, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path17); + debuglog("sending request to %s %s/%s", method, origin, path18); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path17, origin }, + request: { method, path: path18, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path17, + path18, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path17, origin } + request: { method, path: path18, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path17); + debuglog("trailers received from %s %s/%s", method, origin, path18); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path17, origin }, + request: { method, path: path18, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path17, + path18, error3.message ); }); @@ -1876,9 +1876,9 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path17, origin } + request: { method, path: path18, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path17); + debuglog("sending request to %s %s/%s", method, origin, path18); }); } diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { @@ -1941,7 +1941,7 @@ var require_request = __commonJS({ var kHandler = /* @__PURE__ */ Symbol("handler"); var Request = class { constructor(origin, { - path: path17, + path: path18, method, body, headers, @@ -1956,11 +1956,11 @@ var require_request = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path17 !== "string") { + if (typeof path18 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path17[0] !== "/" && !(path17.startsWith("http://") || path17.startsWith("https://")) && method !== "CONNECT") { + } else if (path18[0] !== "/" && !(path18.startsWith("http://") || path18.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path17)) { + } else if (invalidPathRegex.test(path18)) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -2023,7 +2023,7 @@ var require_request = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? buildURL(path17, query) : path17; + this.path = query ? buildURL(path18, query) : path18; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -6536,7 +6536,7 @@ var require_client_h1 = __commonJS({ return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } function writeH1(client, request2) { - const { method, path: path17, host, upgrade, blocking, reset } = request2; + const { method, path: path18, host, upgrade, blocking, reset } = request2; let { body, headers, contentLength } = request2; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; if (util.isFormDataLike(body)) { @@ -6602,7 +6602,7 @@ var require_client_h1 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path17} HTTP/1.1\r + let header = `${method} ${path18} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -7128,7 +7128,7 @@ var require_client_h2 = __commonJS({ } function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path: path17, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path18, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; let { body } = request2; if (upgrade) { util.errorRequest(client, request2, new Error("Upgrade not supported for H2")); @@ -7195,7 +7195,7 @@ var require_client_h2 = __commonJS({ }); return true; } - headers[HTTP2_HEADER_PATH] = path17; + headers[HTTP2_HEADER_PATH] = path18; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -7548,9 +7548,9 @@ var require_redirect_handler = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path17 = search ? `${pathname}${search}` : pathname; + const path18 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path17; + this.opts.path = path18; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -8784,10 +8784,10 @@ var require_proxy_agent = __commonJS({ }; const { origin, - path: path17 = "/", + path: path18 = "/", headers = {} } = opts; - opts.path = origin + path17; + opts.path = origin + path18; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -10708,20 +10708,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path17) { - if (typeof path17 !== "string") { - return path17; + function safeUrl(path18) { + if (typeof path18 !== "string") { + return path18; } - const pathSegments = path17.split("?"); + const pathSegments = path18.split("?"); if (pathSegments.length !== 2) { - return path17; + return path18; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path17, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path17); + function matchKey(mockDispatch2, { path: path18, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path18); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -10743,7 +10743,7 @@ var require_mock_utils = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path17 }) => matchValue(safeUrl(path17), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path18 }) => matchValue(safeUrl(path18), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -10781,9 +10781,9 @@ var require_mock_utils = __commonJS({ } } function buildKey(opts) { - const { path: path17, method, body, headers, query } = opts; + const { path: path18, method, body, headers, query } = opts; return { - path: path17, + path: path18, method, body, headers, @@ -11246,10 +11246,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path17, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path18, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path17, + Path: path18, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -16130,9 +16130,9 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path17) { - for (let i = 0; i < path17.length; ++i) { - const code = path17.charCodeAt(i); + function validateCookiePath(path18) { + for (let i = 0; i < path18.length; ++i) { + const code = path18.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -18726,11 +18726,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path17 = opts.path; + let path18 = opts.path; if (!opts.path.startsWith("/")) { - path17 = `/${path17}`; + path18 = `/${path18}`; } - url2 = new URL(util.parseOrigin(url2).origin + path17); + url2 = new URL(util.parseOrigin(url2).origin + path18); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -20033,7 +20033,7 @@ var require_path_utils = __commonJS({ exports2.toPosixPath = toPosixPath; exports2.toWin32Path = toWin32Path; exports2.toPlatformPath = toPlatformPath; - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -20041,7 +20041,7 @@ var require_path_utils = __commonJS({ return pth.replace(/[/]/g, "\\"); } function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path17.sep); + return pth.replace(/[/\\]/g, path18.sep); } } }); @@ -20123,13 +20123,13 @@ var require_io_util = __commonJS({ exports2.isRooted = isRooted; exports2.tryGetExecutablePath = tryGetExecutablePath; exports2.getCmdPath = getCmdPath; - var fs18 = __importStar2(require("fs")); - var path17 = __importStar2(require("path")); - _a = fs18.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + var fs19 = __importStar2(require("fs")); + var path18 = __importStar2(require("path")); + _a = fs19.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 fs18.promises.readlink(fsPath); + const result = yield fs19.promises.readlink(fsPath); if (exports2.IS_WINDOWS && !result.endsWith("\\")) { return `${result}\\`; } @@ -20137,7 +20137,7 @@ var require_io_util = __commonJS({ }); } exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs18.constants.O_RDONLY; + exports2.READONLY = fs19.constants.O_RDONLY; function exists(fsPath) { return __awaiter2(this, void 0, void 0, function* () { try { @@ -20179,7 +20179,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path17.extname(filePath).toUpperCase(); + const upperExt = path18.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -20203,11 +20203,11 @@ var require_io_util = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path17.dirname(filePath); - const upperName = path17.basename(filePath).toUpperCase(); + const directory = path18.dirname(filePath); + const upperName = path18.basename(filePath).toUpperCase(); for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path17.join(directory, actualName); + filePath = path18.join(directory, actualName); break; } } @@ -20319,7 +20319,7 @@ var require_io = __commonJS({ exports2.which = which7; exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var ioUtil = __importStar2(require_io_util()); function cp(source_1, dest_1) { return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { @@ -20328,7 +20328,7 @@ var require_io = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path17.join(dest, path17.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path18.join(dest, path18.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -20340,7 +20340,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path17.relative(source, newDest) === "") { + if (path18.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile2(source, newDest, force); @@ -20352,7 +20352,7 @@ var require_io = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path17.join(dest, path17.basename(source)); + dest = path18.join(dest, path18.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -20363,7 +20363,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path17.dirname(dest)); + yield mkdirP(path18.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -20422,7 +20422,7 @@ var require_io = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path17.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path18.delimiter)) { if (extension) { extensions.push(extension); } @@ -20435,12 +20435,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path17.sep)) { + if (tool.includes(path18.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path17.delimiter)) { + for (const p of process.env.PATH.split(path18.delimiter)) { if (p) { directories.push(p); } @@ -20448,7 +20448,7 @@ var require_io = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path17.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path18.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -20578,7 +20578,7 @@ var require_toolrunner = __commonJS({ var os4 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var io7 = __importStar2(require_io()); var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); @@ -20793,7 +20793,7 @@ var require_toolrunner = __commonJS({ exec() { return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { - this.toolPath = path17.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path18.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io7.which(this.toolPath, true); return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { @@ -21346,7 +21346,7 @@ var require_core = __commonJS({ var file_command_1 = require_file_command(); var utils_1 = require_utils(); var os4 = __importStar2(require("os")); - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -21372,7 +21372,7 @@ var require_core = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path17.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path18.delimiter}${process.env["PATH"]}`; } function getInput2(name, options) { const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; @@ -21509,8 +21509,8 @@ var require_context = __commonJS({ if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); } else { - const path17 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path17} does not exist${os_1.EOL}`); + const path18 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path18} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -22335,14 +22335,14 @@ var require_util9 = __commonJS({ } const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; let origin = url2.origin != null ? url2.origin : `${url2.protocol || ""}//${url2.hostname || ""}:${port}`; - let path17 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path18 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path17 && path17[0] !== "/") { - path17 = `/${path17}`; + if (path18 && path18[0] !== "/") { + path18 = `/${path18}`; } - return new URL(`${origin}${path17}`); + return new URL(`${origin}${path18}`); } if (!isHttpOrHttpsPrefixed(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); @@ -22793,39 +22793,39 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path17, origin } + request: { method, path: path18, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path17); + debuglog("sending request to %s %s/%s", method, origin, path18); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path17, origin }, + request: { method, path: path18, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path17, + path18, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path17, origin } + request: { method, path: path18, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path17); + debuglog("trailers received from %s %s/%s", method, origin, path18); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path17, origin }, + request: { method, path: path18, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path17, + path18, error3.message ); }); @@ -22874,9 +22874,9 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path17, origin } + request: { method, path: path18, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path17); + debuglog("sending request to %s %s/%s", method, origin, path18); }); } diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { @@ -22939,7 +22939,7 @@ var require_request3 = __commonJS({ var kHandler = /* @__PURE__ */ Symbol("handler"); var Request = class { constructor(origin, { - path: path17, + path: path18, method, body, headers, @@ -22954,11 +22954,11 @@ var require_request3 = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path17 !== "string") { + if (typeof path18 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path17[0] !== "/" && !(path17.startsWith("http://") || path17.startsWith("https://")) && method !== "CONNECT") { + } else if (path18[0] !== "/" && !(path18.startsWith("http://") || path18.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path17)) { + } else if (invalidPathRegex.test(path18)) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -23021,7 +23021,7 @@ var require_request3 = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? buildURL(path17, query) : path17; + this.path = query ? buildURL(path18, query) : path18; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -27534,7 +27534,7 @@ var require_client_h12 = __commonJS({ return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } function writeH1(client, request2) { - const { method, path: path17, host, upgrade, blocking, reset } = request2; + const { method, path: path18, host, upgrade, blocking, reset } = request2; let { body, headers, contentLength } = request2; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; if (util.isFormDataLike(body)) { @@ -27600,7 +27600,7 @@ var require_client_h12 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path17} HTTP/1.1\r + let header = `${method} ${path18} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -28126,7 +28126,7 @@ var require_client_h22 = __commonJS({ } function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path: path17, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path18, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; let { body } = request2; if (upgrade) { util.errorRequest(client, request2, new Error("Upgrade not supported for H2")); @@ -28193,7 +28193,7 @@ var require_client_h22 = __commonJS({ }); return true; } - headers[HTTP2_HEADER_PATH] = path17; + headers[HTTP2_HEADER_PATH] = path18; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -28546,9 +28546,9 @@ var require_redirect_handler2 = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path17 = search ? `${pathname}${search}` : pathname; + const path18 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path17; + this.opts.path = path18; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -29782,10 +29782,10 @@ var require_proxy_agent2 = __commonJS({ }; const { origin, - path: path17 = "/", + path: path18 = "/", headers = {} } = opts; - opts.path = origin + path17; + opts.path = origin + path18; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -31706,20 +31706,20 @@ var require_mock_utils2 = __commonJS({ } return true; } - function safeUrl(path17) { - if (typeof path17 !== "string") { - return path17; + function safeUrl(path18) { + if (typeof path18 !== "string") { + return path18; } - const pathSegments = path17.split("?"); + const pathSegments = path18.split("?"); if (pathSegments.length !== 2) { - return path17; + return path18; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path17, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path17); + function matchKey(mockDispatch2, { path: path18, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path18); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -31741,7 +31741,7 @@ var require_mock_utils2 = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path17 }) => matchValue(safeUrl(path17), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path18 }) => matchValue(safeUrl(path18), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -31779,9 +31779,9 @@ var require_mock_utils2 = __commonJS({ } } function buildKey(opts) { - const { path: path17, method, body, headers, query } = opts; + const { path: path18, method, body, headers, query } = opts; return { - path: path17, + path: path18, method, body, headers, @@ -32244,10 +32244,10 @@ var require_pending_interceptors_formatter2 = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path17, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path18, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path17, + Path: path18, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -37128,9 +37128,9 @@ var require_util14 = __commonJS({ } } } - function validateCookiePath(path17) { - for (let i = 0; i < path17.length; ++i) { - const code = path17.charCodeAt(i); + function validateCookiePath(path18) { + for (let i = 0; i < path18.length; ++i) { + const code = path18.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -39724,11 +39724,11 @@ var require_undici2 = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path17 = opts.path; + let path18 = opts.path; if (!opts.path.startsWith("/")) { - path17 = `/${path17}`; + path18 = `/${path18}`; } - url2 = new URL(util.parseOrigin(url2).origin + path17); + url2 = new URL(util.parseOrigin(url2).origin + path18); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -46244,7 +46244,7 @@ var require_light = __commonJS({ } } async trigger(name, ...args) { - var e, promises5; + var e, promises6; try { if (name !== "debug") { this.trigger("debug", `Event triggered: ${name}`, args); @@ -46255,7 +46255,7 @@ var require_light = __commonJS({ this._events[name] = this._events[name].filter(function(listener) { return listener.status !== "none"; }); - promises5 = this._events[name].map(async (listener) => { + promises6 = this._events[name].map(async (listener) => { var e2, returned; if (listener.status === "none") { return; @@ -46278,7 +46278,7 @@ var require_light = __commonJS({ return null; } }); - return (await Promise.all(promises5)).find(function(x) { + return (await Promise.all(promises6)).find(function(x) { return x != null; }); } catch (error3) { @@ -47414,14 +47414,14 @@ var require_helpers = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { "use strict"; var uri = require("url"); - var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path17, name, argument) { - if (Array.isArray(path17)) { - this.path = path17; - this.property = path17.reduce(function(sum, item) { + var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path18, name, argument) { + if (Array.isArray(path18)) { + this.path = path18; + this.property = path18.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path17 !== void 0) { - this.property = path17; + } else if (path18 !== void 0) { + this.property = path18; } if (message) { this.message = message; @@ -47512,16 +47512,16 @@ var require_helpers = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path17, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path18, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path17)) { - this.path = path17; - this.propertyPath = path17.reduce(function(sum, item) { + if (Array.isArray(path18)) { + this.path = path18; + this.propertyPath = path18.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path17; + this.propertyPath = path18; } this.base = base; this.schemas = schemas; @@ -47530,10 +47530,10 @@ var require_helpers = __commonJS({ return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path17 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path18 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); var id = schema2.$id || schema2.id; var base = uri.resolve(this.base, id || ""); - var ctx = new SchemaContext(schema2, this.options, path17, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema2, this.options, path18, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -48830,21 +48830,21 @@ var require_internal_path_helper = __commonJS({ return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.dirname = dirname4; + exports2.dirname = dirname5; exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; exports2.hasAbsoluteRoot = hasAbsoluteRoot; exports2.hasRoot = hasRoot; exports2.normalizeSeparators = normalizeSeparators; exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; - function dirname4(p) { + function dirname5(p) { p = safeTrimTrailingSeparator(p); if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path17.dirname(p); + let result = path18.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -48881,7 +48881,7 @@ var require_internal_path_helper = __commonJS({ (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { - root += path17.sep; + root += path18.sep; } return root + itemPath; } @@ -48915,10 +48915,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path17.sep)) { + if (!p.endsWith(path18.sep)) { return p; } - if (p === path17.sep) { + if (p === path18.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -49263,7 +49263,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path17 = (function() { + var path18 = (function() { try { return require("path"); } catch (e) { @@ -49271,7 +49271,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path17.sep; + minimatch.sep = path18.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand2 = require_brace_expansion(); var plTypes = { @@ -49360,8 +49360,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path17.sep !== "/") { - pattern = pattern.split(path17.sep).join("/"); + if (!options.allowWindowsEscape && path18.sep !== "/") { + pattern = pattern.split(path18.sep).join("/"); } this.options = options; this.set = []; @@ -49730,8 +49730,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path17.sep !== "/") { - f = f.split(path17.sep).join("/"); + if (path18.sep !== "/") { + f = f.split(path18.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -49877,7 +49877,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -49892,12 +49892,12 @@ var require_internal_path = __commonJS({ (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path17.sep); + this.segments = itemPath.split(path18.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename2 = path17.basename(remaining); + const basename2 = path18.basename(remaining); this.segments.unshift(basename2); remaining = dir; dir = pathHelper.dirname(remaining); @@ -49915,7 +49915,7 @@ var require_internal_path = __commonJS({ (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - (0, assert_1.default)(!segment.includes(path17.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path18.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -49926,12 +49926,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path17.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path18.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path17.sep; + result += path18.sep; } result += this.segments[i]; } @@ -49989,7 +49989,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os4 = __importStar2(require("os")); - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); @@ -50018,7 +50018,7 @@ var require_internal_pattern = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path17.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path18.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -50042,8 +50042,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path17.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path17.sep}`; + if (!itemPath.endsWith(path18.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path18.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -50078,9 +50078,9 @@ var require_internal_pattern = __commonJS({ (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path17.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path18.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path17.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path18.sep}`)) { homedir = homedir || os4.homedir(); (0, assert_1.default)(homedir, "Unable to determine HOME directory"); (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); @@ -50164,8 +50164,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path17, level) { - this.path = path17; + constructor(path18, level) { + this.path = path18; this.level = level; } }; @@ -50307,9 +50307,9 @@ var require_internal_globber = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core17 = __importStar2(require_core()); - var fs18 = __importStar2(require("fs")); + var fs19 = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); @@ -50361,7 +50361,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core17.debug(`Search path '${searchPath}'`); try { - yield __await2(fs18.promises.lstat(searchPath)); + yield __await2(fs19.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -50385,7 +50385,7 @@ var require_internal_globber = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path17.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path18.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -50395,7 +50395,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await2(fs18.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path17.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs19.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path18.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); @@ -50430,7 +50430,7 @@ var require_internal_globber = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs18.promises.stat(item.path); + stats = yield fs19.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -50442,10 +50442,10 @@ var require_internal_globber = __commonJS({ throw err; } } else { - stats = yield fs18.promises.lstat(item.path); + stats = yield fs19.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs18.promises.realpath(item.path); + const realPath = yield fs19.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -50554,10 +50554,10 @@ var require_internal_hash_files = __commonJS({ exports2.hashFiles = hashFiles2; var crypto2 = __importStar2(require("crypto")); var core17 = __importStar2(require_core()); - var fs18 = __importStar2(require("fs")); + var fs19 = __importStar2(require("fs")); var stream2 = __importStar2(require("stream")); var util = __importStar2(require("util")); - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); function hashFiles2(globber_1, currentWorkspace_1) { return __awaiter2(this, arguments, void 0, function* (globber, currentWorkspace, verbose = false) { var _a, e_1, _b, _c; @@ -50573,17 +50573,17 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path17.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path18.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } - if (fs18.statSync(file).isDirectory()) { + if (fs19.statSync(file).isDirectory()) { writeDelegate(`Skip directory '${file}'.`); continue; } const hash2 = crypto2.createHash("sha256"); const pipeline = util.promisify(stream2.pipeline); - yield pipeline(fs18.createReadStream(file), hash2); + yield pipeline(fs19.createReadStream(file), hash2); result.write(hash2.digest()); count++; if (!hasMatch) { @@ -51958,8 +51958,8 @@ var require_cacheUtils = __commonJS({ var glob2 = __importStar2(require_glob()); var io7 = __importStar2(require_io()); var crypto2 = __importStar2(require("crypto")); - var fs18 = __importStar2(require("fs")); - var path17 = __importStar2(require("path")); + var fs19 = __importStar2(require("fs")); + var path18 = __importStar2(require("path")); var semver9 = __importStar2(require_semver3()); var util = __importStar2(require("util")); var constants_1 = require_constants12(); @@ -51979,15 +51979,15 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path17.join(baseLocation, "actions", "temp"); + tempDirectory = path18.join(baseLocation, "actions", "temp"); } - const dest = path17.join(tempDirectory, crypto2.randomUUID()); + const dest = path18.join(tempDirectory, crypto2.randomUUID()); yield io7.mkdirP(dest); return dest; }); } function getArchiveFileSizeInBytes(filePath) { - return fs18.statSync(filePath).size; + return fs19.statSync(filePath).size; } function resolvePaths(patterns) { return __awaiter2(this, void 0, void 0, function* () { @@ -52003,7 +52003,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path17.relative(workspace, file).replace(new RegExp(`\\${path17.sep}`, "g"), "/"); + const relativeFile = path18.relative(workspace, file).replace(new RegExp(`\\${path18.sep}`, "g"), "/"); core17.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -52025,7 +52025,7 @@ var require_cacheUtils = __commonJS({ } function unlinkFile(filePath) { return __awaiter2(this, void 0, void 0, function* () { - return util.promisify(fs18.unlink)(filePath); + return util.promisify(fs19.unlink)(filePath); }); } function getVersion(app_1) { @@ -52067,7 +52067,7 @@ var require_cacheUtils = __commonJS({ } function getGnuTarPathOnWindows() { return __awaiter2(this, void 0, void 0, function* () { - if (fs18.existsSync(constants_1.GnuTarPathOnWindows)) { + if (fs19.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); @@ -52530,13 +52530,13 @@ function __disposeResources(env) { } return next(); } -function __rewriteRelativeImportExtension(path17, preserveJsx) { - if (typeof path17 === "string" && /^\.\.?\//.test(path17)) { - return path17.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { +function __rewriteRelativeImportExtension(path18, preserveJsx) { + if (typeof path18 === "string" && /^\.\.?\//.test(path18)) { + return path18.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; }); } - return path17; + return path18; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -56950,8 +56950,8 @@ var require_getClient = __commonJS({ } const { allowInsecureConnection, httpClient } = clientOptions; const endpointUrl = clientOptions.endpoint ?? endpoint2; - const client = (path17, ...args) => { - const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path17, args, { allowInsecureConnection, ...requestOptions }); + const client = (path18, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path18, args, { allowInsecureConnection, ...requestOptions }); return { get: (requestOptions = {}) => { return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); @@ -60822,15 +60822,15 @@ var require_urlHelpers2 = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path17 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path17.startsWith("/")) { - path17 = path17.substring(1); + let path18 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path18.startsWith("/")) { + path18 = path18.substring(1); } - if (isAbsoluteUrl(path17)) { - requestUrl = path17; + if (isAbsoluteUrl(path18)) { + requestUrl = path18; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path17); + requestUrl = appendPath(requestUrl, path18); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -60876,9 +60876,9 @@ var require_urlHelpers2 = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path17 = pathToAppend.substring(0, searchStart); + const path18 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path17; + newPath = newPath + path18; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -63111,10 +63111,10 @@ var require_utils_common = __commonJS({ var constants_js_1 = require_constants15(); function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path17 = urlParsed.pathname; - path17 = path17 || "/"; - path17 = escape(path17); - urlParsed.pathname = path17; + let path18 = urlParsed.pathname; + path18 = path18 || "/"; + path18 = escape(path18); + urlParsed.pathname = path18; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -63199,9 +63199,9 @@ var require_utils_common = __commonJS({ } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path17 = urlParsed.pathname; - path17 = path17 ? path17.endsWith("/") ? `${path17}${name}` : `${path17}/${name}` : name; - urlParsed.pathname = path17; + let path18 = urlParsed.pathname; + path18 = path18 ? path18.endsWith("/") ? `${path18}${name}` : `${path18}/${name}` : name; + urlParsed.pathname = path18; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -64428,9 +64428,9 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path18 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path17}`; + canonicalizedResourceString += `/${this.factory.accountName}${path18}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -65169,10 +65169,10 @@ var require_utils_common2 = __commonJS({ var constants_js_1 = require_constants16(); function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path17 = urlParsed.pathname; - path17 = path17 || "/"; - path17 = escape(path17); - urlParsed.pathname = path17; + let path18 = urlParsed.pathname; + path18 = path18 || "/"; + path18 = escape(path18); + urlParsed.pathname = path18; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -65257,9 +65257,9 @@ var require_utils_common2 = __commonJS({ } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path17 = urlParsed.pathname; - path17 = path17 ? path17.endsWith("/") ? `${path17}${name}` : `${path17}/${name}` : name; - urlParsed.pathname = path17; + let path18 = urlParsed.pathname; + path18 = path18 ? path18.endsWith("/") ? `${path18}${name}` : `${path18}/${name}` : name; + urlParsed.pathname = path18; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -66180,9 +66180,9 @@ var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path18 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path17}`; + canonicalizedResourceString += `/${this.factory.accountName}${path18}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -66812,9 +66812,9 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path18 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path17}`; + canonicalizedResourceString += `/${options.accountName}${path18}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67159,9 +67159,9 @@ var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path18 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path17}`; + canonicalizedResourceString += `/${options.accountName}${path18}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -88816,8 +88816,8 @@ var require_BlobBatch = __commonJS({ if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path17 = (0, utils_common_js_1.getURLPath)(subRequest.url); - if (!path17 || path17 === "") { + const path18 = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path18 || path18 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -88895,8 +88895,8 @@ var require_BlobBatchClient = __commonJS({ pipeline = (0, Pipeline_js_1.newPipeline)(credentialOrPipeline, options); } const storageClientContext = new StorageContextClient_js_1.StorageContextClient(url2, (0, Pipeline_js_1.getCoreClientOptions)(pipeline)); - const path17 = (0, utils_common_js_1.getURLPath)(url2); - if (path17 && path17 !== "/") { + const path18 = (0, utils_common_js_1.getURLPath)(url2); + if (path18 && path18 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -92183,7 +92183,7 @@ var require_downloadUtils = __commonJS({ var http_client_1 = require_lib(); var storage_blob_1 = require_commonjs15(); var buffer = __importStar2(require("buffer")); - var fs18 = __importStar2(require("fs")); + var fs19 = __importStar2(require("fs")); var stream2 = __importStar2(require("stream")); var util = __importStar2(require("util")); var utils = __importStar2(require_cacheUtils()); @@ -92294,7 +92294,7 @@ var require_downloadUtils = __commonJS({ exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { return __awaiter2(this, void 0, void 0, function* () { - const writeStream = fs18.createWriteStream(archivePath); + const writeStream = fs19.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); @@ -92319,7 +92319,7 @@ var require_downloadUtils = __commonJS({ function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { return __awaiter2(this, void 0, void 0, function* () { var _a; - const archiveDescriptor = yield fs18.promises.open(archivePath, "w"); + const archiveDescriptor = yield fs19.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true @@ -92435,7 +92435,7 @@ var require_downloadUtils = __commonJS({ } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); const downloadProgress = new DownloadProgress(contentLength); - const fd = fs18.openSync(archivePath, "w"); + const fd = fs19.openSync(archivePath, "w"); try { downloadProgress.startDisplayTimer(); const controller = new abort_controller_1.AbortController(); @@ -92453,12 +92453,12 @@ var require_downloadUtils = __commonJS({ controller.abort(); throw new Error("Aborting cache download as the download time exceeded the timeout."); } else if (Buffer.isBuffer(result)) { - fs18.writeFileSync(fd, result); + fs19.writeFileSync(fd, result); } } } finally { downloadProgress.stopDisplayTimer(); - fs18.closeSync(fd); + fs19.closeSync(fd); } } }); @@ -92776,11 +92776,11 @@ var require_cacheHttpClient = __commonJS({ exports2.getCacheEntry = getCacheEntry; exports2.downloadCache = downloadCache; exports2.reserveCache = reserveCache; - exports2.saveCache = saveCache4; + exports2.saveCache = saveCache5; var core17 = __importStar2(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); - var fs18 = __importStar2(require("fs")); + var fs19 = __importStar2(require("fs")); var url_1 = require("url"); var utils = __importStar2(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); @@ -92915,7 +92915,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 = fs18.openSync(archivePath, "r"); + const fd = fs19.openSync(archivePath, "r"); const uploadOptions = (0, options_1.getUploadOptions)(options); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); @@ -92929,7 +92929,7 @@ Other caches with similar key:`); const start = offset; const end = offset + chunkSize - 1; offset += maxChunkSize; - yield uploadChunk(httpClient, resourceUrl, () => fs18.createReadStream(archivePath, { + yield uploadChunk(httpClient, resourceUrl, () => fs19.createReadStream(archivePath, { fd, start, end, @@ -92940,7 +92940,7 @@ Other caches with similar key:`); } }))); } finally { - fs18.closeSync(fd); + fs19.closeSync(fd); } return; }); @@ -92953,7 +92953,7 @@ Other caches with similar key:`); })); }); } - function saveCache4(cacheId, archivePath, signedUploadURL, options) { + function saveCache5(cacheId, archivePath, signedUploadURL, options) { return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { @@ -98205,7 +98205,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io7 = __importStar2(require_io()); var fs_1 = require("fs"); - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants12(); var IS_WINDOWS = process.platform === "win32"; @@ -98251,13 +98251,13 @@ var require_tar = __commonJS({ const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (type2) { case "create": - args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path17.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path18.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -98303,7 +98303,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path17.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path18.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -98312,7 +98312,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path17.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path18.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -98327,7 +98327,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -98336,7 +98336,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path18.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -98374,7 +98374,7 @@ var require_tar = __commonJS({ } function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path17.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path18.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -98453,10 +98453,10 @@ var require_cache5 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; exports2.isFeatureAvailable = isFeatureAvailable; - exports2.restoreCache = restoreCache4; - exports2.saveCache = saveCache4; + exports2.restoreCache = restoreCache5; + exports2.saveCache = saveCache5; var core17 = __importStar2(require_core()); - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); @@ -98511,7 +98511,7 @@ var require_cache5 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - function restoreCache4(paths_1, primaryKey_1, restoreKeys_1, options_1) { + function restoreCache5(paths_1, primaryKey_1, restoreKeys_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core17.debug(`Cache service version: ${cacheServiceVersion}`); @@ -98551,7 +98551,7 @@ var require_cache5 = __commonJS({ core17.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path17.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path18.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core17.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core17.isDebug()) { @@ -98620,7 +98620,7 @@ var require_cache5 = __commonJS({ core17.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path17.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path18.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core17.debug(`Archive path: ${archivePath}`); core17.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -98655,7 +98655,7 @@ var require_cache5 = __commonJS({ return void 0; }); } - function saveCache4(paths_1, key_1, options_1) { + function saveCache5(paths_1, key_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core17.debug(`Cache service version: ${cacheServiceVersion}`); @@ -98682,7 +98682,7 @@ var require_cache5 = __commonJS({ throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path17.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path18.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core17.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -98746,7 +98746,7 @@ var require_cache5 = __commonJS({ throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path17.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path18.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core17.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -98896,7 +98896,7 @@ var require_manifest = __commonJS({ var core_1 = require_core(); var os4 = require("os"); var cp = require("child_process"); - var fs18 = require("fs"); + var fs19 = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter2(this, void 0, void 0, function* () { const platFilter = os4.platform(); @@ -98958,10 +98958,10 @@ var require_manifest = __commonJS({ const lsbReleaseFile = "/etc/lsb-release"; const osReleaseFile = "/etc/os-release"; let contents = ""; - if (fs18.existsSync(lsbReleaseFile)) { - contents = fs18.readFileSync(lsbReleaseFile).toString(); - } else if (fs18.existsSync(osReleaseFile)) { - contents = fs18.readFileSync(osReleaseFile).toString(); + if (fs19.existsSync(lsbReleaseFile)) { + contents = fs19.readFileSync(lsbReleaseFile).toString(); + } else if (fs19.existsSync(osReleaseFile)) { + contents = fs19.readFileSync(osReleaseFile).toString(); } return contents; } @@ -99170,10 +99170,10 @@ var require_tool_cache = __commonJS({ var core17 = __importStar2(require_core()); var io7 = __importStar2(require_io()); var crypto2 = __importStar2(require("crypto")); - var fs18 = __importStar2(require("fs")); + var fs19 = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os4 = __importStar2(require("os")); - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver9 = __importStar2(require_semver2()); var stream2 = __importStar2(require("stream")); @@ -99194,8 +99194,8 @@ var require_tool_cache = __commonJS({ var userAgent2 = "actions/tool-cache"; function downloadTool2(url2, dest, auth2, headers) { return __awaiter2(this, void 0, void 0, function* () { - dest = dest || path17.join(_getTempDirectory(), crypto2.randomUUID()); - yield io7.mkdirP(path17.dirname(dest)); + dest = dest || path18.join(_getTempDirectory(), crypto2.randomUUID()); + yield io7.mkdirP(path18.dirname(dest)); core17.debug(`Downloading ${url2}`); core17.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -99216,7 +99216,7 @@ var require_tool_cache = __commonJS({ } function downloadToolAttempt(url2, dest, auth2, headers) { return __awaiter2(this, void 0, void 0, function* () { - if (fs18.existsSync(dest)) { + if (fs19.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } const http = new httpm.HttpClient(userAgent2, [], { @@ -99240,7 +99240,7 @@ var require_tool_cache = __commonJS({ const readStream = responseMessageFactory(); let succeeded = false; try { - yield pipeline(readStream, fs18.createWriteStream(dest)); + yield pipeline(readStream, fs19.createWriteStream(dest)); core17.debug("download complete"); succeeded = true; return dest; @@ -99285,7 +99285,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path17.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path18.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`; @@ -99452,12 +99452,12 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os4.arch(); core17.debug(`Caching tool ${tool} ${version} ${arch2}`); core17.debug(`source dir: ${sourceDir}`); - if (!fs18.statSync(sourceDir).isDirectory()) { + if (!fs19.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } const destPath = yield _createToolPath(tool, version, arch2); - for (const itemName of fs18.readdirSync(sourceDir)) { - const s = path17.join(sourceDir, itemName); + for (const itemName of fs19.readdirSync(sourceDir)) { + const s = path18.join(sourceDir, itemName); yield io7.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -99470,11 +99470,11 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os4.arch(); core17.debug(`Caching tool ${tool} ${version} ${arch2}`); core17.debug(`source file: ${sourceFile}`); - if (!fs18.statSync(sourceFile).isFile()) { + if (!fs19.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path17.join(destFolder, targetFile); + const destPath = path18.join(destFolder, targetFile); core17.debug(`destination file ${destPath}`); yield io7.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -99497,9 +99497,9 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver9.clean(versionSpec) || ""; - const cachePath = path17.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path18.join(_getCacheDirectory(), toolName, versionSpec, arch2); core17.debug(`checking cache: ${cachePath}`); - if (fs18.existsSync(cachePath) && fs18.existsSync(`${cachePath}.complete`)) { + if (fs19.existsSync(cachePath) && fs19.existsSync(`${cachePath}.complete`)) { core17.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { @@ -99511,13 +99511,13 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os4.arch(); - const toolPath = path17.join(_getCacheDirectory(), toolName); - if (fs18.existsSync(toolPath)) { - const children = fs18.readdirSync(toolPath); + const toolPath = path18.join(_getCacheDirectory(), toolName); + if (fs19.existsSync(toolPath)) { + const children = fs19.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path17.join(toolPath, child, arch2 || ""); - if (fs18.existsSync(fullPath) && fs18.existsSync(`${fullPath}.complete`)) { + const fullPath = path18.join(toolPath, child, arch2 || ""); + if (fs19.existsSync(fullPath) && fs19.existsSync(`${fullPath}.complete`)) { versions.push(child); } } @@ -99568,7 +99568,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path17.join(_getTempDirectory(), crypto2.randomUUID()); + dest = path18.join(_getTempDirectory(), crypto2.randomUUID()); } yield io7.mkdirP(dest); return dest; @@ -99576,7 +99576,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter2(this, void 0, void 0, function* () { - const folderPath = path17.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path18.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); core17.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io7.rmRF(folderPath); @@ -99586,9 +99586,9 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path17.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path18.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; - fs18.writeFileSync(markerPath, ""); + fs19.writeFileSync(markerPath, ""); core17.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { @@ -102368,13 +102368,13 @@ These characters are not allowed in the artifact name due to limitations with ce (0, core_1.info)(`Artifact name is valid!`); } exports2.validateArtifactName = validateArtifactName; - function validateFilePath(path17) { - if (!path17) { + function validateFilePath(path18) { + if (!path18) { throw new Error(`Provided file path input during validation is empty`); } for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) { - if (path17.includes(invalidCharacterKey)) { - throw new Error(`The path for one of the files in artifact is not valid: ${path17}. Contains the following character: ${errorMessageForCharacter} + if (path18.includes(invalidCharacterKey)) { + throw new Error(`The path for one of the files in artifact is not valid: ${path18}. Contains the following character: ${errorMessageForCharacter} Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()} @@ -102919,15 +102919,15 @@ var require_upload_zip_specification = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUploadZipSpecification = exports2.validateRootDirectory = void 0; - var fs18 = __importStar2(require("fs")); + var fs19 = __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 (!fs18.existsSync(rootDirectory)) { + if (!fs19.existsSync(rootDirectory)) { throw new Error(`The provided rootDirectory ${rootDirectory} does not exist`); } - if (!fs18.statSync(rootDirectory).isDirectory()) { + if (!fs19.statSync(rootDirectory).isDirectory()) { throw new Error(`The provided rootDirectory ${rootDirectory} is not a valid directory`); } (0, core_1.info)(`Root directory input is valid!`); @@ -102938,7 +102938,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 = fs18.lstatSync(file, { throwIfNoEntry: false }); + const stats = fs19.lstatSync(file, { throwIfNoEntry: false }); if (!stats) { throw new Error(`File ${file} does not exist`); } @@ -103275,8 +103275,8 @@ var require_minimatch2 = __commonJS({ return new Minimatch(pattern, options).match(p); }; module2.exports = minimatch; - var path17 = require_path(); - minimatch.sep = path17.sep; + var path18 = require_path(); + minimatch.sep = path18.sep; var GLOBSTAR = /* @__PURE__ */ Symbol("globstar **"); minimatch.GLOBSTAR = GLOBSTAR; var expand2 = require_brace_expansion2(); @@ -103785,8 +103785,8 @@ var require_minimatch2 = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; const options = this.options; - if (path17.sep !== "/") { - f = f.split(path17.sep).join("/"); + if (path18.sep !== "/") { + f = f.split(path18.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -103824,13 +103824,13 @@ var require_minimatch2 = __commonJS({ var require_readdir_glob = __commonJS({ "node_modules/readdir-glob/index.js"(exports2, module2) { module2.exports = readdirGlob; - var fs18 = require("fs"); + var fs19 = require("fs"); var { EventEmitter } = require("events"); var { Minimatch } = require_minimatch2(); var { resolve: resolve8 } = require("path"); function readdir(dir, strict) { return new Promise((resolve9, reject) => { - fs18.readdir(dir, { withFileTypes: true }, (err, files) => { + fs19.readdir(dir, { withFileTypes: true }, (err, files) => { if (err) { switch (err.code) { case "ENOTDIR": @@ -103863,7 +103863,7 @@ var require_readdir_glob = __commonJS({ } function stat(file, followSymlinks) { return new Promise((resolve9, reject) => { - const statFunc = followSymlinks ? fs18.stat : fs18.lstat; + const statFunc = followSymlinks ? fs19.stat : fs19.lstat; statFunc(file, (err, stats) => { if (err) { switch (err.code) { @@ -103884,8 +103884,8 @@ var require_readdir_glob = __commonJS({ }); }); } - async function* exploreWalkAsync(dir, path17, followSymlinks, useStat, shouldSkip, strict) { - let files = await readdir(path17 + dir, strict); + async function* exploreWalkAsync(dir, path18, followSymlinks, useStat, shouldSkip, strict) { + let files = await readdir(path18 + dir, strict); for (const file of files) { let name = file.name; if (name === void 0) { @@ -103894,7 +103894,7 @@ var require_readdir_glob = __commonJS({ } const filename = dir + "/" + name; const relative2 = filename.slice(1); - const absolute = path17 + "/" + relative2; + const absolute = path18 + "/" + relative2; let stats = null; if (useStat || followSymlinks) { stats = await stat(absolute, followSymlinks); @@ -103908,15 +103908,15 @@ var require_readdir_glob = __commonJS({ if (stats.isDirectory()) { if (!shouldSkip(relative2)) { yield { relative: relative2, absolute, stats }; - yield* exploreWalkAsync(filename, path17, followSymlinks, useStat, shouldSkip, false); + yield* exploreWalkAsync(filename, path18, followSymlinks, useStat, shouldSkip, false); } } else { yield { relative: relative2, absolute, stats }; } } } - async function* explore(path17, followSymlinks, useStat, shouldSkip) { - yield* exploreWalkAsync("", path17, followSymlinks, useStat, shouldSkip, true); + async function* explore(path18, followSymlinks, useStat, shouldSkip) { + yield* exploreWalkAsync("", path18, followSymlinks, useStat, shouldSkip, true); } function readOptions(options) { return { @@ -105928,54 +105928,54 @@ var require_polyfills = __commonJS({ } var chdir; module2.exports = patch; - function patch(fs18) { + function patch(fs19) { if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs18); - } - if (!fs18.lutimes) { - patchLutimes(fs18); - } - fs18.chown = chownFix(fs18.chown); - fs18.fchown = chownFix(fs18.fchown); - fs18.lchown = chownFix(fs18.lchown); - fs18.chmod = chmodFix(fs18.chmod); - fs18.fchmod = chmodFix(fs18.fchmod); - fs18.lchmod = chmodFix(fs18.lchmod); - fs18.chownSync = chownFixSync(fs18.chownSync); - fs18.fchownSync = chownFixSync(fs18.fchownSync); - fs18.lchownSync = chownFixSync(fs18.lchownSync); - fs18.chmodSync = chmodFixSync(fs18.chmodSync); - fs18.fchmodSync = chmodFixSync(fs18.fchmodSync); - fs18.lchmodSync = chmodFixSync(fs18.lchmodSync); - fs18.stat = statFix(fs18.stat); - fs18.fstat = statFix(fs18.fstat); - fs18.lstat = statFix(fs18.lstat); - fs18.statSync = statFixSync(fs18.statSync); - fs18.fstatSync = statFixSync(fs18.fstatSync); - fs18.lstatSync = statFixSync(fs18.lstatSync); - if (fs18.chmod && !fs18.lchmod) { - fs18.lchmod = function(path17, mode, cb) { + patchLchmod(fs19); + } + if (!fs19.lutimes) { + patchLutimes(fs19); + } + fs19.chown = chownFix(fs19.chown); + fs19.fchown = chownFix(fs19.fchown); + fs19.lchown = chownFix(fs19.lchown); + fs19.chmod = chmodFix(fs19.chmod); + fs19.fchmod = chmodFix(fs19.fchmod); + fs19.lchmod = chmodFix(fs19.lchmod); + fs19.chownSync = chownFixSync(fs19.chownSync); + fs19.fchownSync = chownFixSync(fs19.fchownSync); + fs19.lchownSync = chownFixSync(fs19.lchownSync); + fs19.chmodSync = chmodFixSync(fs19.chmodSync); + fs19.fchmodSync = chmodFixSync(fs19.fchmodSync); + fs19.lchmodSync = chmodFixSync(fs19.lchmodSync); + fs19.stat = statFix(fs19.stat); + fs19.fstat = statFix(fs19.fstat); + fs19.lstat = statFix(fs19.lstat); + fs19.statSync = statFixSync(fs19.statSync); + fs19.fstatSync = statFixSync(fs19.fstatSync); + fs19.lstatSync = statFixSync(fs19.lstatSync); + if (fs19.chmod && !fs19.lchmod) { + fs19.lchmod = function(path18, mode, cb) { if (cb) process.nextTick(cb); }; - fs18.lchmodSync = function() { + fs19.lchmodSync = function() { }; } - if (fs18.chown && !fs18.lchown) { - fs18.lchown = function(path17, uid, gid, cb) { + if (fs19.chown && !fs19.lchown) { + fs19.lchown = function(path18, uid, gid, cb) { if (cb) process.nextTick(cb); }; - fs18.lchownSync = function() { + fs19.lchownSync = function() { }; } if (platform === "win32") { - fs18.rename = typeof fs18.rename !== "function" ? fs18.rename : (function(fs$rename) { + fs19.rename = typeof fs19.rename !== "function" ? fs19.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() { - fs18.stat(to, function(stater, st) { + fs19.stat(to, function(stater, st) { if (stater && stater.code === "ENOENT") fs$rename(from, to, CB); else @@ -105991,9 +105991,9 @@ var require_polyfills = __commonJS({ } if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); return rename; - })(fs18.rename); + })(fs19.rename); } - fs18.read = typeof fs18.read !== "function" ? fs18.read : (function(fs$read) { + fs19.read = typeof fs19.read !== "function" ? fs19.read : (function(fs$read) { function read(fd, buffer, offset, length, position, callback_) { var callback; if (callback_ && typeof callback_ === "function") { @@ -106001,22 +106001,22 @@ var require_polyfills = __commonJS({ callback = function(er, _2, __) { if (er && er.code === "EAGAIN" && eagCounter < 10) { eagCounter++; - return fs$read.call(fs18, fd, buffer, offset, length, position, callback); + return fs$read.call(fs19, fd, buffer, offset, length, position, callback); } callback_.apply(this, arguments); }; } - return fs$read.call(fs18, fd, buffer, offset, length, position, callback); + return fs$read.call(fs19, fd, buffer, offset, length, position, callback); } if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); return read; - })(fs18.read); - fs18.readSync = typeof fs18.readSync !== "function" ? fs18.readSync : /* @__PURE__ */ (function(fs$readSync) { + })(fs19.read); + fs19.readSync = typeof fs19.readSync !== "function" ? fs19.readSync : /* @__PURE__ */ (function(fs$readSync) { return function(fd, buffer, offset, length, position) { var eagCounter = 0; while (true) { try { - return fs$readSync.call(fs18, fd, buffer, offset, length, position); + return fs$readSync.call(fs19, fd, buffer, offset, length, position); } catch (er) { if (er.code === "EAGAIN" && eagCounter < 10) { eagCounter++; @@ -106026,11 +106026,11 @@ var require_polyfills = __commonJS({ } } }; - })(fs18.readSync); - function patchLchmod(fs19) { - fs19.lchmod = function(path17, mode, callback) { - fs19.open( - path17, + })(fs19.readSync); + function patchLchmod(fs20) { + fs20.lchmod = function(path18, mode, callback) { + fs20.open( + path18, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) { @@ -106038,80 +106038,80 @@ var require_polyfills = __commonJS({ if (callback) callback(err); return; } - fs19.fchmod(fd, mode, function(err2) { - fs19.close(fd, function(err22) { + fs20.fchmod(fd, mode, function(err2) { + fs20.close(fd, function(err22) { if (callback) callback(err2 || err22); }); }); } ); }; - fs19.lchmodSync = function(path17, mode) { - var fd = fs19.openSync(path17, constants.O_WRONLY | constants.O_SYMLINK, mode); + fs20.lchmodSync = function(path18, mode) { + var fd = fs20.openSync(path18, constants.O_WRONLY | constants.O_SYMLINK, mode); var threw = true; var ret; try { - ret = fs19.fchmodSync(fd, mode); + ret = fs20.fchmodSync(fd, mode); threw = false; } finally { if (threw) { try { - fs19.closeSync(fd); + fs20.closeSync(fd); } catch (er) { } } else { - fs19.closeSync(fd); + fs20.closeSync(fd); } } return ret; }; } - function patchLutimes(fs19) { - if (constants.hasOwnProperty("O_SYMLINK") && fs19.futimes) { - fs19.lutimes = function(path17, at, mt, cb) { - fs19.open(path17, constants.O_SYMLINK, function(er, fd) { + function patchLutimes(fs20) { + if (constants.hasOwnProperty("O_SYMLINK") && fs20.futimes) { + fs20.lutimes = function(path18, at, mt, cb) { + fs20.open(path18, constants.O_SYMLINK, function(er, fd) { if (er) { if (cb) cb(er); return; } - fs19.futimes(fd, at, mt, function(er2) { - fs19.close(fd, function(er22) { + fs20.futimes(fd, at, mt, function(er2) { + fs20.close(fd, function(er22) { if (cb) cb(er2 || er22); }); }); }); }; - fs19.lutimesSync = function(path17, at, mt) { - var fd = fs19.openSync(path17, constants.O_SYMLINK); + fs20.lutimesSync = function(path18, at, mt) { + var fd = fs20.openSync(path18, constants.O_SYMLINK); var ret; var threw = true; try { - ret = fs19.futimesSync(fd, at, mt); + ret = fs20.futimesSync(fd, at, mt); threw = false; } finally { if (threw) { try { - fs19.closeSync(fd); + fs20.closeSync(fd); } catch (er) { } } else { - fs19.closeSync(fd); + fs20.closeSync(fd); } } return ret; }; - } else if (fs19.futimes) { - fs19.lutimes = function(_a, _b, _c, cb) { + } else if (fs20.futimes) { + fs20.lutimes = function(_a, _b, _c, cb) { if (cb) process.nextTick(cb); }; - fs19.lutimesSync = function() { + fs20.lutimesSync = function() { }; } } function chmodFix(orig) { if (!orig) return orig; return function(target, mode, cb) { - return orig.call(fs18, target, mode, function(er) { + return orig.call(fs19, target, mode, function(er) { if (chownErOk(er)) er = null; if (cb) cb.apply(this, arguments); }); @@ -106121,7 +106121,7 @@ var require_polyfills = __commonJS({ if (!orig) return orig; return function(target, mode) { try { - return orig.call(fs18, target, mode); + return orig.call(fs19, target, mode); } catch (er) { if (!chownErOk(er)) throw er; } @@ -106130,7 +106130,7 @@ var require_polyfills = __commonJS({ function chownFix(orig) { if (!orig) return orig; return function(target, uid, gid, cb) { - return orig.call(fs18, target, uid, gid, function(er) { + return orig.call(fs19, target, uid, gid, function(er) { if (chownErOk(er)) er = null; if (cb) cb.apply(this, arguments); }); @@ -106140,7 +106140,7 @@ var require_polyfills = __commonJS({ if (!orig) return orig; return function(target, uid, gid) { try { - return orig.call(fs18, target, uid, gid); + return orig.call(fs19, target, uid, gid); } catch (er) { if (!chownErOk(er)) throw er; } @@ -106160,13 +106160,13 @@ var require_polyfills = __commonJS({ } if (cb) cb.apply(this, arguments); } - return options ? orig.call(fs18, target, options, callback) : orig.call(fs18, target, callback); + return options ? orig.call(fs19, target, options, callback) : orig.call(fs19, target, callback); }; } function statFixSync(orig) { if (!orig) return orig; return function(target, options) { - var stats = options ? orig.call(fs18, target, options) : orig.call(fs18, target); + var stats = options ? orig.call(fs19, target, options) : orig.call(fs19, target); if (stats) { if (stats.uid < 0) stats.uid += 4294967296; if (stats.gid < 0) stats.gid += 4294967296; @@ -106195,16 +106195,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(fs18) { + function legacy(fs19) { return { ReadStream, WriteStream }; - function ReadStream(path17, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path17, options); + function ReadStream(path18, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path18, options); Stream.call(this); var self2 = this; - this.path = path17; + this.path = path18; this.fd = null; this.readable = true; this.paused = false; @@ -106238,7 +106238,7 @@ var require_legacy_streams = __commonJS({ }); return; } - fs18.open(this.path, this.flags, this.mode, function(err, fd) { + fs19.open(this.path, this.flags, this.mode, function(err, fd) { if (err) { self2.emit("error", err); self2.readable = false; @@ -106249,10 +106249,10 @@ var require_legacy_streams = __commonJS({ self2._read(); }); } - function WriteStream(path17, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path17, options); + function WriteStream(path18, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path18, options); Stream.call(this); - this.path = path17; + this.path = path18; this.fd = null; this.writable = true; this.flags = "w"; @@ -106277,7 +106277,7 @@ var require_legacy_streams = __commonJS({ this.busy = false; this._queue = []; if (this.fd === null) { - this._open = fs18.open; + this._open = fs19.open; this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); this.flush(); } @@ -106312,7 +106312,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 fs18 = require("fs"); + var fs19 = require("fs"); var polyfills = require_polyfills(); var legacy = require_legacy_streams(); var clone = require_clone(); @@ -106344,12 +106344,12 @@ var require_graceful_fs = __commonJS({ m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); console.error(m); }; - if (!fs18[gracefulQueue]) { + if (!fs19[gracefulQueue]) { queue = global[gracefulQueue] || []; - publishQueue(fs18, queue); - fs18.close = (function(fs$close) { + publishQueue(fs19, queue); + fs19.close = (function(fs$close) { function close(fd, cb) { - return fs$close.call(fs18, fd, function(err) { + return fs$close.call(fs19, fd, function(err) { if (!err) { resetQueue(); } @@ -106361,48 +106361,48 @@ var require_graceful_fs = __commonJS({ value: fs$close }); return close; - })(fs18.close); - fs18.closeSync = (function(fs$closeSync) { + })(fs19.close); + fs19.closeSync = (function(fs$closeSync) { function closeSync(fd) { - fs$closeSync.apply(fs18, arguments); + fs$closeSync.apply(fs19, arguments); resetQueue(); } Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync }); return closeSync; - })(fs18.closeSync); + })(fs19.closeSync); if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { process.on("exit", function() { - debug5(fs18[gracefulQueue]); - require("assert").equal(fs18[gracefulQueue].length, 0); + debug5(fs19[gracefulQueue]); + require("assert").equal(fs19[gracefulQueue].length, 0); }); } } var queue; if (!global[gracefulQueue]) { - publishQueue(global, fs18[gracefulQueue]); - } - module2.exports = patch(clone(fs18)); - if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs18.__patched) { - module2.exports = patch(fs18); - fs18.__patched = true; - } - function patch(fs19) { - polyfills(fs19); - fs19.gracefulify = patch; - fs19.createReadStream = createReadStream2; - fs19.createWriteStream = createWriteStream3; - var fs$readFile = fs19.readFile; - fs19.readFile = readFile; - function readFile(path17, options, cb) { + publishQueue(global, fs19[gracefulQueue]); + } + module2.exports = patch(clone(fs19)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs19.__patched) { + module2.exports = patch(fs19); + fs19.__patched = true; + } + function patch(fs20) { + polyfills(fs20); + fs20.gracefulify = patch; + fs20.createReadStream = createReadStream2; + fs20.createWriteStream = createWriteStream3; + var fs$readFile = fs20.readFile; + fs20.readFile = readFile; + function readFile(path18, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$readFile(path17, options, cb); - function go$readFile(path18, options2, cb2, startTime) { - return fs$readFile(path18, options2, function(err) { + return go$readFile(path18, options, cb); + function go$readFile(path19, options2, cb2, startTime) { + return fs$readFile(path19, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path18, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$readFile, [path19, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -106410,16 +106410,16 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$writeFile = fs19.writeFile; - fs19.writeFile = writeFile; - function writeFile(path17, data, options, cb) { + var fs$writeFile = fs20.writeFile; + fs20.writeFile = writeFile; + function writeFile(path18, data, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$writeFile(path17, data, options, cb); - function go$writeFile(path18, data2, options2, cb2, startTime) { - return fs$writeFile(path18, data2, options2, function(err) { + return go$writeFile(path18, data, options, cb); + function go$writeFile(path19, data2, options2, cb2, startTime) { + return fs$writeFile(path19, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path18, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$writeFile, [path19, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -106427,17 +106427,17 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$appendFile = fs19.appendFile; + var fs$appendFile = fs20.appendFile; if (fs$appendFile) - fs19.appendFile = appendFile; - function appendFile(path17, data, options, cb) { + fs20.appendFile = appendFile; + function appendFile(path18, data, options, cb) { if (typeof options === "function") cb = options, options = null; - return go$appendFile(path17, data, options, cb); - function go$appendFile(path18, data2, options2, cb2, startTime) { - return fs$appendFile(path18, data2, options2, function(err) { + return go$appendFile(path18, data, options, cb); + function go$appendFile(path19, data2, options2, cb2, startTime) { + return fs$appendFile(path19, data2, options2, function(err) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path18, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$appendFile, [path19, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -106445,9 +106445,9 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$copyFile = fs19.copyFile; + var fs$copyFile = fs20.copyFile; if (fs$copyFile) - fs19.copyFile = copyFile2; + fs20.copyFile = copyFile2; function copyFile2(src, dest, flags, cb) { if (typeof flags === "function") { cb = flags; @@ -106465,34 +106465,34 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$readdir = fs19.readdir; - fs19.readdir = readdir; + var fs$readdir = fs20.readdir; + fs20.readdir = readdir; var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path17, options, cb) { + function readdir(path18, options, cb) { if (typeof options === "function") cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path18, options2, cb2, startTime) { - return fs$readdir(path18, fs$readdirCallback( - path18, + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path19, options2, cb2, startTime) { + return fs$readdir(path19, fs$readdirCallback( + path19, options2, cb2, startTime )); - } : function go$readdir2(path18, options2, cb2, startTime) { - return fs$readdir(path18, options2, fs$readdirCallback( - path18, + } : function go$readdir2(path19, options2, cb2, startTime) { + return fs$readdir(path19, options2, fs$readdirCallback( + path19, options2, cb2, startTime )); }; - return go$readdir(path17, options, cb); - function fs$readdirCallback(path18, options2, cb2, startTime) { + return go$readdir(path18, options, cb); + function fs$readdirCallback(path19, options2, cb2, startTime) { return function(err, files) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([ go$readdir, - [path18, options2, cb2], + [path19, options2, cb2], err, startTime || Date.now(), Date.now() @@ -106507,21 +106507,21 @@ var require_graceful_fs = __commonJS({ } } if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs19); + var legStreams = legacy(fs20); ReadStream = legStreams.ReadStream; WriteStream = legStreams.WriteStream; } - var fs$ReadStream = fs19.ReadStream; + var fs$ReadStream = fs20.ReadStream; if (fs$ReadStream) { ReadStream.prototype = Object.create(fs$ReadStream.prototype); ReadStream.prototype.open = ReadStream$open; } - var fs$WriteStream = fs19.WriteStream; + var fs$WriteStream = fs20.WriteStream; if (fs$WriteStream) { WriteStream.prototype = Object.create(fs$WriteStream.prototype); WriteStream.prototype.open = WriteStream$open; } - Object.defineProperty(fs19, "ReadStream", { + Object.defineProperty(fs20, "ReadStream", { get: function() { return ReadStream; }, @@ -106531,7 +106531,7 @@ var require_graceful_fs = __commonJS({ enumerable: true, configurable: true }); - Object.defineProperty(fs19, "WriteStream", { + Object.defineProperty(fs20, "WriteStream", { get: function() { return WriteStream; }, @@ -106542,7 +106542,7 @@ var require_graceful_fs = __commonJS({ configurable: true }); var FileReadStream = ReadStream; - Object.defineProperty(fs19, "FileReadStream", { + Object.defineProperty(fs20, "FileReadStream", { get: function() { return FileReadStream; }, @@ -106553,7 +106553,7 @@ var require_graceful_fs = __commonJS({ configurable: true }); var FileWriteStream = WriteStream; - Object.defineProperty(fs19, "FileWriteStream", { + Object.defineProperty(fs20, "FileWriteStream", { get: function() { return FileWriteStream; }, @@ -106563,7 +106563,7 @@ var require_graceful_fs = __commonJS({ enumerable: true, configurable: true }); - function ReadStream(path17, options) { + function ReadStream(path18, options) { if (this instanceof ReadStream) return fs$ReadStream.apply(this, arguments), this; else @@ -106583,7 +106583,7 @@ var require_graceful_fs = __commonJS({ } }); } - function WriteStream(path17, options) { + function WriteStream(path18, options) { if (this instanceof WriteStream) return fs$WriteStream.apply(this, arguments), this; else @@ -106601,22 +106601,22 @@ var require_graceful_fs = __commonJS({ } }); } - function createReadStream2(path17, options) { - return new fs19.ReadStream(path17, options); + function createReadStream2(path18, options) { + return new fs20.ReadStream(path18, options); } - function createWriteStream3(path17, options) { - return new fs19.WriteStream(path17, options); + function createWriteStream3(path18, options) { + return new fs20.WriteStream(path18, options); } - var fs$open = fs19.open; - fs19.open = open; - function open(path17, flags, mode, cb) { + var fs$open = fs20.open; + fs20.open = open; + function open(path18, flags, mode, cb) { if (typeof mode === "function") cb = mode, mode = null; - return go$open(path17, flags, mode, cb); - function go$open(path18, flags2, mode2, cb2, startTime) { - return fs$open(path18, flags2, mode2, function(err, fd) { + return go$open(path18, flags, mode, cb); + function go$open(path19, flags2, mode2, cb2, startTime) { + return fs$open(path19, flags2, mode2, function(err, fd) { if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path18, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$open, [path19, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -106624,20 +106624,20 @@ var require_graceful_fs = __commonJS({ }); } } - return fs19; + return fs20; } function enqueue(elem) { debug5("ENQUEUE", elem[0].name, elem[1]); - fs18[gracefulQueue].push(elem); + fs19[gracefulQueue].push(elem); retry2(); } var retryTimer; function resetQueue() { var now = Date.now(); - for (var i = 0; i < fs18[gracefulQueue].length; ++i) { - if (fs18[gracefulQueue][i].length > 2) { - fs18[gracefulQueue][i][3] = now; - fs18[gracefulQueue][i][4] = now; + for (var i = 0; i < fs19[gracefulQueue].length; ++i) { + if (fs19[gracefulQueue][i].length > 2) { + fs19[gracefulQueue][i][3] = now; + fs19[gracefulQueue][i][4] = now; } } retry2(); @@ -106645,9 +106645,9 @@ var require_graceful_fs = __commonJS({ function retry2() { clearTimeout(retryTimer); retryTimer = void 0; - if (fs18[gracefulQueue].length === 0) + if (fs19[gracefulQueue].length === 0) return; - var elem = fs18[gracefulQueue].shift(); + var elem = fs19[gracefulQueue].shift(); var fn = elem[0]; var args = elem[1]; var err = elem[2]; @@ -106669,7 +106669,7 @@ var require_graceful_fs = __commonJS({ debug5("RETRY", fn.name, args); fn.apply(null, args.concat([startTime])); } else { - fs18[gracefulQueue].push(elem); + fs19[gracefulQueue].push(elem); } } if (retryTimer === void 0) { @@ -106969,7 +106969,7 @@ var require_BufferList = __commonJS({ this.head = this.tail = null; this.length = 0; }; - BufferList.prototype.join = function join15(s) { + BufferList.prototype.join = function join16(s) { if (this.length === 0) return ""; var p = this.head; var ret = "" + p.data; @@ -108717,22 +108717,22 @@ var require_lazystream = __commonJS({ // node_modules/normalize-path/index.js var require_normalize_path = __commonJS({ "node_modules/normalize-path/index.js"(exports2, module2) { - module2.exports = function(path17, stripTrailing) { - if (typeof path17 !== "string") { + module2.exports = function(path18, stripTrailing) { + if (typeof path18 !== "string") { throw new TypeError("expected path to be a string"); } - if (path17 === "\\" || path17 === "/") return "/"; - var len = path17.length; - if (len <= 1) return path17; + if (path18 === "\\" || path18 === "/") return "/"; + var len = path18.length; + if (len <= 1) return path18; var prefix = ""; - if (len > 4 && path17[3] === "\\") { - var ch = path17[2]; - if ((ch === "?" || ch === ".") && path17.slice(0, 2) === "\\\\") { - path17 = path17.slice(2); + if (len > 4 && path18[3] === "\\") { + var ch = path18[2]; + if ((ch === "?" || ch === ".") && path18.slice(0, 2) === "\\\\") { + path18 = path18.slice(2); prefix = "//"; } } - var segs = path17.split(/[/\\]+/); + var segs = path18.split(/[/\\]+/); if (stripTrailing !== false && segs[segs.length - 1] === "") { segs.pop(); } @@ -115423,7 +115423,7 @@ var require_stream2 = __commonJS({ var { pipeline } = require_pipeline4(); var { destroyer } = require_destroy2(); var eos = require_end_of_stream(); - var promises5 = require_promises(); + var promises6 = require_promises(); var utils = require_utils8(); var Stream = module2.exports = require_legacy().Stream; Stream.isDestroyed = utils.isDestroyed; @@ -115501,21 +115501,21 @@ var require_stream2 = __commonJS({ configurable: true, enumerable: true, get() { - return promises5; + return promises6; } }); ObjectDefineProperty(pipeline, customPromisify, { __proto__: null, enumerable: true, get() { - return promises5.pipeline; + return promises6.pipeline; } }); ObjectDefineProperty(eos, customPromisify, { __proto__: null, enumerable: true, get() { - return promises5.finished; + return promises6.finished; } }); Stream.Stream = Stream; @@ -115534,7 +115534,7 @@ var require_ours = __commonJS({ "use strict"; var Stream = require("stream"); if (Stream && process.env.READABLE_STREAM === "disable") { - const promises5 = Stream.promises; + const promises6 = Stream.promises; module2.exports._uint8ArrayToBuffer = Stream._uint8ArrayToBuffer; module2.exports._isUint8Array = Stream._isUint8Array; module2.exports.isDisturbed = Stream.isDisturbed; @@ -115554,13 +115554,13 @@ var require_ours = __commonJS({ configurable: true, enumerable: true, get() { - return promises5; + return promises6; } }); module2.exports.Stream = Stream.Stream; } else { const CustomStream = require_stream2(); - const promises5 = require_promises(); + const promises6 = require_promises(); const originalDestroy = CustomStream.Readable.destroy; module2.exports = CustomStream.Readable; module2.exports._uint8ArrayToBuffer = CustomStream._uint8ArrayToBuffer; @@ -115583,7 +115583,7 @@ var require_ours = __commonJS({ configurable: true, enumerable: true, get() { - return promises5; + return promises6; } }); module2.exports.Stream = CustomStream.Stream; @@ -117348,11 +117348,11 @@ var require_commonjs20 = __commonJS({ return (f) => f.length === len && f !== "." && f !== ".."; }; var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix"; - var path17 = { + var path18 = { win32: { sep: "\\" }, posix: { sep: "/" } }; - exports2.sep = defaultPlatform === "win32" ? path17.win32.sep : path17.posix.sep; + exports2.sep = defaultPlatform === "win32" ? path18.win32.sep : path18.posix.sep; exports2.minimatch.sep = exports2.sep; exports2.GLOBSTAR = /* @__PURE__ */ Symbol("globstar **"); exports2.minimatch.GLOBSTAR = exports2.GLOBSTAR; @@ -120630,12 +120630,12 @@ var require_commonjs23 = __commonJS({ /** * Get the Path object referenced by the string path, resolved from this Path */ - resolve(path17) { - if (!path17) { + resolve(path18) { + if (!path18) { return this; } - const rootPath = this.getRootString(path17); - const dir = path17.substring(rootPath.length); + const rootPath = this.getRootString(path18); + const dir = path18.substring(rootPath.length); const dirParts = dir.split(this.splitSep); const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts); return result; @@ -121388,8 +121388,8 @@ var require_commonjs23 = __commonJS({ /** * @internal */ - getRootString(path17) { - return node_path_1.win32.parse(path17).root; + getRootString(path18) { + return node_path_1.win32.parse(path18).root; } /** * @internal @@ -121436,8 +121436,8 @@ var require_commonjs23 = __commonJS({ /** * @internal */ - getRootString(path17) { - return path17.startsWith("/") ? "/" : ""; + getRootString(path18) { + return path18.startsWith("/") ? "/" : ""; } /** * @internal @@ -121487,8 +121487,8 @@ var require_commonjs23 = __commonJS({ * * @internal */ - constructor(cwd = process.cwd(), pathImpl, sep5, { nocase, childrenCacheSize = 16 * 1024, fs: fs18 = defaultFS } = {}) { - this.#fs = fsFromOption(fs18); + constructor(cwd = process.cwd(), pathImpl, sep5, { nocase, childrenCacheSize = 16 * 1024, fs: fs19 = defaultFS } = {}) { + this.#fs = fsFromOption(fs19); if (cwd instanceof URL || cwd.startsWith("file://")) { cwd = (0, node_url_1.fileURLToPath)(cwd); } @@ -121527,11 +121527,11 @@ var require_commonjs23 = __commonJS({ /** * Get the depth of a provided path, string, or the cwd */ - depth(path17 = this.cwd) { - if (typeof path17 === "string") { - path17 = this.cwd.resolve(path17); + depth(path18 = this.cwd) { + if (typeof path18 === "string") { + path18 = this.cwd.resolve(path18); } - return path17.depth(); + return path18.depth(); } /** * Return the cache of child entries. Exposed so subclasses can create @@ -121925,14 +121925,14 @@ var require_commonjs23 = __commonJS({ if (er) return results.emit("error", er); if (follow && !didRealpaths) { - const promises5 = []; + const promises6 = []; for (const e of entries) { if (e.isSymbolicLink()) { - promises5.push(e.realpath().then((r) => r?.isUnknown() ? r.lstat() : r)); + promises6.push(e.realpath().then((r) => r?.isUnknown() ? r.lstat() : r)); } } - if (promises5.length) { - Promise.all(promises5).then(() => onReaddir(null, entries, true)); + if (promises6.length) { + Promise.all(promises6).then(() => onReaddir(null, entries, true)); return; } } @@ -122018,9 +122018,9 @@ var require_commonjs23 = __commonJS({ process2(); return results; } - chdir(path17 = this.cwd) { + chdir(path18 = this.cwd) { const oldCwd = this.cwd; - this.cwd = typeof path17 === "string" ? this.cwd.resolve(path17) : path17; + this.cwd = typeof path18 === "string" ? this.cwd.resolve(path18) : path18; this.cwd[setAsCwd](oldCwd); } }; @@ -122047,8 +122047,8 @@ var require_commonjs23 = __commonJS({ /** * @internal */ - newRoot(fs18) { - return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs18 }); + newRoot(fs19) { + return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs19 }); } /** * Return true if the provided path string is an absolute path @@ -122077,8 +122077,8 @@ var require_commonjs23 = __commonJS({ /** * @internal */ - newRoot(fs18) { - return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs18 }); + newRoot(fs19) { + return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs19 }); } /** * Return true if the provided path string is an absolute path @@ -122408,8 +122408,8 @@ var require_processor = __commonJS({ } // match, absolute, ifdir entries() { - return [...this.store.entries()].map(([path17, n]) => [ - path17, + return [...this.store.entries()].map(([path18, n]) => [ + path18, !!(n & 2), !!(n & 1) ]); @@ -122627,9 +122627,9 @@ var require_walker = __commonJS({ signal; maxDepth; includeChildMatches; - constructor(patterns, path17, opts) { + constructor(patterns, path18, opts) { this.patterns = patterns; - this.path = path17; + this.path = path18; this.opts = opts; this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/"; this.includeChildMatches = opts.includeChildMatches !== false; @@ -122648,11 +122648,11 @@ var require_walker = __commonJS({ }); } } - #ignored(path17) { - return this.seen.has(path17) || !!this.#ignore?.ignored?.(path17); + #ignored(path18) { + return this.seen.has(path18) || !!this.#ignore?.ignored?.(path18); } - #childrenIgnored(path17) { - return !!this.#ignore?.childrenIgnored?.(path17); + #childrenIgnored(path18) { + return !!this.#ignore?.childrenIgnored?.(path18); } // backpressure mechanism pause() { @@ -122868,8 +122868,8 @@ var require_walker = __commonJS({ exports2.GlobUtil = GlobUtil; var GlobWalker = class extends GlobUtil { matches = /* @__PURE__ */ new Set(); - constructor(patterns, path17, opts) { - super(patterns, path17, opts); + constructor(patterns, path18, opts) { + super(patterns, path18, opts); } matchEmit(e) { this.matches.add(e); @@ -122907,8 +122907,8 @@ var require_walker = __commonJS({ exports2.GlobWalker = GlobWalker; var GlobStream = class extends GlobUtil { results; - constructor(patterns, path17, opts) { - super(patterns, path17, opts); + constructor(patterns, path18, opts) { + super(patterns, path18, opts); this.results = new minipass_1.Minipass({ signal: this.signal, objectMode: true @@ -123263,8 +123263,8 @@ var require_commonjs24 = __commonJS({ // node_modules/archiver-utils/file.js var require_file4 = __commonJS({ "node_modules/archiver-utils/file.js"(exports2, module2) { - var fs18 = require_graceful_fs(); - var path17 = require("path"); + var fs19 = require_graceful_fs(); + var path18 = require("path"); var flatten = require_flatten(); var difference = require_difference(); var union = require_union(); @@ -123289,8 +123289,8 @@ var require_file4 = __commonJS({ return result; }; file.exists = function() { - var filepath = path17.join.apply(path17, arguments); - return fs18.existsSync(filepath); + var filepath = path18.join.apply(path18, arguments); + return fs19.existsSync(filepath); }; file.expand = function(...args) { var options = isPlainObject3(args[0]) ? args.shift() : {}; @@ -123303,12 +123303,12 @@ var require_file4 = __commonJS({ }); if (options.filter) { matches = matches.filter(function(filepath) { - filepath = path17.join(options.cwd || "", filepath); + filepath = path18.join(options.cwd || "", filepath); try { if (typeof options.filter === "function") { return options.filter(filepath); } else { - return fs18.statSync(filepath)[options.filter](); + return fs19.statSync(filepath)[options.filter](); } } catch (e) { return false; @@ -123320,7 +123320,7 @@ var require_file4 = __commonJS({ file.expandMapping = function(patterns, destBase, options) { options = Object.assign({ rename: function(destBase2, destPath) { - return path17.join(destBase2 || "", destPath); + return path18.join(destBase2 || "", destPath); } }, options); var files = []; @@ -123328,14 +123328,14 @@ var require_file4 = __commonJS({ file.expand(options, patterns).forEach(function(src) { var destPath = src; if (options.flatten) { - destPath = path17.basename(destPath); + destPath = path18.basename(destPath); } if (options.ext) { destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext); } var dest = options.rename(destBase, destPath, options); if (options.cwd) { - src = path17.join(options.cwd, src); + src = path18.join(options.cwd, src); } dest = dest.replace(pathSeparatorRe, "/"); src = src.replace(pathSeparatorRe, "/"); @@ -123416,8 +123416,8 @@ var require_file4 = __commonJS({ // node_modules/archiver-utils/index.js var require_archiver_utils = __commonJS({ "node_modules/archiver-utils/index.js"(exports2, module2) { - var fs18 = require_graceful_fs(); - var path17 = require("path"); + var fs19 = require_graceful_fs(); + var path18 = require("path"); var isStream = require_is_stream(); var lazystream = require_lazystream(); var normalizePath = require_normalize_path(); @@ -123465,7 +123465,7 @@ var require_archiver_utils = __commonJS({ }; utils.lazyReadStream = function(filepath) { return new lazystream.Readable(function() { - return fs18.createReadStream(filepath); + return fs19.createReadStream(filepath); }); }; utils.normalizeInputSource = function(source) { @@ -123493,7 +123493,7 @@ var require_archiver_utils = __commonJS({ callback = base; base = dirpath; } - fs18.readdir(dirpath, function(err, list) { + fs19.readdir(dirpath, function(err, list) { var i = 0; var file; var filepath; @@ -123505,11 +123505,11 @@ var require_archiver_utils = __commonJS({ if (!file) { return callback(null, results); } - filepath = path17.join(dirpath, file); - fs18.stat(filepath, function(err2, stats) { + filepath = path18.join(dirpath, file); + fs19.stat(filepath, function(err2, stats) { results.push({ path: filepath, - relative: path17.relative(base, filepath).replace(/\\/g, "/"), + relative: path18.relative(base, filepath).replace(/\\/g, "/"), stats }); if (stats && stats.isDirectory()) { @@ -123568,10 +123568,10 @@ var require_error3 = __commonJS({ // node_modules/archiver/lib/core.js var require_core2 = __commonJS({ "node_modules/archiver/lib/core.js"(exports2, module2) { - var fs18 = require("fs"); + var fs19 = require("fs"); var glob2 = require_readdir_glob(); var async = require_async(); - var path17 = require("path"); + var path18 = require("path"); var util = require_archiver_utils(); var inherits = require("util").inherits; var ArchiverError = require_error3(); @@ -123632,7 +123632,7 @@ var require_core2 = __commonJS({ data.sourcePath = filepath; task.data = data; this._entriesCount++; - if (data.stats && data.stats instanceof fs18.Stats) { + if (data.stats && data.stats instanceof fs19.Stats) { task = this._updateQueueTaskWithStats(task, data.stats); if (task) { if (data.stats.size) { @@ -123803,7 +123803,7 @@ var require_core2 = __commonJS({ callback(); return; } - fs18.lstat(task.filepath, function(err, stats) { + fs19.lstat(task.filepath, function(err, stats) { if (this._state.aborted) { setImmediate(callback); return; @@ -123846,10 +123846,10 @@ var require_core2 = __commonJS({ task.data.sourceType = "buffer"; task.source = Buffer.concat([]); } else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) { - var linkPath = fs18.readlinkSync(task.filepath); - var dirName = path17.dirname(task.filepath); + var linkPath = fs19.readlinkSync(task.filepath); + var dirName = path18.dirname(task.filepath); task.data.type = "symlink"; - task.data.linkname = path17.relative(dirName, path17.resolve(dirName, linkPath)); + task.data.linkname = path18.relative(dirName, path18.resolve(dirName, linkPath)); task.data.sourceType = "buffer"; task.source = Buffer.concat([]); } else { @@ -128299,8 +128299,8 @@ var require_context2 = __commonJS({ if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); } else { - const path17 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path17} does not exist${os_1.EOL}`); + const path18 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path18} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -128885,14 +128885,14 @@ var require_util24 = __commonJS({ } const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; let origin = url2.origin != null ? url2.origin : `${url2.protocol}//${url2.hostname}:${port}`; - let path17 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path18 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } - if (path17 && !path17.startsWith("/")) { - path17 = `/${path17}`; + if (path18 && !path18.startsWith("/")) { + path18 = `/${path18}`; } - url2 = new URL(origin + path17); + url2 = new URL(origin + path18); } return url2; } @@ -130506,20 +130506,20 @@ var require_parseParams = __commonJS({ var require_basename = __commonJS({ "node_modules/@fastify/busboy/lib/utils/basename.js"(exports2, module2) { "use strict"; - module2.exports = function basename2(path17) { - if (typeof path17 !== "string") { + module2.exports = function basename2(path18) { + if (typeof path18 !== "string") { return ""; } - for (var i = path17.length - 1; i >= 0; --i) { - switch (path17.charCodeAt(i)) { + for (var i = path18.length - 1; i >= 0; --i) { + switch (path18.charCodeAt(i)) { case 47: // '/' case 92: - path17 = path17.slice(i + 1); - return path17 === ".." || path17 === "." ? "" : path17; + path18 = path18.slice(i + 1); + return path18 === ".." || path18 === "." ? "" : path18; } } - return path17 === ".." || path17 === "." ? "" : path17; + return path18 === ".." || path18 === "." ? "" : path18; }; } }); @@ -133549,7 +133549,7 @@ var require_request5 = __commonJS({ } var Request = class _Request { constructor(origin, { - path: path17, + path: path18, method, body, headers, @@ -133563,11 +133563,11 @@ var require_request5 = __commonJS({ throwOnError, expectContinue }, handler2) { - if (typeof path17 !== "string") { + if (typeof path18 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path17[0] !== "/" && !(path17.startsWith("http://") || path17.startsWith("https://")) && method !== "CONNECT") { + } else if (path18[0] !== "/" && !(path18.startsWith("http://") || path18.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.exec(path17) !== null) { + } else if (invalidPathRegex.exec(path18) !== null) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -133630,7 +133630,7 @@ var require_request5 = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? util.buildURL(path17, query) : path17; + this.path = query ? util.buildURL(path18, query) : path18; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -134638,9 +134638,9 @@ var require_RedirectHandler = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path17 = search ? `${pathname}${search}` : pathname; + const path18 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path17; + this.opts.path = path18; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -135880,7 +135880,7 @@ var require_client3 = __commonJS({ writeH2(client, client[kHTTP2Session], request2); return; } - const { body, method, path: path17, host, upgrade, headers, blocking, reset } = request2; + const { body, method, path: path18, host, upgrade, headers, blocking, reset } = request2; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { body.read(0); @@ -135930,7 +135930,7 @@ var require_client3 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path17} HTTP/1.1\r + let header = `${method} ${path18} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -135993,7 +135993,7 @@ upgrade: ${upgrade}\r return true; } function writeH2(client, session, request2) { - const { body, method, path: path17, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { body, method, path: path18, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; let headers; if (typeof reqHeaders === "string") headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()); else headers = reqHeaders; @@ -136036,7 +136036,7 @@ upgrade: ${upgrade}\r }); return true; } - headers[HTTP2_HEADER_PATH] = path17; + headers[HTTP2_HEADER_PATH] = path18; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -138276,20 +138276,20 @@ var require_mock_utils3 = __commonJS({ } return true; } - function safeUrl(path17) { - if (typeof path17 !== "string") { - return path17; + function safeUrl(path18) { + if (typeof path18 !== "string") { + return path18; } - const pathSegments = path17.split("?"); + const pathSegments = path18.split("?"); if (pathSegments.length !== 2) { - return path17; + return path18; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path17, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path17); + function matchKey(mockDispatch2, { path: path18, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path18); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -138307,7 +138307,7 @@ var require_mock_utils3 = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path17 }) => matchValue(safeUrl(path17), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path18 }) => matchValue(safeUrl(path18), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -138344,9 +138344,9 @@ var require_mock_utils3 = __commonJS({ } } function buildKey(opts) { - const { path: path17, method, body, headers, query } = opts; + const { path: path18, method, body, headers, query } = opts; return { - path: path17, + path: path18, method, body, headers, @@ -138795,10 +138795,10 @@ var require_pending_interceptors_formatter3 = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path17, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path18, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path17, + Path: path18, "Status code": statusCode, Persistent: persist ? "\u2705" : "\u274C", Invocations: timesInvoked, @@ -143418,8 +143418,8 @@ var require_util29 = __commonJS({ } } } - function validateCookiePath(path17) { - for (const char of path17) { + function validateCookiePath(path18) { + for (const char of path18) { const code = char.charCodeAt(0); if (code < 33 || char === ";") { throw new Error("Invalid cookie path"); @@ -145099,11 +145099,11 @@ var require_undici3 = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path17 = opts.path; + let path18 = opts.path; if (!opts.path.startsWith("/")) { - path17 = `/${path17}`; + path18 = `/${path18}`; } - url2 = new URL(util.parseOrigin(url2).origin + path17); + url2 = new URL(util.parseOrigin(url2).origin + path18); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -149953,7 +149953,7 @@ var require_traverse = __commonJS({ })(this.value); }; function walk(root, cb, immutable) { - var path17 = []; + var path18 = []; var parents = []; var alive = true; return (function walker(node_) { @@ -149962,11 +149962,11 @@ var require_traverse = __commonJS({ var state = { node, node_, - path: [].concat(path17), + path: [].concat(path18), parent: parents.slice(-1)[0], - key: path17.slice(-1)[0], - isRoot: path17.length === 0, - level: path17.length, + key: path18.slice(-1)[0], + isRoot: path18.length === 0, + level: path18.length, circular: null, update: function(x) { if (!state.isRoot) { @@ -150021,7 +150021,7 @@ var require_traverse = __commonJS({ parents.push(state); var keys = Object.keys(state.node); keys.forEach(function(key, i2) { - path17.push(key); + path18.push(key); if (modifiers.pre) modifiers.pre.call(state, state.node[key], key); var child = walker(state.node[key]); if (immutable && Object.hasOwnProperty.call(state.node, key)) { @@ -150030,7 +150030,7 @@ var require_traverse = __commonJS({ child.isLast = i2 == keys.length - 1; child.isFirst = i2 == 0; if (modifiers.post) modifiers.post.call(state, child); - path17.pop(); + path18.pop(); }); parents.pop(); } @@ -151051,11 +151051,11 @@ var require_unzip_stream = __commonJS({ return requiredLength; case states.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX: var isUtf8 = (this.parsedEntity.flags & 2048) !== 0; - var path17 = this._decodeString(chunk.slice(0, this.parsedEntity.fileNameLength), isUtf8); + var path18 = this._decodeString(chunk.slice(0, this.parsedEntity.fileNameLength), isUtf8); var extraDataBuffer = chunk.slice(this.parsedEntity.fileNameLength, this.parsedEntity.fileNameLength + this.parsedEntity.extraFieldLength); var extra = this._readExtraFields(extraDataBuffer); if (extra && extra.parsed && extra.parsed.path && !isUtf8) { - path17 = extra.parsed.path; + path18 = extra.parsed.path; } this.parsedEntity.extra = extra.parsed; var isUnix = (this.parsedEntity.versionMadeBy & 65280) >> 8 === 3; @@ -151067,7 +151067,7 @@ var require_unzip_stream = __commonJS({ } if (this.options.debug) { const debugObj = Object.assign({}, this.parsedEntity, { - path: path17, + path: path18, flags: "0x" + this.parsedEntity.flags.toString(16), unixAttrs: unixAttrs && "0" + unixAttrs.toString(8), isSymlink, @@ -151504,8 +151504,8 @@ var require_parser_stream = __commonJS({ // node_modules/mkdirp/index.js var require_mkdirp = __commonJS({ "node_modules/mkdirp/index.js"(exports2, module2) { - var path17 = require("path"); - var fs18 = require("fs"); + var path18 = require("path"); + var fs19 = require("fs"); var _0777 = parseInt("0777", 8); module2.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; function mkdirP(p, opts, f, made) { @@ -151516,7 +151516,7 @@ var require_mkdirp = __commonJS({ opts = { mode: opts }; } var mode = opts.mode; - var xfs = opts.fs || fs18; + var xfs = opts.fs || fs19; if (mode === void 0) { mode = _0777; } @@ -151524,7 +151524,7 @@ var require_mkdirp = __commonJS({ var cb = f || /* istanbul ignore next */ function() { }; - p = path17.resolve(p); + p = path18.resolve(p); xfs.mkdir(p, mode, function(er) { if (!er) { made = made || p; @@ -151532,8 +151532,8 @@ var require_mkdirp = __commonJS({ } switch (er.code) { case "ENOENT": - if (path17.dirname(p) === p) return cb(er); - mkdirP(path17.dirname(p), opts, function(er2, made2) { + if (path18.dirname(p) === p) return cb(er); + mkdirP(path18.dirname(p), opts, function(er2, made2) { if (er2) cb(er2, made2); else mkdirP(p, opts, cb, made2); }); @@ -151555,19 +151555,19 @@ var require_mkdirp = __commonJS({ opts = { mode: opts }; } var mode = opts.mode; - var xfs = opts.fs || fs18; + var xfs = opts.fs || fs19; if (mode === void 0) { mode = _0777; } if (!made) made = null; - p = path17.resolve(p); + p = path18.resolve(p); try { xfs.mkdirSync(p, mode); made = made || p; } catch (err0) { switch (err0.code) { case "ENOENT": - made = sync(path17.dirname(p), opts, made); + made = sync(path18.dirname(p), opts, made); sync(p, opts, made); break; // In the case of any other error, just see if there's a dir @@ -151592,8 +151592,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 fs18 = require("fs"); - var path17 = require("path"); + var fs19 = require("fs"); + var path18 = require("path"); var util = require("util"); var mkdirp = require_mkdirp(); var Transform = require("stream").Transform; @@ -151635,11 +151635,11 @@ var require_extract2 = __commonJS({ }; Extract.prototype._processEntry = function(entry) { var self2 = this; - var destPath = path17.join(this.opts.path, entry.path); - var directory = entry.isDirectory ? destPath : path17.dirname(destPath); + var destPath = path18.join(this.opts.path, entry.path); + var directory = entry.isDirectory ? destPath : path18.dirname(destPath); this.unfinishedEntries++; var writeFileFn = function() { - var pipedStream = fs18.createWriteStream(destPath); + var pipedStream = fs19.createWriteStream(destPath); pipedStream.on("close", function() { self2.unfinishedEntries--; self2._notifyAwaiter(); @@ -151763,10 +151763,10 @@ var require_download_artifact = __commonJS({ parsed.search = ""; return parsed.toString(); }; - function exists(path17) { + function exists(path18) { return __awaiter2(this, void 0, void 0, function* () { try { - yield promises_1.default.access(path17); + yield promises_1.default.access(path18); return true; } catch (error3) { if (error3.code === "ENOENT") { @@ -151998,12 +151998,12 @@ var require_dist_node11 = __commonJS({ octokit.log.debug("request", options); const start = Date.now(); const requestOptions = octokit.request.endpoint.parse(options); - const path17 = requestOptions.url.replace(options.baseUrl, ""); + const path18 = requestOptions.url.replace(options.baseUrl, ""); return request2(options).then((response) => { - octokit.log.info(`${requestOptions.method} ${path17} - ${response.status} in ${Date.now() - start}ms`); + octokit.log.info(`${requestOptions.method} ${path18} - ${response.status} in ${Date.now() - start}ms`); return response; }).catch((error3) => { - octokit.log.info(`${requestOptions.method} ${path17} - ${error3.status} in ${Date.now() - start}ms`); + octokit.log.info(`${requestOptions.method} ${path18} - ${error3.status} in ${Date.now() - start}ms`); throw error3; }); }); @@ -152837,7 +152837,7 @@ var require_file_command2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; var crypto2 = __importStar2(require("crypto")); - var fs18 = __importStar2(require("fs")); + var fs19 = __importStar2(require("fs")); var os4 = __importStar2(require("os")); var utils_1 = require_utils12(); function issueFileCommand(command, message) { @@ -152845,10 +152845,10 @@ var require_file_command2 = __commonJS({ if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); } - if (!fs18.existsSync(filePath)) { + if (!fs19.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs18.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os4.EOL}`, { + fs19.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os4.EOL}`, { encoding: "utf8" }); } @@ -154098,7 +154098,7 @@ var require_path_utils2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -154108,7 +154108,7 @@ var require_path_utils2 = __commonJS({ } exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path17.sep); + return pth.replace(/[/\\]/g, path18.sep); } exports2.toPlatformPath = toPlatformPath; } @@ -154171,12 +154171,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 fs18 = __importStar2(require("fs")); - var path17 = __importStar2(require("path")); - _a = fs18.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + var fs19 = __importStar2(require("fs")); + var path18 = __importStar2(require("path")); + _a = fs19.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 = fs18.constants.O_RDONLY; + exports2.READONLY = fs19.constants.O_RDONLY; function exists(fsPath) { return __awaiter2(this, void 0, void 0, function* () { try { @@ -154221,7 +154221,7 @@ var require_io_util2 = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path17.extname(filePath).toUpperCase(); + const upperExt = path18.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -154245,11 +154245,11 @@ var require_io_util2 = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path17.dirname(filePath); - const upperName = path17.basename(filePath).toUpperCase(); + const directory = path18.dirname(filePath); + const upperName = path18.basename(filePath).toUpperCase(); for (const actualName of yield exports2.readdir(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path17.join(directory, actualName); + filePath = path18.join(directory, actualName); break; } } @@ -154344,7 +154344,7 @@ var require_io2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; var assert_1 = require("assert"); - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var ioUtil = __importStar2(require_io_util2()); function cp(source, dest, options = {}) { return __awaiter2(this, void 0, void 0, function* () { @@ -154353,7 +154353,7 @@ var require_io2 = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path17.join(dest, path17.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path18.join(dest, path18.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -154365,7 +154365,7 @@ var require_io2 = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path17.relative(source, newDest) === "") { + if (path18.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile2(source, newDest, force); @@ -154378,7 +154378,7 @@ var require_io2 = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path17.join(dest, path17.basename(source)); + dest = path18.join(dest, path18.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -154389,7 +154389,7 @@ var require_io2 = __commonJS({ } } } - yield mkdirP(path17.dirname(dest)); + yield mkdirP(path18.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -154452,7 +154452,7 @@ var require_io2 = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path17.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path18.delimiter)) { if (extension) { extensions.push(extension); } @@ -154465,12 +154465,12 @@ var require_io2 = __commonJS({ } return []; } - if (tool.includes(path17.sep)) { + if (tool.includes(path18.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path17.delimiter)) { + for (const p of process.env.PATH.split(path18.delimiter)) { if (p) { directories.push(p); } @@ -154478,7 +154478,7 @@ var require_io2 = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path17.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path18.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -154594,7 +154594,7 @@ var require_toolrunner2 = __commonJS({ var os4 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var io7 = __importStar2(require_io2()); var ioUtil = __importStar2(require_io_util2()); var timers_1 = require("timers"); @@ -154809,7 +154809,7 @@ var require_toolrunner2 = __commonJS({ exec() { return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { - this.toolPath = path17.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path18.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io7.which(this.toolPath, true); return new Promise((resolve8, reject) => __awaiter2(this, void 0, void 0, function* () { @@ -155309,7 +155309,7 @@ var require_core3 = __commonJS({ var file_command_1 = require_file_command2(); var utils_1 = require_utils12(); var os4 = __importStar2(require("os")); - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils2(); var ExitCode; (function(ExitCode2) { @@ -155337,7 +155337,7 @@ var require_core3 = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path17.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path18.delimiter}${process.env["PATH"]}`; } exports2.addPath = addPath; function getInput2(name, options) { @@ -155513,13 +155513,13 @@ These characters are not allowed in the artifact name due to limitations with ce (0, core_1.info)(`Artifact name is valid!`); } exports2.checkArtifactName = checkArtifactName; - function checkArtifactFilePath(path17) { - if (!path17) { - throw new Error(`Artifact path: ${path17}, is incorrectly provided`); + function checkArtifactFilePath(path18) { + if (!path18) { + throw new Error(`Artifact path: ${path18}, is incorrectly provided`); } for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) { - if (path17.includes(invalidCharacterKey)) { - throw new Error(`Artifact path is not valid: ${path17}. Contains the following character: ${errorMessageForCharacter} + if (path18.includes(invalidCharacterKey)) { + throw new Error(`Artifact path is not valid: ${path18}. Contains the following character: ${errorMessageForCharacter} Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()} @@ -155565,25 +155565,25 @@ var require_upload_specification = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUploadSpecification = void 0; - var fs18 = __importStar2(require("fs")); + var fs19 = __importStar2(require("fs")); var core_1 = require_core3(); 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 (!fs18.existsSync(rootDirectory)) { + if (!fs19.existsSync(rootDirectory)) { throw new Error(`Provided rootDirectory ${rootDirectory} does not exist`); } - if (!fs18.statSync(rootDirectory).isDirectory()) { + if (!fs19.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 (!fs18.existsSync(file)) { + if (!fs19.existsSync(file)) { throw new Error(`File ${file} does not exist`); } - if (!fs18.statSync(file).isDirectory()) { + if (!fs19.statSync(file).isDirectory()) { file = (0, path_1.normalize)(file); file = (0, path_1.resolve)(file); if (!file.startsWith(rootDirectory)) { @@ -155608,11 +155608,11 @@ var require_upload_specification = __commonJS({ // node_modules/tmp/lib/tmp.js var require_tmp = __commonJS({ "node_modules/tmp/lib/tmp.js"(exports2, module2) { - var fs18 = require("fs"); + var fs19 = require("fs"); var os4 = require("os"); - var path17 = require("path"); + var path18 = require("path"); var crypto2 = require("crypto"); - var _c = { fs: fs18.constants, os: os4.constants }; + var _c = { fs: fs19.constants, os: os4.constants }; var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; var TEMPLATE_PATTERN = /XXXXXX/; var DEFAULT_TRIES = 3; @@ -155624,13 +155624,13 @@ var require_tmp = __commonJS({ var FILE_MODE = 384; var EXIT = "exit"; var _removeObjects = []; - var FN_RMDIR_SYNC = fs18.rmdirSync.bind(fs18); + var FN_RMDIR_SYNC = fs19.rmdirSync.bind(fs19); var _gracefulCleanup = false; function rimraf(dirPath, callback) { - return fs18.rm(dirPath, { recursive: true }, callback); + return fs19.rm(dirPath, { recursive: true }, callback); } function FN_RIMRAF_SYNC(dirPath) { - return fs18.rmSync(dirPath, { recursive: true }); + return fs19.rmSync(dirPath, { recursive: true }); } function tmpName(options, callback) { const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; @@ -155640,7 +155640,7 @@ var require_tmp = __commonJS({ (function _getUniqueName() { try { const name = _generateTmpName(sanitizedOptions); - fs18.stat(name, function(err2) { + fs19.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)); @@ -155660,7 +155660,7 @@ var require_tmp = __commonJS({ do { const name = _generateTmpName(sanitizedOptions); try { - fs18.statSync(name); + fs19.statSync(name); } catch (e) { return name; } @@ -155671,10 +155671,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); - fs18.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) { + fs19.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) { if (err2) return cb(err2); if (opts.discardDescriptor) { - return fs18.close(fd, function _discardCallback(possibleErr) { + return fs19.close(fd, function _discardCallback(possibleErr) { return cb(possibleErr, name, void 0, _prepareTmpFileRemoveCallback(name, -1, opts, false)); }); } else { @@ -155688,9 +155688,9 @@ var require_tmp = __commonJS({ const args = _parseArguments(options), opts = args[0]; const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor; const name = tmpNameSync(opts); - let fd = fs18.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE); + let fd = fs19.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE); if (opts.discardDescriptor) { - fs18.closeSync(fd); + fs19.closeSync(fd); fd = void 0; } return { @@ -155703,7 +155703,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); - fs18.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) { + fs19.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) { if (err2) return cb(err2); cb(null, name, _prepareTmpDirRemoveCallback(name, opts, false)); }); @@ -155712,7 +155712,7 @@ var require_tmp = __commonJS({ function dirSync(options) { const args = _parseArguments(options), opts = args[0]; const name = tmpNameSync(opts); - fs18.mkdirSync(name, opts.mode || DIR_MODE); + fs19.mkdirSync(name, opts.mode || DIR_MODE); return { name, removeCallback: _prepareTmpDirRemoveCallback(name, opts, true) @@ -155726,20 +155726,20 @@ var require_tmp = __commonJS({ next(); }; if (0 <= fdPath[0]) - fs18.close(fdPath[0], function() { - fs18.unlink(fdPath[1], _handler); + fs19.close(fdPath[0], function() { + fs19.unlink(fdPath[1], _handler); }); - else fs18.unlink(fdPath[1], _handler); + else fs19.unlink(fdPath[1], _handler); } function _removeFileSync(fdPath) { let rethrownException = null; try { - if (0 <= fdPath[0]) fs18.closeSync(fdPath[0]); + if (0 <= fdPath[0]) fs19.closeSync(fdPath[0]); } catch (e) { if (!_isEBADF(e) && !_isENOENT(e)) throw e; } finally { try { - fs18.unlinkSync(fdPath[1]); + fs19.unlinkSync(fdPath[1]); } catch (e) { if (!_isENOENT(e)) rethrownException = e; } @@ -155755,7 +155755,7 @@ var require_tmp = __commonJS({ return sync ? removeCallbackSync : removeCallback; } function _prepareTmpDirRemoveCallback(name, opts, sync) { - const removeFunction = opts.unsafeCleanup ? rimraf : fs18.rmdir.bind(fs18); + const removeFunction = opts.unsafeCleanup ? rimraf : fs19.rmdir.bind(fs19); const removeFunctionSync = opts.unsafeCleanup ? FN_RIMRAF_SYNC : FN_RMDIR_SYNC; const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name, sync); const removeCallback = _prepareRemoveCallback(removeFunction, name, sync, removeCallbackSync); @@ -155817,35 +155817,35 @@ var require_tmp = __commonJS({ return [actualOptions, callback]; } function _resolvePath(name, tmpDir, cb) { - const pathToResolve = path17.isAbsolute(name) ? name : path17.join(tmpDir, name); - fs18.stat(pathToResolve, function(err) { + const pathToResolve = path18.isAbsolute(name) ? name : path18.join(tmpDir, name); + fs19.stat(pathToResolve, function(err) { if (err) { - fs18.realpath(path17.dirname(pathToResolve), function(err2, parentDir) { + fs19.realpath(path18.dirname(pathToResolve), function(err2, parentDir) { if (err2) return cb(err2); - cb(null, path17.join(parentDir, path17.basename(pathToResolve))); + cb(null, path18.join(parentDir, path18.basename(pathToResolve))); }); } else { - fs18.realpath(path17, cb); + fs19.realpath(path18, cb); } }); } function _resolvePathSync(name, tmpDir) { - const pathToResolve = path17.isAbsolute(name) ? name : path17.join(tmpDir, name); + const pathToResolve = path18.isAbsolute(name) ? name : path18.join(tmpDir, name); try { - fs18.statSync(pathToResolve); - return fs18.realpathSync(pathToResolve); + fs19.statSync(pathToResolve); + return fs19.realpathSync(pathToResolve); } catch (_err) { - const parentDir = fs18.realpathSync(path17.dirname(pathToResolve)); - return path17.join(parentDir, path17.basename(pathToResolve)); + const parentDir = fs19.realpathSync(path18.dirname(pathToResolve)); + return path18.join(parentDir, path18.basename(pathToResolve)); } } function _generateTmpName(opts) { const tmpDir = opts.tmpdir; if (!_isUndefined(opts.name)) { - return path17.join(tmpDir, opts.dir, opts.name); + return path18.join(tmpDir, opts.dir, opts.name); } if (!_isUndefined(opts.template)) { - return path17.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); + return path18.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); } const name = [ opts.prefix ? opts.prefix : "tmp", @@ -155855,13 +155855,13 @@ var require_tmp = __commonJS({ _randomChars(12), opts.postfix ? "-" + opts.postfix : "" ].join(""); - return path17.join(tmpDir, opts.dir, name); + return path18.join(tmpDir, opts.dir, name); } function _assertOptionsBase(options) { if (!_isUndefined(options.name)) { const name = options.name; - if (path17.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`); - const basename2 = path17.basename(name); + if (path18.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`); + const basename2 = path18.basename(name); if (basename2 === ".." || basename2 === "." || basename2 !== name) throw new Error(`name option must not contain a path, found "${name}".`); } @@ -155883,7 +155883,7 @@ var require_tmp = __commonJS({ if (_isUndefined(name)) return cb(null); _resolvePath(name, tmpDir, function(err, resolvedPath) { if (err) return cb(err); - const relativePath = path17.relative(tmpDir, resolvedPath); + const relativePath = path18.relative(tmpDir, resolvedPath); if (!resolvedPath.startsWith(tmpDir)) { return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`)); } @@ -155893,7 +155893,7 @@ var require_tmp = __commonJS({ function _getRelativePathSync(option, name, tmpDir) { if (_isUndefined(name)) return; const resolvedPath = _resolvePathSync(name, tmpDir); - const relativePath = path17.relative(tmpDir, resolvedPath); + const relativePath = path18.relative(tmpDir, resolvedPath); if (!resolvedPath.startsWith(tmpDir)) { throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`); } @@ -155940,10 +155940,10 @@ var require_tmp = __commonJS({ _gracefulCleanup = true; } function _getTmpDir(options, cb) { - return fs18.realpath(options && options.tmpdir || os4.tmpdir(), cb); + return fs19.realpath(options && options.tmpdir || os4.tmpdir(), cb); } function _getTmpDirSync(options) { - return fs18.realpathSync(options && options.tmpdir || os4.tmpdir()); + return fs19.realpathSync(options && options.tmpdir || os4.tmpdir()); } process.addListener(EXIT, _garbageCollector); Object.defineProperty(module2.exports, "tmpdir", { @@ -155973,14 +155973,14 @@ var require_tmp_promise = __commonJS({ var fileWithOptions = promisify( (options, cb) => tmp.file( options, - (err, path17, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path17, fd, cleanup: promisify(cleanup) }) + (err, path18, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path18, fd, cleanup: promisify(cleanup) }) ) ); module2.exports.file = async (options) => fileWithOptions(options); module2.exports.withFile = async function withFile(fn, options) { - const { path: path17, fd, cleanup } = await module2.exports.file(options); + const { path: path18, fd, cleanup } = await module2.exports.file(options); try { - return await fn({ path: path17, fd }); + return await fn({ path: path18, fd }); } finally { await cleanup(); } @@ -155989,14 +155989,14 @@ var require_tmp_promise = __commonJS({ var dirWithOptions = promisify( (options, cb) => tmp.dir( options, - (err, path17, cleanup) => err ? cb(err) : cb(void 0, { path: path17, cleanup: promisify(cleanup) }) + (err, path18, cleanup) => err ? cb(err) : cb(void 0, { path: path18, cleanup: promisify(cleanup) }) ) ); module2.exports.dir = async (options) => dirWithOptions(options); module2.exports.withDir = async function withDir(fn, options) { - const { path: path17, cleanup } = await module2.exports.dir(options); + const { path: path18, cleanup } = await module2.exports.dir(options); try { - return await fn({ path: path17 }); + return await fn({ path: path18 }); } finally { await cleanup(); } @@ -156797,10 +156797,10 @@ var require_upload_gzip = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createGZipFileInBuffer = exports2.createGZipFileOnDisk = void 0; - var fs18 = __importStar2(require("fs")); + var fs19 = __importStar2(require("fs")); var zlib3 = __importStar2(require("zlib")); var util_1 = require("util"); - var stat = (0, util_1.promisify)(fs18.stat); + var stat = (0, util_1.promisify)(fs19.stat); var gzipExemptFileExtensions = [ ".gz", ".gzip", @@ -156833,9 +156833,9 @@ var require_upload_gzip = __commonJS({ } } return new Promise((resolve8, reject) => { - const inputStream = fs18.createReadStream(originalFilePath); + const inputStream = fs19.createReadStream(originalFilePath); const gzip = zlib3.createGzip(); - const outputStream = fs18.createWriteStream(tempFilePath); + const outputStream = fs19.createWriteStream(tempFilePath); inputStream.pipe(gzip).pipe(outputStream); outputStream.on("finish", () => __awaiter2(this, void 0, void 0, function* () { const size = (yield stat(tempFilePath)).size; @@ -156853,7 +156853,7 @@ var require_upload_gzip = __commonJS({ return __awaiter2(this, void 0, void 0, function* () { return new Promise((resolve8) => __awaiter2(this, void 0, void 0, function* () { var _a, e_1, _b, _c; - const inputStream = fs18.createReadStream(originalFilePath); + const inputStream = fs19.createReadStream(originalFilePath); const gzip = zlib3.createGzip(); inputStream.pipe(gzip); const chunks = []; @@ -157062,7 +157062,7 @@ var require_upload_http_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UploadHttpClient = void 0; - var fs18 = __importStar2(require("fs")); + var fs19 = __importStar2(require("fs")); var core17 = __importStar2(require_core3()); var tmp = __importStar2(require_tmp_promise()); var stream2 = __importStar2(require("stream")); @@ -157076,7 +157076,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)(fs18.stat); + var stat = (0, util_1.promisify)(fs19.stat); var UploadHttpClient = class { constructor() { this.uploadHttpManager = new http_manager_1.HttpManager((0, config_variables_1.getUploadFileConcurrency)(), "@actions/artifact-upload"); @@ -157213,7 +157213,7 @@ var require_upload_http_client = __commonJS({ let openUploadStream; if (totalFileSize < buffer.byteLength) { core17.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 = () => fs18.createReadStream(parameters.file); + openUploadStream = () => fs19.createReadStream(parameters.file); isGzip = false; uploadFileSize = totalFileSize; } else { @@ -157259,7 +157259,7 @@ var require_upload_http_client = __commonJS({ failedChunkSizes += chunkSize; continue; } - const result = yield this.uploadChunk(httpClientIndex, parameters.resourceUrl, () => fs18.createReadStream(uploadFilePath, { + const result = yield this.uploadChunk(httpClientIndex, parameters.resourceUrl, () => fs19.createReadStream(uploadFilePath, { start: startChunkIndex, end: endChunkIndex, autoClose: false @@ -157454,7 +157454,7 @@ var require_download_http_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DownloadHttpClient = void 0; - var fs18 = __importStar2(require("fs")); + var fs19 = __importStar2(require("fs")); var core17 = __importStar2(require_core3()); var zlib3 = __importStar2(require("zlib")); var utils_1 = require_utils13(); @@ -157545,7 +157545,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 = fs18.createWriteStream(downloadPath); + let destinationStream = fs19.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); @@ -157587,7 +157587,7 @@ var require_download_http_client = __commonJS({ } }); yield (0, utils_1.rmFile)(fileDownloadPath); - destinationStream = fs18.createWriteStream(fileDownloadPath); + destinationStream = fs19.createWriteStream(fileDownloadPath); }); while (retryCount <= retryLimit) { let response; @@ -157704,21 +157704,21 @@ var require_download_specification = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadSpecification = void 0; - var path17 = __importStar2(require("path")); + var path18 = __importStar2(require("path")); function getDownloadSpecification(artifactName, artifactEntries, downloadPath, includeRootDirectory) { const directories = /* @__PURE__ */ new Set(); const specifications = { - rootDownloadLocation: includeRootDirectory ? path17.join(downloadPath, artifactName) : downloadPath, + rootDownloadLocation: includeRootDirectory ? path18.join(downloadPath, artifactName) : downloadPath, directoryStructure: [], emptyFilesToCreate: [], filesToDownload: [] }; for (const entry of artifactEntries) { if (entry.path.startsWith(`${artifactName}/`) || entry.path.startsWith(`${artifactName}\\`)) { - const normalizedPathEntry = path17.normalize(entry.path); - const filePath = path17.join(downloadPath, includeRootDirectory ? normalizedPathEntry : normalizedPathEntry.replace(artifactName, "")); + const normalizedPathEntry = path18.normalize(entry.path); + const filePath = path18.join(downloadPath, includeRootDirectory ? normalizedPathEntry : normalizedPathEntry.replace(artifactName, "")); if (entry.itemType === "file") { - directories.add(path17.dirname(filePath)); + directories.add(path18.dirname(filePath)); if (entry.fileLength === 0) { specifications.emptyFilesToCreate.push(filePath); } else { @@ -157860,7 +157860,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz return uploadResponse; }); } - downloadArtifact(name, path17, options) { + downloadArtifact(name, path18, options) { return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const artifacts = yield downloadHttpClient.listArtifacts(); @@ -157874,12 +157874,12 @@ Note: The size of downloaded zips can differ significantly from the reported siz throw new Error(`Unable to find an artifact with the name: ${name}`); } const items = yield downloadHttpClient.getContainerItems(artifactToDownload.name, artifactToDownload.fileContainerResourceUrl); - if (!path17) { - path17 = (0, config_variables_1.getWorkSpaceDirectory)(); + if (!path18) { + path18 = (0, config_variables_1.getWorkSpaceDirectory)(); } - path17 = (0, path_1.normalize)(path17); - path17 = (0, path_1.resolve)(path17); - const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path17, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); + path18 = (0, path_1.normalize)(path18); + path18 = (0, path_1.resolve)(path18); + const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path18, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); if (downloadSpecification.filesToDownload.length === 0) { core17.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`); } else { @@ -157894,7 +157894,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz }; }); } - downloadAllArtifacts(path17) { + downloadAllArtifacts(path18) { return __awaiter2(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const response = []; @@ -157903,18 +157903,18 @@ Note: The size of downloaded zips can differ significantly from the reported siz core17.info("Unable to find any artifacts for the associated workflow"); return response; } - if (!path17) { - path17 = (0, config_variables_1.getWorkSpaceDirectory)(); + if (!path18) { + path18 = (0, config_variables_1.getWorkSpaceDirectory)(); } - path17 = (0, path_1.normalize)(path17); - path17 = (0, path_1.resolve)(path17); + path18 = (0, path_1.normalize)(path18); + path18 = (0, path_1.resolve)(path18); let downloadedArtifacts = 0; while (downloadedArtifacts < artifacts.count) { const currentArtifactToDownload = artifacts.value[downloadedArtifacts]; downloadedArtifacts += 1; core17.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`); const items = yield downloadHttpClient.getContainerItems(currentArtifactToDownload.name, currentArtifactToDownload.fileContainerResourceUrl); - const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path17, true); + const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path18, true); if (downloadSpecification.filesToDownload.length === 0) { core17.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`); } else { @@ -160871,21 +160871,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 fs18 = options.fs || await import("node:fs/promises"); + const fs19 = 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 fs18.lstat(itemPath, { bigint: true }) : await fs18.lstat(itemPath, { bigint: true }).catch((error3) => errors.push(error3)); + const stats = returnType.strict ? await fs19.lstat(itemPath, { bigint: true }) : await fs19.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 fs18.readdir(itemPath) : await fs18.readdir(itemPath).catch((error3) => errors.push(error3)); + const directoryItems = returnType.strict ? await fs19.readdir(itemPath) : await fs19.readdir(itemPath).catch((error3) => errors.push(error3)); if (typeof directoryItems !== "object") return; await Promise.all( directoryItems.map( @@ -163662,7 +163662,7 @@ async function codeQlVersionAtLeast(codeql, requiredVersion) { function getBaseDatabaseOidsFilePath(config) { return path.join(config.dbLocation, BASE_DATABASE_OIDS_FILE_NAME); } -async function bundleDb(config, language, codeql, dbName) { +async function bundleDb(config, language, codeql, dbName, { includeDiagnostics }) { const databasePath = getCodeQLDatabasePath(config, language); const databaseBundlePath = path.resolve(config.dbLocation, `${dbName}.zip`); if (fs.existsSync(databaseBundlePath)) { @@ -163681,6 +163681,7 @@ async function bundleDb(config, language, codeql, dbName) { databasePath, databaseBundlePath, dbName, + includeDiagnostics, additionalFiles ); return databaseBundlePath; @@ -163733,6 +163734,24 @@ function listFolder(dir) { } return files; } +var hadTimeout = false; +async function waitForResultWithTimeLimit(timeoutMs, promise, onTimeout) { + let finished = false; + const mainTask = async () => { + const result = await promise; + finished = true; + return result; + }; + const timeoutTask = async () => { + await delay(timeoutMs, { allowProcessExit: true }); + if (!finished) { + hadTimeout = true; + onTimeout(); + } + return void 0; + }; + return await Promise.race([mainTask(), timeoutTask()]); +} function parseMatrixInput(matrixInput) { if (matrixInput === void 0 || matrixInput === "null") { return void 0; @@ -164296,8 +164315,8 @@ function wrapApiConfigurationError(e) { var core6 = __toESM(require_core()); // src/codeql.ts -var fs10 = __toESM(require("fs")); -var path10 = __toESM(require("path")); +var fs11 = __toESM(require("fs")); +var path11 = __toESM(require("path")); var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -164544,8 +164563,8 @@ function wrapCliConfigurationError(cliError) { } // src/config-utils.ts -var fs6 = __toESM(require("fs")); -var path7 = __toESM(require("path")); +var fs7 = __toESM(require("fs")); +var path8 = __toESM(require("path")); // src/analyses.ts var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { @@ -164718,7 +164737,7 @@ var semver5 = __toESM(require_semver2()); var bundleVersion = "codeql-bundle-v2.24.1"; var cliVersion = "2.24.1"; -// src/overlay-database-utils.ts +// src/overlay/index.ts var fs3 = __toESM(require("fs")); var path4 = __toESM(require("path")); var actionsCache = __toESM(require_cache5()); @@ -164848,8 +164867,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path17 = decodeGitFilePath(match[2]); - fileOidMap[path17] = oid; + const path18 = decodeGitFilePath(match[2]); + fileOidMap[path18] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -164922,7 +164941,7 @@ async function isAnalyzingDefaultBranch() { return currentRef === defaultBranch; } -// src/overlay-database-utils.ts +// src/overlay/index.ts var CODEQL_OVERLAY_MINIMUM_VERSION = "2.23.8"; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 7500; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6; @@ -165139,6 +165158,16 @@ var featureConfig = { envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_CSHARP", minimumVersion: void 0 }, + ["overlay_analysis_status_check" /* OverlayAnalysisStatusCheck */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_CHECK", + minimumVersion: void 0 + }, + ["overlay_analysis_status_save" /* OverlayAnalysisStatusSave */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_SAVE", + minimumVersion: void 0 + }, ["overlay_analysis_go" /* OverlayAnalysisGo */]: { defaultValue: false, envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_GO", @@ -165524,8 +165553,52 @@ ${jsonContents}` return JSON.parse(jsonContents); } -// src/trap-caching.ts +// src/overlay/status.ts +var fs6 = __toESM(require("fs")); +var path7 = __toESM(require("path")); var actionsCache2 = __toESM(require_cache5()); +var MAX_CACHE_OPERATION_MS = 3e4; +var STATUS_FILE_NAME = "overlay-status.json"; +function getStatusFilePath(languages) { + return path7.join( + getTemporaryDirectory(), + "overlay-status", + [...languages].sort().join("+"), + STATUS_FILE_NAME + ); +} +async function saveOverlayStatus(codeql, languages, diskUsage, status, logger) { + const cacheKey = await getCacheKey(codeql, languages, diskUsage); + const statusFile = getStatusFilePath(languages); + await fs6.promises.mkdir(path7.dirname(statusFile), { recursive: true }); + await fs6.promises.writeFile(statusFile, JSON.stringify(status)); + try { + const cacheId = await waitForResultWithTimeLimit( + MAX_CACHE_OPERATION_MS, + actionsCache2.saveCache([statusFile], cacheKey), + () => { + } + ); + if (cacheId === void 0) { + logger.warning("Timed out saving overlay status to cache."); + return false; + } + logger.info(`Saved overlay status to Actions cache with key ${cacheKey}`); + return true; + } catch (error3) { + logger.warning( + `Failed to save overlay status to cache: ${getErrorMessage(error3)}` + ); + return false; + } +} +async function getCacheKey(codeql, languages, diskUsage) { + const diskSpaceToNearest10Gb = `${10 * Math.floor(diskUsage.numTotalBytes / (10 * 1024 * 1024 * 1024))}GB`; + return `codeql-overlay-status-${[...languages].sort().join("+")}-${(await codeql.getVersion()).version}-runner-${diskSpaceToNearest10Gb}`; +} + +// src/trap-caching.ts +var actionsCache3 = __toESM(require_cache5()); // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; @@ -165556,14 +165629,14 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = { swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */ }; function getPathToParsedConfigFile(tempDir) { - return path7.join(tempDir, "config"); + return path8.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); - if (!fs6.existsSync(configFile)) { + if (!fs7.existsSync(configFile)) { return void 0; } - const configString = fs6.readFileSync(configFile, "utf8"); + const configString = fs7.readFileSync(configFile, "utf8"); logger.debug("Loaded config:"); logger.debug(configString); const config = JSON.parse(configString); @@ -165602,8 +165675,8 @@ function isCodeScanningEnabled(config) { } // src/setup-codeql.ts -var fs9 = __toESM(require("fs")); -var path9 = __toESM(require("path")); +var fs10 = __toESM(require("fs")); +var path10 = __toESM(require("path")); var toolcache3 = __toESM(require_tool_cache()); var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var semver8 = __toESM(require_semver2()); @@ -165664,7 +165737,7 @@ var v4_default = v4; // src/tar.ts var import_child_process = require("child_process"); -var fs7 = __toESM(require("fs")); +var fs8 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); var io4 = __toESM(require_io()); @@ -165737,7 +165810,7 @@ async function isZstdAvailable(logger) { } } async function extract(tarPath, dest, compressionMethod, tarVersion, logger) { - fs7.mkdirSync(dest, { recursive: true }); + fs8.mkdirSync(dest, { recursive: true }); switch (compressionMethod) { case "gzip": return await toolcache.extractTar(tarPath, dest); @@ -165821,9 +165894,9 @@ function inferCompressionMethod(tarPath) { } // src/tools-download.ts -var fs8 = __toESM(require("fs")); +var fs9 = __toESM(require("fs")); var os = __toESM(require("os")); -var path8 = __toESM(require("path")); +var path9 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -165928,7 +166001,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorization, headers, tarVersion, logger) { - fs8.mkdirSync(dest, { recursive: true }); + fs9.mkdirSync(dest, { recursive: true }); const agent = new import_http_client.HttpClient().getAgent(codeqlURL); headers = Object.assign( { "User-Agent": "CodeQL Action" }, @@ -165956,7 +166029,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path8.join( + return path9.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver7.clean(version) || version, @@ -165965,7 +166038,7 @@ function getToolcacheDirectory(version) { } function writeToolcacheMarkerFile(extractedPath, logger) { const markerFilePath = `${extractedPath}.complete`; - fs8.writeFileSync(markerFilePath, ""); + fs9.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } function sanitizeUrlForStatusReport(url2) { @@ -166100,7 +166173,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs9.existsSync(path9.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs10.existsSync(path10.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -166499,7 +166572,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path9.join(tempDir, v4_default()); + return path10.join(tempDir, v4_default()); } async function getNightlyToolsUrl(logger) { const zstdAvailability = await isZstdAvailable(logger); @@ -166587,7 +166660,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path10.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path11.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -166649,12 +166722,12 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path10.join( + const tracingConfigPath = path11.join( extractorPath, "tools", "tracing-config.lua" ); - return fs10.existsSync(tracingConfigPath); + return fs11.existsSync(tracingConfigPath); }, async isScannedLanguage(language) { return !await this.isTracedLanguage(language); @@ -166731,7 +166804,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path10.join( + const autobuildCmd = path11.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -166924,14 +166997,18 @@ ${output}` await runCli(cmd, codeqlArgs); } }, - async databaseBundle(databasePath, outputFilePath, databaseName, alsoIncludeRelativePaths) { + async databaseBundle(databasePath, outputFilePath, databaseName, includeDiagnostics, alsoIncludeRelativePaths) { + const includeDiagnosticsArgs = includeDiagnostics ? ["--include-diagnostics"] : []; const args = [ "database", "bundle", databasePath, `--output=${outputFilePath}`, `--name=${databaseName}`, - ...getExtraOptionsFromEnv(["database", "bundle"]) + ...includeDiagnosticsArgs, + ...getExtraOptionsFromEnv(["database", "bundle"], { + ignoringOptions: includeDiagnosticsArgs + }) ]; if (await this.supportsFeature("bundleSupportsIncludeOption" /* BundleSupportsIncludeOption */)) { args.push( @@ -167130,7 +167207,7 @@ async function writeCodeScanningConfigFile(config, logger) { logger.startGroup("Augmented user configuration file contents"); logger.info(dump(augmentedConfig)); logger.endGroup(); - fs10.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); + fs11.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); return codeScanningConfigFile; } var TRAP_CACHE_SIZE_MB = 1024; @@ -167153,7 +167230,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path10.resolve(config.tempDir, "user-config.yaml"); + return path11.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -167174,23 +167251,23 @@ async function getJobRunUuidSarifOptions(codeql) { } // src/debug-artifacts.ts -var fs13 = __toESM(require("fs")); -var path13 = __toESM(require("path")); +var fs14 = __toESM(require("fs")); +var path14 = __toESM(require("path")); var artifact = __toESM(require_artifact2()); var artifactLegacy = __toESM(require_artifact_client2()); var core12 = __toESM(require_core()); var import_archiver = __toESM(require_archiver()); // src/analyze.ts -var fs11 = __toESM(require("fs")); -var path11 = __toESM(require("path")); +var fs12 = __toESM(require("fs")); +var path12 = __toESM(require("path")); var io5 = __toESM(require_io()); // src/autobuild.ts var core11 = __toESM(require_core()); // src/dependency-caching.ts -var actionsCache3 = __toESM(require_cache5()); +var actionsCache4 = __toESM(require_cache5()); var glob = __toESM(require_glob()); var CODEQL_DEPENDENCY_CACHE_PREFIX = "codeql-dependencies"; async function getDependencyCacheUsage(logger) { @@ -167214,7 +167291,7 @@ function dbIsFinalized(config, language, logger) { const dbPath = getCodeQLDatabasePath(config, language); try { const dbInfo = load( - fs11.readFileSync(path11.resolve(dbPath, "codeql-database.yml"), "utf8") + fs12.readFileSync(path12.resolve(dbPath, "codeql-database.yml"), "utf8") ); return !("inProgress" in dbInfo); } catch { @@ -167226,9 +167303,9 @@ function dbIsFinalized(config, language, logger) { } // src/artifact-scanner.ts -var fs12 = __toESM(require("fs")); +var fs13 = __toESM(require("fs")); var os2 = __toESM(require("os")); -var path12 = __toESM(require("path")); +var path13 = __toESM(require("path")); var exec = __toESM(require_exec()); var GITHUB_PAT_CLASSIC_PATTERN = { type: "Personal Access Token (Classic)" /* PersonalAccessClassic */, @@ -167265,7 +167342,7 @@ var GITHUB_TOKEN_PATTERNS = [ function scanFileForTokens(filePath, relativePath, logger) { const findings = []; try { - const content = fs12.readFileSync(filePath, "utf8"); + const content = fs13.readFileSync(filePath, "utf8"); for (const { type: type2, pattern } of GITHUB_TOKEN_PATTERNS) { const matches = content.match(pattern); if (matches) { @@ -167295,10 +167372,10 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log findings: [] }; try { - const tempExtractDir = fs12.mkdtempSync( - path12.join(extractDir, `extract-${depth}-`) + const tempExtractDir = fs13.mkdtempSync( + path13.join(extractDir, `extract-${depth}-`) ); - const fileName = path12.basename(archivePath).toLowerCase(); + const fileName = path13.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], { @@ -167315,21 +167392,21 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log ); } else if (fileName.endsWith(".zst")) { logger.debug(`Extracting zst file: ${archivePath}`); - const outputFile = path12.join( + const outputFile = path13.join( tempExtractDir, - path12.basename(archivePath, ".zst") + path13.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 = path12.join( + const outputFile = path13.join( tempExtractDir, - path12.basename(archivePath, ".gz") + path13.basename(archivePath, ".gz") ); await exec.exec("gunzip", ["-c", archivePath], { - outStream: fs12.createWriteStream(outputFile), + outStream: fs13.createWriteStream(outputFile), silent: true }); } else if (fileName.endsWith(".zip")) { @@ -167350,7 +167427,7 @@ async function scanArchiveFile(archivePath, relativeArchivePath, extractDir, log ); result.scannedFiles += scanResult.scannedFiles; result.findings.push(...scanResult.findings); - fs12.rmSync(tempExtractDir, { recursive: true, force: true }); + fs13.rmSync(tempExtractDir, { recursive: true, force: true }); } catch (e) { logger.debug( `Could not extract or scan archive file ${archivePath}: ${getErrorMessage(e)}` @@ -167363,7 +167440,7 @@ async function scanFile(fullPath, relativePath, extractDir, logger, depth = 0) { scannedFiles: 1, findings: [] }; - const fileName = path12.basename(fullPath).toLowerCase(); + const fileName = path13.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( @@ -167385,10 +167462,10 @@ async function scanDirectory(dirPath, baseRelativePath, logger, depth = 0) { scannedFiles: 0, findings: [] }; - const entries = fs12.readdirSync(dirPath, { withFileTypes: true }); + const entries = fs13.readdirSync(dirPath, { withFileTypes: true }); for (const entry of entries) { - const fullPath = path12.join(dirPath, entry.name); - const relativePath = path12.join(baseRelativePath, entry.name); + const fullPath = path13.join(dirPath, entry.name); + const relativePath = path13.join(baseRelativePath, entry.name); if (entry.isDirectory()) { const subResult = await scanDirectory( fullPath, @@ -167402,7 +167479,7 @@ async function scanDirectory(dirPath, baseRelativePath, logger, depth = 0) { const fileResult = await scanFile( fullPath, relativePath, - path12.dirname(fullPath), + path13.dirname(fullPath), logger, depth ); @@ -167420,11 +167497,11 @@ async function scanArtifactsForTokens(filesToScan, logger) { scannedFiles: 0, findings: [] }; - const tempScanDir = fs12.mkdtempSync(path12.join(os2.tmpdir(), "artifact-scan-")); + const tempScanDir = fs13.mkdtempSync(path13.join(os2.tmpdir(), "artifact-scan-")); try { for (const filePath of filesToScan) { - const stats = fs12.statSync(filePath); - const fileName = path12.basename(filePath); + const stats = fs13.statSync(filePath); + const fileName = path13.basename(filePath); if (stats.isDirectory()) { const dirResult = await scanDirectory(filePath, fileName, logger); result.scannedFiles += dirResult.scannedFiles; @@ -167461,7 +167538,7 @@ async function scanArtifactsForTokens(filesToScan, logger) { } } finally { try { - fs12.rmSync(tempScanDir, { recursive: true, force: true }); + fs13.rmSync(tempScanDir, { recursive: true, force: true }); } catch (e) { logger.debug( `Could not clean up temporary scan directory: ${getErrorMessage(e)}` @@ -167477,17 +167554,17 @@ function sanitizeArtifactName(name) { function tryPrepareSarifDebugArtifact(config, language, logger) { try { const analyzeActionOutputDir = process.env["CODEQL_ACTION_SARIF_RESULTS_OUTPUT_DIR" /* SARIF_RESULTS_OUTPUT_DIR */]; - if (analyzeActionOutputDir !== void 0 && fs13.existsSync(analyzeActionOutputDir) && fs13.lstatSync(analyzeActionOutputDir).isDirectory()) { - const sarifFile = path13.resolve( + if (analyzeActionOutputDir !== void 0 && fs14.existsSync(analyzeActionOutputDir) && fs14.lstatSync(analyzeActionOutputDir).isDirectory()) { + const sarifFile = path14.resolve( analyzeActionOutputDir, `${language}.sarif` ); - if (fs13.existsSync(sarifFile)) { - const sarifInDbLocation = path13.resolve( + if (fs14.existsSync(sarifFile)) { + const sarifInDbLocation = path14.resolve( config.dbLocation, `${language}.sarif` ); - fs13.copyFileSync(sarifFile, sarifInDbLocation); + fs14.copyFileSync(sarifFile, sarifInDbLocation); return sarifInDbLocation; } } @@ -167538,13 +167615,13 @@ async function tryUploadAllAvailableDebugArtifacts(codeql, config, logger, codeQ } logger.info("Preparing database logs debug artifact..."); const databaseDirectory = getCodeQLDatabasePath(config, language); - const logsDirectory = path13.resolve(databaseDirectory, "log"); + const logsDirectory = path14.resolve(databaseDirectory, "log"); if (doesDirectoryExist(logsDirectory)) { filesToUpload.push(...listFolder(logsDirectory)); logger.info("Database logs debug artifact ready for upload."); } logger.info("Preparing database cluster logs debug artifact..."); - const multiLanguageTracingLogsDirectory = path13.resolve( + const multiLanguageTracingLogsDirectory = path14.resolve( config.dbLocation, "log" ); @@ -167631,8 +167708,8 @@ async function uploadArtifacts(logger, toUpload, rootDir, artifactName, ghVarian try { await artifactUploader.uploadArtifact( sanitizeArtifactName(`${artifactName}${suffix}`), - toUpload.map((file) => path13.normalize(file)), - path13.normalize(rootDir), + toUpload.map((file) => path14.normalize(file)), + path14.normalize(rootDir), { // ensure we don't keep the debug artifacts around for too long since they can be large. retentionDays: 7 @@ -167659,17 +167736,17 @@ async function getArtifactUploaderClient(logger, ghVariant) { } async function createPartialDatabaseBundle(config, language) { const databasePath = getCodeQLDatabasePath(config, language); - const databaseBundlePath = path13.resolve( + const databaseBundlePath = path14.resolve( config.dbLocation, `${config.debugDatabaseName}-${language}-partial.zip` ); core12.info( `${config.debugDatabaseName}-${language} is not finalized. Uploading partial database bundle at ${databaseBundlePath}...` ); - if (fs13.existsSync(databaseBundlePath)) { - await fs13.promises.rm(databaseBundlePath, { force: true }); + if (fs14.existsSync(databaseBundlePath)) { + await fs14.promises.rm(databaseBundlePath, { force: true }); } - const output = fs13.createWriteStream(databaseBundlePath); + const output = fs14.createWriteStream(databaseBundlePath); const zip = (0, import_archiver.default)("zip"); zip.on("error", (err) => { throw err; @@ -167689,25 +167766,26 @@ async function createDatabaseBundleCli(codeql, config, language) { config, language, codeql, - `${config.debugDatabaseName}-${language}` + `${config.debugDatabaseName}-${language}`, + { includeDiagnostics: true } ); return databaseBundlePath; } // src/init-action-post-helper.ts -var fs17 = __toESM(require("fs")); +var fs18 = __toESM(require("fs")); var github2 = __toESM(require_github()); // src/upload-lib.ts -var fs15 = __toESM(require("fs")); -var path15 = __toESM(require("path")); +var fs16 = __toESM(require("fs")); +var path16 = __toESM(require("path")); var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core13 = __toESM(require_core()); var jsonschema2 = __toESM(require_lib2()); // src/fingerprints.ts -var fs14 = __toESM(require("fs")); +var fs15 = __toESM(require("fs")); var import_path2 = __toESM(require("path")); // node_modules/long/index.js @@ -168695,7 +168773,7 @@ async function hash(callback, filepath) { } updateHash(current); }; - const readStream = fs14.createReadStream(filepath, "utf8"); + const readStream = fs15.createReadStream(filepath, "utf8"); for await (const data of readStream) { for (let i = 0; i < data.length; ++i) { processCharacter(data.charCodeAt(i)); @@ -168770,11 +168848,11 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) { if (!import_path2.default.isAbsolute(uri)) { uri = srcRootPrefix + uri; } - if (!fs14.existsSync(uri)) { + if (!fs15.existsSync(uri)) { logger.debug(`Unable to compute fingerprint for non-existent file: ${uri}`); return void 0; } - if (fs14.statSync(uri).isDirectory()) { + if (fs15.statSync(uri).isDirectory()) { logger.debug(`Unable to compute fingerprint for directory: ${uri}`); return void 0; } @@ -168782,7 +168860,7 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) { } async function addFingerprints(sarif, sourceRoot, logger) { logger.info( - `Adding fingerprints to SARIF file. See ${"https://docs.github.com/en/enterprise-cloud@latest/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#providing-data-to-track-code-scanning-alerts-across-runs" /* TRACK_CODE_SCANNING_ALERTS_ACROSS_RUNS */} for more information.` + `Adding fingerprints to SARIF file. See ${"https://docs.github.com/en/code-security/reference/code-scanning/sarif-support-for-code-scanning#data-for-preventing-duplicated-alerts" /* TRACK_CODE_SCANNING_ALERTS_ACROSS_RUNS */} for more information.` ); const callbacksByFile = {}; for (const run3 of sarif.runs || []) { @@ -168872,7 +168950,7 @@ function combineSarifFiles(sarifFiles, logger) { for (const sarifFile of sarifFiles) { logger.debug(`Loading SARIF file: ${sarifFile}`); const sarifObject = JSON.parse( - fs15.readFileSync(sarifFile, "utf8") + fs16.readFileSync(sarifFile, "utf8") ); if (combinedSarif.version === null) { combinedSarif.version = sarifObject.version; @@ -168944,7 +169022,7 @@ async function shouldDisableCombineSarifFiles(sarifObjects, githubVersion) { async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, logger) { logger.info("Combining SARIF files using the CodeQL CLI"); const sarifObjects = sarifFiles.map((sarifFile) => { - return JSON.parse(fs15.readFileSync(sarifFile, "utf8")); + return JSON.parse(fs16.readFileSync(sarifFile, "utf8")); }); const deprecationWarningMessage = gitHubVersion.type === "GitHub Enterprise Server" /* GHES */ ? "and will be removed in GitHub Enterprise Server 3.18" : "and will be removed in July 2025"; const deprecationMoreInformationMessage = "For more information, see https://github.blog/changelog/2024-05-06-code-scanning-will-stop-combining-runs-from-a-single-upload"; @@ -168997,14 +169075,14 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo ); codeQL = initCodeQLResult.codeql; } - const baseTempDir = path15.resolve(tempDir, "combined-sarif"); - fs15.mkdirSync(baseTempDir, { recursive: true }); - const outputDirectory = fs15.mkdtempSync(path15.resolve(baseTempDir, "output-")); - const outputFile = path15.resolve(outputDirectory, "combined-sarif.sarif"); + const baseTempDir = path16.resolve(tempDir, "combined-sarif"); + fs16.mkdirSync(baseTempDir, { recursive: true }); + const outputDirectory = fs16.mkdtempSync(path16.resolve(baseTempDir, "output-")); + const outputFile = path16.resolve(outputDirectory, "combined-sarif.sarif"); await codeQL.mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory: true }); - return JSON.parse(fs15.readFileSync(outputFile, "utf8")); + return JSON.parse(fs16.readFileSync(outputFile, "utf8")); } function populateRunAutomationDetails(sarif, category, analysis_key, environment) { const automationID = getAutomationID2(category, analysis_key, environment); @@ -169033,7 +169111,7 @@ function getAutomationID2(category, analysis_key, environment) { async function uploadPayload(payload, repositoryNwo, logger, analysis) { logger.info("Uploading results"); if (shouldSkipSarifUpload()) { - const payloadSaveFile = path15.join( + const payloadSaveFile = path16.join( getTemporaryDirectory(), `payload-${analysis.kind}.json` ); @@ -169041,7 +169119,7 @@ async function uploadPayload(payload, repositoryNwo, logger, analysis) { `SARIF upload disabled by an environment variable. Saving to ${payloadSaveFile}` ); logger.info(`Payload: ${JSON.stringify(payload, null, 2)}`); - fs15.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); + fs16.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); return "dummy-sarif-id"; } const client = getApiClient(); @@ -169075,12 +169153,12 @@ async function uploadPayload(payload, repositoryNwo, logger, analysis) { function findSarifFilesInDir(sarifPath, isSarif) { const sarifFiles = []; const walkSarifFiles = (dir) => { - const entries = fs15.readdirSync(dir, { withFileTypes: true }); + const entries = fs16.readdirSync(dir, { withFileTypes: true }); for (const entry of entries) { if (entry.isFile() && isSarif(entry.name)) { - sarifFiles.push(path15.resolve(dir, entry.name)); + sarifFiles.push(path16.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - walkSarifFiles(path15.resolve(dir, entry.name)); + walkSarifFiles(path16.resolve(dir, entry.name)); } } }; @@ -169088,11 +169166,11 @@ function findSarifFilesInDir(sarifPath, isSarif) { return sarifFiles; } function getSarifFilePaths(sarifPath, isSarif) { - if (!fs15.existsSync(sarifPath)) { + if (!fs16.existsSync(sarifPath)) { throw new ConfigurationError(`Path does not exist: ${sarifPath}`); } let sarifFiles; - if (fs15.lstatSync(sarifPath).isDirectory()) { + if (fs16.lstatSync(sarifPath).isDirectory()) { sarifFiles = findSarifFilesInDir(sarifPath, isSarif); if (sarifFiles.length === 0) { throw new ConfigurationError( @@ -169122,7 +169200,7 @@ function countResultsInSarif(sarif) { } function readSarifFile(sarifFilePath) { try { - return JSON.parse(fs15.readFileSync(sarifFilePath, "utf8")); + return JSON.parse(fs16.readFileSync(sarifFilePath, "utf8")); } catch (e) { throw new InvalidSarifUploadError( `Invalid SARIF. JSON syntax error: ${getErrorMessage(e)}` @@ -169191,7 +169269,7 @@ function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, wo payloadObj.base_sha = mergeBaseCommitOid; } else if (process.env.GITHUB_EVENT_PATH) { const githubEvent = JSON.parse( - fs15.readFileSync(process.env.GITHUB_EVENT_PATH, "utf8") + fs16.readFileSync(process.env.GITHUB_EVENT_PATH, "utf8") ); payloadObj.base_ref = `refs/heads/${githubEvent.pull_request.base.ref}`; payloadObj.base_sha = githubEvent.pull_request.base.sha; @@ -169452,7 +169530,7 @@ function filterAlertsByDiffRange(logger, sarif) { if (!locationUri || locationStartLine === void 0) { return false; } - const locationPath = path15.join(checkoutPath, locationUri).replaceAll(path15.sep, "/"); + const locationPath = path16.join(checkoutPath, locationUri).replaceAll(path16.sep, "/"); return diffRanges.some( (range) => range.path === locationPath && (range.startLine <= locationStartLine && range.endLine >= locationStartLine || range.startLine === 0 && range.endLine === 0) ); @@ -169464,8 +169542,8 @@ function filterAlertsByDiffRange(logger, sarif) { } // src/workflow.ts -var fs16 = __toESM(require("fs")); -var path16 = __toESM(require("path")); +var fs17 = __toESM(require("fs")); +var path17 = __toESM(require("path")); var import_zlib2 = __toESM(require("zlib")); var core14 = __toESM(require_core()); function toCodedErrors(errors) { @@ -169493,15 +169571,15 @@ async function getWorkflow(logger) { ); } const workflowPath = await getWorkflowAbsolutePath(logger); - return load(fs16.readFileSync(workflowPath, "utf-8")); + return load(fs17.readFileSync(workflowPath, "utf-8")); } async function getWorkflowAbsolutePath(logger) { const relativePath = await getWorkflowRelativePath(); - const absolutePath = path16.join( + const absolutePath = path17.join( getRequiredEnvParam("GITHUB_WORKSPACE"), relativePath ); - if (fs16.existsSync(absolutePath)) { + if (fs17.existsSync(absolutePath)) { logger.debug( `Derived the following absolute path for the currently executing workflow: ${absolutePath}.` ); @@ -169669,6 +169747,7 @@ async function tryUploadSarifIfRunFailed(config, repositoryNwo, features, logger } } async function run(uploadAllAvailableDebugArtifacts, printDebugLogs2, codeql, config, repositoryNwo, features, logger) { + await recordOverlayStatus(codeql, config, features, logger); const uploadFailedSarifResult = await tryUploadSarifIfRunFailed( config, repositoryNwo, @@ -169710,7 +169789,7 @@ async function run(uploadAllAvailableDebugArtifacts, printDebugLogs2, codeql, co } if (isSelfHostedRunner()) { try { - fs17.rmSync(config.dbLocation, { + fs18.rmSync(config.dbLocation, { recursive: true, force: true, maxRetries: 3 @@ -169730,6 +169809,40 @@ async function run(uploadAllAvailableDebugArtifacts, printDebugLogs2, codeql, co } return uploadFailedSarifResult; } +async function recordOverlayStatus(codeql, config, features, logger) { + if (config.overlayDatabaseMode === "overlay-base" /* OverlayBase */ && process.env["CODEQL_ACTION_ANALYZE_DID_COMPLETE_SUCCESSFULLY" /* ANALYZE_DID_COMPLETE_SUCCESSFULLY */] !== "true" && await features.getValue("overlay_analysis_status_save" /* OverlayAnalysisStatusSave */)) { + const overlayStatus = { + attemptedToBuildOverlayBaseDatabase: true, + builtOverlayBaseDatabase: false + }; + const diskUsage = await checkDiskUsage(logger); + if (diskUsage === void 0) { + logger.warning( + "Failed to determine disk usage, so unable to save overlay status to the Actions cache." + ); + return; + } + const saved = await saveOverlayStatus( + codeql, + config.languages, + diskUsage, + overlayStatus, + logger + ); + if (saved) { + logger.debug( + `Saved overlay status to the Actions cache: ${JSON.stringify(overlayStatus)}` + ); + logger.error( + "This job attempted to run with improved incremental analysis but it did not complete successfully. This may have been due to disk space constraints: using improved incremental analysis can require a significant amount of disk space for some repositories. This failure has been recorded in the Actions cache, so rerunning this job will run a new CodeQL analysis without improved incremental analysis. If you want to enable improved incremental analysis, increase the disk space available to the runner. If that doesn't help, contact GitHub Support for further assistance." + ); + } else { + logger.warning( + `Failed to save overlay status to the Actions cache. Status was: ${JSON.stringify(overlayStatus)}` + ); + } + } +} async function removeUploadedSarif(uploadFailedSarifResult, logger) { const sarifID = uploadFailedSarifResult.sarifID; if (sarifID) { diff --git a/lib/init-action.js b/lib/init-action.js index 32da921aff..be1a0bbf9c 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -204,7 +204,7 @@ var require_file_command = __commonJS({ exports2.issueFileCommand = issueFileCommand; exports2.prepareKeyValueMessage = prepareKeyValueMessage; var crypto3 = __importStar2(require("crypto")); - var fs15 = __importStar2(require("fs")); + var fs16 = __importStar2(require("fs")); var os6 = __importStar2(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { @@ -212,10 +212,10 @@ var require_file_command = __commonJS({ if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); } - if (!fs15.existsSync(filePath)) { + if (!fs16.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs15.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os6.EOL}`, { + fs16.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os6.EOL}`, { encoding: "utf8" }); } @@ -1337,14 +1337,14 @@ var require_util = __commonJS({ } const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; - let path16 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path17 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path16 && path16[0] !== "/") { - path16 = `/${path16}`; + if (path17 && path17[0] !== "/") { + path17 = `/${path17}`; } - return new URL(`${origin}${path16}`); + return new URL(`${origin}${path17}`); } if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); @@ -1795,39 +1795,39 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path16, origin } + request: { method, path: path17, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path16); + debuglog("sending request to %s %s/%s", method, origin, path17); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path16, origin }, + request: { method, path: path17, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path16, + path17, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path16, origin } + request: { method, path: path17, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path16); + debuglog("trailers received from %s %s/%s", method, origin, path17); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path16, origin }, + request: { method, path: path17, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path16, + path17, error3.message ); }); @@ -1876,9 +1876,9 @@ var require_diagnostics = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path16, origin } + request: { method, path: path17, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path16); + debuglog("sending request to %s %s/%s", method, origin, path17); }); } diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { @@ -1941,7 +1941,7 @@ var require_request = __commonJS({ var kHandler = /* @__PURE__ */ Symbol("handler"); var Request = class { constructor(origin, { - path: path16, + path: path17, method, body, headers, @@ -1956,11 +1956,11 @@ var require_request = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path16 !== "string") { + if (typeof path17 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path16[0] !== "/" && !(path16.startsWith("http://") || path16.startsWith("https://")) && method !== "CONNECT") { + } else if (path17[0] !== "/" && !(path17.startsWith("http://") || path17.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path16)) { + } else if (invalidPathRegex.test(path17)) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -2023,7 +2023,7 @@ var require_request = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? buildURL(path16, query) : path16; + this.path = query ? buildURL(path17, query) : path17; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -6536,7 +6536,7 @@ var require_client_h1 = __commonJS({ return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } function writeH1(client, request2) { - const { method, path: path16, host, upgrade, blocking, reset } = request2; + const { method, path: path17, host, upgrade, blocking, reset } = request2; let { body, headers, contentLength } = request2; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; if (util.isFormDataLike(body)) { @@ -6602,7 +6602,7 @@ var require_client_h1 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path16} HTTP/1.1\r + let header = `${method} ${path17} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -7128,7 +7128,7 @@ var require_client_h2 = __commonJS({ } function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path: path16, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path17, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; let { body } = request2; if (upgrade) { util.errorRequest(client, request2, new Error("Upgrade not supported for H2")); @@ -7195,7 +7195,7 @@ var require_client_h2 = __commonJS({ }); return true; } - headers[HTTP2_HEADER_PATH] = path16; + headers[HTTP2_HEADER_PATH] = path17; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -7548,9 +7548,9 @@ var require_redirect_handler = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path16 = search ? `${pathname}${search}` : pathname; + const path17 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path16; + this.opts.path = path17; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -8784,10 +8784,10 @@ var require_proxy_agent = __commonJS({ }; const { origin, - path: path16 = "/", + path: path17 = "/", headers = {} } = opts; - opts.path = origin + path16; + opts.path = origin + path17; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -10708,20 +10708,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path16) { - if (typeof path16 !== "string") { - return path16; + function safeUrl(path17) { + if (typeof path17 !== "string") { + return path17; } - const pathSegments = path16.split("?"); + const pathSegments = path17.split("?"); if (pathSegments.length !== 2) { - return path16; + return path17; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path16, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path16); + function matchKey(mockDispatch2, { path: path17, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path17); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -10743,7 +10743,7 @@ var require_mock_utils = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path16 }) => matchValue(safeUrl(path16), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path17 }) => matchValue(safeUrl(path17), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -10781,9 +10781,9 @@ var require_mock_utils = __commonJS({ } } function buildKey(opts) { - const { path: path16, method, body, headers, query } = opts; + const { path: path17, method, body, headers, query } = opts; return { - path: path16, + path: path17, method, body, headers, @@ -11246,10 +11246,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path16, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path17, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path16, + Path: path17, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -16130,9 +16130,9 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path16) { - for (let i = 0; i < path16.length; ++i) { - const code = path16.charCodeAt(i); + function validateCookiePath(path17) { + for (let i = 0; i < path17.length; ++i) { + const code = path17.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -18726,11 +18726,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path16 = opts.path; + let path17 = opts.path; if (!opts.path.startsWith("/")) { - path16 = `/${path16}`; + path17 = `/${path17}`; } - url = new URL(util.parseOrigin(url).origin + path16); + url = new URL(util.parseOrigin(url).origin + path17); } else { if (!opts) { opts = typeof url === "object" ? url : {}; @@ -20033,7 +20033,7 @@ var require_path_utils = __commonJS({ exports2.toPosixPath = toPosixPath; exports2.toWin32Path = toWin32Path; exports2.toPlatformPath = toPlatformPath; - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -20041,7 +20041,7 @@ var require_path_utils = __commonJS({ return pth.replace(/[/]/g, "\\"); } function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path16.sep); + return pth.replace(/[/\\]/g, path17.sep); } } }); @@ -20123,13 +20123,13 @@ var require_io_util = __commonJS({ exports2.isRooted = isRooted; exports2.tryGetExecutablePath = tryGetExecutablePath; exports2.getCmdPath = getCmdPath; - var fs15 = __importStar2(require("fs")); - var path16 = __importStar2(require("path")); - _a = fs15.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + var fs16 = __importStar2(require("fs")); + var path17 = __importStar2(require("path")); + _a = fs16.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; function readlink(fsPath) { return __awaiter2(this, void 0, void 0, function* () { - const result = yield fs15.promises.readlink(fsPath); + const result = yield fs16.promises.readlink(fsPath); if (exports2.IS_WINDOWS && !result.endsWith("\\")) { return `${result}\\`; } @@ -20137,7 +20137,7 @@ var require_io_util = __commonJS({ }); } exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs15.constants.O_RDONLY; + exports2.READONLY = fs16.constants.O_RDONLY; function exists(fsPath) { return __awaiter2(this, void 0, void 0, function* () { try { @@ -20179,7 +20179,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path16.extname(filePath).toUpperCase(); + const upperExt = path17.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -20203,11 +20203,11 @@ var require_io_util = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path16.dirname(filePath); - const upperName = path16.basename(filePath).toUpperCase(); + const directory = path17.dirname(filePath); + const upperName = path17.basename(filePath).toUpperCase(); for (const actualName of yield (0, exports2.readdir)(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path16.join(directory, actualName); + filePath = path17.join(directory, actualName); break; } } @@ -20319,7 +20319,7 @@ var require_io = __commonJS({ exports2.which = which7; exports2.findInPath = findInPath; var assert_1 = require("assert"); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var ioUtil = __importStar2(require_io_util()); function cp(source_1, dest_1) { return __awaiter2(this, arguments, void 0, function* (source, dest, options = {}) { @@ -20328,7 +20328,7 @@ var require_io = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path17.join(dest, path17.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -20340,7 +20340,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path16.relative(source, newDest) === "") { + if (path17.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile2(source, newDest, force); @@ -20352,7 +20352,7 @@ var require_io = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path16.join(dest, path16.basename(source)); + dest = path17.join(dest, path17.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -20363,7 +20363,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path16.dirname(dest)); + yield mkdirP(path17.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -20422,7 +20422,7 @@ var require_io = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path17.delimiter)) { if (extension) { extensions.push(extension); } @@ -20435,12 +20435,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path16.sep)) { + if (tool.includes(path17.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path16.delimiter)) { + for (const p of process.env.PATH.split(path17.delimiter)) { if (p) { directories.push(p); } @@ -20448,7 +20448,7 @@ var require_io = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path17.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -20578,7 +20578,7 @@ var require_toolrunner = __commonJS({ var os6 = __importStar2(require("os")); var events = __importStar2(require("events")); var child = __importStar2(require("child_process")); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var io7 = __importStar2(require_io()); var ioUtil = __importStar2(require_io_util()); var timers_1 = require("timers"); @@ -20793,7 +20793,7 @@ var require_toolrunner = __commonJS({ exec() { return __awaiter2(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { - this.toolPath = path16.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path17.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io7.which(this.toolPath, true); return new Promise((resolve9, reject) => __awaiter2(this, void 0, void 0, function* () { @@ -21346,7 +21346,7 @@ var require_core = __commonJS({ var file_command_1 = require_file_command(); var utils_1 = require_utils(); var os6 = __importStar2(require("os")); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -21372,7 +21372,7 @@ var require_core = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path16.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path17.delimiter}${process.env["PATH"]}`; } function getInput2(name, options) { const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; @@ -21509,8 +21509,8 @@ var require_context = __commonJS({ if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); } else { - const path16 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path16} does not exist${os_1.EOL}`); + const path17 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path17} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -22335,14 +22335,14 @@ var require_util9 = __commonJS({ } const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; - let path16 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path17 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin[origin.length - 1] === "/") { origin = origin.slice(0, origin.length - 1); } - if (path16 && path16[0] !== "/") { - path16 = `/${path16}`; + if (path17 && path17[0] !== "/") { + path17 = `/${path17}`; } - return new URL(`${origin}${path16}`); + return new URL(`${origin}${path17}`); } if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); @@ -22793,39 +22793,39 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path16, origin } + request: { method, path: path17, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path16); + debuglog("sending request to %s %s/%s", method, origin, path17); }); diagnosticsChannel.channel("undici:request:headers").subscribe((evt) => { const { - request: { method, path: path16, origin }, + request: { method, path: path17, origin }, response: { statusCode } } = evt; debuglog( "received response to %s %s/%s - HTTP %d", method, origin, - path16, + path17, statusCode ); }); diagnosticsChannel.channel("undici:request:trailers").subscribe((evt) => { const { - request: { method, path: path16, origin } + request: { method, path: path17, origin } } = evt; - debuglog("trailers received from %s %s/%s", method, origin, path16); + debuglog("trailers received from %s %s/%s", method, origin, path17); }); diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { - request: { method, path: path16, origin }, + request: { method, path: path17, origin }, error: error3 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, - path16, + path17, error3.message ); }); @@ -22874,9 +22874,9 @@ var require_diagnostics2 = __commonJS({ }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { const { - request: { method, path: path16, origin } + request: { method, path: path17, origin } } = evt; - debuglog("sending request to %s %s/%s", method, origin, path16); + debuglog("sending request to %s %s/%s", method, origin, path17); }); } diagnosticsChannel.channel("undici:websocket:open").subscribe((evt) => { @@ -22939,7 +22939,7 @@ var require_request3 = __commonJS({ var kHandler = /* @__PURE__ */ Symbol("handler"); var Request = class { constructor(origin, { - path: path16, + path: path17, method, body, headers, @@ -22954,11 +22954,11 @@ var require_request3 = __commonJS({ expectContinue, servername }, handler2) { - if (typeof path16 !== "string") { + if (typeof path17 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path16[0] !== "/" && !(path16.startsWith("http://") || path16.startsWith("https://")) && method !== "CONNECT") { + } else if (path17[0] !== "/" && !(path17.startsWith("http://") || path17.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path16)) { + } else if (invalidPathRegex.test(path17)) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -23021,7 +23021,7 @@ var require_request3 = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? buildURL(path16, query) : path16; + this.path = query ? buildURL(path17, query) : path17; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -27534,7 +27534,7 @@ var require_client_h12 = __commonJS({ return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; } function writeH1(client, request2) { - const { method, path: path16, host, upgrade, blocking, reset } = request2; + const { method, path: path17, host, upgrade, blocking, reset } = request2; let { body, headers, contentLength } = request2; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; if (util.isFormDataLike(body)) { @@ -27600,7 +27600,7 @@ var require_client_h12 = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path16} HTTP/1.1\r + let header = `${method} ${path17} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -28126,7 +28126,7 @@ var require_client_h22 = __commonJS({ } function writeH2(client, request2) { const session = client[kHTTP2Session]; - const { method, path: path16, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; + const { method, path: path17, host, upgrade, expectContinue, signal, headers: reqHeaders } = request2; let { body } = request2; if (upgrade) { util.errorRequest(client, request2, new Error("Upgrade not supported for H2")); @@ -28193,7 +28193,7 @@ var require_client_h22 = __commonJS({ }); return true; } - headers[HTTP2_HEADER_PATH] = path16; + headers[HTTP2_HEADER_PATH] = path17; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -28546,9 +28546,9 @@ var require_redirect_handler2 = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path16 = search ? `${pathname}${search}` : pathname; + const path17 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path16; + this.opts.path = path17; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -29782,10 +29782,10 @@ var require_proxy_agent2 = __commonJS({ }; const { origin, - path: path16 = "/", + path: path17 = "/", headers = {} } = opts; - opts.path = origin + path16; + opts.path = origin + path17; if (!("host" in headers) && !("Host" in headers)) { const { host } = new URL2(origin); headers.host = host; @@ -31706,20 +31706,20 @@ var require_mock_utils2 = __commonJS({ } return true; } - function safeUrl(path16) { - if (typeof path16 !== "string") { - return path16; + function safeUrl(path17) { + if (typeof path17 !== "string") { + return path17; } - const pathSegments = path16.split("?"); + const pathSegments = path17.split("?"); if (pathSegments.length !== 2) { - return path16; + return path17; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path16, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path16); + function matchKey(mockDispatch2, { path: path17, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path17); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -31741,7 +31741,7 @@ var require_mock_utils2 = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path16 }) => matchValue(safeUrl(path16), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path17 }) => matchValue(safeUrl(path17), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -31779,9 +31779,9 @@ var require_mock_utils2 = __commonJS({ } } function buildKey(opts) { - const { path: path16, method, body, headers, query } = opts; + const { path: path17, method, body, headers, query } = opts; return { - path: path16, + path: path17, method, body, headers, @@ -32244,10 +32244,10 @@ var require_pending_interceptors_formatter2 = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path16, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path17, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path16, + Path: path17, "Status code": statusCode, Persistent: persist ? PERSISTENT : NOT_PERSISTENT, Invocations: timesInvoked, @@ -37128,9 +37128,9 @@ var require_util14 = __commonJS({ } } } - function validateCookiePath(path16) { - for (let i = 0; i < path16.length; ++i) { - const code = path16.charCodeAt(i); + function validateCookiePath(path17) { + for (let i = 0; i < path17.length; ++i) { + const code = path17.charCodeAt(i); if (code < 32 || // exclude CTLs (0-31) code === 127 || // DEL code === 59) { @@ -39724,11 +39724,11 @@ var require_undici2 = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path16 = opts.path; + let path17 = opts.path; if (!opts.path.startsWith("/")) { - path16 = `/${path16}`; + path17 = `/${path17}`; } - url = new URL(util.parseOrigin(url).origin + path16); + url = new URL(util.parseOrigin(url).origin + path17); } else { if (!opts) { opts = typeof url === "object" ? url : {}; @@ -46244,7 +46244,7 @@ var require_light = __commonJS({ } } async trigger(name, ...args) { - var e, promises3; + var e, promises4; try { if (name !== "debug") { this.trigger("debug", `Event triggered: ${name}`, args); @@ -46255,7 +46255,7 @@ var require_light = __commonJS({ this._events[name] = this._events[name].filter(function(listener) { return listener.status !== "none"; }); - promises3 = this._events[name].map(async (listener) => { + promises4 = this._events[name].map(async (listener) => { var e2, returned; if (listener.status === "none") { return; @@ -46278,7 +46278,7 @@ var require_light = __commonJS({ return null; } }); - return (await Promise.all(promises3)).find(function(x) { + return (await Promise.all(promises4)).find(function(x) { return x != null; }); } catch (error3) { @@ -47414,14 +47414,14 @@ var require_helpers = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { "use strict"; var uri = require("url"); - var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path16, name, argument) { - if (Array.isArray(path16)) { - this.path = path16; - this.property = path16.reduce(function(sum, item) { + var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path17, name, argument) { + if (Array.isArray(path17)) { + this.path = path17; + this.property = path17.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path16 !== void 0) { - this.property = path16; + } else if (path17 !== void 0) { + this.property = path17; } if (message) { this.message = message; @@ -47512,16 +47512,16 @@ var require_helpers = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path16, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path17, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path16)) { - this.path = path16; - this.propertyPath = path16.reduce(function(sum, item) { + if (Array.isArray(path17)) { + this.path = path17; + this.propertyPath = path17.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path16; + this.propertyPath = path17; } this.base = base; this.schemas = schemas; @@ -47530,10 +47530,10 @@ var require_helpers = __commonJS({ return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path16 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path17 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); var id = schema2.$id || schema2.id; var base = uri.resolve(this.base, id || ""); - var ctx = new SchemaContext(schema2, this.options, path16, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema2, this.options, path17, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -48981,21 +48981,21 @@ var require_internal_path_helper = __commonJS({ return mod && mod.__esModule ? mod : { "default": mod }; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.dirname = dirname3; + exports2.dirname = dirname4; exports2.ensureAbsoluteRoot = ensureAbsoluteRoot; exports2.hasAbsoluteRoot = hasAbsoluteRoot; exports2.hasRoot = hasRoot; exports2.normalizeSeparators = normalizeSeparators; exports2.safeTrimTrailingSeparator = safeTrimTrailingSeparator; - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; - function dirname3(p) { + function dirname4(p) { p = safeTrimTrailingSeparator(p); if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path16.dirname(p); + let result = path17.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -49032,7 +49032,7 @@ var require_internal_path_helper = __commonJS({ (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { - root += path16.sep; + root += path17.sep; } return root + itemPath; } @@ -49066,10 +49066,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path16.sep)) { + if (!p.endsWith(path17.sep)) { return p; } - if (p === path16.sep) { + if (p === path17.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -49414,7 +49414,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path16 = (function() { + var path17 = (function() { try { return require("path"); } catch (e) { @@ -49422,7 +49422,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path16.sep; + minimatch.sep = path17.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand2 = require_brace_expansion(); var plTypes = { @@ -49511,8 +49511,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path16.sep !== "/") { - pattern = pattern.split(path16.sep).join("/"); + if (!options.allowWindowsEscape && path17.sep !== "/") { + pattern = pattern.split(path17.sep).join("/"); } this.options = options; this.set = []; @@ -49881,8 +49881,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path16.sep !== "/") { - f = f.split(path16.sep).join("/"); + if (path17.sep !== "/") { + f = f.split(path17.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -50028,7 +50028,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -50043,12 +50043,12 @@ var require_internal_path = __commonJS({ (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path16.sep); + this.segments = itemPath.split(path17.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path16.basename(remaining); + const basename = path17.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -50066,7 +50066,7 @@ var require_internal_path = __commonJS({ (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - (0, assert_1.default)(!segment.includes(path16.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path17.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -50077,12 +50077,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path16.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path17.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path16.sep; + result += path17.sep; } result += this.segments[i]; } @@ -50140,7 +50140,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os6 = __importStar2(require("os")); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var pathHelper = __importStar2(require_internal_path_helper()); var assert_1 = __importDefault2(require("assert")); var minimatch_1 = require_minimatch(); @@ -50169,7 +50169,7 @@ var require_internal_pattern = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir2); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path16.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path17.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -50193,8 +50193,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path16.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path16.sep}`; + if (!itemPath.endsWith(path17.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path17.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -50229,9 +50229,9 @@ var require_internal_pattern = __commonJS({ (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path16.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path17.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path16.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path17.sep}`)) { homedir2 = homedir2 || os6.homedir(); (0, assert_1.default)(homedir2, "Unable to determine HOME directory"); (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`); @@ -50315,8 +50315,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path16, level) { - this.path = path16; + constructor(path17, level) { + this.path = path17; this.level = level; } }; @@ -50458,9 +50458,9 @@ var require_internal_globber = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core14 = __importStar2(require_core()); - var fs15 = __importStar2(require("fs")); + var fs16 = __importStar2(require("fs")); var globOptionsHelper = __importStar2(require_internal_glob_options_helper()); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var patternHelper = __importStar2(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); @@ -50512,7 +50512,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core14.debug(`Search path '${searchPath}'`); try { - yield __await2(fs15.promises.lstat(searchPath)); + yield __await2(fs16.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -50536,7 +50536,7 @@ var require_internal_globber = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path16.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path17.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -50546,7 +50546,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await2(fs15.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path16.join(item.path, x), childLevel)); + const childItems = (yield __await2(fs16.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path17.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await2(item.path); @@ -50581,7 +50581,7 @@ var require_internal_globber = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs15.promises.stat(item.path); + stats = yield fs16.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -50593,10 +50593,10 @@ var require_internal_globber = __commonJS({ throw err; } } else { - stats = yield fs15.promises.lstat(item.path); + stats = yield fs16.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs15.promises.realpath(item.path); + const realPath = yield fs16.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -50705,10 +50705,10 @@ var require_internal_hash_files = __commonJS({ exports2.hashFiles = hashFiles2; var crypto3 = __importStar2(require("crypto")); var core14 = __importStar2(require_core()); - var fs15 = __importStar2(require("fs")); + var fs16 = __importStar2(require("fs")); var stream2 = __importStar2(require("stream")); var util = __importStar2(require("util")); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); function hashFiles2(globber_1, currentWorkspace_1) { return __awaiter2(this, arguments, void 0, function* (globber, currentWorkspace, verbose = false) { var _a, e_1, _b, _c; @@ -50724,17 +50724,17 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path16.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path17.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } - if (fs15.statSync(file).isDirectory()) { + if (fs16.statSync(file).isDirectory()) { writeDelegate(`Skip directory '${file}'.`); continue; } const hash = crypto3.createHash("sha256"); const pipeline = util.promisify(stream2.pipeline); - yield pipeline(fs15.createReadStream(file), hash); + yield pipeline(fs16.createReadStream(file), hash); result.write(hash.digest()); count++; if (!hasMatch) { @@ -52109,8 +52109,8 @@ var require_cacheUtils = __commonJS({ var glob2 = __importStar2(require_glob()); var io7 = __importStar2(require_io()); var crypto3 = __importStar2(require("crypto")); - var fs15 = __importStar2(require("fs")); - var path16 = __importStar2(require("path")); + var fs16 = __importStar2(require("fs")); + var path17 = __importStar2(require("path")); var semver10 = __importStar2(require_semver3()); var util = __importStar2(require("util")); var constants_1 = require_constants12(); @@ -52130,15 +52130,15 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path16.join(baseLocation, "actions", "temp"); + tempDirectory = path17.join(baseLocation, "actions", "temp"); } - const dest = path16.join(tempDirectory, crypto3.randomUUID()); + const dest = path17.join(tempDirectory, crypto3.randomUUID()); yield io7.mkdirP(dest); return dest; }); } function getArchiveFileSizeInBytes(filePath) { - return fs15.statSync(filePath).size; + return fs16.statSync(filePath).size; } function resolvePaths(patterns) { return __awaiter2(this, void 0, void 0, function* () { @@ -52154,7 +52154,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path16.relative(workspace, file).replace(new RegExp(`\\${path16.sep}`, "g"), "/"); + const relativeFile = path17.relative(workspace, file).replace(new RegExp(`\\${path17.sep}`, "g"), "/"); core14.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -52176,7 +52176,7 @@ var require_cacheUtils = __commonJS({ } function unlinkFile(filePath) { return __awaiter2(this, void 0, void 0, function* () { - return util.promisify(fs15.unlink)(filePath); + return util.promisify(fs16.unlink)(filePath); }); } function getVersion(app_1) { @@ -52218,7 +52218,7 @@ var require_cacheUtils = __commonJS({ } function getGnuTarPathOnWindows() { return __awaiter2(this, void 0, void 0, function* () { - if (fs15.existsSync(constants_1.GnuTarPathOnWindows)) { + if (fs16.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); @@ -52681,13 +52681,13 @@ function __disposeResources(env) { } return next(); } -function __rewriteRelativeImportExtension(path16, preserveJsx) { - if (typeof path16 === "string" && /^\.\.?\//.test(path16)) { - return path16.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { +function __rewriteRelativeImportExtension(path17, preserveJsx) { + if (typeof path17 === "string" && /^\.\.?\//.test(path17)) { + return path17.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function(m, tsx, d, ext, cm) { return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : d + ext + "." + cm.toLowerCase() + "js"; }); } - return path16; + return path17; } var extendStatics, __assign, __createBinding, __setModuleDefault, ownKeys, _SuppressedError, tslib_es6_default; var init_tslib_es6 = __esm({ @@ -57101,8 +57101,8 @@ var require_getClient = __commonJS({ } const { allowInsecureConnection, httpClient } = clientOptions; const endpointUrl = clientOptions.endpoint ?? endpoint2; - const client = (path16, ...args) => { - const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path16, args, { allowInsecureConnection, ...requestOptions }); + const client = (path17, ...args) => { + const getUrl = (requestOptions) => (0, urlHelpers_js_1.buildRequestUrl)(endpointUrl, path17, args, { allowInsecureConnection, ...requestOptions }); return { get: (requestOptions = {}) => { return buildOperation("GET", getUrl(requestOptions), pipeline, requestOptions, allowInsecureConnection, httpClient); @@ -60973,15 +60973,15 @@ var require_urlHelpers2 = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path16 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path16.startsWith("/")) { - path16 = path16.substring(1); + let path17 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path17.startsWith("/")) { + path17 = path17.substring(1); } - if (isAbsoluteUrl(path16)) { - requestUrl = path16; + if (isAbsoluteUrl(path17)) { + requestUrl = path17; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path16); + requestUrl = appendPath(requestUrl, path17); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -61027,9 +61027,9 @@ var require_urlHelpers2 = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path16 = pathToAppend.substring(0, searchStart); + const path17 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path16; + newPath = newPath + path17; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -63262,10 +63262,10 @@ var require_utils_common = __commonJS({ var constants_js_1 = require_constants15(); function escapeURLPath(url) { const urlParsed = new URL(url); - let path16 = urlParsed.pathname; - path16 = path16 || "/"; - path16 = escape(path16); - urlParsed.pathname = path16; + let path17 = urlParsed.pathname; + path17 = path17 || "/"; + path17 = escape(path17); + urlParsed.pathname = path17; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -63350,9 +63350,9 @@ var require_utils_common = __commonJS({ } function appendToURLPath(url, name) { const urlParsed = new URL(url); - let path16 = urlParsed.pathname; - path16 = path16 ? path16.endsWith("/") ? `${path16}${name}` : `${path16}/${name}` : name; - urlParsed.pathname = path16; + let path17 = urlParsed.pathname; + path17 = path17 ? path17.endsWith("/") ? `${path17}${name}` : `${path17}/${name}` : name; + urlParsed.pathname = path17; return urlParsed.toString(); } function setURLParameter(url, name, value) { @@ -64579,9 +64579,9 @@ var require_StorageSharedKeyCredentialPolicy = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path16 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path16}`; + canonicalizedResourceString += `/${this.factory.accountName}${path17}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -65320,10 +65320,10 @@ var require_utils_common2 = __commonJS({ var constants_js_1 = require_constants16(); function escapeURLPath(url) { const urlParsed = new URL(url); - let path16 = urlParsed.pathname; - path16 = path16 || "/"; - path16 = escape(path16); - urlParsed.pathname = path16; + let path17 = urlParsed.pathname; + path17 = path17 || "/"; + path17 = escape(path17); + urlParsed.pathname = path17; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -65408,9 +65408,9 @@ var require_utils_common2 = __commonJS({ } function appendToURLPath(url, name) { const urlParsed = new URL(url); - let path16 = urlParsed.pathname; - path16 = path16 ? path16.endsWith("/") ? `${path16}${name}` : `${path16}/${name}` : name; - urlParsed.pathname = path16; + let path17 = urlParsed.pathname; + path17 = path17 ? path17.endsWith("/") ? `${path17}${name}` : `${path17}/${name}` : name; + urlParsed.pathname = path17; return urlParsed.toString(); } function setURLParameter(url, name, value) { @@ -66331,9 +66331,9 @@ var require_StorageSharedKeyCredentialPolicy2 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request2) { - const path16 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path16}`; + canonicalizedResourceString += `/${this.factory.accountName}${path17}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -66963,9 +66963,9 @@ var require_StorageSharedKeyCredentialPolicyV2 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path16 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path16}`; + canonicalizedResourceString += `/${options.accountName}${path17}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -67310,9 +67310,9 @@ var require_StorageSharedKeyCredentialPolicyV22 = __commonJS({ return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request2) { - const path16 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; + const path17 = (0, utils_common_js_1.getURLPath)(request2.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path16}`; + canonicalizedResourceString += `/${options.accountName}${path17}`; const queries = (0, utils_common_js_1.getURLQueries)(request2.url); const lowercaseQueries = {}; if (queries) { @@ -88967,8 +88967,8 @@ var require_BlobBatch = __commonJS({ if (this.operationCount >= constants_js_1.BATCH_MAX_REQUEST) { throw new RangeError(`Cannot exceed ${constants_js_1.BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path16 = (0, utils_common_js_1.getURLPath)(subRequest.url); - if (!path16 || path16 === "") { + const path17 = (0, utils_common_js_1.getURLPath)(subRequest.url); + if (!path17 || path17 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -89046,8 +89046,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 path16 = (0, utils_common_js_1.getURLPath)(url); - if (path16 && path16 !== "/") { + const path17 = (0, utils_common_js_1.getURLPath)(url); + if (path17 && path17 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -92334,7 +92334,7 @@ var require_downloadUtils = __commonJS({ var http_client_1 = require_lib(); var storage_blob_1 = require_commonjs15(); var buffer = __importStar2(require("buffer")); - var fs15 = __importStar2(require("fs")); + var fs16 = __importStar2(require("fs")); var stream2 = __importStar2(require("stream")); var util = __importStar2(require("util")); var utils = __importStar2(require_cacheUtils()); @@ -92445,7 +92445,7 @@ var require_downloadUtils = __commonJS({ exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { return __awaiter2(this, void 0, void 0, function* () { - const writeStream = fs15.createWriteStream(archivePath); + const writeStream = fs16.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); @@ -92470,7 +92470,7 @@ var require_downloadUtils = __commonJS({ function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { return __awaiter2(this, void 0, void 0, function* () { var _a; - const archiveDescriptor = yield fs15.promises.open(archivePath, "w"); + const archiveDescriptor = yield fs16.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true @@ -92586,7 +92586,7 @@ var require_downloadUtils = __commonJS({ } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); const downloadProgress = new DownloadProgress(contentLength); - const fd = fs15.openSync(archivePath, "w"); + const fd = fs16.openSync(archivePath, "w"); try { downloadProgress.startDisplayTimer(); const controller = new abort_controller_1.AbortController(); @@ -92604,12 +92604,12 @@ var require_downloadUtils = __commonJS({ controller.abort(); throw new Error("Aborting cache download as the download time exceeded the timeout."); } else if (Buffer.isBuffer(result)) { - fs15.writeFileSync(fd, result); + fs16.writeFileSync(fd, result); } } } finally { downloadProgress.stopDisplayTimer(); - fs15.closeSync(fd); + fs16.closeSync(fd); } } }); @@ -92927,11 +92927,11 @@ var require_cacheHttpClient = __commonJS({ exports2.getCacheEntry = getCacheEntry; exports2.downloadCache = downloadCache; exports2.reserveCache = reserveCache; - exports2.saveCache = saveCache4; + exports2.saveCache = saveCache5; var core14 = __importStar2(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); - var fs15 = __importStar2(require("fs")); + var fs16 = __importStar2(require("fs")); var url_1 = require("url"); var utils = __importStar2(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); @@ -93066,7 +93066,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 = fs15.openSync(archivePath, "r"); + const fd = fs16.openSync(archivePath, "r"); const uploadOptions = (0, options_1.getUploadOptions)(options); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); @@ -93080,7 +93080,7 @@ Other caches with similar key:`); const start = offset; const end = offset + chunkSize - 1; offset += maxChunkSize; - yield uploadChunk(httpClient, resourceUrl, () => fs15.createReadStream(archivePath, { + yield uploadChunk(httpClient, resourceUrl, () => fs16.createReadStream(archivePath, { fd, start, end, @@ -93091,7 +93091,7 @@ Other caches with similar key:`); } }))); } finally { - fs15.closeSync(fd); + fs16.closeSync(fd); } return; }); @@ -93104,7 +93104,7 @@ Other caches with similar key:`); })); }); } - function saveCache4(cacheId, archivePath, signedUploadURL, options) { + function saveCache5(cacheId, archivePath, signedUploadURL, options) { return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { @@ -98356,7 +98356,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io7 = __importStar2(require_io()); var fs_1 = require("fs"); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var constants_1 = require_constants12(); var IS_WINDOWS = process.platform === "win32"; @@ -98402,13 +98402,13 @@ var require_tar = __commonJS({ const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (type2) { case "create": - args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path16.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path17.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -98454,7 +98454,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path17.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -98463,7 +98463,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path17.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -98478,7 +98478,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -98487,7 +98487,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path17.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -98525,7 +98525,7 @@ var require_tar = __commonJS({ } function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter2(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path16.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path17.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -98604,10 +98604,10 @@ var require_cache5 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; exports2.isFeatureAvailable = isFeatureAvailable; - exports2.restoreCache = restoreCache4; - exports2.saveCache = saveCache4; + exports2.restoreCache = restoreCache5; + exports2.saveCache = saveCache5; var core14 = __importStar2(require_core()); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); var cacheHttpClient = __importStar2(require_cacheHttpClient()); var cacheTwirpClient = __importStar2(require_cacheTwirpClient()); @@ -98662,7 +98662,7 @@ var require_cache5 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - function restoreCache4(paths_1, primaryKey_1, restoreKeys_1, options_1) { + function restoreCache5(paths_1, primaryKey_1, restoreKeys_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); @@ -98702,7 +98702,7 @@ var require_cache5 = __commonJS({ core14.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path16.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path17.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core14.isDebug()) { @@ -98771,7 +98771,7 @@ var require_cache5 = __commonJS({ core14.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path16.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path17.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core14.debug(`Archive path: ${archivePath}`); core14.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -98806,7 +98806,7 @@ var require_cache5 = __commonJS({ return void 0; }); } - function saveCache4(paths_1, key_1, options_1) { + function saveCache5(paths_1, key_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); @@ -98833,7 +98833,7 @@ var require_cache5 = __commonJS({ throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path16.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path17.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -98897,7 +98897,7 @@ var require_cache5 = __commonJS({ throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path16.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path17.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -99047,7 +99047,7 @@ var require_manifest = __commonJS({ var core_1 = require_core(); var os6 = require("os"); var cp = require("child_process"); - var fs15 = require("fs"); + var fs16 = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter2(this, void 0, void 0, function* () { const platFilter = os6.platform(); @@ -99109,10 +99109,10 @@ var require_manifest = __commonJS({ const lsbReleaseFile = "/etc/lsb-release"; const osReleaseFile = "/etc/os-release"; let contents = ""; - if (fs15.existsSync(lsbReleaseFile)) { - contents = fs15.readFileSync(lsbReleaseFile).toString(); - } else if (fs15.existsSync(osReleaseFile)) { - contents = fs15.readFileSync(osReleaseFile).toString(); + if (fs16.existsSync(lsbReleaseFile)) { + contents = fs16.readFileSync(lsbReleaseFile).toString(); + } else if (fs16.existsSync(osReleaseFile)) { + contents = fs16.readFileSync(osReleaseFile).toString(); } return contents; } @@ -99321,10 +99321,10 @@ var require_tool_cache = __commonJS({ var core14 = __importStar2(require_core()); var io7 = __importStar2(require_io()); var crypto3 = __importStar2(require("crypto")); - var fs15 = __importStar2(require("fs")); + var fs16 = __importStar2(require("fs")); var mm = __importStar2(require_manifest()); var os6 = __importStar2(require("os")); - var path16 = __importStar2(require("path")); + var path17 = __importStar2(require("path")); var httpm = __importStar2(require_lib()); var semver10 = __importStar2(require_semver2()); var stream2 = __importStar2(require("stream")); @@ -99345,8 +99345,8 @@ var require_tool_cache = __commonJS({ var userAgent2 = "actions/tool-cache"; function downloadTool2(url, dest, auth2, headers) { return __awaiter2(this, void 0, void 0, function* () { - dest = dest || path16.join(_getTempDirectory(), crypto3.randomUUID()); - yield io7.mkdirP(path16.dirname(dest)); + dest = dest || path17.join(_getTempDirectory(), crypto3.randomUUID()); + yield io7.mkdirP(path17.dirname(dest)); core14.debug(`Downloading ${url}`); core14.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -99367,7 +99367,7 @@ var require_tool_cache = __commonJS({ } function downloadToolAttempt(url, dest, auth2, headers) { return __awaiter2(this, void 0, void 0, function* () { - if (fs15.existsSync(dest)) { + if (fs16.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } const http = new httpm.HttpClient(userAgent2, [], { @@ -99391,7 +99391,7 @@ var require_tool_cache = __commonJS({ const readStream = responseMessageFactory(); let succeeded = false; try { - yield pipeline(readStream, fs15.createWriteStream(dest)); + yield pipeline(readStream, fs16.createWriteStream(dest)); core14.debug("download complete"); succeeded = true; return dest; @@ -99436,7 +99436,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path16.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path17.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`; @@ -99603,12 +99603,12 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os6.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch2}`); core14.debug(`source dir: ${sourceDir}`); - if (!fs15.statSync(sourceDir).isDirectory()) { + if (!fs16.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } const destPath = yield _createToolPath(tool, version, arch2); - for (const itemName of fs15.readdirSync(sourceDir)) { - const s = path16.join(sourceDir, itemName); + for (const itemName of fs16.readdirSync(sourceDir)) { + const s = path17.join(sourceDir, itemName); yield io7.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -99621,11 +99621,11 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os6.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch2}`); core14.debug(`source file: ${sourceFile}`); - if (!fs15.statSync(sourceFile).isFile()) { + if (!fs16.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path16.join(destFolder, targetFile); + const destPath = path17.join(destFolder, targetFile); core14.debug(`destination file ${destPath}`); yield io7.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -99648,9 +99648,9 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver10.clean(versionSpec) || ""; - const cachePath = path16.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path17.join(_getCacheDirectory(), toolName, versionSpec, arch2); core14.debug(`checking cache: ${cachePath}`); - if (fs15.existsSync(cachePath) && fs15.existsSync(`${cachePath}.complete`)) { + if (fs16.existsSync(cachePath) && fs16.existsSync(`${cachePath}.complete`)) { core14.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { @@ -99662,13 +99662,13 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os6.arch(); - const toolPath = path16.join(_getCacheDirectory(), toolName); - if (fs15.existsSync(toolPath)) { - const children = fs15.readdirSync(toolPath); + const toolPath = path17.join(_getCacheDirectory(), toolName); + if (fs16.existsSync(toolPath)) { + const children = fs16.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path16.join(toolPath, child, arch2 || ""); - if (fs15.existsSync(fullPath) && fs15.existsSync(`${fullPath}.complete`)) { + const fullPath = path17.join(toolPath, child, arch2 || ""); + if (fs16.existsSync(fullPath) && fs16.existsSync(`${fullPath}.complete`)) { versions.push(child); } } @@ -99719,7 +99719,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter2(this, void 0, void 0, function* () { if (!dest) { - dest = path16.join(_getTempDirectory(), crypto3.randomUUID()); + dest = path17.join(_getTempDirectory(), crypto3.randomUUID()); } yield io7.mkdirP(dest); return dest; @@ -99727,7 +99727,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter2(this, void 0, void 0, function* () { - const folderPath = path16.join(_getCacheDirectory(), tool, semver10.clean(version) || version, arch2 || ""); + const folderPath = path17.join(_getCacheDirectory(), tool, semver10.clean(version) || version, arch2 || ""); core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io7.rmRF(folderPath); @@ -99737,9 +99737,9 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path16.join(_getCacheDirectory(), tool, semver10.clean(version) || version, arch2 || ""); + const folderPath = path17.join(_getCacheDirectory(), tool, semver10.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; - fs15.writeFileSync(markerPath, ""); + fs16.writeFileSync(markerPath, ""); core14.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { @@ -100350,8 +100350,8 @@ __export(init_action_exports, { CODEQL_VERSION_JAR_MINIMIZATION: () => CODEQL_VERSION_JAR_MINIMIZATION }); module.exports = __toCommonJS(init_action_exports); -var fs14 = __toESM(require("fs")); -var path15 = __toESM(require("path")); +var fs15 = __toESM(require("fs")); +var path16 = __toESM(require("path")); var core13 = __toESM(require_core()); var github2 = __toESM(require_github()); var io6 = __toESM(require_io()); @@ -100435,21 +100435,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 fs15 = options.fs || await import("node:fs/promises"); + const fs16 = 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 fs15.lstat(itemPath, { bigint: true }) : await fs15.lstat(itemPath, { bigint: true }).catch((error3) => errors.push(error3)); + const stats = returnType.strict ? await fs16.lstat(itemPath, { bigint: true }) : await fs16.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 fs15.readdir(itemPath) : await fs15.readdir(itemPath).catch((error3) => errors.push(error3)); + const directoryItems = returnType.strict ? await fs16.readdir(itemPath) : await fs16.readdir(itemPath).catch((error3) => errors.push(error3)); if (typeof directoryItems !== "object") return; await Promise.all( directoryItems.map( @@ -104207,8 +104207,8 @@ function getDependencyCachingEnabled() { } // src/config-utils.ts -var fs6 = __toESM(require("fs")); -var path8 = __toESM(require("path")); +var fs7 = __toESM(require("fs")); +var path9 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); // src/config/db-config.ts @@ -104698,7 +104698,7 @@ var semver5 = __toESM(require_semver2()); var bundleVersion = "codeql-bundle-v2.24.1"; var cliVersion = "2.24.1"; -// src/overlay-database-utils.ts +// src/overlay/index.ts var fs3 = __toESM(require("fs")); var path5 = __toESM(require("path")); var actionsCache = __toESM(require_cache5()); @@ -104829,8 +104829,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path16 = decodeGitFilePath(match[2]); - fileOidMap[path16] = oid; + const path17 = decodeGitFilePath(match[2]); + fileOidMap[path17] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -104929,7 +104929,7 @@ async function getGeneratedFiles(workingDirectory) { return generatedFiles; } -// src/overlay-database-utils.ts +// src/overlay/index.ts var CODEQL_OVERLAY_MINIMUM_VERSION = "2.23.8"; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 7500; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6; @@ -105289,6 +105289,16 @@ var featureConfig = { envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_CSHARP", minimumVersion: void 0 }, + ["overlay_analysis_status_check" /* OverlayAnalysisStatusCheck */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_CHECK", + minimumVersion: void 0 + }, + ["overlay_analysis_status_save" /* OverlayAnalysisStatusSave */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_SAVE", + minimumVersion: void 0 + }, ["overlay_analysis_go" /* OverlayAnalysisGo */]: { defaultValue: false, envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_GO", @@ -105692,13 +105702,80 @@ var KnownLanguage = /* @__PURE__ */ ((KnownLanguage2) => { return KnownLanguage2; })(KnownLanguage || {}); -// src/trap-caching.ts +// src/overlay/status.ts var fs5 = __toESM(require("fs")); var path7 = __toESM(require("path")); var actionsCache2 = __toESM(require_cache5()); +var MAX_CACHE_OPERATION_MS2 = 3e4; +var STATUS_FILE_NAME = "overlay-status.json"; +function getStatusFilePath(languages) { + return path7.join( + getTemporaryDirectory(), + "overlay-status", + [...languages].sort().join("+"), + STATUS_FILE_NAME + ); +} +async function shouldSkipOverlayAnalysis(codeql, languages, diskUsage, logger) { + const status = await getOverlayStatus(codeql, languages, diskUsage, logger); + if (status === void 0) { + logger.debug("No cached overlay status found."); + return false; + } + if (status.attemptedToBuildOverlayBaseDatabase && !status.builtOverlayBaseDatabase) { + logger.debug( + "Cached overlay status indicates that building an overlay base database was unsuccessful." + ); + return true; + } + logger.debug( + "Cached overlay status does not indicate a previous unsuccessful attempt to build an overlay base database." + ); + return false; +} +async function getOverlayStatus(codeql, languages, diskUsage, logger) { + const cacheKey3 = await getCacheKey(codeql, languages, diskUsage); + const statusFile = getStatusFilePath(languages); + await fs5.promises.mkdir(path7.dirname(statusFile), { recursive: true }); + try { + const foundKey = await waitForResultWithTimeLimit( + MAX_CACHE_OPERATION_MS2, + actionsCache2.restoreCache([statusFile], cacheKey3), + () => { + logger.info("Timed out restoring overlay status from cache."); + } + ); + if (foundKey === void 0) { + logger.debug("No overlay status found in Actions cache."); + return void 0; + } + if (!fs5.existsSync(statusFile)) { + logger.debug( + "Overlay status cache entry found but status file is missing." + ); + return void 0; + } + const contents = await fs5.promises.readFile(statusFile, "utf-8"); + return JSON.parse(contents); + } catch (error3) { + logger.warning( + `Failed to restore overlay status from cache: ${getErrorMessage(error3)}` + ); + return void 0; + } +} +async function getCacheKey(codeql, languages, diskUsage) { + const diskSpaceToNearest10Gb = `${10 * Math.floor(diskUsage.numTotalBytes / (10 * 1024 * 1024 * 1024))}GB`; + return `codeql-overlay-status-${[...languages].sort().join("+")}-${(await codeql.getVersion()).version}-runner-${diskSpaceToNearest10Gb}`; +} + +// src/trap-caching.ts +var fs6 = __toESM(require("fs")); +var path8 = __toESM(require("path")); +var actionsCache3 = __toESM(require_cache5()); var CACHE_VERSION2 = 1; var CODEQL_TRAP_CACHE_PREFIX = "codeql-trap"; -var MAX_CACHE_OPERATION_MS2 = 12e4; +var MAX_CACHE_OPERATION_MS3 = 12e4; async function downloadTrapCaches(codeql, languages, logger) { const result = {}; const languagesSupportingCaching = await getLanguagesSupportingCaching( @@ -105710,13 +105787,13 @@ async function downloadTrapCaches(codeql, languages, logger) { `Found ${languagesSupportingCaching.length} languages that support TRAP caching` ); if (languagesSupportingCaching.length === 0) return result; - const cachesDir = path7.join( + const cachesDir = path8.join( getTemporaryDirectory(), "trapCaches" ); for (const language of languagesSupportingCaching) { - const cacheDir = path7.join(cachesDir, language); - fs5.mkdirSync(cacheDir, { recursive: true }); + const cacheDir = path8.join(cachesDir, language); + fs6.mkdirSync(cacheDir, { recursive: true }); result[language] = cacheDir; } if (await isAnalyzingDefaultBranch()) { @@ -105728,7 +105805,7 @@ async function downloadTrapCaches(codeql, languages, logger) { let baseSha = "unknown"; const eventPath = process.env.GITHUB_EVENT_PATH; if (getWorkflowEventName() === "pull_request" && eventPath !== void 0) { - const event = JSON.parse(fs5.readFileSync(path7.resolve(eventPath), "utf-8")); + const event = JSON.parse(fs6.readFileSync(path8.resolve(eventPath), "utf-8")); baseSha = event.pull_request?.base?.sha || baseSha; } for (const language of languages) { @@ -105739,8 +105816,8 @@ async function downloadTrapCaches(codeql, languages, logger) { `Looking in Actions cache for TRAP cache with key ${preferredKey}` ); const found = await waitForResultWithTimeLimit( - MAX_CACHE_OPERATION_MS2, - actionsCache2.restoreCache([cacheDir], preferredKey, [ + MAX_CACHE_OPERATION_MS3, + actionsCache3.restoreCache([cacheDir], preferredKey, [ // Fall back to any cache with the right key prefix await cachePrefix(codeql, language) ]), @@ -105832,9 +105909,9 @@ async function getSupportedLanguageMap(codeql, logger) { } var baseWorkflowsPath = ".github/workflows"; function hasActionsWorkflows(sourceRoot) { - const workflowsPath = path8.resolve(sourceRoot, baseWorkflowsPath); - const stats = fs6.lstatSync(workflowsPath, { throwIfNoEntry: false }); - return stats !== void 0 && stats.isDirectory() && fs6.readdirSync(workflowsPath).length > 0; + const workflowsPath = path9.resolve(sourceRoot, baseWorkflowsPath); + const stats = fs7.lstatSync(workflowsPath, { throwIfNoEntry: false }); + return stats !== void 0 && stats.isDirectory() && fs7.readdirSync(workflowsPath).length > 0; } async function getRawLanguagesInRepo(repository, sourceRoot, logger) { logger.debug( @@ -106001,8 +106078,8 @@ async function downloadCacheWithTime(trapCachingEnabled, codeQL, languages, logg async function loadUserConfig(logger, configFile, workspacePath, apiDetails, tempDir, validateConfig) { if (isLocal(configFile)) { if (configFile !== userConfigFromActionPath(tempDir)) { - configFile = path8.resolve(workspacePath, configFile); - if (!(configFile + path8.sep).startsWith(workspacePath + path8.sep)) { + configFile = path9.resolve(workspacePath, configFile); + if (!(configFile + path9.sep).startsWith(workspacePath + path9.sep)) { throw new ConfigurationError( getConfigFileOutsideWorkspaceErrorMessage(configFile) ); @@ -106064,8 +106141,7 @@ async function isOverlayAnalysisFeatureEnabled(features, codeql, languages, code } return true; } -async function runnerSupportsOverlayAnalysis(ramInput, logger) { - const diskUsage = await checkDiskUsage(logger); +async function runnerSupportsOverlayAnalysis(diskUsage, ramInput, logger) { if (diskUsage === void 0 || diskUsage.numAvailableBytes < OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES) { const diskSpaceMb = diskUsage === void 0 ? 0 : Math.round(diskUsage.numAvailableBytes / 1e6); logger.info( @@ -106085,6 +106161,7 @@ async function runnerSupportsOverlayAnalysis(ramInput, logger) { async function getOverlayDatabaseMode(codeql, features, languages, sourceRoot, buildMode, ramInput, codeScanningConfig, gitVersion, logger) { let overlayDatabaseMode = "none" /* None */; let useOverlayDatabaseCaching = false; + let skippedDueToCachedStatus = false; const modeEnv = process.env.CODEQL_OVERLAY_DATABASE_MODE; if (modeEnv === "overlay" /* Overlay */ || modeEnv === "overlay-base" /* OverlayBase */ || modeEnv === "none" /* None */) { overlayDatabaseMode = modeEnv; @@ -106097,11 +106174,18 @@ async function getOverlayDatabaseMode(codeql, features, languages, sourceRoot, b languages, codeScanningConfig )) { + const diskUsage = await checkDiskUsage(logger); const performResourceChecks = !await features.getValue( "overlay_analysis_skip_resource_checks" /* OverlayAnalysisSkipResourceChecks */, codeql ); - if (performResourceChecks && !await runnerSupportsOverlayAnalysis(ramInput, logger)) { + if (diskUsage && await features.getValue("overlay_analysis_status_check" /* OverlayAnalysisStatusCheck */) && await shouldSkipOverlayAnalysis(codeql, languages, diskUsage, logger)) { + logger.info( + `Setting overlay database mode to ${"none" /* None */} because overlay analysis previously failed with this combination of languages, disk space, and CodeQL version.` + ); + overlayDatabaseMode = "none" /* None */; + skippedDueToCachedStatus = true; + } else if (performResourceChecks && !await runnerSupportsOverlayAnalysis(diskUsage, ramInput, logger)) { overlayDatabaseMode = "none" /* None */; } else if (isAnalyzingPullRequest()) { overlayDatabaseMode = "overlay" /* Overlay */; @@ -106119,7 +106203,8 @@ async function getOverlayDatabaseMode(codeql, features, languages, sourceRoot, b } const nonOverlayAnalysis = { overlayDatabaseMode: "none" /* None */, - useOverlayDatabaseCaching: false + useOverlayDatabaseCaching: false, + skippedDueToCachedStatus }; if (overlayDatabaseMode === "none" /* None */) { return nonOverlayAnalysis; @@ -106164,14 +106249,15 @@ async function getOverlayDatabaseMode(codeql, features, languages, sourceRoot, b } return { overlayDatabaseMode, - useOverlayDatabaseCaching + useOverlayDatabaseCaching, + skippedDueToCachedStatus }; } function dbLocationOrDefault(dbLocation, tempDir) { - return dbLocation || path8.resolve(tempDir, "codeql_databases"); + return dbLocation || path9.resolve(tempDir, "codeql_databases"); } function userConfigFromActionPath(tempDir) { - return path8.resolve(tempDir, "user-config-from-action.yml"); + return path9.resolve(tempDir, "user-config-from-action.yml"); } function hasQueryCustomisation(userConfig) { return isDefined2(userConfig["disable-default-queries"]) || isDefined2(userConfig.queries) || isDefined2(userConfig["query-filters"]); @@ -106185,7 +106271,7 @@ async function initConfig(features, inputs) { ); } inputs.configFile = userConfigFromActionPath(tempDir); - fs6.writeFileSync(inputs.configFile, inputs.configInput); + fs7.writeFileSync(inputs.configFile, inputs.configInput); logger.debug(`Using config from action input: ${inputs.configFile}`); } let userConfig = {}; @@ -106253,7 +106339,11 @@ async function initConfig(features, inputs) { } else { logger.debug(`Skipping check for generated files.`); } - const { overlayDatabaseMode, useOverlayDatabaseCaching } = await getOverlayDatabaseMode( + const { + overlayDatabaseMode, + useOverlayDatabaseCaching, + skippedDueToCachedStatus: overlaySkippedDueToCachedStatus + } = await getOverlayDatabaseMode( inputs.codeql, inputs.features, config.languages, @@ -106269,6 +106359,29 @@ async function initConfig(features, inputs) { ); config.overlayDatabaseMode = overlayDatabaseMode; config.useOverlayDatabaseCaching = useOverlayDatabaseCaching; + if (overlaySkippedDueToCachedStatus) { + addNoLanguageDiagnostic( + config, + makeDiagnostic( + "codeql-action/overlay-skipped-due-to-cached-status", + "Skipped improved incremental analysis because it failed previously on this runner", + { + attributes: { + languages: config.languages + }, + markdownMessage: `Improved incremental analysis was skipped because it failed previously on this runner. Improved incremental analysis may require a significant amount of disk space on some repositories. If you want to enable improved incremental analysis, increase the disk space available to the runner. If that doesn't help, contact GitHub Support for further assistance. + +Improved incremental analysis will be automatically retried when the next version of CodeQL is released. You can also manually trigger a retry by [removing](${"https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manage-caches#deleting-cache-entries" /* DELETE_ACTIONS_CACHE_ENTRIES */}) \`codeql-overlay-status-*\` entries from the Actions cache.`, + severity: "note", + visibility: { + cliSummaryTable: true, + statusPage: true, + telemetry: true + } + } + ) + ); + } if (overlayDatabaseMode === "overlay" /* Overlay */ || await shouldPerformDiffInformedAnalysis( inputs.codeql, inputs.features, @@ -106302,7 +106415,7 @@ function isLocal(configPath) { return configPath.indexOf("@") === -1; } function getLocalConfig(logger, configFile, validateConfig) { - if (!fs6.existsSync(configFile)) { + if (!fs7.existsSync(configFile)) { throw new ConfigurationError( getConfigFileDoesNotExistErrorMessage(configFile) ); @@ -106310,7 +106423,7 @@ function getLocalConfig(logger, configFile, validateConfig) { return parseUserConfig( logger, configFile, - fs6.readFileSync(configFile, "utf-8"), + fs7.readFileSync(configFile, "utf-8"), validateConfig ); } @@ -106350,13 +106463,13 @@ async function getRemoteConfig(logger, configFile, apiDetails, validateConfig) { ); } function getPathToParsedConfigFile(tempDir) { - return path8.join(tempDir, "config"); + return path9.join(tempDir, "config"); } async function saveConfig(config, logger) { const configString = JSON.stringify(config); const configFile = getPathToParsedConfigFile(config.tempDir); - fs6.mkdirSync(path8.dirname(configFile), { recursive: true }); - fs6.writeFileSync(configFile, configString, "utf8"); + fs7.mkdirSync(path9.dirname(configFile), { recursive: true }); + fs7.writeFileSync(configFile, configString, "utf8"); logger.debug("Saved config:"); logger.debug(configString); } @@ -106366,9 +106479,9 @@ async function generateRegistries(registriesInput, tempDir, logger) { let qlconfigFile; if (registries) { const qlconfig = createRegistriesBlock(registries); - qlconfigFile = path8.join(tempDir, "qlconfig.yml"); + qlconfigFile = path9.join(tempDir, "qlconfig.yml"); const qlconfigContents = dump(qlconfig); - fs6.writeFileSync(qlconfigFile, qlconfigContents, "utf8"); + fs7.writeFileSync(qlconfigFile, qlconfigContents, "utf8"); logger.debug("Generated qlconfig.yml:"); logger.debug(qlconfigContents); registriesAuthTokens = registries.map((registry) => `${registry.url}=${registry.token}`).join(","); @@ -106499,7 +106612,7 @@ async function logGeneratedFilesTelemetry(config, duration, generatedFilesCount) // src/dependency-caching.ts var os3 = __toESM(require("os")); var import_path2 = require("path"); -var actionsCache3 = __toESM(require_cache5()); +var actionsCache4 = __toESM(require_cache5()); var glob = __toESM(require_glob()); var CODEQL_DEPENDENCY_CACHE_PREFIX = "codeql-dependencies"; var CODEQL_DEPENDENCY_CACHE_VERSION = 1; @@ -106626,7 +106739,7 @@ async function downloadDependencyCaches(codeql, features, languages, logger) { )}` ); const start = performance.now(); - const hitKey = await actionsCache3.restoreCache( + const hitKey = await actionsCache4.restoreCache( await cacheConfig.getDependencyPaths(codeql, features), primaryKey, restoreKeys @@ -106686,14 +106799,14 @@ var internal = { }; // src/init.ts -var fs12 = __toESM(require("fs")); -var path13 = __toESM(require("path")); +var fs13 = __toESM(require("fs")); +var path14 = __toESM(require("path")); var toolrunner4 = __toESM(require_toolrunner()); var io5 = __toESM(require_io()); // src/codeql.ts -var fs11 = __toESM(require("fs")); -var path12 = __toESM(require("path")); +var fs12 = __toESM(require("fs")); +var path13 = __toESM(require("path")); var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -106940,15 +107053,15 @@ function wrapCliConfigurationError(cliError) { } // src/setup-codeql.ts -var fs9 = __toESM(require("fs")); -var path10 = __toESM(require("path")); +var fs10 = __toESM(require("fs")); +var path11 = __toESM(require("path")); var toolcache3 = __toESM(require_tool_cache()); var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var semver8 = __toESM(require_semver2()); // src/tar.ts var import_child_process = require("child_process"); -var fs7 = __toESM(require("fs")); +var fs8 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); var io4 = __toESM(require_io()); @@ -107021,7 +107134,7 @@ async function isZstdAvailable(logger) { } } async function extract(tarPath, dest, compressionMethod, tarVersion, logger) { - fs7.mkdirSync(dest, { recursive: true }); + fs8.mkdirSync(dest, { recursive: true }); switch (compressionMethod) { case "gzip": return await toolcache.extractTar(tarPath, dest); @@ -107105,9 +107218,9 @@ function inferCompressionMethod(tarPath) { } // src/tools-download.ts -var fs8 = __toESM(require("fs")); +var fs9 = __toESM(require("fs")); var os4 = __toESM(require("os")); -var path9 = __toESM(require("path")); +var path10 = __toESM(require("path")); var import_perf_hooks2 = require("perf_hooks"); var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -107212,7 +107325,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorization, headers, tarVersion, logger) { - fs8.mkdirSync(dest, { recursive: true }); + fs9.mkdirSync(dest, { recursive: true }); const agent = new import_http_client.HttpClient().getAgent(codeqlURL); headers = Object.assign( { "User-Agent": "CodeQL Action" }, @@ -107240,7 +107353,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path9.join( + return path10.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver7.clean(version) || version, @@ -107249,7 +107362,7 @@ function getToolcacheDirectory(version) { } function writeToolcacheMarkerFile(extractedPath, logger) { const markerFilePath = `${extractedPath}.complete`; - fs8.writeFileSync(markerFilePath, ""); + fs9.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } function sanitizeUrlForStatusReport(url) { @@ -107384,7 +107497,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs9.existsSync(path10.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs10.existsSync(path11.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -107783,7 +107896,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path10.join(tempDir, v4_default()); + return path11.join(tempDir, v4_default()); } async function getNightlyToolsUrl(logger) { const zstdAvailability = await isZstdAvailable(logger); @@ -107831,8 +107944,8 @@ function isReservedToolsValue(tools) { } // src/tracer-config.ts -var fs10 = __toESM(require("fs")); -var path11 = __toESM(require("path")); +var fs11 = __toESM(require("fs")); +var path12 = __toESM(require("path")); async function shouldEnableIndirectTracing(codeql, config) { if (config.buildMode === "none" /* None */) { return false; @@ -107844,8 +107957,8 @@ async function shouldEnableIndirectTracing(codeql, config) { } async function getTracerConfigForCluster(config) { const tracingEnvVariables = JSON.parse( - fs10.readFileSync( - path11.resolve( + fs11.readFileSync( + path12.resolve( config.dbLocation, "temp/tracingEnvironment/start-tracing.json" ), @@ -107893,7 +108006,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path12.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path13.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -107949,12 +108062,12 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path12.join( + const tracingConfigPath = path13.join( extractorPath, "tools", "tracing-config.lua" ); - return fs11.existsSync(tracingConfigPath); + return fs12.existsSync(tracingConfigPath); }, async isScannedLanguage(language) { return !await this.isTracedLanguage(language); @@ -108031,7 +108144,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path12.join( + const autobuildCmd = path13.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -108224,14 +108337,18 @@ ${output}` await runCli(cmd, codeqlArgs); } }, - async databaseBundle(databasePath, outputFilePath, databaseName, alsoIncludeRelativePaths) { + async databaseBundle(databasePath, outputFilePath, databaseName, includeDiagnostics, alsoIncludeRelativePaths) { + const includeDiagnosticsArgs = includeDiagnostics ? ["--include-diagnostics"] : []; const args = [ "database", "bundle", databasePath, `--output=${outputFilePath}`, `--name=${databaseName}`, - ...getExtraOptionsFromEnv(["database", "bundle"]) + ...includeDiagnosticsArgs, + ...getExtraOptionsFromEnv(["database", "bundle"], { + ignoringOptions: includeDiagnosticsArgs + }) ]; if (await this.supportsFeature("bundleSupportsIncludeOption" /* BundleSupportsIncludeOption */)) { args.push( @@ -108430,7 +108547,7 @@ async function writeCodeScanningConfigFile(config, logger) { logger.startGroup("Augmented user configuration file contents"); logger.info(dump(augmentedConfig)); logger.endGroup(); - fs11.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); + fs12.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); return codeScanningConfigFile; } var TRAP_CACHE_SIZE_MB = 1024; @@ -108453,7 +108570,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path12.resolve(config.tempDir, "user-config.yaml"); + return path13.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -108508,7 +108625,7 @@ async function initConfig2(features, inputs) { }); } async function runDatabaseInitCluster(databaseInitEnvironment, codeql, config, sourceRoot, processName, qlconfigFile, logger) { - fs12.mkdirSync(config.dbLocation, { recursive: true }); + fs13.mkdirSync(config.dbLocation, { recursive: true }); await wrapEnvironment( databaseInitEnvironment, async () => await codeql.databaseInitCluster( @@ -108543,25 +108660,25 @@ async function checkPacksForOverlayCompatibility(codeql, config, logger) { } function checkPackForOverlayCompatibility(packDir, codeQlOverlayVersion, logger) { try { - let qlpackPath = path13.join(packDir, "qlpack.yml"); - if (!fs12.existsSync(qlpackPath)) { - qlpackPath = path13.join(packDir, "codeql-pack.yml"); + let qlpackPath = path14.join(packDir, "qlpack.yml"); + if (!fs13.existsSync(qlpackPath)) { + qlpackPath = path14.join(packDir, "codeql-pack.yml"); } const qlpackContents = load( - fs12.readFileSync(qlpackPath, "utf8") + fs13.readFileSync(qlpackPath, "utf8") ); if (!qlpackContents.buildMetadata) { return true; } - const packInfoPath = path13.join(packDir, ".packinfo"); - if (!fs12.existsSync(packInfoPath)) { + const packInfoPath = path14.join(packDir, ".packinfo"); + if (!fs13.existsSync(packInfoPath)) { logger.warning( `The query pack at ${packDir} does not have a .packinfo file, so it cannot support overlay analysis. Recompiling the query pack with the latest CodeQL CLI should solve this problem.` ); return false; } const packInfoFileContents = JSON.parse( - fs12.readFileSync(packInfoPath, "utf8") + fs13.readFileSync(packInfoPath, "utf8") ); const packOverlayVersion = packInfoFileContents.overlayVersion; if (typeof packOverlayVersion !== "number") { @@ -108586,7 +108703,7 @@ function checkPackForOverlayCompatibility(packDir, codeQlOverlayVersion, logger) } async function checkInstallPython311(languages, codeql) { if (languages.includes("python" /* python */) && process.platform === "win32" && !(await codeql.getVersion()).features?.supportsPython312) { - const script = path13.resolve( + const script = path14.resolve( __dirname, "../python-setup", "check_python12.ps1" @@ -108596,8 +108713,8 @@ async function checkInstallPython311(languages, codeql) { ]).exec(); } } -function cleanupDatabaseClusterDirectory(config, logger, options = {}, rmSync2 = fs12.rmSync) { - if (fs12.existsSync(config.dbLocation) && (fs12.statSync(config.dbLocation).isFile() || fs12.readdirSync(config.dbLocation).length > 0)) { +function cleanupDatabaseClusterDirectory(config, logger, options = {}, rmSync2 = fs13.rmSync) { + if (fs13.existsSync(config.dbLocation) && (fs13.statSync(config.dbLocation).isFile() || fs13.readdirSync(config.dbLocation).length > 0)) { if (!options.disableExistingDirectoryWarning) { logger.warning( `The database cluster directory ${config.dbLocation} must be empty. Attempting to clean it up.` @@ -108893,8 +109010,8 @@ async function sendUnhandledErrorStatusReport(actionName, actionStartedAt, error } // src/workflow.ts -var fs13 = __toESM(require("fs")); -var path14 = __toESM(require("path")); +var fs14 = __toESM(require("fs")); +var path15 = __toESM(require("path")); var import_zlib = __toESM(require("zlib")); var core12 = __toESM(require_core()); function toCodedErrors(errors) { @@ -109045,15 +109162,15 @@ async function getWorkflow(logger) { ); } const workflowPath = await getWorkflowAbsolutePath(logger); - return load(fs13.readFileSync(workflowPath, "utf-8")); + return load(fs14.readFileSync(workflowPath, "utf-8")); } async function getWorkflowAbsolutePath(logger) { const relativePath = await getWorkflowRelativePath(); - const absolutePath = path14.join( + const absolutePath = path15.join( getRequiredEnvParam("GITHUB_WORKSPACE"), relativePath ); - if (fs13.existsSync(absolutePath)) { + if (fs14.existsSync(absolutePath)) { logger.debug( `Derived the following absolute path for the currently executing workflow: ${absolutePath}.` ); @@ -109190,7 +109307,7 @@ async function run(startedAt) { core13.exportVariable("JOB_RUN_UUID" /* JOB_RUN_UUID */, jobRunUuid); core13.exportVariable("CODEQL_ACTION_INIT_HAS_RUN" /* INIT_ACTION_HAS_RUN */, "true"); configFile = getOptionalInput("config-file"); - sourceRoot = path15.resolve( + sourceRoot = path16.resolve( getRequiredEnvParam("GITHUB_WORKSPACE"), getOptionalInput("source-root") || "" ); @@ -109366,21 +109483,21 @@ async function run(startedAt) { )) { try { logger.debug(`Applying static binary workaround for Go`); - const tempBinPath = path15.resolve( + const tempBinPath = path16.resolve( getTemporaryDirectory(), "codeql-action-go-tracing", "bin" ); - fs14.mkdirSync(tempBinPath, { recursive: true }); + fs15.mkdirSync(tempBinPath, { recursive: true }); core13.addPath(tempBinPath); - const goWrapperPath = path15.resolve(tempBinPath, "go"); - fs14.writeFileSync( + const goWrapperPath = path16.resolve(tempBinPath, "go"); + fs15.writeFileSync( goWrapperPath, `#!/bin/bash exec ${goBinaryPath} "$@"` ); - fs14.chmodSync(goWrapperPath, "755"); + fs15.chmodSync(goWrapperPath, "755"); core13.exportVariable("CODEQL_ACTION_GO_BINARY" /* GO_BINARY_LOCATION */, goWrapperPath); } catch (e) { logger.warning( diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index 269dedba89..cd3b07adb6 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -92776,7 +92776,7 @@ var require_cacheHttpClient = __commonJS({ exports2.getCacheEntry = getCacheEntry; exports2.downloadCache = downloadCache; exports2.reserveCache = reserveCache; - exports2.saveCache = saveCache3; + exports2.saveCache = saveCache4; var core13 = __importStar2(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); @@ -92953,7 +92953,7 @@ Other caches with similar key:`); })); }); } - function saveCache3(cacheId, archivePath, signedUploadURL, options) { + function saveCache4(cacheId, archivePath, signedUploadURL, options) { return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { @@ -98453,8 +98453,8 @@ var require_cache5 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; exports2.isFeatureAvailable = isFeatureAvailable; - exports2.restoreCache = restoreCache3; - exports2.saveCache = saveCache3; + exports2.restoreCache = restoreCache4; + exports2.saveCache = saveCache4; var core13 = __importStar2(require_core()); var path5 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); @@ -98511,7 +98511,7 @@ var require_cache5 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - function restoreCache3(paths_1, primaryKey_1, restoreKeys_1, options_1) { + function restoreCache4(paths_1, primaryKey_1, restoreKeys_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core13.debug(`Cache service version: ${cacheServiceVersion}`); @@ -98655,7 +98655,7 @@ var require_cache5 = __commonJS({ return void 0; }); } - function saveCache3(paths_1, key_1, options_1) { + function saveCache4(paths_1, key_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core13.debug(`Cache service version: ${cacheServiceVersion}`); @@ -103669,7 +103669,7 @@ function getActionsLogger() { // src/feature-flags.ts var semver5 = __toESM(require_semver2()); -// src/overlay-database-utils.ts +// src/overlay/index.ts var fs2 = __toESM(require("fs")); var path2 = __toESM(require("path")); var actionsCache = __toESM(require_cache5()); @@ -103839,7 +103839,7 @@ async function isAnalyzingDefaultBranch() { return currentRef === defaultBranch; } -// src/overlay-database-utils.ts +// src/overlay/index.ts var CODEQL_OVERLAY_MINIMUM_VERSION = "2.23.8"; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 7500; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6; @@ -104049,6 +104049,16 @@ var featureConfig = { envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_CSHARP", minimumVersion: void 0 }, + ["overlay_analysis_status_check" /* OverlayAnalysisStatusCheck */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_CHECK", + minimumVersion: void 0 + }, + ["overlay_analysis_status_save" /* OverlayAnalysisStatusSave */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_SAVE", + minimumVersion: void 0 + }, ["overlay_analysis_go" /* OverlayAnalysisGo */]: { defaultValue: false, envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_GO", @@ -104133,9 +104143,12 @@ var featureConfig = { } }; -// src/trap-caching.ts +// src/overlay/status.ts var actionsCache2 = __toESM(require_cache5()); +// src/trap-caching.ts +var actionsCache3 = __toESM(require_cache5()); + // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES = OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB * 1e6; @@ -104562,14 +104575,18 @@ ${output}` await runCli(cmd, codeqlArgs); } }, - async databaseBundle(databasePath, outputFilePath, databaseName, alsoIncludeRelativePaths) { + async databaseBundle(databasePath, outputFilePath, databaseName, includeDiagnostics, alsoIncludeRelativePaths) { + const includeDiagnosticsArgs = includeDiagnostics ? ["--include-diagnostics"] : []; const args = [ "database", "bundle", databasePath, `--output=${outputFilePath}`, `--name=${databaseName}`, - ...getExtraOptionsFromEnv(["database", "bundle"]) + ...includeDiagnosticsArgs, + ...getExtraOptionsFromEnv(["database", "bundle"], { + ignoringOptions: includeDiagnosticsArgs + }) ]; if (await this.supportsFeature("bundleSupportsIncludeOption" /* BundleSupportsIncludeOption */)) { args.push( diff --git a/lib/setup-codeql-action.js b/lib/setup-codeql-action.js index b2c4d7cf8f..1473aa333b 100644 --- a/lib/setup-codeql-action.js +++ b/lib/setup-codeql-action.js @@ -91479,7 +91479,7 @@ var require_cacheHttpClient = __commonJS({ exports2.getCacheEntry = getCacheEntry; exports2.downloadCache = downloadCache; exports2.reserveCache = reserveCache; - exports2.saveCache = saveCache3; + exports2.saveCache = saveCache4; var core13 = __importStar2(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); @@ -91656,7 +91656,7 @@ Other caches with similar key:`); })); }); } - function saveCache3(cacheId, archivePath, signedUploadURL, options) { + function saveCache4(cacheId, archivePath, signedUploadURL, options) { return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { @@ -97156,8 +97156,8 @@ var require_cache5 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; exports2.isFeatureAvailable = isFeatureAvailable; - exports2.restoreCache = restoreCache3; - exports2.saveCache = saveCache3; + exports2.restoreCache = restoreCache4; + exports2.saveCache = saveCache4; var core13 = __importStar2(require_core()); var path9 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); @@ -97214,7 +97214,7 @@ var require_cache5 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - function restoreCache3(paths_1, primaryKey_1, restoreKeys_1, options_1) { + function restoreCache4(paths_1, primaryKey_1, restoreKeys_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core13.debug(`Cache service version: ${cacheServiceVersion}`); @@ -97358,7 +97358,7 @@ var require_cache5 = __commonJS({ return void 0; }); } - function saveCache3(paths_1, key_1, options_1) { + function saveCache4(paths_1, key_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core13.debug(`Cache service version: ${cacheServiceVersion}`); @@ -103551,7 +103551,7 @@ var semver4 = __toESM(require_semver2()); var bundleVersion = "codeql-bundle-v2.24.1"; var cliVersion = "2.24.1"; -// src/overlay-database-utils.ts +// src/overlay/index.ts var fs3 = __toESM(require("fs")); var path3 = __toESM(require("path")); var actionsCache = __toESM(require_cache5()); @@ -103749,7 +103749,7 @@ function formatDuration(durationMs) { return `${minutes}m${seconds}s`; } -// src/overlay-database-utils.ts +// src/overlay/index.ts var CODEQL_OVERLAY_MINIMUM_VERSION = "2.23.8"; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 7500; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6; @@ -103962,6 +103962,16 @@ var featureConfig = { envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_CSHARP", minimumVersion: void 0 }, + ["overlay_analysis_status_check" /* OverlayAnalysisStatusCheck */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_CHECK", + minimumVersion: void 0 + }, + ["overlay_analysis_status_save" /* OverlayAnalysisStatusSave */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_SAVE", + minimumVersion: void 0 + }, ["overlay_analysis_go" /* OverlayAnalysisGo */]: { defaultValue: false, envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_GO", @@ -104659,9 +104669,12 @@ function writeDiagnostic(config, language, diagnostic) { } } -// src/trap-caching.ts +// src/overlay/status.ts var actionsCache2 = __toESM(require_cache5()); +// src/trap-caching.ts +var actionsCache3 = __toESM(require_cache5()); + // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES = OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB * 1e6; @@ -105972,14 +105985,18 @@ ${output}` await runCli(cmd, codeqlArgs); } }, - async databaseBundle(databasePath, outputFilePath, databaseName, alsoIncludeRelativePaths) { + async databaseBundle(databasePath, outputFilePath, databaseName, includeDiagnostics, alsoIncludeRelativePaths) { + const includeDiagnosticsArgs = includeDiagnostics ? ["--include-diagnostics"] : []; const args = [ "database", "bundle", databasePath, `--output=${outputFilePath}`, `--name=${databaseName}`, - ...getExtraOptionsFromEnv(["database", "bundle"]) + ...includeDiagnosticsArgs, + ...getExtraOptionsFromEnv(["database", "bundle"], { + ignoringOptions: includeDiagnosticsArgs + }) ]; if (await this.supportsFeature("bundleSupportsIncludeOption" /* BundleSupportsIncludeOption */)) { args.push( diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index 969bc6001a..d65ac77e8e 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -92776,7 +92776,7 @@ var require_cacheHttpClient = __commonJS({ exports2.getCacheEntry = getCacheEntry; exports2.downloadCache = downloadCache; exports2.reserveCache = reserveCache; - exports2.saveCache = saveCache4; + exports2.saveCache = saveCache5; var core14 = __importStar2(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); @@ -92953,7 +92953,7 @@ Other caches with similar key:`); })); }); } - function saveCache4(cacheId, archivePath, signedUploadURL, options) { + function saveCache5(cacheId, archivePath, signedUploadURL, options) { return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { @@ -98453,8 +98453,8 @@ var require_cache5 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; exports2.isFeatureAvailable = isFeatureAvailable; - exports2.restoreCache = restoreCache4; - exports2.saveCache = saveCache4; + exports2.restoreCache = restoreCache5; + exports2.saveCache = saveCache5; var core14 = __importStar2(require_core()); var path4 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); @@ -98511,7 +98511,7 @@ var require_cache5 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - function restoreCache4(paths_1, primaryKey_1, restoreKeys_1, options_1) { + function restoreCache5(paths_1, primaryKey_1, restoreKeys_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); @@ -98655,7 +98655,7 @@ var require_cache5 = __commonJS({ return void 0; }); } - function saveCache4(paths_1, key_1, options_1) { + function saveCache5(paths_1, key_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); @@ -160900,7 +160900,7 @@ function getActionsLogger() { // src/feature-flags.ts var semver5 = __toESM(require_semver2()); -// src/overlay-database-utils.ts +// src/overlay/index.ts var actionsCache = __toESM(require_cache5()); // src/git-utils.ts @@ -160909,7 +160909,7 @@ var toolrunner2 = __toESM(require_toolrunner()); var io3 = __toESM(require_io()); var semver3 = __toESM(require_semver2()); -// src/overlay-database-utils.ts +// src/overlay/index.ts var CODEQL_OVERLAY_MINIMUM_VERSION = "2.23.8"; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 7500; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6; @@ -161063,6 +161063,16 @@ var featureConfig = { envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_CSHARP", minimumVersion: void 0 }, + ["overlay_analysis_status_check" /* OverlayAnalysisStatusCheck */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_CHECK", + minimumVersion: void 0 + }, + ["overlay_analysis_status_save" /* OverlayAnalysisStatusSave */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_SAVE", + minimumVersion: void 0 + }, ["overlay_analysis_go" /* OverlayAnalysisGo */]: { defaultValue: false, envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_GO", @@ -161147,9 +161157,12 @@ var featureConfig = { } }; -// src/trap-caching.ts +// src/overlay/status.ts var actionsCache2 = __toESM(require_cache5()); +// src/trap-caching.ts +var actionsCache3 = __toESM(require_cache5()); + // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES = OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB * 1e6; @@ -161376,7 +161389,7 @@ var semver7 = __toESM(require_semver2()); var STREAMING_HIGH_WATERMARK_BYTES = 4 * 1024 * 1024; // src/dependency-caching.ts -var actionsCache3 = __toESM(require_cache5()); +var actionsCache4 = __toESM(require_cache5()); var glob = __toESM(require_glob()); // src/artifact-scanner.ts diff --git a/lib/start-proxy-action.js b/lib/start-proxy-action.js index d9fa13d631..14efc1387e 100644 --- a/lib/start-proxy-action.js +++ b/lib/start-proxy-action.js @@ -91479,7 +91479,7 @@ var require_cacheHttpClient = __commonJS({ exports2.getCacheEntry = getCacheEntry; exports2.downloadCache = downloadCache; exports2.reserveCache = reserveCache; - exports2.saveCache = saveCache3; + exports2.saveCache = saveCache4; var core12 = __importStar2(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); @@ -91656,7 +91656,7 @@ Other caches with similar key:`); })); }); } - function saveCache3(cacheId, archivePath, signedUploadURL, options) { + function saveCache4(cacheId, archivePath, signedUploadURL, options) { return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { @@ -97156,8 +97156,8 @@ var require_cache5 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; exports2.isFeatureAvailable = isFeatureAvailable; - exports2.restoreCache = restoreCache3; - exports2.saveCache = saveCache3; + exports2.restoreCache = restoreCache4; + exports2.saveCache = saveCache4; var core12 = __importStar2(require_core()); var path4 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); @@ -97214,7 +97214,7 @@ var require_cache5 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - function restoreCache3(paths_1, primaryKey_1, restoreKeys_1, options_1) { + function restoreCache4(paths_1, primaryKey_1, restoreKeys_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core12.debug(`Cache service version: ${cacheServiceVersion}`); @@ -97358,7 +97358,7 @@ var require_cache5 = __commonJS({ return void 0; }); } - function saveCache3(paths_1, key_1, options_1) { + function saveCache4(paths_1, key_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core12.debug(`Cache service version: ${cacheServiceVersion}`); @@ -120484,7 +120484,7 @@ var semver4 = __toESM(require_semver2()); var bundleVersion = "codeql-bundle-v2.24.1"; var cliVersion = "2.24.1"; -// src/overlay-database-utils.ts +// src/overlay/index.ts var actionsCache = __toESM(require_cache5()); // src/caching-utils.ts @@ -120598,7 +120598,7 @@ function getActionsLogger() { }; } -// src/overlay-database-utils.ts +// src/overlay/index.ts var CODEQL_OVERLAY_MINIMUM_VERSION = "2.23.8"; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 7500; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6; @@ -120754,6 +120754,16 @@ var featureConfig = { envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_CSHARP", minimumVersion: void 0 }, + ["overlay_analysis_status_check" /* OverlayAnalysisStatusCheck */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_CHECK", + minimumVersion: void 0 + }, + ["overlay_analysis_status_save" /* OverlayAnalysisStatusSave */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_SAVE", + minimumVersion: void 0 + }, ["overlay_analysis_go" /* OverlayAnalysisGo */]: { defaultValue: false, envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_GO", @@ -121207,9 +121217,12 @@ var PACK_IDENTIFIER_PATTERN = (function() { return new RegExp(`^${component}/${component}$`); })(); -// src/trap-caching.ts +// src/overlay/status.ts var actionsCache2 = __toESM(require_cache5()); +// src/trap-caching.ts +var actionsCache3 = __toESM(require_cache5()); + // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES = OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB * 1e6; diff --git a/lib/upload-lib.js b/lib/upload-lib.js index 9ce8f114cc..fd0cb5ea19 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -92776,7 +92776,7 @@ var require_cacheHttpClient = __commonJS({ exports2.getCacheEntry = getCacheEntry; exports2.downloadCache = downloadCache; exports2.reserveCache = reserveCache; - exports2.saveCache = saveCache3; + exports2.saveCache = saveCache4; var core12 = __importStar2(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); @@ -92953,7 +92953,7 @@ Other caches with similar key:`); })); }); } - function saveCache3(cacheId, archivePath, signedUploadURL, options) { + function saveCache4(cacheId, archivePath, signedUploadURL, options) { return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { @@ -98453,8 +98453,8 @@ var require_cache5 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; exports2.isFeatureAvailable = isFeatureAvailable; - exports2.restoreCache = restoreCache3; - exports2.saveCache = saveCache3; + exports2.restoreCache = restoreCache4; + exports2.saveCache = saveCache4; var core12 = __importStar2(require_core()); var path12 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); @@ -98511,7 +98511,7 @@ var require_cache5 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - function restoreCache3(paths_1, primaryKey_1, restoreKeys_1, options_1) { + function restoreCache4(paths_1, primaryKey_1, restoreKeys_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core12.debug(`Cache service version: ${cacheServiceVersion}`); @@ -98655,7 +98655,7 @@ var require_cache5 = __commonJS({ return void 0; }); } - function saveCache3(paths_1, key_1, options_1) { + function saveCache4(paths_1, key_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core12.debug(`Cache service version: ${cacheServiceVersion}`); @@ -106806,7 +106806,7 @@ var semver5 = __toESM(require_semver2()); var bundleVersion = "codeql-bundle-v2.24.1"; var cliVersion = "2.24.1"; -// src/overlay-database-utils.ts +// src/overlay/index.ts var fs3 = __toESM(require("fs")); var path4 = __toESM(require("path")); var actionsCache = __toESM(require_cache5()); @@ -107010,7 +107010,7 @@ async function isAnalyzingDefaultBranch() { return currentRef === defaultBranch; } -// src/overlay-database-utils.ts +// src/overlay/index.ts var CODEQL_OVERLAY_MINIMUM_VERSION = "2.23.8"; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 7500; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6; @@ -107221,6 +107221,16 @@ var featureConfig = { envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_CSHARP", minimumVersion: void 0 }, + ["overlay_analysis_status_check" /* OverlayAnalysisStatusCheck */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_CHECK", + minimumVersion: void 0 + }, + ["overlay_analysis_status_save" /* OverlayAnalysisStatusSave */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_SAVE", + minimumVersion: void 0 + }, ["overlay_analysis_go" /* OverlayAnalysisGo */]: { defaultValue: false, envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_GO", @@ -107323,9 +107333,12 @@ ${jsonContents}` return JSON.parse(jsonContents); } -// src/trap-caching.ts +// src/overlay/status.ts var actionsCache2 = __toESM(require_cache5()); +// src/trap-caching.ts +var actionsCache3 = __toESM(require_cache5()); + // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES = OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB * 1e6; @@ -108720,14 +108733,18 @@ ${output}` await runCli(cmd, codeqlArgs); } }, - async databaseBundle(databasePath, outputFilePath, databaseName, alsoIncludeRelativePaths) { + async databaseBundle(databasePath, outputFilePath, databaseName, includeDiagnostics, alsoIncludeRelativePaths) { + const includeDiagnosticsArgs = includeDiagnostics ? ["--include-diagnostics"] : []; const args = [ "database", "bundle", databasePath, `--output=${outputFilePath}`, `--name=${databaseName}`, - ...getExtraOptionsFromEnv(["database", "bundle"]) + ...includeDiagnosticsArgs, + ...getExtraOptionsFromEnv(["database", "bundle"], { + ignoringOptions: includeDiagnosticsArgs + }) ]; if (await this.supportsFeature("bundleSupportsIncludeOption" /* BundleSupportsIncludeOption */)) { args.push( @@ -110045,7 +110062,7 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) { } async function addFingerprints(sarif, sourceRoot, logger) { logger.info( - `Adding fingerprints to SARIF file. See ${"https://docs.github.com/en/enterprise-cloud@latest/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#providing-data-to-track-code-scanning-alerts-across-runs" /* TRACK_CODE_SCANNING_ALERTS_ACROSS_RUNS */} for more information.` + `Adding fingerprints to SARIF file. See ${"https://docs.github.com/en/code-security/reference/code-scanning/sarif-support-for-code-scanning#data-for-preventing-duplicated-alerts" /* TRACK_CODE_SCANNING_ALERTS_ACROSS_RUNS */} for more information.` ); const callbacksByFile = {}; for (const run of sarif.runs || []) { diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index b9501158ab..ac0483c021 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -154758,7 +154758,7 @@ var require_cacheHttpClient = __commonJS({ exports2.getCacheEntry = getCacheEntry; exports2.downloadCache = downloadCache; exports2.reserveCache = reserveCache; - exports2.saveCache = saveCache4; + exports2.saveCache = saveCache5; var core14 = __importStar2(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); @@ -154935,7 +154935,7 @@ Other caches with similar key:`); })); }); } - function saveCache4(cacheId, archivePath, signedUploadURL, options) { + function saveCache5(cacheId, archivePath, signedUploadURL, options) { return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { @@ -156209,8 +156209,8 @@ var require_cache6 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; exports2.isFeatureAvailable = isFeatureAvailable; - exports2.restoreCache = restoreCache4; - exports2.saveCache = saveCache4; + exports2.restoreCache = restoreCache5; + exports2.saveCache = saveCache5; var core14 = __importStar2(require_core()); var path3 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); @@ -156267,7 +156267,7 @@ var require_cache6 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - function restoreCache4(paths_1, primaryKey_1, restoreKeys_1, options_1) { + function restoreCache5(paths_1, primaryKey_1, restoreKeys_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); @@ -156411,7 +156411,7 @@ var require_cache6 = __commonJS({ return void 0; }); } - function saveCache4(paths_1, key_1, options_1) { + function saveCache5(paths_1, key_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); @@ -161058,7 +161058,7 @@ function withGroup(groupName, f) { // src/feature-flags.ts var semver5 = __toESM(require_semver2()); -// src/overlay-database-utils.ts +// src/overlay/index.ts var actionsCache = __toESM(require_cache6()); // src/git-utils.ts @@ -161067,7 +161067,7 @@ var toolrunner2 = __toESM(require_toolrunner()); var io3 = __toESM(require_io()); var semver3 = __toESM(require_semver2()); -// src/overlay-database-utils.ts +// src/overlay/index.ts var CODEQL_OVERLAY_MINIMUM_VERSION = "2.23.8"; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 7500; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6; @@ -161225,6 +161225,16 @@ var featureConfig = { envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_CSHARP", minimumVersion: void 0 }, + ["overlay_analysis_status_check" /* OverlayAnalysisStatusCheck */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_CHECK", + minimumVersion: void 0 + }, + ["overlay_analysis_status_save" /* OverlayAnalysisStatusSave */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_SAVE", + minimumVersion: void 0 + }, ["overlay_analysis_go" /* OverlayAnalysisGo */]: { defaultValue: false, envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_GO", @@ -161309,9 +161319,12 @@ var featureConfig = { } }; -// src/trap-caching.ts +// src/overlay/status.ts var actionsCache2 = __toESM(require_cache6()); +// src/trap-caching.ts +var actionsCache3 = __toESM(require_cache6()); + // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES = OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB * 1e6; @@ -161361,7 +161374,7 @@ var semver7 = __toESM(require_semver2()); var STREAMING_HIGH_WATERMARK_BYTES = 4 * 1024 * 1024; // src/dependency-caching.ts -var actionsCache3 = __toESM(require_cache6()); +var actionsCache4 = __toESM(require_cache6()); var glob = __toESM(require_glob2()); // src/artifact-scanner.ts diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index 54fd545416..6d2749c5cb 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -91479,7 +91479,7 @@ var require_cacheHttpClient = __commonJS({ exports2.getCacheEntry = getCacheEntry; exports2.downloadCache = downloadCache; exports2.reserveCache = reserveCache; - exports2.saveCache = saveCache3; + exports2.saveCache = saveCache4; var core14 = __importStar2(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); @@ -91656,7 +91656,7 @@ Other caches with similar key:`); })); }); } - function saveCache3(cacheId, archivePath, signedUploadURL, options) { + function saveCache4(cacheId, archivePath, signedUploadURL, options) { return __awaiter2(this, void 0, void 0, function* () { const uploadOptions = (0, options_1.getUploadOptions)(options); if (uploadOptions.useAzureSdk) { @@ -97156,8 +97156,8 @@ var require_cache5 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; exports2.isFeatureAvailable = isFeatureAvailable; - exports2.restoreCache = restoreCache3; - exports2.saveCache = saveCache3; + exports2.restoreCache = restoreCache4; + exports2.saveCache = saveCache4; var core14 = __importStar2(require_core()); var path13 = __importStar2(require("path")); var utils = __importStar2(require_cacheUtils()); @@ -97214,7 +97214,7 @@ var require_cache5 = __commonJS({ return !!process.env["ACTIONS_CACHE_URL"]; } } - function restoreCache3(paths_1, primaryKey_1, restoreKeys_1, options_1) { + function restoreCache4(paths_1, primaryKey_1, restoreKeys_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); @@ -97358,7 +97358,7 @@ var require_cache5 = __commonJS({ return void 0; }); } - function saveCache3(paths_1, key_1, options_1) { + function saveCache4(paths_1, key_1, options_1) { return __awaiter2(this, arguments, void 0, function* (paths, key, options, enableCrossOsArchive = false) { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); core14.debug(`Cache service version: ${cacheServiceVersion}`); @@ -106501,7 +106501,7 @@ var semver4 = __toESM(require_semver2()); var bundleVersion = "codeql-bundle-v2.24.1"; var cliVersion = "2.24.1"; -// src/overlay-database-utils.ts +// src/overlay/index.ts var fs3 = __toESM(require("fs")); var path3 = __toESM(require("path")); var actionsCache = __toESM(require_cache5()); @@ -106733,7 +106733,7 @@ function formatDuration(durationMs) { return `${minutes}m${seconds}s`; } -// src/overlay-database-utils.ts +// src/overlay/index.ts var CODEQL_OVERLAY_MINIMUM_VERSION = "2.23.8"; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB = 7500; var OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_BYTES = OVERLAY_BASE_DATABASE_MAX_UPLOAD_SIZE_MB * 1e6; @@ -106946,6 +106946,16 @@ var featureConfig = { envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_CSHARP", minimumVersion: void 0 }, + ["overlay_analysis_status_check" /* OverlayAnalysisStatusCheck */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_CHECK", + minimumVersion: void 0 + }, + ["overlay_analysis_status_save" /* OverlayAnalysisStatusSave */]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_SAVE", + minimumVersion: void 0 + }, ["overlay_analysis_go" /* OverlayAnalysisGo */]: { defaultValue: false, envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_GO", @@ -107410,9 +107420,12 @@ ${jsonContents}` return JSON.parse(jsonContents); } -// src/trap-caching.ts +// src/overlay/status.ts var actionsCache2 = __toESM(require_cache5()); +// src/trap-caching.ts +var actionsCache3 = __toESM(require_cache5()); + // src/config-utils.ts var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB = 2e4; var OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES = OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_MB * 1e6; @@ -109271,14 +109284,18 @@ ${output}` await runCli(cmd, codeqlArgs); } }, - async databaseBundle(databasePath, outputFilePath, databaseName, alsoIncludeRelativePaths) { + async databaseBundle(databasePath, outputFilePath, databaseName, includeDiagnostics, alsoIncludeRelativePaths) { + const includeDiagnosticsArgs = includeDiagnostics ? ["--include-diagnostics"] : []; const args = [ "database", "bundle", databasePath, `--output=${outputFilePath}`, `--name=${databaseName}`, - ...getExtraOptionsFromEnv(["database", "bundle"]) + ...includeDiagnosticsArgs, + ...getExtraOptionsFromEnv(["database", "bundle"], { + ignoringOptions: includeDiagnosticsArgs + }) ]; if (await this.supportsFeature("bundleSupportsIncludeOption" /* BundleSupportsIncludeOption */)) { args.push( @@ -110596,7 +110613,7 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) { } async function addFingerprints(sarif, sourceRoot, logger) { logger.info( - `Adding fingerprints to SARIF file. See ${"https://docs.github.com/en/enterprise-cloud@latest/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#providing-data-to-track-code-scanning-alerts-across-runs" /* TRACK_CODE_SCANNING_ALERTS_ACROSS_RUNS */} for more information.` + `Adding fingerprints to SARIF file. See ${"https://docs.github.com/en/code-security/reference/code-scanning/sarif-support-for-code-scanning#data-for-preventing-duplicated-alerts" /* TRACK_CODE_SCANNING_ALERTS_ACROSS_RUNS */} for more information.` ); const callbacksByFile = {}; for (const run2 of sarif.runs || []) { diff --git a/src/analyze-action.ts b/src/analyze-action.ts index 3cc1ad019a..4fad13bb44 100644 --- a/src/analyze-action.ts +++ b/src/analyze-action.ts @@ -33,7 +33,7 @@ import { EnvVar } from "./environment"; import { Features } from "./feature-flags"; import { KnownLanguage } from "./languages"; import { getActionsLogger, Logger } from "./logging"; -import { cleanupAndUploadOverlayBaseDatabaseToCache } from "./overlay-database-utils"; +import { cleanupAndUploadOverlayBaseDatabaseToCache } from "./overlay"; import { getRepositoryNwo } from "./repository"; import * as statusReport from "./status-report"; import { diff --git a/src/analyze.ts b/src/analyze.ts index 352efd9756..6f5693044f 100644 --- a/src/analyze.ts +++ b/src/analyze.ts @@ -24,7 +24,7 @@ import { EnvVar } from "./environment"; import { FeatureEnablement, Feature } from "./feature-flags"; import { KnownLanguage, Language } from "./languages"; import { Logger, withGroupAsync } from "./logging"; -import { OverlayDatabaseMode } from "./overlay-database-utils"; +import { OverlayDatabaseMode } from "./overlay"; import { DatabaseCreationTimings, EventReport } from "./status-report"; import { endTracingForCluster } from "./tracer-config"; import * as util from "./util"; diff --git a/src/codeql.ts b/src/codeql.ts index 8e7c2bfe26..0a97d6b2c1 100644 --- a/src/codeql.ts +++ b/src/codeql.ts @@ -28,7 +28,7 @@ import { OverlayDatabaseMode, writeBaseDatabaseOidsFile, writeOverlayChangesFile, -} from "./overlay-database-utils"; +} from "./overlay"; import * as setupCodeql from "./setup-codeql"; import { ZstdAvailability } from "./tar"; import { ToolsDownloadStatusReport } from "./tools-download"; @@ -160,6 +160,7 @@ export interface CodeQL { databasePath: string, outputFilePath: string, dbName: string, + includeDiagnostics: boolean, alsoIncludeRelativePaths: string[], ): Promise; /** @@ -912,15 +913,22 @@ async function getCodeQLForCmd( databasePath: string, outputFilePath: string, databaseName: string, + includeDiagnostics: boolean, alsoIncludeRelativePaths: string[], ): Promise { + const includeDiagnosticsArgs = includeDiagnostics + ? ["--include-diagnostics"] + : []; const args = [ "database", "bundle", databasePath, `--output=${outputFilePath}`, `--name=${databaseName}`, - ...getExtraOptionsFromEnv(["database", "bundle"]), + ...includeDiagnosticsArgs, + ...getExtraOptionsFromEnv(["database", "bundle"], { + ignoringOptions: includeDiagnosticsArgs, + }), ]; if ( await this.supportsFeature(ToolsFeature.BundleSupportsIncludeOption) diff --git a/src/config-utils.test.ts b/src/config-utils.test.ts index d0583f1674..6679ca4127 100644 --- a/src/config-utils.test.ts +++ b/src/config-utils.test.ts @@ -18,10 +18,8 @@ import * as gitUtils from "./git-utils"; import { GitVersionInfo } from "./git-utils"; import { KnownLanguage, Language } from "./languages"; import { getRunnerLogger } from "./logging"; -import { - CODEQL_OVERLAY_MINIMUM_VERSION, - OverlayDatabaseMode, -} from "./overlay-database-utils"; +import { CODEQL_OVERLAY_MINIMUM_VERSION, OverlayDatabaseMode } from "./overlay"; +import * as overlayStatus from "./overlay/status"; import { parseRepositoryNwo } from "./repository"; import { setupTests, @@ -984,6 +982,7 @@ interface OverlayDatabaseModeTestSetup { codeScanningConfig: configUtils.UserConfig; diskUsage: DiskUsage | undefined; memoryFlagValue: number; + shouldSkipOverlayAnalysisDueToCachedStatus: boolean; } const defaultOverlayDatabaseModeTestSetup: OverlayDatabaseModeTestSetup = { @@ -1005,6 +1004,7 @@ const defaultOverlayDatabaseModeTestSetup: OverlayDatabaseModeTestSetup = { numTotalBytes: 100_000_000_000, }, memoryFlagValue: 6920, + shouldSkipOverlayAnalysisDueToCachedStatus: false, }; const getOverlayDatabaseModeMacro = test.macro({ @@ -1015,6 +1015,7 @@ const getOverlayDatabaseModeMacro = test.macro({ expected: { overlayDatabaseMode: OverlayDatabaseMode; useOverlayDatabaseCaching: boolean; + skippedDueToCachedStatus?: boolean; }, ) => { return await withTmpDir(async (tempDir) => { @@ -1039,6 +1040,10 @@ const getOverlayDatabaseModeMacro = test.macro({ sinon.stub(util, "checkDiskUsage").resolves(setup.diskUsage); + sinon + .stub(overlayStatus, "shouldSkipOverlayAnalysis") + .resolves(setup.shouldSkipOverlayAnalysisDueToCachedStatus); + // Mock feature flags const features = createFeatures(setup.features); @@ -1081,7 +1086,10 @@ const getOverlayDatabaseModeMacro = test.macro({ logger, ); - t.deepEqual(result, expected); + t.deepEqual(result, { + skippedDueToCachedStatus: false, + ...expected, + }); } finally { // Restore the original environment process.env = originalEnv; @@ -1298,6 +1306,46 @@ test( }, ); +test( + getOverlayDatabaseModeMacro, + "No overlay-base database on default branch when cached status indicates previous failure", + { + languages: [KnownLanguage.javascript], + features: [ + Feature.OverlayAnalysis, + Feature.OverlayAnalysisJavascript, + Feature.OverlayAnalysisStatusCheck, + ], + isDefaultBranch: true, + shouldSkipOverlayAnalysisDueToCachedStatus: true, + }, + { + overlayDatabaseMode: OverlayDatabaseMode.None, + useOverlayDatabaseCaching: false, + skippedDueToCachedStatus: true, + }, +); + +test( + getOverlayDatabaseModeMacro, + "No overlay analysis on PR when cached status indicates previous failure", + { + languages: [KnownLanguage.javascript], + features: [ + Feature.OverlayAnalysis, + Feature.OverlayAnalysisJavascript, + Feature.OverlayAnalysisStatusCheck, + ], + isPullRequest: true, + shouldSkipOverlayAnalysisDueToCachedStatus: true, + }, + { + overlayDatabaseMode: OverlayDatabaseMode.None, + useOverlayDatabaseCaching: false, + skippedDueToCachedStatus: true, + }, +); + test( getOverlayDatabaseModeMacro, "No overlay-base database on default branch when code-scanning feature enabled with disable-default-queries", diff --git a/src/config-utils.ts b/src/config-utils.ts index c35bad33bd..4f87c185df 100644 --- a/src/config-utils.ts +++ b/src/config-utils.ts @@ -27,9 +27,11 @@ import { } from "./config/db-config"; import { addNoLanguageDiagnostic, + makeDiagnostic, makeTelemetryDiagnostic, } from "./diagnostics"; import { shouldPerformDiffInformedAnalysis } from "./diff-informed-analysis-utils"; +import { DocUrl } from "./doc-url"; import { EnvVar } from "./environment"; import * as errorMessages from "./error-messages"; import { Feature, FeatureEnablement } from "./feature-flags"; @@ -44,10 +46,8 @@ import { } from "./git-utils"; import { KnownLanguage, Language } from "./languages"; import { Logger } from "./logging"; -import { - CODEQL_OVERLAY_MINIMUM_VERSION, - OverlayDatabaseMode, -} from "./overlay-database-utils"; +import { CODEQL_OVERLAY_MINIMUM_VERSION, OverlayDatabaseMode } from "./overlay"; +import { shouldSkipOverlayAnalysis } from "./overlay/status"; import { RepositoryNwo } from "./repository"; import { ToolsFeature } from "./tools-features"; import { downloadTrapCaches } from "./trap-caching"; @@ -63,6 +63,7 @@ import { getErrorMessage, isInTestMode, joinAtMost, + DiskUsage, } from "./util"; export * from "./config/db-config"; @@ -675,10 +676,10 @@ async function isOverlayAnalysisFeatureEnabled( * and the maximum memory CodeQL will be allowed to use. */ async function runnerSupportsOverlayAnalysis( + diskUsage: DiskUsage | undefined, ramInput: string | undefined, logger: Logger, ): Promise { - const diskUsage = await checkDiskUsage(logger); if ( diskUsage === undefined || diskUsage.numAvailableBytes < OVERLAY_MINIMUM_AVAILABLE_DISK_SPACE_BYTES @@ -740,9 +741,11 @@ export async function getOverlayDatabaseMode( ): Promise<{ overlayDatabaseMode: OverlayDatabaseMode; useOverlayDatabaseCaching: boolean; + skippedDueToCachedStatus: boolean; }> { let overlayDatabaseMode = OverlayDatabaseMode.None; let useOverlayDatabaseCaching = false; + let skippedDueToCachedStatus = false; const modeEnv = process.env.CODEQL_OVERLAY_DATABASE_MODE; // Any unrecognized CODEQL_OVERLAY_DATABASE_MODE value will be ignored and @@ -765,13 +768,26 @@ export async function getOverlayDatabaseMode( codeScanningConfig, ) ) { + const diskUsage = await checkDiskUsage(logger); const performResourceChecks = !(await features.getValue( Feature.OverlayAnalysisSkipResourceChecks, codeql, )); if ( + diskUsage && + (await features.getValue(Feature.OverlayAnalysisStatusCheck)) && + (await shouldSkipOverlayAnalysis(codeql, languages, diskUsage, logger)) + ) { + logger.info( + `Setting overlay database mode to ${OverlayDatabaseMode.None} ` + + "because overlay analysis previously failed with this combination of languages, " + + "disk space, and CodeQL version.", + ); + overlayDatabaseMode = OverlayDatabaseMode.None; + skippedDueToCachedStatus = true; + } else if ( performResourceChecks && - !(await runnerSupportsOverlayAnalysis(ramInput, logger)) + !(await runnerSupportsOverlayAnalysis(diskUsage, ramInput, logger)) ) { overlayDatabaseMode = OverlayDatabaseMode.None; } else if (isAnalyzingPullRequest()) { @@ -794,6 +810,7 @@ export async function getOverlayDatabaseMode( const nonOverlayAnalysis = { overlayDatabaseMode: OverlayDatabaseMode.None, useOverlayDatabaseCaching: false, + skippedDueToCachedStatus, }; if (overlayDatabaseMode === OverlayDatabaseMode.None) { @@ -858,6 +875,7 @@ export async function getOverlayDatabaseMode( return { overlayDatabaseMode, useOverlayDatabaseCaching, + skippedDueToCachedStatus, }; } @@ -1001,18 +1019,21 @@ export async function initConfig( // and queries, which in turn depends on the user config and the augmentation // properties. So we need to calculate the overlay database mode after the // rest of the config has been populated. - const { overlayDatabaseMode, useOverlayDatabaseCaching } = - await getOverlayDatabaseMode( - inputs.codeql, - inputs.features, - config.languages, - inputs.sourceRoot, - config.buildMode, - inputs.ramInput, - config.computedConfig, - gitVersion, - logger, - ); + const { + overlayDatabaseMode, + useOverlayDatabaseCaching, + skippedDueToCachedStatus: overlaySkippedDueToCachedStatus, + } = await getOverlayDatabaseMode( + inputs.codeql, + inputs.features, + config.languages, + inputs.sourceRoot, + config.buildMode, + inputs.ramInput, + config.computedConfig, + gitVersion, + logger, + ); logger.info( `Using overlay database mode: ${overlayDatabaseMode} ` + `${useOverlayDatabaseCaching ? "with" : "without"} caching.`, @@ -1020,6 +1041,34 @@ export async function initConfig( config.overlayDatabaseMode = overlayDatabaseMode; config.useOverlayDatabaseCaching = useOverlayDatabaseCaching; + if (overlaySkippedDueToCachedStatus) { + addNoLanguageDiagnostic( + config, + makeDiagnostic( + "codeql-action/overlay-skipped-due-to-cached-status", + "Skipped improved incremental analysis because it failed previously on this runner", + { + attributes: { + languages: config.languages, + }, + markdownMessage: + `Improved incremental analysis was skipped because it failed previously on this runner. ` + + "Improved incremental analysis may require a significant amount of disk space on some repositories. " + + "If you want to enable improved incremental analysis, increase the disk space available " + + "to the runner. If that doesn't help, contact GitHub Support for further assistance.\n\n" + + "Improved incremental analysis will be automatically retried when the next version of CodeQL is released. " + + `You can also manually trigger a retry by [removing](${DocUrl.DELETE_ACTIONS_CACHE_ENTRIES}) \`codeql-overlay-status-*\` entries from the Actions cache.`, + severity: "note", + visibility: { + cliSummaryTable: true, + statusPage: true, + telemetry: true, + }, + }, + ), + ); + } + if ( overlayDatabaseMode === OverlayDatabaseMode.Overlay || (await shouldPerformDiffInformedAnalysis( diff --git a/src/database-upload.ts b/src/database-upload.ts index 6d0a199db1..41546697f6 100644 --- a/src/database-upload.ts +++ b/src/database-upload.ts @@ -8,7 +8,7 @@ import { Config } from "./config-utils"; import { Feature, FeatureEnablement } from "./feature-flags"; import * as gitUtils from "./git-utils"; import { Logger, withGroupAsync } from "./logging"; -import { OverlayDatabaseMode } from "./overlay-database-utils"; +import { OverlayDatabaseMode } from "./overlay"; import { RepositoryNwo } from "./repository"; import * as util from "./util"; import { bundleDb, CleanupLevel, parseGitHubUrl } from "./util"; @@ -101,7 +101,9 @@ export async function cleanupAndUploadDatabases( // Although we are uploading arbitrary file contents to the API, it's worth // noting that it's the API's job to validate that the contents is acceptable. // This API method is available to anyone with write access to the repo. - const bundledDb = await bundleDb(config, language, codeql, language); + const bundledDb = await bundleDb(config, language, codeql, language, { + includeDiagnostics: false, + }); bundledDbSize = fs.statSync(bundledDb).size; const bundledDbReadStream = fs.createReadStream(bundledDb); const commitOid = await gitUtils.getCommitOid( diff --git a/src/debug-artifacts.ts b/src/debug-artifacts.ts index 769c5447c1..aea5af01fb 100644 --- a/src/debug-artifacts.ts +++ b/src/debug-artifacts.ts @@ -429,6 +429,7 @@ async function createDatabaseBundleCli( language, codeql, `${config.debugDatabaseName}-${language}`, + { includeDiagnostics: true }, ); return databaseBundlePath; } diff --git a/src/doc-url.ts b/src/doc-url.ts index f2f3b2c77e..b888d3737f 100644 --- a/src/doc-url.ts +++ b/src/doc-url.ts @@ -5,10 +5,11 @@ export enum DocUrl { ASSIGNING_PERMISSIONS_TO_JOBS = "https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs", AUTOMATIC_BUILD_FAILED = "https://docs.github.com/en/code-security/code-scanning/troubleshooting-code-scanning/automatic-build-failed", + CODEQL_BUILD_MODES = "https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#codeql-build-modes", DEFINE_ENV_VARIABLES = "https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow", + DELETE_ACTIONS_CACHE_ENTRIES = "https://docs.github.com/en/actions/how-tos/manage-workflow-runs/manage-caches#deleting-cache-entries", SCANNING_ON_PUSH = "https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#scanning-on-push", SPECIFY_BUILD_STEPS_MANUALLY = "https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#about-specifying-build-steps-manually", - TRACK_CODE_SCANNING_ALERTS_ACROSS_RUNS = "https://docs.github.com/en/enterprise-cloud@latest/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#providing-data-to-track-code-scanning-alerts-across-runs", - CODEQL_BUILD_MODES = "https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#codeql-build-modes", SYSTEM_REQUIREMENTS = "https://codeql.github.com/docs/codeql-overview/system-requirements/", + TRACK_CODE_SCANNING_ALERTS_ACROSS_RUNS = "https://docs.github.com/en/code-security/reference/code-scanning/sarif-support-for-code-scanning#data-for-preventing-duplicated-alerts", } diff --git a/src/feature-flags.ts b/src/feature-flags.ts index fd79b93ef3..714e6e9b4a 100644 --- a/src/feature-flags.ts +++ b/src/feature-flags.ts @@ -8,7 +8,7 @@ import { getApiClient } from "./api-client"; import type { CodeQL } from "./codeql"; import * as defaults from "./defaults.json"; import { Logger } from "./logging"; -import { CODEQL_OVERLAY_MINIMUM_VERSION } from "./overlay-database-utils"; +import { CODEQL_OVERLAY_MINIMUM_VERSION } from "./overlay"; import { RepositoryNwo } from "./repository"; import { ToolsFeature } from "./tools-features"; import * as util from "./util"; @@ -64,6 +64,8 @@ export enum Feature { OverlayAnalysisCodeScanningSwift = "overlay_analysis_code_scanning_swift", OverlayAnalysisCpp = "overlay_analysis_cpp", OverlayAnalysisCsharp = "overlay_analysis_csharp", + OverlayAnalysisStatusCheck = "overlay_analysis_status_check", + OverlayAnalysisStatusSave = "overlay_analysis_status_save", OverlayAnalysisGo = "overlay_analysis_go", OverlayAnalysisJava = "overlay_analysis_java", OverlayAnalysisJavascript = "overlay_analysis_javascript", @@ -256,6 +258,16 @@ export const featureConfig = { envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_CSHARP", minimumVersion: undefined, }, + [Feature.OverlayAnalysisStatusCheck]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_CHECK", + minimumVersion: undefined, + }, + [Feature.OverlayAnalysisStatusSave]: { + defaultValue: false, + envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_STATUS_SAVE", + minimumVersion: undefined, + }, [Feature.OverlayAnalysisGo]: { defaultValue: false, envVar: "CODEQL_ACTION_OVERLAY_ANALYSIS_GO", diff --git a/src/init-action-post-helper.test.ts b/src/init-action-post-helper.test.ts index b0afb9b8b9..13bba4bdb2 100644 --- a/src/init-action-post-helper.test.ts +++ b/src/init-action-post-helper.test.ts @@ -5,9 +5,12 @@ import * as actionsUtil from "./actions-util"; import { AnalysisKind } from "./analyses"; import * as codeql from "./codeql"; import * as configUtils from "./config-utils"; +import { EnvVar } from "./environment"; import { Feature } from "./feature-flags"; import * as initActionPostHelper from "./init-action-post-helper"; import { getRunnerLogger } from "./logging"; +import { OverlayDatabaseMode } from "./overlay"; +import * as overlayStatus from "./overlay/status"; import { parseRepositoryNwo } from "./repository"; import { createFeatures, @@ -21,7 +24,7 @@ import * as workflow from "./workflow"; setupTests(test); -test("post: init action with debug mode off", async (t) => { +test("init-post action with debug mode off", async (t) => { return await util.withTmpDir(async (tmpDir) => { process.env["GITHUB_REPOSITORY"] = "github/codeql-action-fake-repository"; process.env["RUNNER_TEMP"] = tmpDir; @@ -55,7 +58,7 @@ test("post: init action with debug mode off", async (t) => { }); }); -test("post: init action with debug mode on", async (t) => { +test("init-post action with debug mode on", async (t) => { return await util.withTmpDir(async (tmpDir) => { process.env["GITHUB_REPOSITORY"] = "github/codeql-action-fake-repository"; process.env["RUNNER_TEMP"] = tmpDir; @@ -308,6 +311,179 @@ test("not uploading failed SARIF when `code-scanning` is not an enabled analysis ); }); +test("saves overlay status when overlay-base analysis did not complete successfully", async (t) => { + return await util.withTmpDir(async (tmpDir) => { + process.env["GITHUB_REPOSITORY"] = "github/codeql-action-fake-repository"; + process.env["RUNNER_TEMP"] = tmpDir; + // Ensure analyze did not complete successfully. + delete process.env[EnvVar.ANALYZE_DID_COMPLETE_SUCCESSFULLY]; + + const diskUsage: util.DiskUsage = { + numAvailableBytes: 100 * 1024 * 1024 * 1024, + numTotalBytes: 200 * 1024 * 1024 * 1024, + }; + sinon.stub(util, "checkDiskUsage").resolves(diskUsage); + + const saveOverlayStatusStub = sinon + .stub(overlayStatus, "saveOverlayStatus") + .resolves(true); + + const stubCodeQL = codeql.createStubCodeQL({}); + + await initActionPostHelper.run( + sinon.spy(), + sinon.spy(), + stubCodeQL, + createTestConfig({ + debugMode: false, + languages: ["javascript"], + overlayDatabaseMode: OverlayDatabaseMode.OverlayBase, + }), + parseRepositoryNwo("github/codeql-action"), + createFeatures([Feature.OverlayAnalysisStatusSave]), + getRunnerLogger(true), + ); + + t.true( + saveOverlayStatusStub.calledOnce, + "saveOverlayStatus should be called exactly once", + ); + t.deepEqual( + saveOverlayStatusStub.firstCall.args[0], + stubCodeQL, + "first arg should be the CodeQL instance", + ); + t.deepEqual( + saveOverlayStatusStub.firstCall.args[1], + ["javascript"], + "second arg should be the languages", + ); + t.deepEqual( + saveOverlayStatusStub.firstCall.args[2], + diskUsage, + "third arg should be the disk usage", + ); + t.deepEqual( + saveOverlayStatusStub.firstCall.args[3], + { + attemptedToBuildOverlayBaseDatabase: true, + builtOverlayBaseDatabase: false, + }, + "fourth arg should be the overlay status recording an unsuccessful build attempt", + ); + }); +}); + +test("does not save overlay status when OverlayAnalysisStatusSave feature flag is disabled", async (t) => { + return await util.withTmpDir(async (tmpDir) => { + process.env["GITHUB_REPOSITORY"] = "github/codeql-action-fake-repository"; + process.env["RUNNER_TEMP"] = tmpDir; + // Ensure analyze did not complete successfully. + delete process.env[EnvVar.ANALYZE_DID_COMPLETE_SUCCESSFULLY]; + + sinon.stub(util, "checkDiskUsage").resolves({ + numAvailableBytes: 100 * 1024 * 1024 * 1024, + numTotalBytes: 200 * 1024 * 1024 * 1024, + }); + + const saveOverlayStatusStub = sinon + .stub(overlayStatus, "saveOverlayStatus") + .resolves(true); + + await initActionPostHelper.run( + sinon.spy(), + sinon.spy(), + codeql.createStubCodeQL({}), + createTestConfig({ + debugMode: false, + languages: ["javascript"], + overlayDatabaseMode: OverlayDatabaseMode.OverlayBase, + }), + parseRepositoryNwo("github/codeql-action"), + createFeatures([]), + getRunnerLogger(true), + ); + + t.true( + saveOverlayStatusStub.notCalled, + "saveOverlayStatus should not be called when OverlayAnalysisStatusSave feature flag is disabled", + ); + }); +}); + +test("does not save overlay status when build successful", async (t) => { + return await util.withTmpDir(async (tmpDir) => { + process.env["GITHUB_REPOSITORY"] = "github/codeql-action-fake-repository"; + process.env["RUNNER_TEMP"] = tmpDir; + // Mark analyze as having completed successfully. + process.env[EnvVar.ANALYZE_DID_COMPLETE_SUCCESSFULLY] = "true"; + + sinon.stub(util, "checkDiskUsage").resolves({ + numAvailableBytes: 100 * 1024 * 1024 * 1024, + numTotalBytes: 200 * 1024 * 1024 * 1024, + }); + + const saveOverlayStatusStub = sinon + .stub(overlayStatus, "saveOverlayStatus") + .resolves(true); + + await initActionPostHelper.run( + sinon.spy(), + sinon.spy(), + codeql.createStubCodeQL({}), + createTestConfig({ + debugMode: false, + languages: ["javascript"], + overlayDatabaseMode: OverlayDatabaseMode.OverlayBase, + }), + parseRepositoryNwo("github/codeql-action"), + createFeatures([Feature.OverlayAnalysisStatusSave]), + getRunnerLogger(true), + ); + + t.true( + saveOverlayStatusStub.notCalled, + "saveOverlayStatus should not be called when build completed successfully", + ); + }); +}); + +test("does not save overlay status when overlay not enabled", async (t) => { + return await util.withTmpDir(async (tmpDir) => { + process.env["GITHUB_REPOSITORY"] = "github/codeql-action-fake-repository"; + process.env["RUNNER_TEMP"] = tmpDir; + delete process.env[EnvVar.ANALYZE_DID_COMPLETE_SUCCESSFULLY]; + + sinon.stub(util, "checkDiskUsage").resolves({ + numAvailableBytes: 100 * 1024 * 1024 * 1024, + numTotalBytes: 200 * 1024 * 1024 * 1024, + }); + + const saveOverlayStatusStub = sinon + .stub(overlayStatus, "saveOverlayStatus") + .resolves(true); + + await initActionPostHelper.run( + sinon.spy(), + sinon.spy(), + codeql.createStubCodeQL({}), + createTestConfig({ + debugMode: false, + languages: ["javascript"], + overlayDatabaseMode: OverlayDatabaseMode.None, + }), + parseRepositoryNwo("github/codeql-action"), + createFeatures([]), + getRunnerLogger(true), + ); + + t.true( + saveOverlayStatusStub.notCalled, + "saveOverlayStatus should not be called when overlay is not enabled", + ); + }); +}); + function createTestWorkflow( steps: workflow.WorkflowJobStep[], ): workflow.Workflow { diff --git a/src/init-action-post-helper.ts b/src/init-action-post-helper.ts index 28637f98c6..716656dbad 100644 --- a/src/init-action-post-helper.ts +++ b/src/init-action-post-helper.ts @@ -11,10 +11,13 @@ import * as dependencyCaching from "./dependency-caching"; import { EnvVar } from "./environment"; import { Feature, FeatureEnablement } from "./feature-flags"; import { Logger } from "./logging"; +import { OverlayDatabaseMode } from "./overlay"; +import { OverlayStatus, saveOverlayStatus } from "./overlay/status"; import { RepositoryNwo, getRepositoryNwo } from "./repository"; import { JobStatus } from "./status-report"; import * as uploadLib from "./upload-lib"; import { + checkDiskUsage, delay, getErrorMessage, getRequiredEnvParam, @@ -169,6 +172,8 @@ export async function run( features: FeatureEnablement, logger: Logger, ) { + await recordOverlayStatus(codeql, config, features, logger); + const uploadFailedSarifResult = await tryUploadSarifIfRunFailed( config, repositoryNwo, @@ -246,6 +251,60 @@ export async function run( return uploadFailedSarifResult; } +async function recordOverlayStatus( + codeql: CodeQL, + config: Config, + features: FeatureEnablement, + logger: Logger, +) { + // Currently it is only important to store overlay status if the analysis attempted but failed + // to build an overlay base database. + if ( + config.overlayDatabaseMode === OverlayDatabaseMode.OverlayBase && + process.env[EnvVar.ANALYZE_DID_COMPLETE_SUCCESSFULLY] !== "true" && + (await features.getValue(Feature.OverlayAnalysisStatusSave)) + ) { + const overlayStatus = { + attemptedToBuildOverlayBaseDatabase: true, + builtOverlayBaseDatabase: false, + } satisfies OverlayStatus; + + const diskUsage = await checkDiskUsage(logger); + if (diskUsage === undefined) { + logger.warning( + "Failed to determine disk usage, so unable to save overlay status to the Actions cache.", + ); + return; + } + + const saved = await saveOverlayStatus( + codeql, + config.languages, + diskUsage, + overlayStatus, + logger, + ); + if (saved) { + logger.debug( + `Saved overlay status to the Actions cache: ${JSON.stringify(overlayStatus)}`, + ); + logger.error( + "This job attempted to run with improved incremental analysis but it did not complete successfully. " + + "This may have been due to disk space constraints: using improved incremental analysis can " + + "require a significant amount of disk space for some repositories. " + + "This failure has been recorded in the Actions cache, so " + + "rerunning this job will run a new CodeQL analysis without improved incremental analysis. " + + "If you want to enable improved incremental analysis, increase the disk space available to the runner. " + + "If that doesn't help, contact GitHub Support for further assistance.", + ); + } else { + logger.warning( + `Failed to save overlay status to the Actions cache. Status was: ${JSON.stringify(overlayStatus)}`, + ); + } + } +} + async function removeUploadedSarif( uploadFailedSarifResult: UploadFailedSarifResult, logger: Logger, diff --git a/src/init-action.ts b/src/init-action.ts index 5abaee7669..a09967ab5e 100644 --- a/src/init-action.ts +++ b/src/init-action.ts @@ -58,7 +58,7 @@ import { downloadOverlayBaseDatabaseFromCache, OverlayBaseDatabaseDownloadStats, OverlayDatabaseMode, -} from "./overlay-database-utils"; +} from "./overlay"; import { getRepositoryNwo, RepositoryNwo } from "./repository"; import { ToolsSource } from "./setup-codeql"; import { diff --git a/src/overlay-database-utils.test.ts b/src/overlay/index.test.ts similarity index 95% rename from src/overlay-database-utils.test.ts rename to src/overlay/index.test.ts index db47d4d879..7e63520f5b 100644 --- a/src/overlay-database-utils.test.ts +++ b/src/overlay/index.test.ts @@ -5,12 +5,20 @@ import * as actionsCache from "@actions/cache"; import test from "ava"; import * as sinon from "sinon"; -import * as actionsUtil from "./actions-util"; -import * as apiClient from "./api-client"; -import { ResolveDatabaseOutput } from "./codeql"; -import * as gitUtils from "./git-utils"; -import { KnownLanguage } from "./languages"; -import { getRunnerLogger } from "./logging"; +import * as actionsUtil from "../actions-util"; +import * as apiClient from "../api-client"; +import { ResolveDatabaseOutput } from "../codeql"; +import * as gitUtils from "../git-utils"; +import { KnownLanguage } from "../languages"; +import { getRunnerLogger } from "../logging"; +import { + createTestConfig, + mockCodeQLVersion, + setupTests, +} from "../testing-utils"; +import * as utils from "../util"; +import { withTmpDir } from "../util"; + import { downloadOverlayBaseDatabaseFromCache, getCacheRestoreKeyPrefix, @@ -18,14 +26,7 @@ import { OverlayDatabaseMode, writeBaseDatabaseOidsFile, writeOverlayChangesFile, -} from "./overlay-database-utils"; -import { - createTestConfig, - mockCodeQLVersion, - setupTests, -} from "./testing-utils"; -import * as utils from "./util"; -import { withTmpDir } from "./util"; +} from "."; setupTests(test); diff --git a/src/overlay-database-utils.ts b/src/overlay/index.ts similarity index 98% rename from src/overlay-database-utils.ts rename to src/overlay/index.ts index 9312fce5d4..3dde65f56d 100644 --- a/src/overlay-database-utils.ts +++ b/src/overlay/index.ts @@ -8,13 +8,13 @@ import { getTemporaryDirectory, getWorkflowRunAttempt, getWorkflowRunID, -} from "./actions-util"; -import { getAutomationID } from "./api-client"; -import { createCacheKeyHash } from "./caching-utils"; -import { type CodeQL } from "./codeql"; -import { type Config } from "./config-utils"; -import { getCommitOid, getFileOidsUnderPath } from "./git-utils"; -import { Logger, withGroupAsync } from "./logging"; +} from "../actions-util"; +import { getAutomationID } from "../api-client"; +import { createCacheKeyHash } from "../caching-utils"; +import { type CodeQL } from "../codeql"; +import { type Config } from "../config-utils"; +import { getCommitOid, getFileOidsUnderPath } from "../git-utils"; +import { Logger, withGroupAsync } from "../logging"; import { CleanupLevel, getBaseDatabaseOidsFilePath, @@ -23,7 +23,7 @@ import { isInTestMode, tryGetFolderBytes, waitForResultWithTimeLimit, -} from "./util"; +} from "../util"; export enum OverlayDatabaseMode { Overlay = "overlay", diff --git a/src/overlay/status.test.ts b/src/overlay/status.test.ts new file mode 100644 index 0000000000..f2c63479f0 --- /dev/null +++ b/src/overlay/status.test.ts @@ -0,0 +1,172 @@ +import * as fs from "fs"; +import * as path from "path"; + +import * as actionsCache from "@actions/cache"; +import test from "ava"; +import * as sinon from "sinon"; + +import { + getRecordingLogger, + LoggedMessage, + mockCodeQLVersion, + setupTests, +} from "../testing-utils"; +import { DiskUsage, withTmpDir } from "../util"; + +import { getCacheKey, shouldSkipOverlayAnalysis } from "./status"; + +setupTests(test); + +function makeDiskUsage(totalGiB: number): DiskUsage { + return { + numTotalBytes: totalGiB * 1024 * 1024 * 1024, + numAvailableBytes: 0, + }; +} + +test("getCacheKey incorporates language, CodeQL version, and disk space", async (t) => { + const codeql = mockCodeQLVersion("2.20.0"); + t.is( + await getCacheKey(codeql, ["javascript"], makeDiskUsage(50)), + "codeql-overlay-status-javascript-2.20.0-runner-50GB", + ); + t.is( + await getCacheKey(codeql, ["python"], makeDiskUsage(50)), + "codeql-overlay-status-python-2.20.0-runner-50GB", + ); + t.is( + await getCacheKey( + mockCodeQLVersion("2.21.0"), + ["javascript"], + makeDiskUsage(50), + ), + "codeql-overlay-status-javascript-2.21.0-runner-50GB", + ); + t.is( + await getCacheKey(codeql, ["javascript"], makeDiskUsage(100)), + "codeql-overlay-status-javascript-2.20.0-runner-100GB", + ); +}); + +test("getCacheKey sorts and joins multiple languages", async (t) => { + const codeql = mockCodeQLVersion("2.20.0"); + t.is( + await getCacheKey(codeql, ["python", "javascript"], makeDiskUsage(50)), + "codeql-overlay-status-javascript+python-2.20.0-runner-50GB", + ); + t.is( + await getCacheKey(codeql, ["javascript", "python"], makeDiskUsage(50)), + "codeql-overlay-status-javascript+python-2.20.0-runner-50GB", + ); +}); + +test("getCacheKey rounds disk space down to nearest 10 GiB", async (t) => { + const codeql = mockCodeQLVersion("2.20.0"); + t.is( + await getCacheKey(codeql, ["javascript"], makeDiskUsage(14)), + "codeql-overlay-status-javascript-2.20.0-runner-10GB", + ); + t.is( + await getCacheKey(codeql, ["javascript"], makeDiskUsage(19)), + "codeql-overlay-status-javascript-2.20.0-runner-10GB", + ); +}); + +test("shouldSkipOverlayAnalysis returns false when no cached status exists", async (t) => { + await withTmpDir(async (tmpDir) => { + process.env["RUNNER_TEMP"] = tmpDir; + const codeql = mockCodeQLVersion("2.20.0"); + const messages: LoggedMessage[] = []; + const logger = getRecordingLogger(messages); + + sinon.stub(actionsCache, "restoreCache").resolves(undefined); + + const result = await shouldSkipOverlayAnalysis( + codeql, + ["javascript"], + makeDiskUsage(50), + logger, + ); + + t.false(result); + t.true( + messages.some( + (m) => + m.type === "debug" && + typeof m.message === "string" && + m.message.includes("No cached overlay status found."), + ), + ); + }); +}); + +test("shouldSkipOverlayAnalysis returns true when cached status indicates failed build", async (t) => { + await withTmpDir(async (tmpDir) => { + process.env["RUNNER_TEMP"] = tmpDir; + const codeql = mockCodeQLVersion("2.20.0"); + const messages: LoggedMessage[] = []; + const logger = getRecordingLogger(messages); + + const status = { + attemptedToBuildOverlayBaseDatabase: true, + builtOverlayBaseDatabase: false, + }; + + // Stub restoreCache to write the status file and return a key + sinon.stub(actionsCache, "restoreCache").callsFake(async (paths) => { + const statusFile = paths[0]; + await fs.promises.mkdir(path.dirname(statusFile), { recursive: true }); + await fs.promises.writeFile(statusFile, JSON.stringify(status)); + return "found-key"; + }); + + const result = await shouldSkipOverlayAnalysis( + codeql, + ["javascript"], + makeDiskUsage(50), + logger, + ); + + t.true(result); + }); +}); + +test("shouldSkipOverlayAnalysis returns false when cached status indicates successful build", async (t) => { + await withTmpDir(async (tmpDir) => { + process.env["RUNNER_TEMP"] = tmpDir; + const codeql = mockCodeQLVersion("2.20.0"); + const messages: LoggedMessage[] = []; + const logger = getRecordingLogger(messages); + + const status = { + attemptedToBuildOverlayBaseDatabase: true, + builtOverlayBaseDatabase: true, + }; + + sinon.stub(actionsCache, "restoreCache").callsFake(async (paths) => { + const statusFile = paths[0]; + await fs.promises.mkdir(path.dirname(statusFile), { recursive: true }); + await fs.promises.writeFile(statusFile, JSON.stringify(status)); + return "found-key"; + }); + + const result = await shouldSkipOverlayAnalysis( + codeql, + ["javascript"], + makeDiskUsage(50), + logger, + ); + + t.false(result); + t.true( + messages.some( + (m) => + m.type === "debug" && + typeof m.message === "string" && + m.message.includes( + "Cached overlay status does not indicate a previous unsuccessful attempt", + ), + ), + ); + }); +}); diff --git a/src/overlay/status.ts b/src/overlay/status.ts new file mode 100644 index 0000000000..fc6452c5e7 --- /dev/null +++ b/src/overlay/status.ts @@ -0,0 +1,178 @@ +/* + * We perform enablement checks for overlay analysis to avoid using it on runners that are too small + * to support it. However these checks cannot avoid every potential issue without being overly + * conservative. Therefore, if our enablement checks enable overlay analysis for a runner that is + * too small, we want to remember that, so that we will not try to use overlay analysis until + * something changes (e.g. a larger runner is provisioned, or a new CodeQL version is released). + * + * We use the Actions cache as a lightweight way of providing this functionality. + */ + +import * as fs from "fs"; +import * as path from "path"; + +import * as actionsCache from "@actions/cache"; + +import { getTemporaryDirectory } from "../actions-util"; +import { type CodeQL } from "../codeql"; +import { Logger } from "../logging"; +import { + DiskUsage, + getErrorMessage, + waitForResultWithTimeLimit, +} from "../util"; + +/** The maximum time to wait for a cache operation to complete. */ +const MAX_CACHE_OPERATION_MS = 30_000; + +/** File name for the serialized overlay status. */ +const STATUS_FILE_NAME = "overlay-status.json"; + +/** Path to the local overlay status file. */ +function getStatusFilePath(languages: string[]): string { + return path.join( + getTemporaryDirectory(), + "overlay-status", + [...languages].sort().join("+"), + STATUS_FILE_NAME, + ); +} + +/** Status of an overlay analysis for a set of languages. */ +export interface OverlayStatus { + /** Whether the job attempted to build an overlay base database. */ + attemptedToBuildOverlayBaseDatabase: boolean; + /** Whether the job successfully built an overlay base database. */ + builtOverlayBaseDatabase: boolean; +} + +/** + * Whether overlay analysis should be skipped, based on the cached status for the given languages and disk usage. + */ +export async function shouldSkipOverlayAnalysis( + codeql: CodeQL, + languages: string[], + diskUsage: DiskUsage, + logger: Logger, +): Promise { + const status = await getOverlayStatus(codeql, languages, diskUsage, logger); + if (status === undefined) { + logger.debug("No cached overlay status found."); + return false; + } + if ( + status.attemptedToBuildOverlayBaseDatabase && + !status.builtOverlayBaseDatabase + ) { + logger.debug( + "Cached overlay status indicates that building an overlay base database was unsuccessful.", + ); + return true; + } + logger.debug( + "Cached overlay status does not indicate a previous unsuccessful attempt to build an overlay base database.", + ); + return false; +} + +/** + * Retrieve overlay status from the Actions cache, if available. + * + * @returns `undefined` if no status was found in the cache (e.g. first run with + * this cache key) or if the cache operation fails. + */ +export async function getOverlayStatus( + codeql: CodeQL, + languages: string[], + diskUsage: DiskUsage, + logger: Logger, +): Promise { + const cacheKey = await getCacheKey(codeql, languages, diskUsage); + const statusFile = getStatusFilePath(languages); + await fs.promises.mkdir(path.dirname(statusFile), { recursive: true }); + + try { + const foundKey = await waitForResultWithTimeLimit( + MAX_CACHE_OPERATION_MS, + actionsCache.restoreCache([statusFile], cacheKey), + () => { + logger.info("Timed out restoring overlay status from cache."); + }, + ); + if (foundKey === undefined) { + logger.debug("No overlay status found in Actions cache."); + return undefined; + } + + if (!fs.existsSync(statusFile)) { + logger.debug( + "Overlay status cache entry found but status file is missing.", + ); + return undefined; + } + + const contents = await fs.promises.readFile(statusFile, "utf-8"); + return JSON.parse(contents) as OverlayStatus; + } catch (error) { + logger.warning( + `Failed to restore overlay status from cache: ${getErrorMessage(error)}`, + ); + return undefined; + } +} + +/** + * Save overlay status to the Actions cache. + * + * @returns `true` if the status was saved successfully, `false` otherwise. + */ +export async function saveOverlayStatus( + codeql: CodeQL, + languages: string[], + diskUsage: DiskUsage, + status: OverlayStatus, + logger: Logger, +): Promise { + const cacheKey = await getCacheKey(codeql, languages, diskUsage); + const statusFile = getStatusFilePath(languages); + await fs.promises.mkdir(path.dirname(statusFile), { recursive: true }); + await fs.promises.writeFile(statusFile, JSON.stringify(status)); + + try { + const cacheId = await waitForResultWithTimeLimit( + MAX_CACHE_OPERATION_MS, + actionsCache.saveCache([statusFile], cacheKey), + () => {}, + ); + if (cacheId === undefined) { + logger.warning("Timed out saving overlay status to cache."); + return false; + } + logger.info(`Saved overlay status to Actions cache with key ${cacheKey}`); + return true; + } catch (error) { + logger.warning( + `Failed to save overlay status to cache: ${getErrorMessage(error)}`, + ); + return false; + } +} + +export async function getCacheKey( + codeql: CodeQL, + languages: string[], + diskUsage: DiskUsage, +): Promise { + // Total disk space, rounded to the nearest 10 GB. This is included in the cache key so that if a + // customer upgrades their runner, we will try again to use overlay analysis, even if the CodeQL + // version has not changed. We round to the nearest 10 GB to work around small differences in disk + // space. + // + // Limitation: this can still flip from "too small" to "large enough" and back again if the disk + // space fluctuates above and below a multiple of 10 GB. + const diskSpaceToNearest10Gb = `${10 * Math.floor(diskUsage.numTotalBytes / (10 * 1024 * 1024 * 1024))}GB`; + + // Include the CodeQL version in the cache key so we will try again to use overlay analysis when + // new queries and libraries that may be more efficient are released. + return `codeql-overlay-status-${[...languages].sort().join("+")}-${(await codeql.getVersion()).version}-runner-${diskSpaceToNearest10Gb}`; +} diff --git a/src/status-report.ts b/src/status-report.ts index 4471b3ce9f..cdb96356e4 100644 --- a/src/status-report.ts +++ b/src/status-report.ts @@ -18,7 +18,7 @@ import { DocUrl } from "./doc-url"; import { EnvVar } from "./environment"; import { getRef } from "./git-utils"; import { Logger } from "./logging"; -import { OverlayBaseDatabaseDownloadStats } from "./overlay-database-utils"; +import { OverlayBaseDatabaseDownloadStats } from "./overlay"; import { getRepositoryNwo } from "./repository"; import { ToolsSource } from "./setup-codeql"; import { diff --git a/src/testing-utils.ts b/src/testing-utils.ts index b34e75fd09..7fada06288 100644 --- a/src/testing-utils.ts +++ b/src/testing-utils.ts @@ -21,7 +21,7 @@ import { FeatureEnablement, } from "./feature-flags"; import { Logger } from "./logging"; -import { OverlayDatabaseMode } from "./overlay-database-utils"; +import { OverlayDatabaseMode } from "./overlay"; import { DEFAULT_DEBUG_ARTIFACT_NAME, DEFAULT_DEBUG_DATABASE_NAME, diff --git a/src/util.ts b/src/util.ts index 5d52b4d0a9..3bcbb350b1 100644 --- a/src/util.ts +++ b/src/util.ts @@ -744,6 +744,7 @@ export async function bundleDb( language: Language, codeql: CodeQL, dbName: string, + { includeDiagnostics }: { includeDiagnostics: boolean }, ) { const databasePath = getCodeQLDatabasePath(config, language); const databaseBundlePath = path.resolve(config.dbLocation, `${dbName}.zip`); @@ -774,6 +775,7 @@ export async function bundleDb( databasePath, databaseBundlePath, dbName, + includeDiagnostics, additionalFiles, ); return databaseBundlePath;