MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / saveCacheMetadata

Function saveCacheMetadata

source code/utils/plugins/mcpbHandler.ts:470–479  ·  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

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