@prisma/client-generator-js 7.3.0-integration-prisma6-fix-cloudflare-engine.3 → 7.3.0-integration-engines-7-3-0-10-fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/TSClient/Args.d.ts +5 -5
  2. package/dist/TSClient/GenerateContext.d.ts +5 -2
  3. package/dist/TSClient/PrismaClient.d.ts +2 -2
  4. package/dist/TSClient/TSClient.d.ts +2 -7
  5. package/dist/TSClient/common.d.ts +2 -2
  6. package/dist/generateClient.d.ts +2 -7
  7. package/dist/generator.d.ts +1 -1
  8. package/dist/index.d.mts +2 -7
  9. package/dist/index.d.ts +2 -7
  10. package/dist/index.js +373 -2976
  11. package/dist/index.mjs +359 -2968
  12. package/dist/resolvePrismaClient.d.ts +0 -5
  13. package/dist/typedSql/buildIndex.d.ts +2 -2
  14. package/dist/typedSql/typedSql.d.ts +1 -1
  15. package/dist/utils/buildDMMF.d.ts +1 -1
  16. package/dist/utils/buildDebugInitialization.d.ts +1 -1
  17. package/dist/utils/buildGetQueryCompilerWasmModule.d.ts +1 -1
  18. package/dist/utils/runtimeImport.d.ts +1 -8
  19. package/package.json +10 -11
  20. package/dist/TSClient/Datasources.d.ts +0 -7
  21. package/dist/extractSqliteSources.d.ts +0 -6
  22. package/dist/extractSqliteSources.test.d.ts +0 -1
  23. package/dist/resolveDatasources.d.ts +0 -1
  24. package/dist/resolveDatasources.test.d.ts +0 -1
  25. package/dist/serializeDatasources.d.ts +0 -4
  26. package/dist/serializeDatasources.test.d.ts +0 -1
  27. package/dist/utils/buildDirname.d.ts +0 -7
  28. package/dist/utils/buildGetQueryEngineWasmModule.d.ts +0 -6
  29. package/dist/utils/buildInjectableEdgeEnv.d.ts +0 -20
  30. package/dist/utils/buildInlineDatasources.d.ts +0 -3
  31. package/dist/utils/buildNFTAnnotations.d.ts +0 -11
  32. package/dist/utils/buildNFTAnnotations.test.d.ts +0 -1
  33. package/dist/utils/buildWarnEnvConflicts.d.ts +0 -10
package/dist/index.mjs CHANGED
@@ -62,7 +62,7 @@ var require_universalify = __commonJS({
62
62
  var require_polyfills = __commonJS({
63
63
  "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports, module) {
64
64
  "use strict";
65
- var constants3 = __require("constants");
65
+ var constants = __require("constants");
66
66
  var origCwd = process.cwd;
67
67
  var cwd = null;
68
68
  var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
@@ -86,7 +86,7 @@ var require_polyfills = __commonJS({
86
86
  var chdir;
87
87
  module.exports = patch;
88
88
  function patch(fs3) {
89
- if (constants3.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
89
+ if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
90
90
  patchLchmod(fs3);
91
91
  }
92
92
  if (!fs3.lutimes) {
@@ -111,14 +111,14 @@ var require_polyfills = __commonJS({
111
111
  fs3.fstatSync = statFixSync(fs3.fstatSync);
112
112
  fs3.lstatSync = statFixSync(fs3.lstatSync);
113
113
  if (fs3.chmod && !fs3.lchmod) {
114
- fs3.lchmod = function(path9, mode, cb) {
114
+ fs3.lchmod = function(path5, mode, cb) {
115
115
  if (cb) process.nextTick(cb);
116
116
  };
117
117
  fs3.lchmodSync = function() {
118
118
  };
119
119
  }
120
120
  if (fs3.chown && !fs3.lchown) {
121
- fs3.lchown = function(path9, uid, gid, cb) {
121
+ fs3.lchown = function(path5, uid, gid, cb) {
122
122
  if (cb) process.nextTick(cb);
123
123
  };
124
124
  fs3.lchownSync = function() {
@@ -185,10 +185,10 @@ var require_polyfills = __commonJS({
185
185
  };
186
186
  }(fs3.readSync);
187
187
  function patchLchmod(fs4) {
188
- fs4.lchmod = function(path9, mode, callback) {
188
+ fs4.lchmod = function(path5, mode, callback) {
189
189
  fs4.open(
190
- path9,
191
- constants3.O_WRONLY | constants3.O_SYMLINK,
190
+ path5,
191
+ constants.O_WRONLY | constants.O_SYMLINK,
192
192
  mode,
193
193
  function(err, fd) {
194
194
  if (err) {
@@ -203,8 +203,8 @@ var require_polyfills = __commonJS({
203
203
  }
204
204
  );
205
205
  };
206
- fs4.lchmodSync = function(path9, mode) {
207
- var fd = fs4.openSync(path9, constants3.O_WRONLY | constants3.O_SYMLINK, mode);
206
+ fs4.lchmodSync = function(path5, mode) {
207
+ var fd = fs4.openSync(path5, constants.O_WRONLY | constants.O_SYMLINK, mode);
208
208
  var threw = true;
209
209
  var ret;
210
210
  try {
@@ -224,9 +224,9 @@ var require_polyfills = __commonJS({
224
224
  };
225
225
  }
226
226
  function patchLutimes(fs4) {
227
- if (constants3.hasOwnProperty("O_SYMLINK") && fs4.futimes) {
228
- fs4.lutimes = function(path9, at, mt, cb) {
229
- fs4.open(path9, constants3.O_SYMLINK, function(er, fd) {
227
+ if (constants.hasOwnProperty("O_SYMLINK") && fs4.futimes) {
228
+ fs4.lutimes = function(path5, at, mt, cb) {
229
+ fs4.open(path5, constants.O_SYMLINK, function(er, fd) {
230
230
  if (er) {
231
231
  if (cb) cb(er);
232
232
  return;
@@ -238,8 +238,8 @@ var require_polyfills = __commonJS({
238
238
  });
239
239
  });
240
240
  };
241
- fs4.lutimesSync = function(path9, at, mt) {
242
- var fd = fs4.openSync(path9, constants3.O_SYMLINK);
241
+ fs4.lutimesSync = function(path5, at, mt) {
242
+ var fd = fs4.openSync(path5, constants.O_SYMLINK);
243
243
  var ret;
244
244
  var threw = true;
245
245
  try {
@@ -358,11 +358,11 @@ var require_legacy_streams = __commonJS({
358
358
  ReadStream,
359
359
  WriteStream
360
360
  };
361
- function ReadStream(path9, options) {
362
- if (!(this instanceof ReadStream)) return new ReadStream(path9, options);
361
+ function ReadStream(path5, options) {
362
+ if (!(this instanceof ReadStream)) return new ReadStream(path5, options);
363
363
  Stream.call(this);
364
364
  var self = this;
365
- this.path = path9;
365
+ this.path = path5;
366
366
  this.fd = null;
367
367
  this.readable = true;
368
368
  this.paused = false;
@@ -407,10 +407,10 @@ var require_legacy_streams = __commonJS({
407
407
  self._read();
408
408
  });
409
409
  }
410
- function WriteStream(path9, options) {
411
- if (!(this instanceof WriteStream)) return new WriteStream(path9, options);
410
+ function WriteStream(path5, options) {
411
+ if (!(this instanceof WriteStream)) return new WriteStream(path5, options);
412
412
  Stream.call(this);
413
- this.path = path9;
413
+ this.path = path5;
414
414
  this.fd = null;
415
415
  this.writable = true;
416
416
  this.flags = "w";
@@ -485,7 +485,7 @@ var require_graceful_fs = __commonJS({
485
485
  gracefulQueue = "___graceful-fs.queue";
486
486
  previousSymbol = "___graceful-fs.previous";
487
487
  }
488
- function noop2() {
488
+ function noop() {
489
489
  }
490
490
  function publishQueue(context, queue2) {
491
491
  Object.defineProperty(context, gracefulQueue, {
@@ -494,11 +494,11 @@ var require_graceful_fs = __commonJS({
494
494
  }
495
495
  });
496
496
  }
497
- var debug4 = noop2;
497
+ var debug2 = noop;
498
498
  if (util.debuglog)
499
- debug4 = util.debuglog("gfs4");
499
+ debug2 = util.debuglog("gfs4");
500
500
  else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
501
- debug4 = function() {
501
+ debug2 = function() {
502
502
  var m = util.format.apply(util, arguments);
503
503
  m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
504
504
  console.error(m);
@@ -533,7 +533,7 @@ var require_graceful_fs = __commonJS({
533
533
  }(fs3.closeSync);
534
534
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
535
535
  process.on("exit", function() {
536
- debug4(fs3[gracefulQueue]);
536
+ debug2(fs3[gracefulQueue]);
537
537
  __require("assert").equal(fs3[gracefulQueue].length, 0);
538
538
  });
539
539
  }
@@ -550,18 +550,18 @@ var require_graceful_fs = __commonJS({
550
550
  function patch(fs4) {
551
551
  polyfills(fs4);
552
552
  fs4.gracefulify = patch;
553
- fs4.createReadStream = createReadStream2;
554
- fs4.createWriteStream = createWriteStream2;
553
+ fs4.createReadStream = createReadStream;
554
+ fs4.createWriteStream = createWriteStream;
555
555
  var fs$readFile = fs4.readFile;
556
556
  fs4.readFile = readFile;
557
- function readFile(path9, options, cb) {
557
+ function readFile(path5, options, cb) {
558
558
  if (typeof options === "function")
559
559
  cb = options, options = null;
560
- return go$readFile(path9, options, cb);
561
- function go$readFile(path10, options2, cb2, startTime) {
562
- return fs$readFile(path10, options2, function(err) {
560
+ return go$readFile(path5, options, cb);
561
+ function go$readFile(path6, options2, cb2, startTime) {
562
+ return fs$readFile(path6, options2, function(err) {
563
563
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
564
- enqueue([go$readFile, [path10, options2, cb2], err, startTime || Date.now(), Date.now()]);
564
+ enqueue([go$readFile, [path6, options2, cb2], err, startTime || Date.now(), Date.now()]);
565
565
  else {
566
566
  if (typeof cb2 === "function")
567
567
  cb2.apply(this, arguments);
@@ -571,14 +571,14 @@ var require_graceful_fs = __commonJS({
571
571
  }
572
572
  var fs$writeFile = fs4.writeFile;
573
573
  fs4.writeFile = writeFile;
574
- function writeFile(path9, data, options, cb) {
574
+ function writeFile(path5, data, options, cb) {
575
575
  if (typeof options === "function")
576
576
  cb = options, options = null;
577
- return go$writeFile(path9, data, options, cb);
578
- function go$writeFile(path10, data2, options2, cb2, startTime) {
579
- return fs$writeFile(path10, data2, options2, function(err) {
577
+ return go$writeFile(path5, data, options, cb);
578
+ function go$writeFile(path6, data2, options2, cb2, startTime) {
579
+ return fs$writeFile(path6, data2, options2, function(err) {
580
580
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
581
- enqueue([go$writeFile, [path10, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
581
+ enqueue([go$writeFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
582
582
  else {
583
583
  if (typeof cb2 === "function")
584
584
  cb2.apply(this, arguments);
@@ -589,14 +589,14 @@ var require_graceful_fs = __commonJS({
589
589
  var fs$appendFile = fs4.appendFile;
590
590
  if (fs$appendFile)
591
591
  fs4.appendFile = appendFile;
592
- function appendFile(path9, data, options, cb) {
592
+ function appendFile(path5, data, options, cb) {
593
593
  if (typeof options === "function")
594
594
  cb = options, options = null;
595
- return go$appendFile(path9, data, options, cb);
596
- function go$appendFile(path10, data2, options2, cb2, startTime) {
597
- return fs$appendFile(path10, data2, options2, function(err) {
595
+ return go$appendFile(path5, data, options, cb);
596
+ function go$appendFile(path6, data2, options2, cb2, startTime) {
597
+ return fs$appendFile(path6, data2, options2, function(err) {
598
598
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
599
- enqueue([go$appendFile, [path10, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
599
+ enqueue([go$appendFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
600
600
  else {
601
601
  if (typeof cb2 === "function")
602
602
  cb2.apply(this, arguments);
@@ -627,31 +627,31 @@ var require_graceful_fs = __commonJS({
627
627
  var fs$readdir = fs4.readdir;
628
628
  fs4.readdir = readdir;
629
629
  var noReaddirOptionVersions = /^v[0-5]\./;
630
- function readdir(path9, options, cb) {
630
+ function readdir(path5, options, cb) {
631
631
  if (typeof options === "function")
632
632
  cb = options, options = null;
633
- var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path10, options2, cb2, startTime) {
634
- return fs$readdir(path10, fs$readdirCallback(
635
- path10,
633
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path6, options2, cb2, startTime) {
634
+ return fs$readdir(path6, fs$readdirCallback(
635
+ path6,
636
636
  options2,
637
637
  cb2,
638
638
  startTime
639
639
  ));
640
- } : function go$readdir2(path10, options2, cb2, startTime) {
641
- return fs$readdir(path10, options2, fs$readdirCallback(
642
- path10,
640
+ } : function go$readdir2(path6, options2, cb2, startTime) {
641
+ return fs$readdir(path6, options2, fs$readdirCallback(
642
+ path6,
643
643
  options2,
644
644
  cb2,
645
645
  startTime
646
646
  ));
647
647
  };
648
- return go$readdir(path9, options, cb);
649
- function fs$readdirCallback(path10, options2, cb2, startTime) {
648
+ return go$readdir(path5, options, cb);
649
+ function fs$readdirCallback(path6, options2, cb2, startTime) {
650
650
  return function(err, files) {
651
651
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
652
652
  enqueue([
653
653
  go$readdir,
654
- [path10, options2, cb2],
654
+ [path6, options2, cb2],
655
655
  err,
656
656
  startTime || Date.now(),
657
657
  Date.now()
@@ -722,7 +722,7 @@ var require_graceful_fs = __commonJS({
722
722
  enumerable: true,
723
723
  configurable: true
724
724
  });
725
- function ReadStream(path9, options) {
725
+ function ReadStream(path5, options) {
726
726
  if (this instanceof ReadStream)
727
727
  return fs$ReadStream.apply(this, arguments), this;
728
728
  else
@@ -742,7 +742,7 @@ var require_graceful_fs = __commonJS({
742
742
  }
743
743
  });
744
744
  }
745
- function WriteStream(path9, options) {
745
+ function WriteStream(path5, options) {
746
746
  if (this instanceof WriteStream)
747
747
  return fs$WriteStream.apply(this, arguments), this;
748
748
  else
@@ -760,22 +760,22 @@ var require_graceful_fs = __commonJS({
760
760
  }
761
761
  });
762
762
  }
763
- function createReadStream2(path9, options) {
764
- return new fs4.ReadStream(path9, options);
763
+ function createReadStream(path5, options) {
764
+ return new fs4.ReadStream(path5, options);
765
765
  }
766
- function createWriteStream2(path9, options) {
767
- return new fs4.WriteStream(path9, options);
766
+ function createWriteStream(path5, options) {
767
+ return new fs4.WriteStream(path5, options);
768
768
  }
769
769
  var fs$open = fs4.open;
770
770
  fs4.open = open;
771
- function open(path9, flags, mode, cb) {
771
+ function open(path5, flags, mode, cb) {
772
772
  if (typeof mode === "function")
773
773
  cb = mode, mode = null;
774
- return go$open(path9, flags, mode, cb);
775
- function go$open(path10, flags2, mode2, cb2, startTime) {
776
- return fs$open(path10, flags2, mode2, function(err, fd) {
774
+ return go$open(path5, flags, mode, cb);
775
+ function go$open(path6, flags2, mode2, cb2, startTime) {
776
+ return fs$open(path6, flags2, mode2, function(err, fd) {
777
777
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
778
- enqueue([go$open, [path10, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
778
+ enqueue([go$open, [path6, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
779
779
  else {
780
780
  if (typeof cb2 === "function")
781
781
  cb2.apply(this, arguments);
@@ -786,7 +786,7 @@ var require_graceful_fs = __commonJS({
786
786
  return fs4;
787
787
  }
788
788
  function enqueue(elem) {
789
- debug4("ENQUEUE", elem[0].name, elem[1]);
789
+ debug2("ENQUEUE", elem[0].name, elem[1]);
790
790
  fs3[gracefulQueue].push(elem);
791
791
  retry();
792
792
  }
@@ -813,10 +813,10 @@ var require_graceful_fs = __commonJS({
813
813
  var startTime = elem[3];
814
814
  var lastTime = elem[4];
815
815
  if (startTime === void 0) {
816
- debug4("RETRY", fn.name, args);
816
+ debug2("RETRY", fn.name, args);
817
817
  fn.apply(null, args);
818
818
  } else if (Date.now() - startTime >= 6e4) {
819
- debug4("TIMEOUT", fn.name, args);
819
+ debug2("TIMEOUT", fn.name, args);
820
820
  var cb = args.pop();
821
821
  if (typeof cb === "function")
822
822
  cb.call(null, err);
@@ -825,7 +825,7 @@ var require_graceful_fs = __commonJS({
825
825
  var sinceStart = Math.max(lastTime - startTime, 1);
826
826
  var desiredDelay = Math.min(sinceStart * 1.2, 100);
827
827
  if (sinceAttempt >= desiredDelay) {
828
- debug4("RETRY", fn.name, args);
828
+ debug2("RETRY", fn.name, args);
829
829
  fn.apply(null, args.concat([startTime]));
830
830
  } else {
831
831
  fs3[gracefulQueue].push(elem);
@@ -958,10 +958,10 @@ var require_fs = __commonJS({
958
958
  var require_utils = __commonJS({
959
959
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module) {
960
960
  "use strict";
961
- var path9 = __require("path");
961
+ var path5 = __require("path");
962
962
  module.exports.checkPath = function checkPath(pth) {
963
963
  if (process.platform === "win32") {
964
- const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path9.parse(pth).root, ""));
964
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path5.parse(pth).root, ""));
965
965
  if (pathHasInvalidWinCharacters) {
966
966
  const error = new Error(`Path contains invalid characters: ${pth}`);
967
967
  error.code = "EINVAL";
@@ -1025,8 +1025,8 @@ var require_path_exists = __commonJS({
1025
1025
  "use strict";
1026
1026
  var u = require_universalify().fromPromise;
1027
1027
  var fs3 = require_fs();
1028
- function pathExists(path9) {
1029
- return fs3.access(path9).then(() => true).catch(() => false);
1028
+ function pathExists(path5) {
1029
+ return fs3.access(path5).then(() => true).catch(() => false);
1030
1030
  }
1031
1031
  module.exports = {
1032
1032
  pathExists: u(pathExists),
@@ -1041,8 +1041,8 @@ var require_utimes = __commonJS({
1041
1041
  "use strict";
1042
1042
  var fs3 = require_fs();
1043
1043
  var u = require_universalify().fromPromise;
1044
- async function utimesMillis(path9, atime, mtime) {
1045
- const fd = await fs3.open(path9, "r+");
1044
+ async function utimesMillis(path5, atime, mtime) {
1045
+ const fd = await fs3.open(path5, "r+");
1046
1046
  let closeErr = null;
1047
1047
  try {
1048
1048
  await fs3.futimes(fd, atime, mtime);
@@ -1057,8 +1057,8 @@ var require_utimes = __commonJS({
1057
1057
  throw closeErr;
1058
1058
  }
1059
1059
  }
1060
- function utimesMillisSync(path9, atime, mtime) {
1061
- const fd = fs3.openSync(path9, "r+");
1060
+ function utimesMillisSync(path5, atime, mtime) {
1061
+ const fd = fs3.openSync(path5, "r+");
1062
1062
  fs3.futimesSync(fd, atime, mtime);
1063
1063
  return fs3.closeSync(fd);
1064
1064
  }
@@ -1074,7 +1074,7 @@ var require_stat = __commonJS({
1074
1074
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/util/stat.js"(exports, module) {
1075
1075
  "use strict";
1076
1076
  var fs3 = require_fs();
1077
- var path9 = __require("path");
1077
+ var path5 = __require("path");
1078
1078
  var u = require_universalify().fromPromise;
1079
1079
  function getStats(src, dest, opts) {
1080
1080
  const statFunc = opts.dereference ? (file4) => fs3.stat(file4, { bigint: true }) : (file4) => fs3.lstat(file4, { bigint: true });
@@ -1102,8 +1102,8 @@ var require_stat = __commonJS({
1102
1102
  const { srcStat, destStat } = await getStats(src, dest, opts);
1103
1103
  if (destStat) {
1104
1104
  if (areIdentical(srcStat, destStat)) {
1105
- const srcBaseName = path9.basename(src);
1106
- const destBaseName = path9.basename(dest);
1105
+ const srcBaseName = path5.basename(src);
1106
+ const destBaseName = path5.basename(dest);
1107
1107
  if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
1108
1108
  return { srcStat, destStat, isChangingCase: true };
1109
1109
  }
@@ -1125,8 +1125,8 @@ var require_stat = __commonJS({
1125
1125
  const { srcStat, destStat } = getStatsSync(src, dest, opts);
1126
1126
  if (destStat) {
1127
1127
  if (areIdentical(srcStat, destStat)) {
1128
- const srcBaseName = path9.basename(src);
1129
- const destBaseName = path9.basename(dest);
1128
+ const srcBaseName = path5.basename(src);
1129
+ const destBaseName = path5.basename(dest);
1130
1130
  if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
1131
1131
  return { srcStat, destStat, isChangingCase: true };
1132
1132
  }
@@ -1145,9 +1145,9 @@ var require_stat = __commonJS({
1145
1145
  return { srcStat, destStat };
1146
1146
  }
1147
1147
  async function checkParentPaths(src, srcStat, dest, funcName) {
1148
- const srcParent = path9.resolve(path9.dirname(src));
1149
- const destParent = path9.resolve(path9.dirname(dest));
1150
- if (destParent === srcParent || destParent === path9.parse(destParent).root) return;
1148
+ const srcParent = path5.resolve(path5.dirname(src));
1149
+ const destParent = path5.resolve(path5.dirname(dest));
1150
+ if (destParent === srcParent || destParent === path5.parse(destParent).root) return;
1151
1151
  let destStat;
1152
1152
  try {
1153
1153
  destStat = await fs3.stat(destParent, { bigint: true });
@@ -1161,9 +1161,9 @@ var require_stat = __commonJS({
1161
1161
  return checkParentPaths(src, srcStat, destParent, funcName);
1162
1162
  }
1163
1163
  function checkParentPathsSync(src, srcStat, dest, funcName) {
1164
- const srcParent = path9.resolve(path9.dirname(src));
1165
- const destParent = path9.resolve(path9.dirname(dest));
1166
- if (destParent === srcParent || destParent === path9.parse(destParent).root) return;
1164
+ const srcParent = path5.resolve(path5.dirname(src));
1165
+ const destParent = path5.resolve(path5.dirname(dest));
1166
+ if (destParent === srcParent || destParent === path5.parse(destParent).root) return;
1167
1167
  let destStat;
1168
1168
  try {
1169
1169
  destStat = fs3.statSync(destParent, { bigint: true });
@@ -1180,8 +1180,8 @@ var require_stat = __commonJS({
1180
1180
  return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
1181
1181
  }
1182
1182
  function isSrcSubdir(src, dest) {
1183
- const srcArr = path9.resolve(src).split(path9.sep).filter((i) => i);
1184
- const destArr = path9.resolve(dest).split(path9.sep).filter((i) => i);
1183
+ const srcArr = path5.resolve(src).split(path5.sep).filter((i) => i);
1184
+ const destArr = path5.resolve(dest).split(path5.sep).filter((i) => i);
1185
1185
  return srcArr.every((cur, i) => destArr[i] === cur);
1186
1186
  }
1187
1187
  function errMsg(src, dest, funcName) {
@@ -1206,7 +1206,7 @@ var require_copy = __commonJS({
1206
1206
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/copy.js"(exports, module) {
1207
1207
  "use strict";
1208
1208
  var fs3 = require_fs();
1209
- var path9 = __require("path");
1209
+ var path5 = __require("path");
1210
1210
  var { mkdirs } = require_mkdirs();
1211
1211
  var { pathExists } = require_path_exists();
1212
1212
  var { utimesMillis } = require_utimes();
@@ -1228,7 +1228,7 @@ var require_copy = __commonJS({
1228
1228
  await stat.checkParentPaths(src, srcStat, dest, "copy");
1229
1229
  const include = await runFilter(src, dest, opts);
1230
1230
  if (!include) return;
1231
- const destParent = path9.dirname(dest);
1231
+ const destParent = path5.dirname(dest);
1232
1232
  const dirExists = await pathExists(destParent);
1233
1233
  if (!dirExists) {
1234
1234
  await mkdirs(destParent);
@@ -1282,8 +1282,8 @@ var require_copy = __commonJS({
1282
1282
  }
1283
1283
  const promises = [];
1284
1284
  for await (const item of await fs3.opendir(src)) {
1285
- const srcItem = path9.join(src, item.name);
1286
- const destItem = path9.join(dest, item.name);
1285
+ const srcItem = path5.join(src, item.name);
1286
+ const destItem = path5.join(dest, item.name);
1287
1287
  promises.push(
1288
1288
  runFilter(srcItem, destItem, opts).then((include) => {
1289
1289
  if (include) {
@@ -1302,7 +1302,7 @@ var require_copy = __commonJS({
1302
1302
  async function onLink(destStat, src, dest, opts) {
1303
1303
  let resolvedSrc = await fs3.readlink(src);
1304
1304
  if (opts.dereference) {
1305
- resolvedSrc = path9.resolve(process.cwd(), resolvedSrc);
1305
+ resolvedSrc = path5.resolve(process.cwd(), resolvedSrc);
1306
1306
  }
1307
1307
  if (!destStat) {
1308
1308
  return fs3.symlink(resolvedSrc, dest);
@@ -1315,7 +1315,7 @@ var require_copy = __commonJS({
1315
1315
  throw e;
1316
1316
  }
1317
1317
  if (opts.dereference) {
1318
- resolvedDest = path9.resolve(process.cwd(), resolvedDest);
1318
+ resolvedDest = path5.resolve(process.cwd(), resolvedDest);
1319
1319
  }
1320
1320
  if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
1321
1321
  throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
@@ -1335,7 +1335,7 @@ var require_copy_sync = __commonJS({
1335
1335
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module) {
1336
1336
  "use strict";
1337
1337
  var fs3 = require_graceful_fs();
1338
- var path9 = __require("path");
1338
+ var path5 = __require("path");
1339
1339
  var mkdirsSync = require_mkdirs().mkdirsSync;
1340
1340
  var utimesMillisSync = require_utimes().utimesMillisSync;
1341
1341
  var stat = require_stat();
@@ -1356,7 +1356,7 @@ var require_copy_sync = __commonJS({
1356
1356
  const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
1357
1357
  stat.checkParentPathsSync(src, srcStat, dest, "copy");
1358
1358
  if (opts.filter && !opts.filter(src, dest)) return;
1359
- const destParent = path9.dirname(dest);
1359
+ const destParent = path5.dirname(dest);
1360
1360
  if (!fs3.existsSync(destParent)) mkdirsSync(destParent);
1361
1361
  return getStats(destStat, src, dest, opts);
1362
1362
  }
@@ -1425,8 +1425,8 @@ var require_copy_sync = __commonJS({
1425
1425
  }
1426
1426
  }
1427
1427
  function copyDirItem(item, src, dest, opts) {
1428
- const srcItem = path9.join(src, item);
1429
- const destItem = path9.join(dest, item);
1428
+ const srcItem = path5.join(src, item);
1429
+ const destItem = path5.join(dest, item);
1430
1430
  if (opts.filter && !opts.filter(srcItem, destItem)) return;
1431
1431
  const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
1432
1432
  return getStats(destStat, srcItem, destItem, opts);
@@ -1434,7 +1434,7 @@ var require_copy_sync = __commonJS({
1434
1434
  function onLink(destStat, src, dest, opts) {
1435
1435
  let resolvedSrc = fs3.readlinkSync(src);
1436
1436
  if (opts.dereference) {
1437
- resolvedSrc = path9.resolve(process.cwd(), resolvedSrc);
1437
+ resolvedSrc = path5.resolve(process.cwd(), resolvedSrc);
1438
1438
  }
1439
1439
  if (!destStat) {
1440
1440
  return fs3.symlinkSync(resolvedSrc, dest);
@@ -1447,7 +1447,7 @@ var require_copy_sync = __commonJS({
1447
1447
  throw err;
1448
1448
  }
1449
1449
  if (opts.dereference) {
1450
- resolvedDest = path9.resolve(process.cwd(), resolvedDest);
1450
+ resolvedDest = path5.resolve(process.cwd(), resolvedDest);
1451
1451
  }
1452
1452
  if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
1453
1453
  throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
@@ -1484,11 +1484,11 @@ var require_remove = __commonJS({
1484
1484
  "use strict";
1485
1485
  var fs3 = require_graceful_fs();
1486
1486
  var u = require_universalify().fromCallback;
1487
- function remove(path9, callback) {
1488
- fs3.rm(path9, { recursive: true, force: true }, callback);
1487
+ function remove(path5, callback) {
1488
+ fs3.rm(path5, { recursive: true, force: true }, callback);
1489
1489
  }
1490
- function removeSync(path9) {
1491
- fs3.rmSync(path9, { recursive: true, force: true });
1490
+ function removeSync(path5) {
1491
+ fs3.rmSync(path5, { recursive: true, force: true });
1492
1492
  }
1493
1493
  module.exports = {
1494
1494
  remove: u(remove),
@@ -1503,7 +1503,7 @@ var require_empty = __commonJS({
1503
1503
  "use strict";
1504
1504
  var u = require_universalify().fromPromise;
1505
1505
  var fs3 = require_fs();
1506
- var path9 = __require("path");
1506
+ var path5 = __require("path");
1507
1507
  var mkdir = require_mkdirs();
1508
1508
  var remove = require_remove();
1509
1509
  var emptyDir = u(async function emptyDir2(dir) {
@@ -1513,7 +1513,7 @@ var require_empty = __commonJS({
1513
1513
  } catch {
1514
1514
  return mkdir.mkdirs(dir);
1515
1515
  }
1516
- return Promise.all(items.map((item) => remove.remove(path9.join(dir, item))));
1516
+ return Promise.all(items.map((item) => remove.remove(path5.join(dir, item))));
1517
1517
  });
1518
1518
  function emptyDirSync(dir) {
1519
1519
  let items;
@@ -1523,7 +1523,7 @@ var require_empty = __commonJS({
1523
1523
  return mkdir.mkdirsSync(dir);
1524
1524
  }
1525
1525
  items.forEach((item) => {
1526
- item = path9.join(dir, item);
1526
+ item = path5.join(dir, item);
1527
1527
  remove.removeSync(item);
1528
1528
  });
1529
1529
  }
@@ -1541,7 +1541,7 @@ var require_file = __commonJS({
1541
1541
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/file.js"(exports, module) {
1542
1542
  "use strict";
1543
1543
  var u = require_universalify().fromPromise;
1544
- var path9 = __require("path");
1544
+ var path5 = __require("path");
1545
1545
  var fs3 = require_fs();
1546
1546
  var mkdir = require_mkdirs();
1547
1547
  async function createFile(file4) {
@@ -1551,7 +1551,7 @@ var require_file = __commonJS({
1551
1551
  } catch {
1552
1552
  }
1553
1553
  if (stats && stats.isFile()) return;
1554
- const dir = path9.dirname(file4);
1554
+ const dir = path5.dirname(file4);
1555
1555
  let dirStats = null;
1556
1556
  try {
1557
1557
  dirStats = await fs3.stat(dir);
@@ -1577,7 +1577,7 @@ var require_file = __commonJS({
1577
1577
  } catch {
1578
1578
  }
1579
1579
  if (stats && stats.isFile()) return;
1580
- const dir = path9.dirname(file4);
1580
+ const dir = path5.dirname(file4);
1581
1581
  try {
1582
1582
  if (!fs3.statSync(dir).isDirectory()) {
1583
1583
  fs3.readdirSync(dir);
@@ -1600,7 +1600,7 @@ var require_link = __commonJS({
1600
1600
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/link.js"(exports, module) {
1601
1601
  "use strict";
1602
1602
  var u = require_universalify().fromPromise;
1603
- var path9 = __require("path");
1603
+ var path5 = __require("path");
1604
1604
  var fs3 = require_fs();
1605
1605
  var mkdir = require_mkdirs();
1606
1606
  var { pathExists } = require_path_exists();
@@ -1619,7 +1619,7 @@ var require_link = __commonJS({
1619
1619
  throw err;
1620
1620
  }
1621
1621
  if (dstStat && areIdentical(srcStat, dstStat)) return;
1622
- const dir = path9.dirname(dstpath);
1622
+ const dir = path5.dirname(dstpath);
1623
1623
  const dirExists = await pathExists(dir);
1624
1624
  if (!dirExists) {
1625
1625
  await mkdir.mkdirs(dir);
@@ -1639,7 +1639,7 @@ var require_link = __commonJS({
1639
1639
  err.message = err.message.replace("lstat", "ensureLink");
1640
1640
  throw err;
1641
1641
  }
1642
- const dir = path9.dirname(dstpath);
1642
+ const dir = path5.dirname(dstpath);
1643
1643
  const dirExists = fs3.existsSync(dir);
1644
1644
  if (dirExists) return fs3.linkSync(srcpath, dstpath);
1645
1645
  mkdir.mkdirsSync(dir);
@@ -1656,12 +1656,12 @@ var require_link = __commonJS({
1656
1656
  var require_symlink_paths = __commonJS({
1657
1657
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module) {
1658
1658
  "use strict";
1659
- var path9 = __require("path");
1659
+ var path5 = __require("path");
1660
1660
  var fs3 = require_fs();
1661
1661
  var { pathExists } = require_path_exists();
1662
1662
  var u = require_universalify().fromPromise;
1663
1663
  async function symlinkPaths(srcpath, dstpath) {
1664
- if (path9.isAbsolute(srcpath)) {
1664
+ if (path5.isAbsolute(srcpath)) {
1665
1665
  try {
1666
1666
  await fs3.lstat(srcpath);
1667
1667
  } catch (err) {
@@ -1673,8 +1673,8 @@ var require_symlink_paths = __commonJS({
1673
1673
  toDst: srcpath
1674
1674
  };
1675
1675
  }
1676
- const dstdir = path9.dirname(dstpath);
1677
- const relativeToDst = path9.join(dstdir, srcpath);
1676
+ const dstdir = path5.dirname(dstpath);
1677
+ const relativeToDst = path5.join(dstdir, srcpath);
1678
1678
  const exists = await pathExists(relativeToDst);
1679
1679
  if (exists) {
1680
1680
  return {
@@ -1690,11 +1690,11 @@ var require_symlink_paths = __commonJS({
1690
1690
  }
1691
1691
  return {
1692
1692
  toCwd: srcpath,
1693
- toDst: path9.relative(dstdir, srcpath)
1693
+ toDst: path5.relative(dstdir, srcpath)
1694
1694
  };
1695
1695
  }
1696
1696
  function symlinkPathsSync(srcpath, dstpath) {
1697
- if (path9.isAbsolute(srcpath)) {
1697
+ if (path5.isAbsolute(srcpath)) {
1698
1698
  const exists2 = fs3.existsSync(srcpath);
1699
1699
  if (!exists2) throw new Error("absolute srcpath does not exist");
1700
1700
  return {
@@ -1702,8 +1702,8 @@ var require_symlink_paths = __commonJS({
1702
1702
  toDst: srcpath
1703
1703
  };
1704
1704
  }
1705
- const dstdir = path9.dirname(dstpath);
1706
- const relativeToDst = path9.join(dstdir, srcpath);
1705
+ const dstdir = path5.dirname(dstpath);
1706
+ const relativeToDst = path5.join(dstdir, srcpath);
1707
1707
  const exists = fs3.existsSync(relativeToDst);
1708
1708
  if (exists) {
1709
1709
  return {
@@ -1715,7 +1715,7 @@ var require_symlink_paths = __commonJS({
1715
1715
  if (!srcExists) throw new Error("relative srcpath does not exist");
1716
1716
  return {
1717
1717
  toCwd: srcpath,
1718
- toDst: path9.relative(dstdir, srcpath)
1718
+ toDst: path5.relative(dstdir, srcpath)
1719
1719
  };
1720
1720
  }
1721
1721
  module.exports = {
@@ -1763,7 +1763,7 @@ var require_symlink = __commonJS({
1763
1763
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module) {
1764
1764
  "use strict";
1765
1765
  var u = require_universalify().fromPromise;
1766
- var path9 = __require("path");
1766
+ var path5 = __require("path");
1767
1767
  var fs3 = require_fs();
1768
1768
  var { mkdirs, mkdirsSync } = require_mkdirs();
1769
1769
  var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
@@ -1786,7 +1786,7 @@ var require_symlink = __commonJS({
1786
1786
  const relative = await symlinkPaths(srcpath, dstpath);
1787
1787
  srcpath = relative.toDst;
1788
1788
  const toType = await symlinkType(relative.toCwd, type);
1789
- const dir = path9.dirname(dstpath);
1789
+ const dir = path5.dirname(dstpath);
1790
1790
  if (!await pathExists(dir)) {
1791
1791
  await mkdirs(dir);
1792
1792
  }
@@ -1806,7 +1806,7 @@ var require_symlink = __commonJS({
1806
1806
  const relative = symlinkPathsSync(srcpath, dstpath);
1807
1807
  srcpath = relative.toDst;
1808
1808
  type = symlinkTypeSync(relative.toCwd, type);
1809
- const dir = path9.dirname(dstpath);
1809
+ const dir = path5.dirname(dstpath);
1810
1810
  const exists = fs3.existsSync(dir);
1811
1811
  if (exists) return fs3.symlinkSync(srcpath, dstpath, type);
1812
1812
  mkdirsSync(dir);
@@ -1897,7 +1897,7 @@ var require_jsonfile = __commonJS({
1897
1897
  return obj;
1898
1898
  }
1899
1899
  var readFile = universalify.fromPromise(_readFile);
1900
- function readFileSync2(file4, options = {}) {
1900
+ function readFileSync(file4, options = {}) {
1901
1901
  if (typeof options === "string") {
1902
1902
  options = { encoding: options };
1903
1903
  }
@@ -1929,7 +1929,7 @@ var require_jsonfile = __commonJS({
1929
1929
  }
1930
1930
  var jsonfile = {
1931
1931
  readFile,
1932
- readFileSync: readFileSync2,
1932
+ readFileSync,
1933
1933
  writeFile,
1934
1934
  writeFileSync
1935
1935
  };
@@ -1958,18 +1958,18 @@ var require_output_file = __commonJS({
1958
1958
  "use strict";
1959
1959
  var u = require_universalify().fromPromise;
1960
1960
  var fs3 = require_fs();
1961
- var path9 = __require("path");
1961
+ var path5 = __require("path");
1962
1962
  var mkdir = require_mkdirs();
1963
1963
  var pathExists = require_path_exists().pathExists;
1964
1964
  async function outputFile(file4, data, encoding = "utf-8") {
1965
- const dir = path9.dirname(file4);
1965
+ const dir = path5.dirname(file4);
1966
1966
  if (!await pathExists(dir)) {
1967
1967
  await mkdir.mkdirs(dir);
1968
1968
  }
1969
1969
  return fs3.writeFile(file4, data, encoding);
1970
1970
  }
1971
1971
  function outputFileSync(file4, ...args) {
1972
- const dir = path9.dirname(file4);
1972
+ const dir = path5.dirname(file4);
1973
1973
  if (!fs3.existsSync(dir)) {
1974
1974
  mkdir.mkdirsSync(dir);
1975
1975
  }
@@ -2033,7 +2033,7 @@ var require_move = __commonJS({
2033
2033
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move.js"(exports, module) {
2034
2034
  "use strict";
2035
2035
  var fs3 = require_fs();
2036
- var path9 = __require("path");
2036
+ var path5 = __require("path");
2037
2037
  var { copy } = require_copy2();
2038
2038
  var { remove } = require_remove();
2039
2039
  var { mkdirp } = require_mkdirs();
@@ -2043,8 +2043,8 @@ var require_move = __commonJS({
2043
2043
  const overwrite = opts.overwrite || opts.clobber || false;
2044
2044
  const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
2045
2045
  await stat.checkParentPaths(src, srcStat, dest, "move");
2046
- const destParent = path9.dirname(dest);
2047
- const parsedParentPath = path9.parse(destParent);
2046
+ const destParent = path5.dirname(dest);
2047
+ const parsedParentPath = path5.parse(destParent);
2048
2048
  if (parsedParentPath.root !== destParent) {
2049
2049
  await mkdirp(destParent);
2050
2050
  }
@@ -2085,7 +2085,7 @@ var require_move_sync = __commonJS({
2085
2085
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module) {
2086
2086
  "use strict";
2087
2087
  var fs3 = require_graceful_fs();
2088
- var path9 = __require("path");
2088
+ var path5 = __require("path");
2089
2089
  var copySync = require_copy2().copySync;
2090
2090
  var removeSync = require_remove().removeSync;
2091
2091
  var mkdirpSync = require_mkdirs().mkdirpSync;
@@ -2095,12 +2095,12 @@ var require_move_sync = __commonJS({
2095
2095
  const overwrite = opts.overwrite || opts.clobber || false;
2096
2096
  const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
2097
2097
  stat.checkParentPathsSync(src, srcStat, dest, "move");
2098
- if (!isParentRoot(dest)) mkdirpSync(path9.dirname(dest));
2098
+ if (!isParentRoot(dest)) mkdirpSync(path5.dirname(dest));
2099
2099
  return doRename(src, dest, overwrite, isChangingCase);
2100
2100
  }
2101
2101
  function isParentRoot(dest) {
2102
- const parent = path9.dirname(dest);
2103
- const parsedPath = path9.parse(parent);
2102
+ const parent = path5.dirname(dest);
2103
+ const parsedPath = path5.parse(parent);
2104
2104
  return parsedPath.root === parent;
2105
2105
  }
2106
2106
  function doRename(src, dest, overwrite, isChangingCase) {
@@ -2166,547 +2166,6 @@ var require_lib = __commonJS({
2166
2166
  }
2167
2167
  });
2168
2168
 
2169
- // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
2170
- var require_windows = __commonJS({
2171
- "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module) {
2172
- "use strict";
2173
- module.exports = isexe;
2174
- isexe.sync = sync;
2175
- var fs3 = __require("fs");
2176
- function checkPathExt(path9, options) {
2177
- var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
2178
- if (!pathext) {
2179
- return true;
2180
- }
2181
- pathext = pathext.split(";");
2182
- if (pathext.indexOf("") !== -1) {
2183
- return true;
2184
- }
2185
- for (var i = 0; i < pathext.length; i++) {
2186
- var p = pathext[i].toLowerCase();
2187
- if (p && path9.substr(-p.length).toLowerCase() === p) {
2188
- return true;
2189
- }
2190
- }
2191
- return false;
2192
- }
2193
- function checkStat(stat, path9, options) {
2194
- if (!stat.isSymbolicLink() && !stat.isFile()) {
2195
- return false;
2196
- }
2197
- return checkPathExt(path9, options);
2198
- }
2199
- function isexe(path9, options, cb) {
2200
- fs3.stat(path9, function(er, stat) {
2201
- cb(er, er ? false : checkStat(stat, path9, options));
2202
- });
2203
- }
2204
- function sync(path9, options) {
2205
- return checkStat(fs3.statSync(path9), path9, options);
2206
- }
2207
- }
2208
- });
2209
-
2210
- // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
2211
- var require_mode = __commonJS({
2212
- "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module) {
2213
- "use strict";
2214
- module.exports = isexe;
2215
- isexe.sync = sync;
2216
- var fs3 = __require("fs");
2217
- function isexe(path9, options, cb) {
2218
- fs3.stat(path9, function(er, stat) {
2219
- cb(er, er ? false : checkStat(stat, options));
2220
- });
2221
- }
2222
- function sync(path9, options) {
2223
- return checkStat(fs3.statSync(path9), options);
2224
- }
2225
- function checkStat(stat, options) {
2226
- return stat.isFile() && checkMode(stat, options);
2227
- }
2228
- function checkMode(stat, options) {
2229
- var mod = stat.mode;
2230
- var uid = stat.uid;
2231
- var gid = stat.gid;
2232
- var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid();
2233
- var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid();
2234
- var u = parseInt("100", 8);
2235
- var g = parseInt("010", 8);
2236
- var o = parseInt("001", 8);
2237
- var ug = u | g;
2238
- var ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0;
2239
- return ret;
2240
- }
2241
- }
2242
- });
2243
-
2244
- // ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
2245
- var require_isexe = __commonJS({
2246
- "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module) {
2247
- "use strict";
2248
- var fs3 = __require("fs");
2249
- var core;
2250
- if (process.platform === "win32" || global.TESTING_WINDOWS) {
2251
- core = require_windows();
2252
- } else {
2253
- core = require_mode();
2254
- }
2255
- module.exports = isexe;
2256
- isexe.sync = sync;
2257
- function isexe(path9, options, cb) {
2258
- if (typeof options === "function") {
2259
- cb = options;
2260
- options = {};
2261
- }
2262
- if (!cb) {
2263
- if (typeof Promise !== "function") {
2264
- throw new TypeError("callback not provided");
2265
- }
2266
- return new Promise(function(resolve, reject) {
2267
- isexe(path9, options || {}, function(er, is) {
2268
- if (er) {
2269
- reject(er);
2270
- } else {
2271
- resolve(is);
2272
- }
2273
- });
2274
- });
2275
- }
2276
- core(path9, options || {}, function(er, is) {
2277
- if (er) {
2278
- if (er.code === "EACCES" || options && options.ignoreErrors) {
2279
- er = null;
2280
- is = false;
2281
- }
2282
- }
2283
- cb(er, is);
2284
- });
2285
- }
2286
- function sync(path9, options) {
2287
- try {
2288
- return core.sync(path9, options || {});
2289
- } catch (er) {
2290
- if (options && options.ignoreErrors || er.code === "EACCES") {
2291
- return false;
2292
- } else {
2293
- throw er;
2294
- }
2295
- }
2296
- }
2297
- }
2298
- });
2299
-
2300
- // ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
2301
- var require_which = __commonJS({
2302
- "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module) {
2303
- "use strict";
2304
- var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
2305
- var path9 = __require("path");
2306
- var COLON = isWindows ? ";" : ":";
2307
- var isexe = require_isexe();
2308
- var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
2309
- var getPathInfo = (cmd, opt) => {
2310
- const colon = opt.colon || COLON;
2311
- const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [
2312
- // windows always checks the cwd first
2313
- ...isWindows ? [process.cwd()] : [],
2314
- ...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */
2315
- "").split(colon)
2316
- ];
2317
- const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
2318
- const pathExt = isWindows ? pathExtExe.split(colon) : [""];
2319
- if (isWindows) {
2320
- if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
2321
- pathExt.unshift("");
2322
- }
2323
- return {
2324
- pathEnv,
2325
- pathExt,
2326
- pathExtExe
2327
- };
2328
- };
2329
- var which = (cmd, opt, cb) => {
2330
- if (typeof opt === "function") {
2331
- cb = opt;
2332
- opt = {};
2333
- }
2334
- if (!opt)
2335
- opt = {};
2336
- const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
2337
- const found = [];
2338
- const step = (i) => new Promise((resolve, reject) => {
2339
- if (i === pathEnv.length)
2340
- return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
2341
- const ppRaw = pathEnv[i];
2342
- const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
2343
- const pCmd = path9.join(pathPart, cmd);
2344
- const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
2345
- resolve(subStep(p, i, 0));
2346
- });
2347
- const subStep = (p, i, ii) => new Promise((resolve, reject) => {
2348
- if (ii === pathExt.length)
2349
- return resolve(step(i + 1));
2350
- const ext = pathExt[ii];
2351
- isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
2352
- if (!er && is) {
2353
- if (opt.all)
2354
- found.push(p + ext);
2355
- else
2356
- return resolve(p + ext);
2357
- }
2358
- return resolve(subStep(p, i, ii + 1));
2359
- });
2360
- });
2361
- return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
2362
- };
2363
- var whichSync = (cmd, opt) => {
2364
- opt = opt || {};
2365
- const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
2366
- const found = [];
2367
- for (let i = 0; i < pathEnv.length; i++) {
2368
- const ppRaw = pathEnv[i];
2369
- const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
2370
- const pCmd = path9.join(pathPart, cmd);
2371
- const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
2372
- for (let j = 0; j < pathExt.length; j++) {
2373
- const cur = p + pathExt[j];
2374
- try {
2375
- const is = isexe.sync(cur, { pathExt: pathExtExe });
2376
- if (is) {
2377
- if (opt.all)
2378
- found.push(cur);
2379
- else
2380
- return cur;
2381
- }
2382
- } catch (ex) {
2383
- }
2384
- }
2385
- }
2386
- if (opt.all && found.length)
2387
- return found;
2388
- if (opt.nothrow)
2389
- return null;
2390
- throw getNotFoundError(cmd);
2391
- };
2392
- module.exports = which;
2393
- which.sync = whichSync;
2394
- }
2395
- });
2396
-
2397
- // ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
2398
- var require_path_key = __commonJS({
2399
- "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports, module) {
2400
- "use strict";
2401
- var pathKey2 = (options = {}) => {
2402
- const environment = options.env || process.env;
2403
- const platform = options.platform || process.platform;
2404
- if (platform !== "win32") {
2405
- return "PATH";
2406
- }
2407
- return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
2408
- };
2409
- module.exports = pathKey2;
2410
- module.exports.default = pathKey2;
2411
- }
2412
- });
2413
-
2414
- // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
2415
- var require_resolveCommand = __commonJS({
2416
- "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
2417
- "use strict";
2418
- var path9 = __require("path");
2419
- var which = require_which();
2420
- var getPathKey = require_path_key();
2421
- function resolveCommandAttempt(parsed, withoutPathExt) {
2422
- const env = parsed.options.env || process.env;
2423
- const cwd = process.cwd();
2424
- const hasCustomCwd = parsed.options.cwd != null;
2425
- const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
2426
- if (shouldSwitchCwd) {
2427
- try {
2428
- process.chdir(parsed.options.cwd);
2429
- } catch (err) {
2430
- }
2431
- }
2432
- let resolved;
2433
- try {
2434
- resolved = which.sync(parsed.command, {
2435
- path: env[getPathKey({ env })],
2436
- pathExt: withoutPathExt ? path9.delimiter : void 0
2437
- });
2438
- } catch (e) {
2439
- } finally {
2440
- if (shouldSwitchCwd) {
2441
- process.chdir(cwd);
2442
- }
2443
- }
2444
- if (resolved) {
2445
- resolved = path9.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
2446
- }
2447
- return resolved;
2448
- }
2449
- function resolveCommand(parsed) {
2450
- return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
2451
- }
2452
- module.exports = resolveCommand;
2453
- }
2454
- });
2455
-
2456
- // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
2457
- var require_escape = __commonJS({
2458
- "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports, module) {
2459
- "use strict";
2460
- var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
2461
- function escapeCommand(arg) {
2462
- arg = arg.replace(metaCharsRegExp, "^$1");
2463
- return arg;
2464
- }
2465
- function escapeArgument(arg, doubleEscapeMetaChars) {
2466
- arg = `${arg}`;
2467
- arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"');
2468
- arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
2469
- arg = `"${arg}"`;
2470
- arg = arg.replace(metaCharsRegExp, "^$1");
2471
- if (doubleEscapeMetaChars) {
2472
- arg = arg.replace(metaCharsRegExp, "^$1");
2473
- }
2474
- return arg;
2475
- }
2476
- module.exports.command = escapeCommand;
2477
- module.exports.argument = escapeArgument;
2478
- }
2479
- });
2480
-
2481
- // ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
2482
- var require_shebang_regex = __commonJS({
2483
- "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports, module) {
2484
- "use strict";
2485
- module.exports = /^#!(.*)/;
2486
- }
2487
- });
2488
-
2489
- // ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
2490
- var require_shebang_command = __commonJS({
2491
- "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports, module) {
2492
- "use strict";
2493
- var shebangRegex = require_shebang_regex();
2494
- module.exports = (string = "") => {
2495
- const match2 = string.match(shebangRegex);
2496
- if (!match2) {
2497
- return null;
2498
- }
2499
- const [path9, argument] = match2[0].replace(/#! ?/, "").split(" ");
2500
- const binary = path9.split("/").pop();
2501
- if (binary === "env") {
2502
- return argument;
2503
- }
2504
- return argument ? `${binary} ${argument}` : binary;
2505
- };
2506
- }
2507
- });
2508
-
2509
- // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
2510
- var require_readShebang = __commonJS({
2511
- "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
2512
- "use strict";
2513
- var fs3 = __require("fs");
2514
- var shebangCommand = require_shebang_command();
2515
- function readShebang(command) {
2516
- const size = 150;
2517
- const buffer = Buffer.alloc(size);
2518
- let fd;
2519
- try {
2520
- fd = fs3.openSync(command, "r");
2521
- fs3.readSync(fd, buffer, 0, size, 0);
2522
- fs3.closeSync(fd);
2523
- } catch (e) {
2524
- }
2525
- return shebangCommand(buffer.toString());
2526
- }
2527
- module.exports = readShebang;
2528
- }
2529
- });
2530
-
2531
- // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
2532
- var require_parse = __commonJS({
2533
- "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports, module) {
2534
- "use strict";
2535
- var path9 = __require("path");
2536
- var resolveCommand = require_resolveCommand();
2537
- var escape = require_escape();
2538
- var readShebang = require_readShebang();
2539
- var isWin = process.platform === "win32";
2540
- var isExecutableRegExp = /\.(?:com|exe)$/i;
2541
- var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
2542
- function detectShebang(parsed) {
2543
- parsed.file = resolveCommand(parsed);
2544
- const shebang = parsed.file && readShebang(parsed.file);
2545
- if (shebang) {
2546
- parsed.args.unshift(parsed.file);
2547
- parsed.command = shebang;
2548
- return resolveCommand(parsed);
2549
- }
2550
- return parsed.file;
2551
- }
2552
- function parseNonShell(parsed) {
2553
- if (!isWin) {
2554
- return parsed;
2555
- }
2556
- const commandFile = detectShebang(parsed);
2557
- const needsShell = !isExecutableRegExp.test(commandFile);
2558
- if (parsed.options.forceShell || needsShell) {
2559
- const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
2560
- parsed.command = path9.normalize(parsed.command);
2561
- parsed.command = escape.command(parsed.command);
2562
- parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
2563
- const shellCommand = [parsed.command].concat(parsed.args).join(" ");
2564
- parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`];
2565
- parsed.command = process.env.comspec || "cmd.exe";
2566
- parsed.options.windowsVerbatimArguments = true;
2567
- }
2568
- return parsed;
2569
- }
2570
- function parse(command, args, options) {
2571
- if (args && !Array.isArray(args)) {
2572
- options = args;
2573
- args = null;
2574
- }
2575
- args = args ? args.slice(0) : [];
2576
- options = Object.assign({}, options);
2577
- const parsed = {
2578
- command,
2579
- args,
2580
- options,
2581
- file: void 0,
2582
- original: {
2583
- command,
2584
- args
2585
- }
2586
- };
2587
- return options.shell ? parsed : parseNonShell(parsed);
2588
- }
2589
- module.exports = parse;
2590
- }
2591
- });
2592
-
2593
- // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
2594
- var require_enoent = __commonJS({
2595
- "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(exports, module) {
2596
- "use strict";
2597
- var isWin = process.platform === "win32";
2598
- function notFoundError(original, syscall) {
2599
- return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
2600
- code: "ENOENT",
2601
- errno: "ENOENT",
2602
- syscall: `${syscall} ${original.command}`,
2603
- path: original.command,
2604
- spawnargs: original.args
2605
- });
2606
- }
2607
- function hookChildProcess(cp, parsed) {
2608
- if (!isWin) {
2609
- return;
2610
- }
2611
- const originalEmit = cp.emit;
2612
- cp.emit = function(name, arg1) {
2613
- if (name === "exit") {
2614
- const err = verifyENOENT(arg1, parsed);
2615
- if (err) {
2616
- return originalEmit.call(cp, "error", err);
2617
- }
2618
- }
2619
- return originalEmit.apply(cp, arguments);
2620
- };
2621
- }
2622
- function verifyENOENT(status, parsed) {
2623
- if (isWin && status === 1 && !parsed.file) {
2624
- return notFoundError(parsed.original, "spawn");
2625
- }
2626
- return null;
2627
- }
2628
- function verifyENOENTSync(status, parsed) {
2629
- if (isWin && status === 1 && !parsed.file) {
2630
- return notFoundError(parsed.original, "spawnSync");
2631
- }
2632
- return null;
2633
- }
2634
- module.exports = {
2635
- hookChildProcess,
2636
- verifyENOENT,
2637
- verifyENOENTSync,
2638
- notFoundError
2639
- };
2640
- }
2641
- });
2642
-
2643
- // ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
2644
- var require_cross_spawn = __commonJS({
2645
- "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports, module) {
2646
- "use strict";
2647
- var cp = __require("child_process");
2648
- var parse = require_parse();
2649
- var enoent = require_enoent();
2650
- function spawn(command, args, options) {
2651
- const parsed = parse(command, args, options);
2652
- const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
2653
- enoent.hookChildProcess(spawned, parsed);
2654
- return spawned;
2655
- }
2656
- function spawnSync(command, args, options) {
2657
- const parsed = parse(command, args, options);
2658
- const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
2659
- result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
2660
- return result;
2661
- }
2662
- module.exports = spawn;
2663
- module.exports.spawn = spawn;
2664
- module.exports.sync = spawnSync;
2665
- module.exports._parse = parse;
2666
- module.exports._enoent = enoent;
2667
- }
2668
- });
2669
-
2670
- // ../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js
2671
- var require_merge_stream = __commonJS({
2672
- "../../node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js"(exports, module) {
2673
- "use strict";
2674
- var { PassThrough } = __require("stream");
2675
- module.exports = function() {
2676
- var sources = [];
2677
- var output = new PassThrough({ objectMode: true });
2678
- output.setMaxListeners(0);
2679
- output.add = add;
2680
- output.isEmpty = isEmpty;
2681
- output.on("unpipe", remove);
2682
- Array.prototype.slice.call(arguments).forEach(add);
2683
- return output;
2684
- function add(source) {
2685
- if (Array.isArray(source)) {
2686
- source.forEach(add);
2687
- return this;
2688
- }
2689
- sources.push(source);
2690
- source.once("end", remove.bind(null, source));
2691
- source.once("error", output.emit.bind(output, "error"));
2692
- source.pipe(output, { end: false });
2693
- return this;
2694
- }
2695
- function isEmpty() {
2696
- return sources.length == 0;
2697
- }
2698
- function remove(source) {
2699
- sources = sources.filter(function(it) {
2700
- return it !== source;
2701
- });
2702
- if (!sources.length && output.readable) {
2703
- output.end();
2704
- }
2705
- }
2706
- };
2707
- }
2708
- });
2709
-
2710
2169
  // src/externalToInternalDmmf.ts
2711
2170
  import { capitalize, uncapitalize } from "@prisma/client-common";
2712
2171
  import pluralize from "pluralize";
@@ -2754,18 +2213,9 @@ function getMappings(mappings, datamodel) {
2754
2213
 
2755
2214
  // src/generateClient.ts
2756
2215
  var import_fs_extra = __toESM(require_lib());
2757
- import { Debug } from "@prisma/debug";
2758
- import { overwriteFile } from "@prisma/fetch-engine";
2759
- import {
2760
- assertNever as assertNever3,
2761
- ClientEngineType as ClientEngineType3,
2762
- getClientEngineType as getClientEngineType2,
2763
- pathToPosix as pathToPosix4,
2764
- setClassName
2765
- } from "@prisma/internals";
2216
+ import { pathToPosix, setClassName } from "@prisma/internals";
2766
2217
  import { createHash } from "crypto";
2767
2218
  import paths from "env-paths";
2768
- import { existsSync } from "fs";
2769
2219
  import fs from "fs/promises";
2770
2220
 
2771
2221
  // ../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs
@@ -2818,7 +2268,7 @@ var bgWhite = init(47, 49);
2818
2268
 
2819
2269
  // src/generateClient.ts
2820
2270
  import { packageUp } from "package-up";
2821
- import path3 from "path";
2271
+ import path from "path";
2822
2272
 
2823
2273
  // ../client/package.json
2824
2274
  var package_default = {
@@ -2850,8 +2300,7 @@ var package_default = {
2850
2300
  "MSSQL",
2851
2301
  "SQL Server",
2852
2302
  "SQLServer",
2853
- "MongoDB",
2854
- "react-native"
2303
+ "MongoDB"
2855
2304
  ],
2856
2305
  main: "default.js",
2857
2306
  types: "default.d.ts",
@@ -2877,18 +2326,6 @@ var package_default = {
2877
2326
  },
2878
2327
  default: "./default.js"
2879
2328
  },
2880
- "./edge": {
2881
- types: "./edge.d.ts",
2882
- require: "./edge.js",
2883
- import: "./edge.js",
2884
- default: "./edge.js"
2885
- },
2886
- "./react-native": {
2887
- types: "./react-native.d.ts",
2888
- require: "./react-native.js",
2889
- import: "./react-native.js",
2890
- default: "./react-native.js"
2891
- },
2892
2329
  "./extension": {
2893
2330
  types: "./extension.d.ts",
2894
2331
  require: "./extension.js",
@@ -2907,11 +2344,11 @@ var package_default = {
2907
2344
  import: "./index.js",
2908
2345
  default: "./index.js"
2909
2346
  },
2910
- "./wasm": {
2911
- types: "./wasm.d.ts",
2912
- require: "./wasm.js",
2913
- import: "./wasm.mjs",
2914
- default: "./wasm.mjs"
2347
+ "./edge": {
2348
+ types: "./edge.d.ts",
2349
+ require: "./edge.js",
2350
+ import: "./edge.js",
2351
+ default: "./edge.js"
2915
2352
  },
2916
2353
  "./runtime/client": {
2917
2354
  types: "./runtime/client.d.ts",
@@ -2923,42 +2360,12 @@ var package_default = {
2923
2360
  import: "./runtime/client.mjs",
2924
2361
  default: "./runtime/client.mjs"
2925
2362
  },
2926
- "./runtime/library": {
2927
- types: "./runtime/library.d.ts",
2928
- require: "./runtime/library.js",
2929
- import: "./runtime/library.mjs",
2930
- default: "./runtime/library.mjs"
2931
- },
2932
- "./runtime/binary": {
2933
- types: "./runtime/binary.d.ts",
2934
- require: "./runtime/binary.js",
2935
- import: "./runtime/binary.mjs",
2936
- default: "./runtime/binary.mjs"
2937
- },
2938
- "./runtime/wasm-engine-edge": {
2939
- types: "./runtime/wasm-engine-edge.d.ts",
2940
- require: "./runtime/wasm-engine-edge.js",
2941
- import: "./runtime/wasm-engine-edge.mjs",
2942
- default: "./runtime/wasm-engine-edge.mjs"
2943
- },
2944
2363
  "./runtime/wasm-compiler-edge": {
2945
2364
  types: "./runtime/wasm-compiler-edge.d.ts",
2946
2365
  require: "./runtime/wasm-compiler-edge.js",
2947
2366
  import: "./runtime/wasm-compiler-edge.mjs",
2948
2367
  default: "./runtime/wasm-compiler-edge.mjs"
2949
2368
  },
2950
- "./runtime/edge": {
2951
- types: "./runtime/edge.d.ts",
2952
- require: "./runtime/edge.js",
2953
- import: "./runtime/edge-esm.js",
2954
- default: "./runtime/edge-esm.js"
2955
- },
2956
- "./runtime/react-native": {
2957
- types: "./runtime/react-native.d.ts",
2958
- require: "./runtime/react-native.js",
2959
- import: "./runtime/react-native.js",
2960
- default: "./runtime/react-native.js"
2961
- },
2962
2369
  "./runtime/index-browser": {
2963
2370
  types: "./runtime/index-browser.d.ts",
2964
2371
  require: "./runtime/index-browser.js",
@@ -2987,7 +2394,7 @@ var package_default = {
2987
2394
  },
2988
2395
  license: "Apache-2.0",
2989
2396
  engines: {
2990
- node: ">=18.18"
2397
+ node: "^20.19 || ^22.12 || >=24.0"
2991
2398
  },
2992
2399
  homepage: "https://www.prisma.io",
2993
2400
  repository: {
@@ -3003,13 +2410,11 @@ var package_default = {
3003
2410
  test: "dotenv -e ../../.db.env -- jest --silent",
3004
2411
  "test:e2e": "dotenv -e ../../.db.env -- tsx tests/e2e/_utils/run.ts",
3005
2412
  "test:functional": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts",
3006
- "test:functional:client": "pnpm run test:functional --client-runtime client --engine-type client",
2413
+ "test:functional:client": "pnpm run test:functional --client-runtime client",
3007
2414
  "test:memory": "dotenv -e ../../.db.env -- tsx helpers/memory-tests.ts",
3008
2415
  "test:functional:code": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --no-types",
3009
2416
  "test:functional:types": "dotenv -e ../../.db.env -- tsx helpers/functional-test/run-tests.ts --types-only",
3010
2417
  "test-notypes": "dotenv -e ../../.db.env -- jest --testPathIgnorePatterns src/__tests__/types/types.test.ts",
3011
- generate: "node scripts/postinstall.js",
3012
- postinstall: "node scripts/postinstall.js",
3013
2418
  prepublishOnly: "pnpm run build",
3014
2419
  "new-test": "tsx ./helpers/new-test/new-test.ts"
3015
2420
  },
@@ -3020,12 +2425,8 @@ var package_default = {
3020
2425
  "generator-build",
3021
2426
  "edge.js",
3022
2427
  "edge.d.ts",
3023
- "wasm.js",
3024
- "wasm.d.ts",
3025
2428
  "index.js",
3026
2429
  "index.d.ts",
3027
- "react-native.js",
3028
- "react-native.d.ts",
3029
2430
  "default.js",
3030
2431
  "default.d.ts",
3031
2432
  "index-browser.js",
@@ -3036,7 +2437,7 @@ var package_default = {
3036
2437
  "sql.mjs"
3037
2438
  ],
3038
2439
  devDependencies: {
3039
- "@cloudflare/workers-types": "^4.20250408.0",
2440
+ "@cloudflare/workers-types": "^4.20251014.0",
3040
2441
  "@codspeed/benchmark.js-plugin": "4.0.0",
3041
2442
  "@faker-js/faker": "9.6.0",
3042
2443
  "@fast-check/jest": "2.0.3",
@@ -3071,18 +2472,20 @@ var package_default = {
3071
2472
  "@prisma/dmmf": "workspace:*",
3072
2473
  "@prisma/driver-adapter-utils": "workspace:*",
3073
2474
  "@prisma/engines": "workspace:*",
3074
- "@prisma/engines-version": "7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7",
2475
+ "@prisma/engines-version": "7.3.0-10.fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521",
3075
2476
  "@prisma/fetch-engine": "workspace:*",
3076
2477
  "@prisma/generator": "workspace:*",
3077
2478
  "@prisma/generator-helper": "workspace:*",
3078
2479
  "@prisma/get-platform": "workspace:*",
3079
2480
  "@prisma/instrumentation": "workspace:*",
2481
+ "@prisma/instrumentation-contract": "workspace:*",
3080
2482
  "@prisma/internals": "workspace:*",
2483
+ "@prisma/json-protocol": "workspace:*",
3081
2484
  "@prisma/migrate": "workspace:*",
3082
- "@prisma/mini-proxy": "0.9.5",
3083
- "@prisma/query-compiler-wasm": "7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7",
3084
- "@prisma/query-engine-wasm": "6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773",
2485
+ "@prisma/query-compiler-wasm": "7.3.0-10.fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521",
3085
2486
  "@prisma/query-plan-executor": "workspace:*",
2487
+ "@prisma/sqlcommenter": "workspace:*",
2488
+ "@prisma/sqlcommenter-trace-context": "workspace:*",
3086
2489
  "@prisma/ts-builders": "workspace:*",
3087
2490
  "@snaplet/copycat": "6.0.0",
3088
2491
  "@swc-node/register": "1.10.9",
@@ -3094,12 +2497,11 @@ var package_default = {
3094
2497
  "@types/jest": "29.5.14",
3095
2498
  "@types/js-levenshtein": "1.1.3",
3096
2499
  "@types/mssql": "9.1.8",
3097
- "@types/node": "18.19.76",
2500
+ "@types/node": "~20.19.24",
3098
2501
  "@types/pg": "8.11.11",
3099
2502
  arg: "5.0.2",
3100
2503
  benchmark: "2.1.4",
3101
2504
  "cookie-es": "2.0.0",
3102
- "decimal.js": "10.5.0",
3103
2505
  execa: "8.0.1",
3104
2506
  "expect-type": "1.2.2",
3105
2507
  "fs-extra": "11.3.0",
@@ -3124,7 +2526,6 @@ var package_default = {
3124
2526
  "simple-statistics": "7.8.8",
3125
2527
  "sort-keys": "5.1.0",
3126
2528
  "source-map-support": "0.5.21",
3127
- "sql-template-tag": "5.2.1",
3128
2529
  "stacktrace-parser": "0.1.11",
3129
2530
  "strip-ansi": "7.1.0",
3130
2531
  "strip-indent": "4.0.0",
@@ -3135,9 +2536,12 @@ var package_default = {
3135
2536
  undici: "7.4.0",
3136
2537
  zx: "8.4.1"
3137
2538
  },
2539
+ dependencies: {
2540
+ "@prisma/client-runtime-utils": "workspace:*"
2541
+ },
3138
2542
  peerDependencies: {
3139
2543
  prisma: "*",
3140
- typescript: ">=5.1.0"
2544
+ typescript: ">=5.4.0"
3141
2545
  },
3142
2546
  peerDependenciesMeta: {
3143
2547
  prisma: {
@@ -3182,7 +2586,7 @@ var Enum = class {
3182
2586
  toJS() {
3183
2587
  const { type } = this;
3184
2588
  const enumVariants = `{
3185
- ${indent(type.values.map((v) => `${v}: ${this.getValueJS(v)}`).join(",\n"), TAB_SIZE)}
2589
+ ${indent(type.data.map((v) => `${v.key}: ${this.getValueJS(v.value)}`).join(",\n"), TAB_SIZE)}
3186
2590
  }`;
3187
2591
  const enumBody = this.isStrictEnum() ? `makeStrictEnum(${enumVariants})` : enumVariants;
3188
2592
  return this.useNamespace ? `exports.Prisma.${type.name} = ${enumBody};` : `exports.${type.name} = exports.$Enums.${type.name} = ${enumBody};`;
@@ -3193,7 +2597,7 @@ ${indent(type.values.map((v) => `${v}: ${this.getValueJS(v)}`).join(",\n"), TAB_
3193
2597
  toTS() {
3194
2598
  const { type } = this;
3195
2599
  return `export const ${type.name}: {
3196
- ${indent(type.values.map((v) => `${v}: ${this.getValueTS(v)}`).join(",\n"), TAB_SIZE)}
2600
+ ${indent(type.data.map((v) => `${v.key}: ${this.getValueTS(v.value)}`).join(",\n"), TAB_SIZE)}
3197
2601
  };
3198
2602
 
3199
2603
  export type ${type.name} = (typeof ${type.name})[keyof typeof ${type.name}]
@@ -4919,13 +4323,9 @@ function fluentWrapperName(modelName) {
4919
4323
  }
4920
4324
 
4921
4325
  // src/TSClient/TSClient.ts
4922
- import { datamodelEnumToSchemaEnum } from "@prisma/dmmf";
4923
- import { ClientEngineType as ClientEngineType2, getClientEngineType, pathToPosix as pathToPosix3 } from "@prisma/internals";
4326
+ import { datamodelEnumToSchemaEnum, datamodelSchemaEnumToSchemaEnum } from "@prisma/dmmf";
4924
4327
  import * as ts12 from "@prisma/ts-builders";
4925
- import ciInfo from "ci-info";
4926
- import crypto from "crypto";
4927
- import indent8 from "indent-string";
4928
- import path2 from "path";
4328
+ import indent7 from "indent-string";
4929
4329
 
4930
4330
  // src/dmmf.ts
4931
4331
  import { keyBy } from "@prisma/client-common";
@@ -5120,90 +4520,27 @@ var GenericArgsInfo = class {
5120
4520
  }
5121
4521
  };
5122
4522
 
5123
- // src/utils/buildInjectableEdgeEnv.ts
5124
- function buildInjectableEdgeEnv(edge, datasources) {
5125
- if (edge === true) {
5126
- return declareInjectableEdgeEnv(datasources);
5127
- }
5128
- return ``;
5129
- }
5130
- function declareInjectableEdgeEnv(datasources) {
5131
- const injectableEdgeEnv = { parsed: {} };
5132
- const envVarNames = getSelectedEnvVarNames(datasources);
5133
- for (const envVarName of envVarNames) {
5134
- injectableEdgeEnv.parsed[envVarName] = getRuntimeEdgeEnvVar(envVarName);
5135
- }
5136
- const injectableEdgeEnvJson = JSON.stringify(injectableEdgeEnv, null, 2);
5137
- const injectableEdgeEnvCode = injectableEdgeEnvJson.replace(/"/g, "");
5138
- return `
5139
- config.injectableEdgeEnv = () => (${injectableEdgeEnvCode})`;
5140
- }
5141
- function getSelectedEnvVarNames(datasources) {
5142
- return datasources.reduce((acc, datasource) => {
5143
- if (datasource.url.fromEnvVar) {
5144
- return [...acc, datasource.url.fromEnvVar];
5145
- }
5146
- return acc;
5147
- }, []);
5148
- }
5149
- function getRuntimeEdgeEnvVar(envVarName) {
5150
- const cfwEnv = `typeof globalThis !== 'undefined' && globalThis['${envVarName}']`;
5151
- const nodeOrVercelEnv = `typeof process !== 'undefined' && process.env && process.env.${envVarName}`;
5152
- return `${cfwEnv} || ${nodeOrVercelEnv} || undefined`;
5153
- }
5154
-
5155
4523
  // src/utils/buildDebugInitialization.ts
5156
4524
  function buildDebugInitialization(edge) {
5157
4525
  if (!edge) {
5158
4526
  return "";
5159
4527
  }
5160
- const debugVar = getRuntimeEdgeEnvVar("DEBUG");
4528
+ const debugVar = `typeof globalThis !== 'undefined' && globalThis['DEBUG'] || (typeof process !== 'undefined' && process.env && process.env.DEBUG) || undefined`;
5161
4529
  return `if (${debugVar}) {
5162
4530
  Debug.enable(${debugVar})
5163
4531
  }
5164
4532
  `;
5165
4533
  }
5166
4534
 
5167
- // src/utils/buildDirname.ts
5168
- import { pathToPosix } from "@prisma/internals";
5169
- function buildDirname(edge, relativeOutdir) {
5170
- if (edge === true) {
5171
- return buildDirnameDefault();
5172
- }
5173
- return buildDirnameFind(relativeOutdir);
5174
- }
5175
- function buildDirnameFind(relativeOutdir) {
5176
- return `
5177
- const fs = require('fs')
5178
-
5179
- config.dirname = __dirname
5180
- if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) {
5181
- const alternativePaths = [
5182
- ${JSON.stringify(pathToPosix(relativeOutdir))},
5183
- ${JSON.stringify(pathToPosix(relativeOutdir).split("/").slice(1).join("/"))},
5184
- ]
5185
-
5186
- const alternativePath = alternativePaths.find((altPath) => {
5187
- return fs.existsSync(path.join(process.cwd(), altPath, 'schema.prisma'))
5188
- }) ?? alternativePaths[0]
5189
-
5190
- config.dirname = path.join(process.cwd(), alternativePath)
5191
- config.isBundled = true
5192
- }`;
5193
- }
5194
- function buildDirnameDefault() {
5195
- return `config.dirname = '/'`;
5196
- }
5197
-
5198
4535
  // src/utils/buildDMMF.ts
5199
4536
  import {
5200
4537
  dmmfToRuntimeDataModel,
5201
4538
  pruneRuntimeDataModel
5202
4539
  } from "@prisma/client-common";
5203
- function buildRuntimeDataModel(datamodel, runtimeNameJs) {
4540
+ function buildRuntimeDataModel(datamodel, runtimeName) {
5204
4541
  const runtimeDataModel = dmmfToRuntimeDataModel(datamodel);
5205
4542
  let prunedDataModel;
5206
- if (runtimeNameJs === "wasm-engine-edge" || runtimeNameJs === "wasm-compiler-edge" || runtimeNameJs === "client") {
4543
+ if (runtimeName === "wasm-compiler-edge" || runtimeName === "client") {
5207
4544
  prunedDataModel = pruneRuntimeDataModel(runtimeDataModel);
5208
4545
  } else {
5209
4546
  prunedDataModel = runtimeDataModel;
@@ -5215,115 +4552,35 @@ defineDmmfProperty(exports.Prisma, config.runtimeDataModel)`;
5215
4552
  }
5216
4553
 
5217
4554
  // src/utils/buildGetQueryCompilerWasmModule.ts
5218
- function buildQueryCompilerWasmModule(forceEdgeWasmLoader, runtimeNameJs) {
5219
- if (runtimeNameJs === "client" && !forceEdgeWasmLoader) {
4555
+ function buildQueryCompilerWasmModule(forceEdgeWasmLoader, runtimeName, compilerBuild) {
4556
+ const artifactName = `query_compiler_${compilerBuild}_bg`;
4557
+ if (runtimeName === "client" && !forceEdgeWasmLoader) {
5220
4558
  return `config.compilerWasm = {
5221
- getRuntime: async () => require('./query_compiler_bg.js'),
4559
+ getRuntime: async () => require('./${artifactName}.js'),
5222
4560
  getQueryCompilerWasmModule: async () => {
5223
- const queryCompilerWasmFilePath = require('path').join(config.dirname, 'query_compiler_bg.wasm')
5224
- const queryCompilerWasmFileBytes = require('fs').readFileSync(queryCompilerWasmFilePath)
4561
+ const { Buffer } = require('node:buffer')
4562
+ const { wasm } = require('./${artifactName}.wasm-base64.js')
4563
+ const queryCompilerWasmFileBytes = Buffer.from(wasm, 'base64')
5225
4564
 
5226
4565
  return new WebAssembly.Module(queryCompilerWasmFileBytes)
5227
- }
4566
+ },
4567
+ importName: './${artifactName}.js',
5228
4568
  }`;
5229
4569
  }
5230
- if (runtimeNameJs === "client" && forceEdgeWasmLoader || runtimeNameJs === "wasm-compiler-edge") {
4570
+ if (runtimeName === "client" && forceEdgeWasmLoader || runtimeName === "wasm-compiler-edge") {
5231
4571
  return `config.compilerWasm = {
5232
- getRuntime: async () => require('./query_compiler_bg.js'),
4572
+ getRuntime: async () => require('./${artifactName}.js'),
5233
4573
  getQueryCompilerWasmModule: async () => {
5234
4574
  const loader = (await import('#wasm-compiler-loader')).default
5235
4575
  const compiler = (await loader).default
5236
4576
  return compiler
5237
- }
4577
+ },
4578
+ importName: './${artifactName}.js',
5238
4579
  }`;
5239
4580
  }
5240
4581
  return `config.compilerWasm = undefined`;
5241
4582
  }
5242
4583
 
5243
- // src/utils/buildGetQueryEngineWasmModule.ts
5244
- function buildQueryEngineWasmModule(wasm, copyEngine, runtimeNameJs) {
5245
- if (copyEngine && runtimeNameJs === "library" && process.env.PRISMA_CLIENT_FORCE_WASM) {
5246
- return `config.engineWasm = {
5247
- getRuntime: async () => require('./query_engine_bg.js'),
5248
- getQueryEngineWasmModule: async () => {
5249
- const queryEngineWasmFilePath = require('path').join(config.dirname, 'query_engine_bg.wasm')
5250
- const queryEngineWasmFileBytes = require('fs').readFileSync(queryEngineWasmFilePath)
5251
-
5252
- return new WebAssembly.Module(queryEngineWasmFileBytes)
5253
- }
5254
- }`;
5255
- }
5256
- if (copyEngine && wasm === true && runtimeNameJs === "wasm-engine-edge") {
5257
- return `config.engineWasm = {
5258
- getRuntime: async () => require('./query_engine_bg.js'),
5259
- getQueryEngineWasmModule: async () => {
5260
- const loader = (await import('#wasm-engine-loader')).default
5261
- const engine = (await loader).default
5262
- return engine
5263
- }
5264
- }`;
5265
- }
5266
- return `config.engineWasm = undefined`;
5267
- }
5268
-
5269
- // src/utils/buildInlineDatasources.ts
5270
- function buildInlineDatasources(datasources) {
5271
- return datasources.reduce((acc, ds) => {
5272
- return acc[ds.name] = buildInlineDatasource(ds), acc;
5273
- }, {});
5274
- }
5275
- function buildInlineDatasource(ds) {
5276
- if (ds.url.fromEnvVar) {
5277
- return { url: { fromEnvVar: ds.url.fromEnvVar, value: null } };
5278
- } else {
5279
- return { url: { fromEnvVar: null, value: ds.url.value } };
5280
- }
5281
- }
5282
-
5283
- // src/utils/buildNFTAnnotations.ts
5284
- import { getNodeAPIName } from "@prisma/get-platform";
5285
- import { ClientEngineType, parseAWSNodejsRuntimeEnvVarVersion, pathToPosix as pathToPosix2 } from "@prisma/internals";
5286
- import path from "path";
5287
- function buildNFTAnnotations(noEngine, engineType, binaryTargets, relativeOutdir) {
5288
- if (noEngine === true) return "";
5289
- if (binaryTargets === void 0) {
5290
- return "";
5291
- }
5292
- if (process.env.NETLIFY) {
5293
- const isNodeMajor20OrUp = parseInt(process.versions.node.split(".")[0]) >= 20;
5294
- const awsRuntimeVersion = parseAWSNodejsRuntimeEnvVarVersion();
5295
- const isRuntimeEnvVar20OrUp = awsRuntimeVersion && awsRuntimeVersion >= 20;
5296
- const isRuntimeEnvVar18OrDown = awsRuntimeVersion && awsRuntimeVersion <= 18;
5297
- if ((isNodeMajor20OrUp || isRuntimeEnvVar20OrUp) && !isRuntimeEnvVar18OrDown) {
5298
- binaryTargets = ["rhel-openssl-3.0.x"];
5299
- } else {
5300
- binaryTargets = ["rhel-openssl-1.0.x"];
5301
- }
5302
- }
5303
- const engineAnnotations = binaryTargets.map((binaryTarget) => {
5304
- const engineFilename = getQueryEngineFilename(engineType, binaryTarget);
5305
- return engineFilename ? buildNFTAnnotation(engineFilename, relativeOutdir) : "";
5306
- }).join("\n");
5307
- const schemaAnnotations = buildNFTAnnotation("schema.prisma", relativeOutdir);
5308
- return `${engineAnnotations}${schemaAnnotations}`;
5309
- }
5310
- function getQueryEngineFilename(engineType, binaryTarget) {
5311
- if (engineType === ClientEngineType.Library) {
5312
- return getNodeAPIName(binaryTarget, "fs");
5313
- }
5314
- if (engineType === ClientEngineType.Binary) {
5315
- return `query-engine-${binaryTarget}`;
5316
- }
5317
- return void 0;
5318
- }
5319
- function buildNFTAnnotation(fileName, relativeOutdir) {
5320
- const relativeFilePath = path.join(relativeOutdir, fileName);
5321
- return `
5322
- // file annotations for bundling tools to include these files
5323
- path.join(__dirname, ${JSON.stringify(pathToPosix2(fileName))});
5324
- path.join(process.cwd(), ${JSON.stringify(pathToPosix2(relativeFilePath))})`;
5325
- }
5326
-
5327
4584
  // src/utils/buildRequirePath.ts
5328
4585
  function buildRequirePath(edge) {
5329
4586
  if (edge === true) return "";
@@ -5331,23 +4588,11 @@ function buildRequirePath(edge) {
5331
4588
  const path = require('path')`;
5332
4589
  }
5333
4590
 
5334
- // src/utils/buildWarnEnvConflicts.ts
5335
- function buildWarnEnvConflicts(edge, runtimeBase, runtimeNameJs) {
5336
- if (edge === true) return "";
5337
- return `
5338
- const { warnEnvConflicts } = require('${runtimeBase}/${runtimeNameJs}.js')
5339
-
5340
- warnEnvConflicts({
5341
- rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath),
5342
- schemaEnvPath: config.relativeEnvPaths.schemaEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.schemaEnvPath)
5343
- })`;
5344
- }
5345
-
5346
4591
  // src/TSClient/common.ts
5347
4592
  import indent4 from "indent-string";
5348
4593
  var commonCodeJS = ({
5349
4594
  runtimeBase,
5350
- runtimeNameJs,
4595
+ runtimeName,
5351
4596
  browser,
5352
4597
  clientVersion,
5353
4598
  engineVersion,
@@ -5357,12 +4602,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
5357
4602
  ${browser ? `
5358
4603
  const {
5359
4604
  Decimal,
5360
- objectEnumValues,
4605
+ DbNull,
4606
+ JsonNull,
4607
+ AnyNull,
4608
+ NullTypes,
5361
4609
  makeStrictEnum,
5362
4610
  Public,
5363
4611
  getRuntime,
5364
4612
  skip
5365
- } = require('${runtimeBase}/${runtimeNameJs}.js')
4613
+ } = require('${runtimeBase}/${runtimeName}.js')
5366
4614
  ` : `
5367
4615
  const {
5368
4616
  PrismaClientKnownRequestError,
@@ -5378,7 +4626,10 @@ const {
5378
4626
  skip,
5379
4627
  Decimal,
5380
4628
  Debug,
5381
- objectEnumValues,
4629
+ DbNull,
4630
+ JsonNull,
4631
+ AnyNull,
4632
+ NullTypes,
5382
4633
  makeStrictEnum,
5383
4634
  Extensions,
5384
4635
  warnOnce,
@@ -5386,7 +4637,7 @@ const {
5386
4637
  Public,
5387
4638
  getRuntime,
5388
4639
  createParam,
5389
- } = require('${runtimeBase}/${runtimeNameJs}.js')
4640
+ } = require('${runtimeBase}/${runtimeName}.js')
5390
4641
  `}
5391
4642
 
5392
4643
  const Prisma = {}
@@ -5428,15 +4679,11 @@ Prisma.defineExtension = ${notSupportOnBrowser("Extensions.defineExtension", bro
5428
4679
  /**
5429
4680
  * Shorthand utilities for JSON filtering
5430
4681
  */
5431
- Prisma.DbNull = objectEnumValues.instances.DbNull
5432
- Prisma.JsonNull = objectEnumValues.instances.JsonNull
5433
- Prisma.AnyNull = objectEnumValues.instances.AnyNull
4682
+ Prisma.DbNull = DbNull
4683
+ Prisma.JsonNull = JsonNull
4684
+ Prisma.AnyNull = AnyNull
5434
4685
 
5435
- Prisma.NullTypes = {
5436
- DbNull: objectEnumValues.classes.DbNull,
5437
- JsonNull: objectEnumValues.classes.JsonNull,
5438
- AnyNull: objectEnumValues.classes.AnyNull
5439
- }
4686
+ Prisma.NullTypes = NullTypes
5440
4687
 
5441
4688
  ${buildPrismaSkipJs(generator.previewFeatures)}
5442
4689
  `;
@@ -5452,12 +4699,12 @@ In case this error is unexpected for you, please report it in https://pris.ly/pr
5452
4699
  };
5453
4700
  var commonCodeTS = ({
5454
4701
  runtimeBase,
5455
- runtimeNameTs,
4702
+ runtimeName,
5456
4703
  clientVersion,
5457
4704
  engineVersion,
5458
4705
  generator
5459
4706
  }) => ({
5460
- tsWithoutNamespace: () => `import * as runtime from '${runtimeBase}/${runtimeNameTs}';
4707
+ tsWithoutNamespace: () => `import * as runtime from '${runtimeBase}/${runtimeName}.js';
5461
4708
  import $Types = runtime.Types // general types
5462
4709
  import $Public = runtime.Types.Public
5463
4710
  import $Utils = runtime.Types.Utils
@@ -5502,14 +4749,6 @@ export import Decimal = runtime.Decimal
5502
4749
 
5503
4750
  export type DecimalJsLike = runtime.DecimalJsLike
5504
4751
 
5505
- /**
5506
- * Metrics
5507
- */
5508
- export type Metrics = runtime.Metrics
5509
- export type Metric<T> = runtime.Metric<T>
5510
- export type MetricHistogram = runtime.MetricHistogram
5511
- export type MetricHistogramBucket = runtime.MetricHistogramBucket
5512
-
5513
4752
  /**
5514
4753
  * Extensions
5515
4754
  */
@@ -5526,6 +4765,7 @@ export import Exact = $Public.Exact
5526
4765
  */
5527
4766
  export type PrismaVersion = {
5528
4767
  client: string
4768
+ engine: string
5529
4769
  }
5530
4770
 
5531
4771
  export const prismaVersion: PrismaVersion
@@ -5991,45 +5231,33 @@ var GenerateContext = class {
5991
5231
  dmmf;
5992
5232
  genericArgsInfo;
5993
5233
  generator;
5994
- constructor({ dmmf, genericArgsInfo, generator }) {
5234
+ provider;
5235
+ constructor({ dmmf, genericArgsInfo, generator, provider }) {
5995
5236
  this.dmmf = dmmf;
5996
5237
  this.genericArgsInfo = genericArgsInfo;
5997
5238
  this.generator = generator;
5239
+ this.provider = provider;
5998
5240
  }
5999
5241
  isPreviewFeatureOn(previewFeature) {
6000
5242
  return this.generator?.previewFeatures?.includes(previewFeature) ?? false;
6001
5243
  }
5244
+ isSqlProvider() {
5245
+ return this.provider !== "mongodb";
5246
+ }
6002
5247
  };
6003
5248
 
6004
5249
  // src/TSClient/PrismaClient.ts
6005
5250
  import { capitalize as capitalize7, uncapitalize as uncapitalize7 } from "@prisma/client-common";
6006
5251
  import { assertNever as assertNever2 } from "@prisma/internals";
6007
5252
  import * as ts11 from "@prisma/ts-builders";
6008
- import indent7 from "indent-string";
5253
+ import indent6 from "indent-string";
6009
5254
 
6010
5255
  // src/utils/runtimeImport.ts
6011
5256
  import * as ts9 from "@prisma/ts-builders";
6012
- function runtimeImport(name) {
6013
- return name;
6014
- }
6015
5257
  function runtimeImportedType(name) {
6016
5258
  return ts9.namedType(`runtime.${name}`);
6017
5259
  }
6018
5260
 
6019
- // src/TSClient/Datasources.ts
6020
- import indent6 from "indent-string";
6021
- var Datasources = class {
6022
- constructor(internalDatasources) {
6023
- this.internalDatasources = internalDatasources;
6024
- }
6025
- toTS() {
6026
- const sources = this.internalDatasources;
6027
- return `export type Datasources = {
6028
- ${indent6(sources.map((s) => `${s.name}?: Datasource`).join("\n"), 2)}
6029
- }`;
6030
- }
6031
- };
6032
-
6033
5261
  // src/TSClient/globalOmit.ts
6034
5262
  import { uncapitalize as uncapitalize6 } from "@prisma/client-common";
6035
5263
  import * as ts10 from "@prisma/ts-builders";
@@ -6210,7 +5438,7 @@ function queryRawDefinition(context) {
6210
5438
  * const result = await prisma.$queryRaw\`SELECT * FROM User WHERE id = \${1} OR email = \${'user@email.com'};\`
6211
5439
  * \`\`\`
6212
5440
  *
6213
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
5441
+ * Read more in our [docs](https://pris.ly/d/raw-queries).
6214
5442
  */
6215
5443
  $queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>;
6216
5444
 
@@ -6222,7 +5450,7 @@ function queryRawDefinition(context) {
6222
5450
  * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
6223
5451
  * \`\`\`
6224
5452
  *
6225
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
5453
+ * Read more in our [docs](https://pris.ly/d/raw-queries).
6226
5454
  */
6227
5455
  $queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>;`;
6228
5456
  }
@@ -6238,7 +5466,7 @@ function executeRawDefinition(context) {
6238
5466
  * const result = await prisma.$executeRaw\`UPDATE User SET cool = \${true} WHERE email = \${'user@email.com'};\`
6239
5467
  * \`\`\`
6240
5468
  *
6241
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
5469
+ * Read more in our [docs](https://pris.ly/d/raw-queries).
6242
5470
  */
6243
5471
  $executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>;
6244
5472
 
@@ -6250,7 +5478,7 @@ function executeRawDefinition(context) {
6250
5478
  * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
6251
5479
  * \`\`\`
6252
5480
  *
6253
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
5481
+ * Read more in our [docs](https://pris.ly/d/raw-queries).
6254
5482
  */
6255
5483
  $executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>;`;
6256
5484
  }
@@ -6280,26 +5508,8 @@ function queryRawTypedDefinition(context) {
6280
5508
  ).setReturnType(prismaPromise(ts11.array(param.toArgument())));
6281
5509
  return ts11.stringify(method3, { indentLevel: 1, newLine: "leading" });
6282
5510
  }
6283
- function metricDefinition(context) {
6284
- if (!context.isPreviewFeatureOn("metrics")) {
6285
- return "";
6286
- }
6287
- const property11 = ts11.property("$metrics", ts11.namedType(`runtime.${runtimeImport("MetricsClient")}`)).setDocComment(
6288
- ts11.docComment`
6289
- Gives access to the client metrics in json or prometheus format.
6290
-
6291
- @example
6292
- \`\`\`
6293
- const metrics = await prisma.$metrics.json()
6294
- // or
6295
- const metrics = await prisma.$metrics.prometheus()
6296
- \`\`\`
6297
- `
6298
- ).readonly();
6299
- return ts11.stringify(property11, { indentLevel: 1, newLine: "leading" });
6300
- }
6301
- function runCommandRawDefinition(context) {
6302
- if (!context.dmmf.mappings.otherOperations.write.includes("runCommandRaw")) {
5511
+ function runCommandRawDefinition(context) {
5512
+ if (!context.dmmf.mappings.otherOperations.write.includes("runCommandRaw")) {
6303
5513
  return "";
6304
5514
  }
6305
5515
  const method3 = ts11.method("$runCommandRaw").addParameter(ts11.parameter("command", ts11.namedType("Prisma.InputJsonObject"))).setReturnType(prismaPromise(ts11.namedType("Prisma.JsonObject"))).setDocComment(ts11.docComment`
@@ -6313,32 +5523,16 @@ function runCommandRawDefinition(context) {
6313
5523
  })
6314
5524
  \`\`\`
6315
5525
 
6316
- Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
5526
+ Read more in our [docs](https://pris.ly/d/raw-queries).
6317
5527
  `);
6318
5528
  return ts11.stringify(method3, { indentLevel: 1, newLine: "leading" });
6319
5529
  }
6320
- function applyPendingMigrationsDefinition() {
6321
- if (this.runtimeNameTs !== "react-native") {
6322
- return null;
6323
- }
6324
- const method3 = ts11.method("$applyPendingMigrations").setReturnType(promise(ts11.voidType)).setDocComment(
6325
- ts11.docComment`Tries to apply pending migrations one by one. If a migration fails to apply, the function will stop and throw an error. You are responsible for informing the user and possibly blocking the app as we cannot guarantee the state of the database.`
6326
- );
6327
- return ts11.stringify(method3, { indentLevel: 1, newLine: "leading" });
6328
- }
6329
- function eventRegistrationMethodDeclaration(runtimeNameTs) {
6330
- if (runtimeNameTs === "binary.js") {
6331
- return `$on<V extends (U | 'beforeExit')>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : V extends 'beforeExit' ? () => $Utils.JsPromise<void> : Prisma.LogEvent) => void): PrismaClient;`;
6332
- } else {
6333
- return `$on<V extends U>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;`;
6334
- }
6335
- }
6336
5530
  var PrismaClientClass = class {
6337
- constructor(context, internalDatasources, outputDir, runtimeNameTs, browser) {
5531
+ constructor(context, internalDatasources, outputDir, runtimeName, browser) {
6338
5532
  this.context = context;
6339
5533
  this.internalDatasources = internalDatasources;
6340
5534
  this.outputDir = outputDir;
6341
- this.runtimeNameTs = runtimeNameTs;
5535
+ this.runtimeName = runtimeName;
6342
5536
  this.browser = browser;
6343
5537
  }
6344
5538
  get jsDoc() {
@@ -6364,7 +5558,7 @@ var PrismaClientClass = class {
6364
5558
  * \`\`\`
6365
5559
  *
6366
5560
  *
6367
- * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
5561
+ * Read more in our [docs](https://pris.ly/d/client).
6368
5562
  */`;
6369
5563
  }
6370
5564
  toTSWithoutNamespace() {
@@ -6377,10 +5571,10 @@ export class PrismaClient<
6377
5571
  > {
6378
5572
  [K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }
6379
5573
 
6380
- ${indent7(this.jsDoc, TAB_SIZE)}
5574
+ ${indent6(this.jsDoc, TAB_SIZE)}
6381
5575
 
6382
5576
  constructor(optionsArg ?: Prisma.Subset<ClientOptions, Prisma.PrismaClientOptions>);
6383
- ${eventRegistrationMethodDeclaration(this.runtimeNameTs)}
5577
+ $on<V extends U>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;
6384
5578
 
6385
5579
  /**
6386
5580
  * Connect with the database
@@ -6399,12 +5593,10 @@ ${[
6399
5593
  batchingTransactionDefinition(this.context),
6400
5594
  interactiveTransactionDefinition(this.context),
6401
5595
  runCommandRawDefinition(this.context),
6402
- metricDefinition(this.context),
6403
- applyPendingMigrationsDefinition.bind(this)(),
6404
5596
  extendsPropertyDefinition()
6405
5597
  ].filter((d) => d !== null).join("\n").trim()}
6406
5598
 
6407
- ${indent7(
5599
+ ${indent6(
6408
5600
  dmmf.mappings.modelOperations.filter((m) => m.findMany).map((m) => {
6409
5601
  let methodName = uncapitalize7(m.model);
6410
5602
  if (methodName === "constructor") {
@@ -6427,8 +5619,7 @@ get ${methodName}(): Prisma.${m.model}Delegate<${generics.join(", ")}>;`;
6427
5619
  }
6428
5620
  toTS() {
6429
5621
  const clientOptions = this.buildClientOptions();
6430
- return `${new Datasources(this.internalDatasources).toTS()}
6431
- ${clientExtensionsDefinitions(this.context)}
5622
+ return `${clientExtensionsDefinitions(this.context)}
6432
5623
  export type DefaultPrismaClient = PrismaClient
6433
5624
  export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
6434
5625
  ${ts11.stringify(ts11.moduleExport(clientOptions))}
@@ -6501,10 +5692,6 @@ export type TransactionClient = Omit<Prisma.DefaultPrismaClient, runtime.ITXClie
6501
5692
  }
6502
5693
  buildClientOptions() {
6503
5694
  const clientOptions = ts11.interfaceDeclaration("PrismaClientOptions").add(
6504
- ts11.property("datasources", ts11.namedType("Datasources")).optional().setDocComment(ts11.docComment("Overwrites the datasource url from your schema.prisma file"))
6505
- ).add(
6506
- ts11.property("datasourceUrl", ts11.stringType).optional().setDocComment(ts11.docComment("Overwrites the datasource url from your schema.prisma file"))
6507
- ).add(
6508
5695
  ts11.property("errorFormat", ts11.namedType("ErrorFormat")).optional().setDocComment(ts11.docComment('@default "colorless"'))
6509
5696
  ).add(
6510
5697
  ts11.property("log", ts11.array(ts11.unionType([ts11.namedType("LogLevel"), ts11.namedType("LogDefinition")]))).optional().setDocComment(ts11.docComment`
@@ -6529,7 +5716,7 @@ export type TransactionClient = Omit<Prisma.DefaultPrismaClient, runtime.ITXClie
6529
5716
  { emit: 'stdout', level: 'error' }
6530
5717
  ]
6531
5718
  \`\`\`
6532
- Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option).
5719
+ Read more in our [docs](https://pris.ly/d/logging).
6533
5720
  `)
6534
5721
  );
6535
5722
  const transactionOptions = ts11.objectType().add(ts11.property("maxWait", ts11.numberType).optional()).add(ts11.property("timeout", ts11.numberType).optional());
@@ -6543,14 +5730,23 @@ export type TransactionClient = Omit<Prisma.DefaultPrismaClient, runtime.ITXClie
6543
5730
  timeout ?= 5000
6544
5731
  `)
6545
5732
  );
6546
- if (["library.js", "client.js"].includes(this.runtimeNameTs) && // We don't support a custom adapter with MongoDB for now.
6547
- this.internalDatasources.some((d) => d.provider !== "mongodb")) {
5733
+ if (
5734
+ // We don't support a custom adapter with MongoDB for now.
5735
+ this.internalDatasources.some((d) => d.provider !== "mongodb")
5736
+ ) {
6548
5737
  clientOptions.add(
6549
- ts11.property("adapter", ts11.unionType([ts11.namedType("runtime.SqlDriverAdapterFactory"), ts11.namedType("null")])).optional().setDocComment(
5738
+ ts11.property("adapter", ts11.namedType("runtime.SqlDriverAdapterFactory")).optional().setDocComment(
6550
5739
  ts11.docComment("Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`")
6551
5740
  )
6552
5741
  );
6553
5742
  }
5743
+ clientOptions.add(
5744
+ ts11.property("accelerateUrl", ts11.stringType).optional().setDocComment(
5745
+ ts11.docComment(
5746
+ "Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database."
5747
+ )
5748
+ )
5749
+ );
6554
5750
  clientOptions.add(
6555
5751
  ts11.property("omit", ts11.namedType("Prisma.GlobalOmitConfig")).optional().setDocComment(ts11.docComment`
6556
5752
  Global configuration for omitting model fields by default.
@@ -6567,6 +5763,25 @@ export type TransactionClient = Omit<Prisma.DefaultPrismaClient, runtime.ITXClie
6567
5763
  \`\`\`
6568
5764
  `)
6569
5765
  );
5766
+ if (this.context.isSqlProvider()) {
5767
+ clientOptions.add(
5768
+ ts11.property("comments", ts11.array(ts11.namedType("runtime.SqlCommenterPlugin"))).optional().setDocComment(ts11.docComment`
5769
+ SQL commenter plugins that add metadata to SQL queries as comments.
5770
+ Comments follow the sqlcommenter format: https://google.github.io/sqlcommenter/
5771
+
5772
+ @example
5773
+ \`\`\`
5774
+ const prisma = new PrismaClient({
5775
+ adapter,
5776
+ comments: [
5777
+ traceContext(),
5778
+ queryInsights(),
5779
+ ],
5780
+ })
5781
+ \`\`\`
5782
+ `)
5783
+ );
5784
+ }
6570
5785
  return clientOptions;
6571
5786
  }
6572
5787
  };
@@ -6581,61 +5796,33 @@ var TSClient = class {
6581
5796
  dmmf;
6582
5797
  genericsInfo;
6583
5798
  toJS() {
6584
- const {
6585
- edge,
6586
- wasm,
6587
- binaryPaths,
6588
- generator,
6589
- outputDir,
6590
- datamodel: inlineSchema,
6591
- runtimeBase,
6592
- runtimeNameJs,
6593
- datasources,
6594
- copyEngine = true,
6595
- reusedJs,
6596
- envPaths
6597
- } = this.options;
5799
+ const { edge, wasm, generator, datamodel: inlineSchema, runtimeName, reusedJs, compilerBuild } = this.options;
6598
5800
  if (reusedJs) {
6599
5801
  return `module.exports = { ...require('${reusedJs}') }`;
6600
5802
  }
6601
- const relativeEnvPaths = {
6602
- rootEnvPath: envPaths.rootEnvPath && pathToPosix3(path2.relative(outputDir, envPaths.rootEnvPath)),
6603
- schemaEnvPath: envPaths.schemaEnvPath && pathToPosix3(path2.relative(outputDir, envPaths.schemaEnvPath))
6604
- };
6605
- const clientEngineType = getClientEngineType(generator);
6606
- generator.config.engineType = clientEngineType;
6607
- const binaryTargets = clientEngineType === ClientEngineType2.Library ? Object.keys(binaryPaths.libqueryEngine ?? {}) : Object.keys(binaryPaths.queryEngine ?? {});
6608
- const inlineSchemaHash = crypto.createHash("sha256").update(Buffer.from(inlineSchema, "utf8").toString("base64")).digest("hex");
6609
- const datasourceFilePath = datasources[0].sourceFilePath;
6610
5803
  const config = {
6611
- generator,
6612
- relativeEnvPaths,
6613
- relativePath: pathToPosix3(path2.relative(outputDir, path2.dirname(datasourceFilePath))),
5804
+ previewFeatures: generator.previewFeatures,
6614
5805
  clientVersion: this.options.clientVersion,
6615
5806
  engineVersion: this.options.engineVersion,
6616
- datasourceNames: datasources.map((d) => d.name),
6617
5807
  activeProvider: this.options.activeProvider,
6618
- postinstall: this.options.postinstall,
6619
- ciName: ciInfo.name ?? void 0,
6620
- inlineDatasources: buildInlineDatasources(datasources),
6621
- inlineSchema,
6622
- inlineSchemaHash,
6623
- copyEngine
5808
+ inlineSchema
6624
5809
  };
6625
- const relativeOutdir = path2.relative(process.cwd(), outputDir);
6626
5810
  const code = `${commonCodeJS({ ...this.options, browser: false })}
6627
5811
  ${buildRequirePath(edge)}
6628
5812
 
6629
5813
  /**
6630
5814
  * Enums
6631
5815
  */
6632
- ${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toJS()).join("\n\n")}
5816
+ ${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(datamodelSchemaEnumToSchemaEnum(type), true).toJS()).join("\n\n")}
6633
5817
  ${this.dmmf.datamodel.enums.map((datamodelEnum) => new Enum(datamodelEnumToSchemaEnum(datamodelEnum), false).toJS()).join("\n\n")}
6634
5818
 
6635
5819
  ${new Enum(
6636
5820
  {
6637
5821
  name: "ModelName",
6638
- values: this.dmmf.mappings.modelOperations.map((m) => m.model)
5822
+ data: this.dmmf.mappings.modelOperations.map((m) => ({
5823
+ key: m.model,
5824
+ value: m.model
5825
+ }))
6639
5826
  },
6640
5827
  true
6641
5828
  ).toJS()}
@@ -6643,17 +5830,12 @@ ${new Enum(
6643
5830
  * Create the Client
6644
5831
  */
6645
5832
  const config = ${JSON.stringify(config, null, 2)}
6646
- ${buildDirname(edge, relativeOutdir)}
6647
- ${buildRuntimeDataModel(this.dmmf.datamodel, runtimeNameJs)}
6648
- ${buildQueryEngineWasmModule(wasm, copyEngine, runtimeNameJs)}
6649
- ${buildQueryCompilerWasmModule(wasm, runtimeNameJs)}
6650
- ${buildInjectableEdgeEnv(edge, datasources)}
6651
- ${buildWarnEnvConflicts(edge, runtimeBase, runtimeNameJs)}
5833
+ ${buildRuntimeDataModel(this.dmmf.datamodel, runtimeName)}
5834
+ ${buildQueryCompilerWasmModule(wasm, runtimeName, compilerBuild)}
6652
5835
  ${buildDebugInitialization(edge)}
6653
5836
  const PrismaClient = getPrismaClient(config)
6654
5837
  exports.PrismaClient = PrismaClient
6655
5838
  Object.assign(exports, Prisma)
6656
- ${buildNFTAnnotations(edge || !copyEngine, clientEngineType, binaryTargets, relativeOutdir)}
6657
5839
  `;
6658
5840
  return code;
6659
5841
  }
@@ -6666,13 +5848,14 @@ ${buildNFTAnnotations(edge || !copyEngine, clientEngineType, binaryTargets, rela
6666
5848
  const context = new GenerateContext({
6667
5849
  dmmf: this.dmmf,
6668
5850
  genericArgsInfo: this.genericsInfo,
6669
- generator: this.options.generator
5851
+ generator: this.options.generator,
5852
+ provider: this.options.activeProvider
6670
5853
  });
6671
5854
  const prismaClientClass = new PrismaClientClass(
6672
5855
  context,
6673
5856
  this.options.datasources,
6674
5857
  this.options.outputDir,
6675
- this.options.runtimeNameTs,
5858
+ this.options.runtimeName,
6676
5859
  this.options.browser
6677
5860
  );
6678
5861
  const commonCode = commonCodeTS(this.options);
@@ -6682,7 +5865,9 @@ ${buildNFTAnnotations(edge || !copyEngine, clientEngineType, binaryTargets, rela
6682
5865
  }
6683
5866
  return acc;
6684
5867
  }, []);
6685
- const prismaEnums = this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
5868
+ const prismaEnums = this.dmmf.schema.enumTypes.prisma?.map(
5869
+ (type) => new Enum(datamodelSchemaEnumToSchemaEnum(type), true).toTS()
5870
+ );
6686
5871
  const modelEnums = [];
6687
5872
  const modelEnumsAliases = [];
6688
5873
  for (const datamodelEnum of this.dmmf.datamodel.enums) {
@@ -6719,12 +5904,15 @@ ${modelEnumsAliases.join("\n\n")}
6719
5904
  ${prismaClientClass.toTSWithoutNamespace()}
6720
5905
 
6721
5906
  export namespace Prisma {
6722
- ${indent8(
5907
+ ${indent7(
6723
5908
  `${commonCode.ts()}
6724
5909
  ${new Enum(
6725
5910
  {
6726
5911
  name: "ModelName",
6727
- values: this.dmmf.mappings.modelOperations.map((m) => m.model)
5912
+ data: this.dmmf.mappings.modelOperations.map((m) => ({
5913
+ key: m.model,
5914
+ value: m.model
5915
+ }))
6728
5916
  },
6729
5917
  true
6730
5918
  ).toTS()}
@@ -6801,20 +5989,23 @@ export const dmmf: runtime.BaseDMMF
6801
5989
  toBrowserJS() {
6802
5990
  const code = `${commonCodeJS({
6803
5991
  ...this.options,
6804
- runtimeNameJs: "index-browser",
5992
+ runtimeName: "index-browser",
6805
5993
  browser: true
6806
5994
  })}
6807
5995
  /**
6808
5996
  * Enums
6809
5997
  */
6810
5998
 
6811
- ${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toJS()).join("\n\n")}
6812
- ${this.dmmf.schema.enumTypes.model?.map((type) => new Enum(type, false).toJS()).join("\n\n") ?? ""}
5999
+ ${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(datamodelSchemaEnumToSchemaEnum(type), true).toJS()).join("\n\n")}
6000
+ ${this.dmmf.schema.enumTypes.model?.map((type) => new Enum(datamodelSchemaEnumToSchemaEnum(type), false).toJS()).join("\n\n") ?? ""}
6813
6001
 
6814
6002
  ${new Enum(
6815
6003
  {
6816
6004
  name: "ModelName",
6817
- values: this.dmmf.mappings.modelOperations.map((m) => m.model)
6005
+ data: this.dmmf.mappings.modelOperations.map((m) => ({
6006
+ key: m.model,
6007
+ value: m.model
6008
+ }))
6818
6009
  },
6819
6010
  true
6820
6011
  ).toJS()}
@@ -7152,7 +6343,6 @@ function addPreamble(fileContent) {
7152
6343
  }
7153
6344
 
7154
6345
  // src/generateClient.ts
7155
- var debug = Debug("prisma:client:generateClient");
7156
6346
  var DenylistError = class extends Error {
7157
6347
  constructor(message) {
7158
6348
  super(message);
@@ -7173,15 +6363,11 @@ async function buildClient({
7173
6363
  engineVersion,
7174
6364
  clientVersion,
7175
6365
  activeProvider,
7176
- postinstall,
7177
- copyEngine,
7178
- envPaths,
7179
- typedSql
6366
+ typedSql,
6367
+ compilerBuild
7180
6368
  }) {
7181
- const clientEngineType = getClientEngineType2(generator);
7182
6369
  const baseClientOptions = {
7183
6370
  dmmf: getPrismaClientDMMF(dmmf),
7184
- envPaths: envPaths ?? { rootEnvPath: null, schemaEnvPath: void 0 },
7185
6371
  datasources,
7186
6372
  generator,
7187
6373
  binaryPaths,
@@ -7192,17 +6378,15 @@ async function buildClient({
7192
6378
  clientVersion,
7193
6379
  engineVersion,
7194
6380
  activeProvider,
7195
- postinstall,
7196
- copyEngine,
7197
6381
  datamodel,
6382
+ compilerBuild,
7198
6383
  browser: false,
7199
6384
  edge: false,
7200
6385
  wasm: false
7201
6386
  };
7202
6387
  const nodeClientOptions = {
7203
6388
  ...baseClientOptions,
7204
- runtimeNameJs: getNodeRuntimeName(clientEngineType),
7205
- runtimeNameTs: `${getNodeRuntimeName(clientEngineType)}.js`
6389
+ runtimeName: "client"
7206
6390
  };
7207
6391
  const nodeClient = new TSClient(nodeClientOptions);
7208
6392
  const defaultClient = new TSClient({
@@ -7210,19 +6394,6 @@ async function buildClient({
7210
6394
  reusedTs: "index",
7211
6395
  reusedJs: "."
7212
6396
  });
7213
- const edgeClient = new TSClient({
7214
- ...baseClientOptions,
7215
- runtimeNameJs: "edge",
7216
- runtimeNameTs: "library.js",
7217
- reusedTs: "default",
7218
- edge: true
7219
- });
7220
- const rnTsClient = new TSClient({
7221
- ...baseClientOptions,
7222
- runtimeNameJs: "react-native",
7223
- runtimeNameTs: "react-native",
7224
- edge: true
7225
- });
7226
6397
  const trampolineTsClient = new TSClient({
7227
6398
  ...nodeClientOptions,
7228
6399
  reusedTs: "index",
@@ -7230,9 +6401,9 @@ async function buildClient({
7230
6401
  });
7231
6402
  const exportsMapBase = {
7232
6403
  node: "./index.js",
7233
- "edge-light": "./wasm.js",
7234
- workerd: "./wasm.js",
7235
- worker: "./wasm.js",
6404
+ "edge-light": "./edge.js",
6405
+ workerd: "./edge.js",
6406
+ worker: "./edge.js",
7236
6407
  browser: "./index-browser.js",
7237
6408
  default: "./index.js"
7238
6409
  };
@@ -7256,7 +6427,10 @@ async function buildClient({
7256
6427
  ".": exportsMapDefault
7257
6428
  },
7258
6429
  version: clientVersion,
7259
- sideEffects: false
6430
+ sideEffects: false,
6431
+ dependencies: {
6432
+ "@prisma/client-runtime-utils": clientVersion
6433
+ }
7260
6434
  };
7261
6435
  const fileMap = {};
7262
6436
  fileMap["index.js"] = JS(nodeClient);
@@ -7264,28 +6438,17 @@ async function buildClient({
7264
6438
  fileMap["default.js"] = JS(defaultClient);
7265
6439
  fileMap["default.d.ts"] = TS(defaultClient);
7266
6440
  fileMap["index-browser.js"] = BrowserJS(nodeClient);
7267
- fileMap["edge.js"] = JS(edgeClient);
7268
- fileMap["edge.d.ts"] = TS(edgeClient);
7269
6441
  fileMap["client.js"] = JS(defaultClient);
7270
6442
  fileMap["client.d.ts"] = TS(defaultClient);
7271
- if (generator.previewFeatures.includes("reactNative")) {
7272
- fileMap["react-native.js"] = JS(rnTsClient);
7273
- fileMap["react-native.d.ts"] = TS(rnTsClient);
7274
- }
7275
- const usesClientEngine = clientEngineType === ClientEngineType3.Client;
7276
6443
  fileMap["default.js"] = JS(trampolineTsClient);
7277
6444
  fileMap["default.d.ts"] = TS(trampolineTsClient);
7278
- if (usesClientEngine) {
7279
- fileMap["wasm-worker-loader.mjs"] = `export default import('./query_compiler_bg.wasm')`;
7280
- fileMap["wasm-edge-light-loader.mjs"] = `export default import('./query_compiler_bg.wasm?module')`;
7281
- } else {
7282
- fileMap["wasm-worker-loader.mjs"] = `export default import('./query_engine_bg.wasm')`;
7283
- fileMap["wasm-edge-light-loader.mjs"] = `export default import('./query_engine_bg.wasm?module')`;
7284
- }
6445
+ const qcArtifactName = `query_compiler_${compilerBuild}_bg`;
6446
+ fileMap["wasm-worker-loader.mjs"] = `export default import('./${qcArtifactName}.wasm')`;
6447
+ fileMap["wasm-edge-light-loader.mjs"] = `export default import('./${qcArtifactName}.wasm?module')`;
7285
6448
  pkgJson["browser"] = "default.js";
7286
6449
  pkgJson["imports"] = {
7287
- // when `import('#wasm-engine-loader')` or `import('#wasm-compiler-loader')` is called, it will be resolved to the correct file
7288
- [usesClientEngine ? "#wasm-compiler-loader" : "#wasm-engine-loader"]: {
6450
+ // when `import('#wasm-compiler-loader')` is called, it will be resolved to the correct file
6451
+ "#wasm-compiler-loader": {
7289
6452
  // Keys reference: https://runtime-keys.proposal.wintercg.org/#keys
7290
6453
  /**
7291
6454
  * Vercel Edge Functions / Next.js Middlewares
@@ -7310,16 +6473,15 @@ async function buildClient({
7310
6473
  };
7311
6474
  const wasmClient = new TSClient({
7312
6475
  ...baseClientOptions,
7313
- runtimeNameJs: usesClientEngine ? "wasm-compiler-edge" : "wasm-engine-edge",
7314
- runtimeNameTs: "library.js",
6476
+ runtimeName: "wasm-compiler-edge",
7315
6477
  reusedTs: "default",
7316
6478
  edge: true,
7317
6479
  wasm: true
7318
6480
  });
7319
- fileMap["wasm.js"] = JS(wasmClient);
7320
- fileMap["wasm.d.ts"] = TS(wasmClient);
6481
+ fileMap["edge.js"] = JS(wasmClient);
6482
+ fileMap["edge.d.ts"] = TS(wasmClient);
7321
6483
  if (typedSql && typedSql.length > 0) {
7322
- const edgeRuntimeName = usesClientEngine ? "wasm-compiler-edge" : "edge";
6484
+ const edgeRuntimeName = "wasm-compiler-edge";
7323
6485
  const cjsEdgeIndex = `./sql/index.${edgeRuntimeName}.js`;
7324
6486
  const esmEdgeIndex = `./sql/index.${edgeRuntimeName}.mjs`;
7325
6487
  pkgJson.exports["./sql"] = {
@@ -7344,7 +6506,7 @@ async function buildClient({
7344
6506
  fileMap["sql"] = buildTypedSql({
7345
6507
  dmmf,
7346
6508
  runtimeBase: getTypedSqlRuntimeBase(runtimeBase),
7347
- mainRuntimeName: getNodeRuntimeName(clientEngineType),
6509
+ mainRuntimeName: "client",
7348
6510
  queries: typedSql,
7349
6511
  edgeRuntimeName
7350
6512
  });
@@ -7367,20 +6529,11 @@ function getTypedSqlRuntimeBase(runtimeBase) {
7367
6529
  }
7368
6530
  return `../${runtimeBase}`;
7369
6531
  }
7370
- async function getDefaultOutdir(outputDir) {
7371
- if (outputDir.endsWith(path3.normalize("node_modules/@prisma/client"))) {
7372
- return path3.join(outputDir, "../../.prisma/client");
6532
+ function getDefaultOutdir(outputDir) {
6533
+ if (outputDir.endsWith(path.normalize("node_modules/@prisma/client"))) {
6534
+ return path.join(outputDir, "../../.prisma/client");
7373
6535
  }
7374
- if (process.env.INIT_CWD && process.env.npm_lifecycle_event === "postinstall" && !process.env.PWD?.includes(".pnpm")) {
7375
- if (existsSync(path3.join(process.env.INIT_CWD, "package.json"))) {
7376
- return path3.join(process.env.INIT_CWD, "node_modules/.prisma/client");
7377
- }
7378
- const packagePath = await packageUp({ cwd: process.env.INIT_CWD });
7379
- if (packagePath) {
7380
- return path3.join(path3.dirname(packagePath), "node_modules/.prisma/client");
7381
- }
7382
- }
7383
- return path3.join(outputDir, "../../.prisma/client");
6536
+ return path.join(outputDir, "../../.prisma/client");
7384
6537
  }
7385
6538
  async function generateClient(options) {
7386
6539
  const {
@@ -7397,12 +6550,9 @@ async function generateClient(options) {
7397
6550
  clientVersion,
7398
6551
  engineVersion,
7399
6552
  activeProvider,
7400
- postinstall,
7401
- envPaths,
7402
- copyEngine = true,
7403
- typedSql
6553
+ typedSql,
6554
+ compilerBuild
7404
6555
  } = options;
7405
- const clientEngineType = getClientEngineType2(generator);
7406
6556
  const { runtimeBase, outputDir } = await getGenerationDirs(options);
7407
6557
  const { prismaClientDmmf, fileMap } = await buildClient({
7408
6558
  datamodel,
@@ -7417,11 +6567,9 @@ async function generateClient(options) {
7417
6567
  clientVersion,
7418
6568
  engineVersion,
7419
6569
  activeProvider,
7420
- postinstall,
7421
- copyEngine,
7422
6570
  testMode,
7423
- envPaths,
7424
- typedSql
6571
+ typedSql,
6572
+ compilerBuild
7425
6573
  });
7426
6574
  const provider = datasources[0].provider;
7427
6575
  const denylistsErrors = validateDmmfAgainstDenylists(prismaClientDmmf);
@@ -7437,51 +6585,32 @@ async function generateClient(options) {
7437
6585
  To learn more about how to rename models, check out https://pris.ly/d/naming-models`;
7438
6586
  throw new DenylistError(message);
7439
6587
  }
7440
- if (!copyEngine) {
7441
- await deleteOutputDir(outputDir);
7442
- }
7443
6588
  await (0, import_fs_extra.ensureDir)(outputDir);
7444
6589
  await writeFileMap(outputDir, fileMap);
7445
6590
  if (copyRuntime || generator.isCustomOutput === true) {
7446
- const copiedRuntimeDir = path3.join(outputDir, "runtime");
6591
+ const copiedRuntimeDir = path.join(outputDir, "runtime");
7447
6592
  await (0, import_fs_extra.ensureDir)(copiedRuntimeDir);
7448
6593
  await copyRuntimeFiles({
7449
6594
  from: runtimeSourcePath,
7450
6595
  to: copiedRuntimeDir,
7451
6596
  sourceMaps: copyRuntimeSourceMaps,
7452
- runtimeName: getNodeRuntimeName(clientEngineType)
6597
+ runtimeName: "client"
7453
6598
  });
7454
6599
  }
7455
- const enginePath = clientEngineType === ClientEngineType3.Library ? binaryPaths.libqueryEngine : binaryPaths.queryEngine;
7456
- if (copyEngine && enginePath) {
7457
- if (process.env.NETLIFY) {
7458
- await (0, import_fs_extra.ensureDir)("/tmp/prisma-engines");
7459
- }
7460
- for (const [binaryTarget, filePath] of Object.entries(enginePath)) {
7461
- const fileName = path3.basename(filePath);
7462
- let target;
7463
- if (process.env.NETLIFY && !["rhel-openssl-1.0.x", "rhel-openssl-3.0.x"].includes(binaryTarget)) {
7464
- target = path3.join("/tmp/prisma-engines", fileName);
7465
- } else {
7466
- target = path3.join(outputDir, fileName);
7467
- }
7468
- await overwriteFile(filePath, target);
7469
- }
7470
- }
7471
- const schemaTargetPath = path3.join(outputDir, "schema.prisma");
6600
+ const schemaTargetPath = path.join(outputDir, "schema.prisma");
7472
6601
  await fs.writeFile(schemaTargetPath, datamodel, { encoding: "utf-8" });
7473
- const runtimeNeedsWasmEngine = clientEngineType === ClientEngineType3.Client || copyEngine;
7474
- if (runtimeNeedsWasmEngine && isWasmEngineSupported(provider) && !testMode) {
6602
+ if (isWasmEngineSupported(provider)) {
7475
6603
  const suffix = provider === "postgres" ? "postgresql" : provider;
7476
- const filename = clientEngineType === ClientEngineType3.Client ? "query_compiler_bg" : "query_engine_bg";
7477
- const wasmJsBundlePath = path3.join(runtimeSourcePath, `${filename}.${suffix}.wasm-base64.js`);
6604
+ const filename = `query_compiler_${compilerBuild}_bg`;
6605
+ const wasmJsBundlePath = path.join(runtimeSourcePath, `${filename}.${suffix}.wasm-base64.js`);
7478
6606
  const wasmBase64 = __require(wasmJsBundlePath).wasm;
7479
- await fs.writeFile(path3.join(outputDir, `${filename}.wasm`), Buffer.from(wasmBase64, "base64"));
7480
- await fs.copyFile(path3.join(runtimeSourcePath, `${filename}.${suffix}.js`), path3.join(outputDir, `${filename}.js`));
6607
+ await fs.writeFile(path.join(outputDir, `${filename}.wasm`), Buffer.from(wasmBase64, "base64"));
6608
+ await fs.copyFile(path.join(runtimeSourcePath, `${filename}.${suffix}.js`), path.join(outputDir, `${filename}.js`));
6609
+ await fs.copyFile(wasmJsBundlePath, path.join(outputDir, `${filename}.wasm-base64.js`));
7481
6610
  }
7482
6611
  try {
7483
6612
  const prismaCache = paths("prisma").cache;
7484
- const signalsPath = path3.join(prismaCache, "last-generate");
6613
+ const signalsPath = path.join(prismaCache, "last-generate");
7485
6614
  await fs.mkdir(prismaCache, { recursive: true });
7486
6615
  await fs.writeFile(signalsPath, Date.now().toString());
7487
6616
  } catch {
@@ -7490,7 +6619,7 @@ To learn more about how to rename models, check out https://pris.ly/d/naming-mod
7490
6619
  function writeFileMap(outputDir, fileMap) {
7491
6620
  return Promise.all(
7492
6621
  Object.entries(fileMap).map(async ([fileName, content]) => {
7493
- const absolutePath = path3.join(outputDir, fileName);
6622
+ const absolutePath = path.join(outputDir, fileName);
7494
6623
  await fs.rm(absolutePath, { recursive: true, force: true });
7495
6624
  if (typeof content === "string") {
7496
6625
  await fs.writeFile(absolutePath, content);
@@ -7502,7 +6631,7 @@ function writeFileMap(outputDir, fileMap) {
7502
6631
  );
7503
6632
  }
7504
6633
  function isWasmEngineSupported(provider) {
7505
- return provider === "postgresql" || provider === "postgres" || provider === "mysql" || provider === "sqlite" || provider === "sqlserver";
6634
+ return provider === "postgresql" || provider === "postgres" || provider === "cockroachdb" || provider === "mysql" || provider === "sqlite" || provider === "sqlserver";
7506
6635
  }
7507
6636
  function validateDmmfAgainstDenylists(prismaClientDmmf) {
7508
6637
  const errorArray = [];
@@ -7590,18 +6719,18 @@ async function getGenerationDirs({
7590
6719
  testMode
7591
6720
  }) {
7592
6721
  const isCustomOutput = generator.isCustomOutput === true;
7593
- const normalizedOutputDir = path3.normalize(outputDir);
6722
+ const normalizedOutputDir = path.normalize(outputDir);
7594
6723
  let userRuntimeImport = isCustomOutput ? "./runtime" : "@prisma/client/runtime";
7595
- let userOutputDir = isCustomOutput ? normalizedOutputDir : await getDefaultOutdir(normalizedOutputDir);
6724
+ let userOutputDir = isCustomOutput ? normalizedOutputDir : getDefaultOutdir(normalizedOutputDir);
7596
6725
  if (testMode && runtimeBase) {
7597
6726
  userOutputDir = outputDir;
7598
- userRuntimeImport = pathToPosix4(runtimeBase);
6727
+ userRuntimeImport = pathToPosix(runtimeBase);
7599
6728
  }
7600
6729
  if (isCustomOutput) {
7601
6730
  await verifyOutputDirectory(userOutputDir, datamodel, schemaPath);
7602
6731
  }
7603
- const userPackageRoot = await packageUp({ cwd: path3.dirname(userOutputDir) });
7604
- const userProjectRoot = userPackageRoot ? path3.dirname(userPackageRoot) : process.cwd();
6732
+ const userPackageRoot = await packageUp({ cwd: path.dirname(userOutputDir) });
6733
+ const userProjectRoot = userPackageRoot ? path.dirname(userPackageRoot) : process.cwd();
7605
6734
  return {
7606
6735
  runtimeBase: userRuntimeImport,
7607
6736
  outputDir: userOutputDir,
@@ -7611,7 +6740,7 @@ async function getGenerationDirs({
7611
6740
  async function verifyOutputDirectory(directory, datamodel, schemaPath) {
7612
6741
  let content;
7613
6742
  try {
7614
- content = await fs.readFile(path3.join(directory, "package.json"), "utf8");
6743
+ content = await fs.readFile(path.join(directory, "package.json"), "utf8");
7615
6744
  } catch (e) {
7616
6745
  if (e.code === "ENOENT") {
7617
6746
  return;
@@ -7654,43 +6783,17 @@ function findOutputPathDeclaration(datamodel) {
7654
6783
  }
7655
6784
  return null;
7656
6785
  }
7657
- function getNodeRuntimeName(engineType) {
7658
- if (engineType === ClientEngineType3.Binary) {
7659
- return "binary";
7660
- }
7661
- if (engineType === ClientEngineType3.Library) {
7662
- return "library";
7663
- }
7664
- if (engineType === ClientEngineType3.Client) {
7665
- return "client";
7666
- }
7667
- assertNever3(engineType, "Unknown engine type");
7668
- }
7669
6786
  async function copyRuntimeFiles({ from, to, runtimeName, sourceMaps }) {
7670
- const files = [
7671
- // library.d.ts is always included, as it contains the actual runtime type
7672
- // definitions. Rest of the `runtime.d.ts` files just re-export everything
7673
- // from `library.d.ts`
7674
- "library.d.ts",
7675
- "index-browser.js",
7676
- "index-browser.d.ts",
7677
- "edge.js",
7678
- "edge-esm.js",
7679
- "react-native.js",
7680
- "wasm-engine-edge.js",
7681
- "wasm-compiler-edge.js"
7682
- ];
6787
+ const files = ["index-browser.js", "index-browser.d.ts", "wasm-compiler-edge.js"];
7683
6788
  files.push(`${runtimeName}.js`);
7684
- if (runtimeName !== "library") {
7685
- files.push(`${runtimeName}.d.ts`);
7686
- }
6789
+ files.push(`${runtimeName}.d.ts`);
7687
6790
  if (sourceMaps) {
7688
6791
  files.push(...files.filter((file4) => file4.endsWith(".js")).map((file4) => `${file4}.map`));
7689
6792
  }
7690
6793
  await Promise.all(
7691
6794
  files.map(async (file4) => {
7692
- const sourcePath = path3.join(from, file4);
7693
- const targetPath = path3.join(to, file4);
6795
+ const sourcePath = path.join(from, file4);
6796
+ const targetPath = path.join(to, file4);
7694
6797
  if (file4.endsWith(".js")) {
7695
6798
  const content = await fs.readFile(sourcePath, "utf-8");
7696
6799
  await fs.writeFile(targetPath, addPreamble(content));
@@ -7700,18 +6803,6 @@ async function copyRuntimeFiles({ from, to, runtimeName, sourceMaps }) {
7700
6803
  })
7701
6804
  );
7702
6805
  }
7703
- async function deleteOutputDir(outputDir) {
7704
- try {
7705
- debug(`attempting to delete ${outputDir} recursively`);
7706
- if (__require(`${outputDir}/package.json`).name?.startsWith(GENERATED_PACKAGE_NAME_PREFIX)) {
7707
- await fs.rmdir(outputDir, { recursive: true }).catch(() => {
7708
- debug(`failed to delete ${outputDir} recursively`);
7709
- });
7710
- }
7711
- } catch {
7712
- debug(`failed to delete ${outputDir} recursively, not found`);
7713
- }
7714
- }
7715
6806
  function getUniquePackageName(datamodel) {
7716
6807
  const hash = createHash("sha256");
7717
6808
  hash.write(datamodel);
@@ -7720,1631 +6811,23 @@ function getUniquePackageName(datamodel) {
7720
6811
  var GENERATED_PACKAGE_NAME_PREFIX = "prisma-client-";
7721
6812
 
7722
6813
  // src/generator.ts
7723
- import path7 from "node:path";
7724
- import { Debug as Debug3 } from "@prisma/debug";
6814
+ import path3 from "node:path";
7725
6815
  import { enginesVersion } from "@prisma/engines-version";
7726
- import { ClientEngineType as ClientEngineType4, getClientEngineType as getClientEngineType3, parseEnvValue } from "@prisma/internals";
7727
- import { match } from "ts-pattern";
6816
+ import { parseEnvValue } from "@prisma/internals";
7728
6817
 
7729
6818
  // package.json
7730
- var version = "7.3.0-integration-prisma6-fix-cloudflare-engine.3";
6819
+ var version = "7.3.0-integration-engines-7-3-0-10-fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521.1";
7731
6820
 
7732
6821
  // src/resolvePrismaClient.ts
7733
6822
  import fs2 from "node:fs/promises";
7734
- import path6 from "node:path";
6823
+ import path2 from "node:path";
7735
6824
  import { detect, getCommand } from "@antfu/ni";
7736
- import { Debug as Debug2 } from "@prisma/debug";
7737
- import { longestCommonPathPrefix, resolvePkg } from "@prisma/internals";
7738
-
7739
- // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.js
7740
- var import_cross_spawn = __toESM(require_cross_spawn(), 1);
7741
- import { Buffer as Buffer3 } from "node:buffer";
7742
- import path5 from "node:path";
7743
- import childProcess from "node:child_process";
7744
- import process6 from "node:process";
7745
-
7746
- // ../../node_modules/.pnpm/strip-final-newline@3.0.0/node_modules/strip-final-newline/index.js
7747
- function stripFinalNewline(input) {
7748
- const LF = typeof input === "string" ? "\n" : "\n".charCodeAt();
7749
- const CR = typeof input === "string" ? "\r" : "\r".charCodeAt();
7750
- if (input[input.length - 1] === LF) {
7751
- input = input.slice(0, -1);
7752
- }
7753
- if (input[input.length - 1] === CR) {
7754
- input = input.slice(0, -1);
7755
- }
7756
- return input;
7757
- }
7758
-
7759
- // ../../node_modules/.pnpm/npm-run-path@5.3.0/node_modules/npm-run-path/index.js
7760
- import process2 from "node:process";
7761
- import path4 from "node:path";
7762
- import { fileURLToPath } from "node:url";
7763
-
7764
- // ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
7765
- function pathKey(options = {}) {
7766
- const {
7767
- env = process.env,
7768
- platform = process.platform
7769
- } = options;
7770
- if (platform !== "win32") {
7771
- return "PATH";
7772
- }
7773
- return Object.keys(env).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
7774
- }
7775
-
7776
- // ../../node_modules/.pnpm/npm-run-path@5.3.0/node_modules/npm-run-path/index.js
7777
- var npmRunPath = ({
7778
- cwd = process2.cwd(),
7779
- path: pathOption = process2.env[pathKey()],
7780
- preferLocal = true,
7781
- execPath = process2.execPath,
7782
- addExecPath = true
7783
- } = {}) => {
7784
- const cwdString = cwd instanceof URL ? fileURLToPath(cwd) : cwd;
7785
- const cwdPath = path4.resolve(cwdString);
7786
- const result = [];
7787
- if (preferLocal) {
7788
- applyPreferLocal(result, cwdPath);
7789
- }
7790
- if (addExecPath) {
7791
- applyExecPath(result, execPath, cwdPath);
7792
- }
7793
- return [...result, pathOption].join(path4.delimiter);
7794
- };
7795
- var applyPreferLocal = (result, cwdPath) => {
7796
- let previous;
7797
- while (previous !== cwdPath) {
7798
- result.push(path4.join(cwdPath, "node_modules/.bin"));
7799
- previous = cwdPath;
7800
- cwdPath = path4.resolve(cwdPath, "..");
7801
- }
7802
- };
7803
- var applyExecPath = (result, execPath, cwdPath) => {
7804
- const execPathString = execPath instanceof URL ? fileURLToPath(execPath) : execPath;
7805
- result.push(path4.resolve(cwdPath, execPathString, ".."));
7806
- };
7807
- var npmRunPathEnv = ({ env = process2.env, ...options } = {}) => {
7808
- env = { ...env };
7809
- const pathName = pathKey({ env });
7810
- options.path = env[pathName];
7811
- env[pathName] = npmRunPath(options);
7812
- return env;
7813
- };
7814
-
7815
- // ../../node_modules/.pnpm/mimic-fn@4.0.0/node_modules/mimic-fn/index.js
7816
- var copyProperty = (to, from, property11, ignoreNonConfigurable) => {
7817
- if (property11 === "length" || property11 === "prototype") {
7818
- return;
7819
- }
7820
- if (property11 === "arguments" || property11 === "caller") {
7821
- return;
7822
- }
7823
- const toDescriptor = Object.getOwnPropertyDescriptor(to, property11);
7824
- const fromDescriptor = Object.getOwnPropertyDescriptor(from, property11);
7825
- if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {
7826
- return;
7827
- }
7828
- Object.defineProperty(to, property11, fromDescriptor);
7829
- };
7830
- var canCopyProperty = function(toDescriptor, fromDescriptor) {
7831
- return toDescriptor === void 0 || toDescriptor.configurable || toDescriptor.writable === fromDescriptor.writable && toDescriptor.enumerable === fromDescriptor.enumerable && toDescriptor.configurable === fromDescriptor.configurable && (toDescriptor.writable || toDescriptor.value === fromDescriptor.value);
7832
- };
7833
- var changePrototype = (to, from) => {
7834
- const fromPrototype = Object.getPrototypeOf(from);
7835
- if (fromPrototype === Object.getPrototypeOf(to)) {
7836
- return;
7837
- }
7838
- Object.setPrototypeOf(to, fromPrototype);
7839
- };
7840
- var wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/
7841
- ${fromBody}`;
7842
- var toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, "toString");
7843
- var toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, "name");
7844
- var changeToString = (to, from, name) => {
7845
- const withName = name === "" ? "" : `with ${name.trim()}() `;
7846
- const newToString = wrappedToString.bind(null, withName, from.toString());
7847
- Object.defineProperty(newToString, "name", toStringName);
7848
- Object.defineProperty(to, "toString", { ...toStringDescriptor, value: newToString });
7849
- };
7850
- function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) {
7851
- const { name } = to;
7852
- for (const property11 of Reflect.ownKeys(from)) {
7853
- copyProperty(to, from, property11, ignoreNonConfigurable);
7854
- }
7855
- changePrototype(to, from);
7856
- changeToString(to, from, name);
7857
- return to;
7858
- }
7859
-
7860
- // ../../node_modules/.pnpm/onetime@6.0.0/node_modules/onetime/index.js
7861
- var calledFunctions = /* @__PURE__ */ new WeakMap();
7862
- var onetime = (function_, options = {}) => {
7863
- if (typeof function_ !== "function") {
7864
- throw new TypeError("Expected a function");
7865
- }
7866
- let returnValue;
7867
- let callCount = 0;
7868
- const functionName = function_.displayName || function_.name || "<anonymous>";
7869
- const onetime2 = function(...arguments_) {
7870
- calledFunctions.set(onetime2, ++callCount);
7871
- if (callCount === 1) {
7872
- returnValue = function_.apply(this, arguments_);
7873
- function_ = null;
7874
- } else if (options.throw === true) {
7875
- throw new Error(`Function \`${functionName}\` can only be called once`);
7876
- }
7877
- return returnValue;
7878
- };
7879
- mimicFunction(onetime2, function_);
7880
- calledFunctions.set(onetime2, callCount);
7881
- return onetime2;
7882
- };
7883
- onetime.callCount = (function_) => {
7884
- if (!calledFunctions.has(function_)) {
7885
- throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
7886
- }
7887
- return calledFunctions.get(function_);
7888
- };
7889
- var onetime_default = onetime;
7890
-
7891
- // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/error.js
7892
- import process3 from "node:process";
7893
-
7894
- // ../../node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/main.js
7895
- import { constants as constants2 } from "node:os";
7896
-
7897
- // ../../node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/realtime.js
7898
- var getRealtimeSignals = () => {
7899
- const length = SIGRTMAX - SIGRTMIN + 1;
7900
- return Array.from({ length }, getRealtimeSignal);
7901
- };
7902
- var getRealtimeSignal = (value, index) => ({
7903
- name: `SIGRT${index + 1}`,
7904
- number: SIGRTMIN + index,
7905
- action: "terminate",
7906
- description: "Application-specific signal (realtime)",
7907
- standard: "posix"
7908
- });
7909
- var SIGRTMIN = 34;
7910
- var SIGRTMAX = 64;
7911
-
7912
- // ../../node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/signals.js
7913
- import { constants } from "node:os";
7914
-
7915
- // ../../node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/core.js
7916
- var SIGNALS = [
7917
- {
7918
- name: "SIGHUP",
7919
- number: 1,
7920
- action: "terminate",
7921
- description: "Terminal closed",
7922
- standard: "posix"
7923
- },
7924
- {
7925
- name: "SIGINT",
7926
- number: 2,
7927
- action: "terminate",
7928
- description: "User interruption with CTRL-C",
7929
- standard: "ansi"
7930
- },
7931
- {
7932
- name: "SIGQUIT",
7933
- number: 3,
7934
- action: "core",
7935
- description: "User interruption with CTRL-\\",
7936
- standard: "posix"
7937
- },
7938
- {
7939
- name: "SIGILL",
7940
- number: 4,
7941
- action: "core",
7942
- description: "Invalid machine instruction",
7943
- standard: "ansi"
7944
- },
7945
- {
7946
- name: "SIGTRAP",
7947
- number: 5,
7948
- action: "core",
7949
- description: "Debugger breakpoint",
7950
- standard: "posix"
7951
- },
7952
- {
7953
- name: "SIGABRT",
7954
- number: 6,
7955
- action: "core",
7956
- description: "Aborted",
7957
- standard: "ansi"
7958
- },
7959
- {
7960
- name: "SIGIOT",
7961
- number: 6,
7962
- action: "core",
7963
- description: "Aborted",
7964
- standard: "bsd"
7965
- },
7966
- {
7967
- name: "SIGBUS",
7968
- number: 7,
7969
- action: "core",
7970
- description: "Bus error due to misaligned, non-existing address or paging error",
7971
- standard: "bsd"
7972
- },
7973
- {
7974
- name: "SIGEMT",
7975
- number: 7,
7976
- action: "terminate",
7977
- description: "Command should be emulated but is not implemented",
7978
- standard: "other"
7979
- },
7980
- {
7981
- name: "SIGFPE",
7982
- number: 8,
7983
- action: "core",
7984
- description: "Floating point arithmetic error",
7985
- standard: "ansi"
7986
- },
7987
- {
7988
- name: "SIGKILL",
7989
- number: 9,
7990
- action: "terminate",
7991
- description: "Forced termination",
7992
- standard: "posix",
7993
- forced: true
7994
- },
7995
- {
7996
- name: "SIGUSR1",
7997
- number: 10,
7998
- action: "terminate",
7999
- description: "Application-specific signal",
8000
- standard: "posix"
8001
- },
8002
- {
8003
- name: "SIGSEGV",
8004
- number: 11,
8005
- action: "core",
8006
- description: "Segmentation fault",
8007
- standard: "ansi"
8008
- },
8009
- {
8010
- name: "SIGUSR2",
8011
- number: 12,
8012
- action: "terminate",
8013
- description: "Application-specific signal",
8014
- standard: "posix"
8015
- },
8016
- {
8017
- name: "SIGPIPE",
8018
- number: 13,
8019
- action: "terminate",
8020
- description: "Broken pipe or socket",
8021
- standard: "posix"
8022
- },
8023
- {
8024
- name: "SIGALRM",
8025
- number: 14,
8026
- action: "terminate",
8027
- description: "Timeout or timer",
8028
- standard: "posix"
8029
- },
8030
- {
8031
- name: "SIGTERM",
8032
- number: 15,
8033
- action: "terminate",
8034
- description: "Termination",
8035
- standard: "ansi"
8036
- },
8037
- {
8038
- name: "SIGSTKFLT",
8039
- number: 16,
8040
- action: "terminate",
8041
- description: "Stack is empty or overflowed",
8042
- standard: "other"
8043
- },
8044
- {
8045
- name: "SIGCHLD",
8046
- number: 17,
8047
- action: "ignore",
8048
- description: "Child process terminated, paused or unpaused",
8049
- standard: "posix"
8050
- },
8051
- {
8052
- name: "SIGCLD",
8053
- number: 17,
8054
- action: "ignore",
8055
- description: "Child process terminated, paused or unpaused",
8056
- standard: "other"
8057
- },
8058
- {
8059
- name: "SIGCONT",
8060
- number: 18,
8061
- action: "unpause",
8062
- description: "Unpaused",
8063
- standard: "posix",
8064
- forced: true
8065
- },
8066
- {
8067
- name: "SIGSTOP",
8068
- number: 19,
8069
- action: "pause",
8070
- description: "Paused",
8071
- standard: "posix",
8072
- forced: true
8073
- },
8074
- {
8075
- name: "SIGTSTP",
8076
- number: 20,
8077
- action: "pause",
8078
- description: 'Paused using CTRL-Z or "suspend"',
8079
- standard: "posix"
8080
- },
8081
- {
8082
- name: "SIGTTIN",
8083
- number: 21,
8084
- action: "pause",
8085
- description: "Background process cannot read terminal input",
8086
- standard: "posix"
8087
- },
8088
- {
8089
- name: "SIGBREAK",
8090
- number: 21,
8091
- action: "terminate",
8092
- description: "User interruption with CTRL-BREAK",
8093
- standard: "other"
8094
- },
8095
- {
8096
- name: "SIGTTOU",
8097
- number: 22,
8098
- action: "pause",
8099
- description: "Background process cannot write to terminal output",
8100
- standard: "posix"
8101
- },
8102
- {
8103
- name: "SIGURG",
8104
- number: 23,
8105
- action: "ignore",
8106
- description: "Socket received out-of-band data",
8107
- standard: "bsd"
8108
- },
8109
- {
8110
- name: "SIGXCPU",
8111
- number: 24,
8112
- action: "core",
8113
- description: "Process timed out",
8114
- standard: "bsd"
8115
- },
8116
- {
8117
- name: "SIGXFSZ",
8118
- number: 25,
8119
- action: "core",
8120
- description: "File too big",
8121
- standard: "bsd"
8122
- },
8123
- {
8124
- name: "SIGVTALRM",
8125
- number: 26,
8126
- action: "terminate",
8127
- description: "Timeout or timer",
8128
- standard: "bsd"
8129
- },
8130
- {
8131
- name: "SIGPROF",
8132
- number: 27,
8133
- action: "terminate",
8134
- description: "Timeout or timer",
8135
- standard: "bsd"
8136
- },
8137
- {
8138
- name: "SIGWINCH",
8139
- number: 28,
8140
- action: "ignore",
8141
- description: "Terminal window size changed",
8142
- standard: "bsd"
8143
- },
8144
- {
8145
- name: "SIGIO",
8146
- number: 29,
8147
- action: "terminate",
8148
- description: "I/O is available",
8149
- standard: "other"
8150
- },
8151
- {
8152
- name: "SIGPOLL",
8153
- number: 29,
8154
- action: "terminate",
8155
- description: "Watched event",
8156
- standard: "other"
8157
- },
8158
- {
8159
- name: "SIGINFO",
8160
- number: 29,
8161
- action: "ignore",
8162
- description: "Request for process information",
8163
- standard: "other"
8164
- },
8165
- {
8166
- name: "SIGPWR",
8167
- number: 30,
8168
- action: "terminate",
8169
- description: "Device running out of power",
8170
- standard: "systemv"
8171
- },
8172
- {
8173
- name: "SIGSYS",
8174
- number: 31,
8175
- action: "core",
8176
- description: "Invalid system call",
8177
- standard: "other"
8178
- },
8179
- {
8180
- name: "SIGUNUSED",
8181
- number: 31,
8182
- action: "terminate",
8183
- description: "Invalid system call",
8184
- standard: "other"
8185
- }
8186
- ];
8187
-
8188
- // ../../node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/signals.js
8189
- var getSignals = () => {
8190
- const realtimeSignals = getRealtimeSignals();
8191
- const signals2 = [...SIGNALS, ...realtimeSignals].map(normalizeSignal);
8192
- return signals2;
8193
- };
8194
- var normalizeSignal = ({
8195
- name,
8196
- number: defaultNumber,
8197
- description,
8198
- action,
8199
- forced = false,
8200
- standard
8201
- }) => {
8202
- const {
8203
- signals: { [name]: constantSignal }
8204
- } = constants;
8205
- const supported = constantSignal !== void 0;
8206
- const number = supported ? constantSignal : defaultNumber;
8207
- return { name, number, description, supported, action, forced, standard };
8208
- };
8209
-
8210
- // ../../node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/main.js
8211
- var getSignalsByName = () => {
8212
- const signals2 = getSignals();
8213
- return Object.fromEntries(signals2.map(getSignalByName));
8214
- };
8215
- var getSignalByName = ({
8216
- name,
8217
- number,
8218
- description,
8219
- supported,
8220
- action,
8221
- forced,
8222
- standard
8223
- }) => [name, { name, number, description, supported, action, forced, standard }];
8224
- var signalsByName = getSignalsByName();
8225
- var getSignalsByNumber = () => {
8226
- const signals2 = getSignals();
8227
- const length = SIGRTMAX + 1;
8228
- const signalsA = Array.from(
8229
- { length },
8230
- (value, number) => getSignalByNumber(number, signals2)
8231
- );
8232
- return Object.assign({}, ...signalsA);
8233
- };
8234
- var getSignalByNumber = (number, signals2) => {
8235
- const signal = findSignalByNumber(number, signals2);
8236
- if (signal === void 0) {
8237
- return {};
8238
- }
8239
- const { name, description, supported, action, forced, standard } = signal;
8240
- return {
8241
- [number]: {
8242
- name,
8243
- number,
8244
- description,
8245
- supported,
8246
- action,
8247
- forced,
8248
- standard
8249
- }
8250
- };
8251
- };
8252
- var findSignalByNumber = (number, signals2) => {
8253
- const signal = signals2.find(({ name }) => constants2.signals[name] === number);
8254
- if (signal !== void 0) {
8255
- return signal;
8256
- }
8257
- return signals2.find((signalA) => signalA.number === number);
8258
- };
8259
- var signalsByNumber = getSignalsByNumber();
8260
-
8261
- // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/error.js
8262
- var getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => {
8263
- if (timedOut) {
8264
- return `timed out after ${timeout} milliseconds`;
8265
- }
8266
- if (isCanceled) {
8267
- return "was canceled";
8268
- }
8269
- if (errorCode !== void 0) {
8270
- return `failed with ${errorCode}`;
8271
- }
8272
- if (signal !== void 0) {
8273
- return `was killed with ${signal} (${signalDescription})`;
8274
- }
8275
- if (exitCode !== void 0) {
8276
- return `failed with exit code ${exitCode}`;
8277
- }
8278
- return "failed";
8279
- };
8280
- var makeError = ({
8281
- stdout,
8282
- stderr,
8283
- all,
8284
- error,
8285
- signal,
8286
- exitCode,
8287
- command,
8288
- escapedCommand,
8289
- timedOut,
8290
- isCanceled,
8291
- killed,
8292
- parsed: { options: { timeout, cwd = process3.cwd() } }
8293
- }) => {
8294
- exitCode = exitCode === null ? void 0 : exitCode;
8295
- signal = signal === null ? void 0 : signal;
8296
- const signalDescription = signal === void 0 ? void 0 : signalsByName[signal].description;
8297
- const errorCode = error && error.code;
8298
- const prefix = getErrorPrefix({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled });
8299
- const execaMessage = `Command ${prefix}: ${command}`;
8300
- const isError = Object.prototype.toString.call(error) === "[object Error]";
8301
- const shortMessage = isError ? `${execaMessage}
8302
- ${error.message}` : execaMessage;
8303
- const message = [shortMessage, stderr, stdout].filter(Boolean).join("\n");
8304
- if (isError) {
8305
- error.originalMessage = error.message;
8306
- error.message = message;
8307
- } else {
8308
- error = new Error(message);
8309
- }
8310
- error.shortMessage = shortMessage;
8311
- error.command = command;
8312
- error.escapedCommand = escapedCommand;
8313
- error.exitCode = exitCode;
8314
- error.signal = signal;
8315
- error.signalDescription = signalDescription;
8316
- error.stdout = stdout;
8317
- error.stderr = stderr;
8318
- error.cwd = cwd;
8319
- if (all !== void 0) {
8320
- error.all = all;
8321
- }
8322
- if ("bufferedData" in error) {
8323
- delete error.bufferedData;
8324
- }
8325
- error.failed = true;
8326
- error.timedOut = Boolean(timedOut);
8327
- error.isCanceled = isCanceled;
8328
- error.killed = killed && !timedOut;
8329
- return error;
8330
- };
8331
-
8332
- // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stdio.js
8333
- var aliases = ["stdin", "stdout", "stderr"];
8334
- var hasAlias = (options) => aliases.some((alias) => options[alias] !== void 0);
8335
- var normalizeStdio = (options) => {
8336
- if (!options) {
8337
- return;
8338
- }
8339
- const { stdio } = options;
8340
- if (stdio === void 0) {
8341
- return aliases.map((alias) => options[alias]);
8342
- }
8343
- if (hasAlias(options)) {
8344
- throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${aliases.map((alias) => `\`${alias}\``).join(", ")}`);
8345
- }
8346
- if (typeof stdio === "string") {
8347
- return stdio;
8348
- }
8349
- if (!Array.isArray(stdio)) {
8350
- throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
8351
- }
8352
- const length = Math.max(stdio.length, aliases.length);
8353
- return Array.from({ length }, (value, index) => stdio[index]);
8354
- };
8355
-
8356
- // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/kill.js
8357
- import os from "node:os";
8358
-
8359
- // ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
8360
- var signals = [];
8361
- signals.push("SIGHUP", "SIGINT", "SIGTERM");
8362
- if (process.platform !== "win32") {
8363
- signals.push(
8364
- "SIGALRM",
8365
- "SIGABRT",
8366
- "SIGVTALRM",
8367
- "SIGXCPU",
8368
- "SIGXFSZ",
8369
- "SIGUSR2",
8370
- "SIGTRAP",
8371
- "SIGSYS",
8372
- "SIGQUIT",
8373
- "SIGIOT"
8374
- // should detect profiler and enable/disable accordingly.
8375
- // see #21
8376
- // 'SIGPROF'
8377
- );
8378
- }
8379
- if (process.platform === "linux") {
8380
- signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
8381
- }
8382
-
8383
- // ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
8384
- var processOk = (process7) => !!process7 && typeof process7 === "object" && typeof process7.removeListener === "function" && typeof process7.emit === "function" && typeof process7.reallyExit === "function" && typeof process7.listeners === "function" && typeof process7.kill === "function" && typeof process7.pid === "number" && typeof process7.on === "function";
8385
- var kExitEmitter = Symbol.for("signal-exit emitter");
8386
- var global2 = globalThis;
8387
- var ObjectDefineProperty = Object.defineProperty.bind(Object);
8388
- var Emitter = class {
8389
- emitted = {
8390
- afterExit: false,
8391
- exit: false
8392
- };
8393
- listeners = {
8394
- afterExit: [],
8395
- exit: []
8396
- };
8397
- count = 0;
8398
- id = Math.random();
8399
- constructor() {
8400
- if (global2[kExitEmitter]) {
8401
- return global2[kExitEmitter];
8402
- }
8403
- ObjectDefineProperty(global2, kExitEmitter, {
8404
- value: this,
8405
- writable: false,
8406
- enumerable: false,
8407
- configurable: false
8408
- });
8409
- }
8410
- on(ev, fn) {
8411
- this.listeners[ev].push(fn);
8412
- }
8413
- removeListener(ev, fn) {
8414
- const list = this.listeners[ev];
8415
- const i = list.indexOf(fn);
8416
- if (i === -1) {
8417
- return;
8418
- }
8419
- if (i === 0 && list.length === 1) {
8420
- list.length = 0;
8421
- } else {
8422
- list.splice(i, 1);
8423
- }
8424
- }
8425
- emit(ev, code, signal) {
8426
- if (this.emitted[ev]) {
8427
- return false;
8428
- }
8429
- this.emitted[ev] = true;
8430
- let ret = false;
8431
- for (const fn of this.listeners[ev]) {
8432
- ret = fn(code, signal) === true || ret;
8433
- }
8434
- if (ev === "exit") {
8435
- ret = this.emit("afterExit", code, signal) || ret;
8436
- }
8437
- return ret;
8438
- }
8439
- };
8440
- var SignalExitBase = class {
8441
- };
8442
- var signalExitWrap = (handler) => {
8443
- return {
8444
- onExit(cb, opts) {
8445
- return handler.onExit(cb, opts);
8446
- },
8447
- load() {
8448
- return handler.load();
8449
- },
8450
- unload() {
8451
- return handler.unload();
8452
- }
8453
- };
8454
- };
8455
- var SignalExitFallback = class extends SignalExitBase {
8456
- onExit() {
8457
- return () => {
8458
- };
8459
- }
8460
- load() {
8461
- }
8462
- unload() {
8463
- }
8464
- };
8465
- var SignalExit = class extends SignalExitBase {
8466
- // "SIGHUP" throws an `ENOSYS` error on Windows,
8467
- // so use a supported signal instead
8468
- /* c8 ignore start */
8469
- #hupSig = process4.platform === "win32" ? "SIGINT" : "SIGHUP";
8470
- /* c8 ignore stop */
8471
- #emitter = new Emitter();
8472
- #process;
8473
- #originalProcessEmit;
8474
- #originalProcessReallyExit;
8475
- #sigListeners = {};
8476
- #loaded = false;
8477
- constructor(process7) {
8478
- super();
8479
- this.#process = process7;
8480
- this.#sigListeners = {};
8481
- for (const sig of signals) {
8482
- this.#sigListeners[sig] = () => {
8483
- const listeners = this.#process.listeners(sig);
8484
- let { count } = this.#emitter;
8485
- const p = process7;
8486
- if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
8487
- count += p.__signal_exit_emitter__.count;
8488
- }
8489
- if (listeners.length === count) {
8490
- this.unload();
8491
- const ret = this.#emitter.emit("exit", null, sig);
8492
- const s = sig === "SIGHUP" ? this.#hupSig : sig;
8493
- if (!ret)
8494
- process7.kill(process7.pid, s);
8495
- }
8496
- };
8497
- }
8498
- this.#originalProcessReallyExit = process7.reallyExit;
8499
- this.#originalProcessEmit = process7.emit;
8500
- }
8501
- onExit(cb, opts) {
8502
- if (!processOk(this.#process)) {
8503
- return () => {
8504
- };
8505
- }
8506
- if (this.#loaded === false) {
8507
- this.load();
8508
- }
8509
- const ev = opts?.alwaysLast ? "afterExit" : "exit";
8510
- this.#emitter.on(ev, cb);
8511
- return () => {
8512
- this.#emitter.removeListener(ev, cb);
8513
- if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
8514
- this.unload();
8515
- }
8516
- };
8517
- }
8518
- load() {
8519
- if (this.#loaded) {
8520
- return;
8521
- }
8522
- this.#loaded = true;
8523
- this.#emitter.count += 1;
8524
- for (const sig of signals) {
8525
- try {
8526
- const fn = this.#sigListeners[sig];
8527
- if (fn)
8528
- this.#process.on(sig, fn);
8529
- } catch (_) {
8530
- }
8531
- }
8532
- this.#process.emit = (ev, ...a) => {
8533
- return this.#processEmit(ev, ...a);
8534
- };
8535
- this.#process.reallyExit = (code) => {
8536
- return this.#processReallyExit(code);
8537
- };
8538
- }
8539
- unload() {
8540
- if (!this.#loaded) {
8541
- return;
8542
- }
8543
- this.#loaded = false;
8544
- signals.forEach((sig) => {
8545
- const listener = this.#sigListeners[sig];
8546
- if (!listener) {
8547
- throw new Error("Listener not defined for signal: " + sig);
8548
- }
8549
- try {
8550
- this.#process.removeListener(sig, listener);
8551
- } catch (_) {
8552
- }
8553
- });
8554
- this.#process.emit = this.#originalProcessEmit;
8555
- this.#process.reallyExit = this.#originalProcessReallyExit;
8556
- this.#emitter.count -= 1;
8557
- }
8558
- #processReallyExit(code) {
8559
- if (!processOk(this.#process)) {
8560
- return 0;
8561
- }
8562
- this.#process.exitCode = code || 0;
8563
- this.#emitter.emit("exit", this.#process.exitCode, null);
8564
- return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
8565
- }
8566
- #processEmit(ev, ...args) {
8567
- const og = this.#originalProcessEmit;
8568
- if (ev === "exit" && processOk(this.#process)) {
8569
- if (typeof args[0] === "number") {
8570
- this.#process.exitCode = args[0];
8571
- }
8572
- const ret = og.call(this.#process, ev, ...args);
8573
- this.#emitter.emit("exit", this.#process.exitCode, null);
8574
- return ret;
8575
- } else {
8576
- return og.call(this.#process, ev, ...args);
8577
- }
8578
- }
8579
- };
8580
- var process4 = globalThis.process;
8581
- var {
8582
- /**
8583
- * Called when the process is exiting, whether via signal, explicit
8584
- * exit, or running out of stuff to do.
8585
- *
8586
- * If the global process object is not suitable for instrumentation,
8587
- * then this will be a no-op.
8588
- *
8589
- * Returns a function that may be used to unload signal-exit.
8590
- */
8591
- onExit,
8592
- /**
8593
- * Load the listeners. Likely you never need to call this, unless
8594
- * doing a rather deep integration with signal-exit functionality.
8595
- * Mostly exposed for the benefit of testing.
8596
- *
8597
- * @internal
8598
- */
8599
- load,
8600
- /**
8601
- * Unload the listeners. Likely you never need to call this, unless
8602
- * doing a rather deep integration with signal-exit functionality.
8603
- * Mostly exposed for the benefit of testing.
8604
- *
8605
- * @internal
8606
- */
8607
- unload
8608
- } = signalExitWrap(processOk(process4) ? new SignalExit(process4) : new SignalExitFallback());
8609
-
8610
- // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/kill.js
8611
- var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
8612
- var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
8613
- const killResult = kill(signal);
8614
- setKillTimeout(kill, signal, options, killResult);
8615
- return killResult;
8616
- };
8617
- var setKillTimeout = (kill, signal, options, killResult) => {
8618
- if (!shouldForceKill(signal, options, killResult)) {
8619
- return;
8620
- }
8621
- const timeout = getForceKillAfterTimeout(options);
8622
- const t = setTimeout(() => {
8623
- kill("SIGKILL");
8624
- }, timeout);
8625
- if (t.unref) {
8626
- t.unref();
8627
- }
8628
- };
8629
- var shouldForceKill = (signal, { forceKillAfterTimeout }, killResult) => isSigterm(signal) && forceKillAfterTimeout !== false && killResult;
8630
- var isSigterm = (signal) => signal === os.constants.signals.SIGTERM || typeof signal === "string" && signal.toUpperCase() === "SIGTERM";
8631
- var getForceKillAfterTimeout = ({ forceKillAfterTimeout = true }) => {
8632
- if (forceKillAfterTimeout === true) {
8633
- return DEFAULT_FORCE_KILL_TIMEOUT;
8634
- }
8635
- if (!Number.isFinite(forceKillAfterTimeout) || forceKillAfterTimeout < 0) {
8636
- throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${forceKillAfterTimeout}\` (${typeof forceKillAfterTimeout})`);
8637
- }
8638
- return forceKillAfterTimeout;
8639
- };
8640
- var spawnedCancel = (spawned, context) => {
8641
- const killResult = spawned.kill();
8642
- if (killResult) {
8643
- context.isCanceled = true;
8644
- }
8645
- };
8646
- var timeoutKill = (spawned, signal, reject) => {
8647
- spawned.kill(signal);
8648
- reject(Object.assign(new Error("Timed out"), { timedOut: true, signal }));
8649
- };
8650
- var setupTimeout = (spawned, { timeout, killSignal = "SIGTERM" }, spawnedPromise) => {
8651
- if (timeout === 0 || timeout === void 0) {
8652
- return spawnedPromise;
8653
- }
8654
- let timeoutId;
8655
- const timeoutPromise = new Promise((resolve, reject) => {
8656
- timeoutId = setTimeout(() => {
8657
- timeoutKill(spawned, killSignal, reject);
8658
- }, timeout);
8659
- });
8660
- const safeSpawnedPromise = spawnedPromise.finally(() => {
8661
- clearTimeout(timeoutId);
8662
- });
8663
- return Promise.race([timeoutPromise, safeSpawnedPromise]);
8664
- };
8665
- var validateTimeout = ({ timeout }) => {
8666
- if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout < 0)) {
8667
- throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`);
8668
- }
8669
- };
8670
- var setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => {
8671
- if (!cleanup || detached) {
8672
- return timedPromise;
8673
- }
8674
- const removeExitHandler = onExit(() => {
8675
- spawned.kill();
8676
- });
8677
- return timedPromise.finally(() => {
8678
- removeExitHandler();
8679
- });
8680
- };
8681
-
8682
- // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/pipe.js
8683
- import { createWriteStream } from "node:fs";
8684
- import { ChildProcess } from "node:child_process";
8685
-
8686
- // ../../node_modules/.pnpm/is-stream@3.0.0/node_modules/is-stream/index.js
8687
- function isStream(stream) {
8688
- return stream !== null && typeof stream === "object" && typeof stream.pipe === "function";
8689
- }
8690
- function isWritableStream(stream) {
8691
- return isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object";
8692
- }
8693
-
8694
- // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/pipe.js
8695
- var isExecaChildProcess = (target) => target instanceof ChildProcess && typeof target.then === "function";
8696
- var pipeToTarget = (spawned, streamName, target) => {
8697
- if (typeof target === "string") {
8698
- spawned[streamName].pipe(createWriteStream(target));
8699
- return spawned;
8700
- }
8701
- if (isWritableStream(target)) {
8702
- spawned[streamName].pipe(target);
8703
- return spawned;
8704
- }
8705
- if (!isExecaChildProcess(target)) {
8706
- throw new TypeError("The second argument must be a string, a stream or an Execa child process.");
8707
- }
8708
- if (!isWritableStream(target.stdin)) {
8709
- throw new TypeError("The target child process's stdin must be available.");
8710
- }
8711
- spawned[streamName].pipe(target.stdin);
8712
- return target;
8713
- };
8714
- var addPipeMethods = (spawned) => {
8715
- if (spawned.stdout !== null) {
8716
- spawned.pipeStdout = pipeToTarget.bind(void 0, spawned, "stdout");
8717
- }
8718
- if (spawned.stderr !== null) {
8719
- spawned.pipeStderr = pipeToTarget.bind(void 0, spawned, "stderr");
8720
- }
8721
- if (spawned.all !== void 0) {
8722
- spawned.pipeAll = pipeToTarget.bind(void 0, spawned, "all");
8723
- }
8724
- };
8725
-
8726
- // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stream.js
8727
- import { createReadStream, readFileSync } from "node:fs";
8728
- import { setTimeout as setTimeout2 } from "node:timers/promises";
8729
-
8730
- // ../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/contents.js
8731
- var getStreamContents = async (stream, { init: init2, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize }, { maxBuffer = Number.POSITIVE_INFINITY } = {}) => {
8732
- if (!isAsyncIterable(stream)) {
8733
- throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");
8734
- }
8735
- const state = init2();
8736
- state.length = 0;
8737
- try {
8738
- for await (const chunk of stream) {
8739
- const chunkType = getChunkType(chunk);
8740
- const convertedChunk = convertChunk[chunkType](chunk, state);
8741
- appendChunk({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer });
8742
- }
8743
- appendFinalChunk({ state, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer });
8744
- return finalize(state);
8745
- } catch (error) {
8746
- error.bufferedData = finalize(state);
8747
- throw error;
8748
- }
8749
- };
8750
- var appendFinalChunk = ({ state, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer }) => {
8751
- const convertedChunk = getFinalChunk(state);
8752
- if (convertedChunk !== void 0) {
8753
- appendChunk({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer });
8754
- }
8755
- };
8756
- var appendChunk = ({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer }) => {
8757
- const chunkSize = getSize(convertedChunk);
8758
- const newLength = state.length + chunkSize;
8759
- if (newLength <= maxBuffer) {
8760
- addNewChunk(convertedChunk, state, addChunk, newLength);
8761
- return;
8762
- }
8763
- const truncatedChunk = truncateChunk(convertedChunk, maxBuffer - state.length);
8764
- if (truncatedChunk !== void 0) {
8765
- addNewChunk(truncatedChunk, state, addChunk, maxBuffer);
8766
- }
8767
- throw new MaxBufferError();
8768
- };
8769
- var addNewChunk = (convertedChunk, state, addChunk, newLength) => {
8770
- state.contents = addChunk(convertedChunk, state, newLength);
8771
- state.length = newLength;
8772
- };
8773
- var isAsyncIterable = (stream) => typeof stream === "object" && stream !== null && typeof stream[Symbol.asyncIterator] === "function";
8774
- var getChunkType = (chunk) => {
8775
- const typeOfChunk = typeof chunk;
8776
- if (typeOfChunk === "string") {
8777
- return "string";
8778
- }
8779
- if (typeOfChunk !== "object" || chunk === null) {
8780
- return "others";
8781
- }
8782
- if (globalThis.Buffer?.isBuffer(chunk)) {
8783
- return "buffer";
8784
- }
8785
- const prototypeName = objectToString.call(chunk);
8786
- if (prototypeName === "[object ArrayBuffer]") {
8787
- return "arrayBuffer";
8788
- }
8789
- if (prototypeName === "[object DataView]") {
8790
- return "dataView";
8791
- }
8792
- if (Number.isInteger(chunk.byteLength) && Number.isInteger(chunk.byteOffset) && objectToString.call(chunk.buffer) === "[object ArrayBuffer]") {
8793
- return "typedArray";
8794
- }
8795
- return "others";
8796
- };
8797
- var { toString: objectToString } = Object.prototype;
8798
- var MaxBufferError = class extends Error {
8799
- name = "MaxBufferError";
8800
- constructor() {
8801
- super("maxBuffer exceeded");
8802
- }
8803
- };
8804
-
8805
- // ../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/utils.js
8806
- var identity = (value) => value;
8807
- var noop = () => void 0;
8808
- var getContentsProp = ({ contents }) => contents;
8809
- var throwObjectStream = (chunk) => {
8810
- throw new Error(`Streams in object mode are not supported: ${String(chunk)}`);
8811
- };
8812
- var getLengthProp = (convertedChunk) => convertedChunk.length;
8813
-
8814
- // ../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array-buffer.js
8815
- async function getStreamAsArrayBuffer(stream, options) {
8816
- return getStreamContents(stream, arrayBufferMethods, options);
8817
- }
8818
- var initArrayBuffer = () => ({ contents: new ArrayBuffer(0) });
8819
- var useTextEncoder = (chunk) => textEncoder.encode(chunk);
8820
- var textEncoder = new TextEncoder();
8821
- var useUint8Array = (chunk) => new Uint8Array(chunk);
8822
- var useUint8ArrayWithOffset = (chunk) => new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength);
8823
- var truncateArrayBufferChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);
8824
- var addArrayBufferChunk = (convertedChunk, { contents, length: previousLength }, length) => {
8825
- const newContents = hasArrayBufferResize() ? resizeArrayBuffer(contents, length) : resizeArrayBufferSlow(contents, length);
8826
- new Uint8Array(newContents).set(convertedChunk, previousLength);
8827
- return newContents;
8828
- };
8829
- var resizeArrayBufferSlow = (contents, length) => {
8830
- if (length <= contents.byteLength) {
8831
- return contents;
8832
- }
8833
- const arrayBuffer = new ArrayBuffer(getNewContentsLength(length));
8834
- new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);
8835
- return arrayBuffer;
8836
- };
8837
- var resizeArrayBuffer = (contents, length) => {
8838
- if (length <= contents.maxByteLength) {
8839
- contents.resize(length);
8840
- return contents;
8841
- }
8842
- const arrayBuffer = new ArrayBuffer(length, { maxByteLength: getNewContentsLength(length) });
8843
- new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);
8844
- return arrayBuffer;
8845
- };
8846
- var getNewContentsLength = (length) => SCALE_FACTOR ** Math.ceil(Math.log(length) / Math.log(SCALE_FACTOR));
8847
- var SCALE_FACTOR = 2;
8848
- var finalizeArrayBuffer = ({ contents, length }) => hasArrayBufferResize() ? contents : contents.slice(0, length);
8849
- var hasArrayBufferResize = () => "resize" in ArrayBuffer.prototype;
8850
- var arrayBufferMethods = {
8851
- init: initArrayBuffer,
8852
- convertChunk: {
8853
- string: useTextEncoder,
8854
- buffer: useUint8Array,
8855
- arrayBuffer: useUint8Array,
8856
- dataView: useUint8ArrayWithOffset,
8857
- typedArray: useUint8ArrayWithOffset,
8858
- others: throwObjectStream
8859
- },
8860
- getSize: getLengthProp,
8861
- truncateChunk: truncateArrayBufferChunk,
8862
- addChunk: addArrayBufferChunk,
8863
- getFinalChunk: noop,
8864
- finalize: finalizeArrayBuffer
8865
- };
8866
-
8867
- // ../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/buffer.js
8868
- async function getStreamAsBuffer(stream, options) {
8869
- if (!("Buffer" in globalThis)) {
8870
- throw new Error("getStreamAsBuffer() is only supported in Node.js");
8871
- }
8872
- try {
8873
- return arrayBufferToNodeBuffer(await getStreamAsArrayBuffer(stream, options));
8874
- } catch (error) {
8875
- if (error.bufferedData !== void 0) {
8876
- error.bufferedData = arrayBufferToNodeBuffer(error.bufferedData);
8877
- }
8878
- throw error;
8879
- }
8880
- }
8881
- var arrayBufferToNodeBuffer = (arrayBuffer) => globalThis.Buffer.from(arrayBuffer);
8882
-
8883
- // ../../node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/string.js
8884
- async function getStreamAsString(stream, options) {
8885
- return getStreamContents(stream, stringMethods, options);
8886
- }
8887
- var initString = () => ({ contents: "", textDecoder: new TextDecoder() });
8888
- var useTextDecoder = (chunk, { textDecoder }) => textDecoder.decode(chunk, { stream: true });
8889
- var addStringChunk = (convertedChunk, { contents }) => contents + convertedChunk;
8890
- var truncateStringChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);
8891
- var getFinalStringChunk = ({ textDecoder }) => {
8892
- const finalChunk = textDecoder.decode();
8893
- return finalChunk === "" ? void 0 : finalChunk;
8894
- };
8895
- var stringMethods = {
8896
- init: initString,
8897
- convertChunk: {
8898
- string: identity,
8899
- buffer: useTextDecoder,
8900
- arrayBuffer: useTextDecoder,
8901
- dataView: useTextDecoder,
8902
- typedArray: useTextDecoder,
8903
- others: throwObjectStream
8904
- },
8905
- getSize: getLengthProp,
8906
- truncateChunk: truncateStringChunk,
8907
- addChunk: addStringChunk,
8908
- getFinalChunk: getFinalStringChunk,
8909
- finalize: getContentsProp
8910
- };
8911
-
8912
- // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stream.js
8913
- var import_merge_stream = __toESM(require_merge_stream(), 1);
8914
- var validateInputOptions = (input) => {
8915
- if (input !== void 0) {
8916
- throw new TypeError("The `input` and `inputFile` options cannot be both set.");
8917
- }
8918
- };
8919
- var getInputSync = ({ input, inputFile }) => {
8920
- if (typeof inputFile !== "string") {
8921
- return input;
8922
- }
8923
- validateInputOptions(input);
8924
- return readFileSync(inputFile);
8925
- };
8926
- var handleInputSync = (options) => {
8927
- const input = getInputSync(options);
8928
- if (isStream(input)) {
8929
- throw new TypeError("The `input` option cannot be a stream in sync mode");
8930
- }
8931
- return input;
8932
- };
8933
- var getInput = ({ input, inputFile }) => {
8934
- if (typeof inputFile !== "string") {
8935
- return input;
8936
- }
8937
- validateInputOptions(input);
8938
- return createReadStream(inputFile);
8939
- };
8940
- var handleInput = (spawned, options) => {
8941
- const input = getInput(options);
8942
- if (input === void 0) {
8943
- return;
8944
- }
8945
- if (isStream(input)) {
8946
- input.pipe(spawned.stdin);
8947
- } else {
8948
- spawned.stdin.end(input);
8949
- }
8950
- };
8951
- var makeAllStream = (spawned, { all }) => {
8952
- if (!all || !spawned.stdout && !spawned.stderr) {
8953
- return;
8954
- }
8955
- const mixed = (0, import_merge_stream.default)();
8956
- if (spawned.stdout) {
8957
- mixed.add(spawned.stdout);
8958
- }
8959
- if (spawned.stderr) {
8960
- mixed.add(spawned.stderr);
8961
- }
8962
- return mixed;
8963
- };
8964
- var getBufferedData = async (stream, streamPromise) => {
8965
- if (!stream || streamPromise === void 0) {
8966
- return;
8967
- }
8968
- await setTimeout2(0);
8969
- stream.destroy();
8970
- try {
8971
- return await streamPromise;
8972
- } catch (error) {
8973
- return error.bufferedData;
8974
- }
8975
- };
8976
- var getStreamPromise = (stream, { encoding, buffer, maxBuffer }) => {
8977
- if (!stream || !buffer) {
8978
- return;
8979
- }
8980
- if (encoding === "utf8" || encoding === "utf-8") {
8981
- return getStreamAsString(stream, { maxBuffer });
8982
- }
8983
- if (encoding === null || encoding === "buffer") {
8984
- return getStreamAsBuffer(stream, { maxBuffer });
8985
- }
8986
- return applyEncoding(stream, maxBuffer, encoding);
8987
- };
8988
- var applyEncoding = async (stream, maxBuffer, encoding) => {
8989
- const buffer = await getStreamAsBuffer(stream, { maxBuffer });
8990
- return buffer.toString(encoding);
8991
- };
8992
- var getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => {
8993
- const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer });
8994
- const stderrPromise = getStreamPromise(stderr, { encoding, buffer, maxBuffer });
8995
- const allPromise = getStreamPromise(all, { encoding, buffer, maxBuffer: maxBuffer * 2 });
8996
- try {
8997
- return await Promise.all([processDone, stdoutPromise, stderrPromise, allPromise]);
8998
- } catch (error) {
8999
- return Promise.all([
9000
- { error, signal: error.signal, timedOut: error.timedOut },
9001
- getBufferedData(stdout, stdoutPromise),
9002
- getBufferedData(stderr, stderrPromise),
9003
- getBufferedData(all, allPromise)
9004
- ]);
9005
- }
9006
- };
9007
-
9008
- // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/promise.js
9009
- var nativePromisePrototype = (async () => {
9010
- })().constructor.prototype;
9011
- var descriptors = ["then", "catch", "finally"].map((property11) => [
9012
- property11,
9013
- Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property11)
9014
- ]);
9015
- var mergePromise = (spawned, promise2) => {
9016
- for (const [property11, descriptor] of descriptors) {
9017
- const value = typeof promise2 === "function" ? (...args) => Reflect.apply(descriptor.value, promise2(), args) : descriptor.value.bind(promise2);
9018
- Reflect.defineProperty(spawned, property11, { ...descriptor, value });
9019
- }
9020
- };
9021
- var getSpawnedPromise = (spawned) => new Promise((resolve, reject) => {
9022
- spawned.on("exit", (exitCode, signal) => {
9023
- resolve({ exitCode, signal });
9024
- });
9025
- spawned.on("error", (error) => {
9026
- reject(error);
9027
- });
9028
- if (spawned.stdin) {
9029
- spawned.stdin.on("error", (error) => {
9030
- reject(error);
9031
- });
9032
- }
9033
- });
9034
-
9035
- // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/command.js
9036
- import { Buffer as Buffer2 } from "node:buffer";
9037
- import { ChildProcess as ChildProcess2 } from "node:child_process";
9038
- var normalizeArgs = (file4, args = []) => {
9039
- if (!Array.isArray(args)) {
9040
- return [file4];
9041
- }
9042
- return [file4, ...args];
9043
- };
9044
- var NO_ESCAPE_REGEXP = /^[\w.-]+$/;
9045
- var escapeArg = (arg) => {
9046
- if (typeof arg !== "string" || NO_ESCAPE_REGEXP.test(arg)) {
9047
- return arg;
9048
- }
9049
- return `"${arg.replaceAll('"', '\\"')}"`;
9050
- };
9051
- var joinCommand = (file4, args) => normalizeArgs(file4, args).join(" ");
9052
- var getEscapedCommand = (file4, args) => normalizeArgs(file4, args).map((arg) => escapeArg(arg)).join(" ");
9053
- var SPACES_REGEXP = / +/g;
9054
- var parseCommand = (command) => {
9055
- const tokens = [];
9056
- for (const token of command.trim().split(SPACES_REGEXP)) {
9057
- const previousToken = tokens.at(-1);
9058
- if (previousToken && previousToken.endsWith("\\")) {
9059
- tokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`;
9060
- } else {
9061
- tokens.push(token);
9062
- }
9063
- }
9064
- return tokens;
9065
- };
9066
- var parseExpression = (expression) => {
9067
- const typeOfExpression = typeof expression;
9068
- if (typeOfExpression === "string") {
9069
- return expression;
9070
- }
9071
- if (typeOfExpression === "number") {
9072
- return String(expression);
9073
- }
9074
- if (typeOfExpression === "object" && expression !== null && !(expression instanceof ChildProcess2) && "stdout" in expression) {
9075
- const typeOfStdout = typeof expression.stdout;
9076
- if (typeOfStdout === "string") {
9077
- return expression.stdout;
9078
- }
9079
- if (Buffer2.isBuffer(expression.stdout)) {
9080
- return expression.stdout.toString();
9081
- }
9082
- throw new TypeError(`Unexpected "${typeOfStdout}" stdout in template expression`);
9083
- }
9084
- throw new TypeError(`Unexpected "${typeOfExpression}" in template expression`);
9085
- };
9086
- var concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0 ? [...tokens, ...nextTokens] : [
9087
- ...tokens.slice(0, -1),
9088
- `${tokens.at(-1)}${nextTokens[0]}`,
9089
- ...nextTokens.slice(1)
9090
- ];
9091
- var parseTemplate = ({ templates, expressions, tokens, index, template }) => {
9092
- const templateString = template ?? templates.raw[index];
9093
- const templateTokens = templateString.split(SPACES_REGEXP).filter(Boolean);
9094
- const newTokens = concatTokens(
9095
- tokens,
9096
- templateTokens,
9097
- templateString.startsWith(" ")
9098
- );
9099
- if (index === expressions.length) {
9100
- return newTokens;
9101
- }
9102
- const expression = expressions[index];
9103
- const expressionTokens = Array.isArray(expression) ? expression.map((expression2) => parseExpression(expression2)) : [parseExpression(expression)];
9104
- return concatTokens(
9105
- newTokens,
9106
- expressionTokens,
9107
- templateString.endsWith(" ")
9108
- );
9109
- };
9110
- var parseTemplates = (templates, expressions) => {
9111
- let tokens = [];
9112
- for (const [index, template] of templates.entries()) {
9113
- tokens = parseTemplate({ templates, expressions, tokens, index, template });
9114
- }
9115
- return tokens;
9116
- };
9117
-
9118
- // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/verbose.js
9119
- import { debuglog } from "node:util";
9120
- import process5 from "node:process";
9121
- var verboseDefault = debuglog("execa").enabled;
9122
- var padField = (field, padding) => String(field).padStart(padding, "0");
9123
- var getTimestamp = () => {
9124
- const date2 = /* @__PURE__ */ new Date();
9125
- return `${padField(date2.getHours(), 2)}:${padField(date2.getMinutes(), 2)}:${padField(date2.getSeconds(), 2)}.${padField(date2.getMilliseconds(), 3)}`;
9126
- };
9127
- var logCommand = (escapedCommand, { verbose }) => {
9128
- if (!verbose) {
9129
- return;
9130
- }
9131
- process5.stderr.write(`[${getTimestamp()}] ${escapedCommand}
9132
- `);
9133
- };
9134
-
9135
- // ../../node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.js
9136
- var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100;
9137
- var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
9138
- const env = extendEnv ? { ...process6.env, ...envOption } : envOption;
9139
- if (preferLocal) {
9140
- return npmRunPathEnv({ env, cwd: localDir, execPath });
9141
- }
9142
- return env;
9143
- };
9144
- var handleArguments = (file4, args, options = {}) => {
9145
- const parsed = import_cross_spawn.default._parse(file4, args, options);
9146
- file4 = parsed.command;
9147
- args = parsed.args;
9148
- options = parsed.options;
9149
- options = {
9150
- maxBuffer: DEFAULT_MAX_BUFFER,
9151
- buffer: true,
9152
- stripFinalNewline: true,
9153
- extendEnv: true,
9154
- preferLocal: false,
9155
- localDir: options.cwd || process6.cwd(),
9156
- execPath: process6.execPath,
9157
- encoding: "utf8",
9158
- reject: true,
9159
- cleanup: true,
9160
- all: false,
9161
- windowsHide: true,
9162
- verbose: verboseDefault,
9163
- ...options
9164
- };
9165
- options.env = getEnv(options);
9166
- options.stdio = normalizeStdio(options);
9167
- if (process6.platform === "win32" && path5.basename(file4, ".exe") === "cmd") {
9168
- args.unshift("/q");
9169
- }
9170
- return { file: file4, args, options, parsed };
9171
- };
9172
- var handleOutput = (options, value, error) => {
9173
- if (typeof value !== "string" && !Buffer3.isBuffer(value)) {
9174
- return error === void 0 ? void 0 : "";
9175
- }
9176
- if (options.stripFinalNewline) {
9177
- return stripFinalNewline(value);
9178
- }
9179
- return value;
9180
- };
9181
- function execa(file4, args, options) {
9182
- const parsed = handleArguments(file4, args, options);
9183
- const command = joinCommand(file4, args);
9184
- const escapedCommand = getEscapedCommand(file4, args);
9185
- logCommand(escapedCommand, parsed.options);
9186
- validateTimeout(parsed.options);
9187
- let spawned;
9188
- try {
9189
- spawned = childProcess.spawn(parsed.file, parsed.args, parsed.options);
9190
- } catch (error) {
9191
- const dummySpawned = new childProcess.ChildProcess();
9192
- const errorPromise = Promise.reject(makeError({
9193
- error,
9194
- stdout: "",
9195
- stderr: "",
9196
- all: "",
9197
- command,
9198
- escapedCommand,
9199
- parsed,
9200
- timedOut: false,
9201
- isCanceled: false,
9202
- killed: false
9203
- }));
9204
- mergePromise(dummySpawned, errorPromise);
9205
- return dummySpawned;
9206
- }
9207
- const spawnedPromise = getSpawnedPromise(spawned);
9208
- const timedPromise = setupTimeout(spawned, parsed.options, spawnedPromise);
9209
- const processDone = setExitHandler(spawned, parsed.options, timedPromise);
9210
- const context = { isCanceled: false };
9211
- spawned.kill = spawnedKill.bind(null, spawned.kill.bind(spawned));
9212
- spawned.cancel = spawnedCancel.bind(null, spawned, context);
9213
- const handlePromise = async () => {
9214
- const [{ error, exitCode, signal, timedOut }, stdoutResult, stderrResult, allResult] = await getSpawnedResult(spawned, parsed.options, processDone);
9215
- const stdout = handleOutput(parsed.options, stdoutResult);
9216
- const stderr = handleOutput(parsed.options, stderrResult);
9217
- const all = handleOutput(parsed.options, allResult);
9218
- if (error || exitCode !== 0 || signal !== null) {
9219
- const returnedError = makeError({
9220
- error,
9221
- exitCode,
9222
- signal,
9223
- stdout,
9224
- stderr,
9225
- all,
9226
- command,
9227
- escapedCommand,
9228
- parsed,
9229
- timedOut,
9230
- isCanceled: context.isCanceled || (parsed.options.signal ? parsed.options.signal.aborted : false),
9231
- killed: spawned.killed
9232
- });
9233
- if (!parsed.options.reject) {
9234
- return returnedError;
9235
- }
9236
- throw returnedError;
9237
- }
9238
- return {
9239
- command,
9240
- escapedCommand,
9241
- exitCode: 0,
9242
- stdout,
9243
- stderr,
9244
- all,
9245
- failed: false,
9246
- timedOut: false,
9247
- isCanceled: false,
9248
- killed: false
9249
- };
9250
- };
9251
- const handlePromiseOnce = onetime_default(handlePromise);
9252
- handleInput(spawned, parsed.options);
9253
- spawned.all = makeAllStream(spawned, parsed.options);
9254
- addPipeMethods(spawned);
9255
- mergePromise(spawned, handlePromiseOnce);
9256
- return spawned;
9257
- }
9258
- function execaSync(file4, args, options) {
9259
- const parsed = handleArguments(file4, args, options);
9260
- const command = joinCommand(file4, args);
9261
- const escapedCommand = getEscapedCommand(file4, args);
9262
- logCommand(escapedCommand, parsed.options);
9263
- const input = handleInputSync(parsed.options);
9264
- let result;
9265
- try {
9266
- result = childProcess.spawnSync(parsed.file, parsed.args, { ...parsed.options, input });
9267
- } catch (error) {
9268
- throw makeError({
9269
- error,
9270
- stdout: "",
9271
- stderr: "",
9272
- all: "",
9273
- command,
9274
- escapedCommand,
9275
- parsed,
9276
- timedOut: false,
9277
- isCanceled: false,
9278
- killed: false
9279
- });
9280
- }
9281
- const stdout = handleOutput(parsed.options, result.stdout, result.error);
9282
- const stderr = handleOutput(parsed.options, result.stderr, result.error);
9283
- if (result.error || result.status !== 0 || result.signal !== null) {
9284
- const error = makeError({
9285
- stdout,
9286
- stderr,
9287
- error: result.error,
9288
- signal: result.signal,
9289
- exitCode: result.status,
9290
- command,
9291
- escapedCommand,
9292
- parsed,
9293
- timedOut: result.error && result.error.code === "ETIMEDOUT",
9294
- isCanceled: false,
9295
- killed: result.signal !== null
9296
- });
9297
- if (!parsed.options.reject) {
9298
- return error;
9299
- }
9300
- throw error;
9301
- }
9302
- return {
9303
- command,
9304
- escapedCommand,
9305
- exitCode: 0,
9306
- stdout,
9307
- stderr,
9308
- failed: false,
9309
- timedOut: false,
9310
- isCanceled: false,
9311
- killed: false
9312
- };
9313
- }
9314
- var normalizeScriptStdin = ({ input, inputFile, stdio }) => input === void 0 && inputFile === void 0 && stdio === void 0 ? { stdin: "inherit" } : {};
9315
- var normalizeScriptOptions = (options = {}) => ({
9316
- preferLocal: true,
9317
- ...normalizeScriptStdin(options),
9318
- ...options
9319
- });
9320
- function create$(options) {
9321
- function $3(templatesOrOptions, ...expressions) {
9322
- if (!Array.isArray(templatesOrOptions)) {
9323
- return create$({ ...options, ...templatesOrOptions });
9324
- }
9325
- const [file4, ...args] = parseTemplates(templatesOrOptions, expressions);
9326
- return execa(file4, args, normalizeScriptOptions(options));
9327
- }
9328
- $3.sync = (templates, ...expressions) => {
9329
- if (!Array.isArray(templates)) {
9330
- throw new TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");
9331
- }
9332
- const [file4, ...args] = parseTemplates(templates, expressions);
9333
- return execaSync(file4, args, normalizeScriptOptions(options));
9334
- };
9335
- return $3;
9336
- }
9337
- var $2 = create$();
9338
- function execaCommand(command, options) {
9339
- const [file4, ...args] = parseCommand(command);
9340
- return execa(file4, args, options);
9341
- }
9342
-
9343
- // src/resolvePrismaClient.ts
9344
- var debug2 = Debug2("prisma:generator");
6825
+ import { Debug } from "@prisma/debug";
6826
+ import { resolvePkg } from "@prisma/internals";
6827
+ var debug = Debug("prisma:generator");
9345
6828
  async function resolvePrismaClient(baseDir) {
9346
6829
  const prismaClientDir = await findPrismaClientDir(baseDir);
9347
- debug2("baseDir", baseDir);
6830
+ debug("baseDir", baseDir);
9348
6831
  if (!prismaClientDir) {
9349
6832
  throw new Error(
9350
6833
  `Could not resolve @prisma/client.
@@ -9355,83 +6838,16 @@ Please try to install it with ${bold(
9355
6838
  }
9356
6839
  return prismaClientDir;
9357
6840
  }
9358
- async function resolveOrInstallPrismaClient(baseDir, version2) {
9359
- let prismaClientDir = await findPrismaClientDir(baseDir);
9360
- debug2("baseDir", baseDir);
9361
- if (prismaClientDir) {
9362
- return prismaClientDir;
9363
- }
9364
- let projectRoot = longestCommonPathPrefix(baseDir, process.cwd());
9365
- debug2("projectRoot", projectRoot);
9366
- const warningTag = `${bold("Warning:")} ${dim("[Prisma auto-install on generate]")}`;
9367
- if (projectRoot === void 0) {
9368
- console.warn(
9369
- yellow(
9370
- `${warningTag} The Prisma schema directory ${bold(baseDir)} and the current working directory ${bold(
9371
- process.cwd()
9372
- )} have no common ancestor. The Prisma schema directory will be used as the project root.`
9373
- )
9374
- );
9375
- projectRoot = baseDir;
9376
- }
9377
- try {
9378
- await fs2.stat(path6.join(projectRoot, "package.json"));
9379
- } catch (err) {
9380
- if (err.code === "ENOENT") {
9381
- console.warn(
9382
- yellow(
9383
- `${warningTag} Prisma could not find a ${bold("package.json")} file in the inferred project root ${bold(
9384
- projectRoot
9385
- )}. During the next step, when an auto-install of Prisma package(s) will be attempted, it will then be created by your package manager on the appropriate level if necessary.`
9386
- )
9387
- );
9388
- } else {
9389
- throw err;
9390
- }
9391
- }
9392
- const prismaCliDir = await resolvePkg("prisma", { basedir: baseDir });
9393
- if (process.platform === "win32" && await isYarnUsed(baseDir)) {
9394
- const hasCli = (s) => prismaCliDir !== void 0 ? s : "";
9395
- const missingCli = (s) => prismaCliDir === void 0 ? s : "";
9396
- throw new Error(
9397
- `Could not resolve ${missingCli(`${bold("prisma")} and `)}${bold(
9398
- "@prisma/client"
9399
- )} in the current project. Please install ${hasCli("it")}${missingCli("them")} with ${missingCli(
9400
- `${bold(green(`${await getPackageCmd(baseDir, "add", "prisma", "-D")}`))} and `
9401
- )}${bold(green(`${await getPackageCmd(baseDir, "add", "@prisma/client")}`))}, and rerun ${bold(
9402
- await getPackageCmd(baseDir, "execute", "prisma generate")
9403
- )} \u{1F64F}.`
9404
- );
9405
- }
9406
- if (!prismaCliDir) {
9407
- await runPackageCmd(projectRoot, "add", `prisma@${version2}`, "-D", "--silent");
9408
- }
9409
- await runPackageCmd(projectRoot, "add", `@prisma/client@${version2}`, "--silent");
9410
- prismaClientDir = await findPrismaClientDir(path6.join(".", baseDir));
9411
- if (!prismaClientDir) {
9412
- throw new Error(
9413
- `Could not resolve @prisma/client despite the installation that we just tried.
9414
- Please try to install it by hand with ${bold(
9415
- green(`${await getPackageCmd(baseDir, "add", "@prisma/client")}`)
9416
- )} and rerun ${bold(await getPackageCmd(baseDir, "execute", "prisma generate"))} \u{1F64F}.`
9417
- );
9418
- }
9419
- console.info(
9420
- `
9421
- \u2714 Installed the ${bold(green("@prisma/client"))} and ${bold(green("prisma"))} packages in your project`
9422
- );
9423
- return prismaClientDir;
9424
- }
9425
6841
  async function findPrismaClientDir(baseDir) {
9426
6842
  const resolveOpts = { basedir: baseDir, preserveSymlinks: true };
9427
6843
  const cliDir = await resolvePkg("prisma", resolveOpts);
9428
6844
  const clientDir = await resolvePkg("@prisma/client", resolveOpts);
9429
6845
  const resolvedClientDir = clientDir && await fs2.realpath(clientDir);
9430
- debug2("prismaCliDir", cliDir);
9431
- debug2("prismaClientDir", clientDir);
6846
+ debug("prismaCliDir", cliDir);
6847
+ debug("prismaClientDir", clientDir);
9432
6848
  if (cliDir === void 0) return resolvedClientDir;
9433
6849
  if (clientDir === void 0) return resolvedClientDir;
9434
- const relDir = path6.relative(cliDir, clientDir).split(path6.sep);
6850
+ const relDir = path2.relative(cliDir, clientDir).split(path2.sep);
9435
6851
  if (relDir[0] !== ".." || relDir[1] === "..") return void 0;
9436
6852
  return resolvedClientDir;
9437
6853
  }
@@ -9439,45 +6855,24 @@ async function getPackageCmd(cwd, cmd, ...args) {
9439
6855
  const agent = await detect({ cwd, autoInstall: false, programmatic: true });
9440
6856
  return getCommand(agent ?? "npm", cmd, args);
9441
6857
  }
9442
- async function isYarnUsed(baseDir) {
9443
- const agent = await detect({ cwd: baseDir, autoInstall: false, programmatic: true });
9444
- return agent === "yarn" || agent === "yarn@berry";
9445
- }
9446
- async function runPackageCmd(cwd, cmd, ...args) {
9447
- await execaCommand(await getPackageCmd(cwd, cmd, ...args), {
9448
- // we skip this because we are already in the generator
9449
- env: { PRISMA_SKIP_POSTINSTALL_GENERATE: "true" },
9450
- stdio: "inherit",
9451
- cwd
9452
- });
9453
- }
9454
6858
 
9455
6859
  // src/generator.ts
9456
- var debug3 = Debug3("prisma:client:generator");
9457
6860
  var PrismaClientJsGenerator = class {
9458
6861
  name = "prisma-client-js";
9459
6862
  #shouldResolvePrismaClient;
9460
- #shouldInstallMissingPackages;
9461
6863
  #runtimePath;
9462
6864
  #cachedPrismaClientPath;
9463
- constructor({
9464
- shouldResolvePrismaClient = true,
9465
- shouldInstallMissingPackages = true,
9466
- runtimePath
9467
- } = {}) {
6865
+ constructor({ shouldResolvePrismaClient = true, runtimePath } = {}) {
9468
6866
  this.#shouldResolvePrismaClient = shouldResolvePrismaClient;
9469
- this.#shouldInstallMissingPackages = shouldInstallMissingPackages;
9470
6867
  this.#runtimePath = runtimePath;
9471
6868
  }
9472
6869
  async getManifest(config) {
9473
- const requiresEngines = match(getClientEngineType3(config)).with(ClientEngineType4.Library, () => ["libqueryEngine"]).with(ClientEngineType4.Binary, () => ["queryEngine"]).with(ClientEngineType4.Client, () => []).exhaustive();
9474
- debug3("requiresEngines", requiresEngines);
9475
6870
  const defaultOutput = this.#shouldResolvePrismaClient ? await this.#getPrismaClientPath(config) : ".prisma/client";
9476
6871
  return {
9477
6872
  defaultOutput,
9478
6873
  prettyName: "Prisma Client",
9479
6874
  version,
9480
- requiresEngines,
6875
+ requiresEngines: [],
9481
6876
  requiresEngineVersion: enginesVersion
9482
6877
  };
9483
6878
  }
@@ -9488,7 +6883,6 @@ var PrismaClientJsGenerator = class {
9488
6883
  schemaPath: options.schemaPath,
9489
6884
  binaryPaths: options.binaryPaths,
9490
6885
  datasources: options.datasources,
9491
- envPaths: options.envPaths,
9492
6886
  outputDir,
9493
6887
  copyRuntime: Boolean(options.generator.config.copyRuntime),
9494
6888
  copyRuntimeSourceMaps: Boolean(process.env.PRISMA_COPY_RUNTIME_SOURCEMAPS),
@@ -9498,36 +6892,37 @@ var PrismaClientJsGenerator = class {
9498
6892
  engineVersion: options.version,
9499
6893
  clientVersion: version,
9500
6894
  activeProvider: options.datasources[0]?.activeProvider,
9501
- postinstall: options.postinstall,
9502
- copyEngine: !options.noEngine,
9503
- typedSql: options.typedSql
6895
+ typedSql: options.typedSql,
6896
+ compilerBuild: parseCompilerBuildFromUnknown(options.generator.config.compilerBuild)
9504
6897
  });
9505
6898
  }
9506
6899
  async #getPrismaClientPath(config) {
9507
6900
  if (this.#cachedPrismaClientPath) {
9508
6901
  return this.#cachedPrismaClientPath;
9509
6902
  }
9510
- this.#cachedPrismaClientPath = await this.#resolveOrInstallPrismaClient(path7.dirname(config.sourceFilePath));
6903
+ this.#cachedPrismaClientPath = await resolvePrismaClient(path3.dirname(config.sourceFilePath));
9511
6904
  return this.#cachedPrismaClientPath;
9512
6905
  }
9513
6906
  async #getRuntimePath(config) {
9514
6907
  if (this.#runtimePath) {
9515
6908
  return this.#runtimePath;
9516
6909
  }
9517
- this.#runtimePath = path7.join(await this.#getPrismaClientPath(config), "runtime");
6910
+ this.#runtimePath = path3.join(await this.#getPrismaClientPath(config), "runtime");
9518
6911
  return this.#runtimePath;
9519
6912
  }
9520
- async #resolveOrInstallPrismaClient(baseDir) {
9521
- if (this.#shouldInstallMissingPackages && !process.env.PRISMA_GENERATE_SKIP_AUTOINSTALL) {
9522
- return await resolveOrInstallPrismaClient(baseDir, version);
9523
- } else {
9524
- return await resolvePrismaClient(baseDir);
9525
- }
9526
- }
9527
6913
  };
6914
+ function parseCompilerBuildFromUnknown(value) {
6915
+ if (value === void 0) {
6916
+ return "fast";
6917
+ }
6918
+ if (value === "small" || value === "fast") {
6919
+ return value;
6920
+ }
6921
+ throw new Error(`Invalid compiler build: ${JSON.stringify(value)}, expected one of: "fast", "small"`);
6922
+ }
9528
6923
 
9529
6924
  // src/utils/types/dmmfToTypes.ts
9530
- import path8 from "node:path";
6925
+ import path4 from "node:path";
9531
6926
  function dmmfToTypes(dmmf) {
9532
6927
  return new TSClient({
9533
6928
  dmmf,
@@ -9535,9 +6930,8 @@ function dmmfToTypes(dmmf) {
9535
6930
  clientVersion: "",
9536
6931
  engineVersion: "",
9537
6932
  runtimeBase: "@prisma/client",
9538
- runtimeNameJs: "library",
9539
- runtimeNameTs: "library",
9540
- runtimeSourcePath: path8.join(__dirname, "../../../runtime"),
6933
+ runtimeName: "client",
6934
+ runtimeSourcePath: path4.join(__dirname, "../../../runtime"),
9541
6935
  schemaPath: "",
9542
6936
  outputDir: "",
9543
6937
  activeProvider: "",
@@ -9556,10 +6950,7 @@ function dmmfToTypes(dmmf) {
9556
6950
  browser: false,
9557
6951
  edge: false,
9558
6952
  wasm: false,
9559
- envPaths: {
9560
- rootEnvPath: null,
9561
- schemaEnvPath: void 0
9562
- }
6953
+ compilerBuild: "fast"
9563
6954
  }).toTS();
9564
6955
  }
9565
6956
  export {