MCPcopy
hub / github.com/prisma/prisma / ensureNeededBinariesExist

Function ensureNeededBinariesExist

packages/engines/src/index.ts:17–37  ·  view source on GitHub ↗
({ download }: EnsureSomeBinariesExistInput)

Source from the content-addressed store, hash-verified

15}
16
17export async function ensureNeededBinariesExist({ download }: EnsureSomeBinariesExistInput) {
18 const binaryDir = path.join(__dirname, '../')
19
20 const binaries = {
21 [BinaryType.SchemaEngineBinary]: binaryDir,
22 } satisfies Record<BinaryType, string>
23
24 debug(`binaries to download ${Object.keys(binaries).join(', ')}`)
25
26 const binaryTargets = process.env.PRISMA_CLI_BINARY_TARGETS
27 ? (process.env.PRISMA_CLI_BINARY_TARGETS.split(',') as BinaryTarget[])
28 : undefined
29
30 await download({
31 binaries: binaries,
32 showProgress: true,
33 version: enginesVersion,
34 failSilent: false,
35 binaryTargets,
36 })
37}
38
39export { enginesVersion } from '@prisma/engines-version'

Callers 2

parseMethod · 0.90

Calls 2

debugFunction · 0.85
downloadFunction · 0.85

Tested by

no test coverage detected