@prisma/internals 6.6.0-dev.10 → 6.6.0-dev.100

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 (244) 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/WasmSchemaEngineLoader.d.ts +5 -0
  5. package/dist/{get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.js → WasmSchemaEngineLoader.js} +6 -7
  6. package/dist/{chunk-PIPE5DSU.js → chunk-2H6XXXKO.js} +18 -21
  7. package/dist/{chunk-3BND5XB4.js → chunk-2IP7H3BQ.js} +12 -12
  8. package/dist/{chunk-XLGODPZH.js → chunk-3DQANJMY.js} +12 -12
  9. package/dist/chunk-4ODOO46C.js +900 -0
  10. package/dist/{chunk-TTF3A2E6.js → chunk-4VIAG7E6.js} +11 -15
  11. package/dist/{chunk-WWAWV7DQ.js → chunk-4VNS5WPM.js} +3 -33
  12. package/dist/{chunk-KQOJB3ZW.js → chunk-5AI4FIZ3.js} +10 -10
  13. package/dist/{chunk-7MD6344A.js → chunk-5DBOS77Y.js} +3 -5
  14. package/dist/{chunk-EH632RO7.js → chunk-5K2DX665.js} +23 -27
  15. package/dist/{chunk-M3ZQDZCP.js → chunk-5KSWTUQX.js} +22 -26
  16. package/dist/{chunk-TZCE3PWZ.js → chunk-5VQNKCKW.js} +7 -7
  17. package/dist/{chunk-YXD4CJDK.js → chunk-67I7CEQJ.js} +30 -31
  18. package/dist/{chunk-I7IEEULS.js → chunk-6TTRTZXU.js} +5 -5
  19. package/dist/{chunk-5RV3EMX6.js → chunk-75BIJ5PX.js} +57 -57
  20. package/dist/{chunk-BGFWFIPR.js → chunk-7QC5VORA.js} +5 -5
  21. package/dist/{chunk-BLJDM4FS.js → chunk-AAJH3SMZ.js} +30 -34
  22. package/dist/{chunk-2MWIMEFK.js → chunk-AX5N26KG.js} +6 -6
  23. package/dist/{chunk-ZYW3HGSH.js → chunk-BPDMLM32.js} +49 -17
  24. package/dist/{chunk-5MCWLJSR.js → chunk-CR3XKUEA.js} +10 -10
  25. package/dist/{chunk-TSJICM5S.js → chunk-CRVLHWC5.js} +5 -5
  26. package/dist/{chunk-SHJNE6T7.js → chunk-D4VDA2TZ.js} +7 -7
  27. package/dist/{chunk-Q22BLLK3.js → chunk-D4VZUY3O.js} +6 -6
  28. package/dist/{chunk-KTBNIQ7N.js → chunk-DKSUHQGA.js} +8 -8
  29. package/dist/{chunk-EUTJYQDW.js → chunk-DODIJPCS.js} +13 -25
  30. package/dist/{chunk-UNUCCAXA.js → chunk-DTPFRZWV.js} +5 -5
  31. package/dist/{chunk-NJQWZ447.js → chunk-EPXBOIA5.js} +6 -6
  32. package/dist/{chunk-7XNZDY2V.js → chunk-ETYWYJBX.js} +60 -60
  33. package/dist/{chunk-PFFK3QVZ.js → chunk-F4K3GWXT.js} +5 -5
  34. package/dist/{chunk-DGPFCLXV.js → chunk-FL376QJQ.js} +5 -5
  35. package/dist/{chunk-CWEKLPAE.js → chunk-FTGBGGMH.js} +30 -34
  36. package/dist/{chunk-5SN5JBT2.js → chunk-FXMGS3L5.js} +21 -40
  37. package/dist/{chunk-QGZFTUAB.js → chunk-FYGIYYHZ.js} +46 -79
  38. package/dist/{chunk-3OBBPBD4.js → chunk-HF43IL4T.js} +22 -26
  39. package/dist/{chunk-3ERIN7PH.js → chunk-HG3YOAAE.js} +10 -10
  40. package/dist/{chunk-BIJVFCQY.js → chunk-HGQ7QNTV.js} +14 -11
  41. package/dist/chunk-I6WLABB2.js +429 -0
  42. package/dist/{chunk-GXDYIY4M.js → chunk-IDINCQMN.js} +56 -57
  43. package/dist/{chunk-53LS3WUO.js → chunk-JOIIWB3U.js} +116 -116
  44. package/dist/{chunk-CZL7DCL2.js → chunk-JYMY3OAI.js} +6 -6
  45. package/dist/{chunk-TATYN3T2.js → chunk-KB5DKCI4.js} +29 -29
  46. package/dist/{chunk-LKTTJWFT.js → chunk-KDP6C3CB.js} +5 -5
  47. package/dist/{chunk-VHTXVUX5.js → chunk-KLLJM353.js} +13 -10
  48. package/dist/{chunk-ATFQZVBS.js → chunk-LMVSIVKQ.js} +9 -14
  49. package/dist/{chunk-ZKAW5JSN.js → chunk-LRJ4X43J.js} +5 -5
  50. package/dist/{chunk-ONHKZPSV.js → chunk-LRU47BGE.js} +6 -6
  51. package/dist/{chunk-C2WD2XUT.js → chunk-MJIP3FY5.js} +968 -1220
  52. package/dist/{chunk-4E7A3GDU.js → chunk-MM4ARWWY.js} +5 -5
  53. package/dist/{chunk-V2ZF7ETH.js → chunk-NVNI2SRU.js} +66 -68
  54. package/dist/{chunk-JHQHVXIR.js → chunk-OSHZ4P3G.js} +6 -7
  55. package/dist/{chunk-X47ETBHW.js → chunk-OV56OT3I.js} +46 -79
  56. package/dist/{chunk-IPKE37QC.js → chunk-PFYALFCY.js} +6 -5
  57. package/dist/{chunk-AD2VRX6B.js → chunk-PH3WSCPB.js} +13 -10
  58. package/dist/chunk-QH3YOKCT.js +900 -0
  59. package/dist/{chunk-FCYHZHVW.js → chunk-R3J2O23S.js} +4 -4
  60. package/dist/{chunk-SFT7SSYC.js → chunk-R6CFUYVZ.js} +23 -27
  61. package/dist/{chunk-PFLLVWZX.js → chunk-R6QH57HZ.js} +5 -5
  62. package/dist/{chunk-L3RL2PPV.js → chunk-RHXDDTTE.js} +5 -5
  63. package/dist/{chunk-ZTU7TICR.js → chunk-SJRVH6CG.js} +11 -15
  64. package/dist/{chunk-Y3OWT3K2.js → chunk-TQFONRJP.js} +7 -7
  65. package/dist/{chunk-6TXVGFQA.js → chunk-TZJROXB3.js} +11 -11
  66. package/dist/{chunk-65BXVEDI.js → chunk-UP32A7FC.js} +5 -5
  67. package/dist/{chunk-CHMJ5V7I.js → chunk-UZTXEBTM.js} +7 -7
  68. package/dist/chunk-WPX2HKUE.js +64 -0
  69. package/dist/{chunk-BPZFDGKN.js → chunk-WXRVYSYN.js} +4 -7
  70. package/dist/{chunk-RLSXWOUV.js → chunk-X4F27I5S.js} +13 -10
  71. package/dist/chunk-XR4RJTDM.js +101 -0
  72. package/dist/chunk-YR5KNFKN.js +1834 -0
  73. package/dist/{chunk-AZNLB67U.js → chunk-ZJWZK45Z.js} +5 -5
  74. package/dist/chunk-ZSINRHD4.js +43 -0
  75. package/dist/cli/Help.js +1 -1
  76. package/dist/cli/checkUnsupportedDataProxy.d.ts +12 -17
  77. package/dist/cli/checkUnsupportedDataProxy.js +78 -80
  78. package/dist/cli/directoryConfig.d.ts +7 -0
  79. package/dist/cli/directoryConfig.js +25 -0
  80. package/dist/cli/getGeneratorSuccessMessage.js +1 -1
  81. package/dist/cli/getSchema.d.ts +3 -28
  82. package/dist/cli/getSchema.js +81 -84
  83. package/dist/cli/getTypescriptVersion.js +1 -1
  84. package/dist/cli/hashes.d.ts +1 -2
  85. package/dist/cli/hashes.js +78 -80
  86. package/dist/cli/schemaContext.d.ts +59 -0
  87. package/dist/cli/schemaContext.js +134 -0
  88. package/dist/cli/utils.js +5 -5
  89. package/dist/client/getClientEngineType.d.ts +1 -1
  90. package/dist/client/getClientEngineType.js +1 -1
  91. package/dist/convertCredentials.d.ts +1 -1
  92. package/dist/convertCredentials.js +1 -1
  93. package/dist/dotenvExpand.js +1 -1
  94. package/dist/engine-commands/errorHelpers.js +5 -5
  95. package/dist/engine-commands/formatSchema.js +77 -79
  96. package/dist/engine-commands/getConfig.d.ts +1 -5
  97. package/dist/engine-commands/getConfig.js +16 -17
  98. package/dist/engine-commands/getDmmf.d.ts +3 -6
  99. package/dist/engine-commands/getDmmf.js +13 -14
  100. package/dist/engine-commands/getEngineVersion.js +12 -12
  101. package/dist/engine-commands/getEnginesMetaInfo.js +15 -15
  102. package/dist/engine-commands/index.js +88 -90
  103. package/dist/engine-commands/lintSchema.d.ts +1 -1
  104. package/dist/engine-commands/lintSchema.js +11 -12
  105. package/dist/engine-commands/mergeSchemas.js +13 -14
  106. package/dist/engine-commands/queryEngineCommons.js +8 -8
  107. package/dist/engine-commands/relativizePathInPSLError.js +1 -1
  108. package/dist/engine-commands/validate.js +13 -14
  109. package/dist/errorReporting.d.ts +0 -1
  110. package/dist/errorReporting.js +7 -7
  111. package/dist/get-generators/getGenerators.d.ts +22 -9
  112. package/dist/get-generators/getGenerators.js +80 -82
  113. package/dist/get-generators/utils/binaryTypeToEngineType.d.ts +1 -1
  114. package/dist/get-generators/utils/binaryTypeToEngineType.js +1 -1
  115. package/dist/get-generators/utils/engineTypeToBinaryType.d.ts +1 -1
  116. package/dist/get-generators/utils/engineTypeToBinaryType.js +1 -1
  117. package/dist/get-generators/utils/fixBinaryTargets.d.ts +1 -1
  118. package/dist/get-generators/utils/fixBinaryTargets.js +1 -1
  119. package/dist/get-generators/utils/getBinaryPathsByVersion.d.ts +1 -1
  120. package/dist/get-generators/utils/getBinaryPathsByVersion.js +4 -4
  121. package/dist/get-generators/utils/getEngineVersionForGenerator.d.ts +1 -1
  122. package/dist/get-generators/utils/getEngineVersionForGenerator.js +1 -1
  123. package/dist/get-generators/utils/printGeneratorConfig.d.ts +1 -1
  124. package/dist/get-generators/utils/printGeneratorConfig.js +7 -7
  125. package/dist/getPackedPackage.js +9 -9
  126. package/dist/highlight/highlight.js +1 -1
  127. package/dist/highlight/languages/dml.js +1 -1
  128. package/dist/highlight/languages/sql.js +1 -1
  129. package/dist/highlight/prism.js +1 -1
  130. package/dist/highlight/theme.js +1 -1
  131. package/dist/index.d.ts +9 -8
  132. package/dist/index.js +147 -147
  133. package/dist/logger.js +9 -9
  134. package/dist/migrateTypes.d.ts +63 -0
  135. package/dist/{multipart-parser-32AROPTR.js → multipart-parser-3AFJFP6K.js} +7 -7
  136. package/dist/panic.d.ts +1 -4
  137. package/dist/panic.js +7 -7
  138. package/dist/resolveBinary.js +10 -10
  139. package/dist/resolveOutput.js +1 -1
  140. package/dist/resolvePkg.d.ts +7 -0
  141. package/dist/{get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.js → resolvePkg.js} +6 -6
  142. package/dist/schemaEngineCommands.js +13 -13
  143. package/dist/sendPanic.js +7 -111
  144. package/dist/types.d.ts +1 -1
  145. package/dist/utils/__tests__/isCi.test.js +1 -1
  146. package/dist/utils/__tests__/isInteractive.test.js +1 -1
  147. package/dist/utils/__tests__/maskSchema.test.js +1 -1
  148. package/dist/utils/assertAlways.js +1 -1
  149. package/dist/utils/assertNever.js +1 -1
  150. package/dist/utils/binaryTargetRegex.js +3 -3
  151. package/dist/utils/byline.js +1 -1
  152. package/dist/utils/callOnce.js +1 -1
  153. package/dist/utils/callOnce.test.js +1 -1
  154. package/dist/utils/canPrompt.js +4 -4
  155. package/dist/utils/chmodPlusX.js +1 -1
  156. package/dist/utils/cloudflareD1.js +4 -4
  157. package/dist/utils/drawBox.js +1 -1
  158. package/dist/utils/extractPreviewFeatures.d.ts +2 -2
  159. package/dist/utils/extractPreviewFeatures.js +3 -3
  160. package/dist/utils/formatTable.js +1 -1
  161. package/dist/utils/formatms.js +1 -1
  162. package/dist/utils/fs-functional.js +12 -12
  163. package/dist/utils/fs-utils.js +9 -9
  164. package/dist/utils/getCommandWithExecutor.js +4 -4
  165. package/dist/utils/getEnvPaths.d.ts +1 -1
  166. package/dist/utils/getEnvPaths.js +77 -79
  167. package/dist/utils/getGitHubIssueUrl.js +5 -4
  168. package/dist/utils/getMigrateConfigDir.js +1 -1
  169. package/dist/utils/getVersionFromPackageJson.js +4 -4
  170. package/dist/utils/handleEngineLoadingErrors.js +1 -1
  171. package/dist/utils/handlePanic.js +13 -110
  172. package/dist/utils/hasOwnProperty.js +1 -1
  173. package/dist/utils/isCi.js +1 -1
  174. package/dist/utils/isCurrentBinInstalledGlobally.js +3 -3
  175. package/dist/utils/isInContainer.js +1 -1
  176. package/dist/utils/isInNpmLifecycleHook.js +1 -1
  177. package/dist/utils/isInteractive.js +1 -1
  178. package/dist/utils/isPromiseLike.js +1 -1
  179. package/dist/utils/isValidJsIdentifier.js +4 -4
  180. package/dist/utils/keyBy.js +1 -1
  181. package/dist/utils/link.js +3 -3
  182. package/dist/utils/load.js +3 -3
  183. package/dist/utils/loadEnvFile.js +77 -79
  184. package/dist/utils/mapKeys.js +1 -1
  185. package/dist/utils/mapObjectValues.js +1 -1
  186. package/dist/utils/maskSchema.js +1 -1
  187. package/dist/utils/max.js +1 -1
  188. package/dist/utils/max.test.js +1 -1
  189. package/dist/utils/maybeInGitHook.js +1 -1
  190. package/dist/utils/missingDatasource.js +4 -4
  191. package/dist/utils/missingGeneratorMessage.js +6 -6
  192. package/dist/utils/now.js +1 -1
  193. package/dist/utils/omit.js +1 -1
  194. package/dist/utils/parseAWSNodejsRuntimeEnvVarVersion.js +1 -1
  195. package/dist/utils/parseEnvValue.d.ts +1 -1
  196. package/dist/utils/parseEnvValue.js +1 -1
  197. package/dist/utils/path.js +1 -1
  198. package/dist/utils/path.test.js +1 -1
  199. package/dist/utils/pick.js +1 -1
  200. package/dist/utils/printConfigWarnings.js +1 -1
  201. package/dist/utils/prismaPostgres.js +1 -1
  202. package/dist/utils/prismaPostgres.test.js +1 -1
  203. package/dist/utils/schemaFileInput.d.ts +0 -4
  204. package/dist/utils/schemaFileInput.js +3 -7
  205. package/dist/utils/serializeQueryEngineName.js +1 -1
  206. package/dist/utils/setClassName.js +1 -1
  207. package/dist/utils/toSchemasContainer.d.ts +2 -3
  208. package/dist/utils/toSchemasContainer.js +4 -5
  209. package/dist/utils/tryLoadEnvs.js +7 -7
  210. package/dist/utils/unique.js +1 -1
  211. package/dist/utils/vercelPkgPathRegex.js +1 -1
  212. package/dist/warnOnce.js +4 -4
  213. package/dist/wasm.d.ts +3 -1
  214. package/dist/wasm.js +7 -6
  215. package/package.json +16 -13
  216. package/dist/chunk-3PVYCDSO.js +0 -15631
  217. package/dist/chunk-77IC3DNO.js +0 -35
  218. package/dist/chunk-AOQIUJT4.js +0 -41
  219. package/dist/chunk-HJ6KYPDU.js +0 -15631
  220. package/dist/chunk-L6GBFCXG.js +0 -367
  221. package/dist/chunk-MGZOEY6N.js +0 -28
  222. package/dist/chunk-S57RMXZW.js +0 -28
  223. package/dist/chunk-VRT7T6MF.js +0 -4959
  224. package/dist/chunk-YRBRUREX.js +0 -57
  225. package/dist/get-generators/generatorResolvers/generatorResolvers.d.ts +0 -15
  226. package/dist/get-generators/generatorResolvers/generatorResolvers.js +0 -135
  227. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.d.ts +0 -6
  228. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.js +0 -26
  229. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.d.ts +0 -9
  230. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +0 -26
  231. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.d.ts +0 -8
  232. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +0 -29
  233. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.d.ts +0 -6
  234. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +0 -135
  235. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.d.ts +0 -1
  236. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +0 -26
  237. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.d.ts +0 -20
  238. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.d.ts +0 -7
  239. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.d.ts +0 -1
  240. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.js +0 -17
  241. package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.d.ts +0 -20
  242. package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +0 -136
  243. package/dist/get-generators/utils/check-feature-flags/checkFeatureFlags.d.ts +0 -8
  244. package/dist/get-generators/utils/check-feature-flags/checkFeatureFlags.js +0 -25
@@ -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,25 +26,24 @@ 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_SFT7SSYC_exports = {};
30
- __export(chunk_SFT7SSYC_exports, {
29
+ var chunk_R6CFUYVZ_exports = {};
30
+ __export(chunk_R6CFUYVZ_exports, {
31
31
  ValidateError: () => ValidateError,
32
32
  validate: () => validate
33
33
  });
34
- module.exports = __toCommonJS(chunk_SFT7SSYC_exports);
35
- var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
36
- var import_chunk_6TXVGFQA = require("./chunk-6TXVGFQA.js");
34
+ module.exports = __toCommonJS(chunk_R6CFUYVZ_exports);
35
+ var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
37
36
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
38
- var import_chunk_65BXVEDI = require("./chunk-65BXVEDI.js");
39
- var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
37
+ var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
38
+ var import_chunk_UP32A7FC = require("./chunk-UP32A7FC.js");
39
+ var import_chunk_PH3WSCPB = require("./chunk-PH3WSCPB.js");
40
+ var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
40
41
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
41
- var import_chunk_RLSXWOUV = require("./chunk-RLSXWOUV.js");
42
- var import_chunk_ATFQZVBS = require("./chunk-ATFQZVBS.js");
43
- var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
42
+ var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
44
43
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
45
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
44
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
46
45
  var import_debug = __toESM(require("@prisma/debug"));
47
- var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVWZX.require_function)());
46
+ var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57HZ.require_function)());
48
47
  var debug = (0, import_debug.default)("prisma:validate");
49
48
  var ValidateError = class extends Error {
50
49
  constructor(params) {
@@ -60,25 +59,25 @@ ${detailsHeader} ${message}`;
60
59
  }).exhaustive();
61
60
  const errorMessageWithContext = `${constructedErrorMessage}
62
61
  [Context: validate]`;
63
- super((0, import_chunk_65BXVEDI.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
+ super((0, import_chunk_UP32A7FC.addVersionDetailsToErrorMessage)(errorMessageWithContext));
64
63
  this.name = "ValidateError";
65
64
  }
66
65
  };
67
66
  function validate(options) {
68
- const debugErrorType = (0, import_chunk_6TXVGFQA.createDebugErrorType)(debug, "validateWasm");
67
+ const debugErrorType = (0, import_chunk_TZJROXB3.createDebugErrorType)(debug, "validateWasm");
69
68
  debug(`Using validate Wasm`);
70
69
  const validateEither = (0, import_function.pipe)(
71
- (0, import_chunk_7MD6344A.tryCatch)(
70
+ (0, import_chunk_5DBOS77Y.tryCatch)(
72
71
  () => {
73
72
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
74
73
  debug("Triggering a Rust panic...");
75
- import_chunk_RLSXWOUV.prismaSchemaWasm.debug_panic();
74
+ import_chunk_PH3WSCPB.prismaSchemaWasm.debug_panic();
76
75
  }
77
76
  const params = JSON.stringify({
78
77
  prismaSchema: options.schemas,
79
78
  noColor: Boolean(process.env.NO_COLOR)
80
79
  });
81
- import_chunk_RLSXWOUV.prismaSchemaWasm.validate(params);
80
+ import_chunk_PH3WSCPB.prismaSchemaWasm.validate(params);
82
81
  },
83
82
  (e) => ({
84
83
  type: "wasm-error",
@@ -87,33 +86,30 @@ function validate(options) {
87
86
  })
88
87
  )
89
88
  );
90
- if ((0, import_chunk_7MD6344A.isRight)(validateEither)) {
89
+ if ((0, import_chunk_5DBOS77Y.isRight)(validateEither)) {
91
90
  return;
92
91
  }
93
92
  const error = (0, import_chunk_XKZ6CBLA.z)(validateEither.left).with({ type: "wasm-error" }, (e) => {
94
93
  debugErrorType(e);
95
94
  console.error("");
96
- if ((0, import_chunk_ATFQZVBS.isWasmPanic)(e.error)) {
97
- const { message, stack } = (0, import_chunk_ATFQZVBS.getWasmError)(e.error);
95
+ if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(e.error)) {
96
+ const { message, stack } = (0, import_chunk_LMVSIVKQ.getWasmError)(e.error);
98
97
  debug(`Error validating schema: ${message}`);
99
98
  debug(stack);
100
- const panic = new import_chunk_ATFQZVBS.RustPanic(
99
+ const panic = new import_chunk_LMVSIVKQ.RustPanic(
101
100
  /* message */
102
101
  message,
103
102
  /* rustStack */
104
103
  stack,
105
104
  /* request */
106
105
  "@prisma/prisma-schema-wasm validate",
107
- "FMT_CLI",
108
- /* schemaPath */
109
- (0, import_chunk_YRBRUREX.debugMultipleSchemaPaths)(options.schemas),
110
- /* schema */
111
- options.schemas
106
+ "FMT_CLI"
107
+ /* FMT_CLI */
112
108
  );
113
109
  return panic;
114
110
  }
115
111
  const errorOutput = e.error.message;
116
- return new ValidateError((0, import_chunk_6TXVGFQA.parseQueryEngineError)({ errorOutput, reason: e.reason }));
112
+ return new ValidateError((0, import_chunk_TZJROXB3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
117
113
  }).exhaustive();
118
114
  throw error;
119
115
  }
@@ -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_PFLLVWZX_exports = {};
20
- __export(chunk_PFLLVWZX_exports, {
19
+ var chunk_R6QH57HZ_exports = {};
20
+ __export(chunk_R6QH57HZ_exports, {
21
21
  require_function: () => require_function
22
22
  });
23
- module.exports = __toCommonJS(chunk_PFLLVWZX_exports);
24
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
25
- var require_function = (0, import_chunk_WWAWV7DQ.__commonJS)({
23
+ module.exports = __toCommonJS(chunk_R6QH57HZ_exports);
24
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
25
+ var require_function = (0, import_chunk_4VNS5WPM.__commonJS)({
26
26
  "../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/function.js"(exports) {
27
27
  "use strict";
28
28
  var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
@@ -16,15 +16,15 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_L3RL2PPV_exports = {};
20
- __export(chunk_L3RL2PPV_exports, {
19
+ var chunk_RHXDDTTE_exports = {};
20
+ __export(chunk_RHXDDTTE_exports, {
21
21
  addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
22
22
  });
23
- module.exports = __toCommonJS(chunk_L3RL2PPV_exports);
24
- var import_chunk_PFFK3QVZ = require("./chunk-PFFK3QVZ.js");
23
+ module.exports = __toCommonJS(chunk_RHXDDTTE_exports);
24
+ var import_chunk_F4K3GWXT = require("./chunk-F4K3GWXT.js");
25
25
  var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
26
26
  function addVersionDetailsToErrorMessage(message) {
27
- const rows = [["Prisma CLI Version", import_chunk_PFFK3QVZ.version]];
27
+ const rows = [["Prisma CLI Version", import_chunk_F4K3GWXT.version]];
28
28
  return `${message}
29
29
 
30
30
  ${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
@@ -16,41 +16,37 @@ 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_ZTU7TICR_exports = {};
20
- __export(chunk_ZTU7TICR_exports, {
19
+ var chunk_SJRVH6CG_exports = {};
20
+ __export(chunk_SJRVH6CG_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_ZTU7TICR_exports);
28
- var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
29
- var import_chunk_AD2VRX6B = require("./chunk-AD2VRX6B.js");
30
- var import_chunk_ATFQZVBS = require("./chunk-ATFQZVBS.js");
27
+ module.exports = __toCommonJS(chunk_SJRVH6CG_exports);
28
+ var import_chunk_PH3WSCPB = require("./chunk-PH3WSCPB.js");
29
+ var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
31
30
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
32
31
  function lintSchema({ schemas }) {
33
- const lintResult = import_chunk_AD2VRX6B.prismaSchemaWasm.lint(JSON.stringify(schemas));
32
+ const lintResult = import_chunk_PH3WSCPB.prismaSchemaWasm.lint(JSON.stringify(schemas));
34
33
  const lintDiagnostics = JSON.parse(lintResult);
35
34
  return lintDiagnostics;
36
35
  }
37
- function handleLintPanic(tryCb, { schemas }) {
36
+ function handleLintPanic(tryCb) {
38
37
  try {
39
38
  return tryCb();
40
39
  } catch (e) {
41
- const { message, stack } = (0, import_chunk_ATFQZVBS.getWasmError)(e);
42
- const panic = new import_chunk_ATFQZVBS.RustPanic(
40
+ const { message, stack } = (0, import_chunk_LMVSIVKQ.getWasmError)(e);
41
+ const panic = new import_chunk_LMVSIVKQ.RustPanic(
43
42
  /* message */
44
43
  message,
45
44
  /* rustStack */
46
45
  stack,
47
46
  /* request */
48
47
  "@prisma/prisma-schema-wasm lint",
49
- "FMT_CLI",
50
- /* schemaPath */
51
- (0, import_chunk_YRBRUREX.debugMultipleSchemaPaths)(schemas),
52
- /* schema */
53
- schemas
48
+ "FMT_CLI"
49
+ /* FMT_CLI */
54
50
  );
55
51
  throw panic;
56
52
  }
@@ -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_Y3OWT3K2_exports = {};
30
- __export(chunk_Y3OWT3K2_exports, {
29
+ var chunk_TQFONRJP_exports = {};
30
+ __export(chunk_TQFONRJP_exports, {
31
31
  createDirIfNotExists: () => createDirIfNotExists,
32
32
  fs_utils_exports: () => fs_utils_exports,
33
33
  getFilesInDir: () => getFilesInDir,
@@ -36,14 +36,14 @@ __export(chunk_Y3OWT3K2_exports, {
36
36
  removeEmptyDirs: () => removeEmptyDirs,
37
37
  writeFile: () => writeFile
38
38
  });
39
- module.exports = __toCommonJS(chunk_Y3OWT3K2_exports);
39
+ module.exports = __toCommonJS(chunk_TQFONRJP_exports);
40
40
  var import_chunk_J77ZIDXB = require("./chunk-J77ZIDXB.js");
41
- var import_chunk_53LS3WUO = require("./chunk-53LS3WUO.js");
42
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
41
+ var import_chunk_JOIIWB3U = require("./chunk-JOIIWB3U.js");
42
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
43
43
  var import_promises = __toESM(require("fs/promises"));
44
44
  var import_path = __toESM(require("path"));
45
45
  var fs_utils_exports = {};
46
- (0, import_chunk_WWAWV7DQ.__export)(fs_utils_exports, {
46
+ (0, import_chunk_4VNS5WPM.__export)(fs_utils_exports, {
47
47
  createDirIfNotExists: () => createDirIfNotExists,
48
48
  getFilesInDir: () => getFilesInDir,
49
49
  getNestedFoldersInDir: () => getNestedFoldersInDir,
@@ -51,7 +51,7 @@ var fs_utils_exports = {};
51
51
  removeEmptyDirs: () => removeEmptyDirs,
52
52
  writeFile: () => writeFile
53
53
  });
54
- var import_globby = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_53LS3WUO.require_globby)());
54
+ var import_globby = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_JOIIWB3U.require_globby)());
55
55
  function createDirIfNotExists(dir) {
56
56
  return import_promises.default.mkdir(dir, { recursive: true });
57
57
  }
@@ -26,24 +26,24 @@ 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_6TXVGFQA_exports = {};
30
- __export(chunk_6TXVGFQA_exports, {
29
+ var chunk_TZJROXB3_exports = {};
30
+ __export(chunk_TZJROXB3_exports, {
31
31
  createDebugErrorType: () => createDebugErrorType,
32
32
  createSchemaValidationError: () => createSchemaValidationError,
33
33
  parseQueryEngineError: () => parseQueryEngineError,
34
34
  unlinkTempDatamodelPath: () => unlinkTempDatamodelPath
35
35
  });
36
- module.exports = __toCommonJS(chunk_6TXVGFQA_exports);
36
+ module.exports = __toCommonJS(chunk_TZJROXB3_exports);
37
37
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
38
- var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
38
+ var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
39
+ var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
39
40
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
40
- var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
41
41
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
42
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
42
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
43
43
  var import_fs = __toESM(require("fs"));
44
- var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVWZX.require_function)());
44
+ var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57HZ.require_function)());
45
45
  function unlinkTempDatamodelPath(options, tempDatamodelPath) {
46
- return (0, import_chunk_7MD6344A.tryCatch2)(
46
+ return (0, import_chunk_5DBOS77Y.tryCatch2)(
47
47
  () => {
48
48
  if (!options.datamodelPath && tempDatamodelPath) {
49
49
  return import_fs.default.promises.unlink(tempDatamodelPath);
@@ -66,11 +66,11 @@ function createSchemaValidationError(reason) {
66
66
  }
67
67
  function parseQueryEngineError({ errorOutput, reason }) {
68
68
  const actualError = (0, import_function.pipe)(
69
- (0, import_chunk_7MD6344A.tryCatch)(
69
+ (0, import_chunk_5DBOS77Y.tryCatch)(
70
70
  () => JSON.parse(errorOutput),
71
71
  () => ({ _tag: "unparsed", message: errorOutput, reason })
72
72
  ),
73
- (0, import_chunk_7MD6344A.map)((errorOutputAsJSON) => {
73
+ (0, import_chunk_5DBOS77Y.map)((errorOutputAsJSON) => {
74
74
  const defaultMessage = (0, import_chunk_PG5FDKSF.red)((0, import_chunk_PG5FDKSF.bold)((0, import_chunk_C47SCASR.relativizePathInPSLError)(errorOutputAsJSON.message)));
75
75
  const getConfigErrorInit = (0, import_chunk_XKZ6CBLA.z)(errorOutputAsJSON).with({ error_code: "P1012" }, (eJSON) => {
76
76
  return {
@@ -89,7 +89,7 @@ function parseQueryEngineError({ errorOutput, reason }) {
89
89
  });
90
90
  return { _tag: "parsed", message: defaultMessage, ...getConfigErrorInit };
91
91
  }),
92
- (0, import_chunk_7MD6344A.getOrElseW)(import_function.identity)
92
+ (0, import_chunk_5DBOS77Y.getOrElseW)(import_function.identity)
93
93
  );
94
94
  return actualError;
95
95
  }
@@ -16,15 +16,15 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_65BXVEDI_exports = {};
20
- __export(chunk_65BXVEDI_exports, {
19
+ var chunk_UP32A7FC_exports = {};
20
+ __export(chunk_UP32A7FC_exports, {
21
21
  addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
22
22
  });
23
- module.exports = __toCommonJS(chunk_65BXVEDI_exports);
24
- var import_chunk_DGPFCLXV = require("./chunk-DGPFCLXV.js");
23
+ module.exports = __toCommonJS(chunk_UP32A7FC_exports);
24
+ var import_chunk_FL376QJQ = require("./chunk-FL376QJQ.js");
25
25
  var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
26
26
  function addVersionDetailsToErrorMessage(message) {
27
- const rows = [["Prisma CLI Version", import_chunk_DGPFCLXV.version]];
27
+ const rows = [["Prisma CLI Version", import_chunk_FL376QJQ.version]];
28
28
  return `${message}
29
29
 
30
30
  ${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
@@ -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_CHMJ5V7I_exports = {};
20
- __export(chunk_CHMJ5V7I_exports, {
19
+ var chunk_UZTXEBTM_exports = {};
20
+ __export(chunk_UZTXEBTM_exports, {
21
21
  require_lib: () => require_lib
22
22
  });
23
- module.exports = __toCommonJS(chunk_CHMJ5V7I_exports);
24
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
25
- var require_identifier = (0, import_chunk_WWAWV7DQ.__commonJS)({
23
+ module.exports = __toCommonJS(chunk_UZTXEBTM_exports);
24
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
25
+ var require_identifier = (0, import_chunk_4VNS5WPM.__commonJS)({
26
26
  "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.25.9/node_modules/@babel/helper-validator-identifier/lib/identifier.js"(exports) {
27
27
  "use strict";
28
28
  Object.defineProperty(exports, "__esModule", {
@@ -93,7 +93,7 @@ var require_identifier = (0, import_chunk_WWAWV7DQ.__commonJS)({
93
93
  }
94
94
  }
95
95
  });
96
- var require_keyword = (0, import_chunk_WWAWV7DQ.__commonJS)({
96
+ var require_keyword = (0, import_chunk_4VNS5WPM.__commonJS)({
97
97
  "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.25.9/node_modules/@babel/helper-validator-identifier/lib/keyword.js"(exports) {
98
98
  "use strict";
99
99
  Object.defineProperty(exports, "__esModule", {
@@ -129,7 +129,7 @@ var require_keyword = (0, import_chunk_WWAWV7DQ.__commonJS)({
129
129
  }
130
130
  }
131
131
  });
132
- var require_lib = (0, import_chunk_WWAWV7DQ.__commonJS)({
132
+ var require_lib = (0, import_chunk_4VNS5WPM.__commonJS)({
133
133
  "../../node_modules/.pnpm/@babel+helper-validator-identifier@7.25.9/node_modules/@babel/helper-validator-identifier/lib/index.js"(exports) {
134
134
  "use strict";
135
135
  Object.defineProperty(exports, "__esModule", {
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var chunk_WPX2HKUE_exports = {};
30
+ __export(chunk_WPX2HKUE_exports, {
31
+ wasmSchemaEngineLoader: () => wasmSchemaEngineLoader
32
+ });
33
+ module.exports = __toCommonJS(chunk_WPX2HKUE_exports);
34
+ var import_promises = __toESM(require("node:fs/promises"));
35
+ var import_node_path = __toESM(require("node:path"));
36
+ async function getSchemaEngineWasModule() {
37
+ const runtimeBase = import_node_path.default.join(__dirname, "..", "build");
38
+ const schemaEngineWasmFilePath = import_node_path.default.join(runtimeBase, `schema_engine_bg.wasm`);
39
+ const schemaEngineWasmFileBytes = await import_promises.default.readFile(schemaEngineWasmFilePath);
40
+ return new WebAssembly.Module(schemaEngineWasmFileBytes);
41
+ }
42
+ var loadedWasmInstance;
43
+ var wasmSchemaEngineLoader = {
44
+ async loadSchemaEngine(adapter) {
45
+ if (loadedWasmInstance === void 0) {
46
+ loadedWasmInstance = (async () => {
47
+ const runtime = await import("@prisma/schema-engine-wasm/schema_engine_bg");
48
+ const wasmModule = await getSchemaEngineWasModule();
49
+ console.log("[runtime]", runtime);
50
+ console.log("[runtime]", runtime.default);
51
+ const instance = new WebAssembly.Instance(wasmModule, {
52
+ // @ts-ignore
53
+ "./schema_engine_bg.js": runtime
54
+ });
55
+ const wbindgen_start = instance.exports.__wbindgen_start;
56
+ runtime.__wbg_set_wasm(instance.exports);
57
+ wbindgen_start();
58
+ const engine = await runtime.SchemaEngine.new(adapter);
59
+ return engine;
60
+ })();
61
+ }
62
+ return await loadedWasmInstance;
63
+ }
64
+ };
@@ -16,16 +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_BPZFDGKN_exports = {};
20
- __export(chunk_BPZFDGKN_exports, {
19
+ var chunk_WXRVYSYN_exports = {};
20
+ __export(chunk_WXRVYSYN_exports, {
21
21
  WasmPanicRegistry: () => WasmPanicRegistry
22
22
  });
23
- module.exports = __toCommonJS(chunk_BPZFDGKN_exports);
24
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
23
+ module.exports = __toCommonJS(chunk_WXRVYSYN_exports);
25
24
  var WasmPanicRegistry = class {
26
- constructor() {
27
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "message", "");
28
- }
25
+ message = "";
29
26
  get() {
30
27
  return `${this.message}`;
31
28
  }
@@ -26,22 +26,25 @@ 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_RLSXWOUV_exports = {};
30
- __export(chunk_RLSXWOUV_exports, {
29
+ var chunk_X4F27I5S_exports = {};
30
+ __export(chunk_X4F27I5S_exports, {
31
31
  prismaSchemaWasm: () => import_prisma_schema_wasm.default,
32
32
  prismaSchemaWasmVersion: () => prismaSchemaWasmVersion,
33
+ schemaEngineWasmVersion: () => schemaEngineWasmVersion,
33
34
  wasm_exports: () => wasm_exports
34
35
  });
35
- module.exports = __toCommonJS(chunk_RLSXWOUV_exports);
36
- var import_chunk_BIJVFCQY = require("./chunk-BIJVFCQY.js");
37
- var import_chunk_BPZFDGKN = require("./chunk-BPZFDGKN.js");
38
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
36
+ module.exports = __toCommonJS(chunk_X4F27I5S_exports);
37
+ var import_chunk_KLLJM353 = require("./chunk-KLLJM353.js");
38
+ var import_chunk_WXRVYSYN = require("./chunk-WXRVYSYN.js");
39
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
39
40
  var import_prisma_schema_wasm = __toESM(require("@prisma/prisma-schema-wasm"));
40
41
  var wasm_exports = {};
41
- (0, import_chunk_WWAWV7DQ.__export)(wasm_exports, {
42
+ (0, import_chunk_4VNS5WPM.__export)(wasm_exports, {
42
43
  prismaSchemaWasm: () => import_prisma_schema_wasm.default,
43
- prismaSchemaWasmVersion: () => prismaSchemaWasmVersion
44
+ prismaSchemaWasmVersion: () => prismaSchemaWasmVersion,
45
+ schemaEngineWasmVersion: () => schemaEngineWasmVersion
44
46
  });
45
- var { dependencies } = (0, import_chunk_BIJVFCQY.require_package)();
47
+ globalThis.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_WXRVYSYN.WasmPanicRegistry();
48
+ var { dependencies } = (0, import_chunk_KLLJM353.require_package)();
46
49
  var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
47
- globalThis.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_BPZFDGKN.WasmPanicRegistry();
50
+ var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var chunk_XR4RJTDM_exports = {};
30
+ __export(chunk_XR4RJTDM_exports, {
31
+ handlePanic: () => handlePanic
32
+ });
33
+ module.exports = __toCommonJS(chunk_XR4RJTDM_exports);
34
+ var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
35
+ var import_chunk_FXMGS3L5 = require("./chunk-FXMGS3L5.js");
36
+ var import_chunk_R3J2O23S = require("./chunk-R3J2O23S.js");
37
+ var import_chunk_YR5KNFKN = require("./chunk-YR5KNFKN.js");
38
+ var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
39
+ var import_prompts = __toESM(require("prompts"));
40
+ async function handlePanic(args) {
41
+ if (!(0, import_chunk_R3J2O23S.canPrompt)()) {
42
+ throw args.error;
43
+ }
44
+ await panicDialog(args);
45
+ }
46
+ async function panicDialog({
47
+ error,
48
+ cliVersion,
49
+ enginesVersion,
50
+ command,
51
+ getDatabaseVersionSafe
52
+ }) {
53
+ const errorMessage = error.message.split("\n").slice(0, Math.max(20, process.stdout.rows)).join("\n");
54
+ console.log(`${(0, import_chunk_PG5FDKSF.red)("Oops, an unexpected error occurred!")}
55
+ ${(0, import_chunk_PG5FDKSF.red)(errorMessage)}
56
+
57
+ ${(0, import_chunk_PG5FDKSF.bold)("Please help us improve Prisma by submitting an error report.")}
58
+ ${(0, import_chunk_PG5FDKSF.bold)("Error reports never contain personal or other sensitive information.")}
59
+ ${(0, import_chunk_PG5FDKSF.dim)(`Learn more: ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/telemetry")}`)}
60
+ `);
61
+ const { value: shouldSubmitReport } = await (0, import_prompts.default)({
62
+ type: "select",
63
+ name: "value",
64
+ message: "Submit error report",
65
+ initial: 0,
66
+ choices: [
67
+ {
68
+ title: "Yes",
69
+ value: true,
70
+ description: `Send error report once`
71
+ },
72
+ {
73
+ title: "No",
74
+ value: false,
75
+ description: `Don't send error report`
76
+ }
77
+ ]
78
+ });
79
+ if (shouldSubmitReport) {
80
+ try {
81
+ console.log("Submitting...");
82
+ const reportId = await (0, import_chunk_YR5KNFKN.sendPanic)({ error, cliVersion, enginesVersion, getDatabaseVersionSafe });
83
+ console.log(`
84
+ ${(0, import_chunk_PG5FDKSF.bold)(`We successfully received the error report id: ${reportId}`)}`);
85
+ console.log(`
86
+ ${(0, import_chunk_PG5FDKSF.bold)("Thanks a lot for your help! \u{1F64F}")}`);
87
+ } catch (error2) {
88
+ const reportFailedMessage = `${(0, import_chunk_PG5FDKSF.bold)((0, import_chunk_PG5FDKSF.red)("Oops. We could not send the error report."))}`;
89
+ console.log(reportFailedMessage);
90
+ console.error(`${(0, import_chunk_PG5FDKSF.gray)("Error report submission failed due to: ")}`, error2);
91
+ }
92
+ }
93
+ await (0, import_chunk_FXMGS3L5.wouldYouLikeToCreateANewIssue)({
94
+ prompt: !shouldSubmitReport,
95
+ error,
96
+ cliVersion,
97
+ enginesVersion,
98
+ command
99
+ });
100
+ process.exit(1);
101
+ }