Introduce basic cli/output-cache.ts module

This commit is contained in:
Mario Campos
2026-08-11 11:50:11 -05:00
parent bb19330c5e
commit 4dc327a942

17
src/cli/output-cache.ts Normal file
View File

@@ -0,0 +1,17 @@
import path from "path";
import { getTemporaryDirectory } from "../actions-util";
/**
* 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";
/**
* Returns the path to the temporary file that backs the
* on-disk cache of CLI responses between workflow steps.
*/
function getCommandCacheFilePath(): string {
return path.join(getTemporaryDirectory(), COMMAND_CACHE_FILENAME);
}