@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_RLDUMTXD_exports = {};
30
- __export(chunk_RLDUMTXD_exports, {
29
+ var chunk_B6NQCD2C_exports = {};
30
+ __export(chunk_B6NQCD2C_exports, {
31
31
  GetDmmfError: () => GetDmmfError,
32
32
  getDMMF: () => getDMMF
33
33
  });
34
- module.exports = __toCommonJS(chunk_RLDUMTXD_exports);
35
- var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
36
- var import_chunk_6TXVGFQA = require("./chunk-6TXVGFQA.js");
37
- var import_chunk_PJYVXCB6 = require("./chunk-PJYVXCB6.js");
38
- var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
34
+ module.exports = __toCommonJS(chunk_B6NQCD2C_exports);
35
+ var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
36
+ var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
37
+ var import_chunk_Q33Z6IUP = require("./chunk-Q33Z6IUP.js");
38
+ var import_chunk_N5S7K4Y6 = require("./chunk-N5S7K4Y6.js");
39
+ var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
39
40
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
40
- var import_chunk_SNAZMEHK = require("./chunk-SNAZMEHK.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_PJYVXCB6.addVersionDetailsToErrorMessage)(errorMessageWithContext));
61
+ super((0, import_chunk_Q33Z6IUP.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_N5S7K4Y6.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_N5S7K4Y6.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_SNAZMEHK.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_SNAZMEHK.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 });
@@ -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_C4HY6GXT_exports = {};
20
- __export(chunk_C4HY6GXT_exports, {
19
+ var chunk_BUIBZ427_exports = {};
20
+ __export(chunk_BUIBZ427_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_C4HY6GXT_exports);
28
- var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
29
- var import_chunk_VJRLBRVK = require("./chunk-VJRLBRVK.js");
30
- var import_chunk_ATFQZVBS = require("./chunk-ATFQZVBS.js");
27
+ module.exports = __toCommonJS(chunk_BUIBZ427_exports);
28
+ var import_chunk_6EV2YAT6 = require("./chunk-6EV2YAT6.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_VJRLBRVK.prismaSchemaWasm.lint(JSON.stringify(schemas));
32
+ const lintResult = import_chunk_6EV2YAT6.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,13 +26,12 @@ 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_VRT7T6MF_exports = {};
30
- __export(chunk_VRT7T6MF_exports, {
29
+ var chunk_BWGDP6B5_exports = {};
30
+ __export(chunk_BWGDP6B5_exports, {
31
31
  detect: () => detect,
32
32
  getCommand: () => getCommand
33
33
  });
34
- module.exports = __toCommonJS(chunk_VRT7T6MF_exports);
35
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
34
+ module.exports = __toCommonJS(chunk_BWGDP6B5_exports);
36
35
  var import_node_fs = __toESM(require("node:fs"));
37
36
  var import_node_path = __toESM(require("node:path"));
38
37
  var import_node_process = __toESM(require("node:process"));
@@ -1169,17 +1168,17 @@ var kExitEmitter = Symbol.for("signal-exit emitter");
1169
1168
  var global$1 = globalThis;
1170
1169
  var ObjectDefineProperty = Object.defineProperty.bind(Object);
1171
1170
  var Emitter = class {
1171
+ emitted = {
1172
+ afterExit: false,
1173
+ exit: false
1174
+ };
1175
+ listeners = {
1176
+ afterExit: [],
1177
+ exit: []
1178
+ };
1179
+ count = 0;
1180
+ id = Math.random();
1172
1181
  constructor() {
1173
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "emitted", {
1174
- afterExit: false,
1175
- exit: false
1176
- });
1177
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "listeners", {
1178
- afterExit: [],
1179
- exit: []
1180
- });
1181
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "count", 0);
1182
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "id", Math.random());
1183
1182
  if (global$1[kExitEmitter]) {
1184
1183
  return global$1[kExitEmitter];
1185
1184
  }
@@ -1245,125 +1244,119 @@ var SignalExitFallback = class extends SignalExitBase {
1245
1244
  unload() {
1246
1245
  }
1247
1246
  };
1248
- var _hupSig, _emitter, _process, _originalProcessEmit, _originalProcessReallyExit, _sigListeners, _loaded, _SignalExit_instances, processReallyExit_fn, processEmit_fn;
1249
1247
  var SignalExit = class extends SignalExitBase {
1248
+ // "SIGHUP" throws an `ENOSYS` error on Windows,
1249
+ // so use a supported signal instead
1250
+ /* c8 ignore start */
1251
+ #hupSig = process$1.platform === "win32" ? "SIGINT" : "SIGHUP";
1252
+ /* c8 ignore stop */
1253
+ #emitter = new Emitter();
1254
+ #process;
1255
+ #originalProcessEmit;
1256
+ #originalProcessReallyExit;
1257
+ #sigListeners = {};
1258
+ #loaded = false;
1250
1259
  constructor(process2) {
1251
1260
  super();
1252
- (0, import_chunk_WWAWV7DQ.__privateAdd)(this, _SignalExit_instances);
1253
- (0, import_chunk_WWAWV7DQ.__privateAdd)(this, _hupSig, process$1.platform === "win32" ? "SIGINT" : "SIGHUP");
1254
- (0, import_chunk_WWAWV7DQ.__privateAdd)(this, _emitter, new Emitter());
1255
- (0, import_chunk_WWAWV7DQ.__privateAdd)(this, _process);
1256
- (0, import_chunk_WWAWV7DQ.__privateAdd)(this, _originalProcessEmit);
1257
- (0, import_chunk_WWAWV7DQ.__privateAdd)(this, _originalProcessReallyExit);
1258
- (0, import_chunk_WWAWV7DQ.__privateAdd)(this, _sigListeners, {});
1259
- (0, import_chunk_WWAWV7DQ.__privateAdd)(this, _loaded, false);
1260
- (0, import_chunk_WWAWV7DQ.__privateSet)(this, _process, process2);
1261
- (0, import_chunk_WWAWV7DQ.__privateSet)(this, _sigListeners, {});
1261
+ this.#process = process2;
1262
+ this.#sigListeners = {};
1262
1263
  for (const sig of signals) {
1263
- (0, import_chunk_WWAWV7DQ.__privateGet)(this, _sigListeners)[sig] = () => {
1264
- const listeners = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _process).listeners(sig);
1265
- let { count } = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _emitter);
1264
+ this.#sigListeners[sig] = () => {
1265
+ const listeners = this.#process.listeners(sig);
1266
+ let { count } = this.#emitter;
1266
1267
  const p = process2;
1267
1268
  if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
1268
1269
  count += p.__signal_exit_emitter__.count;
1269
1270
  }
1270
1271
  if (listeners.length === count) {
1271
1272
  this.unload();
1272
- const ret = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _emitter).emit("exit", null, sig);
1273
- const s = sig === "SIGHUP" ? (0, import_chunk_WWAWV7DQ.__privateGet)(this, _hupSig) : sig;
1273
+ const ret = this.#emitter.emit("exit", null, sig);
1274
+ const s = sig === "SIGHUP" ? this.#hupSig : sig;
1274
1275
  if (!ret)
1275
1276
  process2.kill(process2.pid, s);
1276
1277
  }
1277
1278
  };
1278
1279
  }
1279
- (0, import_chunk_WWAWV7DQ.__privateSet)(this, _originalProcessReallyExit, process2.reallyExit);
1280
- (0, import_chunk_WWAWV7DQ.__privateSet)(this, _originalProcessEmit, process2.emit);
1280
+ this.#originalProcessReallyExit = process2.reallyExit;
1281
+ this.#originalProcessEmit = process2.emit;
1281
1282
  }
1282
1283
  onExit(cb, opts) {
1283
- if (!processOk((0, import_chunk_WWAWV7DQ.__privateGet)(this, _process))) {
1284
+ if (!processOk(this.#process)) {
1284
1285
  return () => {
1285
1286
  };
1286
1287
  }
1287
- if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _loaded) === false) {
1288
+ if (this.#loaded === false) {
1288
1289
  this.load();
1289
1290
  }
1290
1291
  const ev = opts?.alwaysLast ? "afterExit" : "exit";
1291
- (0, import_chunk_WWAWV7DQ.__privateGet)(this, _emitter).on(ev, cb);
1292
+ this.#emitter.on(ev, cb);
1292
1293
  return () => {
1293
- (0, import_chunk_WWAWV7DQ.__privateGet)(this, _emitter).removeListener(ev, cb);
1294
- if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _emitter).listeners["exit"].length === 0 && (0, import_chunk_WWAWV7DQ.__privateGet)(this, _emitter).listeners["afterExit"].length === 0) {
1294
+ this.#emitter.removeListener(ev, cb);
1295
+ if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
1295
1296
  this.unload();
1296
1297
  }
1297
1298
  };
1298
1299
  }
1299
1300
  load() {
1300
- if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _loaded)) {
1301
+ if (this.#loaded) {
1301
1302
  return;
1302
1303
  }
1303
- (0, import_chunk_WWAWV7DQ.__privateSet)(this, _loaded, true);
1304
- (0, import_chunk_WWAWV7DQ.__privateGet)(this, _emitter).count += 1;
1304
+ this.#loaded = true;
1305
+ this.#emitter.count += 1;
1305
1306
  for (const sig of signals) {
1306
1307
  try {
1307
- const fn = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _sigListeners)[sig];
1308
+ const fn = this.#sigListeners[sig];
1308
1309
  if (fn)
1309
- (0, import_chunk_WWAWV7DQ.__privateGet)(this, _process).on(sig, fn);
1310
+ this.#process.on(sig, fn);
1310
1311
  } catch (_) {
1311
1312
  }
1312
1313
  }
1313
- (0, import_chunk_WWAWV7DQ.__privateGet)(this, _process).emit = (ev, ...a) => {
1314
- return (0, import_chunk_WWAWV7DQ.__privateMethod)(this, _SignalExit_instances, processEmit_fn).call(this, ev, ...a);
1314
+ this.#process.emit = (ev, ...a) => {
1315
+ return this.#processEmit(ev, ...a);
1315
1316
  };
1316
- (0, import_chunk_WWAWV7DQ.__privateGet)(this, _process).reallyExit = (code) => {
1317
- return (0, import_chunk_WWAWV7DQ.__privateMethod)(this, _SignalExit_instances, processReallyExit_fn).call(this, code);
1317
+ this.#process.reallyExit = (code) => {
1318
+ return this.#processReallyExit(code);
1318
1319
  };
1319
1320
  }
1320
1321
  unload() {
1321
- if (!(0, import_chunk_WWAWV7DQ.__privateGet)(this, _loaded)) {
1322
+ if (!this.#loaded) {
1322
1323
  return;
1323
1324
  }
1324
- (0, import_chunk_WWAWV7DQ.__privateSet)(this, _loaded, false);
1325
+ this.#loaded = false;
1325
1326
  signals.forEach((sig) => {
1326
- const listener = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _sigListeners)[sig];
1327
+ const listener = this.#sigListeners[sig];
1327
1328
  if (!listener) {
1328
1329
  throw new Error("Listener not defined for signal: " + sig);
1329
1330
  }
1330
1331
  try {
1331
- (0, import_chunk_WWAWV7DQ.__privateGet)(this, _process).removeListener(sig, listener);
1332
+ this.#process.removeListener(sig, listener);
1332
1333
  } catch (_) {
1333
1334
  }
1334
1335
  });
1335
- (0, import_chunk_WWAWV7DQ.__privateGet)(this, _process).emit = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _originalProcessEmit);
1336
- (0, import_chunk_WWAWV7DQ.__privateGet)(this, _process).reallyExit = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _originalProcessReallyExit);
1337
- (0, import_chunk_WWAWV7DQ.__privateGet)(this, _emitter).count -= 1;
1338
- }
1339
- };
1340
- _hupSig = /* @__PURE__ */ new WeakMap();
1341
- _emitter = /* @__PURE__ */ new WeakMap();
1342
- _process = /* @__PURE__ */ new WeakMap();
1343
- _originalProcessEmit = /* @__PURE__ */ new WeakMap();
1344
- _originalProcessReallyExit = /* @__PURE__ */ new WeakMap();
1345
- _sigListeners = /* @__PURE__ */ new WeakMap();
1346
- _loaded = /* @__PURE__ */ new WeakMap();
1347
- _SignalExit_instances = /* @__PURE__ */ new WeakSet();
1348
- processReallyExit_fn = function(code) {
1349
- if (!processOk((0, import_chunk_WWAWV7DQ.__privateGet)(this, _process))) {
1350
- return 0;
1351
- }
1352
- (0, import_chunk_WWAWV7DQ.__privateGet)(this, _process).exitCode = code || 0;
1353
- (0, import_chunk_WWAWV7DQ.__privateGet)(this, _emitter).emit("exit", (0, import_chunk_WWAWV7DQ.__privateGet)(this, _process).exitCode, null);
1354
- return (0, import_chunk_WWAWV7DQ.__privateGet)(this, _originalProcessReallyExit).call((0, import_chunk_WWAWV7DQ.__privateGet)(this, _process), (0, import_chunk_WWAWV7DQ.__privateGet)(this, _process).exitCode);
1355
- };
1356
- processEmit_fn = function(ev, ...args) {
1357
- const og = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _originalProcessEmit);
1358
- if (ev === "exit" && processOk((0, import_chunk_WWAWV7DQ.__privateGet)(this, _process))) {
1359
- if (typeof args[0] === "number") {
1360
- (0, import_chunk_WWAWV7DQ.__privateGet)(this, _process).exitCode = args[0];
1336
+ this.#process.emit = this.#originalProcessEmit;
1337
+ this.#process.reallyExit = this.#originalProcessReallyExit;
1338
+ this.#emitter.count -= 1;
1339
+ }
1340
+ #processReallyExit(code) {
1341
+ if (!processOk(this.#process)) {
1342
+ return 0;
1343
+ }
1344
+ this.#process.exitCode = code || 0;
1345
+ this.#emitter.emit("exit", this.#process.exitCode, null);
1346
+ return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
1347
+ }
1348
+ #processEmit(ev, ...args) {
1349
+ const og = this.#originalProcessEmit;
1350
+ if (ev === "exit" && processOk(this.#process)) {
1351
+ if (typeof args[0] === "number") {
1352
+ this.#process.exitCode = args[0];
1353
+ }
1354
+ const ret = og.call(this.#process, ev, ...args);
1355
+ this.#emitter.emit("exit", this.#process.exitCode, null);
1356
+ return ret;
1357
+ } else {
1358
+ return og.call(this.#process, ev, ...args);
1361
1359
  }
1362
- const ret = og.call((0, import_chunk_WWAWV7DQ.__privateGet)(this, _process), ev, ...args);
1363
- (0, import_chunk_WWAWV7DQ.__privateGet)(this, _emitter).emit("exit", (0, import_chunk_WWAWV7DQ.__privateGet)(this, _process).exitCode, null);
1364
- return ret;
1365
- } else {
1366
- return og.call((0, import_chunk_WWAWV7DQ.__privateGet)(this, _process), ev, ...args);
1367
1360
  }
1368
1361
  };
1369
1362
  var process$1 = globalThis.process;
@@ -1569,9 +1562,9 @@ var getChunkType = (chunk) => {
1569
1562
  };
1570
1563
  var { toString: objectToString } = Object.prototype;
1571
1564
  var MaxBufferError = class extends Error {
1565
+ name = "MaxBufferError";
1572
1566
  constructor() {
1573
1567
  super("maxBuffer exceeded");
1574
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "name", "MaxBufferError");
1575
1568
  }
1576
1569
  };
1577
1570
  var identity = (value) => value;
@@ -1979,59 +1972,55 @@ function execaCommand(command, options2) {
1979
1972
  return execa(file, args, options2);
1980
1973
  }
1981
1974
  var Node = class {
1975
+ value;
1976
+ next;
1982
1977
  constructor(value) {
1983
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "value");
1984
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "next");
1985
1978
  this.value = value;
1986
1979
  }
1987
1980
  };
1988
- var _head, _tail, _size;
1989
1981
  var Queue = class {
1982
+ #head;
1983
+ #tail;
1984
+ #size;
1990
1985
  constructor() {
1991
- (0, import_chunk_WWAWV7DQ.__privateAdd)(this, _head);
1992
- (0, import_chunk_WWAWV7DQ.__privateAdd)(this, _tail);
1993
- (0, import_chunk_WWAWV7DQ.__privateAdd)(this, _size);
1994
1986
  this.clear();
1995
1987
  }
1996
1988
  enqueue(value) {
1997
1989
  const node = new Node(value);
1998
- if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _head)) {
1999
- (0, import_chunk_WWAWV7DQ.__privateGet)(this, _tail).next = node;
2000
- (0, import_chunk_WWAWV7DQ.__privateSet)(this, _tail, node);
1990
+ if (this.#head) {
1991
+ this.#tail.next = node;
1992
+ this.#tail = node;
2001
1993
  } else {
2002
- (0, import_chunk_WWAWV7DQ.__privateSet)(this, _head, node);
2003
- (0, import_chunk_WWAWV7DQ.__privateSet)(this, _tail, node);
1994
+ this.#head = node;
1995
+ this.#tail = node;
2004
1996
  }
2005
- (0, import_chunk_WWAWV7DQ.__privateWrapper)(this, _size)._++;
1997
+ this.#size++;
2006
1998
  }
2007
1999
  dequeue() {
2008
- const current = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _head);
2000
+ const current = this.#head;
2009
2001
  if (!current) {
2010
2002
  return;
2011
2003
  }
2012
- (0, import_chunk_WWAWV7DQ.__privateSet)(this, _head, (0, import_chunk_WWAWV7DQ.__privateGet)(this, _head).next);
2013
- (0, import_chunk_WWAWV7DQ.__privateWrapper)(this, _size)._--;
2004
+ this.#head = this.#head.next;
2005
+ this.#size--;
2014
2006
  return current.value;
2015
2007
  }
2016
2008
  clear() {
2017
- (0, import_chunk_WWAWV7DQ.__privateSet)(this, _head, void 0);
2018
- (0, import_chunk_WWAWV7DQ.__privateSet)(this, _tail, void 0);
2019
- (0, import_chunk_WWAWV7DQ.__privateSet)(this, _size, 0);
2009
+ this.#head = void 0;
2010
+ this.#tail = void 0;
2011
+ this.#size = 0;
2020
2012
  }
2021
2013
  get size() {
2022
- return (0, import_chunk_WWAWV7DQ.__privateGet)(this, _size);
2014
+ return this.#size;
2023
2015
  }
2024
2016
  *[Symbol.iterator]() {
2025
- let current = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _head);
2017
+ let current = this.#head;
2026
2018
  while (current) {
2027
2019
  yield current.value;
2028
2020
  current = current.next;
2029
2021
  }
2030
2022
  }
2031
2023
  };
2032
- _head = /* @__PURE__ */ new WeakMap();
2033
- _tail = /* @__PURE__ */ new WeakMap();
2034
- _size = /* @__PURE__ */ new WeakMap();
2035
2024
  function pLimit(concurrency) {
2036
2025
  if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {
2037
2026
  throw new TypeError("Expected `concurrency` to be a number from 1 and up");
@@ -26,14 +26,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_5MCWLJSR_exports = {};
30
- __export(chunk_5MCWLJSR_exports, {
29
+ var chunk_CR3XKUEA_exports = {};
30
+ __export(chunk_CR3XKUEA_exports, {
31
31
  isCurrentBinInstalledGlobally: () => isCurrentBinInstalledGlobally
32
32
  });
33
- module.exports = __toCommonJS(chunk_5MCWLJSR_exports);
34
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
33
+ module.exports = __toCommonJS(chunk_CR3XKUEA_exports);
34
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
35
35
  var import_fs = __toESM(require("fs"));
36
- var require_ini = (0, import_chunk_WWAWV7DQ.__commonJS)({
36
+ var require_ini = (0, import_chunk_4VNS5WPM.__commonJS)({
37
37
  "../../node_modules/.pnpm/ini@2.0.0/node_modules/ini/ini.js"(exports, module2) {
38
38
  "use strict";
39
39
  var { hasOwnProperty } = Object.prototype;
@@ -186,12 +186,12 @@ var require_ini = (0, import_chunk_WWAWV7DQ.__commonJS)({
186
186
  };
187
187
  }
188
188
  });
189
- var require_global_dirs = (0, import_chunk_WWAWV7DQ.__commonJS)({
189
+ var require_global_dirs = (0, import_chunk_4VNS5WPM.__commonJS)({
190
190
  "../../node_modules/.pnpm/global-dirs@4.0.0/node_modules/global-dirs/index.js"(exports) {
191
191
  "use strict";
192
- var path = (0, import_chunk_WWAWV7DQ.__require)("path");
193
- var os = (0, import_chunk_WWAWV7DQ.__require)("os");
194
- var fs2 = (0, import_chunk_WWAWV7DQ.__require)("fs");
192
+ var path = (0, import_chunk_4VNS5WPM.__require)("path");
193
+ var os = (0, import_chunk_4VNS5WPM.__require)("os");
194
+ var fs2 = (0, import_chunk_4VNS5WPM.__require)("fs");
195
195
  var ini = require_ini();
196
196
  var isWindows = process.platform === "win32";
197
197
  var readRc = (filePath) => {
@@ -282,7 +282,7 @@ var require_global_dirs = (0, import_chunk_WWAWV7DQ.__commonJS)({
282
282
  exports.yarn.binaries = path.join(exports.yarn.packages, ".bin");
283
283
  }
284
284
  });
285
- var import_global_dirs = (0, import_chunk_WWAWV7DQ.__toESM)(require_global_dirs());
285
+ var import_global_dirs = (0, import_chunk_4VNS5WPM.__toESM)(require_global_dirs());
286
286
  function isCurrentBinInstalledGlobally() {
287
287
  try {
288
288
  const realPrismaPath = import_fs.default.realpathSync(process.argv[1]);
@@ -16,12 +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_TSJICM5S_exports = {};
20
- __export(chunk_TSJICM5S_exports, {
19
+ var chunk_CRVLHWC5_exports = {};
20
+ __export(chunk_CRVLHWC5_exports, {
21
21
  extractPreviewFeatures: () => extractPreviewFeatures
22
22
  });
23
- module.exports = __toCommonJS(chunk_TSJICM5S_exports);
23
+ module.exports = __toCommonJS(chunk_CRVLHWC5_exports);
24
24
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
25
- function extractPreviewFeatures(config) {
26
- return config.generators.find((g) => (0, import_chunk_IOIAK7V7.parseEnvValue)(g.provider) === "prisma-client-js")?.previewFeatures || [];
25
+ function extractPreviewFeatures(generators) {
26
+ return generators.find((g) => (0, import_chunk_IOIAK7V7.parseEnvValue)(g.provider) === "prisma-client-js")?.previewFeatures || [];
27
27
  }
@@ -26,18 +26,18 @@ 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_SHJNE6T7_exports = {};
30
- __export(chunk_SHJNE6T7_exports, {
29
+ var chunk_D4VDA2TZ_exports = {};
30
+ __export(chunk_D4VDA2TZ_exports, {
31
31
  locateLocalCloudflareD1: () => locateLocalCloudflareD1
32
32
  });
33
- module.exports = __toCommonJS(chunk_SHJNE6T7_exports);
33
+ module.exports = __toCommonJS(chunk_D4VDA2TZ_exports);
34
34
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
35
- var import_chunk_53LS3WUO = require("./chunk-53LS3WUO.js");
36
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
35
+ var import_chunk_JOIIWB3U = require("./chunk-JOIIWB3U.js");
36
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
37
37
  var import_node_path = __toESM(require("node:path"));
38
38
  var import_node_process = __toESM(require("node:process"));
39
- var import_fast_glob = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_53LS3WUO.require_out)());
40
- var import_globby = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_53LS3WUO.require_globby)());
39
+ var import_fast_glob = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_JOIIWB3U.require_out)());
40
+ var import_globby = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_JOIIWB3U.require_globby)());
41
41
  var defaultD1DirPath = import_node_path.default.join(".wrangler", "state", "v3", "d1", "miniflare-D1DatabaseObject");
42
42
  async function locateLocalCloudflareD1({ arg }) {
43
43
  const cwd = import_node_process.default.cwd();