@prisma/internals 6.6.0-dev.8 → 6.6.0-dev.80

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 (240) hide show
  1. package/dist/Generator.d.ts +23 -5
  2. package/dist/Generator.js +5 -3
  3. package/dist/WasmPanicRegistry.js +3 -3
  4. package/dist/{chunk-VPICIMIC.js → chunk-2GJT77IG.js} +9 -9
  5. package/dist/{chunk-PIPE5DSU.js → chunk-2H6XXXKO.js} +18 -21
  6. package/dist/chunk-2QTAK7KO.js +101 -0
  7. package/dist/{chunk-XLGODPZH.js → chunk-3DQANJMY.js} +12 -12
  8. package/dist/{chunk-WWAWV7DQ.js → chunk-4VNS5WPM.js} +3 -33
  9. package/dist/{chunk-KQOJB3ZW.js → chunk-5AI4FIZ3.js} +10 -10
  10. package/dist/{chunk-7MD6344A.js → chunk-5DBOS77Y.js} +3 -5
  11. package/dist/chunk-5UGQREP4.js +900 -0
  12. package/dist/{chunk-TZCE3PWZ.js → chunk-5VQNKCKW.js} +7 -7
  13. package/dist/{chunk-YXD4CJDK.js → chunk-67I7CEQJ.js} +30 -31
  14. package/dist/{chunk-I7IEEULS.js → chunk-6TTRTZXU.js} +5 -5
  15. package/dist/{chunk-5RV3EMX6.js → chunk-75BIJ5PX.js} +57 -57
  16. package/dist/{chunk-UCHV3Z5R.js → chunk-7NYW3PWT.js} +11 -10
  17. package/dist/{chunk-BGFWFIPR.js → chunk-AZV6HVKA.js} +5 -5
  18. package/dist/{chunk-5NV5K6XV.js → chunk-BC34NF2J.js} +30 -34
  19. package/dist/{chunk-JM6GGURA.js → chunk-BEXIOTQB.js} +11 -15
  20. package/dist/{chunk-ZYW3HGSH.js → chunk-BPDMLM32.js} +49 -17
  21. package/dist/{chunk-5MCWLJSR.js → chunk-CR3XKUEA.js} +10 -10
  22. package/dist/{chunk-TSJICM5S.js → chunk-CRVLHWC5.js} +5 -5
  23. package/dist/{chunk-WUCN2R47.js → chunk-CXHJXPSQ.js} +30 -34
  24. package/dist/{chunk-SHJNE6T7.js → chunk-D4VDA2TZ.js} +7 -7
  25. package/dist/{chunk-Q22BLLK3.js → chunk-D4VZUY3O.js} +6 -6
  26. package/dist/{chunk-KTBNIQ7N.js → chunk-DKSUHQGA.js} +8 -8
  27. package/dist/{chunk-EUTJYQDW.js → chunk-DODIJPCS.js} +13 -25
  28. package/dist/{chunk-UNUCCAXA.js → chunk-DTPFRZWV.js} +5 -5
  29. package/dist/{chunk-MVFJNP56.js → chunk-ECGN6YCE.js} +5 -5
  30. package/dist/{chunk-NJQWZ447.js → chunk-EPXBOIA5.js} +6 -6
  31. package/dist/{chunk-7XNZDY2V.js → chunk-ETYWYJBX.js} +60 -60
  32. package/dist/{chunk-5SN5JBT2.js → chunk-FXMGS3L5.js} +21 -40
  33. package/dist/{chunk-L6GBFCXG.js → chunk-HAGJ64PM.js} +142 -155
  34. package/dist/{chunk-3ERIN7PH.js → chunk-HG3YOAAE.js} +10 -10
  35. package/dist/{chunk-JQPAMLKP.js → chunk-HI7ARG5F.js} +11 -15
  36. package/dist/{chunk-GXDYIY4M.js → chunk-IDINCQMN.js} +56 -57
  37. package/dist/{chunk-X3G7MBLY.js → chunk-JDD3IDSP.js} +12 -11
  38. package/dist/{chunk-53LS3WUO.js → chunk-JOIIWB3U.js} +116 -116
  39. package/dist/{chunk-CZL7DCL2.js → chunk-JYMY3OAI.js} +6 -6
  40. package/dist/{chunk-TATYN3T2.js → chunk-KB5DKCI4.js} +29 -29
  41. package/dist/{chunk-LKTTJWFT.js → chunk-KDP6C3CB.js} +5 -5
  42. package/dist/{chunk-ATFQZVBS.js → chunk-LMVSIVKQ.js} +9 -14
  43. package/dist/{chunk-ZKAW5JSN.js → chunk-LRJ4X43J.js} +5 -5
  44. package/dist/{chunk-ONHKZPSV.js → chunk-LRU47BGE.js} +6 -6
  45. package/dist/{chunk-JAEPGZRE.js → chunk-M2QAZV2Z.js} +46 -79
  46. package/dist/{chunk-C2WD2XUT.js → chunk-MJIP3FY5.js} +968 -1220
  47. package/dist/{chunk-4E7A3GDU.js → chunk-MM4ARWWY.js} +5 -5
  48. package/dist/{chunk-V2ZF7ETH.js → chunk-NVNI2SRU.js} +66 -68
  49. package/dist/{chunk-YEF2M3FP.js → chunk-O77NRE3W.js} +5 -5
  50. package/dist/{chunk-JHQHVXIR.js → chunk-OSHZ4P3G.js} +6 -7
  51. package/dist/{chunk-IPKE37QC.js → chunk-PFYALFCY.js} +6 -5
  52. package/dist/{chunk-ZWOYFHSK.js → chunk-QD673IZB.js} +5 -5
  53. package/dist/{chunk-FCYHZHVW.js → chunk-R3J2O23S.js} +4 -4
  54. package/dist/{chunk-PFLLVWZX.js → chunk-R6QH57HZ.js} +5 -5
  55. package/dist/{chunk-25KZYQQJ.js → chunk-RCBHUFH6.js} +22 -26
  56. package/dist/chunk-RE7QRBEC.js +900 -0
  57. package/dist/{chunk-NNL52KLF.js → chunk-RKIDRPS5.js} +23 -27
  58. package/dist/{chunk-63J6Y3F6.js → chunk-SZHOH2HW.js} +22 -26
  59. package/dist/{chunk-ICXPZGKG.js → chunk-TMB3FAZO.js} +46 -79
  60. package/dist/{chunk-Y3OWT3K2.js → chunk-TQFONRJP.js} +7 -7
  61. package/dist/{chunk-3BND5XB4.js → chunk-UTJGRVMG.js} +11 -11
  62. package/dist/{chunk-CHMJ5V7I.js → chunk-UZTXEBTM.js} +7 -7
  63. package/dist/{chunk-RAZRBWTZ.js → chunk-W4YDEAHM.js} +23 -27
  64. package/dist/{chunk-6TXVGFQA.js → chunk-WSZXPLJQ.js} +11 -11
  65. package/dist/{chunk-BPZFDGKN.js → chunk-WXRVYSYN.js} +4 -7
  66. package/dist/{chunk-OB3JSSO6.js → chunk-X5FON43L.js} +5 -5
  67. package/dist/{chunk-5CJA6QCN.js → chunk-X6ECL5J5.js} +9 -9
  68. package/dist/{chunk-2MWIMEFK.js → chunk-XLTQGAI2.js} +6 -6
  69. package/dist/chunk-YR5KNFKN.js +1834 -0
  70. package/dist/{chunk-AZNLB67U.js → chunk-ZJWZK45Z.js} +5 -5
  71. package/dist/chunk-ZSINRHD4.js +43 -0
  72. package/dist/cli/Help.js +1 -1
  73. package/dist/cli/checkUnsupportedDataProxy.d.ts +12 -17
  74. package/dist/cli/checkUnsupportedDataProxy.js +75 -78
  75. package/dist/cli/directoryConfig.d.ts +7 -0
  76. package/dist/cli/directoryConfig.js +25 -0
  77. package/dist/cli/getGeneratorSuccessMessage.js +1 -1
  78. package/dist/cli/getSchema.d.ts +3 -28
  79. package/dist/cli/getSchema.js +78 -82
  80. package/dist/cli/getTypescriptVersion.js +1 -1
  81. package/dist/cli/hashes.d.ts +1 -2
  82. package/dist/cli/hashes.js +75 -78
  83. package/dist/cli/schemaContext.d.ts +59 -0
  84. package/dist/cli/schemaContext.js +133 -0
  85. package/dist/cli/utils.js +5 -5
  86. package/dist/client/getClientEngineType.d.ts +1 -1
  87. package/dist/client/getClientEngineType.js +1 -1
  88. package/dist/convertCredentials.d.ts +1 -1
  89. package/dist/convertCredentials.js +1 -1
  90. package/dist/dotenvExpand.js +1 -1
  91. package/dist/engine-commands/errorHelpers.js +5 -5
  92. package/dist/engine-commands/formatSchema.js +74 -77
  93. package/dist/engine-commands/getConfig.d.ts +1 -5
  94. package/dist/engine-commands/getConfig.js +16 -17
  95. package/dist/engine-commands/getDmmf.d.ts +3 -6
  96. package/dist/engine-commands/getDmmf.js +13 -14
  97. package/dist/engine-commands/getEngineVersion.js +12 -12
  98. package/dist/engine-commands/getEnginesMetaInfo.js +15 -15
  99. package/dist/engine-commands/index.js +85 -88
  100. package/dist/engine-commands/lintSchema.d.ts +1 -1
  101. package/dist/engine-commands/lintSchema.js +11 -12
  102. package/dist/engine-commands/mergeSchemas.js +13 -14
  103. package/dist/engine-commands/queryEngineCommons.js +8 -8
  104. package/dist/engine-commands/relativizePathInPSLError.js +1 -1
  105. package/dist/engine-commands/validate.js +13 -14
  106. package/dist/errorReporting.d.ts +0 -1
  107. package/dist/errorReporting.js +7 -7
  108. package/dist/get-generators/getGenerators.d.ts +22 -9
  109. package/dist/get-generators/getGenerators.js +77 -80
  110. package/dist/get-generators/utils/binaryTypeToEngineType.d.ts +1 -1
  111. package/dist/get-generators/utils/binaryTypeToEngineType.js +1 -1
  112. package/dist/get-generators/utils/engineTypeToBinaryType.d.ts +1 -1
  113. package/dist/get-generators/utils/engineTypeToBinaryType.js +1 -1
  114. package/dist/get-generators/utils/fixBinaryTargets.d.ts +1 -1
  115. package/dist/get-generators/utils/fixBinaryTargets.js +1 -1
  116. package/dist/get-generators/utils/getBinaryPathsByVersion.d.ts +1 -1
  117. package/dist/get-generators/utils/getBinaryPathsByVersion.js +4 -4
  118. package/dist/get-generators/utils/getEngineVersionForGenerator.d.ts +1 -1
  119. package/dist/get-generators/utils/getEngineVersionForGenerator.js +1 -1
  120. package/dist/get-generators/utils/printGeneratorConfig.d.ts +1 -1
  121. package/dist/get-generators/utils/printGeneratorConfig.js +7 -7
  122. package/dist/getPackedPackage.js +9 -9
  123. package/dist/highlight/highlight.js +1 -1
  124. package/dist/highlight/languages/dml.js +1 -1
  125. package/dist/highlight/languages/sql.js +1 -1
  126. package/dist/highlight/prism.js +1 -1
  127. package/dist/highlight/theme.js +1 -1
  128. package/dist/index.d.ts +7 -7
  129. package/dist/index.js +141 -145
  130. package/dist/logger.js +9 -9
  131. package/dist/migrateTypes.d.ts +63 -0
  132. package/dist/{multipart-parser-32AROPTR.js → multipart-parser-3AFJFP6K.js} +7 -7
  133. package/dist/panic.d.ts +1 -4
  134. package/dist/panic.js +7 -7
  135. package/dist/resolveBinary.js +10 -10
  136. package/dist/resolveOutput.js +1 -1
  137. package/dist/resolvePkg.d.ts +7 -0
  138. package/dist/{get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.js → resolvePkg.js} +6 -6
  139. package/dist/schemaEngineCommands.js +13 -13
  140. package/dist/sendPanic.js +7 -111
  141. package/dist/types.d.ts +1 -1
  142. package/dist/utils/__tests__/isCi.test.js +1 -1
  143. package/dist/utils/__tests__/isInteractive.test.js +1 -1
  144. package/dist/utils/__tests__/maskSchema.test.js +1 -1
  145. package/dist/utils/assertAlways.js +1 -1
  146. package/dist/utils/assertNever.js +1 -1
  147. package/dist/utils/binaryTargetRegex.js +3 -3
  148. package/dist/utils/byline.js +1 -1
  149. package/dist/utils/callOnce.js +1 -1
  150. package/dist/utils/callOnce.test.js +1 -1
  151. package/dist/utils/canPrompt.js +4 -4
  152. package/dist/utils/chmodPlusX.js +1 -1
  153. package/dist/utils/cloudflareD1.js +4 -4
  154. package/dist/utils/drawBox.js +1 -1
  155. package/dist/utils/extractPreviewFeatures.d.ts +2 -2
  156. package/dist/utils/extractPreviewFeatures.js +3 -3
  157. package/dist/utils/formatTable.js +1 -1
  158. package/dist/utils/formatms.js +1 -1
  159. package/dist/utils/fs-functional.js +12 -12
  160. package/dist/utils/fs-utils.js +9 -9
  161. package/dist/utils/getCommandWithExecutor.js +4 -4
  162. package/dist/utils/getEnvPaths.d.ts +1 -1
  163. package/dist/utils/getEnvPaths.js +74 -77
  164. package/dist/utils/getGitHubIssueUrl.js +5 -4
  165. package/dist/utils/getMigrateConfigDir.js +1 -1
  166. package/dist/utils/getVersionFromPackageJson.js +4 -4
  167. package/dist/utils/handleEngineLoadingErrors.js +1 -1
  168. package/dist/utils/handlePanic.js +13 -110
  169. package/dist/utils/hasOwnProperty.js +1 -1
  170. package/dist/utils/isCi.js +1 -1
  171. package/dist/utils/isCurrentBinInstalledGlobally.js +3 -3
  172. package/dist/utils/isInContainer.js +1 -1
  173. package/dist/utils/isInNpmLifecycleHook.js +1 -1
  174. package/dist/utils/isInteractive.js +1 -1
  175. package/dist/utils/isPromiseLike.js +1 -1
  176. package/dist/utils/isValidJsIdentifier.js +4 -4
  177. package/dist/utils/keyBy.js +1 -1
  178. package/dist/utils/link.js +3 -3
  179. package/dist/utils/load.js +3 -3
  180. package/dist/utils/loadEnvFile.js +74 -77
  181. package/dist/utils/mapKeys.js +1 -1
  182. package/dist/utils/mapObjectValues.js +1 -1
  183. package/dist/utils/maskSchema.js +1 -1
  184. package/dist/utils/max.js +1 -1
  185. package/dist/utils/max.test.js +1 -1
  186. package/dist/utils/maybeInGitHook.js +1 -1
  187. package/dist/utils/missingDatasource.js +4 -4
  188. package/dist/utils/missingGeneratorMessage.js +6 -6
  189. package/dist/utils/now.js +1 -1
  190. package/dist/utils/omit.js +1 -1
  191. package/dist/utils/parseAWSNodejsRuntimeEnvVarVersion.js +1 -1
  192. package/dist/utils/parseEnvValue.d.ts +1 -1
  193. package/dist/utils/parseEnvValue.js +1 -1
  194. package/dist/utils/path.js +1 -1
  195. package/dist/utils/path.test.js +1 -1
  196. package/dist/utils/pick.js +1 -1
  197. package/dist/utils/printConfigWarnings.js +1 -1
  198. package/dist/utils/prismaPostgres.js +1 -1
  199. package/dist/utils/prismaPostgres.test.js +1 -1
  200. package/dist/utils/schemaFileInput.d.ts +0 -4
  201. package/dist/utils/schemaFileInput.js +3 -7
  202. package/dist/utils/serializeQueryEngineName.js +1 -1
  203. package/dist/utils/setClassName.js +1 -1
  204. package/dist/utils/toSchemasContainer.d.ts +2 -3
  205. package/dist/utils/toSchemasContainer.js +4 -5
  206. package/dist/utils/tryLoadEnvs.js +6 -6
  207. package/dist/utils/unique.js +1 -1
  208. package/dist/utils/vercelPkgPathRegex.js +1 -1
  209. package/dist/warnOnce.js +4 -4
  210. package/dist/wasm.js +6 -6
  211. package/package.json +14 -13
  212. package/dist/chunk-77IC3DNO.js +0 -35
  213. package/dist/chunk-AOQIUJT4.js +0 -41
  214. package/dist/chunk-MGZOEY6N.js +0 -28
  215. package/dist/chunk-MUDGDTP6.js +0 -15631
  216. package/dist/chunk-S57RMXZW.js +0 -28
  217. package/dist/chunk-SH3FWTQI.js +0 -15631
  218. package/dist/chunk-VRT7T6MF.js +0 -4959
  219. package/dist/chunk-YRBRUREX.js +0 -57
  220. package/dist/get-generators/generatorResolvers/generatorResolvers.d.ts +0 -15
  221. package/dist/get-generators/generatorResolvers/generatorResolvers.js +0 -135
  222. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.d.ts +0 -6
  223. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.js +0 -26
  224. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.d.ts +0 -9
  225. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +0 -26
  226. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.d.ts +0 -8
  227. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +0 -29
  228. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.d.ts +0 -6
  229. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +0 -135
  230. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.d.ts +0 -1
  231. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +0 -26
  232. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.d.ts +0 -20
  233. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.js +0 -26
  234. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.d.ts +0 -7
  235. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.d.ts +0 -1
  236. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.js +0 -17
  237. package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.d.ts +0 -20
  238. package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +0 -136
  239. package/dist/get-generators/utils/check-feature-flags/checkFeatureFlags.d.ts +0 -8
  240. package/dist/get-generators/utils/check-feature-flags/checkFeatureFlags.js +0 -25
@@ -16,14 +16,14 @@ 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_CZL7DCL2_exports = {};
20
- __export(chunk_CZL7DCL2_exports, {
19
+ var chunk_JYMY3OAI_exports = {};
20
+ __export(chunk_JYMY3OAI_exports, {
21
21
  isValidJsIdentifier: () => isValidJsIdentifier
22
22
  });
23
- module.exports = __toCommonJS(chunk_CZL7DCL2_exports);
24
- var import_chunk_CHMJ5V7I = require("./chunk-CHMJ5V7I.js");
25
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
26
- var import_helper_validator_identifier = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_CHMJ5V7I.require_lib)());
23
+ module.exports = __toCommonJS(chunk_JYMY3OAI_exports);
24
+ var import_chunk_UZTXEBTM = require("./chunk-UZTXEBTM.js");
25
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
26
+ var import_helper_validator_identifier = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_UZTXEBTM.require_lib)());
27
27
  function isValidJsIdentifier(str) {
28
28
  return (0, import_helper_validator_identifier.isIdentifierName)(str);
29
29
  }
@@ -26,33 +26,33 @@ 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_TATYN3T2_exports = {};
30
- __export(chunk_TATYN3T2_exports, {
29
+ var chunk_KB5DKCI4_exports = {};
30
+ __export(chunk_KB5DKCI4_exports, {
31
31
  getEnginesInfo: () => getEnginesInfo,
32
32
  getEnginesMetaInfo: () => getEnginesMetaInfo,
33
33
  resolveEngine: () => resolveEngine
34
34
  });
35
- module.exports = __toCommonJS(chunk_TATYN3T2_exports);
36
- var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
37
- var import_chunk_XLGODPZH = require("./chunk-XLGODPZH.js");
35
+ module.exports = __toCommonJS(chunk_KB5DKCI4_exports);
36
+ var import_chunk_3DQANJMY = require("./chunk-3DQANJMY.js");
37
+ var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
38
+ var import_chunk_HG3YOAAE = require("./chunk-HG3YOAAE.js");
39
+ var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
38
40
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
39
- var import_chunk_3ERIN7PH = require("./chunk-3ERIN7PH.js");
40
- var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
41
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
41
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
42
42
  var import_engines = require("@prisma/engines");
43
43
  var import_fetch_engine = require("@prisma/fetch-engine");
44
44
  var import_path = __toESM(require("path"));
45
- var import_function2 = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVWZX.require_function)());
46
- var none2 = import_chunk_7MD6344A.none;
47
- var some2 = import_chunk_7MD6344A.some;
45
+ var import_function2 = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57HZ.require_function)());
46
+ var none2 = import_chunk_5DBOS77Y.none;
47
+ var some2 = import_chunk_5DBOS77Y.some;
48
48
  var getRight = function(ma) {
49
49
  return ma._tag === "Left" ? none2 : some2(ma.right);
50
50
  };
51
51
  var _map = function(fa, f) {
52
- return (0, import_chunk_7MD6344A.pipe)(fa, map(f));
52
+ return (0, import_chunk_5DBOS77Y.pipe)(fa, map(f));
53
53
  };
54
54
  var _ap = function(fab, fa) {
55
- return (0, import_chunk_7MD6344A.pipe)(fab, ap(fa));
55
+ return (0, import_chunk_5DBOS77Y.pipe)(fab, ap(fa));
56
56
  };
57
57
  var URI = "Option";
58
58
  var map = function(f) {
@@ -64,14 +64,14 @@ var Functor = {
64
64
  URI,
65
65
  map: _map
66
66
  };
67
- var as2 = (0, import_chunk_7MD6344A.dual)(2, (0, import_chunk_7MD6344A.as)(Functor));
68
- var asUnit2 = (0, import_chunk_7MD6344A.asUnit)(Functor);
67
+ var as2 = (0, import_chunk_5DBOS77Y.dual)(2, (0, import_chunk_5DBOS77Y.as)(Functor));
68
+ var asUnit2 = (0, import_chunk_5DBOS77Y.asUnit)(Functor);
69
69
  var ap = function(fa) {
70
70
  return function(fab) {
71
71
  return isNone(fab) ? none2 : isNone(fa) ? none2 : some2(fab.value(fa.value));
72
72
  };
73
73
  };
74
- var flatMap = /* @__PURE__ */ (0, import_chunk_7MD6344A.dual)(2, function(ma, f) {
74
+ var flatMap = /* @__PURE__ */ (0, import_chunk_5DBOS77Y.dual)(2, function(ma, f) {
75
75
  return isNone(ma) ? none2 : f(ma.value);
76
76
  });
77
77
  var Chain = {
@@ -80,7 +80,7 @@ var Chain = {
80
80
  ap: _ap,
81
81
  chain: flatMap
82
82
  };
83
- var orElse = (0, import_chunk_7MD6344A.dual)(2, function(self, that) {
83
+ var orElse = (0, import_chunk_5DBOS77Y.dual)(2, function(self, that) {
84
84
  return isNone(self) ? that() : self;
85
85
  });
86
86
  var fromEither2 = getRight;
@@ -88,7 +88,7 @@ var FromEither = {
88
88
  URI,
89
89
  fromEither: fromEither2
90
90
  };
91
- var isSome2 = import_chunk_7MD6344A.isSome;
91
+ var isSome2 = import_chunk_5DBOS77Y.isSome;
92
92
  var isNone = function(fa) {
93
93
  return fa._tag === "None";
94
94
  };
@@ -99,8 +99,8 @@ var matchW = function(onNone, onSome) {
99
99
  };
100
100
  var match = matchW;
101
101
  var fold = match;
102
- var tap2 = /* @__PURE__ */ (0, import_chunk_7MD6344A.dual)(2, (0, import_chunk_7MD6344A.tap)(Chain));
103
- var tapEither2 = /* @__PURE__ */ (0, import_chunk_7MD6344A.dual)(2, (0, import_chunk_7MD6344A.tapEither)(FromEither, Chain));
102
+ var tap2 = /* @__PURE__ */ (0, import_chunk_5DBOS77Y.dual)(2, (0, import_chunk_5DBOS77Y.tap)(Chain));
103
+ var tapEither2 = /* @__PURE__ */ (0, import_chunk_5DBOS77Y.dual)(2, (0, import_chunk_5DBOS77Y.tapEither)(FromEither, Chain));
104
104
  var fromNullable = function(a) {
105
105
  return a == null ? none2 : some2(a);
106
106
  };
@@ -133,15 +133,15 @@ function getEnginesInfo(enginesInfo) {
133
133
  const resolved = (0, import_chunk_XKZ6CBLA.z)(enginesInfo).with({ fromEnvVar: import_chunk_XKZ6CBLA.N.when(isSome2) }, (_engineInfo) => {
134
134
  return `, resolved by ${_engineInfo.fromEnvVar.value}`;
135
135
  }).otherwise(() => "");
136
- const absolutePath = (0, import_chunk_XKZ6CBLA.z)(enginesInfo).with({ path: import_chunk_XKZ6CBLA.N.when(import_chunk_7MD6344A.isRight) }, (_engineInfo) => {
136
+ const absolutePath = (0, import_chunk_XKZ6CBLA.z)(enginesInfo).with({ path: import_chunk_XKZ6CBLA.N.when(import_chunk_5DBOS77Y.isRight) }, (_engineInfo) => {
137
137
  return _engineInfo.path.right;
138
- }).with({ path: import_chunk_XKZ6CBLA.N.when(import_chunk_7MD6344A.isLeft) }, (_engineInfo) => {
138
+ }).with({ path: import_chunk_XKZ6CBLA.N.when(import_chunk_5DBOS77Y.isLeft) }, (_engineInfo) => {
139
139
  errors.push(_engineInfo.path.left);
140
140
  return "E_CANNOT_RESOLVE_PATH";
141
141
  }).exhaustive();
142
- const version = (0, import_chunk_XKZ6CBLA.z)(enginesInfo).with({ version: import_chunk_XKZ6CBLA.N.when(import_chunk_7MD6344A.isRight) }, (_engineInfo) => {
142
+ const version = (0, import_chunk_XKZ6CBLA.z)(enginesInfo).with({ version: import_chunk_XKZ6CBLA.N.when(import_chunk_5DBOS77Y.isRight) }, (_engineInfo) => {
143
143
  return _engineInfo.version.right;
144
- }).with({ version: import_chunk_XKZ6CBLA.N.when(import_chunk_7MD6344A.isLeft) }, (_engineInfo) => {
144
+ }).with({ version: import_chunk_XKZ6CBLA.N.when(import_chunk_5DBOS77Y.isLeft) }, (_engineInfo) => {
145
145
  errors.push(_engineInfo.version.left);
146
146
  return "E_CANNOT_RESOLVE_VERSION";
147
147
  }).exhaustive();
@@ -157,15 +157,15 @@ async function resolveEngine(binaryName) {
157
157
  const enginePathEither = await (0, import_function2.pipe)(
158
158
  pathFromEnvOption,
159
159
  fold(
160
- () => (0, import_chunk_3ERIN7PH.safeResolveBinary)(binaryName),
161
- (pathFromEnv) => (0, import_chunk_7MD6344A.right2)(pathFromEnv.path)
160
+ () => (0, import_chunk_HG3YOAAE.safeResolveBinary)(binaryName),
161
+ (pathFromEnv) => (0, import_chunk_5DBOS77Y.right2)(pathFromEnv.path)
162
162
  )
163
163
  )();
164
164
  const versionEither = await (0, import_function2.pipe)(
165
165
  enginePathEither,
166
- import_chunk_7MD6344A.fromEither,
167
- (0, import_chunk_7MD6344A.chain)((enginePath) => {
168
- return (0, import_chunk_XLGODPZH.safeGetEngineVersion)(enginePath, binaryName);
166
+ import_chunk_5DBOS77Y.fromEither,
167
+ (0, import_chunk_5DBOS77Y.chain)((enginePath) => {
168
+ return (0, import_chunk_3DQANJMY.safeGetEngineVersion)(enginePath, binaryName);
169
169
  })
170
170
  )();
171
171
  const engineInfo = {
@@ -16,13 +16,13 @@ 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_LKTTJWFT_exports = {};
20
- __export(chunk_LKTTJWFT_exports, {
19
+ var chunk_KDP6C3CB_exports = {};
20
+ __export(chunk_KDP6C3CB_exports, {
21
21
  require_indent_string: () => require_indent_string
22
22
  });
23
- module.exports = __toCommonJS(chunk_LKTTJWFT_exports);
24
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
25
- var require_indent_string = (0, import_chunk_WWAWV7DQ.__commonJS)({
23
+ module.exports = __toCommonJS(chunk_KDP6C3CB_exports);
24
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
25
+ var require_indent_string = (0, import_chunk_4VNS5WPM.__commonJS)({
26
26
  "../../node_modules/.pnpm/indent-string@4.0.0/node_modules/indent-string/index.js"(exports, module2) {
27
27
  "use strict";
28
28
  module2.exports = (string, count = 1, options) => {
@@ -16,32 +16,27 @@ 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_ATFQZVBS_exports = {};
20
- __export(chunk_ATFQZVBS_exports, {
19
+ var chunk_LMVSIVKQ_exports = {};
20
+ __export(chunk_LMVSIVKQ_exports, {
21
21
  ErrorArea: () => ErrorArea,
22
22
  RustPanic: () => RustPanic,
23
23
  getWasmError: () => getWasmError,
24
24
  isRustPanic: () => isRustPanic,
25
25
  isWasmPanic: () => isWasmPanic
26
26
  });
27
- module.exports = __toCommonJS(chunk_ATFQZVBS_exports);
28
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
27
+ module.exports = __toCommonJS(chunk_LMVSIVKQ_exports);
29
28
  var RustPanic = class extends Error {
30
- constructor(message, rustStack, request, area, schemaPath, schema, introspectionUrl) {
29
+ __typename = "RustPanic";
30
+ request;
31
+ rustStack;
32
+ area;
33
+ introspectionUrl;
34
+ constructor(message, rustStack, request, area, introspectionUrl) {
31
35
  super(message);
32
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "__typename", "RustPanic");
33
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "request");
34
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "rustStack");
35
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "area");
36
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "schemaPath");
37
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "schema");
38
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "introspectionUrl");
39
36
  this.name = "RustPanic";
40
37
  this.rustStack = rustStack;
41
38
  this.request = request;
42
39
  this.area = area;
43
- this.schemaPath = schemaPath;
44
- this.schema = schema;
45
40
  this.introspectionUrl = introspectionUrl;
46
41
  }
47
42
  };
@@ -16,14 +16,14 @@ 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_ZKAW5JSN_exports = {};
20
- __export(chunk_ZKAW5JSN_exports, {
19
+ var chunk_LRJ4X43J_exports = {};
20
+ __export(chunk_LRJ4X43J_exports, {
21
21
  getCommandWithExecutor: () => getCommandWithExecutor
22
22
  });
23
- module.exports = __toCommonJS(chunk_ZKAW5JSN_exports);
24
- var import_chunk_5MCWLJSR = require("./chunk-5MCWLJSR.js");
23
+ module.exports = __toCommonJS(chunk_LRJ4X43J_exports);
24
+ var import_chunk_CR3XKUEA = require("./chunk-CR3XKUEA.js");
25
25
  function getCommandWithExecutor(command) {
26
- if ((0, import_chunk_5MCWLJSR.isCurrentBinInstalledGlobally)()) {
26
+ if ((0, import_chunk_CR3XKUEA.isCurrentBinInstalledGlobally)()) {
27
27
  return command;
28
28
  } else {
29
29
  const npxUsed = __dirname.includes("_npx");
@@ -16,17 +16,17 @@ 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_ONHKZPSV_exports = {};
20
- __export(chunk_ONHKZPSV_exports, {
19
+ var chunk_LRU47BGE_exports = {};
20
+ __export(chunk_LRU47BGE_exports, {
21
21
  GeneratorConfigClass: () => GeneratorConfigClass,
22
22
  getOriginalBinaryTargetsValue: () => getOriginalBinaryTargetsValue,
23
23
  printDatamodelObject: () => printDatamodelObject,
24
24
  printGeneratorConfig: () => printGeneratorConfig
25
25
  });
26
- module.exports = __toCommonJS(chunk_ONHKZPSV_exports);
27
- var import_chunk_LKTTJWFT = require("./chunk-LKTTJWFT.js");
28
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
29
- var import_indent_string = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_LKTTJWFT.require_indent_string)());
26
+ module.exports = __toCommonJS(chunk_LRU47BGE_exports);
27
+ var import_chunk_KDP6C3CB = require("./chunk-KDP6C3CB.js");
28
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
29
+ var import_indent_string = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_KDP6C3CB.require_indent_string)());
30
30
  function printGeneratorConfig(config) {
31
31
  return String(new GeneratorConfigClass(config));
32
32
  }
@@ -26,25 +26,23 @@ 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_JAEPGZRE_exports = {};
30
- __export(chunk_JAEPGZRE_exports, {
29
+ var chunk_M2QAZV2Z_exports = {};
30
+ __export(chunk_M2QAZV2Z_exports, {
31
31
  GetDmmfError: () => GetDmmfError,
32
32
  getDMMF: () => getDMMF
33
33
  });
34
- module.exports = __toCommonJS(chunk_JAEPGZRE_exports);
35
- var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
36
- var import_chunk_6TXVGFQA = require("./chunk-6TXVGFQA.js");
37
- var import_chunk_ZWOYFHSK = require("./chunk-ZWOYFHSK.js");
38
- var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
34
+ module.exports = __toCommonJS(chunk_M2QAZV2Z_exports);
35
+ var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
36
+ var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
37
+ var import_chunk_QD673IZB = require("./chunk-QD673IZB.js");
38
+ var import_chunk_2GJT77IG = require("./chunk-2GJT77IG.js");
39
+ var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
39
40
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
40
- var import_chunk_5CJA6QCN = require("./chunk-5CJA6QCN.js");
41
- var import_chunk_ATFQZVBS = require("./chunk-ATFQZVBS.js");
42
- var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
41
+ var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
43
42
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
44
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
43
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
45
44
  var import_debug = __toESM(require("@prisma/debug"));
46
- var import_fs = __toESM(require("fs"));
47
- var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVWZX.require_function)());
45
+ var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57HZ.require_function)());
48
46
  var debug = (0, import_debug.default)("prisma:getDMMF");
49
47
  var GetDmmfError = class extends Error {
50
48
  constructor(params) {
@@ -60,104 +58,73 @@ ${detailsHeader} ${message}`;
60
58
  }).exhaustive();
61
59
  const errorMessageWithContext = `${constructedErrorMessage}
62
60
  [Context: getDmmf]`;
63
- super((0, import_chunk_ZWOYFHSK.addVersionDetailsToErrorMessage)(errorMessageWithContext));
61
+ super((0, import_chunk_QD673IZB.addVersionDetailsToErrorMessage)(errorMessageWithContext));
64
62
  this.name = "GetDmmfError";
65
63
  }
66
64
  };
67
65
  async function getDMMF(options) {
68
- const debugErrorType = (0, import_chunk_6TXVGFQA.createDebugErrorType)(debug, "getDmmfWasm");
66
+ const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getDmmfWasm");
69
67
  debug(`Using getDmmf Wasm`);
70
68
  const dmmfPipeline = (0, import_function.pipe)(
71
- (0, import_chunk_7MD6344A.tryCatch2)(
69
+ (0, import_chunk_5DBOS77Y.tryCatch)(
72
70
  () => {
73
- if (options.datamodel) {
74
- debug("Using given datamodel");
75
- return Promise.resolve(options.datamodel);
71
+ if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
72
+ debug("Triggering a Rust panic...");
73
+ import_chunk_2GJT77IG.prismaSchemaWasm.debug_panic();
76
74
  }
77
- debug(`Reading datamodel from the given datamodel path ${options.datamodelPath}`);
78
- return import_fs.default.promises.readFile(options.datamodelPath, { encoding: "utf-8" });
75
+ const params = JSON.stringify({
76
+ prismaSchema: options.datamodel,
77
+ noColor: Boolean(process.env.NO_COLOR)
78
+ });
79
+ const data = import_chunk_2GJT77IG.prismaSchemaWasm.get_dmmf(params);
80
+ return data;
79
81
  },
80
82
  (e) => ({
81
- type: "read-datamodel-path",
82
- reason: "Error while trying to read the datamodel path",
83
- error: e,
84
- datamodelPath: options.datamodelPath
83
+ type: "wasm-error",
84
+ reason: "(get-dmmf wasm)",
85
+ error: e
85
86
  })
86
87
  ),
87
- (0, import_chunk_7MD6344A.chainW2)((datamodel) => {
88
- return (0, import_function.pipe)(
89
- (0, import_chunk_7MD6344A.tryCatch)(
90
- () => {
91
- if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
92
- debug("Triggering a Rust panic...");
93
- import_chunk_5CJA6QCN.prismaSchemaWasm.debug_panic();
94
- }
95
- const params = JSON.stringify({
96
- prismaSchema: datamodel,
97
- noColor: Boolean(process.env.NO_COLOR)
98
- });
99
- const data = import_chunk_5CJA6QCN.prismaSchemaWasm.get_dmmf(params);
100
- return data;
101
- },
88
+ (0, import_chunk_5DBOS77Y.map)((result) => ({ result })),
89
+ (0, import_chunk_5DBOS77Y.chainW)(
90
+ ({ result }) => (
91
+ // NOTE: this should never fail, as we expect returned values to be valid JSON-serializable strings
92
+ (0, import_chunk_5DBOS77Y.tryCatch)(
93
+ () => JSON.parse(result),
102
94
  (e) => ({
103
- type: "wasm-error",
104
- reason: "(get-dmmf wasm)",
95
+ type: "parse-json",
96
+ reason: "Unable to parse JSON",
105
97
  error: e
106
98
  })
107
- ),
108
- (0, import_chunk_7MD6344A.map)((result) => ({ result })),
109
- (0, import_chunk_7MD6344A.chainW)(
110
- ({ result }) => (
111
- // NOTE: this should never fail, as we expect returned values to be valid JSON-serializable strings
112
- (0, import_chunk_7MD6344A.tryCatch)(
113
- () => JSON.parse(result),
114
- (e) => ({
115
- type: "parse-json",
116
- reason: "Unable to parse JSON",
117
- error: e
118
- })
119
- )
120
- )
121
- ),
122
- import_chunk_7MD6344A.fromEither
123
- );
124
- })
99
+ )
100
+ )
101
+ ),
102
+ import_chunk_5DBOS77Y.fromEither
125
103
  );
126
104
  const dmmfEither = await dmmfPipeline();
127
- if ((0, import_chunk_7MD6344A.isRight)(dmmfEither)) {
105
+ if ((0, import_chunk_5DBOS77Y.isRight)(dmmfEither)) {
128
106
  debug("dmmf data retrieved without errors in getDmmf Wasm");
129
107
  const { right: data } = dmmfEither;
130
108
  return Promise.resolve(data);
131
109
  }
132
- const error = (0, import_chunk_XKZ6CBLA.z)(dmmfEither.left).with({ type: "read-datamodel-path" }, (e) => {
133
- debugErrorType(e);
134
- return new GetDmmfError({
135
- _tag: "unparsed",
136
- message: `${e.error.message}
137
- Datamodel path: "${e.datamodelPath}"`,
138
- reason: e.reason
139
- });
140
- }).with({ type: "wasm-error" }, (e) => {
110
+ const error = (0, import_chunk_XKZ6CBLA.z)(dmmfEither.left).with({ type: "wasm-error" }, (e) => {
141
111
  debugErrorType(e);
142
- if ((0, import_chunk_ATFQZVBS.isWasmPanic)(e.error)) {
143
- const { message, stack } = (0, import_chunk_ATFQZVBS.getWasmError)(e.error);
144
- const panic = new import_chunk_ATFQZVBS.RustPanic(
112
+ if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(e.error)) {
113
+ const { message, stack } = (0, import_chunk_LMVSIVKQ.getWasmError)(e.error);
114
+ const panic = new import_chunk_LMVSIVKQ.RustPanic(
145
115
  /* message */
146
116
  message,
147
117
  /* rustStack */
148
118
  stack,
149
119
  /* request */
150
120
  "@prisma/prisma-schema-wasm get_dmmf",
151
- "FMT_CLI",
152
- /* schemaPath */
153
- options.prismaPath,
154
- /* schema */
155
- (0, import_chunk_YRBRUREX.toMultipleSchemas)(options.datamodel)
121
+ "FMT_CLI"
122
+ /* FMT_CLI */
156
123
  );
157
124
  return panic;
158
125
  }
159
126
  const errorOutput = e.error.message;
160
- return new GetDmmfError((0, import_chunk_6TXVGFQA.parseQueryEngineError)({ errorOutput, reason: e.reason }));
127
+ return new GetDmmfError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
161
128
  }).with({ type: "parse-json" }, (e) => {
162
129
  debugErrorType(e);
163
130
  return new GetDmmfError({ _tag: "unparsed", message: e.error.message, reason: e.reason });