@prisma/internals 6.7.0-dev.8 → 6.7.0-dev.9

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 (42) hide show
  1. package/dist/{chunk-SIKWCORD.js → chunk-5RKPRWWR.js} +8 -8
  2. package/dist/{chunk-NSDQUFJK.js → chunk-66MEUNIM.js} +5 -5
  3. package/dist/chunk-CHOXBASF.js +44 -0
  4. package/dist/{chunk-ZJDTLBLE.js → chunk-D52TS7VM.js} +38 -432
  5. package/dist/{chunk-4KUO5ZCG.js → chunk-FNNHLP44.js} +8 -8
  6. package/dist/{chunk-YFTYFRTZ.js → chunk-HFK6DWWG.js} +5 -5
  7. package/dist/{chunk-IYD7V73B.js → chunk-HGPBUEA2.js} +7 -7
  8. package/dist/{chunk-67I7CEQJ.js → chunk-MY5KA4VU.js} +12 -329
  9. package/dist/{chunk-KVEAGFYL.js → chunk-NFMKETO5.js} +24 -418
  10. package/dist/{chunk-FHPXC4QI.js → chunk-PHYZYHLH.js} +8 -8
  11. package/dist/chunk-PSFQKG2Q.js +6291 -0
  12. package/dist/{chunk-IDFG2OX7.js → chunk-Q6WTILFM.js} +4 -4
  13. package/dist/chunk-Q6ZVYPDB.js +41 -0
  14. package/dist/{chunk-5WVW7PVU.js → chunk-QD2ESCTP.js} +5 -5
  15. package/dist/chunk-QS3WUGE3.js +341 -0
  16. package/dist/{chunk-JLKQZQO5.js → chunk-TVRQAS3S.js} +5 -5
  17. package/dist/chunk-WCPUXXL2.js +183 -0
  18. package/dist/chunk-ZCBEMBHR.js +242 -0
  19. package/dist/chunk-ZIFBTC6Y.js +6440 -0
  20. package/dist/cli/checkUnsupportedDataProxy.js +22 -16
  21. package/dist/cli/checkUnsupportedSchemaEngineWasm.js +22 -16
  22. package/dist/cli/getSchema.js +8 -112
  23. package/dist/cli/hashes.js +6 -109
  24. package/dist/cli/schemaContext.js +22 -16
  25. package/dist/engine-commands/errorHelpers.js +4 -4
  26. package/dist/engine-commands/formatSchema.js +21 -15
  27. package/dist/engine-commands/getConfig.js +10 -10
  28. package/dist/engine-commands/getDmmf.js +7 -7
  29. package/dist/engine-commands/index.js +30 -24
  30. package/dist/engine-commands/lintSchema.js +8 -8
  31. package/dist/engine-commands/mergeSchemas.js +7 -7
  32. package/dist/engine-commands/validate.js +7 -7
  33. package/dist/get-generators/getGenerators.js +24 -18
  34. package/dist/getPackedPackage.js +6 -4
  35. package/dist/index.js +51 -45
  36. package/dist/resolvePkg.js +3 -2
  37. package/dist/utils/getEnvPaths.js +5 -106
  38. package/dist/utils/getVersionFromPackageJson.js +3 -3
  39. package/dist/utils/loadEnvFile.js +6 -106
  40. package/dist/wasm.js +5 -5
  41. package/package.json +11 -11
  42. package/dist/chunk-MJIP3FY5.js +0 -12695
@@ -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_SIKWCORD_exports = {};
30
- __export(chunk_SIKWCORD_exports, {
29
+ var chunk_5RKPRWWR_exports = {};
30
+ __export(chunk_5RKPRWWR_exports, {
31
31
  ValidateError: () => ValidateError,
32
32
  validate: () => validate
33
33
  });
34
- module.exports = __toCommonJS(chunk_SIKWCORD_exports);
34
+ module.exports = __toCommonJS(chunk_5RKPRWWR_exports);
35
35
  var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
36
36
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
37
37
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
38
- var import_chunk_5WVW7PVU = require("./chunk-5WVW7PVU.js");
39
- var import_chunk_YFTYFRTZ = require("./chunk-YFTYFRTZ.js");
38
+ var import_chunk_QD2ESCTP = require("./chunk-QD2ESCTP.js");
39
+ var import_chunk_HFK6DWWG = require("./chunk-HFK6DWWG.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,7 +59,7 @@ ${detailsHeader} ${message}`;
59
59
  }).exhaustive();
60
60
  const errorMessageWithContext = `${constructedErrorMessage}
61
61
  [Context: validate]`;
62
- super((0, import_chunk_5WVW7PVU.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
+ super((0, import_chunk_QD2ESCTP.addVersionDetailsToErrorMessage)(errorMessageWithContext));
63
63
  this.name = "ValidateError";
64
64
  }
65
65
  };
@@ -71,13 +71,13 @@ function validate(options) {
71
71
  () => {
72
72
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
73
73
  debug("Triggering a Rust panic...");
74
- import_chunk_YFTYFRTZ.prismaSchemaWasm.debug_panic();
74
+ import_chunk_HFK6DWWG.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_YFTYFRTZ.prismaSchemaWasm.validate(params);
80
+ import_chunk_HFK6DWWG.prismaSchemaWasm.validate(params);
81
81
  },
82
82
  (e) => ({
83
83
  type: "wasm-error",
@@ -16,20 +16,20 @@ 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_NSDQUFJK_exports = {};
20
- __export(chunk_NSDQUFJK_exports, {
19
+ var chunk_66MEUNIM_exports = {};
20
+ __export(chunk_66MEUNIM_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_NSDQUFJK_exports);
28
- var import_chunk_YFTYFRTZ = require("./chunk-YFTYFRTZ.js");
27
+ module.exports = __toCommonJS(chunk_66MEUNIM_exports);
28
+ var import_chunk_HFK6DWWG = require("./chunk-HFK6DWWG.js");
29
29
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
30
30
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
31
31
  function lintSchema({ schemas }) {
32
- const lintResult = import_chunk_YFTYFRTZ.prismaSchemaWasm.lint(JSON.stringify(schemas));
32
+ const lintResult = import_chunk_HFK6DWWG.prismaSchemaWasm.lint(JSON.stringify(schemas));
33
33
  const lintDiagnostics = JSON.parse(lintResult);
34
34
  return lintDiagnostics;
35
35
  }
@@ -0,0 +1,44 @@
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_CHOXBASF_exports = {};
30
+ __export(chunk_CHOXBASF_exports, {
31
+ getCLIPathHash: () => getCLIPathHash,
32
+ getProjectHash: () => getProjectHash
33
+ });
34
+ module.exports = __toCommonJS(chunk_CHOXBASF_exports);
35
+ var import_chunk_ZCBEMBHR = require("./chunk-ZCBEMBHR.js");
36
+ var import_crypto = __toESM(require("crypto"));
37
+ async function getProjectHash(schemaPathFromArgs, schemaPathFromConfig) {
38
+ const projectPath = (await (0, import_chunk_ZCBEMBHR.getSchemaWithPath)(schemaPathFromArgs, schemaPathFromConfig))?.schemaPath ?? process.cwd();
39
+ return import_crypto.default.createHash("sha256").update(projectPath).digest("hex").substring(0, 8);
40
+ }
41
+ function getCLIPathHash() {
42
+ const cliPath = process.argv[1];
43
+ return import_crypto.default.createHash("sha256").update(cliPath).digest("hex").substring(0, 8);
44
+ }