@prisma/internals 5.19.0-integration-feat-typed-sql.1 → 5.19.0-integration-feat-typed-sql.3

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 (71) hide show
  1. package/dist/{chunk-WO5ENZU5.js → chunk-2MWIMEFK.js} +7 -7
  2. package/dist/{chunk-EYOPVHNV.js → chunk-3L4K6SFM.js} +7 -7
  3. package/dist/{chunk-U5T2ALDL.js → chunk-3LRE5S6E.js} +8 -8
  4. package/dist/{chunk-EV4E5GN6.js → chunk-3QGWFG6E.js} +43 -43
  5. package/dist/{chunk-QL3K6JIN.js → chunk-3VLJQQOA.js} +5 -5
  6. package/dist/{chunk-TXN4P2UY.js → chunk-4R56FBUF.js} +7 -7
  7. package/dist/{chunk-YFTWQDWC.js → chunk-4ZVGJDUI.js} +5 -5
  8. package/dist/chunk-5XRQ7ONW.js +122 -0
  9. package/dist/{chunk-PN2OFBAO.js → chunk-AYHYONDC.js} +5 -5
  10. package/dist/{chunk-SQX67EBR.js → chunk-AYV4L55K.js} +5 -5
  11. package/dist/{chunk-WLCAAW3G.js → chunk-BFFNJPN2.js} +8 -8
  12. package/dist/{chunk-OEXSUUW2.js → chunk-BGFWFIPR.js} +5 -5
  13. package/dist/{chunk-5ACIJBB4.js → chunk-BX6YSLDA.js} +8 -8
  14. package/dist/chunk-CSV3AVJ4.js +177 -0
  15. package/dist/{chunk-SLGMG65I.js → chunk-ESY3UZBI.js} +14 -178
  16. package/dist/{chunk-LVR5RA7C.js → chunk-FDFZVU55.js} +7 -4
  17. package/dist/chunk-FHXAG4A2.js +29 -0
  18. package/dist/{chunk-7OGLT63S.js → chunk-FMAFO6VE.js} +5 -5
  19. package/dist/chunk-JD6UDOYA.js +54 -0
  20. package/dist/chunk-JXQEYT4S.js +110 -0
  21. package/dist/{chunk-VCLUGB7N.js → chunk-KKZ2HZWO.js} +5 -5
  22. package/dist/{chunk-HDWBT4CR.js → chunk-KXWHSZYC.js} +6 -3
  23. package/dist/chunk-LZIL2VER.js +166 -0
  24. package/dist/{chunk-NEEB3TIJ.js → chunk-OI5RUNIV.js} +5 -5
  25. package/dist/{chunk-PAX5TFEC.js → chunk-P2HFVVRY.js} +8 -8
  26. package/dist/chunk-QIVUAERL.js +2202 -0
  27. package/dist/{chunk-5S6LK7V2.js → chunk-S5WXQYLR.js} +7 -7
  28. package/dist/chunk-T5RACBRF.js +189 -0
  29. package/dist/{chunk-EIEZZJYX.js → chunk-TGDEZJJ5.js} +5 -5
  30. package/dist/{chunk-VNIE2AZB.js → chunk-TQCLUNM2.js} +4 -4
  31. package/dist/{chunk-2HHWV7NR.js → chunk-UHV7G65X.js} +8 -8
  32. package/dist/{chunk-3LVVD3OG.js → chunk-UY2MAGUM.js} +5 -5
  33. package/dist/{chunk-D7HXSF3S.js → chunk-WQQLBNTD.js} +5 -5
  34. package/dist/{chunk-GHYJGM56.js → chunk-YHTJPMCB.js} +4 -4
  35. package/dist/{chunk-ULQYCMW4.js → chunk-YWVIUKXT.js} +48 -819
  36. package/dist/{chunk-INKUPLJ6.js → chunk-ZT46JXZT.js} +8 -8
  37. package/dist/cli/checkUnsupportedDataProxy.js +28 -26
  38. package/dist/cli/getSchema.js +33 -31
  39. package/dist/cli/hashes.js +28 -26
  40. package/dist/engine-commands/errorHelpers.js +4 -4
  41. package/dist/engine-commands/formatSchema.js +27 -25
  42. package/dist/engine-commands/getConfig.js +10 -10
  43. package/dist/engine-commands/getDmmf.js +7 -7
  44. package/dist/engine-commands/getEngineVersion.js +5 -5
  45. package/dist/engine-commands/getEnginesMetaInfo.js +7 -7
  46. package/dist/engine-commands/index.js +38 -36
  47. package/dist/engine-commands/lintSchema.js +8 -8
  48. package/dist/engine-commands/mergeSchemas.js +7 -7
  49. package/dist/engine-commands/validate.js +7 -7
  50. package/dist/get-generators/generatorResolvers/generatorResolvers.js +27 -25
  51. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +27 -25
  52. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.js +27 -25
  53. package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +28 -26
  54. package/dist/get-generators/getGenerators.js +30 -28
  55. package/dist/getPackedPackage.js +3 -2
  56. package/dist/highlight/highlight.js +5 -5
  57. package/dist/index.d.ts +1 -0
  58. package/dist/index.js +70 -67
  59. package/dist/resolveBinary.js +7 -7
  60. package/dist/schemaEngineCommands.js +8 -8
  61. package/dist/sendPanic.js +27 -25
  62. package/dist/utils/getEnvPaths.js +27 -25
  63. package/dist/utils/getVersionFromPackageJson.js +3 -3
  64. package/dist/utils/handlePanic.js +27 -25
  65. package/dist/utils/isValidJsIdentifier.d.ts +1 -0
  66. package/dist/utils/isValidJsIdentifier.js +26 -0
  67. package/dist/utils/loadEnvFile.js +27 -25
  68. package/dist/utils/missingDatasource.js +4 -4
  69. package/dist/utils/missingGeneratorMessage.js +6 -6
  70. package/dist/wasm.js +4 -4
  71. package/package.json +10 -7
@@ -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_WO5ENZU5_exports = {};
20
- __export(chunk_WO5ENZU5_exports, {
19
+ var chunk_2MWIMEFK_exports = {};
20
+ __export(chunk_2MWIMEFK_exports, {
21
21
  missingGeneratorMessage: () => missingGeneratorMessage,
22
22
  missingModelMessage: () => missingModelMessage,
23
23
  missingModelMessageMongoDB: () => missingModelMessageMongoDB
24
24
  });
25
- module.exports = __toCommonJS(chunk_WO5ENZU5_exports);
25
+ module.exports = __toCommonJS(chunk_2MWIMEFK_exports);
26
26
  var import_chunk_L6GBFCXG = require("./chunk-L6GBFCXG.js");
27
- var import_chunk_VNIE2AZB = require("./chunk-VNIE2AZB.js");
27
+ var import_chunk_TQCLUNM2 = require("./chunk-TQCLUNM2.js");
28
28
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
29
29
  var missingGeneratorMessage = `
30
30
  ${(0, import_chunk_PG5FDKSF.blue)("info")} You don't have any generators defined in your ${(0, import_chunk_PG5FDKSF.bold)(
@@ -33,7 +33,7 @@ ${(0, import_chunk_PG5FDKSF.blue)("info")} You don't have any generators defined
33
33
  You can define them like this:
34
34
 
35
35
  ${(0, import_chunk_PG5FDKSF.bold)(
36
- (0, import_chunk_VNIE2AZB.highlightDatamodel)(`generator client {
36
+ (0, import_chunk_TQCLUNM2.highlightDatamodel)(`generator client {
37
37
  provider = "prisma-client-js"
38
38
  }`)
39
39
  )}`;
@@ -44,7 +44,7 @@ You don't have any ${(0, import_chunk_PG5FDKSF.bold)("models")} defined in your
44
44
  You can define a model like this:
45
45
 
46
46
  ${(0, import_chunk_PG5FDKSF.bold)(
47
- (0, import_chunk_VNIE2AZB.highlightDatamodel)(`model User {
47
+ (0, import_chunk_TQCLUNM2.highlightDatamodel)(`model User {
48
48
  id Int @id @default(autoincrement())
49
49
  email String @unique
50
50
  name String?
@@ -61,7 +61,7 @@ You don't have any ${(0, import_chunk_PG5FDKSF.bold)("models")} defined in your
61
61
  You can define a model like this:
62
62
 
63
63
  ${(0, import_chunk_PG5FDKSF.bold)(
64
- (0, import_chunk_VNIE2AZB.highlightDatamodel)(`model User {
64
+ (0, import_chunk_TQCLUNM2.highlightDatamodel)(`model User {
65
65
  id String @id @default(auto()) @map("_id") @db.ObjectId
66
66
  email String @unique
67
67
  name String?
@@ -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_EYOPVHNV_exports = {};
30
- __export(chunk_EYOPVHNV_exports, {
29
+ var chunk_3L4K6SFM_exports = {};
30
+ __export(chunk_3L4K6SFM_exports, {
31
31
  getEnginesInfo: () => getEnginesInfo,
32
32
  getEnginesMetaInfo: () => getEnginesMetaInfo,
33
33
  resolveEngine: () => resolveEngine
34
34
  });
35
- module.exports = __toCommonJS(chunk_EYOPVHNV_exports);
35
+ module.exports = __toCommonJS(chunk_3L4K6SFM_exports);
36
36
  var import_chunk_QOTVZEEZ = require("./chunk-QOTVZEEZ.js");
37
- var import_chunk_QL3K6JIN = require("./chunk-QL3K6JIN.js");
37
+ var import_chunk_3VLJQQOA = require("./chunk-3VLJQQOA.js");
38
38
  var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
39
- var import_chunk_GHYJGM56 = require("./chunk-GHYJGM56.js");
39
+ var import_chunk_JXQEYT4S = require("./chunk-JXQEYT4S.js");
40
40
  var import_chunk_4A5ZK522 = require("./chunk-4A5ZK522.js");
41
41
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
42
42
  var import_engines = require("@prisma/engines");
@@ -157,7 +157,7 @@ async function resolveEngine(binaryName) {
157
157
  const enginePathEither = await (0, import_function2.pipe)(
158
158
  pathFromEnvOption,
159
159
  fold(
160
- () => (0, import_chunk_GHYJGM56.safeResolveBinary)(binaryName),
160
+ () => (0, import_chunk_JXQEYT4S.safeResolveBinary)(binaryName),
161
161
  (pathFromEnv) => (0, import_chunk_4A5ZK522.right2)(pathFromEnv.path)
162
162
  )
163
163
  )();
@@ -165,7 +165,7 @@ async function resolveEngine(binaryName) {
165
165
  enginePathEither,
166
166
  import_chunk_4A5ZK522.fromEither,
167
167
  (0, import_chunk_4A5ZK522.chain)((enginePath) => {
168
- return (0, import_chunk_QL3K6JIN.safeGetEngineVersion)(enginePath, binaryName);
168
+ return (0, import_chunk_3VLJQQOA.safeGetEngineVersion)(enginePath, binaryName);
169
169
  })
170
170
  )();
171
171
  const engineInfo = {
@@ -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_U5T2ALDL_exports = {};
30
- __export(chunk_U5T2ALDL_exports, {
29
+ var chunk_3LRE5S6E_exports = {};
30
+ __export(chunk_3LRE5S6E_exports, {
31
31
  GetDmmfError: () => GetDmmfError,
32
32
  getDMMF: () => getDMMF
33
33
  });
34
- module.exports = __toCommonJS(chunk_U5T2ALDL_exports);
34
+ module.exports = __toCommonJS(chunk_3LRE5S6E_exports);
35
35
  var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
36
36
  var import_chunk_KUMD5MBR = require("./chunk-KUMD5MBR.js");
37
- var import_chunk_SQX67EBR = require("./chunk-SQX67EBR.js");
37
+ var import_chunk_KKZ2HZWO = require("./chunk-KKZ2HZWO.js");
38
38
  var import_chunk_QOTVZEEZ = require("./chunk-QOTVZEEZ.js");
39
39
  var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
40
- var import_chunk_NEEB3TIJ = require("./chunk-NEEB3TIJ.js");
40
+ var import_chunk_FMAFO6VE = require("./chunk-FMAFO6VE.js");
41
41
  var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
42
42
  var import_chunk_4A5ZK522 = require("./chunk-4A5ZK522.js");
43
43
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
@@ -60,7 +60,7 @@ ${detailsHeader} ${message}`;
60
60
  }).exhaustive();
61
61
  const errorMessageWithContext = `${constructedErrorMessage}
62
62
  [Context: getDmmf]`;
63
- super((0, import_chunk_SQX67EBR.addVersionDetailsToErrorMessage)(errorMessageWithContext));
63
+ super((0, import_chunk_KKZ2HZWO.addVersionDetailsToErrorMessage)(errorMessageWithContext));
64
64
  this.name = "GetDmmfError";
65
65
  }
66
66
  };
@@ -91,13 +91,13 @@ async function getDMMF(options) {
91
91
  () => {
92
92
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
93
93
  debug("Triggering a Rust panic...");
94
- import_chunk_NEEB3TIJ.prismaSchemaWasm.debug_panic();
94
+ import_chunk_FMAFO6VE.prismaSchemaWasm.debug_panic();
95
95
  }
96
96
  const params = JSON.stringify({
97
97
  prismaSchema: datamodel,
98
98
  noColor: Boolean(process.env.NO_COLOR)
99
99
  });
100
- const data = import_chunk_NEEB3TIJ.prismaSchemaWasm.get_dmmf(params);
100
+ const data = import_chunk_FMAFO6VE.prismaSchemaWasm.get_dmmf(params);
101
101
  return data;
102
102
  },
103
103
  (e) => ({
@@ -26,8 +26,8 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS2 = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_EV4E5GN6_exports = {};
30
- __export2(chunk_EV4E5GN6_exports, {
29
+ var chunk_3QGWFG6E_exports = {};
30
+ __export2(chunk_3QGWFG6E_exports, {
31
31
  checkTypeScriptVersion: () => checkTypeScriptVersion,
32
32
  checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
33
33
  checkYarnVersion: () => checkYarnVersion,
@@ -56,38 +56,38 @@ __export2(chunk_EV4E5GN6_exports, {
56
56
  sendPanic: () => sendPanic,
57
57
  skipIndex: () => skipIndex
58
58
  });
59
- module.exports = __toCommonJS2(chunk_EV4E5GN6_exports);
59
+ module.exports = __toCommonJS2(chunk_3QGWFG6E_exports);
60
60
  var import_chunk_IABMG3F4 = require("./chunk-IABMG3F4.js");
61
+ var import_chunk_3U2ANLD3 = require("./chunk-3U2ANLD3.js");
61
62
  var import_chunk_FTS2IEWX = require("./chunk-FTS2IEWX.js");
62
63
  var import_chunk_EUTJYQDW = require("./chunk-EUTJYQDW.js");
63
64
  var import_chunk_IPKE37QC = require("./chunk-IPKE37QC.js");
64
65
  var import_chunk_KEBDP2C3 = require("./chunk-KEBDP2C3.js");
65
- var import_chunk_3U2ANLD3 = require("./chunk-3U2ANLD3.js");
66
66
  var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
67
67
  var import_chunk_D4MCOTL5 = require("./chunk-D4MCOTL5.js");
68
68
  var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
69
69
  var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
70
70
  var import_chunk_ONHKZPSV = require("./chunk-ONHKZPSV.js");
71
+ var import_chunk_5V36RLCO = require("./chunk-5V36RLCO.js");
71
72
  var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
72
73
  var import_chunk_JHQHVXIR = require("./chunk-JHQHVXIR.js");
73
74
  var import_chunk_HMGEWJDY = require("./chunk-HMGEWJDY.js");
74
- var import_chunk_WO5ENZU5 = require("./chunk-WO5ENZU5.js");
75
- var import_chunk_5V36RLCO = require("./chunk-5V36RLCO.js");
76
- var import_chunk_KDHESRKE = require("./chunk-KDHESRKE.js");
77
- var import_chunk_OEXSUUW2 = require("./chunk-OEXSUUW2.js");
75
+ var import_chunk_BGFWFIPR = require("./chunk-BGFWFIPR.js");
76
+ var import_chunk_2MWIMEFK = require("./chunk-2MWIMEFK.js");
78
77
  var import_chunk_L6GBFCXG = require("./chunk-L6GBFCXG.js");
78
+ var import_chunk_KDHESRKE = require("./chunk-KDHESRKE.js");
79
79
  var import_chunk_J77ZIDXB = require("./chunk-J77ZIDXB.js");
80
80
  var import_chunk_XLYQ6PQW = require("./chunk-XLYQ6PQW.js");
81
81
  var import_chunk_EPJYKNCQ = require("./chunk-EPJYKNCQ.js");
82
82
  var import_chunk_ODI3VNBD = require("./chunk-ODI3VNBD.js");
83
83
  var import_chunk_TSJICM5S = require("./chunk-TSJICM5S.js");
84
- var import_chunk_EIEZZJYX = require("./chunk-EIEZZJYX.js");
85
- var import_chunk_5S6LK7V2 = require("./chunk-5S6LK7V2.js");
86
- var import_chunk_PAX5TFEC = require("./chunk-PAX5TFEC.js");
87
- var import_chunk_U5T2ALDL = require("./chunk-U5T2ALDL.js");
84
+ var import_chunk_TGDEZJJ5 = require("./chunk-TGDEZJJ5.js");
85
+ var import_chunk_4R56FBUF = require("./chunk-4R56FBUF.js");
86
+ var import_chunk_BX6YSLDA = require("./chunk-BX6YSLDA.js");
87
+ var import_chunk_3LRE5S6E = require("./chunk-3LRE5S6E.js");
88
88
  var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
89
89
  var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
90
- var import_chunk_NEEB3TIJ = require("./chunk-NEEB3TIJ.js");
90
+ var import_chunk_FMAFO6VE = require("./chunk-FMAFO6VE.js");
91
91
  var import_chunk_MUPZUVSI = require("./chunk-MUPZUVSI.js");
92
92
  var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
93
93
  var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
@@ -96,7 +96,7 @@ var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
96
96
  var import_chunk_635TMBAP = require("./chunk-635TMBAP.js");
97
97
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
98
98
  var import_chunk_4NFLAUKD = require("./chunk-4NFLAUKD.js");
99
- var import_chunk_SLGMG65I = require("./chunk-SLGMG65I.js");
99
+ var import_chunk_ESY3UZBI = require("./chunk-ESY3UZBI.js");
100
100
  var import_chunk_FUUQ6FJ4 = require("./chunk-FUUQ6FJ4.js");
101
101
  var import_chunk_KKMREGHN = require("./chunk-KKMREGHN.js");
102
102
  var import_chunk_AZNLB67U = require("./chunk-AZNLB67U.js");
@@ -440,7 +440,7 @@ var require_readdir_glob = (0, import_chunk_WWAWV7DQ.__commonJS)({
440
440
  module2.exports = readdirGlob;
441
441
  var fs8 = (0, import_chunk_WWAWV7DQ.__require)("fs");
442
442
  var { EventEmitter } = (0, import_chunk_WWAWV7DQ.__require)("events");
443
- var { Minimatch } = (0, import_chunk_SLGMG65I.require_minimatch)();
443
+ var { Minimatch } = (0, import_chunk_ESY3UZBI.require_minimatch)();
444
444
  var { resolve } = (0, import_chunk_WWAWV7DQ.__require)("path");
445
445
  function readdir(dir2, strict) {
446
446
  return new Promise((resolve2, reject2) => {
@@ -3619,7 +3619,7 @@ var require_stream_writable = (0, import_chunk_WWAWV7DQ.__commonJS)({
3619
3619
  var Duplex;
3620
3620
  Writable.WritableState = WritableState;
3621
3621
  var util = Object.create(require_util());
3622
- util.inherits = (0, import_chunk_SLGMG65I.require_inherits)();
3622
+ util.inherits = (0, import_chunk_ESY3UZBI.require_inherits)();
3623
3623
  var internalUtil = {
3624
3624
  deprecate: require_node()
3625
3625
  };
@@ -4057,7 +4057,7 @@ var require_stream_duplex = (0, import_chunk_WWAWV7DQ.__commonJS)({
4057
4057
  };
4058
4058
  module2.exports = Duplex;
4059
4059
  var util = Object.create(require_util());
4060
- util.inherits = (0, import_chunk_SLGMG65I.require_inherits)();
4060
+ util.inherits = (0, import_chunk_ESY3UZBI.require_inherits)();
4061
4061
  var Readable = require_stream_readable();
4062
4062
  var Writable = require_stream_writable();
4063
4063
  util.inherits(Duplex, Readable);
@@ -4378,7 +4378,7 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
4378
4378
  return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
4379
4379
  }
4380
4380
  var util = Object.create(require_util());
4381
- util.inherits = (0, import_chunk_SLGMG65I.require_inherits)();
4381
+ util.inherits = (0, import_chunk_ESY3UZBI.require_inherits)();
4382
4382
  var debugUtil = (0, import_chunk_WWAWV7DQ.__require)("util");
4383
4383
  var debug8 = void 0;
4384
4384
  if (debugUtil && debugUtil.debuglog) {
@@ -5045,7 +5045,7 @@ var require_stream_transform = (0, import_chunk_WWAWV7DQ.__commonJS)({
5045
5045
  module2.exports = Transform;
5046
5046
  var Duplex = require_stream_duplex();
5047
5047
  var util = Object.create(require_util());
5048
- util.inherits = (0, import_chunk_SLGMG65I.require_inherits)();
5048
+ util.inherits = (0, import_chunk_ESY3UZBI.require_inherits)();
5049
5049
  util.inherits(Transform, Duplex);
5050
5050
  function afterTransform(er, data) {
5051
5051
  var ts = this._transformState;
@@ -5143,7 +5143,7 @@ var require_stream_passthrough = (0, import_chunk_WWAWV7DQ.__commonJS)({
5143
5143
  module2.exports = PassThrough;
5144
5144
  var Transform = require_stream_transform();
5145
5145
  var util = Object.create(require_util());
5146
- util.inherits = (0, import_chunk_SLGMG65I.require_inherits)();
5146
+ util.inherits = (0, import_chunk_ESY3UZBI.require_inherits)();
5147
5147
  util.inherits(PassThrough, Transform);
5148
5148
  function PassThrough(options2) {
5149
5149
  if (!(this instanceof PassThrough)) return new PassThrough(options2);
@@ -6429,7 +6429,7 @@ var require_stream_writable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
6429
6429
  var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END;
6430
6430
  var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
6431
6431
  var errorOrDestroy = destroyImpl.errorOrDestroy;
6432
- (0, import_chunk_SLGMG65I.require_inherits)()(Writable, Stream);
6432
+ (0, import_chunk_ESY3UZBI.require_inherits)()(Writable, Stream);
6433
6433
  function nop() {
6434
6434
  }
6435
6435
  function WritableState(options2, stream, isDuplex) {
@@ -6871,7 +6871,7 @@ var require_stream_duplex2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
6871
6871
  module2.exports = Duplex;
6872
6872
  var Readable = require_stream_readable2();
6873
6873
  var Writable = require_stream_writable2();
6874
- (0, import_chunk_SLGMG65I.require_inherits)()(Duplex, Readable);
6874
+ (0, import_chunk_ESY3UZBI.require_inherits)()(Duplex, Readable);
6875
6875
  {
6876
6876
  keys = objectKeys(Writable.prototype);
6877
6877
  for (v = 0; v < keys.length; v++) {
@@ -7648,7 +7648,7 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
7648
7648
  var StringDecoder;
7649
7649
  var createReadableStreamAsyncIterator;
7650
7650
  var from;
7651
- (0, import_chunk_SLGMG65I.require_inherits)()(Readable, Stream);
7651
+ (0, import_chunk_ESY3UZBI.require_inherits)()(Readable, Stream);
7652
7652
  var errorOrDestroy = destroyImpl.errorOrDestroy;
7653
7653
  var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
7654
7654
  function prependListener(emitter, event, fn) {
@@ -8353,7 +8353,7 @@ var require_stream_transform2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
8353
8353
  var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING;
8354
8354
  var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
8355
8355
  var Duplex = require_stream_duplex2();
8356
- (0, import_chunk_SLGMG65I.require_inherits)()(Transform, Duplex);
8356
+ (0, import_chunk_ESY3UZBI.require_inherits)()(Transform, Duplex);
8357
8357
  function afterTransform(er, data) {
8358
8358
  var ts = this._transformState;
8359
8359
  ts.transforming = false;
@@ -8447,7 +8447,7 @@ var require_stream_passthrough2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
8447
8447
  "use strict";
8448
8448
  module2.exports = PassThrough;
8449
8449
  var Transform = require_stream_transform2();
8450
- (0, import_chunk_SLGMG65I.require_inherits)()(PassThrough, Transform);
8450
+ (0, import_chunk_ESY3UZBI.require_inherits)()(PassThrough, Transform);
8451
8451
  function PassThrough(options2) {
8452
8452
  if (!(this instanceof PassThrough)) return new PassThrough(options2);
8453
8453
  Transform.call(this, options2);
@@ -9321,7 +9321,7 @@ var require_file = (0, import_chunk_WWAWV7DQ.__commonJS)({
9321
9321
  var difference = require_difference();
9322
9322
  var union = require_union();
9323
9323
  var isPlainObject = require_isPlainObject();
9324
- var glob = (0, import_chunk_SLGMG65I.require_glob)();
9324
+ var glob = (0, import_chunk_ESY3UZBI.require_glob)();
9325
9325
  var file = module2.exports = {};
9326
9326
  var pathSeparatorRe = /[\/\\]/g;
9327
9327
  var processPatterns = function(patterns, fn) {
@@ -15517,7 +15517,7 @@ async function readSchemaFromDirectory(schemaPath2) {
15517
15517
  }
15518
15518
  const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
15519
15519
  debug2("Loading config");
15520
- const config2 = await (0, import_chunk_PAX5TFEC.getConfig)({
15520
+ const config2 = await (0, import_chunk_BX6YSLDA.getConfig)({
15521
15521
  datamodel: files,
15522
15522
  ignoreEnvVarErrors: true
15523
15523
  });
@@ -15626,7 +15626,7 @@ function renderDefaultLookupError(error, cwd) {
15626
15626
  return parts.join("\n");
15627
15627
  }
15628
15628
  async function getPrismaConfigFromPackageJson(cwd) {
15629
- const pkgJson = await (0, import_chunk_SLGMG65I.readPackageUp)({ cwd, normalize: false });
15629
+ const pkgJson = await (0, import_chunk_ESY3UZBI.readPackageUp)({ cwd, normalize: false });
15630
15630
  const prismaPropertyFromPkgJson = pkgJson?.packageJson?.prisma;
15631
15631
  if (!pkgJson) {
15632
15632
  return null;
@@ -15799,7 +15799,7 @@ function isPkgJsonWorkspaceRoot(pkgJson) {
15799
15799
  return Array.isArray(workspaces) || workspaces.packages !== void 0;
15800
15800
  }
15801
15801
  async function isNearestPkgJsonWorkspaceRoot(cwd) {
15802
- const pkgJson = await (0, import_chunk_SLGMG65I.readPackageUp)({ cwd, normalize: false });
15802
+ const pkgJson = await (0, import_chunk_ESY3UZBI.readPackageUp)({ cwd, normalize: false });
15803
15803
  if (!pkgJson) {
15804
15804
  return null;
15805
15805
  }
@@ -15909,8 +15909,8 @@ async function checkUnsupportedDataProxyMessage(command, args, implicitSchema) {
15909
15909
  if (argName.includes("schema")) {
15910
15910
  await loadEnvFile({ schemaPath: argValue, printMessage: false });
15911
15911
  const datamodel = await import_fs.default.promises.readFile(argValue, "utf-8");
15912
- const config2 = await (0, import_chunk_PAX5TFEC.getConfig)({ datamodel, ignoreEnvVarErrors: true });
15913
- const url = (0, import_chunk_PAX5TFEC.resolveUrl)((0, import_chunk_PAX5TFEC.getEffectiveUrl)(config2.datasources[0]));
15912
+ const config2 = await (0, import_chunk_BX6YSLDA.getConfig)({ datamodel, ignoreEnvVarErrors: true });
15913
+ const url = (0, import_chunk_BX6YSLDA.resolveUrl)((0, import_chunk_BX6YSLDA.getEffectiveUrl)(config2.datasources[0]));
15914
15914
  if (url?.startsWith("prisma://")) {
15915
15915
  return forbiddenCmdWithDataProxyFlagMessage(command);
15916
15916
  }
@@ -15931,7 +15931,7 @@ function getCLIPathHash() {
15931
15931
  const cliPath = process.argv[1];
15932
15932
  return import_crypto.default.createHash("sha256").update(cliPath).digest("hex").substring(0, 8);
15933
15933
  }
15934
- var import_p_map = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_SLGMG65I.require_p_map)());
15934
+ var import_p_map = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_ESY3UZBI.require_p_map)());
15935
15935
  var debug4 = (0, import_debug6.default)("prisma:generator");
15936
15936
  async function checkTypeScriptVersion() {
15937
15937
  const minVersion = "4.1.0";
@@ -16114,18 +16114,18 @@ async function getGenerators(options) {
16114
16114
  prismaPath = binaryPathsWithEngineType[queryEngineBinaryType][binaryTarget];
16115
16115
  }
16116
16116
  }
16117
- const config = await (0, import_chunk_PAX5TFEC.getConfig)({
16117
+ const config = await (0, import_chunk_BX6YSLDA.getConfig)({
16118
16118
  datamodel: schemas,
16119
16119
  datamodelPath: schemaPath,
16120
16120
  prismaPath,
16121
16121
  ignoreEnvVarErrors: true
16122
16122
  });
16123
16123
  if (config.datasources.length === 0) {
16124
- throw new Error(import_chunk_OEXSUUW2.missingDatasource);
16124
+ throw new Error(import_chunk_BGFWFIPR.missingDatasource);
16125
16125
  }
16126
16126
  (0, import_chunk_5FJ3MENK.printConfigWarnings)(config.warnings);
16127
16127
  const previewFeatures = (0, import_chunk_TSJICM5S.extractPreviewFeatures)(config);
16128
- const dmmf = await (0, import_chunk_U5T2ALDL.getDMMF)({
16128
+ const dmmf = await (0, import_chunk_3LRE5S6E.getDMMF)({
16129
16129
  datamodel: schemas,
16130
16130
  datamodelPath: schemaPath,
16131
16131
  prismaPath,
@@ -16133,9 +16133,9 @@ async function getGenerators(options) {
16133
16133
  });
16134
16134
  if (dmmf.datamodel.models.length === 0 && !allowNoModels) {
16135
16135
  if (config.datasources.some((d2) => d2.provider === "mongodb")) {
16136
- throw new Error(import_chunk_WO5ENZU5.missingModelMessageMongoDB);
16136
+ throw new Error(import_chunk_2MWIMEFK.missingModelMessageMongoDB);
16137
16137
  }
16138
- throw new Error(import_chunk_WO5ENZU5.missingModelMessage);
16138
+ throw new Error(import_chunk_2MWIMEFK.missingModelMessage);
16139
16139
  }
16140
16140
  (0, import_chunk_IPKE37QC.checkFeatureFlags)(config, options);
16141
16141
  const generatorConfigs = filterGenerators(overrideGenerators || config.generators, generatorNames);
@@ -16186,7 +16186,7 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
16186
16186
  fromEnvVar: "null"
16187
16187
  };
16188
16188
  }
16189
- const datamodel = (0, import_chunk_5S6LK7V2.mergeSchemas)({ schemas });
16189
+ const datamodel = (0, import_chunk_4R56FBUF.mergeSchemas)({ schemas });
16190
16190
  const envPaths2 = await getEnvPaths(schemaPath, { cwd: generator.output.value });
16191
16191
  const options2 = {
16192
16192
  datamodel,
@@ -16269,7 +16269,7 @@ generator gen {
16269
16269
  debug6({ generatorBinaryPaths });
16270
16270
  generator.setBinaryPaths(generatorBinaryPaths);
16271
16271
  if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
16272
- const customDmmf = await (0, import_chunk_U5T2ALDL.getDMMF)({
16272
+ const customDmmf = await (0, import_chunk_3LRE5S6E.getDMMF)({
16273
16273
  datamodel: schemas,
16274
16274
  datamodelPath: schemaPath,
16275
16275
  prismaPath: generatorBinaryPaths[queryEngineType]?.[binaryTarget],
@@ -16567,7 +16567,7 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
16567
16567
  if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
16568
16568
  handleFormatPanic(
16569
16569
  () => {
16570
- import_chunk_NEEB3TIJ.prismaSchemaWasm.debug_panic();
16570
+ import_chunk_FMAFO6VE.prismaSchemaWasm.debug_panic();
16571
16571
  },
16572
16572
  { schemas: schemas2 }
16573
16573
  );
@@ -16587,12 +16587,12 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
16587
16587
  () => {
16588
16588
  const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas2), documentFormattingParams);
16589
16589
  const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
16590
- const lintDiagnostics2 = (0, import_chunk_EIEZZJYX.lintSchema)({ schemas: formattedMultipleSchemas2 });
16590
+ const lintDiagnostics2 = (0, import_chunk_TGDEZJJ5.lintSchema)({ schemas: formattedMultipleSchemas2 });
16591
16591
  return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
16592
16592
  },
16593
16593
  { schemas: schemas2 }
16594
16594
  );
16595
- const lintWarnings = (0, import_chunk_EIEZZJYX.getLintWarningsAsText)(lintDiagnostics);
16595
+ const lintWarnings = (0, import_chunk_TGDEZJJ5.getLintWarningsAsText)(lintDiagnostics);
16596
16596
  if (lintWarnings && import_chunk_AZNLB67U.logger_exports.should.warn()) {
16597
16597
  console.warn(lintWarnings);
16598
16598
  }
@@ -16622,7 +16622,7 @@ function handleFormatPanic(tryCb, { schemas: schemas2 }) {
16622
16622
  }
16623
16623
  }
16624
16624
  function formatWasm(schema, documentFormattingParams) {
16625
- const formattedSchema = import_chunk_NEEB3TIJ.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
16625
+ const formattedSchema = import_chunk_FMAFO6VE.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
16626
16626
  return formattedSchema;
16627
16627
  }
16628
16628
  /*! Bundled license information:
@@ -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_QL3K6JIN_exports = {};
20
- __export(chunk_QL3K6JIN_exports, {
19
+ var chunk_3VLJQQOA_exports = {};
20
+ __export(chunk_3VLJQQOA_exports, {
21
21
  getEngineVersion: () => getEngineVersion,
22
22
  safeGetEngineVersion: () => safeGetEngineVersion
23
23
  });
24
- module.exports = __toCommonJS(chunk_QL3K6JIN_exports);
24
+ module.exports = __toCommonJS(chunk_3VLJQQOA_exports);
25
25
  var import_chunk_S4LINK5Y = require("./chunk-S4LINK5Y.js");
26
26
  var import_chunk_7XNZDY2V = require("./chunk-7XNZDY2V.js");
27
- var import_chunk_GHYJGM56 = require("./chunk-GHYJGM56.js");
27
+ var import_chunk_JXQEYT4S = require("./chunk-JXQEYT4S.js");
28
28
  var import_chunk_4A5ZK522 = require("./chunk-4A5ZK522.js");
29
29
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
30
30
  var import_engines = require("@prisma/engines");
@@ -35,7 +35,7 @@ async function getEngineVersion(enginePath, binaryName) {
35
35
  if (!binaryName) {
36
36
  binaryName = (0, import_engines.getCliQueryEngineBinaryType)();
37
37
  }
38
- enginePath = await (0, import_chunk_GHYJGM56.resolveBinary)(binaryName, enginePath);
38
+ enginePath = await (0, import_chunk_JXQEYT4S.resolveBinary)(binaryName, enginePath);
39
39
  const platformInfo = await (0, import_get_platform.getPlatformInfo)();
40
40
  if (binaryName === import_fetch_engine.BinaryType.QueryEngineLibrary) {
41
41
  (0, import_get_platform.assertNodeAPISupported)();
@@ -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_TXN4P2UY_exports = {};
30
- __export(chunk_TXN4P2UY_exports, {
29
+ var chunk_4R56FBUF_exports = {};
30
+ __export(chunk_4R56FBUF_exports, {
31
31
  MergeSchemasError: () => MergeSchemasError,
32
32
  mergeSchemas: () => mergeSchemas
33
33
  });
34
- module.exports = __toCommonJS(chunk_TXN4P2UY_exports);
34
+ module.exports = __toCommonJS(chunk_4R56FBUF_exports);
35
35
  var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
36
36
  var import_chunk_KUMD5MBR = require("./chunk-KUMD5MBR.js");
37
37
  var import_chunk_WMIBAVWZ = require("./chunk-WMIBAVWZ.js");
38
- var import_chunk_VCLUGB7N = require("./chunk-VCLUGB7N.js");
38
+ var import_chunk_KKZ2HZWO = require("./chunk-KKZ2HZWO.js");
39
39
  var import_chunk_QOTVZEEZ = require("./chunk-QOTVZEEZ.js");
40
40
  var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
41
- var import_chunk_7OGLT63S = require("./chunk-7OGLT63S.js");
41
+ var import_chunk_FMAFO6VE = require("./chunk-FMAFO6VE.js");
42
42
  var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
43
43
  var import_chunk_4A5ZK522 = require("./chunk-4A5ZK522.js");
44
44
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
@@ -60,7 +60,7 @@ ${detailsHeader} ${message}`;
60
60
  }).exhaustive();
61
61
  const errorMessageWithContext = `${constructedErrorMessage}
62
62
  [Context: mergeSchemas]`;
63
- super((0, import_chunk_VCLUGB7N.addVersionDetailsToErrorMessage)(errorMessageWithContext));
63
+ super((0, import_chunk_KKZ2HZWO.addVersionDetailsToErrorMessage)(errorMessageWithContext));
64
64
  this.name = "MergeSchemasError";
65
65
  }
66
66
  };
@@ -73,7 +73,7 @@ function mergeSchemas(options) {
73
73
  const params = JSON.stringify({
74
74
  schema: options.schemas
75
75
  });
76
- return import_chunk_7OGLT63S.prismaSchemaWasm.merge_schemas(params);
76
+ return import_chunk_FMAFO6VE.prismaSchemaWasm.merge_schemas(params);
77
77
  },
78
78
  (e) => ({
79
79
  type: "wasm-error",
@@ -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_YFTWQDWC_exports = {};
20
- __export(chunk_YFTWQDWC_exports, {
19
+ var chunk_4ZVGJDUI_exports = {};
20
+ __export(chunk_4ZVGJDUI_exports, {
21
21
  version: () => version
22
22
  });
23
- module.exports = __toCommonJS(chunk_YFTWQDWC_exports);
24
- var import_chunk_LVR5RA7C = require("./chunk-LVR5RA7C.js");
25
- var packageJson = (0, import_chunk_LVR5RA7C.require_package)();
23
+ module.exports = __toCommonJS(chunk_4ZVGJDUI_exports);
24
+ var import_chunk_FDFZVU55 = require("./chunk-FDFZVU55.js");
25
+ var packageJson = (0, import_chunk_FDFZVU55.require_package)();
26
26
  var version = packageJson.version;
@@ -0,0 +1,122 @@
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 __toESM2 = (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_5XRQ7ONW_exports = {};
30
+ __export(chunk_5XRQ7ONW_exports, {
31
+ getBinaryPathsByVersion: () => getBinaryPathsByVersion
32
+ });
33
+ module.exports = __toCommonJS(chunk_5XRQ7ONW_exports);
34
+ var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
35
+ var import_chunk_4CGPN5SR = require("./chunk-4CGPN5SR.js");
36
+ var import_chunk_2SDPW6AX = require("./chunk-2SDPW6AX.js");
37
+ var import_chunk_7B5PXS6N = require("./chunk-7B5PXS6N.js");
38
+ var import_chunk_QIVUAERL = require("./chunk-QIVUAERL.js");
39
+ var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
40
+ var import_engines = require("@prisma/engines");
41
+ var import_fetch_engine = require("@prisma/fetch-engine");
42
+ var import_path = __toESM2(require("path"));
43
+ var import_fs_extra = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_QIVUAERL.require_lib)());
44
+ async function getBinaryPathsByVersion({
45
+ neededVersions,
46
+ binaryTarget,
47
+ version,
48
+ printDownloadProgress,
49
+ skipDownload,
50
+ binaryPathsOverride
51
+ }) {
52
+ const binaryPathsByVersion = /* @__PURE__ */ Object.create(null);
53
+ for (const currentVersion in neededVersions) {
54
+ binaryPathsByVersion[currentVersion] = {};
55
+ const neededVersion = neededVersions[currentVersion];
56
+ if (neededVersion.binaryTargets.length === 0) {
57
+ neededVersion.binaryTargets = [{ fromEnvVar: null, value: binaryTarget }];
58
+ }
59
+ if (process.env.NETLIFY) {
60
+ const isNodeMajor20OrUp = parseInt(process.versions.node.split(".")[0]) >= 20;
61
+ const awsRuntimeVersion = (0, import_chunk_2SDPW6AX.parseAWSNodejsRuntimeEnvVarVersion)();
62
+ const isRuntimeEnvVar20OrUp = awsRuntimeVersion && awsRuntimeVersion >= 20;
63
+ const isRuntimeEnvVar18OrDown = awsRuntimeVersion && awsRuntimeVersion <= 18;
64
+ const isRhelBinaryTarget1xInNeededVersions = neededVersion.binaryTargets.find(
65
+ (object) => object.value === "rhel-openssl-1.0.x"
66
+ );
67
+ const isRhelBinaryTarget3xInNeededVersions = neededVersion.binaryTargets.find(
68
+ (object) => object.value === "rhel-openssl-3.0.x"
69
+ );
70
+ if (!isRhelBinaryTarget3xInNeededVersions && (isNodeMajor20OrUp || isRuntimeEnvVar20OrUp) && !isRuntimeEnvVar18OrDown) {
71
+ neededVersion.binaryTargets.push({
72
+ fromEnvVar: null,
73
+ value: "rhel-openssl-3.0.x"
74
+ });
75
+ } else if (!isRhelBinaryTarget1xInNeededVersions) {
76
+ neededVersion.binaryTargets.push({
77
+ fromEnvVar: null,
78
+ value: "rhel-openssl-1.0.x"
79
+ });
80
+ }
81
+ }
82
+ let binaryTargetBaseDir = eval(`require('path').join(__dirname, '..')`);
83
+ if (version !== currentVersion) {
84
+ binaryTargetBaseDir = import_path.default.join(binaryTargetBaseDir, `./engines/${currentVersion}/`);
85
+ await (0, import_fs_extra.ensureDir)(binaryTargetBaseDir).catch((e) => console.error(e));
86
+ }
87
+ const binariesConfig = neededVersion.engines.reduce((acc, curr) => {
88
+ if (!binaryPathsOverride?.[curr]) {
89
+ acc[(0, import_chunk_4CGPN5SR.engineTypeToBinaryType)(curr)] = binaryTargetBaseDir;
90
+ }
91
+ return acc;
92
+ }, /* @__PURE__ */ Object.create(null));
93
+ if (Object.values(binariesConfig).length > 0) {
94
+ const binaryTargets = neededVersion.binaryTargets.map(
95
+ (binaryTarget2) => binaryTarget2.value
96
+ );
97
+ const downloadParams = {
98
+ binaries: binariesConfig,
99
+ binaryTargets,
100
+ showProgress: typeof printDownloadProgress === "boolean" ? printDownloadProgress : true,
101
+ version: currentVersion && currentVersion !== "latest" ? currentVersion : import_engines.enginesVersion,
102
+ skipDownload
103
+ };
104
+ const binaryPathsWithEngineType = await (0, import_fetch_engine.download)(downloadParams);
105
+ const binaryPaths = (0, import_chunk_7B5PXS6N.mapKeys)(binaryPathsWithEngineType, import_chunk_RS2R7COT.binaryTypeToEngineType);
106
+ binaryPathsByVersion[currentVersion] = binaryPaths;
107
+ }
108
+ if (binaryPathsOverride) {
109
+ const overrideEngines = Object.keys(binaryPathsOverride);
110
+ const enginesCoveredByOverride = neededVersion.engines.filter((engine) => overrideEngines.includes(engine));
111
+ if (enginesCoveredByOverride.length > 0) {
112
+ for (const engine of enginesCoveredByOverride) {
113
+ const enginePath = binaryPathsOverride[engine];
114
+ binaryPathsByVersion[currentVersion][engine] = {
115
+ [binaryTarget]: enginePath
116
+ };
117
+ }
118
+ }
119
+ }
120
+ }
121
+ return binaryPathsByVersion;
122
+ }