@prisma/internals 6.6.0-integration-push-xmzqvqxpztks.2 → 6.6.0-integration-push-xmzqvqxpztks.4

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 (36) hide show
  1. package/dist/Generator.d.ts +1 -1
  2. package/dist/Generator.js +4 -4
  3. package/dist/{chunk-GYUTTTIT.js → chunk-3WQ6ODCN.js} +4 -4
  4. package/dist/{chunk-VBXYX7TQ.js → chunk-7WKPCNSR.js} +8 -8
  5. package/dist/{chunk-VBLLSZ2K.js → chunk-BINWDIIC.js} +5 -5
  6. package/dist/{chunk-2ZSTFH6K.js → chunk-BPDMLM32.js} +5 -5
  7. package/dist/{chunk-DJD6ZF6T.js → chunk-BUS7CL6Q.js} +8 -8
  8. package/dist/{chunk-6RI6YNS2.js → chunk-C627GOSB.js} +7 -7
  9. package/dist/{chunk-DFKSWLWX.js → chunk-CLDGIMPK.js} +8 -8
  10. package/dist/{chunk-SZD3E6G4.js → chunk-I7MGLNDS.js} +25 -22
  11. package/dist/{chunk-I7D2TQUM.js → chunk-ODL76BIB.js} +5 -5
  12. package/dist/{chunk-DKBTEL4R.js → chunk-R6JXBUSZ.js} +40 -37
  13. package/dist/{chunk-VUJECDYH.js → chunk-VO2XDXEO.js} +5 -5
  14. package/dist/{chunk-MSQY6G2A.js → chunk-WLMS5FYX.js} +5 -5
  15. package/dist/cli/checkUnsupportedDataProxy.js +13 -13
  16. package/dist/cli/getSchema.d.ts +1 -6
  17. package/dist/cli/getSchema.js +16 -17
  18. package/dist/cli/hashes.js +13 -13
  19. package/dist/cli/schemaContext.js +13 -13
  20. package/dist/engine-commands/errorHelpers.js +4 -4
  21. package/dist/engine-commands/formatSchema.js +12 -12
  22. package/dist/engine-commands/getConfig.js +10 -10
  23. package/dist/engine-commands/getDmmf.js +7 -7
  24. package/dist/engine-commands/index.js +21 -21
  25. package/dist/engine-commands/lintSchema.js +8 -8
  26. package/dist/engine-commands/mergeSchemas.js +7 -7
  27. package/dist/engine-commands/validate.js +7 -7
  28. package/dist/get-generators/getGenerators.d.ts +9 -0
  29. package/dist/get-generators/getGenerators.js +15 -15
  30. package/dist/index.d.ts +1 -1
  31. package/dist/index.js +40 -41
  32. package/dist/utils/getEnvPaths.js +12 -12
  33. package/dist/utils/getVersionFromPackageJson.js +3 -3
  34. package/dist/utils/loadEnvFile.js +12 -12
  35. package/dist/wasm.js +4 -4
  36. package/package.json +10 -10
@@ -26,7 +26,7 @@ export declare abstract class Generator {
26
26
  }
27
27
  export declare class JsonRpcGenerator extends Generator {
28
28
  #private;
29
- constructor(executablePath: string, config: GeneratorConfig);
29
+ constructor(executablePath: string, config: GeneratorConfig, isNode?: boolean);
30
30
  protected initImpl(): Promise<void>;
31
31
  protected getManifest(): Promise<GeneratorManifest | null>;
32
32
  protected generateImpl(options: GeneratorOptions): Promise<void>;
package/dist/Generator.js CHANGED
@@ -18,12 +18,12 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var Generator_exports = {};
20
20
  __export(Generator_exports, {
21
- Generator: () => import_chunk_2ZSTFH6K.Generator,
22
- InProcessGenerator: () => import_chunk_2ZSTFH6K.InProcessGenerator,
23
- JsonRpcGenerator: () => import_chunk_2ZSTFH6K.JsonRpcGenerator
21
+ Generator: () => import_chunk_BPDMLM32.Generator,
22
+ InProcessGenerator: () => import_chunk_BPDMLM32.InProcessGenerator,
23
+ JsonRpcGenerator: () => import_chunk_BPDMLM32.JsonRpcGenerator
24
24
  });
25
25
  module.exports = __toCommonJS(Generator_exports);
26
- var import_chunk_2ZSTFH6K = require("./chunk-2ZSTFH6K.js");
26
+ var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
27
27
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
28
28
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
29
29
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
@@ -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_GYUTTTIT_exports = {};
20
- __export(chunk_GYUTTTIT_exports, {
19
+ var chunk_3WQ6ODCN_exports = {};
20
+ __export(chunk_3WQ6ODCN_exports, {
21
21
  require_package: () => require_package
22
22
  });
23
- module.exports = __toCommonJS(chunk_GYUTTTIT_exports);
23
+ module.exports = __toCommonJS(chunk_3WQ6ODCN_exports);
24
24
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
25
25
  var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
26
26
  "package.json"(exports, module2) {
27
27
  module2.exports = {
28
28
  name: "@prisma/internals",
29
- version: "6.6.0-integration-push-xmzqvqxpztks.2",
29
+ version: "6.6.0-integration-push-xmzqvqxpztks.4",
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",
@@ -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_VBXYX7TQ_exports = {};
30
- __export(chunk_VBXYX7TQ_exports, {
29
+ var chunk_7WKPCNSR_exports = {};
30
+ __export(chunk_7WKPCNSR_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_VBXYX7TQ_exports);
37
+ module.exports = __toCommonJS(chunk_7WKPCNSR_exports);
38
38
  var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
39
39
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
40
40
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
41
- var import_chunk_VUJECDYH = require("./chunk-VUJECDYH.js");
42
- var import_chunk_VBLLSZ2K = require("./chunk-VBLLSZ2K.js");
41
+ var import_chunk_VO2XDXEO = require("./chunk-VO2XDXEO.js");
42
+ var import_chunk_BINWDIIC = require("./chunk-BINWDIIC.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_VUJECDYH.addVersionDetailsToErrorMessage)(errorMessageWithContext));
67
+ super((0, import_chunk_VO2XDXEO.addVersionDetailsToErrorMessage)(errorMessageWithContext));
68
68
  this.name = "GetConfigError";
69
69
  }
70
70
  };
@@ -89,7 +89,7 @@ async function getConfig(options) {
89
89
  () => {
90
90
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
91
91
  debug("Triggering a Rust panic...");
92
- import_chunk_VBLLSZ2K.prismaSchemaWasm.debug_panic();
92
+ import_chunk_BINWDIIC.prismaSchemaWasm.debug_panic();
93
93
  }
94
94
  const params = JSON.stringify({
95
95
  prismaSchema: options.datamodel,
@@ -97,7 +97,7 @@ async function getConfig(options) {
97
97
  ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
98
98
  env: process.env
99
99
  });
100
- const data = import_chunk_VBLLSZ2K.prismaSchemaWasm.get_config(params);
100
+ const data = import_chunk_BINWDIIC.prismaSchemaWasm.get_config(params);
101
101
  return data;
102
102
  },
103
103
  (e) => ({
@@ -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_VBLLSZ2K_exports = {};
30
- __export(chunk_VBLLSZ2K_exports, {
29
+ var chunk_BINWDIIC_exports = {};
30
+ __export(chunk_BINWDIIC_exports, {
31
31
  prismaSchemaWasm: () => import_prisma_schema_wasm.default,
32
32
  prismaSchemaWasmVersion: () => prismaSchemaWasmVersion,
33
33
  wasm_exports: () => wasm_exports
34
34
  });
35
- module.exports = __toCommonJS(chunk_VBLLSZ2K_exports);
36
- var import_chunk_GYUTTTIT = require("./chunk-GYUTTTIT.js");
35
+ module.exports = __toCommonJS(chunk_BINWDIIC_exports);
36
+ var import_chunk_3WQ6ODCN = require("./chunk-3WQ6ODCN.js");
37
37
  var import_chunk_WXRVYSYN = require("./chunk-WXRVYSYN.js");
38
38
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
39
39
  var import_prisma_schema_wasm = __toESM(require("@prisma/prisma-schema-wasm"));
@@ -42,6 +42,6 @@ var wasm_exports = {};
42
42
  prismaSchemaWasm: () => import_prisma_schema_wasm.default,
43
43
  prismaSchemaWasmVersion: () => prismaSchemaWasmVersion
44
44
  });
45
- var { dependencies } = (0, import_chunk_GYUTTTIT.require_package)();
45
+ var { dependencies } = (0, import_chunk_3WQ6ODCN.require_package)();
46
46
  var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
47
47
  globalThis.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_WXRVYSYN.WasmPanicRegistry();
@@ -16,13 +16,13 @@ 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_2ZSTFH6K_exports = {};
20
- __export(chunk_2ZSTFH6K_exports, {
19
+ var chunk_BPDMLM32_exports = {};
20
+ __export(chunk_BPDMLM32_exports, {
21
21
  Generator: () => Generator,
22
22
  InProcessGenerator: () => InProcessGenerator,
23
23
  JsonRpcGenerator: () => JsonRpcGenerator
24
24
  });
25
- module.exports = __toCommonJS(chunk_2ZSTFH6K_exports);
25
+ module.exports = __toCommonJS(chunk_BPDMLM32_exports);
26
26
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
27
27
  var import_generator_helper = require("@prisma/generator-helper");
28
28
  var Generator = class {
@@ -69,9 +69,9 @@ var Generator = class {
69
69
  };
70
70
  var JsonRpcGenerator = class extends Generator {
71
71
  #generatorProcess;
72
- constructor(executablePath, config) {
72
+ constructor(executablePath, config, isNode) {
73
73
  super(config);
74
- this.#generatorProcess = new import_generator_helper.GeneratorProcess(executablePath);
74
+ this.#generatorProcess = new import_generator_helper.GeneratorProcess(executablePath, { isNode });
75
75
  }
76
76
  async initImpl() {
77
77
  await this.#generatorProcess.init();
@@ -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_DJD6ZF6T_exports = {};
30
- __export(chunk_DJD6ZF6T_exports, {
29
+ var chunk_BUS7CL6Q_exports = {};
30
+ __export(chunk_BUS7CL6Q_exports, {
31
31
  GetDmmfError: () => GetDmmfError,
32
32
  getDMMF: () => getDMMF
33
33
  });
34
- module.exports = __toCommonJS(chunk_DJD6ZF6T_exports);
34
+ module.exports = __toCommonJS(chunk_BUS7CL6Q_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_VUJECDYH = require("./chunk-VUJECDYH.js");
38
- var import_chunk_VBLLSZ2K = require("./chunk-VBLLSZ2K.js");
37
+ var import_chunk_VO2XDXEO = require("./chunk-VO2XDXEO.js");
38
+ var import_chunk_BINWDIIC = require("./chunk-BINWDIIC.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_VUJECDYH.addVersionDetailsToErrorMessage)(errorMessageWithContext));
61
+ super((0, import_chunk_VO2XDXEO.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_VBLLSZ2K.prismaSchemaWasm.debug_panic();
73
+ import_chunk_BINWDIIC.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_VBLLSZ2K.prismaSchemaWasm.get_dmmf(params);
79
+ const data = import_chunk_BINWDIIC.prismaSchemaWasm.get_dmmf(params);
80
80
  return data;
81
81
  },
82
82
  (e) => ({
@@ -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_6RI6YNS2_exports = {};
30
- __export(chunk_6RI6YNS2_exports, {
29
+ var chunk_C627GOSB_exports = {};
30
+ __export(chunk_C627GOSB_exports, {
31
31
  MergeSchemasError: () => MergeSchemasError,
32
32
  mergeSchemas: () => mergeSchemas
33
33
  });
34
- module.exports = __toCommonJS(chunk_6RI6YNS2_exports);
34
+ module.exports = __toCommonJS(chunk_C627GOSB_exports);
35
35
  var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
36
36
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
37
37
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
38
- var import_chunk_VUJECDYH = require("./chunk-VUJECDYH.js");
39
- var import_chunk_VBLLSZ2K = require("./chunk-VBLLSZ2K.js");
38
+ var import_chunk_VO2XDXEO = require("./chunk-VO2XDXEO.js");
39
+ var import_chunk_BINWDIIC = require("./chunk-BINWDIIC.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: mergeSchemas]`;
62
- super((0, import_chunk_VUJECDYH.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
+ super((0, import_chunk_VO2XDXEO.addVersionDetailsToErrorMessage)(errorMessageWithContext));
63
63
  this.name = "MergeSchemasError";
64
64
  }
65
65
  };
@@ -72,7 +72,7 @@ function mergeSchemas(options) {
72
72
  const params = JSON.stringify({
73
73
  schema: options.schemas
74
74
  });
75
- return import_chunk_VBLLSZ2K.prismaSchemaWasm.merge_schemas(params);
75
+ return import_chunk_BINWDIIC.prismaSchemaWasm.merge_schemas(params);
76
76
  },
77
77
  (e) => ({
78
78
  type: "wasm-error",
@@ -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_DFKSWLWX_exports = {};
30
- __export(chunk_DFKSWLWX_exports, {
29
+ var chunk_CLDGIMPK_exports = {};
30
+ __export(chunk_CLDGIMPK_exports, {
31
31
  ValidateError: () => ValidateError,
32
32
  validate: () => validate
33
33
  });
34
- module.exports = __toCommonJS(chunk_DFKSWLWX_exports);
34
+ module.exports = __toCommonJS(chunk_CLDGIMPK_exports);
35
35
  var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
36
36
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
37
37
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
38
- var import_chunk_VUJECDYH = require("./chunk-VUJECDYH.js");
39
- var import_chunk_VBLLSZ2K = require("./chunk-VBLLSZ2K.js");
38
+ var import_chunk_VO2XDXEO = require("./chunk-VO2XDXEO.js");
39
+ var import_chunk_BINWDIIC = require("./chunk-BINWDIIC.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_VUJECDYH.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
+ super((0, import_chunk_VO2XDXEO.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_VBLLSZ2K.prismaSchemaWasm.debug_panic();
74
+ import_chunk_BINWDIIC.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_VBLLSZ2K.prismaSchemaWasm.validate(params);
80
+ import_chunk_BINWDIIC.prismaSchemaWasm.validate(params);
81
81
  },
82
82
  (e) => ({
83
83
  type: "wasm-error",
@@ -26,8 +26,8 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_SZD3E6G4_exports = {};
30
- __export(chunk_SZD3E6G4_exports, {
29
+ var chunk_I7MGLNDS_exports = {};
30
+ __export(chunk_I7MGLNDS_exports, {
31
31
  checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
32
32
  forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
33
33
  formatSchema: () => formatSchema,
@@ -39,18 +39,17 @@ __export(chunk_SZD3E6G4_exports, {
39
39
  getNodeAPIName: () => import_get_platform2.getNodeAPIName,
40
40
  getPrismaConfigFromPackageJson: () => getPrismaConfigFromPackageJson,
41
41
  getProjectHash: () => getProjectHash,
42
- getSchema: () => getSchema,
43
- getSchemaDir: () => getSchemaDir,
44
42
  getSchemaFromPackageJson: () => getSchemaFromPackageJson,
45
43
  getSchemaWithPath: () => getSchemaWithPath,
46
44
  getSchemaWithPathOptional: () => getSchemaWithPathOptional,
47
45
  knownBinaryTargets: () => knownBinaryTargets,
48
46
  loadEnvFile: () => loadEnvFile,
49
47
  loadSchemaContext: () => loadSchemaContext,
48
+ printSchemaLoadedMessage: () => printSchemaLoadedMessage,
50
49
  processSchemaResult: () => processSchemaResult,
51
50
  skipIndex: () => skipIndex
52
51
  });
53
- module.exports = __toCommonJS(chunk_SZD3E6G4_exports);
52
+ module.exports = __toCommonJS(chunk_I7MGLNDS_exports);
54
53
  var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
55
54
  var import_chunk_EPXBOIA5 = require("./chunk-EPXBOIA5.js");
56
55
  var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
@@ -72,7 +71,7 @@ var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
72
71
  var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
73
72
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
74
73
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
75
- var import_chunk_2ZSTFH6K = require("./chunk-2ZSTFH6K.js");
74
+ var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
76
75
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
77
76
  var import_chunk_MJIP3FY5 = require("./chunk-MJIP3FY5.js");
78
77
  var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
@@ -172,6 +171,9 @@ async function getSchemaWithPathOptional(schemaPathFromArgs, schemaPathFromConfi
172
171
  }
173
172
  return null;
174
173
  }
174
+ function printSchemaLoadedMessage(schemaPath2) {
175
+ process.stdout.write((0, import_chunk_PG5FDKSF.dim)(`Prisma schema loaded from ${import_path.default.relative(process.cwd(), schemaPath2)}`) + "\n");
176
+ }
175
177
  async function readSchemaFromSingleFile(schemaPath2) {
176
178
  debug2("Reading schema from single file", schemaPath2);
177
179
  const typeError = await (0, import_schema_files_loader.ensureType)(schemaPath2, "file");
@@ -361,20 +363,6 @@ async function getDefaultSchema(cwd, failures = []) {
361
363
  }
362
364
  };
363
365
  }
364
- async function getSchemaDir(schemaPathFromArgs) {
365
- if (schemaPathFromArgs) {
366
- return import_path.default.resolve(import_path.default.dirname(schemaPathFromArgs));
367
- }
368
- const schemaPathResult = await getSchemaWithPath();
369
- if (!schemaPathResult) {
370
- return null;
371
- }
372
- return import_path.default.dirname(schemaPathResult.schemaPath);
373
- }
374
- async function getSchema(schemaPathFromArgs, schemaPathFromConfig) {
375
- const schemaPathResult = await getSchemaWithPath(schemaPathFromArgs, schemaPathFromConfig);
376
- return schemaPathResult.schemas;
377
- }
378
366
  async function getProjectHash(schemaPathFromArgs, schemaPathFromConfig) {
379
367
  const projectPath = (await getSchemaWithPath(schemaPathFromArgs, schemaPathFromConfig))?.schemaPath ?? process.cwd();
380
368
  return import_crypto.default.createHash("sha256").update(projectPath).digest("hex").substring(0, 8);
@@ -415,7 +403,7 @@ async function processSchemaResult({
415
403
  }) {
416
404
  const loadedFromPathForLogMessages = import_path2.default.relative(cwd, schemaResult.schemaPath);
417
405
  if (printLoadMessage) {
418
- process.stdout.write((0, import_chunk_PG5FDKSF.dim)(`Prisma schema loaded from ${loadedFromPathForLogMessages}`) + "\n");
406
+ printSchemaLoadedMessage(loadedFromPathForLogMessages);
419
407
  }
420
408
  const configFromPsl = await (0, import_chunk_S2R7ACYL.getConfig)({ datamodel: schemaResult.schemas, ignoreEnvVarErrors });
421
409
  const primaryDatasource = configFromPsl.datasources.at(0);
@@ -442,6 +430,18 @@ function primaryDatasourceDirectory(primaryDatasource) {
442
430
  var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_MJIP3FY5.require_p_map)());
443
431
  var debug3 = (0, import_debug3.default)("prisma:getGenerators");
444
432
  async function getGenerators(options) {
433
+ if (options.registry === void 0 && options.providerAliases !== void 0) {
434
+ options.registry = Object.fromEntries(
435
+ Object.entries(options.providerAliases).map(([name, definition]) => [
436
+ name,
437
+ {
438
+ type: "rpc",
439
+ generatorPath: definition.generatorPath,
440
+ isNode: definition.isNode
441
+ }
442
+ ])
443
+ );
444
+ }
445
445
  const {
446
446
  schemaPath,
447
447
  registry,
@@ -506,7 +506,10 @@ async function getGenerators(options) {
506
506
  type: "rpc",
507
507
  generatorPath: providerValue
508
508
  };
509
- const generatorInstance = (0, import_chunk_XKZ6CBLA.z)(generatorDefinition).with({ type: "in-process" }, ({ generator }) => new import_chunk_2ZSTFH6K.InProcessGenerator(generatorConfig, generator)).with({ type: "rpc" }, ({ generatorPath }) => new import_chunk_2ZSTFH6K.JsonRpcGenerator(generatorPath, generatorConfig)).exhaustive();
509
+ const generatorInstance = (0, import_chunk_XKZ6CBLA.z)(generatorDefinition).with({ type: "in-process" }, ({ generator }) => new import_chunk_BPDMLM32.InProcessGenerator(generatorConfig, generator)).with(
510
+ { type: "rpc" },
511
+ ({ generatorPath, isNode }) => new import_chunk_BPDMLM32.JsonRpcGenerator(generatorPath, generatorConfig, isNode)
512
+ ).exhaustive();
510
513
  await generatorInstance.init();
511
514
  if (generatorConfig.output) {
512
515
  generatorConfig.output = {
@@ -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_I7D2TQUM_exports = {};
20
- __export(chunk_I7D2TQUM_exports, {
19
+ var chunk_ODL76BIB_exports = {};
20
+ __export(chunk_ODL76BIB_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_I7D2TQUM_exports);
28
- var import_chunk_VBLLSZ2K = require("./chunk-VBLLSZ2K.js");
27
+ module.exports = __toCommonJS(chunk_ODL76BIB_exports);
28
+ var import_chunk_BINWDIIC = require("./chunk-BINWDIIC.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_VBLLSZ2K.prismaSchemaWasm.lint(JSON.stringify(schemas));
32
+ const lintResult = import_chunk_BINWDIIC.prismaSchemaWasm.lint(JSON.stringify(schemas));
33
33
  const lintDiagnostics = JSON.parse(lintResult);
34
34
  return lintDiagnostics;
35
35
  }
@@ -26,8 +26,8 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_DKBTEL4R_exports = {};
30
- __export(chunk_DKBTEL4R_exports, {
29
+ var chunk_R6JXBUSZ_exports = {};
30
+ __export(chunk_R6JXBUSZ_exports, {
31
31
  checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
32
32
  forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
33
33
  formatSchema: () => formatSchema,
@@ -39,18 +39,17 @@ __export(chunk_DKBTEL4R_exports, {
39
39
  getNodeAPIName: () => import_get_platform2.getNodeAPIName,
40
40
  getPrismaConfigFromPackageJson: () => getPrismaConfigFromPackageJson,
41
41
  getProjectHash: () => getProjectHash,
42
- getSchema: () => getSchema,
43
- getSchemaDir: () => getSchemaDir,
44
42
  getSchemaFromPackageJson: () => getSchemaFromPackageJson,
45
43
  getSchemaWithPath: () => getSchemaWithPath,
46
44
  getSchemaWithPathOptional: () => getSchemaWithPathOptional,
47
45
  knownBinaryTargets: () => knownBinaryTargets,
48
46
  loadEnvFile: () => loadEnvFile,
49
47
  loadSchemaContext: () => loadSchemaContext,
48
+ printSchemaLoadedMessage: () => printSchemaLoadedMessage,
50
49
  processSchemaResult: () => processSchemaResult,
51
50
  skipIndex: () => skipIndex
52
51
  });
53
- module.exports = __toCommonJS(chunk_DKBTEL4R_exports);
52
+ module.exports = __toCommonJS(chunk_R6JXBUSZ_exports);
54
53
  var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
55
54
  var import_chunk_EPXBOIA5 = require("./chunk-EPXBOIA5.js");
56
55
  var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
@@ -63,16 +62,16 @@ var import_chunk_5V36RLCO = require("./chunk-5V36RLCO.js");
63
62
  var import_chunk_AZV6HVKA = require("./chunk-AZV6HVKA.js");
64
63
  var import_chunk_HAGJ64PM = require("./chunk-HAGJ64PM.js");
65
64
  var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.js");
66
- var import_chunk_DJD6ZF6T = require("./chunk-DJD6ZF6T.js");
67
- var import_chunk_I7D2TQUM = require("./chunk-I7D2TQUM.js");
68
- var import_chunk_6RI6YNS2 = require("./chunk-6RI6YNS2.js");
69
- var import_chunk_VBXYX7TQ = require("./chunk-VBXYX7TQ.js");
70
- var import_chunk_VBLLSZ2K = require("./chunk-VBLLSZ2K.js");
65
+ var import_chunk_BUS7CL6Q = require("./chunk-BUS7CL6Q.js");
66
+ var import_chunk_ODL76BIB = require("./chunk-ODL76BIB.js");
67
+ var import_chunk_C627GOSB = require("./chunk-C627GOSB.js");
68
+ var import_chunk_7WKPCNSR = require("./chunk-7WKPCNSR.js");
69
+ var import_chunk_BINWDIIC = require("./chunk-BINWDIIC.js");
71
70
  var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
72
71
  var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
73
72
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
74
73
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
75
- var import_chunk_2ZSTFH6K = require("./chunk-2ZSTFH6K.js");
74
+ var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
76
75
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
77
76
  var import_chunk_MJIP3FY5 = require("./chunk-MJIP3FY5.js");
78
77
  var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
@@ -105,7 +104,7 @@ var debug = (0, import_debug2.default)("prisma:format");
105
104
  async function formatSchema({ schemas }, inputFormattingOptions) {
106
105
  if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
107
106
  handleFormatPanic(() => {
108
- import_chunk_VBLLSZ2K.prismaSchemaWasm.debug_panic();
107
+ import_chunk_BINWDIIC.prismaSchemaWasm.debug_panic();
109
108
  });
110
109
  }
111
110
  const defaultFormattingOptions = {
@@ -122,10 +121,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
122
121
  const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
123
122
  const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
124
123
  const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
125
- const lintDiagnostics2 = (0, import_chunk_I7D2TQUM.lintSchema)({ schemas: formattedMultipleSchemas2 });
124
+ const lintDiagnostics2 = (0, import_chunk_ODL76BIB.lintSchema)({ schemas: formattedMultipleSchemas2 });
126
125
  return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
127
126
  });
128
- const lintWarnings = (0, import_chunk_I7D2TQUM.getLintWarningsAsText)(lintDiagnostics);
127
+ const lintWarnings = (0, import_chunk_ODL76BIB.getLintWarningsAsText)(lintDiagnostics);
129
128
  if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
130
129
  console.warn(lintWarnings);
131
130
  }
@@ -152,7 +151,7 @@ function handleFormatPanic(tryCb) {
152
151
  }
153
152
  }
154
153
  function formatWasm(schema, documentFormattingParams) {
155
- const formattedSchema = import_chunk_VBLLSZ2K.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
154
+ const formattedSchema = import_chunk_BINWDIIC.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
156
155
  return formattedSchema;
157
156
  }
158
157
  var readFile = (0, import_util.promisify)(import_fs.default.readFile);
@@ -172,6 +171,9 @@ async function getSchemaWithPathOptional(schemaPathFromArgs, schemaPathFromConfi
172
171
  }
173
172
  return null;
174
173
  }
174
+ function printSchemaLoadedMessage(schemaPath2) {
175
+ process.stdout.write((0, import_chunk_PG5FDKSF.dim)(`Prisma schema loaded from ${import_path.default.relative(process.cwd(), schemaPath2)}`) + "\n");
176
+ }
175
177
  async function readSchemaFromSingleFile(schemaPath2) {
176
178
  debug2("Reading schema from single file", schemaPath2);
177
179
  const typeError = await (0, import_schema_files_loader.ensureType)(schemaPath2, "file");
@@ -193,7 +195,7 @@ async function readSchemaFromDirectory(schemaPath2) {
193
195
  }
194
196
  const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
195
197
  debug2("Loading config");
196
- const config = await (0, import_chunk_VBXYX7TQ.getConfig)({
198
+ const config = await (0, import_chunk_7WKPCNSR.getConfig)({
197
199
  datamodel: files,
198
200
  ignoreEnvVarErrors: true
199
201
  });
@@ -361,20 +363,6 @@ async function getDefaultSchema(cwd, failures = []) {
361
363
  }
362
364
  };
363
365
  }
364
- async function getSchemaDir(schemaPathFromArgs) {
365
- if (schemaPathFromArgs) {
366
- return import_path.default.resolve(import_path.default.dirname(schemaPathFromArgs));
367
- }
368
- const schemaPathResult = await getSchemaWithPath();
369
- if (!schemaPathResult) {
370
- return null;
371
- }
372
- return import_path.default.dirname(schemaPathResult.schemaPath);
373
- }
374
- async function getSchema(schemaPathFromArgs, schemaPathFromConfig) {
375
- const schemaPathResult = await getSchemaWithPath(schemaPathFromArgs, schemaPathFromConfig);
376
- return schemaPathResult.schemas;
377
- }
378
366
  async function getProjectHash(schemaPathFromArgs, schemaPathFromConfig) {
379
367
  const projectPath = (await getSchemaWithPath(schemaPathFromArgs, schemaPathFromConfig))?.schemaPath ?? process.cwd();
380
368
  return import_crypto.default.createHash("sha256").update(projectPath).digest("hex").substring(0, 8);
@@ -415,9 +403,9 @@ async function processSchemaResult({
415
403
  }) {
416
404
  const loadedFromPathForLogMessages = import_path2.default.relative(cwd, schemaResult.schemaPath);
417
405
  if (printLoadMessage) {
418
- process.stdout.write((0, import_chunk_PG5FDKSF.dim)(`Prisma schema loaded from ${loadedFromPathForLogMessages}`) + "\n");
406
+ printSchemaLoadedMessage(loadedFromPathForLogMessages);
419
407
  }
420
- const configFromPsl = await (0, import_chunk_VBXYX7TQ.getConfig)({ datamodel: schemaResult.schemas, ignoreEnvVarErrors });
408
+ const configFromPsl = await (0, import_chunk_7WKPCNSR.getConfig)({ datamodel: schemaResult.schemas, ignoreEnvVarErrors });
421
409
  const primaryDatasource = configFromPsl.datasources.at(0);
422
410
  const schemaRootDir = schemaResult.schemaRootDir || cwd;
423
411
  return {
@@ -442,6 +430,18 @@ function primaryDatasourceDirectory(primaryDatasource) {
442
430
  var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_MJIP3FY5.require_p_map)());
443
431
  var debug3 = (0, import_debug3.default)("prisma:getGenerators");
444
432
  async function getGenerators(options) {
433
+ if (options.registry === void 0 && options.providerAliases !== void 0) {
434
+ options.registry = Object.fromEntries(
435
+ Object.entries(options.providerAliases).map(([name, definition]) => [
436
+ name,
437
+ {
438
+ type: "rpc",
439
+ generatorPath: definition.generatorPath,
440
+ isNode: definition.isNode
441
+ }
442
+ ])
443
+ );
444
+ }
445
445
  const {
446
446
  schemaPath,
447
447
  registry,
@@ -483,7 +483,7 @@ async function getGenerators(options) {
483
483
  }
484
484
  (0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
485
485
  const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
486
- const dmmf = await (0, import_chunk_DJD6ZF6T.getDMMF)({
486
+ const dmmf = await (0, import_chunk_BUS7CL6Q.getDMMF)({
487
487
  datamodel: schemaContext.schemaFiles,
488
488
  previewFeatures
489
489
  });
@@ -506,7 +506,10 @@ async function getGenerators(options) {
506
506
  type: "rpc",
507
507
  generatorPath: providerValue
508
508
  };
509
- const generatorInstance = (0, import_chunk_XKZ6CBLA.z)(generatorDefinition).with({ type: "in-process" }, ({ generator }) => new import_chunk_2ZSTFH6K.InProcessGenerator(generatorConfig, generator)).with({ type: "rpc" }, ({ generatorPath }) => new import_chunk_2ZSTFH6K.JsonRpcGenerator(generatorPath, generatorConfig)).exhaustive();
509
+ const generatorInstance = (0, import_chunk_XKZ6CBLA.z)(generatorDefinition).with({ type: "in-process" }, ({ generator }) => new import_chunk_BPDMLM32.InProcessGenerator(generatorConfig, generator)).with(
510
+ { type: "rpc" },
511
+ ({ generatorPath, isNode }) => new import_chunk_BPDMLM32.JsonRpcGenerator(generatorPath, generatorConfig, isNode)
512
+ ).exhaustive();
510
513
  await generatorInstance.init();
511
514
  if (generatorConfig.output) {
512
515
  generatorConfig.output = {
@@ -531,7 +534,7 @@ You need to define \`output\` in the generator block in the schema file.`
531
534
  fromEnvVar: null
532
535
  };
533
536
  }
534
- const datamodel = (0, import_chunk_6RI6YNS2.mergeSchemas)({ schemas: schemaContext.schemaFiles });
537
+ const datamodel = (0, import_chunk_C627GOSB.mergeSchemas)({ schemas: schemaContext.schemaFiles });
535
538
  const envPaths = await getEnvPaths(schemaContext.schemaPath, { cwd: generatorConfig.output.value });
536
539
  const options2 = {
537
540
  datamodel,
@@ -615,7 +618,7 @@ generator gen {
615
618
  debug3({ generatorBinaryPaths });
616
619
  generator.setBinaryPaths(generatorBinaryPaths);
617
620
  if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
618
- const customDmmf = await (0, import_chunk_DJD6ZF6T.getDMMF)({
621
+ const customDmmf = await (0, import_chunk_BUS7CL6Q.getDMMF)({
619
622
  datamodel: schemaContext.schemaFiles,
620
623
  previewFeatures
621
624
  });
@@ -890,7 +893,7 @@ function checkUnsupportedDataProxy({
890
893
  }
891
894
  }
892
895
  if (!schemaContext2?.primaryDatasource) return;
893
- const url = (0, import_chunk_VBXYX7TQ.resolveUrl)((0, import_chunk_VBXYX7TQ.getEffectiveUrl)(schemaContext2.primaryDatasource));
896
+ const url = (0, import_chunk_7WKPCNSR.resolveUrl)((0, import_chunk_7WKPCNSR.getEffectiveUrl)(schemaContext2.primaryDatasource));
894
897
  if (url?.startsWith("prisma://")) {
895
898
  throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
896
899
  }