mirror of
https://github.com/github/codeql-action.git
synced 2026-10-29 17:17:15 +00:00
Improve documentation for cache file and command keys in CLI
This commit is contained in:
12
src/cache.ts
12
src/cache.ts
@@ -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",
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user