@prisma/internals 6.4.0-dev.5 → 6.4.0-dev.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/{chunk-XBUCP3DT.js → chunk-3RFXWPE7.js} +140 -149
  2. package/dist/{chunk-WVHOPIMV.js → chunk-5G7KCW2W.js} +5 -5
  3. package/dist/{chunk-LHPBCOWR.js → chunk-7IUXNMQN.js} +5 -5
  4. package/dist/{chunk-PAVUCRY6.js → chunk-AKACKNBA.js} +8 -8
  5. package/dist/{chunk-4ZHRNVFO.js → chunk-CPNR6H7Q.js} +8 -8
  6. package/dist/{chunk-NZTUCDIL.js → chunk-EHGYTB2W.js} +7 -7
  7. package/dist/{chunk-RNYESY26.js → chunk-ERIVY6F4.js} +5 -5
  8. package/dist/{chunk-NCYBHPSK.js → chunk-EWNECZAE.js} +5 -5
  9. package/dist/{chunk-L5KCWFB7.js → chunk-FGPVYQWJ.js} +8 -8
  10. package/dist/{chunk-LJRCWTLC.js → chunk-FPDHJSB4.js} +5 -5
  11. package/dist/{chunk-YCOIQECP.js → chunk-FQMNIWO4.js} +5 -5
  12. package/dist/{chunk-F5VBX6Y4.js → chunk-GPI54SRD.js} +7 -7
  13. package/dist/{chunk-SIYEKSD7.js → chunk-I75T3XHR.js} +5 -4
  14. package/dist/{chunk-5UBNMSJR.js → chunk-INH5LWZO.js} +140 -149
  15. package/dist/{chunk-GWEYKYPW.js → chunk-NGEVBO36.js} +6 -5
  16. package/dist/{chunk-UZZRSJVQ.js → chunk-OV7FYSHB.js} +5 -5
  17. package/dist/{chunk-B2T5HDW7.js → chunk-RL3K4V2J.js} +29 -15
  18. package/dist/{chunk-3UZAJ23T.js → chunk-UYGH4USD.js} +8 -8
  19. package/dist/{chunk-MBTZNEEC.js → chunk-X2747YVN.js} +5 -5
  20. package/dist/{chunk-XC3NYQVT.js → chunk-XVEEPFYE.js} +8 -8
  21. package/dist/{chunk-PPGT7NVR.js → chunk-Y4LTKPZP.js} +8 -8
  22. package/dist/cli/checkUnsupportedDataProxy.js +13 -13
  23. package/dist/cli/getSchema.d.ts +1 -39
  24. package/dist/cli/getSchema.js +18 -18
  25. package/dist/cli/hashes.js +13 -13
  26. package/dist/cli/types.d.ts +2 -1
  27. package/dist/engine-commands/errorHelpers.js +4 -4
  28. package/dist/engine-commands/formatSchema.js +12 -12
  29. package/dist/engine-commands/getConfig.js +10 -10
  30. package/dist/engine-commands/getDmmf.js +7 -7
  31. package/dist/engine-commands/index.js +21 -21
  32. package/dist/engine-commands/lintSchema.js +8 -8
  33. package/dist/engine-commands/mergeSchemas.js +7 -7
  34. package/dist/engine-commands/validate.js +7 -7
  35. package/dist/get-generators/generatorResolvers/generatorResolvers.js +12 -12
  36. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +12 -12
  37. package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +13 -13
  38. package/dist/get-generators/getGenerators.js +15 -15
  39. package/dist/getPackedPackage.js +2 -2
  40. package/dist/index.d.ts +2 -1
  41. package/dist/index.js +41 -41
  42. package/dist/sendPanic.js +12 -12
  43. package/dist/utils/getEnvPaths.js +12 -12
  44. package/dist/utils/getVersionFromPackageJson.js +3 -3
  45. package/dist/utils/handlePanic.js +12 -12
  46. package/dist/utils/loadEnvFile.d.ts +4 -2
  47. package/dist/utils/loadEnvFile.js +12 -12
  48. package/dist/utils/toSchemasContainer.d.ts +1 -1
  49. package/dist/wasm.js +4 -4
  50. package/package.json +9 -8
@@ -26,11 +26,11 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS2 = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_XBUCP3DT_exports = {};
30
- __export2(chunk_XBUCP3DT_exports, {
29
+ var chunk_3RFXWPE7_exports = {};
30
+ __export2(chunk_3RFXWPE7_exports, {
31
31
  checkTypeScriptVersion: () => checkTypeScriptVersion,
32
32
  checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
33
- debug: () => debug5,
33
+ debug: () => debug6,
34
34
  forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
35
35
  formatSchema: () => formatSchema,
36
36
  generatorResolvers: () => generatorResolvers,
@@ -55,7 +55,7 @@ __export2(chunk_XBUCP3DT_exports, {
55
55
  sendPanic: () => sendPanic,
56
56
  skipIndex: () => skipIndex
57
57
  });
58
- module.exports = __toCommonJS2(chunk_XBUCP3DT_exports);
58
+ module.exports = __toCommonJS2(chunk_3RFXWPE7_exports);
59
59
  var import_chunk_EUTJYQDW = require("./chunk-EUTJYQDW.js");
60
60
  var import_chunk_IPKE37QC = require("./chunk-IPKE37QC.js");
61
61
  var import_chunk_PIPE5DSU = require("./chunk-PIPE5DSU.js");
@@ -80,14 +80,14 @@ var import_chunk_AC6EAR56 = require("./chunk-AC6EAR56.js");
80
80
  var import_chunk_EPJYKNCQ = require("./chunk-EPJYKNCQ.js");
81
81
  var import_chunk_ODI3VNBD = require("./chunk-ODI3VNBD.js");
82
82
  var import_chunk_TSJICM5S = require("./chunk-TSJICM5S.js");
83
- var import_chunk_MBTZNEEC = require("./chunk-MBTZNEEC.js");
84
- var import_chunk_F5VBX6Y4 = require("./chunk-F5VBX6Y4.js");
83
+ var import_chunk_X2747YVN = require("./chunk-X2747YVN.js");
84
+ var import_chunk_GPI54SRD = require("./chunk-GPI54SRD.js");
85
85
  var import_chunk_MUPZUVSI = require("./chunk-MUPZUVSI.js");
86
- var import_chunk_PPGT7NVR = require("./chunk-PPGT7NVR.js");
87
- var import_chunk_XC3NYQVT = require("./chunk-XC3NYQVT.js");
86
+ var import_chunk_CPNR6H7Q = require("./chunk-CPNR6H7Q.js");
87
+ var import_chunk_UYGH4USD = require("./chunk-UYGH4USD.js");
88
88
  var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
89
89
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
90
- var import_chunk_WVHOPIMV = require("./chunk-WVHOPIMV.js");
90
+ var import_chunk_ERIVY6F4 = require("./chunk-ERIVY6F4.js");
91
91
  var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
92
92
  var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
93
93
  var import_chunk_QIVUAERL = require("./chunk-QIVUAERL.js");
@@ -95,32 +95,34 @@ var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
95
95
  var import_chunk_635TMBAP = require("./chunk-635TMBAP.js");
96
96
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
97
97
  var import_chunk_KQOJB3ZW = require("./chunk-KQOJB3ZW.js");
98
- var import_chunk_B2T5HDW7 = require("./chunk-B2T5HDW7.js");
98
+ var import_chunk_RL3K4V2J = require("./chunk-RL3K4V2J.js");
99
99
  var import_chunk_YXD4CJDK = require("./chunk-YXD4CJDK.js");
100
100
  var import_chunk_53LS3WUO = require("./chunk-53LS3WUO.js");
101
101
  var import_chunk_AZNLB67U = require("./chunk-AZNLB67U.js");
102
102
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
103
103
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
104
104
  var import_debug = __toESM2(require("@prisma/debug"));
105
+ var import_config = require("@prisma/config");
105
106
  var import_fs = __toESM2(require("fs"));
106
107
  var import_debug2 = __toESM2(require("@prisma/debug"));
108
+ var import_debug3 = __toESM2(require("@prisma/debug"));
107
109
  var import_fs2 = __toESM2(require("fs"));
108
110
  var import_path = __toESM2(require("path"));
109
- var import_debug3 = require("@prisma/debug");
111
+ var import_debug4 = require("@prisma/debug");
110
112
  var import_schema_files_loader = require("@prisma/schema-files-loader");
111
113
  var import_fs3 = __toESM2(require("fs"));
112
114
  var import_path2 = __toESM2(require("path"));
113
115
  var import_util = require("util");
114
116
  var import_crypto = __toESM2(require("crypto"));
115
- var import_debug4 = __toESM2(require("@prisma/debug"));
117
+ var import_debug5 = __toESM2(require("@prisma/debug"));
116
118
  var import_engines = require("@prisma/engines");
117
119
  var import_fetch_engine = require("@prisma/fetch-engine");
118
120
  var import_get_platform = require("@prisma/get-platform");
119
121
  var import_path3 = __toESM2(require("path"));
120
- var import_debug5 = __toESM2(require("@prisma/debug"));
122
+ var import_debug6 = __toESM2(require("@prisma/debug"));
121
123
  var import_fs4 = __toESM2(require("fs"));
122
124
  var import_path4 = __toESM2(require("path"));
123
- var import_debug6 = __toESM2(require("@prisma/debug"));
125
+ var import_debug7 = __toESM2(require("@prisma/debug"));
124
126
  var import_fs5 = __toESM2(require("fs"));
125
127
  var import_path5 = __toESM2(require("path"));
126
128
  var import_get_platform2 = require("@prisma/get-platform");
@@ -439,7 +441,7 @@ var require_readdir_glob = (0, import_chunk_WWAWV7DQ.__commonJS)({
439
441
  module2.exports = readdirGlob;
440
442
  var fs8 = (0, import_chunk_WWAWV7DQ.__require)("fs");
441
443
  var { EventEmitter } = (0, import_chunk_WWAWV7DQ.__require)("events");
442
- var { Minimatch } = (0, import_chunk_B2T5HDW7.require_minimatch)();
444
+ var { Minimatch } = (0, import_chunk_RL3K4V2J.require_minimatch)();
443
445
  var { resolve } = (0, import_chunk_WWAWV7DQ.__require)("path");
444
446
  function readdir(dir2, strict) {
445
447
  return new Promise((resolve2, reject2) => {
@@ -2850,7 +2852,7 @@ var require_stream_writable = (0, import_chunk_WWAWV7DQ.__commonJS)({
2850
2852
  var Duplex;
2851
2853
  Writable.WritableState = WritableState;
2852
2854
  var util = Object.create(require_util());
2853
- util.inherits = (0, import_chunk_B2T5HDW7.require_inherits)();
2855
+ util.inherits = (0, import_chunk_RL3K4V2J.require_inherits)();
2854
2856
  var internalUtil = {
2855
2857
  deprecate: require_node()
2856
2858
  };
@@ -3288,7 +3290,7 @@ var require_stream_duplex = (0, import_chunk_WWAWV7DQ.__commonJS)({
3288
3290
  };
3289
3291
  module2.exports = Duplex;
3290
3292
  var util = Object.create(require_util());
3291
- util.inherits = (0, import_chunk_B2T5HDW7.require_inherits)();
3293
+ util.inherits = (0, import_chunk_RL3K4V2J.require_inherits)();
3292
3294
  var Readable = require_stream_readable();
3293
3295
  var Writable = require_stream_writable();
3294
3296
  util.inherits(Duplex, Readable);
@@ -3609,13 +3611,13 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
3609
3611
  return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
3610
3612
  }
3611
3613
  var util = Object.create(require_util());
3612
- util.inherits = (0, import_chunk_B2T5HDW7.require_inherits)();
3614
+ util.inherits = (0, import_chunk_RL3K4V2J.require_inherits)();
3613
3615
  var debugUtil = (0, import_chunk_WWAWV7DQ.__require)("util");
3614
- var debug8 = void 0;
3616
+ var debug9 = void 0;
3615
3617
  if (debugUtil && debugUtil.debuglog) {
3616
- debug8 = debugUtil.debuglog("stream");
3618
+ debug9 = debugUtil.debuglog("stream");
3617
3619
  } else {
3618
- debug8 = function() {
3620
+ debug9 = function() {
3619
3621
  };
3620
3622
  }
3621
3623
  var BufferList = require_BufferList();
@@ -3815,13 +3817,13 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
3815
3817
  return state.length;
3816
3818
  }
3817
3819
  Readable.prototype.read = function(n) {
3818
- debug8("read", n);
3820
+ debug9("read", n);
3819
3821
  n = parseInt(n, 10);
3820
3822
  var state = this._readableState;
3821
3823
  var nOrig = n;
3822
3824
  if (n !== 0) state.emittedReadable = false;
3823
3825
  if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) {
3824
- debug8("read: emitReadable", state.length, state.ended);
3826
+ debug9("read: emitReadable", state.length, state.ended);
3825
3827
  if (state.length === 0 && state.ended) endReadable(this);
3826
3828
  else emitReadable(this);
3827
3829
  return null;
@@ -3832,16 +3834,16 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
3832
3834
  return null;
3833
3835
  }
3834
3836
  var doRead = state.needReadable;
3835
- debug8("need readable", doRead);
3837
+ debug9("need readable", doRead);
3836
3838
  if (state.length === 0 || state.length - n < state.highWaterMark) {
3837
3839
  doRead = true;
3838
- debug8("length less than watermark", doRead);
3840
+ debug9("length less than watermark", doRead);
3839
3841
  }
3840
3842
  if (state.ended || state.reading) {
3841
3843
  doRead = false;
3842
- debug8("reading or ended", doRead);
3844
+ debug9("reading or ended", doRead);
3843
3845
  } else if (doRead) {
3844
- debug8("do read");
3846
+ debug9("do read");
3845
3847
  state.reading = true;
3846
3848
  state.sync = true;
3847
3849
  if (state.length === 0) state.needReadable = true;
@@ -3881,14 +3883,14 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
3881
3883
  var state = stream._readableState;
3882
3884
  state.needReadable = false;
3883
3885
  if (!state.emittedReadable) {
3884
- debug8("emitReadable", state.flowing);
3886
+ debug9("emitReadable", state.flowing);
3885
3887
  state.emittedReadable = true;
3886
3888
  if (state.sync) pna.nextTick(emitReadable_, stream);
3887
3889
  else emitReadable_(stream);
3888
3890
  }
3889
3891
  }
3890
3892
  function emitReadable_(stream) {
3891
- debug8("emit readable");
3893
+ debug9("emit readable");
3892
3894
  stream.emit("readable");
3893
3895
  flow(stream);
3894
3896
  }
@@ -3901,7 +3903,7 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
3901
3903
  function maybeReadMore_(stream, state) {
3902
3904
  var len = state.length;
3903
3905
  while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) {
3904
- debug8("maybeReadMore read 0");
3906
+ debug9("maybeReadMore read 0");
3905
3907
  stream.read(0);
3906
3908
  if (len === state.length)
3907
3909
  break;
@@ -3927,14 +3929,14 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
3927
3929
  break;
3928
3930
  }
3929
3931
  state.pipesCount += 1;
3930
- debug8("pipe count=%d opts=%j", state.pipesCount, pipeOpts);
3932
+ debug9("pipe count=%d opts=%j", state.pipesCount, pipeOpts);
3931
3933
  var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
3932
3934
  var endFn = doEnd ? onend : unpipe;
3933
3935
  if (state.endEmitted) pna.nextTick(endFn);
3934
3936
  else src.once("end", endFn);
3935
3937
  dest.on("unpipe", onunpipe);
3936
3938
  function onunpipe(readable, unpipeInfo) {
3937
- debug8("onunpipe");
3939
+ debug9("onunpipe");
3938
3940
  if (readable === src) {
3939
3941
  if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
3940
3942
  unpipeInfo.hasUnpiped = true;
@@ -3943,14 +3945,14 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
3943
3945
  }
3944
3946
  }
3945
3947
  function onend() {
3946
- debug8("onend");
3948
+ debug9("onend");
3947
3949
  dest.end();
3948
3950
  }
3949
3951
  var ondrain = pipeOnDrain(src);
3950
3952
  dest.on("drain", ondrain);
3951
3953
  var cleanedUp = false;
3952
3954
  function cleanup() {
3953
- debug8("cleanup");
3955
+ debug9("cleanup");
3954
3956
  dest.removeListener("close", onclose);
3955
3957
  dest.removeListener("finish", onfinish);
3956
3958
  dest.removeListener("drain", ondrain);
@@ -3965,12 +3967,12 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
3965
3967
  var increasedAwaitDrain = false;
3966
3968
  src.on("data", ondata);
3967
3969
  function ondata(chunk) {
3968
- debug8("ondata");
3970
+ debug9("ondata");
3969
3971
  increasedAwaitDrain = false;
3970
3972
  var ret = dest.write(chunk);
3971
3973
  if (false === ret && !increasedAwaitDrain) {
3972
3974
  if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
3973
- debug8("false write response, pause", src._readableState.awaitDrain);
3975
+ debug9("false write response, pause", src._readableState.awaitDrain);
3974
3976
  src._readableState.awaitDrain++;
3975
3977
  increasedAwaitDrain = true;
3976
3978
  }
@@ -3978,7 +3980,7 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
3978
3980
  }
3979
3981
  }
3980
3982
  function onerror(er) {
3981
- debug8("onerror", er);
3983
+ debug9("onerror", er);
3982
3984
  unpipe();
3983
3985
  dest.removeListener("error", onerror);
3984
3986
  if (EElistenerCount(dest, "error") === 0) dest.emit("error", er);
@@ -3990,18 +3992,18 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
3990
3992
  }
3991
3993
  dest.once("close", onclose);
3992
3994
  function onfinish() {
3993
- debug8("onfinish");
3995
+ debug9("onfinish");
3994
3996
  dest.removeListener("close", onclose);
3995
3997
  unpipe();
3996
3998
  }
3997
3999
  dest.once("finish", onfinish);
3998
4000
  function unpipe() {
3999
- debug8("unpipe");
4001
+ debug9("unpipe");
4000
4002
  src.unpipe(dest);
4001
4003
  }
4002
4004
  dest.emit("pipe", src);
4003
4005
  if (!state.flowing) {
4004
- debug8("pipe resume");
4006
+ debug9("pipe resume");
4005
4007
  src.resume();
4006
4008
  }
4007
4009
  return dest;
@@ -4009,7 +4011,7 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
4009
4011
  function pipeOnDrain(src) {
4010
4012
  return function() {
4011
4013
  var state = src._readableState;
4012
- debug8("pipeOnDrain", state.awaitDrain);
4014
+ debug9("pipeOnDrain", state.awaitDrain);
4013
4015
  if (state.awaitDrain) state.awaitDrain--;
4014
4016
  if (state.awaitDrain === 0 && EElistenerCount(src, "data")) {
4015
4017
  state.flowing = true;
@@ -4069,13 +4071,13 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
4069
4071
  };
4070
4072
  Readable.prototype.addListener = Readable.prototype.on;
4071
4073
  function nReadingNextTick(self2) {
4072
- debug8("readable nexttick read 0");
4074
+ debug9("readable nexttick read 0");
4073
4075
  self2.read(0);
4074
4076
  }
4075
4077
  Readable.prototype.resume = function() {
4076
4078
  var state = this._readableState;
4077
4079
  if (!state.flowing) {
4078
- debug8("resume");
4080
+ debug9("resume");
4079
4081
  state.flowing = true;
4080
4082
  resume(this, state);
4081
4083
  }
@@ -4089,7 +4091,7 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
4089
4091
  }
4090
4092
  function resume_(stream, state) {
4091
4093
  if (!state.reading) {
4092
- debug8("resume read 0");
4094
+ debug9("resume read 0");
4093
4095
  stream.read(0);
4094
4096
  }
4095
4097
  state.resumeScheduled = false;
@@ -4099,9 +4101,9 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
4099
4101
  if (state.flowing && !state.reading) stream.read(0);
4100
4102
  }
4101
4103
  Readable.prototype.pause = function() {
4102
- debug8("call pause flowing=%j", this._readableState.flowing);
4104
+ debug9("call pause flowing=%j", this._readableState.flowing);
4103
4105
  if (false !== this._readableState.flowing) {
4104
- debug8("pause");
4106
+ debug9("pause");
4105
4107
  this._readableState.flowing = false;
4106
4108
  this.emit("pause");
4107
4109
  }
@@ -4109,7 +4111,7 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
4109
4111
  };
4110
4112
  function flow(stream) {
4111
4113
  var state = stream._readableState;
4112
- debug8("flow", state.flowing);
4114
+ debug9("flow", state.flowing);
4113
4115
  while (state.flowing && stream.read() !== null) {
4114
4116
  }
4115
4117
  }
@@ -4118,7 +4120,7 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
4118
4120
  var state = this._readableState;
4119
4121
  var paused = false;
4120
4122
  stream.on("end", function() {
4121
- debug8("wrapped end");
4123
+ debug9("wrapped end");
4122
4124
  if (state.decoder && !state.ended) {
4123
4125
  var chunk = state.decoder.end();
4124
4126
  if (chunk && chunk.length) _this.push(chunk);
@@ -4126,7 +4128,7 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
4126
4128
  _this.push(null);
4127
4129
  });
4128
4130
  stream.on("data", function(chunk) {
4129
- debug8("wrapped data");
4131
+ debug9("wrapped data");
4130
4132
  if (state.decoder) chunk = state.decoder.write(chunk);
4131
4133
  if (state.objectMode && (chunk === null || chunk === void 0)) return;
4132
4134
  else if (!state.objectMode && (!chunk || !chunk.length)) return;
@@ -4149,7 +4151,7 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
4149
4151
  stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
4150
4152
  }
4151
4153
  this._read = function(n2) {
4152
- debug8("wrapped _read", n2);
4154
+ debug9("wrapped _read", n2);
4153
4155
  if (paused) {
4154
4156
  paused = false;
4155
4157
  stream.resume();
@@ -4276,7 +4278,7 @@ var require_stream_transform = (0, import_chunk_WWAWV7DQ.__commonJS)({
4276
4278
  module2.exports = Transform;
4277
4279
  var Duplex = require_stream_duplex();
4278
4280
  var util = Object.create(require_util());
4279
- util.inherits = (0, import_chunk_B2T5HDW7.require_inherits)();
4281
+ util.inherits = (0, import_chunk_RL3K4V2J.require_inherits)();
4280
4282
  util.inherits(Transform, Duplex);
4281
4283
  function afterTransform(er, data) {
4282
4284
  var ts = this._transformState;
@@ -4374,7 +4376,7 @@ var require_stream_passthrough = (0, import_chunk_WWAWV7DQ.__commonJS)({
4374
4376
  module2.exports = PassThrough;
4375
4377
  var Transform = require_stream_transform();
4376
4378
  var util = Object.create(require_util());
4377
- util.inherits = (0, import_chunk_B2T5HDW7.require_inherits)();
4379
+ util.inherits = (0, import_chunk_RL3K4V2J.require_inherits)();
4378
4380
  util.inherits(PassThrough, Transform);
4379
4381
  function PassThrough(options2) {
4380
4382
  if (!(this instanceof PassThrough)) return new PassThrough(options2);
@@ -5660,7 +5662,7 @@ var require_stream_writable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
5660
5662
  var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END;
5661
5663
  var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
5662
5664
  var errorOrDestroy = destroyImpl.errorOrDestroy;
5663
- (0, import_chunk_B2T5HDW7.require_inherits)()(Writable, Stream);
5665
+ (0, import_chunk_RL3K4V2J.require_inherits)()(Writable, Stream);
5664
5666
  function nop() {
5665
5667
  }
5666
5668
  function WritableState(options2, stream, isDuplex) {
@@ -6102,7 +6104,7 @@ var require_stream_duplex2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
6102
6104
  module2.exports = Duplex;
6103
6105
  var Readable = require_stream_readable2();
6104
6106
  var Writable = require_stream_writable2();
6105
- (0, import_chunk_B2T5HDW7.require_inherits)()(Duplex, Readable);
6107
+ (0, import_chunk_RL3K4V2J.require_inherits)()(Duplex, Readable);
6106
6108
  {
6107
6109
  keys = objectKeys(Writable.prototype);
6108
6110
  for (v = 0; v < keys.length; v++) {
@@ -6860,11 +6862,11 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
6860
6862
  return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
6861
6863
  }
6862
6864
  var debugUtil = (0, import_chunk_WWAWV7DQ.__require)("util");
6863
- var debug8;
6865
+ var debug9;
6864
6866
  if (debugUtil && debugUtil.debuglog) {
6865
- debug8 = debugUtil.debuglog("stream");
6867
+ debug9 = debugUtil.debuglog("stream");
6866
6868
  } else {
6867
- debug8 = function debug9() {
6869
+ debug9 = function debug10() {
6868
6870
  };
6869
6871
  }
6870
6872
  var BufferList = require_buffer_list();
@@ -6879,7 +6881,7 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
6879
6881
  var StringDecoder;
6880
6882
  var createReadableStreamAsyncIterator;
6881
6883
  var from;
6882
- (0, import_chunk_B2T5HDW7.require_inherits)()(Readable, Stream);
6884
+ (0, import_chunk_RL3K4V2J.require_inherits)()(Readable, Stream);
6883
6885
  var errorOrDestroy = destroyImpl.errorOrDestroy;
6884
6886
  var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
6885
6887
  function prependListener(emitter, event, fn) {
@@ -6979,7 +6981,7 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
6979
6981
  return readableAddChunk(this, chunk, null, true, false);
6980
6982
  };
6981
6983
  function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
6982
- debug8("readableAddChunk", chunk);
6984
+ debug9("readableAddChunk", chunk);
6983
6985
  var state = stream._readableState;
6984
6986
  if (chunk === null) {
6985
6987
  state.reading = false;
@@ -7086,13 +7088,13 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7086
7088
  return state.length;
7087
7089
  }
7088
7090
  Readable.prototype.read = function(n) {
7089
- debug8("read", n);
7091
+ debug9("read", n);
7090
7092
  n = parseInt(n, 10);
7091
7093
  var state = this._readableState;
7092
7094
  var nOrig = n;
7093
7095
  if (n !== 0) state.emittedReadable = false;
7094
7096
  if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {
7095
- debug8("read: emitReadable", state.length, state.ended);
7097
+ debug9("read: emitReadable", state.length, state.ended);
7096
7098
  if (state.length === 0 && state.ended) endReadable(this);
7097
7099
  else emitReadable(this);
7098
7100
  return null;
@@ -7103,16 +7105,16 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7103
7105
  return null;
7104
7106
  }
7105
7107
  var doRead = state.needReadable;
7106
- debug8("need readable", doRead);
7108
+ debug9("need readable", doRead);
7107
7109
  if (state.length === 0 || state.length - n < state.highWaterMark) {
7108
7110
  doRead = true;
7109
- debug8("length less than watermark", doRead);
7111
+ debug9("length less than watermark", doRead);
7110
7112
  }
7111
7113
  if (state.ended || state.reading) {
7112
7114
  doRead = false;
7113
- debug8("reading or ended", doRead);
7115
+ debug9("reading or ended", doRead);
7114
7116
  } else if (doRead) {
7115
- debug8("do read");
7117
+ debug9("do read");
7116
7118
  state.reading = true;
7117
7119
  state.sync = true;
7118
7120
  if (state.length === 0) state.needReadable = true;
@@ -7138,7 +7140,7 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7138
7140
  return ret;
7139
7141
  };
7140
7142
  function onEofChunk(stream, state) {
7141
- debug8("onEofChunk");
7143
+ debug9("onEofChunk");
7142
7144
  if (state.ended) return;
7143
7145
  if (state.decoder) {
7144
7146
  var chunk = state.decoder.end();
@@ -7160,17 +7162,17 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7160
7162
  }
7161
7163
  function emitReadable(stream) {
7162
7164
  var state = stream._readableState;
7163
- debug8("emitReadable", state.needReadable, state.emittedReadable);
7165
+ debug9("emitReadable", state.needReadable, state.emittedReadable);
7164
7166
  state.needReadable = false;
7165
7167
  if (!state.emittedReadable) {
7166
- debug8("emitReadable", state.flowing);
7168
+ debug9("emitReadable", state.flowing);
7167
7169
  state.emittedReadable = true;
7168
7170
  process.nextTick(emitReadable_, stream);
7169
7171
  }
7170
7172
  }
7171
7173
  function emitReadable_(stream) {
7172
7174
  var state = stream._readableState;
7173
- debug8("emitReadable_", state.destroyed, state.length, state.ended);
7175
+ debug9("emitReadable_", state.destroyed, state.length, state.ended);
7174
7176
  if (!state.destroyed && (state.length || state.ended)) {
7175
7177
  stream.emit("readable");
7176
7178
  state.emittedReadable = false;
@@ -7187,7 +7189,7 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7187
7189
  function maybeReadMore_(stream, state) {
7188
7190
  while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {
7189
7191
  var len = state.length;
7190
- debug8("maybeReadMore read 0");
7192
+ debug9("maybeReadMore read 0");
7191
7193
  stream.read(0);
7192
7194
  if (len === state.length)
7193
7195
  break;
@@ -7212,14 +7214,14 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7212
7214
  break;
7213
7215
  }
7214
7216
  state.pipesCount += 1;
7215
- debug8("pipe count=%d opts=%j", state.pipesCount, pipeOpts);
7217
+ debug9("pipe count=%d opts=%j", state.pipesCount, pipeOpts);
7216
7218
  var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
7217
7219
  var endFn = doEnd ? onend : unpipe;
7218
7220
  if (state.endEmitted) process.nextTick(endFn);
7219
7221
  else src.once("end", endFn);
7220
7222
  dest.on("unpipe", onunpipe);
7221
7223
  function onunpipe(readable, unpipeInfo) {
7222
- debug8("onunpipe");
7224
+ debug9("onunpipe");
7223
7225
  if (readable === src) {
7224
7226
  if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
7225
7227
  unpipeInfo.hasUnpiped = true;
@@ -7228,14 +7230,14 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7228
7230
  }
7229
7231
  }
7230
7232
  function onend() {
7231
- debug8("onend");
7233
+ debug9("onend");
7232
7234
  dest.end();
7233
7235
  }
7234
7236
  var ondrain = pipeOnDrain(src);
7235
7237
  dest.on("drain", ondrain);
7236
7238
  var cleanedUp = false;
7237
7239
  function cleanup() {
7238
- debug8("cleanup");
7240
+ debug9("cleanup");
7239
7241
  dest.removeListener("close", onclose);
7240
7242
  dest.removeListener("finish", onfinish);
7241
7243
  dest.removeListener("drain", ondrain);
@@ -7249,19 +7251,19 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7249
7251
  }
7250
7252
  src.on("data", ondata);
7251
7253
  function ondata(chunk) {
7252
- debug8("ondata");
7254
+ debug9("ondata");
7253
7255
  var ret = dest.write(chunk);
7254
- debug8("dest.write", ret);
7256
+ debug9("dest.write", ret);
7255
7257
  if (ret === false) {
7256
7258
  if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
7257
- debug8("false write response, pause", state.awaitDrain);
7259
+ debug9("false write response, pause", state.awaitDrain);
7258
7260
  state.awaitDrain++;
7259
7261
  }
7260
7262
  src.pause();
7261
7263
  }
7262
7264
  }
7263
7265
  function onerror(er) {
7264
- debug8("onerror", er);
7266
+ debug9("onerror", er);
7265
7267
  unpipe();
7266
7268
  dest.removeListener("error", onerror);
7267
7269
  if (EElistenerCount(dest, "error") === 0) errorOrDestroy(dest, er);
@@ -7273,18 +7275,18 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7273
7275
  }
7274
7276
  dest.once("close", onclose);
7275
7277
  function onfinish() {
7276
- debug8("onfinish");
7278
+ debug9("onfinish");
7277
7279
  dest.removeListener("close", onclose);
7278
7280
  unpipe();
7279
7281
  }
7280
7282
  dest.once("finish", onfinish);
7281
7283
  function unpipe() {
7282
- debug8("unpipe");
7284
+ debug9("unpipe");
7283
7285
  src.unpipe(dest);
7284
7286
  }
7285
7287
  dest.emit("pipe", src);
7286
7288
  if (!state.flowing) {
7287
- debug8("pipe resume");
7289
+ debug9("pipe resume");
7288
7290
  src.resume();
7289
7291
  }
7290
7292
  return dest;
@@ -7292,7 +7294,7 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7292
7294
  function pipeOnDrain(src) {
7293
7295
  return function pipeOnDrainFunctionResult() {
7294
7296
  var state = src._readableState;
7295
- debug8("pipeOnDrain", state.awaitDrain);
7297
+ debug9("pipeOnDrain", state.awaitDrain);
7296
7298
  if (state.awaitDrain) state.awaitDrain--;
7297
7299
  if (state.awaitDrain === 0 && EElistenerCount(src, "data")) {
7298
7300
  state.flowing = true;
@@ -7347,7 +7349,7 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7347
7349
  state.readableListening = state.needReadable = true;
7348
7350
  state.flowing = false;
7349
7351
  state.emittedReadable = false;
7350
- debug8("on readable", state.length, state.reading);
7352
+ debug9("on readable", state.length, state.reading);
7351
7353
  if (state.length) {
7352
7354
  emitReadable(this);
7353
7355
  } else if (!state.reading) {
@@ -7382,13 +7384,13 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7382
7384
  }
7383
7385
  }
7384
7386
  function nReadingNextTick(self2) {
7385
- debug8("readable nexttick read 0");
7387
+ debug9("readable nexttick read 0");
7386
7388
  self2.read(0);
7387
7389
  }
7388
7390
  Readable.prototype.resume = function() {
7389
7391
  var state = this._readableState;
7390
7392
  if (!state.flowing) {
7391
- debug8("resume");
7393
+ debug9("resume");
7392
7394
  state.flowing = !state.readableListening;
7393
7395
  resume(this, state);
7394
7396
  }
@@ -7402,7 +7404,7 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7402
7404
  }
7403
7405
  }
7404
7406
  function resume_(stream, state) {
7405
- debug8("resume", state.reading);
7407
+ debug9("resume", state.reading);
7406
7408
  if (!state.reading) {
7407
7409
  stream.read(0);
7408
7410
  }
@@ -7412,9 +7414,9 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7412
7414
  if (state.flowing && !state.reading) stream.read(0);
7413
7415
  }
7414
7416
  Readable.prototype.pause = function() {
7415
- debug8("call pause flowing=%j", this._readableState.flowing);
7417
+ debug9("call pause flowing=%j", this._readableState.flowing);
7416
7418
  if (this._readableState.flowing !== false) {
7417
- debug8("pause");
7419
+ debug9("pause");
7418
7420
  this._readableState.flowing = false;
7419
7421
  this.emit("pause");
7420
7422
  }
@@ -7423,7 +7425,7 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7423
7425
  };
7424
7426
  function flow(stream) {
7425
7427
  var state = stream._readableState;
7426
- debug8("flow", state.flowing);
7428
+ debug9("flow", state.flowing);
7427
7429
  while (state.flowing && stream.read() !== null) {
7428
7430
  ;
7429
7431
  }
@@ -7433,7 +7435,7 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7433
7435
  var state = this._readableState;
7434
7436
  var paused = false;
7435
7437
  stream.on("end", function() {
7436
- debug8("wrapped end");
7438
+ debug9("wrapped end");
7437
7439
  if (state.decoder && !state.ended) {
7438
7440
  var chunk = state.decoder.end();
7439
7441
  if (chunk && chunk.length) _this.push(chunk);
@@ -7441,7 +7443,7 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7441
7443
  _this.push(null);
7442
7444
  });
7443
7445
  stream.on("data", function(chunk) {
7444
- debug8("wrapped data");
7446
+ debug9("wrapped data");
7445
7447
  if (state.decoder) chunk = state.decoder.write(chunk);
7446
7448
  if (state.objectMode && (chunk === null || chunk === void 0)) return;
7447
7449
  else if (!state.objectMode && (!chunk || !chunk.length)) return;
@@ -7464,7 +7466,7 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7464
7466
  stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
7465
7467
  }
7466
7468
  this._read = function(n2) {
7467
- debug8("wrapped _read", n2);
7469
+ debug9("wrapped _read", n2);
7468
7470
  if (paused) {
7469
7471
  paused = false;
7470
7472
  stream.resume();
@@ -7538,14 +7540,14 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7538
7540
  }
7539
7541
  function endReadable(stream) {
7540
7542
  var state = stream._readableState;
7541
- debug8("endReadable", state.endEmitted);
7543
+ debug9("endReadable", state.endEmitted);
7542
7544
  if (!state.endEmitted) {
7543
7545
  state.ended = true;
7544
7546
  process.nextTick(endReadableNT, state, stream);
7545
7547
  }
7546
7548
  }
7547
7549
  function endReadableNT(state, stream) {
7548
- debug8("endReadableNT", state.endEmitted, state.length);
7550
+ debug9("endReadableNT", state.endEmitted, state.length);
7549
7551
  if (!state.endEmitted && state.length === 0) {
7550
7552
  state.endEmitted = true;
7551
7553
  stream.readable = false;
@@ -7584,7 +7586,7 @@ var require_stream_transform2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7584
7586
  var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING;
7585
7587
  var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
7586
7588
  var Duplex = require_stream_duplex2();
7587
- (0, import_chunk_B2T5HDW7.require_inherits)()(Transform, Duplex);
7589
+ (0, import_chunk_RL3K4V2J.require_inherits)()(Transform, Duplex);
7588
7590
  function afterTransform(er, data) {
7589
7591
  var ts = this._transformState;
7590
7592
  ts.transforming = false;
@@ -7678,7 +7680,7 @@ var require_stream_passthrough2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7678
7680
  "use strict";
7679
7681
  module2.exports = PassThrough;
7680
7682
  var Transform = require_stream_transform2();
7681
- (0, import_chunk_B2T5HDW7.require_inherits)()(PassThrough, Transform);
7683
+ (0, import_chunk_RL3K4V2J.require_inherits)()(PassThrough, Transform);
7682
7684
  function PassThrough(options2) {
7683
7685
  if (!(this instanceof PassThrough)) return new PassThrough(options2);
7684
7686
  Transform.call(this, options2);
@@ -8552,7 +8554,7 @@ var require_file = (0, import_chunk_WWAWV7DQ.__commonJS)({
8552
8554
  var difference = require_difference();
8553
8555
  var union = require_union();
8554
8556
  var isPlainObject = require_isPlainObject();
8555
- var glob = (0, import_chunk_B2T5HDW7.require_glob)();
8557
+ var glob = (0, import_chunk_RL3K4V2J.require_glob)();
8556
8558
  var file = module2.exports = {};
8557
8559
  var pathSeparatorRe = /[\/\\]/g;
8558
8560
  var processPatterns = function(patterns, fn) {
@@ -13542,7 +13544,7 @@ var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
13542
13544
  var re$1 = { exports: {} };
13543
13545
  (function(module2, exports2) {
13544
13546
  const { MAX_SAFE_COMPONENT_LENGTH: MAX_SAFE_COMPONENT_LENGTH2, MAX_SAFE_BUILD_LENGTH: MAX_SAFE_BUILD_LENGTH2 } = constants;
13545
- const debug8 = debug_1;
13547
+ const debug9 = debug_1;
13546
13548
  exports2 = module2.exports = {};
13547
13549
  const re2 = exports2.re = [];
13548
13550
  const safeRe = exports2.safeRe = [];
@@ -13564,7 +13566,7 @@ var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
13564
13566
  const createToken = (name, value, isGlobal) => {
13565
13567
  const safe = makeSafeRegex(value);
13566
13568
  const index2 = R++;
13567
- debug8(name, index2, value);
13569
+ debug9(name, index2, value);
13568
13570
  t2[name] = index2;
13569
13571
  src[index2] = value;
13570
13572
  re2[index2] = new RegExp(value, isGlobal ? "g" : void 0);
@@ -14715,7 +14717,7 @@ var require_tmp = (0, import_chunk_WWAWV7DQ.__commonJS)({
14715
14717
  var import_find_up = (0, import_chunk_WWAWV7DQ.__toESM)(require_find_up());
14716
14718
  var readFile = (0, import_util.promisify)(import_fs3.default.readFile);
14717
14719
  var stat = (0, import_util.promisify)(import_fs3.default.stat);
14718
- var debug2 = (0, import_debug3.Debug)("prisma:getSchema");
14720
+ var debug2 = (0, import_debug4.Debug)("prisma:getSchema");
14719
14721
  async function getSchemaWithPath(schemaPathFromArgs, { cwd = process.cwd(), argumentName = "--schema" } = {}) {
14720
14722
  const result = await getSchemaWithPathInternal(schemaPathFromArgs, { cwd, argumentName });
14721
14723
  if (result.ok) {
@@ -14732,7 +14734,7 @@ async function getSchemaWithPathOptional(schemaPathFromArgs, { cwd = process.cwd
14732
14734
  }
14733
14735
  async function readSchemaFromSingleFile(schemaPath2) {
14734
14736
  debug2("Reading schema from single file", schemaPath2);
14735
- const typeError = await ensureType(schemaPath2, "file");
14737
+ const typeError = await (0, import_schema_files_loader.ensureType)(schemaPath2, "file");
14736
14738
  if (typeError) {
14737
14739
  return { ok: false, error: typeError };
14738
14740
  }
@@ -14745,13 +14747,13 @@ async function readSchemaFromSingleFile(schemaPath2) {
14745
14747
  }
14746
14748
  async function readSchemaFromDirectory(schemaPath2) {
14747
14749
  debug2("Reading schema from multiple files", schemaPath2);
14748
- const typeError = await ensureType(schemaPath2, "directory");
14750
+ const typeError = await (0, import_schema_files_loader.ensureType)(schemaPath2, "directory");
14749
14751
  if (typeError) {
14750
14752
  return { ok: false, error: typeError };
14751
14753
  }
14752
14754
  const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
14753
14755
  debug2("Loading config");
14754
- const config2 = await (0, import_chunk_PPGT7NVR.getConfig)({
14756
+ const config2 = await (0, import_chunk_CPNR6H7Q.getConfig)({
14755
14757
  datamodel: files,
14756
14758
  ignoreEnvVarErrors: true
14757
14759
  });
@@ -14761,23 +14763,6 @@ async function readSchemaFromDirectory(schemaPath2) {
14761
14763
  }
14762
14764
  return { ok: true, schema: { schemaPath: schemaPath2, schemaRootDir: schemaPath2, schemas: files } };
14763
14765
  }
14764
- async function ensureType(entryPath, expectedType) {
14765
- try {
14766
- const pathStat = await stat(entryPath);
14767
- if (expectedType === "file" && pathStat.isFile()) {
14768
- return void 0;
14769
- }
14770
- if (expectedType === "directory" && pathStat.isDirectory()) {
14771
- return void 0;
14772
- }
14773
- return { kind: "WrongType", path: entryPath, expectedTypes: [expectedType] };
14774
- } catch (e) {
14775
- if (e.code === "ENOENT") {
14776
- return { kind: "NotFound", path: entryPath, expectedType };
14777
- }
14778
- throw e;
14779
- }
14780
- }
14781
14766
  async function readSchemaFromFileOrDirectory(schemaPath2) {
14782
14767
  let stats;
14783
14768
  try {
@@ -14855,7 +14840,7 @@ function renderDefaultLookupError(error, cwd) {
14855
14840
  return parts.join("\n");
14856
14841
  }
14857
14842
  async function getPrismaConfigFromPackageJson(cwd) {
14858
- const pkgJson = await (0, import_chunk_B2T5HDW7.readPackageUp)({ cwd, normalize: false });
14843
+ const pkgJson = await (0, import_chunk_RL3K4V2J.readPackageUp)({ cwd, normalize: false });
14859
14844
  const prismaPropertyFromPkgJson = pkgJson?.packageJson?.prisma;
14860
14845
  if (!pkgJson) {
14861
14846
  return null;
@@ -14973,7 +14958,7 @@ async function getSchema(schemaPathFromArgs) {
14973
14958
  const schemaPathResult = await getSchemaWithPath(schemaPathFromArgs);
14974
14959
  return schemaPathResult.schemas;
14975
14960
  }
14976
- var debug3 = (0, import_debug2.default)("prisma:loadEnv");
14961
+ var debug3 = (0, import_debug3.default)("prisma:loadEnv");
14977
14962
  async function getEnvPaths(schemaPath2, opts = { cwd: process.cwd() }) {
14978
14963
  const rootEnvPath = getProjectRootEnvPath({ cwd: opts.cwd }) ?? null;
14979
14964
  const schemaEnvPathFromArgs = schemaPathToEnvPath(schemaPath2);
@@ -15031,10 +15016,16 @@ function schemaPathToEnvPath(schemaPath2) {
15031
15016
  if (!schemaPath2) return null;
15032
15017
  return import_path.default.join(import_path.default.dirname(schemaPath2), ".env");
15033
15018
  }
15019
+ var debug4 = (0, import_debug2.default)("prisma:cli:loadEnvFile");
15034
15020
  async function loadEnvFile({
15035
15021
  schemaPath: schemaPath2,
15022
+ config: config2,
15036
15023
  printMessage = false
15037
- } = {}) {
15024
+ }) {
15025
+ if (config2.loadedFromFile) {
15026
+ debug4(`Prisma config detected, skipping environment variable loading`);
15027
+ return;
15028
+ }
15038
15029
  const envPaths2 = await getEnvPaths(schemaPath2);
15039
15030
  const envData = (0, import_chunk_3BND5XB4.tryLoadEnvs)(envPaths2, { conflictCheck: "error" });
15040
15031
  if (printMessage && envData && envData.message) {
@@ -15057,10 +15048,10 @@ async function checkUnsupportedDataProxyMessage(command, args, implicitSchema) {
15057
15048
  return forbiddenCmdWithDataProxyFlagMessage(command);
15058
15049
  }
15059
15050
  if (argName.includes("schema")) {
15060
- await loadEnvFile({ schemaPath: argValue, printMessage: false });
15051
+ await loadEnvFile({ schemaPath: argValue, printMessage: false, config: (0, import_config.defaultTestConfig)() });
15061
15052
  const datamodel = await import_fs.default.promises.readFile(argValue, "utf-8");
15062
- const config2 = await (0, import_chunk_PPGT7NVR.getConfig)({ datamodel, ignoreEnvVarErrors: true });
15063
- const url = (0, import_chunk_PPGT7NVR.resolveUrl)((0, import_chunk_PPGT7NVR.getEffectiveUrl)(config2.datasources[0]));
15053
+ const config2 = await (0, import_chunk_CPNR6H7Q.getConfig)({ datamodel, ignoreEnvVarErrors: true });
15054
+ const url = (0, import_chunk_CPNR6H7Q.resolveUrl)((0, import_chunk_CPNR6H7Q.getEffectiveUrl)(config2.datasources[0]));
15064
15055
  if (url?.startsWith("prisma://")) {
15065
15056
  return forbiddenCmdWithDataProxyFlagMessage(command);
15066
15057
  }
@@ -15081,15 +15072,15 @@ function getCLIPathHash() {
15081
15072
  const cliPath = process.argv[1];
15082
15073
  return import_crypto.default.createHash("sha256").update(cliPath).digest("hex").substring(0, 8);
15083
15074
  }
15084
- var import_p_map = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_B2T5HDW7.require_p_map)());
15085
- var debug4 = (0, import_debug6.default)("prisma:generator");
15075
+ var import_p_map = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_RL3K4V2J.require_p_map)());
15076
+ var debug5 = (0, import_debug7.default)("prisma:generator");
15086
15077
  async function checkTypeScriptVersion() {
15087
15078
  const minVersion = "4.1.0";
15088
15079
  try {
15089
15080
  const typescriptPath = await (0, import_chunk_YXD4CJDK.resolvePkg)("typescript", {
15090
15081
  basedir: process.cwd()
15091
15082
  });
15092
- debug4("typescriptPath", typescriptPath);
15083
+ debug5("typescriptPath", typescriptPath);
15093
15084
  const typescriptPkg = typescriptPath && import_path5.default.join(typescriptPath, "package.json");
15094
15085
  if (typescriptPkg && import_fs5.default.existsSync(typescriptPkg)) {
15095
15086
  const pjson = (0, import_chunk_WWAWV7DQ.__require)(typescriptPkg);
@@ -15107,14 +15098,14 @@ async function checkTypeScriptVersion() {
15107
15098
  } catch (e) {
15108
15099
  }
15109
15100
  }
15110
- var debug5 = (0, import_debug5.default)("prisma:generator");
15101
+ var debug6 = (0, import_debug6.default)("prisma:generator");
15111
15102
  async function prismaClientResolver(baseDir, version3) {
15112
15103
  let prismaClientDir = await (0, import_chunk_PIPE5DSU.findPrismaClientDir)(baseDir);
15113
- debug5("baseDir", baseDir);
15104
+ debug6("baseDir", baseDir);
15114
15105
  await checkTypeScriptVersion();
15115
15106
  if (!prismaClientDir && !process.env.PRISMA_GENERATE_SKIP_AUTOINSTALL) {
15116
15107
  let projectRoot = (0, import_chunk_J77ZIDXB.longestCommonPathPrefix)(baseDir, process.cwd());
15117
- debug5("projectRoot", projectRoot);
15108
+ debug6("projectRoot", projectRoot);
15118
15109
  const warningTag = `${(0, import_chunk_PG5FDKSF.bold)("Warning:")} ${(0, import_chunk_PG5FDKSF.dim)("[Prisma auto-install on generate]")}`;
15119
15110
  if (projectRoot === void 0) {
15120
15111
  console.warn(
@@ -15184,7 +15175,7 @@ Please try to install it with ${(0, import_chunk_PG5FDKSF.bold)((0, import_chunk
15184
15175
  var generatorResolvers = {
15185
15176
  "prisma-client-js": prismaClientResolver
15186
15177
  };
15187
- var debug6 = (0, import_debug4.default)("prisma:getGenerators");
15178
+ var debug7 = (0, import_debug5.default)("prisma:getGenerators");
15188
15179
  async function getGenerators(options) {
15189
15180
  const {
15190
15181
  schemaPath,
@@ -15232,7 +15223,7 @@ async function getGenerators(options) {
15232
15223
  prismaPath = binaryPathsWithEngineType[queryEngineBinaryType][binaryTarget];
15233
15224
  }
15234
15225
  }
15235
- const config = await (0, import_chunk_PPGT7NVR.getConfig)({
15226
+ const config = await (0, import_chunk_CPNR6H7Q.getConfig)({
15236
15227
  datamodel: schemas,
15237
15228
  datamodelPath: schemaPath,
15238
15229
  prismaPath,
@@ -15243,7 +15234,7 @@ async function getGenerators(options) {
15243
15234
  }
15244
15235
  (0, import_chunk_5FJ3MENK.printConfigWarnings)(config.warnings);
15245
15236
  const previewFeatures = (0, import_chunk_TSJICM5S.extractPreviewFeatures)(config);
15246
- const dmmf = await (0, import_chunk_XC3NYQVT.getDMMF)({
15237
+ const dmmf = await (0, import_chunk_UYGH4USD.getDMMF)({
15247
15238
  datamodel: schemas,
15248
15239
  datamodelPath: schemaPath,
15249
15240
  prismaPath,
@@ -15304,7 +15295,7 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
15304
15295
  fromEnvVar: "null"
15305
15296
  };
15306
15297
  }
15307
- const datamodel = (0, import_chunk_F5VBX6Y4.mergeSchemas)({ schemas });
15298
+ const datamodel = (0, import_chunk_GPI54SRD.mergeSchemas)({ schemas });
15308
15299
  const envPaths2 = await getEnvPaths(schemaPath, { cwd: generator.output.value });
15309
15300
  const options2 = {
15310
15301
  datamodel,
@@ -15370,7 +15361,7 @@ generator gen {
15370
15361
  }
15371
15362
  }
15372
15363
  }
15373
- debug6("neededVersions", JSON.stringify(neededVersions, null, 2));
15364
+ debug7("neededVersions", JSON.stringify(neededVersions, null, 2));
15374
15365
  const binaryPathsByVersion = await (0, import_chunk_5XRQ7ONW.getBinaryPathsByVersion)({
15375
15366
  neededVersions,
15376
15367
  binaryTarget,
@@ -15384,19 +15375,19 @@ generator gen {
15384
15375
  const engineVersion = (0, import_chunk_X3P4J7WW.getEngineVersionForGenerator)(generator.manifest, version);
15385
15376
  const binaryPaths = binaryPathsByVersion[engineVersion];
15386
15377
  const generatorBinaryPaths = (0, import_chunk_5V36RLCO.pick)(binaryPaths, generator.manifest.requiresEngines);
15387
- debug6({ generatorBinaryPaths });
15378
+ debug7({ generatorBinaryPaths });
15388
15379
  generator.setBinaryPaths(generatorBinaryPaths);
15389
15380
  if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
15390
- const customDmmf = await (0, import_chunk_XC3NYQVT.getDMMF)({
15381
+ const customDmmf = await (0, import_chunk_UYGH4USD.getDMMF)({
15391
15382
  datamodel: schemas,
15392
15383
  datamodelPath: schemaPath,
15393
15384
  prismaPath: generatorBinaryPaths[queryEngineType]?.[binaryTarget],
15394
15385
  previewFeatures
15395
15386
  });
15396
15387
  const options2 = { ...generator.options, dmmf: customDmmf };
15397
- debug6("generator.manifest.prettyName", generator.manifest.prettyName);
15398
- debug6("options", options2);
15399
- debug6("options.generator.binaryTargets", options2.generator.binaryTargets);
15388
+ debug7("generator.manifest.prettyName", generator.manifest.prettyName);
15389
+ debug7("options", options2);
15390
+ debug7("options.generator.binaryTargets", options2.generator.binaryTargets);
15400
15391
  generator.setOptions(options2);
15401
15392
  }
15402
15393
  }
@@ -15680,12 +15671,12 @@ ${(0, import_chunk_PG5FDKSF.bold)("Thanks a lot for your help! \u{1F64F}")}`);
15680
15671
  });
15681
15672
  process.exit(1);
15682
15673
  }
15683
- var debug7 = (0, import_debug.default)("prisma:format");
15674
+ var debug8 = (0, import_debug.default)("prisma:format");
15684
15675
  async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
15685
15676
  if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
15686
15677
  handleFormatPanic(
15687
15678
  () => {
15688
- import_chunk_WVHOPIMV.prismaSchemaWasm.debug_panic();
15679
+ import_chunk_ERIVY6F4.prismaSchemaWasm.debug_panic();
15689
15680
  },
15690
15681
  { schemas: schemas2 }
15691
15682
  );
@@ -15705,12 +15696,12 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
15705
15696
  () => {
15706
15697
  const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas2), documentFormattingParams);
15707
15698
  const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
15708
- const lintDiagnostics2 = (0, import_chunk_MBTZNEEC.lintSchema)({ schemas: formattedMultipleSchemas2 });
15699
+ const lintDiagnostics2 = (0, import_chunk_X2747YVN.lintSchema)({ schemas: formattedMultipleSchemas2 });
15709
15700
  return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
15710
15701
  },
15711
15702
  { schemas: schemas2 }
15712
15703
  );
15713
- const lintWarnings = (0, import_chunk_MBTZNEEC.getLintWarningsAsText)(lintDiagnostics);
15704
+ const lintWarnings = (0, import_chunk_X2747YVN.getLintWarningsAsText)(lintDiagnostics);
15714
15705
  if (lintWarnings && import_chunk_AZNLB67U.logger_exports.should.warn()) {
15715
15706
  console.warn(lintWarnings);
15716
15707
  }
@@ -15721,8 +15712,8 @@ function handleFormatPanic(tryCb, { schemas: schemas2 }) {
15721
15712
  return tryCb();
15722
15713
  } catch (e) {
15723
15714
  const { message, stack } = (0, import_chunk_A4QWQE3W.getWasmError)(e);
15724
- debug7(`Error formatting schema: ${message}`);
15725
- debug7(stack);
15715
+ debug8(`Error formatting schema: ${message}`);
15716
+ debug8(stack);
15726
15717
  const panic = new import_chunk_A4QWQE3W.RustPanic(
15727
15718
  /* message */
15728
15719
  message,
@@ -15740,7 +15731,7 @@ function handleFormatPanic(tryCb, { schemas: schemas2 }) {
15740
15731
  }
15741
15732
  }
15742
15733
  function formatWasm(schema, documentFormattingParams) {
15743
- const formattedSchema = import_chunk_WVHOPIMV.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
15734
+ const formattedSchema = import_chunk_ERIVY6F4.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
15744
15735
  return formattedSchema;
15745
15736
  }
15746
15737
  /*! Bundled license information: