MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / saveCacheMetadata

Function saveCacheMetadata

src/utils/plugins/mcpbHandler.ts:478–487  ·  view source on GitHub ↗

* Save cache metadata for an MCPB source

(
  cacheDir: string,
  source: string,
  metadata: McpbCacheMetadata,
)

Source from the content-addressed store, hash-verified

476 * Save cache metadata for an MCPB source
477 */
478async function saveCacheMetadata(
479 cacheDir: string,
480 source: string,
481 metadata: McpbCacheMetadata,
482): Promise<void> {
483 const metadataPath = getMetadataPath(cacheDir, source)
484
485 await getFsImplementation().mkdir(cacheDir)
486 await writeFile(metadataPath, jsonStringify(metadata, null, 2), 'utf-8')
487}
488
489/**
490 * Download MCPB file from URL

Callers 1

loadMcpbFileFunction · 0.85

Calls 3

getMetadataPathFunction · 0.85
getFsImplementationFunction · 0.85
jsonStringifyFunction · 0.85

Tested by

no test coverage detected