@prisma/fetch-engine 5.18.0-integration-feat-typed-sql.7 → 5.18.0-integration-feat-typed-sql.8

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.
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var chunk_VQPMQ44G_exports = {};
30
+ __export(chunk_VQPMQ44G_exports, {
31
+ cleanupCache: () => cleanupCache
32
+ });
33
+ module.exports = __toCommonJS(chunk_VQPMQ44G_exports);
34
+ var import_chunk_RGVHWUUH = require("./chunk-RGVHWUUH.js");
35
+ var import_chunk_AZKAIDG4 = require("./chunk-AZKAIDG4.js");
36
+ var import_chunk_AH6QHEOA = require("./chunk-AH6QHEOA.js");
37
+ var import_debug = __toESM(require("@prisma/debug"));
38
+ var import_fs = __toESM(require("fs"));
39
+ var import_path = __toESM(require("path"));
40
+ var import_util = require("util");
41
+ var import_p_map = (0, import_chunk_AH6QHEOA.__toESM)((0, import_chunk_RGVHWUUH.require_p_map)());
42
+ var import_rimraf = (0, import_chunk_AH6QHEOA.__toESM)((0, import_chunk_RGVHWUUH.require_rimraf)());
43
+ var debug = (0, import_debug.default)("cleanupCache");
44
+ var del = (0, import_util.promisify)(import_rimraf.default);
45
+ async function cleanupCache(n = 5) {
46
+ try {
47
+ const rootCacheDir = await (0, import_chunk_AZKAIDG4.getRootCacheDir)();
48
+ if (!rootCacheDir) {
49
+ debug("no rootCacheDir found");
50
+ return;
51
+ }
52
+ const channel = "master";
53
+ const cacheDir = import_path.default.join(rootCacheDir, channel);
54
+ const dirs = await import_fs.default.promises.readdir(cacheDir);
55
+ const dirsWithMeta = await Promise.all(
56
+ dirs.map(async (dirName) => {
57
+ const dir = import_path.default.join(cacheDir, dirName);
58
+ const statResult = await import_fs.default.promises.stat(dir);
59
+ return {
60
+ dir,
61
+ created: statResult.birthtime
62
+ };
63
+ })
64
+ );
65
+ dirsWithMeta.sort((a, b) => a.created < b.created ? 1 : -1);
66
+ const dirsToRemove = dirsWithMeta.slice(n);
67
+ await (0, import_p_map.default)(dirsToRemove, (dir) => del(dir.dir), { concurrency: 20 });
68
+ } catch (e) {
69
+ }
70
+ }
package/dist/download.js CHANGED
@@ -18,15 +18,15 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var download_exports = {};
20
20
  __export(download_exports, {
21
- download: () => import_chunk_3IWSVARY.download,
22
- getBinaryName: () => import_chunk_3IWSVARY.getBinaryName,
23
- getVersion: () => import_chunk_3IWSVARY.getVersion,
24
- maybeCopyToTmp: () => import_chunk_3IWSVARY.maybeCopyToTmp,
25
- plusX: () => import_chunk_3IWSVARY.plusX,
26
- vercelPkgPathRegex: () => import_chunk_3IWSVARY.vercelPkgPathRegex
21
+ download: () => import_chunk_NGFDJM4I.download,
22
+ getBinaryName: () => import_chunk_NGFDJM4I.getBinaryName,
23
+ getVersion: () => import_chunk_NGFDJM4I.getVersion,
24
+ maybeCopyToTmp: () => import_chunk_NGFDJM4I.maybeCopyToTmp,
25
+ plusX: () => import_chunk_NGFDJM4I.plusX,
26
+ vercelPkgPathRegex: () => import_chunk_NGFDJM4I.vercelPkgPathRegex
27
27
  });
28
28
  module.exports = __toCommonJS(download_exports);
29
- var import_chunk_3IWSVARY = require("./chunk-3IWSVARY.js");
29
+ var import_chunk_NGFDJM4I = require("./chunk-NGFDJM4I.js");
30
30
  var import_chunk_4LX3XBNY = require("./chunk-4LX3XBNY.js");
31
31
  var import_chunk_MX3HXAU2 = require("./chunk-MX3HXAU2.js");
32
32
  var import_chunk_RIFXCDQ6 = require("./chunk-RIFXCDQ6.js");
package/dist/index.js CHANGED
@@ -21,20 +21,20 @@ __export(dist_exports, {
21
21
  BinaryType: () => import_chunk_X37PZICB.BinaryType,
22
22
  allEngineEnvVarsSet: () => import_chunk_PXQVM7NP.allEngineEnvVarsSet,
23
23
  deprecatedEnvVarMap: () => import_chunk_PXQVM7NP.deprecatedEnvVarMap,
24
- download: () => import_chunk_3IWSVARY.download,
24
+ download: () => import_chunk_NGFDJM4I.download,
25
25
  engineEnvVarMap: () => import_chunk_PXQVM7NP.engineEnvVarMap,
26
26
  getBinaryEnvVarPath: () => import_chunk_PXQVM7NP.getBinaryEnvVarPath,
27
- getBinaryName: () => import_chunk_3IWSVARY.getBinaryName,
27
+ getBinaryName: () => import_chunk_NGFDJM4I.getBinaryName,
28
28
  getCacheDir: () => import_chunk_5T2KHPZI.getCacheDir,
29
29
  getProxyAgent: () => import_chunk_IGWBG6OP.getProxyAgent,
30
- getVersion: () => import_chunk_3IWSVARY.getVersion,
31
- maybeCopyToTmp: () => import_chunk_3IWSVARY.maybeCopyToTmp,
30
+ getVersion: () => import_chunk_NGFDJM4I.getVersion,
31
+ maybeCopyToTmp: () => import_chunk_NGFDJM4I.maybeCopyToTmp,
32
32
  overwriteFile: () => import_chunk_5T2KHPZI.overwriteFile,
33
- plusX: () => import_chunk_3IWSVARY.plusX,
34
- vercelPkgPathRegex: () => import_chunk_3IWSVARY.vercelPkgPathRegex
33
+ plusX: () => import_chunk_NGFDJM4I.plusX,
34
+ vercelPkgPathRegex: () => import_chunk_NGFDJM4I.vercelPkgPathRegex
35
35
  });
36
36
  module.exports = __toCommonJS(dist_exports);
37
- var import_chunk_3IWSVARY = require("./chunk-3IWSVARY.js");
37
+ var import_chunk_NGFDJM4I = require("./chunk-NGFDJM4I.js");
38
38
  var import_chunk_4LX3XBNY = require("./chunk-4LX3XBNY.js");
39
39
  var import_chunk_MX3HXAU2 = require("./chunk-MX3HXAU2.js");
40
40
  var import_chunk_RIFXCDQ6 = require("./chunk-RIFXCDQ6.js");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/fetch-engine",
3
- "version": "5.18.0-integration-feat-typed-sql.7",
3
+ "version": "5.18.0-integration-feat-typed-sql.8",
4
4
  "description": "This package is intended for Prisma's internal use",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -43,8 +43,8 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@prisma/engines-version": "5.18.0-26.feat-introspect-sql-4dcdf8b8304815e12f4af0e41837efb42c98e9b7",
46
- "@prisma/debug": "5.18.0-integration-feat-typed-sql.7",
47
- "@prisma/get-platform": "5.18.0-integration-feat-typed-sql.7"
46
+ "@prisma/debug": "5.18.0-integration-feat-typed-sql.8",
47
+ "@prisma/get-platform": "5.18.0-integration-feat-typed-sql.8"
48
48
  },
49
49
  "files": [
50
50
  "README.md",