@prisma/internals 7.2.0-integration-engines-7-2-0-3-aqrln-zpupkzknszlw-04d61c41ec1a025cabe14093fa3121a5f45040ab.1 → 7.3.0-integration-fix-6-19-0-cloudflare-accelerate-engine.1

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 (137) hide show
  1. package/dist/{chunk-VBLGRBF2.js → chunk-262R2PBW.js} +5 -5
  2. package/dist/chunk-3FP46GUV.js +471 -0
  3. package/dist/chunk-46ABODUM.js +186 -0
  4. package/dist/{chunk-GJSFP4V4.js → chunk-4CGPN5SR.js} +9 -3
  5. package/dist/{chunk-TCDF53CN.js → chunk-4JCVHBYR.js} +6 -6
  6. package/dist/{chunk-Q6D7PXUU.js → chunk-55ZV2II2.js} +38 -16
  7. package/dist/{chunk-YQYFLEMT.js → chunk-5ETP2F4G.js} +5 -5
  8. package/dist/{chunk-Z64WCHZR.js → chunk-5PEHPZHO.js} +11 -11
  9. package/dist/{chunk-PNYEHZAU.js → chunk-656EKQL7.js} +5 -5
  10. package/dist/{chunk-OWVQILDA.js → chunk-65XSDXPY.js} +13 -13
  11. package/dist/chunk-6TTRTZXU.js +37 -0
  12. package/dist/{chunk-Q5XW7CMJ.js → chunk-75BIJ5PX.js} +9 -9
  13. package/dist/{chunk-DXWYZA7B.js → chunk-7QC5VORA.js} +4 -3
  14. package/dist/{chunk-5YZKJGXV.js → chunk-7QKLIARO.js} +10 -8
  15. package/dist/{chunk-CQVWHHIJ.js → chunk-AX5N26KG.js} +6 -11
  16. package/dist/{chunk-NBWRGVYR.js → chunk-BCQZ6JQE.js} +6 -4
  17. package/dist/{chunk-BXIKQUP5.js → chunk-BVJP43JS.js} +7 -7
  18. package/dist/chunk-D4VDA2TZ.js +66 -0
  19. package/dist/{chunk-EQ6XBXVV.js → chunk-D6JNJJI7.js} +146 -58
  20. package/dist/chunk-DZYINYAA.js +68 -0
  21. package/dist/{chunk-4QR3X56D.js → chunk-E2QTLJH5.js} +13 -13
  22. package/dist/chunk-ERSH2BQA.js +58 -0
  23. package/dist/{chunk-42R3EIRM.js → chunk-EYVG6XQS.js} +67 -55
  24. package/dist/{chunk-GH2WAX5Y.js → chunk-F2OZV76L.js} +7 -7
  25. package/dist/{chunk-R3J2O23S.js → chunk-FCYHZHVW.js} +4 -4
  26. package/dist/{chunk-DQWKFZPY.js → chunk-FYZCPL2Z.js} +7 -4
  27. package/dist/{chunk-2GPDFPDR.js → chunk-GMW36QQF.js} +7 -7
  28. package/dist/{chunk-US23KCBP.js → chunk-H43XC5ET.js} +5 -5
  29. package/dist/{chunk-YXCPS3WU.js → chunk-HFFWZTVM.js} +15 -5
  30. package/dist/chunk-HO5HRHFZ.js +30 -0
  31. package/dist/chunk-HW5RCZSE.js +1 -0
  32. package/dist/{chunk-YV4IFLW4.js → chunk-JOIIWB3U.js} +129 -128
  33. package/dist/chunk-KDHESRKE.js +49 -0
  34. package/dist/{chunk-B4NUBXXO.js → chunk-KH7FI42S.js} +11 -11
  35. package/dist/chunk-L6KOIJJ5.js +125 -0
  36. package/dist/{chunk-3U4QB2G3.js → chunk-LYFOJ5NK.js} +6 -4
  37. package/dist/{chunk-Q75TMXCR.js → chunk-OAT7ZJED.js} +20 -7
  38. package/dist/{chunk-WK3RWN6T.js → chunk-OPLMJ5WZ.js} +146 -58
  39. package/dist/{chunk-SP2ETLT2.js → chunk-OSHZ4P3G.js} +5 -5
  40. package/dist/{chunk-QFQIWWVN.js → chunk-OWUYXGDF.js} +12 -12
  41. package/dist/chunk-PZMRR772.js +41 -0
  42. package/dist/{chunk-RR7B6GH2.js → chunk-QDT7TGYZ.js} +5 -5
  43. package/dist/{chunk-QNSOKYEF.js → chunk-QLOP3Z4E.js} +38 -16
  44. package/dist/{chunk-Y5TWK45J.js → chunk-QPQF4VGD.js} +12 -12
  45. package/dist/chunk-RFB2U4GQ.js +41 -0
  46. package/dist/{chunk-5I4ERIIY.js → chunk-RS2R7COT.js} +9 -3
  47. package/dist/chunk-T2PM5TKT.js +55 -0
  48. package/dist/{chunk-X2DGDDLX.js → chunk-THADADEM.js} +9 -7
  49. package/dist/{chunk-5BRXEOYH.js → chunk-TQFONRJP.js} +5 -5
  50. package/dist/{chunk-WSZXPLJQ.js → chunk-TZJROXB3.js} +4 -4
  51. package/dist/{chunk-YJVCIN4F.js → chunk-UHI6VYFX.js} +14 -16
  52. package/dist/{chunk-NYNXYKR4.js → chunk-UQUWZJVN.js} +7 -7
  53. package/dist/{chunk-N3FJZLFP.js → chunk-W6J5YFD2.js} +5 -5
  54. package/dist/{chunk-AJALNZEH.js → chunk-WDPDHAFW.js} +5 -5
  55. package/dist/{chunk-ARC7TW3L.js → chunk-WFNB7VRA.js} +14 -4
  56. package/dist/{chunk-5IS5OH7Z.js → chunk-WKP2TVYB.js} +5 -5
  57. package/dist/cli/checkUnsupportedDataProxy.d.ts +9 -7
  58. package/dist/cli/checkUnsupportedDataProxy.js +65 -53
  59. package/dist/cli/checkUnsupportedSchemaEngineWasm.d.ts +22 -0
  60. package/dist/cli/checkUnsupportedSchemaEngineWasm.js +135 -0
  61. package/dist/cli/directoryConfig.d.ts +2 -5
  62. package/dist/cli/directoryConfig.js +2 -2
  63. package/dist/cli/getGeneratorSuccessMessage.js +3 -2
  64. package/dist/cli/getSchema.d.ts +20 -28
  65. package/dist/cli/getSchema.js +5 -7
  66. package/dist/cli/hashes.d.ts +1 -2
  67. package/dist/cli/hashes.js +4 -4
  68. package/dist/cli/schemaContext.d.ts +22 -5
  69. package/dist/cli/schemaContext.js +65 -54
  70. package/dist/cli/types.d.ts +1 -1
  71. package/dist/client/getClientEngineType.d.ts +7 -0
  72. package/dist/client/getClientEngineType.js +26 -0
  73. package/dist/convertCredentials.js +4 -4
  74. package/dist/dotenvExpand.d.ts +35 -0
  75. package/dist/dotenvExpand.js +25 -0
  76. package/dist/engine-commands/errorHelpers.js +4 -4
  77. package/dist/engine-commands/formatSchema.js +64 -52
  78. package/dist/engine-commands/getConfig.d.ts +5 -1
  79. package/dist/engine-commands/getConfig.js +13 -10
  80. package/dist/engine-commands/getDmmf.js +10 -10
  81. package/dist/engine-commands/getEngineVersion.js +9 -5
  82. package/dist/engine-commands/getEnginesInfo.d.ts +1 -0
  83. package/dist/engine-commands/getEnginesInfo.js +9 -6
  84. package/dist/engine-commands/index.d.ts +1 -1
  85. package/dist/engine-commands/index.js +76 -62
  86. package/dist/engine-commands/lintSchema.js +9 -9
  87. package/dist/engine-commands/mergeSchemas.js +10 -10
  88. package/dist/engine-commands/queryEngineCommons.js +6 -6
  89. package/dist/engine-commands/validate.js +10 -10
  90. package/dist/get-generators/getGenerators.d.ts +2 -0
  91. package/dist/get-generators/getGenerators.js +67 -55
  92. package/dist/get-generators/utils/binaryTypeToEngineType.js +2 -2
  93. package/dist/get-generators/utils/engineTypeToBinaryType.js +2 -2
  94. package/dist/get-generators/utils/getBinaryPathsByVersion.js +4 -4
  95. package/dist/getPackedPackage.js +3 -3
  96. package/dist/index.d.ts +19 -5
  97. package/dist/index.js +125 -99
  98. package/dist/resolveBinary.js +7 -7
  99. package/dist/schemaEngineCommands.js +8 -8
  100. package/dist/sendPanic.js +3 -2
  101. package/dist/tracing/types.d.ts +54 -0
  102. package/dist/tracing/types.js +2 -0
  103. package/dist/types.d.ts +0 -15
  104. package/dist/utils/__tests__/maskSchema.test.js +23 -0
  105. package/dist/utils/byline.d.ts +4 -0
  106. package/dist/utils/byline.js +28 -0
  107. package/dist/utils/canPrompt.js +3 -3
  108. package/dist/utils/cloudflareD1.d.ts +5 -0
  109. package/dist/utils/cloudflareD1.js +27 -0
  110. package/dist/utils/fs-functional.js +10 -10
  111. package/dist/utils/fs-utils.js +8 -8
  112. package/dist/utils/getEnvPaths.d.ts +14 -0
  113. package/dist/utils/{validatePrismaConfigWithDatasource.js → getEnvPaths.js} +8 -7
  114. package/dist/utils/getMigrateConfigDir.d.ts +2 -0
  115. package/dist/utils/getMigrateConfigDir.js +25 -0
  116. package/dist/utils/getVersionFromPackageJson.js +3 -3
  117. package/dist/utils/handleEngineLoadingErrors.d.ts +8 -0
  118. package/dist/utils/handleEngineLoadingErrors.js +27 -0
  119. package/dist/utils/handlePanic.js +7 -6
  120. package/dist/utils/load.d.ts +6 -0
  121. package/dist/utils/load.js +28 -0
  122. package/dist/utils/loadEnvFile.d.ts +10 -0
  123. package/dist/utils/loadEnvFile.js +30 -0
  124. package/dist/utils/maskSchema.d.ts +4 -0
  125. package/dist/utils/maskSchema.js +27 -0
  126. package/dist/utils/missingDatasource.js +2 -2
  127. package/dist/utils/missingGeneratorMessage.js +4 -4
  128. package/dist/utils/serializeQueryEngineName.d.ts +4 -0
  129. package/dist/utils/serializeQueryEngineName.js +25 -0
  130. package/dist/utils/toSchemasContainer.d.ts +1 -1
  131. package/dist/utils/toSchemasContainer.js +3 -3
  132. package/dist/utils/tryLoadEnvs.d.ts +25 -0
  133. package/dist/utils/tryLoadEnvs.js +30 -0
  134. package/dist/wasm.js +5 -5
  135. package/package.json +17 -15
  136. package/dist/chunk-5SAWCTGN.js +0 -46
  137. package/dist/utils/validatePrismaConfigWithDatasource.d.ts +0 -15
@@ -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_Y5TWK45J_exports = {};
30
- __export(chunk_Y5TWK45J_exports, {
29
+ var chunk_QPQF4VGD_exports = {};
30
+ __export(chunk_QPQF4VGD_exports, {
31
31
  GetDmmfError: () => GetDmmfError,
32
32
  getDMMF: () => getDMMF
33
33
  });
34
- module.exports = __toCommonJS(chunk_Y5TWK45J_exports);
35
- var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
34
+ module.exports = __toCommonJS(chunk_QPQF4VGD_exports);
35
+ var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
36
36
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
37
- var import_chunk_AJALNZEH = require("./chunk-AJALNZEH.js");
38
- var import_chunk_VBLGRBF2 = require("./chunk-VBLGRBF2.js");
37
+ var import_chunk_WDPDHAFW = require("./chunk-WDPDHAFW.js");
38
+ var import_chunk_262R2PBW = require("./chunk-262R2PBW.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,25 +58,25 @@ ${detailsHeader} ${message}`;
58
58
  }).exhaustive();
59
59
  const errorMessageWithContext = `${constructedErrorMessage}
60
60
  [Context: getDmmf]`;
61
- super((0, import_chunk_AJALNZEH.addVersionDetailsToErrorMessage)(errorMessageWithContext));
61
+ super((0, import_chunk_WDPDHAFW.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
62
  this.name = "GetDmmfError";
63
63
  }
64
64
  };
65
65
  async function getDMMF(options) {
66
- const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getDmmfWasm");
66
+ const debugErrorType = (0, import_chunk_TZJROXB3.createDebugErrorType)(debug, "getDmmfWasm");
67
67
  debug(`Using getDmmf Wasm`);
68
68
  const dmmfPipeline = (0, import_function.pipe)(
69
69
  (0, import_chunk_5DBOS77Y.tryCatch)(
70
70
  () => {
71
- if (process.env.FORCE_PANIC_GET_DMMF) {
71
+ if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
72
72
  debug("Triggering a Rust panic...");
73
- import_chunk_VBLGRBF2.prismaSchemaWasm.debug_panic();
73
+ import_chunk_262R2PBW.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_VBLGRBF2.prismaSchemaWasm.get_dmmf(params);
79
+ const data = import_chunk_262R2PBW.prismaSchemaWasm.get_dmmf(params);
80
80
  return data;
81
81
  },
82
82
  (e) => ({
@@ -124,7 +124,7 @@ async function getDMMF(options) {
124
124
  return panic;
125
125
  }
126
126
  const errorOutput = e.error.message;
127
- return new GetDmmfError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
127
+ return new GetDmmfError((0, import_chunk_TZJROXB3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
128
128
  }).with({ type: "parse-json" }, (e) => {
129
129
  debugErrorType(e);
130
130
  return new GetDmmfError({ _tag: "unparsed", message: e.error.message, reason: e.reason });
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var chunk_RFB2U4GQ_exports = {};
30
+ __export(chunk_RFB2U4GQ_exports, {
31
+ getMigrateConfigDir: () => getMigrateConfigDir
32
+ });
33
+ module.exports = __toCommonJS(chunk_RFB2U4GQ_exports);
34
+ var import_path = __toESM(require("path"));
35
+ function getMigrateConfigDir(config, schemaPath) {
36
+ const sourcePath = config?.datasources?.[0]?.sourceFilePath;
37
+ if (sourcePath) {
38
+ return import_path.default.dirname(sourcePath);
39
+ }
40
+ return schemaPath ? import_path.default.dirname(schemaPath) : process.cwd();
41
+ }
@@ -16,15 +16,21 @@ 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_5I4ERIIY_exports = {};
20
- __export(chunk_5I4ERIIY_exports, {
19
+ var chunk_RS2R7COT_exports = {};
20
+ __export(chunk_RS2R7COT_exports, {
21
21
  binaryTypeToEngineType: () => binaryTypeToEngineType
22
22
  });
23
- module.exports = __toCommonJS(chunk_5I4ERIIY_exports);
23
+ module.exports = __toCommonJS(chunk_RS2R7COT_exports);
24
24
  var import_fetch_engine = require("@prisma/fetch-engine");
25
25
  function binaryTypeToEngineType(binaryType) {
26
26
  if (binaryType === import_fetch_engine.BinaryType.SchemaEngineBinary) {
27
27
  return "schemaEngine";
28
28
  }
29
+ if (binaryType === import_fetch_engine.BinaryType.QueryEngineLibrary) {
30
+ return "libqueryEngine";
31
+ }
32
+ if (binaryType === import_fetch_engine.BinaryType.QueryEngineBinary) {
33
+ return "queryEngine";
34
+ }
29
35
  throw new Error(`Could not convert binary type ${binaryType}`);
30
36
  }
@@ -0,0 +1,55 @@
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_T2PM5TKT_exports = {};
20
+ __export(chunk_T2PM5TKT_exports, {
21
+ dotenvExpand: () => dotenvExpand
22
+ });
23
+ module.exports = __toCommonJS(chunk_T2PM5TKT_exports);
24
+ function dotenvExpand(config) {
25
+ const environment = config.ignoreProcessEnv ? {} : process.env;
26
+ const interpolate = (envValue) => {
27
+ const matches = envValue.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g);
28
+ return matches?.reduce(function(newEnv, match) {
29
+ const parts = /(.?)\${([a-zA-Z0-9_]+)?}/g.exec(match);
30
+ if (!parts) {
31
+ return newEnv;
32
+ }
33
+ const prefix = parts[1];
34
+ let value, replacePart;
35
+ if (prefix === "\\") {
36
+ replacePart = parts[0];
37
+ value = replacePart.replace("\\$", "$");
38
+ } else {
39
+ const key = parts[2];
40
+ replacePart = parts[0].substring(prefix.length);
41
+ value = Object.hasOwnProperty.call(environment, key) ? environment[key] : config.parsed[key] || "";
42
+ value = interpolate(value);
43
+ }
44
+ return newEnv.replace(replacePart, value);
45
+ }, envValue) ?? envValue;
46
+ };
47
+ for (const configKey in config.parsed) {
48
+ const value = Object.hasOwnProperty.call(environment, configKey) ? environment[configKey] : config.parsed[configKey];
49
+ config.parsed[configKey] = interpolate(value);
50
+ }
51
+ for (const processKey in config.parsed) {
52
+ environment[processKey] = config.parsed[processKey];
53
+ }
54
+ return config;
55
+ }
@@ -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_X2DGDDLX_exports = {};
20
- __export(chunk_X2DGDDLX_exports, {
19
+ var chunk_THADADEM_exports = {};
20
+ __export(chunk_THADADEM_exports, {
21
21
  require_package: () => require_package
22
22
  });
23
- module.exports = __toCommonJS(chunk_X2DGDDLX_exports);
23
+ module.exports = __toCommonJS(chunk_THADADEM_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) {
@@ -48,6 +48,7 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
48
48
  files: [
49
49
  "README.md",
50
50
  "dist",
51
+ "!**/libquery_engine*",
51
52
  "!dist/get-generators/engines/*",
52
53
  "scripts"
53
54
  ],
@@ -58,11 +59,12 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
58
59
  "@swc/jest": "0.2.37",
59
60
  "@types/babel__helper-validator-identifier": "7.15.2",
60
61
  "@types/jest": "29.5.14",
61
- "@types/node": "~20.19.24",
62
+ "@types/node": "18.19.76",
62
63
  "@types/resolve": "1.20.6",
63
64
  archiver: "6.0.2",
64
65
  "checkpoint-client": "1.1.33",
65
66
  "cli-truncate": "4.0.0",
67
+ dotenv: "16.5.0",
66
68
  empathic: "2.0.0",
67
69
  "escape-string-regexp": "5.0.0",
68
70
  execa: "8.0.1",
@@ -107,14 +109,14 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
107
109
  "@prisma/generator": "workspace:*",
108
110
  "@prisma/generator-helper": "workspace:*",
109
111
  "@prisma/get-platform": "workspace:*",
110
- "@prisma/prisma-schema-wasm": "7.2.0-3.aqrln-zpupkzknszlw-04d61c41ec1a025cabe14093fa3121a5f45040ab",
111
- "@prisma/schema-engine-wasm": "7.2.0-3.aqrln-zpupkzknszlw-04d61c41ec1a025cabe14093fa3121a5f45040ab",
112
+ "@prisma/prisma-schema-wasm": "7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7",
113
+ "@prisma/schema-engine-wasm": "7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7",
112
114
  "@prisma/schema-files-loader": "workspace:*",
113
115
  arg: "5.0.2",
114
116
  prompts: "2.4.2"
115
117
  },
116
118
  peerDependencies: {
117
- typescript: ">=5.4.0"
119
+ typescript: ">=5.1.0"
118
120
  },
119
121
  peerDependenciesMeta: {
120
122
  typescript: {
@@ -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_5BRXEOYH_exports = {};
30
- __export(chunk_5BRXEOYH_exports, {
29
+ var chunk_TQFONRJP_exports = {};
30
+ __export(chunk_TQFONRJP_exports, {
31
31
  createDirIfNotExists: () => createDirIfNotExists,
32
32
  fs_utils_exports: () => fs_utils_exports,
33
33
  getFilesInDir: () => getFilesInDir,
@@ -36,9 +36,9 @@ __export(chunk_5BRXEOYH_exports, {
36
36
  removeEmptyDirs: () => removeEmptyDirs,
37
37
  writeFile: () => writeFile
38
38
  });
39
- module.exports = __toCommonJS(chunk_5BRXEOYH_exports);
39
+ module.exports = __toCommonJS(chunk_TQFONRJP_exports);
40
40
  var import_chunk_J77ZIDXB = require("./chunk-J77ZIDXB.js");
41
- var import_chunk_YV4IFLW4 = require("./chunk-YV4IFLW4.js");
41
+ var import_chunk_JOIIWB3U = require("./chunk-JOIIWB3U.js");
42
42
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
43
43
  var import_promises = __toESM(require("fs/promises"));
44
44
  var import_path = __toESM(require("path"));
@@ -51,7 +51,7 @@ var fs_utils_exports = {};
51
51
  removeEmptyDirs: () => removeEmptyDirs,
52
52
  writeFile: () => writeFile
53
53
  });
54
- var import_globby = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_YV4IFLW4.require_globby)());
54
+ var import_globby = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_JOIIWB3U.require_globby)());
55
55
  function createDirIfNotExists(dir) {
56
56
  return import_promises.default.mkdir(dir, { recursive: true });
57
57
  }
@@ -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_WSZXPLJQ_exports = {};
30
- __export(chunk_WSZXPLJQ_exports, {
29
+ var chunk_TZJROXB3_exports = {};
30
+ __export(chunk_TZJROXB3_exports, {
31
31
  createDebugErrorType: () => createDebugErrorType,
32
32
  createSchemaValidationError: () => createSchemaValidationError,
33
33
  parseQueryEngineError: () => parseQueryEngineError,
34
34
  unlinkTempDatamodelPath: () => unlinkTempDatamodelPath
35
35
  });
36
- module.exports = __toCommonJS(chunk_WSZXPLJQ_exports);
37
- var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
36
+ module.exports = __toCommonJS(chunk_TZJROXB3_exports);
38
37
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
38
+ var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.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_PG5FDKSF = require("./chunk-PG5FDKSF.js");
@@ -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_YJVCIN4F_exports = {};
20
- __export(chunk_YJVCIN4F_exports, {
19
+ var chunk_UHI6VYFX_exports = {};
20
+ __export(chunk_UHI6VYFX_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_YJVCIN4F_exports);
27
+ module.exports = __toCommonJS(chunk_UHI6VYFX_exports);
28
28
  var import_chunk_JOIHHXR6 = require("./chunk-JOIHHXR6.js");
29
- var import_chunk_DQWKFZPY = require("./chunk-DQWKFZPY.js");
29
+ var import_chunk_FYZCPL2Z = require("./chunk-FYZCPL2Z.js");
30
30
  var import_fetch_engine = require("@prisma/fetch-engine");
31
31
  var SchemaEngineExitCode = /* @__PURE__ */ ((SchemaEngineExitCode2) => {
32
32
  SchemaEngineExitCode2[SchemaEngineExitCode2["Success"] = 0] = "Success";
@@ -50,7 +50,9 @@ function parseJsonFromStderr(stderr) {
50
50
  }
51
51
  async function canConnectToDatabase(connectionString, cwd = process.cwd(), schemaEnginePath) {
52
52
  if (!connectionString) {
53
- throw new Error("Connection url is empty. See https://pris.ly/d/config-url");
53
+ throw new Error(
54
+ "Connection url is empty. See https://www.prisma.io/docs/reference/database-reference/connection-urls"
55
+ );
54
56
  }
55
57
  try {
56
58
  await execaCommand({
@@ -137,19 +139,15 @@ async function execaCommand({
137
139
  schemaEnginePath,
138
140
  engineCommandName
139
141
  }) {
140
- schemaEnginePath = schemaEnginePath || await (0, import_chunk_DQWKFZPY.resolveBinary)(import_fetch_engine.BinaryType.SchemaEngineBinary);
142
+ schemaEnginePath = schemaEnginePath || await (0, import_chunk_FYZCPL2Z.resolveBinary)(import_fetch_engine.BinaryType.SchemaEngineBinary);
141
143
  try {
142
- return await (0, import_chunk_JOIHHXR6.execa)(
143
- schemaEnginePath,
144
- ["--datasource", JSON.stringify({ url: connectionString }), "cli", engineCommandName],
145
- {
146
- cwd,
147
- env: {
148
- RUST_BACKTRACE: process.env.RUST_BACKTRACE ?? "1",
149
- RUST_LOG: process.env.RUST_LOG ?? "info"
150
- }
144
+ return await (0, import_chunk_JOIHHXR6.execa)(schemaEnginePath, ["cli", "--datasource", connectionString, engineCommandName], {
145
+ cwd,
146
+ env: {
147
+ RUST_BACKTRACE: process.env.RUST_BACKTRACE ?? "1",
148
+ RUST_LOG: process.env.RUST_LOG ?? "info"
151
149
  }
152
- );
150
+ });
153
151
  } catch (_e) {
154
152
  const e = _e;
155
153
  if (e.message) {
@@ -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_NYNXYKR4_exports = {};
30
- __export(chunk_NYNXYKR4_exports, {
29
+ var chunk_UQUWZJVN_exports = {};
30
+ __export(chunk_UQUWZJVN_exports, {
31
31
  handlePanic: () => handlePanic
32
32
  });
33
- module.exports = __toCommonJS(chunk_NYNXYKR4_exports);
33
+ module.exports = __toCommonJS(chunk_UQUWZJVN_exports);
34
34
  var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
35
35
  var import_chunk_7IKUTPWQ = require("./chunk-7IKUTPWQ.js");
36
- var import_chunk_R3J2O23S = require("./chunk-R3J2O23S.js");
37
- var import_chunk_YXCPS3WU = require("./chunk-YXCPS3WU.js");
36
+ var import_chunk_FCYHZHVW = require("./chunk-FCYHZHVW.js");
37
+ var import_chunk_HFFWZTVM = require("./chunk-HFFWZTVM.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);
@@ -79,7 +79,7 @@ ${(0, import_chunk_PG5FDKSF.dim)(`Learn more: ${(0, import_chunk_I6WLABB2.link)(
79
79
  if (shouldSubmitReport) {
80
80
  try {
81
81
  console.log("Submitting...");
82
- const reportId = await (0, import_chunk_YXCPS3WU.sendPanic)({ error, cliVersion, enginesVersion, getDatabaseVersionSafe });
82
+ const reportId = await (0, import_chunk_HFFWZTVM.sendPanic)({ error, cliVersion, enginesVersion, getDatabaseVersionSafe });
83
83
  console.log(`
84
84
  ${(0, import_chunk_PG5FDKSF.bold)(`We successfully received the error report id: ${reportId}`)}`);
85
85
  console.log(`
@@ -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_N3FJZLFP_exports = {};
20
- __export(chunk_N3FJZLFP_exports, {
19
+ var chunk_W6J5YFD2_exports = {};
20
+ __export(chunk_W6J5YFD2_exports, {
21
21
  version: () => version
22
22
  });
23
- module.exports = __toCommonJS(chunk_N3FJZLFP_exports);
24
- var import_chunk_5YZKJGXV = require("./chunk-5YZKJGXV.js");
25
- var packageJson = (0, import_chunk_5YZKJGXV.require_package)();
23
+ module.exports = __toCommonJS(chunk_W6J5YFD2_exports);
24
+ var import_chunk_THADADEM = require("./chunk-THADADEM.js");
25
+ var packageJson = (0, import_chunk_THADADEM.require_package)();
26
26
  var version = packageJson.version;
@@ -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_AJALNZEH_exports = {};
20
- __export(chunk_AJALNZEH_exports, {
19
+ var chunk_WDPDHAFW_exports = {};
20
+ __export(chunk_WDPDHAFW_exports, {
21
21
  addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
22
22
  });
23
- module.exports = __toCommonJS(chunk_AJALNZEH_exports);
24
- var import_chunk_N3FJZLFP = require("./chunk-N3FJZLFP.js");
23
+ module.exports = __toCommonJS(chunk_WDPDHAFW_exports);
24
+ var import_chunk_W6J5YFD2 = require("./chunk-W6J5YFD2.js");
25
25
  var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
26
26
  function addVersionDetailsToErrorMessage(message) {
27
- const rows = [["Prisma CLI Version", import_chunk_N3FJZLFP.version]];
27
+ const rows = [["Prisma CLI Version", import_chunk_W6J5YFD2.version]];
28
28
  return `${message}
29
29
 
30
30
  ${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
@@ -26,12 +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_ARC7TW3L_exports = {};
30
- __export(chunk_ARC7TW3L_exports, {
29
+ var chunk_WFNB7VRA_exports = {};
30
+ __export(chunk_WFNB7VRA_exports, {
31
31
  getGeneratorSuccessMessage: () => getGeneratorSuccessMessage
32
32
  });
33
- module.exports = __toCommonJS(chunk_ARC7TW3L_exports);
33
+ module.exports = __toCommonJS(chunk_WFNB7VRA_exports);
34
34
  var import_chunk_XYCIH36R = require("./chunk-XYCIH36R.js");
35
+ var import_chunk_ERSH2BQA = require("./chunk-ERSH2BQA.js");
35
36
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
36
37
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
37
38
  var import_path = __toESM(require("path"));
@@ -44,7 +45,16 @@ function getGeneratorSuccessMessage(generator, time) {
44
45
  function formatVersion(generator) {
45
46
  const version = generator.manifest?.version;
46
47
  if (generator.getProvider() === "prisma-client-js") {
47
- return `v${version ?? "?.?.?"}`;
48
+ const engineType = (0, import_chunk_ERSH2BQA.getClientEngineType)(generator.config);
49
+ let engineHint = "";
50
+ if (generator.options?.noEngine) {
51
+ engineHint = ", engine=none";
52
+ } else if (engineType === "binary") {
53
+ engineHint = ", engine=binary";
54
+ } else if (engineType === "library") {
55
+ engineHint = "";
56
+ }
57
+ return `v${version ?? "?.?.?"}${engineHint}`;
48
58
  }
49
59
  return version;
50
60
  }
@@ -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_5IS5OH7Z_exports = {};
30
- __export(chunk_5IS5OH7Z_exports, {
29
+ var chunk_WKP2TVYB_exports = {};
30
+ __export(chunk_WKP2TVYB_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_5IS5OH7Z_exports);
37
- var import_chunk_X2DGDDLX = require("./chunk-X2DGDDLX.js");
36
+ module.exports = __toCommonJS(chunk_WKP2TVYB_exports);
37
+ var import_chunk_7QKLIARO = require("./chunk-7QKLIARO.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_X2DGDDLX.require_package)();
49
+ var { dependencies } = (0, import_chunk_7QKLIARO.require_package)();
50
50
  var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
51
51
  var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
@@ -1,16 +1,18 @@
1
- import type { PrismaConfigWithDatasource } from '../utils/validatePrismaConfigWithDatasource';
1
+ import { SchemaContext } from '..';
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 cli command (eg. 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)
11
- * @param validatedConfig the validated Prisma Config value
10
+ * @param command the cli command (eg. db push)
11
+ * @param urls list of urls to check
12
+ * @param schemaContexts list of schema contexts to check
12
13
  */
13
- export declare function checkUnsupportedDataProxy({ cmd, validatedConfig, }: {
14
+ export declare function checkUnsupportedDataProxy({ cmd, schemaContext, urls, }: {
14
15
  cmd: string;
15
- validatedConfig: PrismaConfigWithDatasource;
16
+ schemaContext?: SchemaContext;
17
+ urls?: (string | undefined)[];
16
18
  }): void;