Improve documentation for cache file and command keys in CLI

This commit is contained in:
Mario Campos
2026-06-19 14:12:27 -05:00
parent defcf1bff6
commit 420c97eadd
2 changed files with 7 additions and 7 deletions

View File

@@ -4,15 +4,13 @@ import * as path from "path";
import { getTemporaryDirectory } from "./actions-util";
import * as json from "./json";
/** The name of the temporary file backing the cache (tier 2). */
/**
* The name of the temporary file that backs the on-disk cache of
* CLI responses between workflow steps.
*/
const COMMAND_CACHE_FILENAME = "codeql-action-command-cache.json";
/**
* The keys under which the output of cached `codeql` commands is stored. Each
* key is shared by the producer (the corresponding method in `codeql.ts`) and
* any consumers (e.g. `status-report.ts`, which peeks the cached version
* without invoking the CLI).
*/
/** The keys for cached CLI commands. */
export enum CommandCacheKey {
Version = "version",
ResolveLanguages = "resolveLanguages",

View File

@@ -234,6 +234,7 @@ export interface VersionInfo {
overlayVersion?: number;
}
/** Returns true if `x` is a {@link VersionInfo}. */
export function isVersionInfo(x: unknown): x is VersionInfo {
return (
json.isObject(x) &&
@@ -264,6 +265,7 @@ export interface ResolveLanguagesOutput {
};
}
/** Returns true if `x` is a {@link ResolveLanguagesOutput}. */
export function isResolveLanguagesOutput(
x: unknown,
): x is ResolveLanguagesOutput {