({ download }: EnsureSomeBinariesExistInput)
| 15 | } |
| 16 | |
| 17 | export 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 | |
| 39 | export { enginesVersion } from '@prisma/engines-version' |
no test coverage detected