@prisma/internals 6.19.0-integration-next.16 → 6.19.0-integration-engines-6-19-0-32-next-568b222d0ab829bbbe5f2fd48ed587836813346c.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.
Files changed (85) hide show
  1. package/dist/{chunk-SIMRXUXR.js → chunk-2MJTY4KQ.js} +5 -5
  2. package/dist/chunk-3FP46GUV.js +471 -0
  3. package/dist/chunk-46ABODUM.js +186 -0
  4. package/dist/{chunk-VRGMXDRD.js → chunk-4CGPN5SR.js} +6 -3
  5. package/dist/{chunk-INJO27TY.js → chunk-4HCWAIVZ.js} +15 -9
  6. package/dist/{chunk-GL7OANR6.js → chunk-4JCVHBYR.js} +5 -5
  7. package/dist/{chunk-2ONERNWE.js → chunk-DK5SCKNO.js} +5 -5
  8. package/dist/{chunk-FMYHDVAC.js → chunk-DSG2XXJJ.js} +7 -7
  9. package/dist/{chunk-R3RVIOOH.js → chunk-DX7WJ45H.js} +5 -5
  10. package/dist/{chunk-FUYRCYVL.js → chunk-ERSH2BQA.js} +8 -3
  11. package/dist/{chunk-OKVM3CW4.js → chunk-EYVG6XQS.js} +39 -3
  12. package/dist/{chunk-5XFNC2RY.js → chunk-F2OZV76L.js} +7 -7
  13. package/dist/{chunk-R3J2O23S.js → chunk-FCYHZHVW.js} +4 -4
  14. package/dist/{chunk-5NV3W7KM.js → chunk-FYZCPL2Z.js} +4 -4
  15. package/dist/{chunk-HL6M6I6N.js → chunk-GMW36QQF.js} +7 -7
  16. package/dist/{chunk-GSH4BXBI.js → chunk-HFFWZTVM.js} +6 -4
  17. package/dist/{chunk-5W3BSMTH.js → chunk-HO5HRHFZ.js} +6 -3
  18. package/dist/{chunk-25QIR2OA.js → chunk-IKIW52QS.js} +8 -8
  19. package/dist/{chunk-RXUFT5US.js → chunk-ISSTUMGH.js} +8 -8
  20. package/dist/{chunk-6OLUZD6G.js → chunk-JD36HS5L.js} +15 -9
  21. package/dist/{chunk-XQFPAFQE.js → chunk-LBEUT2S6.js} +5 -5
  22. package/dist/{chunk-A7LJSXBL.js → chunk-N3UPGHTD.js} +49 -31
  23. package/dist/{chunk-5FUXDJAN.js → chunk-OAT7ZJED.js} +9 -5
  24. package/dist/{chunk-XCUYCN3Z.js → chunk-PWLNUJDJ.js} +5 -5
  25. package/dist/{chunk-MH5DW7MH.js → chunk-PZEUONUZ.js} +7 -7
  26. package/dist/chunk-PZMRR772.js +41 -0
  27. package/dist/{chunk-6GH4RAXF.js → chunk-RIACS7RB.js} +5 -5
  28. package/dist/{chunk-HC7ALJJ2.js → chunk-RKDOMYIG.js} +49 -31
  29. package/dist/{chunk-B22EOFPW.js → chunk-RS2R7COT.js} +6 -3
  30. package/dist/{chunk-SVPXYUIM.js → chunk-SH2TNBI6.js} +8 -7
  31. package/dist/chunk-T2PM5TKT.js +55 -0
  32. package/dist/{chunk-3GU5WOTV.js → chunk-TGOAMULH.js} +9 -8
  33. package/dist/{chunk-63H7LVQK.js → chunk-U2GOPCRA.js} +5 -5
  34. package/dist/{chunk-SYOFVVNN.js → chunk-UHI6VYFX.js} +5 -5
  35. package/dist/{chunk-BLBFB7XV.js → chunk-UQUWZJVN.js} +7 -7
  36. package/dist/{chunk-NDSHLEAN.js → chunk-VDOBMNYY.js} +8 -8
  37. package/dist/{chunk-ARC7TW3L.js → chunk-WFNB7VRA.js} +14 -4
  38. package/dist/{chunk-CAACRLTC.js → chunk-YU52YNDP.js} +8 -8
  39. package/dist/{chunk-I6IIL2R7.js → chunk-ZKW5OHDA.js} +5 -5
  40. package/dist/cli/checkUnsupportedDataProxy.js +45 -41
  41. package/dist/cli/checkUnsupportedSchemaEngineWasm.js +45 -41
  42. package/dist/cli/getGeneratorSuccessMessage.js +3 -2
  43. package/dist/cli/getSchema.d.ts +15 -1
  44. package/dist/cli/getSchema.js +5 -4
  45. package/dist/cli/hashes.js +4 -4
  46. package/dist/cli/schemaContext.d.ts +3 -1
  47. package/dist/cli/schemaContext.js +45 -41
  48. package/dist/client/getClientEngineType.d.ts +1 -0
  49. package/dist/client/getClientEngineType.js +3 -3
  50. package/dist/dotenvExpand.d.ts +35 -0
  51. package/dist/dotenvExpand.js +25 -0
  52. package/dist/engine-commands/errorHelpers.js +4 -4
  53. package/dist/engine-commands/formatSchema.js +44 -40
  54. package/dist/engine-commands/getConfig.d.ts +1 -0
  55. package/dist/engine-commands/getConfig.js +11 -11
  56. package/dist/engine-commands/getDmmf.js +8 -8
  57. package/dist/engine-commands/getEngineVersion.js +6 -6
  58. package/dist/engine-commands/getEnginesInfo.d.ts +1 -0
  59. package/dist/engine-commands/getEnginesInfo.js +7 -7
  60. package/dist/engine-commands/index.js +56 -52
  61. package/dist/engine-commands/lintSchema.js +9 -9
  62. package/dist/engine-commands/mergeSchemas.js +8 -8
  63. package/dist/engine-commands/validate.js +8 -8
  64. package/dist/get-generators/getGenerators.d.ts +1 -0
  65. package/dist/get-generators/getGenerators.js +47 -43
  66. package/dist/get-generators/utils/binaryTypeToEngineType.js +2 -2
  67. package/dist/get-generators/utils/engineTypeToBinaryType.js +2 -2
  68. package/dist/get-generators/utils/getBinaryPathsByVersion.js +4 -4
  69. package/dist/index.d.ts +4 -0
  70. package/dist/index.js +89 -82
  71. package/dist/resolveBinary.js +7 -7
  72. package/dist/schemaEngineCommands.js +8 -8
  73. package/dist/sendPanic.js +2 -2
  74. package/dist/utils/canPrompt.js +3 -3
  75. package/dist/utils/getEnvPaths.d.ts +14 -0
  76. package/dist/utils/getEnvPaths.js +29 -0
  77. package/dist/utils/getVersionFromPackageJson.js +3 -3
  78. package/dist/utils/handlePanic.js +6 -6
  79. package/dist/utils/loadEnvFile.d.ts +10 -0
  80. package/dist/utils/loadEnvFile.js +30 -0
  81. package/dist/utils/serializeQueryEngineName.js +2 -2
  82. package/dist/utils/tryLoadEnvs.d.ts +25 -0
  83. package/dist/utils/tryLoadEnvs.js +30 -0
  84. package/dist/wasm.js +5 -5
  85. package/package.json +16 -15
@@ -26,8 +26,8 @@ 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_A7LJSXBL_exports = {};
30
- __export(chunk_A7LJSXBL_exports, {
29
+ var chunk_N3UPGHTD_exports = {};
30
+ __export(chunk_N3UPGHTD_exports, {
31
31
  checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
32
32
  checkUnsupportedSchemaEngineWasm: () => checkUnsupportedSchemaEngineWasm,
33
33
  forbiddenCmdFlagWithSchemaEngineWasm: () => forbiddenCmdFlagWithSchemaEngineWasm,
@@ -42,33 +42,33 @@ __export(chunk_A7LJSXBL_exports, {
42
42
  processSchemaResult: () => processSchemaResult,
43
43
  skipIndex: () => skipIndex
44
44
  });
45
- module.exports = __toCommonJS(chunk_A7LJSXBL_exports);
46
- var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
47
- var import_chunk_5XFNC2RY = require("./chunk-5XFNC2RY.js");
48
- var import_chunk_B22EOFPW = require("./chunk-B22EOFPW.js");
45
+ module.exports = __toCommonJS(chunk_N3UPGHTD_exports);
49
46
  var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
50
47
  var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
48
+ var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
49
+ var import_chunk_F2OZV76L = require("./chunk-F2OZV76L.js");
50
+ var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
51
51
  var import_chunk_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
52
52
  var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
53
53
  var import_chunk_7QC5VORA = require("./chunk-7QC5VORA.js");
54
54
  var import_chunk_AX5N26KG = require("./chunk-AX5N26KG.js");
55
+ var import_chunk_46ABODUM = require("./chunk-46ABODUM.js");
55
56
  var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
56
57
  var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.js");
57
- var import_chunk_INJO27TY = require("./chunk-INJO27TY.js");
58
- var import_chunk_NDSHLEAN = require("./chunk-NDSHLEAN.js");
59
- var import_chunk_SIMRXUXR = require("./chunk-SIMRXUXR.js");
60
- var import_chunk_FMYHDVAC = require("./chunk-FMYHDVAC.js");
61
- var import_chunk_I6IIL2R7 = require("./chunk-I6IIL2R7.js");
62
- var import_chunk_OKVM3CW4 = require("./chunk-OKVM3CW4.js");
58
+ var import_chunk_4HCWAIVZ = require("./chunk-4HCWAIVZ.js");
59
+ var import_chunk_VDOBMNYY = require("./chunk-VDOBMNYY.js");
60
+ var import_chunk_2MJTY4KQ = require("./chunk-2MJTY4KQ.js");
61
+ var import_chunk_PZEUONUZ = require("./chunk-PZEUONUZ.js");
62
+ var import_chunk_EYVG6XQS = require("./chunk-EYVG6XQS.js");
63
+ var import_chunk_DX7WJ45H = require("./chunk-DX7WJ45H.js");
64
+ var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
63
65
  var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
64
- var import_chunk_5NV3W7KM = require("./chunk-5NV3W7KM.js");
65
66
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
66
67
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
67
68
  var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
68
69
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
69
- var import_chunk_BVJP43JS = require("./chunk-BVJP43JS.js");
70
- var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
71
70
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
71
+ var import_chunk_BVJP43JS = require("./chunk-BVJP43JS.js");
72
72
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
73
73
  var import_path = __toESM(require("path"));
74
74
  var import_debug = __toESM(require("@prisma/debug"));
@@ -102,7 +102,7 @@ var debug = (0, import_debug.default)("prisma:format");
102
102
  async function formatSchema({ schemas }, inputFormattingOptions) {
103
103
  if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
104
104
  handleFormatPanic(() => {
105
- import_chunk_I6IIL2R7.prismaSchemaWasm.debug_panic();
105
+ import_chunk_DX7WJ45H.prismaSchemaWasm.debug_panic();
106
106
  });
107
107
  }
108
108
  const defaultFormattingOptions = {
@@ -119,10 +119,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
119
119
  const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
120
120
  const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
121
121
  const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
122
- const lintDiagnostics2 = (0, import_chunk_SIMRXUXR.lintSchema)({ schemas: formattedMultipleSchemas2 });
122
+ const lintDiagnostics2 = (0, import_chunk_2MJTY4KQ.lintSchema)({ schemas: formattedMultipleSchemas2 });
123
123
  return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
124
124
  });
125
- const lintWarnings = (0, import_chunk_SIMRXUXR.getLintWarningsAsText)(lintDiagnostics);
125
+ const lintWarnings = (0, import_chunk_2MJTY4KQ.getLintWarningsAsText)(lintDiagnostics);
126
126
  if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
127
127
  console.warn(lintWarnings);
128
128
  }
@@ -149,7 +149,7 @@ function handleFormatPanic(tryCb) {
149
149
  }
150
150
  }
151
151
  function formatWasm(schema, documentFormattingParams) {
152
- const formattedSchema = import_chunk_I6IIL2R7.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
152
+ const formattedSchema = import_chunk_DX7WJ45H.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
153
153
  return formattedSchema;
154
154
  }
155
155
  async function loadSchemaContext({
@@ -157,37 +157,39 @@ async function loadSchemaContext({
157
157
  schemaPathFromConfig,
158
158
  schemaEngineConfig,
159
159
  printLoadMessage = true,
160
+ ignoreEnvVarErrors = false,
160
161
  allowNull = false,
161
162
  schemaPathArgumentName = "--schema",
162
163
  cwd = process.cwd()
163
164
  } = {}) {
164
165
  let schemaResult = null;
165
166
  if (allowNull) {
166
- schemaResult = await (0, import_chunk_OKVM3CW4.getSchemaWithPathOptional)(schemaPathFromArg, schemaPathFromConfig, {
167
+ schemaResult = await (0, import_chunk_EYVG6XQS.getSchemaWithPathOptional)(schemaPathFromArg, schemaPathFromConfig, {
167
168
  argumentName: schemaPathArgumentName,
168
169
  cwd
169
170
  });
170
171
  if (!schemaResult) return null;
171
172
  } else {
172
- schemaResult = await (0, import_chunk_OKVM3CW4.getSchemaWithPath)(schemaPathFromArg, schemaPathFromConfig, {
173
+ schemaResult = await (0, import_chunk_EYVG6XQS.getSchemaWithPath)(schemaPathFromArg, schemaPathFromConfig, {
173
174
  argumentName: schemaPathArgumentName,
174
175
  cwd
175
176
  });
176
177
  }
177
- return processSchemaResult({ schemaResult, schemaEngineConfig, printLoadMessage, cwd });
178
+ return processSchemaResult({ schemaResult, schemaEngineConfig, printLoadMessage, ignoreEnvVarErrors, cwd });
178
179
  }
179
180
  async function processSchemaResult({
180
181
  schemaResult,
181
182
  schemaEngineConfig,
182
183
  printLoadMessage = true,
184
+ ignoreEnvVarErrors = false,
183
185
  cwd = process.cwd()
184
186
  }) {
185
187
  const loadedFromPathForLogMessages = import_path.default.relative(cwd, schemaResult.schemaPath);
186
188
  const schemaRootDir = schemaResult.schemaRootDir || cwd;
187
189
  if (printLoadMessage) {
188
- (0, import_chunk_OKVM3CW4.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
190
+ (0, import_chunk_EYVG6XQS.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
189
191
  }
190
- const configFromPsl = await (0, import_chunk_INJO27TY.getConfig)({ datamodel: schemaResult.schemas });
192
+ const configFromPsl = await (0, import_chunk_4HCWAIVZ.getConfig)({ datamodel: schemaResult.schemas, ignoreEnvVarErrors });
191
193
  const datasourceFromPsl = configFromPsl.datasources.at(0);
192
194
  const primaryDatasource = (0, import_chunk_XKZ6CBLA.z)(schemaEngineConfig).with({ engine: "classic" }, ({ datasource }) => {
193
195
  const { url, directUrl, shadowDatabaseUrl } = datasource;
@@ -245,10 +247,11 @@ async function getGenerators(options) {
245
247
  binaryPathsOverride,
246
248
  generatorNames = [],
247
249
  postinstall,
250
+ noEngine,
248
251
  allowNoModels = true,
249
252
  typedSql
250
253
  } = options;
251
- const schemaContext = !options.schemaContext && schemaPath ? await loadSchemaContext({ schemaPathFromArg: schemaPath }) : options.schemaContext;
254
+ const schemaContext = !options.schemaContext && schemaPath ? await loadSchemaContext({ schemaPathFromArg: schemaPath, ignoreEnvVarErrors: true }) : options.schemaContext;
252
255
  if (!schemaContext) {
253
256
  throw new Error(`no schema provided for getGenerators`);
254
257
  }
@@ -257,7 +260,7 @@ async function getGenerators(options) {
257
260
  }
258
261
  (0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
259
262
  const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
260
- const dmmf = await (0, import_chunk_NDSHLEAN.getDMMF)({
263
+ const dmmf = await (0, import_chunk_VDOBMNYY.getDMMF)({
261
264
  datamodel: schemaContext.schemaFiles,
262
265
  previewFeatures
263
266
  });
@@ -308,7 +311,8 @@ You need to define \`output\` in the generator block in the schema file.`
308
311
  fromEnvVar: null
309
312
  };
310
313
  }
311
- const datamodel = (0, import_chunk_FMYHDVAC.mergeSchemas)({ schemas: schemaContext.schemaFiles });
314
+ const datamodel = (0, import_chunk_PZEUONUZ.mergeSchemas)({ schemas: schemaContext.schemaFiles });
315
+ const envPaths = await (0, import_chunk_46ABODUM.getEnvPaths)(schemaContext.schemaPath, { cwd: generatorConfig.output.value });
312
316
  const options2 = {
313
317
  datamodel,
314
318
  datasources: schemaContext.datasources,
@@ -320,7 +324,9 @@ You need to define \`output\` in the generator block in the schema file.`
320
324
  version: version2 || import_engines.enginesVersion,
321
325
  // this version makes no sense anymore and should be ignored
322
326
  postinstall,
327
+ noEngine,
323
328
  allowNoModels,
329
+ envPaths,
324
330
  typedSql
325
331
  };
326
332
  generatorInstance.setOptions(options2);
@@ -372,9 +378,10 @@ generator gen {
372
378
  }
373
379
  }
374
380
  }
375
- const queryEngineType = (0, import_chunk_B22EOFPW.binaryTypeToEngineType)(import_chunk_5NV3W7KM.BinaryType.QueryEngineLibrary);
381
+ const queryEngineBinaryType = (0, import_engines.getCliQueryEngineBinaryType)();
382
+ const queryEngineType = (0, import_chunk_RS2R7COT.binaryTypeToEngineType)(queryEngineBinaryType);
376
383
  debug2("neededVersions", JSON.stringify(neededVersions, null, 2));
377
- const { binaryPathsByVersion, binaryTarget } = await (0, import_chunk_5XFNC2RY.getBinaryPathsByVersion)({
384
+ const { binaryPathsByVersion, binaryTarget } = await (0, import_chunk_F2OZV76L.getBinaryPathsByVersion)({
378
385
  neededVersions,
379
386
  // We're lazily computing the binary target here, to avoid printing the
380
387
  // `Prisma failed to detect the libssl/openssl version to use` warning
@@ -396,7 +403,7 @@ generator gen {
396
403
  debug2({ generatorBinaryPaths });
397
404
  generator.setBinaryPaths(generatorBinaryPaths);
398
405
  if (engineVersion !== version2 && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
399
- const customDmmf = await (0, import_chunk_NDSHLEAN.getDMMF)({
406
+ const customDmmf = await (0, import_chunk_VDOBMNYY.getDMMF)({
400
407
  datamodel: schemaContext.schemaFiles,
401
408
  previewFeatures
402
409
  });
@@ -430,6 +437,17 @@ var oldToNewBinaryTargetsMapping = {
430
437
  async function validateGenerators(generators) {
431
438
  const binaryTarget = await (0, import_get_platform.getBinaryTargetForCurrentPlatform)();
432
439
  for (const generator of generators) {
440
+ if (generator.config.platforms) {
441
+ throw new Error(
442
+ `The \`platforms\` field on the generator definition is deprecated. Please rename it to \`binaryTargets\`.`
443
+ );
444
+ }
445
+ if (generator.config.pinnedBinaryTargets) {
446
+ throw new Error(
447
+ `The \`pinnedBinaryTargets\` field on the generator definition is deprecated.
448
+ Please use the PRISMA_QUERY_ENGINE_BINARY env var instead to pin the binary target.`
449
+ );
450
+ }
433
451
  if (generator.binaryTargets) {
434
452
  const binaryTargets2 = generator.binaryTargets && generator.binaryTargets.length > 0 ? generator.binaryTargets : [{ fromEnvVar: null, value: "native" }];
435
453
  const resolvedBinaryTargets = binaryTargets2.flatMap((object) => (0, import_chunk_IOIAK7V7.parseBinaryTargetsEnvValue)(object)).map((p) => p === "native" ? binaryTarget : p);
@@ -506,7 +524,7 @@ function checkUnsupportedDataProxy({
506
524
  }
507
525
  }
508
526
  if (!schemaContext?.primaryDatasource) return;
509
- const url = (0, import_chunk_INJO27TY.resolveUrl)((0, import_chunk_INJO27TY.getEffectiveUrl)(schemaContext.primaryDatasource));
527
+ const url = (0, import_chunk_4HCWAIVZ.resolveUrl)((0, import_chunk_4HCWAIVZ.getEffectiveUrl)(schemaContext.primaryDatasource));
510
528
  if (url?.startsWith("prisma://")) {
511
529
  throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
512
530
  }
@@ -16,20 +16,24 @@ 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_5FUXDJAN_exports = {};
20
- __export(chunk_5FUXDJAN_exports, {
19
+ var chunk_OAT7ZJED_exports = {};
20
+ __export(chunk_OAT7ZJED_exports, {
21
21
  getEngineVersion: () => getEngineVersion,
22
22
  safeGetEngineVersion: () => safeGetEngineVersion
23
23
  });
24
- module.exports = __toCommonJS(chunk_5FUXDJAN_exports);
24
+ module.exports = __toCommonJS(chunk_OAT7ZJED_exports);
25
25
  var import_chunk_6TTRTZXU = require("./chunk-6TTRTZXU.js");
26
26
  var import_chunk_JOIHHXR6 = require("./chunk-JOIHHXR6.js");
27
- var import_chunk_5NV3W7KM = require("./chunk-5NV3W7KM.js");
27
+ var import_chunk_FYZCPL2Z = require("./chunk-FYZCPL2Z.js");
28
28
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
29
+ var import_engines = require("@prisma/engines");
29
30
  var import_fetch_engine = require("@prisma/fetch-engine");
30
31
  var import_get_platform = require("@prisma/get-platform");
31
32
  async function getEngineVersion(enginePath, binaryName) {
32
- enginePath = await (0, import_chunk_5NV3W7KM.resolveBinary)(binaryName ?? import_fetch_engine.BinaryType.QueryEngineLibrary, enginePath);
33
+ if (!binaryName) {
34
+ binaryName = (0, import_engines.getCliQueryEngineBinaryType)();
35
+ }
36
+ enginePath = await (0, import_chunk_FYZCPL2Z.resolveBinary)(binaryName, enginePath);
33
37
  const platformInfo = await (0, import_get_platform.getPlatformInfo)();
34
38
  if (binaryName === import_fetch_engine.BinaryType.QueryEngineLibrary) {
35
39
  (0, import_get_platform.assertNodeAPISupported)();
@@ -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_XCUYCN3Z_exports = {};
20
- __export(chunk_XCUYCN3Z_exports, {
19
+ var chunk_PWLNUJDJ_exports = {};
20
+ __export(chunk_PWLNUJDJ_exports, {
21
21
  version: () => version
22
22
  });
23
- module.exports = __toCommonJS(chunk_XCUYCN3Z_exports);
24
- var import_chunk_SVPXYUIM = require("./chunk-SVPXYUIM.js");
25
- var packageJson = (0, import_chunk_SVPXYUIM.require_package)();
23
+ module.exports = __toCommonJS(chunk_PWLNUJDJ_exports);
24
+ var import_chunk_TGOAMULH = require("./chunk-TGOAMULH.js");
25
+ var packageJson = (0, import_chunk_TGOAMULH.require_package)();
26
26
  var version = packageJson.version;
@@ -26,17 +26,17 @@ 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_MH5DW7MH_exports = {};
30
- __export(chunk_MH5DW7MH_exports, {
29
+ var chunk_PZEUONUZ_exports = {};
30
+ __export(chunk_PZEUONUZ_exports, {
31
31
  MergeSchemasError: () => MergeSchemasError,
32
32
  mergeSchemas: () => mergeSchemas
33
33
  });
34
- module.exports = __toCommonJS(chunk_MH5DW7MH_exports);
34
+ module.exports = __toCommonJS(chunk_PZEUONUZ_exports);
35
35
  var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
36
36
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
37
37
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
38
- var import_chunk_2ONERNWE = require("./chunk-2ONERNWE.js");
39
- var import_chunk_R3RVIOOH = require("./chunk-R3RVIOOH.js");
38
+ var import_chunk_U2GOPCRA = require("./chunk-U2GOPCRA.js");
39
+ var import_chunk_DX7WJ45H = require("./chunk-DX7WJ45H.js");
40
40
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
41
41
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
42
42
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
@@ -59,7 +59,7 @@ ${detailsHeader} ${message}`;
59
59
  }).exhaustive();
60
60
  const errorMessageWithContext = `${constructedErrorMessage}
61
61
  [Context: mergeSchemas]`;
62
- super((0, import_chunk_2ONERNWE.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
+ super((0, import_chunk_U2GOPCRA.addVersionDetailsToErrorMessage)(errorMessageWithContext));
63
63
  this.name = "MergeSchemasError";
64
64
  }
65
65
  };
@@ -72,7 +72,7 @@ function mergeSchemas(options) {
72
72
  const params = JSON.stringify({
73
73
  schema: options.schemas
74
74
  });
75
- return import_chunk_R3RVIOOH.prismaSchemaWasm.merge_schemas(params);
75
+ return import_chunk_DX7WJ45H.prismaSchemaWasm.merge_schemas(params);
76
76
  },
77
77
  (e) => ({
78
78
  type: "wasm-error",
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var chunk_PZMRR772_exports = {};
20
+ __export(chunk_PZMRR772_exports, {
21
+ loadEnvFile: () => loadEnvFile
22
+ });
23
+ module.exports = __toCommonJS(chunk_PZMRR772_exports);
24
+ var import_chunk_46ABODUM = require("./chunk-46ABODUM.js");
25
+ var import_chunk_3FP46GUV = require("./chunk-3FP46GUV.js");
26
+ async function loadEnvFile({
27
+ schemaPath,
28
+ config,
29
+ printMessage = false
30
+ }) {
31
+ if (config.loadedFromFile) {
32
+ process.stderr.write(`Prisma config detected, skipping environment variable loading.
33
+ `);
34
+ return;
35
+ }
36
+ const envPaths = await (0, import_chunk_46ABODUM.getEnvPaths)(schemaPath);
37
+ const envData = (0, import_chunk_3FP46GUV.tryLoadEnvs)(envPaths, { conflictCheck: "error" });
38
+ if (printMessage && envData && envData.message) {
39
+ process.stderr.write(envData.message + "\n");
40
+ }
41
+ }
@@ -16,20 +16,20 @@ 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_6GH4RAXF_exports = {};
20
- __export(chunk_6GH4RAXF_exports, {
19
+ var chunk_RIACS7RB_exports = {};
20
+ __export(chunk_RIACS7RB_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_6GH4RAXF_exports);
28
- var import_chunk_R3RVIOOH = require("./chunk-R3RVIOOH.js");
27
+ module.exports = __toCommonJS(chunk_RIACS7RB_exports);
28
+ var import_chunk_ZKW5OHDA = require("./chunk-ZKW5OHDA.js");
29
29
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
30
30
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
31
31
  function lintSchema({ schemas }) {
32
- const lintResult = import_chunk_R3RVIOOH.prismaSchemaWasm.lint(JSON.stringify(schemas));
32
+ const lintResult = import_chunk_ZKW5OHDA.prismaSchemaWasm.lint(JSON.stringify(schemas));
33
33
  const lintDiagnostics = JSON.parse(lintResult);
34
34
  return lintDiagnostics;
35
35
  }
@@ -26,8 +26,8 @@ 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_HC7ALJJ2_exports = {};
30
- __export(chunk_HC7ALJJ2_exports, {
29
+ var chunk_RKDOMYIG_exports = {};
30
+ __export(chunk_RKDOMYIG_exports, {
31
31
  checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
32
32
  checkUnsupportedSchemaEngineWasm: () => checkUnsupportedSchemaEngineWasm,
33
33
  forbiddenCmdFlagWithSchemaEngineWasm: () => forbiddenCmdFlagWithSchemaEngineWasm,
@@ -42,33 +42,33 @@ __export(chunk_HC7ALJJ2_exports, {
42
42
  processSchemaResult: () => processSchemaResult,
43
43
  skipIndex: () => skipIndex
44
44
  });
45
- module.exports = __toCommonJS(chunk_HC7ALJJ2_exports);
46
- var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
47
- var import_chunk_5XFNC2RY = require("./chunk-5XFNC2RY.js");
48
- var import_chunk_B22EOFPW = require("./chunk-B22EOFPW.js");
45
+ module.exports = __toCommonJS(chunk_RKDOMYIG_exports);
49
46
  var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
50
47
  var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
48
+ var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
49
+ var import_chunk_F2OZV76L = require("./chunk-F2OZV76L.js");
50
+ var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
51
51
  var import_chunk_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
52
52
  var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
53
53
  var import_chunk_7QC5VORA = require("./chunk-7QC5VORA.js");
54
54
  var import_chunk_AX5N26KG = require("./chunk-AX5N26KG.js");
55
+ var import_chunk_46ABODUM = require("./chunk-46ABODUM.js");
55
56
  var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
56
57
  var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.js");
57
- var import_chunk_6OLUZD6G = require("./chunk-6OLUZD6G.js");
58
- var import_chunk_25QIR2OA = require("./chunk-25QIR2OA.js");
59
- var import_chunk_6GH4RAXF = require("./chunk-6GH4RAXF.js");
60
- var import_chunk_MH5DW7MH = require("./chunk-MH5DW7MH.js");
61
- var import_chunk_R3RVIOOH = require("./chunk-R3RVIOOH.js");
62
- var import_chunk_OKVM3CW4 = require("./chunk-OKVM3CW4.js");
58
+ var import_chunk_JD36HS5L = require("./chunk-JD36HS5L.js");
59
+ var import_chunk_IKIW52QS = require("./chunk-IKIW52QS.js");
60
+ var import_chunk_RIACS7RB = require("./chunk-RIACS7RB.js");
61
+ var import_chunk_DSG2XXJJ = require("./chunk-DSG2XXJJ.js");
62
+ var import_chunk_EYVG6XQS = require("./chunk-EYVG6XQS.js");
63
+ var import_chunk_ZKW5OHDA = require("./chunk-ZKW5OHDA.js");
64
+ var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
63
65
  var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
64
- var import_chunk_5NV3W7KM = require("./chunk-5NV3W7KM.js");
65
66
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
66
67
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
67
68
  var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
68
69
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
69
- var import_chunk_BVJP43JS = require("./chunk-BVJP43JS.js");
70
- var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
71
70
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
71
+ var import_chunk_BVJP43JS = require("./chunk-BVJP43JS.js");
72
72
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
73
73
  var import_path = __toESM(require("path"));
74
74
  var import_debug = __toESM(require("@prisma/debug"));
@@ -102,7 +102,7 @@ var debug = (0, import_debug.default)("prisma:format");
102
102
  async function formatSchema({ schemas }, inputFormattingOptions) {
103
103
  if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
104
104
  handleFormatPanic(() => {
105
- import_chunk_R3RVIOOH.prismaSchemaWasm.debug_panic();
105
+ import_chunk_ZKW5OHDA.prismaSchemaWasm.debug_panic();
106
106
  });
107
107
  }
108
108
  const defaultFormattingOptions = {
@@ -119,10 +119,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
119
119
  const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
120
120
  const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
121
121
  const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
122
- const lintDiagnostics2 = (0, import_chunk_6GH4RAXF.lintSchema)({ schemas: formattedMultipleSchemas2 });
122
+ const lintDiagnostics2 = (0, import_chunk_RIACS7RB.lintSchema)({ schemas: formattedMultipleSchemas2 });
123
123
  return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
124
124
  });
125
- const lintWarnings = (0, import_chunk_6GH4RAXF.getLintWarningsAsText)(lintDiagnostics);
125
+ const lintWarnings = (0, import_chunk_RIACS7RB.getLintWarningsAsText)(lintDiagnostics);
126
126
  if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
127
127
  console.warn(lintWarnings);
128
128
  }
@@ -149,7 +149,7 @@ function handleFormatPanic(tryCb) {
149
149
  }
150
150
  }
151
151
  function formatWasm(schema, documentFormattingParams) {
152
- const formattedSchema = import_chunk_R3RVIOOH.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
152
+ const formattedSchema = import_chunk_ZKW5OHDA.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
153
153
  return formattedSchema;
154
154
  }
155
155
  async function loadSchemaContext({
@@ -157,37 +157,39 @@ async function loadSchemaContext({
157
157
  schemaPathFromConfig,
158
158
  schemaEngineConfig,
159
159
  printLoadMessage = true,
160
+ ignoreEnvVarErrors = false,
160
161
  allowNull = false,
161
162
  schemaPathArgumentName = "--schema",
162
163
  cwd = process.cwd()
163
164
  } = {}) {
164
165
  let schemaResult = null;
165
166
  if (allowNull) {
166
- schemaResult = await (0, import_chunk_OKVM3CW4.getSchemaWithPathOptional)(schemaPathFromArg, schemaPathFromConfig, {
167
+ schemaResult = await (0, import_chunk_EYVG6XQS.getSchemaWithPathOptional)(schemaPathFromArg, schemaPathFromConfig, {
167
168
  argumentName: schemaPathArgumentName,
168
169
  cwd
169
170
  });
170
171
  if (!schemaResult) return null;
171
172
  } else {
172
- schemaResult = await (0, import_chunk_OKVM3CW4.getSchemaWithPath)(schemaPathFromArg, schemaPathFromConfig, {
173
+ schemaResult = await (0, import_chunk_EYVG6XQS.getSchemaWithPath)(schemaPathFromArg, schemaPathFromConfig, {
173
174
  argumentName: schemaPathArgumentName,
174
175
  cwd
175
176
  });
176
177
  }
177
- return processSchemaResult({ schemaResult, schemaEngineConfig, printLoadMessage, cwd });
178
+ return processSchemaResult({ schemaResult, schemaEngineConfig, printLoadMessage, ignoreEnvVarErrors, cwd });
178
179
  }
179
180
  async function processSchemaResult({
180
181
  schemaResult,
181
182
  schemaEngineConfig,
182
183
  printLoadMessage = true,
184
+ ignoreEnvVarErrors = false,
183
185
  cwd = process.cwd()
184
186
  }) {
185
187
  const loadedFromPathForLogMessages = import_path.default.relative(cwd, schemaResult.schemaPath);
186
188
  const schemaRootDir = schemaResult.schemaRootDir || cwd;
187
189
  if (printLoadMessage) {
188
- (0, import_chunk_OKVM3CW4.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
190
+ (0, import_chunk_EYVG6XQS.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
189
191
  }
190
- const configFromPsl = await (0, import_chunk_6OLUZD6G.getConfig)({ datamodel: schemaResult.schemas });
192
+ const configFromPsl = await (0, import_chunk_JD36HS5L.getConfig)({ datamodel: schemaResult.schemas, ignoreEnvVarErrors });
191
193
  const datasourceFromPsl = configFromPsl.datasources.at(0);
192
194
  const primaryDatasource = (0, import_chunk_XKZ6CBLA.z)(schemaEngineConfig).with({ engine: "classic" }, ({ datasource }) => {
193
195
  const { url, directUrl, shadowDatabaseUrl } = datasource;
@@ -245,10 +247,11 @@ async function getGenerators(options) {
245
247
  binaryPathsOverride,
246
248
  generatorNames = [],
247
249
  postinstall,
250
+ noEngine,
248
251
  allowNoModels = true,
249
252
  typedSql
250
253
  } = options;
251
- const schemaContext = !options.schemaContext && schemaPath ? await loadSchemaContext({ schemaPathFromArg: schemaPath }) : options.schemaContext;
254
+ const schemaContext = !options.schemaContext && schemaPath ? await loadSchemaContext({ schemaPathFromArg: schemaPath, ignoreEnvVarErrors: true }) : options.schemaContext;
252
255
  if (!schemaContext) {
253
256
  throw new Error(`no schema provided for getGenerators`);
254
257
  }
@@ -257,7 +260,7 @@ async function getGenerators(options) {
257
260
  }
258
261
  (0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
259
262
  const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
260
- const dmmf = await (0, import_chunk_25QIR2OA.getDMMF)({
263
+ const dmmf = await (0, import_chunk_IKIW52QS.getDMMF)({
261
264
  datamodel: schemaContext.schemaFiles,
262
265
  previewFeatures
263
266
  });
@@ -308,7 +311,8 @@ You need to define \`output\` in the generator block in the schema file.`
308
311
  fromEnvVar: null
309
312
  };
310
313
  }
311
- const datamodel = (0, import_chunk_MH5DW7MH.mergeSchemas)({ schemas: schemaContext.schemaFiles });
314
+ const datamodel = (0, import_chunk_DSG2XXJJ.mergeSchemas)({ schemas: schemaContext.schemaFiles });
315
+ const envPaths = await (0, import_chunk_46ABODUM.getEnvPaths)(schemaContext.schemaPath, { cwd: generatorConfig.output.value });
312
316
  const options2 = {
313
317
  datamodel,
314
318
  datasources: schemaContext.datasources,
@@ -320,7 +324,9 @@ You need to define \`output\` in the generator block in the schema file.`
320
324
  version: version2 || import_engines.enginesVersion,
321
325
  // this version makes no sense anymore and should be ignored
322
326
  postinstall,
327
+ noEngine,
323
328
  allowNoModels,
329
+ envPaths,
324
330
  typedSql
325
331
  };
326
332
  generatorInstance.setOptions(options2);
@@ -372,9 +378,10 @@ generator gen {
372
378
  }
373
379
  }
374
380
  }
375
- const queryEngineType = (0, import_chunk_B22EOFPW.binaryTypeToEngineType)(import_chunk_5NV3W7KM.BinaryType.QueryEngineLibrary);
381
+ const queryEngineBinaryType = (0, import_engines.getCliQueryEngineBinaryType)();
382
+ const queryEngineType = (0, import_chunk_RS2R7COT.binaryTypeToEngineType)(queryEngineBinaryType);
376
383
  debug2("neededVersions", JSON.stringify(neededVersions, null, 2));
377
- const { binaryPathsByVersion, binaryTarget } = await (0, import_chunk_5XFNC2RY.getBinaryPathsByVersion)({
384
+ const { binaryPathsByVersion, binaryTarget } = await (0, import_chunk_F2OZV76L.getBinaryPathsByVersion)({
378
385
  neededVersions,
379
386
  // We're lazily computing the binary target here, to avoid printing the
380
387
  // `Prisma failed to detect the libssl/openssl version to use` warning
@@ -396,7 +403,7 @@ generator gen {
396
403
  debug2({ generatorBinaryPaths });
397
404
  generator.setBinaryPaths(generatorBinaryPaths);
398
405
  if (engineVersion !== version2 && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
399
- const customDmmf = await (0, import_chunk_25QIR2OA.getDMMF)({
406
+ const customDmmf = await (0, import_chunk_IKIW52QS.getDMMF)({
400
407
  datamodel: schemaContext.schemaFiles,
401
408
  previewFeatures
402
409
  });
@@ -430,6 +437,17 @@ var oldToNewBinaryTargetsMapping = {
430
437
  async function validateGenerators(generators) {
431
438
  const binaryTarget = await (0, import_get_platform.getBinaryTargetForCurrentPlatform)();
432
439
  for (const generator of generators) {
440
+ if (generator.config.platforms) {
441
+ throw new Error(
442
+ `The \`platforms\` field on the generator definition is deprecated. Please rename it to \`binaryTargets\`.`
443
+ );
444
+ }
445
+ if (generator.config.pinnedBinaryTargets) {
446
+ throw new Error(
447
+ `The \`pinnedBinaryTargets\` field on the generator definition is deprecated.
448
+ Please use the PRISMA_QUERY_ENGINE_BINARY env var instead to pin the binary target.`
449
+ );
450
+ }
433
451
  if (generator.binaryTargets) {
434
452
  const binaryTargets2 = generator.binaryTargets && generator.binaryTargets.length > 0 ? generator.binaryTargets : [{ fromEnvVar: null, value: "native" }];
435
453
  const resolvedBinaryTargets = binaryTargets2.flatMap((object) => (0, import_chunk_IOIAK7V7.parseBinaryTargetsEnvValue)(object)).map((p) => p === "native" ? binaryTarget : p);
@@ -506,7 +524,7 @@ function checkUnsupportedDataProxy({
506
524
  }
507
525
  }
508
526
  if (!schemaContext?.primaryDatasource) return;
509
- const url = (0, import_chunk_6OLUZD6G.resolveUrl)((0, import_chunk_6OLUZD6G.getEffectiveUrl)(schemaContext.primaryDatasource));
527
+ const url = (0, import_chunk_JD36HS5L.resolveUrl)((0, import_chunk_JD36HS5L.getEffectiveUrl)(schemaContext.primaryDatasource));
510
528
  if (url?.startsWith("prisma://")) {
511
529
  throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
512
530
  }
@@ -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_B22EOFPW_exports = {};
20
- __export(chunk_B22EOFPW_exports, {
19
+ var chunk_RS2R7COT_exports = {};
20
+ __export(chunk_RS2R7COT_exports, {
21
21
  binaryTypeToEngineType: () => binaryTypeToEngineType
22
22
  });
23
- module.exports = __toCommonJS(chunk_B22EOFPW_exports);
23
+ module.exports = __toCommonJS(chunk_RS2R7COT_exports);
24
24
  var import_fetch_engine = require("@prisma/fetch-engine");
25
25
  function binaryTypeToEngineType(binaryType) {
26
26
  if (binaryType === import_fetch_engine.BinaryType.SchemaEngineBinary) {
@@ -29,5 +29,8 @@ function binaryTypeToEngineType(binaryType) {
29
29
  if (binaryType === import_fetch_engine.BinaryType.QueryEngineLibrary) {
30
30
  return "libqueryEngine";
31
31
  }
32
+ if (binaryType === import_fetch_engine.BinaryType.QueryEngineBinary) {
33
+ return "queryEngine";
34
+ }
32
35
  throw new Error(`Could not convert binary type ${binaryType}`);
33
36
  }