prisma 6.5.0-integration-fix-improve-global-omit-api-performance-2.1 → 6.5.0-integration-fix-improve-global-omit-api-performance-2.2

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.
@@ -33,18 +33,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  ));
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
- // ../../node_modules/.pnpm/@prisma+engines-version@6.4.0-29.a9055b89e58b4b5bfb59600785423b1db3d0e75d/node_modules/@prisma/engines-version/package.json
36
+ // ../../node_modules/.pnpm/@prisma+engines-version@6.5.0-35.c4e2705a07520fd27af6feba131ff83c38cd0c5c/node_modules/@prisma/engines-version/package.json
37
37
  var require_package = __commonJS({
38
- "../../node_modules/.pnpm/@prisma+engines-version@6.4.0-29.a9055b89e58b4b5bfb59600785423b1db3d0e75d/node_modules/@prisma/engines-version/package.json"(exports2, module2) {
38
+ "../../node_modules/.pnpm/@prisma+engines-version@6.5.0-35.c4e2705a07520fd27af6feba131ff83c38cd0c5c/node_modules/@prisma/engines-version/package.json"(exports2, module2) {
39
39
  module2.exports = {
40
40
  name: "@prisma/engines-version",
41
- version: "6.4.0-29.a9055b89e58b4b5bfb59600785423b1db3d0e75d",
41
+ version: "6.5.0-35.c4e2705a07520fd27af6feba131ff83c38cd0c5c",
42
42
  main: "index.js",
43
43
  types: "index.d.ts",
44
44
  license: "Apache-2.0",
45
45
  author: "Tim Suchanek <suchanek@prisma.io>",
46
46
  prisma: {
47
- enginesVersion: "a9055b89e58b4b5bfb59600785423b1db3d0e75d"
47
+ enginesVersion: "c4e2705a07520fd27af6feba131ff83c38cd0c5c"
48
48
  },
49
49
  repository: {
50
50
  type: "git",
@@ -66,9 +66,9 @@ var require_package = __commonJS({
66
66
  }
67
67
  });
68
68
 
69
- // ../../node_modules/.pnpm/@prisma+engines-version@6.4.0-29.a9055b89e58b4b5bfb59600785423b1db3d0e75d/node_modules/@prisma/engines-version/index.js
69
+ // ../../node_modules/.pnpm/@prisma+engines-version@6.5.0-35.c4e2705a07520fd27af6feba131ff83c38cd0c5c/node_modules/@prisma/engines-version/index.js
70
70
  var require_engines_version = __commonJS({
71
- "../../node_modules/.pnpm/@prisma+engines-version@6.4.0-29.a9055b89e58b4b5bfb59600785423b1db3d0e75d/node_modules/@prisma/engines-version/index.js"(exports2) {
71
+ "../../node_modules/.pnpm/@prisma+engines-version@6.5.0-35.c4e2705a07520fd27af6feba131ff83c38cd0c5c/node_modules/@prisma/engines-version/index.js"(exports2) {
72
72
  "use strict";
73
73
  Object.defineProperty(exports2, "__esModule", { value: true });
74
74
  exports2.enginesVersion = void 0;
@@ -76,20 +76,17 @@ var require_engines_version = __commonJS({
76
76
  }
77
77
  });
78
78
 
79
- // ../../node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js
79
+ // ../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
80
80
  var require_universalify = __commonJS({
81
- "../../node_modules/.pnpm/universalify@2.0.0/node_modules/universalify/index.js"(exports2) {
81
+ "../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(exports2) {
82
82
  "use strict";
83
83
  exports2.fromCallback = function(fn) {
84
84
  return Object.defineProperty(function(...args) {
85
85
  if (typeof args[args.length - 1] === "function") fn.apply(this, args);
86
86
  else {
87
87
  return new Promise((resolve, reject) => {
88
- fn.call(
89
- this,
90
- ...args,
91
- (err, res) => err != null ? reject(err) : resolve(res)
92
- );
88
+ args.push((err, res) => err != null ? reject(err) : resolve(res));
89
+ fn.apply(this, args);
93
90
  });
94
91
  }
95
92
  }, "name", { value: fn.name });
@@ -98,15 +95,18 @@ var require_universalify = __commonJS({
98
95
  return Object.defineProperty(function(...args) {
99
96
  const cb = args[args.length - 1];
100
97
  if (typeof cb !== "function") return fn.apply(this, args);
101
- else fn.apply(this, args.slice(0, -1)).then((r) => cb(null, r), cb);
98
+ else {
99
+ args.pop();
100
+ fn.apply(this, args).then((r) => cb(null, r), cb);
101
+ }
102
102
  }, "name", { value: fn.name });
103
103
  };
104
104
  }
105
105
  });
106
106
 
107
- // ../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js
107
+ // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js
108
108
  var require_polyfills = __commonJS({
109
- "../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js"(exports2, module2) {
109
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports2, module2) {
110
110
  "use strict";
111
111
  var constants = require("constants");
112
112
  var origCwd = process.cwd;
@@ -176,7 +176,7 @@ var require_polyfills = __commonJS({
176
176
  var start = Date.now();
177
177
  var backoff = 0;
178
178
  fs$rename(from, to, function CB(er) {
179
- if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) {
179
+ if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
180
180
  setTimeout(function() {
181
181
  fs3.stat(to, function(stater, st) {
182
182
  if (stater && stater.code === "ENOENT")
@@ -393,9 +393,9 @@ var require_polyfills = __commonJS({
393
393
  }
394
394
  });
395
395
 
396
- // ../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js
396
+ // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js
397
397
  var require_legacy_streams = __commonJS({
398
- "../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
398
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
399
399
  "use strict";
400
400
  var Stream = require("stream").Stream;
401
401
  module2.exports = legacy;
@@ -490,9 +490,9 @@ var require_legacy_streams = __commonJS({
490
490
  }
491
491
  });
492
492
 
493
- // ../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js
493
+ // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js
494
494
  var require_clone = __commonJS({
495
- "../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/clone.js"(exports2, module2) {
495
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports2, module2) {
496
496
  "use strict";
497
497
  module2.exports = clone;
498
498
  var getPrototypeOf = Object.getPrototypeOf || function(obj) {
@@ -513,9 +513,9 @@ var require_clone = __commonJS({
513
513
  }
514
514
  });
515
515
 
516
- // ../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js
516
+ // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
517
517
  var require_graceful_fs = __commonJS({
518
- "../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
518
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
519
519
  "use strict";
520
520
  var fs3 = require("fs");
521
521
  var polyfills = require_polyfills();
@@ -884,9 +884,9 @@ var require_graceful_fs = __commonJS({
884
884
  }
885
885
  });
886
886
 
887
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/fs/index.js
887
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js
888
888
  var require_fs = __commonJS({
889
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/fs/index.js"(exports2) {
889
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"(exports2) {
890
890
  "use strict";
891
891
  var u = require_universalify().fromCallback;
892
892
  var fs3 = require_graceful_fs();
@@ -897,6 +897,7 @@ var require_fs = __commonJS({
897
897
  "chown",
898
898
  "close",
899
899
  "copyFile",
900
+ "cp",
900
901
  "fchmod",
901
902
  "fchown",
902
903
  "fdatasync",
@@ -904,8 +905,10 @@ var require_fs = __commonJS({
904
905
  "fsync",
905
906
  "ftruncate",
906
907
  "futimes",
908
+ "glob",
907
909
  "lchmod",
908
910
  "lchown",
911
+ "lutimes",
909
912
  "link",
910
913
  "lstat",
911
914
  "mkdir",
@@ -920,6 +923,7 @@ var require_fs = __commonJS({
920
923
  "rm",
921
924
  "rmdir",
922
925
  "stat",
926
+ "statfs",
923
927
  "symlink",
924
928
  "truncate",
925
929
  "unlink",
@@ -996,9 +1000,9 @@ var require_fs = __commonJS({
996
1000
  }
997
1001
  });
998
1002
 
999
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/utils.js
1003
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/utils.js
1000
1004
  var require_utils = __commonJS({
1001
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/utils.js"(exports2, module2) {
1005
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports2, module2) {
1002
1006
  "use strict";
1003
1007
  var path5 = require("path");
1004
1008
  module2.exports.checkPath = function checkPath(pth) {
@@ -1014,9 +1018,9 @@ var require_utils = __commonJS({
1014
1018
  }
1015
1019
  });
1016
1020
 
1017
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/make-dir.js
1021
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/make-dir.js
1018
1022
  var require_make_dir = __commonJS({
1019
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
1023
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
1020
1024
  "use strict";
1021
1025
  var fs3 = require_fs();
1022
1026
  var { checkPath } = require_utils();
@@ -1042,9 +1046,9 @@ var require_make_dir = __commonJS({
1042
1046
  }
1043
1047
  });
1044
1048
 
1045
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/index.js
1049
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js
1046
1050
  var require_mkdirs = __commonJS({
1047
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/mkdirs/index.js"(exports2, module2) {
1051
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/index.js"(exports2, module2) {
1048
1052
  "use strict";
1049
1053
  var u = require_universalify().fromPromise;
1050
1054
  var { makeDir: _makeDir, makeDirSync } = require_make_dir();
@@ -1061,9 +1065,9 @@ var require_mkdirs = __commonJS({
1061
1065
  }
1062
1066
  });
1063
1067
 
1064
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/path-exists/index.js
1068
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/path-exists/index.js
1065
1069
  var require_path_exists = __commonJS({
1066
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) {
1070
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) {
1067
1071
  "use strict";
1068
1072
  var u = require_universalify().fromPromise;
1069
1073
  var fs3 = require_fs();
@@ -1077,20 +1081,27 @@ var require_path_exists = __commonJS({
1077
1081
  }
1078
1082
  });
1079
1083
 
1080
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/utimes.js
1084
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/utimes.js
1081
1085
  var require_utimes = __commonJS({
1082
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) {
1086
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) {
1083
1087
  "use strict";
1084
- var fs3 = require_graceful_fs();
1085
- function utimesMillis(path5, atime, mtime, callback) {
1086
- fs3.open(path5, "r+", (err, fd) => {
1087
- if (err) return callback(err);
1088
- fs3.futimes(fd, atime, mtime, (futimesErr) => {
1089
- fs3.close(fd, (closeErr) => {
1090
- if (callback) callback(futimesErr || closeErr);
1091
- });
1092
- });
1093
- });
1088
+ var fs3 = require_fs();
1089
+ var u = require_universalify().fromPromise;
1090
+ async function utimesMillis(path5, atime, mtime) {
1091
+ const fd = await fs3.open(path5, "r+");
1092
+ let closeErr = null;
1093
+ try {
1094
+ await fs3.futimes(fd, atime, mtime);
1095
+ } finally {
1096
+ try {
1097
+ await fs3.close(fd);
1098
+ } catch (e) {
1099
+ closeErr = e;
1100
+ }
1101
+ }
1102
+ if (closeErr) {
1103
+ throw closeErr;
1104
+ }
1094
1105
  }
1095
1106
  function utimesMillisSync(path5, atime, mtime) {
1096
1107
  const fd = fs3.openSync(path5, "r+");
@@ -1098,19 +1109,19 @@ var require_utimes = __commonJS({
1098
1109
  return fs3.closeSync(fd);
1099
1110
  }
1100
1111
  module2.exports = {
1101
- utimesMillis,
1112
+ utimesMillis: u(utimesMillis),
1102
1113
  utimesMillisSync
1103
1114
  };
1104
1115
  }
1105
1116
  });
1106
1117
 
1107
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/stat.js
1118
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/stat.js
1108
1119
  var require_stat = __commonJS({
1109
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
1120
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
1110
1121
  "use strict";
1111
1122
  var fs3 = require_fs();
1112
1123
  var path5 = require("path");
1113
- var util2 = require("util");
1124
+ var u = require_universalify().fromPromise;
1114
1125
  function getStats(src, dest, opts) {
1115
1126
  const statFunc = opts.dereference ? (file2) => fs3.stat(file2, { bigint: true }) : (file2) => fs3.lstat(file2, { bigint: true });
1116
1127
  return Promise.all([
@@ -1133,31 +1144,28 @@ var require_stat = __commonJS({
1133
1144
  }
1134
1145
  return { srcStat, destStat };
1135
1146
  }
1136
- function checkPaths(src, dest, funcName, opts, cb) {
1137
- util2.callbackify(getStats)(src, dest, opts, (err, stats) => {
1138
- if (err) return cb(err);
1139
- const { srcStat, destStat } = stats;
1140
- if (destStat) {
1141
- if (areIdentical(srcStat, destStat)) {
1142
- const srcBaseName = path5.basename(src);
1143
- const destBaseName = path5.basename(dest);
1144
- if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
1145
- return cb(null, { srcStat, destStat, isChangingCase: true });
1146
- }
1147
- return cb(new Error("Source and destination must not be the same."));
1148
- }
1149
- if (srcStat.isDirectory() && !destStat.isDirectory()) {
1150
- return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`));
1151
- }
1152
- if (!srcStat.isDirectory() && destStat.isDirectory()) {
1153
- return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`));
1147
+ async function checkPaths(src, dest, funcName, opts) {
1148
+ const { srcStat, destStat } = await getStats(src, dest, opts);
1149
+ if (destStat) {
1150
+ if (areIdentical(srcStat, destStat)) {
1151
+ const srcBaseName = path5.basename(src);
1152
+ const destBaseName = path5.basename(dest);
1153
+ if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
1154
+ return { srcStat, destStat, isChangingCase: true };
1154
1155
  }
1156
+ throw new Error("Source and destination must not be the same.");
1157
+ }
1158
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
1159
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`);
1155
1160
  }
1156
- if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
1157
- return cb(new Error(errMsg(src, dest, funcName)));
1161
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
1162
+ throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`);
1158
1163
  }
1159
- return cb(null, { srcStat, destStat });
1160
- });
1164
+ }
1165
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
1166
+ throw new Error(errMsg(src, dest, funcName));
1167
+ }
1168
+ return { srcStat, destStat };
1161
1169
  }
1162
1170
  function checkPathsSync(src, dest, funcName, opts) {
1163
1171
  const { srcStat, destStat } = getStatsSync(src, dest, opts);
@@ -1182,20 +1190,21 @@ var require_stat = __commonJS({
1182
1190
  }
1183
1191
  return { srcStat, destStat };
1184
1192
  }
1185
- function checkParentPaths(src, srcStat, dest, funcName, cb) {
1193
+ async function checkParentPaths(src, srcStat, dest, funcName) {
1186
1194
  const srcParent = path5.resolve(path5.dirname(src));
1187
1195
  const destParent = path5.resolve(path5.dirname(dest));
1188
- if (destParent === srcParent || destParent === path5.parse(destParent).root) return cb();
1189
- fs3.stat(destParent, { bigint: true }, (err, destStat) => {
1190
- if (err) {
1191
- if (err.code === "ENOENT") return cb();
1192
- return cb(err);
1193
- }
1194
- if (areIdentical(srcStat, destStat)) {
1195
- return cb(new Error(errMsg(src, dest, funcName)));
1196
- }
1197
- return checkParentPaths(src, srcStat, destParent, funcName, cb);
1198
- });
1196
+ if (destParent === srcParent || destParent === path5.parse(destParent).root) return;
1197
+ let destStat;
1198
+ try {
1199
+ destStat = await fs3.stat(destParent, { bigint: true });
1200
+ } catch (err) {
1201
+ if (err.code === "ENOENT") return;
1202
+ throw err;
1203
+ }
1204
+ if (areIdentical(srcStat, destStat)) {
1205
+ throw new Error(errMsg(src, dest, funcName));
1206
+ }
1207
+ return checkParentPaths(src, srcStat, destParent, funcName);
1199
1208
  }
1200
1209
  function checkParentPathsSync(src, srcStat, dest, funcName) {
1201
1210
  const srcParent = path5.resolve(path5.dirname(src));
@@ -1219,42 +1228,39 @@ var require_stat = __commonJS({
1219
1228
  function isSrcSubdir(src, dest) {
1220
1229
  const srcArr = path5.resolve(src).split(path5.sep).filter((i) => i);
1221
1230
  const destArr = path5.resolve(dest).split(path5.sep).filter((i) => i);
1222
- return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true);
1231
+ return srcArr.every((cur, i) => destArr[i] === cur);
1223
1232
  }
1224
1233
  function errMsg(src, dest, funcName) {
1225
1234
  return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`;
1226
1235
  }
1227
1236
  module2.exports = {
1228
- checkPaths,
1237
+ // checkPaths
1238
+ checkPaths: u(checkPaths),
1229
1239
  checkPathsSync,
1230
- checkParentPaths,
1240
+ // checkParent
1241
+ checkParentPaths: u(checkParentPaths),
1231
1242
  checkParentPathsSync,
1243
+ // Misc
1232
1244
  isSrcSubdir,
1233
1245
  areIdentical
1234
1246
  };
1235
1247
  }
1236
1248
  });
1237
1249
 
1238
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy.js
1250
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/copy.js
1239
1251
  var require_copy = __commonJS({
1240
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
1252
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
1241
1253
  "use strict";
1242
- var fs3 = require_graceful_fs();
1254
+ var fs3 = require_fs();
1243
1255
  var path5 = require("path");
1244
- var mkdirs = require_mkdirs().mkdirs;
1245
- var pathExists2 = require_path_exists().pathExists;
1246
- var utimesMillis = require_utimes().utimesMillis;
1256
+ var { mkdirs } = require_mkdirs();
1257
+ var { pathExists: pathExists2 } = require_path_exists();
1258
+ var { utimesMillis } = require_utimes();
1247
1259
  var stat = require_stat();
1248
- function copy(src, dest, opts, cb) {
1249
- if (typeof opts === "function" && !cb) {
1250
- cb = opts;
1251
- opts = {};
1252
- } else if (typeof opts === "function") {
1260
+ async function copy(src, dest, opts = {}) {
1261
+ if (typeof opts === "function") {
1253
1262
  opts = { filter: opts };
1254
1263
  }
1255
- cb = cb || function() {
1256
- };
1257
- opts = opts || {};
1258
1264
  opts.clobber = "clobber" in opts ? !!opts.clobber : true;
1259
1265
  opts.overwrite = "overwrite" in opts ? !!opts.overwrite : opts.clobber;
1260
1266
  if (opts.preserveTimestamps && process.arch === "ia32") {
@@ -1264,178 +1270,115 @@ var require_copy = __commonJS({
1264
1270
  "fs-extra-WARN0001"
1265
1271
  );
1266
1272
  }
1267
- stat.checkPaths(src, dest, "copy", opts, (err, stats) => {
1268
- if (err) return cb(err);
1269
- const { srcStat, destStat } = stats;
1270
- stat.checkParentPaths(src, srcStat, dest, "copy", (err2) => {
1271
- if (err2) return cb(err2);
1272
- runFilter(src, dest, opts, (err3, include) => {
1273
- if (err3) return cb(err3);
1274
- if (!include) return cb();
1275
- checkParentDir(destStat, src, dest, opts, cb);
1276
- });
1277
- });
1278
- });
1279
- }
1280
- function checkParentDir(destStat, src, dest, opts, cb) {
1273
+ const { srcStat, destStat } = await stat.checkPaths(src, dest, "copy", opts);
1274
+ await stat.checkParentPaths(src, srcStat, dest, "copy");
1275
+ const include = await runFilter(src, dest, opts);
1276
+ if (!include) return;
1281
1277
  const destParent = path5.dirname(dest);
1282
- pathExists2(destParent, (err, dirExists) => {
1283
- if (err) return cb(err);
1284
- if (dirExists) return getStats(destStat, src, dest, opts, cb);
1285
- mkdirs(destParent, (err2) => {
1286
- if (err2) return cb(err2);
1287
- return getStats(destStat, src, dest, opts, cb);
1288
- });
1289
- });
1278
+ const dirExists = await pathExists2(destParent);
1279
+ if (!dirExists) {
1280
+ await mkdirs(destParent);
1281
+ }
1282
+ await getStatsAndPerformCopy(destStat, src, dest, opts);
1290
1283
  }
1291
- function runFilter(src, dest, opts, cb) {
1292
- if (!opts.filter) return cb(null, true);
1293
- Promise.resolve(opts.filter(src, dest)).then((include) => cb(null, include), (error) => cb(error));
1294
- }
1295
- function getStats(destStat, src, dest, opts, cb) {
1296
- const stat2 = opts.dereference ? fs3.stat : fs3.lstat;
1297
- stat2(src, (err, srcStat) => {
1298
- if (err) return cb(err);
1299
- if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb);
1300
- else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb);
1301
- else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb);
1302
- else if (srcStat.isSocket()) return cb(new Error(`Cannot copy a socket file: ${src}`));
1303
- else if (srcStat.isFIFO()) return cb(new Error(`Cannot copy a FIFO pipe: ${src}`));
1304
- return cb(new Error(`Unknown file: ${src}`));
1305
- });
1284
+ async function runFilter(src, dest, opts) {
1285
+ if (!opts.filter) return true;
1286
+ return opts.filter(src, dest);
1306
1287
  }
1307
- function onFile(srcStat, destStat, src, dest, opts, cb) {
1308
- if (!destStat) return copyFile(srcStat, src, dest, opts, cb);
1309
- return mayCopyFile(srcStat, src, dest, opts, cb);
1288
+ async function getStatsAndPerformCopy(destStat, src, dest, opts) {
1289
+ const statFn = opts.dereference ? fs3.stat : fs3.lstat;
1290
+ const srcStat = await statFn(src);
1291
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
1292
+ if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
1293
+ if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts);
1294
+ if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`);
1295
+ if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`);
1296
+ throw new Error(`Unknown file: ${src}`);
1310
1297
  }
1311
- function mayCopyFile(srcStat, src, dest, opts, cb) {
1298
+ async function onFile(srcStat, destStat, src, dest, opts) {
1299
+ if (!destStat) return copyFile(srcStat, src, dest, opts);
1312
1300
  if (opts.overwrite) {
1313
- fs3.unlink(dest, (err) => {
1314
- if (err) return cb(err);
1315
- return copyFile(srcStat, src, dest, opts, cb);
1316
- });
1317
- } else if (opts.errorOnExist) {
1318
- return cb(new Error(`'${dest}' already exists`));
1319
- } else return cb();
1320
- }
1321
- function copyFile(srcStat, src, dest, opts, cb) {
1322
- fs3.copyFile(src, dest, (err) => {
1323
- if (err) return cb(err);
1324
- if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb);
1325
- return setDestMode(dest, srcStat.mode, cb);
1326
- });
1301
+ await fs3.unlink(dest);
1302
+ return copyFile(srcStat, src, dest, opts);
1303
+ }
1304
+ if (opts.errorOnExist) {
1305
+ throw new Error(`'${dest}' already exists`);
1306
+ }
1327
1307
  }
1328
- function handleTimestampsAndMode(srcMode, src, dest, cb) {
1329
- if (fileIsNotWritable(srcMode)) {
1330
- return makeFileWritable(dest, srcMode, (err) => {
1331
- if (err) return cb(err);
1332
- return setDestTimestampsAndMode(srcMode, src, dest, cb);
1333
- });
1308
+ async function copyFile(srcStat, src, dest, opts) {
1309
+ await fs3.copyFile(src, dest);
1310
+ if (opts.preserveTimestamps) {
1311
+ if (fileIsNotWritable(srcStat.mode)) {
1312
+ await makeFileWritable(dest, srcStat.mode);
1313
+ }
1314
+ const updatedSrcStat = await fs3.stat(src);
1315
+ await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
1334
1316
  }
1335
- return setDestTimestampsAndMode(srcMode, src, dest, cb);
1317
+ return fs3.chmod(dest, srcStat.mode);
1336
1318
  }
1337
1319
  function fileIsNotWritable(srcMode) {
1338
1320
  return (srcMode & 128) === 0;
1339
1321
  }
1340
- function makeFileWritable(dest, srcMode, cb) {
1341
- return setDestMode(dest, srcMode | 128, cb);
1342
- }
1343
- function setDestTimestampsAndMode(srcMode, src, dest, cb) {
1344
- setDestTimestamps(src, dest, (err) => {
1345
- if (err) return cb(err);
1346
- return setDestMode(dest, srcMode, cb);
1347
- });
1348
- }
1349
- function setDestMode(dest, srcMode, cb) {
1350
- return fs3.chmod(dest, srcMode, cb);
1351
- }
1352
- function setDestTimestamps(src, dest, cb) {
1353
- fs3.stat(src, (err, updatedSrcStat) => {
1354
- if (err) return cb(err);
1355
- return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb);
1356
- });
1357
- }
1358
- function onDir(srcStat, destStat, src, dest, opts, cb) {
1359
- if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb);
1360
- return copyDir(src, dest, opts, cb);
1361
- }
1362
- function mkDirAndCopy(srcMode, src, dest, opts, cb) {
1363
- fs3.mkdir(dest, (err) => {
1364
- if (err) return cb(err);
1365
- copyDir(src, dest, opts, (err2) => {
1366
- if (err2) return cb(err2);
1367
- return setDestMode(dest, srcMode, cb);
1368
- });
1369
- });
1370
- }
1371
- function copyDir(src, dest, opts, cb) {
1372
- fs3.readdir(src, (err, items) => {
1373
- if (err) return cb(err);
1374
- return copyDirItems(items, src, dest, opts, cb);
1375
- });
1376
- }
1377
- function copyDirItems(items, src, dest, opts, cb) {
1378
- const item = items.pop();
1379
- if (!item) return cb();
1380
- return copyDirItem(items, item, src, dest, opts, cb);
1381
- }
1382
- function copyDirItem(items, item, src, dest, opts, cb) {
1383
- const srcItem = path5.join(src, item);
1384
- const destItem = path5.join(dest, item);
1385
- runFilter(srcItem, destItem, opts, (err, include) => {
1386
- if (err) return cb(err);
1387
- if (!include) return copyDirItems(items, src, dest, opts, cb);
1388
- stat.checkPaths(srcItem, destItem, "copy", opts, (err2, stats) => {
1389
- if (err2) return cb(err2);
1390
- const { destStat } = stats;
1391
- getStats(destStat, srcItem, destItem, opts, (err3) => {
1392
- if (err3) return cb(err3);
1393
- return copyDirItems(items, src, dest, opts, cb);
1394
- });
1395
- });
1396
- });
1322
+ function makeFileWritable(dest, srcMode) {
1323
+ return fs3.chmod(dest, srcMode | 128);
1397
1324
  }
1398
- function onLink(destStat, src, dest, opts, cb) {
1399
- fs3.readlink(src, (err, resolvedSrc) => {
1400
- if (err) return cb(err);
1401
- if (opts.dereference) {
1402
- resolvedSrc = path5.resolve(process.cwd(), resolvedSrc);
1403
- }
1404
- if (!destStat) {
1405
- return fs3.symlink(resolvedSrc, dest, cb);
1406
- } else {
1407
- fs3.readlink(dest, (err2, resolvedDest) => {
1408
- if (err2) {
1409
- if (err2.code === "EINVAL" || err2.code === "UNKNOWN") return fs3.symlink(resolvedSrc, dest, cb);
1410
- return cb(err2);
1411
- }
1412
- if (opts.dereference) {
1413
- resolvedDest = path5.resolve(process.cwd(), resolvedDest);
1414
- }
1415
- if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
1416
- return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`));
1417
- }
1418
- if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
1419
- return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`));
1325
+ async function onDir(srcStat, destStat, src, dest, opts) {
1326
+ if (!destStat) {
1327
+ await fs3.mkdir(dest);
1328
+ }
1329
+ const promises = [];
1330
+ for await (const item of await fs3.opendir(src)) {
1331
+ const srcItem = path5.join(src, item.name);
1332
+ const destItem = path5.join(dest, item.name);
1333
+ promises.push(
1334
+ runFilter(srcItem, destItem, opts).then((include) => {
1335
+ if (include) {
1336
+ return stat.checkPaths(srcItem, destItem, "copy", opts).then(({ destStat: destStat2 }) => {
1337
+ return getStatsAndPerformCopy(destStat2, srcItem, destItem, opts);
1338
+ });
1420
1339
  }
1421
- return copyLink(resolvedSrc, dest, cb);
1422
- });
1423
- }
1424
- });
1340
+ })
1341
+ );
1342
+ }
1343
+ await Promise.all(promises);
1344
+ if (!destStat) {
1345
+ await fs3.chmod(dest, srcStat.mode);
1346
+ }
1425
1347
  }
1426
- function copyLink(resolvedSrc, dest, cb) {
1427
- fs3.unlink(dest, (err) => {
1428
- if (err) return cb(err);
1429
- return fs3.symlink(resolvedSrc, dest, cb);
1430
- });
1348
+ async function onLink(destStat, src, dest, opts) {
1349
+ let resolvedSrc = await fs3.readlink(src);
1350
+ if (opts.dereference) {
1351
+ resolvedSrc = path5.resolve(process.cwd(), resolvedSrc);
1352
+ }
1353
+ if (!destStat) {
1354
+ return fs3.symlink(resolvedSrc, dest);
1355
+ }
1356
+ let resolvedDest = null;
1357
+ try {
1358
+ resolvedDest = await fs3.readlink(dest);
1359
+ } catch (e) {
1360
+ if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs3.symlink(resolvedSrc, dest);
1361
+ throw e;
1362
+ }
1363
+ if (opts.dereference) {
1364
+ resolvedDest = path5.resolve(process.cwd(), resolvedDest);
1365
+ }
1366
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
1367
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
1368
+ }
1369
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
1370
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
1371
+ }
1372
+ await fs3.unlink(dest);
1373
+ return fs3.symlink(resolvedSrc, dest);
1431
1374
  }
1432
1375
  module2.exports = copy;
1433
1376
  }
1434
1377
  });
1435
1378
 
1436
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy-sync.js
1379
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/copy-sync.js
1437
1380
  var require_copy_sync = __commonJS({
1438
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) {
1381
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) {
1439
1382
  "use strict";
1440
1383
  var fs3 = require_graceful_fs();
1441
1384
  var path5 = require("path");
@@ -1517,7 +1460,15 @@ var require_copy_sync = __commonJS({
1517
1460
  return setDestMode(dest, srcMode);
1518
1461
  }
1519
1462
  function copyDir(src, dest, opts) {
1520
- fs3.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
1463
+ const dir = fs3.opendirSync(src);
1464
+ try {
1465
+ let dirent;
1466
+ while ((dirent = dir.readSync()) !== null) {
1467
+ copyDirItem(dirent.name, src, dest, opts);
1468
+ }
1469
+ } finally {
1470
+ dir.closeSync();
1471
+ }
1521
1472
  }
1522
1473
  function copyDirItem(item, src, dest, opts) {
1523
1474
  const srcItem = path5.join(src, item);
@@ -1561,11 +1512,11 @@ var require_copy_sync = __commonJS({
1561
1512
  }
1562
1513
  });
1563
1514
 
1564
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/index.js
1515
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/index.js
1565
1516
  var require_copy2 = __commonJS({
1566
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/copy/index.js"(exports2, module2) {
1517
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/index.js"(exports2, module2) {
1567
1518
  "use strict";
1568
- var u = require_universalify().fromCallback;
1519
+ var u = require_universalify().fromPromise;
1569
1520
  module2.exports = {
1570
1521
  copy: u(require_copy()),
1571
1522
  copySync: require_copy_sync()
@@ -1573,9 +1524,9 @@ var require_copy2 = __commonJS({
1573
1524
  }
1574
1525
  });
1575
1526
 
1576
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/remove/index.js
1527
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/remove/index.js
1577
1528
  var require_remove = __commonJS({
1578
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/remove/index.js"(exports2, module2) {
1529
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/remove/index.js"(exports2, module2) {
1579
1530
  "use strict";
1580
1531
  var fs3 = require_graceful_fs();
1581
1532
  var u = require_universalify().fromCallback;
@@ -1592,9 +1543,9 @@ var require_remove = __commonJS({
1592
1543
  }
1593
1544
  });
1594
1545
 
1595
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/empty/index.js
1546
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/empty/index.js
1596
1547
  var require_empty = __commonJS({
1597
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/empty/index.js"(exports2, module2) {
1548
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/empty/index.js"(exports2, module2) {
1598
1549
  "use strict";
1599
1550
  var u = require_universalify().fromPromise;
1600
1551
  var fs3 = require_fs();
@@ -1631,42 +1582,39 @@ var require_empty = __commonJS({
1631
1582
  }
1632
1583
  });
1633
1584
 
1634
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/file.js
1585
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/file.js
1635
1586
  var require_file = __commonJS({
1636
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) {
1587
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) {
1637
1588
  "use strict";
1638
- var u = require_universalify().fromCallback;
1589
+ var u = require_universalify().fromPromise;
1639
1590
  var path5 = require("path");
1640
- var fs3 = require_graceful_fs();
1591
+ var fs3 = require_fs();
1641
1592
  var mkdir = require_mkdirs();
1642
- function createFile(file2, callback) {
1643
- function makeFile() {
1644
- fs3.writeFile(file2, "", (err) => {
1645
- if (err) return callback(err);
1646
- callback();
1647
- });
1593
+ async function createFile(file2) {
1594
+ let stats;
1595
+ try {
1596
+ stats = await fs3.stat(file2);
1597
+ } catch {
1598
+ }
1599
+ if (stats && stats.isFile()) return;
1600
+ const dir = path5.dirname(file2);
1601
+ let dirStats = null;
1602
+ try {
1603
+ dirStats = await fs3.stat(dir);
1604
+ } catch (err) {
1605
+ if (err.code === "ENOENT") {
1606
+ await mkdir.mkdirs(dir);
1607
+ await fs3.writeFile(file2, "");
1608
+ return;
1609
+ } else {
1610
+ throw err;
1611
+ }
1612
+ }
1613
+ if (dirStats.isDirectory()) {
1614
+ await fs3.writeFile(file2, "");
1615
+ } else {
1616
+ await fs3.readdir(dir);
1648
1617
  }
1649
- fs3.stat(file2, (err, stats) => {
1650
- if (!err && stats.isFile()) return callback();
1651
- const dir = path5.dirname(file2);
1652
- fs3.stat(dir, (err2, stats2) => {
1653
- if (err2) {
1654
- if (err2.code === "ENOENT") {
1655
- return mkdir.mkdirs(dir, (err3) => {
1656
- if (err3) return callback(err3);
1657
- makeFile();
1658
- });
1659
- }
1660
- return callback(err2);
1661
- }
1662
- if (stats2.isDirectory()) makeFile();
1663
- else {
1664
- fs3.readdir(dir, (err3) => {
1665
- if (err3) return callback(err3);
1666
- });
1667
- }
1668
- });
1669
- });
1670
1618
  }
1671
1619
  function createFileSync(file2) {
1672
1620
  let stats;
@@ -1693,41 +1641,36 @@ var require_file = __commonJS({
1693
1641
  }
1694
1642
  });
1695
1643
 
1696
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/link.js
1644
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/link.js
1697
1645
  var require_link = __commonJS({
1698
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) {
1646
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) {
1699
1647
  "use strict";
1700
- var u = require_universalify().fromCallback;
1648
+ var u = require_universalify().fromPromise;
1701
1649
  var path5 = require("path");
1702
- var fs3 = require_graceful_fs();
1650
+ var fs3 = require_fs();
1703
1651
  var mkdir = require_mkdirs();
1704
- var pathExists2 = require_path_exists().pathExists;
1652
+ var { pathExists: pathExists2 } = require_path_exists();
1705
1653
  var { areIdentical } = require_stat();
1706
- function createLink(srcpath, dstpath, callback) {
1707
- function makeLink(srcpath2, dstpath2) {
1708
- fs3.link(srcpath2, dstpath2, (err) => {
1709
- if (err) return callback(err);
1710
- callback(null);
1711
- });
1654
+ async function createLink(srcpath, dstpath) {
1655
+ let dstStat;
1656
+ try {
1657
+ dstStat = await fs3.lstat(dstpath);
1658
+ } catch {
1712
1659
  }
1713
- fs3.lstat(dstpath, (_, dstStat) => {
1714
- fs3.lstat(srcpath, (err, srcStat) => {
1715
- if (err) {
1716
- err.message = err.message.replace("lstat", "ensureLink");
1717
- return callback(err);
1718
- }
1719
- if (dstStat && areIdentical(srcStat, dstStat)) return callback(null);
1720
- const dir = path5.dirname(dstpath);
1721
- pathExists2(dir, (err2, dirExists) => {
1722
- if (err2) return callback(err2);
1723
- if (dirExists) return makeLink(srcpath, dstpath);
1724
- mkdir.mkdirs(dir, (err3) => {
1725
- if (err3) return callback(err3);
1726
- makeLink(srcpath, dstpath);
1727
- });
1728
- });
1729
- });
1730
- });
1660
+ let srcStat;
1661
+ try {
1662
+ srcStat = await fs3.lstat(srcpath);
1663
+ } catch (err) {
1664
+ err.message = err.message.replace("lstat", "ensureLink");
1665
+ throw err;
1666
+ }
1667
+ if (dstStat && areIdentical(srcStat, dstStat)) return;
1668
+ const dir = path5.dirname(dstpath);
1669
+ const dirExists = await pathExists2(dir);
1670
+ if (!dirExists) {
1671
+ await mkdir.mkdirs(dir);
1672
+ }
1673
+ await fs3.link(srcpath, dstpath);
1731
1674
  }
1732
1675
  function createLinkSync(srcpath, dstpath) {
1733
1676
  let dstStat;
@@ -1755,103 +1698,98 @@ var require_link = __commonJS({
1755
1698
  }
1756
1699
  });
1757
1700
 
1758
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-paths.js
1701
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-paths.js
1759
1702
  var require_symlink_paths = __commonJS({
1760
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
1703
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
1761
1704
  "use strict";
1762
1705
  var path5 = require("path");
1763
- var fs3 = require_graceful_fs();
1764
- var pathExists2 = require_path_exists().pathExists;
1765
- function symlinkPaths(srcpath, dstpath, callback) {
1706
+ var fs3 = require_fs();
1707
+ var { pathExists: pathExists2 } = require_path_exists();
1708
+ var u = require_universalify().fromPromise;
1709
+ async function symlinkPaths(srcpath, dstpath) {
1766
1710
  if (path5.isAbsolute(srcpath)) {
1767
- return fs3.lstat(srcpath, (err) => {
1768
- if (err) {
1769
- err.message = err.message.replace("lstat", "ensureSymlink");
1770
- return callback(err);
1771
- }
1772
- return callback(null, {
1773
- toCwd: srcpath,
1774
- toDst: srcpath
1775
- });
1776
- });
1777
- } else {
1778
- const dstdir = path5.dirname(dstpath);
1779
- const relativeToDst = path5.join(dstdir, srcpath);
1780
- return pathExists2(relativeToDst, (err, exists) => {
1781
- if (err) return callback(err);
1782
- if (exists) {
1783
- return callback(null, {
1784
- toCwd: relativeToDst,
1785
- toDst: srcpath
1786
- });
1787
- } else {
1788
- return fs3.lstat(srcpath, (err2) => {
1789
- if (err2) {
1790
- err2.message = err2.message.replace("lstat", "ensureSymlink");
1791
- return callback(err2);
1792
- }
1793
- return callback(null, {
1794
- toCwd: srcpath,
1795
- toDst: path5.relative(dstdir, srcpath)
1796
- });
1797
- });
1798
- }
1799
- });
1711
+ try {
1712
+ await fs3.lstat(srcpath);
1713
+ } catch (err) {
1714
+ err.message = err.message.replace("lstat", "ensureSymlink");
1715
+ throw err;
1716
+ }
1717
+ return {
1718
+ toCwd: srcpath,
1719
+ toDst: srcpath
1720
+ };
1800
1721
  }
1722
+ const dstdir = path5.dirname(dstpath);
1723
+ const relativeToDst = path5.join(dstdir, srcpath);
1724
+ const exists = await pathExists2(relativeToDst);
1725
+ if (exists) {
1726
+ return {
1727
+ toCwd: relativeToDst,
1728
+ toDst: srcpath
1729
+ };
1730
+ }
1731
+ try {
1732
+ await fs3.lstat(srcpath);
1733
+ } catch (err) {
1734
+ err.message = err.message.replace("lstat", "ensureSymlink");
1735
+ throw err;
1736
+ }
1737
+ return {
1738
+ toCwd: srcpath,
1739
+ toDst: path5.relative(dstdir, srcpath)
1740
+ };
1801
1741
  }
1802
1742
  function symlinkPathsSync(srcpath, dstpath) {
1803
- let exists;
1804
1743
  if (path5.isAbsolute(srcpath)) {
1805
- exists = fs3.existsSync(srcpath);
1806
- if (!exists) throw new Error("absolute srcpath does not exist");
1744
+ const exists2 = fs3.existsSync(srcpath);
1745
+ if (!exists2) throw new Error("absolute srcpath does not exist");
1807
1746
  return {
1808
1747
  toCwd: srcpath,
1809
1748
  toDst: srcpath
1810
1749
  };
1811
- } else {
1812
- const dstdir = path5.dirname(dstpath);
1813
- const relativeToDst = path5.join(dstdir, srcpath);
1814
- exists = fs3.existsSync(relativeToDst);
1815
- if (exists) {
1816
- return {
1817
- toCwd: relativeToDst,
1818
- toDst: srcpath
1819
- };
1820
- } else {
1821
- exists = fs3.existsSync(srcpath);
1822
- if (!exists) throw new Error("relative srcpath does not exist");
1823
- return {
1824
- toCwd: srcpath,
1825
- toDst: path5.relative(dstdir, srcpath)
1826
- };
1827
- }
1828
1750
  }
1751
+ const dstdir = path5.dirname(dstpath);
1752
+ const relativeToDst = path5.join(dstdir, srcpath);
1753
+ const exists = fs3.existsSync(relativeToDst);
1754
+ if (exists) {
1755
+ return {
1756
+ toCwd: relativeToDst,
1757
+ toDst: srcpath
1758
+ };
1759
+ }
1760
+ const srcExists = fs3.existsSync(srcpath);
1761
+ if (!srcExists) throw new Error("relative srcpath does not exist");
1762
+ return {
1763
+ toCwd: srcpath,
1764
+ toDst: path5.relative(dstdir, srcpath)
1765
+ };
1829
1766
  }
1830
1767
  module2.exports = {
1831
- symlinkPaths,
1768
+ symlinkPaths: u(symlinkPaths),
1832
1769
  symlinkPathsSync
1833
1770
  };
1834
1771
  }
1835
1772
  });
1836
1773
 
1837
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js
1774
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-type.js
1838
1775
  var require_symlink_type = __commonJS({
1839
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) {
1776
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) {
1840
1777
  "use strict";
1841
- var fs3 = require_graceful_fs();
1842
- function symlinkType(srcpath, type, callback) {
1843
- callback = typeof type === "function" ? type : callback;
1844
- type = typeof type === "function" ? false : type;
1845
- if (type) return callback(null, type);
1846
- fs3.lstat(srcpath, (err, stats) => {
1847
- if (err) return callback(null, "file");
1848
- type = stats && stats.isDirectory() ? "dir" : "file";
1849
- callback(null, type);
1850
- });
1778
+ var fs3 = require_fs();
1779
+ var u = require_universalify().fromPromise;
1780
+ async function symlinkType(srcpath, type) {
1781
+ if (type) return type;
1782
+ let stats;
1783
+ try {
1784
+ stats = await fs3.lstat(srcpath);
1785
+ } catch {
1786
+ return "file";
1787
+ }
1788
+ return stats && stats.isDirectory() ? "dir" : "file";
1851
1789
  }
1852
1790
  function symlinkTypeSync(srcpath, type) {
1853
- let stats;
1854
1791
  if (type) return type;
1792
+ let stats;
1855
1793
  try {
1856
1794
  stats = fs3.lstatSync(srcpath);
1857
1795
  } catch {
@@ -1860,894 +1798,97 @@ var require_symlink_type = __commonJS({
1860
1798
  return stats && stats.isDirectory() ? "dir" : "file";
1861
1799
  }
1862
1800
  module2.exports = {
1863
- symlinkType,
1801
+ symlinkType: u(symlinkType),
1864
1802
  symlinkTypeSync
1865
1803
  };
1866
1804
  }
1867
1805
  });
1868
1806
 
1869
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js
1807
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink.js
1870
1808
  var require_symlink = __commonJS({
1871
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) {
1809
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) {
1872
1810
  "use strict";
1873
- var u = require_universalify().fromCallback;
1811
+ var u = require_universalify().fromPromise;
1874
1812
  var path5 = require("path");
1875
1813
  var fs3 = require_fs();
1876
- var _mkdirs = require_mkdirs();
1877
- var mkdirs = _mkdirs.mkdirs;
1878
- var mkdirsSync = _mkdirs.mkdirsSync;
1879
- var _symlinkPaths = require_symlink_paths();
1880
- var symlinkPaths = _symlinkPaths.symlinkPaths;
1881
- var symlinkPathsSync = _symlinkPaths.symlinkPathsSync;
1882
- var _symlinkType = require_symlink_type();
1883
- var symlinkType = _symlinkType.symlinkType;
1884
- var symlinkTypeSync = _symlinkType.symlinkTypeSync;
1885
- var pathExists2 = require_path_exists().pathExists;
1814
+ var { mkdirs, mkdirsSync } = require_mkdirs();
1815
+ var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
1816
+ var { symlinkType, symlinkTypeSync } = require_symlink_type();
1817
+ var { pathExists: pathExists2 } = require_path_exists();
1886
1818
  var { areIdentical } = require_stat();
1887
- function createSymlink(srcpath, dstpath, type, callback) {
1888
- callback = typeof type === "function" ? type : callback;
1889
- type = typeof type === "function" ? false : type;
1890
- fs3.lstat(dstpath, (err, stats) => {
1891
- if (!err && stats.isSymbolicLink()) {
1892
- Promise.all([
1893
- fs3.stat(srcpath),
1894
- fs3.stat(dstpath)
1895
- ]).then(([srcStat, dstStat]) => {
1896
- if (areIdentical(srcStat, dstStat)) return callback(null);
1897
- _createSymlink(srcpath, dstpath, type, callback);
1898
- });
1899
- } else _createSymlink(srcpath, dstpath, type, callback);
1900
- });
1901
- }
1902
- function _createSymlink(srcpath, dstpath, type, callback) {
1903
- symlinkPaths(srcpath, dstpath, (err, relative) => {
1904
- if (err) return callback(err);
1905
- srcpath = relative.toDst;
1906
- symlinkType(relative.toCwd, type, (err2, type2) => {
1907
- if (err2) return callback(err2);
1908
- const dir = path5.dirname(dstpath);
1909
- pathExists2(dir, (err3, dirExists) => {
1910
- if (err3) return callback(err3);
1911
- if (dirExists) return fs3.symlink(srcpath, dstpath, type2, callback);
1912
- mkdirs(dir, (err4) => {
1913
- if (err4) return callback(err4);
1914
- fs3.symlink(srcpath, dstpath, type2, callback);
1915
- });
1916
- });
1917
- });
1918
- });
1919
- }
1920
- function createSymlinkSync(srcpath, dstpath, type) {
1819
+ async function createSymlink(srcpath, dstpath, type) {
1921
1820
  let stats;
1922
1821
  try {
1923
- stats = fs3.lstatSync(dstpath);
1822
+ stats = await fs3.lstat(dstpath);
1924
1823
  } catch {
1925
1824
  }
1926
1825
  if (stats && stats.isSymbolicLink()) {
1927
- const srcStat = fs3.statSync(srcpath);
1928
- const dstStat = fs3.statSync(dstpath);
1929
- if (areIdentical(srcStat, dstStat)) return;
1930
- }
1931
- const relative = symlinkPathsSync(srcpath, dstpath);
1932
- srcpath = relative.toDst;
1933
- type = symlinkTypeSync(relative.toCwd, type);
1934
- const dir = path5.dirname(dstpath);
1935
- const exists = fs3.existsSync(dir);
1936
- if (exists) return fs3.symlinkSync(srcpath, dstpath, type);
1937
- mkdirsSync(dir);
1938
- return fs3.symlinkSync(srcpath, dstpath, type);
1939
- }
1940
- module2.exports = {
1941
- createSymlink: u(createSymlink),
1942
- createSymlinkSync
1943
- };
1944
- }
1945
- });
1946
-
1947
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js
1948
- var require_ensure = __commonJS({
1949
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js"(exports2, module2) {
1950
- "use strict";
1951
- var { createFile, createFileSync } = require_file();
1952
- var { createLink, createLinkSync } = require_link();
1953
- var { createSymlink, createSymlinkSync } = require_symlink();
1954
- module2.exports = {
1955
- // file
1956
- createFile,
1957
- createFileSync,
1958
- ensureFile: createFile,
1959
- ensureFileSync: createFileSync,
1960
- // link
1961
- createLink,
1962
- createLinkSync,
1963
- ensureLink: createLink,
1964
- ensureLinkSync: createLinkSync,
1965
- // symlink
1966
- createSymlink,
1967
- createSymlinkSync,
1968
- ensureSymlink: createSymlink,
1969
- ensureSymlinkSync: createSymlinkSync
1970
- };
1971
- }
1972
- });
1973
-
1974
- // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js
1975
- var require_polyfills2 = __commonJS({
1976
- "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports2, module2) {
1977
- "use strict";
1978
- var constants = require("constants");
1979
- var origCwd = process.cwd;
1980
- var cwd2 = null;
1981
- var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
1982
- process.cwd = function() {
1983
- if (!cwd2)
1984
- cwd2 = origCwd.call(process);
1985
- return cwd2;
1986
- };
1987
- try {
1988
- process.cwd();
1989
- } catch (er) {
1990
- }
1991
- if (typeof process.chdir === "function") {
1992
- chdir = process.chdir;
1993
- process.chdir = function(d) {
1994
- cwd2 = null;
1995
- chdir.call(process, d);
1996
- };
1997
- if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
1998
- }
1999
- var chdir;
2000
- module2.exports = patch;
2001
- function patch(fs3) {
2002
- if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
2003
- patchLchmod(fs3);
2004
- }
2005
- if (!fs3.lutimes) {
2006
- patchLutimes(fs3);
2007
- }
2008
- fs3.chown = chownFix(fs3.chown);
2009
- fs3.fchown = chownFix(fs3.fchown);
2010
- fs3.lchown = chownFix(fs3.lchown);
2011
- fs3.chmod = chmodFix(fs3.chmod);
2012
- fs3.fchmod = chmodFix(fs3.fchmod);
2013
- fs3.lchmod = chmodFix(fs3.lchmod);
2014
- fs3.chownSync = chownFixSync(fs3.chownSync);
2015
- fs3.fchownSync = chownFixSync(fs3.fchownSync);
2016
- fs3.lchownSync = chownFixSync(fs3.lchownSync);
2017
- fs3.chmodSync = chmodFixSync(fs3.chmodSync);
2018
- fs3.fchmodSync = chmodFixSync(fs3.fchmodSync);
2019
- fs3.lchmodSync = chmodFixSync(fs3.lchmodSync);
2020
- fs3.stat = statFix(fs3.stat);
2021
- fs3.fstat = statFix(fs3.fstat);
2022
- fs3.lstat = statFix(fs3.lstat);
2023
- fs3.statSync = statFixSync(fs3.statSync);
2024
- fs3.fstatSync = statFixSync(fs3.fstatSync);
2025
- fs3.lstatSync = statFixSync(fs3.lstatSync);
2026
- if (fs3.chmod && !fs3.lchmod) {
2027
- fs3.lchmod = function(path5, mode, cb) {
2028
- if (cb) process.nextTick(cb);
2029
- };
2030
- fs3.lchmodSync = function() {
2031
- };
2032
- }
2033
- if (fs3.chown && !fs3.lchown) {
2034
- fs3.lchown = function(path5, uid, gid, cb) {
2035
- if (cb) process.nextTick(cb);
2036
- };
2037
- fs3.lchownSync = function() {
2038
- };
2039
- }
2040
- if (platform === "win32") {
2041
- fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : function(fs$rename) {
2042
- function rename(from, to, cb) {
2043
- var start = Date.now();
2044
- var backoff = 0;
2045
- fs$rename(from, to, function CB(er) {
2046
- if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
2047
- setTimeout(function() {
2048
- fs3.stat(to, function(stater, st) {
2049
- if (stater && stater.code === "ENOENT")
2050
- fs$rename(from, to, CB);
2051
- else
2052
- cb(er);
2053
- });
2054
- }, backoff);
2055
- if (backoff < 100)
2056
- backoff += 10;
2057
- return;
2058
- }
2059
- if (cb) cb(er);
2060
- });
2061
- }
2062
- if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
2063
- return rename;
2064
- }(fs3.rename);
2065
- }
2066
- fs3.read = typeof fs3.read !== "function" ? fs3.read : function(fs$read) {
2067
- function read(fd, buffer, offset, length, position, callback_) {
2068
- var callback;
2069
- if (callback_ && typeof callback_ === "function") {
2070
- var eagCounter = 0;
2071
- callback = function(er, _, __) {
2072
- if (er && er.code === "EAGAIN" && eagCounter < 10) {
2073
- eagCounter++;
2074
- return fs$read.call(fs3, fd, buffer, offset, length, position, callback);
2075
- }
2076
- callback_.apply(this, arguments);
2077
- };
2078
- }
2079
- return fs$read.call(fs3, fd, buffer, offset, length, position, callback);
2080
- }
2081
- if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
2082
- return read;
2083
- }(fs3.read);
2084
- fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ function(fs$readSync) {
2085
- return function(fd, buffer, offset, length, position) {
2086
- var eagCounter = 0;
2087
- while (true) {
2088
- try {
2089
- return fs$readSync.call(fs3, fd, buffer, offset, length, position);
2090
- } catch (er) {
2091
- if (er.code === "EAGAIN" && eagCounter < 10) {
2092
- eagCounter++;
2093
- continue;
2094
- }
2095
- throw er;
2096
- }
2097
- }
2098
- };
2099
- }(fs3.readSync);
2100
- function patchLchmod(fs4) {
2101
- fs4.lchmod = function(path5, mode, callback) {
2102
- fs4.open(
2103
- path5,
2104
- constants.O_WRONLY | constants.O_SYMLINK,
2105
- mode,
2106
- function(err, fd) {
2107
- if (err) {
2108
- if (callback) callback(err);
2109
- return;
2110
- }
2111
- fs4.fchmod(fd, mode, function(err2) {
2112
- fs4.close(fd, function(err22) {
2113
- if (callback) callback(err2 || err22);
2114
- });
2115
- });
2116
- }
2117
- );
2118
- };
2119
- fs4.lchmodSync = function(path5, mode) {
2120
- var fd = fs4.openSync(path5, constants.O_WRONLY | constants.O_SYMLINK, mode);
2121
- var threw = true;
2122
- var ret;
2123
- try {
2124
- ret = fs4.fchmodSync(fd, mode);
2125
- threw = false;
2126
- } finally {
2127
- if (threw) {
2128
- try {
2129
- fs4.closeSync(fd);
2130
- } catch (er) {
2131
- }
2132
- } else {
2133
- fs4.closeSync(fd);
2134
- }
2135
- }
2136
- return ret;
2137
- };
2138
- }
2139
- function patchLutimes(fs4) {
2140
- if (constants.hasOwnProperty("O_SYMLINK") && fs4.futimes) {
2141
- fs4.lutimes = function(path5, at, mt, cb) {
2142
- fs4.open(path5, constants.O_SYMLINK, function(er, fd) {
2143
- if (er) {
2144
- if (cb) cb(er);
2145
- return;
2146
- }
2147
- fs4.futimes(fd, at, mt, function(er2) {
2148
- fs4.close(fd, function(er22) {
2149
- if (cb) cb(er2 || er22);
2150
- });
2151
- });
2152
- });
2153
- };
2154
- fs4.lutimesSync = function(path5, at, mt) {
2155
- var fd = fs4.openSync(path5, constants.O_SYMLINK);
2156
- var ret;
2157
- var threw = true;
2158
- try {
2159
- ret = fs4.futimesSync(fd, at, mt);
2160
- threw = false;
2161
- } finally {
2162
- if (threw) {
2163
- try {
2164
- fs4.closeSync(fd);
2165
- } catch (er) {
2166
- }
2167
- } else {
2168
- fs4.closeSync(fd);
2169
- }
2170
- }
2171
- return ret;
2172
- };
2173
- } else if (fs4.futimes) {
2174
- fs4.lutimes = function(_a, _b, _c, cb) {
2175
- if (cb) process.nextTick(cb);
2176
- };
2177
- fs4.lutimesSync = function() {
2178
- };
2179
- }
2180
- }
2181
- function chmodFix(orig) {
2182
- if (!orig) return orig;
2183
- return function(target, mode, cb) {
2184
- return orig.call(fs3, target, mode, function(er) {
2185
- if (chownErOk(er)) er = null;
2186
- if (cb) cb.apply(this, arguments);
2187
- });
2188
- };
2189
- }
2190
- function chmodFixSync(orig) {
2191
- if (!orig) return orig;
2192
- return function(target, mode) {
2193
- try {
2194
- return orig.call(fs3, target, mode);
2195
- } catch (er) {
2196
- if (!chownErOk(er)) throw er;
2197
- }
2198
- };
2199
- }
2200
- function chownFix(orig) {
2201
- if (!orig) return orig;
2202
- return function(target, uid, gid, cb) {
2203
- return orig.call(fs3, target, uid, gid, function(er) {
2204
- if (chownErOk(er)) er = null;
2205
- if (cb) cb.apply(this, arguments);
2206
- });
2207
- };
2208
- }
2209
- function chownFixSync(orig) {
2210
- if (!orig) return orig;
2211
- return function(target, uid, gid) {
2212
- try {
2213
- return orig.call(fs3, target, uid, gid);
2214
- } catch (er) {
2215
- if (!chownErOk(er)) throw er;
2216
- }
2217
- };
2218
- }
2219
- function statFix(orig) {
2220
- if (!orig) return orig;
2221
- return function(target, options, cb) {
2222
- if (typeof options === "function") {
2223
- cb = options;
2224
- options = null;
2225
- }
2226
- function callback(er, stats) {
2227
- if (stats) {
2228
- if (stats.uid < 0) stats.uid += 4294967296;
2229
- if (stats.gid < 0) stats.gid += 4294967296;
2230
- }
2231
- if (cb) cb.apply(this, arguments);
2232
- }
2233
- return options ? orig.call(fs3, target, options, callback) : orig.call(fs3, target, callback);
2234
- };
2235
- }
2236
- function statFixSync(orig) {
2237
- if (!orig) return orig;
2238
- return function(target, options) {
2239
- var stats = options ? orig.call(fs3, target, options) : orig.call(fs3, target);
2240
- if (stats) {
2241
- if (stats.uid < 0) stats.uid += 4294967296;
2242
- if (stats.gid < 0) stats.gid += 4294967296;
2243
- }
2244
- return stats;
2245
- };
2246
- }
2247
- function chownErOk(er) {
2248
- if (!er)
2249
- return true;
2250
- if (er.code === "ENOSYS")
2251
- return true;
2252
- var nonroot = !process.getuid || process.getuid() !== 0;
2253
- if (nonroot) {
2254
- if (er.code === "EINVAL" || er.code === "EPERM")
2255
- return true;
2256
- }
2257
- return false;
2258
- }
2259
- }
2260
- }
2261
- });
2262
-
2263
- // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js
2264
- var require_legacy_streams2 = __commonJS({
2265
- "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
2266
- "use strict";
2267
- var Stream = require("stream").Stream;
2268
- module2.exports = legacy;
2269
- function legacy(fs3) {
2270
- return {
2271
- ReadStream,
2272
- WriteStream
2273
- };
2274
- function ReadStream(path5, options) {
2275
- if (!(this instanceof ReadStream)) return new ReadStream(path5, options);
2276
- Stream.call(this);
2277
- var self = this;
2278
- this.path = path5;
2279
- this.fd = null;
2280
- this.readable = true;
2281
- this.paused = false;
2282
- this.flags = "r";
2283
- this.mode = 438;
2284
- this.bufferSize = 64 * 1024;
2285
- options = options || {};
2286
- var keys = Object.keys(options);
2287
- for (var index = 0, length = keys.length; index < length; index++) {
2288
- var key = keys[index];
2289
- this[key] = options[key];
2290
- }
2291
- if (this.encoding) this.setEncoding(this.encoding);
2292
- if (this.start !== void 0) {
2293
- if ("number" !== typeof this.start) {
2294
- throw TypeError("start must be a Number");
2295
- }
2296
- if (this.end === void 0) {
2297
- this.end = Infinity;
2298
- } else if ("number" !== typeof this.end) {
2299
- throw TypeError("end must be a Number");
2300
- }
2301
- if (this.start > this.end) {
2302
- throw new Error("start must be <= end");
2303
- }
2304
- this.pos = this.start;
2305
- }
2306
- if (this.fd !== null) {
2307
- process.nextTick(function() {
2308
- self._read();
2309
- });
2310
- return;
2311
- }
2312
- fs3.open(this.path, this.flags, this.mode, function(err, fd) {
2313
- if (err) {
2314
- self.emit("error", err);
2315
- self.readable = false;
2316
- return;
2317
- }
2318
- self.fd = fd;
2319
- self.emit("open", fd);
2320
- self._read();
2321
- });
2322
- }
2323
- function WriteStream(path5, options) {
2324
- if (!(this instanceof WriteStream)) return new WriteStream(path5, options);
2325
- Stream.call(this);
2326
- this.path = path5;
2327
- this.fd = null;
2328
- this.writable = true;
2329
- this.flags = "w";
2330
- this.encoding = "binary";
2331
- this.mode = 438;
2332
- this.bytesWritten = 0;
2333
- options = options || {};
2334
- var keys = Object.keys(options);
2335
- for (var index = 0, length = keys.length; index < length; index++) {
2336
- var key = keys[index];
2337
- this[key] = options[key];
2338
- }
2339
- if (this.start !== void 0) {
2340
- if ("number" !== typeof this.start) {
2341
- throw TypeError("start must be a Number");
2342
- }
2343
- if (this.start < 0) {
2344
- throw new Error("start must be >= zero");
2345
- }
2346
- this.pos = this.start;
2347
- }
2348
- this.busy = false;
2349
- this._queue = [];
2350
- if (this.fd === null) {
2351
- this._open = fs3.open;
2352
- this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
2353
- this.flush();
2354
- }
2355
- }
2356
- }
2357
- }
2358
- });
2359
-
2360
- // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js
2361
- var require_clone2 = __commonJS({
2362
- "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports2, module2) {
2363
- "use strict";
2364
- module2.exports = clone;
2365
- var getPrototypeOf = Object.getPrototypeOf || function(obj) {
2366
- return obj.__proto__;
2367
- };
2368
- function clone(obj) {
2369
- if (obj === null || typeof obj !== "object")
2370
- return obj;
2371
- if (obj instanceof Object)
2372
- var copy = { __proto__: getPrototypeOf(obj) };
2373
- else
2374
- var copy = /* @__PURE__ */ Object.create(null);
2375
- Object.getOwnPropertyNames(obj).forEach(function(key) {
2376
- Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
2377
- });
2378
- return copy;
2379
- }
2380
- }
2381
- });
2382
-
2383
- // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
2384
- var require_graceful_fs2 = __commonJS({
2385
- "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
2386
- "use strict";
2387
- var fs3 = require("fs");
2388
- var polyfills = require_polyfills2();
2389
- var legacy = require_legacy_streams2();
2390
- var clone = require_clone2();
2391
- var util2 = require("util");
2392
- var gracefulQueue;
2393
- var previousSymbol;
2394
- if (typeof Symbol === "function" && typeof Symbol.for === "function") {
2395
- gracefulQueue = Symbol.for("graceful-fs.queue");
2396
- previousSymbol = Symbol.for("graceful-fs.previous");
2397
- } else {
2398
- gracefulQueue = "___graceful-fs.queue";
2399
- previousSymbol = "___graceful-fs.previous";
2400
- }
2401
- function noop() {
2402
- }
2403
- function publishQueue(context, queue2) {
2404
- Object.defineProperty(context, gracefulQueue, {
2405
- get: function() {
2406
- return queue2;
2407
- }
2408
- });
2409
- }
2410
- var debug4 = noop;
2411
- if (util2.debuglog)
2412
- debug4 = util2.debuglog("gfs4");
2413
- else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
2414
- debug4 = function() {
2415
- var m = util2.format.apply(util2, arguments);
2416
- m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
2417
- console.error(m);
2418
- };
2419
- if (!fs3[gracefulQueue]) {
2420
- queue = global[gracefulQueue] || [];
2421
- publishQueue(fs3, queue);
2422
- fs3.close = function(fs$close) {
2423
- function close(fd, cb) {
2424
- return fs$close.call(fs3, fd, function(err) {
2425
- if (!err) {
2426
- resetQueue();
2427
- }
2428
- if (typeof cb === "function")
2429
- cb.apply(this, arguments);
2430
- });
2431
- }
2432
- Object.defineProperty(close, previousSymbol, {
2433
- value: fs$close
2434
- });
2435
- return close;
2436
- }(fs3.close);
2437
- fs3.closeSync = function(fs$closeSync) {
2438
- function closeSync(fd) {
2439
- fs$closeSync.apply(fs3, arguments);
2440
- resetQueue();
2441
- }
2442
- Object.defineProperty(closeSync, previousSymbol, {
2443
- value: fs$closeSync
2444
- });
2445
- return closeSync;
2446
- }(fs3.closeSync);
2447
- if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
2448
- process.on("exit", function() {
2449
- debug4(fs3[gracefulQueue]);
2450
- require("assert").equal(fs3[gracefulQueue].length, 0);
2451
- });
2452
- }
2453
- }
2454
- var queue;
2455
- if (!global[gracefulQueue]) {
2456
- publishQueue(global, fs3[gracefulQueue]);
2457
- }
2458
- module2.exports = patch(clone(fs3));
2459
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs3.__patched) {
2460
- module2.exports = patch(fs3);
2461
- fs3.__patched = true;
2462
- }
2463
- function patch(fs4) {
2464
- polyfills(fs4);
2465
- fs4.gracefulify = patch;
2466
- fs4.createReadStream = createReadStream;
2467
- fs4.createWriteStream = createWriteStream;
2468
- var fs$readFile = fs4.readFile;
2469
- fs4.readFile = readFile;
2470
- function readFile(path5, options, cb) {
2471
- if (typeof options === "function")
2472
- cb = options, options = null;
2473
- return go$readFile(path5, options, cb);
2474
- function go$readFile(path6, options2, cb2, startTime) {
2475
- return fs$readFile(path6, options2, function(err) {
2476
- if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2477
- enqueue([go$readFile, [path6, options2, cb2], err, startTime || Date.now(), Date.now()]);
2478
- else {
2479
- if (typeof cb2 === "function")
2480
- cb2.apply(this, arguments);
2481
- }
2482
- });
2483
- }
2484
- }
2485
- var fs$writeFile = fs4.writeFile;
2486
- fs4.writeFile = writeFile;
2487
- function writeFile(path5, data, options, cb) {
2488
- if (typeof options === "function")
2489
- cb = options, options = null;
2490
- return go$writeFile(path5, data, options, cb);
2491
- function go$writeFile(path6, data2, options2, cb2, startTime) {
2492
- return fs$writeFile(path6, data2, options2, function(err) {
2493
- if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2494
- enqueue([go$writeFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
2495
- else {
2496
- if (typeof cb2 === "function")
2497
- cb2.apply(this, arguments);
2498
- }
2499
- });
2500
- }
2501
- }
2502
- var fs$appendFile = fs4.appendFile;
2503
- if (fs$appendFile)
2504
- fs4.appendFile = appendFile;
2505
- function appendFile(path5, data, options, cb) {
2506
- if (typeof options === "function")
2507
- cb = options, options = null;
2508
- return go$appendFile(path5, data, options, cb);
2509
- function go$appendFile(path6, data2, options2, cb2, startTime) {
2510
- return fs$appendFile(path6, data2, options2, function(err) {
2511
- if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2512
- enqueue([go$appendFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
2513
- else {
2514
- if (typeof cb2 === "function")
2515
- cb2.apply(this, arguments);
2516
- }
2517
- });
2518
- }
2519
- }
2520
- var fs$copyFile = fs4.copyFile;
2521
- if (fs$copyFile)
2522
- fs4.copyFile = copyFile;
2523
- function copyFile(src, dest, flags, cb) {
2524
- if (typeof flags === "function") {
2525
- cb = flags;
2526
- flags = 0;
2527
- }
2528
- return go$copyFile(src, dest, flags, cb);
2529
- function go$copyFile(src2, dest2, flags2, cb2, startTime) {
2530
- return fs$copyFile(src2, dest2, flags2, function(err) {
2531
- if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2532
- enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
2533
- else {
2534
- if (typeof cb2 === "function")
2535
- cb2.apply(this, arguments);
2536
- }
2537
- });
2538
- }
2539
- }
2540
- var fs$readdir = fs4.readdir;
2541
- fs4.readdir = readdir;
2542
- var noReaddirOptionVersions = /^v[0-5]\./;
2543
- function readdir(path5, options, cb) {
2544
- if (typeof options === "function")
2545
- cb = options, options = null;
2546
- var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path6, options2, cb2, startTime) {
2547
- return fs$readdir(path6, fs$readdirCallback(
2548
- path6,
2549
- options2,
2550
- cb2,
2551
- startTime
2552
- ));
2553
- } : function go$readdir2(path6, options2, cb2, startTime) {
2554
- return fs$readdir(path6, options2, fs$readdirCallback(
2555
- path6,
2556
- options2,
2557
- cb2,
2558
- startTime
2559
- ));
2560
- };
2561
- return go$readdir(path5, options, cb);
2562
- function fs$readdirCallback(path6, options2, cb2, startTime) {
2563
- return function(err, files) {
2564
- if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2565
- enqueue([
2566
- go$readdir,
2567
- [path6, options2, cb2],
2568
- err,
2569
- startTime || Date.now(),
2570
- Date.now()
2571
- ]);
2572
- else {
2573
- if (files && files.sort)
2574
- files.sort();
2575
- if (typeof cb2 === "function")
2576
- cb2.call(this, err, files);
2577
- }
2578
- };
2579
- }
2580
- }
2581
- if (process.version.substr(0, 4) === "v0.8") {
2582
- var legStreams = legacy(fs4);
2583
- ReadStream = legStreams.ReadStream;
2584
- WriteStream = legStreams.WriteStream;
2585
- }
2586
- var fs$ReadStream = fs4.ReadStream;
2587
- if (fs$ReadStream) {
2588
- ReadStream.prototype = Object.create(fs$ReadStream.prototype);
2589
- ReadStream.prototype.open = ReadStream$open;
2590
- }
2591
- var fs$WriteStream = fs4.WriteStream;
2592
- if (fs$WriteStream) {
2593
- WriteStream.prototype = Object.create(fs$WriteStream.prototype);
2594
- WriteStream.prototype.open = WriteStream$open;
2595
- }
2596
- Object.defineProperty(fs4, "ReadStream", {
2597
- get: function() {
2598
- return ReadStream;
2599
- },
2600
- set: function(val) {
2601
- ReadStream = val;
2602
- },
2603
- enumerable: true,
2604
- configurable: true
2605
- });
2606
- Object.defineProperty(fs4, "WriteStream", {
2607
- get: function() {
2608
- return WriteStream;
2609
- },
2610
- set: function(val) {
2611
- WriteStream = val;
2612
- },
2613
- enumerable: true,
2614
- configurable: true
2615
- });
2616
- var FileReadStream = ReadStream;
2617
- Object.defineProperty(fs4, "FileReadStream", {
2618
- get: function() {
2619
- return FileReadStream;
2620
- },
2621
- set: function(val) {
2622
- FileReadStream = val;
2623
- },
2624
- enumerable: true,
2625
- configurable: true
2626
- });
2627
- var FileWriteStream = WriteStream;
2628
- Object.defineProperty(fs4, "FileWriteStream", {
2629
- get: function() {
2630
- return FileWriteStream;
2631
- },
2632
- set: function(val) {
2633
- FileWriteStream = val;
2634
- },
2635
- enumerable: true,
2636
- configurable: true
2637
- });
2638
- function ReadStream(path5, options) {
2639
- if (this instanceof ReadStream)
2640
- return fs$ReadStream.apply(this, arguments), this;
2641
- else
2642
- return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
2643
- }
2644
- function ReadStream$open() {
2645
- var that = this;
2646
- open(that.path, that.flags, that.mode, function(err, fd) {
2647
- if (err) {
2648
- if (that.autoClose)
2649
- that.destroy();
2650
- that.emit("error", err);
2651
- } else {
2652
- that.fd = fd;
2653
- that.emit("open", fd);
2654
- that.read();
2655
- }
2656
- });
2657
- }
2658
- function WriteStream(path5, options) {
2659
- if (this instanceof WriteStream)
2660
- return fs$WriteStream.apply(this, arguments), this;
2661
- else
2662
- return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
2663
- }
2664
- function WriteStream$open() {
2665
- var that = this;
2666
- open(that.path, that.flags, that.mode, function(err, fd) {
2667
- if (err) {
2668
- that.destroy();
2669
- that.emit("error", err);
2670
- } else {
2671
- that.fd = fd;
2672
- that.emit("open", fd);
2673
- }
2674
- });
2675
- }
2676
- function createReadStream(path5, options) {
2677
- return new fs4.ReadStream(path5, options);
2678
- }
2679
- function createWriteStream(path5, options) {
2680
- return new fs4.WriteStream(path5, options);
2681
- }
2682
- var fs$open = fs4.open;
2683
- fs4.open = open;
2684
- function open(path5, flags, mode, cb) {
2685
- if (typeof mode === "function")
2686
- cb = mode, mode = null;
2687
- return go$open(path5, flags, mode, cb);
2688
- function go$open(path6, flags2, mode2, cb2, startTime) {
2689
- return fs$open(path6, flags2, mode2, function(err, fd) {
2690
- if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2691
- enqueue([go$open, [path6, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
2692
- else {
2693
- if (typeof cb2 === "function")
2694
- cb2.apply(this, arguments);
2695
- }
2696
- });
2697
- }
1826
+ const [srcStat, dstStat] = await Promise.all([
1827
+ fs3.stat(srcpath),
1828
+ fs3.stat(dstpath)
1829
+ ]);
1830
+ if (areIdentical(srcStat, dstStat)) return;
2698
1831
  }
2699
- return fs4;
2700
- }
2701
- function enqueue(elem) {
2702
- debug4("ENQUEUE", elem[0].name, elem[1]);
2703
- fs3[gracefulQueue].push(elem);
2704
- retry();
2705
- }
2706
- var retryTimer;
2707
- function resetQueue() {
2708
- var now = Date.now();
2709
- for (var i = 0; i < fs3[gracefulQueue].length; ++i) {
2710
- if (fs3[gracefulQueue][i].length > 2) {
2711
- fs3[gracefulQueue][i][3] = now;
2712
- fs3[gracefulQueue][i][4] = now;
2713
- }
1832
+ const relative = await symlinkPaths(srcpath, dstpath);
1833
+ srcpath = relative.toDst;
1834
+ const toType = await symlinkType(relative.toCwd, type);
1835
+ const dir = path5.dirname(dstpath);
1836
+ if (!await pathExists2(dir)) {
1837
+ await mkdirs(dir);
2714
1838
  }
2715
- retry();
1839
+ return fs3.symlink(srcpath, dstpath, toType);
2716
1840
  }
2717
- function retry() {
2718
- clearTimeout(retryTimer);
2719
- retryTimer = void 0;
2720
- if (fs3[gracefulQueue].length === 0)
2721
- return;
2722
- var elem = fs3[gracefulQueue].shift();
2723
- var fn = elem[0];
2724
- var args = elem[1];
2725
- var err = elem[2];
2726
- var startTime = elem[3];
2727
- var lastTime = elem[4];
2728
- if (startTime === void 0) {
2729
- debug4("RETRY", fn.name, args);
2730
- fn.apply(null, args);
2731
- } else if (Date.now() - startTime >= 6e4) {
2732
- debug4("TIMEOUT", fn.name, args);
2733
- var cb = args.pop();
2734
- if (typeof cb === "function")
2735
- cb.call(null, err);
2736
- } else {
2737
- var sinceAttempt = Date.now() - lastTime;
2738
- var sinceStart = Math.max(lastTime - startTime, 1);
2739
- var desiredDelay = Math.min(sinceStart * 1.2, 100);
2740
- if (sinceAttempt >= desiredDelay) {
2741
- debug4("RETRY", fn.name, args);
2742
- fn.apply(null, args.concat([startTime]));
2743
- } else {
2744
- fs3[gracefulQueue].push(elem);
2745
- }
1841
+ function createSymlinkSync(srcpath, dstpath, type) {
1842
+ let stats;
1843
+ try {
1844
+ stats = fs3.lstatSync(dstpath);
1845
+ } catch {
2746
1846
  }
2747
- if (retryTimer === void 0) {
2748
- retryTimer = setTimeout(retry, 0);
1847
+ if (stats && stats.isSymbolicLink()) {
1848
+ const srcStat = fs3.statSync(srcpath);
1849
+ const dstStat = fs3.statSync(dstpath);
1850
+ if (areIdentical(srcStat, dstStat)) return;
2749
1851
  }
1852
+ const relative = symlinkPathsSync(srcpath, dstpath);
1853
+ srcpath = relative.toDst;
1854
+ type = symlinkTypeSync(relative.toCwd, type);
1855
+ const dir = path5.dirname(dstpath);
1856
+ const exists = fs3.existsSync(dir);
1857
+ if (exists) return fs3.symlinkSync(srcpath, dstpath, type);
1858
+ mkdirsSync(dir);
1859
+ return fs3.symlinkSync(srcpath, dstpath, type);
2750
1860
  }
1861
+ module2.exports = {
1862
+ createSymlink: u(createSymlink),
1863
+ createSymlinkSync
1864
+ };
1865
+ }
1866
+ });
1867
+
1868
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/index.js
1869
+ var require_ensure = __commonJS({
1870
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/index.js"(exports2, module2) {
1871
+ "use strict";
1872
+ var { createFile, createFileSync } = require_file();
1873
+ var { createLink, createLinkSync } = require_link();
1874
+ var { createSymlink, createSymlinkSync } = require_symlink();
1875
+ module2.exports = {
1876
+ // file
1877
+ createFile,
1878
+ createFileSync,
1879
+ ensureFile: createFile,
1880
+ ensureFileSync: createFileSync,
1881
+ // link
1882
+ createLink,
1883
+ createLinkSync,
1884
+ ensureLink: createLink,
1885
+ ensureLinkSync: createLinkSync,
1886
+ // symlink
1887
+ createSymlink,
1888
+ createSymlinkSync,
1889
+ ensureSymlink: createSymlink,
1890
+ ensureSymlinkSync: createSymlinkSync
1891
+ };
2751
1892
  }
2752
1893
  });
2753
1894
 
@@ -2774,7 +1915,7 @@ var require_jsonfile = __commonJS({
2774
1915
  "use strict";
2775
1916
  var _fs;
2776
1917
  try {
2777
- _fs = require_graceful_fs2();
1918
+ _fs = require_graceful_fs();
2778
1919
  } catch (_) {
2779
1920
  _fs = require("fs");
2780
1921
  }
@@ -2842,9 +1983,9 @@ var require_jsonfile = __commonJS({
2842
1983
  }
2843
1984
  });
2844
1985
 
2845
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/jsonfile.js
1986
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/json/jsonfile.js
2846
1987
  var require_jsonfile2 = __commonJS({
2847
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/jsonfile.js"(exports2, module2) {
1988
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/json/jsonfile.js"(exports2, module2) {
2848
1989
  "use strict";
2849
1990
  var jsonFile = require_jsonfile();
2850
1991
  module2.exports = {
@@ -2857,36 +1998,27 @@ var require_jsonfile2 = __commonJS({
2857
1998
  }
2858
1999
  });
2859
2000
 
2860
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/output-file/index.js
2001
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/output-file/index.js
2861
2002
  var require_output_file = __commonJS({
2862
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/output-file/index.js"(exports2, module2) {
2003
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/output-file/index.js"(exports2, module2) {
2863
2004
  "use strict";
2864
- var u = require_universalify().fromCallback;
2865
- var fs3 = require_graceful_fs();
2005
+ var u = require_universalify().fromPromise;
2006
+ var fs3 = require_fs();
2866
2007
  var path5 = require("path");
2867
2008
  var mkdir = require_mkdirs();
2868
2009
  var pathExists2 = require_path_exists().pathExists;
2869
- function outputFile(file2, data, encoding, callback) {
2870
- if (typeof encoding === "function") {
2871
- callback = encoding;
2872
- encoding = "utf8";
2873
- }
2010
+ async function outputFile(file2, data, encoding = "utf-8") {
2874
2011
  const dir = path5.dirname(file2);
2875
- pathExists2(dir, (err, itDoes) => {
2876
- if (err) return callback(err);
2877
- if (itDoes) return fs3.writeFile(file2, data, encoding, callback);
2878
- mkdir.mkdirs(dir, (err2) => {
2879
- if (err2) return callback(err2);
2880
- fs3.writeFile(file2, data, encoding, callback);
2881
- });
2882
- });
2012
+ if (!await pathExists2(dir)) {
2013
+ await mkdir.mkdirs(dir);
2014
+ }
2015
+ return fs3.writeFile(file2, data, encoding);
2883
2016
  }
2884
2017
  function outputFileSync(file2, ...args) {
2885
2018
  const dir = path5.dirname(file2);
2886
- if (fs3.existsSync(dir)) {
2887
- return fs3.writeFileSync(file2, ...args);
2019
+ if (!fs3.existsSync(dir)) {
2020
+ mkdir.mkdirsSync(dir);
2888
2021
  }
2889
- mkdir.mkdirsSync(dir);
2890
2022
  fs3.writeFileSync(file2, ...args);
2891
2023
  }
2892
2024
  module2.exports = {
@@ -2896,9 +2028,9 @@ var require_output_file = __commonJS({
2896
2028
  }
2897
2029
  });
2898
2030
 
2899
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json.js
2031
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/json/output-json.js
2900
2032
  var require_output_json = __commonJS({
2901
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json.js"(exports2, module2) {
2033
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/json/output-json.js"(exports2, module2) {
2902
2034
  "use strict";
2903
2035
  var { stringify: stringify2 } = require_utils2();
2904
2036
  var { outputFile } = require_output_file();
@@ -2910,9 +2042,9 @@ var require_output_json = __commonJS({
2910
2042
  }
2911
2043
  });
2912
2044
 
2913
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json-sync.js
2045
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/json/output-json-sync.js
2914
2046
  var require_output_json_sync = __commonJS({
2915
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/output-json-sync.js"(exports2, module2) {
2047
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/json/output-json-sync.js"(exports2, module2) {
2916
2048
  "use strict";
2917
2049
  var { stringify: stringify2 } = require_utils2();
2918
2050
  var { outputFileSync } = require_output_file();
@@ -2924,9 +2056,9 @@ var require_output_json_sync = __commonJS({
2924
2056
  }
2925
2057
  });
2926
2058
 
2927
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/index.js
2059
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/json/index.js
2928
2060
  var require_json = __commonJS({
2929
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/json/index.js"(exports2, module2) {
2061
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/json/index.js"(exports2, module2) {
2930
2062
  "use strict";
2931
2063
  var u = require_universalify().fromPromise;
2932
2064
  var jsonFile = require_jsonfile2();
@@ -2942,81 +2074,61 @@ var require_json = __commonJS({
2942
2074
  }
2943
2075
  });
2944
2076
 
2945
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move.js
2077
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move.js
2946
2078
  var require_move = __commonJS({
2947
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
2079
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
2948
2080
  "use strict";
2949
- var fs3 = require_graceful_fs();
2081
+ var fs3 = require_fs();
2950
2082
  var path5 = require("path");
2951
- var copy = require_copy2().copy;
2952
- var remove = require_remove().remove;
2953
- var mkdirp = require_mkdirs().mkdirp;
2954
- var pathExists2 = require_path_exists().pathExists;
2083
+ var { copy } = require_copy2();
2084
+ var { remove } = require_remove();
2085
+ var { mkdirp } = require_mkdirs();
2086
+ var { pathExists: pathExists2 } = require_path_exists();
2955
2087
  var stat = require_stat();
2956
- function move(src, dest, opts, cb) {
2957
- if (typeof opts === "function") {
2958
- cb = opts;
2959
- opts = {};
2960
- }
2961
- opts = opts || {};
2088
+ async function move(src, dest, opts = {}) {
2962
2089
  const overwrite = opts.overwrite || opts.clobber || false;
2963
- stat.checkPaths(src, dest, "move", opts, (err, stats) => {
2964
- if (err) return cb(err);
2965
- const { srcStat, isChangingCase = false } = stats;
2966
- stat.checkParentPaths(src, srcStat, dest, "move", (err2) => {
2967
- if (err2) return cb(err2);
2968
- if (isParentRoot(dest)) return doRename(src, dest, overwrite, isChangingCase, cb);
2969
- mkdirp(path5.dirname(dest), (err3) => {
2970
- if (err3) return cb(err3);
2971
- return doRename(src, dest, overwrite, isChangingCase, cb);
2972
- });
2973
- });
2974
- });
2975
- }
2976
- function isParentRoot(dest) {
2977
- const parent = path5.dirname(dest);
2978
- const parsedPath = path5.parse(parent);
2979
- return parsedPath.root === parent;
2980
- }
2981
- function doRename(src, dest, overwrite, isChangingCase, cb) {
2982
- if (isChangingCase) return rename(src, dest, overwrite, cb);
2983
- if (overwrite) {
2984
- return remove(dest, (err) => {
2985
- if (err) return cb(err);
2986
- return rename(src, dest, overwrite, cb);
2987
- });
2090
+ const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
2091
+ await stat.checkParentPaths(src, srcStat, dest, "move");
2092
+ const destParent = path5.dirname(dest);
2093
+ const parsedParentPath = path5.parse(destParent);
2094
+ if (parsedParentPath.root !== destParent) {
2095
+ await mkdirp(destParent);
2988
2096
  }
2989
- pathExists2(dest, (err, destExists) => {
2990
- if (err) return cb(err);
2991
- if (destExists) return cb(new Error("dest already exists."));
2992
- return rename(src, dest, overwrite, cb);
2993
- });
2097
+ return doRename(src, dest, overwrite, isChangingCase);
2994
2098
  }
2995
- function rename(src, dest, overwrite, cb) {
2996
- fs3.rename(src, dest, (err) => {
2997
- if (!err) return cb();
2998
- if (err.code !== "EXDEV") return cb(err);
2999
- return moveAcrossDevice(src, dest, overwrite, cb);
3000
- });
2099
+ async function doRename(src, dest, overwrite, isChangingCase) {
2100
+ if (!isChangingCase) {
2101
+ if (overwrite) {
2102
+ await remove(dest);
2103
+ } else if (await pathExists2(dest)) {
2104
+ throw new Error("dest already exists.");
2105
+ }
2106
+ }
2107
+ try {
2108
+ await fs3.rename(src, dest);
2109
+ } catch (err) {
2110
+ if (err.code !== "EXDEV") {
2111
+ throw err;
2112
+ }
2113
+ await moveAcrossDevice(src, dest, overwrite);
2114
+ }
3001
2115
  }
3002
- function moveAcrossDevice(src, dest, overwrite, cb) {
2116
+ async function moveAcrossDevice(src, dest, overwrite) {
3003
2117
  const opts = {
3004
2118
  overwrite,
3005
2119
  errorOnExist: true,
3006
2120
  preserveTimestamps: true
3007
2121
  };
3008
- copy(src, dest, opts, (err) => {
3009
- if (err) return cb(err);
3010
- return remove(src, cb);
3011
- });
2122
+ await copy(src, dest, opts);
2123
+ return remove(src);
3012
2124
  }
3013
2125
  module2.exports = move;
3014
2126
  }
3015
2127
  });
3016
2128
 
3017
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move-sync.js
2129
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move-sync.js
3018
2130
  var require_move_sync = __commonJS({
3019
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) {
2131
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) {
3020
2132
  "use strict";
3021
2133
  var fs3 = require_graceful_fs();
3022
2134
  var path5 = require("path");
@@ -3067,11 +2179,11 @@ var require_move_sync = __commonJS({
3067
2179
  }
3068
2180
  });
3069
2181
 
3070
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/index.js
2182
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/index.js
3071
2183
  var require_move2 = __commonJS({
3072
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/move/index.js"(exports2, module2) {
2184
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/index.js"(exports2, module2) {
3073
2185
  "use strict";
3074
- var u = require_universalify().fromCallback;
2186
+ var u = require_universalify().fromPromise;
3075
2187
  module2.exports = {
3076
2188
  move: u(require_move()),
3077
2189
  moveSync: require_move_sync()
@@ -3079,9 +2191,9 @@ var require_move2 = __commonJS({
3079
2191
  }
3080
2192
  });
3081
2193
 
3082
- // ../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/index.js
2194
+ // ../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/index.js
3083
2195
  var require_lib = __commonJS({
3084
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/index.js"(exports2, module2) {
2196
+ "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/index.js"(exports2, module2) {
3085
2197
  "use strict";
3086
2198
  module2.exports = {
3087
2199
  // Export promiseified graceful-fs:
@@ -3946,7 +3058,7 @@ var require_package2 = __commonJS({
3946
3058
  "package.json"(exports2, module2) {
3947
3059
  module2.exports = {
3948
3060
  name: "@prisma/client",
3949
- version: "6.5.0-integration-fix-improve-global-omit-api-performance-2.1",
3061
+ version: "6.5.0-integration-fix-improve-global-omit-api-performance-2.2",
3950
3062
  description: "Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.",
3951
3063
  keywords: [
3952
3064
  "ORM",
@@ -4156,7 +3268,7 @@ var require_package2 = __commonJS({
4156
3268
  "@prisma/debug": "workspace:*",
4157
3269
  "@prisma/driver-adapter-utils": "workspace:*",
4158
3270
  "@prisma/engines": "workspace:*",
4159
- "@prisma/engines-version": "6.4.0-29.a9055b89e58b4b5bfb59600785423b1db3d0e75d",
3271
+ "@prisma/engines-version": "6.5.0-35.c4e2705a07520fd27af6feba131ff83c38cd0c5c",
4160
3272
  "@prisma/fetch-engine": "workspace:*",
4161
3273
  "@prisma/generator-helper": "workspace:*",
4162
3274
  "@prisma/get-platform": "workspace:*",
@@ -4165,15 +3277,15 @@ var require_package2 = __commonJS({
4165
3277
  "@prisma/migrate": "workspace:*",
4166
3278
  "@prisma/mini-proxy": "0.9.5",
4167
3279
  "@prisma/pg-worker": "workspace:*",
4168
- "@prisma/query-compiler-wasm": "6.4.0-29.a9055b89e58b4b5bfb59600785423b1db3d0e75d",
4169
- "@prisma/query-engine-wasm": "6.4.0-29.a9055b89e58b4b5bfb59600785423b1db3d0e75d",
3280
+ "@prisma/query-compiler-wasm": "6.5.0-35.c4e2705a07520fd27af6feba131ff83c38cd0c5c",
3281
+ "@prisma/query-engine-wasm": "6.5.0-35.c4e2705a07520fd27af6feba131ff83c38cd0c5c",
4170
3282
  "@snaplet/copycat": "0.17.3",
4171
3283
  "@swc-node/register": "1.10.9",
4172
- "@swc/core": "1.10.11",
3284
+ "@swc/core": "1.11.5",
4173
3285
  "@swc/jest": "0.2.37",
4174
3286
  "@timsuchanek/copy": "1.4.5",
4175
3287
  "@types/debug": "4.1.12",
4176
- "@types/fs-extra": "9.0.13",
3288
+ "@types/fs-extra": "11.0.4",
4177
3289
  "@types/jest": "29.5.14",
4178
3290
  "@types/js-levenshtein": "1.1.3",
4179
3291
  "@types/mssql": "9.1.5",
@@ -4188,7 +3300,7 @@ var require_package2 = __commonJS({
4188
3300
  execa: "5.1.1",
4189
3301
  "expect-type": "1.1.0",
4190
3302
  "flat-map-polyfill": "0.3.8",
4191
- "fs-extra": "11.1.1",
3303
+ "fs-extra": "11.3.0",
4192
3304
  "get-stream": "6.0.1",
4193
3305
  globby: "11.1.0",
4194
3306
  "indent-string": "4.0.0",
@@ -5295,7 +4407,7 @@ async function overwriteFile(sourcePath, targetPath) {
5295
4407
  await removeFileIfExists(targetPath);
5296
4408
  await import_fs.default.promises.copyFile(sourcePath, targetPath);
5297
4409
  } else {
5298
- let tempPath = `${targetPath}.tmp${process.pid}`;
4410
+ const tempPath = `${targetPath}.tmp${process.pid}`;
5299
4411
  await import_fs.default.promises.copyFile(sourcePath, tempPath);
5300
4412
  await import_fs.default.promises.rename(tempPath, targetPath);
5301
4413
  }
@@ -8027,7 +7139,7 @@ var ModelDelegate = class {
8027
7139
  const nonAggregateActions = this.getNonAggregateActions(availableActions);
8028
7140
  const groupByArgsName = getGroupByArgsName(name);
8029
7141
  const countArgsName = getModelArgName(name, DMMF.ModelAction.count);
8030
- const genericDelegateParams = [extArgsParam, genericParameter("ClientOptions").default(objectType())];
7142
+ const genericDelegateParams = [extArgsParam, genericParameter("GlobalOmitOptions").default(objectType())];
8031
7143
  const excludedArgsForCount = ["select", "include", "distinct", "omit"];
8032
7144
  if (this.context.isPreviewFeatureOn("relationJoins")) {
8033
7145
  excludedArgsForCount.push("relationLoadStrategy");
@@ -8211,14 +7323,14 @@ function getReturnType({
8211
7323
  return getFluentWrapper(modelName, getResultType(modelName, actionName));
8212
7324
  }
8213
7325
  function getFluentWrapper(modelName, resultType, nullType2 = neverType) {
8214
- return namedType(fluentWrapperName(modelName)).addGenericArgument(resultType).addGenericArgument(nullType2).addGenericArgument(extArgsParam.toArgument()).addGenericArgument(namedType("ClientOptions"));
7326
+ return namedType(fluentWrapperName(modelName)).addGenericArgument(resultType).addGenericArgument(nullType2).addGenericArgument(extArgsParam.toArgument()).addGenericArgument(namedType("GlobalOmitOptions"));
8215
7327
  }
8216
7328
  function getResultType(modelName, actionName) {
8217
- return namedType("$Result.GetResult").addGenericArgument(namedType(getPayloadName(modelName)).addGenericArgument(extArgsParam.toArgument())).addGenericArgument(namedType("T")).addGenericArgument(stringLiteral(actionName)).addGenericArgument(namedType("ClientOptions"));
7329
+ return namedType("$Result.GetResult").addGenericArgument(namedType(getPayloadName(modelName)).addGenericArgument(extArgsParam.toArgument())).addGenericArgument(namedType("T")).addGenericArgument(stringLiteral(actionName)).addGenericArgument(namedType("GlobalOmitOptions"));
8218
7330
  }
8219
7331
  function buildFluentWrapperDefinition(modelName, outputType, context) {
8220
7332
  const definition = interfaceDeclaration(fluentWrapperName(modelName));
8221
- definition.addGenericParameter(genericParameter("T")).addGenericParameter(genericParameter("Null").default(neverType)).addGenericParameter(extArgsParam).addGenericParameter(genericParameter("ClientOptions").default(objectType())).extends(prismaPromise(namedType("T")));
7333
+ definition.addGenericParameter(genericParameter("T")).addGenericParameter(genericParameter("Null").default(neverType)).addGenericParameter(extArgsParam).addGenericParameter(genericParameter("GlobalOmitOptions").default(objectType())).extends(prismaPromise(namedType("T")));
8222
7334
  definition.add(property(toStringTag, stringLiteral("PrismaPromise")).readonly());
8223
7335
  definition.addMultiple(
8224
7336
  outputType.fields.filter(
@@ -9797,7 +8909,7 @@ var PrismaClientClass = class {
9797
8909
  export class PrismaClient<
9798
8910
  ClientOptions extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions,
9799
8911
  U = 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition> ? Prisma.GetEvents<ClientOptions['log']> : never : never,
9800
- ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs
8912
+ ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs,
9801
8913
  > {
9802
8914
  [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }
9803
8915