MCPcopy Create free account
hub / github.com/vercel/vercel / cleanCacheArtifacts

Function cleanCacheArtifacts

packages/python/src/quirks/prisma.ts:110–126  ·  view source on GitHub ↗

Remove transient files prisma leaves inside cacheDir.

(cacheDir: string, extras: string[] = [])

Source from the content-addressed store, hash-verified

108
109/** Remove transient files prisma leaves inside cacheDir. */
110async function cleanCacheArtifacts(cacheDir: string, extras: string[] = []) {
111 const paths = [
112 join(cacheDir, 'node_modules'),
113 join(cacheDir, 'package.json'),
114 join(cacheDir, 'package-lock.json'),
115 ...extras,
116 ];
117 for (const p of paths) {
118 try {
119 await fs.promises.rm(p, { recursive: true, force: true });
120 } catch (err) {
121 console.warn(
122 `could not clean up ${p}: ${err instanceof Error ? err.message : String(err)}`
123 );
124 }
125 }
126}
127
128/** Check whether the prisma client has already been generated. */
129async function isClientGenerated(

Callers 1

runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected