@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
@@ -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_HMGEWJDY_exports = {};
30
- __export(chunk_HMGEWJDY_exports, {
29
+ var chunk_3BND5XB4_exports = {};
30
+ __export(chunk_3BND5XB4_exports, {
31
31
  exists: () => exists,
32
32
  loadEnv: () => loadEnv,
33
33
  pathsEqual: () => pathsEqual,
34
34
  tryLoadEnvs: () => tryLoadEnvs
35
35
  });
36
- module.exports = __toCommonJS(chunk_HMGEWJDY_exports);
36
+ module.exports = __toCommonJS(chunk_3BND5XB4_exports);
37
37
  var import_chunk_T2PM5TKT = require("./chunk-T2PM5TKT.js");
38
38
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
39
39
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
@@ -41,17 +41,17 @@ var import_debug = __toESM(require("@prisma/debug"));
41
41
  var import_fs = __toESM(require("fs"));
42
42
  var import_path = __toESM(require("path"));
43
43
  var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
44
- "../../node_modules/.pnpm/dotenv@16.0.3/node_modules/dotenv/package.json"(exports, module2) {
44
+ "../../node_modules/.pnpm/dotenv@16.4.7/node_modules/dotenv/package.json"(exports, module2) {
45
45
  module2.exports = {
46
46
  name: "dotenv",
47
- version: "16.0.3",
47
+ version: "16.4.7",
48
48
  description: "Loads environment variables from .env file",
49
49
  main: "lib/main.js",
50
50
  types: "lib/main.d.ts",
51
51
  exports: {
52
52
  ".": {
53
- require: "./lib/main.js",
54
53
  types: "./lib/main.d.ts",
54
+ require: "./lib/main.js",
55
55
  default: "./lib/main.js"
56
56
  },
57
57
  "./config": "./config.js",
@@ -65,9 +65,9 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
65
65
  scripts: {
66
66
  "dts-check": "tsc --project tests/types/tsconfig.json",
67
67
  lint: "standard",
68
- "lint-readme": "standard-markdown",
69
68
  pretest: "npm run lint && npm run dts-check",
70
- test: "tap tests/*.js --100 -Rspec",
69
+ test: "tap run --allow-empty-coverage --disable-coverage --timeout=60000",
70
+ "test:coverage": "tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",
71
71
  prerelease: "npm test",
72
72
  release: "standard-version"
73
73
  },
@@ -75,6 +75,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
75
75
  type: "git",
76
76
  url: "git://github.com/motdotla/dotenv.git"
77
77
  },
78
+ funding: "https://dotenvx.com",
78
79
  keywords: [
79
80
  "dotenv",
80
81
  "env",
@@ -87,29 +88,30 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
87
88
  readmeFilename: "README.md",
88
89
  license: "BSD-2-Clause",
89
90
  devDependencies: {
90
- "@types/node": "^17.0.9",
91
- decache: "^4.6.1",
92
- dtslint: "^3.7.0",
93
- sinon: "^12.0.1",
94
- standard: "^16.0.4",
95
- "standard-markdown": "^7.1.0",
96
- "standard-version": "^9.3.2",
97
- tap: "^15.1.6",
98
- tar: "^6.1.11",
99
- typescript: "^4.5.4"
91
+ "@types/node": "^18.11.3",
92
+ decache: "^4.6.2",
93
+ sinon: "^14.0.1",
94
+ standard: "^17.0.0",
95
+ "standard-version": "^9.5.0",
96
+ tap: "^19.2.0",
97
+ typescript: "^4.8.4"
100
98
  },
101
99
  engines: {
102
100
  node: ">=12"
101
+ },
102
+ browser: {
103
+ fs: false
103
104
  }
104
105
  };
105
106
  }
106
107
  });
107
108
  var require_main = (0, import_chunk_WWAWV7DQ.__commonJS)({
108
- "../../node_modules/.pnpm/dotenv@16.0.3/node_modules/dotenv/lib/main.js"(exports, module2) {
109
+ "../../node_modules/.pnpm/dotenv@16.4.7/node_modules/dotenv/lib/main.js"(exports, module2) {
109
110
  "use strict";
110
111
  var fs2 = (0, import_chunk_WWAWV7DQ.__require)("fs");
111
112
  var path2 = (0, import_chunk_WWAWV7DQ.__require)("path");
112
113
  var os = (0, import_chunk_WWAWV7DQ.__require)("os");
114
+ var crypto = (0, import_chunk_WWAWV7DQ.__require)("crypto");
113
115
  var packageJson = require_package();
114
116
  var version = packageJson.version;
115
117
  var LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
@@ -132,57 +134,240 @@ var require_main = (0, import_chunk_WWAWV7DQ.__commonJS)({
132
134
  }
133
135
  return obj;
134
136
  }
137
+ function _parseVault(options) {
138
+ const vaultPath = _vaultPath(options);
139
+ const result = DotenvModule.configDotenv({ path: vaultPath });
140
+ if (!result.parsed) {
141
+ const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
142
+ err.code = "MISSING_DATA";
143
+ throw err;
144
+ }
145
+ const keys = _dotenvKey(options).split(",");
146
+ const length = keys.length;
147
+ let decrypted;
148
+ for (let i = 0; i < length; i++) {
149
+ try {
150
+ const key = keys[i].trim();
151
+ const attrs = _instructions(result, key);
152
+ decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key);
153
+ break;
154
+ } catch (error) {
155
+ if (i + 1 >= length) {
156
+ throw error;
157
+ }
158
+ }
159
+ }
160
+ return DotenvModule.parse(decrypted);
161
+ }
135
162
  function _log(message) {
163
+ console.log(`[dotenv@${version}][INFO] ${message}`);
164
+ }
165
+ function _warn(message) {
166
+ console.log(`[dotenv@${version}][WARN] ${message}`);
167
+ }
168
+ function _debug(message) {
136
169
  console.log(`[dotenv@${version}][DEBUG] ${message}`);
137
170
  }
171
+ function _dotenvKey(options) {
172
+ if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {
173
+ return options.DOTENV_KEY;
174
+ }
175
+ if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {
176
+ return process.env.DOTENV_KEY;
177
+ }
178
+ return "";
179
+ }
180
+ function _instructions(result, dotenvKey) {
181
+ let uri;
182
+ try {
183
+ uri = new URL(dotenvKey);
184
+ } catch (error) {
185
+ if (error.code === "ERR_INVALID_URL") {
186
+ const err = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
187
+ err.code = "INVALID_DOTENV_KEY";
188
+ throw err;
189
+ }
190
+ throw error;
191
+ }
192
+ const key = uri.password;
193
+ if (!key) {
194
+ const err = new Error("INVALID_DOTENV_KEY: Missing key part");
195
+ err.code = "INVALID_DOTENV_KEY";
196
+ throw err;
197
+ }
198
+ const environment = uri.searchParams.get("environment");
199
+ if (!environment) {
200
+ const err = new Error("INVALID_DOTENV_KEY: Missing environment part");
201
+ err.code = "INVALID_DOTENV_KEY";
202
+ throw err;
203
+ }
204
+ const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`;
205
+ const ciphertext = result.parsed[environmentKey];
206
+ if (!ciphertext) {
207
+ const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
208
+ err.code = "NOT_FOUND_DOTENV_ENVIRONMENT";
209
+ throw err;
210
+ }
211
+ return { ciphertext, key };
212
+ }
213
+ function _vaultPath(options) {
214
+ let possibleVaultPath = null;
215
+ if (options && options.path && options.path.length > 0) {
216
+ if (Array.isArray(options.path)) {
217
+ for (const filepath of options.path) {
218
+ if (fs2.existsSync(filepath)) {
219
+ possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
220
+ }
221
+ }
222
+ } else {
223
+ possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
224
+ }
225
+ } else {
226
+ possibleVaultPath = path2.resolve(process.cwd(), ".env.vault");
227
+ }
228
+ if (fs2.existsSync(possibleVaultPath)) {
229
+ return possibleVaultPath;
230
+ }
231
+ return null;
232
+ }
138
233
  function _resolveHome(envPath) {
139
234
  return envPath[0] === "~" ? path2.join(os.homedir(), envPath.slice(1)) : envPath;
140
235
  }
141
- function config(options) {
142
- let dotenvPath = path2.resolve(process.cwd(), ".env");
236
+ function _configVault(options) {
237
+ _log("Loading env from encrypted .env.vault");
238
+ const parsed = DotenvModule._parseVault(options);
239
+ let processEnv = process.env;
240
+ if (options && options.processEnv != null) {
241
+ processEnv = options.processEnv;
242
+ }
243
+ DotenvModule.populate(processEnv, parsed, options);
244
+ return { parsed };
245
+ }
246
+ function configDotenv(options) {
247
+ const dotenvPath = path2.resolve(process.cwd(), ".env");
143
248
  let encoding = "utf8";
144
249
  const debug2 = Boolean(options && options.debug);
145
- const override = Boolean(options && options.override);
146
- if (options) {
147
- if (options.path != null) {
148
- dotenvPath = _resolveHome(options.path);
250
+ if (options && options.encoding) {
251
+ encoding = options.encoding;
252
+ } else {
253
+ if (debug2) {
254
+ _debug("No encoding is specified. UTF-8 is used by default");
149
255
  }
150
- if (options.encoding != null) {
151
- encoding = options.encoding;
256
+ }
257
+ let optionPaths = [dotenvPath];
258
+ if (options && options.path) {
259
+ if (!Array.isArray(options.path)) {
260
+ optionPaths = [_resolveHome(options.path)];
261
+ } else {
262
+ optionPaths = [];
263
+ for (const filepath of options.path) {
264
+ optionPaths.push(_resolveHome(filepath));
265
+ }
152
266
  }
153
267
  }
268
+ let lastError;
269
+ const parsedAll = {};
270
+ for (const path3 of optionPaths) {
271
+ try {
272
+ const parsed = DotenvModule.parse(fs2.readFileSync(path3, { encoding }));
273
+ DotenvModule.populate(parsedAll, parsed, options);
274
+ } catch (e) {
275
+ if (debug2) {
276
+ _debug(`Failed to load ${path3} ${e.message}`);
277
+ }
278
+ lastError = e;
279
+ }
280
+ }
281
+ let processEnv = process.env;
282
+ if (options && options.processEnv != null) {
283
+ processEnv = options.processEnv;
284
+ }
285
+ DotenvModule.populate(processEnv, parsedAll, options);
286
+ if (lastError) {
287
+ return { parsed: parsedAll, error: lastError };
288
+ } else {
289
+ return { parsed: parsedAll };
290
+ }
291
+ }
292
+ function config(options) {
293
+ if (_dotenvKey(options).length === 0) {
294
+ return DotenvModule.configDotenv(options);
295
+ }
296
+ const vaultPath = _vaultPath(options);
297
+ if (!vaultPath) {
298
+ _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`);
299
+ return DotenvModule.configDotenv(options);
300
+ }
301
+ return DotenvModule._configVault(options);
302
+ }
303
+ function decrypt(encrypted, keyStr) {
304
+ const key = Buffer.from(keyStr.slice(-64), "hex");
305
+ let ciphertext = Buffer.from(encrypted, "base64");
306
+ const nonce = ciphertext.subarray(0, 12);
307
+ const authTag = ciphertext.subarray(-16);
308
+ ciphertext = ciphertext.subarray(12, -16);
154
309
  try {
155
- const parsed = DotenvModule.parse(fs2.readFileSync(dotenvPath, { encoding }));
156
- Object.keys(parsed).forEach(function(key) {
157
- if (!Object.prototype.hasOwnProperty.call(process.env, key)) {
158
- process.env[key] = parsed[key];
159
- } else {
310
+ const aesgcm = crypto.createDecipheriv("aes-256-gcm", key, nonce);
311
+ aesgcm.setAuthTag(authTag);
312
+ return `${aesgcm.update(ciphertext)}${aesgcm.final()}`;
313
+ } catch (error) {
314
+ const isRange = error instanceof RangeError;
315
+ const invalidKeyLength = error.message === "Invalid key length";
316
+ const decryptionFailed = error.message === "Unsupported state or unable to authenticate data";
317
+ if (isRange || invalidKeyLength) {
318
+ const err = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
319
+ err.code = "INVALID_DOTENV_KEY";
320
+ throw err;
321
+ } else if (decryptionFailed) {
322
+ const err = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
323
+ err.code = "DECRYPTION_FAILED";
324
+ throw err;
325
+ } else {
326
+ throw error;
327
+ }
328
+ }
329
+ }
330
+ function populate(processEnv, parsed, options = {}) {
331
+ const debug2 = Boolean(options && options.debug);
332
+ const override = Boolean(options && options.override);
333
+ if (typeof parsed !== "object") {
334
+ const err = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
335
+ err.code = "OBJECT_REQUIRED";
336
+ throw err;
337
+ }
338
+ for (const key of Object.keys(parsed)) {
339
+ if (Object.prototype.hasOwnProperty.call(processEnv, key)) {
340
+ if (override === true) {
341
+ processEnv[key] = parsed[key];
342
+ }
343
+ if (debug2) {
160
344
  if (override === true) {
161
- process.env[key] = parsed[key];
162
- }
163
- if (debug2) {
164
- if (override === true) {
165
- _log(`"${key}" is already defined in \`process.env\` and WAS overwritten`);
166
- } else {
167
- _log(`"${key}" is already defined in \`process.env\` and was NOT overwritten`);
168
- }
345
+ _debug(`"${key}" is already defined and WAS overwritten`);
346
+ } else {
347
+ _debug(`"${key}" is already defined and was NOT overwritten`);
169
348
  }
170
349
  }
171
- });
172
- return { parsed };
173
- } catch (e) {
174
- if (debug2) {
175
- _log(`Failed to load ${dotenvPath} ${e.message}`);
350
+ } else {
351
+ processEnv[key] = parsed[key];
176
352
  }
177
- return { error: e };
178
353
  }
179
354
  }
180
355
  var DotenvModule = {
356
+ configDotenv,
357
+ _configVault,
358
+ _parseVault,
181
359
  config,
182
- parse
360
+ decrypt,
361
+ parse,
362
+ populate
183
363
  };
364
+ module2.exports.configDotenv = DotenvModule.configDotenv;
365
+ module2.exports._configVault = DotenvModule._configVault;
366
+ module2.exports._parseVault = DotenvModule._parseVault;
184
367
  module2.exports.config = DotenvModule.config;
368
+ module2.exports.decrypt = DotenvModule.decrypt;
185
369
  module2.exports.parse = DotenvModule.parse;
370
+ module2.exports.populate = DotenvModule.populate;
186
371
  module2.exports = DotenvModule;
187
372
  }
188
373
  });
@@ -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_COFXY6NH_exports = {};
30
- __export(chunk_COFXY6NH_exports, {
29
+ var chunk_4B7GQDQF_exports = {};
30
+ __export(chunk_4B7GQDQF_exports, {
31
31
  GetDmmfError: () => GetDmmfError,
32
32
  getDMMF: () => getDMMF
33
33
  });
34
- module.exports = __toCommonJS(chunk_COFXY6NH_exports);
34
+ module.exports = __toCommonJS(chunk_4B7GQDQF_exports);
35
35
  var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
36
- var import_chunk_IAEMHQAC = require("./chunk-IAEMHQAC.js");
37
- var import_chunk_KNNIRRTO = require("./chunk-KNNIRRTO.js");
36
+ var import_chunk_CXEMRKV4 = require("./chunk-CXEMRKV4.js");
37
+ var import_chunk_UKDMRXVN = require("./chunk-UKDMRXVN.js");
38
38
  var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
39
- var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
40
- var import_chunk_2WJPHJ2I = require("./chunk-2WJPHJ2I.js");
39
+ var import_chunk_25RJ7YTB = require("./chunk-25RJ7YTB.js");
40
+ var import_chunk_MAWSAR5P = require("./chunk-MAWSAR5P.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");
@@ -48,7 +48,7 @@ var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_PFLLVW
48
48
  var debug = (0, import_debug.default)("prisma:getDMMF");
49
49
  var GetDmmfError = 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}
@@ -60,13 +60,12 @@ ${detailsHeader} ${message}`;
60
60
  }).exhaustive();
61
61
  const errorMessageWithContext = `${constructedErrorMessage}
62
62
  [Context: getDmmf]`;
63
- super((0, import_chunk_KNNIRRTO.addVersionDetailsToErrorMessage)(errorMessageWithContext));
63
+ super((0, import_chunk_UKDMRXVN.addVersionDetailsToErrorMessage)(errorMessageWithContext));
64
64
  this.name = "GetDmmfError";
65
65
  }
66
66
  };
67
67
  async function getDMMF(options) {
68
- warnOnDeprecatedFeatureFlag(options.previewFeatures);
69
- const debugErrorType = (0, import_chunk_IAEMHQAC.createDebugErrorType)(debug, "getDmmfWasm");
68
+ const debugErrorType = (0, import_chunk_CXEMRKV4.createDebugErrorType)(debug, "getDmmfWasm");
70
69
  debug(`Using getDmmf Wasm`);
71
70
  const dmmfPipeline = (0, import_function.pipe)(
72
71
  (0, import_chunk_7MD6344A.tryCatch2)(
@@ -91,13 +90,13 @@ async function getDMMF(options) {
91
90
  () => {
92
91
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
93
92
  debug("Triggering a Rust panic...");
94
- import_chunk_2WJPHJ2I.prismaSchemaWasm.debug_panic();
93
+ import_chunk_MAWSAR5P.prismaSchemaWasm.debug_panic();
95
94
  }
96
95
  const params = JSON.stringify({
97
96
  prismaSchema: datamodel,
98
97
  noColor: Boolean(process.env.NO_COLOR)
99
98
  });
100
- const data = import_chunk_2WJPHJ2I.prismaSchemaWasm.get_dmmf(params);
99
+ const data = import_chunk_MAWSAR5P.prismaSchemaWasm.get_dmmf(params);
101
100
  return data;
102
101
  },
103
102
  (e) => ({
@@ -130,7 +129,7 @@ async function getDMMF(options) {
130
129
  const { right: data } = dmmfEither;
131
130
  return Promise.resolve(data);
132
131
  }
133
- const error = (0, import_chunk_H3T4L34H.$)(dmmfEither.left).with({ type: "read-datamodel-path" }, (e) => {
132
+ const error = (0, import_chunk_25RJ7YTB.z)(dmmfEither.left).with({ type: "read-datamodel-path" }, (e) => {
134
133
  debugErrorType(e);
135
134
  return new GetDmmfError({
136
135
  _tag: "unparsed",
@@ -158,36 +157,10 @@ Datamodel path: "${e.datamodelPath}"`,
158
157
  return panic;
159
158
  }
160
159
  const errorOutput = e.error.message;
161
- return new GetDmmfError((0, import_chunk_IAEMHQAC.parseQueryEngineError)({ errorOutput, reason: e.reason }));
160
+ return new GetDmmfError((0, import_chunk_CXEMRKV4.parseQueryEngineError)({ errorOutput, reason: e.reason }));
162
161
  }).with({ type: "parse-json" }, (e) => {
163
162
  debugErrorType(e);
164
163
  return new GetDmmfError({ _tag: "unparsed", message: e.error.message, reason: e.reason });
165
164
  }).exhaustive();
166
165
  throw error;
167
166
  }
168
- function warnOnDeprecatedFeatureFlag(previewFeatures) {
169
- const getMessage = (flag) => `${(0, import_chunk_PG5FDKSF.blue)((0, import_chunk_PG5FDKSF.bold)("info"))} The preview flag "${flag}" is not needed anymore, please remove it from your schema.prisma`;
170
- const removedFeatureFlagMap = {
171
- insensitiveFilters: getMessage("insensitiveFilters"),
172
- atomicNumberOperations: getMessage("atomicNumberOperations"),
173
- connectOrCreate: getMessage("connectOrCreate"),
174
- transaction: getMessage("transaction"),
175
- nApi: getMessage("nApi"),
176
- transactionApi: getMessage("transactionApi"),
177
- uncheckedScalarInputs: getMessage("uncheckedScalarInputs"),
178
- nativeTypes: getMessage("nativeTypes"),
179
- createMany: getMessage("createMany"),
180
- groupBy: getMessage("groupBy"),
181
- referentialActions: getMessage("referentialActions"),
182
- microsoftSqlServer: getMessage("microsoftSqlServer"),
183
- selectRelationCount: getMessage("selectRelationCount"),
184
- orderByRelation: getMessage("orderByRelation"),
185
- orderByAggregateGroup: getMessage("orderByAggregateGroup")
186
- };
187
- previewFeatures?.forEach((f) => {
188
- const removedMessage = removedFeatureFlagMap[f];
189
- if (removedMessage && !process.env.PRISMA_HIDE_PREVIEW_FLAG_WARNINGS) {
190
- console.warn(removedMessage);
191
- }
192
- });
193
- }
@@ -16,21 +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_5R7AZFMV_exports = {};
20
- __export(chunk_5R7AZFMV_exports, {
19
+ var chunk_4SIGCPK2_exports = {};
20
+ __export(chunk_4SIGCPK2_exports, {
21
21
  getLintWarnings: () => getLintWarnings,
22
22
  getLintWarningsAsText: () => getLintWarningsAsText,
23
23
  handleLintPanic: () => handleLintPanic,
24
24
  lintSchema: () => lintSchema,
25
25
  warningToString: () => warningToString
26
26
  });
27
- module.exports = __toCommonJS(chunk_5R7AZFMV_exports);
27
+ module.exports = __toCommonJS(chunk_4SIGCPK2_exports);
28
28
  var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
29
- var import_chunk_2WJPHJ2I = require("./chunk-2WJPHJ2I.js");
29
+ var import_chunk_MAWSAR5P = require("./chunk-MAWSAR5P.js");
30
30
  var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
31
31
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
32
32
  function lintSchema({ schemas }) {
33
- const lintResult = import_chunk_2WJPHJ2I.prismaSchemaWasm.lint(JSON.stringify(schemas));
33
+ const lintResult = import_chunk_MAWSAR5P.prismaSchemaWasm.lint(JSON.stringify(schemas));
34
34
  const lintDiagnostics = JSON.parse(lintResult);
35
35
  return lintDiagnostics;
36
36
  }
@@ -16,17 +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_KROMVQBD_exports = {};
20
- __export(chunk_KROMVQBD_exports, {
19
+ var chunk_57OBCDVS_exports = {};
20
+ __export(chunk_57OBCDVS_exports, {
21
21
  require_package: () => require_package
22
22
  });
23
- module.exports = __toCommonJS(chunk_KROMVQBD_exports);
23
+ module.exports = __toCommonJS(chunk_57OBCDVS_exports);
24
24
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
25
25
  var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
26
26
  "package.json"(exports, module2) {
27
27
  module2.exports = {
28
28
  name: "@prisma/internals",
29
- version: "6.3.0-integration-simpler-typeinfo-query.1",
29
+ version: "6.3.0-integration-fix-subcommands-esm-projects.1",
30
30
  description: "This package is intended for Prisma's internal use",
31
31
  main: "dist/index.js",
32
32
  types: "dist/index.d.ts",
@@ -57,16 +57,16 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
57
57
  "@babel/helper-validator-identifier": "7.24.7",
58
58
  "@opentelemetry/api": "1.9.0",
59
59
  "@swc/core": "1.2.204",
60
- "@swc/jest": "0.2.36",
60
+ "@swc/jest": "0.2.37",
61
61
  "@types/babel__helper-validator-identifier": "7.15.2",
62
- "@types/jest": "29.5.12",
62
+ "@types/jest": "29.5.14",
63
63
  "@types/node": "18.19.31",
64
64
  "@types/resolve": "1.20.6",
65
65
  archiver: "6.0.2",
66
66
  "checkpoint-client": "1.1.33",
67
67
  "cli-truncate": "2.1.0",
68
- dotenv: "16.0.3",
69
- esbuild: "0.23.0",
68
+ dotenv: "16.4.7",
69
+ esbuild: "0.24.2",
70
70
  "escape-string-regexp": "4.0.0",
71
71
  execa: "5.1.1",
72
72
  "fast-glob": "3.3.2",
@@ -100,7 +100,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
100
100
  "terminal-link": "2.1.1",
101
101
  tmp: "0.2.3",
102
102
  "ts-node": "10.9.2",
103
- "ts-pattern": "5.2.0",
103
+ "ts-pattern": "5.6.0",
104
104
  "ts-toolbelt": "9.6.0",
105
105
  typescript: "5.4.5",
106
106
  yarn: "1.22.22"
@@ -111,7 +111,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
111
111
  "@prisma/fetch-engine": "workspace:*",
112
112
  "@prisma/generator-helper": "workspace:*",
113
113
  "@prisma/get-platform": "workspace:*",
114
- "@prisma/prisma-schema-wasm": "6.3.0-6.integration-5-22-0-with-simplified-typeinfo-c7d99d9db5129d8b35986b8518c7f10bc8580e03",
114
+ "@prisma/prisma-schema-wasm": "6.3.0-16.eb5bc5493ac383a8fe3c3e7fabfc93e4d44ca21e",
115
115
  "@prisma/schema-files-loader": "workspace:*",
116
116
  arg: "5.0.2",
117
117
  prompts: "2.4.2"
@@ -26,11 +26,11 @@ 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_5I4BOTBV_exports = {};
30
- __export(chunk_5I4BOTBV_exports, {
29
+ var chunk_5MCWLJSR_exports = {};
30
+ __export(chunk_5MCWLJSR_exports, {
31
31
  isCurrentBinInstalledGlobally: () => isCurrentBinInstalledGlobally
32
32
  });
33
- module.exports = __toCommonJS(chunk_5I4BOTBV_exports);
33
+ module.exports = __toCommonJS(chunk_5MCWLJSR_exports);
34
34
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
35
35
  var import_fs = __toESM(require("fs"));
36
36
  var require_ini = (0, import_chunk_WWAWV7DQ.__commonJS)({
@@ -286,16 +286,10 @@ var import_global_dirs = (0, import_chunk_WWAWV7DQ.__toESM)(require_global_dirs(
286
286
  function isCurrentBinInstalledGlobally() {
287
287
  try {
288
288
  const realPrismaPath = import_fs.default.realpathSync(process.argv[1]);
289
- const usingGlobalYarn = realPrismaPath.indexOf(import_global_dirs.default.yarn.packages) === 0;
290
289
  const usingGlobalNpm = realPrismaPath.indexOf(import_fs.default.realpathSync(import_global_dirs.default.npm.packages)) === 0;
291
290
  if (usingGlobalNpm) {
292
291
  return "npm";
293
292
  }
294
- if (usingGlobalYarn) {
295
- return "yarn";
296
- } else {
297
- false;
298
- }
299
293
  } catch (e) {
300
294
  }
301
295
  return false;