@prisma/client-generator-js 6.20.0-integration-next.10 → 6.20.0-integration-next.12
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.js +155 -188
- package/dist/index.mjs +149 -182
- package/package.json +9 -9
- package/dist/utils/buildDirname.d.ts +0 -7
package/dist/index.js
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(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(
|
|
121
|
+
fs3.lchown = function(path5, 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(path5, mode, callback) {
|
|
189
189
|
fs4.open(
|
|
190
|
-
|
|
190
|
+
path5,
|
|
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(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 {
|
|
@@ -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(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(
|
|
242
|
-
var fd = fs4.openSync(
|
|
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(
|
|
362
|
-
if (!(this instanceof ReadStream)) return new ReadStream(
|
|
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 =
|
|
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(
|
|
411
|
-
if (!(this instanceof WriteStream)) return new WriteStream(
|
|
410
|
+
function WriteStream(path5, options) {
|
|
411
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path5, options);
|
|
412
412
|
Stream.call(this);
|
|
413
|
-
this.path =
|
|
413
|
+
this.path = path5;
|
|
414
414
|
this.fd = null;
|
|
415
415
|
this.writable = true;
|
|
416
416
|
this.flags = "w";
|
|
@@ -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(path5, 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(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, [
|
|
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(
|
|
574
|
+
function writeFile(path5, 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(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, [
|
|
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(
|
|
592
|
+
function appendFile(path5, 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(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, [
|
|
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(
|
|
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(
|
|
634
|
-
return fs$readdir(
|
|
635
|
-
|
|
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(
|
|
641
|
-
return fs$readdir(
|
|
642
|
-
|
|
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(
|
|
649
|
-
function fs$readdirCallback(
|
|
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
|
-
[
|
|
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(
|
|
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(
|
|
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 createReadStream(
|
|
764
|
-
return new fs4.ReadStream(
|
|
763
|
+
function createReadStream(path5, options) {
|
|
764
|
+
return new fs4.ReadStream(path5, options);
|
|
765
765
|
}
|
|
766
|
-
function createWriteStream(
|
|
767
|
-
return new fs4.WriteStream(
|
|
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(
|
|
771
|
+
function open(path5, 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(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, [
|
|
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);
|
|
@@ -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"(exports2, module2) {
|
|
960
960
|
"use strict";
|
|
961
|
-
var
|
|
961
|
+
var path5 = require("path");
|
|
962
962
|
module2.exports.checkPath = function checkPath(pth) {
|
|
963
963
|
if (process.platform === "win32") {
|
|
964
|
-
const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(
|
|
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(
|
|
1029
|
-
return fs3.access(
|
|
1028
|
+
function pathExists(path5) {
|
|
1029
|
+
return fs3.access(path5).then(() => true).catch(() => false);
|
|
1030
1030
|
}
|
|
1031
1031
|
module2.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(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(
|
|
1061
|
-
const fd = fs3.openSync(
|
|
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"(exports2, module2) {
|
|
1075
1075
|
"use strict";
|
|
1076
1076
|
var fs3 = require_fs();
|
|
1077
|
-
var
|
|
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 =
|
|
1106
|
-
const destBaseName =
|
|
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 =
|
|
1129
|
-
const destBaseName =
|
|
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 =
|
|
1149
|
-
const destParent =
|
|
1150
|
-
if (destParent === srcParent || destParent ===
|
|
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 =
|
|
1165
|
-
const destParent =
|
|
1166
|
-
if (destParent === srcParent || destParent ===
|
|
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 =
|
|
1184
|
-
const destArr =
|
|
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"(exports2, module2) {
|
|
1207
1207
|
"use strict";
|
|
1208
1208
|
var fs3 = require_fs();
|
|
1209
|
-
var
|
|
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 =
|
|
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 =
|
|
1286
|
-
const destItem =
|
|
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 =
|
|
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 =
|
|
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"(exports2, module2) {
|
|
1336
1336
|
"use strict";
|
|
1337
1337
|
var fs3 = require_graceful_fs();
|
|
1338
|
-
var
|
|
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 =
|
|
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 =
|
|
1429
|
-
const destItem =
|
|
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 =
|
|
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 =
|
|
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(
|
|
1488
|
-
fs3.rm(
|
|
1487
|
+
function remove(path5, callback) {
|
|
1488
|
+
fs3.rm(path5, { recursive: true, force: true }, callback);
|
|
1489
1489
|
}
|
|
1490
|
-
function removeSync(
|
|
1491
|
-
fs3.rmSync(
|
|
1490
|
+
function removeSync(path5) {
|
|
1491
|
+
fs3.rmSync(path5, { recursive: true, force: true });
|
|
1492
1492
|
}
|
|
1493
1493
|
module2.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 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(
|
|
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 =
|
|
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"(exports2, module2) {
|
|
1542
1542
|
"use strict";
|
|
1543
1543
|
var u = require_universalify().fromPromise;
|
|
1544
|
-
var
|
|
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 =
|
|
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 =
|
|
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"(exports2, module2) {
|
|
1601
1601
|
"use strict";
|
|
1602
1602
|
var u = require_universalify().fromPromise;
|
|
1603
|
-
var
|
|
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 =
|
|
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 =
|
|
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"(exports2, module2) {
|
|
1658
1658
|
"use strict";
|
|
1659
|
-
var
|
|
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 (
|
|
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 =
|
|
1677
|
-
const relativeToDst =
|
|
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:
|
|
1693
|
+
toDst: path5.relative(dstdir, srcpath)
|
|
1694
1694
|
};
|
|
1695
1695
|
}
|
|
1696
1696
|
function symlinkPathsSync(srcpath, dstpath) {
|
|
1697
|
-
if (
|
|
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 =
|
|
1706
|
-
const relativeToDst =
|
|
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:
|
|
1718
|
+
toDst: path5.relative(dstdir, srcpath)
|
|
1719
1719
|
};
|
|
1720
1720
|
}
|
|
1721
1721
|
module2.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"(exports2, module2) {
|
|
1764
1764
|
"use strict";
|
|
1765
1765
|
var u = require_universalify().fromPromise;
|
|
1766
|
-
var
|
|
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 =
|
|
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 =
|
|
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);
|
|
@@ -1957,18 +1957,18 @@ var require_output_file = __commonJS({
|
|
|
1957
1957
|
"use strict";
|
|
1958
1958
|
var u = require_universalify().fromPromise;
|
|
1959
1959
|
var fs3 = require_fs();
|
|
1960
|
-
var
|
|
1960
|
+
var path5 = require("path");
|
|
1961
1961
|
var mkdir = require_mkdirs();
|
|
1962
1962
|
var pathExists = require_path_exists().pathExists;
|
|
1963
1963
|
async function outputFile(file4, data, encoding = "utf-8") {
|
|
1964
|
-
const dir =
|
|
1964
|
+
const dir = path5.dirname(file4);
|
|
1965
1965
|
if (!await pathExists(dir)) {
|
|
1966
1966
|
await mkdir.mkdirs(dir);
|
|
1967
1967
|
}
|
|
1968
1968
|
return fs3.writeFile(file4, data, encoding);
|
|
1969
1969
|
}
|
|
1970
1970
|
function outputFileSync(file4, ...args) {
|
|
1971
|
-
const dir =
|
|
1971
|
+
const dir = path5.dirname(file4);
|
|
1972
1972
|
if (!fs3.existsSync(dir)) {
|
|
1973
1973
|
mkdir.mkdirsSync(dir);
|
|
1974
1974
|
}
|
|
@@ -2032,7 +2032,7 @@ var require_move = __commonJS({
|
|
|
2032
2032
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
|
|
2033
2033
|
"use strict";
|
|
2034
2034
|
var fs3 = require_fs();
|
|
2035
|
-
var
|
|
2035
|
+
var path5 = require("path");
|
|
2036
2036
|
var { copy } = require_copy2();
|
|
2037
2037
|
var { remove } = require_remove();
|
|
2038
2038
|
var { mkdirp } = require_mkdirs();
|
|
@@ -2042,8 +2042,8 @@ var require_move = __commonJS({
|
|
|
2042
2042
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
2043
2043
|
const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
|
|
2044
2044
|
await stat.checkParentPaths(src, srcStat, dest, "move");
|
|
2045
|
-
const destParent =
|
|
2046
|
-
const parsedParentPath =
|
|
2045
|
+
const destParent = path5.dirname(dest);
|
|
2046
|
+
const parsedParentPath = path5.parse(destParent);
|
|
2047
2047
|
if (parsedParentPath.root !== destParent) {
|
|
2048
2048
|
await mkdirp(destParent);
|
|
2049
2049
|
}
|
|
@@ -2084,7 +2084,7 @@ var require_move_sync = __commonJS({
|
|
|
2084
2084
|
"../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) {
|
|
2085
2085
|
"use strict";
|
|
2086
2086
|
var fs3 = require_graceful_fs();
|
|
2087
|
-
var
|
|
2087
|
+
var path5 = require("path");
|
|
2088
2088
|
var copySync = require_copy2().copySync;
|
|
2089
2089
|
var removeSync = require_remove().removeSync;
|
|
2090
2090
|
var mkdirpSync = require_mkdirs().mkdirpSync;
|
|
@@ -2094,12 +2094,12 @@ var require_move_sync = __commonJS({
|
|
|
2094
2094
|
const overwrite = opts.overwrite || opts.clobber || false;
|
|
2095
2095
|
const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
|
|
2096
2096
|
stat.checkParentPathsSync(src, srcStat, dest, "move");
|
|
2097
|
-
if (!isParentRoot(dest)) mkdirpSync(
|
|
2097
|
+
if (!isParentRoot(dest)) mkdirpSync(path5.dirname(dest));
|
|
2098
2098
|
return doRename(src, dest, overwrite, isChangingCase);
|
|
2099
2099
|
}
|
|
2100
2100
|
function isParentRoot(dest) {
|
|
2101
|
-
const parent =
|
|
2102
|
-
const parsedPath =
|
|
2101
|
+
const parent = path5.dirname(dest);
|
|
2102
|
+
const parsedPath = path5.parse(parent);
|
|
2103
2103
|
return parsedPath.root === parent;
|
|
2104
2104
|
}
|
|
2105
2105
|
function doRename(src, dest, overwrite, isChangingCase) {
|
|
@@ -2222,7 +2222,7 @@ function getMappings(mappings, datamodel) {
|
|
|
2222
2222
|
}
|
|
2223
2223
|
|
|
2224
2224
|
// src/generateClient.ts
|
|
2225
|
-
var
|
|
2225
|
+
var import_internals7 = require("@prisma/internals");
|
|
2226
2226
|
var import_crypto = require("crypto");
|
|
2227
2227
|
var import_env_paths = __toESM(require("env-paths"));
|
|
2228
2228
|
var import_promises = __toESM(require("fs/promises"));
|
|
@@ -2278,7 +2278,7 @@ var bgWhite = init(47, 49);
|
|
|
2278
2278
|
|
|
2279
2279
|
// src/generateClient.ts
|
|
2280
2280
|
var import_package_up = require("package-up");
|
|
2281
|
-
var
|
|
2281
|
+
var import_path = __toESM(require("path"));
|
|
2282
2282
|
|
|
2283
2283
|
// ../client/package.json
|
|
2284
2284
|
var package_default = {
|
|
@@ -4332,7 +4332,6 @@ function fluentWrapperName(modelName) {
|
|
|
4332
4332
|
var import_dmmf = require("@prisma/dmmf");
|
|
4333
4333
|
var ts12 = __toESM(require("@prisma/ts-builders"));
|
|
4334
4334
|
var import_indent_string7 = __toESM(require("indent-string"));
|
|
4335
|
-
var import_path = __toESM(require("path"));
|
|
4336
4335
|
|
|
4337
4336
|
// src/dmmf.ts
|
|
4338
4337
|
var import_client_common10 = require("@prisma/client-common");
|
|
@@ -4539,36 +4538,6 @@ function buildDebugInitialization(edge) {
|
|
|
4539
4538
|
`;
|
|
4540
4539
|
}
|
|
4541
4540
|
|
|
4542
|
-
// src/utils/buildDirname.ts
|
|
4543
|
-
var import_internals4 = require("@prisma/internals");
|
|
4544
|
-
function buildDirname(edge, relativeOutdir) {
|
|
4545
|
-
if (edge === true) {
|
|
4546
|
-
return buildDirnameDefault();
|
|
4547
|
-
}
|
|
4548
|
-
return buildDirnameFind(relativeOutdir);
|
|
4549
|
-
}
|
|
4550
|
-
function buildDirnameFind(relativeOutdir) {
|
|
4551
|
-
return `
|
|
4552
|
-
const fs = require('fs')
|
|
4553
|
-
|
|
4554
|
-
config.dirname = __dirname
|
|
4555
|
-
if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) {
|
|
4556
|
-
const alternativePaths = [
|
|
4557
|
-
${JSON.stringify((0, import_internals4.pathToPosix)(relativeOutdir))},
|
|
4558
|
-
${JSON.stringify((0, import_internals4.pathToPosix)(relativeOutdir).split("/").slice(1).join("/"))},
|
|
4559
|
-
]
|
|
4560
|
-
|
|
4561
|
-
const alternativePath = alternativePaths.find((altPath) => {
|
|
4562
|
-
return fs.existsSync(path.join(process.cwd(), altPath, 'schema.prisma'))
|
|
4563
|
-
}) ?? alternativePaths[0]
|
|
4564
|
-
|
|
4565
|
-
config.dirname = path.join(process.cwd(), alternativePath)
|
|
4566
|
-
}`;
|
|
4567
|
-
}
|
|
4568
|
-
function buildDirnameDefault() {
|
|
4569
|
-
return `config.dirname = '/'`;
|
|
4570
|
-
}
|
|
4571
|
-
|
|
4572
4541
|
// src/utils/buildDMMF.ts
|
|
4573
4542
|
var import_client_common12 = require("@prisma/client-common");
|
|
4574
4543
|
function buildRuntimeDataModel(datamodel, runtimeNameJs) {
|
|
@@ -5274,7 +5243,7 @@ var GenerateContext = class {
|
|
|
5274
5243
|
|
|
5275
5244
|
// src/TSClient/PrismaClient.ts
|
|
5276
5245
|
var import_client_common15 = require("@prisma/client-common");
|
|
5277
|
-
var
|
|
5246
|
+
var import_internals4 = require("@prisma/internals");
|
|
5278
5247
|
var ts11 = __toESM(require("@prisma/ts-builders"));
|
|
5279
5248
|
var import_indent_string6 = __toESM(require("indent-string"));
|
|
5280
5249
|
|
|
@@ -5354,7 +5323,7 @@ function clientTypeMapModelsResultDefinition(modelName, action) {
|
|
|
5354
5323
|
if (action === "update") return payloadToResult(modelName);
|
|
5355
5324
|
if (action === "upsert") return payloadToResult(modelName);
|
|
5356
5325
|
if (action === "delete") return payloadToResult(modelName);
|
|
5357
|
-
(0,
|
|
5326
|
+
(0, import_internals4.assertNever)(action, `Unknown action: ${action}`);
|
|
5358
5327
|
}
|
|
5359
5328
|
function payloadToResult(modelName) {
|
|
5360
5329
|
return ts11.namedType("$Utils.PayloadToResult").addGenericArgument(ts11.namedType(getPayloadName(modelName)));
|
|
@@ -5808,7 +5777,7 @@ var TSClient = class {
|
|
|
5808
5777
|
dmmf;
|
|
5809
5778
|
genericsInfo;
|
|
5810
5779
|
toJS() {
|
|
5811
|
-
const { edge, wasm, generator,
|
|
5780
|
+
const { edge, wasm, generator, datamodel: inlineSchema, runtimeNameJs, reusedJs } = this.options;
|
|
5812
5781
|
if (reusedJs) {
|
|
5813
5782
|
return `module.exports = { ...require('${reusedJs}') }`;
|
|
5814
5783
|
}
|
|
@@ -5819,7 +5788,6 @@ var TSClient = class {
|
|
|
5819
5788
|
activeProvider: this.options.activeProvider,
|
|
5820
5789
|
inlineSchema
|
|
5821
5790
|
};
|
|
5822
|
-
const relativeOutdir = import_path.default.relative(process.cwd(), outputDir);
|
|
5823
5791
|
const code = `${commonCodeJS({ ...this.options, browser: false })}
|
|
5824
5792
|
${buildRequirePath(edge)}
|
|
5825
5793
|
|
|
@@ -5843,7 +5811,6 @@ ${new Enum(
|
|
|
5843
5811
|
* Create the Client
|
|
5844
5812
|
*/
|
|
5845
5813
|
const config = ${JSON.stringify(config, null, 2)}
|
|
5846
|
-
${buildDirname(edge, relativeOutdir)}
|
|
5847
5814
|
${buildRuntimeDataModel(this.dmmf.datamodel, runtimeNameJs)}
|
|
5848
5815
|
${buildQueryCompilerWasmModule(wasm, runtimeNameJs)}
|
|
5849
5816
|
${buildDebugInitialization(edge)}
|
|
@@ -6059,7 +6026,7 @@ Object.assign(exports, Prisma)
|
|
|
6059
6026
|
};
|
|
6060
6027
|
|
|
6061
6028
|
// src/typedSql/buildDbEnums.ts
|
|
6062
|
-
var
|
|
6029
|
+
var import_internals5 = require("@prisma/internals");
|
|
6063
6030
|
var ts13 = __toESM(require("@prisma/ts-builders"));
|
|
6064
6031
|
var DbEnumsList = class {
|
|
6065
6032
|
enums;
|
|
@@ -6077,14 +6044,14 @@ var DbEnumsList = class {
|
|
|
6077
6044
|
}
|
|
6078
6045
|
*validJsIdentifiers() {
|
|
6079
6046
|
for (const dbEnum of this.enums) {
|
|
6080
|
-
if ((0,
|
|
6047
|
+
if ((0, import_internals5.isValidJsIdentifier)(dbEnum.name)) {
|
|
6081
6048
|
yield dbEnum;
|
|
6082
6049
|
}
|
|
6083
6050
|
}
|
|
6084
6051
|
}
|
|
6085
6052
|
*invalidJsIdentifiers() {
|
|
6086
6053
|
for (const dbEnum of this.enums) {
|
|
6087
|
-
if (!(0,
|
|
6054
|
+
if (!(0, import_internals5.isValidJsIdentifier)(dbEnum.name)) {
|
|
6088
6055
|
yield dbEnum;
|
|
6089
6056
|
}
|
|
6090
6057
|
}
|
|
@@ -6156,7 +6123,7 @@ var ts16 = __toESM(require("@prisma/ts-builders"));
|
|
|
6156
6123
|
var import_ts_builders3 = require("@prisma/ts-builders");
|
|
6157
6124
|
|
|
6158
6125
|
// src/typedSql/mapTypes.ts
|
|
6159
|
-
var
|
|
6126
|
+
var import_internals6 = require("@prisma/internals");
|
|
6160
6127
|
var ts15 = __toESM(require("@prisma/ts-builders"));
|
|
6161
6128
|
var decimal = ts15.namedType("$runtime.Decimal");
|
|
6162
6129
|
var uint8Array = ts15.namedType("$runtime.Bytes");
|
|
@@ -6250,7 +6217,7 @@ function getMappingConfig(introspectionType, enums) {
|
|
|
6250
6217
|
return config;
|
|
6251
6218
|
}
|
|
6252
6219
|
function getEnumType(name) {
|
|
6253
|
-
if ((0,
|
|
6220
|
+
if ((0, import_internals6.isValidJsIdentifier)(name)) {
|
|
6254
6221
|
return ts15.namedType(`$DbEnums.${name}`);
|
|
6255
6222
|
}
|
|
6256
6223
|
return ts15.namedType("$DbEnums").subKey(name);
|
|
@@ -6362,7 +6329,7 @@ var DenylistError = class extends Error {
|
|
|
6362
6329
|
this.stack = void 0;
|
|
6363
6330
|
}
|
|
6364
6331
|
};
|
|
6365
|
-
(0,
|
|
6332
|
+
(0, import_internals7.setClassName)(DenylistError, "DenylistError");
|
|
6366
6333
|
async function buildClient({
|
|
6367
6334
|
schemaPath,
|
|
6368
6335
|
runtimeBase,
|
|
@@ -6542,10 +6509,10 @@ function getTypedSqlRuntimeBase(runtimeBase) {
|
|
|
6542
6509
|
return `../${runtimeBase}`;
|
|
6543
6510
|
}
|
|
6544
6511
|
function getDefaultOutdir(outputDir) {
|
|
6545
|
-
if (outputDir.endsWith(
|
|
6546
|
-
return
|
|
6512
|
+
if (outputDir.endsWith(import_path.default.normalize("node_modules/@prisma/client"))) {
|
|
6513
|
+
return import_path.default.join(outputDir, "../../.prisma/client");
|
|
6547
6514
|
}
|
|
6548
|
-
return
|
|
6515
|
+
return import_path.default.join(outputDir, "../../.prisma/client");
|
|
6549
6516
|
}
|
|
6550
6517
|
async function generateClient(options) {
|
|
6551
6518
|
const {
|
|
@@ -6598,7 +6565,7 @@ To learn more about how to rename models, check out https://pris.ly/d/naming-mod
|
|
|
6598
6565
|
await (0, import_fs_extra.ensureDir)(outputDir);
|
|
6599
6566
|
await writeFileMap(outputDir, fileMap);
|
|
6600
6567
|
if (copyRuntime || generator.isCustomOutput === true) {
|
|
6601
|
-
const copiedRuntimeDir =
|
|
6568
|
+
const copiedRuntimeDir = import_path.default.join(outputDir, "runtime");
|
|
6602
6569
|
await (0, import_fs_extra.ensureDir)(copiedRuntimeDir);
|
|
6603
6570
|
await copyRuntimeFiles({
|
|
6604
6571
|
from: runtimeSourcePath,
|
|
@@ -6607,20 +6574,20 @@ To learn more about how to rename models, check out https://pris.ly/d/naming-mod
|
|
|
6607
6574
|
runtimeName: "client"
|
|
6608
6575
|
});
|
|
6609
6576
|
}
|
|
6610
|
-
const schemaTargetPath =
|
|
6577
|
+
const schemaTargetPath = import_path.default.join(outputDir, "schema.prisma");
|
|
6611
6578
|
await import_promises.default.writeFile(schemaTargetPath, datamodel, { encoding: "utf-8" });
|
|
6612
6579
|
if (isWasmEngineSupported(provider) && !testMode) {
|
|
6613
6580
|
const suffix = provider === "postgres" ? "postgresql" : provider;
|
|
6614
6581
|
const filename = "query_compiler_bg";
|
|
6615
|
-
const wasmJsBundlePath =
|
|
6582
|
+
const wasmJsBundlePath = import_path.default.join(runtimeSourcePath, `${filename}.${suffix}.wasm-base64.js`);
|
|
6616
6583
|
const wasmBase64 = require(wasmJsBundlePath).wasm;
|
|
6617
|
-
await import_promises.default.writeFile(
|
|
6618
|
-
await import_promises.default.copyFile(
|
|
6619
|
-
await import_promises.default.copyFile(wasmJsBundlePath,
|
|
6584
|
+
await import_promises.default.writeFile(import_path.default.join(outputDir, `${filename}.wasm`), Buffer.from(wasmBase64, "base64"));
|
|
6585
|
+
await import_promises.default.copyFile(import_path.default.join(runtimeSourcePath, `${filename}.${suffix}.js`), import_path.default.join(outputDir, `${filename}.js`));
|
|
6586
|
+
await import_promises.default.copyFile(wasmJsBundlePath, import_path.default.join(outputDir, `${filename}.wasm-base64.js`));
|
|
6620
6587
|
}
|
|
6621
6588
|
try {
|
|
6622
6589
|
const prismaCache = (0, import_env_paths.default)("prisma").cache;
|
|
6623
|
-
const signalsPath =
|
|
6590
|
+
const signalsPath = import_path.default.join(prismaCache, "last-generate");
|
|
6624
6591
|
await import_promises.default.mkdir(prismaCache, { recursive: true });
|
|
6625
6592
|
await import_promises.default.writeFile(signalsPath, Date.now().toString());
|
|
6626
6593
|
} catch {
|
|
@@ -6629,7 +6596,7 @@ To learn more about how to rename models, check out https://pris.ly/d/naming-mod
|
|
|
6629
6596
|
function writeFileMap(outputDir, fileMap) {
|
|
6630
6597
|
return Promise.all(
|
|
6631
6598
|
Object.entries(fileMap).map(async ([fileName, content]) => {
|
|
6632
|
-
const absolutePath =
|
|
6599
|
+
const absolutePath = import_path.default.join(outputDir, fileName);
|
|
6633
6600
|
await import_promises.default.rm(absolutePath, { recursive: true, force: true });
|
|
6634
6601
|
if (typeof content === "string") {
|
|
6635
6602
|
await import_promises.default.writeFile(absolutePath, content);
|
|
@@ -6729,18 +6696,18 @@ async function getGenerationDirs({
|
|
|
6729
6696
|
testMode
|
|
6730
6697
|
}) {
|
|
6731
6698
|
const isCustomOutput = generator.isCustomOutput === true;
|
|
6732
|
-
const normalizedOutputDir =
|
|
6699
|
+
const normalizedOutputDir = import_path.default.normalize(outputDir);
|
|
6733
6700
|
let userRuntimeImport = isCustomOutput ? "./runtime" : "@prisma/client/runtime";
|
|
6734
6701
|
let userOutputDir = isCustomOutput ? normalizedOutputDir : getDefaultOutdir(normalizedOutputDir);
|
|
6735
6702
|
if (testMode && runtimeBase) {
|
|
6736
6703
|
userOutputDir = outputDir;
|
|
6737
|
-
userRuntimeImport = (0,
|
|
6704
|
+
userRuntimeImport = (0, import_internals7.pathToPosix)(runtimeBase);
|
|
6738
6705
|
}
|
|
6739
6706
|
if (isCustomOutput) {
|
|
6740
6707
|
await verifyOutputDirectory(userOutputDir, datamodel, schemaPath);
|
|
6741
6708
|
}
|
|
6742
|
-
const userPackageRoot = await (0, import_package_up.packageUp)({ cwd:
|
|
6743
|
-
const userProjectRoot = userPackageRoot ?
|
|
6709
|
+
const userPackageRoot = await (0, import_package_up.packageUp)({ cwd: import_path.default.dirname(userOutputDir) });
|
|
6710
|
+
const userProjectRoot = userPackageRoot ? import_path.default.dirname(userPackageRoot) : process.cwd();
|
|
6744
6711
|
return {
|
|
6745
6712
|
runtimeBase: userRuntimeImport,
|
|
6746
6713
|
outputDir: userOutputDir,
|
|
@@ -6750,7 +6717,7 @@ async function getGenerationDirs({
|
|
|
6750
6717
|
async function verifyOutputDirectory(directory, datamodel, schemaPath) {
|
|
6751
6718
|
let content;
|
|
6752
6719
|
try {
|
|
6753
|
-
content = await import_promises.default.readFile(
|
|
6720
|
+
content = await import_promises.default.readFile(import_path.default.join(directory, "package.json"), "utf8");
|
|
6754
6721
|
} catch (e) {
|
|
6755
6722
|
if (e.code === "ENOENT") {
|
|
6756
6723
|
return;
|
|
@@ -6802,8 +6769,8 @@ async function copyRuntimeFiles({ from, to, runtimeName, sourceMaps }) {
|
|
|
6802
6769
|
}
|
|
6803
6770
|
await Promise.all(
|
|
6804
6771
|
files.map(async (file4) => {
|
|
6805
|
-
const sourcePath =
|
|
6806
|
-
const targetPath =
|
|
6772
|
+
const sourcePath = import_path.default.join(from, file4);
|
|
6773
|
+
const targetPath = import_path.default.join(to, file4);
|
|
6807
6774
|
if (file4.endsWith(".js")) {
|
|
6808
6775
|
const content = await import_promises.default.readFile(sourcePath, "utf-8");
|
|
6809
6776
|
await import_promises.default.writeFile(targetPath, addPreamble(content));
|
|
@@ -6823,17 +6790,17 @@ var GENERATED_PACKAGE_NAME_PREFIX = "prisma-client-";
|
|
|
6823
6790
|
// src/generator.ts
|
|
6824
6791
|
var import_node_path2 = __toESM(require("node:path"));
|
|
6825
6792
|
var import_engines_version = require("@prisma/engines-version");
|
|
6826
|
-
var
|
|
6793
|
+
var import_internals9 = require("@prisma/internals");
|
|
6827
6794
|
|
|
6828
6795
|
// package.json
|
|
6829
|
-
var version = "6.20.0-integration-next.
|
|
6796
|
+
var version = "6.20.0-integration-next.12";
|
|
6830
6797
|
|
|
6831
6798
|
// src/resolvePrismaClient.ts
|
|
6832
6799
|
var import_promises2 = __toESM(require("node:fs/promises"));
|
|
6833
6800
|
var import_node_path = __toESM(require("node:path"));
|
|
6834
6801
|
var import_ni = require("@antfu/ni");
|
|
6835
6802
|
var import_debug = require("@prisma/debug");
|
|
6836
|
-
var
|
|
6803
|
+
var import_internals8 = require("@prisma/internals");
|
|
6837
6804
|
var debug = (0, import_debug.Debug)("prisma:generator");
|
|
6838
6805
|
async function resolvePrismaClient(baseDir) {
|
|
6839
6806
|
const prismaClientDir = await findPrismaClientDir(baseDir);
|
|
@@ -6850,8 +6817,8 @@ Please try to install it with ${bold(
|
|
|
6850
6817
|
}
|
|
6851
6818
|
async function findPrismaClientDir(baseDir) {
|
|
6852
6819
|
const resolveOpts = { basedir: baseDir, preserveSymlinks: true };
|
|
6853
|
-
const cliDir = await (0,
|
|
6854
|
-
const clientDir = await (0,
|
|
6820
|
+
const cliDir = await (0, import_internals8.resolvePkg)("prisma", resolveOpts);
|
|
6821
|
+
const clientDir = await (0, import_internals8.resolvePkg)("@prisma/client", resolveOpts);
|
|
6855
6822
|
const resolvedClientDir = clientDir && await import_promises2.default.realpath(clientDir);
|
|
6856
6823
|
debug("prismaCliDir", cliDir);
|
|
6857
6824
|
debug("prismaClientDir", clientDir);
|
|
@@ -6887,7 +6854,7 @@ var PrismaClientJsGenerator = class {
|
|
|
6887
6854
|
};
|
|
6888
6855
|
}
|
|
6889
6856
|
async generate(options) {
|
|
6890
|
-
const outputDir = (0,
|
|
6857
|
+
const outputDir = (0, import_internals9.parseEnvValue)(options.generator.output);
|
|
6891
6858
|
await generateClient({
|
|
6892
6859
|
datamodel: options.datamodel,
|
|
6893
6860
|
schemaPath: options.schemaPath,
|