Rename the platform module

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Henry Mercer
2026-09-17 19:03:27 +01:00
parent 549d498da3
commit ead1f7d93f
7 changed files with 21 additions and 19 deletions

30
lib/entry-points.js generated
View File

@@ -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([

View File

@@ -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,

View File

@@ -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";

View File

@@ -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],

View File

@@ -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,

View File

@@ -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,