@prisma/internals 6.20.0-integration-feat-prisma-7-config.4 → 6.20.0-integration-engines-6-20-0-1-integration-oidc-truster-publishers-e28d8c7807dc95db08a9a866250934b3aac2c89b.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-B2BNIZB2.js → chunk-2NO2JKZ5.js} +8 -7
  2. package/dist/{chunk-N6RUOMFQ.js → chunk-2NYEQR5W.js} +5 -5
  3. package/dist/{chunk-USWUUAD2.js → chunk-2O3VYQLI.js} +11 -11
  4. package/dist/chunk-3FP46GUV.js +471 -0
  5. package/dist/{chunk-VHE2A7YV.js → chunk-3U76J22D.js} +11 -11
  6. package/dist/chunk-46ABODUM.js +186 -0
  7. package/dist/{chunk-GJSFP4V4.js → chunk-4CGPN5SR.js} +9 -3
  8. package/dist/{chunk-GL7OANR6.js → chunk-4JCVHBYR.js} +5 -5
  9. package/dist/{chunk-MEOOYUIZ.js → chunk-5AI4FIZ3.js} +10 -10
  10. package/dist/{chunk-YN4MD4NY.js → chunk-6NU5L5WI.js} +12 -12
  11. package/dist/chunk-6TTRTZXU.js +37 -0
  12. package/dist/{chunk-SMJRM3EM.js → chunk-75BIJ5PX.js} +9 -9
  13. package/dist/{chunk-WBLG3WYC.js → chunk-77IREUT5.js} +20 -14
  14. package/dist/{chunk-MYLPCGTT.js → chunk-7QC5VORA.js} +5 -5
  15. package/dist/{chunk-TGA7DC5A.js → chunk-AX5N26KG.js} +9 -14
  16. package/dist/{chunk-5FTKVAG5.js → chunk-BAKQDFDR.js} +97 -40
  17. package/dist/{chunk-TLOMW2S7.js → chunk-BFR6BYIF.js} +97 -40
  18. package/dist/{chunk-QSVWJ2S2.js → chunk-BVJP43JS.js} +784 -13
  19. package/dist/{chunk-3ZWEK4N6.js → chunk-CXIZ2XKS.js} +5 -5
  20. package/dist/chunk-D4VDA2TZ.js +66 -0
  21. package/dist/chunk-DZYINYAA.js +68 -0
  22. package/dist/chunk-ERSH2BQA.js +58 -0
  23. package/dist/{chunk-OKVM3CW4.js → chunk-EYVG6XQS.js} +39 -3
  24. package/dist/{chunk-5MHUYAV3.js → chunk-F2OZV76L.js} +9 -9
  25. package/dist/{chunk-24ZPBDBI.js → chunk-FOLY7PXH.js} +11 -11
  26. package/dist/{chunk-2Q43C56O.js → chunk-FQYGFHOV.js} +5 -5
  27. package/dist/{chunk-HNRMSI3R.js → chunk-FYZCPL2Z.js} +8 -5
  28. package/dist/{chunk-VFZCLI5X.js → chunk-GLZZMW23.js} +5 -5
  29. package/dist/{chunk-22HIO2UL.js → chunk-GMW36QQF.js} +7 -7
  30. package/dist/{chunk-BUQN4WLU.js → chunk-HFFWZTVM.js} +9 -7
  31. package/dist/{chunk-CGLLQXZE.js → chunk-HHG4DGHC.js} +12 -11
  32. package/dist/{chunk-5W3BSMTH.js → chunk-HO5HRHFZ.js} +6 -3
  33. package/dist/{chunk-3WXUQZS7.js → chunk-I6WLABB2.js} +5 -14
  34. package/dist/{chunk-FF7OLLBP.js → chunk-IDINCQMN.js} +784 -12
  35. package/dist/{chunk-QOZ7USPD.js → chunk-JOIIWB3U.js} +159 -193
  36. package/dist/{chunk-73HXEN2A.js → chunk-JW3XTFPO.js} +5 -5
  37. package/dist/{chunk-UHN4BR3K.js → chunk-KI2DKJN3.js} +5 -5
  38. package/dist/{chunk-YWVCZKBM.js → chunk-KNRW6B23.js} +11 -11
  39. package/dist/{chunk-KNNTV7IN.js → chunk-NVNI2SRU.js} +213 -687
  40. package/dist/{chunk-H5STSTVK.js → chunk-OAT7ZJED.js} +20 -7
  41. package/dist/{chunk-SVJBSZKZ.js → chunk-PEE6ENIU.js} +9 -8
  42. package/dist/chunk-PZMRR772.js +41 -0
  43. package/dist/{chunk-SPQV2DVP.js → chunk-ROIGE6HI.js} +5 -5
  44. package/dist/{chunk-5I4ERIIY.js → chunk-RS2R7COT.js} +9 -3
  45. package/dist/chunk-T2PM5TKT.js +55 -0
  46. package/dist/{chunk-MLFKBBDL.js → chunk-TQFONRJP.js} +5 -5
  47. package/dist/{chunk-WSZXPLJQ.js → chunk-TZJROXB3.js} +4 -4
  48. package/dist/{chunk-WJKBKH3Y.js → chunk-UHI6VYFX.js} +5 -5
  49. package/dist/{chunk-BM3JIFQT.js → chunk-UQUWZJVN.js} +7 -7
  50. package/dist/{chunk-ARC7TW3L.js → chunk-WFNB7VRA.js} +14 -4
  51. package/dist/{chunk-LA5QBRTU.js → chunk-X5SLQREP.js} +20 -14
  52. package/dist/{chunk-66KS6FZC.js → chunk-XZ2N3HZX.js} +5 -5
  53. package/dist/{chunk-C5YUUOQW.js → chunk-YUX64XCQ.js} +12 -12
  54. package/dist/cli/checkUnsupportedDataProxy.js +60 -53
  55. package/dist/cli/checkUnsupportedSchemaEngineWasm.d.ts +22 -0
  56. package/dist/cli/checkUnsupportedSchemaEngineWasm.js +135 -0
  57. package/dist/cli/getGeneratorSuccessMessage.js +3 -2
  58. package/dist/cli/getSchema.d.ts +15 -1
  59. package/dist/cli/getSchema.js +5 -4
  60. package/dist/cli/hashes.js +4 -4
  61. package/dist/cli/schemaContext.d.ts +11 -2
  62. package/dist/cli/schemaContext.js +60 -53
  63. package/dist/client/getClientEngineType.d.ts +7 -0
  64. package/dist/client/getClientEngineType.js +26 -0
  65. package/dist/dotenvExpand.d.ts +35 -0
  66. package/dist/dotenvExpand.js +25 -0
  67. package/dist/engine-commands/errorHelpers.js +4 -4
  68. package/dist/engine-commands/formatSchema.js +59 -52
  69. package/dist/engine-commands/getConfig.d.ts +1 -0
  70. package/dist/engine-commands/getConfig.js +13 -13
  71. package/dist/engine-commands/getDmmf.js +10 -10
  72. package/dist/engine-commands/getEngineVersion.js +9 -6
  73. package/dist/engine-commands/getEnginesInfo.d.ts +1 -0
  74. package/dist/engine-commands/getEnginesInfo.js +9 -7
  75. package/dist/engine-commands/index.js +71 -64
  76. package/dist/engine-commands/lintSchema.js +9 -9
  77. package/dist/engine-commands/mergeSchemas.js +10 -10
  78. package/dist/engine-commands/queryEngineCommons.js +6 -6
  79. package/dist/engine-commands/validate.js +10 -10
  80. package/dist/errorReporting.js +6 -6
  81. package/dist/get-generators/getGenerators.d.ts +1 -0
  82. package/dist/get-generators/getGenerators.js +62 -55
  83. package/dist/get-generators/utils/binaryTypeToEngineType.js +2 -2
  84. package/dist/get-generators/utils/engineTypeToBinaryType.js +2 -2
  85. package/dist/get-generators/utils/getBinaryPathsByVersion.js +5 -6
  86. package/dist/getPackedPackage.js +3 -4
  87. package/dist/index.d.ts +10 -1
  88. package/dist/index.js +112 -95
  89. package/dist/{multipart-parser-UV3WZSWW.js → multipart-parser-3AFJFP6K.js} +6 -6
  90. package/dist/resolveBinary.js +7 -8
  91. package/dist/schemaEngineCommands.js +8 -9
  92. package/dist/sendPanic.js +4 -4
  93. package/dist/utils/cloudflareD1.d.ts +5 -0
  94. package/dist/utils/cloudflareD1.js +27 -0
  95. package/dist/utils/drawBox.js +2 -2
  96. package/dist/utils/fs-functional.js +10 -10
  97. package/dist/utils/fs-utils.js +8 -8
  98. package/dist/utils/getEnvPaths.d.ts +14 -0
  99. package/dist/utils/getEnvPaths.js +29 -0
  100. package/dist/utils/getVersionFromPackageJson.js +3 -3
  101. package/dist/utils/handleEngineLoadingErrors.d.ts +8 -0
  102. package/dist/utils/handleEngineLoadingErrors.js +27 -0
  103. package/dist/utils/handlePanic.js +6 -6
  104. package/dist/utils/link.js +2 -2
  105. package/dist/utils/load.d.ts +6 -0
  106. package/dist/utils/load.js +28 -0
  107. package/dist/utils/loadEnvFile.d.ts +10 -0
  108. package/dist/utils/loadEnvFile.js +30 -0
  109. package/dist/utils/missingDatasource.js +3 -3
  110. package/dist/utils/missingGeneratorMessage.js +5 -5
  111. package/dist/utils/serializeQueryEngineName.js +2 -2
  112. package/dist/utils/tryLoadEnvs.d.ts +25 -0
  113. package/dist/utils/tryLoadEnvs.js +30 -0
  114. package/dist/wasm.js +5 -5
  115. package/package.json +16 -15
  116. package/dist/chunk-DYV47NUW.js +0 -796
@@ -0,0 +1,186 @@
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_46ABODUM_exports = {};
30
+ __export(chunk_46ABODUM_exports, {
31
+ getEnvPaths: () => getEnvPaths
32
+ });
33
+ module.exports = __toCommonJS(chunk_46ABODUM_exports);
34
+ var import_chunk_3FP46GUV = require("./chunk-3FP46GUV.js");
35
+ var import_chunk_EYVG6XQS = require("./chunk-EYVG6XQS.js");
36
+ var import_debug = __toESM(require("@prisma/debug"));
37
+ var import_node_path = __toESM(require("node:path"));
38
+ var import_node_process = __toESM(require("node:process"));
39
+ var import_node_path2 = __toESM(require("node:path"));
40
+ var import_node_fs = __toESM(require("node:fs"));
41
+ var import_node_url = require("node:url");
42
+ var import_node_url2 = require("node:url");
43
+ var import_node_fs2 = __toESM(require("node:fs"));
44
+ var import_fs = __toESM(require("fs"));
45
+ var import_path = __toESM(require("path"));
46
+ var typeMappings = {
47
+ directory: "isDirectory",
48
+ file: "isFile"
49
+ };
50
+ function checkType(type) {
51
+ if (Object.hasOwnProperty.call(typeMappings, type)) {
52
+ return;
53
+ }
54
+ throw new Error(`Invalid type specified: ${type}`);
55
+ }
56
+ var matchType = (type, stat) => stat[typeMappings[type]]();
57
+ var toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
58
+ function locatePathSync(paths, {
59
+ cwd = import_node_process.default.cwd(),
60
+ type = "file",
61
+ allowSymlinks = true
62
+ } = {}) {
63
+ checkType(type);
64
+ cwd = toPath(cwd);
65
+ const statFunction = allowSymlinks ? import_node_fs.default.statSync : import_node_fs.default.lstatSync;
66
+ for (const path_ of paths) {
67
+ try {
68
+ const stat = statFunction(import_node_path2.default.resolve(cwd, path_), {
69
+ throwIfNoEntry: false
70
+ });
71
+ if (!stat) {
72
+ continue;
73
+ }
74
+ if (matchType(type, stat)) {
75
+ return path_;
76
+ }
77
+ } catch {
78
+ }
79
+ }
80
+ }
81
+ function toPath2(urlOrPath) {
82
+ return urlOrPath instanceof URL ? (0, import_node_url2.fileURLToPath)(urlOrPath) : urlOrPath;
83
+ }
84
+ function pathExistsSync(path4) {
85
+ try {
86
+ import_node_fs2.default.accessSync(path4);
87
+ return true;
88
+ } catch {
89
+ return false;
90
+ }
91
+ }
92
+ var findUpStop = Symbol("findUpStop");
93
+ function findUpMultipleSync(name, options = {}) {
94
+ let directory = import_node_path.default.resolve(toPath2(options.cwd) ?? "");
95
+ const { root } = import_node_path.default.parse(directory);
96
+ const stopAt = import_node_path.default.resolve(directory, toPath2(options.stopAt) ?? root);
97
+ const limit = options.limit ?? Number.POSITIVE_INFINITY;
98
+ const paths = [name].flat();
99
+ const runMatcher = (locateOptions) => {
100
+ if (typeof name !== "function") {
101
+ return locatePathSync(paths, locateOptions);
102
+ }
103
+ const foundPath = name(locateOptions.cwd);
104
+ if (typeof foundPath === "string") {
105
+ return locatePathSync([foundPath], locateOptions);
106
+ }
107
+ return foundPath;
108
+ };
109
+ const matches = [];
110
+ while (true) {
111
+ const foundPath = runMatcher({ ...options, cwd: directory });
112
+ if (foundPath === findUpStop) {
113
+ break;
114
+ }
115
+ if (foundPath) {
116
+ matches.push(import_node_path.default.resolve(directory, foundPath));
117
+ }
118
+ if (directory === stopAt || matches.length >= limit) {
119
+ break;
120
+ }
121
+ directory = import_node_path.default.dirname(directory);
122
+ }
123
+ return matches;
124
+ }
125
+ function findUpSync(name, options = {}) {
126
+ const matches = findUpMultipleSync(name, { ...options, limit: 1 });
127
+ return matches[0];
128
+ }
129
+ var debug = (0, import_debug.default)("prisma:loadEnv");
130
+ async function getEnvPaths(schemaPath, opts = { cwd: process.cwd() }) {
131
+ const rootEnvPath = getProjectRootEnvPath({ cwd: opts.cwd }) ?? null;
132
+ const schemaEnvPathFromArgs = schemaPathToEnvPath(schemaPath);
133
+ const schemaEnvPathFromPkgJson = schemaPathToEnvPath(await readSchemaPathFromPkgJson());
134
+ const schemaEnvPaths = [
135
+ schemaEnvPathFromArgs,
136
+ // 1 - Check --schema directory for .env
137
+ schemaEnvPathFromPkgJson,
138
+ // 2 - Check package.json schema directory for .env
139
+ "./prisma/.env",
140
+ // 3 - Check ./prisma directory for .env
141
+ "./.env"
142
+ // 4 - Check cwd for .env
143
+ ];
144
+ const schemaEnvPath = schemaEnvPaths.find(import_chunk_3FP46GUV.exists);
145
+ return { rootEnvPath, schemaEnvPath };
146
+ }
147
+ async function readSchemaPathFromPkgJson() {
148
+ try {
149
+ const pkgJsonSchema = await (0, import_chunk_EYVG6XQS.getSchemaFromPackageJson)(process.cwd());
150
+ if (pkgJsonSchema.ok) {
151
+ pkgJsonSchema.schema.schemaPath;
152
+ }
153
+ return null;
154
+ } catch {
155
+ return null;
156
+ }
157
+ }
158
+ function getProjectRootEnvPath(opts) {
159
+ const pkgJsonPath = findUpSync((dir) => {
160
+ const pkgPath = import_path.default.join(dir, "package.json");
161
+ if (pathExistsSync(pkgPath)) {
162
+ try {
163
+ const pkg = JSON.parse(import_fs.default.readFileSync(pkgPath, "utf8"));
164
+ if (pkg["name"] !== ".prisma/client") {
165
+ debug(`project root found at ${pkgPath}`);
166
+ return pkgPath;
167
+ }
168
+ } catch (e) {
169
+ debug(`skipping package.json at ${pkgPath}`);
170
+ }
171
+ }
172
+ return void 0;
173
+ }, opts);
174
+ if (!pkgJsonPath) {
175
+ return null;
176
+ }
177
+ const candidate = import_path.default.join(import_path.default.dirname(pkgJsonPath), ".env");
178
+ if (!import_fs.default.existsSync(candidate)) {
179
+ return null;
180
+ }
181
+ return candidate;
182
+ }
183
+ function schemaPathToEnvPath(schemaPath) {
184
+ if (!schemaPath) return null;
185
+ return import_path.default.join(import_path.default.dirname(schemaPath), ".env");
186
+ }
@@ -16,15 +16,21 @@ 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_GJSFP4V4_exports = {};
20
- __export(chunk_GJSFP4V4_exports, {
19
+ var chunk_4CGPN5SR_exports = {};
20
+ __export(chunk_4CGPN5SR_exports, {
21
21
  engineTypeToBinaryType: () => engineTypeToBinaryType
22
22
  });
23
- module.exports = __toCommonJS(chunk_GJSFP4V4_exports);
23
+ module.exports = __toCommonJS(chunk_4CGPN5SR_exports);
24
24
  var import_fetch_engine = require("@prisma/fetch-engine");
25
25
  function engineTypeToBinaryType(engineType) {
26
26
  if (engineType === "schemaEngine") {
27
27
  return import_fetch_engine.BinaryType.SchemaEngineBinary;
28
28
  }
29
+ if (engineType === "queryEngine") {
30
+ return import_fetch_engine.BinaryType.QueryEngineBinary;
31
+ }
32
+ if (engineType === "libqueryEngine") {
33
+ return import_fetch_engine.BinaryType.QueryEngineLibrary;
34
+ }
29
35
  throw new Error(`Could not convert engine type ${engineType}`);
30
36
  }
@@ -26,16 +26,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_GL7OANR6_exports = {};
30
- __export(chunk_GL7OANR6_exports, {
29
+ var chunk_4JCVHBYR_exports = {};
30
+ __export(chunk_4JCVHBYR_exports, {
31
31
  getCLIPathHash: () => getCLIPathHash,
32
32
  getProjectHash: () => getProjectHash
33
33
  });
34
- module.exports = __toCommonJS(chunk_GL7OANR6_exports);
35
- var import_chunk_OKVM3CW4 = require("./chunk-OKVM3CW4.js");
34
+ module.exports = __toCommonJS(chunk_4JCVHBYR_exports);
35
+ var import_chunk_EYVG6XQS = require("./chunk-EYVG6XQS.js");
36
36
  var import_crypto = __toESM(require("crypto"));
37
37
  async function getProjectHash(schemaPathFromArgs, schemaPathFromConfig) {
38
- const projectPath = (await (0, import_chunk_OKVM3CW4.getSchemaWithPath)(schemaPathFromArgs, schemaPathFromConfig))?.schemaPath ?? process.cwd();
38
+ const projectPath = (await (0, import_chunk_EYVG6XQS.getSchemaWithPath)(schemaPathFromArgs, schemaPathFromConfig))?.schemaPath ?? process.cwd();
39
39
  return import_crypto.default.createHash("sha256").update(projectPath).digest("hex").substring(0, 8);
40
40
  }
41
41
  function getCLIPathHash() {
@@ -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_MEOOYUIZ_exports = {};
30
- __export(chunk_MEOOYUIZ_exports, {
29
+ var chunk_5AI4FIZ3_exports = {};
30
+ __export(chunk_5AI4FIZ3_exports, {
31
31
  ErrorKind: () => ErrorKind,
32
32
  createErrorReport: () => createErrorReport,
33
33
  makeErrorReportCompleted: () => makeErrorReportCompleted,
34
34
  uploadZip: () => uploadZip
35
35
  });
36
- module.exports = __toCommonJS(chunk_MEOOYUIZ_exports);
37
- var import_chunk_KNNTV7IN = require("./chunk-KNNTV7IN.js");
36
+ module.exports = __toCommonJS(chunk_5AI4FIZ3_exports);
37
+ var import_chunk_NVNI2SRU = require("./chunk-NVNI2SRU.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_KNNTV7IN.FormData) {
155
- body = (0, import_chunk_KNNTV7IN.formDataToBlob)(body);
154
+ } else if (body instanceof import_chunk_NVNI2SRU.FormData) {
155
+ body = (0, import_chunk_NVNI2SRU.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_KNNTV7IN.FormData();
199
+ const formData = new import_chunk_NVNI2SRU.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-UV3WZSWW.js");
206
+ const { toFormData } = await import("./multipart-parser-3AFJFP6K.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_KNNTV7IN.fetch_blob_default([buf], {
217
+ return new import_chunk_NVNI2SRU.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_KNNTV7IN.FormData) {
345
+ if (body instanceof import_chunk_NVNI2SRU.FormData) {
346
346
  return `multipart/form-data; boundary=${request2[INTERNALS].boundary}`;
347
347
  }
348
348
  if (body && typeof body.getBoundary === "function") {
@@ -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_YN4MD4NY_exports = {};
30
- __export(chunk_YN4MD4NY_exports, {
29
+ var chunk_6NU5L5WI_exports = {};
30
+ __export(chunk_6NU5L5WI_exports, {
31
31
  ValidateError: () => ValidateError,
32
32
  validate: () => validate
33
33
  });
34
- module.exports = __toCommonJS(chunk_YN4MD4NY_exports);
35
- var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
36
- var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
34
+ module.exports = __toCommonJS(chunk_6NU5L5WI_exports);
35
+ var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
37
36
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
38
- var import_chunk_N6RUOMFQ = require("./chunk-N6RUOMFQ.js");
39
- var import_chunk_UHN4BR3K = require("./chunk-UHN4BR3K.js");
37
+ var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
38
+ var import_chunk_2NYEQR5W = require("./chunk-2NYEQR5W.js");
39
+ var import_chunk_KI2DKJN3 = require("./chunk-KI2DKJN3.js");
40
40
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
41
41
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
42
42
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
@@ -59,25 +59,25 @@ ${detailsHeader} ${message}`;
59
59
  }).exhaustive();
60
60
  const errorMessageWithContext = `${constructedErrorMessage}
61
61
  [Context: validate]`;
62
- super((0, import_chunk_N6RUOMFQ.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
+ super((0, import_chunk_2NYEQR5W.addVersionDetailsToErrorMessage)(errorMessageWithContext));
63
63
  this.name = "ValidateError";
64
64
  }
65
65
  };
66
66
  function validate(options) {
67
- const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "validateWasm");
67
+ const debugErrorType = (0, import_chunk_TZJROXB3.createDebugErrorType)(debug, "validateWasm");
68
68
  debug(`Using validate Wasm`);
69
69
  const validateEither = (0, import_function.pipe)(
70
70
  (0, import_chunk_5DBOS77Y.tryCatch)(
71
71
  () => {
72
72
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
73
73
  debug("Triggering a Rust panic...");
74
- import_chunk_UHN4BR3K.prismaSchemaWasm.debug_panic();
74
+ import_chunk_KI2DKJN3.prismaSchemaWasm.debug_panic();
75
75
  }
76
76
  const params = JSON.stringify({
77
77
  prismaSchema: options.schemas,
78
78
  noColor: Boolean(process.env.NO_COLOR)
79
79
  });
80
- import_chunk_UHN4BR3K.prismaSchemaWasm.validate(params);
80
+ import_chunk_KI2DKJN3.prismaSchemaWasm.validate(params);
81
81
  },
82
82
  (e) => ({
83
83
  type: "wasm-error",
@@ -109,7 +109,7 @@ function validate(options) {
109
109
  return panic;
110
110
  }
111
111
  const errorOutput = e.error.message;
112
- return new ValidateError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
112
+ return new ValidateError((0, import_chunk_TZJROXB3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
113
113
  }).exhaustive();
114
114
  throw error;
115
115
  }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var chunk_6TTRTZXU_exports = {};
20
+ __export(chunk_6TTRTZXU_exports, {
21
+ loadLibrary: () => loadLibrary
22
+ });
23
+ module.exports = __toCommonJS(chunk_6TTRTZXU_exports);
24
+ var import_chunk_DZYINYAA = require("./chunk-DZYINYAA.js");
25
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
26
+ function loadLibrary(id, platformInfo) {
27
+ try {
28
+ return (0, import_chunk_4VNS5WPM.__require)(id);
29
+ } catch (e) {
30
+ const errorMessage = (0, import_chunk_DZYINYAA.handleLibraryLoadingErrors)({
31
+ e,
32
+ platformInfo,
33
+ id
34
+ });
35
+ throw new Error(errorMessage);
36
+ }
37
+ }
@@ -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_SMJRM3EM_exports = {};
30
- __export(chunk_SMJRM3EM_exports, {
29
+ var chunk_75BIJ5PX_exports = {};
30
+ __export(chunk_75BIJ5PX_exports, {
31
31
  createDirIfNotExists: () => createDirIfNotExists2,
32
32
  fs_functional_exports: () => fs_functional_exports,
33
33
  getFilesInDir: () => getFilesInDir2,
@@ -37,8 +37,8 @@ __export(chunk_SMJRM3EM_exports, {
37
37
  removeFile: () => removeFile,
38
38
  writeFile: () => writeFile2
39
39
  });
40
- module.exports = __toCommonJS(chunk_SMJRM3EM_exports);
41
- var import_chunk_MLFKBBDL = require("./chunk-MLFKBBDL.js");
40
+ module.exports = __toCommonJS(chunk_75BIJ5PX_exports);
41
+ var import_chunk_TQFONRJP = require("./chunk-TQFONRJP.js");
42
42
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
43
43
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
44
44
  var import_promises = __toESM(require("fs/promises"));
@@ -3981,13 +3981,13 @@ var fs_functional_exports = {};
3981
3981
  });
3982
3982
  var import_function = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_R6QH57HZ.require_function)());
3983
3983
  var TE = (0, import_chunk_4VNS5WPM.__toESM)(require_TaskEither());
3984
- var createDirIfNotExists2 = (dir) => TE.tryCatch(() => (0, import_chunk_MLFKBBDL.createDirIfNotExists)(dir), createTaggedSystemError("fs-create-dir", { dir }));
3985
- var writeFile2 = (params) => TE.tryCatch(() => (0, import_chunk_MLFKBBDL.writeFile)(params), createTaggedSystemError("fs-write-file", params));
3986
- var removeEmptyDirs2 = (dir) => TE.tryCatch(() => (0, import_chunk_MLFKBBDL.removeEmptyDirs)(dir), createTaggedSystemError("fs-remove-empty-dirs", { dir }));
3984
+ var createDirIfNotExists2 = (dir) => TE.tryCatch(() => (0, import_chunk_TQFONRJP.createDirIfNotExists)(dir), createTaggedSystemError("fs-create-dir", { dir }));
3985
+ var writeFile2 = (params) => TE.tryCatch(() => (0, import_chunk_TQFONRJP.writeFile)(params), createTaggedSystemError("fs-write-file", params));
3986
+ var removeEmptyDirs2 = (dir) => TE.tryCatch(() => (0, import_chunk_TQFONRJP.removeEmptyDirs)(dir), createTaggedSystemError("fs-remove-empty-dirs", { dir }));
3987
3987
  var removeDir = (dir) => (0, import_function.pipe)(TE.tryCatch(() => import_promises.default.rm(dir, { recursive: true }), createTaggedSystemError("fs-remove-dir", { dir })));
3988
3988
  var removeFile = (filePath) => (0, import_function.pipe)(TE.tryCatch(() => import_promises.default.unlink(filePath), createTaggedSystemError("fs-remove-file", { filePath })));
3989
- var getNestedFoldersInDir2 = (dir) => () => (0, import_chunk_MLFKBBDL.getNestedFoldersInDir)(dir);
3990
- var getFilesInDir2 = (dir, pattern = "**") => () => (0, import_chunk_MLFKBBDL.getFilesInDir)(dir, pattern);
3989
+ var getNestedFoldersInDir2 = (dir) => () => (0, import_chunk_TQFONRJP.getNestedFoldersInDir)(dir);
3990
+ var getFilesInDir2 = (dir, pattern = "**") => () => (0, import_chunk_TQFONRJP.getFilesInDir)(dir, pattern);
3991
3991
  function createTaggedSystemError(type, meta) {
3992
3992
  return (e) => ({
3993
3993
  type,
@@ -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_WBLG3WYC_exports = {};
30
- __export(chunk_WBLG3WYC_exports, {
29
+ var chunk_77IREUT5_exports = {};
30
+ __export(chunk_77IREUT5_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_WBLG3WYC_exports);
38
- var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
39
- var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
37
+ module.exports = __toCommonJS(chunk_77IREUT5_exports);
38
+ var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
40
39
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
41
- var import_chunk_N6RUOMFQ = require("./chunk-N6RUOMFQ.js");
42
- var import_chunk_UHN4BR3K = require("./chunk-UHN4BR3K.js");
40
+ var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
41
+ var import_chunk_2NYEQR5W = require("./chunk-2NYEQR5W.js");
42
+ var import_chunk_KI2DKJN3 = require("./chunk-KI2DKJN3.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_N6RUOMFQ.addVersionDetailsToErrorMessage)(errorMessageWithContext));
67
+ super((0, import_chunk_2NYEQR5W.addVersionDetailsToErrorMessage)(errorMessageWithContext));
68
68
  this.name = "GetConfigError";
69
69
  }
70
70
  };
@@ -82,17 +82,23 @@ function resolveUrl(envValue) {
82
82
  return urlFromValue ?? urlEnvVarValue;
83
83
  }
84
84
  async function getConfig(options) {
85
- const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getConfigWasm");
85
+ const debugErrorType = (0, import_chunk_TZJROXB3.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_UHN4BR3K.prismaSchemaWasm.debug_panic();
92
+ import_chunk_KI2DKJN3.prismaSchemaWasm.debug_panic();
93
93
  }
94
- const params = JSON.stringify({ prismaSchema: options.datamodel });
95
- return import_chunk_UHN4BR3K.prismaSchemaWasm.get_config(params);
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_KI2DKJN3.prismaSchemaWasm.get_config(params);
101
+ return data;
96
102
  },
97
103
  (e) => ({
98
104
  type: "wasm-error",
@@ -150,12 +156,12 @@ async function getConfig(options) {
150
156
  return panic;
151
157
  }
152
158
  const errorOutput = e.error.message;
153
- return new GetConfigError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
159
+ return new GetConfigError((0, import_chunk_TZJROXB3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
154
160
  }).with({ type: "validation-error" }, (e) => {
155
161
  return new GetConfigError({
156
162
  _tag: "parsed",
157
163
  errorCode: SCHEMA_VALIDATION_ERROR_CODE,
158
- reason: (0, import_chunk_WSZXPLJQ.createSchemaValidationError)(e.reason),
164
+ reason: (0, import_chunk_TZJROXB3.createSchemaValidationError)(e.reason),
159
165
  message: formatErrors(e.error)
160
166
  });
161
167
  }).otherwise((e) => {
@@ -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_MYLPCGTT_exports = {};
20
- __export(chunk_MYLPCGTT_exports, {
19
+ var chunk_7QC5VORA_exports = {};
20
+ __export(chunk_7QC5VORA_exports, {
21
21
  missingDatasource: () => missingDatasource
22
22
  });
23
- module.exports = __toCommonJS(chunk_MYLPCGTT_exports);
24
- var import_chunk_3WXUQZS7 = require("./chunk-3WXUQZS7.js");
23
+ module.exports = __toCommonJS(chunk_7QC5VORA_exports);
24
+ var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.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_3WXUQZS7.link)("https://pris.ly/d/prisma-schema")}
39
+ ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/prisma-schema")}
40
40
  `;
@@ -16,32 +16,27 @@ 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_TGA7DC5A_exports = {};
20
- __export(chunk_TGA7DC5A_exports, {
19
+ var chunk_AX5N26KG_exports = {};
20
+ __export(chunk_AX5N26KG_exports, {
21
21
  missingGeneratorMessage: () => missingGeneratorMessage,
22
22
  missingModelMessage: () => missingModelMessage,
23
23
  missingModelMessageMongoDB: () => missingModelMessageMongoDB
24
24
  });
25
- module.exports = __toCommonJS(chunk_TGA7DC5A_exports);
26
- var import_chunk_3WXUQZS7 = require("./chunk-3WXUQZS7.js");
25
+ module.exports = __toCommonJS(chunk_AX5N26KG_exports);
26
+ var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
27
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)(
31
31
  "schema.prisma"
32
32
  )}, so nothing will be generated.
33
- Add the Prisma Client generator like this:
33
+ You can define them like this:
34
34
 
35
35
  ${(0, import_chunk_PG5FDKSF.bold)(
36
36
  (0, import_chunk_TQCLUNM2.highlightDatamodel)(`generator client {
37
- provider = "prisma-client"
38
- output = "../src/generated/prisma"
37
+ provider = "prisma-client-js"
39
38
  }`)
40
- )}
41
-
42
- More information in our documentation:
43
- ${(0, import_chunk_3WXUQZS7.link)("https://pris.ly/d/prisma-schema")}
44
- `;
39
+ )}`;
45
40
  var missingModelMessage = `
46
41
  You don't have any ${(0, import_chunk_PG5FDKSF.bold)("models")} defined in your ${(0, import_chunk_PG5FDKSF.bold)(
47
42
  "schema.prisma"
@@ -57,7 +52,7 @@ ${(0, import_chunk_PG5FDKSF.bold)(
57
52
  )}
58
53
 
59
54
  More information in our documentation:
60
- ${(0, import_chunk_3WXUQZS7.link)("https://pris.ly/d/prisma-schema")}
55
+ ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/prisma-schema")}
61
56
  `;
62
57
  var missingModelMessageMongoDB = `
63
58
  You don't have any ${(0, import_chunk_PG5FDKSF.bold)("models")} defined in your ${(0, import_chunk_PG5FDKSF.bold)(
@@ -74,5 +69,5 @@ ${(0, import_chunk_PG5FDKSF.bold)(
74
69
  )}
75
70
 
76
71
  More information in our documentation:
77
- ${(0, import_chunk_3WXUQZS7.link)("https://pris.ly/d/prisma-schema")}
72
+ ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/prisma-schema")}
78
73
  `;