diff --git a/lib/entry-points.js b/lib/entry-points.js index 1ccf9ee0b..ada8ee4ee 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -151226,20 +151226,6 @@ var toolcache3 = __toESM(require_tool_cache()); var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var semver10 = __toESM(require_semver2()); -// src/bundle-platform.ts -function getBundlePlatform(platform2 = process.platform, arch2 = process.arch) { - switch (platform2) { - case "win32": - return "win64" /* Win64 */; - case "linux": - return arch2 === "arm64" ? "linux-arm64" /* LinuxArm64 */ : "linux64" /* Linux64 */; - case "darwin": - return "osx64" /* Osx64 */; - default: - return void 0; - } -} - // src/codeql-bundle.ts var PER_LANGUAGE_BUNDLE_NAME = /^codeql-bundle-(.+)-(?:linux64|osx64|win64)\.tar\.(?:gz|zst)$/; function getCodeQLBundleFromUrl(url2) { @@ -151555,6 +151541,22 @@ async function getCodeQlVersionsForOverlayBaseDatabases(rawLanguages, logger) { // src/per-language-bundles.ts var semver7 = __toESM(require_semver2()); + +// src/platform.ts +function getBundlePlatform(platform2 = process.platform, arch2 = process.arch) { + switch (platform2) { + case "win32": + return "win64" /* Win64 */; + case "linux": + return arch2 === "arm64" ? "linux-arm64" /* LinuxArm64 */ : "linux64" /* Linux64 */; + case "darwin": + return "osx64" /* Osx64 */; + default: + return void 0; + } +} + +// src/per-language-bundles.ts var MIN_PER_LANGUAGE_BUNDLE_CLI_VERSION = "2.27.1"; var PER_LANGUAGE_BUNDLE_LANGUAGES = { ["linux64" /* Linux64 */]: /* @__PURE__ */ new Set([ diff --git a/src/per-language-bundles.test.ts b/src/per-language-bundles.test.ts index 76f347edf..b8f48512f 100644 --- a/src/per-language-bundles.test.ts +++ b/src/per-language-bundles.test.ts @@ -1,6 +1,5 @@ import test from "ava"; -import { BundlePlatform } from "./bundle-platform"; import { ActionsEnvVars } from "./environment"; import { Feature } from "./feature-flags"; import { BuiltInLanguage } from "./languages"; @@ -9,6 +8,7 @@ import { MIN_PER_LANGUAGE_BUNDLE_CLI_VERSION, PerLanguageBundleOptions, } from "./per-language-bundles"; +import { BundlePlatform } from "./platform"; import { createFeatures, getRecordingLogger, diff --git a/src/per-language-bundles.ts b/src/per-language-bundles.ts index 567c365ff..ea715aeb1 100644 --- a/src/per-language-bundles.ts +++ b/src/per-language-bundles.ts @@ -2,9 +2,9 @@ import * as semver from "semver"; import { ActionState } from "./action-common"; import { isGitHubHostedRunner } from "./actions-util"; -import { BundlePlatform } from "./bundle-platform"; import { Feature } from "./feature-flags"; import { BuiltInLanguage, parseBuiltInLanguage } from "./languages"; +import { BundlePlatform } from "./platform"; import * as tar from "./tar"; import { GitHubVariant } from "./util"; diff --git a/src/bundle-platform.test.ts b/src/platform.test.ts similarity index 89% rename from src/bundle-platform.test.ts rename to src/platform.test.ts index 73508ca23..c8a6a7955 100644 --- a/src/bundle-platform.test.ts +++ b/src/platform.test.ts @@ -1,6 +1,6 @@ import test from "ava"; -import { BundlePlatform, getBundlePlatform } from "./bundle-platform"; +import { BundlePlatform, getBundlePlatform } from "./platform"; for (const [platform, arch, expected] of [ ["linux", "x64", BundlePlatform.Linux64], diff --git a/src/bundle-platform.ts b/src/platform.ts similarity index 100% rename from src/bundle-platform.ts rename to src/platform.ts diff --git a/src/setup-codeql.ts b/src/setup-codeql.ts index c476dd885..60f68a37a 100644 --- a/src/setup-codeql.ts +++ b/src/setup-codeql.ts @@ -17,7 +17,6 @@ import { isRunningLocalAction, } from "./actions-util"; import * as api from "./api-client"; -import { getBundlePlatform } from "./bundle-platform"; import { CodeQLBundle, getCodeQLBundleFromUrl } from "./codeql-bundle"; import * as defaults from "./defaults.json"; import { @@ -37,6 +36,7 @@ import { BuiltInLanguage } from "./languages"; import { Logger } from "./logging"; import { getCodeQlVersionsForOverlayBaseDatabases } from "./overlay/caching"; import { getPerLanguageBundleLanguage } from "./per-language-bundles"; +import { getBundlePlatform } from "./platform"; import * as tar from "./tar"; import { deleteToolcacheBundles, diff --git a/src/testing-utils.ts b/src/testing-utils.ts index f3456b725..f15cee2e7 100644 --- a/src/testing-utils.ts +++ b/src/testing-utils.ts @@ -17,7 +17,6 @@ import { ActionsEnv, getActionVersion } from "./actions-util"; import { AnalysisKind } from "./analyses"; import * as apiClient from "./api-client"; import { GitHubApiDetails } from "./api-client"; -import { getBundlePlatform } from "./bundle-platform"; import { CachingKind } from "./caching-utils"; import { resetCachedCodeQlVersion } from "./cli/output-cache"; import type { VersionInfo } from "./cli/types"; @@ -33,6 +32,7 @@ import { } from "./feature-flags"; import { Logger } from "./logging"; import { OverlayDatabaseMode } from "./overlay/overlay-database-mode"; +import { getBundlePlatform } from "./platform"; import { ActionName } from "./status-report"; import { DEFAULT_DEBUG_ARTIFACT_NAME,