@prisma/internals 5.18.0-dev.11 → 5.18.0-dev.13

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-BLULYUWY.js → chunk-2BL7LKSL.js} +8 -8
  2. package/dist/{chunk-B5E7N5EI.js → chunk-55YL6AVS.js} +5 -5
  3. package/dist/chunk-5R627ZMI.js +54 -0
  4. package/dist/chunk-5XRQ7ONW.js +122 -0
  5. package/dist/{chunk-UZSNKPF4.js → chunk-ABU6EJNC.js} +8 -8
  6. package/dist/{chunk-FT35USHW.js → chunk-ASWLLIVQ.js} +5 -5
  7. package/dist/{chunk-BHNUWJO3.js → chunk-DHN2XIRZ.js} +5 -5
  8. package/dist/{chunk-AFCRE4BS.js → chunk-DRWTM5KG.js} +8 -8
  9. package/dist/chunk-EDDYQ5ZF.js +166 -0
  10. package/dist/{chunk-MYFOBLBN.js → chunk-EG4QUDYP.js} +5 -5
  11. package/dist/{chunk-75XKZNDX.js → chunk-IAFJSEXW.js} +8 -8
  12. package/dist/{chunk-3563RQQW.js → chunk-IFSLRT7D.js} +8 -8
  13. package/dist/{chunk-SSUVKXR5.js → chunk-IXDI7ZTH.js} +5 -5
  14. package/dist/chunk-JTMEVPXK.js +177 -0
  15. package/dist/chunk-JUIG32DW.js +110 -0
  16. package/dist/{chunk-2QYJYJB4.js → chunk-LK5H2ODL.js} +5 -5
  17. package/dist/{chunk-GITY7OEL.js → chunk-LXAII2QU.js} +19 -19
  18. package/dist/{chunk-KSJGU56U.js → chunk-NBCTOS5M.js} +4 -4
  19. package/dist/{chunk-5M5M473Z.js → chunk-O4PI6OCZ.js} +5 -5
  20. package/dist/{chunk-R635HD75.js → chunk-O56V7KU3.js} +5 -5
  21. package/dist/chunk-QIVUAERL.js +2202 -0
  22. package/dist/{chunk-YWPWOGJW.js → chunk-RDIYTER2.js} +8 -8
  23. package/dist/{chunk-JW77HQ7O.js → chunk-SO5L745S.js} +7 -7
  24. package/dist/{chunk-H3USL3OR.js → chunk-UHHDFKO5.js} +5 -5
  25. package/dist/{chunk-R2OQ7RVH.js → chunk-XLTZBUJB.js} +7 -7
  26. package/dist/{chunk-YVNJ2BWR.js → chunk-XZTSBD4M.js} +24 -795
  27. package/dist/cli/checkUnsupportedDataProxy.js +12 -12
  28. package/dist/cli/getSchema.js +17 -17
  29. package/dist/cli/hashes.js +12 -12
  30. package/dist/engine-commands/errorHelpers.js +4 -4
  31. package/dist/engine-commands/formatSchema.js +11 -11
  32. package/dist/engine-commands/getConfig.js +10 -10
  33. package/dist/engine-commands/getDmmf.js +7 -7
  34. package/dist/engine-commands/index.js +20 -20
  35. package/dist/engine-commands/lintSchema.js +8 -8
  36. package/dist/engine-commands/mergeSchemas.js +7 -7
  37. package/dist/engine-commands/validate.js +7 -7
  38. package/dist/get-generators/generatorResolvers/generatorResolvers.js +11 -11
  39. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +11 -11
  40. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.js +11 -11
  41. package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +12 -12
  42. package/dist/get-generators/getGenerators.js +14 -14
  43. package/dist/index.js +39 -39
  44. package/dist/sendPanic.js +11 -11
  45. package/dist/utils/getEnvPaths.js +11 -11
  46. package/dist/utils/getVersionFromPackageJson.js +3 -3
  47. package/dist/utils/handlePanic.js +11 -11
  48. package/dist/utils/loadEnvFile.js +11 -11
  49. package/dist/wasm.js +4 -4
  50. package/package.json +8 -8
@@ -26,22 +26,22 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_3563RQQW_exports = {};
30
- __export(chunk_3563RQQW_exports, {
29
+ var chunk_IFSLRT7D_exports = {};
30
+ __export(chunk_IFSLRT7D_exports, {
31
31
  GetConfigError: () => GetConfigError,
32
32
  getConfig: () => getConfig,
33
33
  getDirectUrl: () => getDirectUrl,
34
34
  getEffectiveUrl: () => getEffectiveUrl,
35
35
  resolveUrl: () => resolveUrl
36
36
  });
37
- module.exports = __toCommonJS(chunk_3563RQQW_exports);
37
+ module.exports = __toCommonJS(chunk_IFSLRT7D_exports);
38
38
  var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
39
39
  var import_chunk_KUMD5MBR = require("./chunk-KUMD5MBR.js");
40
40
  var import_chunk_WMIBAVWZ = require("./chunk-WMIBAVWZ.js");
41
- var import_chunk_5M5M473Z = require("./chunk-5M5M473Z.js");
41
+ var import_chunk_EG4QUDYP = require("./chunk-EG4QUDYP.js");
42
42
  var import_chunk_QOTVZEEZ = require("./chunk-QOTVZEEZ.js");
43
43
  var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
44
- var import_chunk_BHNUWJO3 = require("./chunk-BHNUWJO3.js");
44
+ var import_chunk_UHHDFKO5 = require("./chunk-UHHDFKO5.js");
45
45
  var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
46
46
  var import_chunk_4A5ZK522 = require("./chunk-4A5ZK522.js");
47
47
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
@@ -65,7 +65,7 @@ ${detailsHeader} ${message}`;
65
65
  }).exhaustive();
66
66
  const errorMessageWithContext = `${constructedErrorMessage}
67
67
  [Context: getConfig]`;
68
- super((0, import_chunk_5M5M473Z.addVersionDetailsToErrorMessage)(errorMessageWithContext));
68
+ super((0, import_chunk_EG4QUDYP.addVersionDetailsToErrorMessage)(errorMessageWithContext));
69
69
  this.name = "GetConfigError";
70
70
  }
71
71
  };
@@ -90,7 +90,7 @@ async function getConfig(options) {
90
90
  () => {
91
91
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
92
92
  debug("Triggering a Rust panic...");
93
- import_chunk_BHNUWJO3.prismaSchemaWasm.debug_panic();
93
+ import_chunk_UHHDFKO5.prismaSchemaWasm.debug_panic();
94
94
  }
95
95
  const params = JSON.stringify({
96
96
  prismaSchema: options.datamodel,
@@ -98,7 +98,7 @@ async function getConfig(options) {
98
98
  ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
99
99
  env: process.env
100
100
  });
101
- const data = import_chunk_BHNUWJO3.prismaSchemaWasm.get_config(params);
101
+ const data = import_chunk_UHHDFKO5.prismaSchemaWasm.get_config(params);
102
102
  return data;
103
103
  },
104
104
  (e) => ({
@@ -16,11 +16,11 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_SSUVKXR5_exports = {};
20
- __export(chunk_SSUVKXR5_exports, {
19
+ var chunk_IXDI7ZTH_exports = {};
20
+ __export(chunk_IXDI7ZTH_exports, {
21
21
  version: () => version
22
22
  });
23
- module.exports = __toCommonJS(chunk_SSUVKXR5_exports);
24
- var import_chunk_KSJGU56U = require("./chunk-KSJGU56U.js");
25
- var packageJson = (0, import_chunk_KSJGU56U.require_package)();
23
+ module.exports = __toCommonJS(chunk_IXDI7ZTH_exports);
24
+ var import_chunk_ASWLLIVQ = require("./chunk-ASWLLIVQ.js");
25
+ var packageJson = (0, import_chunk_ASWLLIVQ.require_package)();
26
26
  var version = packageJson.version;
@@ -0,0 +1,177 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var chunk_JTMEVPXK_exports = {};
30
+ __export(chunk_JTMEVPXK_exports, {
31
+ getEnginesInfo: () => getEnginesInfo,
32
+ getEnginesMetaInfo: () => getEnginesMetaInfo,
33
+ resolveEngine: () => resolveEngine
34
+ });
35
+ module.exports = __toCommonJS(chunk_JTMEVPXK_exports);
36
+ var import_chunk_QOTVZEEZ = require("./chunk-QOTVZEEZ.js");
37
+ var import_chunk_5R627ZMI = require("./chunk-5R627ZMI.js");
38
+ var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
39
+ var import_chunk_JUIG32DW = require("./chunk-JUIG32DW.js");
40
+ var import_chunk_4A5ZK522 = require("./chunk-4A5ZK522.js");
41
+ var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
42
+ var import_engines = require("@prisma/engines");
43
+ var import_fetch_engine = require("@prisma/fetch-engine");
44
+ var import_path = __toESM(require("path"));
45
+ var import_function2 = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_QOTVZEEZ.require_function)());
46
+ var none2 = import_chunk_4A5ZK522.none;
47
+ var some2 = import_chunk_4A5ZK522.some;
48
+ var getRight = function(ma) {
49
+ return ma._tag === "Left" ? none2 : some2(ma.right);
50
+ };
51
+ var _map = function(fa, f) {
52
+ return (0, import_chunk_4A5ZK522.pipe)(fa, map(f));
53
+ };
54
+ var _ap = function(fab, fa) {
55
+ return (0, import_chunk_4A5ZK522.pipe)(fab, ap(fa));
56
+ };
57
+ var URI = "Option";
58
+ var map = function(f) {
59
+ return function(fa) {
60
+ return isNone(fa) ? none2 : some2(f(fa.value));
61
+ };
62
+ };
63
+ var Functor = {
64
+ URI,
65
+ map: _map
66
+ };
67
+ var as2 = (0, import_chunk_4A5ZK522.dual)(2, (0, import_chunk_4A5ZK522.as)(Functor));
68
+ var asUnit2 = (0, import_chunk_4A5ZK522.asUnit)(Functor);
69
+ var ap = function(fa) {
70
+ return function(fab) {
71
+ return isNone(fab) ? none2 : isNone(fa) ? none2 : some2(fab.value(fa.value));
72
+ };
73
+ };
74
+ var flatMap = /* @__PURE__ */ (0, import_chunk_4A5ZK522.dual)(2, function(ma, f) {
75
+ return isNone(ma) ? none2 : f(ma.value);
76
+ });
77
+ var Chain = {
78
+ URI,
79
+ map: _map,
80
+ ap: _ap,
81
+ chain: flatMap
82
+ };
83
+ var orElse = (0, import_chunk_4A5ZK522.dual)(2, function(self, that) {
84
+ return isNone(self) ? that() : self;
85
+ });
86
+ var fromEither2 = getRight;
87
+ var FromEither = {
88
+ URI,
89
+ fromEither: fromEither2
90
+ };
91
+ var isSome2 = import_chunk_4A5ZK522.isSome;
92
+ var isNone = function(fa) {
93
+ return fa._tag === "None";
94
+ };
95
+ var matchW = function(onNone, onSome) {
96
+ return function(ma) {
97
+ return isNone(ma) ? onNone() : onSome(ma.value);
98
+ };
99
+ };
100
+ var match = matchW;
101
+ var fold = match;
102
+ var tap2 = /* @__PURE__ */ (0, import_chunk_4A5ZK522.dual)(2, (0, import_chunk_4A5ZK522.tap)(Chain));
103
+ var tapEither2 = /* @__PURE__ */ (0, import_chunk_4A5ZK522.dual)(2, (0, import_chunk_4A5ZK522.tapEither)(FromEither, Chain));
104
+ var fromNullable = function(a) {
105
+ return a == null ? none2 : some2(a);
106
+ };
107
+ async function getEnginesMetaInfo() {
108
+ const cliQueryEngineBinaryType = (0, import_engines.getCliQueryEngineBinaryType)();
109
+ const engines = [
110
+ {
111
+ name: "query-engine",
112
+ type: cliQueryEngineBinaryType
113
+ },
114
+ {
115
+ name: "schema-engine",
116
+ type: import_fetch_engine.BinaryType.SchemaEngineBinary
117
+ }
118
+ ];
119
+ const enginePromises = engines.map(({ name, type }) => {
120
+ return resolveEngine(type).then((result) => [name, result]);
121
+ });
122
+ const engineMatrix = await Promise.all(enginePromises).then(Object.fromEntries);
123
+ const engineDataAcc = engines.map(({ name }) => {
124
+ const [engineInfo, errors] = getEnginesInfo(engineMatrix[name]);
125
+ return [{ [name]: engineInfo }, errors];
126
+ });
127
+ const engineMetaInfo = engineDataAcc.map((arr) => arr[0]);
128
+ const enginesMetaInfoErrors = engineDataAcc.flatMap((arr) => arr[1]);
129
+ return [engineMetaInfo, enginesMetaInfoErrors];
130
+ }
131
+ function getEnginesInfo(enginesInfo) {
132
+ const errors = [];
133
+ const resolved = (0, import_chunk_H3T4L34H.$)(enginesInfo).with({ fromEnvVar: import_chunk_H3T4L34H.N.when(isSome2) }, (_engineInfo) => {
134
+ return `, resolved by ${_engineInfo.fromEnvVar.value}`;
135
+ }).otherwise(() => "");
136
+ const absolutePath = (0, import_chunk_H3T4L34H.$)(enginesInfo).with({ path: import_chunk_H3T4L34H.N.when(import_chunk_4A5ZK522.isRight) }, (_engineInfo) => {
137
+ return _engineInfo.path.right;
138
+ }).with({ path: import_chunk_H3T4L34H.N.when(import_chunk_4A5ZK522.isLeft) }, (_engineInfo) => {
139
+ errors.push(_engineInfo.path.left);
140
+ return "E_CANNOT_RESOLVE_PATH";
141
+ }).exhaustive();
142
+ const version = (0, import_chunk_H3T4L34H.$)(enginesInfo).with({ version: import_chunk_H3T4L34H.N.when(import_chunk_4A5ZK522.isRight) }, (_engineInfo) => {
143
+ return _engineInfo.version.right;
144
+ }).with({ version: import_chunk_H3T4L34H.N.when(import_chunk_4A5ZK522.isLeft) }, (_engineInfo) => {
145
+ errors.push(_engineInfo.version.left);
146
+ return "E_CANNOT_RESOLVE_VERSION";
147
+ }).exhaustive();
148
+ const versionMessage = `${version} (at ${import_path.default.relative(process.cwd(), absolutePath)}${resolved})`;
149
+ return [versionMessage, errors];
150
+ }
151
+ async function resolveEngine(binaryName) {
152
+ const pathFromEnvOption = fromNullable((0, import_fetch_engine.getBinaryEnvVarPath)(binaryName));
153
+ const fromEnvVarOption = (0, import_function2.pipe)(
154
+ pathFromEnvOption,
155
+ map((p) => p.fromEnvVar)
156
+ );
157
+ const enginePathEither = await (0, import_function2.pipe)(
158
+ pathFromEnvOption,
159
+ fold(
160
+ () => (0, import_chunk_JUIG32DW.safeResolveBinary)(binaryName),
161
+ (pathFromEnv) => (0, import_chunk_4A5ZK522.right2)(pathFromEnv.path)
162
+ )
163
+ )();
164
+ const versionEither = await (0, import_function2.pipe)(
165
+ enginePathEither,
166
+ import_chunk_4A5ZK522.fromEither,
167
+ (0, import_chunk_4A5ZK522.chain)((enginePath) => {
168
+ return (0, import_chunk_5R627ZMI.safeGetEngineVersion)(enginePath, binaryName);
169
+ })
170
+ )();
171
+ const engineInfo = {
172
+ path: enginePathEither,
173
+ version: versionEither,
174
+ fromEnvVar: fromEnvVarOption
175
+ };
176
+ return engineInfo;
177
+ }
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var chunk_JUIG32DW_exports = {};
30
+ __export(chunk_JUIG32DW_exports, {
31
+ BinaryType: () => import_fetch_engine.BinaryType,
32
+ engineEnvVarMap: () => import_fetch_engine.engineEnvVarMap,
33
+ maybeCopyToTmp: () => maybeCopyToTmp,
34
+ resolveBinary: () => resolveBinary,
35
+ safeResolveBinary: () => safeResolveBinary
36
+ });
37
+ module.exports = __toCommonJS(chunk_JUIG32DW_exports);
38
+ var import_chunk_QIVUAERL = require("./chunk-QIVUAERL.js");
39
+ var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
40
+ var import_chunk_TWSLDIFL = require("./chunk-TWSLDIFL.js");
41
+ var import_chunk_4A5ZK522 = require("./chunk-4A5ZK522.js");
42
+ var import_chunk_TZCE3PWZ = require("./chunk-TZCE3PWZ.js");
43
+ var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
44
+ var import_engines = require("@prisma/engines");
45
+ var import_fetch_engine = require("@prisma/fetch-engine");
46
+ var import_get_platform = require("@prisma/get-platform");
47
+ var import_fs = __toESM2(require("fs"));
48
+ var import_path = __toESM2(require("path"));
49
+ var import_fs_extra = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_QIVUAERL.require_lib)());
50
+ var import_temp_dir = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_TZCE3PWZ.require_temp_dir)());
51
+ async function getBinaryName(name) {
52
+ const binaryTarget = await (0, import_get_platform.getBinaryTargetForCurrentPlatform)();
53
+ const extension = binaryTarget === "windows" ? ".exe" : "";
54
+ if (name === import_fetch_engine.BinaryType.QueryEngineLibrary) {
55
+ return (0, import_get_platform.getNodeAPIName)(binaryTarget, "fs");
56
+ }
57
+ return `${name}-${binaryTarget}${extension}`;
58
+ }
59
+ async function resolveBinary(name, proposedPath) {
60
+ if (proposedPath && !proposedPath.match(import_chunk_M3GBKLGE.vercelPkgPathRegex) && import_fs.default.existsSync(proposedPath)) {
61
+ return proposedPath;
62
+ }
63
+ const pathFromEnvVar = (0, import_fetch_engine.getBinaryEnvVarPath)(name);
64
+ if (pathFromEnvVar !== null) {
65
+ return pathFromEnvVar.path;
66
+ }
67
+ const binaryName = await getBinaryName(name);
68
+ const prismaPath = import_path.default.join((0, import_engines.getEnginesPath)(), binaryName);
69
+ if (import_fs.default.existsSync(prismaPath)) {
70
+ return maybeCopyToTmp(prismaPath);
71
+ }
72
+ const prismaPath2 = import_path.default.join(__dirname, "..", binaryName);
73
+ if (import_fs.default.existsSync(prismaPath2)) {
74
+ return maybeCopyToTmp(prismaPath2);
75
+ }
76
+ const prismaPath3 = import_path.default.join(__dirname, "../..", binaryName);
77
+ if (import_fs.default.existsSync(prismaPath3)) {
78
+ return maybeCopyToTmp(prismaPath3);
79
+ }
80
+ const prismaPath4 = import_path.default.join(__dirname, "../runtime", binaryName);
81
+ if (import_fs.default.existsSync(prismaPath4)) {
82
+ return maybeCopyToTmp(prismaPath4);
83
+ }
84
+ throw new Error(
85
+ `Could not find ${name} binary. Searched in:
86
+ - ${prismaPath}
87
+ - ${prismaPath2}
88
+ - ${prismaPath3}
89
+ - ${prismaPath4}`
90
+ );
91
+ }
92
+ function safeResolveBinary(name, proposedPath) {
93
+ return (0, import_chunk_4A5ZK522.tryCatch2)(
94
+ () => resolveBinary(name, proposedPath),
95
+ (error) => error
96
+ );
97
+ }
98
+ async function maybeCopyToTmp(file) {
99
+ const dir = eval("__dirname");
100
+ if (dir.match(import_chunk_M3GBKLGE.vercelPkgPathRegex)) {
101
+ const targetDir = import_path.default.join(import_temp_dir.default, "prisma-binaries");
102
+ await (0, import_fs_extra.ensureDir)(targetDir);
103
+ const target = import_path.default.join(targetDir, import_path.default.basename(file));
104
+ const data = await import_fs.default.promises.readFile(file);
105
+ await import_fs.default.promises.writeFile(target, data);
106
+ (0, import_chunk_TWSLDIFL.chmodPlusX)(target);
107
+ return target;
108
+ }
109
+ return file;
110
+ }
@@ -16,21 +16,21 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_2QYJYJB4_exports = {};
20
- __export(chunk_2QYJYJB4_exports, {
19
+ var chunk_LK5H2ODL_exports = {};
20
+ __export(chunk_LK5H2ODL_exports, {
21
21
  getLintWarnings: () => getLintWarnings,
22
22
  getLintWarningsAsText: () => getLintWarningsAsText,
23
23
  handleLintPanic: () => handleLintPanic,
24
24
  lintSchema: () => lintSchema,
25
25
  warningToString: () => warningToString
26
26
  });
27
- module.exports = __toCommonJS(chunk_2QYJYJB4_exports);
27
+ module.exports = __toCommonJS(chunk_LK5H2ODL_exports);
28
28
  var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
29
- var import_chunk_BHNUWJO3 = require("./chunk-BHNUWJO3.js");
29
+ var import_chunk_UHHDFKO5 = require("./chunk-UHHDFKO5.js");
30
30
  var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
31
31
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
32
32
  function lintSchema({ schemas }) {
33
- const lintResult = import_chunk_BHNUWJO3.prismaSchemaWasm.lint(JSON.stringify(schemas));
33
+ const lintResult = import_chunk_UHHDFKO5.prismaSchemaWasm.lint(JSON.stringify(schemas));
34
34
  const lintDiagnostics = JSON.parse(lintResult);
35
35
  return lintDiagnostics;
36
36
  }
@@ -26,8 +26,8 @@ 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_GITY7OEL_exports = {};
30
- __export2(chunk_GITY7OEL_exports, {
29
+ var chunk_LXAII2QU_exports = {};
30
+ __export2(chunk_LXAII2QU_exports, {
31
31
  checkTypeScriptVersion: () => checkTypeScriptVersion,
32
32
  checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
33
33
  checkYarnVersion: () => checkYarnVersion,
@@ -56,7 +56,7 @@ __export2(chunk_GITY7OEL_exports, {
56
56
  sendPanic: () => sendPanic,
57
57
  skipIndex: () => skipIndex
58
58
  });
59
- module.exports = __toCommonJS2(chunk_GITY7OEL_exports);
59
+ module.exports = __toCommonJS2(chunk_LXAII2QU_exports);
60
60
  var import_chunk_IABMG3F4 = require("./chunk-IABMG3F4.js");
61
61
  var import_chunk_FTS2IEWX = require("./chunk-FTS2IEWX.js");
62
62
  var import_chunk_EUTJYQDW = require("./chunk-EUTJYQDW.js");
@@ -81,13 +81,13 @@ var import_chunk_XLYQ6PQW = require("./chunk-XLYQ6PQW.js");
81
81
  var import_chunk_EPJYKNCQ = require("./chunk-EPJYKNCQ.js");
82
82
  var import_chunk_ODI3VNBD = require("./chunk-ODI3VNBD.js");
83
83
  var import_chunk_TSJICM5S = require("./chunk-TSJICM5S.js");
84
- var import_chunk_R635HD75 = require("./chunk-R635HD75.js");
85
- var import_chunk_JW77HQ7O = require("./chunk-JW77HQ7O.js");
86
- var import_chunk_AFCRE4BS = require("./chunk-AFCRE4BS.js");
87
- var import_chunk_YWPWOGJW = require("./chunk-YWPWOGJW.js");
84
+ var import_chunk_O56V7KU3 = require("./chunk-O56V7KU3.js");
85
+ var import_chunk_SO5L745S = require("./chunk-SO5L745S.js");
86
+ var import_chunk_DRWTM5KG = require("./chunk-DRWTM5KG.js");
87
+ var import_chunk_ABU6EJNC = require("./chunk-ABU6EJNC.js");
88
88
  var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
89
89
  var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
90
- var import_chunk_H3USL3OR = require("./chunk-H3USL3OR.js");
90
+ var import_chunk_DHN2XIRZ = require("./chunk-DHN2XIRZ.js");
91
91
  var import_chunk_MUPZUVSI = require("./chunk-MUPZUVSI.js");
92
92
  var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
93
93
  var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
@@ -15517,7 +15517,7 @@ async function readSchemaFromDirectory(schemaPath2) {
15517
15517
  }
15518
15518
  const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
15519
15519
  debug2("Loading config");
15520
- const config2 = await (0, import_chunk_AFCRE4BS.getConfig)({
15520
+ const config2 = await (0, import_chunk_DRWTM5KG.getConfig)({
15521
15521
  datamodel: files,
15522
15522
  ignoreEnvVarErrors: true
15523
15523
  });
@@ -15909,8 +15909,8 @@ async function checkUnsupportedDataProxyMessage(command, args, implicitSchema) {
15909
15909
  if (argName.includes("schema")) {
15910
15910
  await loadEnvFile({ schemaPath: argValue, printMessage: false });
15911
15911
  const datamodel = await import_fs.default.promises.readFile(argValue, "utf-8");
15912
- const config2 = await (0, import_chunk_AFCRE4BS.getConfig)({ datamodel, ignoreEnvVarErrors: true });
15913
- const url = (0, import_chunk_AFCRE4BS.resolveUrl)((0, import_chunk_AFCRE4BS.getEffectiveUrl)(config2.datasources[0]));
15912
+ const config2 = await (0, import_chunk_DRWTM5KG.getConfig)({ datamodel, ignoreEnvVarErrors: true });
15913
+ const url = (0, import_chunk_DRWTM5KG.resolveUrl)((0, import_chunk_DRWTM5KG.getEffectiveUrl)(config2.datasources[0]));
15914
15914
  if (url?.startsWith("prisma://")) {
15915
15915
  return forbiddenCmdWithDataProxyFlagMessage(command);
15916
15916
  }
@@ -16113,7 +16113,7 @@ async function getGenerators(options) {
16113
16113
  prismaPath = binaryPathsWithEngineType[queryEngineBinaryType][binaryTarget];
16114
16114
  }
16115
16115
  }
16116
- const config = await (0, import_chunk_AFCRE4BS.getConfig)({
16116
+ const config = await (0, import_chunk_DRWTM5KG.getConfig)({
16117
16117
  datamodel: schemas,
16118
16118
  datamodelPath: schemaPath,
16119
16119
  prismaPath,
@@ -16124,7 +16124,7 @@ async function getGenerators(options) {
16124
16124
  }
16125
16125
  (0, import_chunk_5FJ3MENK.printConfigWarnings)(config.warnings);
16126
16126
  const previewFeatures = (0, import_chunk_TSJICM5S.extractPreviewFeatures)(config);
16127
- const dmmf = await (0, import_chunk_YWPWOGJW.getDMMF)({
16127
+ const dmmf = await (0, import_chunk_ABU6EJNC.getDMMF)({
16128
16128
  datamodel: schemas,
16129
16129
  datamodelPath: schemaPath,
16130
16130
  prismaPath,
@@ -16185,7 +16185,7 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
16185
16185
  fromEnvVar: "null"
16186
16186
  };
16187
16187
  }
16188
- const datamodel = (0, import_chunk_JW77HQ7O.mergeSchemas)({ schemas });
16188
+ const datamodel = (0, import_chunk_SO5L745S.mergeSchemas)({ schemas });
16189
16189
  const envPaths2 = await getEnvPaths(schemaPath, { cwd: generator.output.value });
16190
16190
  const options2 = {
16191
16191
  datamodel,
@@ -16267,7 +16267,7 @@ generator gen {
16267
16267
  debug6({ generatorBinaryPaths });
16268
16268
  generator.setBinaryPaths(generatorBinaryPaths);
16269
16269
  if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
16270
- const customDmmf = await (0, import_chunk_YWPWOGJW.getDMMF)({
16270
+ const customDmmf = await (0, import_chunk_ABU6EJNC.getDMMF)({
16271
16271
  datamodel: schemas,
16272
16272
  datamodelPath: schemaPath,
16273
16273
  prismaPath: generatorBinaryPaths[queryEngineType]?.[binaryTarget],
@@ -16565,7 +16565,7 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
16565
16565
  if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
16566
16566
  handleFormatPanic(
16567
16567
  () => {
16568
- import_chunk_H3USL3OR.prismaSchemaWasm.debug_panic();
16568
+ import_chunk_DHN2XIRZ.prismaSchemaWasm.debug_panic();
16569
16569
  },
16570
16570
  { schemas: schemas2 }
16571
16571
  );
@@ -16585,12 +16585,12 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
16585
16585
  () => {
16586
16586
  const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas2), documentFormattingParams);
16587
16587
  const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
16588
- const lintDiagnostics2 = (0, import_chunk_R635HD75.lintSchema)({ schemas: formattedMultipleSchemas2 });
16588
+ const lintDiagnostics2 = (0, import_chunk_O56V7KU3.lintSchema)({ schemas: formattedMultipleSchemas2 });
16589
16589
  return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
16590
16590
  },
16591
16591
  { schemas: schemas2 }
16592
16592
  );
16593
- const lintWarnings = (0, import_chunk_R635HD75.getLintWarningsAsText)(lintDiagnostics);
16593
+ const lintWarnings = (0, import_chunk_O56V7KU3.getLintWarningsAsText)(lintDiagnostics);
16594
16594
  if (lintWarnings && import_chunk_AZNLB67U.logger_exports.should.warn()) {
16595
16595
  console.warn(lintWarnings);
16596
16596
  }
@@ -16620,7 +16620,7 @@ function handleFormatPanic(tryCb, { schemas: schemas2 }) {
16620
16620
  }
16621
16621
  }
16622
16622
  function formatWasm(schema, documentFormattingParams) {
16623
- const formattedSchema = import_chunk_H3USL3OR.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
16623
+ const formattedSchema = import_chunk_DHN2XIRZ.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
16624
16624
  return formattedSchema;
16625
16625
  }
16626
16626
  /*! Bundled license information:
@@ -16,11 +16,11 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_KSJGU56U_exports = {};
20
- __export(chunk_KSJGU56U_exports, {
19
+ var chunk_NBCTOS5M_exports = {};
20
+ __export(chunk_NBCTOS5M_exports, {
21
21
  require_package: () => require_package
22
22
  });
23
- module.exports = __toCommonJS(chunk_KSJGU56U_exports);
23
+ module.exports = __toCommonJS(chunk_NBCTOS5M_exports);
24
24
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
25
25
  var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
26
26
  "package.json"(exports, module2) {
@@ -107,7 +107,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
107
107
  "@prisma/fetch-engine": "workspace:*",
108
108
  "@prisma/generator-helper": "workspace:*",
109
109
  "@prisma/get-platform": "workspace:*",
110
- "@prisma/prisma-schema-wasm": "5.18.0-15.a6977e518975c6a4e6ae77bf7faf8afc08b97e7d",
110
+ "@prisma/prisma-schema-wasm": "5.18.0-25.4c784e32044a8a016d99474bd02a3b6123742169",
111
111
  "@prisma/schema-files-loader": "workspace:*",
112
112
  arg: "5.0.2",
113
113
  prompts: "2.4.2"
@@ -16,15 +16,15 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_5M5M473Z_exports = {};
20
- __export(chunk_5M5M473Z_exports, {
19
+ var chunk_O4PI6OCZ_exports = {};
20
+ __export(chunk_O4PI6OCZ_exports, {
21
21
  addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
22
22
  });
23
- module.exports = __toCommonJS(chunk_5M5M473Z_exports);
24
- var import_chunk_B5E7N5EI = require("./chunk-B5E7N5EI.js");
23
+ module.exports = __toCommonJS(chunk_O4PI6OCZ_exports);
24
+ var import_chunk_IXDI7ZTH = require("./chunk-IXDI7ZTH.js");
25
25
  var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
26
26
  function addVersionDetailsToErrorMessage(message) {
27
- const rows = [["Prisma CLI Version", import_chunk_B5E7N5EI.version]];
27
+ const rows = [["Prisma CLI Version", import_chunk_IXDI7ZTH.version]];
28
28
  return `${message}
29
29
 
30
30
  ${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
@@ -16,21 +16,21 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_R635HD75_exports = {};
20
- __export(chunk_R635HD75_exports, {
19
+ var chunk_O56V7KU3_exports = {};
20
+ __export(chunk_O56V7KU3_exports, {
21
21
  getLintWarnings: () => getLintWarnings,
22
22
  getLintWarningsAsText: () => getLintWarningsAsText,
23
23
  handleLintPanic: () => handleLintPanic,
24
24
  lintSchema: () => lintSchema,
25
25
  warningToString: () => warningToString
26
26
  });
27
- module.exports = __toCommonJS(chunk_R635HD75_exports);
27
+ module.exports = __toCommonJS(chunk_O56V7KU3_exports);
28
28
  var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
29
- var import_chunk_H3USL3OR = require("./chunk-H3USL3OR.js");
29
+ var import_chunk_DHN2XIRZ = require("./chunk-DHN2XIRZ.js");
30
30
  var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
31
31
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
32
32
  function lintSchema({ schemas }) {
33
- const lintResult = import_chunk_H3USL3OR.prismaSchemaWasm.lint(JSON.stringify(schemas));
33
+ const lintResult = import_chunk_DHN2XIRZ.prismaSchemaWasm.lint(JSON.stringify(schemas));
34
34
  const lintDiagnostics = JSON.parse(lintResult);
35
35
  return lintDiagnostics;
36
36
  }