@prisma/internals 6.3.0-integration-simpler-typeinfo-query.1 → 6.3.0-integration-fix-subcommands-esm-projects.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 (113) hide show
  1. package/dist/{chunk-H3T4L34H.js → chunk-25RJ7YTB.js} +88 -83
  2. package/dist/{chunk-S4LINK5Y.js → chunk-2XRDQCIA.js} +5 -5
  3. package/dist/{chunk-HMGEWJDY.js → chunk-3BND5XB4.js} +232 -47
  4. package/dist/{chunk-COFXY6NH.js → chunk-4B7GQDQF.js} +14 -41
  5. package/dist/{chunk-5R7AZFMV.js → chunk-4SIGCPK2.js} +5 -5
  6. package/dist/{chunk-KROMVQBD.js → chunk-57OBCDVS.js} +10 -10
  7. package/dist/{chunk-5I4BOTBV.js → chunk-5MCWLJSR.js} +3 -9
  8. package/dist/{chunk-OHBFHT5Q.js → chunk-5VDOZL24.js} +15 -15
  9. package/dist/{chunk-IABMG3F4.js → chunk-77IC3DNO.js} +5 -5
  10. package/dist/{chunk-UR3LUZY3.js → chunk-7KAR3MST.js} +17 -17
  11. package/dist/{chunk-JBUUTZQL.js → chunk-A6FIX424.js} +15 -15
  12. package/dist/chunk-BONFK27U.js +47 -0
  13. package/dist/{chunk-WMIBAVWZ.js → chunk-C47SCASR.js} +5 -5
  14. package/dist/{chunk-IAEMHQAC.js → chunk-CXEMRKV4.js} +8 -8
  15. package/dist/{chunk-J3JE5NVO.js → chunk-CZDIXJEO.js} +56 -32
  16. package/dist/{chunk-TFSZCVKC.js → chunk-G4BGJ6IP.js} +5 -5
  17. package/dist/chunk-HB2Q7X5H.js +30 -0
  18. package/dist/{chunk-DFG3425X.js → chunk-HUHYNLS4.js} +16 -16
  19. package/dist/{chunk-B44XJG7K.js → chunk-IHMHEVUM.js} +5 -5
  20. package/dist/{chunk-4NFLAUKD.js → chunk-KQOJB3ZW.js} +70 -70
  21. package/dist/{chunk-X4U4GLWH.js → chunk-KRWS7JB4.js} +5 -4
  22. package/dist/{chunk-V2VWODV3.js → chunk-LAECCYFY.js} +7 -7
  23. package/dist/{chunk-VJQK3LHU.js → chunk-LEYFAVNZ.js} +76 -187
  24. package/dist/{chunk-MUJIYA44.js → chunk-MAWSAR5P.js} +5 -5
  25. package/dist/{chunk-44JHENE6.js → chunk-MCS2FDNN.js} +14 -41
  26. package/dist/{chunk-3U2ANLD3.js → chunk-MGZOEY6N.js} +6 -6
  27. package/dist/{chunk-J4MA2JIK.js → chunk-N6K7M2HZ.js} +5 -5
  28. package/dist/{chunk-67KWF6KB.js → chunk-NQWNTJWW.js} +5 -5
  29. package/dist/{chunk-KPVPQQGU.js → chunk-NUVGMN5Z.js} +5 -5
  30. package/dist/{chunk-QJZIYUVB.js → chunk-NXIWDQBF.js} +4 -4
  31. package/dist/{chunk-LXIE6UJ2.js → chunk-PFUDUATX.js} +80 -962
  32. package/dist/chunk-PPCNLYSB.js +47 -0
  33. package/dist/{chunk-2WJPHJ2I.js → chunk-QGXDUBHL.js} +5 -5
  34. package/dist/{chunk-CKNTB45N.js → chunk-QSAE23KV.js} +8 -3
  35. package/dist/{chunk-XLYQ6PQW.js → chunk-QTXYAZFX.js} +17 -17
  36. package/dist/{chunk-P6VBFLWR.js → chunk-QVVSDACW.js} +5 -5
  37. package/dist/{chunk-FTS2IEWX.js → chunk-S57RMXZW.js} +5 -5
  38. package/dist/{chunk-5UJZARUY.js → chunk-SX5UKRZS.js} +17 -17
  39. package/dist/{chunk-KNNIRRTO.js → chunk-UKDMRXVN.js} +5 -5
  40. package/dist/{chunk-OSOXVAZB.js → chunk-UPIULDLZ.js} +11 -11
  41. package/dist/{chunk-WCRKL55L.js → chunk-V2ZF7ETH.js} +7 -7
  42. package/dist/{chunk-VFU3I6P6.js → chunk-VETKNW6E.js} +16 -16
  43. package/dist/{chunk-YDZVEVUG.js → chunk-VRT7T6MF.js} +73 -73
  44. package/dist/{chunk-2DXAGCPS.js → chunk-WKXWUB7U.js} +13 -13
  45. package/dist/{chunk-CKVVVLEH.js → chunk-XEQLM63R.js} +9 -9
  46. package/dist/{chunk-WYTN2XGW.js → chunk-XNUQWNLF.js} +5 -5
  47. package/dist/{chunk-ZA3RMW2P.js → chunk-ZKAW5JSN.js} +5 -8
  48. package/dist/cli/checkUnsupportedDataProxy.js +47 -45
  49. package/dist/cli/getGeneratorSuccessMessage.js +3 -3
  50. package/dist/cli/getSchema.js +52 -50
  51. package/dist/cli/getTypescriptVersion.d.ts +1 -0
  52. package/dist/cli/getTypescriptVersion.js +25 -0
  53. package/dist/cli/hashes.js +47 -45
  54. package/dist/client/getClientEngineType.d.ts +2 -1
  55. package/dist/client/getClientEngineType.js +4 -4
  56. package/dist/convertCredentials.js +5 -4
  57. package/dist/engine-commands/errorHelpers.js +4 -4
  58. package/dist/engine-commands/formatSchema.js +46 -44
  59. package/dist/engine-commands/getConfig.js +13 -13
  60. package/dist/engine-commands/getDmmf.js +10 -10
  61. package/dist/engine-commands/getEngineVersion.js +8 -8
  62. package/dist/engine-commands/getEnginesMetaInfo.js +10 -10
  63. package/dist/engine-commands/index.js +57 -55
  64. package/dist/engine-commands/lintSchema.js +8 -8
  65. package/dist/engine-commands/mergeSchemas.js +10 -10
  66. package/dist/engine-commands/queryEngineCommons.js +7 -7
  67. package/dist/engine-commands/relativizePathInPSLError.js +2 -2
  68. package/dist/engine-commands/validate.js +10 -10
  69. package/dist/errorReporting.js +6 -6
  70. package/dist/get-generators/generatorResolvers/generatorResolvers.js +46 -44
  71. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +3 -3
  72. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +4 -4
  73. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +46 -44
  74. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +3 -3
  75. package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +47 -45
  76. package/dist/get-generators/getGenerators.js +49 -47
  77. package/dist/get-generators/utils/getBinaryPathsByVersion.js +3 -3
  78. package/dist/getPackedPackage.js +2 -2
  79. package/dist/index.d.ts +2 -0
  80. package/dist/index.js +106 -100
  81. package/dist/{multipart-parser-LCETWFPE.js → multipart-parser-32AROPTR.js} +9 -6
  82. package/dist/resolveBinary.js +7 -7
  83. package/dist/schemaEngineCommands.js +8 -8
  84. package/dist/sendPanic.js +46 -44
  85. package/dist/tracing/types.d.ts +26 -16
  86. package/dist/typescript-AILDXN3I.js +205230 -0
  87. package/dist/typescript-WN4QH2CP.js +205192 -0
  88. package/dist/utils/cloudflareD1.js +3 -3
  89. package/dist/utils/getCommandWithExecutor.js +3 -3
  90. package/dist/utils/getEnvPaths.js +46 -44
  91. package/dist/utils/getGitHubIssueUrl.js +4 -4
  92. package/dist/utils/getVersionFromPackageJson.js +3 -3
  93. package/dist/utils/handleEngineLoadingErrors.js +3 -3
  94. package/dist/utils/handlePanic.js +46 -44
  95. package/dist/utils/isCurrentBinInstalledGlobally.d.ts +1 -1
  96. package/dist/utils/isCurrentBinInstalledGlobally.js +2 -2
  97. package/dist/utils/load.js +4 -4
  98. package/dist/utils/loadEnvFile.js +46 -44
  99. package/dist/utils/prismaPostgres.d.ts +3 -0
  100. package/dist/utils/prismaPostgres.js +27 -0
  101. package/dist/utils/prismaPostgres.test.d.ts +1 -0
  102. package/dist/utils/prismaPostgres.test.js +15 -0
  103. package/dist/utils/tryLoadEnvs.js +5 -5
  104. package/dist/wasm.js +4 -4
  105. package/package.json +13 -13
  106. package/dist/chunk-4RWCRJYD.js +0 -166
  107. package/dist/chunk-D4MCOTL5.js +0 -122
  108. package/dist/chunk-FPHZVRV4.js +0 -110
  109. package/dist/chunk-G7LL2H2O.js +0 -54
  110. package/dist/chunk-JMZHUHCC.js +0 -177
  111. package/dist/chunk-RQPDQSHK.js +0 -1429
  112. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.d.ts +0 -9
  113. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.js +0 -132
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var chunk_PPCNLYSB_exports = {};
30
+ __export(chunk_PPCNLYSB_exports, {
31
+ getTypescriptVersion: () => getTypescriptVersion
32
+ });
33
+ module.exports = __toCommonJS(chunk_PPCNLYSB_exports);
34
+ async function getProcessObject() {
35
+ try {
36
+ return await import("node:process");
37
+ } catch (_) {
38
+ return null;
39
+ }
40
+ }
41
+ async function getTypescriptVersion() {
42
+ try {
43
+ return (await import("./typescript-AILDXN3I.js")).default.version;
44
+ } catch (_) {
45
+ return (await getProcessObject())?.versions.typescript || "unknown";
46
+ }
47
+ }
@@ -26,14 +26,14 @@ 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_2WJPHJ2I_exports = {};
30
- __export(chunk_2WJPHJ2I_exports, {
29
+ var chunk_QGXDUBHL_exports = {};
30
+ __export(chunk_QGXDUBHL_exports, {
31
31
  prismaSchemaWasm: () => import_prisma_schema_wasm.default,
32
32
  prismaSchemaWasmVersion: () => prismaSchemaWasmVersion,
33
33
  wasm_exports: () => wasm_exports
34
34
  });
35
- module.exports = __toCommonJS(chunk_2WJPHJ2I_exports);
36
- var import_chunk_CKVVVLEH = require("./chunk-CKVVVLEH.js");
35
+ module.exports = __toCommonJS(chunk_QGXDUBHL_exports);
36
+ var import_chunk_XEQLM63R = require("./chunk-XEQLM63R.js");
37
37
  var import_chunk_HOZFIXMD = require("./chunk-HOZFIXMD.js");
38
38
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
39
39
  var import_prisma_schema_wasm = __toESM(require("@prisma/prisma-schema-wasm"));
@@ -42,6 +42,6 @@ var wasm_exports = {};
42
42
  prismaSchemaWasm: () => import_prisma_schema_wasm.default,
43
43
  prismaSchemaWasmVersion: () => prismaSchemaWasmVersion
44
44
  });
45
- var { dependencies } = (0, import_chunk_CKVVVLEH.require_package)();
45
+ var { dependencies } = (0, import_chunk_XEQLM63R.require_package)();
46
46
  var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
47
47
  globalThis.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_HOZFIXMD.WasmPanicRegistry();
@@ -16,16 +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_CKNTB45N_exports = {};
20
- __export(chunk_CKNTB45N_exports, {
19
+ var chunk_QSAE23KV_exports = {};
20
+ __export(chunk_QSAE23KV_exports, {
21
21
  ClientEngineType: () => ClientEngineType,
22
22
  DEFAULT_CLIENT_ENGINE_TYPE: () => DEFAULT_CLIENT_ENGINE_TYPE,
23
23
  getClientEngineType: () => getClientEngineType
24
24
  });
25
- module.exports = __toCommonJS(chunk_CKNTB45N_exports);
25
+ module.exports = __toCommonJS(chunk_QSAE23KV_exports);
26
26
  var ClientEngineType = /* @__PURE__ */ ((ClientEngineType2) => {
27
27
  ClientEngineType2["Library"] = "library";
28
28
  ClientEngineType2["Binary"] = "binary";
29
+ ClientEngineType2["Client"] = "client";
29
30
  return ClientEngineType2;
30
31
  })(ClientEngineType || {});
31
32
  var DEFAULT_CLIENT_ENGINE_TYPE = "library";
@@ -36,6 +37,8 @@ function getClientEngineType(generatorConfig) {
36
37
  return "library";
37
38
  } else if (generatorConfig?.config.engineType === "binary") {
38
39
  return "binary";
40
+ } else if (generatorConfig?.config.engineType === "client") {
41
+ return "client";
39
42
  } else {
40
43
  return DEFAULT_CLIENT_ENGINE_TYPE;
41
44
  }
@@ -46,6 +49,8 @@ function getEngineTypeFromEnvVar() {
46
49
  return "library";
47
50
  } else if (engineType === "binary") {
48
51
  return "binary";
52
+ } else if (engineType === "client") {
53
+ return "client";
49
54
  } else {
50
55
  return void 0;
51
56
  }
@@ -26,21 +26,21 @@ 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_XLYQ6PQW_exports = {};
30
- __export(chunk_XLYQ6PQW_exports, {
29
+ var chunk_QTXYAZFX_exports = {};
30
+ __export(chunk_QTXYAZFX_exports, {
31
31
  getGitHubIssueUrl: () => getGitHubIssueUrl,
32
32
  wouldYouLikeToCreateANewIssue: () => wouldYouLikeToCreateANewIssue
33
33
  });
34
- module.exports = __toCommonJS(chunk_XLYQ6PQW_exports);
34
+ module.exports = __toCommonJS(chunk_QTXYAZFX_exports);
35
35
  var import_chunk_ODI3VNBD = require("./chunk-ODI3VNBD.js");
36
- var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
36
+ var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
37
37
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
38
38
  var import_get_platform = require("@prisma/get-platform");
39
- var import_process = __toESM(require("process"));
40
- var import_os = __toESM(require("os"));
41
- var import_fs = __toESM(require("fs"));
42
- var import_fs2 = __toESM(require("fs"));
43
- var import_fs3 = __toESM(require("fs"));
39
+ var import_node_process = __toESM(require("node:process"));
40
+ var import_node_os = __toESM(require("node:os"));
41
+ var import_node_fs = __toESM(require("node:fs"));
42
+ var import_node_fs2 = __toESM(require("node:fs"));
43
+ var import_node_fs3 = __toESM(require("node:fs"));
44
44
  var import_prompts = __toESM(require("prompts"));
45
45
  var require_is_windows = (0, import_chunk_WWAWV7DQ.__commonJS)({
46
46
  "../../node_modules/.pnpm/is-windows@1.0.2/node_modules/is-windows/index.js"(exports, module2) {
@@ -309,7 +309,7 @@ var import_is_windows = (0, import_chunk_WWAWV7DQ.__toESM)(require_is_windows())
309
309
  var isDockerCached;
310
310
  function hasDockerEnv() {
311
311
  try {
312
- import_fs3.default.statSync("/.dockerenv");
312
+ import_node_fs3.default.statSync("/.dockerenv");
313
313
  return true;
314
314
  } catch {
315
315
  return false;
@@ -317,7 +317,7 @@ function hasDockerEnv() {
317
317
  }
318
318
  function hasDockerCGroup() {
319
319
  try {
320
- return import_fs3.default.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
320
+ return import_node_fs3.default.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
321
321
  } catch {
322
322
  return false;
323
323
  }
@@ -331,7 +331,7 @@ function isDocker() {
331
331
  var cachedResult;
332
332
  var hasContainerEnv = () => {
333
333
  try {
334
- import_fs2.default.statSync("/run/.containerenv");
334
+ import_node_fs2.default.statSync("/run/.containerenv");
335
335
  return true;
336
336
  } catch {
337
337
  return false;
@@ -344,22 +344,22 @@ function isInsideContainer() {
344
344
  return cachedResult;
345
345
  }
346
346
  var isWsl = () => {
347
- if (import_process.default.platform !== "linux") {
347
+ if (import_node_process.default.platform !== "linux") {
348
348
  return false;
349
349
  }
350
- if (import_os.default.release().toLowerCase().includes("microsoft")) {
350
+ if (import_node_os.default.release().toLowerCase().includes("microsoft")) {
351
351
  if (isInsideContainer()) {
352
352
  return false;
353
353
  }
354
354
  return true;
355
355
  }
356
356
  try {
357
- return import_fs.default.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
357
+ return import_node_fs.default.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
358
358
  } catch {
359
359
  return false;
360
360
  }
361
361
  };
362
- var is_wsl_default = import_process.default.env.__IS_WSL_TEST__ ? isWsl : isWsl();
362
+ var is_wsl_default = import_node_process.default.env.__IS_WSL_TEST__ ? isWsl : isWsl();
363
363
  var import_new_github_issue_url = (0, import_chunk_WWAWV7DQ.__toESM)(require_new_github_issue_url());
364
364
  var import_open = (0, import_chunk_WWAWV7DQ.__toESM)(require_open());
365
365
  var import_strip_ansi = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_ODI3VNBD.require_strip_ansi)());
@@ -379,7 +379,7 @@ function getGitHubIssueUrl({
379
379
  });
380
380
  }
381
381
  async function wouldYouLikeToCreateANewIssue(options) {
382
- const shouldCreateNewIssue = await (0, import_chunk_H3T4L34H.$)(options.prompt).with(true, async () => {
382
+ const shouldCreateNewIssue = await (0, import_chunk_25RJ7YTB.z)(options.prompt).with(true, async () => {
383
383
  const createNewIssueResponse = await (0, import_prompts.default)({
384
384
  type: "select",
385
385
  name: "value",
@@ -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_P6VBFLWR_exports = {};
30
- __export(chunk_P6VBFLWR_exports, {
29
+ var chunk_QVVSDACW_exports = {};
30
+ __export(chunk_QVVSDACW_exports, {
31
31
  getGeneratorSuccessMessage: () => getGeneratorSuccessMessage
32
32
  });
33
- module.exports = __toCommonJS(chunk_P6VBFLWR_exports);
33
+ module.exports = __toCommonJS(chunk_QVVSDACW_exports);
34
34
  var import_chunk_XYCIH36R = require("./chunk-XYCIH36R.js");
35
- var import_chunk_CKNTB45N = require("./chunk-CKNTB45N.js");
35
+ var import_chunk_QSAE23KV = require("./chunk-QSAE23KV.js");
36
36
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
37
37
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
38
38
  var import_path = __toESM(require("path"));
@@ -45,7 +45,7 @@ function getGeneratorSuccessMessage(generator, time) {
45
45
  function formatVersion(generator) {
46
46
  const version = generator.manifest?.version;
47
47
  if (generator.getProvider() === "prisma-client-js") {
48
- const engineType = (0, import_chunk_CKNTB45N.getClientEngineType)(generator.config);
48
+ const engineType = (0, import_chunk_QSAE23KV.getClientEngineType)(generator.config);
49
49
  let engineHint = "";
50
50
  if (generator.options?.noEngine) {
51
51
  engineHint = ", engine=none";
@@ -16,13 +16,13 @@ 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_FTS2IEWX_exports = {};
20
- __export(chunk_FTS2IEWX_exports, {
19
+ var chunk_S57RMXZW_exports = {};
20
+ __export(chunk_S57RMXZW_exports, {
21
21
  isYarnUsed: () => isYarnUsed
22
22
  });
23
- module.exports = __toCommonJS(chunk_FTS2IEWX_exports);
24
- var import_chunk_YDZVEVUG = require("./chunk-YDZVEVUG.js");
23
+ module.exports = __toCommonJS(chunk_S57RMXZW_exports);
24
+ var import_chunk_VRT7T6MF = require("./chunk-VRT7T6MF.js");
25
25
  async function isYarnUsed(baseDir) {
26
- const packageManager = await (0, import_chunk_YDZVEVUG.detect)({ cwd: baseDir, autoInstall: false, programmatic: true });
26
+ const packageManager = await (0, import_chunk_VRT7T6MF.detect)({ cwd: baseDir, autoInstall: false, programmatic: true });
27
27
  return packageManager === "yarn" || packageManager === "yarn@berry";
28
28
  }
@@ -26,22 +26,22 @@ 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_5UJZARUY_exports = {};
30
- __export(chunk_5UJZARUY_exports, {
29
+ var chunk_SX5UKRZS_exports = {};
30
+ __export(chunk_SX5UKRZS_exports, {
31
31
  GetConfigError: () => GetConfigError,
32
32
  getConfig: () => getConfig,
33
33
  getDirectUrl: () => getDirectUrl,
34
34
  getEffectiveUrl: () => getEffectiveUrl,
35
35
  resolveUrl: () => resolveUrl
36
36
  });
37
- module.exports = __toCommonJS(chunk_5UJZARUY_exports);
37
+ module.exports = __toCommonJS(chunk_SX5UKRZS_exports);
38
38
  var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
39
- var import_chunk_IAEMHQAC = require("./chunk-IAEMHQAC.js");
40
- var import_chunk_WMIBAVWZ = require("./chunk-WMIBAVWZ.js");
41
- var import_chunk_KNNIRRTO = require("./chunk-KNNIRRTO.js");
39
+ var import_chunk_CXEMRKV4 = require("./chunk-CXEMRKV4.js");
40
+ var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
41
+ var import_chunk_UKDMRXVN = require("./chunk-UKDMRXVN.js");
42
42
  var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
43
- var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
44
- var import_chunk_2WJPHJ2I = require("./chunk-2WJPHJ2I.js");
43
+ var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
44
+ var import_chunk_MAWSAR5P = require("./chunk-MAWSAR5P.js");
45
45
  var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
46
46
  var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
47
47
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
@@ -53,7 +53,7 @@ var debug = (0, import_debug.default)("prisma:getConfig");
53
53
  var SCHEMA_VALIDATION_ERROR_CODE = "P1012";
54
54
  var GetConfigError = class extends Error {
55
55
  constructor(params) {
56
- const constructedErrorMessage = (0, import_chunk_H3T4L34H.$)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
56
+ const constructedErrorMessage = (0, import_chunk_25RJ7YTB.z)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
57
57
  const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
58
58
  return `${reason}
59
59
  ${errorCodeMessage}
@@ -65,7 +65,7 @@ ${detailsHeader} ${message}`;
65
65
  }).exhaustive();
66
66
  const errorMessageWithContext = `${constructedErrorMessage}
67
67
  [Context: getConfig]`;
68
- super((0, import_chunk_KNNIRRTO.addVersionDetailsToErrorMessage)(errorMessageWithContext));
68
+ super((0, import_chunk_UKDMRXVN.addVersionDetailsToErrorMessage)(errorMessageWithContext));
69
69
  this.name = "GetConfigError";
70
70
  }
71
71
  };
@@ -83,14 +83,14 @@ function resolveUrl(envValue) {
83
83
  return urlFromValue ?? urlEnvVarValue;
84
84
  }
85
85
  async function getConfig(options) {
86
- const debugErrorType = (0, import_chunk_IAEMHQAC.createDebugErrorType)(debug, "getConfigWasm");
86
+ const debugErrorType = (0, import_chunk_CXEMRKV4.createDebugErrorType)(debug, "getConfigWasm");
87
87
  debug(`Using getConfig Wasm`);
88
88
  const configEither = (0, import_function.pipe)(
89
89
  (0, import_chunk_7MD6344A.tryCatch)(
90
90
  () => {
91
91
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
92
92
  debug("Triggering a Rust panic...");
93
- import_chunk_2WJPHJ2I.prismaSchemaWasm.debug_panic();
93
+ import_chunk_MAWSAR5P.prismaSchemaWasm.debug_panic();
94
94
  }
95
95
  const params = JSON.stringify({
96
96
  prismaSchema: options.datamodel,
@@ -98,7 +98,7 @@ async function getConfig(options) {
98
98
  ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
99
99
  env: process.env
100
100
  });
101
- const data = import_chunk_2WJPHJ2I.prismaSchemaWasm.get_config(params);
101
+ const data = import_chunk_MAWSAR5P.prismaSchemaWasm.get_config(params);
102
102
  return data;
103
103
  },
104
104
  (e) => ({
@@ -140,7 +140,7 @@ async function getConfig(options) {
140
140
  }
141
141
  return Promise.resolve(data);
142
142
  }
143
- const error = (0, import_chunk_H3T4L34H.$)(configEither.left).with({ type: "wasm-error" }, (e) => {
143
+ const error = (0, import_chunk_25RJ7YTB.z)(configEither.left).with({ type: "wasm-error" }, (e) => {
144
144
  debugErrorType(e);
145
145
  if ((0, import_chunk_A4QWQE3W.isWasmPanic)(e.error)) {
146
146
  const { message, stack } = (0, import_chunk_A4QWQE3W.getWasmError)(e.error);
@@ -160,12 +160,12 @@ async function getConfig(options) {
160
160
  return panic;
161
161
  }
162
162
  const errorOutput = e.error.message;
163
- return new GetConfigError((0, import_chunk_IAEMHQAC.parseQueryEngineError)({ errorOutput, reason: e.reason }));
163
+ return new GetConfigError((0, import_chunk_CXEMRKV4.parseQueryEngineError)({ errorOutput, reason: e.reason }));
164
164
  }).with({ type: "validation-error" }, (e) => {
165
165
  return new GetConfigError({
166
166
  _tag: "parsed",
167
167
  errorCode: SCHEMA_VALIDATION_ERROR_CODE,
168
- reason: (0, import_chunk_IAEMHQAC.createSchemaValidationError)(e.reason),
168
+ reason: (0, import_chunk_CXEMRKV4.createSchemaValidationError)(e.reason),
169
169
  message: formatErrors(e.error)
170
170
  });
171
171
  }).otherwise((e) => {
@@ -195,7 +195,7 @@ async function resolveBinaryTargets(generator) {
195
195
  }
196
196
  }
197
197
  function formatErrors(errors) {
198
- const formattedErrors = errors.map((e) => (0, import_chunk_WMIBAVWZ.relativizePathInPSLError)(e.message)).join("\n\n");
198
+ const formattedErrors = errors.map((e) => (0, import_chunk_C47SCASR.relativizePathInPSLError)(e.message)).join("\n\n");
199
199
  const errorCount = `Validation Error Count: ${errors.length}`;
200
200
  return `${formattedErrors}
201
201
  ${errorCount}`;
@@ -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_KNNIRRTO_exports = {};
20
- __export(chunk_KNNIRRTO_exports, {
19
+ var chunk_UKDMRXVN_exports = {};
20
+ __export(chunk_UKDMRXVN_exports, {
21
21
  addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
22
22
  });
23
- module.exports = __toCommonJS(chunk_KNNIRRTO_exports);
24
- var import_chunk_WYTN2XGW = require("./chunk-WYTN2XGW.js");
23
+ module.exports = __toCommonJS(chunk_UKDMRXVN_exports);
24
+ var import_chunk_XNUQWNLF = require("./chunk-XNUQWNLF.js");
25
25
  var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
26
26
  function addVersionDetailsToErrorMessage(message) {
27
- const rows = [["Prisma CLI Version", import_chunk_WYTN2XGW.version]];
27
+ const rows = [["Prisma CLI Version", import_chunk_XNUQWNLF.version]];
28
28
  return `${message}
29
29
 
30
30
  ${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
@@ -26,31 +26,31 @@ 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_OSOXVAZB_exports = {};
30
- __export(chunk_OSOXVAZB_exports, {
29
+ var chunk_UPIULDLZ_exports = {};
30
+ __export(chunk_UPIULDLZ_exports, {
31
31
  locateLocalCloudflareD1: () => locateLocalCloudflareD1
32
32
  });
33
- module.exports = __toCommonJS(chunk_OSOXVAZB_exports);
34
- var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
33
+ module.exports = __toCommonJS(chunk_UPIULDLZ_exports);
34
+ var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
35
35
  var import_chunk_KKMREGHN = require("./chunk-KKMREGHN.js");
36
36
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
37
- var import_path = __toESM(require("path"));
38
- var import_process = __toESM(require("process"));
37
+ var import_node_path = __toESM(require("node:path"));
38
+ var import_node_process = __toESM(require("node:process"));
39
39
  var import_fast_glob = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_KKMREGHN.require_out)());
40
40
  var import_globby = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_KKMREGHN.require_globby)());
41
- var defaultD1DirPath = import_path.default.join(".wrangler", "state", "v3", "d1", "miniflare-D1DatabaseObject");
41
+ var defaultD1DirPath = import_node_path.default.join(".wrangler", "state", "v3", "d1", "miniflare-D1DatabaseObject");
42
42
  async function locateLocalCloudflareD1({ arg }) {
43
- const cwd = import_process.default.cwd();
44
- const d1DirPath = import_path.default.posix.join(cwd, defaultD1DirPath);
43
+ const cwd = import_node_process.default.cwd();
44
+ const d1DirPath = import_node_path.default.posix.join(cwd, defaultD1DirPath);
45
45
  const pathConverted = (0, import_fast_glob.convertPathToPattern)(d1DirPath);
46
- const d1Databases = await (0, import_globby.default)(import_path.default.posix.join(pathConverted, "*.sqlite"), {});
46
+ const d1Databases = await (0, import_globby.default)(import_node_path.default.posix.join(pathConverted, "*.sqlite"), {});
47
47
  if (d1Databases.length === 0) {
48
48
  throw new Error(
49
49
  `No Cloudflare D1 databases found in ${defaultD1DirPath}. Did you run \`wrangler d1 create <DATABASE_NAME>\` and \`wrangler dev\`?`
50
50
  );
51
51
  }
52
52
  if (d1Databases.length > 1) {
53
- const { originalArg, recommendedArg } = (0, import_chunk_H3T4L34H.$)(arg).with("--to-local-d1", (originalArg2) => ({
53
+ const { originalArg, recommendedArg } = (0, import_chunk_25RJ7YTB.z)(arg).with("--to-local-d1", (originalArg2) => ({
54
54
  originalArg: originalArg2,
55
55
  recommendedArg: "--to-url file:"
56
56
  })).with("--from-local-d1", (originalArg2) => ({
@@ -16,16 +16,16 @@ 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_WCRKL55L_exports = {};
20
- __export(chunk_WCRKL55L_exports, {
19
+ var chunk_V2ZF7ETH_exports = {};
20
+ __export(chunk_V2ZF7ETH_exports, {
21
21
  FormData: () => FormData,
22
22
  fetch_blob_default: () => fetch_blob_default,
23
23
  file_default: () => file_default,
24
24
  formDataToBlob: () => formDataToBlob
25
25
  });
26
- module.exports = __toCommonJS(chunk_WCRKL55L_exports);
26
+ module.exports = __toCommonJS(chunk_V2ZF7ETH_exports);
27
27
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
28
- var import_fs = require("fs");
28
+ var import_node_fs = require("node:fs");
29
29
  var require_ponyfill_es2018 = (0, import_chunk_WWAWV7DQ.__commonJS)({
30
30
  "../../node_modules/.pnpm/web-streams-polyfill@3.2.1/node_modules/web-streams-polyfill/dist/ponyfill.es2018.js"(exports, module2) {
31
31
  "use strict";
@@ -3841,12 +3841,12 @@ var require_streams = (0, import_chunk_WWAWV7DQ.__commonJS)({
3841
3841
  var POOL_SIZE2 = 65536;
3842
3842
  if (!globalThis.ReadableStream) {
3843
3843
  try {
3844
- const process = (0, import_chunk_WWAWV7DQ.__require)("process");
3844
+ const process = (0, import_chunk_WWAWV7DQ.__require)("node:process");
3845
3845
  const { emitWarning } = process;
3846
3846
  try {
3847
3847
  process.emitWarning = () => {
3848
3848
  };
3849
- Object.assign(globalThis, (0, import_chunk_WWAWV7DQ.__require)("stream/web"));
3849
+ Object.assign(globalThis, (0, import_chunk_WWAWV7DQ.__require)("node:stream/web"));
3850
3850
  process.emitWarning = emitWarning;
3851
3851
  } catch (error) {
3852
3852
  process.emitWarning = emitWarning;
@@ -4218,7 +4218,7 @@ Content-Type: ${v.type || "application/octet-stream"}\r
4218
4218
  return new B(c, { type: "multipart/form-data; boundary=" + b });
4219
4219
  }
4220
4220
  var import_node_domexception = (0, import_chunk_WWAWV7DQ.__toESM)(require_node_domexception(), 1);
4221
- var { stat } = import_fs.promises;
4221
+ var { stat } = import_node_fs.promises;
4222
4222
  /*! Bundled license information:
4223
4223
 
4224
4224
  node-domexception/index.js:
@@ -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_VFU3I6P6_exports = {};
30
- __export(chunk_VFU3I6P6_exports, {
29
+ var chunk_VETKNW6E_exports = {};
30
+ __export(chunk_VETKNW6E_exports, {
31
31
  ValidateError: () => ValidateError,
32
32
  validate: () => validate
33
33
  });
34
- module.exports = __toCommonJS(chunk_VFU3I6P6_exports);
34
+ module.exports = __toCommonJS(chunk_VETKNW6E_exports);
35
35
  var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
36
- var import_chunk_IAEMHQAC = require("./chunk-IAEMHQAC.js");
37
- var import_chunk_WMIBAVWZ = require("./chunk-WMIBAVWZ.js");
38
- var import_chunk_KNNIRRTO = require("./chunk-KNNIRRTO.js");
36
+ var import_chunk_CXEMRKV4 = require("./chunk-CXEMRKV4.js");
37
+ var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
38
+ var import_chunk_NQWNTJWW = require("./chunk-NQWNTJWW.js");
39
39
  var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
40
- var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
41
- var import_chunk_2WJPHJ2I = require("./chunk-2WJPHJ2I.js");
40
+ var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
41
+ var import_chunk_QGXDUBHL = require("./chunk-QGXDUBHL.js");
42
42
  var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
43
43
  var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
44
44
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
@@ -48,11 +48,11 @@ var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVW
48
48
  var debug = (0, import_debug.default)("prisma:validate");
49
49
  var ValidateError = class extends Error {
50
50
  constructor(params) {
51
- const constructedErrorMessage = (0, import_chunk_H3T4L34H.$)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
51
+ const constructedErrorMessage = (0, import_chunk_25RJ7YTB.z)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
52
52
  const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
53
53
  return `${reason}
54
54
  ${errorCodeMessage}
55
- ${(0, import_chunk_WMIBAVWZ.relativizePathInPSLError)(message)}`;
55
+ ${(0, import_chunk_C47SCASR.relativizePathInPSLError)(message)}`;
56
56
  }).with({ _tag: "unparsed" }, ({ message, reason }) => {
57
57
  const detailsHeader = (0, import_chunk_PG5FDKSF.red)((0, import_chunk_PG5FDKSF.bold)("Details:"));
58
58
  return `${reason}
@@ -60,25 +60,25 @@ ${detailsHeader} ${message}`;
60
60
  }).exhaustive();
61
61
  const errorMessageWithContext = `${constructedErrorMessage}
62
62
  [Context: validate]`;
63
- super((0, import_chunk_KNNIRRTO.addVersionDetailsToErrorMessage)(errorMessageWithContext));
63
+ super((0, import_chunk_NQWNTJWW.addVersionDetailsToErrorMessage)(errorMessageWithContext));
64
64
  this.name = "ValidateError";
65
65
  }
66
66
  };
67
67
  function validate(options) {
68
- const debugErrorType = (0, import_chunk_IAEMHQAC.createDebugErrorType)(debug, "validateWasm");
68
+ const debugErrorType = (0, import_chunk_CXEMRKV4.createDebugErrorType)(debug, "validateWasm");
69
69
  debug(`Using validate Wasm`);
70
70
  const validateEither = (0, import_function.pipe)(
71
71
  (0, import_chunk_7MD6344A.tryCatch)(
72
72
  () => {
73
73
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
74
74
  debug("Triggering a Rust panic...");
75
- import_chunk_2WJPHJ2I.prismaSchemaWasm.debug_panic();
75
+ import_chunk_QGXDUBHL.prismaSchemaWasm.debug_panic();
76
76
  }
77
77
  const params = JSON.stringify({
78
78
  prismaSchema: options.schemas,
79
79
  noColor: Boolean(process.env.NO_COLOR)
80
80
  });
81
- import_chunk_2WJPHJ2I.prismaSchemaWasm.validate(params);
81
+ import_chunk_QGXDUBHL.prismaSchemaWasm.validate(params);
82
82
  },
83
83
  (e) => ({
84
84
  type: "wasm-error",
@@ -90,7 +90,7 @@ function validate(options) {
90
90
  if ((0, import_chunk_7MD6344A.isRight)(validateEither)) {
91
91
  return;
92
92
  }
93
- const error = (0, import_chunk_H3T4L34H.$)(validateEither.left).with({ type: "wasm-error" }, (e) => {
93
+ const error = (0, import_chunk_25RJ7YTB.z)(validateEither.left).with({ type: "wasm-error" }, (e) => {
94
94
  debugErrorType(e);
95
95
  console.error("");
96
96
  if ((0, import_chunk_A4QWQE3W.isWasmPanic)(e.error)) {
@@ -113,7 +113,7 @@ function validate(options) {
113
113
  return panic;
114
114
  }
115
115
  const errorOutput = e.error.message;
116
- return new ValidateError((0, import_chunk_IAEMHQAC.parseQueryEngineError)({ errorOutput, reason: e.reason }));
116
+ return new ValidateError((0, import_chunk_CXEMRKV4.parseQueryEngineError)({ errorOutput, reason: e.reason }));
117
117
  }).exhaustive();
118
118
  throw error;
119
119
  }