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

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 (37) hide show
  1. package/dist/{chunk-FL376QJQ.js → chunk-EDOI3F7S.js} +5 -5
  2. package/dist/{chunk-OV56OT3I.js → chunk-ENS6ARRU.js} +8 -8
  3. package/dist/{chunk-R3J2O23S.js → chunk-FCYHZHVW.js} +4 -4
  4. package/dist/{chunk-R6CFUYVZ.js → chunk-JMYXPJAY.js} +8 -8
  5. package/dist/{chunk-PH3WSCPB.js → chunk-K7OVJ6TZ.js} +5 -5
  6. package/dist/{chunk-SJRVH6CG.js → chunk-MM5ZOWR7.js} +5 -5
  7. package/dist/{chunk-HGQ7QNTV.js → chunk-NR66BQTH.js} +4 -4
  8. package/dist/{chunk-XR4RJTDM.js → chunk-S6Z7TU3K.js} +5 -5
  9. package/dist/{chunk-FTGBGGMH.js → chunk-S75MIJDN.js} +8 -8
  10. package/dist/{chunk-4ODOO46C.js → chunk-T7MNZSUC.js} +42 -19
  11. package/dist/{chunk-5KSWTUQX.js → chunk-UZDODPIK.js} +7 -7
  12. package/dist/{chunk-QH3YOKCT.js → chunk-VSYNCHIW.js} +27 -4
  13. package/dist/{chunk-UP32A7FC.js → chunk-Y5BIJEN6.js} +5 -5
  14. package/dist/cli/checkUnsupportedDataProxy.js +21 -21
  15. package/dist/cli/checkUnsupportedSchemaEngineWasm.d.ts +22 -0
  16. package/dist/cli/checkUnsupportedSchemaEngineWasm.js +134 -0
  17. package/dist/cli/getSchema.js +24 -24
  18. package/dist/cli/hashes.js +21 -21
  19. package/dist/cli/schemaContext.js +21 -21
  20. package/dist/engine-commands/errorHelpers.js +4 -4
  21. package/dist/engine-commands/formatSchema.js +20 -20
  22. package/dist/engine-commands/getConfig.js +10 -10
  23. package/dist/engine-commands/getDmmf.js +7 -7
  24. package/dist/engine-commands/index.js +29 -29
  25. package/dist/engine-commands/lintSchema.js +8 -8
  26. package/dist/engine-commands/mergeSchemas.js +7 -7
  27. package/dist/engine-commands/validate.js +7 -7
  28. package/dist/get-generators/getGenerators.js +23 -23
  29. package/dist/index.d.ts +1 -0
  30. package/dist/index.js +50 -49
  31. package/dist/utils/canPrompt.js +3 -3
  32. package/dist/utils/getEnvPaths.js +20 -20
  33. package/dist/utils/getVersionFromPackageJson.js +3 -3
  34. package/dist/utils/handlePanic.js +4 -4
  35. package/dist/utils/loadEnvFile.js +20 -20
  36. package/dist/wasm.js +5 -5
  37. package/package.json +11 -11
@@ -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_FL376QJQ_exports = {};
20
- __export(chunk_FL376QJQ_exports, {
19
+ var chunk_EDOI3F7S_exports = {};
20
+ __export(chunk_EDOI3F7S_exports, {
21
21
  version: () => version
22
22
  });
23
- module.exports = __toCommonJS(chunk_FL376QJQ_exports);
24
- var import_chunk_HGQ7QNTV = require("./chunk-HGQ7QNTV.js");
25
- var packageJson = (0, import_chunk_HGQ7QNTV.require_package)();
23
+ module.exports = __toCommonJS(chunk_EDOI3F7S_exports);
24
+ var import_chunk_NR66BQTH = require("./chunk-NR66BQTH.js");
25
+ var packageJson = (0, import_chunk_NR66BQTH.require_package)();
26
26
  var version = packageJson.version;
@@ -26,16 +26,16 @@ 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_OV56OT3I_exports = {};
30
- __export(chunk_OV56OT3I_exports, {
29
+ var chunk_ENS6ARRU_exports = {};
30
+ __export(chunk_ENS6ARRU_exports, {
31
31
  GetDmmfError: () => GetDmmfError,
32
32
  getDMMF: () => getDMMF
33
33
  });
34
- module.exports = __toCommonJS(chunk_OV56OT3I_exports);
34
+ module.exports = __toCommonJS(chunk_ENS6ARRU_exports);
35
35
  var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
36
36
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
37
- var import_chunk_UP32A7FC = require("./chunk-UP32A7FC.js");
38
- var import_chunk_PH3WSCPB = require("./chunk-PH3WSCPB.js");
37
+ var import_chunk_Y5BIJEN6 = require("./chunk-Y5BIJEN6.js");
38
+ var import_chunk_K7OVJ6TZ = require("./chunk-K7OVJ6TZ.js");
39
39
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
40
40
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
41
41
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
@@ -58,7 +58,7 @@ ${detailsHeader} ${message}`;
58
58
  }).exhaustive();
59
59
  const errorMessageWithContext = `${constructedErrorMessage}
60
60
  [Context: getDmmf]`;
61
- super((0, import_chunk_UP32A7FC.addVersionDetailsToErrorMessage)(errorMessageWithContext));
61
+ super((0, import_chunk_Y5BIJEN6.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
62
  this.name = "GetDmmfError";
63
63
  }
64
64
  };
@@ -70,13 +70,13 @@ async function getDMMF(options) {
70
70
  () => {
71
71
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
72
72
  debug("Triggering a Rust panic...");
73
- import_chunk_PH3WSCPB.prismaSchemaWasm.debug_panic();
73
+ import_chunk_K7OVJ6TZ.prismaSchemaWasm.debug_panic();
74
74
  }
75
75
  const params = JSON.stringify({
76
76
  prismaSchema: options.datamodel,
77
77
  noColor: Boolean(process.env.NO_COLOR)
78
78
  });
79
- const data = import_chunk_PH3WSCPB.prismaSchemaWasm.get_dmmf(params);
79
+ const data = import_chunk_K7OVJ6TZ.prismaSchemaWasm.get_dmmf(params);
80
80
  return data;
81
81
  },
82
82
  (e) => ({
@@ -26,13 +26,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_R3J2O23S_exports = {};
30
- __export(chunk_R3J2O23S_exports, {
29
+ var chunk_FCYHZHVW_exports = {};
30
+ __export(chunk_FCYHZHVW_exports, {
31
31
  canPrompt: () => canPrompt
32
32
  });
33
- module.exports = __toCommonJS(chunk_R3J2O23S_exports);
34
- var import_chunk_ICFLO5JW = require("./chunk-ICFLO5JW.js");
33
+ module.exports = __toCommonJS(chunk_FCYHZHVW_exports);
35
34
  var import_chunk_H4NI2RIK = require("./chunk-H4NI2RIK.js");
35
+ var import_chunk_ICFLO5JW = require("./chunk-ICFLO5JW.js");
36
36
  var import_prompts = __toESM(require("prompts"));
37
37
  var canPrompt = () => {
38
38
  const injectedCount = import_prompts.default._injected?.length;
@@ -26,17 +26,17 @@ 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_R6CFUYVZ_exports = {};
30
- __export(chunk_R6CFUYVZ_exports, {
29
+ var chunk_JMYXPJAY_exports = {};
30
+ __export(chunk_JMYXPJAY_exports, {
31
31
  ValidateError: () => ValidateError,
32
32
  validate: () => validate
33
33
  });
34
- module.exports = __toCommonJS(chunk_R6CFUYVZ_exports);
34
+ module.exports = __toCommonJS(chunk_JMYXPJAY_exports);
35
35
  var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
36
36
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
37
37
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
38
- var import_chunk_UP32A7FC = require("./chunk-UP32A7FC.js");
39
- var import_chunk_PH3WSCPB = require("./chunk-PH3WSCPB.js");
38
+ var import_chunk_Y5BIJEN6 = require("./chunk-Y5BIJEN6.js");
39
+ var import_chunk_K7OVJ6TZ = require("./chunk-K7OVJ6TZ.js");
40
40
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
41
41
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
42
42
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
@@ -59,7 +59,7 @@ ${detailsHeader} ${message}`;
59
59
  }).exhaustive();
60
60
  const errorMessageWithContext = `${constructedErrorMessage}
61
61
  [Context: validate]`;
62
- super((0, import_chunk_UP32A7FC.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
+ super((0, import_chunk_Y5BIJEN6.addVersionDetailsToErrorMessage)(errorMessageWithContext));
63
63
  this.name = "ValidateError";
64
64
  }
65
65
  };
@@ -71,13 +71,13 @@ function validate(options) {
71
71
  () => {
72
72
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
73
73
  debug("Triggering a Rust panic...");
74
- import_chunk_PH3WSCPB.prismaSchemaWasm.debug_panic();
74
+ import_chunk_K7OVJ6TZ.prismaSchemaWasm.debug_panic();
75
75
  }
76
76
  const params = JSON.stringify({
77
77
  prismaSchema: options.schemas,
78
78
  noColor: Boolean(process.env.NO_COLOR)
79
79
  });
80
- import_chunk_PH3WSCPB.prismaSchemaWasm.validate(params);
80
+ import_chunk_K7OVJ6TZ.prismaSchemaWasm.validate(params);
81
81
  },
82
82
  (e) => ({
83
83
  type: "wasm-error",
@@ -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_PH3WSCPB_exports = {};
30
- __export(chunk_PH3WSCPB_exports, {
29
+ var chunk_K7OVJ6TZ_exports = {};
30
+ __export(chunk_K7OVJ6TZ_exports, {
31
31
  prismaSchemaWasm: () => import_prisma_schema_wasm.default,
32
32
  prismaSchemaWasmVersion: () => prismaSchemaWasmVersion,
33
33
  schemaEngineWasmVersion: () => schemaEngineWasmVersion,
34
34
  wasm_exports: () => wasm_exports
35
35
  });
36
- module.exports = __toCommonJS(chunk_PH3WSCPB_exports);
37
- var import_chunk_HGQ7QNTV = require("./chunk-HGQ7QNTV.js");
36
+ module.exports = __toCommonJS(chunk_K7OVJ6TZ_exports);
37
+ var import_chunk_NR66BQTH = require("./chunk-NR66BQTH.js");
38
38
  var import_chunk_WXRVYSYN = require("./chunk-WXRVYSYN.js");
39
39
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
40
40
  var import_prisma_schema_wasm = __toESM(require("@prisma/prisma-schema-wasm"));
@@ -45,6 +45,6 @@ var wasm_exports = {};
45
45
  schemaEngineWasmVersion: () => schemaEngineWasmVersion
46
46
  });
47
47
  globalThis.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_WXRVYSYN.WasmPanicRegistry();
48
- var { dependencies } = (0, import_chunk_HGQ7QNTV.require_package)();
48
+ var { dependencies } = (0, import_chunk_NR66BQTH.require_package)();
49
49
  var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
50
50
  var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
@@ -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_SJRVH6CG_exports = {};
20
- __export(chunk_SJRVH6CG_exports, {
19
+ var chunk_MM5ZOWR7_exports = {};
20
+ __export(chunk_MM5ZOWR7_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_SJRVH6CG_exports);
28
- var import_chunk_PH3WSCPB = require("./chunk-PH3WSCPB.js");
27
+ module.exports = __toCommonJS(chunk_MM5ZOWR7_exports);
28
+ var import_chunk_K7OVJ6TZ = require("./chunk-K7OVJ6TZ.js");
29
29
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
30
30
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
31
31
  function lintSchema({ schemas }) {
32
- const lintResult = import_chunk_PH3WSCPB.prismaSchemaWasm.lint(JSON.stringify(schemas));
32
+ const lintResult = import_chunk_K7OVJ6TZ.prismaSchemaWasm.lint(JSON.stringify(schemas));
33
33
  const lintDiagnostics = JSON.parse(lintResult);
34
34
  return lintDiagnostics;
35
35
  }
@@ -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_HGQ7QNTV_exports = {};
20
- __export(chunk_HGQ7QNTV_exports, {
19
+ var chunk_NR66BQTH_exports = {};
20
+ __export(chunk_NR66BQTH_exports, {
21
21
  require_package: () => require_package
22
22
  });
23
- module.exports = __toCommonJS(chunk_HGQ7QNTV_exports);
23
+ module.exports = __toCommonJS(chunk_NR66BQTH_exports);
24
24
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
25
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.100",
29
+ version: "6.6.0-dev.102",
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",
@@ -26,19 +26,19 @@ 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_XR4RJTDM_exports = {};
30
- __export(chunk_XR4RJTDM_exports, {
29
+ var chunk_S6Z7TU3K_exports = {};
30
+ __export(chunk_S6Z7TU3K_exports, {
31
31
  handlePanic: () => handlePanic
32
32
  });
33
- module.exports = __toCommonJS(chunk_XR4RJTDM_exports);
33
+ module.exports = __toCommonJS(chunk_S6Z7TU3K_exports);
34
34
  var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
35
35
  var import_chunk_FXMGS3L5 = require("./chunk-FXMGS3L5.js");
36
- var import_chunk_R3J2O23S = require("./chunk-R3J2O23S.js");
36
+ var import_chunk_FCYHZHVW = require("./chunk-FCYHZHVW.js");
37
37
  var import_chunk_YR5KNFKN = require("./chunk-YR5KNFKN.js");
38
38
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
39
39
  var import_prompts = __toESM(require("prompts"));
40
40
  async function handlePanic(args) {
41
- if (!(0, import_chunk_R3J2O23S.canPrompt)()) {
41
+ if (!(0, import_chunk_FCYHZHVW.canPrompt)()) {
42
42
  throw args.error;
43
43
  }
44
44
  await panicDialog(args);
@@ -26,20 +26,20 @@ 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_FTGBGGMH_exports = {};
30
- __export(chunk_FTGBGGMH_exports, {
29
+ var chunk_S75MIJDN_exports = {};
30
+ __export(chunk_S75MIJDN_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_FTGBGGMH_exports);
37
+ module.exports = __toCommonJS(chunk_S75MIJDN_exports);
38
38
  var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
39
39
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
40
40
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
41
- var import_chunk_UP32A7FC = require("./chunk-UP32A7FC.js");
42
- var import_chunk_PH3WSCPB = require("./chunk-PH3WSCPB.js");
41
+ var import_chunk_Y5BIJEN6 = require("./chunk-Y5BIJEN6.js");
42
+ var import_chunk_K7OVJ6TZ = require("./chunk-K7OVJ6TZ.js");
43
43
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
44
44
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
45
45
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
@@ -64,7 +64,7 @@ ${detailsHeader} ${message}`;
64
64
  }).exhaustive();
65
65
  const errorMessageWithContext = `${constructedErrorMessage}
66
66
  [Context: getConfig]`;
67
- super((0, import_chunk_UP32A7FC.addVersionDetailsToErrorMessage)(errorMessageWithContext));
67
+ super((0, import_chunk_Y5BIJEN6.addVersionDetailsToErrorMessage)(errorMessageWithContext));
68
68
  this.name = "GetConfigError";
69
69
  }
70
70
  };
@@ -89,7 +89,7 @@ async function getConfig(options) {
89
89
  () => {
90
90
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
91
91
  debug("Triggering a Rust panic...");
92
- import_chunk_PH3WSCPB.prismaSchemaWasm.debug_panic();
92
+ import_chunk_K7OVJ6TZ.prismaSchemaWasm.debug_panic();
93
93
  }
94
94
  const params = JSON.stringify({
95
95
  prismaSchema: options.datamodel,
@@ -97,7 +97,7 @@ async function getConfig(options) {
97
97
  ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
98
98
  env: process.env
99
99
  });
100
- const data = import_chunk_PH3WSCPB.prismaSchemaWasm.get_config(params);
100
+ const data = import_chunk_K7OVJ6TZ.prismaSchemaWasm.get_config(params);
101
101
  return data;
102
102
  },
103
103
  (e) => ({
@@ -26,9 +26,11 @@ 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_4ODOO46C_exports = {};
30
- __export(chunk_4ODOO46C_exports, {
29
+ var chunk_T7MNZSUC_exports = {};
30
+ __export(chunk_T7MNZSUC_exports, {
31
31
  checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
32
+ checkUnsupportedSchemaEngineWasm: () => checkUnsupportedSchemaEngineWasm,
33
+ forbiddenCmdFlagWithSchemaEngineWasm: () => forbiddenCmdFlagWithSchemaEngineWasm,
32
34
  forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
33
35
  formatSchema: () => formatSchema,
34
36
  getBinaryTargetForCurrentPlatform: () => import_get_platform2.getBinaryTargetForCurrentPlatform,
@@ -49,24 +51,24 @@ __export(chunk_4ODOO46C_exports, {
49
51
  processSchemaResult: () => processSchemaResult,
50
52
  skipIndex: () => skipIndex
51
53
  });
52
- module.exports = __toCommonJS(chunk_4ODOO46C_exports);
54
+ module.exports = __toCommonJS(chunk_T7MNZSUC_exports);
55
+ var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
53
56
  var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
54
57
  var import_chunk_2IP7H3BQ = require("./chunk-2IP7H3BQ.js");
55
58
  var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
56
59
  var import_chunk_EPXBOIA5 = require("./chunk-EPXBOIA5.js");
57
60
  var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
58
- var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
59
61
  var import_chunk_5V36RLCO = require("./chunk-5V36RLCO.js");
60
62
  var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
61
63
  var import_chunk_7QC5VORA = require("./chunk-7QC5VORA.js");
62
64
  var import_chunk_AX5N26KG = require("./chunk-AX5N26KG.js");
63
65
  var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
64
66
  var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.js");
65
- var import_chunk_FTGBGGMH = require("./chunk-FTGBGGMH.js");
66
- var import_chunk_OV56OT3I = require("./chunk-OV56OT3I.js");
67
- var import_chunk_SJRVH6CG = require("./chunk-SJRVH6CG.js");
68
- var import_chunk_5KSWTUQX = require("./chunk-5KSWTUQX.js");
69
- var import_chunk_PH3WSCPB = require("./chunk-PH3WSCPB.js");
67
+ var import_chunk_S75MIJDN = require("./chunk-S75MIJDN.js");
68
+ var import_chunk_ENS6ARRU = require("./chunk-ENS6ARRU.js");
69
+ var import_chunk_MM5ZOWR7 = require("./chunk-MM5ZOWR7.js");
70
+ var import_chunk_UZDODPIK = require("./chunk-UZDODPIK.js");
71
+ var import_chunk_K7OVJ6TZ = require("./chunk-K7OVJ6TZ.js");
70
72
  var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
71
73
  var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
72
74
  var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
@@ -100,11 +102,32 @@ var import_node_fs2 = __toESM2(require("node:fs"));
100
102
  var import_fs2 = __toESM2(require("fs"));
101
103
  var import_path4 = __toESM2(require("path"));
102
104
  var import_get_platform2 = require("@prisma/get-platform");
105
+ var forbiddenCmdFlagWithSchemaEngineWasm = ({ cmd, flag }) => `
106
+ Passing the ${(0, import_chunk_PG5FDKSF.green)(`${flag}`)} flag to the ${(0, import_chunk_PG5FDKSF.green)(`prisma ${cmd}`)} command is not supported when
107
+ defining a ${(0, import_chunk_PG5FDKSF.green)(`migrate.adapter`)} in ${(0, import_chunk_PG5FDKSF.green)(`prisma.config.ts`)}.
108
+
109
+ More information about this limitation: ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/schema-engine-limitations")}
110
+ `;
111
+ function checkUnsupportedSchemaEngineWasm({
112
+ cmd,
113
+ config,
114
+ args,
115
+ flags
116
+ }) {
117
+ if (!config.migrate?.adapter) {
118
+ return;
119
+ }
120
+ for (const flag of flags) {
121
+ if (args[flag] !== void 0) {
122
+ throw new Error(forbiddenCmdFlagWithSchemaEngineWasm({ cmd, flag }));
123
+ }
124
+ }
125
+ }
103
126
  var debug = (0, import_debug2.default)("prisma:format");
104
127
  async function formatSchema({ schemas }, inputFormattingOptions) {
105
128
  if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
106
129
  handleFormatPanic(() => {
107
- import_chunk_PH3WSCPB.prismaSchemaWasm.debug_panic();
130
+ import_chunk_K7OVJ6TZ.prismaSchemaWasm.debug_panic();
108
131
  });
109
132
  }
110
133
  const defaultFormattingOptions = {
@@ -121,10 +144,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
121
144
  const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
122
145
  const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
123
146
  const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
124
- const lintDiagnostics2 = (0, import_chunk_SJRVH6CG.lintSchema)({ schemas: formattedMultipleSchemas2 });
147
+ const lintDiagnostics2 = (0, import_chunk_MM5ZOWR7.lintSchema)({ schemas: formattedMultipleSchemas2 });
125
148
  return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
126
149
  });
127
- const lintWarnings = (0, import_chunk_SJRVH6CG.getLintWarningsAsText)(lintDiagnostics);
150
+ const lintWarnings = (0, import_chunk_MM5ZOWR7.getLintWarningsAsText)(lintDiagnostics);
128
151
  if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
129
152
  console.warn(lintWarnings);
130
153
  }
@@ -151,7 +174,7 @@ function handleFormatPanic(tryCb) {
151
174
  }
152
175
  }
153
176
  function formatWasm(schema, documentFormattingParams) {
154
- const formattedSchema = import_chunk_PH3WSCPB.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
177
+ const formattedSchema = import_chunk_K7OVJ6TZ.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
155
178
  return formattedSchema;
156
179
  }
157
180
  var readFile = (0, import_util.promisify)(import_fs.default.readFile);
@@ -195,7 +218,7 @@ async function readSchemaFromDirectory(schemaPath2) {
195
218
  }
196
219
  const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
197
220
  debug2("Loading config");
198
- const config = await (0, import_chunk_FTGBGGMH.getConfig)({
221
+ const config = await (0, import_chunk_S75MIJDN.getConfig)({
199
222
  datamodel: files,
200
223
  ignoreEnvVarErrors: true
201
224
  });
@@ -405,7 +428,7 @@ async function processSchemaResult({
405
428
  if (printLoadMessage) {
406
429
  printSchemaLoadedMessage(loadedFromPathForLogMessages);
407
430
  }
408
- const configFromPsl = await (0, import_chunk_FTGBGGMH.getConfig)({ datamodel: schemaResult.schemas, ignoreEnvVarErrors });
431
+ const configFromPsl = await (0, import_chunk_S75MIJDN.getConfig)({ datamodel: schemaResult.schemas, ignoreEnvVarErrors });
409
432
  const primaryDatasource = configFromPsl.datasources.at(0);
410
433
  const schemaRootDir = schemaResult.schemaRootDir || cwd;
411
434
  return {
@@ -483,7 +506,7 @@ async function getGenerators(options) {
483
506
  }
484
507
  (0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
485
508
  const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
486
- const dmmf = await (0, import_chunk_OV56OT3I.getDMMF)({
509
+ const dmmf = await (0, import_chunk_ENS6ARRU.getDMMF)({
487
510
  datamodel: schemaContext.schemaFiles,
488
511
  previewFeatures
489
512
  });
@@ -534,7 +557,7 @@ You need to define \`output\` in the generator block in the schema file.`
534
557
  fromEnvVar: null
535
558
  };
536
559
  }
537
- const datamodel = (0, import_chunk_5KSWTUQX.mergeSchemas)({ schemas: schemaContext.schemaFiles });
560
+ const datamodel = (0, import_chunk_UZDODPIK.mergeSchemas)({ schemas: schemaContext.schemaFiles });
538
561
  const envPaths = await getEnvPaths(schemaContext.schemaPath, { cwd: generatorConfig.output.value });
539
562
  const options2 = {
540
563
  datamodel,
@@ -618,7 +641,7 @@ generator gen {
618
641
  debug3({ generatorBinaryPaths });
619
642
  generator.setBinaryPaths(generatorBinaryPaths);
620
643
  if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
621
- const customDmmf = await (0, import_chunk_OV56OT3I.getDMMF)({
644
+ const customDmmf = await (0, import_chunk_ENS6ARRU.getDMMF)({
622
645
  datamodel: schemaContext.schemaFiles,
623
646
  previewFeatures
624
647
  });
@@ -893,7 +916,7 @@ function checkUnsupportedDataProxy({
893
916
  }
894
917
  }
895
918
  if (!schemaContext2?.primaryDatasource) return;
896
- const url = (0, import_chunk_FTGBGGMH.resolveUrl)((0, import_chunk_FTGBGGMH.getEffectiveUrl)(schemaContext2.primaryDatasource));
919
+ const url = (0, import_chunk_S75MIJDN.resolveUrl)((0, import_chunk_S75MIJDN.getEffectiveUrl)(schemaContext2.primaryDatasource));
897
920
  if (url?.startsWith("prisma://")) {
898
921
  throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
899
922
  }
@@ -26,17 +26,17 @@ 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_5KSWTUQX_exports = {};
30
- __export(chunk_5KSWTUQX_exports, {
29
+ var chunk_UZDODPIK_exports = {};
30
+ __export(chunk_UZDODPIK_exports, {
31
31
  MergeSchemasError: () => MergeSchemasError,
32
32
  mergeSchemas: () => mergeSchemas
33
33
  });
34
- module.exports = __toCommonJS(chunk_5KSWTUQX_exports);
34
+ module.exports = __toCommonJS(chunk_UZDODPIK_exports);
35
35
  var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
36
36
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
37
37
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
38
- var import_chunk_UP32A7FC = require("./chunk-UP32A7FC.js");
39
- var import_chunk_PH3WSCPB = require("./chunk-PH3WSCPB.js");
38
+ var import_chunk_Y5BIJEN6 = require("./chunk-Y5BIJEN6.js");
39
+ var import_chunk_K7OVJ6TZ = require("./chunk-K7OVJ6TZ.js");
40
40
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
41
41
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
42
42
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
@@ -59,7 +59,7 @@ ${detailsHeader} ${message}`;
59
59
  }).exhaustive();
60
60
  const errorMessageWithContext = `${constructedErrorMessage}
61
61
  [Context: mergeSchemas]`;
62
- super((0, import_chunk_UP32A7FC.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
+ super((0, import_chunk_Y5BIJEN6.addVersionDetailsToErrorMessage)(errorMessageWithContext));
63
63
  this.name = "MergeSchemasError";
64
64
  }
65
65
  };
@@ -72,7 +72,7 @@ function mergeSchemas(options) {
72
72
  const params = JSON.stringify({
73
73
  schema: options.schemas
74
74
  });
75
- return import_chunk_PH3WSCPB.prismaSchemaWasm.merge_schemas(params);
75
+ return import_chunk_K7OVJ6TZ.prismaSchemaWasm.merge_schemas(params);
76
76
  },
77
77
  (e) => ({
78
78
  type: "wasm-error",
@@ -26,9 +26,11 @@ 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_QH3YOKCT_exports = {};
30
- __export(chunk_QH3YOKCT_exports, {
29
+ var chunk_VSYNCHIW_exports = {};
30
+ __export(chunk_VSYNCHIW_exports, {
31
31
  checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
32
+ checkUnsupportedSchemaEngineWasm: () => checkUnsupportedSchemaEngineWasm,
33
+ forbiddenCmdFlagWithSchemaEngineWasm: () => forbiddenCmdFlagWithSchemaEngineWasm,
32
34
  forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
33
35
  formatSchema: () => formatSchema,
34
36
  getBinaryTargetForCurrentPlatform: () => import_get_platform2.getBinaryTargetForCurrentPlatform,
@@ -49,13 +51,13 @@ __export(chunk_QH3YOKCT_exports, {
49
51
  processSchemaResult: () => processSchemaResult,
50
52
  skipIndex: () => skipIndex
51
53
  });
52
- module.exports = __toCommonJS(chunk_QH3YOKCT_exports);
54
+ module.exports = __toCommonJS(chunk_VSYNCHIW_exports);
55
+ var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
53
56
  var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
54
57
  var import_chunk_2IP7H3BQ = require("./chunk-2IP7H3BQ.js");
55
58
  var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
56
59
  var import_chunk_EPXBOIA5 = require("./chunk-EPXBOIA5.js");
57
60
  var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
58
- var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
59
61
  var import_chunk_5V36RLCO = require("./chunk-5V36RLCO.js");
60
62
  var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
61
63
  var import_chunk_7QC5VORA = require("./chunk-7QC5VORA.js");
@@ -100,6 +102,27 @@ var import_node_fs2 = __toESM2(require("node:fs"));
100
102
  var import_fs2 = __toESM2(require("fs"));
101
103
  var import_path4 = __toESM2(require("path"));
102
104
  var import_get_platform2 = require("@prisma/get-platform");
105
+ var forbiddenCmdFlagWithSchemaEngineWasm = ({ cmd, flag }) => `
106
+ Passing the ${(0, import_chunk_PG5FDKSF.green)(`${flag}`)} flag to the ${(0, import_chunk_PG5FDKSF.green)(`prisma ${cmd}`)} command is not supported when
107
+ defining a ${(0, import_chunk_PG5FDKSF.green)(`migrate.adapter`)} in ${(0, import_chunk_PG5FDKSF.green)(`prisma.config.ts`)}.
108
+
109
+ More information about this limitation: ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/schema-engine-limitations")}
110
+ `;
111
+ function checkUnsupportedSchemaEngineWasm({
112
+ cmd,
113
+ config,
114
+ args,
115
+ flags
116
+ }) {
117
+ if (!config.migrate?.adapter) {
118
+ return;
119
+ }
120
+ for (const flag of flags) {
121
+ if (args[flag] !== void 0) {
122
+ throw new Error(forbiddenCmdFlagWithSchemaEngineWasm({ cmd, flag }));
123
+ }
124
+ }
125
+ }
103
126
  var debug = (0, import_debug2.default)("prisma:format");
104
127
  async function formatSchema({ schemas }, inputFormattingOptions) {
105
128
  if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
@@ -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_UP32A7FC_exports = {};
20
- __export(chunk_UP32A7FC_exports, {
19
+ var chunk_Y5BIJEN6_exports = {};
20
+ __export(chunk_Y5BIJEN6_exports, {
21
21
  addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
22
22
  });
23
- module.exports = __toCommonJS(chunk_UP32A7FC_exports);
24
- var import_chunk_FL376QJQ = require("./chunk-FL376QJQ.js");
23
+ module.exports = __toCommonJS(chunk_Y5BIJEN6_exports);
24
+ var import_chunk_EDOI3F7S = require("./chunk-EDOI3F7S.js");
25
25
  var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
26
26
  function addVersionDetailsToErrorMessage(message) {
27
- const rows = [["Prisma CLI Version", import_chunk_FL376QJQ.version]];
27
+ const rows = [["Prisma CLI Version", import_chunk_EDOI3F7S.version]];
28
28
  return `${message}
29
29
 
30
30
  ${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;