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

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-2QTAK7KO.js +101 -0
  4. package/dist/{chunk-XLGODPZH.js → chunk-3DQANJMY.js} +12 -12
  5. package/dist/{chunk-WWAWV7DQ.js → chunk-4VNS5WPM.js} +3 -33
  6. package/dist/{chunk-KQOJB3ZW.js → chunk-5AI4FIZ3.js} +10 -10
  7. package/dist/{chunk-7MD6344A.js → chunk-5DBOS77Y.js} +3 -5
  8. package/dist/{chunk-TZCE3PWZ.js → chunk-5VQNKCKW.js} +7 -7
  9. package/dist/{chunk-I7IEEULS.js → chunk-6TTRTZXU.js} +5 -5
  10. package/dist/{chunk-MGZOEY6N.js → chunk-72UZXEBG.js} +6 -6
  11. package/dist/{chunk-5RV3EMX6.js → chunk-75BIJ5PX.js} +57 -57
  12. package/dist/{chunk-RLDUMTXD.js → chunk-ANZ7I7BV.js} +46 -79
  13. package/dist/{chunk-BGFWFIPR.js → chunk-AZV6HVKA.js} +5 -5
  14. package/dist/{chunk-VRT7T6MF.js → chunk-BWGDP6B5.js} +94 -105
  15. package/dist/{chunk-5CIZXUQR.js → chunk-CPF2U6TN.js} +30 -34
  16. package/dist/{chunk-5MCWLJSR.js → chunk-CR3XKUEA.js} +10 -10
  17. package/dist/{chunk-TSJICM5S.js → chunk-CRVLHWC5.js} +5 -5
  18. package/dist/{chunk-SHJNE6T7.js → chunk-D4VDA2TZ.js} +7 -7
  19. package/dist/{chunk-MUPZUVSI.js → chunk-D4VZUY3O.js} +14 -20
  20. package/dist/{chunk-IPG5ZT4T.js → chunk-D6UC363D.js} +23 -27
  21. package/dist/{chunk-KTBNIQ7N.js → chunk-DKSUHQGA.js} +8 -8
  22. package/dist/chunk-DODIJPCS.js +34 -0
  23. package/dist/{chunk-45HF3I7B.js → chunk-DQTWQONJ.js} +5 -5
  24. package/dist/{chunk-UNUCCAXA.js → chunk-DTPFRZWV.js} +5 -5
  25. package/dist/{chunk-ZYW3HGSH.js → chunk-DYVL6P7F.js} +7 -8
  26. package/dist/{chunk-RUIW2PYP.js → chunk-E34H3BUU.js} +5 -5
  27. package/dist/{chunk-NJQWZ447.js → chunk-EPXBOIA5.js} +6 -6
  28. package/dist/{chunk-QXWVKT6L.js → chunk-EQVDLWDC.js} +22 -26
  29. package/dist/{chunk-7XNZDY2V.js → chunk-ETYWYJBX.js} +60 -60
  30. package/dist/{chunk-PIPE5DSU.js → chunk-EWWOTVR3.js} +6 -6
  31. package/dist/{chunk-5SN5JBT2.js → chunk-FXMGS3L5.js} +21 -40
  32. package/dist/{chunk-S57RMXZW.js → chunk-GHHABGYW.js} +5 -5
  33. package/dist/{chunk-C4HY6GXT.js → chunk-GLCSJAWZ.js} +11 -15
  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-GXDYIY4M.js → chunk-IDINCQMN.js} +56 -57
  37. package/dist/{chunk-53LS3WUO.js → chunk-JOIIWB3U.js} +116 -116
  38. package/dist/{chunk-CZL7DCL2.js → chunk-JYMY3OAI.js} +6 -6
  39. package/dist/{chunk-C2WD2XUT.js → chunk-K5W6WZ6E.js} +971 -991
  40. package/dist/{chunk-TATYN3T2.js → chunk-KB5DKCI4.js} +29 -29
  41. package/dist/{chunk-LKTTJWFT.js → chunk-KDP6C3CB.js} +5 -5
  42. package/dist/{chunk-VRBR7UXP.js → chunk-KG27IPLK.js} +30 -34
  43. package/dist/{chunk-A3N2Q2GK.js → chunk-KP4NQ45I.js} +11 -15
  44. package/dist/{chunk-SNAZMEHK.js → chunk-L5NNYEH3.js} +9 -9
  45. package/dist/{chunk-PJYVXCB6.js → chunk-LGHB6ROF.js} +5 -5
  46. package/dist/{chunk-ATFQZVBS.js → chunk-LMVSIVKQ.js} +9 -14
  47. package/dist/{chunk-VJRLBRVK.js → chunk-LQNSUOK4.js} +9 -9
  48. package/dist/{chunk-ZKAW5JSN.js → chunk-LRJ4X43J.js} +5 -5
  49. package/dist/{chunk-ONHKZPSV.js → chunk-LRU47BGE.js} +6 -6
  50. package/dist/{chunk-4E7A3GDU.js → chunk-MM4ARWWY.js} +5 -5
  51. package/dist/{chunk-3J24J2TX.js → chunk-NOFAEZS3.js} +10 -10
  52. package/dist/{chunk-V2ZF7ETH.js → chunk-NVNI2SRU.js} +66 -68
  53. package/dist/{chunk-JHQHVXIR.js → chunk-OSHZ4P3G.js} +6 -7
  54. package/dist/{chunk-IPKE37QC.js → chunk-PFYALFCY.js} +6 -5
  55. package/dist/{chunk-77IC3DNO.js → chunk-QGJH4P4N.js} +8 -8
  56. package/dist/{chunk-FCYHZHVW.js → chunk-R3J2O23S.js} +4 -4
  57. package/dist/{chunk-PFLLVWZX.js → chunk-R6QH57HZ.js} +5 -5
  58. package/dist/chunk-RKTHINSX.js +1076 -0
  59. package/dist/{chunk-6AAPRN4H.js → chunk-SVZEB4RG.js} +22 -26
  60. package/dist/{chunk-Y3OWT3K2.js → chunk-TQFONRJP.js} +7 -7
  61. package/dist/{chunk-BVKTPL5A.js → chunk-TTOY2EQP.js} +5 -5
  62. package/dist/chunk-TV34NMBZ.js +46 -0
  63. package/dist/{chunk-3BND5XB4.js → chunk-UTJGRVMG.js} +11 -11
  64. package/dist/{chunk-WUDS3ABI.js → chunk-UYCSSJQD.js} +46 -79
  65. package/dist/{chunk-CHMJ5V7I.js → chunk-UZTXEBTM.js} +7 -7
  66. package/dist/{chunk-YXD4CJDK.js → chunk-VVPSLVOR.js} +27 -27
  67. package/dist/{chunk-6TXVGFQA.js → chunk-WSZXPLJQ.js} +11 -11
  68. package/dist/{chunk-BPZFDGKN.js → chunk-WXRVYSYN.js} +4 -7
  69. package/dist/{chunk-2MWIMEFK.js → chunk-XLTQGAI2.js} +6 -6
  70. package/dist/{chunk-FIWY5LGI.js → chunk-XWWRHR2Z.js} +9 -9
  71. package/dist/chunk-YR5KNFKN.js +1834 -0
  72. package/dist/{chunk-BMJOVREG.js → chunk-Z6ZBU4HL.js} +23 -27
  73. package/dist/{chunk-AZNLB67U.js → chunk-ZJWZK45Z.js} +5 -5
  74. package/dist/chunk-ZKZRTPBY.js +1076 -0
  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,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_IPG5ZT4T_exports = {};
30
- __export(chunk_IPG5ZT4T_exports, {
29
+ var chunk_D6UC363D_exports = {};
30
+ __export(chunk_D6UC363D_exports, {
31
31
  ValidateError: () => ValidateError,
32
32
  validate: () => validate
33
33
  });
34
- module.exports = __toCommonJS(chunk_IPG5ZT4T_exports);
35
- var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
36
- var import_chunk_6TXVGFQA = require("./chunk-6TXVGFQA.js");
34
+ module.exports = __toCommonJS(chunk_D6UC363D_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_PJYVXCB6 = require("./chunk-PJYVXCB6.js");
39
- var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
38
+ var import_chunk_LGHB6ROF = require("./chunk-LGHB6ROF.js");
39
+ var import_chunk_LQNSUOK4 = require("./chunk-LQNSUOK4.js");
40
+ var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
40
41
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
41
- var import_chunk_SNAZMEHK = require("./chunk-SNAZMEHK.js");
42
- var import_chunk_ATFQZVBS = require("./chunk-ATFQZVBS.js");
43
- var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
42
+ var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
44
43
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
45
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
44
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
46
45
  var import_debug = __toESM(require("@prisma/debug"));
47
- var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVWZX.require_function)());
46
+ var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57HZ.require_function)());
48
47
  var debug = (0, import_debug.default)("prisma:validate");
49
48
  var ValidateError = class extends Error {
50
49
  constructor(params) {
@@ -60,25 +59,25 @@ ${detailsHeader} ${message}`;
60
59
  }).exhaustive();
61
60
  const errorMessageWithContext = `${constructedErrorMessage}
62
61
  [Context: validate]`;
63
- super((0, import_chunk_PJYVXCB6.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
+ super((0, import_chunk_LGHB6ROF.addVersionDetailsToErrorMessage)(errorMessageWithContext));
64
63
  this.name = "ValidateError";
65
64
  }
66
65
  };
67
66
  function validate(options) {
68
- const debugErrorType = (0, import_chunk_6TXVGFQA.createDebugErrorType)(debug, "validateWasm");
67
+ const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "validateWasm");
69
68
  debug(`Using validate Wasm`);
70
69
  const validateEither = (0, import_function.pipe)(
71
- (0, import_chunk_7MD6344A.tryCatch)(
70
+ (0, import_chunk_5DBOS77Y.tryCatch)(
72
71
  () => {
73
72
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
74
73
  debug("Triggering a Rust panic...");
75
- import_chunk_SNAZMEHK.prismaSchemaWasm.debug_panic();
74
+ import_chunk_LQNSUOK4.prismaSchemaWasm.debug_panic();
76
75
  }
77
76
  const params = JSON.stringify({
78
77
  prismaSchema: options.schemas,
79
78
  noColor: Boolean(process.env.NO_COLOR)
80
79
  });
81
- import_chunk_SNAZMEHK.prismaSchemaWasm.validate(params);
80
+ import_chunk_LQNSUOK4.prismaSchemaWasm.validate(params);
82
81
  },
83
82
  (e) => ({
84
83
  type: "wasm-error",
@@ -87,33 +86,30 @@ function validate(options) {
87
86
  })
88
87
  )
89
88
  );
90
- if ((0, import_chunk_7MD6344A.isRight)(validateEither)) {
89
+ if ((0, import_chunk_5DBOS77Y.isRight)(validateEither)) {
91
90
  return;
92
91
  }
93
92
  const error = (0, import_chunk_XKZ6CBLA.z)(validateEither.left).with({ type: "wasm-error" }, (e) => {
94
93
  debugErrorType(e);
95
94
  console.error("");
96
- if ((0, import_chunk_ATFQZVBS.isWasmPanic)(e.error)) {
97
- const { message, stack } = (0, import_chunk_ATFQZVBS.getWasmError)(e.error);
95
+ if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(e.error)) {
96
+ const { message, stack } = (0, import_chunk_LMVSIVKQ.getWasmError)(e.error);
98
97
  debug(`Error validating schema: ${message}`);
99
98
  debug(stack);
100
- const panic = new import_chunk_ATFQZVBS.RustPanic(
99
+ const panic = new import_chunk_LMVSIVKQ.RustPanic(
101
100
  /* message */
102
101
  message,
103
102
  /* rustStack */
104
103
  stack,
105
104
  /* request */
106
105
  "@prisma/prisma-schema-wasm validate",
107
- "FMT_CLI",
108
- /* schemaPath */
109
- (0, import_chunk_YRBRUREX.debugMultipleSchemaPaths)(options.schemas),
110
- /* schema */
111
- options.schemas
106
+ "FMT_CLI"
107
+ /* FMT_CLI */
112
108
  );
113
109
  return panic;
114
110
  }
115
111
  const errorOutput = e.error.message;
116
- return new ValidateError((0, import_chunk_6TXVGFQA.parseQueryEngineError)({ errorOutput, reason: e.reason }));
112
+ return new ValidateError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
117
113
  }).exhaustive();
118
114
  throw error;
119
115
  }
@@ -16,20 +16,20 @@ 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_KTBNIQ7N_exports = {};
20
- __export(chunk_KTBNIQ7N_exports, {
19
+ var chunk_DKSUHQGA_exports = {};
20
+ __export(chunk_DKSUHQGA_exports, {
21
21
  SchemaEngineExitCode: () => SchemaEngineExitCode,
22
22
  canConnectToDatabase: () => canConnectToDatabase,
23
23
  createDatabase: () => createDatabase,
24
24
  dropDatabase: () => dropDatabase,
25
25
  execaCommand: () => execaCommand
26
26
  });
27
- module.exports = __toCommonJS(chunk_KTBNIQ7N_exports);
28
- var import_chunk_7XNZDY2V = require("./chunk-7XNZDY2V.js");
29
- var import_chunk_3ERIN7PH = require("./chunk-3ERIN7PH.js");
30
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
27
+ module.exports = __toCommonJS(chunk_DKSUHQGA_exports);
28
+ var import_chunk_ETYWYJBX = require("./chunk-ETYWYJBX.js");
29
+ var import_chunk_HG3YOAAE = require("./chunk-HG3YOAAE.js");
30
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
31
31
  var import_fetch_engine = require("@prisma/fetch-engine");
32
- var import_execa = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_7XNZDY2V.require_execa)());
32
+ var import_execa = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_ETYWYJBX.require_execa)());
33
33
  var SchemaEngineExitCode = /* @__PURE__ */ ((SchemaEngineExitCode2) => {
34
34
  SchemaEngineExitCode2[SchemaEngineExitCode2["Success"] = 0] = "Success";
35
35
  SchemaEngineExitCode2[SchemaEngineExitCode2["Error"] = 1] = "Error";
@@ -141,7 +141,7 @@ async function execaCommand({
141
141
  schemaEnginePath,
142
142
  engineCommandName
143
143
  }) {
144
- schemaEnginePath = schemaEnginePath || await (0, import_chunk_3ERIN7PH.resolveBinary)(import_fetch_engine.BinaryType.SchemaEngineBinary);
144
+ schemaEnginePath = schemaEnginePath || await (0, import_chunk_HG3YOAAE.resolveBinary)(import_fetch_engine.BinaryType.SchemaEngineBinary);
145
145
  try {
146
146
  return await (0, import_execa.default)(schemaEnginePath, ["cli", "--datasource", connectionString, engineCommandName], {
147
147
  cwd,
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var chunk_DODIJPCS_exports = {};
20
+ __export(chunk_DODIJPCS_exports, {
21
+ binaryTargetRegex: () => binaryTargetRegex
22
+ });
23
+ module.exports = __toCommonJS(chunk_DODIJPCS_exports);
24
+ var import_get_platform = require("@prisma/get-platform");
25
+ function escapeStringRegexp(string) {
26
+ if (typeof string !== "string") {
27
+ throw new TypeError("Expected a string");
28
+ }
29
+ return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
30
+ }
31
+ var binaryTargetRegex = new RegExp(
32
+ "(" + [...import_get_platform.binaryTargets].sort((a, b) => b.length - a.length).map((p) => escapeStringRegexp(p)).join("|") + ")",
33
+ "g"
34
+ );
@@ -16,15 +16,15 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_45HF3I7B_exports = {};
20
- __export(chunk_45HF3I7B_exports, {
19
+ var chunk_DQTWQONJ_exports = {};
20
+ __export(chunk_DQTWQONJ_exports, {
21
21
  addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
22
22
  });
23
- module.exports = __toCommonJS(chunk_45HF3I7B_exports);
24
- var import_chunk_RUIW2PYP = require("./chunk-RUIW2PYP.js");
23
+ module.exports = __toCommonJS(chunk_DQTWQONJ_exports);
24
+ var import_chunk_TTOY2EQP = require("./chunk-TTOY2EQP.js");
25
25
  var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
26
26
  function addVersionDetailsToErrorMessage(message) {
27
- const rows = [["Prisma CLI Version", import_chunk_RUIW2PYP.version]];
27
+ const rows = [["Prisma CLI Version", import_chunk_TTOY2EQP.version]];
28
28
  return `${message}
29
29
 
30
30
  ${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
@@ -16,16 +16,16 @@ 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_UNUCCAXA_exports = {};
20
- __export(chunk_UNUCCAXA_exports, {
19
+ var chunk_DTPFRZWV_exports = {};
20
+ __export(chunk_DTPFRZWV_exports, {
21
21
  warnOnce: () => warnOnce
22
22
  });
23
- module.exports = __toCommonJS(chunk_UNUCCAXA_exports);
24
- var import_chunk_AZNLB67U = require("./chunk-AZNLB67U.js");
23
+ module.exports = __toCommonJS(chunk_DTPFRZWV_exports);
24
+ var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
25
25
  var alreadyWarned = /* @__PURE__ */ new Set();
26
26
  var warnOnce = (key, message, ...args) => {
27
27
  if (!alreadyWarned.has(key)) {
28
28
  alreadyWarned.add(key);
29
- (0, import_chunk_AZNLB67U.warn)(message, ...args);
29
+ (0, import_chunk_ZJWZK45Z.warn)(message, ...args);
30
30
  }
31
31
  };
@@ -16,20 +16,19 @@ 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_ZYW3HGSH_exports = {};
20
- __export(chunk_ZYW3HGSH_exports, {
19
+ var chunk_DYVL6P7F_exports = {};
20
+ __export(chunk_DYVL6P7F_exports, {
21
21
  Generator: () => Generator
22
22
  });
23
- module.exports = __toCommonJS(chunk_ZYW3HGSH_exports);
23
+ module.exports = __toCommonJS(chunk_DYVL6P7F_exports);
24
24
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
25
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
26
25
  var import_generator_helper = require("@prisma/generator-helper");
27
26
  var Generator = class {
27
+ generatorProcess;
28
+ manifest = null;
29
+ config;
30
+ options;
28
31
  constructor(executablePath, config, isNode) {
29
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "generatorProcess");
30
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "manifest", null);
31
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "config");
32
- (0, import_chunk_WWAWV7DQ.__publicField)(this, "options");
33
32
  this.config = config;
34
33
  this.generatorProcess = new import_generator_helper.GeneratorProcess(executablePath, { isNode });
35
34
  }
@@ -16,11 +16,11 @@ 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_RUIW2PYP_exports = {};
20
- __export(chunk_RUIW2PYP_exports, {
19
+ var chunk_E34H3BUU_exports = {};
20
+ __export(chunk_E34H3BUU_exports, {
21
21
  version: () => version
22
22
  });
23
- module.exports = __toCommonJS(chunk_RUIW2PYP_exports);
24
- var import_chunk_FIWY5LGI = require("./chunk-FIWY5LGI.js");
25
- var packageJson = (0, import_chunk_FIWY5LGI.require_package)();
23
+ module.exports = __toCommonJS(chunk_E34H3BUU_exports);
24
+ var import_chunk_NOFAEZS3 = require("./chunk-NOFAEZS3.js");
25
+ var packageJson = (0, import_chunk_NOFAEZS3.require_package)();
26
26
  var version = packageJson.version;
@@ -26,21 +26,21 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_NJQWZ447_exports = {};
30
- __export(chunk_NJQWZ447_exports, {
29
+ var chunk_EPXBOIA5_exports = {};
30
+ __export(chunk_EPXBOIA5_exports, {
31
31
  getBinaryPathsByVersion: () => getBinaryPathsByVersion
32
32
  });
33
- module.exports = __toCommonJS(chunk_NJQWZ447_exports);
33
+ module.exports = __toCommonJS(chunk_EPXBOIA5_exports);
34
34
  var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
35
35
  var import_chunk_4CGPN5SR = require("./chunk-4CGPN5SR.js");
36
36
  var import_chunk_2SDPW6AX = require("./chunk-2SDPW6AX.js");
37
37
  var import_chunk_7B5PXS6N = require("./chunk-7B5PXS6N.js");
38
- var import_chunk_GXDYIY4M = require("./chunk-GXDYIY4M.js");
39
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
38
+ var import_chunk_IDINCQMN = require("./chunk-IDINCQMN.js");
39
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
40
40
  var import_engines = require("@prisma/engines");
41
41
  var import_fetch_engine = require("@prisma/fetch-engine");
42
42
  var import_path = __toESM2(require("path"));
43
- var import_fs_extra = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_GXDYIY4M.require_lib)());
43
+ var import_fs_extra = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_IDINCQMN.require_lib)());
44
44
  async function getBinaryPathsByVersion({
45
45
  neededVersions,
46
46
  binaryTarget,
@@ -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_EQVDLWDC_exports = {};
30
+ __export(chunk_EQVDLWDC_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_EQVDLWDC_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_DQTWQONJ = require("./chunk-DQTWQONJ.js");
39
+ var import_chunk_L5NNYEH3 = require("./chunk-L5NNYEH3.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_DQTWQONJ.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_L5NNYEH3.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
  }