Move VersionInfo-related types to cli/output-cache.ts

This brings them out of the crowded all-purpose `util.ts` and into `cli/output-cache.ts` where they are exclusively used.
This commit is contained in:
Mario Campos
2026-08-11 15:35:03 -05:00
parent 246018e041
commit 0a99875ae5
3 changed files with 48 additions and 42 deletions

20
lib/entry-points.js generated
View File

@@ -145241,14 +145241,6 @@ function asHTTPError(arg) {
}
return void 0;
}
function isVersionInfo(x) {
const candidate = x;
return typeof candidate === "object" && candidate !== null && typeof candidate.version === "string" && (candidate.features === void 0 || typeof candidate.features === "object" && candidate.features !== null) && (candidate.overlayVersion === void 0 || typeof candidate.overlayVersion === "number");
}
function isPersistedVersionInfo(x) {
const candidate = x;
return typeof candidate === "object" && candidate !== null && typeof candidate.cmd === "string" && isVersionInfo(candidate.version);
}
async function codeQlVersionAtLeast(codeql, requiredVersion) {
return semver.gte((await codeql.getVersion()).version, requiredVersion);
}
@@ -146292,6 +146284,14 @@ function getCachedCodeQlVersion(cmd, env = getEnv()) {
cachedCodeQlVersion = persisted.version;
return cachedCodeQlVersion;
}
function isVersionInfo(x) {
const candidate = x;
return typeof candidate === "object" && candidate !== null && typeof candidate.version === "string" && (candidate.features === void 0 || typeof candidate.features === "object" && candidate.features !== null) && (candidate.overlayVersion === void 0 || typeof candidate.overlayVersion === "number");
}
function isPersistedVersionInfo(x) {
const candidate = x;
return typeof candidate === "object" && candidate !== null && typeof candidate.cmd === "string" && isVersionInfo(candidate.version);
}
// src/config/pack-registries.ts
function parseRegistries(registriesInput) {
@@ -157827,7 +157827,7 @@ var import_async = __toESM(require_async(), 1);
var import_path7 = require("path");
// node_modules/archiver/lib/error.js
var import_util35 = __toESM(require("util"), 1);
var import_util34 = __toESM(require("util"), 1);
var ERROR_CODES = {
ABORTED: "archive was aborted",
DIRECTORYDIRPATHREQUIRED: "diretory dirpath argument must be a non-empty string value",
@@ -157852,7 +157852,7 @@ function ArchiverError(code, data) {
this.code = code;
this.data = data;
}
import_util35.default.inherits(ArchiverError, Error);
import_util34.default.inherits(ArchiverError, Error);
// node_modules/archiver/lib/core.js
var import_readable_stream2 = __toESM(require_ours(), 1);