@prisma/fetch-engine 7.9.0-dev.9 → 7.9.1-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_PPMPTC6J_exports = {};
30
- __export(chunk_PPMPTC6J_exports, {
29
+ var chunk_6QTYANCE_exports = {};
30
+ __export(chunk_6QTYANCE_exports, {
31
31
  download: () => download,
32
32
  getBinaryName: () => getBinaryName,
33
33
  getVersion: () => getVersion,
@@ -35,12 +35,12 @@ __export(chunk_PPMPTC6J_exports, {
35
35
  plusX: () => plusX,
36
36
  vercelPkgPathRegex: () => vercelPkgPathRegex
37
37
  });
38
- module.exports = __toCommonJS(chunk_PPMPTC6J_exports);
38
+ module.exports = __toCommonJS(chunk_6QTYANCE_exports);
39
39
  var import_chunk_5564WBCW = require("./chunk-5564WBCW.js");
40
40
  var import_chunk_7JLQJWOR = require("./chunk-7JLQJWOR.js");
41
- var import_chunk_JZJA4MCU = require("./chunk-JZJA4MCU.js");
42
- var import_chunk_NT25DW6B = require("./chunk-NT25DW6B.js");
43
- var import_chunk_2S6LPEDI = require("./chunk-2S6LPEDI.js");
41
+ var import_chunk_IF4T5P2G = require("./chunk-IF4T5P2G.js");
42
+ var import_chunk_HWBBHXY6 = require("./chunk-HWBBHXY6.js");
43
+ var import_chunk_D2GOUA3T = require("./chunk-D2GOUA3T.js");
44
44
  var import_chunk_XNR2KDTK = require("./chunk-XNR2KDTK.js");
45
45
  var import_chunk_FKGWOTGU = require("./chunk-FKGWOTGU.js");
46
46
  var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
@@ -622,7 +622,7 @@ var require_package = (0, import_chunk_2ESYSVXG.__commonJS)({
622
622
  },
623
623
  dependencies: {
624
624
  "@prisma/debug": "workspace:*",
625
- "@prisma/engines-version": "7.8.0-6.3c6e192761c0362d496ed980de936e2f3cebcd3a",
625
+ "@prisma/engines-version": "7.9.0-1.e922089b7d7502aff4249d5da3420f6fa55fc6ad",
626
626
  "@prisma/get-platform": "workspace:*"
627
627
  },
628
628
  scripts: {
@@ -2140,7 +2140,7 @@ function create$(options) {
2140
2140
  return $2;
2141
2141
  }
2142
2142
  var $ = create$();
2143
- var import_fs_extra = (0, import_chunk_2ESYSVXG.__toESM)((0, import_chunk_2S6LPEDI.require_lib)());
2143
+ var import_fs_extra = (0, import_chunk_2ESYSVXG.__toESM)((0, import_chunk_D2GOUA3T.require_lib)());
2144
2144
  async function pMap(iterable, mapper, {
2145
2145
  concurrency = Number.POSITIVE_INFINITY,
2146
2146
  stopOnError = true,
@@ -2270,7 +2270,7 @@ async function pFilter(iterable, filterer, options) {
2270
2270
  );
2271
2271
  return values.filter((value) => Boolean(value[0])).map((value) => value[1]);
2272
2272
  }
2273
- var import_temp_dir = (0, import_chunk_2ESYSVXG.__toESM)((0, import_chunk_NT25DW6B.require_temp_dir)());
2273
+ var import_temp_dir = (0, import_chunk_2ESYSVXG.__toESM)((0, import_chunk_HWBBHXY6.require_temp_dir)());
2274
2274
  var { enginesOverride } = require_package();
2275
2275
  var debug = (0, import_debug.default)("prisma:fetch-engine:download");
2276
2276
  var exists = (0, import_node_util.promisify)(import_node_fs.default.exists);
@@ -2335,7 +2335,7 @@ async function download(options) {
2335
2335
  return shouldDownload;
2336
2336
  });
2337
2337
  if (binariesToDownload.length > 0) {
2338
- const cleanupPromise = (0, import_chunk_JZJA4MCU.cleanupCache)();
2338
+ const cleanupPromise = (0, import_chunk_IF4T5P2G.cleanupCache)();
2339
2339
  let finishBar;
2340
2340
  let setProgress;
2341
2341
  if (opts.showProgress) {
@@ -2344,7 +2344,7 @@ async function download(options) {
2344
2344
  setProgress = collectiveBar.setProgress;
2345
2345
  }
2346
2346
  const promises = binariesToDownload.map((job) => {
2347
- const downloadUrl = (0, import_chunk_2S6LPEDI.getDownloadUrl)({
2347
+ const downloadUrl = (0, import_chunk_D2GOUA3T.getDownloadUrl)({
2348
2348
  channel: "all_commits",
2349
2349
  version: opts.version,
2350
2350
  binaryTarget: job.binaryTarget,
@@ -2422,7 +2422,7 @@ async function binaryNeedsToBeDownloaded(job, nativePlatform, version) {
2422
2422
  });
2423
2423
  if (cachedFile) {
2424
2424
  if (job.skipCacheIntegrityCheck === true) {
2425
- await (0, import_chunk_2S6LPEDI.overwriteFile)(cachedFile, job.targetFilePath);
2425
+ await (0, import_chunk_D2GOUA3T.overwriteFile)(cachedFile, job.targetFilePath);
2426
2426
  return false;
2427
2427
  }
2428
2428
  const sha256FilePath = cachedFile + ".sha256";
@@ -2433,12 +2433,12 @@ async function binaryNeedsToBeDownloaded(job, nativePlatform, version) {
2433
2433
  if (!targetExists) {
2434
2434
  debug(`copying ${cachedFile} to ${job.targetFilePath}`);
2435
2435
  await import_node_fs.default.promises.utimes(cachedFile, /* @__PURE__ */ new Date(), /* @__PURE__ */ new Date());
2436
- await (0, import_chunk_2S6LPEDI.overwriteFile)(cachedFile, job.targetFilePath);
2436
+ await (0, import_chunk_D2GOUA3T.overwriteFile)(cachedFile, job.targetFilePath);
2437
2437
  }
2438
2438
  const targetSha256 = await (0, import_chunk_FKGWOTGU.getHash)(job.targetFilePath);
2439
2439
  if (sha256File !== targetSha256) {
2440
2440
  debug(`overwriting ${job.targetFilePath} with ${cachedFile} as hashes do not match`);
2441
- await (0, import_chunk_2S6LPEDI.overwriteFile)(cachedFile, job.targetFilePath);
2441
+ await (0, import_chunk_D2GOUA3T.overwriteFile)(cachedFile, job.targetFilePath);
2442
2442
  }
2443
2443
  return false;
2444
2444
  } else {
@@ -2453,7 +2453,7 @@ async function binaryNeedsToBeDownloaded(job, nativePlatform, version) {
2453
2453
  }
2454
2454
  if (cachedFile) {
2455
2455
  debug(`copying ${cachedFile} to ${job.targetFilePath}`);
2456
- await (0, import_chunk_2S6LPEDI.overwriteFile)(cachedFile, job.targetFilePath);
2456
+ await (0, import_chunk_D2GOUA3T.overwriteFile)(cachedFile, job.targetFilePath);
2457
2457
  return false;
2458
2458
  }
2459
2459
  return true;
@@ -2491,7 +2491,7 @@ async function getCachedBinaryPath({
2491
2491
  binaryTarget,
2492
2492
  binaryName
2493
2493
  }) {
2494
- const cacheDir = await (0, import_chunk_2S6LPEDI.getCacheDir)(channel, version, binaryTarget);
2494
+ const cacheDir = await (0, import_chunk_D2GOUA3T.getCacheDir)(channel, version, binaryTarget);
2495
2495
  if (!cacheDir) {
2496
2496
  return null;
2497
2497
  }
@@ -2524,7 +2524,7 @@ async function downloadBinary(options) {
2524
2524
  if (progressCb) {
2525
2525
  progressCb(0);
2526
2526
  }
2527
- const { sha256, zippedSha256 } = await (0, import_chunk_NT25DW6B.downloadZip)(downloadUrl, targetFilePath, progressCb);
2527
+ const { sha256, zippedSha256 } = await (0, import_chunk_HWBBHXY6.downloadZip)(downloadUrl, targetFilePath, progressCb);
2528
2528
  if (progressCb) {
2529
2529
  progressCb(1);
2530
2530
  }
@@ -2532,7 +2532,7 @@ async function downloadBinary(options) {
2532
2532
  await saveFileToCache(options, version, sha256, zippedSha256);
2533
2533
  }
2534
2534
  async function saveFileToCache(job, version, sha256, zippedSha256) {
2535
- const cacheDir = await (0, import_chunk_2S6LPEDI.getCacheDir)(channel, version, job.binaryTarget);
2535
+ const cacheDir = await (0, import_chunk_D2GOUA3T.getCacheDir)(channel, version, job.binaryTarget);
2536
2536
  if (!cacheDir) {
2537
2537
  return;
2538
2538
  }
@@ -2540,7 +2540,7 @@ async function saveFileToCache(job, version, sha256, zippedSha256) {
2540
2540
  const cachedSha256Path = import_node_path.default.join(cacheDir, job.binaryName + ".sha256");
2541
2541
  const cachedSha256ZippedPath = import_node_path.default.join(cacheDir, job.binaryName + ".gz.sha256");
2542
2542
  try {
2543
- await (0, import_chunk_2S6LPEDI.overwriteFile)(job.targetFilePath, cachedTargetPath);
2543
+ await (0, import_chunk_D2GOUA3T.overwriteFile)(job.targetFilePath, cachedTargetPath);
2544
2544
  if (sha256 != null) {
2545
2545
  await import_node_fs.default.promises.writeFile(cachedSha256Path, sha256);
2546
2546
  }
@@ -26,15 +26,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_2S6LPEDI_exports = {};
30
- __export(chunk_2S6LPEDI_exports, {
29
+ var chunk_D2GOUA3T_exports = {};
30
+ __export(chunk_D2GOUA3T_exports, {
31
31
  getCacheDir: () => getCacheDir,
32
32
  getDownloadUrl: () => getDownloadUrl,
33
33
  getRootCacheDir: () => getRootCacheDir,
34
34
  overwriteFile: () => overwriteFile,
35
35
  require_lib: () => require_lib
36
36
  });
37
- module.exports = __toCommonJS(chunk_2S6LPEDI_exports);
37
+ module.exports = __toCommonJS(chunk_D2GOUA3T_exports);
38
38
  var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
39
39
  var import_node_fs = __toESM(require("node:fs"));
40
40
  var import_node_os = __toESM(require("node:os"));
@@ -2272,13 +2272,13 @@ var import_fs_extra = (0, import_chunk_2ESYSVXG.__toESM)(require_lib());
2272
2272
  var debug = (0, import_debug.default)("prisma:fetch-engine:cache-dir");
2273
2273
  async function getRootCacheDir() {
2274
2274
  if (import_node_os.default.platform() === "win32") {
2275
+ if (process.env.APPDATA) {
2276
+ return import_node_path.default.join(process.env.APPDATA, "Prisma");
2277
+ }
2275
2278
  const cacheDir = findCacheDirectory({ name: "prisma", create: true });
2276
2279
  if (cacheDir) {
2277
2280
  return cacheDir;
2278
2281
  }
2279
- if (process.env.APPDATA) {
2280
- return import_node_path.default.join(process.env.APPDATA, "Prisma");
2281
- }
2282
2282
  }
2283
2283
  if (process.env.AWS_LAMBDA_FUNCTION_VERSION) {
2284
2284
  try {
@@ -26,15 +26,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_NT25DW6B_exports = {};
30
- __export(chunk_NT25DW6B_exports, {
29
+ var chunk_HWBBHXY6_exports = {};
30
+ __export(chunk_HWBBHXY6_exports, {
31
31
  downloadZip: () => downloadZip,
32
32
  require_temp_dir: () => require_temp_dir
33
33
  });
34
- module.exports = __toCommonJS(chunk_NT25DW6B_exports);
34
+ module.exports = __toCommonJS(chunk_HWBBHXY6_exports);
35
35
  var import_chunk_VLGS4WJI = require("./chunk-VLGS4WJI.js");
36
36
  var import_chunk_7AOUSONO = require("./chunk-7AOUSONO.js");
37
- var import_chunk_2S6LPEDI = require("./chunk-2S6LPEDI.js");
37
+ var import_chunk_D2GOUA3T = require("./chunk-D2GOUA3T.js");
38
38
  var import_chunk_CTLNI6CP = require("./chunk-CTLNI6CP.js");
39
39
  var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
40
40
  var import_node_fs = __toESM(require("node:fs"));
@@ -11863,7 +11863,7 @@ async function downloadZip(url, target, progressCb) {
11863
11863
  onFailedAttempt: (err) => debug("An error occurred while downloading the engine file", err)
11864
11864
  }
11865
11865
  );
11866
- await (0, import_chunk_2S6LPEDI.overwriteFile)(partial, target);
11866
+ await (0, import_chunk_D2GOUA3T.overwriteFile)(partial, target);
11867
11867
  try {
11868
11868
  await rimraf(partial);
11869
11869
  await rimraf(tmpDir);
@@ -26,13 +26,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_JZJA4MCU_exports = {};
30
- __export(chunk_JZJA4MCU_exports, {
29
+ var chunk_IF4T5P2G_exports = {};
30
+ __export(chunk_IF4T5P2G_exports, {
31
31
  cleanupCache: () => cleanupCache
32
32
  });
33
- module.exports = __toCommonJS(chunk_JZJA4MCU_exports);
33
+ module.exports = __toCommonJS(chunk_IF4T5P2G_exports);
34
34
  var import_chunk_7AOUSONO = require("./chunk-7AOUSONO.js");
35
- var import_chunk_2S6LPEDI = require("./chunk-2S6LPEDI.js");
35
+ var import_chunk_D2GOUA3T = require("./chunk-D2GOUA3T.js");
36
36
  var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
37
37
  var import_node_fs = __toESM(require("node:fs"));
38
38
  var import_node_path = __toESM(require("node:path"));
@@ -41,7 +41,7 @@ var import_p_map = (0, import_chunk_2ESYSVXG.__toESM)((0, import_chunk_7AOUSONO.
41
41
  var debug = (0, import_debug.default)("cleanupCache");
42
42
  async function cleanupCache(n = 5) {
43
43
  try {
44
- const rootCacheDir = await (0, import_chunk_2S6LPEDI.getRootCacheDir)();
44
+ const rootCacheDir = await (0, import_chunk_D2GOUA3T.getRootCacheDir)();
45
45
  if (!rootCacheDir) {
46
46
  debug("no rootCacheDir found");
47
47
  return;