@prisma/client 6.3.0-integration-simpler-typeinfo-query.1 → 6.3.0-integration-fix-subcommands-esm-projects.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33,18 +33,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  ));
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
- // ../../node_modules/.pnpm/@prisma+engines-version@6.3.0-6.integration-5-22-0-with-simplified-typeinfo-c7d99d9db5129d8b35986b8518c7f10bc8580e03/node_modules/@prisma/engines-version/package.json
36
+ // ../../node_modules/.pnpm/@prisma+engines-version@6.3.0-16.eb5bc5493ac383a8fe3c3e7fabfc93e4d44ca21e/node_modules/@prisma/engines-version/package.json
37
37
  var require_package = __commonJS({
38
- "../../node_modules/.pnpm/@prisma+engines-version@6.3.0-6.integration-5-22-0-with-simplified-typeinfo-c7d99d9db5129d8b35986b8518c7f10bc8580e03/node_modules/@prisma/engines-version/package.json"(exports2, module2) {
38
+ "../../node_modules/.pnpm/@prisma+engines-version@6.3.0-16.eb5bc5493ac383a8fe3c3e7fabfc93e4d44ca21e/node_modules/@prisma/engines-version/package.json"(exports2, module2) {
39
39
  module2.exports = {
40
40
  name: "@prisma/engines-version",
41
- version: "6.3.0-6.integration-5-22-0-with-simplified-typeinfo-c7d99d9db5129d8b35986b8518c7f10bc8580e03",
41
+ version: "6.3.0-16.eb5bc5493ac383a8fe3c3e7fabfc93e4d44ca21e",
42
42
  main: "index.js",
43
43
  types: "index.d.ts",
44
44
  license: "Apache-2.0",
45
45
  author: "Tim Suchanek <suchanek@prisma.io>",
46
46
  prisma: {
47
- enginesVersion: "c7d99d9db5129d8b35986b8518c7f10bc8580e03"
47
+ enginesVersion: "eb5bc5493ac383a8fe3c3e7fabfc93e4d44ca21e"
48
48
  },
49
49
  repository: {
50
50
  type: "git",
@@ -66,9 +66,9 @@ var require_package = __commonJS({
66
66
  }
67
67
  });
68
68
 
69
- // ../../node_modules/.pnpm/@prisma+engines-version@6.3.0-6.integration-5-22-0-with-simplified-typeinfo-c7d99d9db5129d8b35986b8518c7f10bc8580e03/node_modules/@prisma/engines-version/index.js
69
+ // ../../node_modules/.pnpm/@prisma+engines-version@6.3.0-16.eb5bc5493ac383a8fe3c3e7fabfc93e4d44ca21e/node_modules/@prisma/engines-version/index.js
70
70
  var require_engines_version = __commonJS({
71
- "../../node_modules/.pnpm/@prisma+engines-version@6.3.0-6.integration-5-22-0-with-simplified-typeinfo-c7d99d9db5129d8b35986b8518c7f10bc8580e03/node_modules/@prisma/engines-version/index.js"(exports2) {
71
+ "../../node_modules/.pnpm/@prisma+engines-version@6.3.0-16.eb5bc5493ac383a8fe3c3e7fabfc93e4d44ca21e/node_modules/@prisma/engines-version/index.js"(exports2) {
72
72
  "use strict";
73
73
  Object.defineProperty(exports2, "__esModule", { value: true });
74
74
  exports2.enginesVersion = void 0;
@@ -197,29 +197,29 @@ var require_polyfills = __commonJS({
197
197
  }(fs3.rename);
198
198
  }
199
199
  fs3.read = typeof fs3.read !== "function" ? fs3.read : function(fs$read) {
200
- function read(fd, buffer2, offset, length, position, callback_) {
200
+ function read(fd, buffer, offset, length, position, callback_) {
201
201
  var callback;
202
202
  if (callback_ && typeof callback_ === "function") {
203
203
  var eagCounter = 0;
204
204
  callback = function(er, _, __) {
205
205
  if (er && er.code === "EAGAIN" && eagCounter < 10) {
206
206
  eagCounter++;
207
- return fs$read.call(fs3, fd, buffer2, offset, length, position, callback);
207
+ return fs$read.call(fs3, fd, buffer, offset, length, position, callback);
208
208
  }
209
209
  callback_.apply(this, arguments);
210
210
  };
211
211
  }
212
- return fs$read.call(fs3, fd, buffer2, offset, length, position, callback);
212
+ return fs$read.call(fs3, fd, buffer, offset, length, position, callback);
213
213
  }
214
214
  if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
215
215
  return read;
216
216
  }(fs3.read);
217
217
  fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ function(fs$readSync) {
218
- return function(fd, buffer2, offset, length, position) {
218
+ return function(fd, buffer, offset, length, position) {
219
219
  var eagCounter = 0;
220
220
  while (true) {
221
221
  try {
222
- return fs$readSync.call(fs3, fd, buffer2, offset, length, position);
222
+ return fs$readSync.call(fs3, fd, buffer, offset, length, position);
223
223
  } catch (er) {
224
224
  if (er.code === "EAGAIN" && eagCounter < 10) {
225
225
  eagCounter++;
@@ -940,25 +940,25 @@ var require_fs = __commonJS({
940
940
  return fs3.exists(filename, resolve);
941
941
  });
942
942
  };
943
- exports2.read = function(fd, buffer2, offset, length, position, callback) {
943
+ exports2.read = function(fd, buffer, offset, length, position, callback) {
944
944
  if (typeof callback === "function") {
945
- return fs3.read(fd, buffer2, offset, length, position, callback);
945
+ return fs3.read(fd, buffer, offset, length, position, callback);
946
946
  }
947
947
  return new Promise((resolve, reject) => {
948
- fs3.read(fd, buffer2, offset, length, position, (err, bytesRead, buffer3) => {
948
+ fs3.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
949
949
  if (err) return reject(err);
950
- resolve({ bytesRead, buffer: buffer3 });
950
+ resolve({ bytesRead, buffer: buffer2 });
951
951
  });
952
952
  });
953
953
  };
954
- exports2.write = function(fd, buffer2, ...args) {
954
+ exports2.write = function(fd, buffer, ...args) {
955
955
  if (typeof args[args.length - 1] === "function") {
956
- return fs3.write(fd, buffer2, ...args);
956
+ return fs3.write(fd, buffer, ...args);
957
957
  }
958
958
  return new Promise((resolve, reject) => {
959
- fs3.write(fd, buffer2, ...args, (err, bytesWritten, buffer3) => {
959
+ fs3.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
960
960
  if (err) return reject(err);
961
- resolve({ bytesWritten, buffer: buffer3 });
961
+ resolve({ bytesWritten, buffer: buffer2 });
962
962
  });
963
963
  });
964
964
  };
@@ -1971,6 +1971,786 @@ var require_ensure = __commonJS({
1971
1971
  }
1972
1972
  });
1973
1973
 
1974
+ // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js
1975
+ var require_polyfills2 = __commonJS({
1976
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports2, module2) {
1977
+ "use strict";
1978
+ var constants = require("constants");
1979
+ var origCwd = process.cwd;
1980
+ var cwd2 = null;
1981
+ var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
1982
+ process.cwd = function() {
1983
+ if (!cwd2)
1984
+ cwd2 = origCwd.call(process);
1985
+ return cwd2;
1986
+ };
1987
+ try {
1988
+ process.cwd();
1989
+ } catch (er) {
1990
+ }
1991
+ if (typeof process.chdir === "function") {
1992
+ chdir = process.chdir;
1993
+ process.chdir = function(d) {
1994
+ cwd2 = null;
1995
+ chdir.call(process, d);
1996
+ };
1997
+ if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
1998
+ }
1999
+ var chdir;
2000
+ module2.exports = patch;
2001
+ function patch(fs3) {
2002
+ if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
2003
+ patchLchmod(fs3);
2004
+ }
2005
+ if (!fs3.lutimes) {
2006
+ patchLutimes(fs3);
2007
+ }
2008
+ fs3.chown = chownFix(fs3.chown);
2009
+ fs3.fchown = chownFix(fs3.fchown);
2010
+ fs3.lchown = chownFix(fs3.lchown);
2011
+ fs3.chmod = chmodFix(fs3.chmod);
2012
+ fs3.fchmod = chmodFix(fs3.fchmod);
2013
+ fs3.lchmod = chmodFix(fs3.lchmod);
2014
+ fs3.chownSync = chownFixSync(fs3.chownSync);
2015
+ fs3.fchownSync = chownFixSync(fs3.fchownSync);
2016
+ fs3.lchownSync = chownFixSync(fs3.lchownSync);
2017
+ fs3.chmodSync = chmodFixSync(fs3.chmodSync);
2018
+ fs3.fchmodSync = chmodFixSync(fs3.fchmodSync);
2019
+ fs3.lchmodSync = chmodFixSync(fs3.lchmodSync);
2020
+ fs3.stat = statFix(fs3.stat);
2021
+ fs3.fstat = statFix(fs3.fstat);
2022
+ fs3.lstat = statFix(fs3.lstat);
2023
+ fs3.statSync = statFixSync(fs3.statSync);
2024
+ fs3.fstatSync = statFixSync(fs3.fstatSync);
2025
+ fs3.lstatSync = statFixSync(fs3.lstatSync);
2026
+ if (fs3.chmod && !fs3.lchmod) {
2027
+ fs3.lchmod = function(path5, mode, cb) {
2028
+ if (cb) process.nextTick(cb);
2029
+ };
2030
+ fs3.lchmodSync = function() {
2031
+ };
2032
+ }
2033
+ if (fs3.chown && !fs3.lchown) {
2034
+ fs3.lchown = function(path5, uid, gid, cb) {
2035
+ if (cb) process.nextTick(cb);
2036
+ };
2037
+ fs3.lchownSync = function() {
2038
+ };
2039
+ }
2040
+ if (platform === "win32") {
2041
+ fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : function(fs$rename) {
2042
+ function rename(from, to, cb) {
2043
+ var start = Date.now();
2044
+ var backoff = 0;
2045
+ fs$rename(from, to, function CB(er) {
2046
+ if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
2047
+ setTimeout(function() {
2048
+ fs3.stat(to, function(stater, st) {
2049
+ if (stater && stater.code === "ENOENT")
2050
+ fs$rename(from, to, CB);
2051
+ else
2052
+ cb(er);
2053
+ });
2054
+ }, backoff);
2055
+ if (backoff < 100)
2056
+ backoff += 10;
2057
+ return;
2058
+ }
2059
+ if (cb) cb(er);
2060
+ });
2061
+ }
2062
+ if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
2063
+ return rename;
2064
+ }(fs3.rename);
2065
+ }
2066
+ fs3.read = typeof fs3.read !== "function" ? fs3.read : function(fs$read) {
2067
+ function read(fd, buffer, offset, length, position, callback_) {
2068
+ var callback;
2069
+ if (callback_ && typeof callback_ === "function") {
2070
+ var eagCounter = 0;
2071
+ callback = function(er, _, __) {
2072
+ if (er && er.code === "EAGAIN" && eagCounter < 10) {
2073
+ eagCounter++;
2074
+ return fs$read.call(fs3, fd, buffer, offset, length, position, callback);
2075
+ }
2076
+ callback_.apply(this, arguments);
2077
+ };
2078
+ }
2079
+ return fs$read.call(fs3, fd, buffer, offset, length, position, callback);
2080
+ }
2081
+ if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
2082
+ return read;
2083
+ }(fs3.read);
2084
+ fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ function(fs$readSync) {
2085
+ return function(fd, buffer, offset, length, position) {
2086
+ var eagCounter = 0;
2087
+ while (true) {
2088
+ try {
2089
+ return fs$readSync.call(fs3, fd, buffer, offset, length, position);
2090
+ } catch (er) {
2091
+ if (er.code === "EAGAIN" && eagCounter < 10) {
2092
+ eagCounter++;
2093
+ continue;
2094
+ }
2095
+ throw er;
2096
+ }
2097
+ }
2098
+ };
2099
+ }(fs3.readSync);
2100
+ function patchLchmod(fs4) {
2101
+ fs4.lchmod = function(path5, mode, callback) {
2102
+ fs4.open(
2103
+ path5,
2104
+ constants.O_WRONLY | constants.O_SYMLINK,
2105
+ mode,
2106
+ function(err, fd) {
2107
+ if (err) {
2108
+ if (callback) callback(err);
2109
+ return;
2110
+ }
2111
+ fs4.fchmod(fd, mode, function(err2) {
2112
+ fs4.close(fd, function(err22) {
2113
+ if (callback) callback(err2 || err22);
2114
+ });
2115
+ });
2116
+ }
2117
+ );
2118
+ };
2119
+ fs4.lchmodSync = function(path5, mode) {
2120
+ var fd = fs4.openSync(path5, constants.O_WRONLY | constants.O_SYMLINK, mode);
2121
+ var threw = true;
2122
+ var ret;
2123
+ try {
2124
+ ret = fs4.fchmodSync(fd, mode);
2125
+ threw = false;
2126
+ } finally {
2127
+ if (threw) {
2128
+ try {
2129
+ fs4.closeSync(fd);
2130
+ } catch (er) {
2131
+ }
2132
+ } else {
2133
+ fs4.closeSync(fd);
2134
+ }
2135
+ }
2136
+ return ret;
2137
+ };
2138
+ }
2139
+ function patchLutimes(fs4) {
2140
+ if (constants.hasOwnProperty("O_SYMLINK") && fs4.futimes) {
2141
+ fs4.lutimes = function(path5, at, mt, cb) {
2142
+ fs4.open(path5, constants.O_SYMLINK, function(er, fd) {
2143
+ if (er) {
2144
+ if (cb) cb(er);
2145
+ return;
2146
+ }
2147
+ fs4.futimes(fd, at, mt, function(er2) {
2148
+ fs4.close(fd, function(er22) {
2149
+ if (cb) cb(er2 || er22);
2150
+ });
2151
+ });
2152
+ });
2153
+ };
2154
+ fs4.lutimesSync = function(path5, at, mt) {
2155
+ var fd = fs4.openSync(path5, constants.O_SYMLINK);
2156
+ var ret;
2157
+ var threw = true;
2158
+ try {
2159
+ ret = fs4.futimesSync(fd, at, mt);
2160
+ threw = false;
2161
+ } finally {
2162
+ if (threw) {
2163
+ try {
2164
+ fs4.closeSync(fd);
2165
+ } catch (er) {
2166
+ }
2167
+ } else {
2168
+ fs4.closeSync(fd);
2169
+ }
2170
+ }
2171
+ return ret;
2172
+ };
2173
+ } else if (fs4.futimes) {
2174
+ fs4.lutimes = function(_a, _b, _c, cb) {
2175
+ if (cb) process.nextTick(cb);
2176
+ };
2177
+ fs4.lutimesSync = function() {
2178
+ };
2179
+ }
2180
+ }
2181
+ function chmodFix(orig) {
2182
+ if (!orig) return orig;
2183
+ return function(target, mode, cb) {
2184
+ return orig.call(fs3, target, mode, function(er) {
2185
+ if (chownErOk(er)) er = null;
2186
+ if (cb) cb.apply(this, arguments);
2187
+ });
2188
+ };
2189
+ }
2190
+ function chmodFixSync(orig) {
2191
+ if (!orig) return orig;
2192
+ return function(target, mode) {
2193
+ try {
2194
+ return orig.call(fs3, target, mode);
2195
+ } catch (er) {
2196
+ if (!chownErOk(er)) throw er;
2197
+ }
2198
+ };
2199
+ }
2200
+ function chownFix(orig) {
2201
+ if (!orig) return orig;
2202
+ return function(target, uid, gid, cb) {
2203
+ return orig.call(fs3, target, uid, gid, function(er) {
2204
+ if (chownErOk(er)) er = null;
2205
+ if (cb) cb.apply(this, arguments);
2206
+ });
2207
+ };
2208
+ }
2209
+ function chownFixSync(orig) {
2210
+ if (!orig) return orig;
2211
+ return function(target, uid, gid) {
2212
+ try {
2213
+ return orig.call(fs3, target, uid, gid);
2214
+ } catch (er) {
2215
+ if (!chownErOk(er)) throw er;
2216
+ }
2217
+ };
2218
+ }
2219
+ function statFix(orig) {
2220
+ if (!orig) return orig;
2221
+ return function(target, options, cb) {
2222
+ if (typeof options === "function") {
2223
+ cb = options;
2224
+ options = null;
2225
+ }
2226
+ function callback(er, stats) {
2227
+ if (stats) {
2228
+ if (stats.uid < 0) stats.uid += 4294967296;
2229
+ if (stats.gid < 0) stats.gid += 4294967296;
2230
+ }
2231
+ if (cb) cb.apply(this, arguments);
2232
+ }
2233
+ return options ? orig.call(fs3, target, options, callback) : orig.call(fs3, target, callback);
2234
+ };
2235
+ }
2236
+ function statFixSync(orig) {
2237
+ if (!orig) return orig;
2238
+ return function(target, options) {
2239
+ var stats = options ? orig.call(fs3, target, options) : orig.call(fs3, target);
2240
+ if (stats) {
2241
+ if (stats.uid < 0) stats.uid += 4294967296;
2242
+ if (stats.gid < 0) stats.gid += 4294967296;
2243
+ }
2244
+ return stats;
2245
+ };
2246
+ }
2247
+ function chownErOk(er) {
2248
+ if (!er)
2249
+ return true;
2250
+ if (er.code === "ENOSYS")
2251
+ return true;
2252
+ var nonroot = !process.getuid || process.getuid() !== 0;
2253
+ if (nonroot) {
2254
+ if (er.code === "EINVAL" || er.code === "EPERM")
2255
+ return true;
2256
+ }
2257
+ return false;
2258
+ }
2259
+ }
2260
+ }
2261
+ });
2262
+
2263
+ // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js
2264
+ var require_legacy_streams2 = __commonJS({
2265
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
2266
+ "use strict";
2267
+ var Stream = require("stream").Stream;
2268
+ module2.exports = legacy;
2269
+ function legacy(fs3) {
2270
+ return {
2271
+ ReadStream,
2272
+ WriteStream
2273
+ };
2274
+ function ReadStream(path5, options) {
2275
+ if (!(this instanceof ReadStream)) return new ReadStream(path5, options);
2276
+ Stream.call(this);
2277
+ var self = this;
2278
+ this.path = path5;
2279
+ this.fd = null;
2280
+ this.readable = true;
2281
+ this.paused = false;
2282
+ this.flags = "r";
2283
+ this.mode = 438;
2284
+ this.bufferSize = 64 * 1024;
2285
+ options = options || {};
2286
+ var keys = Object.keys(options);
2287
+ for (var index = 0, length = keys.length; index < length; index++) {
2288
+ var key = keys[index];
2289
+ this[key] = options[key];
2290
+ }
2291
+ if (this.encoding) this.setEncoding(this.encoding);
2292
+ if (this.start !== void 0) {
2293
+ if ("number" !== typeof this.start) {
2294
+ throw TypeError("start must be a Number");
2295
+ }
2296
+ if (this.end === void 0) {
2297
+ this.end = Infinity;
2298
+ } else if ("number" !== typeof this.end) {
2299
+ throw TypeError("end must be a Number");
2300
+ }
2301
+ if (this.start > this.end) {
2302
+ throw new Error("start must be <= end");
2303
+ }
2304
+ this.pos = this.start;
2305
+ }
2306
+ if (this.fd !== null) {
2307
+ process.nextTick(function() {
2308
+ self._read();
2309
+ });
2310
+ return;
2311
+ }
2312
+ fs3.open(this.path, this.flags, this.mode, function(err, fd) {
2313
+ if (err) {
2314
+ self.emit("error", err);
2315
+ self.readable = false;
2316
+ return;
2317
+ }
2318
+ self.fd = fd;
2319
+ self.emit("open", fd);
2320
+ self._read();
2321
+ });
2322
+ }
2323
+ function WriteStream(path5, options) {
2324
+ if (!(this instanceof WriteStream)) return new WriteStream(path5, options);
2325
+ Stream.call(this);
2326
+ this.path = path5;
2327
+ this.fd = null;
2328
+ this.writable = true;
2329
+ this.flags = "w";
2330
+ this.encoding = "binary";
2331
+ this.mode = 438;
2332
+ this.bytesWritten = 0;
2333
+ options = options || {};
2334
+ var keys = Object.keys(options);
2335
+ for (var index = 0, length = keys.length; index < length; index++) {
2336
+ var key = keys[index];
2337
+ this[key] = options[key];
2338
+ }
2339
+ if (this.start !== void 0) {
2340
+ if ("number" !== typeof this.start) {
2341
+ throw TypeError("start must be a Number");
2342
+ }
2343
+ if (this.start < 0) {
2344
+ throw new Error("start must be >= zero");
2345
+ }
2346
+ this.pos = this.start;
2347
+ }
2348
+ this.busy = false;
2349
+ this._queue = [];
2350
+ if (this.fd === null) {
2351
+ this._open = fs3.open;
2352
+ this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
2353
+ this.flush();
2354
+ }
2355
+ }
2356
+ }
2357
+ }
2358
+ });
2359
+
2360
+ // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js
2361
+ var require_clone2 = __commonJS({
2362
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports2, module2) {
2363
+ "use strict";
2364
+ module2.exports = clone;
2365
+ var getPrototypeOf = Object.getPrototypeOf || function(obj) {
2366
+ return obj.__proto__;
2367
+ };
2368
+ function clone(obj) {
2369
+ if (obj === null || typeof obj !== "object")
2370
+ return obj;
2371
+ if (obj instanceof Object)
2372
+ var copy = { __proto__: getPrototypeOf(obj) };
2373
+ else
2374
+ var copy = /* @__PURE__ */ Object.create(null);
2375
+ Object.getOwnPropertyNames(obj).forEach(function(key) {
2376
+ Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
2377
+ });
2378
+ return copy;
2379
+ }
2380
+ }
2381
+ });
2382
+
2383
+ // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
2384
+ var require_graceful_fs2 = __commonJS({
2385
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
2386
+ "use strict";
2387
+ var fs3 = require("fs");
2388
+ var polyfills = require_polyfills2();
2389
+ var legacy = require_legacy_streams2();
2390
+ var clone = require_clone2();
2391
+ var util2 = require("util");
2392
+ var gracefulQueue;
2393
+ var previousSymbol;
2394
+ if (typeof Symbol === "function" && typeof Symbol.for === "function") {
2395
+ gracefulQueue = Symbol.for("graceful-fs.queue");
2396
+ previousSymbol = Symbol.for("graceful-fs.previous");
2397
+ } else {
2398
+ gracefulQueue = "___graceful-fs.queue";
2399
+ previousSymbol = "___graceful-fs.previous";
2400
+ }
2401
+ function noop() {
2402
+ }
2403
+ function publishQueue(context, queue2) {
2404
+ Object.defineProperty(context, gracefulQueue, {
2405
+ get: function() {
2406
+ return queue2;
2407
+ }
2408
+ });
2409
+ }
2410
+ var debug4 = noop;
2411
+ if (util2.debuglog)
2412
+ debug4 = util2.debuglog("gfs4");
2413
+ else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
2414
+ debug4 = function() {
2415
+ var m = util2.format.apply(util2, arguments);
2416
+ m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
2417
+ console.error(m);
2418
+ };
2419
+ if (!fs3[gracefulQueue]) {
2420
+ queue = global[gracefulQueue] || [];
2421
+ publishQueue(fs3, queue);
2422
+ fs3.close = function(fs$close) {
2423
+ function close(fd, cb) {
2424
+ return fs$close.call(fs3, fd, function(err) {
2425
+ if (!err) {
2426
+ resetQueue();
2427
+ }
2428
+ if (typeof cb === "function")
2429
+ cb.apply(this, arguments);
2430
+ });
2431
+ }
2432
+ Object.defineProperty(close, previousSymbol, {
2433
+ value: fs$close
2434
+ });
2435
+ return close;
2436
+ }(fs3.close);
2437
+ fs3.closeSync = function(fs$closeSync) {
2438
+ function closeSync(fd) {
2439
+ fs$closeSync.apply(fs3, arguments);
2440
+ resetQueue();
2441
+ }
2442
+ Object.defineProperty(closeSync, previousSymbol, {
2443
+ value: fs$closeSync
2444
+ });
2445
+ return closeSync;
2446
+ }(fs3.closeSync);
2447
+ if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
2448
+ process.on("exit", function() {
2449
+ debug4(fs3[gracefulQueue]);
2450
+ require("assert").equal(fs3[gracefulQueue].length, 0);
2451
+ });
2452
+ }
2453
+ }
2454
+ var queue;
2455
+ if (!global[gracefulQueue]) {
2456
+ publishQueue(global, fs3[gracefulQueue]);
2457
+ }
2458
+ module2.exports = patch(clone(fs3));
2459
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs3.__patched) {
2460
+ module2.exports = patch(fs3);
2461
+ fs3.__patched = true;
2462
+ }
2463
+ function patch(fs4) {
2464
+ polyfills(fs4);
2465
+ fs4.gracefulify = patch;
2466
+ fs4.createReadStream = createReadStream;
2467
+ fs4.createWriteStream = createWriteStream;
2468
+ var fs$readFile = fs4.readFile;
2469
+ fs4.readFile = readFile;
2470
+ function readFile(path5, options, cb) {
2471
+ if (typeof options === "function")
2472
+ cb = options, options = null;
2473
+ return go$readFile(path5, options, cb);
2474
+ function go$readFile(path6, options2, cb2, startTime) {
2475
+ return fs$readFile(path6, options2, function(err) {
2476
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2477
+ enqueue([go$readFile, [path6, options2, cb2], err, startTime || Date.now(), Date.now()]);
2478
+ else {
2479
+ if (typeof cb2 === "function")
2480
+ cb2.apply(this, arguments);
2481
+ }
2482
+ });
2483
+ }
2484
+ }
2485
+ var fs$writeFile = fs4.writeFile;
2486
+ fs4.writeFile = writeFile;
2487
+ function writeFile(path5, data, options, cb) {
2488
+ if (typeof options === "function")
2489
+ cb = options, options = null;
2490
+ return go$writeFile(path5, data, options, cb);
2491
+ function go$writeFile(path6, data2, options2, cb2, startTime) {
2492
+ return fs$writeFile(path6, data2, options2, function(err) {
2493
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2494
+ enqueue([go$writeFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
2495
+ else {
2496
+ if (typeof cb2 === "function")
2497
+ cb2.apply(this, arguments);
2498
+ }
2499
+ });
2500
+ }
2501
+ }
2502
+ var fs$appendFile = fs4.appendFile;
2503
+ if (fs$appendFile)
2504
+ fs4.appendFile = appendFile;
2505
+ function appendFile(path5, data, options, cb) {
2506
+ if (typeof options === "function")
2507
+ cb = options, options = null;
2508
+ return go$appendFile(path5, data, options, cb);
2509
+ function go$appendFile(path6, data2, options2, cb2, startTime) {
2510
+ return fs$appendFile(path6, data2, options2, function(err) {
2511
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2512
+ enqueue([go$appendFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
2513
+ else {
2514
+ if (typeof cb2 === "function")
2515
+ cb2.apply(this, arguments);
2516
+ }
2517
+ });
2518
+ }
2519
+ }
2520
+ var fs$copyFile = fs4.copyFile;
2521
+ if (fs$copyFile)
2522
+ fs4.copyFile = copyFile;
2523
+ function copyFile(src, dest, flags, cb) {
2524
+ if (typeof flags === "function") {
2525
+ cb = flags;
2526
+ flags = 0;
2527
+ }
2528
+ return go$copyFile(src, dest, flags, cb);
2529
+ function go$copyFile(src2, dest2, flags2, cb2, startTime) {
2530
+ return fs$copyFile(src2, dest2, flags2, function(err) {
2531
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2532
+ enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
2533
+ else {
2534
+ if (typeof cb2 === "function")
2535
+ cb2.apply(this, arguments);
2536
+ }
2537
+ });
2538
+ }
2539
+ }
2540
+ var fs$readdir = fs4.readdir;
2541
+ fs4.readdir = readdir;
2542
+ var noReaddirOptionVersions = /^v[0-5]\./;
2543
+ function readdir(path5, options, cb) {
2544
+ if (typeof options === "function")
2545
+ cb = options, options = null;
2546
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path6, options2, cb2, startTime) {
2547
+ return fs$readdir(path6, fs$readdirCallback(
2548
+ path6,
2549
+ options2,
2550
+ cb2,
2551
+ startTime
2552
+ ));
2553
+ } : function go$readdir2(path6, options2, cb2, startTime) {
2554
+ return fs$readdir(path6, options2, fs$readdirCallback(
2555
+ path6,
2556
+ options2,
2557
+ cb2,
2558
+ startTime
2559
+ ));
2560
+ };
2561
+ return go$readdir(path5, options, cb);
2562
+ function fs$readdirCallback(path6, options2, cb2, startTime) {
2563
+ return function(err, files) {
2564
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2565
+ enqueue([
2566
+ go$readdir,
2567
+ [path6, options2, cb2],
2568
+ err,
2569
+ startTime || Date.now(),
2570
+ Date.now()
2571
+ ]);
2572
+ else {
2573
+ if (files && files.sort)
2574
+ files.sort();
2575
+ if (typeof cb2 === "function")
2576
+ cb2.call(this, err, files);
2577
+ }
2578
+ };
2579
+ }
2580
+ }
2581
+ if (process.version.substr(0, 4) === "v0.8") {
2582
+ var legStreams = legacy(fs4);
2583
+ ReadStream = legStreams.ReadStream;
2584
+ WriteStream = legStreams.WriteStream;
2585
+ }
2586
+ var fs$ReadStream = fs4.ReadStream;
2587
+ if (fs$ReadStream) {
2588
+ ReadStream.prototype = Object.create(fs$ReadStream.prototype);
2589
+ ReadStream.prototype.open = ReadStream$open;
2590
+ }
2591
+ var fs$WriteStream = fs4.WriteStream;
2592
+ if (fs$WriteStream) {
2593
+ WriteStream.prototype = Object.create(fs$WriteStream.prototype);
2594
+ WriteStream.prototype.open = WriteStream$open;
2595
+ }
2596
+ Object.defineProperty(fs4, "ReadStream", {
2597
+ get: function() {
2598
+ return ReadStream;
2599
+ },
2600
+ set: function(val) {
2601
+ ReadStream = val;
2602
+ },
2603
+ enumerable: true,
2604
+ configurable: true
2605
+ });
2606
+ Object.defineProperty(fs4, "WriteStream", {
2607
+ get: function() {
2608
+ return WriteStream;
2609
+ },
2610
+ set: function(val) {
2611
+ WriteStream = val;
2612
+ },
2613
+ enumerable: true,
2614
+ configurable: true
2615
+ });
2616
+ var FileReadStream = ReadStream;
2617
+ Object.defineProperty(fs4, "FileReadStream", {
2618
+ get: function() {
2619
+ return FileReadStream;
2620
+ },
2621
+ set: function(val) {
2622
+ FileReadStream = val;
2623
+ },
2624
+ enumerable: true,
2625
+ configurable: true
2626
+ });
2627
+ var FileWriteStream = WriteStream;
2628
+ Object.defineProperty(fs4, "FileWriteStream", {
2629
+ get: function() {
2630
+ return FileWriteStream;
2631
+ },
2632
+ set: function(val) {
2633
+ FileWriteStream = val;
2634
+ },
2635
+ enumerable: true,
2636
+ configurable: true
2637
+ });
2638
+ function ReadStream(path5, options) {
2639
+ if (this instanceof ReadStream)
2640
+ return fs$ReadStream.apply(this, arguments), this;
2641
+ else
2642
+ return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
2643
+ }
2644
+ function ReadStream$open() {
2645
+ var that = this;
2646
+ open(that.path, that.flags, that.mode, function(err, fd) {
2647
+ if (err) {
2648
+ if (that.autoClose)
2649
+ that.destroy();
2650
+ that.emit("error", err);
2651
+ } else {
2652
+ that.fd = fd;
2653
+ that.emit("open", fd);
2654
+ that.read();
2655
+ }
2656
+ });
2657
+ }
2658
+ function WriteStream(path5, options) {
2659
+ if (this instanceof WriteStream)
2660
+ return fs$WriteStream.apply(this, arguments), this;
2661
+ else
2662
+ return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
2663
+ }
2664
+ function WriteStream$open() {
2665
+ var that = this;
2666
+ open(that.path, that.flags, that.mode, function(err, fd) {
2667
+ if (err) {
2668
+ that.destroy();
2669
+ that.emit("error", err);
2670
+ } else {
2671
+ that.fd = fd;
2672
+ that.emit("open", fd);
2673
+ }
2674
+ });
2675
+ }
2676
+ function createReadStream(path5, options) {
2677
+ return new fs4.ReadStream(path5, options);
2678
+ }
2679
+ function createWriteStream(path5, options) {
2680
+ return new fs4.WriteStream(path5, options);
2681
+ }
2682
+ var fs$open = fs4.open;
2683
+ fs4.open = open;
2684
+ function open(path5, flags, mode, cb) {
2685
+ if (typeof mode === "function")
2686
+ cb = mode, mode = null;
2687
+ return go$open(path5, flags, mode, cb);
2688
+ function go$open(path6, flags2, mode2, cb2, startTime) {
2689
+ return fs$open(path6, flags2, mode2, function(err, fd) {
2690
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
2691
+ enqueue([go$open, [path6, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
2692
+ else {
2693
+ if (typeof cb2 === "function")
2694
+ cb2.apply(this, arguments);
2695
+ }
2696
+ });
2697
+ }
2698
+ }
2699
+ return fs4;
2700
+ }
2701
+ function enqueue(elem) {
2702
+ debug4("ENQUEUE", elem[0].name, elem[1]);
2703
+ fs3[gracefulQueue].push(elem);
2704
+ retry();
2705
+ }
2706
+ var retryTimer;
2707
+ function resetQueue() {
2708
+ var now = Date.now();
2709
+ for (var i = 0; i < fs3[gracefulQueue].length; ++i) {
2710
+ if (fs3[gracefulQueue][i].length > 2) {
2711
+ fs3[gracefulQueue][i][3] = now;
2712
+ fs3[gracefulQueue][i][4] = now;
2713
+ }
2714
+ }
2715
+ retry();
2716
+ }
2717
+ function retry() {
2718
+ clearTimeout(retryTimer);
2719
+ retryTimer = void 0;
2720
+ if (fs3[gracefulQueue].length === 0)
2721
+ return;
2722
+ var elem = fs3[gracefulQueue].shift();
2723
+ var fn = elem[0];
2724
+ var args = elem[1];
2725
+ var err = elem[2];
2726
+ var startTime = elem[3];
2727
+ var lastTime = elem[4];
2728
+ if (startTime === void 0) {
2729
+ debug4("RETRY", fn.name, args);
2730
+ fn.apply(null, args);
2731
+ } else if (Date.now() - startTime >= 6e4) {
2732
+ debug4("TIMEOUT", fn.name, args);
2733
+ var cb = args.pop();
2734
+ if (typeof cb === "function")
2735
+ cb.call(null, err);
2736
+ } else {
2737
+ var sinceAttempt = Date.now() - lastTime;
2738
+ var sinceStart = Math.max(lastTime - startTime, 1);
2739
+ var desiredDelay = Math.min(sinceStart * 1.2, 100);
2740
+ if (sinceAttempt >= desiredDelay) {
2741
+ debug4("RETRY", fn.name, args);
2742
+ fn.apply(null, args.concat([startTime]));
2743
+ } else {
2744
+ fs3[gracefulQueue].push(elem);
2745
+ }
2746
+ }
2747
+ if (retryTimer === void 0) {
2748
+ retryTimer = setTimeout(retry, 0);
2749
+ }
2750
+ }
2751
+ }
2752
+ });
2753
+
1974
2754
  // ../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js
1975
2755
  var require_utils2 = __commonJS({
1976
2756
  "../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports2, module2) {
@@ -1994,7 +2774,7 @@ var require_jsonfile = __commonJS({
1994
2774
  "use strict";
1995
2775
  var _fs;
1996
2776
  try {
1997
- _fs = require_graceful_fs();
2777
+ _fs = require_graceful_fs2();
1998
2778
  } catch (_) {
1999
2779
  _fs = require("fs");
2000
2780
  }
@@ -3166,7 +3946,7 @@ var require_package2 = __commonJS({
3166
3946
  "package.json"(exports2, module2) {
3167
3947
  module2.exports = {
3168
3948
  name: "@prisma/client",
3169
- version: "6.3.0-integration-simpler-typeinfo-query.1",
3949
+ version: "6.3.0-integration-fix-subcommands-esm-projects.1",
3170
3950
  description: "Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.",
3171
3951
  keywords: [
3172
3952
  "ORM",
@@ -3290,7 +4070,7 @@ var require_package2 = __commonJS({
3290
4070
  },
3291
4071
  license: "Apache-2.0",
3292
4072
  engines: {
3293
- node: ">=16.13"
4073
+ node: ">=18.18"
3294
4074
  },
3295
4075
  homepage: "https://www.prisma.io",
3296
4076
  repository: {
@@ -3342,19 +4122,19 @@ var require_package2 = __commonJS({
3342
4122
  "@cloudflare/workers-types": "4.20240614.0",
3343
4123
  "@codspeed/benchmark.js-plugin": "3.1.1",
3344
4124
  "@faker-js/faker": "8.4.1",
3345
- "@fast-check/jest": "1.8.2",
4125
+ "@fast-check/jest": "2.0.3",
3346
4126
  "@inquirer/prompts": "5.0.5",
3347
4127
  "@jest/create-cache-key-function": "29.7.0",
3348
4128
  "@jest/globals": "29.7.0",
3349
4129
  "@jest/test-sequencer": "29.7.0",
3350
4130
  "@libsql/client": "0.8.0",
3351
- "@neondatabase/serverless": "0.9.3",
4131
+ "@neondatabase/serverless": "0.10.2",
3352
4132
  "@opentelemetry/api": "1.9.0",
3353
- "@opentelemetry/context-async-hooks": "1.25.1",
3354
- "@opentelemetry/instrumentation": "0.52.1",
3355
- "@opentelemetry/resources": "1.25.1",
3356
- "@opentelemetry/sdk-trace-base": "1.25.1",
3357
- "@opentelemetry/semantic-conventions": "1.25.1",
4133
+ "@opentelemetry/context-async-hooks": "1.29.0",
4134
+ "@opentelemetry/instrumentation": "0.56.0",
4135
+ "@opentelemetry/resources": "1.29.0",
4136
+ "@opentelemetry/sdk-trace-base": "1.29.0",
4137
+ "@opentelemetry/semantic-conventions": "1.28.0",
3358
4138
  "@planetscale/database": "1.18.0",
3359
4139
  "@prisma/adapter-d1": "workspace:*",
3360
4140
  "@prisma/adapter-libsql": "workspace:*",
@@ -3365,7 +4145,7 @@ var require_package2 = __commonJS({
3365
4145
  "@prisma/debug": "workspace:*",
3366
4146
  "@prisma/driver-adapter-utils": "workspace:*",
3367
4147
  "@prisma/engines": "workspace:*",
3368
- "@prisma/engines-version": "6.3.0-6.integration-5-22-0-with-simplified-typeinfo-c7d99d9db5129d8b35986b8518c7f10bc8580e03",
4148
+ "@prisma/engines-version": "6.3.0-16.eb5bc5493ac383a8fe3c3e7fabfc93e4d44ca21e",
3369
4149
  "@prisma/fetch-engine": "workspace:*",
3370
4150
  "@prisma/generator-helper": "workspace:*",
3371
4151
  "@prisma/get-platform": "workspace:*",
@@ -3374,15 +4154,15 @@ var require_package2 = __commonJS({
3374
4154
  "@prisma/migrate": "workspace:*",
3375
4155
  "@prisma/mini-proxy": "0.9.5",
3376
4156
  "@prisma/pg-worker": "workspace:*",
3377
- "@prisma/query-engine-wasm": "6.3.0-6.integration-5-22-0-with-simplified-typeinfo-c7d99d9db5129d8b35986b8518c7f10bc8580e03",
4157
+ "@prisma/query-engine-wasm": "6.3.0-16.eb5bc5493ac383a8fe3c3e7fabfc93e4d44ca21e",
3378
4158
  "@snaplet/copycat": "0.17.3",
3379
4159
  "@swc-node/register": "1.10.9",
3380
- "@swc/core": "1.6.13",
3381
- "@swc/jest": "0.2.36",
4160
+ "@swc/core": "1.10.1",
4161
+ "@swc/jest": "0.2.37",
3382
4162
  "@timsuchanek/copy": "1.4.5",
3383
4163
  "@types/debug": "4.1.12",
3384
4164
  "@types/fs-extra": "9.0.13",
3385
- "@types/jest": "29.5.12",
4165
+ "@types/jest": "29.5.14",
3386
4166
  "@types/js-levenshtein": "1.1.3",
3387
4167
  "@types/mssql": "9.1.5",
3388
4168
  "@types/node": "18.19.31",
@@ -3393,7 +4173,7 @@ var require_package2 = __commonJS({
3393
4173
  "decimal.js": "10.4.3",
3394
4174
  "detect-runtime": "1.0.4",
3395
4175
  "env-paths": "2.2.1",
3396
- esbuild: "0.23.0",
4176
+ esbuild: "0.24.2",
3397
4177
  execa: "5.1.1",
3398
4178
  "expect-type": "0.19.0",
3399
4179
  "flat-map-polyfill": "0.3.8",
@@ -3404,13 +4184,13 @@ var require_package2 = __commonJS({
3404
4184
  jest: "29.7.0",
3405
4185
  "jest-extended": "4.0.2",
3406
4186
  "jest-junit": "16.0.0",
3407
- "jest-serializer-ansi-escapes": "3.0.0",
4187
+ "jest-serializer-ansi-escapes": "4.0.0",
3408
4188
  "jest-snapshot": "29.7.0",
3409
4189
  "js-levenshtein": "1.1.6",
3410
4190
  kleur: "4.1.5",
3411
4191
  klona: "2.0.6",
3412
4192
  mariadb: "3.3.1",
3413
- memfs: "4.9.3",
4193
+ memfs: "4.15.0",
3414
4194
  mssql: "11.0.1",
3415
4195
  "new-github-issue-url": "0.2.1",
3416
4196
  "node-fetch": "3.3.2",
@@ -3420,7 +4200,7 @@ var require_package2 = __commonJS({
3420
4200
  pluralize: "8.0.0",
3421
4201
  resolve: "1.22.8",
3422
4202
  rimraf: "3.0.2",
3423
- "simple-statistics": "7.8.5",
4203
+ "simple-statistics": "7.8.7",
3424
4204
  "sort-keys": "4.2.0",
3425
4205
  "source-map-support": "0.5.21",
3426
4206
  "sql-template-tag": "5.2.1",
@@ -3428,11 +4208,11 @@ var require_package2 = __commonJS({
3428
4208
  "strip-ansi": "6.0.1",
3429
4209
  "strip-indent": "3.0.0",
3430
4210
  "ts-node": "10.9.2",
3431
- "ts-pattern": "5.2.0",
3432
- tsd: "0.31.1",
4211
+ "ts-pattern": "5.6.0",
4212
+ tsd: "0.31.2",
3433
4213
  typescript: "5.4.5",
3434
- undici: "5.28.4",
3435
- wrangler: "3.62.0",
4214
+ undici: "7.2.1",
4215
+ wrangler: "3.91.0",
3436
4216
  zx: "7.2.3"
3437
4217
  },
3438
4218
  peerDependencies: {
@@ -4255,6 +5035,12 @@ var src_default = Debug;
4255
5035
  var import_engines_version = __toESM(require_engines_version());
4256
5036
 
4257
5037
  // ../generator-helper/src/dmmf.ts
5038
+ function datamodelEnumToSchemaEnum(datamodelEnum) {
5039
+ return {
5040
+ name: datamodelEnum.name,
5041
+ values: datamodelEnum.values.map((v) => v.name)
5042
+ };
5043
+ }
4258
5044
  var DMMF;
4259
5045
  ((DMMF2) => {
4260
5046
  let ModelAction;
@@ -4269,6 +5055,7 @@ var DMMF;
4269
5055
  ModelAction2["createManyAndReturn"] = "createManyAndReturn";
4270
5056
  ModelAction2["update"] = "update";
4271
5057
  ModelAction2["updateMany"] = "updateMany";
5058
+ ModelAction2["updateManyAndReturn"] = "updateManyAndReturn";
4272
5059
  ModelAction2["upsert"] = "upsert";
4273
5060
  ModelAction2["delete"] = "delete";
4274
5061
  ModelAction2["deleteMany"] = "deleteMany";
@@ -4454,7 +5241,7 @@ function getNodeAPIName(binaryTarget, type) {
4454
5241
  }
4455
5242
 
4456
5243
  // ../../node_modules/.pnpm/find-cache-dir@5.0.0/node_modules/find-cache-dir/index.js
4457
- var import_node_process = __toESM(require("process"), 1);
5244
+ var import_node_process = __toESM(require("node:process"), 1);
4458
5245
  var import_common_path_prefix = __toESM(require_common_path_prefix(), 1);
4459
5246
 
4460
5247
  // ../../node_modules/.pnpm/find-up@6.3.0/node_modules/find-up/index.js
@@ -4496,6 +5283,8 @@ function getClientEngineType(generatorConfig) {
4496
5283
  return "library" /* Library */;
4497
5284
  } else if (generatorConfig?.config.engineType === "binary" /* Binary */) {
4498
5285
  return "binary" /* Binary */;
5286
+ } else if (generatorConfig?.config.engineType === "client" /* Client */) {
5287
+ return "client" /* Client */;
4499
5288
  } else {
4500
5289
  return DEFAULT_CLIENT_ENGINE_TYPE;
4501
5290
  }
@@ -4506,6 +5295,8 @@ function getEngineTypeFromEnvVar() {
4506
5295
  return "library" /* Library */;
4507
5296
  } else if (engineType === "binary" /* Binary */) {
4508
5297
  return "binary" /* Binary */;
5298
+ } else if (engineType === "client" /* Client */) {
5299
+ return "client" /* Client */;
4509
5300
  } else {
4510
5301
  return void 0;
4511
5302
  }
@@ -4609,7 +5400,7 @@ var GraphQLScalarToJSTypeTable = {
4609
5400
  ID: "string",
4610
5401
  UUID: "string",
4611
5402
  Json: "JsonValue",
4612
- Bytes: "Buffer",
5403
+ Bytes: "Uint8Array",
4613
5404
  Decimal: ["Decimal", "DecimalJsLike", "number", "string"],
4614
5405
  BigInt: ["bigint", "number"]
4615
5406
  };
@@ -4653,6 +5444,7 @@ function getMappings(mappings, datamodel) {
4653
5444
  update: mapping.updateOne || mapping.updateSingle || mapping.update,
4654
5445
  deleteMany: mapping.deleteMany,
4655
5446
  updateMany: mapping.updateMany,
5447
+ updateManyAndReturn: mapping.updateManyAndReturn,
4656
5448
  upsert: mapping.upsertOne || mapping.upsertSingle || mapping.upsert,
4657
5449
  aggregate: mapping.aggregate,
4658
5450
  groupBy: mapping.groupBy,
@@ -5803,15 +6595,24 @@ function getSelectName(modelName) {
5803
6595
  function getSelectCreateManyAndReturnName(modelName) {
5804
6596
  return `${modelName}SelectCreateManyAndReturn`;
5805
6597
  }
6598
+ function getSelectUpdateManyAndReturnName(modelName) {
6599
+ return `${modelName}SelectUpdateManyAndReturn`;
6600
+ }
5806
6601
  function getIncludeName(modelName) {
5807
6602
  return `${modelName}Include`;
5808
6603
  }
5809
6604
  function getIncludeCreateManyAndReturnName(modelName) {
5810
6605
  return `${modelName}IncludeCreateManyAndReturn`;
5811
6606
  }
6607
+ function getIncludeUpdateManyAndReturnName(modelName) {
6608
+ return `${modelName}IncludeUpdateManyAndReturn`;
6609
+ }
5812
6610
  function getCreateManyAndReturnOutputType(modelName) {
5813
6611
  return `CreateMany${modelName}AndReturnOutputType`;
5814
6612
  }
6613
+ function getUpdateManyAndReturnOutputType(modelName) {
6614
+ return `UpdateMany${modelName}AndReturnOutputType`;
6615
+ }
5815
6616
  function getOmitName(modelName) {
5816
6617
  return `${modelName}Omit`;
5817
6618
  }
@@ -5863,9 +6664,6 @@ function getFieldArgName(field, modelName) {
5863
6664
  function getModelFieldArgsName(field, modelName) {
5864
6665
  return `${modelName}$${field.name}Args`;
5865
6666
  }
5866
- function getLegacyModelArgName(modelName) {
5867
- return `${modelName}Args`;
5868
- }
5869
6667
  function getModelArgName(modelName, action) {
5870
6668
  if (!action) {
5871
6669
  return `${modelName}DefaultArgs`;
@@ -5887,6 +6685,8 @@ function getModelArgName(modelName, action) {
5887
6685
  return `${modelName}UpdateArgs`;
5888
6686
  case DMMF.ModelAction.updateMany:
5889
6687
  return `${modelName}UpdateManyArgs`;
6688
+ case DMMF.ModelAction.updateManyAndReturn:
6689
+ return `${modelName}UpdateManyAndReturnArgs`;
5890
6690
  case DMMF.ModelAction.delete:
5891
6691
  return `${modelName}DeleteArgs`;
5892
6692
  case DMMF.ModelAction.create:
@@ -6218,7 +7018,7 @@ const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({
6218
7018
  body: (ctx) => {
6219
7019
  const onlySelect = ctx.firstScalar ? `
6220
7020
  // Create many ${ctx.plural} and only return the \`${ctx.firstScalar.name}\`
6221
- const ${lowerCase(ctx.mapping.model)}With${capitalize(ctx.firstScalar.name)}Only = await ${ctx.method}({
7021
+ const ${lowerCase(ctx.mapping.model)}With${capitalize(ctx.firstScalar.name)}Only = await ${ctx.method}({
6222
7022
  select: { ${ctx.firstScalar.name}: true },
6223
7023
  data: [
6224
7024
  // ... provide data here
@@ -6256,7 +7056,7 @@ const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({
6256
7056
  }
6257
7057
  },
6258
7058
  findUniqueOrThrow: {
6259
- body: (ctx) => `Find one ${ctx.singular} that matches the filter or throw an error with \`error.code='P2025'\`
7059
+ body: (ctx) => `Find one ${ctx.singular} that matches the filter or throw an error with \`error.code='P2025'\`
6260
7060
  if no matches were found.
6261
7061
  @param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to find a ${ctx.singular}
6262
7062
  @example
@@ -6465,7 +7265,43 @@ const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({
6465
7265
  `,
6466
7266
  fields: {
6467
7267
  data: (singular, plural) => `The data used to update ${plural}.`,
6468
- where: (singular, plural) => `Filter which ${plural} to update`
7268
+ where: (singular, plural) => `Filter which ${plural} to update`,
7269
+ limit: (singular, plural) => `Limit how many ${plural} to update.`
7270
+ }
7271
+ },
7272
+ updateManyAndReturn: {
7273
+ body: (ctx) => {
7274
+ const onlySelect = ctx.firstScalar ? `
7275
+ // Update zero or more ${ctx.plural} and only return the \`${ctx.firstScalar.name}\`
7276
+ const ${lowerCase(ctx.mapping.model)}With${capitalize(ctx.firstScalar.name)}Only = await ${ctx.method}({
7277
+ select: { ${ctx.firstScalar.name}: true },
7278
+ where: {
7279
+ // ... provide filter here
7280
+ },
7281
+ data: [
7282
+ // ... provide data here
7283
+ ]
7284
+ })` : "";
7285
+ return `Update zero or more ${ctx.plural} and returns the data updated in the database.
7286
+ @param {${getModelArgName(ctx.model.name, ctx.action)}} args - Arguments to update many ${ctx.plural}.
7287
+ @example
7288
+ // Update many ${ctx.plural}
7289
+ const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({
7290
+ where: {
7291
+ // ... provide filter here
7292
+ },
7293
+ data: [
7294
+ // ... provide data here
7295
+ ]
7296
+ })
7297
+ ${onlySelect}
7298
+ ${undefinedNote}
7299
+ `;
7300
+ },
7301
+ fields: {
7302
+ data: (singular, plural) => `The data used to update ${plural}.`,
7303
+ where: (singular, plural) => `Filter which ${plural} to update`,
7304
+ limit: (singular, plural) => `Limit how many ${plural} to update.`
6469
7305
  }
6470
7306
  },
6471
7307
  deleteMany: {
@@ -6480,7 +7316,8 @@ const { count } = await ${ctx.method}({
6480
7316
  })
6481
7317
  `,
6482
7318
  fields: {
6483
- where: (singular, plural) => `Filter which ${plural} to delete`
7319
+ where: (singular, plural) => `Filter which ${plural} to delete`,
7320
+ limit: (singular, plural) => `Limit how many ${plural} to delete.`
6484
7321
  }
6485
7322
  },
6486
7323
  aggregateRaw: {
@@ -6503,7 +7340,7 @@ const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({
6503
7340
  @param {${getModelArgName(ctx.model.name, ctx.action)}} args - Select which filters you would like to apply.
6504
7341
  @example
6505
7342
  const ${lowerCase(ctx.mapping.model)} = await ${ctx.method}({
6506
- filter: { age: { $gt: 25 } }
7343
+ filter: { age: { $gt: 25 } }
6507
7344
  })`,
6508
7345
  fields: {
6509
7346
  filter: () => "The query predicate filter. If unspecified, then all documents in the collection will match the predicate. ${@link https://docs.mongodb.com/manual/reference/operator/query MongoDB Docs}.",
@@ -6597,9 +7434,6 @@ var ArgsTypeBuilder = class {
6597
7434
  return this;
6598
7435
  }
6599
7436
  addOmitArg() {
6600
- if (!this.context.isPreviewFeatureOn("omitApi")) {
6601
- return this;
6602
- }
6603
7437
  this.addProperty(
6604
7438
  property(
6605
7439
  "omit",
@@ -6621,13 +7455,6 @@ var ArgsTypeBuilder = class {
6621
7455
  return this;
6622
7456
  }
6623
7457
  createExport() {
6624
- if (!this.action && this.hasDefaultName) {
6625
- this.context.defaultArgsAliases.addPossibleAlias(
6626
- getModelArgName(this.type.name),
6627
- getLegacyModelArgName(this.type.name)
6628
- );
6629
- }
6630
- this.context.defaultArgsAliases.registerArgName(this.moduleExport.declaration.name);
6631
7458
  return this.moduleExport;
6632
7459
  }
6633
7460
  };
@@ -6838,6 +7665,7 @@ var Model = class {
6838
7665
  this.dmmf = context.dmmf;
6839
7666
  this.type = this.context.dmmf.outputTypeMap.model[model.name];
6840
7667
  this.createManyAndReturnType = this.context.dmmf.outputTypeMap.model[getCreateManyAndReturnOutputType(model.name)];
7668
+ this.updateManyAndReturnType = this.context.dmmf.outputTypeMap.model[getUpdateManyAndReturnOutputType(model.name)];
6841
7669
  this.mapping = this.context.dmmf.mappings.modelOperations.find((m) => m.model === model.name);
6842
7670
  }
6843
7671
  get argsTypes() {
@@ -6864,6 +7692,15 @@ var Model = class {
6864
7692
  );
6865
7693
  }
6866
7694
  argsTypes.push(args.createExport());
7695
+ } else if (action === "updateManyAndReturn") {
7696
+ const args = new ArgsTypeBuilder(this.type, this.context, action).addSelectArg(getSelectUpdateManyAndReturnName(this.type.name)).addOmitArg().addSchemaArgs(field.args);
7697
+ if (this.updateManyAndReturnType) {
7698
+ args.addIncludeArgIfHasRelations(
7699
+ getIncludeUpdateManyAndReturnName(this.model.name),
7700
+ this.updateManyAndReturnType
7701
+ );
7702
+ }
7703
+ argsTypes.push(args.createExport());
6867
7704
  } else if (action !== "groupBy" && action !== "aggregate") {
6868
7705
  argsTypes.push(
6869
7706
  new ArgsTypeBuilder(this.type, this.context, action).addSelectArg().addOmitArg().addIncludeArgIfHasRelations().addSchemaArgs(field.args).createExport()
@@ -6901,7 +7738,6 @@ var Model = class {
6901
7738
  throw new Error(`Could not find groupBy root field for model ${model.name}. Mapping: ${mapping?.groupBy}`);
6902
7739
  }
6903
7740
  const groupByArgsName = getGroupByArgsName(model.name);
6904
- this.context.defaultArgsAliases.registerArgName(groupByArgsName);
6905
7741
  return `
6906
7742
 
6907
7743
 
@@ -6971,7 +7807,6 @@ type ${getGroupByPayloadName(model.name)}<T extends ${groupByArgsName}> = Prisma
6971
7807
  aggregateTypes.push(countType);
6972
7808
  }
6973
7809
  const aggregateArgsName = getAggregateArgsName(model.name);
6974
- this.context.defaultArgsAliases.registerArgName(aggregateArgsName);
6975
7810
  const aggregateName = getAggregateName(model.name);
6976
7811
  return `${aggregateTypes.map(buildOutputType).map((type) => stringify(type)).join("\n\n")}
6977
7812
 
@@ -7046,9 +7881,12 @@ export type ${getAggregateGetName(model.name)}<T extends ${getAggregateArgsName(
7046
7881
  toTS() {
7047
7882
  const { model } = this;
7048
7883
  const isComposite = this.dmmf.isComposite(model.name);
7049
- const omitType = this.context.isPreviewFeatureOn("omitApi") ? stringify(buildOmitType({ modelName: this.model.name, context: this.context, fields: this.type.fields }), {
7050
- newLine: "leading"
7051
- }) : "";
7884
+ const omitType = stringify(
7885
+ buildOmitType({ modelName: this.model.name, context: this.context, fields: this.type.fields }),
7886
+ {
7887
+ newLine: "leading"
7888
+ }
7889
+ );
7052
7890
  const hasRelationField = model.fields.some((f) => f.kind === "object");
7053
7891
  const includeType = hasRelationField ? stringify(
7054
7892
  buildIncludeType({ modelName: this.model.name, context: this.context, fields: this.type.fields }),
@@ -7067,6 +7905,17 @@ export type ${getAggregateGetName(model.name)}<T extends ${getAggregateArgsName(
7067
7905
  newLine: "leading"
7068
7906
  }
7069
7907
  ) : "";
7908
+ const updateManyAndReturnIncludeType = hasRelationField && this.updateManyAndReturnType ? stringify(
7909
+ buildIncludeType({
7910
+ typeName: getIncludeUpdateManyAndReturnName(this.model.name),
7911
+ modelName: this.model.name,
7912
+ context: this.context,
7913
+ fields: this.updateManyAndReturnType.fields
7914
+ }),
7915
+ {
7916
+ newLine: "leading"
7917
+ }
7918
+ ) : "";
7070
7919
  return `
7071
7920
  /**
7072
7921
  * Model ${model.name}
@@ -7086,10 +7935,19 @@ ${this.createManyAndReturnType ? stringify(
7086
7935
  }),
7087
7936
  { newLine: "leading" }
7088
7937
  ) : ""}
7938
+ ${this.updateManyAndReturnType ? stringify(
7939
+ buildSelectType({
7940
+ modelName: this.model.name,
7941
+ fields: this.updateManyAndReturnType.fields,
7942
+ context: this.context,
7943
+ typeName: getSelectUpdateManyAndReturnName(this.model.name)
7944
+ }),
7945
+ { newLine: "leading" }
7946
+ ) : ""}
7089
7947
  ${stringify(buildScalarSelectType({ modelName: this.model.name, fields: this.type.fields, context: this.context }), {
7090
7948
  newLine: "leading"
7091
7949
  })}
7092
- ${omitType}${includeType}${createManyAndReturnIncludeType}
7950
+ ${omitType}${includeType}${createManyAndReturnIncludeType}${updateManyAndReturnIncludeType}
7093
7951
 
7094
7952
  ${stringify(buildModelPayload(this.model, this.context), { newLine: "none" })}
7095
7953
 
@@ -7133,18 +7991,13 @@ var ModelDelegate = class {
7133
7991
  const nonAggregateActions = this.getNonAggregateActions(availableActions);
7134
7992
  const groupByArgsName = getGroupByArgsName(name);
7135
7993
  const countArgsName = getModelArgName(name, DMMF.ModelAction.count);
7136
- this.context.defaultArgsAliases.registerArgName(countArgsName);
7137
- const genericDelegateParams = [extArgsParam];
7138
- const excludedArgsForCount = ["select", "include", "distinct"];
7139
- if (this.context.isPreviewFeatureOn("omitApi")) {
7140
- excludedArgsForCount.push("omit");
7141
- genericDelegateParams.push(genericParameter("ClientOptions").default(objectType()));
7142
- }
7994
+ const genericDelegateParams = [extArgsParam, genericParameter("ClientOptions").default(objectType())];
7995
+ const excludedArgsForCount = ["select", "include", "distinct", "omit"];
7143
7996
  if (this.context.isPreviewFeatureOn("relationJoins")) {
7144
7997
  excludedArgsForCount.push("relationLoadStrategy");
7145
7998
  }
7146
7999
  const excludedArgsForCountType = excludedArgsForCount.map((name2) => `'${name2}'`).join(" | ");
7147
- return `${availableActions.includes(DMMF.ModelAction.aggregate) ? `type ${countArgsName}<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
8000
+ return `${availableActions.includes(DMMF.ModelAction.aggregate) ? `type ${countArgsName}<ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs> =
7148
8001
  Omit<${getModelArgName(name, DMMF.ModelAction.findMany)}, ${excludedArgsForCountType}> & {
7149
8002
  select?: ${getCountAggregateInputName(name)} | true
7150
8003
  }
@@ -7246,7 +8099,7 @@ ${stringify(buildFluentWrapperDefinition(name, this.outputType, this.context))}
7246
8099
  function buildModelDelegateMethod(modelName, actionName, context) {
7247
8100
  const mapping = context.dmmf.mappingsMap[modelName] ?? { model: modelName, plural: `${modelName}s` };
7248
8101
  const modelOrType = context.dmmf.typeAndModelMap[modelName];
7249
- const method2 = method(actionName).setDocComment(docComment(getMethodJSDocBody(actionName, mapping, modelOrType))).addParameter(getNonAggregateMethodArgs(modelName, actionName)).setReturnType(getReturnType({ modelName, actionName, context }));
8102
+ const method2 = method(actionName).setDocComment(docComment(getMethodJSDocBody(actionName, mapping, modelOrType))).addParameter(getNonAggregateMethodArgs(modelName, actionName)).setReturnType(getReturnType({ modelName, actionName }));
7250
8103
  const generic = getNonAggregateMethodGenericParam(modelName, actionName);
7251
8104
  if (generic) {
7252
8105
  method2.addGenericParameter(generic);
@@ -7254,7 +8107,6 @@ function buildModelDelegateMethod(modelName, actionName, context) {
7254
8107
  return method2;
7255
8108
  }
7256
8109
  function getNonAggregateMethodArgs(modelName, actionName) {
7257
- getReturnType;
7258
8110
  const makeParameter = (type2) => parameter("args", type2);
7259
8111
  if (actionName === DMMF.ModelAction.count) {
7260
8112
  const type2 = omit(
@@ -7288,7 +8140,6 @@ function getNonAggregateMethodGenericParam(modelName, actionName) {
7288
8140
  function getReturnType({
7289
8141
  modelName,
7290
8142
  actionName,
7291
- context,
7292
8143
  isChaining = false,
7293
8144
  isNullable = false
7294
8145
  }) {
@@ -7304,9 +8155,9 @@ function getReturnType({
7304
8155
  if (actionName === DMMF.ModelAction.deleteMany || actionName === DMMF.ModelAction.updateMany || actionName === DMMF.ModelAction.createMany) {
7305
8156
  return prismaPromise(namedType("BatchPayload"));
7306
8157
  }
7307
- const isList = actionName === DMMF.ModelAction.findMany || actionName === DMMF.ModelAction.createManyAndReturn;
8158
+ const isList = actionName === DMMF.ModelAction.findMany || actionName === DMMF.ModelAction.createManyAndReturn || actionName === DMMF.ModelAction.updateManyAndReturn;
7308
8159
  if (isList) {
7309
- let result = getResultType(modelName, actionName, context);
8160
+ let result = getResultType(modelName, actionName);
7310
8161
  if (isChaining) {
7311
8162
  result = unionType(result).addVariant(namedType("Null"));
7312
8163
  }
@@ -7314,35 +8165,24 @@ function getReturnType({
7314
8165
  }
7315
8166
  if (isChaining && actionName === DMMF.ModelAction.findUniqueOrThrow) {
7316
8167
  const nullType2 = isNullable ? nullType : namedType("Null");
7317
- const result = unionType(getResultType(modelName, actionName, context)).addVariant(nullType2);
7318
- return getFluentWrapper(modelName, context, result, nullType2);
8168
+ const result = unionType(getResultType(modelName, actionName)).addVariant(nullType2);
8169
+ return getFluentWrapper(modelName, result, nullType2);
7319
8170
  }
7320
8171
  if (actionName === DMMF.ModelAction.findFirst || actionName === DMMF.ModelAction.findUnique) {
7321
- const result = unionType(getResultType(modelName, actionName, context)).addVariant(nullType);
7322
- return getFluentWrapper(modelName, context, result, nullType);
8172
+ const result = unionType(getResultType(modelName, actionName)).addVariant(nullType);
8173
+ return getFluentWrapper(modelName, result, nullType);
7323
8174
  }
7324
- return getFluentWrapper(modelName, context, getResultType(modelName, actionName, context));
8175
+ return getFluentWrapper(modelName, getResultType(modelName, actionName));
7325
8176
  }
7326
- function getFluentWrapper(modelName, context, resultType, nullType2 = neverType) {
7327
- const result = namedType(fluentWrapperName(modelName)).addGenericArgument(resultType).addGenericArgument(nullType2).addGenericArgument(extArgsParam.toArgument());
7328
- if (context.isPreviewFeatureOn("omitApi")) {
7329
- result.addGenericArgument(namedType("ClientOptions"));
7330
- }
7331
- return result;
8177
+ function getFluentWrapper(modelName, resultType, nullType2 = neverType) {
8178
+ return namedType(fluentWrapperName(modelName)).addGenericArgument(resultType).addGenericArgument(nullType2).addGenericArgument(extArgsParam.toArgument()).addGenericArgument(namedType("ClientOptions"));
7332
8179
  }
7333
- function getResultType(modelName, actionName, context) {
7334
- const result = namedType("$Result.GetResult").addGenericArgument(namedType(getPayloadName(modelName)).addGenericArgument(extArgsParam.toArgument())).addGenericArgument(namedType("T")).addGenericArgument(stringLiteral(actionName));
7335
- if (context.isPreviewFeatureOn("omitApi")) {
7336
- result.addGenericArgument(namedType("ClientOptions"));
7337
- }
7338
- return result;
8180
+ function getResultType(modelName, actionName) {
8181
+ return namedType("$Result.GetResult").addGenericArgument(namedType(getPayloadName(modelName)).addGenericArgument(extArgsParam.toArgument())).addGenericArgument(namedType("T")).addGenericArgument(stringLiteral(actionName)).addGenericArgument(namedType("ClientOptions"));
7339
8182
  }
7340
8183
  function buildFluentWrapperDefinition(modelName, outputType, context) {
7341
8184
  const definition = interfaceDeclaration(fluentWrapperName(modelName));
7342
- definition.addGenericParameter(genericParameter("T")).addGenericParameter(genericParameter("Null").default(neverType)).addGenericParameter(extArgsParam).extends(prismaPromise(namedType("T")));
7343
- if (context.isPreviewFeatureOn("omitApi")) {
7344
- definition.addGenericParameter(genericParameter("ClientOptions").default(objectType()));
7345
- }
8185
+ definition.addGenericParameter(genericParameter("T")).addGenericParameter(genericParameter("Null").default(neverType)).addGenericParameter(extArgsParam).addGenericParameter(genericParameter("ClientOptions").default(objectType())).extends(prismaPromise(namedType("T")));
7346
8186
  definition.add(property(toStringTag, stringLiteral("PrismaPromise")).readonly());
7347
8187
  definition.addMultiple(
7348
8188
  outputType.fields.filter(
@@ -7355,7 +8195,6 @@ function buildFluentWrapperDefinition(modelName, outputType, context) {
7355
8195
  modelName: field.outputType.type,
7356
8196
  actionName: field.outputType.isList ? DMMF.ModelAction.findMany : DMMF.ModelAction.findUniqueOrThrow,
7357
8197
  isChaining: true,
7358
- context,
7359
8198
  isNullable: field.isNullable
7360
8199
  })
7361
8200
  );
@@ -7875,7 +8714,6 @@ import {
7875
8714
  PrismaClientRustPanicError,
7876
8715
  PrismaClientInitializationError,
7877
8716
  PrismaClientValidationError,
7878
- NotFoundError,
7879
8717
  getPrismaClient,
7880
8718
  sqltag,
7881
8719
  empty,
@@ -7906,7 +8744,6 @@ const {
7906
8744
  PrismaClientRustPanicError,
7907
8745
  PrismaClientInitializationError,
7908
8746
  PrismaClientValidationError,
7909
- NotFoundError,
7910
8747
  getPrismaClient,
7911
8748
  sqltag,
7912
8749
  empty,
@@ -7921,7 +8758,8 @@ const {
7921
8758
  warnOnce,
7922
8759
  defineDmmfProperty,
7923
8760
  Public,
7924
- getRuntime
8761
+ getRuntime,
8762
+ createParam,
7925
8763
  } = require('${runtimeBase}/${runtimeNameJs}.js')
7926
8764
  `}
7927
8765
 
@@ -7944,7 +8782,6 @@ Prisma.PrismaClientUnknownRequestError = ${notSupportOnBrowser("PrismaClientUnkn
7944
8782
  Prisma.PrismaClientRustPanicError = ${notSupportOnBrowser("PrismaClientRustPanicError", browser)}
7945
8783
  Prisma.PrismaClientInitializationError = ${notSupportOnBrowser("PrismaClientInitializationError", browser)}
7946
8784
  Prisma.PrismaClientValidationError = ${notSupportOnBrowser("PrismaClientValidationError", browser)}
7947
- Prisma.NotFoundError = ${notSupportOnBrowser("NotFoundError", browser)}
7948
8785
  Prisma.Decimal = Decimal
7949
8786
 
7950
8787
  /**
@@ -8020,7 +8857,6 @@ export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownReque
8020
8857
  export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError
8021
8858
  export import PrismaClientInitializationError = runtime.PrismaClientInitializationError
8022
8859
  export import PrismaClientValidationError = runtime.PrismaClientValidationError
8023
- export import NotFoundError = runtime.NotFoundError
8024
8860
 
8025
8861
  /**
8026
8862
  * Re-export of sql-template-tag
@@ -8041,7 +8877,7 @@ export import Decimal = runtime.Decimal
8041
8877
  export type DecimalJsLike = runtime.DecimalJsLike
8042
8878
 
8043
8879
  /**
8044
- * Metrics
8880
+ * Metrics
8045
8881
  */
8046
8882
  export type Metrics = runtime.Metrics
8047
8883
  export type Metric<T> = runtime.Metric<T>
@@ -8066,7 +8902,7 @@ export type PrismaVersion = {
8066
8902
  client: string
8067
8903
  }
8068
8904
 
8069
- export const prismaVersion: PrismaVersion
8905
+ export const prismaVersion: PrismaVersion
8070
8906
 
8071
8907
  /**
8072
8908
  * Utility Types
@@ -8082,7 +8918,7 @@ export import InputJsonValue = runtime.InputJsonValue
8082
8918
 
8083
8919
  /**
8084
8920
  * Types of the values used to represent different kinds of \`null\` values when working with JSON fields.
8085
- *
8921
+ *
8086
8922
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
8087
8923
  */
8088
8924
  namespace NullTypes {
@@ -8095,21 +8931,21 @@ ${buildNullClass("AnyNull")}
8095
8931
 
8096
8932
  /**
8097
8933
  * Helper for filtering JSON entries that have \`null\` on the database (empty on the db)
8098
- *
8934
+ *
8099
8935
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
8100
8936
  */
8101
8937
  export const DbNull: NullTypes.DbNull
8102
8938
 
8103
8939
  /**
8104
8940
  * Helper for filtering JSON entries that have JSON \`null\` values (not empty on the db)
8105
- *
8941
+ *
8106
8942
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
8107
8943
  */
8108
8944
  export const JsonNull: NullTypes.JsonNull
8109
8945
 
8110
8946
  /**
8111
8947
  * Helper for filtering JSON entries that are \`Prisma.DbNull\` or \`Prisma.JsonNull\`
8112
- *
8948
+ *
8113
8949
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
8114
8950
  */
8115
8951
  export const AnyNull: NullTypes.AnyNull
@@ -8414,9 +9250,9 @@ type FieldRefInputType<Model, FieldType> = Model extends never ? never : FieldRe
8414
9250
  function buildNullClass(name) {
8415
9251
  const source = `/**
8416
9252
  * Type of \`Prisma.${name}\`.
8417
- *
9253
+ *
8418
9254
  * You cannot use other instances of this class. Please use the \`Prisma.${name}\` value.
8419
- *
9255
+ *
8420
9256
  * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field
8421
9257
  */
8422
9258
  class ${name} {
@@ -8502,37 +9338,6 @@ function getCountArgsType(typeName, fieldName) {
8502
9338
  return `${typeName}Count${capitalize2(fieldName)}Args`;
8503
9339
  }
8504
9340
 
8505
- // src/generation/TSClient/DefaultArgsAliases.ts
8506
- var DefaultArgsAliases = class {
8507
- constructor() {
8508
- this.existingArgTypes = /* @__PURE__ */ new Set();
8509
- this.possibleAliases = [];
8510
- }
8511
- addPossibleAlias(newName, legacyName) {
8512
- this.possibleAliases.push({ newName, legacyName });
8513
- }
8514
- registerArgName(name) {
8515
- this.existingArgTypes.add(name);
8516
- }
8517
- generateAliases() {
8518
- const aliases = [];
8519
- for (const { newName, legacyName } of this.possibleAliases) {
8520
- if (this.existingArgTypes.has(legacyName)) {
8521
- continue;
8522
- }
8523
- aliases.push(
8524
- stringify(
8525
- moduleExport(
8526
- typeDeclaration(legacyName, namedType(newName).addGenericArgument(extArgsParam.toArgument())).addGenericParameter(extArgsParam)
8527
- ).setDocComment(docComment(`@deprecated Use ${newName} instead`)),
8528
- { indentLevel: 1 }
8529
- )
8530
- );
8531
- }
8532
- return aliases.join("\n");
8533
- }
8534
- };
8535
-
8536
9341
  // src/generation/TSClient/FieldRefInput.ts
8537
9342
  var FieldRefInput = class {
8538
9343
  constructor(type) {
@@ -8554,10 +9359,9 @@ export type ${this.type.name}<$PrismaModel> = FieldRefInputType<$PrismaModel, ${
8554
9359
 
8555
9360
  // src/generation/TSClient/GenerateContext.ts
8556
9361
  var GenerateContext = class {
8557
- constructor({ dmmf, genericArgsInfo, defaultArgsAliases, generator }) {
9362
+ constructor({ dmmf, genericArgsInfo, generator }) {
8558
9363
  this.dmmf = dmmf;
8559
9364
  this.genericArgsInfo = genericArgsInfo;
8560
- this.defaultArgsAliases = defaultArgsAliases;
8561
9365
  this.generator = generator;
8562
9366
  }
8563
9367
  isPreviewFeatureOn(previewFeature) {
@@ -8648,6 +9452,7 @@ function clientTypeMapModelsResultDefinition(modelName, action) {
8648
9452
  if (action === "createMany") return namedType("BatchPayload");
8649
9453
  if (action === "createManyAndReturn") return array(payloadToResult(modelName));
8650
9454
  if (action === "updateMany") return namedType("BatchPayload");
9455
+ if (action === "updateManyAndReturn") return array(payloadToResult(modelName));
8651
9456
  if (action === "findMany") return array(payloadToResult(modelName));
8652
9457
  if (action === "findFirst") return unionType([payloadToResult(modelName), nullType]);
8653
9458
  if (action === "findUnique") return unionType([payloadToResult(modelName), nullType]);
@@ -8714,13 +9519,10 @@ function clientExtensionsDefinitions(context) {
8714
9519
  );
8715
9520
  return [typeMap, stringify(define2)].join("\n");
8716
9521
  }
8717
- function extendsPropertyDefinition(context) {
8718
- const extendsDefinition = namedType("$Extensions.ExtendsHook").addGenericArgument(stringLiteral("extends")).addGenericArgument(namedType("Prisma.TypeMapCb")).addGenericArgument(namedType("ExtArgs"));
8719
- if (context.isPreviewFeatureOn("omitApi")) {
8720
- extendsDefinition.addGenericArgument(
8721
- namedType("$Utils.Call").addGenericArgument(namedType("Prisma.TypeMapCb")).addGenericArgument(objectType().add(property("extArgs", namedType("ExtArgs"))))
8722
- ).addGenericArgument(namedType("ClientOptions"));
8723
- }
9522
+ function extendsPropertyDefinition() {
9523
+ const extendsDefinition = namedType("$Extensions.ExtendsHook").addGenericArgument(stringLiteral("extends")).addGenericArgument(namedType("Prisma.TypeMapCb")).addGenericArgument(namedType("ExtArgs")).addGenericArgument(
9524
+ namedType("$Utils.Call").addGenericArgument(namedType("Prisma.TypeMapCb")).addGenericArgument(objectType().add(property("extArgs", namedType("ExtArgs"))))
9525
+ ).addGenericArgument(namedType("ClientOptions"));
8724
9526
  return stringify(property("$extends", extendsDefinition), { indentLevel: 1 });
8725
9527
  }
8726
9528
  function batchingTransactionDefinition(context) {
@@ -8769,7 +9571,7 @@ function queryRawDefinition(context) {
8769
9571
  * \`\`\`
8770
9572
  * const result = await prisma.$queryRaw\`SELECT * FROM User WHERE id = \${1} OR email = \${'user@email.com'};\`
8771
9573
  * \`\`\`
8772
- *
9574
+ *
8773
9575
  * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
8774
9576
  */
8775
9577
  $queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>;
@@ -8781,7 +9583,7 @@ function queryRawDefinition(context) {
8781
9583
  * \`\`\`
8782
9584
  * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
8783
9585
  * \`\`\`
8784
- *
9586
+ *
8785
9587
  * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
8786
9588
  */
8787
9589
  $queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>;`;
@@ -8797,7 +9599,7 @@ function executeRawDefinition(context) {
8797
9599
  * \`\`\`
8798
9600
  * const result = await prisma.$executeRaw\`UPDATE User SET cool = \${true} WHERE email = \${'user@email.com'};\`
8799
9601
  * \`\`\`
8800
- *
9602
+ *
8801
9603
  * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
8802
9604
  */
8803
9605
  $executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>;
@@ -8809,7 +9611,7 @@ function executeRawDefinition(context) {
8809
9611
  * \`\`\`
8810
9612
  * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
8811
9613
  * \`\`\`
8812
- *
9614
+ *
8813
9615
  * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
8814
9616
  */
8815
9617
  $executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>;`;
@@ -8847,7 +9649,7 @@ function metricDefinition(context) {
8847
9649
  const property2 = property("$metrics", namedType(`runtime.${runtimeImport("MetricsClient")}`)).setDocComment(
8848
9650
  docComment`
8849
9651
  Gives access to the client metrics in json or prometheus format.
8850
-
9652
+
8851
9653
  @example
8852
9654
  \`\`\`
8853
9655
  const metrics = await prisma.$metrics.json()
@@ -8872,7 +9674,7 @@ function runCommandRawDefinition(context) {
8872
9674
  explain: false,
8873
9675
  })
8874
9676
  \`\`\`
8875
-
9677
+
8876
9678
  Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access).
8877
9679
  `);
8878
9680
  return stringify(method2, { indentLevel: 1, newLine: "leading" });
@@ -8914,7 +9716,7 @@ var PrismaClientClass = class {
8914
9716
  }
8915
9717
  return `/**
8916
9718
  * ## Prisma Client \u02B2\u02E2
8917
- *
9719
+ *
8918
9720
  * Type-safe database client for TypeScript & Node.js
8919
9721
  * @example
8920
9722
  * \`\`\`
@@ -8923,7 +9725,7 @@ var PrismaClientClass = class {
8923
9725
  * const ${lowerCase(example.plural)} = await prisma.${lowerCase(example.model)}.findMany()
8924
9726
  * \`\`\`
8925
9727
  *
8926
- *
9728
+ *
8927
9729
  * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client).
8928
9730
  */`;
8929
9731
  }
@@ -8968,7 +9770,7 @@ ${[
8968
9770
  runCommandRawDefinition(this.context),
8969
9771
  metricDefinition(this.context),
8970
9772
  applyPendingMigrationsDefinition.bind(this)(),
8971
- extendsPropertyDefinition(this.context)
9773
+ extendsPropertyDefinition()
8972
9774
  ].filter((d) => d !== null).join("\n").trim()}
8973
9775
 
8974
9776
  ${(0, import_indent_string7.default)(
@@ -8977,10 +9779,7 @@ ${[
8977
9779
  if (methodName === "constructor") {
8978
9780
  methodName = '["constructor"]';
8979
9781
  }
8980
- const generics = ["ExtArgs"];
8981
- if (this.context.isPreviewFeatureOn("omitApi")) {
8982
- generics.push("ClientOptions");
8983
- }
9782
+ const generics = ["ExtArgs", "ClientOptions"];
8984
9783
  return `/**
8985
9784
  * \`prisma.${methodName}\`: Exposes CRUD operations for the **${m.model}** model.
8986
9785
  * Example usage:
@@ -8997,13 +9796,12 @@ get ${methodName}(): Prisma.${m.model}Delegate<${generics.join(", ")}>;`;
8997
9796
  }
8998
9797
  toTS() {
8999
9798
  const clientOptions = this.buildClientOptions();
9000
- const isOmitEnabled = this.context.isPreviewFeatureOn("omitApi");
9001
9799
  return `${new Datasources(this.internalDatasources).toTS()}
9002
9800
  ${clientExtensionsDefinitions(this.context)}
9003
9801
  export type DefaultPrismaClient = PrismaClient
9004
9802
  export type ErrorFormat = 'pretty' | 'colorless' | 'minimal'
9005
9803
  ${stringify(moduleExport(clientOptions))}
9006
- ${isOmitEnabled ? stringify(globalOmitConfig(this.context.dmmf)) : ""}
9804
+ ${stringify(globalOmitConfig(this.context.dmmf))}
9007
9805
 
9008
9806
  /* Types for Logging */
9009
9807
  export type LogLevel = 'info' | 'query' | 'warn' | 'error'
@@ -9044,6 +9842,7 @@ export type PrismaAction =
9044
9842
  | 'createManyAndReturn'
9045
9843
  | 'update'
9046
9844
  | 'updateMany'
9845
+ | 'updateManyAndReturn'
9047
9846
  | 'upsert'
9048
9847
  | 'delete'
9049
9848
  | 'deleteMany'
@@ -9096,7 +9895,7 @@ export type TransactionClient = Omit<Prisma.DefaultPrismaClient, runtime.ITXClie
9096
9895
  \`\`\`
9097
9896
  // Defaults to stdout
9098
9897
  log: ['query', 'info', 'warn', 'error']
9099
-
9898
+
9100
9899
  // Emit as events
9101
9900
  log: [
9102
9901
  { emit: 'stdout', level: 'query' },
@@ -9126,24 +9925,22 @@ export type TransactionClient = Omit<Prisma.DefaultPrismaClient, runtime.ITXClie
9126
9925
  )
9127
9926
  );
9128
9927
  }
9129
- if (this.context.isPreviewFeatureOn("omitApi")) {
9130
- clientOptions.add(
9131
- property("omit", namedType("Prisma.GlobalOmitConfig")).optional().setDocComment(docComment`
9132
- Global configuration for omitting model fields by default.
9133
-
9134
- @example
9135
- \`\`\`
9136
- const prisma = new PrismaClient({
9137
- omit: {
9138
- user: {
9139
- password: true
9140
- }
9141
- }
9142
- })
9143
- \`\`\`
9144
- `)
9145
- );
9146
- }
9928
+ clientOptions.add(
9929
+ property("omit", namedType("Prisma.GlobalOmitConfig")).optional().setDocComment(docComment`
9930
+ Global configuration for omitting model fields by default.
9931
+
9932
+ @example
9933
+ \`\`\`
9934
+ const prisma = new PrismaClient({
9935
+ omit: {
9936
+ user: {
9937
+ password: true
9938
+ }
9939
+ }
9940
+ })
9941
+ \`\`\`
9942
+ `)
9943
+ );
9147
9944
  return clientOptions;
9148
9945
  }
9149
9946
  };
@@ -9208,7 +10005,7 @@ ${buildRequirePath(edge)}
9208
10005
  * Enums
9209
10006
  */
9210
10007
  ${this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toJS()).join("\n\n")}
9211
- ${this.dmmf.schema.enumTypes.model?.map((type) => new Enum(type, false).toJS()).join("\n\n") ?? ""}
10008
+ ${this.dmmf.datamodel.enums.map((datamodelEnum) => new Enum(datamodelEnumToSchemaEnum(datamodelEnum), false).toJS()).join("\n\n")}
9212
10009
 
9213
10010
  ${new Enum(
9214
10011
  {
@@ -9243,8 +10040,7 @@ ${buildNFTAnnotations(edge || !copyEngine, clientEngineType, binaryTargets, rela
9243
10040
  const context = new GenerateContext({
9244
10041
  dmmf: this.dmmf,
9245
10042
  genericArgsInfo: this.genericsInfo,
9246
- generator: this.options.generator,
9247
- defaultArgsAliases: new DefaultArgsAliases()
10043
+ generator: this.options.generator
9248
10044
  });
9249
10045
  const prismaClientClass = new PrismaClientClass(
9250
10046
  context,
@@ -9263,12 +10059,14 @@ ${buildNFTAnnotations(edge || !copyEngine, clientEngineType, binaryTargets, rela
9263
10059
  const prismaEnums = this.dmmf.schema.enumTypes.prisma?.map((type) => new Enum(type, true).toTS());
9264
10060
  const modelEnums = [];
9265
10061
  const modelEnumsAliases = [];
9266
- for (const enumType of this.dmmf.schema.enumTypes.model ?? []) {
9267
- modelEnums.push(new Enum(enumType, false).toTS());
10062
+ for (const datamodelEnum of this.dmmf.datamodel.enums) {
10063
+ modelEnums.push(new Enum(datamodelEnumToSchemaEnum(datamodelEnum), false).toTS());
9268
10064
  modelEnumsAliases.push(
9269
- stringify(moduleExport(typeDeclaration(enumType.name, namedType(`$Enums.${enumType.name}`)))),
9270
10065
  stringify(
9271
- moduleExport(constDeclaration(enumType.name, namedType(`typeof $Enums.${enumType.name}`)))
10066
+ moduleExport(typeDeclaration(datamodelEnum.name, namedType(`$Enums.${datamodelEnum.name}`)))
10067
+ ),
10068
+ stringify(
10069
+ moduleExport(constDeclaration(datamodelEnum.name, namedType(`typeof $Enums.${datamodelEnum.name}`)))
9272
10070
  )
9273
10071
  );
9274
10072
  }
@@ -9357,11 +10155,6 @@ ${this.dmmf.inputObjectTypes.prisma?.reduce((acc, inputType) => {
9357
10155
 
9358
10156
  ${this.dmmf.inputObjectTypes.model?.map((inputType) => new InputType(inputType, context).toTS()).join("\n") ?? ""}
9359
10157
 
9360
- /**
9361
- * Aliases for legacy arg types
9362
- */
9363
- ${context.defaultArgsAliases.generateAliases()}
9364
-
9365
10158
  /**
9366
10159
  * Batch Payload for updateMany & deleteMany & createMany
9367
10160
  */
@@ -9525,7 +10318,7 @@ function buildIndexEsm(queries, edgeRuntimeSuffix) {
9525
10318
 
9526
10319
  // src/generation/typedSql/mapTypes.ts
9527
10320
  var decimal = namedType("$runtime.Decimal");
9528
- var buffer = namedType("Buffer");
10321
+ var uint8Array = namedType("Uint8Array");
9529
10322
  var date = namedType("Date");
9530
10323
  var inputJsonValue = namedType("$runtime.InputJsonObject");
9531
10324
  var jsonValue = namedType("$runtime.JsonValue");
@@ -9547,7 +10340,7 @@ var typeMappings = {
9547
10340
  double: numberType,
9548
10341
  enum: stringType,
9549
10342
  // TODO:
9550
- bytes: buffer,
10343
+ bytes: uint8Array,
9551
10344
  bool: booleanType,
9552
10345
  char: stringType,
9553
10346
  json: {
@@ -9575,7 +10368,7 @@ var typeMappings = {
9575
10368
  "float-array": array(numberType),
9576
10369
  "double-array": array(numberType),
9577
10370
  "char-array": array(stringType),
9578
- "bytes-array": array(buffer),
10371
+ "bytes-array": array(uint8Array),
9579
10372
  "bool-array": array(booleanType),
9580
10373
  "date-array": array(date),
9581
10374
  "time-array": array(date),
@@ -10080,6 +10873,8 @@ function validateDmmfAgainstDenylists(prismaClientDmmf) {
10080
10873
  "PrismaClient",
10081
10874
  "Prisma",
10082
10875
  // JavaScript keywords
10876
+ "async",
10877
+ "await",
10083
10878
  "break",
10084
10879
  "case",
10085
10880
  "catch",
@@ -10118,6 +10913,7 @@ function validateDmmfAgainstDenylists(prismaClientDmmf) {
10118
10913
  "throw",
10119
10914
  "true",
10120
10915
  "try",
10916
+ "using",
10121
10917
  "typeof",
10122
10918
  "var",
10123
10919
  "void",
@@ -10223,6 +11019,14 @@ function getNodeRuntimeName(engineType) {
10223
11019
  if (engineType === "library" /* Library */) {
10224
11020
  return "library";
10225
11021
  }
11022
+ if (engineType === "client" /* Client */) {
11023
+ if (!process.env.PRISMA_UNSTABLE_CLIENT_ENGINE_TYPE) {
11024
+ throw new Error(
11025
+ 'Unstable Feature: engineType="client" is in a proof of concept phase and not ready to be used publicly yet!'
11026
+ );
11027
+ }
11028
+ return "library";
11029
+ }
10226
11030
  assertNever(engineType, "Unknown engine type");
10227
11031
  }
10228
11032
  async function copyRuntimeFiles({ from, to, runtimeName, sourceMaps }) {