Move cache.ts to cli/output-cache.ts

This change should hopefully make the purpose of this module clear.
This commit is contained in:
Mario Campos
2026-06-29 22:16:21 -05:00
parent b3c7aa7372
commit 41965b0e7b
6 changed files with 11 additions and 10 deletions

View File

@@ -4,14 +4,15 @@ import path from "path";
import test from "ava";
import { isVersionInfo } from "../codeql";
import { setupTests } from "../testing-utils";
import {
cacheCommandOutput,
getCachedCommandOutput,
resetCachedCommandOutputs,
CommandCacheKey,
} from "./cache";
import { isVersionInfo } from "./codeql";
import { setupTests } from "./testing-utils";
} from "./output-cache";
setupTests(test);

View File

@@ -1,9 +1,9 @@
import * as fs from "fs";
import * as path from "path";
import { getTemporaryDirectory } from "./actions-util";
import * as json from "./json";
import { getActionsLogger } from "./logging";
import { getTemporaryDirectory } from "../actions-util";
import * as json from "../json";
import { getActionsLogger } from "../logging";
/**
* The name of the temporary file that backs the on-disk cache of

View File

@@ -16,7 +16,7 @@ import {
cacheCommandOutput,
getCachedCommandOutput,
CommandCacheKey,
} from "./cache";
} from "./cli/output-cache";
import { CliError, wrapCliConfigurationError } from "./cli-errors";
import { appendExtraQueryExclusions, type Config } from "./config-utils";
import { DocUrl } from "./doc-url";

View File

@@ -19,12 +19,12 @@ import {
} from "./actions-util";
import { AnalysisKind, getAnalysisKinds } from "./analyses";
import { getGitHubVersion, GitHubApiCombinedDetails } from "./api-client";
import { writeCommandCacheFile } from "./cache";
import {
getDependencyCachingEnabled,
getTotalCacheSize,
shouldRestoreCache,
} from "./caching-utils";
import { writeCommandCacheFile } from "./cli/output-cache";
import { CodeQL } from "./codeql";
import { getConfigFileInput } from "./config/file";
import * as configUtils from "./config-utils";

View File

@@ -12,7 +12,7 @@ import {
isSelfHostedRunner,
} from "./actions-util";
import { getAnalysisKey, getApiClient } from "./api-client";
import { getCachedCommandOutput, CommandCacheKey } from "./cache";
import { getCachedCommandOutput, CommandCacheKey } from "./cli/output-cache";
import { isVersionInfo } from "./codeql";
import { parseRegistriesWithoutCredentials, type Config } from "./config-utils";
import { DependencyCacheRestoreStatusReport } from "./dependency-caching";

View File

@@ -14,8 +14,8 @@ import { ActionsEnv, getActionVersion } from "./actions-util";
import { AnalysisKind } from "./analyses";
import * as apiClient from "./api-client";
import { GitHubApiDetails } from "./api-client";
import { resetCachedCommandOutputs } from "./cache";
import { CachingKind } from "./caching-utils";
import { resetCachedCommandOutputs } from "./cli/output-cache";
import * as codeql from "./codeql";
import { Config } from "./config-utils";
import * as defaults from "./defaults.json";