import { copySync } from 'fs-extra' ; import path from 'path' ; const clientCopyPath = path . join ( __dirname , '..' , 'prisma-client' ) ; const clientPath = path . dirname ( require . resolve ( '@prisma/client' ) ) ; const clientPkg = require ( '@prisma/client/package.json' ) ; const clientFiles = ( clientPkg . files ?? [ ] ) . map ( ( file ) => path . join ( clientPath , file ) ) ; for ( const file of clientFiles ) { const dest = path . join ( clientCopyPath , path . basename ( file ) ) ; copySync ( file , dest , { recursive : true , overwrite : true } ) ; }