MCPcopy
hub / github.com/prisma/prisma / compileFile

Function compileFile

packages/client/src/utils/compileFile.ts:16–27  ·  view source on GitHub ↗
(
  filePath: string,
  { isolateCompiler = true }: CompileFileOptions = {},
)

Source from the content-addressed store, hash-verified

14 * Throws on compilation errors.
15 */
16export async function compileFile(
17 filePath: string,
18 { isolateCompiler = true }: CompileFileOptions = {},
19): Promise<void> {
20 const workerPath = path.resolve(__dirname, 'compilerWorker.js')
21 if (isolateCompiler) {
22 await execaNode(workerPath, [filePath])
23 } else {
24 const compile = require(workerPath) as (filePath: string) => void
25 compile(filePath)
26 }
27}

Callers 4

dmmf-types.test.tsFile · 0.90
dmmf-types.test.tsFile · 0.90
types.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected