@prisma/internals 6.6.0-dev.9 → 6.6.0-dev.91

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 (241) 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-PIPE5DSU.js → chunk-2H6XXXKO.js} +18 -21
  5. package/dist/{chunk-XLGODPZH.js → chunk-3DQANJMY.js} +12 -12
  6. package/dist/{chunk-Y556XG3B.js → chunk-3HN6ODNI.js} +12 -11
  7. package/dist/{chunk-WWAWV7DQ.js → chunk-4VNS5WPM.js} +3 -33
  8. package/dist/{chunk-KQOJB3ZW.js → chunk-5AI4FIZ3.js} +10 -10
  9. package/dist/{chunk-7MD6344A.js → chunk-5DBOS77Y.js} +3 -5
  10. package/dist/{chunk-TZCE3PWZ.js → chunk-5VQNKCKW.js} +7 -7
  11. package/dist/{chunk-TKQ7NOUN.js → chunk-5XZG3TEG.js} +30 -34
  12. package/dist/{chunk-YXD4CJDK.js → chunk-67I7CEQJ.js} +30 -31
  13. package/dist/{chunk-I7IEEULS.js → chunk-6TTRTZXU.js} +5 -5
  14. package/dist/{chunk-5RV3EMX6.js → chunk-75BIJ5PX.js} +57 -57
  15. package/dist/{chunk-BGFWFIPR.js → chunk-7QC5VORA.js} +5 -5
  16. package/dist/{chunk-2MWIMEFK.js → chunk-AX5N26KG.js} +6 -6
  17. package/dist/{chunk-WWKPV5SR.js → chunk-AXYQWZXV.js} +46 -79
  18. package/dist/{chunk-ZYW3HGSH.js → chunk-BPDMLM32.js} +49 -17
  19. package/dist/{chunk-5MCWLJSR.js → chunk-CR3XKUEA.js} +10 -10
  20. package/dist/{chunk-TSJICM5S.js → chunk-CRVLHWC5.js} +5 -5
  21. package/dist/{chunk-SHJNE6T7.js → chunk-D4VDA2TZ.js} +7 -7
  22. package/dist/{chunk-Q22BLLK3.js → chunk-D4VZUY3O.js} +6 -6
  23. package/dist/{chunk-KTBNIQ7N.js → chunk-DKSUHQGA.js} +8 -8
  24. package/dist/{chunk-EUTJYQDW.js → chunk-DODIJPCS.js} +13 -25
  25. package/dist/{chunk-UNUCCAXA.js → chunk-DTPFRZWV.js} +5 -5
  26. package/dist/{chunk-NJQWZ447.js → chunk-EPXBOIA5.js} +6 -6
  27. package/dist/{chunk-7XNZDY2V.js → chunk-ETYWYJBX.js} +60 -60
  28. package/dist/chunk-FRNDDXVT.js +900 -0
  29. package/dist/{chunk-5SN5JBT2.js → chunk-FXMGS3L5.js} +21 -40
  30. package/dist/{chunk-3ERIN7PH.js → chunk-HG3YOAAE.js} +10 -10
  31. package/dist/chunk-I6WLABB2.js +429 -0
  32. package/dist/{chunk-GXDYIY4M.js → chunk-IDINCQMN.js} +56 -57
  33. package/dist/{chunk-ITLOFM5Q.js → chunk-IRTBJKYB.js} +11 -15
  34. package/dist/{chunk-53LS3WUO.js → chunk-JOIIWB3U.js} +116 -116
  35. package/dist/{chunk-CZL7DCL2.js → chunk-JYMY3OAI.js} +6 -6
  36. package/dist/{chunk-TATYN3T2.js → chunk-KB5DKCI4.js} +29 -29
  37. package/dist/{chunk-LKTTJWFT.js → chunk-KDP6C3CB.js} +5 -5
  38. package/dist/{chunk-OE4MFVDB.js → chunk-LKR4OOFJ.js} +5 -5
  39. package/dist/{chunk-ATFQZVBS.js → chunk-LMVSIVKQ.js} +9 -14
  40. package/dist/{chunk-ZKAW5JSN.js → chunk-LRJ4X43J.js} +5 -5
  41. package/dist/{chunk-ONHKZPSV.js → chunk-LRU47BGE.js} +6 -6
  42. package/dist/{chunk-C2WD2XUT.js → chunk-MJIP3FY5.js} +968 -1220
  43. package/dist/{chunk-4E7A3GDU.js → chunk-MM4ARWWY.js} +5 -5
  44. package/dist/{chunk-BUSRAOJT.js → chunk-N6H26BQE.js} +5 -5
  45. package/dist/{chunk-V2ZF7ETH.js → chunk-NVNI2SRU.js} +66 -68
  46. package/dist/{chunk-GKCSB52I.js → chunk-O3X5PEOU.js} +23 -27
  47. package/dist/{chunk-EPNDXRXB.js → chunk-OESCEI3R.js} +30 -34
  48. package/dist/{chunk-JHQHVXIR.js → chunk-OSHZ4P3G.js} +6 -7
  49. package/dist/{chunk-IPKE37QC.js → chunk-PFYALFCY.js} +6 -5
  50. package/dist/{chunk-WIQVR535.js → chunk-PUXNALMZ.js} +5 -5
  51. package/dist/{chunk-5HSKR6FE.js → chunk-QDOO76BJ.js} +46 -79
  52. package/dist/{chunk-FCYHZHVW.js → chunk-R3J2O23S.js} +4 -4
  53. package/dist/{chunk-PFLLVWZX.js → chunk-R6QH57HZ.js} +5 -5
  54. package/dist/chunk-RENAG7EW.js +900 -0
  55. package/dist/{chunk-TVGDXZ2E.js → chunk-S2CNOAWN.js} +9 -9
  56. package/dist/{chunk-Y3OWT3K2.js → chunk-TQFONRJP.js} +7 -7
  57. package/dist/{chunk-TQJ5XNIU.js → chunk-TWSSYOC7.js} +11 -10
  58. package/dist/{chunk-3BND5XB4.js → chunk-UTJGRVMG.js} +11 -11
  59. package/dist/{chunk-CHMJ5V7I.js → chunk-UZTXEBTM.js} +7 -7
  60. package/dist/{chunk-35JO7PFL.js → chunk-VTZ7JKBM.js} +5 -5
  61. package/dist/{chunk-6TXVGFQA.js → chunk-WSZXPLJQ.js} +11 -11
  62. package/dist/{chunk-BPZFDGKN.js → chunk-WXRVYSYN.js} +4 -7
  63. package/dist/{chunk-LD5ZZC24.js → chunk-X6N5SACR.js} +11 -15
  64. package/dist/{chunk-YTW4YPKF.js → chunk-XF3D7LPL.js} +9 -9
  65. package/dist/{chunk-7NHX62BP.js → chunk-XP2UYA2I.js} +23 -27
  66. package/dist/chunk-XR4RJTDM.js +101 -0
  67. package/dist/{chunk-47K4FUF7.js → chunk-YKMFYZPB.js} +22 -26
  68. package/dist/chunk-YR5KNFKN.js +1834 -0
  69. package/dist/{chunk-YIZAJNC6.js → chunk-ZIDL7EUE.js} +22 -26
  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-L6GBFCXG.js +0 -367
  215. package/dist/chunk-MGZOEY6N.js +0 -28
  216. package/dist/chunk-PNFNDBKA.js +0 -15631
  217. package/dist/chunk-S57RMXZW.js +0 -28
  218. package/dist/chunk-VRT7T6MF.js +0 -4959
  219. package/dist/chunk-WYFFSU2Q.js +0 -15631
  220. package/dist/chunk-YRBRUREX.js +0 -57
  221. package/dist/get-generators/generatorResolvers/generatorResolvers.d.ts +0 -15
  222. package/dist/get-generators/generatorResolvers/generatorResolvers.js +0 -135
  223. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.d.ts +0 -6
  224. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.js +0 -26
  225. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.d.ts +0 -9
  226. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +0 -26
  227. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.d.ts +0 -8
  228. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +0 -29
  229. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.d.ts +0 -6
  230. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +0 -135
  231. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.d.ts +0 -1
  232. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +0 -26
  233. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.d.ts +0 -20
  234. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.js +0 -26
  235. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.d.ts +0 -7
  236. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.d.ts +0 -1
  237. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.js +0 -17
  238. package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.d.ts +0 -20
  239. package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +0 -136
  240. package/dist/get-generators/utils/check-feature-flags/checkFeatureFlags.d.ts +0 -8
  241. package/dist/get-generators/utils/check-feature-flags/checkFeatureFlags.js +0 -25
@@ -1,13 +1,15 @@
1
- import type { BinaryPaths, GeneratorConfig, GeneratorManifest, GeneratorOptions } from '@prisma/generator-helper';
2
- export declare class Generator {
3
- private generatorProcess;
1
+ import type { BinaryPaths, Generator as IGenerator, GeneratorConfig, GeneratorManifest, GeneratorOptions } from '@prisma/generator';
2
+ export declare abstract class Generator {
4
3
  manifest: GeneratorManifest | null;
5
4
  config: GeneratorConfig;
6
5
  options?: GeneratorOptions;
7
- constructor(executablePath: string, config: GeneratorConfig, isNode?: boolean);
6
+ constructor(config: GeneratorConfig);
8
7
  init(): Promise<void>;
9
- stop(): void;
8
+ protected abstract initImpl(): Promise<void>;
9
+ protected abstract getManifest(): Promise<GeneratorManifest | null>;
10
+ abstract stop(): void;
10
11
  generate(): Promise<void>;
12
+ protected abstract generateImpl(options: GeneratorOptions): Promise<void>;
11
13
  setOptions(options: GeneratorOptions): void;
12
14
  setBinaryPaths(binaryPaths: BinaryPaths): void;
13
15
  /**
@@ -22,3 +24,19 @@ export declare class Generator {
22
24
  */
23
25
  getProvider(): string;
24
26
  }
27
+ export declare class JsonRpcGenerator extends Generator {
28
+ #private;
29
+ constructor(executablePath: string, config: GeneratorConfig, isNode?: boolean);
30
+ protected initImpl(): Promise<void>;
31
+ protected getManifest(): Promise<GeneratorManifest | null>;
32
+ protected generateImpl(options: GeneratorOptions): Promise<void>;
33
+ stop(): void;
34
+ }
35
+ export declare class InProcessGenerator extends Generator {
36
+ #private;
37
+ constructor(config: GeneratorConfig, generator: IGenerator);
38
+ protected initImpl(): Promise<void>;
39
+ protected getManifest(): Promise<GeneratorManifest | null>;
40
+ protected generateImpl(options: GeneratorOptions): Promise<void>;
41
+ stop(): void;
42
+ }
package/dist/Generator.js CHANGED
@@ -18,10 +18,12 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var Generator_exports = {};
20
20
  __export(Generator_exports, {
21
- Generator: () => import_chunk_ZYW3HGSH.Generator
21
+ Generator: () => import_chunk_BPDMLM32.Generator,
22
+ InProcessGenerator: () => import_chunk_BPDMLM32.InProcessGenerator,
23
+ JsonRpcGenerator: () => import_chunk_BPDMLM32.JsonRpcGenerator
22
24
  });
23
25
  module.exports = __toCommonJS(Generator_exports);
24
- var import_chunk_ZYW3HGSH = require("./chunk-ZYW3HGSH.js");
26
+ var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
25
27
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
26
28
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
27
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
29
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
@@ -18,8 +18,8 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var WasmPanicRegistry_exports = {};
20
20
  __export(WasmPanicRegistry_exports, {
21
- WasmPanicRegistry: () => import_chunk_BPZFDGKN.WasmPanicRegistry
21
+ WasmPanicRegistry: () => import_chunk_WXRVYSYN.WasmPanicRegistry
22
22
  });
23
23
  module.exports = __toCommonJS(WasmPanicRegistry_exports);
24
- var import_chunk_BPZFDGKN = require("./chunk-BPZFDGKN.js");
25
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
24
+ var import_chunk_WXRVYSYN = require("./chunk-WXRVYSYN.js");
25
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
@@ -26,27 +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_PIPE5DSU_exports = {};
30
- __export(chunk_PIPE5DSU_exports, {
31
- findPrismaClientDir: () => findPrismaClientDir
29
+ var chunk_2H6XXXKO_exports = {};
30
+ __export(chunk_2H6XXXKO_exports, {
31
+ inferDirectoryConfig: () => inferDirectoryConfig
32
32
  });
33
- module.exports = __toCommonJS(chunk_PIPE5DSU_exports);
34
- var import_chunk_YXD4CJDK = require("./chunk-YXD4CJDK.js");
35
- var import_debug = __toESM(require("@prisma/debug"));
36
- var import_fs = __toESM(require("fs"));
33
+ module.exports = __toCommonJS(chunk_2H6XXXKO_exports);
37
34
  var import_path = __toESM(require("path"));
38
- var debug = (0, import_debug.default)("prisma:generator");
39
- var realPath = import_fs.default.promises.realpath;
40
- async function findPrismaClientDir(baseDir) {
41
- const resolveOpts = { basedir: baseDir, preserveSymlinks: true };
42
- const CLIDir = await (0, import_chunk_YXD4CJDK.resolvePkg)("prisma", resolveOpts);
43
- const clientDir = await (0, import_chunk_YXD4CJDK.resolvePkg)("@prisma/client", resolveOpts);
44
- const resolvedClientDir = clientDir && await realPath(clientDir);
45
- debug("prismaCLIDir", CLIDir);
46
- debug("prismaClientDir", clientDir);
47
- if (CLIDir === void 0) return resolvedClientDir;
48
- if (clientDir === void 0) return resolvedClientDir;
49
- const relDir = import_path.default.relative(CLIDir, clientDir).split(import_path.default.sep);
50
- if (relDir[0] !== ".." || relDir[1] === "..") return void 0;
51
- return resolvedClientDir;
35
+ function inferDirectoryConfig(schemaContext, cwd = process.cwd()) {
36
+ const baseDir = (
37
+ // All default paths are relative to the `schema.prisma` file that contains the primary datasource.
38
+ // That schema file should usually be the users "root" aka main schema file.
39
+ schemaContext?.primaryDatasourceDirectory ?? // If no primary datasource exists we use the schemaRootDir.
40
+ // `schemaRootDir` is either the directory the user supplied as schemaPath or the directory the single schema file is in.
41
+ schemaContext?.schemaRootDir ?? // Should also that not be defined because there is no schema yet we fallback to CWD + `/prisma`.
42
+ import_path.default.join(cwd, "prisma")
43
+ );
44
+ return {
45
+ viewsDirPath: import_path.default.join(baseDir, "views"),
46
+ typedSqlDirPath: import_path.default.join(baseDir, "sql"),
47
+ migrationsDirPath: import_path.default.join(baseDir, "migrations")
48
+ };
52
49
  }
@@ -16,30 +16,30 @@ 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_XLGODPZH_exports = {};
20
- __export(chunk_XLGODPZH_exports, {
19
+ var chunk_3DQANJMY_exports = {};
20
+ __export(chunk_3DQANJMY_exports, {
21
21
  getEngineVersion: () => getEngineVersion,
22
22
  safeGetEngineVersion: () => safeGetEngineVersion
23
23
  });
24
- module.exports = __toCommonJS(chunk_XLGODPZH_exports);
25
- var import_chunk_I7IEEULS = require("./chunk-I7IEEULS.js");
26
- var import_chunk_7XNZDY2V = require("./chunk-7XNZDY2V.js");
27
- var import_chunk_3ERIN7PH = require("./chunk-3ERIN7PH.js");
28
- var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
29
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
24
+ module.exports = __toCommonJS(chunk_3DQANJMY_exports);
25
+ var import_chunk_6TTRTZXU = require("./chunk-6TTRTZXU.js");
26
+ var import_chunk_ETYWYJBX = require("./chunk-ETYWYJBX.js");
27
+ var import_chunk_HG3YOAAE = require("./chunk-HG3YOAAE.js");
28
+ var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
29
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
30
30
  var import_engines = require("@prisma/engines");
31
31
  var import_fetch_engine = require("@prisma/fetch-engine");
32
32
  var import_get_platform = require("@prisma/get-platform");
33
- var import_execa = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_7XNZDY2V.require_execa)());
33
+ var import_execa = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_ETYWYJBX.require_execa)());
34
34
  async function getEngineVersion(enginePath, binaryName) {
35
35
  if (!binaryName) {
36
36
  binaryName = (0, import_engines.getCliQueryEngineBinaryType)();
37
37
  }
38
- enginePath = await (0, import_chunk_3ERIN7PH.resolveBinary)(binaryName, enginePath);
38
+ enginePath = await (0, import_chunk_HG3YOAAE.resolveBinary)(binaryName, enginePath);
39
39
  const platformInfo = await (0, import_get_platform.getPlatformInfo)();
40
40
  if (binaryName === import_fetch_engine.BinaryType.QueryEngineLibrary) {
41
41
  (0, import_get_platform.assertNodeAPISupported)();
42
- const QE = (0, import_chunk_I7IEEULS.loadLibrary)(enginePath, platformInfo);
42
+ const QE = (0, import_chunk_6TTRTZXU.loadLibrary)(enginePath, platformInfo);
43
43
  return `${import_fetch_engine.BinaryType.QueryEngineLibrary} ${QE.version().commit}`;
44
44
  } else {
45
45
  const { stdout } = await (0, import_execa.default)(enginePath, ["--version"]);
@@ -47,7 +47,7 @@ async function getEngineVersion(enginePath, binaryName) {
47
47
  }
48
48
  }
49
49
  function safeGetEngineVersion(enginePath, binaryName) {
50
- return (0, import_chunk_7MD6344A.tryCatch2)(
50
+ return (0, import_chunk_5DBOS77Y.tryCatch2)(
51
51
  () => getEngineVersion(enginePath, binaryName),
52
52
  (error) => error
53
53
  );
@@ -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_Y556XG3B_exports = {};
20
- __export(chunk_Y556XG3B_exports, {
19
+ var chunk_3HN6ODNI_exports = {};
20
+ __export(chunk_3HN6ODNI_exports, {
21
21
  require_package: () => require_package
22
22
  });
23
- module.exports = __toCommonJS(chunk_Y556XG3B_exports);
24
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
25
- var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
23
+ module.exports = __toCommonJS(chunk_3HN6ODNI_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",
29
- version: "6.6.0-dev.9",
29
+ version: "6.6.0-dev.91",
30
30
  description: "This package is intended for Prisma's internal use",
31
31
  main: "dist/index.js",
32
32
  types: "dist/index.d.ts",
@@ -53,7 +53,6 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
53
53
  "scripts"
54
54
  ],
55
55
  devDependencies: {
56
- "@antfu/ni": "0.21.12",
57
56
  "@babel/helper-validator-identifier": "7.25.9",
58
57
  "@opentelemetry/api": "1.9.0",
59
58
  "@swc/core": "1.11.5",
@@ -66,8 +65,8 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
66
65
  "checkpoint-client": "1.1.33",
67
66
  "cli-truncate": "4.0.0",
68
67
  dotenv: "16.4.7",
69
- esbuild: "0.24.2",
70
- "escape-string-regexp": "4.0.0",
68
+ esbuild: "0.25.1",
69
+ "escape-string-regexp": "5.0.0",
71
70
  execa: "5.1.1",
72
71
  "fast-glob": "3.3.3",
73
72
  "find-up": "7.0.0",
@@ -96,7 +95,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
96
95
  "strip-indent": "4.0.0",
97
96
  "temp-dir": "2.0.0",
98
97
  tempy: "1.0.1",
99
- "terminal-link": "2.1.1",
98
+ "terminal-link": "4.0.0",
100
99
  tmp: "0.2.3",
101
100
  "ts-node": "10.9.2",
102
101
  "ts-pattern": "5.6.2",
@@ -107,11 +106,13 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
107
106
  dependencies: {
108
107
  "@prisma/config": "workspace:*",
109
108
  "@prisma/debug": "workspace:*",
109
+ "@prisma/dmmf": "workspace:*",
110
110
  "@prisma/engines": "workspace:*",
111
111
  "@prisma/fetch-engine": "workspace:*",
112
+ "@prisma/generator": "workspace:*",
112
113
  "@prisma/generator-helper": "workspace:*",
113
114
  "@prisma/get-platform": "workspace:*",
114
- "@prisma/prisma-schema-wasm": "6.6.0-8.725ea6aafbde3109ce0f840593ac739332fe78a2",
115
+ "@prisma/prisma-schema-wasm": "6.6.0-45.fbda4d61f6cc9c7361b803e72f3a0ffeb87db447",
115
116
  "@prisma/schema-files-loader": "workspace:*",
116
117
  arg: "5.0.2",
117
118
  prompts: "2.4.2"
@@ -16,41 +16,26 @@ 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_WWAWV7DQ_exports = {};
20
- __export(chunk_WWAWV7DQ_exports, {
19
+ var chunk_4VNS5WPM_exports = {};
20
+ __export(chunk_4VNS5WPM_exports, {
21
21
  __commonJS: () => __commonJS,
22
- __esm: () => __esm,
23
22
  __export: () => __export2,
24
- __privateAdd: () => __privateAdd,
25
- __privateGet: () => __privateGet,
26
- __privateMethod: () => __privateMethod,
27
- __privateSet: () => __privateSet,
28
- __privateWrapper: () => __privateWrapper,
29
- __publicField: () => __publicField,
30
23
  __require: () => __require,
31
- __toCommonJS: () => __toCommonJS2,
32
24
  __toESM: () => __toESM
33
25
  });
34
- module.exports = __toCommonJS(chunk_WWAWV7DQ_exports);
26
+ module.exports = __toCommonJS(chunk_4VNS5WPM_exports);
35
27
  var __create = Object.create;
36
28
  var __defProp2 = Object.defineProperty;
37
29
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
38
30
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
39
31
  var __getProtoOf = Object.getPrototypeOf;
40
32
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
41
- var __typeError = (msg) => {
42
- throw TypeError(msg);
43
- };
44
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
45
33
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
46
34
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
47
35
  }) : x)(function(x) {
48
36
  if (typeof require !== "undefined") return require.apply(this, arguments);
49
37
  throw Error('Dynamic require of "' + x + '" is not supported');
50
38
  });
51
- var __esm = (fn, res) => function __init() {
52
- return fn && (res = (0, fn[__getOwnPropNames2(fn)[0]])(fn = 0)), res;
53
- };
54
39
  var __commonJS = (cb, mod) => function __require2() {
55
40
  return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
56
41
  };
@@ -74,18 +59,3 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
74
59
  isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
75
60
  mod
76
61
  ));
77
- var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
78
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
79
- var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
80
- var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
81
- var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
82
- var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
83
- var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
84
- var __privateWrapper = (obj, member, setter, getter) => ({
85
- set _(value) {
86
- __privateSet(obj, member, value, setter);
87
- },
88
- get _() {
89
- return __privateGet(obj, member, getter);
90
- }
91
- });
@@ -26,15 +26,15 @@ 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_KQOJB3ZW_exports = {};
30
- __export(chunk_KQOJB3ZW_exports, {
29
+ var chunk_5AI4FIZ3_exports = {};
30
+ __export(chunk_5AI4FIZ3_exports, {
31
31
  ErrorKind: () => ErrorKind,
32
32
  createErrorReport: () => createErrorReport,
33
33
  makeErrorReportCompleted: () => makeErrorReportCompleted,
34
34
  uploadZip: () => uploadZip
35
35
  });
36
- module.exports = __toCommonJS(chunk_KQOJB3ZW_exports);
37
- var import_chunk_V2ZF7ETH = require("./chunk-V2ZF7ETH.js");
36
+ module.exports = __toCommonJS(chunk_5AI4FIZ3_exports);
37
+ var import_chunk_NVNI2SRU = require("./chunk-NVNI2SRU.js");
38
38
  var import_fetch_engine = require("@prisma/fetch-engine");
39
39
  var import_node_http = __toESM(require("node:http"));
40
40
  var import_node_https = __toESM(require("node:https"));
@@ -151,8 +151,8 @@ var Body = class {
151
151
  } else if (ArrayBuffer.isView(body)) {
152
152
  body = import_node_buffer2.Buffer.from(body.buffer, body.byteOffset, body.byteLength);
153
153
  } else if (body instanceof import_node_stream2.default) {
154
- } else if (body instanceof import_chunk_V2ZF7ETH.FormData) {
155
- body = (0, import_chunk_V2ZF7ETH.formDataToBlob)(body);
154
+ } else if (body instanceof import_chunk_NVNI2SRU.FormData) {
155
+ body = (0, import_chunk_NVNI2SRU.formDataToBlob)(body);
156
156
  boundary = body.type.split("=")[1];
157
157
  } else {
158
158
  body = import_node_buffer2.Buffer.from(String(body));
@@ -196,14 +196,14 @@ var Body = class {
196
196
  async formData() {
197
197
  const ct = this.headers.get("content-type");
198
198
  if (ct.startsWith("application/x-www-form-urlencoded")) {
199
- const formData = new import_chunk_V2ZF7ETH.FormData();
199
+ const formData = new import_chunk_NVNI2SRU.FormData();
200
200
  const parameters = new URLSearchParams(await this.text());
201
201
  for (const [name, value] of parameters) {
202
202
  formData.append(name, value);
203
203
  }
204
204
  return formData;
205
205
  }
206
- const { toFormData } = await import("./multipart-parser-32AROPTR.js");
206
+ const { toFormData } = await import("./multipart-parser-3AFJFP6K.js");
207
207
  return toFormData(this.body, ct);
208
208
  }
209
209
  /**
@@ -214,7 +214,7 @@ var Body = class {
214
214
  async blob() {
215
215
  const ct = this.headers && this.headers.get("content-type") || this[INTERNALS].body && this[INTERNALS].body.type || "";
216
216
  const buf = await this.arrayBuffer();
217
- return new import_chunk_V2ZF7ETH.fetch_blob_default([buf], {
217
+ return new import_chunk_NVNI2SRU.fetch_blob_default([buf], {
218
218
  type: ct
219
219
  });
220
220
  }
@@ -342,7 +342,7 @@ var extractContentType = (body, request2) => {
342
342
  if (import_node_buffer2.Buffer.isBuffer(body) || import_node_util.types.isAnyArrayBuffer(body) || ArrayBuffer.isView(body)) {
343
343
  return null;
344
344
  }
345
- if (body instanceof import_chunk_V2ZF7ETH.FormData) {
345
+ if (body instanceof import_chunk_NVNI2SRU.FormData) {
346
346
  return `multipart/form-data; boundary=${request2[INTERNALS].boundary}`;
347
347
  }
348
348
  if (body && typeof body.getBoundary === "function") {
@@ -16,13 +16,12 @@ 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_7MD6344A_exports = {};
20
- __export(chunk_7MD6344A_exports, {
19
+ var chunk_5DBOS77Y_exports = {};
20
+ __export(chunk_5DBOS77Y_exports, {
21
21
  as: () => as,
22
22
  asUnit: () => asUnit,
23
23
  chain: () => chain,
24
24
  chainW: () => chainW,
25
- chainW2: () => chainW2,
26
25
  dual: () => dual,
27
26
  fromEither: () => fromEither,
28
27
  getOrElseW: () => getOrElseW,
@@ -41,7 +40,7 @@ __export(chunk_7MD6344A_exports, {
41
40
  tryCatch: () => tryCatch,
42
41
  tryCatch2: () => tryCatch2
43
42
  });
44
- module.exports = __toCommonJS(chunk_7MD6344A_exports);
43
+ module.exports = __toCommonJS(chunk_5DBOS77Y_exports);
45
44
  var __spreadArray = function(to, from, pack) {
46
45
  if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
47
46
  if (ar || !(i in from)) {
@@ -608,4 +607,3 @@ var _FromIO2 = {
608
607
  fromIO: FromIO2.fromIO
609
608
  };
610
609
  var chain = flatMap4;
611
- var chainW2 = flatMap4;
@@ -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_TZCE3PWZ_exports = {};
20
- __export(chunk_TZCE3PWZ_exports, {
19
+ var chunk_5VQNKCKW_exports = {};
20
+ __export(chunk_5VQNKCKW_exports, {
21
21
  require_temp_dir: () => require_temp_dir
22
22
  });
23
- module.exports = __toCommonJS(chunk_TZCE3PWZ_exports);
24
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
25
- var require_temp_dir = (0, import_chunk_WWAWV7DQ.__commonJS)({
23
+ module.exports = __toCommonJS(chunk_5VQNKCKW_exports);
24
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
25
+ var require_temp_dir = (0, import_chunk_4VNS5WPM.__commonJS)({
26
26
  "../../node_modules/.pnpm/temp-dir@2.0.0/node_modules/temp-dir/index.js"(exports, module2) {
27
27
  "use strict";
28
- var fs = (0, import_chunk_WWAWV7DQ.__require)("fs");
29
- var os = (0, import_chunk_WWAWV7DQ.__require)("os");
28
+ var fs = (0, import_chunk_4VNS5WPM.__require)("fs");
29
+ var os = (0, import_chunk_4VNS5WPM.__require)("os");
30
30
  var tempDirectorySymbol = Symbol.for("__RESOLVED_TEMP_DIRECTORY__");
31
31
  if (!global[tempDirectorySymbol]) {
32
32
  Object.defineProperty(global, tempDirectorySymbol, {
@@ -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_TKQ7NOUN_exports = {};
30
- __export(chunk_TKQ7NOUN_exports, {
29
+ var chunk_5XZG3TEG_exports = {};
30
+ __export(chunk_5XZG3TEG_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_TKQ7NOUN_exports);
38
- var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
39
- var import_chunk_6TXVGFQA = require("./chunk-6TXVGFQA.js");
37
+ module.exports = __toCommonJS(chunk_5XZG3TEG_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_OE4MFVDB = require("./chunk-OE4MFVDB.js");
42
- var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
41
+ var import_chunk_VTZ7JKBM = require("./chunk-VTZ7JKBM.js");
42
+ var import_chunk_S2CNOAWN = require("./chunk-S2CNOAWN.js");
43
+ var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
43
44
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
44
- var import_chunk_YTW4YPKF = require("./chunk-YTW4YPKF.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_OE4MFVDB.addVersionDetailsToErrorMessage)(errorMessageWithContext));
67
+ super((0, import_chunk_VTZ7JKBM.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_YTW4YPKF.prismaSchemaWasm.debug_panic();
92
+ import_chunk_S2CNOAWN.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_YTW4YPKF.prismaSchemaWasm.get_config(params);
100
+ const data = import_chunk_S2CNOAWN.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) => {