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

Function getCachePathForSource

src/utils/plugins/marketplaceManager.ts:1355–1367  ·  view source on GitHub ↗

* Generate a cache path for a marketplace source

(source: MarketplaceSource)

Source from the content-addressed store, hash-verified

1353 * Generate a cache path for a marketplace source
1354 */
1355function getCachePathForSource(source: MarketplaceSource): string {
1356 const tempName =
1357 source.source === 'github'
1358 ? source.repo.replace('/', '-')
1359 : source.source === 'npm'
1360 ? source.package.replace('@', '').replace('/', '-')
1361 : source.source === 'file'
1362 ? basename(source.path).replace('.json', '')
1363 : source.source === 'directory'
1364 ? basename(source.path)
1365 : 'temp_' + Date.now()
1366 return tempName
1367}
1368
1369/**
1370 * Parse and validate JSON file with a Zod schema

Callers 1

loadAndCacheMarketplaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected