@prisma/internals 6.19.0 → 6.20.0-integration-next.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 (116) hide show
  1. package/dist/{chunk-GMW36QQF.js → chunk-22HIO2UL.js} +7 -7
  2. package/dist/{chunk-C7SAKLK2.js → chunk-24ZPBDBI.js} +11 -11
  3. package/dist/{chunk-D7OTFXCP.js → chunk-2Q43C56O.js} +5 -5
  4. package/dist/{chunk-TBR6SNKL.js → chunk-3L2WF742.js} +5 -5
  5. package/dist/{chunk-I6WLABB2.js → chunk-3WXUQZS7.js} +14 -5
  6. package/dist/{chunk-Y7XBA7JY.js → chunk-3ZWEK4N6.js} +5 -5
  7. package/dist/{chunk-RS2R7COT.js → chunk-5I4ERIIY.js} +3 -9
  8. package/dist/{chunk-F2OZV76L.js → chunk-5MHUYAV3.js} +9 -9
  9. package/dist/{chunk-HO5HRHFZ.js → chunk-5W3BSMTH.js} +3 -6
  10. package/dist/{chunk-FGU7IK4W.js → chunk-6AA7BHPW.js} +8 -9
  11. package/dist/{chunk-E6MOBIU5.js → chunk-73HXEN2A.js} +5 -5
  12. package/dist/{chunk-LU7NT333.js → chunk-7FBMZKZS.js} +11 -11
  13. package/dist/{chunk-WFNB7VRA.js → chunk-ARC7TW3L.js} +4 -14
  14. package/dist/{chunk-CCLAMTCA.js → chunk-B2BNIZB2.js} +7 -8
  15. package/dist/{chunk-UQUWZJVN.js → chunk-BM3JIFQT.js} +7 -7
  16. package/dist/{chunk-HFFWZTVM.js → chunk-BUQN4WLU.js} +7 -9
  17. package/dist/{chunk-AP3F7M3T.js → chunk-C5YUUOQW.js} +12 -12
  18. package/dist/{chunk-HHG4DGHC.js → chunk-CGLLQXZE.js} +11 -12
  19. package/dist/{chunk-LV27YCGC.js → chunk-DQV64JMK.js} +11 -11
  20. package/dist/chunk-DYV47NUW.js +796 -0
  21. package/dist/{chunk-IDINCQMN.js → chunk-FF7OLLBP.js} +12 -784
  22. package/dist/{chunk-JTS4UPHJ.js → chunk-GH4UGGRD.js} +5 -5
  23. package/dist/{chunk-4CGPN5SR.js → chunk-GJSFP4V4.js} +3 -9
  24. package/dist/{chunk-4JCVHBYR.js → chunk-GL7OANR6.js} +5 -5
  25. package/dist/{chunk-OAT7ZJED.js → chunk-H5STSTVK.js} +7 -20
  26. package/dist/{chunk-FYZCPL2Z.js → chunk-HNRMSI3R.js} +5 -8
  27. package/dist/{chunk-2GUGGLPK.js → chunk-KGES6NIS.js} +38 -94
  28. package/dist/{chunk-NVNI2SRU.js → chunk-KNNTV7IN.js} +687 -213
  29. package/dist/{chunk-SOKSKSEX.js → chunk-LA5QBRTU.js} +14 -20
  30. package/dist/{chunk-5AI4FIZ3.js → chunk-MEOOYUIZ.js} +10 -10
  31. package/dist/{chunk-FHZ5QJLR.js → chunk-MGIYZQLY.js} +5 -5
  32. package/dist/{chunk-TQFONRJP.js → chunk-MLFKBBDL.js} +5 -5
  33. package/dist/{chunk-7QC5VORA.js → chunk-MYLPCGTT.js} +5 -5
  34. package/dist/{chunk-EYVG6XQS.js → chunk-OKVM3CW4.js} +3 -39
  35. package/dist/{chunk-JOIIWB3U.js → chunk-QOZ7USPD.js} +193 -159
  36. package/dist/{chunk-BVJP43JS.js → chunk-QSVWJ2S2.js} +13 -784
  37. package/dist/{chunk-QJ3QPUM5.js → chunk-RHMWJEBL.js} +5 -5
  38. package/dist/{chunk-75BIJ5PX.js → chunk-SMJRM3EM.js} +9 -9
  39. package/dist/{chunk-AX5N26KG.js → chunk-TGA7DC5A.js} +14 -9
  40. package/dist/{chunk-LFFCR67R.js → chunk-UR5IPQXA.js} +14 -20
  41. package/dist/{chunk-5IQ5L5E4.js → chunk-VFU3QB5Z.js} +38 -94
  42. package/dist/{chunk-PHFQSMQF.js → chunk-VFZCLI5X.js} +5 -5
  43. package/dist/{chunk-E4H6V3Z4.js → chunk-VHE2A7YV.js} +11 -11
  44. package/dist/{chunk-UHI6VYFX.js → chunk-WJKBKH3Y.js} +5 -5
  45. package/dist/{chunk-TZJROXB3.js → chunk-WSZXPLJQ.js} +4 -4
  46. package/dist/{chunk-WYQJ4JWO.js → chunk-ZUKCLMNA.js} +12 -12
  47. package/dist/cli/checkUnsupportedDataProxy.js +53 -60
  48. package/dist/cli/getGeneratorSuccessMessage.js +2 -3
  49. package/dist/cli/getSchema.d.ts +1 -15
  50. package/dist/cli/getSchema.js +4 -5
  51. package/dist/cli/hashes.js +4 -4
  52. package/dist/cli/schemaContext.d.ts +1 -3
  53. package/dist/cli/schemaContext.js +53 -60
  54. package/dist/engine-commands/errorHelpers.js +4 -4
  55. package/dist/engine-commands/formatSchema.js +52 -59
  56. package/dist/engine-commands/getConfig.d.ts +0 -1
  57. package/dist/engine-commands/getConfig.js +13 -13
  58. package/dist/engine-commands/getDmmf.js +10 -10
  59. package/dist/engine-commands/getEngineVersion.js +6 -9
  60. package/dist/engine-commands/getEnginesInfo.d.ts +0 -1
  61. package/dist/engine-commands/getEnginesInfo.js +7 -9
  62. package/dist/engine-commands/index.js +64 -71
  63. package/dist/engine-commands/lintSchema.js +9 -9
  64. package/dist/engine-commands/mergeSchemas.js +10 -10
  65. package/dist/engine-commands/queryEngineCommons.js +6 -6
  66. package/dist/engine-commands/validate.js +10 -10
  67. package/dist/errorReporting.js +6 -6
  68. package/dist/get-generators/getGenerators.d.ts +0 -1
  69. package/dist/get-generators/getGenerators.js +55 -62
  70. package/dist/get-generators/utils/binaryTypeToEngineType.js +2 -2
  71. package/dist/get-generators/utils/engineTypeToBinaryType.js +2 -2
  72. package/dist/get-generators/utils/getBinaryPathsByVersion.js +6 -5
  73. package/dist/getPackedPackage.js +4 -3
  74. package/dist/index.d.ts +1 -10
  75. package/dist/index.js +95 -112
  76. package/dist/{multipart-parser-3AFJFP6K.js → multipart-parser-UV3WZSWW.js} +6 -6
  77. package/dist/resolveBinary.js +8 -7
  78. package/dist/schemaEngineCommands.js +9 -8
  79. package/dist/sendPanic.js +4 -4
  80. package/dist/utils/drawBox.js +2 -2
  81. package/dist/utils/fs-functional.js +10 -10
  82. package/dist/utils/fs-utils.js +8 -8
  83. package/dist/utils/getVersionFromPackageJson.js +3 -3
  84. package/dist/utils/handlePanic.js +6 -6
  85. package/dist/utils/link.js +2 -2
  86. package/dist/utils/missingDatasource.js +3 -3
  87. package/dist/utils/missingGeneratorMessage.js +5 -5
  88. package/dist/utils/serializeQueryEngineName.js +2 -2
  89. package/dist/wasm.js +5 -5
  90. package/package.json +15 -16
  91. package/dist/chunk-3FP46GUV.js +0 -471
  92. package/dist/chunk-46ABODUM.js +0 -186
  93. package/dist/chunk-6TTRTZXU.js +0 -37
  94. package/dist/chunk-D4VDA2TZ.js +0 -66
  95. package/dist/chunk-DZYINYAA.js +0 -68
  96. package/dist/chunk-ERSH2BQA.js +0 -58
  97. package/dist/chunk-PZMRR772.js +0 -41
  98. package/dist/chunk-T2PM5TKT.js +0 -55
  99. package/dist/cli/checkUnsupportedSchemaEngineWasm.d.ts +0 -22
  100. package/dist/cli/checkUnsupportedSchemaEngineWasm.js +0 -135
  101. package/dist/client/getClientEngineType.d.ts +0 -7
  102. package/dist/client/getClientEngineType.js +0 -26
  103. package/dist/dotenvExpand.d.ts +0 -35
  104. package/dist/dotenvExpand.js +0 -25
  105. package/dist/utils/cloudflareD1.d.ts +0 -5
  106. package/dist/utils/cloudflareD1.js +0 -27
  107. package/dist/utils/getEnvPaths.d.ts +0 -14
  108. package/dist/utils/getEnvPaths.js +0 -29
  109. package/dist/utils/handleEngineLoadingErrors.d.ts +0 -8
  110. package/dist/utils/handleEngineLoadingErrors.js +0 -27
  111. package/dist/utils/load.d.ts +0 -6
  112. package/dist/utils/load.js +0 -28
  113. package/dist/utils/loadEnvFile.d.ts +0 -10
  114. package/dist/utils/loadEnvFile.js +0 -30
  115. package/dist/utils/tryLoadEnvs.d.ts +0 -25
  116. package/dist/utils/tryLoadEnvs.js +0 -30
@@ -26,20 +26,20 @@ 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_SOKSKSEX_exports = {};
30
- __export(chunk_SOKSKSEX_exports, {
29
+ var chunk_LA5QBRTU_exports = {};
30
+ __export(chunk_LA5QBRTU_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_SOKSKSEX_exports);
38
- var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
39
- var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
37
+ module.exports = __toCommonJS(chunk_LA5QBRTU_exports);
38
+ var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
40
39
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
41
- var import_chunk_JTS4UPHJ = require("./chunk-JTS4UPHJ.js");
42
- var import_chunk_FHZ5QJLR = require("./chunk-FHZ5QJLR.js");
40
+ var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
41
+ var import_chunk_2Q43C56O = require("./chunk-2Q43C56O.js");
42
+ var import_chunk_3ZWEK4N6 = require("./chunk-3ZWEK4N6.js");
43
43
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
44
44
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
45
45
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
@@ -64,7 +64,7 @@ ${detailsHeader} ${message}`;
64
64
  }).exhaustive();
65
65
  const errorMessageWithContext = `${constructedErrorMessage}
66
66
  [Context: getConfig]`;
67
- super((0, import_chunk_JTS4UPHJ.addVersionDetailsToErrorMessage)(errorMessageWithContext));
67
+ super((0, import_chunk_2Q43C56O.addVersionDetailsToErrorMessage)(errorMessageWithContext));
68
68
  this.name = "GetConfigError";
69
69
  }
70
70
  };
@@ -82,23 +82,17 @@ function resolveUrl(envValue) {
82
82
  return urlFromValue ?? urlEnvVarValue;
83
83
  }
84
84
  async function getConfig(options) {
85
- const debugErrorType = (0, import_chunk_TZJROXB3.createDebugErrorType)(debug, "getConfigWasm");
85
+ const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getConfigWasm");
86
86
  debug(`Using getConfig Wasm`);
87
87
  const configEither = (0, import_function.pipe)(
88
88
  (0, import_chunk_5DBOS77Y.tryCatch)(
89
89
  () => {
90
90
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
91
91
  debug("Triggering a Rust panic...");
92
- import_chunk_FHZ5QJLR.prismaSchemaWasm.debug_panic();
92
+ import_chunk_3ZWEK4N6.prismaSchemaWasm.debug_panic();
93
93
  }
94
- const params = JSON.stringify({
95
- prismaSchema: options.datamodel,
96
- datasourceOverrides: {},
97
- ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
98
- env: process.env
99
- });
100
- const data = import_chunk_FHZ5QJLR.prismaSchemaWasm.get_config(params);
101
- return data;
94
+ const params = JSON.stringify({ prismaSchema: options.datamodel });
95
+ return import_chunk_3ZWEK4N6.prismaSchemaWasm.get_config(params);
102
96
  },
103
97
  (e) => ({
104
98
  type: "wasm-error",
@@ -156,12 +150,12 @@ async function getConfig(options) {
156
150
  return panic;
157
151
  }
158
152
  const errorOutput = e.error.message;
159
- return new GetConfigError((0, import_chunk_TZJROXB3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
153
+ return new GetConfigError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
160
154
  }).with({ type: "validation-error" }, (e) => {
161
155
  return new GetConfigError({
162
156
  _tag: "parsed",
163
157
  errorCode: SCHEMA_VALIDATION_ERROR_CODE,
164
- reason: (0, import_chunk_TZJROXB3.createSchemaValidationError)(e.reason),
158
+ reason: (0, import_chunk_WSZXPLJQ.createSchemaValidationError)(e.reason),
165
159
  message: formatErrors(e.error)
166
160
  });
167
161
  }).otherwise((e) => {
@@ -26,15 +26,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_5AI4FIZ3_exports = {};
30
- __export(chunk_5AI4FIZ3_exports, {
29
+ var chunk_MEOOYUIZ_exports = {};
30
+ __export(chunk_MEOOYUIZ_exports, {
31
31
  ErrorKind: () => ErrorKind,
32
32
  createErrorReport: () => createErrorReport,
33
33
  makeErrorReportCompleted: () => makeErrorReportCompleted,
34
34
  uploadZip: () => uploadZip
35
35
  });
36
- module.exports = __toCommonJS(chunk_5AI4FIZ3_exports);
37
- var import_chunk_NVNI2SRU = require("./chunk-NVNI2SRU.js");
36
+ module.exports = __toCommonJS(chunk_MEOOYUIZ_exports);
37
+ var import_chunk_KNNTV7IN = require("./chunk-KNNTV7IN.js");
38
38
  var import_fetch_engine = require("@prisma/fetch-engine");
39
39
  var import_node_http = __toESM(require("node:http"));
40
40
  var import_node_https = __toESM(require("node:https"));
@@ -151,8 +151,8 @@ var Body = class {
151
151
  } else if (ArrayBuffer.isView(body)) {
152
152
  body = import_node_buffer2.Buffer.from(body.buffer, body.byteOffset, body.byteLength);
153
153
  } else if (body instanceof import_node_stream2.default) {
154
- } else if (body instanceof import_chunk_NVNI2SRU.FormData) {
155
- body = (0, import_chunk_NVNI2SRU.formDataToBlob)(body);
154
+ } else if (body instanceof import_chunk_KNNTV7IN.FormData) {
155
+ body = (0, import_chunk_KNNTV7IN.formDataToBlob)(body);
156
156
  boundary = body.type.split("=")[1];
157
157
  } else {
158
158
  body = import_node_buffer2.Buffer.from(String(body));
@@ -196,14 +196,14 @@ var Body = class {
196
196
  async formData() {
197
197
  const ct = this.headers.get("content-type");
198
198
  if (ct.startsWith("application/x-www-form-urlencoded")) {
199
- const formData = new import_chunk_NVNI2SRU.FormData();
199
+ const formData = new import_chunk_KNNTV7IN.FormData();
200
200
  const parameters = new URLSearchParams(await this.text());
201
201
  for (const [name, value] of parameters) {
202
202
  formData.append(name, value);
203
203
  }
204
204
  return formData;
205
205
  }
206
- const { toFormData } = await import("./multipart-parser-3AFJFP6K.js");
206
+ const { toFormData } = await import("./multipart-parser-UV3WZSWW.js");
207
207
  return toFormData(this.body, ct);
208
208
  }
209
209
  /**
@@ -214,7 +214,7 @@ var Body = class {
214
214
  async blob() {
215
215
  const ct = this.headers && this.headers.get("content-type") || this[INTERNALS].body && this[INTERNALS].body.type || "";
216
216
  const buf = await this.arrayBuffer();
217
- return new import_chunk_NVNI2SRU.fetch_blob_default([buf], {
217
+ return new import_chunk_KNNTV7IN.fetch_blob_default([buf], {
218
218
  type: ct
219
219
  });
220
220
  }
@@ -342,7 +342,7 @@ var extractContentType = (body, request2) => {
342
342
  if (import_node_buffer2.Buffer.isBuffer(body) || import_node_util.types.isAnyArrayBuffer(body) || ArrayBuffer.isView(body)) {
343
343
  return null;
344
344
  }
345
- if (body instanceof import_chunk_NVNI2SRU.FormData) {
345
+ if (body instanceof import_chunk_KNNTV7IN.FormData) {
346
346
  return `multipart/form-data; boundary=${request2[INTERNALS].boundary}`;
347
347
  }
348
348
  if (body && typeof body.getBoundary === "function") {
@@ -26,15 +26,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_FHZ5QJLR_exports = {};
30
- __export(chunk_FHZ5QJLR_exports, {
29
+ var chunk_MGIYZQLY_exports = {};
30
+ __export(chunk_MGIYZQLY_exports, {
31
31
  prismaSchemaWasm: () => import_prisma_schema_wasm.default,
32
32
  prismaSchemaWasmVersion: () => prismaSchemaWasmVersion,
33
33
  schemaEngineWasmVersion: () => schemaEngineWasmVersion,
34
34
  wasm_exports: () => wasm_exports
35
35
  });
36
- module.exports = __toCommonJS(chunk_FHZ5QJLR_exports);
37
- var import_chunk_CCLAMTCA = require("./chunk-CCLAMTCA.js");
36
+ module.exports = __toCommonJS(chunk_MGIYZQLY_exports);
37
+ var import_chunk_6AA7BHPW = require("./chunk-6AA7BHPW.js");
38
38
  var import_chunk_WXRVYSYN = require("./chunk-WXRVYSYN.js");
39
39
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
40
40
  var import_prisma_schema_wasm = __toESM(require("@prisma/prisma-schema-wasm"));
@@ -46,6 +46,6 @@ var wasm_exports = {};
46
46
  });
47
47
  var globalWithPanicRegistry = globalThis;
48
48
  globalWithPanicRegistry.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_WXRVYSYN.WasmPanicRegistry();
49
- var { dependencies } = (0, import_chunk_CCLAMTCA.require_package)();
49
+ var { dependencies } = (0, import_chunk_6AA7BHPW.require_package)();
50
50
  var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
51
51
  var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
@@ -26,8 +26,8 @@ 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_TQFONRJP_exports = {};
30
- __export(chunk_TQFONRJP_exports, {
29
+ var chunk_MLFKBBDL_exports = {};
30
+ __export(chunk_MLFKBBDL_exports, {
31
31
  createDirIfNotExists: () => createDirIfNotExists,
32
32
  fs_utils_exports: () => fs_utils_exports,
33
33
  getFilesInDir: () => getFilesInDir,
@@ -36,9 +36,9 @@ __export(chunk_TQFONRJP_exports, {
36
36
  removeEmptyDirs: () => removeEmptyDirs,
37
37
  writeFile: () => writeFile
38
38
  });
39
- module.exports = __toCommonJS(chunk_TQFONRJP_exports);
39
+ module.exports = __toCommonJS(chunk_MLFKBBDL_exports);
40
40
  var import_chunk_J77ZIDXB = require("./chunk-J77ZIDXB.js");
41
- var import_chunk_JOIIWB3U = require("./chunk-JOIIWB3U.js");
41
+ var import_chunk_QOZ7USPD = require("./chunk-QOZ7USPD.js");
42
42
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
43
43
  var import_promises = __toESM(require("fs/promises"));
44
44
  var import_path = __toESM(require("path"));
@@ -51,7 +51,7 @@ var fs_utils_exports = {};
51
51
  removeEmptyDirs: () => removeEmptyDirs,
52
52
  writeFile: () => writeFile
53
53
  });
54
- var import_globby = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_JOIIWB3U.require_globby)());
54
+ var import_globby = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_QOZ7USPD.require_globby)());
55
55
  function createDirIfNotExists(dir) {
56
56
  return import_promises.default.mkdir(dir, { recursive: true });
57
57
  }
@@ -16,12 +16,12 @@ 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_7QC5VORA_exports = {};
20
- __export(chunk_7QC5VORA_exports, {
19
+ var chunk_MYLPCGTT_exports = {};
20
+ __export(chunk_MYLPCGTT_exports, {
21
21
  missingDatasource: () => missingDatasource
22
22
  });
23
- module.exports = __toCommonJS(chunk_7QC5VORA_exports);
24
- var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
23
+ module.exports = __toCommonJS(chunk_MYLPCGTT_exports);
24
+ var import_chunk_3WXUQZS7 = require("./chunk-3WXUQZS7.js");
25
25
  var import_chunk_TQCLUNM2 = require("./chunk-TQCLUNM2.js");
26
26
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
27
27
  var missingDatasource = `
@@ -36,5 +36,5 @@ ${(0, import_chunk_PG5FDKSF.bold)(
36
36
  )}
37
37
 
38
38
  More information in our documentation:
39
- ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/prisma-schema")}
39
+ ${(0, import_chunk_3WXUQZS7.link)("https://pris.ly/d/prisma-schema")}
40
40
  `;
@@ -26,16 +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_EYVG6XQS_exports = {};
30
- __export(chunk_EYVG6XQS_exports, {
31
- getSchemaFromPackageJson: () => getSchemaFromPackageJson,
29
+ var chunk_OKVM3CW4_exports = {};
30
+ __export(chunk_OKVM3CW4_exports, {
32
31
  getSchemaWithPath: () => getSchemaWithPath,
33
32
  getSchemaWithPathOptional: () => getSchemaWithPathOptional,
34
33
  printSchemaLoadedMessage: () => printSchemaLoadedMessage
35
34
  });
36
- module.exports = __toCommonJS(chunk_EYVG6XQS_exports);
35
+ module.exports = __toCommonJS(chunk_OKVM3CW4_exports);
37
36
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
38
- var import_config = require("@prisma/config");
39
37
  var import_debug = require("@prisma/debug");
40
38
  var import_schema_files_loader = require("@prisma/schema-files-loader");
41
39
  var import_fs = __toESM(require("fs"));
@@ -119,10 +117,6 @@ async function getSchemaWithPathInternal(schemaPathFromArgs, schemaPathFromConfi
119
117
  if (prismaConfigResult.ok) {
120
118
  return prismaConfigResult;
121
119
  }
122
- const pkgJsonResult = await getSchemaFromPackageJson(cwd);
123
- if (pkgJsonResult.ok) {
124
- return pkgJsonResult;
125
- }
126
120
  const defaultResult = await getDefaultSchema(cwd);
127
121
  if (defaultResult.ok) {
128
122
  return defaultResult;
@@ -179,36 +173,6 @@ async function readSchemaFromPrismaConfigBasedLocation(schemaPathFromConfig) {
179
173
  }
180
174
  return schemaResult;
181
175
  }
182
- async function getSchemaFromPackageJson(cwd) {
183
- const prismaConfig = await (0, import_config.loadConfigFromPackageJson)(cwd);
184
- debug("prismaConfig", prismaConfig);
185
- if (!prismaConfig || !prismaConfig.config?.schema) {
186
- return { ok: false, error: { kind: "PackageJsonNotConfigured" } };
187
- }
188
- const schemaPathFromPkgJson = prismaConfig.config.schema;
189
- if (typeof schemaPathFromPkgJson !== "string") {
190
- throw new Error(
191
- `Provided schema path \`${schemaPathFromPkgJson}\` from \`${import_path.default.relative(
192
- cwd,
193
- prismaConfig.loadedFromFile
194
- )}\` must be of type string`
195
- );
196
- }
197
- const absoluteSchemaPath = import_path.default.isAbsolute(schemaPathFromPkgJson) ? schemaPathFromPkgJson : import_path.default.resolve(import_path.default.dirname(prismaConfig.loadedFromFile), schemaPathFromPkgJson);
198
- const lookupResult = await readSchemaFromFileOrDirectory(absoluteSchemaPath);
199
- if (!lookupResult.ok) {
200
- throw new Error(
201
- `Could not load schema from \`${import_path.default.relative(
202
- cwd,
203
- absoluteSchemaPath
204
- )}\` provided by "prisma.schema" config of \`${import_path.default.relative(
205
- cwd,
206
- prismaConfig.loadedFromFile
207
- )}\`: ${renderLookupError(lookupResult.error)}`
208
- );
209
- }
210
- return lookupResult;
211
- }
212
176
  async function getDefaultSchema(cwd, failures = []) {
213
177
  const lookupPaths = [import_path.default.join(cwd, "schema.prisma"), import_path.default.join(cwd, "prisma", "schema.prisma")];
214
178
  for (const path2 of lookupPaths) {