@prisma/internals 6.6.0-dev.4 → 6.6.0-dev.40

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 (215) hide show
  1. package/dist/Generator.js +3 -3
  2. package/dist/WasmPanicRegistry.js +3 -3
  3. package/dist/{chunk-3J24J2TX.js → chunk-2CZNJDOD.js} +10 -10
  4. package/dist/chunk-2QTAK7KO.js +101 -0
  5. package/dist/{chunk-XLGODPZH.js → chunk-3DQANJMY.js} +12 -12
  6. package/dist/{chunk-WWAWV7DQ.js → chunk-4VNS5WPM.js} +3 -33
  7. package/dist/{chunk-KQOJB3ZW.js → chunk-5AI4FIZ3.js} +10 -10
  8. package/dist/{chunk-7MD6344A.js → chunk-5DBOS77Y.js} +3 -5
  9. package/dist/{chunk-45HF3I7B.js → chunk-5SQV46LC.js} +5 -5
  10. package/dist/{chunk-TZCE3PWZ.js → chunk-5VQNKCKW.js} +7 -7
  11. package/dist/chunk-6ATA6U3B.js +1076 -0
  12. package/dist/{chunk-SNAZMEHK.js → chunk-6EV2YAT6.js} +9 -9
  13. package/dist/{chunk-I7IEEULS.js → chunk-6TTRTZXU.js} +5 -5
  14. package/dist/{chunk-MGZOEY6N.js → chunk-72UZXEBG.js} +6 -6
  15. package/dist/{chunk-5RV3EMX6.js → chunk-75BIJ5PX.js} +57 -57
  16. package/dist/{chunk-IPG5ZT4T.js → chunk-A4WCN34G.js} +23 -27
  17. package/dist/{chunk-BGFWFIPR.js → chunk-AZV6HVKA.js} +5 -5
  18. package/dist/{chunk-RLDUMTXD.js → chunk-B6NQCD2C.js} +46 -79
  19. package/dist/{chunk-C4HY6GXT.js → chunk-BUIBZ427.js} +11 -15
  20. package/dist/{chunk-VRT7T6MF.js → chunk-BWGDP6B5.js} +94 -105
  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-SHJNE6T7.js → chunk-D4VDA2TZ.js} +7 -7
  24. package/dist/{chunk-MUPZUVSI.js → chunk-D4VZUY3O.js} +14 -20
  25. package/dist/{chunk-KTBNIQ7N.js → chunk-DKSUHQGA.js} +8 -8
  26. package/dist/chunk-DODIJPCS.js +34 -0
  27. package/dist/{chunk-UNUCCAXA.js → chunk-DTPFRZWV.js} +5 -5
  28. package/dist/{chunk-ZYW3HGSH.js → chunk-DYVL6P7F.js} +7 -8
  29. package/dist/{chunk-NJQWZ447.js → chunk-EPXBOIA5.js} +6 -6
  30. package/dist/{chunk-7XNZDY2V.js → chunk-ETYWYJBX.js} +60 -60
  31. package/dist/{chunk-PIPE5DSU.js → chunk-EWWOTVR3.js} +6 -6
  32. package/dist/{chunk-5SN5JBT2.js → chunk-FXMGS3L5.js} +21 -40
  33. package/dist/{chunk-S57RMXZW.js → chunk-GHHABGYW.js} +5 -5
  34. package/dist/{chunk-L6GBFCXG.js → chunk-HAGJ64PM.js} +142 -155
  35. package/dist/{chunk-3ERIN7PH.js → chunk-HG3YOAAE.js} +10 -10
  36. package/dist/{chunk-RUIW2PYP.js → chunk-HNPYV6GE.js} +5 -5
  37. package/dist/{chunk-BVKTPL5A.js → chunk-IBIHBHS4.js} +5 -5
  38. package/dist/{chunk-GXDYIY4M.js → chunk-IDINCQMN.js} +56 -57
  39. package/dist/chunk-JO6FUCDD.js +1076 -0
  40. package/dist/{chunk-53LS3WUO.js → chunk-JOIIWB3U.js} +116 -116
  41. package/dist/{chunk-CZL7DCL2.js → chunk-JYMY3OAI.js} +6 -6
  42. package/dist/{chunk-C2WD2XUT.js → chunk-K5W6WZ6E.js} +971 -991
  43. package/dist/{chunk-TATYN3T2.js → chunk-KB5DKCI4.js} +29 -29
  44. package/dist/{chunk-LKTTJWFT.js → chunk-KDP6C3CB.js} +5 -5
  45. package/dist/{chunk-ATFQZVBS.js → chunk-LMVSIVKQ.js} +9 -14
  46. package/dist/{chunk-ZKAW5JSN.js → chunk-LRJ4X43J.js} +5 -5
  47. package/dist/{chunk-ONHKZPSV.js → chunk-LRU47BGE.js} +6 -6
  48. package/dist/{chunk-4E7A3GDU.js → chunk-MM4ARWWY.js} +5 -5
  49. package/dist/{chunk-VJRLBRVK.js → chunk-N5S7K4Y6.js} +9 -9
  50. package/dist/{chunk-V2ZF7ETH.js → chunk-NVNI2SRU.js} +66 -68
  51. package/dist/{chunk-A3N2Q2GK.js → chunk-OG6LFW2K.js} +11 -15
  52. package/dist/{chunk-JHQHVXIR.js → chunk-OSHZ4P3G.js} +6 -7
  53. package/dist/{chunk-IPKE37QC.js → chunk-PFYALFCY.js} +6 -5
  54. package/dist/{chunk-PJYVXCB6.js → chunk-Q33Z6IUP.js} +5 -5
  55. package/dist/{chunk-WUDS3ABI.js → chunk-Q6FDURCA.js} +46 -79
  56. package/dist/{chunk-QXWVKT6L.js → chunk-Q7XOR5W5.js} +22 -26
  57. package/dist/{chunk-77IC3DNO.js → chunk-QGJH4P4N.js} +8 -8
  58. package/dist/{chunk-FCYHZHVW.js → chunk-R3J2O23S.js} +4 -4
  59. package/dist/{chunk-PFLLVWZX.js → chunk-R6QH57HZ.js} +5 -5
  60. package/dist/{chunk-5CIZXUQR.js → chunk-RAEXBZ6E.js} +30 -34
  61. package/dist/{chunk-Y3OWT3K2.js → chunk-TQFONRJP.js} +7 -7
  62. package/dist/chunk-TV34NMBZ.js +46 -0
  63. package/dist/{chunk-FIWY5LGI.js → chunk-TZWVNLXX.js} +9 -9
  64. package/dist/{chunk-VRBR7UXP.js → chunk-U4GPK244.js} +30 -34
  65. package/dist/{chunk-3BND5XB4.js → chunk-UTJGRVMG.js} +11 -11
  66. package/dist/{chunk-6AAPRN4H.js → chunk-UY6SQF5H.js} +22 -26
  67. package/dist/{chunk-CHMJ5V7I.js → chunk-UZTXEBTM.js} +7 -7
  68. package/dist/{chunk-YXD4CJDK.js → chunk-VVPSLVOR.js} +27 -27
  69. package/dist/{chunk-6TXVGFQA.js → chunk-WSZXPLJQ.js} +11 -11
  70. package/dist/{chunk-BPZFDGKN.js → chunk-WXRVYSYN.js} +4 -7
  71. package/dist/{chunk-2MWIMEFK.js → chunk-XLTQGAI2.js} +6 -6
  72. package/dist/chunk-YR5KNFKN.js +1834 -0
  73. package/dist/{chunk-BMJOVREG.js → chunk-YRZY5EFW.js} +23 -27
  74. package/dist/{chunk-AZNLB67U.js → chunk-ZJWZK45Z.js} +5 -5
  75. package/dist/chunk-ZSINRHD4.js +43 -0
  76. package/dist/cli/Help.js +1 -1
  77. package/dist/cli/checkUnsupportedDataProxy.d.ts +12 -17
  78. package/dist/cli/checkUnsupportedDataProxy.js +77 -74
  79. package/dist/cli/directoryConfig.d.ts +7 -0
  80. package/dist/{get-generators/utils/check-feature-flags/checkFeatureFlags.js → cli/directoryConfig.js} +6 -6
  81. package/dist/cli/getGeneratorSuccessMessage.js +1 -1
  82. package/dist/cli/getSchema.js +81 -78
  83. package/dist/cli/getTypescriptVersion.js +1 -1
  84. package/dist/cli/hashes.js +77 -74
  85. package/dist/cli/schemaContext.d.ts +58 -0
  86. package/dist/cli/schemaContext.js +139 -0
  87. package/dist/cli/utils.js +5 -5
  88. package/dist/client/getClientEngineType.js +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 +76 -73
  93. package/dist/engine-commands/getConfig.d.ts +0 -4
  94. package/dist/engine-commands/getConfig.js +16 -17
  95. package/dist/engine-commands/getDmmf.d.ts +1 -5
  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 +87 -84
  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/generatorResolvers/generatorResolvers.js +76 -73
  109. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.js +4 -4
  110. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +4 -4
  111. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +7 -7
  112. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +76 -73
  113. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +4 -4
  114. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.js +4 -4
  115. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.js +1 -1
  116. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.js +1 -1
  117. package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +77 -74
  118. package/dist/get-generators/getGenerators.d.ts +7 -3
  119. package/dist/get-generators/getGenerators.js +79 -76
  120. package/dist/get-generators/utils/binaryTypeToEngineType.js +1 -1
  121. package/dist/get-generators/utils/engineTypeToBinaryType.js +1 -1
  122. package/dist/get-generators/utils/fixBinaryTargets.js +1 -1
  123. package/dist/get-generators/utils/getBinaryPathsByVersion.js +4 -4
  124. package/dist/get-generators/utils/getEngineVersionForGenerator.js +1 -1
  125. package/dist/get-generators/utils/printGeneratorConfig.js +7 -7
  126. package/dist/getPackedPackage.js +9 -9
  127. package/dist/highlight/highlight.js +1 -1
  128. package/dist/highlight/languages/dml.js +1 -1
  129. package/dist/highlight/languages/sql.js +1 -1
  130. package/dist/highlight/prism.js +1 -1
  131. package/dist/highlight/theme.js +1 -1
  132. package/dist/index.d.ts +3 -1
  133. package/dist/index.js +144 -141
  134. package/dist/logger.js +9 -9
  135. package/dist/migrateTypes.d.ts +63 -0
  136. package/dist/{multipart-parser-32AROPTR.js → multipart-parser-3AFJFP6K.js} +7 -7
  137. package/dist/panic.d.ts +1 -4
  138. package/dist/panic.js +7 -7
  139. package/dist/resolveBinary.js +10 -10
  140. package/dist/resolveOutput.js +1 -1
  141. package/dist/schemaEngineCommands.js +13 -13
  142. package/dist/sendPanic.js +7 -111
  143. package/dist/utils/__tests__/isCi.test.js +1 -1
  144. package/dist/utils/__tests__/isInteractive.test.js +1 -1
  145. package/dist/utils/__tests__/maskSchema.test.js +1 -1
  146. package/dist/utils/assertAlways.js +1 -1
  147. package/dist/utils/assertNever.js +1 -1
  148. package/dist/utils/binaryTargetRegex.js +3 -3
  149. package/dist/utils/byline.js +1 -1
  150. package/dist/utils/callOnce.js +1 -1
  151. package/dist/utils/callOnce.test.js +1 -1
  152. package/dist/utils/canPrompt.js +4 -4
  153. package/dist/utils/chmodPlusX.js +1 -1
  154. package/dist/utils/cloudflareD1.js +4 -4
  155. package/dist/utils/drawBox.js +1 -1
  156. package/dist/utils/extractPreviewFeatures.d.ts +2 -2
  157. package/dist/utils/extractPreviewFeatures.js +3 -3
  158. package/dist/utils/formatTable.js +1 -1
  159. package/dist/utils/formatms.js +1 -1
  160. package/dist/utils/fs-functional.js +12 -12
  161. package/dist/utils/fs-utils.js +9 -9
  162. package/dist/utils/getCommandWithExecutor.js +4 -4
  163. package/dist/utils/getEnvPaths.js +76 -73
  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 +76 -73
  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.js +1 -1
  193. package/dist/utils/path.js +1 -1
  194. package/dist/utils/path.test.js +1 -1
  195. package/dist/utils/pick.js +1 -1
  196. package/dist/utils/printConfigWarnings.js +1 -1
  197. package/dist/utils/prismaPostgres.js +1 -1
  198. package/dist/utils/prismaPostgres.test.js +1 -1
  199. package/dist/utils/schemaFileInput.d.ts +0 -4
  200. package/dist/utils/schemaFileInput.js +3 -7
  201. package/dist/utils/serializeQueryEngineName.js +1 -1
  202. package/dist/utils/setClassName.js +1 -1
  203. package/dist/utils/toSchemasContainer.d.ts +2 -3
  204. package/dist/utils/toSchemasContainer.js +4 -5
  205. package/dist/utils/tryLoadEnvs.js +6 -6
  206. package/dist/utils/unique.js +1 -1
  207. package/dist/utils/vercelPkgPathRegex.js +1 -1
  208. package/dist/warnOnce.js +4 -4
  209. package/dist/wasm.js +6 -6
  210. package/package.json +12 -12
  211. package/dist/chunk-AOQIUJT4.js +0 -41
  212. package/dist/chunk-M3NNYQXQ.js +0 -15631
  213. package/dist/chunk-W5PGH43I.js +0 -15631
  214. package/dist/chunk-YRBRUREX.js +0 -57
  215. package/dist/get-generators/utils/check-feature-flags/checkFeatureFlags.d.ts +0 -8
@@ -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_WUDS3ABI_exports = {};
30
- __export(chunk_WUDS3ABI_exports, {
29
+ var chunk_Q6FDURCA_exports = {};
30
+ __export(chunk_Q6FDURCA_exports, {
31
31
  GetDmmfError: () => GetDmmfError,
32
32
  getDMMF: () => getDMMF
33
33
  });
34
- module.exports = __toCommonJS(chunk_WUDS3ABI_exports);
35
- var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
36
- var import_chunk_6TXVGFQA = require("./chunk-6TXVGFQA.js");
37
- var import_chunk_45HF3I7B = require("./chunk-45HF3I7B.js");
38
- var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
34
+ module.exports = __toCommonJS(chunk_Q6FDURCA_exports);
35
+ var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
36
+ var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
37
+ var import_chunk_5SQV46LC = require("./chunk-5SQV46LC.js");
38
+ var import_chunk_6EV2YAT6 = require("./chunk-6EV2YAT6.js");
39
+ var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
39
40
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
40
- var import_chunk_VJRLBRVK = require("./chunk-VJRLBRVK.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_45HF3I7B.addVersionDetailsToErrorMessage)(errorMessageWithContext));
61
+ super((0, import_chunk_5SQV46LC.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_6EV2YAT6.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_6EV2YAT6.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_VJRLBRVK.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_VJRLBRVK.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 });
@@ -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_QXWVKT6L_exports = {};
30
- __export(chunk_QXWVKT6L_exports, {
29
+ var chunk_Q7XOR5W5_exports = {};
30
+ __export(chunk_Q7XOR5W5_exports, {
31
31
  MergeSchemasError: () => MergeSchemasError,
32
32
  mergeSchemas: () => mergeSchemas
33
33
  });
34
- module.exports = __toCommonJS(chunk_QXWVKT6L_exports);
35
- var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
36
- var import_chunk_6TXVGFQA = require("./chunk-6TXVGFQA.js");
34
+ module.exports = __toCommonJS(chunk_Q7XOR5W5_exports);
35
+ var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
36
+ var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
37
37
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
38
- var import_chunk_45HF3I7B = require("./chunk-45HF3I7B.js");
39
- var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
38
+ var import_chunk_5SQV46LC = require("./chunk-5SQV46LC.js");
39
+ var import_chunk_6EV2YAT6 = require("./chunk-6EV2YAT6.js");
40
+ var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
40
41
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
41
- var import_chunk_VJRLBRVK = require("./chunk-VJRLBRVK.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:mergeSchemas");
49
48
  var MergeSchemasError = class extends Error {
50
49
  constructor(params) {
@@ -60,20 +59,20 @@ ${detailsHeader} ${message}`;
60
59
  }).exhaustive();
61
60
  const errorMessageWithContext = `${constructedErrorMessage}
62
61
  [Context: mergeSchemas]`;
63
- super((0, import_chunk_45HF3I7B.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
+ super((0, import_chunk_5SQV46LC.addVersionDetailsToErrorMessage)(errorMessageWithContext));
64
63
  this.name = "MergeSchemasError";
65
64
  }
66
65
  };
67
66
  function mergeSchemas(options) {
68
- const debugErrorType = (0, import_chunk_6TXVGFQA.createDebugErrorType)(debug, "mergeSchemasWasm");
67
+ const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "mergeSchemasWasm");
69
68
  debug(`Using mergeSchemas Wasm`);
70
69
  const mergeSchemasEither = (0, import_function.pipe)(
71
- (0, import_chunk_7MD6344A.tryCatch)(
70
+ (0, import_chunk_5DBOS77Y.tryCatch)(
72
71
  () => {
73
72
  const params = JSON.stringify({
74
73
  schema: options.schemas
75
74
  });
76
- return import_chunk_VJRLBRVK.prismaSchemaWasm.merge_schemas(params);
75
+ return import_chunk_6EV2YAT6.prismaSchemaWasm.merge_schemas(params);
77
76
  },
78
77
  (e) => ({
79
78
  type: "wasm-error",
@@ -82,33 +81,30 @@ function mergeSchemas(options) {
82
81
  })
83
82
  )
84
83
  );
85
- if ((0, import_chunk_7MD6344A.isRight)(mergeSchemasEither)) {
84
+ if ((0, import_chunk_5DBOS77Y.isRight)(mergeSchemasEither)) {
86
85
  return mergeSchemasEither.right;
87
86
  }
88
87
  const error = (0, import_chunk_XKZ6CBLA.z)(mergeSchemasEither.left).with({ type: "wasm-error" }, (e) => {
89
88
  debugErrorType(e);
90
89
  console.error("");
91
- if ((0, import_chunk_ATFQZVBS.isWasmPanic)(e.error)) {
92
- const { message, stack } = (0, import_chunk_ATFQZVBS.getWasmError)(e.error);
90
+ if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(e.error)) {
91
+ const { message, stack } = (0, import_chunk_LMVSIVKQ.getWasmError)(e.error);
93
92
  debug(`Error merging schemas: ${message}`);
94
93
  debug(stack);
95
- const panic = new import_chunk_ATFQZVBS.RustPanic(
94
+ const panic = new import_chunk_LMVSIVKQ.RustPanic(
96
95
  /* message */
97
96
  message,
98
97
  /* rustStack */
99
98
  stack,
100
99
  /* request */
101
100
  "@prisma/prisma-schema-wasm merge_schemas",
102
- "FMT_CLI",
103
- /* schemaPath */
104
- (0, import_chunk_YRBRUREX.debugMultipleSchemaPaths)(options.schemas),
105
- /* schema */
106
- options.schemas
101
+ "FMT_CLI"
102
+ /* FMT_CLI */
107
103
  );
108
104
  return panic;
109
105
  }
110
106
  const errorOutput = e.error.message;
111
- return new MergeSchemasError((0, import_chunk_6TXVGFQA.parseQueryEngineError)({ errorOutput, reason: e.reason }));
107
+ return new MergeSchemasError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
112
108
  }).exhaustive();
113
109
  throw error;
114
110
  }
@@ -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_77IC3DNO_exports = {};
20
- __export(chunk_77IC3DNO_exports, {
19
+ var chunk_QGJH4P4N_exports = {};
20
+ __export(chunk_QGJH4P4N_exports, {
21
21
  runPackageCmd: () => runPackageCmd
22
22
  });
23
- module.exports = __toCommonJS(chunk_77IC3DNO_exports);
24
- var import_chunk_MGZOEY6N = require("./chunk-MGZOEY6N.js");
25
- var import_chunk_7XNZDY2V = require("./chunk-7XNZDY2V.js");
26
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
27
- var import_execa = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_7XNZDY2V.require_execa)());
23
+ module.exports = __toCommonJS(chunk_QGJH4P4N_exports);
24
+ var import_chunk_72UZXEBG = require("./chunk-72UZXEBG.js");
25
+ var import_chunk_ETYWYJBX = require("./chunk-ETYWYJBX.js");
26
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
27
+ var import_execa = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_ETYWYJBX.require_execa)());
28
28
  async function runPackageCmd(cwd, cmd, ...args) {
29
- await import_execa.default.command(await (0, import_chunk_MGZOEY6N.getPackageCmd)(cwd, cmd, ...args), {
29
+ await import_execa.default.command(await (0, import_chunk_72UZXEBG.getPackageCmd)(cwd, cmd, ...args), {
30
30
  // we skip this because we are already in the generator
31
31
  env: { PRISMA_SKIP_POSTINSTALL_GENERATE: "true" },
32
32
  stdio: "inherit",
@@ -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;
@@ -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) {
@@ -26,29 +26,28 @@ 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_5CIZXUQR_exports = {};
30
- __export(chunk_5CIZXUQR_exports, {
29
+ var chunk_RAEXBZ6E_exports = {};
30
+ __export(chunk_RAEXBZ6E_exports, {
31
31
  GetConfigError: () => GetConfigError,
32
32
  getConfig: () => getConfig,
33
33
  getDirectUrl: () => getDirectUrl,
34
34
  getEffectiveUrl: () => getEffectiveUrl,
35
35
  resolveUrl: () => resolveUrl
36
36
  });
37
- module.exports = __toCommonJS(chunk_5CIZXUQR_exports);
38
- var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
39
- var import_chunk_6TXVGFQA = require("./chunk-6TXVGFQA.js");
37
+ module.exports = __toCommonJS(chunk_RAEXBZ6E_exports);
38
+ var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
39
+ var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
40
40
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
41
- var import_chunk_45HF3I7B = require("./chunk-45HF3I7B.js");
42
- var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
41
+ var import_chunk_5SQV46LC = require("./chunk-5SQV46LC.js");
42
+ var import_chunk_6EV2YAT6 = require("./chunk-6EV2YAT6.js");
43
+ var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
43
44
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
44
- var import_chunk_VJRLBRVK = require("./chunk-VJRLBRVK.js");
45
- var import_chunk_ATFQZVBS = require("./chunk-ATFQZVBS.js");
46
- var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
45
+ var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
47
46
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
48
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
47
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
49
48
  var import_debug = __toESM(require("@prisma/debug"));
50
49
  var import_get_platform = require("@prisma/get-platform");
51
- var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVWZX.require_function)());
50
+ var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57HZ.require_function)());
52
51
  var debug = (0, import_debug.default)("prisma:getConfig");
53
52
  var SCHEMA_VALIDATION_ERROR_CODE = "P1012";
54
53
  var GetConfigError = class extends Error {
@@ -65,7 +64,7 @@ ${detailsHeader} ${message}`;
65
64
  }).exhaustive();
66
65
  const errorMessageWithContext = `${constructedErrorMessage}
67
66
  [Context: getConfig]`;
68
- super((0, import_chunk_45HF3I7B.addVersionDetailsToErrorMessage)(errorMessageWithContext));
67
+ super((0, import_chunk_5SQV46LC.addVersionDetailsToErrorMessage)(errorMessageWithContext));
69
68
  this.name = "GetConfigError";
70
69
  }
71
70
  };
@@ -83,14 +82,14 @@ function resolveUrl(envValue) {
83
82
  return urlFromValue ?? urlEnvVarValue;
84
83
  }
85
84
  async function getConfig(options) {
86
- const debugErrorType = (0, import_chunk_6TXVGFQA.createDebugErrorType)(debug, "getConfigWasm");
85
+ const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getConfigWasm");
87
86
  debug(`Using getConfig Wasm`);
88
87
  const configEither = (0, import_function.pipe)(
89
- (0, import_chunk_7MD6344A.tryCatch)(
88
+ (0, import_chunk_5DBOS77Y.tryCatch)(
90
89
  () => {
91
90
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
92
91
  debug("Triggering a Rust panic...");
93
- import_chunk_VJRLBRVK.prismaSchemaWasm.debug_panic();
92
+ import_chunk_6EV2YAT6.prismaSchemaWasm.debug_panic();
94
93
  }
95
94
  const params = JSON.stringify({
96
95
  prismaSchema: options.datamodel,
@@ -98,7 +97,7 @@ async function getConfig(options) {
98
97
  ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
99
98
  env: process.env
100
99
  });
101
- const data = import_chunk_VJRLBRVK.prismaSchemaWasm.get_config(params);
100
+ const data = import_chunk_6EV2YAT6.prismaSchemaWasm.get_config(params);
102
101
  return data;
103
102
  },
104
103
  (e) => ({
@@ -107,11 +106,11 @@ async function getConfig(options) {
107
106
  error: e
108
107
  })
109
108
  ),
110
- (0, import_chunk_7MD6344A.map)((result) => ({ result })),
111
- (0, import_chunk_7MD6344A.chainW)(
109
+ (0, import_chunk_5DBOS77Y.map)((result) => ({ result })),
110
+ (0, import_chunk_5DBOS77Y.chainW)(
112
111
  ({ result }) => (
113
112
  // NOTE: this should never fail, as we expect returned values to be valid JSON-serializable strings
114
- (0, import_chunk_7MD6344A.tryCatch)(
113
+ (0, import_chunk_5DBOS77Y.tryCatch)(
115
114
  () => JSON.parse(result),
116
115
  (e) => ({
117
116
  type: "parse-json",
@@ -121,18 +120,18 @@ async function getConfig(options) {
121
120
  )
122
121
  )
123
122
  ),
124
- (0, import_chunk_7MD6344A.chainW)((response) => {
123
+ (0, import_chunk_5DBOS77Y.chainW)((response) => {
125
124
  if (response.errors.length > 0) {
126
- return (0, import_chunk_7MD6344A.left)({
125
+ return (0, import_chunk_5DBOS77Y.left)({
127
126
  type: "validation-error",
128
127
  reason: "(get-config wasm)",
129
128
  error: response.errors
130
129
  });
131
130
  }
132
- return (0, import_chunk_7MD6344A.right)(response.config);
131
+ return (0, import_chunk_5DBOS77Y.right)(response.config);
133
132
  })
134
133
  );
135
- if ((0, import_chunk_7MD6344A.isRight)(configEither)) {
134
+ if ((0, import_chunk_5DBOS77Y.isRight)(configEither)) {
136
135
  debug("config data retrieved without errors in getConfig Wasm");
137
136
  const { right: data } = configEither;
138
137
  for (const generator of data.generators) {
@@ -142,30 +141,27 @@ async function getConfig(options) {
142
141
  }
143
142
  const error = (0, import_chunk_XKZ6CBLA.z)(configEither.left).with({ type: "wasm-error" }, (e) => {
144
143
  debugErrorType(e);
145
- if ((0, import_chunk_ATFQZVBS.isWasmPanic)(e.error)) {
146
- const { message, stack } = (0, import_chunk_ATFQZVBS.getWasmError)(e.error);
147
- const panic = new import_chunk_ATFQZVBS.RustPanic(
144
+ if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(e.error)) {
145
+ const { message, stack } = (0, import_chunk_LMVSIVKQ.getWasmError)(e.error);
146
+ const panic = new import_chunk_LMVSIVKQ.RustPanic(
148
147
  /* message */
149
148
  message,
150
149
  /* rustStack */
151
150
  stack,
152
151
  /* request */
153
152
  "@prisma/prisma-schema-wasm get_config",
154
- "FMT_CLI",
155
- /* schemaPath */
156
- options.prismaPath,
157
- /* schema */
158
- (0, import_chunk_YRBRUREX.toMultipleSchemas)(options.datamodel)
153
+ "FMT_CLI"
154
+ /* FMT_CLI */
159
155
  );
160
156
  return panic;
161
157
  }
162
158
  const errorOutput = e.error.message;
163
- return new GetConfigError((0, import_chunk_6TXVGFQA.parseQueryEngineError)({ errorOutput, reason: e.reason }));
159
+ return new GetConfigError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
164
160
  }).with({ type: "validation-error" }, (e) => {
165
161
  return new GetConfigError({
166
162
  _tag: "parsed",
167
163
  errorCode: SCHEMA_VALIDATION_ERROR_CODE,
168
- reason: (0, import_chunk_6TXVGFQA.createSchemaValidationError)(e.reason),
164
+ reason: (0, import_chunk_WSZXPLJQ.createSchemaValidationError)(e.reason),
169
165
  message: formatErrors(e.error)
170
166
  });
171
167
  }).otherwise((e) => {
@@ -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
  }
@@ -0,0 +1,46 @@
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_TV34NMBZ_exports = {};
30
+ __export(chunk_TV34NMBZ_exports, {
31
+ inferDirectoryConfig: () => inferDirectoryConfig
32
+ });
33
+ module.exports = __toCommonJS(chunk_TV34NMBZ_exports);
34
+ var import_path = __toESM(require("path"));
35
+ function inferDirectoryConfig(schemaContext) {
36
+ const rootDir = schemaContext?.schemaRootDir ?? import_path.default.join(process.cwd(), "prisma");
37
+ const migrationsDirPath = import_path.default.join(import_path.default.dirname(schemaContext?.schemaPath ?? process.cwd()), "migrations");
38
+ const schemaPath = schemaContext?.schemaPath ?? import_path.default.join(process.cwd(), "prisma");
39
+ const prismaDir = import_path.default.dirname(schemaPath);
40
+ const viewsDirPath = import_path.default.join(prismaDir, "views");
41
+ return {
42
+ viewsDirPath,
43
+ typedSqlDirPath: import_path.default.join(rootDir, "sql"),
44
+ migrationsDirPath
45
+ };
46
+ }
@@ -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_FIWY5LGI_exports = {};
20
- __export(chunk_FIWY5LGI_exports, {
19
+ var chunk_TZWVNLXX_exports = {};
20
+ __export(chunk_TZWVNLXX_exports, {
21
21
  require_package: () => require_package
22
22
  });
23
- module.exports = __toCommonJS(chunk_FIWY5LGI_exports);
24
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
25
- var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
23
+ module.exports = __toCommonJS(chunk_TZWVNLXX_exports);
24
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
25
+ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
26
26
  "package.json"(exports, module2) {
27
27
  module2.exports = {
28
28
  name: "@prisma/internals",
@@ -67,7 +67,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
67
67
  "cli-truncate": "4.0.0",
68
68
  dotenv: "16.4.7",
69
69
  esbuild: "0.24.2",
70
- "escape-string-regexp": "4.0.0",
70
+ "escape-string-regexp": "5.0.0",
71
71
  execa: "5.1.1",
72
72
  "fast-glob": "3.3.3",
73
73
  "find-up": "7.0.0",
@@ -93,10 +93,10 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
93
93
  resolve: "1.22.10",
94
94
  "string-width": "7.2.0",
95
95
  "strip-ansi": "6.0.1",
96
- "strip-indent": "3.0.0",
96
+ "strip-indent": "4.0.0",
97
97
  "temp-dir": "2.0.0",
98
98
  tempy: "1.0.1",
99
- "terminal-link": "2.1.1",
99
+ "terminal-link": "3.0.0",
100
100
  tmp: "0.2.3",
101
101
  "ts-node": "10.9.2",
102
102
  "ts-pattern": "5.6.2",
@@ -111,7 +111,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
111
111
  "@prisma/fetch-engine": "workspace:*",
112
112
  "@prisma/generator-helper": "workspace:*",
113
113
  "@prisma/get-platform": "workspace:*",
114
- "@prisma/prisma-schema-wasm": "6.5.0-73.173f8d54f8d52e692c7e27e72a88314ec7aeff60",
114
+ "@prisma/prisma-schema-wasm": "6.6.0-24.933fc09bcbebf77a522ae2ac61fb5203f656749f",
115
115
  "@prisma/schema-files-loader": "workspace:*",
116
116
  arg: "5.0.2",
117
117
  prompts: "2.4.2"