@prisma/internals 7.3.0-integration-prisma6-fix-cloudflare-engine.3 → 7.3.0-integration-engines-7-3-0-10-fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521.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-EYVG6XQS.js → chunk-2BXDHSSY.js} +56 -68
  2. package/dist/{chunk-GMW36QQF.js → chunk-2GPDFPDR.js} +7 -7
  3. package/dist/{chunk-656EKQL7.js → chunk-334ZBKRR.js} +5 -5
  4. package/dist/{chunk-OPLMJ5WZ.js → chunk-3PNJ6ZQE.js} +58 -146
  5. package/dist/{chunk-LYFOJ5NK.js → chunk-3U4QB2G3.js} +4 -6
  6. package/dist/{chunk-5TXBB44O.js → chunk-4A2DO32A.js} +11 -11
  7. package/dist/{chunk-QPQF4VGD.js → chunk-4UM3NWZ3.js} +12 -12
  8. package/dist/{chunk-TQFONRJP.js → chunk-5BRXEOYH.js} +5 -5
  9. package/dist/{chunk-RS2R7COT.js → chunk-5I4ERIIY.js} +3 -9
  10. package/dist/{chunk-DGNPNS5E.js → chunk-5X46R434.js} +13 -13
  11. package/dist/{chunk-T2KHWQCJ.js → chunk-6ZQTRCHC.js} +12 -12
  12. package/dist/{chunk-W6J5YFD2.js → chunk-7IBWXVWK.js} +5 -5
  13. package/dist/{chunk-WFNB7VRA.js → chunk-ARC7TW3L.js} +4 -14
  14. package/dist/{chunk-QLOP3Z4E.js → chunk-AYPKO22A.js} +16 -38
  15. package/dist/{chunk-BVJP43JS.js → chunk-BXIKQUP5.js} +7 -7
  16. package/dist/{chunk-AX5N26KG.js → chunk-CQVWHHIJ.js} +11 -6
  17. package/dist/{chunk-FYZCPL2Z.js → chunk-DQWKFZPY.js} +4 -7
  18. package/dist/{chunk-7QC5VORA.js → chunk-DXWYZA7B.js} +3 -4
  19. package/dist/{chunk-WDPDHAFW.js → chunk-ECN6H47Y.js} +5 -5
  20. package/dist/{chunk-F2OZV76L.js → chunk-GH2WAX5Y.js} +7 -7
  21. package/dist/{chunk-4CGPN5SR.js → chunk-GJSFP4V4.js} +3 -9
  22. package/dist/{chunk-UOUZG6WG.js → chunk-IAKPRMGI.js} +5 -5
  23. package/dist/{chunk-THADADEM.js → chunk-JB7YT5XG.js} +7 -9
  24. package/dist/{chunk-4JCVHBYR.js → chunk-KAH2NIWC.js} +6 -6
  25. package/dist/{chunk-262R2PBW.js → chunk-KOBX6GKI.js} +5 -5
  26. package/dist/{chunk-5HT4F7QV.js → chunk-MOW746GL.js} +5 -5
  27. package/dist/{chunk-BCQZ6JQE.js → chunk-NBWRGVYR.js} +4 -6
  28. package/dist/{chunk-UQUWZJVN.js → chunk-NYNXYKR4.js} +7 -7
  29. package/dist/{chunk-UQQPN22O.js → chunk-OVRS2CD6.js} +16 -38
  30. package/dist/{chunk-Q2EPFAR2.js → chunk-P3F2U57W.js} +58 -146
  31. package/dist/{chunk-JMUOROWG.js → chunk-PRGRB27V.js} +5 -5
  32. package/dist/{chunk-75BIJ5PX.js → chunk-Q5XW7CMJ.js} +9 -9
  33. package/dist/{chunk-OAT7ZJED.js → chunk-Q75TMXCR.js} +7 -20
  34. package/dist/{chunk-ROGQXXQA.js → chunk-QDIUK75K.js} +8 -10
  35. package/dist/chunk-QKQKSUQO.js +46 -0
  36. package/dist/{chunk-FCYHZHVW.js → chunk-R3J2O23S.js} +4 -4
  37. package/dist/{chunk-OSHZ4P3G.js → chunk-SP2ETLT2.js} +5 -5
  38. package/dist/{chunk-E2QTLJH5.js → chunk-SZXZZWNK.js} +13 -13
  39. package/dist/{chunk-DFIP5FHB.js → chunk-T7XMJ6KH.js} +5 -5
  40. package/dist/{chunk-KH7FI42S.js → chunk-VPLQF2ZV.js} +11 -11
  41. package/dist/{chunk-TZJROXB3.js → chunk-WSZXPLJQ.js} +4 -4
  42. package/dist/{chunk-UHI6VYFX.js → chunk-YJVCIN4F.js} +16 -14
  43. package/dist/{chunk-JOIIWB3U.js → chunk-YV4IFLW4.js} +128 -129
  44. package/dist/{chunk-HFFWZTVM.js → chunk-YXCPS3WU.js} +5 -15
  45. package/dist/cli/checkUnsupportedDataProxy.d.ts +7 -9
  46. package/dist/cli/checkUnsupportedDataProxy.js +53 -65
  47. package/dist/cli/directoryConfig.d.ts +5 -2
  48. package/dist/cli/directoryConfig.js +2 -2
  49. package/dist/cli/getGeneratorSuccessMessage.js +2 -3
  50. package/dist/cli/getSchema.d.ts +28 -20
  51. package/dist/cli/getSchema.js +7 -5
  52. package/dist/cli/hashes.d.ts +2 -1
  53. package/dist/cli/hashes.js +4 -4
  54. package/dist/cli/schemaContext.d.ts +5 -22
  55. package/dist/cli/schemaContext.js +54 -65
  56. package/dist/cli/types.d.ts +1 -1
  57. package/dist/convertCredentials.js +4 -4
  58. package/dist/engine-commands/errorHelpers.js +4 -4
  59. package/dist/engine-commands/formatSchema.js +52 -64
  60. package/dist/engine-commands/getConfig.d.ts +1 -5
  61. package/dist/engine-commands/getConfig.js +10 -13
  62. package/dist/engine-commands/getDmmf.js +10 -10
  63. package/dist/engine-commands/getEngineVersion.js +5 -9
  64. package/dist/engine-commands/getEnginesInfo.d.ts +0 -1
  65. package/dist/engine-commands/getEnginesInfo.js +6 -9
  66. package/dist/engine-commands/index.d.ts +1 -1
  67. package/dist/engine-commands/index.js +62 -76
  68. package/dist/engine-commands/lintSchema.js +9 -9
  69. package/dist/engine-commands/mergeSchemas.js +10 -10
  70. package/dist/engine-commands/queryEngineCommons.js +6 -6
  71. package/dist/engine-commands/validate.js +10 -10
  72. package/dist/get-generators/getGenerators.d.ts +0 -2
  73. package/dist/get-generators/getGenerators.js +55 -67
  74. package/dist/get-generators/utils/binaryTypeToEngineType.js +2 -2
  75. package/dist/get-generators/utils/engineTypeToBinaryType.js +2 -2
  76. package/dist/get-generators/utils/getBinaryPathsByVersion.js +4 -4
  77. package/dist/getPackedPackage.js +3 -3
  78. package/dist/index.d.ts +5 -19
  79. package/dist/index.js +99 -125
  80. package/dist/resolveBinary.js +7 -7
  81. package/dist/schemaEngineCommands.js +8 -8
  82. package/dist/sendPanic.js +2 -3
  83. package/dist/types.d.ts +15 -0
  84. package/dist/utils/canPrompt.js +3 -3
  85. package/dist/utils/fs-functional.js +10 -10
  86. package/dist/utils/fs-utils.js +8 -8
  87. package/dist/utils/getVersionFromPackageJson.js +3 -3
  88. package/dist/utils/handlePanic.js +6 -7
  89. package/dist/utils/missingDatasource.js +2 -2
  90. package/dist/utils/missingGeneratorMessage.js +4 -4
  91. package/dist/utils/toSchemasContainer.d.ts +1 -1
  92. package/dist/utils/toSchemasContainer.js +3 -3
  93. package/dist/utils/validatePrismaConfigWithDatasource.d.ts +17 -0
  94. package/dist/utils/{handleEngineLoadingErrors.js → validatePrismaConfigWithDatasource.js} +7 -6
  95. package/dist/wasm.js +5 -5
  96. package/package.json +15 -17
  97. package/dist/chunk-3FP46GUV.js +0 -471
  98. package/dist/chunk-46ABODUM.js +0 -186
  99. package/dist/chunk-6TTRTZXU.js +0 -37
  100. package/dist/chunk-D4VDA2TZ.js +0 -66
  101. package/dist/chunk-DZYINYAA.js +0 -68
  102. package/dist/chunk-ERSH2BQA.js +0 -58
  103. package/dist/chunk-HO5HRHFZ.js +0 -30
  104. package/dist/chunk-HW5RCZSE.js +0 -1
  105. package/dist/chunk-KDHESRKE.js +0 -49
  106. package/dist/chunk-L6KOIJJ5.js +0 -125
  107. package/dist/chunk-PZMRR772.js +0 -41
  108. package/dist/chunk-RFB2U4GQ.js +0 -41
  109. package/dist/chunk-T2PM5TKT.js +0 -55
  110. package/dist/cli/checkUnsupportedSchemaEngineWasm.d.ts +0 -22
  111. package/dist/cli/checkUnsupportedSchemaEngineWasm.js +0 -135
  112. package/dist/client/getClientEngineType.d.ts +0 -7
  113. package/dist/client/getClientEngineType.js +0 -26
  114. package/dist/dotenvExpand.d.ts +0 -35
  115. package/dist/dotenvExpand.js +0 -25
  116. package/dist/tracing/types.d.ts +0 -54
  117. package/dist/tracing/types.js +0 -2
  118. package/dist/utils/__tests__/maskSchema.test.js +0 -23
  119. package/dist/utils/byline.d.ts +0 -4
  120. package/dist/utils/byline.js +0 -28
  121. package/dist/utils/cloudflareD1.d.ts +0 -5
  122. package/dist/utils/cloudflareD1.js +0 -27
  123. package/dist/utils/getEnvPaths.d.ts +0 -14
  124. package/dist/utils/getEnvPaths.js +0 -29
  125. package/dist/utils/getMigrateConfigDir.d.ts +0 -2
  126. package/dist/utils/getMigrateConfigDir.js +0 -25
  127. package/dist/utils/handleEngineLoadingErrors.d.ts +0 -8
  128. package/dist/utils/load.d.ts +0 -6
  129. package/dist/utils/load.js +0 -28
  130. package/dist/utils/loadEnvFile.d.ts +0 -10
  131. package/dist/utils/loadEnvFile.js +0 -30
  132. package/dist/utils/maskSchema.d.ts +0 -4
  133. package/dist/utils/maskSchema.js +0 -27
  134. package/dist/utils/serializeQueryEngineName.d.ts +0 -4
  135. package/dist/utils/serializeQueryEngineName.js +0 -25
  136. package/dist/utils/tryLoadEnvs.d.ts +0 -25
  137. package/dist/utils/tryLoadEnvs.js +0 -30
@@ -16,21 +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_4CGPN5SR_exports = {};
20
- __export(chunk_4CGPN5SR_exports, {
19
+ var chunk_GJSFP4V4_exports = {};
20
+ __export(chunk_GJSFP4V4_exports, {
21
21
  engineTypeToBinaryType: () => engineTypeToBinaryType
22
22
  });
23
- module.exports = __toCommonJS(chunk_4CGPN5SR_exports);
23
+ module.exports = __toCommonJS(chunk_GJSFP4V4_exports);
24
24
  var import_fetch_engine = require("@prisma/fetch-engine");
25
25
  function engineTypeToBinaryType(engineType) {
26
26
  if (engineType === "schemaEngine") {
27
27
  return import_fetch_engine.BinaryType.SchemaEngineBinary;
28
28
  }
29
- if (engineType === "queryEngine") {
30
- return import_fetch_engine.BinaryType.QueryEngineBinary;
31
- }
32
- if (engineType === "libqueryEngine") {
33
- return import_fetch_engine.BinaryType.QueryEngineLibrary;
34
- }
35
29
  throw new Error(`Could not convert engine type ${engineType}`);
36
30
  }
@@ -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_UOUZG6WG_exports = {};
20
- __export(chunk_UOUZG6WG_exports, {
19
+ var chunk_IAKPRMGI_exports = {};
20
+ __export(chunk_IAKPRMGI_exports, {
21
21
  version: () => version
22
22
  });
23
- module.exports = __toCommonJS(chunk_UOUZG6WG_exports);
24
- var import_chunk_ROGQXXQA = require("./chunk-ROGQXXQA.js");
25
- var packageJson = (0, import_chunk_ROGQXXQA.require_package)();
23
+ module.exports = __toCommonJS(chunk_IAKPRMGI_exports);
24
+ var import_chunk_JB7YT5XG = require("./chunk-JB7YT5XG.js");
25
+ var packageJson = (0, import_chunk_JB7YT5XG.require_package)();
26
26
  var version = packageJson.version;
@@ -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_THADADEM_exports = {};
20
- __export(chunk_THADADEM_exports, {
19
+ var chunk_JB7YT5XG_exports = {};
20
+ __export(chunk_JB7YT5XG_exports, {
21
21
  require_package: () => require_package
22
22
  });
23
- module.exports = __toCommonJS(chunk_THADADEM_exports);
23
+ module.exports = __toCommonJS(chunk_JB7YT5XG_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,7 +48,6 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
48
48
  files: [
49
49
  "README.md",
50
50
  "dist",
51
- "!**/libquery_engine*",
52
51
  "!dist/get-generators/engines/*",
53
52
  "scripts"
54
53
  ],
@@ -59,12 +58,11 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
59
58
  "@swc/jest": "0.2.37",
60
59
  "@types/babel__helper-validator-identifier": "7.15.2",
61
60
  "@types/jest": "29.5.14",
62
- "@types/node": "18.19.76",
61
+ "@types/node": "~20.19.24",
63
62
  "@types/resolve": "1.20.6",
64
63
  archiver: "6.0.2",
65
64
  "checkpoint-client": "1.1.33",
66
65
  "cli-truncate": "4.0.0",
67
- dotenv: "16.5.0",
68
66
  empathic: "2.0.0",
69
67
  "escape-string-regexp": "5.0.0",
70
68
  execa: "8.0.1",
@@ -109,14 +107,14 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
109
107
  "@prisma/generator": "workspace:*",
110
108
  "@prisma/generator-helper": "workspace:*",
111
109
  "@prisma/get-platform": "workspace:*",
112
- "@prisma/prisma-schema-wasm": "7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7",
113
- "@prisma/schema-engine-wasm": "7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7",
110
+ "@prisma/prisma-schema-wasm": "7.3.0-10.fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521",
111
+ "@prisma/schema-engine-wasm": "7.3.0-10.fix-fix-mapped-enum-issue-0b7e6564db7dc3dac7f9312aa84e9ed81d805521",
114
112
  "@prisma/schema-files-loader": "workspace:*",
115
113
  arg: "5.0.2",
116
114
  prompts: "2.4.2"
117
115
  },
118
116
  peerDependencies: {
119
- typescript: ">=5.1.0"
117
+ typescript: ">=5.4.0"
120
118
  },
121
119
  peerDependenciesMeta: {
122
120
  typescript: {
@@ -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_4JCVHBYR_exports = {};
30
- __export(chunk_4JCVHBYR_exports, {
29
+ var chunk_KAH2NIWC_exports = {};
30
+ __export(chunk_KAH2NIWC_exports, {
31
31
  getCLIPathHash: () => getCLIPathHash,
32
32
  getProjectHash: () => getProjectHash
33
33
  });
34
- module.exports = __toCommonJS(chunk_4JCVHBYR_exports);
35
- var import_chunk_EYVG6XQS = require("./chunk-EYVG6XQS.js");
34
+ module.exports = __toCommonJS(chunk_KAH2NIWC_exports);
35
+ var import_chunk_2BXDHSSY = require("./chunk-2BXDHSSY.js");
36
36
  var import_crypto = __toESM(require("crypto"));
37
- async function getProjectHash(schemaPathFromArgs, schemaPathFromConfig) {
38
- const projectPath = (await (0, import_chunk_EYVG6XQS.getSchemaWithPath)(schemaPathFromArgs, schemaPathFromConfig))?.schemaPath ?? process.cwd();
37
+ async function getProjectHash(schemaPath) {
38
+ const projectPath = (await (0, import_chunk_2BXDHSSY.getSchemaWithPath)({ schemaPath }))?.schemaPath ?? process.cwd();
39
39
  return import_crypto.default.createHash("sha256").update(projectPath).digest("hex").substring(0, 8);
40
40
  }
41
41
  function getCLIPathHash() {
@@ -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_262R2PBW_exports = {};
30
- __export(chunk_262R2PBW_exports, {
29
+ var chunk_KOBX6GKI_exports = {};
30
+ __export(chunk_KOBX6GKI_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_262R2PBW_exports);
37
- var import_chunk_THADADEM = require("./chunk-THADADEM.js");
36
+ module.exports = __toCommonJS(chunk_KOBX6GKI_exports);
37
+ var import_chunk_JB7YT5XG = require("./chunk-JB7YT5XG.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_THADADEM.require_package)();
49
+ var { dependencies } = (0, import_chunk_JB7YT5XG.require_package)();
50
50
  var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
51
51
  var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
@@ -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_5HT4F7QV_exports = {};
20
- __export(chunk_5HT4F7QV_exports, {
19
+ var chunk_MOW746GL_exports = {};
20
+ __export(chunk_MOW746GL_exports, {
21
21
  addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
22
22
  });
23
- module.exports = __toCommonJS(chunk_5HT4F7QV_exports);
24
- var import_chunk_UOUZG6WG = require("./chunk-UOUZG6WG.js");
23
+ module.exports = __toCommonJS(chunk_MOW746GL_exports);
24
+ var import_chunk_IAKPRMGI = require("./chunk-IAKPRMGI.js");
25
25
  var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
26
26
  function addVersionDetailsToErrorMessage(message) {
27
- const rows = [["Prisma CLI Version", import_chunk_UOUZG6WG.version]];
27
+ const rows = [["Prisma CLI Version", import_chunk_IAKPRMGI.version]];
28
28
  return `${message}
29
29
 
30
30
  ${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
@@ -26,17 +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_BCQZ6JQE_exports = {};
30
- __export(chunk_BCQZ6JQE_exports, {
29
+ var chunk_NBWRGVYR_exports = {};
30
+ __export(chunk_NBWRGVYR_exports, {
31
31
  inferDirectoryConfig: () => inferDirectoryConfig
32
32
  });
33
- module.exports = __toCommonJS(chunk_BCQZ6JQE_exports);
33
+ module.exports = __toCommonJS(chunk_NBWRGVYR_exports);
34
34
  var import_node_path = __toESM(require("node:path"));
35
35
  function inferDirectoryConfig(schemaContext, config, cwd = process.cwd()) {
36
36
  const baseDir = (
37
- // All default paths are relative to the `schema.prisma` file that contains the primary datasource.
38
- // That schema file should usually be the users "root" aka main schema file.
39
- schemaContext?.primaryDatasourceDirectory ?? // If no primary datasource exists we use the schemaRootDir.
37
+ // If no primary datasource exists we use the schemaRootDir.
40
38
  // `schemaRootDir` is either the directory the user supplied as schemaPath or the directory the single schema file is in.
41
39
  schemaContext?.schemaRootDir ?? // Should also that not be defined because there is no schema yet we fallback to CWD + `/prisma`.
42
40
  import_node_path.default.join(cwd, "prisma")
@@ -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_UQUWZJVN_exports = {};
30
- __export(chunk_UQUWZJVN_exports, {
29
+ var chunk_NYNXYKR4_exports = {};
30
+ __export(chunk_NYNXYKR4_exports, {
31
31
  handlePanic: () => handlePanic
32
32
  });
33
- module.exports = __toCommonJS(chunk_UQUWZJVN_exports);
33
+ module.exports = __toCommonJS(chunk_NYNXYKR4_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_FCYHZHVW = require("./chunk-FCYHZHVW.js");
37
- var import_chunk_HFFWZTVM = require("./chunk-HFFWZTVM.js");
36
+ var import_chunk_R3J2O23S = require("./chunk-R3J2O23S.js");
37
+ var import_chunk_YXCPS3WU = require("./chunk-YXCPS3WU.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_FCYHZHVW.canPrompt)()) {
41
+ if (!(0, import_chunk_R3J2O23S.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_HFFWZTVM.sendPanic)({ error, cliVersion, enginesVersion, getDatabaseVersionSafe });
82
+ const reportId = await (0, import_chunk_YXCPS3WU.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(`
@@ -26,20 +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_UQQPN22O_exports = {};
30
- __export(chunk_UQQPN22O_exports, {
29
+ var chunk_OVRS2CD6_exports = {};
30
+ __export(chunk_OVRS2CD6_exports, {
31
31
  GetConfigError: () => GetConfigError,
32
- getConfig: () => getConfig,
33
- getDirectUrl: () => getDirectUrl,
34
- getEffectiveUrl: () => getEffectiveUrl,
35
- resolveUrl: () => resolveUrl
32
+ getConfig: () => getConfig
36
33
  });
37
- module.exports = __toCommonJS(chunk_UQQPN22O_exports);
38
- var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
39
- var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
34
+ module.exports = __toCommonJS(chunk_OVRS2CD6_exports);
35
+ var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
40
36
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
41
- var import_chunk_5HT4F7QV = require("./chunk-5HT4F7QV.js");
42
- var import_chunk_DFIP5FHB = require("./chunk-DFIP5FHB.js");
37
+ var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
38
+ var import_chunk_MOW746GL = require("./chunk-MOW746GL.js");
39
+ var import_chunk_KOBX6GKI = require("./chunk-KOBX6GKI.js");
43
40
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
44
41
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
45
42
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
@@ -64,41 +61,22 @@ ${detailsHeader} ${message}`;
64
61
  }).exhaustive();
65
62
  const errorMessageWithContext = `${constructedErrorMessage}
66
63
  [Context: getConfig]`;
67
- super((0, import_chunk_5HT4F7QV.addVersionDetailsToErrorMessage)(errorMessageWithContext));
64
+ super((0, import_chunk_MOW746GL.addVersionDetailsToErrorMessage)(errorMessageWithContext));
68
65
  this.name = "GetConfigError";
69
66
  }
70
67
  };
71
- function getEffectiveUrl(ds) {
72
- if (ds.directUrl !== void 0) return ds.directUrl;
73
- return ds.url;
74
- }
75
- function getDirectUrl(ds) {
76
- return ds.directUrl;
77
- }
78
- function resolveUrl(envValue) {
79
- const urlFromValue = envValue?.value;
80
- const urlEnvVarName = envValue?.fromEnvVar;
81
- const urlEnvVarValue = urlEnvVarName ? process.env[urlEnvVarName] : void 0;
82
- return urlFromValue ?? urlEnvVarValue;
83
- }
84
68
  async function getConfig(options) {
85
- const debugErrorType = (0, import_chunk_TZJROXB3.createDebugErrorType)(debug, "getConfigWasm");
69
+ const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getConfigWasm");
86
70
  debug(`Using getConfig Wasm`);
87
71
  const configEither = (0, import_function.pipe)(
88
72
  (0, import_chunk_5DBOS77Y.tryCatch)(
89
73
  () => {
90
- if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
74
+ if (process.env.FORCE_PANIC_GET_CONFIG) {
91
75
  debug("Triggering a Rust panic...");
92
- import_chunk_DFIP5FHB.prismaSchemaWasm.debug_panic();
76
+ import_chunk_KOBX6GKI.prismaSchemaWasm.debug_panic();
93
77
  }
94
- const params = JSON.stringify({
95
- prismaSchema: options.datamodel,
96
- datasourceOverrides: {},
97
- ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
98
- env: process.env
99
- });
100
- const data = import_chunk_DFIP5FHB.prismaSchemaWasm.get_config(params);
101
- return data;
78
+ const params = JSON.stringify({ prismaSchema: options.datamodel });
79
+ return import_chunk_KOBX6GKI.prismaSchemaWasm.get_config(params);
102
80
  },
103
81
  (e) => ({
104
82
  type: "wasm-error",
@@ -156,12 +134,12 @@ async function getConfig(options) {
156
134
  return panic;
157
135
  }
158
136
  const errorOutput = e.error.message;
159
- return new GetConfigError((0, import_chunk_TZJROXB3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
137
+ return new GetConfigError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
160
138
  }).with({ type: "validation-error" }, (e) => {
161
139
  return new GetConfigError({
162
140
  _tag: "parsed",
163
141
  errorCode: SCHEMA_VALIDATION_ERROR_CODE,
164
- reason: (0, import_chunk_TZJROXB3.createSchemaValidationError)(e.reason),
142
+ reason: (0, import_chunk_WSZXPLJQ.createSchemaValidationError)(e.reason),
165
143
  message: formatErrors(e.error)
166
144
  });
167
145
  }).otherwise((e) => {