MCPcopy
hub / github.com/antfu-collective/taze / dumpCache

Function dumpCache

src/io/resolves.ts:48–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46}
47
48export async function dumpCache() {
49 if (!cacheChanged)
50 return
51 try {
52 await fs.mkdir(cacheDir, { recursive: true })
53 await fs.writeFile(cachePath, JSON.stringify(cache), 'utf-8')
54 debug.cache(`cache saved to ${cachePath}`)
55 }
56 catch (err) {
57 console.warn('Failed to save cache')
58 console.warn(err)
59 }
60}
61
62export async function getPackageData(name: string, protocol: Protocol = 'npm', cwd?: string): Promise<PackageData> {
63 let error: any

Callers 1

CheckPackagesFunction · 0.90

Calls 1

warnMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…