@prisma/fetch-engine
Advanced tools
Comparing version 0.3.39 to 0.3.40
@@ -32,2 +32,5 @@ "use strict"; | ||
const platform = await get_platform_1.getPlatform(); | ||
if (Object.values(options.binaries).length === 0) { | ||
return {}; | ||
} | ||
const downloadDoneFile = options.binaries | ||
@@ -39,5 +42,7 @@ ? path_1.default.join(options.binaries['query-engine'] || | ||
const nativeDownloadsDone = downloadDoneFile ? fs_1.default.existsSync(downloadDoneFile) : false; | ||
const everythingDownloaded = nativeDownloadsDone && | ||
(!options.binaryTargets || (options.binaryTargets.length === 0 && options.binaryTargets[0] === platform)); | ||
await cleanupCache_1.cleanupCache(); | ||
const mergedOptions = Object.assign(Object.assign({ binaryTargets: [platform], version: 'latest' }, options), { binaries: mapKeys(options.binaries, key => engineTypeToBinaryType(key, platform)) }); | ||
const bar = options.showProgress | ||
const bar = options.showProgress && !everythingDownloaded | ||
? log_1.getBar(`Downloading Prisma engines for ${mergedOptions.binaryTargets.map(p => chalk_1.default.bold(p)).join(' and ')}`) | ||
@@ -44,0 +49,0 @@ : undefined; |
{ | ||
"name": "@prisma/fetch-engine", | ||
"version": "0.3.39", | ||
"version": "0.3.40", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
Sorry, the diff of this file is not supported yet
47302
644