@prisma/internals 6.19.0-integration-next.21 → 6.19.0

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 (116) hide show
  1. package/dist/{chunk-W6ZWX546.js → chunk-2GUGGLPK.js} +71 -38
  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-GL7OANR6.js → chunk-4JCVHBYR.js} +5 -5
  6. package/dist/{chunk-MEOOYUIZ.js → chunk-5AI4FIZ3.js} +10 -10
  7. package/dist/{chunk-WFZAXUNP.js → chunk-5IQ5L5E4.js} +71 -38
  8. package/dist/chunk-6TTRTZXU.js +37 -0
  9. package/dist/{chunk-UB2X7DGZ.js → chunk-75BIJ5PX.js} +9 -9
  10. package/dist/{chunk-MYLPCGTT.js → chunk-7QC5VORA.js} +5 -5
  11. package/dist/{chunk-PZAC4O4V.js → chunk-AP3F7M3T.js} +12 -12
  12. package/dist/{chunk-TGA7DC5A.js → chunk-AX5N26KG.js} +9 -14
  13. package/dist/{chunk-32LLAKF4.js → chunk-BVJP43JS.js} +784 -13
  14. package/dist/{chunk-HBU4ZVCA.js → chunk-C7SAKLK2.js} +11 -11
  15. package/dist/{chunk-5B5U2HVK.js → chunk-CCLAMTCA.js} +8 -7
  16. package/dist/{chunk-IRWX4FCC.js → chunk-D4VDA2TZ.js} +6 -6
  17. package/dist/{chunk-2KREE2OX.js → chunk-D7OTFXCP.js} +5 -5
  18. package/dist/chunk-DZYINYAA.js +68 -0
  19. package/dist/{chunk-YXXLQZKE.js → chunk-E4H6V3Z4.js} +11 -11
  20. package/dist/{chunk-CHKD5ZZP.js → chunk-E6MOBIU5.js} +5 -5
  21. package/dist/chunk-ERSH2BQA.js +58 -0
  22. package/dist/{chunk-OKVM3CW4.js → chunk-EYVG6XQS.js} +39 -3
  23. package/dist/{chunk-5MHUYAV3.js → chunk-F2OZV76L.js} +9 -9
  24. package/dist/{chunk-R3J2O23S.js → chunk-FCYHZHVW.js} +4 -4
  25. package/dist/{chunk-JEVRTTNC.js → chunk-FGU7IK4W.js} +9 -8
  26. package/dist/{chunk-YF7MC4C3.js → chunk-FHZ5QJLR.js} +5 -5
  27. package/dist/{chunk-3CAPLXKF.js → chunk-FYZCPL2Z.js} +8 -5
  28. package/dist/{chunk-DOO45FN6.js → chunk-GMW36QQF.js} +7 -7
  29. package/dist/{chunk-BUQN4WLU.js → chunk-HFFWZTVM.js} +9 -7
  30. package/dist/{chunk-CGLLQXZE.js → chunk-HHG4DGHC.js} +12 -11
  31. package/dist/{chunk-5W3BSMTH.js → chunk-HO5HRHFZ.js} +6 -3
  32. package/dist/{chunk-3WXUQZS7.js → chunk-I6WLABB2.js} +5 -14
  33. package/dist/{chunk-FF7OLLBP.js → chunk-IDINCQMN.js} +784 -12
  34. package/dist/{chunk-2LOGW45F.js → chunk-JOIIWB3U.js} +33 -68
  35. package/dist/{chunk-RWZOE466.js → chunk-JTS4UPHJ.js} +5 -5
  36. package/dist/{chunk-KFFNXE23.js → chunk-LFFCR67R.js} +20 -14
  37. package/dist/{chunk-HQE53CGA.js → chunk-LU7NT333.js} +11 -11
  38. package/dist/{chunk-3V2WV3DU.js → chunk-LV27YCGC.js} +11 -11
  39. package/dist/{chunk-KNNTV7IN.js → chunk-NVNI2SRU.js} +213 -687
  40. package/dist/{chunk-4YDN7W7B.js → chunk-OAT7ZJED.js} +20 -7
  41. package/dist/{chunk-HDWTS7PU.js → chunk-PHFQSMQF.js} +5 -5
  42. package/dist/chunk-PZMRR772.js +41 -0
  43. package/dist/{chunk-KZ5SMOBR.js → chunk-QJ3QPUM5.js} +5 -5
  44. package/dist/{chunk-5I4ERIIY.js → chunk-RS2R7COT.js} +9 -3
  45. package/dist/{chunk-33FYCEWF.js → chunk-SOKSKSEX.js} +20 -14
  46. package/dist/chunk-T2PM5TKT.js +55 -0
  47. package/dist/{chunk-6FP5PMMX.js → chunk-TBR6SNKL.js} +5 -5
  48. package/dist/{chunk-MXAUURHG.js → chunk-TQFONRJP.js} +5 -5
  49. package/dist/{chunk-WSZXPLJQ.js → chunk-TZJROXB3.js} +4 -4
  50. package/dist/{chunk-IHC4ZVPQ.js → chunk-UHI6VYFX.js} +5 -5
  51. package/dist/{chunk-IU77SCOB.js → chunk-UQUWZJVN.js} +9 -9
  52. package/dist/{chunk-ARC7TW3L.js → chunk-WFNB7VRA.js} +14 -4
  53. package/dist/{chunk-6QTJ35DP.js → chunk-WYQJ4JWO.js} +12 -12
  54. package/dist/{chunk-MEBZK5AR.js → chunk-Y7XBA7JY.js} +5 -5
  55. package/dist/cli/checkUnsupportedDataProxy.js +62 -56
  56. package/dist/cli/checkUnsupportedSchemaEngineWasm.js +62 -56
  57. package/dist/cli/getGeneratorSuccessMessage.js +3 -2
  58. package/dist/cli/getSchema.d.ts +15 -1
  59. package/dist/cli/getSchema.js +5 -4
  60. package/dist/cli/hashes.js +4 -4
  61. package/dist/cli/schemaContext.d.ts +3 -1
  62. package/dist/cli/schemaContext.js +62 -56
  63. package/dist/client/getClientEngineType.d.ts +7 -0
  64. package/dist/client/getClientEngineType.js +26 -0
  65. package/dist/dotenvExpand.d.ts +35 -0
  66. package/dist/dotenvExpand.js +25 -0
  67. package/dist/engine-commands/errorHelpers.js +4 -4
  68. package/dist/engine-commands/formatSchema.js +61 -55
  69. package/dist/engine-commands/getConfig.d.ts +1 -0
  70. package/dist/engine-commands/getConfig.js +13 -13
  71. package/dist/engine-commands/getDmmf.js +10 -10
  72. package/dist/engine-commands/getEngineVersion.js +9 -6
  73. package/dist/engine-commands/getEnginesInfo.d.ts +1 -0
  74. package/dist/engine-commands/getEnginesInfo.js +9 -7
  75. package/dist/engine-commands/index.js +73 -67
  76. package/dist/engine-commands/lintSchema.js +9 -9
  77. package/dist/engine-commands/mergeSchemas.js +10 -10
  78. package/dist/engine-commands/queryEngineCommons.js +6 -6
  79. package/dist/engine-commands/validate.js +10 -10
  80. package/dist/errorReporting.js +6 -6
  81. package/dist/get-generators/getGenerators.d.ts +1 -0
  82. package/dist/get-generators/getGenerators.js +64 -58
  83. package/dist/get-generators/utils/binaryTypeToEngineType.js +2 -2
  84. package/dist/get-generators/utils/engineTypeToBinaryType.js +2 -2
  85. package/dist/get-generators/utils/getBinaryPathsByVersion.js +5 -6
  86. package/dist/getPackedPackage.js +3 -4
  87. package/dist/index.d.ts +8 -1
  88. package/dist/index.js +115 -101
  89. package/dist/{multipart-parser-UV3WZSWW.js → multipart-parser-3AFJFP6K.js} +6 -6
  90. package/dist/resolveBinary.js +7 -8
  91. package/dist/schemaEngineCommands.js +8 -9
  92. package/dist/sendPanic.js +4 -4
  93. package/dist/utils/canPrompt.js +3 -3
  94. package/dist/utils/cloudflareD1.js +3 -3
  95. package/dist/utils/drawBox.js +2 -2
  96. package/dist/utils/fs-functional.js +10 -10
  97. package/dist/utils/fs-utils.js +8 -8
  98. package/dist/utils/getEnvPaths.d.ts +14 -0
  99. package/dist/utils/getEnvPaths.js +29 -0
  100. package/dist/utils/getVersionFromPackageJson.js +3 -3
  101. package/dist/utils/handleEngineLoadingErrors.d.ts +8 -0
  102. package/dist/utils/handleEngineLoadingErrors.js +27 -0
  103. package/dist/utils/handlePanic.js +8 -8
  104. package/dist/utils/link.js +2 -2
  105. package/dist/utils/load.d.ts +6 -0
  106. package/dist/utils/load.js +28 -0
  107. package/dist/utils/loadEnvFile.d.ts +10 -0
  108. package/dist/utils/loadEnvFile.js +30 -0
  109. package/dist/utils/missingDatasource.js +3 -3
  110. package/dist/utils/missingGeneratorMessage.js +5 -5
  111. package/dist/utils/serializeQueryEngineName.js +2 -2
  112. package/dist/utils/tryLoadEnvs.d.ts +25 -0
  113. package/dist/utils/tryLoadEnvs.js +30 -0
  114. package/dist/wasm.js +5 -5
  115. package/package.json +16 -15
  116. package/dist/chunk-DYV47NUW.js +0 -796
@@ -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_HBU4ZVCA_exports = {};
30
- __export(chunk_HBU4ZVCA_exports, {
29
+ var chunk_C7SAKLK2_exports = {};
30
+ __export(chunk_C7SAKLK2_exports, {
31
31
  GetDmmfError: () => GetDmmfError,
32
32
  getDMMF: () => getDMMF
33
33
  });
34
- module.exports = __toCommonJS(chunk_HBU4ZVCA_exports);
35
- var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
34
+ module.exports = __toCommonJS(chunk_C7SAKLK2_exports);
35
+ var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
36
36
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
37
- var import_chunk_2KREE2OX = require("./chunk-2KREE2OX.js");
38
- var import_chunk_MEBZK5AR = require("./chunk-MEBZK5AR.js");
37
+ var import_chunk_D7OTFXCP = require("./chunk-D7OTFXCP.js");
38
+ var import_chunk_Y7XBA7JY = require("./chunk-Y7XBA7JY.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_2KREE2OX.addVersionDetailsToErrorMessage)(errorMessageWithContext));
61
+ super((0, import_chunk_D7OTFXCP.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
71
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
72
72
  debug("Triggering a Rust panic...");
73
- import_chunk_MEBZK5AR.prismaSchemaWasm.debug_panic();
73
+ import_chunk_Y7XBA7JY.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_MEBZK5AR.prismaSchemaWasm.get_dmmf(params);
79
+ const data = import_chunk_Y7XBA7JY.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 });
@@ -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_5B5U2HVK_exports = {};
20
- __export(chunk_5B5U2HVK_exports, {
19
+ var chunk_CCLAMTCA_exports = {};
20
+ __export(chunk_CCLAMTCA_exports, {
21
21
  require_package: () => require_package
22
22
  });
23
- module.exports = __toCommonJS(chunk_5B5U2HVK_exports);
23
+ module.exports = __toCommonJS(chunk_CCLAMTCA_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) {
@@ -59,11 +59,12 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
59
59
  "@swc/jest": "0.2.37",
60
60
  "@types/babel__helper-validator-identifier": "7.15.2",
61
61
  "@types/jest": "29.5.14",
62
- "@types/node": "~20.19.24",
62
+ "@types/node": "18.19.76",
63
63
  "@types/resolve": "1.20.6",
64
64
  archiver: "6.0.2",
65
65
  "checkpoint-client": "1.1.33",
66
66
  "cli-truncate": "4.0.0",
67
+ dotenv: "16.5.0",
67
68
  empathic: "2.0.0",
68
69
  "escape-string-regexp": "5.0.0",
69
70
  execa: "8.0.1",
@@ -108,14 +109,14 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
108
109
  "@prisma/generator": "workspace:*",
109
110
  "@prisma/generator-helper": "workspace:*",
110
111
  "@prisma/get-platform": "workspace:*",
111
- "@prisma/prisma-schema-wasm": "6.19.0-31.next-6f525e2b254a97a9c547ae5f2b29c54a171f6b23",
112
- "@prisma/schema-engine-wasm": "6.19.0-21.next-3ab778d6c5a8df0d39fd88ffd67461d3395af732",
112
+ "@prisma/prisma-schema-wasm": "6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773",
113
+ "@prisma/schema-engine-wasm": "6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773",
113
114
  "@prisma/schema-files-loader": "workspace:*",
114
115
  arg: "5.0.2",
115
116
  prompts: "2.4.2"
116
117
  },
117
118
  peerDependencies: {
118
- typescript: ">=5.4.0"
119
+ typescript: ">=5.1.0"
119
120
  },
120
121
  peerDependenciesMeta: {
121
122
  typescript: {
@@ -26,18 +26,18 @@ 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_IRWX4FCC_exports = {};
30
- __export(chunk_IRWX4FCC_exports, {
29
+ var chunk_D4VDA2TZ_exports = {};
30
+ __export(chunk_D4VDA2TZ_exports, {
31
31
  locateLocalCloudflareD1: () => locateLocalCloudflareD1
32
32
  });
33
- module.exports = __toCommonJS(chunk_IRWX4FCC_exports);
33
+ module.exports = __toCommonJS(chunk_D4VDA2TZ_exports);
34
34
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
35
- var import_chunk_2LOGW45F = require("./chunk-2LOGW45F.js");
35
+ var import_chunk_JOIIWB3U = require("./chunk-JOIIWB3U.js");
36
36
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
37
37
  var import_node_path = __toESM(require("node:path"));
38
38
  var import_node_process = __toESM(require("node:process"));
39
- var import_fast_glob = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_2LOGW45F.require_out)());
40
- var import_globby = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_2LOGW45F.require_globby)());
39
+ var import_fast_glob = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_JOIIWB3U.require_out)());
40
+ var import_globby = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_JOIIWB3U.require_globby)());
41
41
  var defaultD1DirPath = import_node_path.default.join(".wrangler", "state", "v3", "d1", "miniflare-D1DatabaseObject");
42
42
  async function locateLocalCloudflareD1({ arg }) {
43
43
  const cwd = import_node_process.default.cwd();
@@ -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_2KREE2OX_exports = {};
20
- __export(chunk_2KREE2OX_exports, {
19
+ var chunk_D7OTFXCP_exports = {};
20
+ __export(chunk_D7OTFXCP_exports, {
21
21
  addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
22
22
  });
23
- module.exports = __toCommonJS(chunk_2KREE2OX_exports);
24
- var import_chunk_KZ5SMOBR = require("./chunk-KZ5SMOBR.js");
23
+ module.exports = __toCommonJS(chunk_D7OTFXCP_exports);
24
+ var import_chunk_PHFQSMQF = require("./chunk-PHFQSMQF.js");
25
25
  var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
26
26
  function addVersionDetailsToErrorMessage(message) {
27
- const rows = [["Prisma CLI Version", import_chunk_KZ5SMOBR.version]];
27
+ const rows = [["Prisma CLI Version", import_chunk_PHFQSMQF.version]];
28
28
  return `${message}
29
29
 
30
30
  ${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
@@ -0,0 +1,68 @@
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_DZYINYAA_exports = {};
20
+ __export(chunk_DZYINYAA_exports, {
21
+ handleLibraryLoadingErrors: () => handleLibraryLoadingErrors
22
+ });
23
+ module.exports = __toCommonJS(chunk_DZYINYAA_exports);
24
+ var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
25
+ var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
26
+ var import_get_platform = require("@prisma/get-platform");
27
+ function handleLibraryLoadingErrors(args) {
28
+ const error = args.e;
29
+ const systemLibraryNotFound = (library) => `Prisma cannot find the required \`${library}\` system library in your system`;
30
+ const hasLinkingProblem = error.message.includes("cannot open shared object file");
31
+ const referToSystemRequirementsDocs = `Please refer to the documentation about Prisma's system requirements: ${(0, import_get_platform.link)(
32
+ "https://pris.ly/d/system-requirements"
33
+ )}`;
34
+ const errorTitle = `Unable to require(\`${(0, import_chunk_PG5FDKSF.dim)(args.id)}\`).`;
35
+ const potentialReasonMessage = (0, import_chunk_XKZ6CBLA.z)({ message: error.message, code: error.code }).with({ code: "ENOENT" }, () => `File does not exist.`).when(
36
+ ({ message }) => hasLinkingProblem && message.includes("libz"),
37
+ () => {
38
+ return `${systemLibraryNotFound("libz")}. Please install it and try again.`;
39
+ }
40
+ ).when(
41
+ ({ message }) => hasLinkingProblem && message.includes("libgcc_s"),
42
+ () => {
43
+ return `${systemLibraryNotFound("libgcc_s")}. Please install it and try again.`;
44
+ }
45
+ ).when(
46
+ ({ message }) => hasLinkingProblem && message.includes("libssl"),
47
+ () => {
48
+ const libsslVersion = args.platformInfo.libssl ? `openssl-${args.platformInfo.libssl}` : "openssl";
49
+ return `${systemLibraryNotFound("libssl")}. Please install ${libsslVersion} and try again.`;
50
+ }
51
+ ).when(
52
+ ({ message }) => message.includes("GLIBC"),
53
+ () => {
54
+ return `Prisma has detected an incompatible version of the \`glibc\` C standard library installed in your system. This probably means your system may be too old to run Prisma. ${referToSystemRequirementsDocs}`;
55
+ }
56
+ ).when(
57
+ ({ message }) => args.platformInfo.platform === "linux" && message.includes("symbol not found"),
58
+ () => {
59
+ return `The Prisma engines are not compatible with your system ${args.platformInfo.originalDistro} on (${args.platformInfo.archFromUname}) which uses the \`${args.platformInfo.binaryTarget}\` binaryTarget by default. ${referToSystemRequirementsDocs}`;
60
+ }
61
+ ).otherwise(() => {
62
+ return `The Prisma engines do not seem to be compatible with your system. ${referToSystemRequirementsDocs}`;
63
+ });
64
+ return `${errorTitle}
65
+ ${potentialReasonMessage}
66
+
67
+ Details: ${error.message}`;
68
+ }
@@ -26,17 +26,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_YXXLQZKE_exports = {};
30
- __export(chunk_YXXLQZKE_exports, {
29
+ var chunk_E4H6V3Z4_exports = {};
30
+ __export(chunk_E4H6V3Z4_exports, {
31
31
  MergeSchemasError: () => MergeSchemasError,
32
32
  mergeSchemas: () => mergeSchemas
33
33
  });
34
- module.exports = __toCommonJS(chunk_YXXLQZKE_exports);
35
- var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
36
- var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
34
+ module.exports = __toCommonJS(chunk_E4H6V3Z4_exports);
35
+ var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
37
36
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
38
- var import_chunk_RWZOE466 = require("./chunk-RWZOE466.js");
39
- var import_chunk_YF7MC4C3 = require("./chunk-YF7MC4C3.js");
37
+ var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
38
+ var import_chunk_JTS4UPHJ = require("./chunk-JTS4UPHJ.js");
39
+ var import_chunk_FHZ5QJLR = require("./chunk-FHZ5QJLR.js");
40
40
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
41
41
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
42
42
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
@@ -59,12 +59,12 @@ ${detailsHeader} ${message}`;
59
59
  }).exhaustive();
60
60
  const errorMessageWithContext = `${constructedErrorMessage}
61
61
  [Context: mergeSchemas]`;
62
- super((0, import_chunk_RWZOE466.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
+ super((0, import_chunk_JTS4UPHJ.addVersionDetailsToErrorMessage)(errorMessageWithContext));
63
63
  this.name = "MergeSchemasError";
64
64
  }
65
65
  };
66
66
  function mergeSchemas(options) {
67
- const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "mergeSchemasWasm");
67
+ const debugErrorType = (0, import_chunk_TZJROXB3.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_YF7MC4C3.prismaSchemaWasm.merge_schemas(params);
75
+ return import_chunk_FHZ5QJLR.prismaSchemaWasm.merge_schemas(params);
76
76
  },
77
77
  (e) => ({
78
78
  type: "wasm-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_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
107
+ return new MergeSchemasError((0, import_chunk_TZJROXB3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
108
108
  }).exhaustive();
109
109
  throw error;
110
110
  }
@@ -16,20 +16,20 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_CHKD5ZZP_exports = {};
20
- __export(chunk_CHKD5ZZP_exports, {
19
+ var chunk_E6MOBIU5_exports = {};
20
+ __export(chunk_E6MOBIU5_exports, {
21
21
  getLintWarnings: () => getLintWarnings,
22
22
  getLintWarningsAsText: () => getLintWarningsAsText,
23
23
  handleLintPanic: () => handleLintPanic,
24
24
  lintSchema: () => lintSchema,
25
25
  warningToString: () => warningToString
26
26
  });
27
- module.exports = __toCommonJS(chunk_CHKD5ZZP_exports);
28
- var import_chunk_YF7MC4C3 = require("./chunk-YF7MC4C3.js");
27
+ module.exports = __toCommonJS(chunk_E6MOBIU5_exports);
28
+ var import_chunk_Y7XBA7JY = require("./chunk-Y7XBA7JY.js");
29
29
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
30
30
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
31
31
  function lintSchema({ schemas }) {
32
- const lintResult = import_chunk_YF7MC4C3.prismaSchemaWasm.lint(JSON.stringify(schemas));
32
+ const lintResult = import_chunk_Y7XBA7JY.prismaSchemaWasm.lint(JSON.stringify(schemas));
33
33
  const lintDiagnostics = JSON.parse(lintResult);
34
34
  return lintDiagnostics;
35
35
  }
@@ -0,0 +1,58 @@
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_ERSH2BQA_exports = {};
20
+ __export(chunk_ERSH2BQA_exports, {
21
+ ClientEngineType: () => ClientEngineType,
22
+ getClientEngineType: () => getClientEngineType
23
+ });
24
+ module.exports = __toCommonJS(chunk_ERSH2BQA_exports);
25
+ var ClientEngineType = /* @__PURE__ */ ((ClientEngineType2) => {
26
+ ClientEngineType2["Library"] = "library";
27
+ ClientEngineType2["Binary"] = "binary";
28
+ ClientEngineType2["Client"] = "client";
29
+ return ClientEngineType2;
30
+ })(ClientEngineType || {});
31
+ function getClientEngineType(generatorConfig) {
32
+ const engineTypeFromEnvVar = getEngineTypeFromEnvVar();
33
+ if (engineTypeFromEnvVar) return engineTypeFromEnvVar;
34
+ if (generatorConfig?.config.engineType === "library") {
35
+ return "library";
36
+ } else if (generatorConfig?.config.engineType === "binary") {
37
+ return "binary";
38
+ } else if (generatorConfig?.config.engineType === "client") {
39
+ return "client";
40
+ } else {
41
+ return getDefaultEngineType();
42
+ }
43
+ }
44
+ function getEngineTypeFromEnvVar() {
45
+ const engineType = process.env.PRISMA_CLIENT_ENGINE_TYPE;
46
+ if (engineType === "library") {
47
+ return "library";
48
+ } else if (engineType === "binary") {
49
+ return "binary";
50
+ } else if (engineType === "client") {
51
+ return "client";
52
+ } else {
53
+ return void 0;
54
+ }
55
+ }
56
+ function getDefaultEngineType() {
57
+ return "library";
58
+ }
@@ -26,14 +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_OKVM3CW4_exports = {};
30
- __export(chunk_OKVM3CW4_exports, {
29
+ var chunk_EYVG6XQS_exports = {};
30
+ __export(chunk_EYVG6XQS_exports, {
31
+ getSchemaFromPackageJson: () => getSchemaFromPackageJson,
31
32
  getSchemaWithPath: () => getSchemaWithPath,
32
33
  getSchemaWithPathOptional: () => getSchemaWithPathOptional,
33
34
  printSchemaLoadedMessage: () => printSchemaLoadedMessage
34
35
  });
35
- module.exports = __toCommonJS(chunk_OKVM3CW4_exports);
36
+ module.exports = __toCommonJS(chunk_EYVG6XQS_exports);
36
37
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
38
+ var import_config = require("@prisma/config");
37
39
  var import_debug = require("@prisma/debug");
38
40
  var import_schema_files_loader = require("@prisma/schema-files-loader");
39
41
  var import_fs = __toESM(require("fs"));
@@ -117,6 +119,10 @@ async function getSchemaWithPathInternal(schemaPathFromArgs, schemaPathFromConfi
117
119
  if (prismaConfigResult.ok) {
118
120
  return prismaConfigResult;
119
121
  }
122
+ const pkgJsonResult = await getSchemaFromPackageJson(cwd);
123
+ if (pkgJsonResult.ok) {
124
+ return pkgJsonResult;
125
+ }
120
126
  const defaultResult = await getDefaultSchema(cwd);
121
127
  if (defaultResult.ok) {
122
128
  return defaultResult;
@@ -173,6 +179,36 @@ async function readSchemaFromPrismaConfigBasedLocation(schemaPathFromConfig) {
173
179
  }
174
180
  return schemaResult;
175
181
  }
182
+ async function getSchemaFromPackageJson(cwd) {
183
+ const prismaConfig = await (0, import_config.loadConfigFromPackageJson)(cwd);
184
+ debug("prismaConfig", prismaConfig);
185
+ if (!prismaConfig || !prismaConfig.config?.schema) {
186
+ return { ok: false, error: { kind: "PackageJsonNotConfigured" } };
187
+ }
188
+ const schemaPathFromPkgJson = prismaConfig.config.schema;
189
+ if (typeof schemaPathFromPkgJson !== "string") {
190
+ throw new Error(
191
+ `Provided schema path \`${schemaPathFromPkgJson}\` from \`${import_path.default.relative(
192
+ cwd,
193
+ prismaConfig.loadedFromFile
194
+ )}\` must be of type string`
195
+ );
196
+ }
197
+ const absoluteSchemaPath = import_path.default.isAbsolute(schemaPathFromPkgJson) ? schemaPathFromPkgJson : import_path.default.resolve(import_path.default.dirname(prismaConfig.loadedFromFile), schemaPathFromPkgJson);
198
+ const lookupResult = await readSchemaFromFileOrDirectory(absoluteSchemaPath);
199
+ if (!lookupResult.ok) {
200
+ throw new Error(
201
+ `Could not load schema from \`${import_path.default.relative(
202
+ cwd,
203
+ absoluteSchemaPath
204
+ )}\` provided by "prisma.schema" config of \`${import_path.default.relative(
205
+ cwd,
206
+ prismaConfig.loadedFromFile
207
+ )}\`: ${renderLookupError(lookupResult.error)}`
208
+ );
209
+ }
210
+ return lookupResult;
211
+ }
176
212
  async function getDefaultSchema(cwd, failures = []) {
177
213
  const lookupPaths = [import_path.default.join(cwd, "schema.prisma"), import_path.default.join(cwd, "prisma", "schema.prisma")];
178
214
  for (const path2 of lookupPaths) {
@@ -26,21 +26,21 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_5MHUYAV3_exports = {};
30
- __export(chunk_5MHUYAV3_exports, {
29
+ var chunk_F2OZV76L_exports = {};
30
+ __export(chunk_F2OZV76L_exports, {
31
31
  getBinaryPathsByVersion: () => getBinaryPathsByVersion
32
32
  });
33
- module.exports = __toCommonJS(chunk_5MHUYAV3_exports);
34
- var import_chunk_5I4ERIIY = require("./chunk-5I4ERIIY.js");
35
- var import_chunk_GJSFP4V4 = require("./chunk-GJSFP4V4.js");
33
+ module.exports = __toCommonJS(chunk_F2OZV76L_exports);
34
+ var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
35
+ var import_chunk_4CGPN5SR = require("./chunk-4CGPN5SR.js");
36
36
  var import_chunk_2SDPW6AX = require("./chunk-2SDPW6AX.js");
37
37
  var import_chunk_7B5PXS6N = require("./chunk-7B5PXS6N.js");
38
- var import_chunk_FF7OLLBP = require("./chunk-FF7OLLBP.js");
38
+ var import_chunk_IDINCQMN = require("./chunk-IDINCQMN.js");
39
39
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
40
40
  var import_engines = require("@prisma/engines");
41
41
  var import_fetch_engine = require("@prisma/fetch-engine");
42
42
  var import_path = __toESM2(require("path"));
43
- var import_fs_extra = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_FF7OLLBP.require_lib)());
43
+ var import_fs_extra = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_IDINCQMN.require_lib)());
44
44
  async function getBinaryPathsByVersion({
45
45
  neededVersions,
46
46
  detectBinaryTarget,
@@ -91,7 +91,7 @@ async function getBinaryPathsByVersion({
91
91
  }
92
92
  const binariesConfig = neededVersion.engines.reduce((acc, curr) => {
93
93
  if (!binaryPathsOverride?.[curr]) {
94
- acc[(0, import_chunk_GJSFP4V4.engineTypeToBinaryType)(curr)] = binaryTargetBaseDir;
94
+ acc[(0, import_chunk_4CGPN5SR.engineTypeToBinaryType)(curr)] = binaryTargetBaseDir;
95
95
  }
96
96
  return acc;
97
97
  }, /* @__PURE__ */ Object.create(null));
@@ -107,7 +107,7 @@ async function getBinaryPathsByVersion({
107
107
  skipDownload
108
108
  };
109
109
  const binaryPathsWithEngineType = await (0, import_fetch_engine.download)(downloadParams);
110
- const binaryPaths = (0, import_chunk_7B5PXS6N.mapKeys)(binaryPathsWithEngineType, import_chunk_5I4ERIIY.binaryTypeToEngineType);
110
+ const binaryPaths = (0, import_chunk_7B5PXS6N.mapKeys)(binaryPathsWithEngineType, import_chunk_RS2R7COT.binaryTypeToEngineType);
111
111
  binaryPathsByVersion[currentVersion] = binaryPaths;
112
112
  }
113
113
  if (binaryPathsOverride) {
@@ -26,13 +26,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_R3J2O23S_exports = {};
30
- __export(chunk_R3J2O23S_exports, {
29
+ var chunk_FCYHZHVW_exports = {};
30
+ __export(chunk_FCYHZHVW_exports, {
31
31
  canPrompt: () => canPrompt
32
32
  });
33
- module.exports = __toCommonJS(chunk_R3J2O23S_exports);
34
- var import_chunk_ICFLO5JW = require("./chunk-ICFLO5JW.js");
33
+ module.exports = __toCommonJS(chunk_FCYHZHVW_exports);
35
34
  var import_chunk_H4NI2RIK = require("./chunk-H4NI2RIK.js");
35
+ var import_chunk_ICFLO5JW = require("./chunk-ICFLO5JW.js");
36
36
  var import_prompts = __toESM(require("prompts"));
37
37
  var canPrompt = () => {
38
38
  const injectedCount = import_prompts.default._injected?.length;
@@ -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_JEVRTTNC_exports = {};
20
- __export(chunk_JEVRTTNC_exports, {
19
+ var chunk_FGU7IK4W_exports = {};
20
+ __export(chunk_FGU7IK4W_exports, {
21
21
  require_package: () => require_package
22
22
  });
23
- module.exports = __toCommonJS(chunk_JEVRTTNC_exports);
23
+ module.exports = __toCommonJS(chunk_FGU7IK4W_exports);
24
24
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
25
25
  var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
26
26
  "package.json"(exports, module2) {
27
27
  module2.exports = {
28
28
  name: "@prisma/internals",
29
- version: "6.19.0-integration-next.21",
29
+ version: "6.19.0",
30
30
  description: "This package is intended for Prisma's internal use",
31
31
  main: "dist/index.js",
32
32
  types: "dist/index.d.ts",
@@ -59,11 +59,12 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
59
59
  "@swc/jest": "0.2.37",
60
60
  "@types/babel__helper-validator-identifier": "7.15.2",
61
61
  "@types/jest": "29.5.14",
62
- "@types/node": "~20.19.24",
62
+ "@types/node": "18.19.76",
63
63
  "@types/resolve": "1.20.6",
64
64
  archiver: "6.0.2",
65
65
  "checkpoint-client": "1.1.33",
66
66
  "cli-truncate": "4.0.0",
67
+ dotenv: "16.5.0",
67
68
  empathic: "2.0.0",
68
69
  "escape-string-regexp": "5.0.0",
69
70
  execa: "8.0.1",
@@ -108,14 +109,14 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
108
109
  "@prisma/generator": "workspace:*",
109
110
  "@prisma/generator-helper": "workspace:*",
110
111
  "@prisma/get-platform": "workspace:*",
111
- "@prisma/prisma-schema-wasm": "6.19.0-31.next-6f525e2b254a97a9c547ae5f2b29c54a171f6b23",
112
- "@prisma/schema-engine-wasm": "6.19.0-21.next-3ab778d6c5a8df0d39fd88ffd67461d3395af732",
112
+ "@prisma/prisma-schema-wasm": "6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773",
113
+ "@prisma/schema-engine-wasm": "6.19.0-26.2ba551f319ab1df4bc874a89965d8b3641056773",
113
114
  "@prisma/schema-files-loader": "workspace:*",
114
115
  arg: "5.0.2",
115
116
  prompts: "2.4.2"
116
117
  },
117
118
  peerDependencies: {
118
- typescript: ">=5.4.0"
119
+ typescript: ">=5.1.0"
119
120
  },
120
121
  peerDependenciesMeta: {
121
122
  typescript: {
@@ -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_YF7MC4C3_exports = {};
30
- __export(chunk_YF7MC4C3_exports, {
29
+ var chunk_FHZ5QJLR_exports = {};
30
+ __export(chunk_FHZ5QJLR_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_YF7MC4C3_exports);
37
- var import_chunk_JEVRTTNC = require("./chunk-JEVRTTNC.js");
36
+ module.exports = __toCommonJS(chunk_FHZ5QJLR_exports);
37
+ var import_chunk_CCLAMTCA = require("./chunk-CCLAMTCA.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_JEVRTTNC.require_package)();
49
+ var { dependencies } = (0, import_chunk_CCLAMTCA.require_package)();
50
50
  var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
51
51
  var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
@@ -26,17 +26,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_3CAPLXKF_exports = {};
30
- __export(chunk_3CAPLXKF_exports, {
29
+ var chunk_FYZCPL2Z_exports = {};
30
+ __export(chunk_FYZCPL2Z_exports, {
31
31
  BinaryType: () => import_fetch_engine.BinaryType,
32
32
  engineEnvVarMap: () => import_fetch_engine.engineEnvVarMap,
33
33
  maybeCopyToTmp: () => maybeCopyToTmp,
34
34
  resolveBinary: () => resolveBinary,
35
35
  safeResolveBinary: () => safeResolveBinary
36
36
  });
37
- module.exports = __toCommonJS(chunk_3CAPLXKF_exports);
38
- var import_chunk_FF7OLLBP = require("./chunk-FF7OLLBP.js");
37
+ module.exports = __toCommonJS(chunk_FYZCPL2Z_exports);
39
38
  var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
39
+ var import_chunk_IDINCQMN = require("./chunk-IDINCQMN.js");
40
40
  var import_chunk_TWSLDIFL = require("./chunk-TWSLDIFL.js");
41
41
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
42
42
  var import_chunk_5VQNKCKW = require("./chunk-5VQNKCKW.js");
@@ -46,11 +46,14 @@ var import_fetch_engine = require("@prisma/fetch-engine");
46
46
  var import_get_platform = require("@prisma/get-platform");
47
47
  var import_fs = __toESM(require("fs"));
48
48
  var import_path = __toESM(require("path"));
49
- var import_fs_extra = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_FF7OLLBP.require_lib)());
49
+ var import_fs_extra = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_IDINCQMN.require_lib)());
50
50
  var import_temp_dir = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_5VQNKCKW.require_temp_dir)());
51
51
  async function getBinaryName(name) {
52
52
  const binaryTarget = await (0, import_get_platform.getBinaryTargetForCurrentPlatform)();
53
53
  const extension = binaryTarget === "windows" ? ".exe" : "";
54
+ if (name === import_fetch_engine.BinaryType.QueryEngineLibrary) {
55
+ return (0, import_get_platform.getNodeAPIName)(binaryTarget, "fs");
56
+ }
54
57
  return `${name}-${binaryTarget}${extension}`;
55
58
  }
56
59
  async function resolveBinary(name, proposedPath) {