@prisma/migrate 6.6.0-dev.42 → 6.6.0-dev.50

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/bin.js +7 -7
  2. package/dist/{chunk-TGV6QGEF.js → chunk-QVMYNWAN.js} +191 -37
  3. package/dist/{chunk-4EPP5QEP.js → chunk-SA6K55XE.js} +24 -74
  4. package/dist/{chunk-IC2RT2YE.js → chunk-VHHIONLT.js} +25 -75
  5. package/dist/{chunk-QJT4H5N6.js → chunk-ZJ4IDCRR.js} +4 -4
  6. package/dist/commands/DbPull.js +3 -3
  7. package/dist/commands/MigrateDiff.js +3 -3
  8. package/dist/index.js +7 -10
  9. package/dist/internals/src/Generator.d.ts +1 -1
  10. package/dist/internals/src/cli/directoryConfig.d.ts +1 -1
  11. package/dist/internals/src/cli/getSchema.d.ts +3 -28
  12. package/dist/internals/src/cli/hashes.d.ts +1 -2
  13. package/dist/internals/src/cli/schemaContext.d.ts +5 -4
  14. package/dist/internals/src/client/getClientEngineType.d.ts +1 -1
  15. package/dist/internals/src/convertCredentials.d.ts +1 -1
  16. package/dist/internals/src/engine-commands/getConfig.d.ts +1 -1
  17. package/dist/internals/src/engine-commands/getDmmf.d.ts +2 -1
  18. package/dist/internals/src/get-generators/getGenerators.d.ts +1 -1
  19. package/dist/internals/src/get-generators/utils/binaryTypeToEngineType.d.ts +1 -1
  20. package/dist/internals/src/get-generators/utils/engineTypeToBinaryType.d.ts +1 -1
  21. package/dist/internals/src/get-generators/utils/fixBinaryTargets.d.ts +1 -1
  22. package/dist/internals/src/get-generators/utils/getBinaryPathsByVersion.d.ts +1 -1
  23. package/dist/internals/src/get-generators/utils/getEngineVersionForGenerator.d.ts +1 -1
  24. package/dist/internals/src/get-generators/utils/printGeneratorConfig.d.ts +1 -1
  25. package/dist/internals/src/index.d.ts +2 -2
  26. package/dist/internals/src/types.d.ts +1 -1
  27. package/dist/internals/src/utils/extractPreviewFeatures.d.ts +1 -1
  28. package/dist/internals/src/utils/getEnvPaths.d.ts +1 -1
  29. package/dist/internals/src/utils/parseEnvValue.d.ts +1 -1
  30. package/dist/migrate/src/index.d.ts +0 -1
  31. package/dist/migrate/src/types.d.ts +1 -1
  32. package/dist/migrate/src/utils/createMigration.d.ts +1 -1
  33. package/dist/migrate/src/utils/ensureDatabaseExists.d.ts +1 -1
  34. package/dist/migrate/src/utils/introspectSql.d.ts +1 -1
  35. package/dist/migrate/src/utils/printDatasources.d.ts +1 -1
  36. package/dist/utils/setupCockroach.js +2 -2
  37. package/dist/utils/setupMSSQL.js +1 -1
  38. package/dist/utils/setupPostgres.js +2 -2
  39. package/package.json +7 -8
  40. package/dist/chunk-GKDFIHM2.js +0 -45
  41. package/dist/migrate/src/utils/getSchemaPathAndPrint.d.ts +0 -10
  42. package/dist/utils/getSchemaPathAndPrint.js +0 -27
@@ -26,13 +26,13 @@ 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_4EPP5QEP_exports = {};
30
- __export(chunk_4EPP5QEP_exports, {
29
+ var chunk_SA6K55XE_exports = {};
30
+ __export(chunk_SA6K55XE_exports, {
31
31
  MigrateDiff: () => MigrateDiff
32
32
  });
33
- module.exports = __toCommonJS(chunk_4EPP5QEP_exports);
34
- var import_chunk_33LPBNDX = require("./chunk-33LPBNDX.js");
33
+ module.exports = __toCommonJS(chunk_SA6K55XE_exports);
35
34
  var import_chunk_ZB5NPOJW = require("./chunk-ZB5NPOJW.js");
35
+ var import_chunk_33LPBNDX = require("./chunk-33LPBNDX.js");
36
36
  var import_chunk_VAJ4VX67 = require("./chunk-VAJ4VX67.js");
37
37
  var import_chunk_PDCXVUV3 = require("./chunk-PDCXVUV3.js");
38
38
  var import_chunk_V6PVGSDJ = require("./chunk-V6PVGSDJ.js");
@@ -10333,8 +10333,10 @@ var require_package = (0, import_chunk_2ESYSVXG.__commonJS)({
10333
10333
  dependencies: {
10334
10334
  "@prisma/config": "workspace:*",
10335
10335
  "@prisma/debug": "workspace:*",
10336
+ "@prisma/dmmf": "workspace:*",
10336
10337
  "@prisma/engines": "workspace:*",
10337
10338
  "@prisma/fetch-engine": "workspace:*",
10339
+ "@prisma/generator": "workspace:*",
10338
10340
  "@prisma/generator-helper": "workspace:*",
10339
10341
  "@prisma/get-platform": "workspace:*",
10340
10342
  "@prisma/prisma-schema-wasm": "6.6.0-25.0302bd9e49a13a657a302c060e529d54b08fad04",
@@ -10983,15 +10985,16 @@ function renderLookupError(error) {
10983
10985
  function renderDefaultLookupError(error, cwd) {
10984
10986
  const parts = [
10985
10987
  `Could not find Prisma Schema that is required for this command.`,
10986
- `You can either provide it with ${(0, import_chunk_SKRR5WT4.green)(
10987
- "`--schema`"
10988
- )} argument, set it as \`prisma.schema\` in your package.json or put it into the default location.`,
10988
+ `You can either provide it with ${(0, import_chunk_SKRR5WT4.green)("`--schema`")} argument,`,
10989
+ `set it in your ${(0, import_chunk_SKRR5WT4.green)("`prisma.config.ts`")},`,
10990
+ `set it as ${(0, import_chunk_SKRR5WT4.green)("`prisma.schema`")} in your ${(0, import_chunk_SKRR5WT4.green)("package.json")},`,
10991
+ `or put it into the default location (${(0, import_chunk_SKRR5WT4.green)("`./prisma/schema.prisma`")}, or ${(0, import_chunk_SKRR5WT4.green)("`./schema.prisma`")}.`,
10989
10992
  "Checked following paths:\n"
10990
10993
  ];
10991
10994
  const printedPaths = /* @__PURE__ */ new Set();
10992
10995
  for (const failure of error.failures) {
10993
- const filePath = failure.rule.schemaPath.path;
10994
- if (!printedPaths.has(failure.rule.schemaPath.path)) {
10996
+ const filePath = failure.path;
10997
+ if (!printedPaths.has(failure.path)) {
10995
10998
  parts.push(`${import_path2.default.relative(cwd, filePath)}: ${renderLookupError(failure.error)}`);
10996
10999
  printedPaths.add(filePath);
10997
11000
  }
@@ -11017,21 +11020,13 @@ async function readSchemaFromPrismaConfigBasedLocation(schemaPathFromConfig) {
11017
11020
  error: { kind: "PrismaConfigNotConfigured" }
11018
11021
  };
11019
11022
  }
11020
- let schemaResult;
11021
- if (schemaPathFromConfig.kind === "single") {
11022
- schemaResult = await readSchemaFromSingleFile(schemaPathFromConfig.filePath);
11023
- if (!schemaResult.ok) {
11024
- throw new Error(
11025
- `Could not load schema from file \`${schemaPathFromConfig.filePath}\` provided by "prisma.config.ts"\`: ${renderLookupError(schemaResult.error)}`
11026
- );
11027
- }
11028
- } else {
11029
- schemaResult = await readSchemaFromDirectory(schemaPathFromConfig.folderPath);
11030
- if (!schemaResult.ok) {
11031
- throw new Error(
11032
- `Could not load schema from folder \`${schemaPathFromConfig.folderPath}\` provided by "prisma.config.ts"\`: ${renderLookupError(schemaResult.error)}`
11033
- );
11034
- }
11023
+ const schemaResult = await readSchemaFromFileOrDirectory(schemaPathFromConfig);
11024
+ if (!schemaResult.ok) {
11025
+ throw new Error(
11026
+ `Could not load schema from \`${schemaPathFromConfig}\` provided by "prisma.config.ts"\`: ${renderLookupError(
11027
+ schemaResult.error
11028
+ )}`
11029
+ );
11035
11030
  }
11036
11031
  return schemaResult;
11037
11032
  }
@@ -11066,51 +11061,14 @@ async function getSchemaFromPackageJson(cwd) {
11066
11061
  return lookupResult;
11067
11062
  }
11068
11063
  async function getDefaultSchema(cwd, failures = []) {
11069
- const schemaPrisma = {
11070
- schemaPath: {
11071
- path: import_path2.default.join(cwd, "schema.prisma"),
11072
- kind: "file"
11073
- }
11074
- };
11075
- const prismaSchemaFile = {
11076
- schemaPath: {
11077
- path: import_path2.default.join(cwd, "prisma", "schema.prisma"),
11078
- kind: "file"
11079
- },
11080
- conflictsWith: {
11081
- path: import_path2.default.join(cwd, "prisma", "schema"),
11082
- kind: "directory"
11083
- }
11084
- };
11085
- const prismaSchemaFolder = {
11086
- schemaPath: {
11087
- path: import_path2.default.join(cwd, "prisma", "schema"),
11088
- kind: "directory"
11089
- },
11090
- conflictsWith: {
11091
- path: import_path2.default.join(cwd, "prisma", "schema.prisma"),
11092
- kind: "file"
11093
- }
11094
- };
11095
- const rules = [schemaPrisma, prismaSchemaFile, prismaSchemaFolder];
11096
- for (const rule of rules) {
11097
- debug2(`Checking existence of ${rule.schemaPath.path}`);
11098
- const schema = await loadSchemaFromDefaultLocation(rule.schemaPath);
11064
+ const lookupPaths = [import_path2.default.join(cwd, "schema.prisma"), import_path2.default.join(cwd, "prisma", "schema.prisma")];
11065
+ for (const path7 of lookupPaths) {
11066
+ debug2(`Checking existence of ${path7}`);
11067
+ const schema = await readSchemaFromSingleFile(path7);
11099
11068
  if (!schema.ok) {
11100
- failures.push({ rule, error: schema.error });
11069
+ failures.push({ path: path7, error: schema.error });
11101
11070
  continue;
11102
11071
  }
11103
- if (rule.conflictsWith) {
11104
- const conflictingSchema = await loadSchemaFromDefaultLocation(rule.conflictsWith);
11105
- if (conflictingSchema.ok) {
11106
- throw new Error(
11107
- `Found Prisma Schemas at both \`${import_path2.default.relative(cwd, rule.schemaPath.path)}\` and \`${import_path2.default.relative(
11108
- cwd,
11109
- rule.conflictsWith.path
11110
- )}\`. Please remove one.`
11111
- );
11112
- }
11113
- }
11114
11072
  return schema;
11115
11073
  }
11116
11074
  return {
@@ -11121,14 +11079,6 @@ async function getDefaultSchema(cwd, failures = []) {
11121
11079
  }
11122
11080
  };
11123
11081
  }
11124
- async function loadSchemaFromDefaultLocation(lookupPath) {
11125
- switch (lookupPath.kind) {
11126
- case "file":
11127
- return readSchemaFromSingleFile(lookupPath.path);
11128
- case "directory":
11129
- return readSchemaFromDirectory(lookupPath.path);
11130
- }
11131
- }
11132
11082
  var debug3 = (0, import_debug.default)("prisma:migrate:diff");
11133
11083
  var helpOptions = (0, import_internals.format)(
11134
11084
  `${(0, import_chunk_SKRR5WT4.bold)("Usage")}
@@ -26,13 +26,13 @@ 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_IC2RT2YE_exports = {};
30
- __export(chunk_IC2RT2YE_exports, {
29
+ var chunk_VHHIONLT_exports = {};
30
+ __export(chunk_VHHIONLT_exports, {
31
31
  MigrateDiff: () => MigrateDiff
32
32
  });
33
- module.exports = __toCommonJS(chunk_IC2RT2YE_exports);
34
- var import_chunk_33LPBNDX = require("./chunk-33LPBNDX.js");
33
+ module.exports = __toCommonJS(chunk_VHHIONLT_exports);
35
34
  var import_chunk_ZB5NPOJW = require("./chunk-ZB5NPOJW.js");
35
+ var import_chunk_33LPBNDX = require("./chunk-33LPBNDX.js");
36
36
  var import_chunk_VAJ4VX67 = require("./chunk-VAJ4VX67.js");
37
37
  var import_chunk_PDCXVUV3 = require("./chunk-PDCXVUV3.js");
38
38
  var import_chunk_V6PVGSDJ = require("./chunk-V6PVGSDJ.js");
@@ -10252,7 +10252,7 @@ var require_package = (0, import_chunk_2ESYSVXG.__commonJS)({
10252
10252
  "../internals/package.json"(exports, module2) {
10253
10253
  module2.exports = {
10254
10254
  name: "@prisma/internals",
10255
- version: "6.6.0-dev.42",
10255
+ version: "6.6.0-dev.50",
10256
10256
  description: "This package is intended for Prisma's internal use",
10257
10257
  main: "dist/index.js",
10258
10258
  types: "dist/index.d.ts",
@@ -10333,8 +10333,10 @@ var require_package = (0, import_chunk_2ESYSVXG.__commonJS)({
10333
10333
  dependencies: {
10334
10334
  "@prisma/config": "workspace:*",
10335
10335
  "@prisma/debug": "workspace:*",
10336
+ "@prisma/dmmf": "workspace:*",
10336
10337
  "@prisma/engines": "workspace:*",
10337
10338
  "@prisma/fetch-engine": "workspace:*",
10339
+ "@prisma/generator": "workspace:*",
10338
10340
  "@prisma/generator-helper": "workspace:*",
10339
10341
  "@prisma/get-platform": "workspace:*",
10340
10342
  "@prisma/prisma-schema-wasm": "6.6.0-25.0302bd9e49a13a657a302c060e529d54b08fad04",
@@ -10983,15 +10985,16 @@ function renderLookupError(error) {
10983
10985
  function renderDefaultLookupError(error, cwd) {
10984
10986
  const parts = [
10985
10987
  `Could not find Prisma Schema that is required for this command.`,
10986
- `You can either provide it with ${(0, import_chunk_SKRR5WT4.green)(
10987
- "`--schema`"
10988
- )} argument, set it as \`prisma.schema\` in your package.json or put it into the default location.`,
10988
+ `You can either provide it with ${(0, import_chunk_SKRR5WT4.green)("`--schema`")} argument,`,
10989
+ `set it in your ${(0, import_chunk_SKRR5WT4.green)("`prisma.config.ts`")},`,
10990
+ `set it as ${(0, import_chunk_SKRR5WT4.green)("`prisma.schema`")} in your ${(0, import_chunk_SKRR5WT4.green)("package.json")},`,
10991
+ `or put it into the default location (${(0, import_chunk_SKRR5WT4.green)("`./prisma/schema.prisma`")}, or ${(0, import_chunk_SKRR5WT4.green)("`./schema.prisma`")}.`,
10989
10992
  "Checked following paths:\n"
10990
10993
  ];
10991
10994
  const printedPaths = /* @__PURE__ */ new Set();
10992
10995
  for (const failure of error.failures) {
10993
- const filePath = failure.rule.schemaPath.path;
10994
- if (!printedPaths.has(failure.rule.schemaPath.path)) {
10996
+ const filePath = failure.path;
10997
+ if (!printedPaths.has(failure.path)) {
10995
10998
  parts.push(`${import_path2.default.relative(cwd, filePath)}: ${renderLookupError(failure.error)}`);
10996
10999
  printedPaths.add(filePath);
10997
11000
  }
@@ -11017,21 +11020,13 @@ async function readSchemaFromPrismaConfigBasedLocation(schemaPathFromConfig) {
11017
11020
  error: { kind: "PrismaConfigNotConfigured" }
11018
11021
  };
11019
11022
  }
11020
- let schemaResult;
11021
- if (schemaPathFromConfig.kind === "single") {
11022
- schemaResult = await readSchemaFromSingleFile(schemaPathFromConfig.filePath);
11023
- if (!schemaResult.ok) {
11024
- throw new Error(
11025
- `Could not load schema from file \`${schemaPathFromConfig.filePath}\` provided by "prisma.config.ts"\`: ${renderLookupError(schemaResult.error)}`
11026
- );
11027
- }
11028
- } else {
11029
- schemaResult = await readSchemaFromDirectory(schemaPathFromConfig.folderPath);
11030
- if (!schemaResult.ok) {
11031
- throw new Error(
11032
- `Could not load schema from folder \`${schemaPathFromConfig.folderPath}\` provided by "prisma.config.ts"\`: ${renderLookupError(schemaResult.error)}`
11033
- );
11034
- }
11023
+ const schemaResult = await readSchemaFromFileOrDirectory(schemaPathFromConfig);
11024
+ if (!schemaResult.ok) {
11025
+ throw new Error(
11026
+ `Could not load schema from \`${schemaPathFromConfig}\` provided by "prisma.config.ts"\`: ${renderLookupError(
11027
+ schemaResult.error
11028
+ )}`
11029
+ );
11035
11030
  }
11036
11031
  return schemaResult;
11037
11032
  }
@@ -11066,51 +11061,14 @@ async function getSchemaFromPackageJson(cwd) {
11066
11061
  return lookupResult;
11067
11062
  }
11068
11063
  async function getDefaultSchema(cwd, failures = []) {
11069
- const schemaPrisma = {
11070
- schemaPath: {
11071
- path: import_path2.default.join(cwd, "schema.prisma"),
11072
- kind: "file"
11073
- }
11074
- };
11075
- const prismaSchemaFile = {
11076
- schemaPath: {
11077
- path: import_path2.default.join(cwd, "prisma", "schema.prisma"),
11078
- kind: "file"
11079
- },
11080
- conflictsWith: {
11081
- path: import_path2.default.join(cwd, "prisma", "schema"),
11082
- kind: "directory"
11083
- }
11084
- };
11085
- const prismaSchemaFolder = {
11086
- schemaPath: {
11087
- path: import_path2.default.join(cwd, "prisma", "schema"),
11088
- kind: "directory"
11089
- },
11090
- conflictsWith: {
11091
- path: import_path2.default.join(cwd, "prisma", "schema.prisma"),
11092
- kind: "file"
11093
- }
11094
- };
11095
- const rules = [schemaPrisma, prismaSchemaFile, prismaSchemaFolder];
11096
- for (const rule of rules) {
11097
- debug2(`Checking existence of ${rule.schemaPath.path}`);
11098
- const schema = await loadSchemaFromDefaultLocation(rule.schemaPath);
11064
+ const lookupPaths = [import_path2.default.join(cwd, "schema.prisma"), import_path2.default.join(cwd, "prisma", "schema.prisma")];
11065
+ for (const path7 of lookupPaths) {
11066
+ debug2(`Checking existence of ${path7}`);
11067
+ const schema = await readSchemaFromSingleFile(path7);
11099
11068
  if (!schema.ok) {
11100
- failures.push({ rule, error: schema.error });
11069
+ failures.push({ path: path7, error: schema.error });
11101
11070
  continue;
11102
11071
  }
11103
- if (rule.conflictsWith) {
11104
- const conflictingSchema = await loadSchemaFromDefaultLocation(rule.conflictsWith);
11105
- if (conflictingSchema.ok) {
11106
- throw new Error(
11107
- `Found Prisma Schemas at both \`${import_path2.default.relative(cwd, rule.schemaPath.path)}\` and \`${import_path2.default.relative(
11108
- cwd,
11109
- rule.conflictsWith.path
11110
- )}\`. Please remove one.`
11111
- );
11112
- }
11113
- }
11114
11072
  return schema;
11115
11073
  }
11116
11074
  return {
@@ -11121,14 +11079,6 @@ async function getDefaultSchema(cwd, failures = []) {
11121
11079
  }
11122
11080
  };
11123
11081
  }
11124
- async function loadSchemaFromDefaultLocation(lookupPath) {
11125
- switch (lookupPath.kind) {
11126
- case "file":
11127
- return readSchemaFromSingleFile(lookupPath.path);
11128
- case "directory":
11129
- return readSchemaFromDirectory(lookupPath.path);
11130
- }
11131
- }
11132
11082
  var debug3 = (0, import_debug.default)("prisma:migrate:diff");
11133
11083
  var helpOptions = (0, import_internals.format)(
11134
11084
  `${(0, import_chunk_SKRR5WT4.bold)("Usage")}
@@ -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_QJT4H5N6_exports = {};
30
- __export(chunk_QJT4H5N6_exports, {
29
+ var chunk_ZJ4IDCRR_exports = {};
30
+ __export(chunk_ZJ4IDCRR_exports, {
31
31
  DbPull: () => DbPull
32
32
  });
33
- module.exports = __toCommonJS(chunk_QJT4H5N6_exports);
33
+ module.exports = __toCommonJS(chunk_ZJ4IDCRR_exports);
34
34
  var import_chunk_IINN7QUV = require("./chunk-IINN7QUV.js");
35
- var import_chunk_JZ75RIMZ = require("./chunk-JZ75RIMZ.js");
36
35
  var import_chunk_RR6BKMNO = require("./chunk-RR6BKMNO.js");
37
36
  var import_chunk_RTGQXNX6 = require("./chunk-RTGQXNX6.js");
38
37
  var import_chunk_AI6DH66U = require("./chunk-AI6DH66U.js");
39
38
  var import_chunk_AHJ2N6BJ = require("./chunk-AHJ2N6BJ.js");
39
+ var import_chunk_JZ75RIMZ = require("./chunk-JZ75RIMZ.js");
40
40
  var import_chunk_JFKDSUIE = require("./chunk-JFKDSUIE.js");
41
41
  var import_chunk_LGYRZ6CV = require("./chunk-LGYRZ6CV.js");
42
42
  var import_chunk_D2DGSPW6 = require("./chunk-D2DGSPW6.js");
@@ -18,16 +18,16 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var DbPull_exports = {};
20
20
  __export(DbPull_exports, {
21
- DbPull: () => import_chunk_QJT4H5N6.DbPull
21
+ DbPull: () => import_chunk_ZJ4IDCRR.DbPull
22
22
  });
23
23
  module.exports = __toCommonJS(DbPull_exports);
24
- var import_chunk_QJT4H5N6 = require("../chunk-QJT4H5N6.js");
24
+ var import_chunk_ZJ4IDCRR = require("../chunk-ZJ4IDCRR.js");
25
25
  var import_chunk_IINN7QUV = require("../chunk-IINN7QUV.js");
26
- var import_chunk_JZ75RIMZ = require("../chunk-JZ75RIMZ.js");
27
26
  var import_chunk_RR6BKMNO = require("../chunk-RR6BKMNO.js");
28
27
  var import_chunk_RTGQXNX6 = require("../chunk-RTGQXNX6.js");
29
28
  var import_chunk_AI6DH66U = require("../chunk-AI6DH66U.js");
30
29
  var import_chunk_AHJ2N6BJ = require("../chunk-AHJ2N6BJ.js");
30
+ var import_chunk_JZ75RIMZ = require("../chunk-JZ75RIMZ.js");
31
31
  var import_chunk_JFKDSUIE = require("../chunk-JFKDSUIE.js");
32
32
  var import_chunk_LGYRZ6CV = require("../chunk-LGYRZ6CV.js");
33
33
  var import_chunk_2R6DII47 = require("../chunk-2R6DII47.js");
@@ -18,12 +18,12 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var MigrateDiff_exports = {};
20
20
  __export(MigrateDiff_exports, {
21
- MigrateDiff: () => import_chunk_IC2RT2YE.MigrateDiff
21
+ MigrateDiff: () => import_chunk_VHHIONLT.MigrateDiff
22
22
  });
23
23
  module.exports = __toCommonJS(MigrateDiff_exports);
24
- var import_chunk_IC2RT2YE = require("../chunk-IC2RT2YE.js");
25
- var import_chunk_33LPBNDX = require("../chunk-33LPBNDX.js");
24
+ var import_chunk_VHHIONLT = require("../chunk-VHHIONLT.js");
26
25
  var import_chunk_ZB5NPOJW = require("../chunk-ZB5NPOJW.js");
26
+ var import_chunk_33LPBNDX = require("../chunk-33LPBNDX.js");
27
27
  var import_chunk_VAJ4VX67 = require("../chunk-VAJ4VX67.js");
28
28
  var import_chunk_PDCXVUV3 = require("../chunk-PDCXVUV3.js");
29
29
  var import_chunk_V6PVGSDJ = require("../chunk-V6PVGSDJ.js");
package/dist/index.js CHANGED
@@ -21,7 +21,7 @@ __export(index_exports, {
21
21
  DbCommand: () => import_chunk_EJG7GKM7.DbCommand,
22
22
  DbDrop: () => import_chunk_SQKGZVG3.DbDrop,
23
23
  DbExecute: () => import_chunk_GAKKKF5T.DbExecute,
24
- DbPull: () => import_chunk_QJT4H5N6.DbPull,
24
+ DbPull: () => import_chunk_ZJ4IDCRR.DbPull,
25
25
  DbPush: () => import_chunk_3PIR4R46.DbPush,
26
26
  DbSeed: () => import_chunk_B4SUSDC2.DbSeed,
27
27
  EngineResults: () => import_chunk_LVR7W5DD.EngineResults,
@@ -29,32 +29,29 @@ __export(index_exports, {
29
29
  MigrateCommand: () => import_chunk_LLO7YF56.MigrateCommand,
30
30
  MigrateDeploy: () => import_chunk_HHVLUI3H.MigrateDeploy,
31
31
  MigrateDev: () => import_chunk_CKRN45WP.MigrateDev,
32
- MigrateDiff: () => import_chunk_IC2RT2YE.MigrateDiff,
32
+ MigrateDiff: () => import_chunk_VHHIONLT.MigrateDiff,
33
33
  MigrateReset: () => import_chunk_O723A5JE.MigrateReset,
34
34
  MigrateResolve: () => import_chunk_KN2W5IP7.MigrateResolve,
35
35
  MigrateStatus: () => import_chunk_GKHRL6AR.MigrateStatus,
36
36
  SchemaEngine: () => import_chunk_D2DGSPW6.SchemaEngine,
37
37
  byline: () => import_chunk_L6KOIJJ5.byline,
38
38
  getDatabaseVersionSafe: () => import_chunk_NIKXBMZL.getDatabaseVersionSafe,
39
- getSchemaPathAndPrint: () => import_chunk_GKDFIHM2.getSchemaPathAndPrint,
40
- introspectSql: () => import_chunk_5LTDMS3H.introspectSql,
41
- printSchemaLoadedMessage: () => import_chunk_GKDFIHM2.printSchemaLoadedMessage
39
+ introspectSql: () => import_chunk_5LTDMS3H.introspectSql
42
40
  });
43
41
  module.exports = __toCommonJS(index_exports);
44
- var import_chunk_GKDFIHM2 = require("./chunk-GKDFIHM2.js");
45
42
  var import_chunk_5LTDMS3H = require("./chunk-5LTDMS3H.js");
46
43
  var import_chunk_NIKXBMZL = require("./chunk-NIKXBMZL.js");
47
44
  var import_chunk_O723A5JE = require("./chunk-O723A5JE.js");
48
45
  var import_chunk_KN2W5IP7 = require("./chunk-KN2W5IP7.js");
49
46
  var import_chunk_GKHRL6AR = require("./chunk-GKHRL6AR.js");
50
47
  var import_chunk_GAKKKF5T = require("./chunk-GAKKKF5T.js");
51
- var import_chunk_QJT4H5N6 = require("./chunk-QJT4H5N6.js");
48
+ var import_chunk_ZJ4IDCRR = require("./chunk-ZJ4IDCRR.js");
52
49
  var import_chunk_IINN7QUV = require("./chunk-IINN7QUV.js");
53
- var import_chunk_JZ75RIMZ = require("./chunk-JZ75RIMZ.js");
54
50
  var import_chunk_RR6BKMNO = require("./chunk-RR6BKMNO.js");
55
51
  var import_chunk_RTGQXNX6 = require("./chunk-RTGQXNX6.js");
56
52
  var import_chunk_AI6DH66U = require("./chunk-AI6DH66U.js");
57
53
  var import_chunk_AHJ2N6BJ = require("./chunk-AHJ2N6BJ.js");
54
+ var import_chunk_JZ75RIMZ = require("./chunk-JZ75RIMZ.js");
58
55
  var import_chunk_JFKDSUIE = require("./chunk-JFKDSUIE.js");
59
56
  var import_chunk_LGYRZ6CV = require("./chunk-LGYRZ6CV.js");
60
57
  var import_chunk_3PIR4R46 = require("./chunk-3PIR4R46.js");
@@ -68,9 +65,9 @@ var import_chunk_5LKIRKDL = require("./chunk-5LKIRKDL.js");
68
65
  var import_chunk_KRQEFTDT = require("./chunk-KRQEFTDT.js");
69
66
  var import_chunk_UP6FVCDK = require("./chunk-UP6FVCDK.js");
70
67
  var import_chunk_2R6DII47 = require("./chunk-2R6DII47.js");
71
- var import_chunk_IC2RT2YE = require("./chunk-IC2RT2YE.js");
72
- var import_chunk_33LPBNDX = require("./chunk-33LPBNDX.js");
68
+ var import_chunk_VHHIONLT = require("./chunk-VHHIONLT.js");
73
69
  var import_chunk_ZB5NPOJW = require("./chunk-ZB5NPOJW.js");
70
+ var import_chunk_33LPBNDX = require("./chunk-33LPBNDX.js");
74
71
  var import_chunk_VAJ4VX67 = require("./chunk-VAJ4VX67.js");
75
72
  var import_chunk_PDCXVUV3 = require("./chunk-PDCXVUV3.js");
76
73
  var import_chunk_V6PVGSDJ = require("./chunk-V6PVGSDJ.js");
@@ -1,4 +1,4 @@
1
- import type { BinaryPaths, GeneratorConfig, GeneratorManifest, GeneratorOptions } from '@prisma/generator-helper';
1
+ import type { BinaryPaths, GeneratorConfig, GeneratorManifest, GeneratorOptions } from '@prisma/generator';
2
2
  export declare class Generator {
3
3
  private generatorProcess;
4
4
  manifest: GeneratorManifest | null;
@@ -4,4 +4,4 @@ export type DirectoryConfig = {
4
4
  typedSqlDirPath: string;
5
5
  migrationsDirPath: string;
6
6
  };
7
- export declare function inferDirectoryConfig(schemaContext?: SchemaContext | null): DirectoryConfig;
7
+ export declare function inferDirectoryConfig(schemaContext?: SchemaContext | null, cwd?: string): DirectoryConfig;
@@ -1,31 +1,10 @@
1
1
  import type { GetSchemaResult, SuccessfulLookupResult } from '@prisma/schema-files-loader';
2
- import type { MultipleSchemas } from '../utils/schemaFileInput';
3
2
  type PackageJsonLookupResult = SuccessfulLookupResult | {
4
3
  ok: false;
5
4
  error: {
6
5
  kind: 'PackageJsonNotConfigured';
7
6
  };
8
7
  };
9
- export type SchemaPathFromConfig = {
10
- /**
11
- * Tell Prisma to use a single `.prisma` schema file.
12
- */
13
- kind: 'single';
14
- /**
15
- * The path to a single `.prisma` schema file.
16
- */
17
- filePath: string;
18
- } | {
19
- /**
20
- * Tell Prisma to use multiple `.prisma` schema files, via the `prismaSchemaFolder` preview feature.
21
- */
22
- kind: 'multi';
23
- /**
24
- * The path to a folder containing multiple `.prisma` schema files.
25
- * All of the files in this folder will be used.
26
- */
27
- folderPath: string;
28
- };
29
8
  export type GetSchemaOptions = {
30
9
  cwd?: string;
31
10
  argumentName?: string;
@@ -36,7 +15,7 @@ export type GetSchemaOptions = {
36
15
  * @param schemaPathFromConfig
37
16
  * @param opts
38
17
  */
39
- export declare function getSchemaWithPath(schemaPathFromArgs?: string, schemaPathFromConfig?: SchemaPathFromConfig, { cwd, argumentName }?: GetSchemaOptions): Promise<GetSchemaResult>;
18
+ export declare function getSchemaWithPath(schemaPathFromArgs?: string, schemaPathFromConfig?: string, { cwd, argumentName }?: GetSchemaOptions): Promise<GetSchemaResult>;
40
19
  /**
41
20
  * Loads the schema, returns null if it is not found
42
21
  * Throws an error if schema is specified explicitly in
@@ -47,7 +26,8 @@ export declare function getSchemaWithPath(schemaPathFromArgs?: string, schemaPat
47
26
  * @param opts
48
27
  * @returns
49
28
  */
50
- export declare function getSchemaWithPathOptional(schemaPathFromArgs?: string, schemaPathFromConfig?: SchemaPathFromConfig, { cwd, argumentName }?: GetSchemaOptions): Promise<GetSchemaResult | null>;
29
+ export declare function getSchemaWithPathOptional(schemaPathFromArgs?: string, schemaPathFromConfig?: string, { cwd, argumentName }?: GetSchemaOptions): Promise<GetSchemaResult | null>;
30
+ export declare function printSchemaLoadedMessage(schemaPath: string): void;
51
31
  export type PrismaConfig = {
52
32
  schema?: string;
53
33
  seed?: string;
@@ -57,9 +37,4 @@ export declare function getPrismaConfigFromPackageJson(cwd: string): Promise<{
57
37
  packagePath: string;
58
38
  } | null>;
59
39
  export declare function getSchemaFromPackageJson(cwd: string): Promise<PackageJsonLookupResult>;
60
- /**
61
- * Small helper that returns the directory which contains the `schema.prisma` file
62
- */
63
- export declare function getSchemaDir(schemaPathFromArgs?: string): Promise<string | null>;
64
- export declare function getSchema(schemaPathFromArgs?: string, schemaPathFromConfig?: SchemaPathFromConfig): Promise<MultipleSchemas>;
65
40
  export {};
@@ -1,9 +1,8 @@
1
- import { type SchemaPathFromConfig } from './getSchema';
2
1
  /**
3
2
  * Get a unique identifier for the project by hashing
4
3
  * the directory with `schema.prisma`
5
4
  */
6
- export declare function getProjectHash(schemaPathFromArgs: string | undefined, schemaPathFromConfig: SchemaPathFromConfig | undefined): Promise<string>;
5
+ export declare function getProjectHash(schemaPathFromArgs: string | undefined, schemaPathFromConfig: string | undefined): Promise<string>;
7
6
  /**
8
7
  * Get a unique identifier for the CLI installation path
9
8
  * which can be either global or local (in project's node_modules)
@@ -1,6 +1,5 @@
1
- import { DataSource, GeneratorConfig } from '@prisma/generator-helper';
1
+ import { DataSource, GeneratorConfig } from '@prisma/generator';
2
2
  import { GetSchemaResult, LoadedFile } from '@prisma/schema-files-loader';
3
- import { SchemaPathFromConfig } from './getSchema';
4
3
  export type SchemaContext = {
5
4
  /**
6
5
  * All loaded schema files and their paths.
@@ -40,19 +39,21 @@ export type SchemaContext = {
40
39
  };
41
40
  type LoadSchemaContextOptions = {
42
41
  schemaPathFromArg?: string;
43
- schemaPathFromConfig?: SchemaPathFromConfig;
42
+ schemaPathFromConfig?: string;
44
43
  printLoadMessage?: boolean;
45
44
  ignoreEnvVarErrors?: boolean;
46
45
  allowNull?: boolean;
47
46
  schemaPathArgumentName?: string;
47
+ cwd?: string;
48
48
  };
49
49
  export declare function loadSchemaContext(opts: LoadSchemaContextOptions & {
50
50
  allowNull: true;
51
51
  }): Promise<SchemaContext | null>;
52
52
  export declare function loadSchemaContext(opts?: LoadSchemaContextOptions): Promise<SchemaContext>;
53
- export declare function processSchemaResult({ schemaResult, printLoadMessage, ignoreEnvVarErrors, }: {
53
+ export declare function processSchemaResult({ schemaResult, printLoadMessage, ignoreEnvVarErrors, cwd, }: {
54
54
  schemaResult: GetSchemaResult;
55
55
  printLoadMessage?: boolean;
56
56
  ignoreEnvVarErrors?: boolean;
57
+ cwd?: string;
57
58
  }): Promise<SchemaContext>;
58
59
  export {};
@@ -1,4 +1,4 @@
1
- import type { GeneratorConfig } from '@prisma/generator-helper';
1
+ import type { GeneratorConfig } from '@prisma/generator';
2
2
  export declare enum ClientEngineType {
3
3
  Library = "library",
4
4
  Binary = "binary",
@@ -1,4 +1,4 @@
1
- import type { ConnectorType } from '@prisma/generator-helper';
1
+ import type { ConnectorType } from '@prisma/generator';
2
2
  import type { DatabaseCredentials } from './types';
3
3
  export declare function credentialsToUri(credentials: DatabaseCredentials): string;
4
4
  export declare function uriToCredentials(connectionString: string): DatabaseCredentials;
@@ -1,4 +1,4 @@
1
- import type { DataSource, EnvValue, GeneratorConfig } from '@prisma/generator-helper';
1
+ import type { DataSource, EnvValue, GeneratorConfig } from '@prisma/generator';
2
2
  import { type SchemaFileInput } from '../utils/schemaFileInput';
3
3
  import { QueryEngineErrorInit } from './queryEngineCommons';
4
4
  export interface GetConfigResponse {
@@ -1,4 +1,5 @@
1
- import type { DataSource, DMMF, GeneratorConfig } from '@prisma/generator-helper';
1
+ import type * as DMMF from '@prisma/dmmf';
2
+ import type { DataSource, GeneratorConfig } from '@prisma/generator';
2
3
  import { type SchemaFileInput } from '../utils/schemaFileInput';
3
4
  import { QueryEngineErrorInit } from './queryEngineCommons';
4
5
  export interface ConfigMetaFormat {
@@ -1,4 +1,4 @@
1
- import type { BinaryTargetsEnvValue, EngineType, GeneratorConfig, SqlQueryOutput } from '@prisma/generator-helper';
1
+ import type { BinaryTargetsEnvValue, EngineType, GeneratorConfig, SqlQueryOutput } from '@prisma/generator';
2
2
  import type { BinaryTarget } from '@prisma/get-platform';
3
3
  import { SchemaContext } from '..';
4
4
  import { Generator } from '../Generator';
@@ -1,3 +1,3 @@
1
1
  import { BinaryType } from '@prisma/fetch-engine';
2
- import type { EngineType } from '@prisma/generator-helper';
2
+ import type { EngineType } from '@prisma/generator';
3
3
  export declare function binaryTypeToEngineType(binaryType: BinaryType): EngineType;
@@ -1,3 +1,3 @@
1
1
  import { BinaryType } from '@prisma/fetch-engine';
2
- import type { EngineType } from '@prisma/generator-helper';
2
+ import type { EngineType } from '@prisma/generator';
3
3
  export declare function engineTypeToBinaryType(engineType: EngineType): BinaryType;
@@ -1,3 +1,3 @@
1
- import { BinaryTargetsEnvValue } from '@prisma/generator-helper';
1
+ import { BinaryTargetsEnvValue } from '@prisma/generator';
2
2
  import { BinaryTarget } from '@prisma/get-platform';
3
3
  export declare function fixBinaryTargets(schemaBinaryTargets: BinaryTargetsEnvValue[], runtimeBinaryTarget: BinaryTarget | string): BinaryTargetsEnvValue[];
@@ -1,3 +1,3 @@
1
- import type { BinaryPaths } from '@prisma/generator-helper';
1
+ import type { BinaryPaths } from '@prisma/generator';
2
2
  import type { GetBinaryPathsByVersionInput } from '../getGenerators';
3
3
  export declare function getBinaryPathsByVersion({ neededVersions, binaryTarget, version, printDownloadProgress, skipDownload, binaryPathsOverride, }: GetBinaryPathsByVersionInput): Promise<Record<string, BinaryPaths>>;
@@ -1,2 +1,2 @@
1
- import type { GeneratorManifest } from '@prisma/generator-helper';
1
+ import type { GeneratorManifest } from '@prisma/generator';
2
2
  export declare function getEngineVersionForGenerator(manifest?: GeneratorManifest, defaultVersion?: string | undefined): string;
@@ -1,4 +1,4 @@
1
- import type { BinaryTargetsEnvValue, GeneratorConfig } from '@prisma/generator-helper';
1
+ import type { BinaryTargetsEnvValue, GeneratorConfig } from '@prisma/generator';
2
2
  export declare function printGeneratorConfig(config: GeneratorConfig): string;
3
3
  export declare class GeneratorConfigClass {
4
4
  private readonly config;
@@ -1,7 +1,7 @@
1
1
  export { checkUnsupportedDataProxy } from './cli/checkUnsupportedDataProxy';
2
2
  export { type DirectoryConfig, inferDirectoryConfig } from './cli/directoryConfig';
3
3
  export { getGeneratorSuccessMessage } from './cli/getGeneratorSuccessMessage';
4
- export { getPrismaConfigFromPackageJson, getSchema, getSchemaDir, type GetSchemaOptions, getSchemaWithPath, getSchemaWithPathOptional, type SchemaPathFromConfig, } from './cli/getSchema';
4
+ export { getPrismaConfigFromPackageJson, type GetSchemaOptions, getSchemaWithPath, getSchemaWithPathOptional, printSchemaLoadedMessage, } from './cli/getSchema';
5
5
  export { getTypescriptVersion } from './cli/getTypescriptVersion';
6
6
  export { getCLIPathHash, getProjectHash } from './cli/hashes';
7
7
  export { unknownCommand } from './cli/Help';
@@ -86,7 +86,7 @@ export { type LoadedEnv, tryLoadEnvs } from './utils/tryLoadEnvs';
86
86
  export { vercelPkgPathRegex } from './utils/vercelPkgPathRegex';
87
87
  export { warnOnce } from './warnOnce';
88
88
  export * as wasm from './wasm';
89
- export type { EnvPaths } from '@prisma/generator-helper';
89
+ export type { EnvPaths } from '@prisma/generator';
90
90
  export type { BinaryTarget } from '@prisma/get-platform';
91
91
  export { getBinaryTargetForCurrentPlatform, getNodeAPIName } from '@prisma/get-platform';
92
92
  export type { GetSchemaResult } from '@prisma/schema-files-loader';