@prisma/internals 5.22.0-integration-remove-custom-yarn-logic.2 → 5.22.0-integration-engines-5-22-0-19-integration-itx-refactor-1d05dc605389ce8c7dbc7846427123cc5178008b.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 (58) hide show
  1. package/dist/{chunk-QPQSC3JJ.js → chunk-3G6ZFRML.js} +5 -5
  2. package/dist/chunk-3U2ANLD3.js +28 -0
  3. package/dist/{chunk-XW5NCCKJ.js → chunk-4HYINNXC.js} +7 -7
  4. package/dist/{chunk-5MCWLJSR.js → chunk-5I4BOTBV.js} +9 -3
  5. package/dist/{chunk-VP52BYP6.js → chunk-6334KJTZ.js} +8 -8
  6. package/dist/{chunk-SEMJP57T.js → chunk-ASLJ5JD6.js} +4 -4
  7. package/dist/{chunk-NRNTTYTK.js → chunk-BM2T4GMO.js} +5 -5
  8. package/dist/{chunk-ZRWA3QK6.js → chunk-DYDH3Q4F.js} +7 -7
  9. package/dist/chunk-FTS2IEWX.js +28 -0
  10. package/dist/{chunk-AMQR2T2M.js → chunk-IABMG3F4.js} +5 -5
  11. package/dist/{chunk-NHBX7FRB.js → chunk-ICO3MDYC.js} +8 -8
  12. package/dist/{chunk-YVCVAF6S.js → chunk-JPWZWDED.js} +5 -5
  13. package/dist/{chunk-RYTU24TW.js → chunk-K6QO7ABI.js} +5 -5
  14. package/dist/{chunk-Z25SRLZ4.js → chunk-OHUUJC7Y.js} +8 -8
  15. package/dist/{chunk-2F4TQFCO.js → chunk-PJX5SMYO.js} +5 -5
  16. package/dist/{chunk-IB5VBGBL.js → chunk-QZ5DECMQ.js} +160 -27
  17. package/dist/{chunk-FAEW2D5M.js → chunk-SLJGNKAI.js} +8 -8
  18. package/dist/{chunk-2G6A4TX2.js → chunk-SRSWUO75.js} +8 -8
  19. package/dist/{chunk-XYQLNYQW.js → chunk-UUH3SXFA.js} +8 -8
  20. package/dist/{chunk-FJNI7EDH.js → chunk-V7RH2OQS.js} +5 -5
  21. package/dist/{chunk-UK22OTEL.js → chunk-WKGRQ3XF.js} +5 -5
  22. package/dist/{chunk-YXTHML5A.js → chunk-WX6LOYMF.js} +160 -27
  23. package/dist/{chunk-WXYCPRNY.js → chunk-YDZVEVUG.js} +5 -8
  24. package/dist/{chunk-7RF5FHKY.js → chunk-Z2KQONXX.js} +5 -5
  25. package/dist/{chunk-ELU63HJB.js → chunk-Z2Z6MBQO.js} +5 -5
  26. package/dist/{chunk-ZKAW5JSN.js → chunk-ZA3RMW2P.js} +8 -5
  27. package/dist/cli/checkUnsupportedDataProxy.js +18 -16
  28. package/dist/cli/getSchema.js +23 -21
  29. package/dist/cli/hashes.js +18 -16
  30. package/dist/engine-commands/errorHelpers.js +4 -4
  31. package/dist/engine-commands/formatSchema.js +17 -15
  32. package/dist/engine-commands/getConfig.js +10 -10
  33. package/dist/engine-commands/getDmmf.js +7 -7
  34. package/dist/engine-commands/index.js +26 -24
  35. package/dist/engine-commands/lintSchema.js +8 -8
  36. package/dist/engine-commands/mergeSchemas.js +7 -7
  37. package/dist/engine-commands/validate.js +7 -7
  38. package/dist/get-generators/generatorResolvers/generatorResolvers.js +17 -15
  39. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +3 -2
  40. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +4 -3
  41. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +17 -15
  42. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.d.ts +9 -0
  43. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.js +132 -0
  44. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.d.ts +1 -0
  45. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +26 -0
  46. package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +18 -16
  47. package/dist/get-generators/getGenerators.js +20 -18
  48. package/dist/index.js +48 -46
  49. package/dist/sendPanic.js +17 -15
  50. package/dist/utils/getCommandWithExecutor.js +3 -3
  51. package/dist/utils/getEnvPaths.js +17 -15
  52. package/dist/utils/getVersionFromPackageJson.js +3 -3
  53. package/dist/utils/handlePanic.js +17 -15
  54. package/dist/utils/isCurrentBinInstalledGlobally.d.ts +1 -1
  55. package/dist/utils/isCurrentBinInstalledGlobally.js +2 -2
  56. package/dist/utils/loadEnvFile.js +17 -15
  57. package/dist/wasm.js +4 -4
  58. package/package.json +8 -8
@@ -26,10 +26,11 @@ 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_IB5VBGBL_exports = {};
30
- __export2(chunk_IB5VBGBL_exports, {
29
+ var chunk_QZ5DECMQ_exports = {};
30
+ __export2(chunk_QZ5DECMQ_exports, {
31
31
  checkTypeScriptVersion: () => checkTypeScriptVersion,
32
32
  checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
33
+ checkYarnVersion: () => checkYarnVersion,
33
34
  debug: () => debug5,
34
35
  forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
35
36
  formatSchema: () => formatSchema,
@@ -55,9 +56,10 @@ __export2(chunk_IB5VBGBL_exports, {
55
56
  sendPanic: () => sendPanic,
56
57
  skipIndex: () => skipIndex
57
58
  });
58
- module.exports = __toCommonJS2(chunk_IB5VBGBL_exports);
59
- var import_chunk_AMQR2T2M = require("./chunk-AMQR2T2M.js");
60
- var import_chunk_WXYCPRNY = require("./chunk-WXYCPRNY.js");
59
+ module.exports = __toCommonJS2(chunk_QZ5DECMQ_exports);
60
+ var import_chunk_IABMG3F4 = require("./chunk-IABMG3F4.js");
61
+ var import_chunk_3U2ANLD3 = require("./chunk-3U2ANLD3.js");
62
+ var import_chunk_FTS2IEWX = require("./chunk-FTS2IEWX.js");
61
63
  var import_chunk_EUTJYQDW = require("./chunk-EUTJYQDW.js");
62
64
  var import_chunk_IPKE37QC = require("./chunk-IPKE37QC.js");
63
65
  var import_chunk_KEBDP2C3 = require("./chunk-KEBDP2C3.js");
@@ -79,16 +81,17 @@ var import_chunk_XLYQ6PQW = require("./chunk-XLYQ6PQW.js");
79
81
  var import_chunk_EPJYKNCQ = require("./chunk-EPJYKNCQ.js");
80
82
  var import_chunk_ODI3VNBD = require("./chunk-ODI3VNBD.js");
81
83
  var import_chunk_TSJICM5S = require("./chunk-TSJICM5S.js");
82
- var import_chunk_NRNTTYTK = require("./chunk-NRNTTYTK.js");
83
- var import_chunk_ZRWA3QK6 = require("./chunk-ZRWA3QK6.js");
84
- var import_chunk_XYQLNYQW = require("./chunk-XYQLNYQW.js");
85
- var import_chunk_NHBX7FRB = require("./chunk-NHBX7FRB.js");
84
+ var import_chunk_BM2T4GMO = require("./chunk-BM2T4GMO.js");
85
+ var import_chunk_DYDH3Q4F = require("./chunk-DYDH3Q4F.js");
86
+ var import_chunk_6334KJTZ = require("./chunk-6334KJTZ.js");
87
+ var import_chunk_ICO3MDYC = require("./chunk-ICO3MDYC.js");
86
88
  var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
87
89
  var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
88
- var import_chunk_FJNI7EDH = require("./chunk-FJNI7EDH.js");
90
+ var import_chunk_V7RH2OQS = require("./chunk-V7RH2OQS.js");
89
91
  var import_chunk_MUPZUVSI = require("./chunk-MUPZUVSI.js");
90
92
  var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
91
93
  var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
94
+ var import_chunk_7XNZDY2V = require("./chunk-7XNZDY2V.js");
92
95
  var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
93
96
  var import_chunk_635TMBAP = require("./chunk-635TMBAP.js");
94
97
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
@@ -15475,6 +15478,7 @@ var require_tmp = (0, import_chunk_WWAWV7DQ.__commonJS)({
15475
15478
  }
15476
15479
  });
15477
15480
  var import_find_up = (0, import_chunk_WWAWV7DQ.__toESM)(require_find_up());
15481
+ var import_execa = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_7XNZDY2V.require_execa)());
15478
15482
  var readFile = (0, import_util.promisify)(import_fs3.default.readFile);
15479
15483
  var stat = (0, import_util.promisify)(import_fs3.default.stat);
15480
15484
  var debug2 = (0, import_debug3.Debug)("prisma:getSchema");
@@ -15513,7 +15517,7 @@ async function readSchemaFromDirectory(schemaPath2) {
15513
15517
  }
15514
15518
  const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
15515
15519
  debug2("Loading config");
15516
- const config2 = await (0, import_chunk_XYQLNYQW.getConfig)({
15520
+ const config2 = await (0, import_chunk_6334KJTZ.getConfig)({
15517
15521
  datamodel: files,
15518
15522
  ignoreEnvVarErrors: true
15519
15523
  });
@@ -15580,9 +15584,14 @@ async function getSchemaWithPathInternal(schemaPathFromArgs, { cwd, argumentName
15580
15584
  if (defaultResult.ok) {
15581
15585
  return defaultResult;
15582
15586
  }
15587
+ const yarnResult = await getSchemaFromYarn1Workspace(cwd, defaultResult.error.failures);
15588
+ if (yarnResult.ok) {
15589
+ return yarnResult;
15590
+ }
15591
+ const finalError = yarnResult.error.kind === "Yarn1WorkspaceSchemaNotFound" ? defaultResult.error : yarnResult.error;
15583
15592
  return {
15584
15593
  ok: false,
15585
- error: defaultResult.error
15594
+ error: finalError
15586
15595
  };
15587
15596
  }
15588
15597
  function renderLookupError(error) {
@@ -15657,6 +15666,47 @@ async function getSchemaFromPackageJson(cwd) {
15657
15666
  }
15658
15667
  return lookupResult;
15659
15668
  }
15669
+ async function getSchemaFromYarn1Workspace(cwd, pastFailures) {
15670
+ if (!process.env.npm_config_user_agent?.includes("yarn")) {
15671
+ return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
15672
+ }
15673
+ let workspaces;
15674
+ try {
15675
+ const { stdout: version3 } = await import_execa.default.command("yarn --version", {
15676
+ cwd
15677
+ });
15678
+ if (version3.startsWith("2")) {
15679
+ return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
15680
+ }
15681
+ const { stdout } = await import_execa.default.command("yarn workspaces info --json", {
15682
+ cwd
15683
+ });
15684
+ const json = getJson(stdout);
15685
+ workspaces = Object.values(json);
15686
+ } catch {
15687
+ return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
15688
+ }
15689
+ const workspaceRootDir = await findWorkspaceRoot(cwd);
15690
+ if (!workspaceRootDir) {
15691
+ return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
15692
+ }
15693
+ for (const workspace of workspaces) {
15694
+ const workspacePath = import_path2.default.join(workspaceRootDir, workspace.location);
15695
+ const workspaceSchema = await tryWorkspacePath(workspacePath, pastFailures);
15696
+ if (workspaceSchema.ok) {
15697
+ return workspaceSchema;
15698
+ }
15699
+ }
15700
+ const rootPathSchema = await tryWorkspacePath(workspaceRootDir, pastFailures);
15701
+ return rootPathSchema;
15702
+ }
15703
+ async function tryWorkspacePath(cwd, pastFailures) {
15704
+ const pkgJson = await getSchemaFromPackageJson(cwd);
15705
+ if (pkgJson.ok) {
15706
+ return pkgJson;
15707
+ }
15708
+ return getDefaultSchema(cwd, pastFailures);
15709
+ }
15660
15710
  async function getDefaultSchema(cwd, failures = []) {
15661
15711
  const schemaPrisma = {
15662
15712
  schemaPath: {
@@ -15735,6 +15785,44 @@ async function getSchema(schemaPathFromArgs) {
15735
15785
  const schemaPathResult = await getSchemaWithPath(schemaPathFromArgs);
15736
15786
  return schemaPathResult.schemas;
15737
15787
  }
15788
+ function getJson(stdout) {
15789
+ const firstCurly = stdout.indexOf("{");
15790
+ const lastCurly = stdout.lastIndexOf("}");
15791
+ const sliced = stdout.slice(firstCurly, lastCurly + 1);
15792
+ return JSON.parse(sliced);
15793
+ }
15794
+ function isPkgJsonWorkspaceRoot(pkgJson) {
15795
+ const workspaces = pkgJson.workspaces;
15796
+ if (!workspaces) {
15797
+ return false;
15798
+ }
15799
+ return Array.isArray(workspaces) || workspaces.packages !== void 0;
15800
+ }
15801
+ async function isNearestPkgJsonWorkspaceRoot(cwd) {
15802
+ const pkgJson = await (0, import_chunk_J3JE5NVO.readPackageUp)({ cwd, normalize: false });
15803
+ if (!pkgJson) {
15804
+ return null;
15805
+ }
15806
+ return {
15807
+ isRoot: isPkgJsonWorkspaceRoot(pkgJson.packageJson),
15808
+ path: pkgJson.path
15809
+ };
15810
+ }
15811
+ async function findWorkspaceRoot(cwd) {
15812
+ let pkgJson = await isNearestPkgJsonWorkspaceRoot(cwd);
15813
+ if (!pkgJson) {
15814
+ return null;
15815
+ }
15816
+ if (pkgJson.isRoot === true) {
15817
+ return import_path2.default.dirname(pkgJson.path);
15818
+ }
15819
+ const pkgJsonParentDir = import_path2.default.dirname(import_path2.default.dirname(pkgJson.path));
15820
+ pkgJson = await isNearestPkgJsonWorkspaceRoot(pkgJsonParentDir);
15821
+ if (!pkgJson || pkgJson.isRoot === false) {
15822
+ return null;
15823
+ }
15824
+ return import_path2.default.dirname(pkgJson.path);
15825
+ }
15738
15826
  var debug3 = (0, import_debug2.default)("prisma:loadEnv");
15739
15827
  async function getEnvPaths(schemaPath2, opts = { cwd: process.cwd() }) {
15740
15828
  const rootEnvPath = getProjectRootEnvPath({ cwd: opts.cwd }) ?? null;
@@ -15821,8 +15909,8 @@ async function checkUnsupportedDataProxyMessage(command, args, implicitSchema) {
15821
15909
  if (argName.includes("schema")) {
15822
15910
  await loadEnvFile({ schemaPath: argValue, printMessage: false });
15823
15911
  const datamodel = await import_fs.default.promises.readFile(argValue, "utf-8");
15824
- const config2 = await (0, import_chunk_XYQLNYQW.getConfig)({ datamodel, ignoreEnvVarErrors: true });
15825
- const url = (0, import_chunk_XYQLNYQW.resolveUrl)((0, import_chunk_XYQLNYQW.getEffectiveUrl)(config2.datasources[0]));
15912
+ const config2 = await (0, import_chunk_6334KJTZ.getConfig)({ datamodel, ignoreEnvVarErrors: true });
15913
+ const url = (0, import_chunk_6334KJTZ.resolveUrl)((0, import_chunk_6334KJTZ.getEffectiveUrl)(config2.datasources[0]));
15826
15914
  if (url?.startsWith("prisma://")) {
15827
15915
  return forbiddenCmdWithDataProxyFlagMessage(command);
15828
15916
  }
@@ -15869,10 +15957,42 @@ async function checkTypeScriptVersion() {
15869
15957
  } catch (e) {
15870
15958
  }
15871
15959
  }
15960
+ function checkYarnVersion() {
15961
+ if (process.env.npm_config_user_agent) {
15962
+ const match = parseUserAgentString(process.env.npm_config_user_agent);
15963
+ if (match) {
15964
+ const { agent, major, minor, patch } = match;
15965
+ if (agent === "yarn" && major === 1) {
15966
+ const currentYarnVersion = `${major}.${minor}.${patch}`;
15967
+ const minYarnVersion = "1.19.2";
15968
+ if ((0, import_chunk_EUTJYQDW.semverLt)(currentYarnVersion, minYarnVersion)) {
15969
+ import_chunk_AZNLB67U.logger_exports.warn(
15970
+ `Your ${(0, import_chunk_PG5FDKSF.bold)("yarn")} has version ${currentYarnVersion}, which is outdated. Please update it to ${(0, import_chunk_PG5FDKSF.bold)(
15971
+ minYarnVersion
15972
+ )} or ${(0, import_chunk_PG5FDKSF.bold)("newer")} in order to use Prisma.`
15973
+ );
15974
+ }
15975
+ }
15976
+ }
15977
+ }
15978
+ }
15979
+ function parseUserAgentString(str) {
15980
+ const userAgentRegex = /(\w+)\/(\d+)\.(\d+)\.(\d+)/;
15981
+ const match = userAgentRegex.exec(str);
15982
+ if (match) {
15983
+ const agent = match[1];
15984
+ const major = parseInt(match[2]);
15985
+ const minor = parseInt(match[3]);
15986
+ const patch = parseInt(match[4]);
15987
+ return { agent, major, minor, patch };
15988
+ }
15989
+ return null;
15990
+ }
15872
15991
  var debug5 = (0, import_debug5.default)("prisma:generator");
15873
15992
  async function prismaClientResolver(baseDir, version3) {
15874
15993
  let prismaClientDir = await (0, import_chunk_KEBDP2C3.findPrismaClientDir)(baseDir);
15875
15994
  debug5("baseDir", baseDir);
15995
+ checkYarnVersion();
15876
15996
  await checkTypeScriptVersion();
15877
15997
  if (!prismaClientDir && !process.env.PRISMA_GENERATE_SKIP_AUTOINSTALL) {
15878
15998
  let projectRoot = (0, import_chunk_J77ZIDXB.longestCommonPathPrefix)(baseDir, process.cwd());
@@ -15898,17 +16018,30 @@ async function prismaClientResolver(baseDir, version3) {
15898
16018
  );
15899
16019
  }
15900
16020
  const prismaCliDir = await (0, import_chunk_FUUQ6FJ4.resolvePkg)("prisma", { basedir: baseDir });
16021
+ if (process.platform === "win32" && await (0, import_chunk_FTS2IEWX.isYarnUsed)(baseDir)) {
16022
+ const hasCli = (s2) => prismaCliDir !== void 0 ? s2 : "";
16023
+ const missingCli = (s2) => prismaCliDir === void 0 ? s2 : "";
16024
+ throw new Error(
16025
+ `Could not resolve ${missingCli(`${(0, import_chunk_PG5FDKSF.bold)("prisma")} and `)}${(0, import_chunk_PG5FDKSF.bold)(
16026
+ "@prisma/client"
16027
+ )} in the current project. Please install ${hasCli("it")}${missingCli("them")} with ${missingCli(
16028
+ `${(0, import_chunk_PG5FDKSF.bold)((0, import_chunk_PG5FDKSF.green)(`${await (0, import_chunk_3U2ANLD3.getPackageCmd)(baseDir, "add", "prisma", "-D")}`))} and `
16029
+ )}${(0, import_chunk_PG5FDKSF.bold)((0, import_chunk_PG5FDKSF.green)(`${await (0, import_chunk_3U2ANLD3.getPackageCmd)(baseDir, "add", "@prisma/client")}`))}, and rerun ${(0, import_chunk_PG5FDKSF.bold)(
16030
+ await (0, import_chunk_3U2ANLD3.getPackageCmd)(baseDir, "execute", "prisma generate")
16031
+ )} \u{1F64F}.`
16032
+ );
16033
+ }
15901
16034
  if (!prismaCliDir) {
15902
- await (0, import_chunk_AMQR2T2M.runPackageCmd)(projectRoot, "add", `prisma@${version3 ?? "latest"}`, "-D", "--silent");
16035
+ await (0, import_chunk_IABMG3F4.runPackageCmd)(projectRoot, "add", `prisma@${version3 ?? "latest"}`, "-D", "--silent");
15903
16036
  }
15904
- await (0, import_chunk_AMQR2T2M.runPackageCmd)(projectRoot, "add", `@prisma/client@${version3 ?? "latest"}`, "--silent");
16037
+ await (0, import_chunk_IABMG3F4.runPackageCmd)(projectRoot, "add", `@prisma/client@${version3 ?? "latest"}`, "--silent");
15905
16038
  prismaClientDir = await (0, import_chunk_KEBDP2C3.findPrismaClientDir)(import_path4.default.join(".", baseDir));
15906
16039
  if (!prismaClientDir) {
15907
16040
  throw new Error(
15908
16041
  `Could not resolve @prisma/client despite the installation that we just tried.
15909
16042
  Please try to install it by hand with ${(0, import_chunk_PG5FDKSF.bold)(
15910
- (0, import_chunk_PG5FDKSF.green)(`${await (0, import_chunk_WXYCPRNY.getPackageCmd)(baseDir, "add", "@prisma/client")}`)
15911
- )} and rerun ${(0, import_chunk_PG5FDKSF.bold)(await (0, import_chunk_WXYCPRNY.getPackageCmd)(baseDir, "execute", "prisma generate"))} \u{1F64F}.`
16043
+ (0, import_chunk_PG5FDKSF.green)(`${await (0, import_chunk_3U2ANLD3.getPackageCmd)(baseDir, "add", "@prisma/client")}`)
16044
+ )} and rerun ${(0, import_chunk_PG5FDKSF.bold)(await (0, import_chunk_3U2ANLD3.getPackageCmd)(baseDir, "execute", "prisma generate"))} \u{1F64F}.`
15912
16045
  );
15913
16046
  }
15914
16047
  console.info(
@@ -15920,7 +16053,7 @@ Please try to install it by hand with ${(0, import_chunk_PG5FDKSF.bold)(
15920
16053
  throw new Error(
15921
16054
  `Could not resolve @prisma/client.
15922
16055
  Please try to install it with ${(0, import_chunk_PG5FDKSF.bold)((0, import_chunk_PG5FDKSF.green)("npm install @prisma/client"))} and rerun ${(0, import_chunk_PG5FDKSF.bold)(
15923
- await (0, import_chunk_WXYCPRNY.getPackageCmd)(baseDir, "execute", "prisma generate")
16056
+ await (0, import_chunk_3U2ANLD3.getPackageCmd)(baseDir, "execute", "prisma generate")
15924
16057
  )} \u{1F64F}.`
15925
16058
  );
15926
16059
  }
@@ -15981,7 +16114,7 @@ async function getGenerators(options) {
15981
16114
  prismaPath = binaryPathsWithEngineType[queryEngineBinaryType][binaryTarget];
15982
16115
  }
15983
16116
  }
15984
- const config = await (0, import_chunk_XYQLNYQW.getConfig)({
16117
+ const config = await (0, import_chunk_6334KJTZ.getConfig)({
15985
16118
  datamodel: schemas,
15986
16119
  datamodelPath: schemaPath,
15987
16120
  prismaPath,
@@ -15992,7 +16125,7 @@ async function getGenerators(options) {
15992
16125
  }
15993
16126
  (0, import_chunk_5FJ3MENK.printConfigWarnings)(config.warnings);
15994
16127
  const previewFeatures = (0, import_chunk_TSJICM5S.extractPreviewFeatures)(config);
15995
- const dmmf = await (0, import_chunk_NHBX7FRB.getDMMF)({
16128
+ const dmmf = await (0, import_chunk_ICO3MDYC.getDMMF)({
15996
16129
  datamodel: schemas,
15997
16130
  datamodelPath: schemaPath,
15998
16131
  prismaPath,
@@ -16053,7 +16186,7 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
16053
16186
  fromEnvVar: "null"
16054
16187
  };
16055
16188
  }
16056
- const datamodel = (0, import_chunk_ZRWA3QK6.mergeSchemas)({ schemas });
16189
+ const datamodel = (0, import_chunk_DYDH3Q4F.mergeSchemas)({ schemas });
16057
16190
  const envPaths2 = await getEnvPaths(schemaPath, { cwd: generator.output.value });
16058
16191
  const options2 = {
16059
16192
  datamodel,
@@ -16136,7 +16269,7 @@ generator gen {
16136
16269
  debug6({ generatorBinaryPaths });
16137
16270
  generator.setBinaryPaths(generatorBinaryPaths);
16138
16271
  if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
16139
- const customDmmf = await (0, import_chunk_NHBX7FRB.getDMMF)({
16272
+ const customDmmf = await (0, import_chunk_ICO3MDYC.getDMMF)({
16140
16273
  datamodel: schemas,
16141
16274
  datamodelPath: schemaPath,
16142
16275
  prismaPath: generatorBinaryPaths[queryEngineType]?.[binaryTarget],
@@ -16434,7 +16567,7 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
16434
16567
  if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
16435
16568
  handleFormatPanic(
16436
16569
  () => {
16437
- import_chunk_FJNI7EDH.prismaSchemaWasm.debug_panic();
16570
+ import_chunk_V7RH2OQS.prismaSchemaWasm.debug_panic();
16438
16571
  },
16439
16572
  { schemas: schemas2 }
16440
16573
  );
@@ -16454,12 +16587,12 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
16454
16587
  () => {
16455
16588
  const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas2), documentFormattingParams);
16456
16589
  const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
16457
- const lintDiagnostics2 = (0, import_chunk_NRNTTYTK.lintSchema)({ schemas: formattedMultipleSchemas2 });
16590
+ const lintDiagnostics2 = (0, import_chunk_BM2T4GMO.lintSchema)({ schemas: formattedMultipleSchemas2 });
16458
16591
  return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
16459
16592
  },
16460
16593
  { schemas: schemas2 }
16461
16594
  );
16462
- const lintWarnings = (0, import_chunk_NRNTTYTK.getLintWarningsAsText)(lintDiagnostics);
16595
+ const lintWarnings = (0, import_chunk_BM2T4GMO.getLintWarningsAsText)(lintDiagnostics);
16463
16596
  if (lintWarnings && import_chunk_AZNLB67U.logger_exports.should.warn()) {
16464
16597
  console.warn(lintWarnings);
16465
16598
  }
@@ -16489,7 +16622,7 @@ function handleFormatPanic(tryCb, { schemas: schemas2 }) {
16489
16622
  }
16490
16623
  }
16491
16624
  function formatWasm(schema, documentFormattingParams) {
16492
- const formattedSchema = import_chunk_FJNI7EDH.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
16625
+ const formattedSchema = import_chunk_V7RH2OQS.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
16493
16626
  return formattedSchema;
16494
16627
  }
16495
16628
  /*! Bundled license information:
@@ -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_FAEW2D5M_exports = {};
30
- __export(chunk_FAEW2D5M_exports, {
29
+ var chunk_SLJGNKAI_exports = {};
30
+ __export(chunk_SLJGNKAI_exports, {
31
31
  ValidateError: () => ValidateError,
32
32
  validate: () => validate
33
33
  });
34
- module.exports = __toCommonJS(chunk_FAEW2D5M_exports);
34
+ module.exports = __toCommonJS(chunk_SLJGNKAI_exports);
35
35
  var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
36
36
  var import_chunk_IAEMHQAC = require("./chunk-IAEMHQAC.js");
37
37
  var import_chunk_WMIBAVWZ = require("./chunk-WMIBAVWZ.js");
38
- var import_chunk_UK22OTEL = require("./chunk-UK22OTEL.js");
38
+ var import_chunk_K6QO7ABI = require("./chunk-K6QO7ABI.js");
39
39
  var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
40
40
  var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
41
- var import_chunk_QPQSC3JJ = require("./chunk-QPQSC3JJ.js");
41
+ var import_chunk_3G6ZFRML = require("./chunk-3G6ZFRML.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");
@@ -60,7 +60,7 @@ ${detailsHeader} ${message}`;
60
60
  }).exhaustive();
61
61
  const errorMessageWithContext = `${constructedErrorMessage}
62
62
  [Context: validate]`;
63
- super((0, import_chunk_UK22OTEL.addVersionDetailsToErrorMessage)(errorMessageWithContext));
63
+ super((0, import_chunk_K6QO7ABI.addVersionDetailsToErrorMessage)(errorMessageWithContext));
64
64
  this.name = "ValidateError";
65
65
  }
66
66
  };
@@ -72,13 +72,13 @@ function validate(options) {
72
72
  () => {
73
73
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
74
74
  debug("Triggering a Rust panic...");
75
- import_chunk_QPQSC3JJ.prismaSchemaWasm.debug_panic();
75
+ import_chunk_3G6ZFRML.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_QPQSC3JJ.prismaSchemaWasm.validate(params);
81
+ import_chunk_3G6ZFRML.prismaSchemaWasm.validate(params);
82
82
  },
83
83
  (e) => ({
84
84
  type: "wasm-error",
@@ -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_2G6A4TX2_exports = {};
30
- __export(chunk_2G6A4TX2_exports, {
29
+ var chunk_SRSWUO75_exports = {};
30
+ __export(chunk_SRSWUO75_exports, {
31
31
  GetDmmfError: () => GetDmmfError,
32
32
  getDMMF: () => getDMMF
33
33
  });
34
- module.exports = __toCommonJS(chunk_2G6A4TX2_exports);
34
+ module.exports = __toCommonJS(chunk_SRSWUO75_exports);
35
35
  var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
36
36
  var import_chunk_IAEMHQAC = require("./chunk-IAEMHQAC.js");
37
- var import_chunk_UK22OTEL = require("./chunk-UK22OTEL.js");
37
+ var import_chunk_K6QO7ABI = require("./chunk-K6QO7ABI.js");
38
38
  var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
39
39
  var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
40
- var import_chunk_QPQSC3JJ = require("./chunk-QPQSC3JJ.js");
40
+ var import_chunk_3G6ZFRML = require("./chunk-3G6ZFRML.js");
41
41
  var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
42
42
  var import_chunk_7MD6344A = require("./chunk-7MD6344A.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_UK22OTEL.addVersionDetailsToErrorMessage)(errorMessageWithContext));
63
+ super((0, import_chunk_K6QO7ABI.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_QPQSC3JJ.prismaSchemaWasm.debug_panic();
94
+ import_chunk_3G6ZFRML.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_QPQSC3JJ.prismaSchemaWasm.get_dmmf(params);
100
+ const data = import_chunk_3G6ZFRML.prismaSchemaWasm.get_dmmf(params);
101
101
  return data;
102
102
  },
103
103
  (e) => ({
@@ -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_XYQLNYQW_exports = {};
30
- __export(chunk_XYQLNYQW_exports, {
29
+ var chunk_UUH3SXFA_exports = {};
30
+ __export(chunk_UUH3SXFA_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_XYQLNYQW_exports);
37
+ module.exports = __toCommonJS(chunk_UUH3SXFA_exports);
38
38
  var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
39
39
  var import_chunk_IAEMHQAC = require("./chunk-IAEMHQAC.js");
40
40
  var import_chunk_WMIBAVWZ = require("./chunk-WMIBAVWZ.js");
41
- var import_chunk_RYTU24TW = require("./chunk-RYTU24TW.js");
41
+ var import_chunk_K6QO7ABI = require("./chunk-K6QO7ABI.js");
42
42
  var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
43
43
  var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
44
- var import_chunk_FJNI7EDH = require("./chunk-FJNI7EDH.js");
44
+ var import_chunk_3G6ZFRML = require("./chunk-3G6ZFRML.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");
@@ -65,7 +65,7 @@ ${detailsHeader} ${message}`;
65
65
  }).exhaustive();
66
66
  const errorMessageWithContext = `${constructedErrorMessage}
67
67
  [Context: getConfig]`;
68
- super((0, import_chunk_RYTU24TW.addVersionDetailsToErrorMessage)(errorMessageWithContext));
68
+ super((0, import_chunk_K6QO7ABI.addVersionDetailsToErrorMessage)(errorMessageWithContext));
69
69
  this.name = "GetConfigError";
70
70
  }
71
71
  };
@@ -90,7 +90,7 @@ async function getConfig(options) {
90
90
  () => {
91
91
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
92
92
  debug("Triggering a Rust panic...");
93
- import_chunk_FJNI7EDH.prismaSchemaWasm.debug_panic();
93
+ import_chunk_3G6ZFRML.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_FJNI7EDH.prismaSchemaWasm.get_config(params);
101
+ const data = import_chunk_3G6ZFRML.prismaSchemaWasm.get_config(params);
102
102
  return data;
103
103
  },
104
104
  (e) => ({
@@ -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_FJNI7EDH_exports = {};
30
- __export(chunk_FJNI7EDH_exports, {
29
+ var chunk_V7RH2OQS_exports = {};
30
+ __export(chunk_V7RH2OQS_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_FJNI7EDH_exports);
36
- var import_chunk_2F4TQFCO = require("./chunk-2F4TQFCO.js");
35
+ module.exports = __toCommonJS(chunk_V7RH2OQS_exports);
36
+ var import_chunk_ASLJ5JD6 = require("./chunk-ASLJ5JD6.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_2F4TQFCO.require_package)();
45
+ var { dependencies } = (0, import_chunk_ASLJ5JD6.require_package)();
46
46
  var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
47
47
  globalThis.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_HOZFIXMD.WasmPanicRegistry();
@@ -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_UK22OTEL_exports = {};
20
- __export(chunk_UK22OTEL_exports, {
19
+ var chunk_WKGRQ3XF_exports = {};
20
+ __export(chunk_WKGRQ3XF_exports, {
21
21
  addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
22
22
  });
23
- module.exports = __toCommonJS(chunk_UK22OTEL_exports);
24
- var import_chunk_YVCVAF6S = require("./chunk-YVCVAF6S.js");
23
+ module.exports = __toCommonJS(chunk_WKGRQ3XF_exports);
24
+ var import_chunk_Z2Z6MBQO = require("./chunk-Z2Z6MBQO.js");
25
25
  var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
26
26
  function addVersionDetailsToErrorMessage(message) {
27
- const rows = [["Prisma CLI Version", import_chunk_YVCVAF6S.version]];
27
+ const rows = [["Prisma CLI Version", import_chunk_Z2Z6MBQO.version]];
28
28
  return `${message}
29
29
 
30
30
  ${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;