@prisma/internals 6.6.0-integration-push-xmzqvqxpztks.3 → 6.6.0-integration-push-xmzqvqxpztks.5

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 (34) hide show
  1. package/dist/Generator.d.ts +1 -1
  2. package/dist/Generator.js +4 -4
  3. package/dist/{chunk-SA67765L.js → chunk-3BXWI45I.js} +4 -4
  4. package/dist/{chunk-VWCKVQI6.js → chunk-3CHXBY5J.js} +35 -20
  5. package/dist/{chunk-SCFKBBJZ.js → chunk-3IW5B4VR.js} +5 -5
  6. package/dist/{chunk-2ZSTFH6K.js → chunk-BPDMLM32.js} +5 -5
  7. package/dist/{chunk-ZWTVFN27.js → chunk-HD2DLZ4P.js} +7 -7
  8. package/dist/{chunk-X7VE2NPV.js → chunk-I7MGLNDS.js} +20 -5
  9. package/dist/{chunk-OYXPLLDN.js → chunk-IYZKSKPJ.js} +8 -8
  10. package/dist/{chunk-YIFFEUFQ.js → chunk-JWAHHTQF.js} +5 -5
  11. package/dist/{chunk-2AE2H55C.js → chunk-MVHUHZE5.js} +5 -5
  12. package/dist/{chunk-3MSKE2BF.js → chunk-S3DSAPBW.js} +8 -8
  13. package/dist/{chunk-ZWINUKID.js → chunk-UZ3OMVFB.js} +5 -5
  14. package/dist/{chunk-GANLEYUE.js → chunk-VSRVLIUX.js} +8 -8
  15. package/dist/cli/checkUnsupportedDataProxy.js +13 -13
  16. package/dist/cli/getSchema.js +16 -16
  17. package/dist/cli/hashes.js +13 -13
  18. package/dist/cli/schemaContext.js +13 -13
  19. package/dist/engine-commands/errorHelpers.js +4 -4
  20. package/dist/engine-commands/formatSchema.js +12 -12
  21. package/dist/engine-commands/getConfig.js +10 -10
  22. package/dist/engine-commands/getDmmf.js +7 -7
  23. package/dist/engine-commands/index.js +21 -21
  24. package/dist/engine-commands/lintSchema.js +8 -8
  25. package/dist/engine-commands/mergeSchemas.js +7 -7
  26. package/dist/engine-commands/validate.js +7 -7
  27. package/dist/get-generators/getGenerators.d.ts +9 -0
  28. package/dist/get-generators/getGenerators.js +15 -15
  29. package/dist/index.js +40 -40
  30. package/dist/utils/getEnvPaths.js +12 -12
  31. package/dist/utils/getVersionFromPackageJson.js +3 -3
  32. package/dist/utils/loadEnvFile.js +12 -12
  33. package/dist/wasm.js +4 -4
  34. 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_SA67765L_exports = {};
20
- __export(chunk_SA67765L_exports, {
19
+ var chunk_3BXWI45I_exports = {};
20
+ __export(chunk_3BXWI45I_exports, {
21
21
  require_package: () => require_package
22
22
  });
23
- module.exports = __toCommonJS(chunk_SA67765L_exports);
23
+ module.exports = __toCommonJS(chunk_3BXWI45I_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.3",
29
+ version: "6.6.0-integration-push-xmzqvqxpztks.5",
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,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_VWCKVQI6_exports = {};
30
- __export(chunk_VWCKVQI6_exports, {
29
+ var chunk_3CHXBY5J_exports = {};
30
+ __export(chunk_3CHXBY5J_exports, {
31
31
  checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
32
32
  forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
33
33
  formatSchema: () => formatSchema,
@@ -49,7 +49,7 @@ __export(chunk_VWCKVQI6_exports, {
49
49
  processSchemaResult: () => processSchemaResult,
50
50
  skipIndex: () => skipIndex
51
51
  });
52
- module.exports = __toCommonJS(chunk_VWCKVQI6_exports);
52
+ module.exports = __toCommonJS(chunk_3CHXBY5J_exports);
53
53
  var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
54
54
  var import_chunk_EPXBOIA5 = require("./chunk-EPXBOIA5.js");
55
55
  var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
@@ -62,16 +62,16 @@ var import_chunk_5V36RLCO = require("./chunk-5V36RLCO.js");
62
62
  var import_chunk_AZV6HVKA = require("./chunk-AZV6HVKA.js");
63
63
  var import_chunk_HAGJ64PM = require("./chunk-HAGJ64PM.js");
64
64
  var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.js");
65
- var import_chunk_GANLEYUE = require("./chunk-GANLEYUE.js");
66
- var import_chunk_2AE2H55C = require("./chunk-2AE2H55C.js");
67
- var import_chunk_ZWTVFN27 = require("./chunk-ZWTVFN27.js");
68
- var import_chunk_OYXPLLDN = require("./chunk-OYXPLLDN.js");
69
- var import_chunk_ZWINUKID = require("./chunk-ZWINUKID.js");
65
+ var import_chunk_VSRVLIUX = require("./chunk-VSRVLIUX.js");
66
+ var import_chunk_MVHUHZE5 = require("./chunk-MVHUHZE5.js");
67
+ var import_chunk_HD2DLZ4P = require("./chunk-HD2DLZ4P.js");
68
+ var import_chunk_IYZKSKPJ = require("./chunk-IYZKSKPJ.js");
69
+ var import_chunk_UZ3OMVFB = require("./chunk-UZ3OMVFB.js");
70
70
  var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
71
71
  var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
72
72
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
73
73
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
74
- var import_chunk_2ZSTFH6K = require("./chunk-2ZSTFH6K.js");
74
+ var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
75
75
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
76
76
  var import_chunk_MJIP3FY5 = require("./chunk-MJIP3FY5.js");
77
77
  var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
@@ -104,7 +104,7 @@ var debug = (0, import_debug2.default)("prisma:format");
104
104
  async function formatSchema({ schemas }, inputFormattingOptions) {
105
105
  if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
106
106
  handleFormatPanic(() => {
107
- import_chunk_ZWINUKID.prismaSchemaWasm.debug_panic();
107
+ import_chunk_UZ3OMVFB.prismaSchemaWasm.debug_panic();
108
108
  });
109
109
  }
110
110
  const defaultFormattingOptions = {
@@ -121,10 +121,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
121
121
  const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
122
122
  const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
123
123
  const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
124
- const lintDiagnostics2 = (0, import_chunk_2AE2H55C.lintSchema)({ schemas: formattedMultipleSchemas2 });
124
+ const lintDiagnostics2 = (0, import_chunk_MVHUHZE5.lintSchema)({ schemas: formattedMultipleSchemas2 });
125
125
  return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
126
126
  });
127
- const lintWarnings = (0, import_chunk_2AE2H55C.getLintWarningsAsText)(lintDiagnostics);
127
+ const lintWarnings = (0, import_chunk_MVHUHZE5.getLintWarningsAsText)(lintDiagnostics);
128
128
  if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
129
129
  console.warn(lintWarnings);
130
130
  }
@@ -151,7 +151,7 @@ function handleFormatPanic(tryCb) {
151
151
  }
152
152
  }
153
153
  function formatWasm(schema, documentFormattingParams) {
154
- const formattedSchema = import_chunk_ZWINUKID.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
154
+ const formattedSchema = import_chunk_UZ3OMVFB.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
155
155
  return formattedSchema;
156
156
  }
157
157
  var readFile = (0, import_util.promisify)(import_fs.default.readFile);
@@ -195,7 +195,7 @@ async function readSchemaFromDirectory(schemaPath2) {
195
195
  }
196
196
  const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
197
197
  debug2("Loading config");
198
- const config = await (0, import_chunk_OYXPLLDN.getConfig)({
198
+ const config = await (0, import_chunk_IYZKSKPJ.getConfig)({
199
199
  datamodel: files,
200
200
  ignoreEnvVarErrors: true
201
201
  });
@@ -405,7 +405,7 @@ async function processSchemaResult({
405
405
  if (printLoadMessage) {
406
406
  printSchemaLoadedMessage(loadedFromPathForLogMessages);
407
407
  }
408
- const configFromPsl = await (0, import_chunk_OYXPLLDN.getConfig)({ datamodel: schemaResult.schemas, ignoreEnvVarErrors });
408
+ const configFromPsl = await (0, import_chunk_IYZKSKPJ.getConfig)({ datamodel: schemaResult.schemas, ignoreEnvVarErrors });
409
409
  const primaryDatasource = configFromPsl.datasources.at(0);
410
410
  const schemaRootDir = schemaResult.schemaRootDir || cwd;
411
411
  return {
@@ -430,6 +430,18 @@ function primaryDatasourceDirectory(primaryDatasource) {
430
430
  var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_MJIP3FY5.require_p_map)());
431
431
  var debug3 = (0, import_debug3.default)("prisma:getGenerators");
432
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
+ }
433
445
  const {
434
446
  schemaPath,
435
447
  registry,
@@ -471,7 +483,7 @@ async function getGenerators(options) {
471
483
  }
472
484
  (0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
473
485
  const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
474
- const dmmf = await (0, import_chunk_GANLEYUE.getDMMF)({
486
+ const dmmf = await (0, import_chunk_VSRVLIUX.getDMMF)({
475
487
  datamodel: schemaContext.schemaFiles,
476
488
  previewFeatures
477
489
  });
@@ -494,7 +506,10 @@ async function getGenerators(options) {
494
506
  type: "rpc",
495
507
  generatorPath: providerValue
496
508
  };
497
- 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();
498
513
  await generatorInstance.init();
499
514
  if (generatorConfig.output) {
500
515
  generatorConfig.output = {
@@ -519,7 +534,7 @@ You need to define \`output\` in the generator block in the schema file.`
519
534
  fromEnvVar: null
520
535
  };
521
536
  }
522
- const datamodel = (0, import_chunk_ZWTVFN27.mergeSchemas)({ schemas: schemaContext.schemaFiles });
537
+ const datamodel = (0, import_chunk_HD2DLZ4P.mergeSchemas)({ schemas: schemaContext.schemaFiles });
523
538
  const envPaths = await getEnvPaths(schemaContext.schemaPath, { cwd: generatorConfig.output.value });
524
539
  const options2 = {
525
540
  datamodel,
@@ -603,7 +618,7 @@ generator gen {
603
618
  debug3({ generatorBinaryPaths });
604
619
  generator.setBinaryPaths(generatorBinaryPaths);
605
620
  if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
606
- const customDmmf = await (0, import_chunk_GANLEYUE.getDMMF)({
621
+ const customDmmf = await (0, import_chunk_VSRVLIUX.getDMMF)({
607
622
  datamodel: schemaContext.schemaFiles,
608
623
  previewFeatures
609
624
  });
@@ -878,7 +893,7 @@ function checkUnsupportedDataProxy({
878
893
  }
879
894
  }
880
895
  if (!schemaContext2?.primaryDatasource) return;
881
- const url = (0, import_chunk_OYXPLLDN.resolveUrl)((0, import_chunk_OYXPLLDN.getEffectiveUrl)(schemaContext2.primaryDatasource));
896
+ const url = (0, import_chunk_IYZKSKPJ.resolveUrl)((0, import_chunk_IYZKSKPJ.getEffectiveUrl)(schemaContext2.primaryDatasource));
882
897
  if (url?.startsWith("prisma://")) {
883
898
  throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
884
899
  }
@@ -16,11 +16,11 @@ 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_SCFKBBJZ_exports = {};
20
- __export(chunk_SCFKBBJZ_exports, {
19
+ var chunk_3IW5B4VR_exports = {};
20
+ __export(chunk_3IW5B4VR_exports, {
21
21
  version: () => version
22
22
  });
23
- module.exports = __toCommonJS(chunk_SCFKBBJZ_exports);
24
- var import_chunk_SA67765L = require("./chunk-SA67765L.js");
25
- var packageJson = (0, import_chunk_SA67765L.require_package)();
23
+ module.exports = __toCommonJS(chunk_3IW5B4VR_exports);
24
+ var import_chunk_3BXWI45I = require("./chunk-3BXWI45I.js");
25
+ var packageJson = (0, import_chunk_3BXWI45I.require_package)();
26
26
  var version = packageJson.version;
@@ -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,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_ZWTVFN27_exports = {};
30
- __export(chunk_ZWTVFN27_exports, {
29
+ var chunk_HD2DLZ4P_exports = {};
30
+ __export(chunk_HD2DLZ4P_exports, {
31
31
  MergeSchemasError: () => MergeSchemasError,
32
32
  mergeSchemas: () => mergeSchemas
33
33
  });
34
- module.exports = __toCommonJS(chunk_ZWTVFN27_exports);
34
+ module.exports = __toCommonJS(chunk_HD2DLZ4P_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_YIFFEUFQ = require("./chunk-YIFFEUFQ.js");
39
- var import_chunk_ZWINUKID = require("./chunk-ZWINUKID.js");
38
+ var import_chunk_JWAHHTQF = require("./chunk-JWAHHTQF.js");
39
+ var import_chunk_UZ3OMVFB = require("./chunk-UZ3OMVFB.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_YIFFEUFQ.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
+ super((0, import_chunk_JWAHHTQF.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_ZWINUKID.prismaSchemaWasm.merge_schemas(params);
75
+ return import_chunk_UZ3OMVFB.prismaSchemaWasm.merge_schemas(params);
76
76
  },
77
77
  (e) => ({
78
78
  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_X7VE2NPV_exports = {};
30
- __export(chunk_X7VE2NPV_exports, {
29
+ var chunk_I7MGLNDS_exports = {};
30
+ __export(chunk_I7MGLNDS_exports, {
31
31
  checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
32
32
  forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
33
33
  formatSchema: () => formatSchema,
@@ -49,7 +49,7 @@ __export(chunk_X7VE2NPV_exports, {
49
49
  processSchemaResult: () => processSchemaResult,
50
50
  skipIndex: () => skipIndex
51
51
  });
52
- module.exports = __toCommonJS(chunk_X7VE2NPV_exports);
52
+ module.exports = __toCommonJS(chunk_I7MGLNDS_exports);
53
53
  var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
54
54
  var import_chunk_EPXBOIA5 = require("./chunk-EPXBOIA5.js");
55
55
  var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
@@ -71,7 +71,7 @@ var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
71
71
  var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
72
72
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
73
73
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
74
- var import_chunk_2ZSTFH6K = require("./chunk-2ZSTFH6K.js");
74
+ var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
75
75
  var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
76
76
  var import_chunk_MJIP3FY5 = require("./chunk-MJIP3FY5.js");
77
77
  var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
@@ -430,6 +430,18 @@ function primaryDatasourceDirectory(primaryDatasource) {
430
430
  var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_MJIP3FY5.require_p_map)());
431
431
  var debug3 = (0, import_debug3.default)("prisma:getGenerators");
432
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
+ }
433
445
  const {
434
446
  schemaPath,
435
447
  registry,
@@ -494,7 +506,10 @@ async function getGenerators(options) {
494
506
  type: "rpc",
495
507
  generatorPath: providerValue
496
508
  };
497
- 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();
498
513
  await generatorInstance.init();
499
514
  if (generatorConfig.output) {
500
515
  generatorConfig.output = {
@@ -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_OYXPLLDN_exports = {};
30
- __export(chunk_OYXPLLDN_exports, {
29
+ var chunk_IYZKSKPJ_exports = {};
30
+ __export(chunk_IYZKSKPJ_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_OYXPLLDN_exports);
37
+ module.exports = __toCommonJS(chunk_IYZKSKPJ_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_YIFFEUFQ = require("./chunk-YIFFEUFQ.js");
42
- var import_chunk_ZWINUKID = require("./chunk-ZWINUKID.js");
41
+ var import_chunk_JWAHHTQF = require("./chunk-JWAHHTQF.js");
42
+ var import_chunk_UZ3OMVFB = require("./chunk-UZ3OMVFB.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_YIFFEUFQ.addVersionDetailsToErrorMessage)(errorMessageWithContext));
67
+ super((0, import_chunk_JWAHHTQF.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_ZWINUKID.prismaSchemaWasm.debug_panic();
92
+ import_chunk_UZ3OMVFB.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_ZWINUKID.prismaSchemaWasm.get_config(params);
100
+ const data = import_chunk_UZ3OMVFB.prismaSchemaWasm.get_config(params);
101
101
  return data;
102
102
  },
103
103
  (e) => ({
@@ -16,15 +16,15 @@ 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_YIFFEUFQ_exports = {};
20
- __export(chunk_YIFFEUFQ_exports, {
19
+ var chunk_JWAHHTQF_exports = {};
20
+ __export(chunk_JWAHHTQF_exports, {
21
21
  addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
22
22
  });
23
- module.exports = __toCommonJS(chunk_YIFFEUFQ_exports);
24
- var import_chunk_SCFKBBJZ = require("./chunk-SCFKBBJZ.js");
23
+ module.exports = __toCommonJS(chunk_JWAHHTQF_exports);
24
+ var import_chunk_3IW5B4VR = require("./chunk-3IW5B4VR.js");
25
25
  var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
26
26
  function addVersionDetailsToErrorMessage(message) {
27
- const rows = [["Prisma CLI Version", import_chunk_SCFKBBJZ.version]];
27
+ const rows = [["Prisma CLI Version", import_chunk_3IW5B4VR.version]];
28
28
  return `${message}
29
29
 
30
30
  ${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
@@ -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_2AE2H55C_exports = {};
20
- __export(chunk_2AE2H55C_exports, {
19
+ var chunk_MVHUHZE5_exports = {};
20
+ __export(chunk_MVHUHZE5_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_2AE2H55C_exports);
28
- var import_chunk_ZWINUKID = require("./chunk-ZWINUKID.js");
27
+ module.exports = __toCommonJS(chunk_MVHUHZE5_exports);
28
+ var import_chunk_UZ3OMVFB = require("./chunk-UZ3OMVFB.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_ZWINUKID.prismaSchemaWasm.lint(JSON.stringify(schemas));
32
+ const lintResult = import_chunk_UZ3OMVFB.prismaSchemaWasm.lint(JSON.stringify(schemas));
33
33
  const lintDiagnostics = JSON.parse(lintResult);
34
34
  return lintDiagnostics;
35
35
  }
@@ -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_3MSKE2BF_exports = {};
30
- __export(chunk_3MSKE2BF_exports, {
29
+ var chunk_S3DSAPBW_exports = {};
30
+ __export(chunk_S3DSAPBW_exports, {
31
31
  ValidateError: () => ValidateError,
32
32
  validate: () => validate
33
33
  });
34
- module.exports = __toCommonJS(chunk_3MSKE2BF_exports);
34
+ module.exports = __toCommonJS(chunk_S3DSAPBW_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_YIFFEUFQ = require("./chunk-YIFFEUFQ.js");
39
- var import_chunk_ZWINUKID = require("./chunk-ZWINUKID.js");
38
+ var import_chunk_JWAHHTQF = require("./chunk-JWAHHTQF.js");
39
+ var import_chunk_UZ3OMVFB = require("./chunk-UZ3OMVFB.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_YIFFEUFQ.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
+ super((0, import_chunk_JWAHHTQF.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_ZWINUKID.prismaSchemaWasm.debug_panic();
74
+ import_chunk_UZ3OMVFB.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_ZWINUKID.prismaSchemaWasm.validate(params);
80
+ import_chunk_UZ3OMVFB.prismaSchemaWasm.validate(params);
81
81
  },
82
82
  (e) => ({
83
83
  type: "wasm-error",
@@ -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_ZWINUKID_exports = {};
30
- __export(chunk_ZWINUKID_exports, {
29
+ var chunk_UZ3OMVFB_exports = {};
30
+ __export(chunk_UZ3OMVFB_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_ZWINUKID_exports);
36
- var import_chunk_SA67765L = require("./chunk-SA67765L.js");
35
+ module.exports = __toCommonJS(chunk_UZ3OMVFB_exports);
36
+ var import_chunk_3BXWI45I = require("./chunk-3BXWI45I.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_SA67765L.require_package)();
45
+ var { dependencies } = (0, import_chunk_3BXWI45I.require_package)();
46
46
  var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
47
47
  globalThis.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_WXRVYSYN.WasmPanicRegistry();
@@ -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_GANLEYUE_exports = {};
30
- __export(chunk_GANLEYUE_exports, {
29
+ var chunk_VSRVLIUX_exports = {};
30
+ __export(chunk_VSRVLIUX_exports, {
31
31
  GetDmmfError: () => GetDmmfError,
32
32
  getDMMF: () => getDMMF
33
33
  });
34
- module.exports = __toCommonJS(chunk_GANLEYUE_exports);
34
+ module.exports = __toCommonJS(chunk_VSRVLIUX_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_YIFFEUFQ = require("./chunk-YIFFEUFQ.js");
38
- var import_chunk_ZWINUKID = require("./chunk-ZWINUKID.js");
37
+ var import_chunk_JWAHHTQF = require("./chunk-JWAHHTQF.js");
38
+ var import_chunk_UZ3OMVFB = require("./chunk-UZ3OMVFB.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_YIFFEUFQ.addVersionDetailsToErrorMessage)(errorMessageWithContext));
61
+ super((0, import_chunk_JWAHHTQF.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_ZWINUKID.prismaSchemaWasm.debug_panic();
73
+ import_chunk_UZ3OMVFB.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_ZWINUKID.prismaSchemaWasm.get_dmmf(params);
79
+ const data = import_chunk_UZ3OMVFB.prismaSchemaWasm.get_dmmf(params);
80
80
  return data;
81
81
  },
82
82
  (e) => ({