@prisma/internals 6.6.0-integration-push-xmzqvqxpztks.5 → 6.6.0-integration-feat-orm-693-d1-driver-create-migration-adapter-using-new-http-binding.2

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 (80) hide show
  1. package/dist/Generator.d.ts +5 -23
  2. package/dist/Generator.js +2 -4
  3. package/dist/{chunk-I7MGLNDS.js → chunk-3Y2LOGEP.js} +287 -111
  4. package/dist/chunk-72UZXEBG.js +28 -0
  5. package/dist/{chunk-TGNGIHD7.js → chunk-75AJJ2SV.js} +5 -5
  6. package/dist/{chunk-3R43ZQD7.js → chunk-ABTIXQDX.js} +4 -3
  7. package/dist/{chunk-3IW5B4VR.js → chunk-BC6RF6PC.js} +5 -5
  8. package/dist/{chunk-HD2DLZ4P.js → chunk-BTWAF3S4.js} +7 -7
  9. package/dist/chunk-BWGDP6B5.js +4948 -0
  10. package/dist/{chunk-BPDMLM32.js → chunk-DYVL6P7F.js} +13 -46
  11. package/dist/chunk-EUTJYQDW.js +46 -0
  12. package/dist/chunk-EWWOTVR3.js +52 -0
  13. package/dist/chunk-GHHABGYW.js +28 -0
  14. package/dist/{chunk-RN2HKPE6.js → chunk-GIOVJ5SL.js} +8 -8
  15. package/dist/{chunk-3CHXBY5J.js → chunk-HX2VLZFY.js} +287 -111
  16. package/dist/{chunk-MJIP3FY5.js → chunk-K5W6WZ6E.js} +238 -6
  17. package/dist/{chunk-UZ3OMVFB.js → chunk-LHESHKC2.js} +5 -5
  18. package/dist/{chunk-IYZKSKPJ.js → chunk-MSQTODVE.js} +8 -8
  19. package/dist/{chunk-C73SLFIL.js → chunk-PQE76XRR.js} +5 -5
  20. package/dist/chunk-QGJH4P4N.js +35 -0
  21. package/dist/{chunk-S2R7ACYL.js → chunk-QPHQEGC5.js} +8 -8
  22. package/dist/{chunk-XNFIABGN.js → chunk-RUJGWM5Y.js} +5 -5
  23. package/dist/{chunk-JWAHHTQF.js → chunk-SA65PE7P.js} +5 -5
  24. package/dist/{chunk-S3DSAPBW.js → chunk-T45XO7V4.js} +8 -8
  25. package/dist/{chunk-7JDKTQ7P.js → chunk-T6YMHO44.js} +7 -7
  26. package/dist/{chunk-2H6XXXKO.js → chunk-TV34NMBZ.js} +12 -15
  27. package/dist/{chunk-67I7CEQJ.js → chunk-VVPSLVOR.js} +7 -6
  28. package/dist/{chunk-UPQKNKIW.js → chunk-WHZN3ZOU.js} +5 -5
  29. package/dist/{chunk-MVHUHZE5.js → chunk-XKIMYV5V.js} +5 -5
  30. package/dist/{chunk-3BXWI45I.js → chunk-XPXF244W.js} +5 -4
  31. package/dist/{chunk-IMOWQZSF.js → chunk-XQSHUIJ5.js} +8 -8
  32. package/dist/{chunk-VSRVLIUX.js → chunk-YKPF4IDJ.js} +8 -8
  33. package/dist/cli/checkUnsupportedDataProxy.js +29 -23
  34. package/dist/cli/directoryConfig.d.ts +1 -1
  35. package/dist/cli/directoryConfig.js +2 -2
  36. package/dist/cli/getSchema.d.ts +28 -3
  37. package/dist/cli/getSchema.js +33 -26
  38. package/dist/cli/hashes.d.ts +2 -1
  39. package/dist/cli/hashes.js +29 -23
  40. package/dist/cli/schemaContext.d.ts +3 -4
  41. package/dist/cli/schemaContext.js +29 -23
  42. package/dist/engine-commands/errorHelpers.js +4 -4
  43. package/dist/engine-commands/formatSchema.js +28 -22
  44. package/dist/engine-commands/getConfig.js +10 -10
  45. package/dist/engine-commands/getDmmf.js +7 -7
  46. package/dist/engine-commands/index.js +37 -31
  47. package/dist/engine-commands/lintSchema.js +8 -8
  48. package/dist/engine-commands/mergeSchemas.js +7 -7
  49. package/dist/engine-commands/validate.js +7 -7
  50. package/dist/get-generators/generatorResolvers/generatorResolvers.d.ts +15 -0
  51. package/dist/get-generators/generatorResolvers/generatorResolvers.js +138 -0
  52. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.d.ts +6 -0
  53. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.js +26 -0
  54. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.d.ts +9 -0
  55. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +26 -0
  56. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.d.ts +8 -0
  57. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +29 -0
  58. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.d.ts +6 -0
  59. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +138 -0
  60. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.d.ts +1 -0
  61. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +26 -0
  62. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.d.ts +20 -0
  63. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.js +26 -0
  64. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.d.ts +7 -0
  65. package/dist/{resolvePkg.js → get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.js} +6 -6
  66. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.d.ts +1 -0
  67. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.js +17 -0
  68. package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.d.ts +20 -0
  69. package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +139 -0
  70. package/dist/get-generators/getGenerators.d.ts +9 -18
  71. package/dist/get-generators/getGenerators.js +31 -25
  72. package/dist/getPackedPackage.js +3 -3
  73. package/dist/index.d.ts +5 -3
  74. package/dist/index.js +60 -53
  75. package/dist/utils/getEnvPaths.js +28 -22
  76. package/dist/utils/getVersionFromPackageJson.js +3 -3
  77. package/dist/utils/loadEnvFile.js +28 -22
  78. package/dist/wasm.js +4 -4
  79. package/package.json +11 -10
  80. package/dist/resolvePkg.d.ts +0 -7
@@ -16,31 +16,34 @@ 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_BPDMLM32_exports = {};
20
- __export(chunk_BPDMLM32_exports, {
21
- Generator: () => Generator,
22
- InProcessGenerator: () => InProcessGenerator,
23
- JsonRpcGenerator: () => JsonRpcGenerator
19
+ var chunk_DYVL6P7F_exports = {};
20
+ __export(chunk_DYVL6P7F_exports, {
21
+ Generator: () => Generator
24
22
  });
25
- module.exports = __toCommonJS(chunk_BPDMLM32_exports);
23
+ module.exports = __toCommonJS(chunk_DYVL6P7F_exports);
26
24
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
27
25
  var import_generator_helper = require("@prisma/generator-helper");
28
26
  var Generator = class {
27
+ generatorProcess;
29
28
  manifest = null;
30
29
  config;
31
30
  options;
32
- constructor(config) {
31
+ constructor(executablePath, config, isNode) {
33
32
  this.config = config;
33
+ this.generatorProcess = new import_generator_helper.GeneratorProcess(executablePath, { isNode });
34
34
  }
35
35
  async init() {
36
- await this.initImpl();
37
- this.manifest = await this.getManifest();
36
+ await this.generatorProcess.init();
37
+ this.manifest = await this.generatorProcess.getManifest(this.config);
38
+ }
39
+ stop() {
40
+ this.generatorProcess.stop();
38
41
  }
39
42
  generate() {
40
43
  if (!this.options) {
41
44
  throw new Error(`Please first run .setOptions() on the Generator to initialize the options`);
42
45
  }
43
- return this.generateImpl(this.options);
46
+ return this.generatorProcess.generate(this.options);
44
47
  }
45
48
  setOptions(options) {
46
49
  this.options = options;
@@ -67,39 +70,3 @@ var Generator = class {
67
70
  return (0, import_chunk_IOIAK7V7.parseEnvValue)(this.config.provider);
68
71
  }
69
72
  };
70
- var JsonRpcGenerator = class extends Generator {
71
- #generatorProcess;
72
- constructor(executablePath, config, isNode) {
73
- super(config);
74
- this.#generatorProcess = new import_generator_helper.GeneratorProcess(executablePath, { isNode });
75
- }
76
- async initImpl() {
77
- await this.#generatorProcess.init();
78
- }
79
- async getManifest() {
80
- return await this.#generatorProcess.getManifest(this.config);
81
- }
82
- async generateImpl(options) {
83
- await this.#generatorProcess.generate(options);
84
- }
85
- stop() {
86
- this.#generatorProcess.stop();
87
- }
88
- };
89
- var InProcessGenerator = class extends Generator {
90
- #generator;
91
- constructor(config, generator) {
92
- super(config);
93
- this.#generator = generator;
94
- }
95
- async initImpl() {
96
- }
97
- async getManifest() {
98
- return await this.#generator.getManifest(this.config);
99
- }
100
- async generateImpl(options) {
101
- await this.#generator.generate(options);
102
- }
103
- stop() {
104
- }
105
- };
@@ -0,0 +1,46 @@
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_EUTJYQDW_exports = {};
20
+ __export(chunk_EUTJYQDW_exports, {
21
+ semverLt: () => semverLt
22
+ });
23
+ module.exports = __toCommonJS(chunk_EUTJYQDW_exports);
24
+ function semverLt(a, b) {
25
+ const [major1, minor1, patch1] = a.split(".").map(Number);
26
+ const [major2, minor2, patch2] = b.split(".").map(Number);
27
+ if (major1 < major2) {
28
+ return true;
29
+ }
30
+ if (major1 > major2) {
31
+ return false;
32
+ }
33
+ if (minor1 < minor2) {
34
+ return true;
35
+ }
36
+ if (minor1 > minor2) {
37
+ return false;
38
+ }
39
+ if (patch1 < patch2) {
40
+ return true;
41
+ }
42
+ if (patch1 > patch2) {
43
+ return false;
44
+ }
45
+ return false;
46
+ }
@@ -0,0 +1,52 @@
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_EWWOTVR3_exports = {};
30
+ __export(chunk_EWWOTVR3_exports, {
31
+ findPrismaClientDir: () => findPrismaClientDir
32
+ });
33
+ module.exports = __toCommonJS(chunk_EWWOTVR3_exports);
34
+ var import_chunk_VVPSLVOR = require("./chunk-VVPSLVOR.js");
35
+ var import_debug = __toESM(require("@prisma/debug"));
36
+ var import_fs = __toESM(require("fs"));
37
+ var import_path = __toESM(require("path"));
38
+ var debug = (0, import_debug.default)("prisma:generator");
39
+ var realPath = import_fs.default.promises.realpath;
40
+ async function findPrismaClientDir(baseDir) {
41
+ const resolveOpts = { basedir: baseDir, preserveSymlinks: true };
42
+ const CLIDir = await (0, import_chunk_VVPSLVOR.resolvePkg)("prisma", resolveOpts);
43
+ const clientDir = await (0, import_chunk_VVPSLVOR.resolvePkg)("@prisma/client", resolveOpts);
44
+ const resolvedClientDir = clientDir && await realPath(clientDir);
45
+ debug("prismaCLIDir", CLIDir);
46
+ debug("prismaClientDir", clientDir);
47
+ if (CLIDir === void 0) return resolvedClientDir;
48
+ if (clientDir === void 0) return resolvedClientDir;
49
+ const relDir = import_path.default.relative(CLIDir, clientDir).split(import_path.default.sep);
50
+ if (relDir[0] !== ".." || relDir[1] === "..") return void 0;
51
+ return resolvedClientDir;
52
+ }
@@ -0,0 +1,28 @@
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_GHHABGYW_exports = {};
20
+ __export(chunk_GHHABGYW_exports, {
21
+ isYarnUsed: () => isYarnUsed
22
+ });
23
+ module.exports = __toCommonJS(chunk_GHHABGYW_exports);
24
+ var import_chunk_BWGDP6B5 = require("./chunk-BWGDP6B5.js");
25
+ async function isYarnUsed(baseDir) {
26
+ const packageManager = await (0, import_chunk_BWGDP6B5.detect)({ cwd: baseDir, autoInstall: false, programmatic: true });
27
+ return packageManager === "yarn" || packageManager === "yarn@berry";
28
+ }
@@ -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_RN2HKPE6_exports = {};
30
- __export(chunk_RN2HKPE6_exports, {
29
+ var chunk_GIOVJ5SL_exports = {};
30
+ __export(chunk_GIOVJ5SL_exports, {
31
31
  GetDmmfError: () => GetDmmfError,
32
32
  getDMMF: () => getDMMF
33
33
  });
34
- module.exports = __toCommonJS(chunk_RN2HKPE6_exports);
34
+ module.exports = __toCommonJS(chunk_GIOVJ5SL_exports);
35
35
  var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
36
36
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
37
- var import_chunk_C73SLFIL = require("./chunk-C73SLFIL.js");
38
- var import_chunk_UPQKNKIW = require("./chunk-UPQKNKIW.js");
37
+ var import_chunk_PQE76XRR = require("./chunk-PQE76XRR.js");
38
+ var import_chunk_LHESHKC2 = require("./chunk-LHESHKC2.js");
39
39
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
40
40
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
41
41
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
@@ -58,7 +58,7 @@ ${detailsHeader} ${message}`;
58
58
  }).exhaustive();
59
59
  const errorMessageWithContext = `${constructedErrorMessage}
60
60
  [Context: getDmmf]`;
61
- super((0, import_chunk_C73SLFIL.addVersionDetailsToErrorMessage)(errorMessageWithContext));
61
+ super((0, import_chunk_PQE76XRR.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
62
  this.name = "GetDmmfError";
63
63
  }
64
64
  };
@@ -70,13 +70,13 @@ async function getDMMF(options) {
70
70
  () => {
71
71
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
72
72
  debug("Triggering a Rust panic...");
73
- import_chunk_UPQKNKIW.prismaSchemaWasm.debug_panic();
73
+ import_chunk_LHESHKC2.prismaSchemaWasm.debug_panic();
74
74
  }
75
75
  const params = JSON.stringify({
76
76
  prismaSchema: options.datamodel,
77
77
  noColor: Boolean(process.env.NO_COLOR)
78
78
  });
79
- const data = import_chunk_UPQKNKIW.prismaSchemaWasm.get_dmmf(params);
79
+ const data = import_chunk_LHESHKC2.prismaSchemaWasm.get_dmmf(params);
80
80
  return data;
81
81
  },
82
82
  (e) => ({