@prisma/internals 7.10.0-dev.9 → 7.10.0-integration-prisma7-project-closeout.10

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 (55) hide show
  1. package/dist/{chunk-3OH47HQH.js → chunk-3IMRWXIL.js} +15 -15
  2. package/dist/{chunk-EBLNHWW6.js → chunk-3VD46SL7.js} +9 -9
  3. package/dist/{chunk-3GIVRMID.js → chunk-4LDJVZN5.js} +5 -5
  4. package/dist/{chunk-AQYN6BFL.js → chunk-5BDP445D.js} +5 -5
  5. package/dist/{chunk-VMG6ENBV.js → chunk-5WRIOIZY.js} +5 -5
  6. package/dist/{chunk-LZ2DP3UC.js → chunk-6QMQ2JYG.js} +7 -7
  7. package/dist/{chunk-TZJROXB3.js → chunk-6Z766KGR.js} +6 -6
  8. package/dist/{chunk-XGQEVNKT.js → chunk-AXVIV62N.js} +13 -13
  9. package/dist/{chunk-GZLJZGHX.js → chunk-DUDEWDFC.js} +7 -7
  10. package/dist/{chunk-H2BTM6QL.js → chunk-EWPXLBGE.js} +14 -14
  11. package/dist/{chunk-YXCPS3WU.js → chunk-FRVJZOHP.js} +6 -6
  12. package/dist/{chunk-MD47SEWA.js → chunk-GTKINBSI.js} +14 -14
  13. package/dist/{chunk-NZ7DJZZM.js → chunk-GYNBIEMC.js} +8 -8
  14. package/dist/{chunk-6PILE32P.js → chunk-HJKTMQO4.js} +24 -24
  15. package/dist/{chunk-L2BUQUNG.js → chunk-HMKNTMVS.js} +5 -5
  16. package/dist/{chunk-QKQKSUQO.js → chunk-JFXHOFJA.js} +5 -5
  17. package/dist/{chunk-4YZJJPK2.js → chunk-K7EB6BHT.js} +15 -15
  18. package/dist/{chunk-SH3LMKTB.js → chunk-PKF53VLJ.js} +5 -5
  19. package/dist/{chunk-JFFNC4AF.js → chunk-QBNYSYZK.js} +5 -5
  20. package/dist/{chunk-T3LF4DKH.js → chunk-R47SFJ5Z.js} +10 -10
  21. package/dist/{chunk-NUKBOD54.js → chunk-WFMA7DI5.js} +26 -22
  22. package/dist/{chunk-ZB2V476P.js → chunk-WIWFAA6Q.js} +10 -10
  23. package/dist/{chunk-CR3WUS3D.js → chunk-WKGANBVH.js} +24 -24
  24. package/dist/{chunk-5P4WR3QW.js → chunk-XAAVALN7.js} +13 -13
  25. package/dist/chunk-YNDZCLVL.js +307 -0
  26. package/dist/{chunk-PP22IZ7I.js → chunk-YWFKXS5Q.js} +5 -5
  27. package/dist/{chunk-7IKUTPWQ.js → chunk-YXB6APHS.js} +5 -5
  28. package/dist/{chunk-GZY7QBBF.js → chunk-ZVBYKW53.js} +5 -5
  29. package/dist/cli/checkUnsupportedDataProxy.d.ts +5 -5
  30. package/dist/cli/checkUnsupportedDataProxy.js +20 -20
  31. package/dist/cli/schemaContext.js +21 -21
  32. package/dist/engine-commands/errorHelpers.js +4 -4
  33. package/dist/engine-commands/formatSchema.js +19 -19
  34. package/dist/engine-commands/getConfig.js +9 -9
  35. package/dist/engine-commands/getDmmf.js +10 -10
  36. package/dist/engine-commands/getEnginesInfo.js +4 -4
  37. package/dist/engine-commands/index.js +30 -30
  38. package/dist/engine-commands/lintSchema.js +8 -8
  39. package/dist/engine-commands/mergeSchemas.js +9 -9
  40. package/dist/engine-commands/queryEngineCommons.js +6 -6
  41. package/dist/engine-commands/validate.js +9 -9
  42. package/dist/get-generators/getGenerators.d.ts +1 -0
  43. package/dist/get-generators/getGenerators.js +22 -22
  44. package/dist/index.js +43 -43
  45. package/dist/sendPanic.js +3 -3
  46. package/dist/utils/getGitHubIssueUrl.js +4 -4
  47. package/dist/utils/getVersionFromPackageJson.js +3 -3
  48. package/dist/utils/handlePanic.js +5 -5
  49. package/dist/utils/missingGeneratorMessage.d.ts +3 -3
  50. package/dist/utils/missingGeneratorMessage.js +4 -4
  51. package/dist/utils/validatePrismaConfigWithDatasource.d.ts +2 -2
  52. package/dist/utils/validatePrismaConfigWithDatasource.js +3 -3
  53. package/dist/wasm.js +5 -5
  54. package/package.json +16 -16
  55. package/dist/chunk-XKZ6CBLA.js +0 -281
@@ -26,8 +26,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_CR3WUS3D_exports = {};
30
- __export(chunk_CR3WUS3D_exports, {
29
+ var chunk_WKGANBVH_exports = {};
30
+ __export(chunk_WKGANBVH_exports, {
31
31
  checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
32
32
  forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
33
33
  formatSchema: () => formatSchema,
@@ -40,25 +40,25 @@ __export(chunk_CR3WUS3D_exports, {
40
40
  processSchemaResult: () => processSchemaResult,
41
41
  skipIndex: () => skipIndex
42
42
  });
43
- module.exports = __toCommonJS(chunk_CR3WUS3D_exports);
43
+ module.exports = __toCommonJS(chunk_WKGANBVH_exports);
44
44
  var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
45
45
  var import_chunk_DZ4QWHTB = require("./chunk-DZ4QWHTB.js");
46
46
  var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
47
47
  var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
48
48
  var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
49
- var import_chunk_NUKBOD54 = require("./chunk-NUKBOD54.js");
49
+ var import_chunk_WFMA7DI5 = require("./chunk-WFMA7DI5.js");
50
50
  var import_chunk_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
51
51
  var import_chunk_BGMZPA2F = require("./chunk-BGMZPA2F.js");
52
52
  var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
53
- var import_chunk_3OH47HQH = require("./chunk-3OH47HQH.js");
54
- var import_chunk_T3LF4DKH = require("./chunk-T3LF4DKH.js");
55
- var import_chunk_JFFNC4AF = require("./chunk-JFFNC4AF.js");
56
- var import_chunk_XGQEVNKT = require("./chunk-XGQEVNKT.js");
53
+ var import_chunk_3IMRWXIL = require("./chunk-3IMRWXIL.js");
54
+ var import_chunk_R47SFJ5Z = require("./chunk-R47SFJ5Z.js");
55
+ var import_chunk_QBNYSYZK = require("./chunk-QBNYSYZK.js");
56
+ var import_chunk_XAAVALN7 = require("./chunk-XAAVALN7.js");
57
57
  var import_chunk_2BXDHSSY = require("./chunk-2BXDHSSY.js");
58
- var import_chunk_AQYN6BFL = require("./chunk-AQYN6BFL.js");
58
+ var import_chunk_5BDP445D = require("./chunk-5BDP445D.js");
59
59
  var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
60
60
  var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
61
- var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
61
+ var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.js");
62
62
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
63
63
  var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
64
64
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
@@ -76,7 +76,7 @@ var debug = (0, import_debug.default)("prisma:format");
76
76
  async function formatSchema({ schemas }, inputFormattingOptions) {
77
77
  if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
78
78
  handleFormatPanic(() => {
79
- import_chunk_AQYN6BFL.prismaSchemaWasm.debug_panic();
79
+ import_chunk_5BDP445D.prismaSchemaWasm.debug_panic();
80
80
  });
81
81
  }
82
82
  const defaultFormattingOptions = {
@@ -93,10 +93,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
93
93
  const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
94
94
  const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
95
95
  const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
96
- const lintDiagnostics2 = (0, import_chunk_JFFNC4AF.lintSchema)({ schemas: formattedMultipleSchemas2 });
96
+ const lintDiagnostics2 = (0, import_chunk_QBNYSYZK.lintSchema)({ schemas: formattedMultipleSchemas2 });
97
97
  return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
98
98
  });
99
- const lintWarnings = (0, import_chunk_JFFNC4AF.getLintWarningsAsText)(lintDiagnostics);
99
+ const lintWarnings = (0, import_chunk_QBNYSYZK.getLintWarningsAsText)(lintDiagnostics);
100
100
  if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
101
101
  console.warn(lintWarnings);
102
102
  }
@@ -123,7 +123,7 @@ function handleFormatPanic(tryCb) {
123
123
  }
124
124
  }
125
125
  function formatWasm(schema, documentFormattingParams) {
126
- const formattedSchema = import_chunk_AQYN6BFL.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
126
+ const formattedSchema = import_chunk_5BDP445D.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
127
127
  return formattedSchema;
128
128
  }
129
129
  async function loadSchemaContext({ schemaPath, printLoadMessage, allowNull, schemaPathArgumentName, cwd } = {
@@ -152,7 +152,7 @@ async function processSchemaResult({
152
152
  if (printLoadMessage) {
153
153
  (0, import_chunk_2BXDHSSY.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
154
154
  }
155
- const configFromPsl = await (0, import_chunk_3OH47HQH.getConfig)({ datamodel: schemaResult.schemas });
155
+ const configFromPsl = await (0, import_chunk_3IMRWXIL.getConfig)({ datamodel: schemaResult.schemas });
156
156
  const primaryDatasource = configFromPsl.datasources.at(0);
157
157
  return {
158
158
  schemaFiles: schemaResult.schemas,
@@ -206,12 +206,12 @@ async function getGenerators(options) {
206
206
  throw new Error(import_chunk_BGMZPA2F.missingDatasource);
207
207
  }
208
208
  (0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
209
- const dmmf = await (0, import_chunk_T3LF4DKH.getDMMF)({ datamodel: schemaContext.schemaFiles });
209
+ const dmmf = await (0, import_chunk_R47SFJ5Z.getDMMF)({ datamodel: schemaContext.schemaFiles });
210
210
  if (dmmf.datamodel.models.length === 0 && !allowNoModels) {
211
211
  if (schemaContext.primaryDatasource.provider === "mongodb") {
212
- throw new Error(import_chunk_NUKBOD54.missingModelMessageMongoDB);
212
+ throw new Error((0, import_chunk_WFMA7DI5.missingModelMessageMongoDB)(options.cliCommand));
213
213
  }
214
- throw new Error(import_chunk_NUKBOD54.missingModelMessage);
214
+ throw new Error((0, import_chunk_WFMA7DI5.missingModelMessage)(options.cliCommand));
215
215
  }
216
216
  const generatorConfigs = filterGenerators(overrideGenerators || schemaContext.generators, generatorNames);
217
217
  await validateGenerators(generatorConfigs);
@@ -226,7 +226,7 @@ async function getGenerators(options) {
226
226
  type: "rpc",
227
227
  generatorPath: providerValue
228
228
  };
229
- const generatorInstance = (0, import_chunk_XKZ6CBLA.z)(generatorDefinition).with({ type: "in-process" }, ({ generator }) => new import_chunk_BPDMLM32.InProcessGenerator(generatorConfig, generator)).with(
229
+ const generatorInstance = (0, import_chunk_YNDZCLVL.M)(generatorDefinition).with({ type: "in-process" }, ({ generator }) => new import_chunk_BPDMLM32.InProcessGenerator(generatorConfig, generator)).with(
230
230
  { type: "rpc" },
231
231
  ({ generatorPath, isNode }) => new import_chunk_BPDMLM32.JsonRpcGenerator(generatorPath, generatorConfig, isNode)
232
232
  ).exhaustive();
@@ -254,7 +254,7 @@ You need to define \`output\` in the generator block in the schema file.`
254
254
  fromEnvVar: null
255
255
  };
256
256
  }
257
- const datamodel = (0, import_chunk_XGQEVNKT.mergeSchemas)({ schemas: schemaContext.schemaFiles });
257
+ const datamodel = (0, import_chunk_XAAVALN7.mergeSchemas)({ schemas: schemaContext.schemaFiles });
258
258
  const options2 = {
259
259
  datamodel,
260
260
  datasources: schemaContext.datasources,
@@ -422,17 +422,17 @@ function filterGenerators(generators, generatorNames) {
422
422
  }
423
423
  return filtered;
424
424
  }
425
- var forbiddenCmdWithDataProxyFlagMessage = (cmd) => `
426
- Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(`prisma ${cmd}`)} yet.
425
+ var forbiddenCmdWithDataProxyFlagMessage = (command) => `
426
+ Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(command)} yet.
427
427
  Please use a direct connection to your database in \`prisma.config.ts\`.
428
428
 
429
429
  More information about this limitation: ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/accelerate-limitations")}
430
430
  `;
431
431
  function checkUnsupportedDataProxy({
432
- cmd,
432
+ command,
433
433
  validatedConfig
434
434
  }) {
435
435
  if (validatedConfig.datasource.url.startsWith("prisma://")) {
436
- throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
436
+ throw new Error(forbiddenCmdWithDataProxyFlagMessage(command));
437
437
  }
438
438
  }
@@ -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_5P4WR3QW_exports = {};
30
- __export(chunk_5P4WR3QW_exports, {
29
+ var chunk_XAAVALN7_exports = {};
30
+ __export(chunk_XAAVALN7_exports, {
31
31
  MergeSchemasError: () => MergeSchemasError,
32
32
  mergeSchemas: () => mergeSchemas
33
33
  });
34
- module.exports = __toCommonJS(chunk_5P4WR3QW_exports);
35
- var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
34
+ module.exports = __toCommonJS(chunk_XAAVALN7_exports);
35
+ var import_chunk_6Z766KGR = require("./chunk-6Z766KGR.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_GZY7QBBF = require("./chunk-GZY7QBBF.js");
39
- var import_chunk_PP22IZ7I = require("./chunk-PP22IZ7I.js");
38
+ var import_chunk_5WRIOIZY = require("./chunk-5WRIOIZY.js");
39
+ var import_chunk_5BDP445D = require("./chunk-5BDP445D.js");
40
40
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
41
- var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
41
+ var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.js");
42
42
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
43
43
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
44
44
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
@@ -47,7 +47,7 @@ var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57
47
47
  var debug = (0, import_debug.default)("prisma:mergeSchemas");
48
48
  var MergeSchemasError = class extends Error {
49
49
  constructor(params) {
50
- const constructedErrorMessage = (0, import_chunk_XKZ6CBLA.z)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
50
+ const constructedErrorMessage = (0, import_chunk_YNDZCLVL.M)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
51
51
  const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
52
52
  return `${reason}
53
53
  ${errorCodeMessage}
@@ -59,12 +59,12 @@ ${detailsHeader} ${message}`;
59
59
  }).exhaustive();
60
60
  const errorMessageWithContext = `${constructedErrorMessage}
61
61
  [Context: mergeSchemas]`;
62
- super((0, import_chunk_GZY7QBBF.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
+ super((0, import_chunk_5WRIOIZY.addVersionDetailsToErrorMessage)(errorMessageWithContext));
63
63
  this.name = "MergeSchemasError";
64
64
  }
65
65
  };
66
66
  function mergeSchemas(options) {
67
- const debugErrorType = (0, import_chunk_TZJROXB3.createDebugErrorType)(debug, "mergeSchemasWasm");
67
+ const debugErrorType = (0, import_chunk_6Z766KGR.createDebugErrorType)(debug, "mergeSchemasWasm");
68
68
  debug(`Using mergeSchemas Wasm`);
69
69
  const mergeSchemasEither = (0, import_function.pipe)(
70
70
  (0, import_chunk_5DBOS77Y.tryCatch)(
@@ -72,7 +72,7 @@ function mergeSchemas(options) {
72
72
  const params = JSON.stringify({
73
73
  schema: options.schemas
74
74
  });
75
- return import_chunk_PP22IZ7I.prismaSchemaWasm.merge_schemas(params);
75
+ return import_chunk_5BDP445D.prismaSchemaWasm.merge_schemas(params);
76
76
  },
77
77
  (e) => ({
78
78
  type: "wasm-error",
@@ -84,7 +84,7 @@ function mergeSchemas(options) {
84
84
  if ((0, import_chunk_5DBOS77Y.isRight)(mergeSchemasEither)) {
85
85
  return mergeSchemasEither.right;
86
86
  }
87
- const error = (0, import_chunk_XKZ6CBLA.z)(mergeSchemasEither.left).with({ type: "wasm-error" }, (e) => {
87
+ const error = (0, import_chunk_YNDZCLVL.M)(mergeSchemasEither.left).with({ type: "wasm-error" }, (e) => {
88
88
  debugErrorType(e);
89
89
  console.error("");
90
90
  if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(e.error)) {
@@ -104,7 +104,7 @@ function mergeSchemas(options) {
104
104
  return panic;
105
105
  }
106
106
  const errorOutput = e.error.message;
107
- return new MergeSchemasError((0, import_chunk_TZJROXB3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
107
+ return new MergeSchemasError((0, import_chunk_6Z766KGR.parseQueryEngineError)({ errorOutput, reason: e.reason }));
108
108
  }).exhaustive();
109
109
  throw error;
110
110
  }
@@ -0,0 +1,307 @@
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_YNDZCLVL_exports = {};
20
+ __export(chunk_YNDZCLVL_exports, {
21
+ M: () => M,
22
+ z: () => z
23
+ });
24
+ module.exports = __toCommonJS(chunk_YNDZCLVL_exports);
25
+ var t = Symbol.for("@ts-pattern/matcher");
26
+ var e = Symbol.for("@ts-pattern/isVariadic");
27
+ var n = "@ts-pattern/anonymous-select-key";
28
+ var r = (t2) => Boolean(t2 && "object" == typeof t2);
29
+ var i = (e2) => e2 && !!e2[t];
30
+ var o = (n2, s2, c2) => {
31
+ if (i(n2)) {
32
+ const e2 = n2[t](), { matched: r2, selections: i2 } = e2.match(s2);
33
+ return r2 && i2 && Object.keys(i2).forEach((t2) => c2(t2, i2[t2])), r2;
34
+ }
35
+ if (r(n2)) {
36
+ if (!r(s2)) return false;
37
+ if (Array.isArray(n2)) {
38
+ if (!Array.isArray(s2)) return false;
39
+ let t2 = [], r2 = [], u2 = [];
40
+ for (const o2 of n2.keys()) {
41
+ const s3 = n2[o2];
42
+ i(s3) && s3[e] ? u2.push(s3) : u2.length ? r2.push(s3) : t2.push(s3);
43
+ }
44
+ if (u2.length) {
45
+ if (u2.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
46
+ if (s2.length < t2.length + r2.length) return false;
47
+ const e2 = s2.slice(0, t2.length), n3 = 0 === r2.length ? [] : s2.slice(-r2.length), i2 = s2.slice(t2.length, 0 === r2.length ? Infinity : -r2.length);
48
+ return t2.every((t3, n4) => o(t3, e2[n4], c2)) && r2.every((t3, e3) => o(t3, n3[e3], c2)) && (0 === u2.length || o(u2[0], i2, c2));
49
+ }
50
+ return n2.length === s2.length && n2.every((t3, e2) => o(t3, s2[e2], c2));
51
+ }
52
+ return Reflect.ownKeys(n2).every((e2) => {
53
+ const r2 = n2[e2];
54
+ return (e2 in s2 || i(u2 = r2) && "optional" === u2[t]().matcherType) && o(r2, s2[e2], c2);
55
+ var u2;
56
+ });
57
+ }
58
+ return Object.is(s2, n2);
59
+ };
60
+ var s = (e2) => {
61
+ var n2, o2, u2;
62
+ return r(e2) ? i(e2) ? null != (n2 = null == (o2 = (u2 = e2[t]()).getSelectionKeys) ? void 0 : o2.call(u2)) ? n2 : [] : Array.isArray(e2) ? c(e2, s) : c(Object.values(e2), s) : [];
63
+ };
64
+ var c = (t2, e2) => t2.reduce((t3, n2) => t3.concat(e2(n2)), []);
65
+ function u(...t2) {
66
+ if (1 === t2.length) {
67
+ const [e2] = t2;
68
+ return (t3) => o(e2, t3, () => {
69
+ });
70
+ }
71
+ if (2 === t2.length) {
72
+ const [e2, n2] = t2;
73
+ return o(e2, n2, () => {
74
+ });
75
+ }
76
+ throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t2.length}.`);
77
+ }
78
+ function a(t2) {
79
+ return Object.assign(t2, { optional: () => h(t2), and: (e2) => d(t2, e2), or: (e2) => y(t2, e2), select: (e2) => void 0 === e2 ? v(t2) : v(e2, t2) });
80
+ }
81
+ function l(t2) {
82
+ return Object.assign(((t3) => Object.assign(t3, { [Symbol.iterator]() {
83
+ let n2 = 0;
84
+ const r2 = [{ value: Object.assign(t3, { [e]: true }), done: false }, { done: true, value: void 0 }];
85
+ return { next: () => {
86
+ var t4;
87
+ return null != (t4 = r2[n2++]) ? t4 : r2.at(-1);
88
+ } };
89
+ } }))(t2), { optional: () => l(h(t2)), select: (e2) => l(void 0 === e2 ? v(t2) : v(e2, t2)) });
90
+ }
91
+ function h(e2) {
92
+ return a({ [t]: () => ({ match: (t2) => {
93
+ let n2 = {};
94
+ const r2 = (t3, e3) => {
95
+ n2[t3] = e3;
96
+ };
97
+ return void 0 === t2 ? (s(e2).forEach((t3) => r2(t3, void 0)), { matched: true, selections: n2 }) : { matched: o(e2, t2, r2), selections: n2 };
98
+ }, getSelectionKeys: () => s(e2), matcherType: "optional" }) });
99
+ }
100
+ var f = (t2, e2) => {
101
+ for (const n2 of t2) if (!e2(n2)) return false;
102
+ return true;
103
+ };
104
+ var g = (t2, e2) => {
105
+ for (const [n2, r2] of t2.entries()) if (!e2(r2, n2)) return false;
106
+ return true;
107
+ };
108
+ var m = (t2, e2) => {
109
+ const n2 = Reflect.ownKeys(t2);
110
+ for (const r2 of n2) if (!e2(r2, t2[r2])) return false;
111
+ return true;
112
+ };
113
+ function d(...e2) {
114
+ return a({ [t]: () => ({ match: (t2) => {
115
+ let n2 = {};
116
+ const r2 = (t3, e3) => {
117
+ n2[t3] = e3;
118
+ };
119
+ return { matched: e2.every((e3) => o(e3, t2, r2)), selections: n2 };
120
+ }, getSelectionKeys: () => c(e2, s), matcherType: "and" }) });
121
+ }
122
+ function y(...e2) {
123
+ return a({ [t]: () => ({ match: (t2) => {
124
+ let n2 = {};
125
+ const r2 = (t3, e3) => {
126
+ n2[t3] = e3;
127
+ };
128
+ return c(e2, s).forEach((t3) => r2(t3, void 0)), { matched: e2.some((e3) => o(e3, t2, r2)), selections: n2 };
129
+ }, getSelectionKeys: () => c(e2, s), matcherType: "or" }) });
130
+ }
131
+ function p(e2) {
132
+ return { [t]: () => ({ match: (t2) => ({ matched: Boolean(e2(t2)) }) }) };
133
+ }
134
+ function v(...e2) {
135
+ const r2 = "string" == typeof e2[0] ? e2[0] : void 0, i2 = 2 === e2.length ? e2[1] : "string" == typeof e2[0] ? void 0 : e2[0];
136
+ return a({ [t]: () => ({ match: (t2) => {
137
+ let e3 = { [null != r2 ? r2 : n]: t2 };
138
+ return { matched: void 0 === i2 || o(i2, t2, (t3, n2) => {
139
+ e3[t3] = n2;
140
+ }), selections: e3 };
141
+ }, getSelectionKeys: () => [null != r2 ? r2 : n].concat(void 0 === i2 ? [] : s(i2)) }) });
142
+ }
143
+ function b(t2) {
144
+ return true;
145
+ }
146
+ function w(t2) {
147
+ return "number" == typeof t2;
148
+ }
149
+ function S(t2) {
150
+ return "string" == typeof t2;
151
+ }
152
+ function j(t2) {
153
+ return "bigint" == typeof t2;
154
+ }
155
+ var K = a(p(b));
156
+ var O = a(p(b));
157
+ var E = K;
158
+ var x = (t2) => Object.assign(a(t2), { startsWith: (e2) => {
159
+ return x(d(t2, (n2 = e2, p((t3) => S(t3) && t3.startsWith(n2)))));
160
+ var n2;
161
+ }, endsWith: (e2) => {
162
+ return x(d(t2, (n2 = e2, p((t3) => S(t3) && t3.endsWith(n2)))));
163
+ var n2;
164
+ }, minLength: (e2) => x(d(t2, ((t3) => p((e3) => S(e3) && e3.length >= t3))(e2))), length: (e2) => x(d(t2, ((t3) => p((e3) => S(e3) && e3.length === t3))(e2))), maxLength: (e2) => x(d(t2, ((t3) => p((e3) => S(e3) && e3.length <= t3))(e2))), includes: (e2) => {
165
+ return x(d(t2, (n2 = e2, p((t3) => S(t3) && t3.includes(n2)))));
166
+ var n2;
167
+ }, regex: (e2) => {
168
+ return x(d(t2, (n2 = e2, p((t3) => S(t3) && Boolean(t3.match(n2))))));
169
+ var n2;
170
+ } });
171
+ var A = x(p(S));
172
+ var N = (t2) => Object.assign(a(t2), { between: (e2, n2) => N(d(t2, ((t3, e3) => p((n3) => w(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => N(d(t2, ((t3) => p((e3) => w(e3) && e3 < t3))(e2))), gt: (e2) => N(d(t2, ((t3) => p((e3) => w(e3) && e3 > t3))(e2))), lte: (e2) => N(d(t2, ((t3) => p((e3) => w(e3) && e3 <= t3))(e2))), gte: (e2) => N(d(t2, ((t3) => p((e3) => w(e3) && e3 >= t3))(e2))), int: () => N(d(t2, p((t3) => w(t3) && Number.isInteger(t3)))), finite: () => N(d(t2, p((t3) => w(t3) && Number.isFinite(t3)))), positive: () => N(d(t2, p((t3) => w(t3) && t3 > 0))), negative: () => N(d(t2, p((t3) => w(t3) && t3 < 0))) });
173
+ var P = N(p(w));
174
+ var k = (t2) => Object.assign(a(t2), { between: (e2, n2) => k(d(t2, ((t3, e3) => p((n3) => j(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => k(d(t2, ((t3) => p((e3) => j(e3) && e3 < t3))(e2))), gt: (e2) => k(d(t2, ((t3) => p((e3) => j(e3) && e3 > t3))(e2))), lte: (e2) => k(d(t2, ((t3) => p((e3) => j(e3) && e3 <= t3))(e2))), gte: (e2) => k(d(t2, ((t3) => p((e3) => j(e3) && e3 >= t3))(e2))), positive: () => k(d(t2, p((t3) => j(t3) && t3 > 0))), negative: () => k(d(t2, p((t3) => j(t3) && t3 < 0))) });
175
+ var T = k(p(j));
176
+ var B = a(p(function(t2) {
177
+ return "boolean" == typeof t2;
178
+ }));
179
+ var _ = a(p(function(t2) {
180
+ return "symbol" == typeof t2;
181
+ }));
182
+ var W = a(p(function(t2) {
183
+ return null == t2;
184
+ }));
185
+ var $ = a(p(function(t2) {
186
+ return null != t2;
187
+ }));
188
+ var z = { __proto__: null, matcher: t, optional: h, array: function(...e2) {
189
+ return l({ [t]: () => ({ match: (t2) => {
190
+ if (!Array.isArray(t2)) return { matched: false };
191
+ if (0 === e2.length) return { matched: true };
192
+ const n2 = e2[0];
193
+ let r2 = {};
194
+ if (0 === t2.length) return s(n2).forEach((t3) => {
195
+ r2[t3] = [];
196
+ }), { matched: true, selections: r2 };
197
+ const i2 = (t3, e3) => {
198
+ r2[t3] = (r2[t3] || []).concat([e3]);
199
+ };
200
+ return { matched: t2.every((t3) => o(n2, t3, i2)), selections: r2 };
201
+ }, getSelectionKeys: () => 0 === e2.length ? [] : s(e2[0]) }) });
202
+ }, set: function(...e2) {
203
+ return a({ [t]: () => ({ match: (t2) => {
204
+ if (!(t2 instanceof Set)) return { matched: false };
205
+ let n2 = {};
206
+ if (0 === t2.size) return { matched: true, selections: n2 };
207
+ if (0 === e2.length) return { matched: true };
208
+ const r2 = (t3, e3) => {
209
+ n2[t3] = (n2[t3] || []).concat([e3]);
210
+ }, i2 = e2[0];
211
+ return { matched: f(t2, (t3) => o(i2, t3, r2)), selections: n2 };
212
+ }, getSelectionKeys: () => 0 === e2.length ? [] : s(e2[0]) }) });
213
+ }, map: function(...e2) {
214
+ return a({ [t]: () => ({ match: (t2) => {
215
+ if (!(t2 instanceof Map)) return { matched: false };
216
+ let n2 = {};
217
+ if (0 === t2.size) return { matched: true, selections: n2 };
218
+ const r2 = (t3, e3) => {
219
+ n2[t3] = (n2[t3] || []).concat([e3]);
220
+ };
221
+ if (0 === e2.length) return { matched: true };
222
+ var i2;
223
+ if (1 === e2.length) throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${null == (i2 = e2[0]) ? void 0 : i2.toString()}`);
224
+ const [s2, c2] = e2;
225
+ return { matched: g(t2, (t3, e3) => {
226
+ const n3 = o(s2, e3, r2), i3 = o(c2, t3, r2);
227
+ return n3 && i3;
228
+ }), selections: n2 };
229
+ }, getSelectionKeys: () => 0 === e2.length ? [] : [...s(e2[0]), ...s(e2[1])] }) });
230
+ }, record: function(...e2) {
231
+ return a({ [t]: () => ({ match: (t2) => {
232
+ if (null === t2 || "object" != typeof t2 || Array.isArray(t2)) return { matched: false };
233
+ var n2;
234
+ if (0 === e2.length) throw new Error(`\`P.record\` wasn't given enough arguments. Expected (value) or (key, value), received ${null == (n2 = e2[0]) ? void 0 : n2.toString()}`);
235
+ let r2 = {};
236
+ const i2 = (t3, e3) => {
237
+ r2[t3] = (r2[t3] || []).concat([e3]);
238
+ }, [s2, c2] = 1 === e2.length ? [A, e2[0]] : e2;
239
+ return { matched: m(t2, (t3, e3) => {
240
+ const n3 = "string" != typeof t3 || Number.isNaN(Number(t3)) ? null : Number(t3), r3 = null !== n3 && o(s2, n3, i2), u2 = o(s2, t3, i2), a2 = o(c2, e3, i2);
241
+ return (u2 || r3) && a2;
242
+ }), selections: r2 };
243
+ }, getSelectionKeys: () => 0 === e2.length ? [] : [...s(e2[0]), ...s(e2[1])] }) });
244
+ }, intersection: d, union: y, not: function(e2) {
245
+ return a({ [t]: () => ({ match: (t2) => ({ matched: !o(e2, t2, () => {
246
+ }) }), getSelectionKeys: () => [], matcherType: "not" }) });
247
+ }, when: p, select: v, any: K, unknown: O, _: E, string: A, number: P, bigint: T, boolean: B, symbol: _, nullish: W, nonNullable: $, instanceOf: function(t2) {
248
+ return a(p(/* @__PURE__ */ function(t3) {
249
+ return (e2) => e2 instanceof t3;
250
+ }(t2)));
251
+ }, shape: function(t2) {
252
+ return a(p(u(t2)));
253
+ } };
254
+ var I = class extends Error {
255
+ constructor(t2) {
256
+ let e2;
257
+ try {
258
+ e2 = JSON.stringify(t2);
259
+ } catch (n2) {
260
+ e2 = t2;
261
+ }
262
+ super(`Pattern matching error: no pattern matches value ${e2}`), this.input = void 0, this.input = t2;
263
+ }
264
+ };
265
+ var L = { matched: false, value: void 0 };
266
+ function M(t2) {
267
+ return new R(t2, L);
268
+ }
269
+ var R = class _R {
270
+ constructor(t2, e2) {
271
+ this.input = void 0, this.state = void 0, this.input = t2, this.state = e2;
272
+ }
273
+ with(...t2) {
274
+ if (this.state.matched) return this;
275
+ const e2 = t2[t2.length - 1], r2 = [t2[0]];
276
+ let i2;
277
+ 3 === t2.length && "function" == typeof t2[1] ? i2 = t2[1] : t2.length > 2 && r2.push(...t2.slice(1, t2.length - 1));
278
+ let s2 = false, c2 = {};
279
+ const u2 = (t3, e3) => {
280
+ s2 = true, c2[t3] = e3;
281
+ }, a2 = !r2.some((t3) => o(t3, this.input, u2)) || i2 && !Boolean(i2(this.input)) ? L : { matched: true, value: e2(s2 ? n in c2 ? c2[n] : c2 : this.input, this.input) };
282
+ return new _R(this.input, a2);
283
+ }
284
+ when(t2, e2) {
285
+ if (this.state.matched) return this;
286
+ const n2 = Boolean(t2(this.input));
287
+ return new _R(this.input, n2 ? { matched: true, value: e2(this.input, this.input) } : L);
288
+ }
289
+ otherwise(t2) {
290
+ return this.state.matched ? this.state.value : t2(this.input);
291
+ }
292
+ exhaustive(t2 = F) {
293
+ return this.state.matched ? this.state.value : t2(this.input);
294
+ }
295
+ run() {
296
+ return this.exhaustive();
297
+ }
298
+ returnType() {
299
+ return this;
300
+ }
301
+ narrow() {
302
+ return this;
303
+ }
304
+ };
305
+ function F(t2) {
306
+ throw new I(t2);
307
+ }
@@ -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_PP22IZ7I_exports = {};
30
- __export(chunk_PP22IZ7I_exports, {
29
+ var chunk_YWFKXS5Q_exports = {};
30
+ __export(chunk_YWFKXS5Q_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_PP22IZ7I_exports);
37
- var import_chunk_LZ2DP3UC = require("./chunk-LZ2DP3UC.js");
36
+ module.exports = __toCommonJS(chunk_YWFKXS5Q_exports);
37
+ var import_chunk_GYNBIEMC = require("./chunk-GYNBIEMC.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"));
@@ -46,6 +46,6 @@ var wasm_exports = {};
46
46
  });
47
47
  var globalWithPanicRegistry = globalThis;
48
48
  globalWithPanicRegistry.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_WXRVYSYN.WasmPanicRegistry();
49
- var { dependencies } = (0, import_chunk_LZ2DP3UC.require_package)();
49
+ var { dependencies } = (0, import_chunk_GYNBIEMC.require_package)();
50
50
  var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
51
51
  var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
@@ -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_7IKUTPWQ_exports = {};
30
- __export(chunk_7IKUTPWQ_exports, {
29
+ var chunk_YXB6APHS_exports = {};
30
+ __export(chunk_YXB6APHS_exports, {
31
31
  getGitHubIssueUrl: () => getGitHubIssueUrl,
32
32
  wouldYouLikeToCreateANewIssue: () => wouldYouLikeToCreateANewIssue
33
33
  });
34
- module.exports = __toCommonJS(chunk_7IKUTPWQ_exports);
35
- var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
34
+ module.exports = __toCommonJS(chunk_YXB6APHS_exports);
35
+ var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.js");
36
36
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
37
37
  var import_node_util = require("node:util");
38
38
  var import_get_platform = require("@prisma/get-platform");
@@ -378,7 +378,7 @@ function getGitHubIssueUrl({
378
378
  });
379
379
  }
380
380
  async function wouldYouLikeToCreateANewIssue(options) {
381
- const shouldCreateNewIssue = await (0, import_chunk_XKZ6CBLA.z)(options.prompt).with(true, async () => {
381
+ const shouldCreateNewIssue = await (0, import_chunk_YNDZCLVL.M)(options.prompt).with(true, async () => {
382
382
  const createNewIssueResponse = await (0, import_prompts.default)({
383
383
  type: "select",
384
384
  name: "value",
@@ -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_GZY7QBBF_exports = {};
20
- __export(chunk_GZY7QBBF_exports, {
19
+ var chunk_ZVBYKW53_exports = {};
20
+ __export(chunk_ZVBYKW53_exports, {
21
21
  addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
22
22
  });
23
- module.exports = __toCommonJS(chunk_GZY7QBBF_exports);
23
+ module.exports = __toCommonJS(chunk_ZVBYKW53_exports);
24
24
  var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
25
- var import_chunk_3GIVRMID = require("./chunk-3GIVRMID.js");
25
+ var import_chunk_4LDJVZN5 = require("./chunk-4LDJVZN5.js");
26
26
  function addVersionDetailsToErrorMessage(message) {
27
- const rows = [["Prisma CLI Version", import_chunk_3GIVRMID.version]];
27
+ const rows = [["Prisma CLI Version", import_chunk_4LDJVZN5.version]];
28
28
  return `${message}
29
29
 
30
30
  ${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
@@ -1,16 +1,16 @@
1
1
  import type { PrismaConfigWithDatasource } from '../utils/validatePrismaConfigWithDatasource';
2
2
  /**
3
3
  * Get the message to display when a command is forbidden with a data proxy flag
4
- * @param cmd the cli command (eg. db push)
4
+ * @param command the full cli command (eg. prisma db push)
5
5
  * @returns
6
6
  */
7
- export declare const forbiddenCmdWithDataProxyFlagMessage: (cmd: string) => string;
7
+ export declare const forbiddenCmdWithDataProxyFlagMessage: (command: string) => string;
8
8
  /**
9
9
  * Check that the data proxy cannot be used through the given urls and schema contexts
10
- * @param cmd the cli command (eg. db push)
10
+ * @param command the full cli command (eg. prisma db push)
11
11
  * @param validatedConfig the validated Prisma Config value
12
12
  */
13
- export declare function checkUnsupportedDataProxy({ cmd, validatedConfig, }: {
14
- cmd: string;
13
+ export declare function checkUnsupportedDataProxy({ command, validatedConfig, }: {
14
+ command: string;
15
15
  validatedConfig: PrismaConfigWithDatasource;
16
16
  }): void;