@prisma/client-generator-ts 6.19.0-integration-feat-remove-library-engine.4 → 6.19.0-integration-next.15
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.
package/dist/index.mjs
CHANGED
|
@@ -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(
|
|
114
|
+
fs3.lchmod = function(path6, 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(
|
|
121
|
+
fs3.lchown = function(path6, uid, gid, cb) {
|
|
122
122
|
if (cb) process.nextTick(cb);
|
|
123
123
|
};
|
|
124
124
|
fs3.lchownSync = function() {
|
|
@@ -185,9 +185,9 @@ var require_polyfills = __commonJS({
|
|
|
185
185
|
};
|
|
186
186
|
}(fs3.readSync);
|
|
187
187
|
function patchLchmod(fs4) {
|
|
188
|
-
fs4.lchmod = function(
|
|
188
|
+
fs4.lchmod = function(path6, mode, callback) {
|
|
189
189
|
fs4.open(
|
|
190
|
-
|
|
190
|
+
path6,
|
|
191
191
|
constants.O_WRONLY | constants.O_SYMLINK,
|
|
192
192
|
mode,
|
|
193
193
|
function(err, fd) {
|
|
@@ -203,8 +203,8 @@ var require_polyfills = __commonJS({
|
|
|
203
203
|
}
|
|
204
204
|
);
|
|
205
205
|
};
|
|
206
|
-
fs4.lchmodSync = function(
|
|
207
|
-
var fd = fs4.openSync(
|
|
206
|
+
fs4.lchmodSync = function(path6, mode) {
|
|
207
|
+
var fd = fs4.openSync(path6, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
208
208
|
var threw = true;
|
|
209
209
|
var ret;
|
|
210
210
|
try {
|
|
@@ -225,8 +225,8 @@ var require_polyfills = __commonJS({
|
|
|
225
225
|
}
|
|
226
226
|
function patchLutimes(fs4) {
|
|
227
227
|
if (constants.hasOwnProperty("O_SYMLINK") && fs4.futimes) {
|
|
228
|
-
fs4.lutimes = function(
|
|
229
|
-
fs4.open(
|
|
228
|
+
fs4.lutimes = function(path6, at, mt, cb) {
|
|
229
|
+
fs4.open(path6, 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(
|
|
242
|
-
var fd = fs4.openSync(
|
|
241
|
+
fs4.lutimesSync = function(path6, at, mt) {
|
|
242
|
+
var fd = fs4.openSync(path6, 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(
|
|
362
|
-
if (!(this instanceof ReadStream)) return new ReadStream(
|
|
361
|
+
function ReadStream(path6, options) {
|
|
362
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path6, options);
|
|
363
363
|
Stream.call(this);
|
|
364
364
|
var self = this;
|
|
365
|
-
this.path =
|
|
365
|
+
this.path = path6;
|
|
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(
|
|
411
|
-
if (!(this instanceof WriteStream)) return new WriteStream(
|
|
410
|
+
function WriteStream(path6, options) {
|
|
411
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path6, options);
|
|
412
412
|
Stream.call(this);
|
|
413
|
-
this.path =
|
|
413
|
+
this.path = path6;
|
|
414
414
|
this.fd = null;
|
|
415
415
|
this.writable = true;
|
|
416
416
|
this.flags = "w";
|
|
@@ -494,11 +494,11 @@ var require_graceful_fs = __commonJS({
|
|
|
494
494
|
}
|
|
495
495
|
});
|
|
496
496
|
}
|
|
497
|
-
var
|
|
497
|
+
var debug3 = noop;
|
|
498
498
|
if (util.debuglog)
|
|
499
|
-
|
|
499
|
+
debug3 = util.debuglog("gfs4");
|
|
500
500
|
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
|
|
501
|
-
|
|
501
|
+
debug3 = 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
|
-
|
|
536
|
+
debug3(fs3[gracefulQueue]);
|
|
537
537
|
__require("assert").equal(fs3[gracefulQueue].length, 0);
|
|
538
538
|
});
|
|
539
539
|
}
|
|
@@ -554,14 +554,14 @@ var require_graceful_fs = __commonJS({
|
|
|
554
554
|
fs4.createWriteStream = createWriteStream;
|
|
555
555
|
var fs$readFile = fs4.readFile;
|
|
556
556
|
fs4.readFile = readFile;
|
|
557
|
-
function readFile(
|
|
557
|
+
function readFile(path6, options, cb) {
|
|
558
558
|
if (typeof options === "function")
|
|
559
559
|
cb = options, options = null;
|
|
560
|
-
return go$readFile(
|
|
561
|
-
function go$readFile(
|
|
562
|
-
return fs$readFile(
|
|
560
|
+
return go$readFile(path6, options, cb);
|
|
561
|
+
function go$readFile(path7, options2, cb2, startTime) {
|
|
562
|
+
return fs$readFile(path7, options2, function(err) {
|
|
563
563
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
564
|
-
enqueue([go$readFile, [
|
|
564
|
+
enqueue([go$readFile, [path7, 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(
|
|
574
|
+
function writeFile(path6, data, options, cb) {
|
|
575
575
|
if (typeof options === "function")
|
|
576
576
|
cb = options, options = null;
|
|
577
|
-
return go$writeFile(
|
|
578
|
-
function go$writeFile(
|
|
579
|
-
return fs$writeFile(
|
|
577
|
+
return go$writeFile(path6, data, options, cb);
|
|
578
|
+
function go$writeFile(path7, data2, options2, cb2, startTime) {
|
|
579
|
+
return fs$writeFile(path7, data2, options2, function(err) {
|
|
580
580
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
581
|
-
enqueue([go$writeFile, [
|
|
581
|
+
enqueue([go$writeFile, [path7, 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(
|
|
592
|
+
function appendFile(path6, data, options, cb) {
|
|
593
593
|
if (typeof options === "function")
|
|
594
594
|
cb = options, options = null;
|
|
595
|
-
return go$appendFile(
|
|
596
|
-
function go$appendFile(
|
|
597
|
-
return fs$appendFile(
|
|
595
|
+
return go$appendFile(path6, data, options, cb);
|
|
596
|
+
function go$appendFile(path7, data2, options2, cb2, startTime) {
|
|
597
|
+
return fs$appendFile(path7, data2, options2, function(err) {
|
|
598
598
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
599
|
-
enqueue([go$appendFile, [
|
|
599
|
+
enqueue([go$appendFile, [path7, 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(
|
|
630
|
+
function readdir(path6, 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(
|
|
634
|
-
return fs$readdir(
|
|
635
|
-
|
|
633
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path7, options2, cb2, startTime) {
|
|
634
|
+
return fs$readdir(path7, fs$readdirCallback(
|
|
635
|
+
path7,
|
|
636
636
|
options2,
|
|
637
637
|
cb2,
|
|
638
638
|
startTime
|
|
639
639
|
));
|
|
640
|
-
} : function go$readdir2(
|
|
641
|
-
return fs$readdir(
|
|
642
|
-
|
|
640
|
+
} : function go$readdir2(path7, options2, cb2, startTime) {
|
|
641
|
+
return fs$readdir(path7, options2, fs$readdirCallback(
|
|
642
|
+
path7,
|
|
643
643
|
options2,
|
|
644
644
|
cb2,
|
|
645
645
|
startTime
|
|
646
646
|
));
|
|
647
647
|
};
|
|
648
|
-
return go$readdir(
|
|
649
|
-
function fs$readdirCallback(
|
|
648
|
+
return go$readdir(path6, options, cb);
|
|
649
|
+
function fs$readdirCallback(path7, 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
|
-
[
|
|
654
|
+
[path7, 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(
|
|
725
|
+
function ReadStream(path6, 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(
|
|
745
|
+
function WriteStream(path6, 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 createReadStream(
|
|
764
|
-
return new fs4.ReadStream(
|
|
763
|
+
function createReadStream(path6, options) {
|
|
764
|
+
return new fs4.ReadStream(path6, options);
|
|
765
765
|
}
|
|
766
|
-
function createWriteStream(
|
|
767
|
-
return new fs4.WriteStream(
|
|
766
|
+
function createWriteStream(path6, options) {
|
|
767
|
+
return new fs4.WriteStream(path6, options);
|
|
768
768
|
}
|
|
769
769
|
var fs$open = fs4.open;
|
|
770
770
|
fs4.open = open;
|
|
771
|
-
function open(
|
|
771
|
+
function open(path6, flags, mode, cb) {
|
|
772
772
|
if (typeof mode === "function")
|
|
773
773
|
cb = mode, mode = null;
|
|
774
|
-
return go$open(
|
|
775
|
-
function go$open(
|
|
776
|
-
return fs$open(
|
|
774
|
+
return go$open(path6, flags, mode, cb);
|
|
775
|
+
function go$open(path7, flags2, mode2, cb2, startTime) {
|
|
776
|
+
return fs$open(path7, flags2, mode2, function(err, fd) {
|
|
777
777
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
778
|
-
enqueue([go$open, [
|
|
778
|
+
enqueue([go$open, [path7, 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
|
-
|
|
789
|
+
debug3("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
|
-
|
|
816
|
+
debug3("RETRY", fn.name, args);
|
|
817
817
|
fn.apply(null, args);
|
|
818
818
|
} else if (Date.now() - startTime >= 6e4) {
|
|
819
|
-
|
|
819
|
+
debug3("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
|
-
|
|
828
|
+
debug3("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
|
|
961
|
+
var path6 = __require("path");
|
|
962
962
|
module.exports.checkPath = function checkPath(pth) {
|
|
963
963
|
if (process.platform === "win32") {
|
|
964
|
-
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(
|
|
964
|
+
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path6.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(
|
|
1029
|
-
return fs3.access(
|
|
1028
|
+
function pathExists(path6) {
|
|
1029
|
+
return fs3.access(path6).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(
|
|
1045
|
-
const fd = await fs3.open(
|
|
1044
|
+
async function utimesMillis(path6, atime, mtime) {
|
|
1045
|
+
const fd = await fs3.open(path6, "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(
|
|
1061
|
-
const fd = fs3.openSync(
|
|
1060
|
+
function utimesMillisSync(path6, atime, mtime) {
|
|
1061
|
+
const fd = fs3.openSync(path6, "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
|
|
1077
|
+
var path6 = __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 =
|
|
1106
|
-
const destBaseName =
|
|
1105
|
+
const srcBaseName = path6.basename(src);
|
|
1106
|
+
const destBaseName = path6.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 =
|
|
1129
|
-
const destBaseName =
|
|
1128
|
+
const srcBaseName = path6.basename(src);
|
|
1129
|
+
const destBaseName = path6.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 =
|
|
1149
|
-
const destParent =
|
|
1150
|
-
if (destParent === srcParent || destParent ===
|
|
1148
|
+
const srcParent = path6.resolve(path6.dirname(src));
|
|
1149
|
+
const destParent = path6.resolve(path6.dirname(dest));
|
|
1150
|
+
if (destParent === srcParent || destParent === path6.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 =
|
|
1165
|
-
const destParent =
|
|
1166
|
-
if (destParent === srcParent || destParent ===
|
|
1164
|
+
const srcParent = path6.resolve(path6.dirname(src));
|
|
1165
|
+
const destParent = path6.resolve(path6.dirname(dest));
|
|
1166
|
+
if (destParent === srcParent || destParent === path6.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 =
|
|
1184
|
-
const destArr =
|
|
1183
|
+
const srcArr = path6.resolve(src).split(path6.sep).filter((i) => i);
|
|
1184
|
+
const destArr = path6.resolve(dest).split(path6.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
|
|
1209
|
+
var path6 = __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 =
|
|
1231
|
+
const destParent = path6.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 =
|
|
1286
|
-
const destItem =
|
|
1285
|
+
const srcItem = path6.join(src, item.name);
|
|
1286
|
+
const destItem = path6.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 =
|
|
1305
|
+
resolvedSrc = path6.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 =
|
|
1318
|
+
resolvedDest = path6.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
|
|
1338
|
+
var path6 = __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 =
|
|
1359
|
+
const destParent = path6.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 =
|
|
1429
|
-
const destItem =
|
|
1428
|
+
const srcItem = path6.join(src, item);
|
|
1429
|
+
const destItem = path6.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 =
|
|
1437
|
+
resolvedSrc = path6.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 =
|
|
1450
|
+
resolvedDest = path6.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(
|
|
1488
|
-
fs3.rm(
|
|
1487
|
+
function remove(path6, callback) {
|
|
1488
|
+
fs3.rm(path6, { recursive: true, force: true }, callback);
|
|
1489
1489
|
}
|
|
1490
|
-
function removeSync(
|
|
1491
|
-
fs3.rmSync(
|
|
1490
|
+
function removeSync(path6) {
|
|
1491
|
+
fs3.rmSync(path6, { 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
|
|
1506
|
+
var path6 = __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(
|
|
1516
|
+
return Promise.all(items.map((item) => remove.remove(path6.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 =
|
|
1526
|
+
item = path6.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
|
|
1544
|
+
var path6 = __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 =
|
|
1554
|
+
const dir = path6.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 =
|
|
1580
|
+
const dir = path6.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
|
|
1603
|
+
var path6 = __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 =
|
|
1622
|
+
const dir = path6.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 =
|
|
1642
|
+
const dir = path6.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
|
|
1659
|
+
var path6 = __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 (
|
|
1664
|
+
if (path6.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 =
|
|
1677
|
-
const relativeToDst =
|
|
1676
|
+
const dstdir = path6.dirname(dstpath);
|
|
1677
|
+
const relativeToDst = path6.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:
|
|
1693
|
+
toDst: path6.relative(dstdir, srcpath)
|
|
1694
1694
|
};
|
|
1695
1695
|
}
|
|
1696
1696
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
1697
|
-
if (
|
|
1697
|
+
if (path6.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 =
|
|
1706
|
-
const relativeToDst =
|
|
1705
|
+
const dstdir = path6.dirname(dstpath);
|
|
1706
|
+
const relativeToDst = path6.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:
|
|
1718
|
+
toDst: path6.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
|
|
1766
|
+
var path6 = __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 =
|
|
1789
|
+
const dir = path6.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 =
|
|
1809
|
+
const dir = path6.dirname(dstpath);
|
|
1810
1810
|
const exists = fs3.existsSync(dir);
|
|
1811
1811
|
if (exists) return fs3.symlinkSync(srcpath, dstpath, type);
|
|
1812
1812
|
mkdirsSync(dir);
|
|
@@ -1846,9 +1846,9 @@ var require_ensure = __commonJS({
|
|
|
1846
1846
|
}
|
|
1847
1847
|
});
|
|
1848
1848
|
|
|
1849
|
-
// ../../node_modules/.pnpm/jsonfile@6.
|
|
1849
|
+
// ../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js
|
|
1850
1850
|
var require_utils2 = __commonJS({
|
|
1851
|
-
"../../node_modules/.pnpm/jsonfile@6.
|
|
1851
|
+
"../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports, module) {
|
|
1852
1852
|
"use strict";
|
|
1853
1853
|
function stringify16(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) {
|
|
1854
1854
|
const EOF = finalEOL ? EOL : "";
|
|
@@ -1863,9 +1863,9 @@ var require_utils2 = __commonJS({
|
|
|
1863
1863
|
}
|
|
1864
1864
|
});
|
|
1865
1865
|
|
|
1866
|
-
// ../../node_modules/.pnpm/jsonfile@6.
|
|
1866
|
+
// ../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js
|
|
1867
1867
|
var require_jsonfile = __commonJS({
|
|
1868
|
-
"../../node_modules/.pnpm/jsonfile@6.
|
|
1868
|
+
"../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js"(exports, module) {
|
|
1869
1869
|
"use strict";
|
|
1870
1870
|
var _fs;
|
|
1871
1871
|
try {
|
|
@@ -1927,12 +1927,13 @@ var require_jsonfile = __commonJS({
|
|
|
1927
1927
|
const str = stringify16(obj, options);
|
|
1928
1928
|
return fs3.writeFileSync(file4, str, options);
|
|
1929
1929
|
}
|
|
1930
|
-
|
|
1930
|
+
var jsonfile = {
|
|
1931
1931
|
readFile,
|
|
1932
1932
|
readFileSync,
|
|
1933
1933
|
writeFile,
|
|
1934
1934
|
writeFileSync
|
|
1935
1935
|
};
|
|
1936
|
+
module.exports = jsonfile;
|
|
1936
1937
|
}
|
|
1937
1938
|
});
|
|
1938
1939
|
|
|
@@ -1957,18 +1958,18 @@ var require_output_file = __commonJS({
|
|
|
1957
1958
|
"use strict";
|
|
1958
1959
|
var u = require_universalify().fromPromise;
|
|
1959
1960
|
var fs3 = require_fs();
|
|
1960
|
-
var
|
|
1961
|
+
var path6 = __require("path");
|
|
1961
1962
|
var mkdir = require_mkdirs();
|
|
1962
1963
|
var pathExists = require_path_exists().pathExists;
|
|
1963
1964
|
async function outputFile(file4, data, encoding = "utf-8") {
|
|
1964
|
-
const dir =
|
|
1965
|
+
const dir = path6.dirname(file4);
|
|
1965
1966
|
if (!await pathExists(dir)) {
|
|
1966
1967
|
await mkdir.mkdirs(dir);
|
|
1967
1968
|
}
|
|
1968
1969
|
return fs3.writeFile(file4, data, encoding);
|
|
1969
1970
|
}
|
|
1970
1971
|
function outputFileSync(file4, ...args) {
|
|
1971
|
-
const dir =
|
|
1972
|
+
const dir = path6.dirname(file4);
|
|
1972
1973
|
if (!fs3.existsSync(dir)) {
|
|
1973
1974
|
mkdir.mkdirsSync(dir);
|
|
1974
1975
|
}
|
|
@@ -2032,7 +2033,7 @@ var require_move = __commonJS({
|
|
|
2032
2033
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move.js"(exports, module) {
|
|
2033
2034
|
"use strict";
|
|
2034
2035
|
var fs3 = require_fs();
|
|
2035
|
-
var
|
|
2036
|
+
var path6 = __require("path");
|
|
2036
2037
|
var { copy } = require_copy2();
|
|
2037
2038
|
var { remove } = require_remove();
|
|
2038
2039
|
var { mkdirp } = require_mkdirs();
|
|
@@ -2042,8 +2043,8 @@ var require_move = __commonJS({
|
|
|
2042
2043
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
2043
2044
|
const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
|
|
2044
2045
|
await stat.checkParentPaths(src, srcStat, dest, "move");
|
|
2045
|
-
const destParent =
|
|
2046
|
-
const parsedParentPath =
|
|
2046
|
+
const destParent = path6.dirname(dest);
|
|
2047
|
+
const parsedParentPath = path6.parse(destParent);
|
|
2047
2048
|
if (parsedParentPath.root !== destParent) {
|
|
2048
2049
|
await mkdirp(destParent);
|
|
2049
2050
|
}
|
|
@@ -2084,7 +2085,7 @@ var require_move_sync = __commonJS({
|
|
|
2084
2085
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module) {
|
|
2085
2086
|
"use strict";
|
|
2086
2087
|
var fs3 = require_graceful_fs();
|
|
2087
|
-
var
|
|
2088
|
+
var path6 = __require("path");
|
|
2088
2089
|
var copySync = require_copy2().copySync;
|
|
2089
2090
|
var removeSync = require_remove().removeSync;
|
|
2090
2091
|
var mkdirpSync = require_mkdirs().mkdirpSync;
|
|
@@ -2094,12 +2095,12 @@ var require_move_sync = __commonJS({
|
|
|
2094
2095
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
2095
2096
|
const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
|
|
2096
2097
|
stat.checkParentPathsSync(src, srcStat, dest, "move");
|
|
2097
|
-
if (!isParentRoot(dest)) mkdirpSync(
|
|
2098
|
+
if (!isParentRoot(dest)) mkdirpSync(path6.dirname(dest));
|
|
2098
2099
|
return doRename(src, dest, overwrite, isChangingCase);
|
|
2099
2100
|
}
|
|
2100
2101
|
function isParentRoot(dest) {
|
|
2101
|
-
const parent =
|
|
2102
|
-
const parsedPath =
|
|
2102
|
+
const parent = path6.dirname(dest);
|
|
2103
|
+
const parsedPath = path6.parse(parent);
|
|
2103
2104
|
return parsedPath.root === parent;
|
|
2104
2105
|
}
|
|
2105
2106
|
function doRename(src, dest, overwrite, isChangingCase) {
|
|
@@ -2213,8 +2214,15 @@ function getMappings(mappings, datamodel) {
|
|
|
2213
2214
|
// src/generateClient.ts
|
|
2214
2215
|
var import_fs_extra = __toESM(require_lib());
|
|
2215
2216
|
import fs2 from "node:fs/promises";
|
|
2216
|
-
import
|
|
2217
|
-
import {
|
|
2217
|
+
import path5 from "node:path";
|
|
2218
|
+
import { overwriteFile } from "@prisma/fetch-engine";
|
|
2219
|
+
import {
|
|
2220
|
+
assertNever as assertNever3,
|
|
2221
|
+
ClientEngineType as ClientEngineType3,
|
|
2222
|
+
getClientEngineType as getClientEngineType4,
|
|
2223
|
+
pathToPosix as pathToPosix3,
|
|
2224
|
+
setClassName
|
|
2225
|
+
} from "@prisma/internals";
|
|
2218
2226
|
import { glob } from "fast-glob";
|
|
2219
2227
|
|
|
2220
2228
|
// ../../node_modules/.pnpm/kleur@4.1.5/node_modules/kleur/colors.mjs
|
|
@@ -2886,6 +2894,9 @@ var GenericArgsInfo = class {
|
|
|
2886
2894
|
}
|
|
2887
2895
|
};
|
|
2888
2896
|
|
|
2897
|
+
// src/TSClient/file-generators/BrowserFile.ts
|
|
2898
|
+
import { getClientEngineType } from "@prisma/internals";
|
|
2899
|
+
|
|
2889
2900
|
// src/TSClient/ModelExports.ts
|
|
2890
2901
|
import * as ts3 from "@prisma/ts-builders";
|
|
2891
2902
|
function modelExports(context) {
|
|
@@ -2911,7 +2922,9 @@ var jsDocHeader = `/*
|
|
|
2911
2922
|
* \u{1F7E2} You can import this file directly.
|
|
2912
2923
|
*/
|
|
2913
2924
|
`;
|
|
2914
|
-
function createBrowserFile(context,
|
|
2925
|
+
function createBrowserFile(context, options) {
|
|
2926
|
+
const clientEngineType = getClientEngineType(options.generator);
|
|
2927
|
+
options.generator.config.engineType = clientEngineType;
|
|
2915
2928
|
return `${jsDocHeader}
|
|
2916
2929
|
import * as Prisma from '${context.importFileName("./internal/prismaNamespaceBrowser")}'
|
|
2917
2930
|
export { Prisma }
|
|
@@ -2923,7 +2936,7 @@ ${modelExports(context).join("\n")}
|
|
|
2923
2936
|
|
|
2924
2937
|
// src/TSClient/file-generators/ClassFile.ts
|
|
2925
2938
|
import path2 from "node:path";
|
|
2926
|
-
import { pathToPosix } from "@prisma/internals";
|
|
2939
|
+
import { getClientEngineType as getClientEngineType2, pathToPosix } from "@prisma/internals";
|
|
2927
2940
|
import * as ts6 from "@prisma/ts-builders";
|
|
2928
2941
|
import ciInfo from "ci-info";
|
|
2929
2942
|
|
|
@@ -3781,7 +3794,7 @@ export interface PrismaClientConstructor {
|
|
|
3781
3794
|
${this.jsDoc}
|
|
3782
3795
|
export interface PrismaClient<
|
|
3783
3796
|
in LogOpts extends Prisma.LogLevel = never,
|
|
3784
|
-
in out OmitOpts extends Prisma.PrismaClientOptions['omit'] =
|
|
3797
|
+
in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = Prisma.PrismaClientOptions['omit'],
|
|
3785
3798
|
in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
|
|
3786
3799
|
> {
|
|
3787
3800
|
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }
|
|
@@ -3873,6 +3886,8 @@ function clientConfig(context, options) {
|
|
|
3873
3886
|
activeProvider,
|
|
3874
3887
|
moduleFormat
|
|
3875
3888
|
} = options;
|
|
3889
|
+
const clientEngineType = getClientEngineType2(generator);
|
|
3890
|
+
generator.config.engineType = clientEngineType;
|
|
3876
3891
|
const datasourceFilePath = datasources[0].sourceFilePath;
|
|
3877
3892
|
const config = {
|
|
3878
3893
|
generator,
|
|
@@ -3899,7 +3914,51 @@ ${buildDebugInitialization(edge)}
|
|
|
3899
3914
|
}
|
|
3900
3915
|
|
|
3901
3916
|
// src/TSClient/file-generators/ClientFile.ts
|
|
3917
|
+
import path4 from "node:path";
|
|
3918
|
+
import { ClientEngineType as ClientEngineType2, getClientEngineType as getClientEngineType3 } from "@prisma/internals";
|
|
3902
3919
|
import * as ts7 from "@prisma/ts-builders";
|
|
3920
|
+
|
|
3921
|
+
// src/utils/buildNFTAnnotations.ts
|
|
3922
|
+
import { getNodeAPIName } from "@prisma/get-platform";
|
|
3923
|
+
import { ClientEngineType, parseAWSNodejsRuntimeEnvVarVersion, pathToPosix as pathToPosix2 } from "@prisma/internals";
|
|
3924
|
+
import path3 from "path";
|
|
3925
|
+
function buildNFTAnnotations(noEngine, engineType, binaryTargets, relativeOutdir) {
|
|
3926
|
+
if (noEngine === true) return "";
|
|
3927
|
+
if (binaryTargets === void 0) {
|
|
3928
|
+
return "";
|
|
3929
|
+
}
|
|
3930
|
+
if (process.env.NETLIFY) {
|
|
3931
|
+
const isNodeMajor20OrUp = parseInt(process.versions.node.split(".")[0]) >= 20;
|
|
3932
|
+
const awsRuntimeVersion = parseAWSNodejsRuntimeEnvVarVersion();
|
|
3933
|
+
const isRuntimeEnvVar20OrUp = awsRuntimeVersion && awsRuntimeVersion >= 20;
|
|
3934
|
+
const isRuntimeEnvVar18OrDown = awsRuntimeVersion && awsRuntimeVersion <= 18;
|
|
3935
|
+
if ((isNodeMajor20OrUp || isRuntimeEnvVar20OrUp) && !isRuntimeEnvVar18OrDown) {
|
|
3936
|
+
binaryTargets = ["rhel-openssl-3.0.x"];
|
|
3937
|
+
} else {
|
|
3938
|
+
binaryTargets = ["rhel-openssl-1.0.x"];
|
|
3939
|
+
}
|
|
3940
|
+
}
|
|
3941
|
+
const engineAnnotations = binaryTargets.map((binaryTarget) => {
|
|
3942
|
+
const engineFilename = getQueryEngineFilename(engineType, binaryTarget);
|
|
3943
|
+
return engineFilename ? buildNFTAnnotation(engineFilename, relativeOutdir) : "";
|
|
3944
|
+
}).join("\n");
|
|
3945
|
+
return `${engineAnnotations}`;
|
|
3946
|
+
}
|
|
3947
|
+
function getQueryEngineFilename(engineType, binaryTarget) {
|
|
3948
|
+
if (engineType === ClientEngineType.Library) {
|
|
3949
|
+
return getNodeAPIName(binaryTarget, "fs");
|
|
3950
|
+
}
|
|
3951
|
+
return void 0;
|
|
3952
|
+
}
|
|
3953
|
+
function buildNFTAnnotation(fileName, relativeOutdir) {
|
|
3954
|
+
const relativeFilePath = path3.join(relativeOutdir, fileName);
|
|
3955
|
+
return `
|
|
3956
|
+
// file annotations for bundling tools to include these files
|
|
3957
|
+
path.join(__dirname, ${JSON.stringify(pathToPosix2(fileName))})
|
|
3958
|
+
path.join(process.cwd(), ${JSON.stringify(pathToPosix2(relativeFilePath))})`;
|
|
3959
|
+
}
|
|
3960
|
+
|
|
3961
|
+
// src/TSClient/file-generators/ClientFile.ts
|
|
3903
3962
|
var jsDocHeader3 = `/*
|
|
3904
3963
|
* This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types.
|
|
3905
3964
|
* If you're looking for something you can import in the client-side of your application, please refer to the \`browser.ts\` file instead.
|
|
@@ -3908,6 +3967,8 @@ var jsDocHeader3 = `/*
|
|
|
3908
3967
|
*/
|
|
3909
3968
|
`;
|
|
3910
3969
|
function createClientFile(context, options) {
|
|
3970
|
+
const clientEngineType = getClientEngineType3(options.generator);
|
|
3971
|
+
options.generator.config.engineType = clientEngineType;
|
|
3911
3972
|
const imports = [
|
|
3912
3973
|
ts7.moduleImport(context.runtimeImport).asNamespace("runtime"),
|
|
3913
3974
|
ts7.moduleImport(context.importFileName("./enums")).asNamespace("$Enums"),
|
|
@@ -3933,6 +3994,8 @@ function createClientFile(context, options) {
|
|
|
3933
3994
|
)
|
|
3934
3995
|
)
|
|
3935
3996
|
].map((e) => ts7.stringify(e));
|
|
3997
|
+
const binaryTargets = clientEngineType === ClientEngineType2.Library ? Object.keys(options.binaryPaths.libqueryEngine ?? {}) : [];
|
|
3998
|
+
const relativeOutdir = path4.relative(process.cwd(), options.outputDir);
|
|
3936
3999
|
return `${jsDocHeader3}
|
|
3937
4000
|
${buildPreamble(options.edge, options.moduleFormat)}
|
|
3938
4001
|
${imports.join("\n")}
|
|
@@ -3940,6 +4003,8 @@ ${imports.join("\n")}
|
|
|
3940
4003
|
${exports.join("\n")}
|
|
3941
4004
|
export { Prisma }
|
|
3942
4005
|
|
|
4006
|
+
${buildNFTAnnotations(options.edge, clientEngineType, binaryTargets, relativeOutdir)}
|
|
4007
|
+
|
|
3943
4008
|
${modelExports(context).join("\n")}
|
|
3944
4009
|
`;
|
|
3945
4010
|
}
|
|
@@ -5817,11 +5882,18 @@ function buildClientOptions(context, options) {
|
|
|
5817
5882
|
);
|
|
5818
5883
|
if (["library", "client", "wasm-compiler-edge"].includes(options.runtimeName)) {
|
|
5819
5884
|
clientOptions.add(
|
|
5820
|
-
ts19.property("adapter", ts19.
|
|
5885
|
+
ts19.property("adapter", ts19.namedType("runtime.SqlDriverAdapterFactory")).optional().setDocComment(
|
|
5821
5886
|
ts19.docComment("Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`")
|
|
5822
5887
|
)
|
|
5823
5888
|
);
|
|
5824
5889
|
}
|
|
5890
|
+
clientOptions.add(
|
|
5891
|
+
ts19.property("accelerateUrl", ts19.stringType).optional().setDocComment(
|
|
5892
|
+
ts19.docComment(
|
|
5893
|
+
"Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database."
|
|
5894
|
+
)
|
|
5895
|
+
)
|
|
5896
|
+
);
|
|
5825
5897
|
clientOptions.add(
|
|
5826
5898
|
ts19.property("omit", ts19.namedType("GlobalOmitConfig")).optional().setDocComment(ts19.docComment`
|
|
5827
5899
|
Global configuration for omitting model fields by default.
|
|
@@ -6191,7 +6263,8 @@ function buildClient({
|
|
|
6191
6263
|
moduleFormat,
|
|
6192
6264
|
tsNoCheckPreamble: tsNoCheckPreamble2
|
|
6193
6265
|
}) {
|
|
6194
|
-
const
|
|
6266
|
+
const clientEngineType = getClientEngineType4(generator);
|
|
6267
|
+
const runtimeName = getRuntimeNameForTarget(target, clientEngineType);
|
|
6195
6268
|
const outputName = generatedFileNameMapper(generatedFileExtension);
|
|
6196
6269
|
const importName = importFileNameMapper(importFileExtension);
|
|
6197
6270
|
const clientOptions = {
|
|
@@ -6278,6 +6351,7 @@ async function generateClient(options) {
|
|
|
6278
6351
|
moduleFormat,
|
|
6279
6352
|
tsNoCheckPreamble: tsNoCheckPreamble2
|
|
6280
6353
|
} = options;
|
|
6354
|
+
const clientEngineType = getClientEngineType4(generator);
|
|
6281
6355
|
const { runtimeBase, outputDir } = await getGenerationDirs(options);
|
|
6282
6356
|
const { prismaClientDmmf, fileMap } = buildClient({
|
|
6283
6357
|
datamodel,
|
|
@@ -6316,11 +6390,27 @@ To learn more about how to rename models, check out https://pris.ly/d/naming-mod
|
|
|
6316
6390
|
await deleteOutputDir(outputDir);
|
|
6317
6391
|
await (0, import_fs_extra.ensureDir)(outputDir);
|
|
6318
6392
|
await writeFileMap(outputDir, fileMap);
|
|
6393
|
+
const enginePath = clientEngineType === ClientEngineType3.Library ? binaryPaths.libqueryEngine : void 0;
|
|
6394
|
+
if (enginePath) {
|
|
6395
|
+
if (process.env.NETLIFY) {
|
|
6396
|
+
await (0, import_fs_extra.ensureDir)("/tmp/prisma-engines");
|
|
6397
|
+
}
|
|
6398
|
+
for (const [binaryTarget, filePath] of Object.entries(enginePath)) {
|
|
6399
|
+
const fileName = path5.basename(filePath);
|
|
6400
|
+
let target2;
|
|
6401
|
+
if (process.env.NETLIFY && !["rhel-openssl-1.0.x", "rhel-openssl-3.0.x"].includes(binaryTarget)) {
|
|
6402
|
+
target2 = path5.join("/tmp/prisma-engines", fileName);
|
|
6403
|
+
} else {
|
|
6404
|
+
target2 = path5.join(outputDir, fileName);
|
|
6405
|
+
}
|
|
6406
|
+
await overwriteFile(filePath, target2);
|
|
6407
|
+
}
|
|
6408
|
+
}
|
|
6319
6409
|
}
|
|
6320
6410
|
function writeFileMap(outputDir, fileMap) {
|
|
6321
6411
|
return Promise.all(
|
|
6322
6412
|
Object.entries(fileMap).map(async ([fileName, content]) => {
|
|
6323
|
-
const absolutePath =
|
|
6413
|
+
const absolutePath = path5.join(outputDir, fileName);
|
|
6324
6414
|
await fs2.rm(absolutePath, { recursive: true, force: true });
|
|
6325
6415
|
if (typeof content === "string" || Buffer.isBuffer(content)) {
|
|
6326
6416
|
await fs2.writeFile(absolutePath, content);
|
|
@@ -6409,21 +6499,21 @@ function validateDmmfAgainstDenylists(prismaClientDmmf) {
|
|
|
6409
6499
|
return errorArray.length > 0 ? errorArray : null;
|
|
6410
6500
|
}
|
|
6411
6501
|
async function getGenerationDirs({ runtimeBase, outputDir }) {
|
|
6412
|
-
const normalizedOutputDir =
|
|
6413
|
-
const normalizedRuntimeBase =
|
|
6414
|
-
const userPackageRoot = await packageUp({ cwd:
|
|
6415
|
-
const userProjectRoot = userPackageRoot ?
|
|
6502
|
+
const normalizedOutputDir = path5.normalize(outputDir);
|
|
6503
|
+
const normalizedRuntimeBase = pathToPosix3(runtimeBase);
|
|
6504
|
+
const userPackageRoot = await packageUp({ cwd: path5.dirname(normalizedOutputDir) });
|
|
6505
|
+
const userProjectRoot = userPackageRoot ? path5.dirname(userPackageRoot) : process.cwd();
|
|
6416
6506
|
return {
|
|
6417
6507
|
runtimeBase: normalizedRuntimeBase,
|
|
6418
6508
|
outputDir: normalizedOutputDir,
|
|
6419
6509
|
projectRoot: userProjectRoot
|
|
6420
6510
|
};
|
|
6421
6511
|
}
|
|
6422
|
-
function getRuntimeNameForTarget(target) {
|
|
6512
|
+
function getRuntimeNameForTarget(target, engineType) {
|
|
6423
6513
|
switch (target) {
|
|
6424
6514
|
case "nodejs":
|
|
6425
6515
|
case "deno":
|
|
6426
|
-
return
|
|
6516
|
+
return getNodeRuntimeName(engineType);
|
|
6427
6517
|
case "workerd":
|
|
6428
6518
|
case "vercel-edge":
|
|
6429
6519
|
return "wasm-compiler-edge";
|
|
@@ -6431,6 +6521,15 @@ function getRuntimeNameForTarget(target) {
|
|
|
6431
6521
|
assertNever3(target, "Unknown runtime target");
|
|
6432
6522
|
}
|
|
6433
6523
|
}
|
|
6524
|
+
function getNodeRuntimeName(engineType) {
|
|
6525
|
+
if (engineType === ClientEngineType3.Library) {
|
|
6526
|
+
return "library";
|
|
6527
|
+
}
|
|
6528
|
+
if (engineType === ClientEngineType3.Client) {
|
|
6529
|
+
return "client";
|
|
6530
|
+
}
|
|
6531
|
+
assertNever3(engineType, "Unknown engine type");
|
|
6532
|
+
}
|
|
6434
6533
|
async function deleteOutputDir(outputDir) {
|
|
6435
6534
|
try {
|
|
6436
6535
|
const files = await fs2.readdir(outputDir);
|
|
@@ -6465,12 +6564,14 @@ async function deleteOutputDir(outputDir) {
|
|
|
6465
6564
|
}
|
|
6466
6565
|
|
|
6467
6566
|
// src/generator.ts
|
|
6567
|
+
import { Debug as Debug2 } from "@prisma/debug";
|
|
6468
6568
|
import { enginesVersion } from "@prisma/engines-version";
|
|
6469
|
-
import { parseEnvValue } from "@prisma/internals";
|
|
6569
|
+
import { ClientEngineType as ClientEngineType4, getClientEngineType as getClientEngineType5, parseEnvValue } from "@prisma/internals";
|
|
6470
6570
|
import { getTsconfig } from "get-tsconfig";
|
|
6571
|
+
import { match as match2 } from "ts-pattern";
|
|
6471
6572
|
|
|
6472
6573
|
// package.json
|
|
6473
|
-
var version = "6.19.0-integration-
|
|
6574
|
+
var version = "6.19.0-integration-next.15";
|
|
6474
6575
|
|
|
6475
6576
|
// src/module-format.ts
|
|
6476
6577
|
function parseModuleFormat(format) {
|
|
@@ -6541,6 +6642,7 @@ function parseRuntimeTargetFromUnknown(target) {
|
|
|
6541
6642
|
}
|
|
6542
6643
|
|
|
6543
6644
|
// src/generator.ts
|
|
6645
|
+
var debug2 = Debug2("prisma:client:generator");
|
|
6544
6646
|
var missingOutputErrorMessage = `An output path is required for the \`prisma-client\` generator. Please provide an output path in your schema file:
|
|
6545
6647
|
|
|
6546
6648
|
${dim(`generator client {
|
|
@@ -6559,11 +6661,13 @@ function getOutputPath(config) {
|
|
|
6559
6661
|
var PrismaClientTsGenerator = class {
|
|
6560
6662
|
name = "prisma-client-ts";
|
|
6561
6663
|
getManifest(config) {
|
|
6664
|
+
const requiresEngines = match2(getClientEngineType5(config)).with(ClientEngineType4.Library, () => ["libqueryEngine"]).with(ClientEngineType4.Client, () => []).exhaustive();
|
|
6665
|
+
debug2("requiresEngines", requiresEngines);
|
|
6562
6666
|
return Promise.resolve({
|
|
6563
6667
|
defaultOutput: getOutputPath(config),
|
|
6564
6668
|
prettyName: "Prisma Client",
|
|
6565
6669
|
version,
|
|
6566
|
-
requiresEngines
|
|
6670
|
+
requiresEngines,
|
|
6567
6671
|
requiresEngineVersion: enginesVersion
|
|
6568
6672
|
});
|
|
6569
6673
|
}
|