@prisma/internals 6.19.0-integration-engines-6-19-0-32-next-568b222d0ab829bbbe5f2fd48ed587836813346c.1 → 6.19.0-integration-feat-remove-library-engine.5

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 (116) hide show
  1. package/dist/{chunk-DK5SCKNO.js → chunk-2KREE2OX.js} +5 -5
  2. package/dist/{chunk-JOIIWB3U.js → chunk-2LOGW45F.js} +68 -33
  3. package/dist/{chunk-ISSTUMGH.js → chunk-2THJ6XVV.js} +12 -12
  4. package/dist/{chunk-BVJP43JS.js → chunk-32LLAKF4.js} +13 -784
  5. package/dist/{chunk-4HCWAIVZ.js → chunk-33FYCEWF.js} +14 -20
  6. package/dist/{chunk-FYZCPL2Z.js → chunk-3CAPLXKF.js} +5 -8
  7. package/dist/{chunk-I6WLABB2.js → chunk-3WXUQZS7.js} +14 -5
  8. package/dist/{chunk-U2GOPCRA.js → chunk-4AHWN4VZ.js} +5 -5
  9. package/dist/{chunk-OAT7ZJED.js → chunk-4YDN7W7B.js} +7 -20
  10. package/dist/{chunk-TGOAMULH.js → chunk-4ZYCASUI.js} +8 -9
  11. package/dist/{chunk-SH2TNBI6.js → chunk-5B5U2HVK.js} +7 -8
  12. package/dist/{chunk-RS2R7COT.js → chunk-5I4ERIIY.js} +3 -9
  13. package/dist/{chunk-F2OZV76L.js → chunk-5MHUYAV3.js} +9 -9
  14. package/dist/{chunk-HO5HRHFZ.js → chunk-5W3BSMTH.js} +3 -6
  15. package/dist/{chunk-2MJTY4KQ.js → chunk-6FP5PMMX.js} +5 -5
  16. package/dist/{chunk-YU52YNDP.js → chunk-6QTJ35DP.js} +12 -12
  17. package/dist/{chunk-PWLNUJDJ.js → chunk-7PEHIVPK.js} +5 -5
  18. package/dist/{chunk-WFNB7VRA.js → chunk-ARC7TW3L.js} +4 -14
  19. package/dist/{chunk-HFFWZTVM.js → chunk-BUQN4WLU.js} +7 -9
  20. package/dist/{chunk-HHG4DGHC.js → chunk-CGLLQXZE.js} +11 -12
  21. package/dist/{chunk-GMW36QQF.js → chunk-DOO45FN6.js} +7 -7
  22. package/dist/chunk-DYV47NUW.js +796 -0
  23. package/dist/{chunk-IDINCQMN.js → chunk-FF7OLLBP.js} +12 -784
  24. package/dist/{chunk-ZKW5OHDA.js → chunk-FP5T5YD3.js} +5 -5
  25. package/dist/{chunk-4CGPN5SR.js → chunk-GJSFP4V4.js} +3 -9
  26. package/dist/{chunk-4JCVHBYR.js → chunk-GL7OANR6.js} +5 -5
  27. package/dist/{chunk-VDOBMNYY.js → chunk-HBU4ZVCA.js} +11 -11
  28. package/dist/{chunk-DSG2XXJJ.js → chunk-HQE53CGA.js} +11 -11
  29. package/dist/{chunk-UHI6VYFX.js → chunk-IHC4ZVPQ.js} +5 -5
  30. package/dist/{chunk-D4VDA2TZ.js → chunk-IRWX4FCC.js} +6 -6
  31. package/dist/{chunk-UQUWZJVN.js → chunk-IU77SCOB.js} +9 -9
  32. package/dist/{chunk-RIACS7RB.js → chunk-JGAJWFOG.js} +5 -5
  33. package/dist/{chunk-NVNI2SRU.js → chunk-KNNTV7IN.js} +687 -213
  34. package/dist/{chunk-LBEUT2S6.js → chunk-KZ5SMOBR.js} +5 -5
  35. package/dist/{chunk-AX5N26KG.js → chunk-L2CX3ZWZ.js} +6 -6
  36. package/dist/{chunk-JD36HS5L.js → chunk-LQA25XWD.js} +14 -20
  37. package/dist/{chunk-RKDOMYIG.js → chunk-M6PZRD57.js} +38 -71
  38. package/dist/{chunk-DX7WJ45H.js → chunk-MEBZK5AR.js} +5 -5
  39. package/dist/{chunk-5AI4FIZ3.js → chunk-MEOOYUIZ.js} +10 -10
  40. package/dist/{chunk-PZEUONUZ.js → chunk-MK4IWFSR.js} +11 -11
  41. package/dist/{chunk-TQFONRJP.js → chunk-MXAUURHG.js} +5 -5
  42. package/dist/{chunk-7QC5VORA.js → chunk-MYLPCGTT.js} +5 -5
  43. package/dist/{chunk-EYVG6XQS.js → chunk-OKVM3CW4.js} +3 -39
  44. package/dist/{chunk-IKIW52QS.js → chunk-PSACKRZB.js} +11 -11
  45. package/dist/{chunk-FCYHZHVW.js → chunk-R3J2O23S.js} +4 -4
  46. package/dist/{chunk-75BIJ5PX.js → chunk-UB2X7DGZ.js} +9 -9
  47. package/dist/{chunk-N3UPGHTD.js → chunk-WC5A3H4V.js} +38 -71
  48. package/dist/{chunk-TZJROXB3.js → chunk-WSZXPLJQ.js} +4 -4
  49. package/dist/cli/checkUnsupportedDataProxy.js +56 -62
  50. package/dist/cli/checkUnsupportedSchemaEngineWasm.js +56 -62
  51. package/dist/cli/getGeneratorSuccessMessage.js +2 -3
  52. package/dist/cli/getSchema.d.ts +1 -15
  53. package/dist/cli/getSchema.js +4 -5
  54. package/dist/cli/hashes.js +4 -4
  55. package/dist/cli/schemaContext.d.ts +1 -3
  56. package/dist/cli/schemaContext.js +56 -62
  57. package/dist/engine-commands/errorHelpers.js +4 -4
  58. package/dist/engine-commands/formatSchema.js +55 -61
  59. package/dist/engine-commands/getConfig.d.ts +0 -1
  60. package/dist/engine-commands/getConfig.js +13 -13
  61. package/dist/engine-commands/getDmmf.js +10 -10
  62. package/dist/engine-commands/getEngineVersion.js +6 -9
  63. package/dist/engine-commands/getEnginesInfo.d.ts +0 -1
  64. package/dist/engine-commands/getEnginesInfo.js +7 -9
  65. package/dist/engine-commands/index.js +67 -73
  66. package/dist/engine-commands/lintSchema.js +9 -9
  67. package/dist/engine-commands/mergeSchemas.js +10 -10
  68. package/dist/engine-commands/queryEngineCommons.js +6 -6
  69. package/dist/engine-commands/validate.js +10 -10
  70. package/dist/errorReporting.js +6 -6
  71. package/dist/get-generators/getGenerators.d.ts +0 -1
  72. package/dist/get-generators/getGenerators.js +58 -64
  73. package/dist/get-generators/utils/binaryTypeToEngineType.js +2 -2
  74. package/dist/get-generators/utils/engineTypeToBinaryType.js +2 -2
  75. package/dist/get-generators/utils/getBinaryPathsByVersion.js +6 -5
  76. package/dist/getPackedPackage.js +4 -3
  77. package/dist/index.d.ts +1 -8
  78. package/dist/index.js +101 -115
  79. package/dist/{multipart-parser-3AFJFP6K.js → multipart-parser-UV3WZSWW.js} +6 -6
  80. package/dist/resolveBinary.js +8 -7
  81. package/dist/schemaEngineCommands.js +9 -8
  82. package/dist/sendPanic.js +4 -4
  83. package/dist/utils/canPrompt.js +3 -3
  84. package/dist/utils/cloudflareD1.js +3 -3
  85. package/dist/utils/drawBox.js +2 -2
  86. package/dist/utils/fs-functional.js +10 -10
  87. package/dist/utils/fs-utils.js +8 -8
  88. package/dist/utils/getVersionFromPackageJson.js +3 -3
  89. package/dist/utils/handlePanic.js +8 -8
  90. package/dist/utils/link.js +2 -2
  91. package/dist/utils/missingDatasource.js +3 -3
  92. package/dist/utils/missingGeneratorMessage.js +5 -5
  93. package/dist/utils/serializeQueryEngineName.js +2 -2
  94. package/dist/wasm.js +5 -5
  95. package/package.json +15 -16
  96. package/dist/chunk-3FP46GUV.js +0 -471
  97. package/dist/chunk-46ABODUM.js +0 -186
  98. package/dist/chunk-6TTRTZXU.js +0 -37
  99. package/dist/chunk-DZYINYAA.js +0 -68
  100. package/dist/chunk-ERSH2BQA.js +0 -58
  101. package/dist/chunk-PZMRR772.js +0 -41
  102. package/dist/chunk-T2PM5TKT.js +0 -55
  103. package/dist/client/getClientEngineType.d.ts +0 -7
  104. package/dist/client/getClientEngineType.js +0 -26
  105. package/dist/dotenvExpand.d.ts +0 -35
  106. package/dist/dotenvExpand.js +0 -25
  107. package/dist/utils/getEnvPaths.d.ts +0 -14
  108. package/dist/utils/getEnvPaths.js +0 -29
  109. package/dist/utils/handleEngineLoadingErrors.d.ts +0 -8
  110. package/dist/utils/handleEngineLoadingErrors.js +0 -27
  111. package/dist/utils/load.d.ts +0 -6
  112. package/dist/utils/load.js +0 -28
  113. package/dist/utils/loadEnvFile.d.ts +0 -10
  114. package/dist/utils/loadEnvFile.js +0 -30
  115. package/dist/utils/tryLoadEnvs.d.ts +0 -25
  116. package/dist/utils/tryLoadEnvs.js +0 -30
@@ -26,16 +26,14 @@ 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_EYVG6XQS_exports = {};
30
- __export(chunk_EYVG6XQS_exports, {
31
- getSchemaFromPackageJson: () => getSchemaFromPackageJson,
29
+ var chunk_OKVM3CW4_exports = {};
30
+ __export(chunk_OKVM3CW4_exports, {
32
31
  getSchemaWithPath: () => getSchemaWithPath,
33
32
  getSchemaWithPathOptional: () => getSchemaWithPathOptional,
34
33
  printSchemaLoadedMessage: () => printSchemaLoadedMessage
35
34
  });
36
- module.exports = __toCommonJS(chunk_EYVG6XQS_exports);
35
+ module.exports = __toCommonJS(chunk_OKVM3CW4_exports);
37
36
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
38
- var import_config = require("@prisma/config");
39
37
  var import_debug = require("@prisma/debug");
40
38
  var import_schema_files_loader = require("@prisma/schema-files-loader");
41
39
  var import_fs = __toESM(require("fs"));
@@ -119,10 +117,6 @@ async function getSchemaWithPathInternal(schemaPathFromArgs, schemaPathFromConfi
119
117
  if (prismaConfigResult.ok) {
120
118
  return prismaConfigResult;
121
119
  }
122
- const pkgJsonResult = await getSchemaFromPackageJson(cwd);
123
- if (pkgJsonResult.ok) {
124
- return pkgJsonResult;
125
- }
126
120
  const defaultResult = await getDefaultSchema(cwd);
127
121
  if (defaultResult.ok) {
128
122
  return defaultResult;
@@ -179,36 +173,6 @@ async function readSchemaFromPrismaConfigBasedLocation(schemaPathFromConfig) {
179
173
  }
180
174
  return schemaResult;
181
175
  }
182
- async function getSchemaFromPackageJson(cwd) {
183
- const prismaConfig = await (0, import_config.loadConfigFromPackageJson)(cwd);
184
- debug("prismaConfig", prismaConfig);
185
- if (!prismaConfig || !prismaConfig.config?.schema) {
186
- return { ok: false, error: { kind: "PackageJsonNotConfigured" } };
187
- }
188
- const schemaPathFromPkgJson = prismaConfig.config.schema;
189
- if (typeof schemaPathFromPkgJson !== "string") {
190
- throw new Error(
191
- `Provided schema path \`${schemaPathFromPkgJson}\` from \`${import_path.default.relative(
192
- cwd,
193
- prismaConfig.loadedFromFile
194
- )}\` must be of type string`
195
- );
196
- }
197
- const absoluteSchemaPath = import_path.default.isAbsolute(schemaPathFromPkgJson) ? schemaPathFromPkgJson : import_path.default.resolve(import_path.default.dirname(prismaConfig.loadedFromFile), schemaPathFromPkgJson);
198
- const lookupResult = await readSchemaFromFileOrDirectory(absoluteSchemaPath);
199
- if (!lookupResult.ok) {
200
- throw new Error(
201
- `Could not load schema from \`${import_path.default.relative(
202
- cwd,
203
- absoluteSchemaPath
204
- )}\` provided by "prisma.schema" config of \`${import_path.default.relative(
205
- cwd,
206
- prismaConfig.loadedFromFile
207
- )}\`: ${renderLookupError(lookupResult.error)}`
208
- );
209
- }
210
- return lookupResult;
211
- }
212
176
  async function getDefaultSchema(cwd, failures = []) {
213
177
  const lookupPaths = [import_path.default.join(cwd, "schema.prisma"), import_path.default.join(cwd, "prisma", "schema.prisma")];
214
178
  for (const path2 of lookupPaths) {
@@ -26,16 +26,16 @@ 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_IKIW52QS_exports = {};
30
- __export(chunk_IKIW52QS_exports, {
29
+ var chunk_PSACKRZB_exports = {};
30
+ __export(chunk_PSACKRZB_exports, {
31
31
  GetDmmfError: () => GetDmmfError,
32
32
  getDMMF: () => getDMMF
33
33
  });
34
- module.exports = __toCommonJS(chunk_IKIW52QS_exports);
35
- var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
34
+ module.exports = __toCommonJS(chunk_PSACKRZB_exports);
35
+ var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
36
36
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
37
- var import_chunk_DK5SCKNO = require("./chunk-DK5SCKNO.js");
38
- var import_chunk_ZKW5OHDA = require("./chunk-ZKW5OHDA.js");
37
+ var import_chunk_4AHWN4VZ = require("./chunk-4AHWN4VZ.js");
38
+ var import_chunk_FP5T5YD3 = require("./chunk-FP5T5YD3.js");
39
39
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
40
40
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
41
41
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
@@ -58,25 +58,25 @@ ${detailsHeader} ${message}`;
58
58
  }).exhaustive();
59
59
  const errorMessageWithContext = `${constructedErrorMessage}
60
60
  [Context: getDmmf]`;
61
- super((0, import_chunk_DK5SCKNO.addVersionDetailsToErrorMessage)(errorMessageWithContext));
61
+ super((0, import_chunk_4AHWN4VZ.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
62
  this.name = "GetDmmfError";
63
63
  }
64
64
  };
65
65
  async function getDMMF(options) {
66
- const debugErrorType = (0, import_chunk_TZJROXB3.createDebugErrorType)(debug, "getDmmfWasm");
66
+ const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getDmmfWasm");
67
67
  debug(`Using getDmmf Wasm`);
68
68
  const dmmfPipeline = (0, import_function.pipe)(
69
69
  (0, import_chunk_5DBOS77Y.tryCatch)(
70
70
  () => {
71
71
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
72
72
  debug("Triggering a Rust panic...");
73
- import_chunk_ZKW5OHDA.prismaSchemaWasm.debug_panic();
73
+ import_chunk_FP5T5YD3.prismaSchemaWasm.debug_panic();
74
74
  }
75
75
  const params = JSON.stringify({
76
76
  prismaSchema: options.datamodel,
77
77
  noColor: Boolean(process.env.NO_COLOR)
78
78
  });
79
- const data = import_chunk_ZKW5OHDA.prismaSchemaWasm.get_dmmf(params);
79
+ const data = import_chunk_FP5T5YD3.prismaSchemaWasm.get_dmmf(params);
80
80
  return data;
81
81
  },
82
82
  (e) => ({
@@ -124,7 +124,7 @@ async function getDMMF(options) {
124
124
  return panic;
125
125
  }
126
126
  const errorOutput = e.error.message;
127
- return new GetDmmfError((0, import_chunk_TZJROXB3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
127
+ return new GetDmmfError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
128
128
  }).with({ type: "parse-json" }, (e) => {
129
129
  debugErrorType(e);
130
130
  return new GetDmmfError({ _tag: "unparsed", message: e.error.message, reason: e.reason });
@@ -26,13 +26,13 @@ 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_FCYHZHVW_exports = {};
30
- __export(chunk_FCYHZHVW_exports, {
29
+ var chunk_R3J2O23S_exports = {};
30
+ __export(chunk_R3J2O23S_exports, {
31
31
  canPrompt: () => canPrompt
32
32
  });
33
- module.exports = __toCommonJS(chunk_FCYHZHVW_exports);
34
- var import_chunk_H4NI2RIK = require("./chunk-H4NI2RIK.js");
33
+ module.exports = __toCommonJS(chunk_R3J2O23S_exports);
35
34
  var import_chunk_ICFLO5JW = require("./chunk-ICFLO5JW.js");
35
+ var import_chunk_H4NI2RIK = require("./chunk-H4NI2RIK.js");
36
36
  var import_prompts = __toESM(require("prompts"));
37
37
  var canPrompt = () => {
38
38
  const injectedCount = import_prompts.default._injected?.length;
@@ -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_75BIJ5PX_exports = {};
30
- __export(chunk_75BIJ5PX_exports, {
29
+ var chunk_UB2X7DGZ_exports = {};
30
+ __export(chunk_UB2X7DGZ_exports, {
31
31
  createDirIfNotExists: () => createDirIfNotExists2,
32
32
  fs_functional_exports: () => fs_functional_exports,
33
33
  getFilesInDir: () => getFilesInDir2,
@@ -37,8 +37,8 @@ __export(chunk_75BIJ5PX_exports, {
37
37
  removeFile: () => removeFile,
38
38
  writeFile: () => writeFile2
39
39
  });
40
- module.exports = __toCommonJS(chunk_75BIJ5PX_exports);
41
- var import_chunk_TQFONRJP = require("./chunk-TQFONRJP.js");
40
+ module.exports = __toCommonJS(chunk_UB2X7DGZ_exports);
41
+ var import_chunk_MXAUURHG = require("./chunk-MXAUURHG.js");
42
42
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
43
43
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
44
44
  var import_promises = __toESM(require("fs/promises"));
@@ -3981,13 +3981,13 @@ var fs_functional_exports = {};
3981
3981
  });
3982
3982
  var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57HZ.require_function)());
3983
3983
  var TE = (0, import_chunk_4VNS5WPM.__toESM)(require_TaskEither());
3984
- var createDirIfNotExists2 = (dir) => TE.tryCatch(() => (0, import_chunk_TQFONRJP.createDirIfNotExists)(dir), createTaggedSystemError("fs-create-dir", { dir }));
3985
- var writeFile2 = (params) => TE.tryCatch(() => (0, import_chunk_TQFONRJP.writeFile)(params), createTaggedSystemError("fs-write-file", params));
3986
- var removeEmptyDirs2 = (dir) => TE.tryCatch(() => (0, import_chunk_TQFONRJP.removeEmptyDirs)(dir), createTaggedSystemError("fs-remove-empty-dirs", { dir }));
3984
+ var createDirIfNotExists2 = (dir) => TE.tryCatch(() => (0, import_chunk_MXAUURHG.createDirIfNotExists)(dir), createTaggedSystemError("fs-create-dir", { dir }));
3985
+ var writeFile2 = (params) => TE.tryCatch(() => (0, import_chunk_MXAUURHG.writeFile)(params), createTaggedSystemError("fs-write-file", params));
3986
+ var removeEmptyDirs2 = (dir) => TE.tryCatch(() => (0, import_chunk_MXAUURHG.removeEmptyDirs)(dir), createTaggedSystemError("fs-remove-empty-dirs", { dir }));
3987
3987
  var removeDir = (dir) => (0, import_function.pipe)(TE.tryCatch(() => import_promises.default.rm(dir, { recursive: true }), createTaggedSystemError("fs-remove-dir", { dir })));
3988
3988
  var removeFile = (filePath) => (0, import_function.pipe)(TE.tryCatch(() => import_promises.default.unlink(filePath), createTaggedSystemError("fs-remove-file", { filePath })));
3989
- var getNestedFoldersInDir2 = (dir) => () => (0, import_chunk_TQFONRJP.getNestedFoldersInDir)(dir);
3990
- var getFilesInDir2 = (dir, pattern = "**") => () => (0, import_chunk_TQFONRJP.getFilesInDir)(dir, pattern);
3989
+ var getNestedFoldersInDir2 = (dir) => () => (0, import_chunk_MXAUURHG.getNestedFoldersInDir)(dir);
3990
+ var getFilesInDir2 = (dir, pattern = "**") => () => (0, import_chunk_MXAUURHG.getFilesInDir)(dir, pattern);
3991
3991
  function createTaggedSystemError(type, meta) {
3992
3992
  return (e) => ({
3993
3993
  type,
@@ -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_N3UPGHTD_exports = {};
30
- __export(chunk_N3UPGHTD_exports, {
29
+ var chunk_WC5A3H4V_exports = {};
30
+ __export(chunk_WC5A3H4V_exports, {
31
31
  checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
32
32
  checkUnsupportedSchemaEngineWasm: () => checkUnsupportedSchemaEngineWasm,
33
33
  forbiddenCmdFlagWithSchemaEngineWasm: () => forbiddenCmdFlagWithSchemaEngineWasm,
@@ -36,39 +36,36 @@ __export(chunk_N3UPGHTD_exports, {
36
36
  getBinaryTargetForCurrentPlatform: () => import_get_platform2.getBinaryTargetForCurrentPlatform,
37
37
  getGenerator: () => getGenerator,
38
38
  getGenerators: () => getGenerators,
39
- getNodeAPIName: () => import_get_platform2.getNodeAPIName,
40
39
  knownBinaryTargets: () => knownBinaryTargets,
41
40
  loadSchemaContext: () => loadSchemaContext,
42
41
  processSchemaResult: () => processSchemaResult,
43
42
  skipIndex: () => skipIndex
44
43
  });
45
- module.exports = __toCommonJS(chunk_N3UPGHTD_exports);
44
+ module.exports = __toCommonJS(chunk_WC5A3H4V_exports);
45
+ var import_chunk_5MHUYAV3 = require("./chunk-5MHUYAV3.js");
46
46
  var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
47
47
  var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
48
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
49
  var import_chunk_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
52
50
  var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
53
- var import_chunk_7QC5VORA = require("./chunk-7QC5VORA.js");
54
- var import_chunk_AX5N26KG = require("./chunk-AX5N26KG.js");
55
- var import_chunk_46ABODUM = require("./chunk-46ABODUM.js");
56
- var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
51
+ var import_chunk_MYLPCGTT = require("./chunk-MYLPCGTT.js");
52
+ var import_chunk_L2CX3ZWZ = require("./chunk-L2CX3ZWZ.js");
53
+ var import_chunk_3WXUQZS7 = require("./chunk-3WXUQZS7.js");
57
54
  var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.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");
55
+ var import_chunk_PSACKRZB = require("./chunk-PSACKRZB.js");
56
+ var import_chunk_JGAJWFOG = require("./chunk-JGAJWFOG.js");
57
+ var import_chunk_MK4IWFSR = require("./chunk-MK4IWFSR.js");
58
+ var import_chunk_LQA25XWD = require("./chunk-LQA25XWD.js");
59
+ var import_chunk_FP5T5YD3 = require("./chunk-FP5T5YD3.js");
60
+ var import_chunk_OKVM3CW4 = require("./chunk-OKVM3CW4.js");
65
61
  var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
66
62
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
67
63
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
68
64
  var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
69
65
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
66
+ var import_chunk_32LLAKF4 = require("./chunk-32LLAKF4.js");
67
+ var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
70
68
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
71
- var import_chunk_BVJP43JS = require("./chunk-BVJP43JS.js");
72
69
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
73
70
  var import_path = __toESM(require("path"));
74
71
  var import_debug = __toESM(require("@prisma/debug"));
@@ -81,7 +78,7 @@ var forbiddenCmdFlagWithSchemaEngineWasm = ({ cmd, flag }) => `
81
78
  Passing the ${(0, import_chunk_PG5FDKSF.green)(`${flag}`)} flag to the ${(0, import_chunk_PG5FDKSF.green)(`prisma ${cmd}`)} command is not supported when
82
79
  defining an ${(0, import_chunk_PG5FDKSF.green)(`adapter`)} in Prisma config file (e.g., ${(0, import_chunk_PG5FDKSF.green)(`\`prisma.config.ts\``)}).
83
80
 
84
- More information about this limitation: ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/schema-engine-limitations")}
81
+ More information about this limitation: ${(0, import_chunk_3WXUQZS7.link)("https://pris.ly/d/schema-engine-limitations")}
85
82
  `;
86
83
  function checkUnsupportedSchemaEngineWasm({
87
84
  cmd,
@@ -102,7 +99,7 @@ var debug = (0, import_debug.default)("prisma:format");
102
99
  async function formatSchema({ schemas }, inputFormattingOptions) {
103
100
  if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
104
101
  handleFormatPanic(() => {
105
- import_chunk_DX7WJ45H.prismaSchemaWasm.debug_panic();
102
+ import_chunk_FP5T5YD3.prismaSchemaWasm.debug_panic();
106
103
  });
107
104
  }
108
105
  const defaultFormattingOptions = {
@@ -119,10 +116,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
119
116
  const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
120
117
  const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
121
118
  const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
122
- const lintDiagnostics2 = (0, import_chunk_2MJTY4KQ.lintSchema)({ schemas: formattedMultipleSchemas2 });
119
+ const lintDiagnostics2 = (0, import_chunk_JGAJWFOG.lintSchema)({ schemas: formattedMultipleSchemas2 });
123
120
  return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
124
121
  });
125
- const lintWarnings = (0, import_chunk_2MJTY4KQ.getLintWarningsAsText)(lintDiagnostics);
122
+ const lintWarnings = (0, import_chunk_JGAJWFOG.getLintWarningsAsText)(lintDiagnostics);
126
123
  if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
127
124
  console.warn(lintWarnings);
128
125
  }
@@ -149,7 +146,7 @@ function handleFormatPanic(tryCb) {
149
146
  }
150
147
  }
151
148
  function formatWasm(schema, documentFormattingParams) {
152
- const formattedSchema = import_chunk_DX7WJ45H.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
149
+ const formattedSchema = import_chunk_FP5T5YD3.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
153
150
  return formattedSchema;
154
151
  }
155
152
  async function loadSchemaContext({
@@ -157,39 +154,37 @@ async function loadSchemaContext({
157
154
  schemaPathFromConfig,
158
155
  schemaEngineConfig,
159
156
  printLoadMessage = true,
160
- ignoreEnvVarErrors = false,
161
157
  allowNull = false,
162
158
  schemaPathArgumentName = "--schema",
163
159
  cwd = process.cwd()
164
160
  } = {}) {
165
161
  let schemaResult = null;
166
162
  if (allowNull) {
167
- schemaResult = await (0, import_chunk_EYVG6XQS.getSchemaWithPathOptional)(schemaPathFromArg, schemaPathFromConfig, {
163
+ schemaResult = await (0, import_chunk_OKVM3CW4.getSchemaWithPathOptional)(schemaPathFromArg, schemaPathFromConfig, {
168
164
  argumentName: schemaPathArgumentName,
169
165
  cwd
170
166
  });
171
167
  if (!schemaResult) return null;
172
168
  } else {
173
- schemaResult = await (0, import_chunk_EYVG6XQS.getSchemaWithPath)(schemaPathFromArg, schemaPathFromConfig, {
169
+ schemaResult = await (0, import_chunk_OKVM3CW4.getSchemaWithPath)(schemaPathFromArg, schemaPathFromConfig, {
174
170
  argumentName: schemaPathArgumentName,
175
171
  cwd
176
172
  });
177
173
  }
178
- return processSchemaResult({ schemaResult, schemaEngineConfig, printLoadMessage, ignoreEnvVarErrors, cwd });
174
+ return processSchemaResult({ schemaResult, schemaEngineConfig, printLoadMessage, cwd });
179
175
  }
180
176
  async function processSchemaResult({
181
177
  schemaResult,
182
178
  schemaEngineConfig,
183
179
  printLoadMessage = true,
184
- ignoreEnvVarErrors = false,
185
180
  cwd = process.cwd()
186
181
  }) {
187
182
  const loadedFromPathForLogMessages = import_path.default.relative(cwd, schemaResult.schemaPath);
188
183
  const schemaRootDir = schemaResult.schemaRootDir || cwd;
189
184
  if (printLoadMessage) {
190
- (0, import_chunk_EYVG6XQS.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
185
+ (0, import_chunk_OKVM3CW4.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
191
186
  }
192
- const configFromPsl = await (0, import_chunk_4HCWAIVZ.getConfig)({ datamodel: schemaResult.schemas, ignoreEnvVarErrors });
187
+ const configFromPsl = await (0, import_chunk_LQA25XWD.getConfig)({ datamodel: schemaResult.schemas });
193
188
  const datasourceFromPsl = configFromPsl.datasources.at(0);
194
189
  const primaryDatasource = (0, import_chunk_XKZ6CBLA.z)(schemaEngineConfig).with({ engine: "classic" }, ({ datasource }) => {
195
190
  const { url, directUrl, shadowDatabaseUrl } = datasource;
@@ -222,7 +217,7 @@ function getPrimaryDatasourceDirectory(primaryDatasource) {
222
217
  }
223
218
  return null;
224
219
  }
225
- var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_BVJP43JS.require_p_map)());
220
+ var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_32LLAKF4.require_p_map)());
226
221
  var debug2 = (0, import_debug2.default)("prisma:getGenerators");
227
222
  async function getGenerators(options) {
228
223
  if (options.registry === void 0 && options.providerAliases !== void 0) {
@@ -247,28 +242,27 @@ async function getGenerators(options) {
247
242
  binaryPathsOverride,
248
243
  generatorNames = [],
249
244
  postinstall,
250
- noEngine,
251
245
  allowNoModels = true,
252
246
  typedSql
253
247
  } = options;
254
- const schemaContext = !options.schemaContext && schemaPath ? await loadSchemaContext({ schemaPathFromArg: schemaPath, ignoreEnvVarErrors: true }) : options.schemaContext;
248
+ const schemaContext = !options.schemaContext && schemaPath ? await loadSchemaContext({ schemaPathFromArg: schemaPath }) : options.schemaContext;
255
249
  if (!schemaContext) {
256
250
  throw new Error(`no schema provided for getGenerators`);
257
251
  }
258
252
  if (!schemaContext.primaryDatasource) {
259
- throw new Error(import_chunk_7QC5VORA.missingDatasource);
253
+ throw new Error(import_chunk_MYLPCGTT.missingDatasource);
260
254
  }
261
255
  (0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
262
256
  const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
263
- const dmmf = await (0, import_chunk_VDOBMNYY.getDMMF)({
257
+ const dmmf = await (0, import_chunk_PSACKRZB.getDMMF)({
264
258
  datamodel: schemaContext.schemaFiles,
265
259
  previewFeatures
266
260
  });
267
261
  if (dmmf.datamodel.models.length === 0 && !allowNoModels) {
268
262
  if (schemaContext.primaryDatasource.provider === "mongodb") {
269
- throw new Error(import_chunk_AX5N26KG.missingModelMessageMongoDB);
263
+ throw new Error(import_chunk_L2CX3ZWZ.missingModelMessageMongoDB);
270
264
  }
271
- throw new Error(import_chunk_AX5N26KG.missingModelMessage);
265
+ throw new Error(import_chunk_L2CX3ZWZ.missingModelMessage);
272
266
  }
273
267
  const generatorConfigs = filterGenerators(overrideGenerators || schemaContext.generators, generatorNames);
274
268
  await validateGenerators(generatorConfigs);
@@ -311,8 +305,7 @@ You need to define \`output\` in the generator block in the schema file.`
311
305
  fromEnvVar: null
312
306
  };
313
307
  }
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 });
308
+ const datamodel = (0, import_chunk_MK4IWFSR.mergeSchemas)({ schemas: schemaContext.schemaFiles });
316
309
  const options2 = {
317
310
  datamodel,
318
311
  datasources: schemaContext.datasources,
@@ -324,9 +317,7 @@ You need to define \`output\` in the generator block in the schema file.`
324
317
  version: version2 || import_engines.enginesVersion,
325
318
  // this version makes no sense anymore and should be ignored
326
319
  postinstall,
327
- noEngine,
328
320
  allowNoModels,
329
- envPaths,
330
321
  typedSql
331
322
  };
332
323
  generatorInstance.setOptions(options2);
@@ -370,18 +361,16 @@ generator gen {
370
361
  }
371
362
  const generatorBinaryTargets = g.options?.generator?.binaryTargets;
372
363
  if (generatorBinaryTargets && generatorBinaryTargets.length > 0) {
373
- for (const binaryTarget2 of generatorBinaryTargets) {
374
- if (!neededVersions[neededVersion].binaryTargets.find((object) => object.value === binaryTarget2.value)) {
375
- neededVersions[neededVersion].binaryTargets.push(binaryTarget2);
364
+ for (const binaryTarget of generatorBinaryTargets) {
365
+ if (!neededVersions[neededVersion].binaryTargets.find((object) => object.value === binaryTarget.value)) {
366
+ neededVersions[neededVersion].binaryTargets.push(binaryTarget);
376
367
  }
377
368
  }
378
369
  }
379
370
  }
380
371
  }
381
- const queryEngineBinaryType = (0, import_engines.getCliQueryEngineBinaryType)();
382
- const queryEngineType = (0, import_chunk_RS2R7COT.binaryTypeToEngineType)(queryEngineBinaryType);
383
372
  debug2("neededVersions", JSON.stringify(neededVersions, null, 2));
384
- const { binaryPathsByVersion, binaryTarget } = await (0, import_chunk_F2OZV76L.getBinaryPathsByVersion)({
373
+ const { binaryPathsByVersion } = await (0, import_chunk_5MHUYAV3.getBinaryPathsByVersion)({
385
374
  neededVersions,
386
375
  // We're lazily computing the binary target here, to avoid printing the
387
376
  // `Prisma failed to detect the libssl/openssl version to use` warning
@@ -402,17 +391,6 @@ generator gen {
402
391
  const generatorBinaryPaths = (0, import_chunk_GXW4NTU2.pick)(binaryPaths ?? {}, generator.manifest.requiresEngines);
403
392
  debug2({ generatorBinaryPaths });
404
393
  generator.setBinaryPaths(generatorBinaryPaths);
405
- if (engineVersion !== version2 && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
406
- const customDmmf = await (0, import_chunk_VDOBMNYY.getDMMF)({
407
- datamodel: schemaContext.schemaFiles,
408
- previewFeatures
409
- });
410
- const options2 = { ...generator.options, dmmf: customDmmf };
411
- debug2("generator.manifest.prettyName", generator.manifest.prettyName);
412
- debug2("options", options2);
413
- debug2("options.generator.binaryTargets", options2.generator.binaryTargets);
414
- generator.setOptions(options2);
415
- }
416
394
  }
417
395
  }
418
396
  return generators;
@@ -437,17 +415,6 @@ var oldToNewBinaryTargetsMapping = {
437
415
  async function validateGenerators(generators) {
438
416
  const binaryTarget = await (0, import_get_platform.getBinaryTargetForCurrentPlatform)();
439
417
  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
- }
451
418
  if (generator.binaryTargets) {
452
419
  const binaryTargets2 = generator.binaryTargets && generator.binaryTargets.length > 0 ? generator.binaryTargets : [{ fromEnvVar: null, value: "native" }];
453
420
  const resolvedBinaryTargets = binaryTargets2.flatMap((object) => (0, import_chunk_IOIAK7V7.parseBinaryTargetsEnvValue)(object)).map((p) => p === "native" ? binaryTarget : p);
@@ -511,7 +478,7 @@ var forbiddenCmdWithDataProxyFlagMessage = (command) => `
511
478
  Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(`prisma ${command}`)} yet.
512
479
  Please use a direct connection to your database via the datasource \`directUrl\` setting.
513
480
 
514
- More information about this limitation: ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/accelerate-limitations")}
481
+ More information about this limitation: ${(0, import_chunk_3WXUQZS7.link)("https://pris.ly/d/accelerate-limitations")}
515
482
  `;
516
483
  function checkUnsupportedDataProxy({
517
484
  cmd,
@@ -524,7 +491,7 @@ function checkUnsupportedDataProxy({
524
491
  }
525
492
  }
526
493
  if (!schemaContext?.primaryDatasource) return;
527
- const url = (0, import_chunk_4HCWAIVZ.resolveUrl)((0, import_chunk_4HCWAIVZ.getEffectiveUrl)(schemaContext.primaryDatasource));
494
+ const url = (0, import_chunk_LQA25XWD.resolveUrl)((0, import_chunk_LQA25XWD.getEffectiveUrl)(schemaContext.primaryDatasource));
528
495
  if (url?.startsWith("prisma://")) {
529
496
  throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
530
497
  }
@@ -26,16 +26,16 @@ 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_TZJROXB3_exports = {};
30
- __export(chunk_TZJROXB3_exports, {
29
+ var chunk_WSZXPLJQ_exports = {};
30
+ __export(chunk_WSZXPLJQ_exports, {
31
31
  createDebugErrorType: () => createDebugErrorType,
32
32
  createSchemaValidationError: () => createSchemaValidationError,
33
33
  parseQueryEngineError: () => parseQueryEngineError,
34
34
  unlinkTempDatamodelPath: () => unlinkTempDatamodelPath
35
35
  });
36
- module.exports = __toCommonJS(chunk_TZJROXB3_exports);
37
- var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
36
+ module.exports = __toCommonJS(chunk_WSZXPLJQ_exports);
38
37
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
38
+ var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
39
39
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
40
40
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
41
41
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");