MCPcopy Index your code
hub / github.com/code-pushup/cli / writeRunnerResults

Function writeRunnerResults

packages/core/src/lib/implementation/runner.ts:123–134  ·  view source on GitHub ↗
(
  pluginSlug: string,
  outputDir: string,
  runnerResult: RunnerResult,
)

Source from the content-addressed store, hash-verified

121 * @param outputDir
122 */
123export async function writeRunnerResults(
124 pluginSlug: string,
125 outputDir: string,
126 runnerResult: RunnerResult,
127): Promise<void> {
128 const cacheFilePath = getRunnerOutputsPath(pluginSlug, outputDir);
129 await ensureDirectoryExists(path.dirname(cacheFilePath));
130 await writeFile(cacheFilePath, JSON.stringify(runnerResult.audits, null, 2));
131 logger.info(
132 `Wrote runner output to cache ${formatCachePathSuffix(cacheFilePath)}`,
133 );
134}
135
136export async function readRunnerResults(
137 pluginSlug: string,

Callers 2

executePluginFunction · 0.85
runner.int.test.tsFile · 0.85

Calls 5

ensureDirectoryExistsFunction · 0.90
getRunnerOutputsPathFunction · 0.85
writeFileFunction · 0.85
formatCachePathSuffixFunction · 0.85
infoMethod · 0.80

Tested by

no test coverage detected