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

Function saveCacheMetadata

src/utils/plugins/mcpbHandler.ts:468–477  ·  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

466 * Save cache metadata for an MCPB source
467 */
468async function saveCacheMetadata(
469 cacheDir: string,
470 source: string,
471 metadata: McpbCacheMetadata,
472): Promise<void> {
473 const metadataPath = getMetadataPath(cacheDir, source)
474
475 await getFsImplementation().mkdir(cacheDir)
476 await writeFile(metadataPath, jsonStringify(metadata, null, 2), 'utf-8')
477}
478
479/**
480 * 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