@prisma/migrate 6.4.0-dev.40 → 6.4.0-dev.41

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 (48) hide show
  1. package/dist/CLI.js +3 -3
  2. package/dist/bin.js +54 -40
  3. package/dist/{chunk-CSUAUCRR.js → chunk-5Z62IFXC.js} +6 -5
  4. package/dist/{chunk-7QAR4NT3.js → chunk-62TCLCPV.js} +6 -5
  5. package/dist/{chunk-G66QFMM5.js → chunk-COGVXKKS.js} +8 -7
  6. package/dist/{chunk-77RYI3ZW.js → chunk-HK47ZTH2.js} +6 -5
  7. package/dist/{chunk-NJUAN6V2.js → chunk-L5WSTNST.js} +6 -6
  8. package/dist/{chunk-C6CQ3XNY.js → chunk-LEODRY55.js} +16 -15
  9. package/dist/{chunk-43RWRQLU.js → chunk-LRSJQHJE.js} +6 -5
  10. package/dist/{chunk-JZ6FKTWG.js → chunk-MWDR5RWF.js} +5 -6
  11. package/dist/{chunk-CK5VLKFM.js → chunk-NGDFNKHZ.js} +6 -6
  12. package/dist/{chunk-JESW2ENL.js → chunk-OKNTDCKF.js} +6 -5
  13. package/dist/{chunk-E2XKFV2C.js → chunk-QV7SOU3V.js} +6 -5
  14. package/dist/{chunk-I63N54YI.js → chunk-RR4VDHNZ.js} +6 -5
  15. package/dist/{chunk-WJT3IOMB.js → chunk-VGYN2FAS.js} +6 -5
  16. package/dist/{chunk-OZ7KKAS7.js → chunk-WZSBTF6I.js} +13 -11
  17. package/dist/{chunk-ZU4RWV66.js → chunk-XKAJB3OJ.js} +12 -10
  18. package/dist/commands/DbCommand.js +3 -3
  19. package/dist/commands/DbDrop.js +2 -2
  20. package/dist/commands/DbExecute.js +3 -3
  21. package/dist/commands/DbPull.js +3 -3
  22. package/dist/commands/DbPush.js +3 -3
  23. package/dist/commands/DbSeed.js +3 -3
  24. package/dist/commands/MigrateCommand.js +3 -3
  25. package/dist/commands/MigrateDeploy.js +3 -3
  26. package/dist/commands/MigrateDev.js +3 -3
  27. package/dist/commands/MigrateDiff.js +3 -3
  28. package/dist/commands/MigrateReset.js +3 -3
  29. package/dist/commands/MigrateResolve.js +3 -3
  30. package/dist/commands/MigrateStatus.js +3 -3
  31. package/dist/index.js +38 -38
  32. package/dist/internals/src/cli/types.d.ts +2 -1
  33. package/dist/internals/src/utils/loadEnvFile.d.ts +4 -2
  34. package/dist/migrate/src/CLI.d.ts +2 -1
  35. package/dist/migrate/src/commands/DbCommand.d.ts +2 -1
  36. package/dist/migrate/src/commands/DbDrop.d.ts +2 -1
  37. package/dist/migrate/src/commands/DbExecute.d.ts +2 -1
  38. package/dist/migrate/src/commands/DbPull.d.ts +2 -1
  39. package/dist/migrate/src/commands/DbPush.d.ts +2 -1
  40. package/dist/migrate/src/commands/DbSeed.d.ts +2 -1
  41. package/dist/migrate/src/commands/MigrateCommand.d.ts +2 -1
  42. package/dist/migrate/src/commands/MigrateDeploy.d.ts +2 -1
  43. package/dist/migrate/src/commands/MigrateDev.d.ts +2 -1
  44. package/dist/migrate/src/commands/MigrateDiff.d.ts +2 -1
  45. package/dist/migrate/src/commands/MigrateReset.d.ts +2 -1
  46. package/dist/migrate/src/commands/MigrateResolve.d.ts +2 -1
  47. package/dist/migrate/src/commands/MigrateStatus.d.ts +2 -1
  48. package/package.json +6 -5
package/dist/CLI.js CHANGED
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var CLI_exports = {};
20
20
  __export(CLI_exports, {
21
- CLI: () => import_chunk_JZ6FKTWG.CLI
21
+ CLI: () => import_chunk_MWDR5RWF.CLI
22
22
  });
23
23
  module.exports = __toCommonJS(CLI_exports);
24
- var import_chunk_JZ6FKTWG = require("./chunk-JZ6FKTWG.js");
24
+ var import_chunk_MWDR5RWF = require("./chunk-MWDR5RWF.js");
25
25
  var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
26
26
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
27
- (0, import_chunk_JZ6FKTWG.init_CLI)();
27
+ (0, import_chunk_MWDR5RWF.init_CLI)();
package/dist/bin.js CHANGED
@@ -32,13 +32,13 @@ __export(bin_exports, {
32
32
  default: () => bin_default
33
33
  });
34
34
  module.exports = __toCommonJS(bin_exports);
35
- var import_chunk_JZ6FKTWG = require("./chunk-JZ6FKTWG.js");
35
+ var import_chunk_MWDR5RWF = require("./chunk-MWDR5RWF.js");
36
36
  var import_chunk_JTNVQIRB = require("./chunk-JTNVQIRB.js");
37
- var import_chunk_7QAR4NT3 = require("./chunk-7QAR4NT3.js");
38
- var import_chunk_I63N54YI = require("./chunk-I63N54YI.js");
39
- var import_chunk_77RYI3ZW = require("./chunk-77RYI3ZW.js");
40
- var import_chunk_G66QFMM5 = require("./chunk-G66QFMM5.js");
41
- var import_chunk_C6CQ3XNY = require("./chunk-C6CQ3XNY.js");
37
+ var import_chunk_62TCLCPV = require("./chunk-62TCLCPV.js");
38
+ var import_chunk_RR4VDHNZ = require("./chunk-RR4VDHNZ.js");
39
+ var import_chunk_HK47ZTH2 = require("./chunk-HK47ZTH2.js");
40
+ var import_chunk_COGVXKKS = require("./chunk-COGVXKKS.js");
41
+ var import_chunk_LEODRY55 = require("./chunk-LEODRY55.js");
42
42
  var import_chunk_CUDKD32S = require("./chunk-CUDKD32S.js");
43
43
  var import_chunk_ILJRJJ3S = require("./chunk-ILJRJJ3S.js");
44
44
  var import_chunk_YUCPBDWV = require("./chunk-YUCPBDWV.js");
@@ -49,18 +49,18 @@ var import_chunk_V7DE6JTG = require("./chunk-V7DE6JTG.js");
49
49
  var import_chunk_QBK5XTJE = require("./chunk-QBK5XTJE.js");
50
50
  var import_chunk_INC2OACE = require("./chunk-INC2OACE.js");
51
51
  var import_chunk_GN5BY5N2 = require("./chunk-GN5BY5N2.js");
52
- var import_chunk_JESW2ENL = require("./chunk-JESW2ENL.js");
53
- var import_chunk_E2XKFV2C = require("./chunk-E2XKFV2C.js");
54
- var import_chunk_CK5VLKFM = require("./chunk-CK5VLKFM.js");
55
- var import_chunk_43RWRQLU = require("./chunk-43RWRQLU.js");
56
- var import_chunk_CSUAUCRR = require("./chunk-CSUAUCRR.js");
52
+ var import_chunk_OKNTDCKF = require("./chunk-OKNTDCKF.js");
53
+ var import_chunk_QV7SOU3V = require("./chunk-QV7SOU3V.js");
54
+ var import_chunk_NGDFNKHZ = require("./chunk-NGDFNKHZ.js");
55
+ var import_chunk_LRSJQHJE = require("./chunk-LRSJQHJE.js");
56
+ var import_chunk_5Z62IFXC = require("./chunk-5Z62IFXC.js");
57
57
  var import_chunk_IFCV5MY4 = require("./chunk-IFCV5MY4.js");
58
58
  var import_chunk_SGCF5OHF = require("./chunk-SGCF5OHF.js");
59
59
  var import_chunk_YKUZUAXA = require("./chunk-YKUZUAXA.js");
60
60
  var import_chunk_WOOPRG54 = require("./chunk-WOOPRG54.js");
61
61
  var import_chunk_6QFE3AWR = require("./chunk-6QFE3AWR.js");
62
62
  var import_chunk_LKTTJWFT = require("./chunk-LKTTJWFT.js");
63
- var import_chunk_OZ7KKAS7 = require("./chunk-OZ7KKAS7.js");
63
+ var import_chunk_WZSBTF6I = require("./chunk-WZSBTF6I.js");
64
64
  var import_chunk_A6PMXMMT = require("./chunk-A6PMXMMT.js");
65
65
  var import_chunk_XRTNIFND = require("./chunk-XRTNIFND.js");
66
66
  var import_chunk_TKAGMA5K = require("./chunk-TKAGMA5K.js");
@@ -70,7 +70,7 @@ var import_chunk_J46BJQHT = require("./chunk-J46BJQHT.js");
70
70
  var import_chunk_Q3SQU7C6 = require("./chunk-Q3SQU7C6.js");
71
71
  var import_chunk_CQQQ436N = require("./chunk-CQQQ436N.js");
72
72
  var import_chunk_AAATUOV6 = require("./chunk-AAATUOV6.js");
73
- var import_chunk_NJUAN6V2 = require("./chunk-NJUAN6V2.js");
73
+ var import_chunk_L5WSTNST = require("./chunk-L5WSTNST.js");
74
74
  var import_chunk_U374EXYQ = require("./chunk-U374EXYQ.js");
75
75
  var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
76
76
  var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
@@ -78,25 +78,26 @@ var import_chunk_XJQP3B4W = require("./chunk-XJQP3B4W.js");
78
78
  var import_chunk_KPUNMK5W = require("./chunk-KPUNMK5W.js");
79
79
  var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
80
80
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
81
+ var import_config = require("@prisma/config");
81
82
  var import_debug = __toESM(require("@prisma/debug"));
82
83
  var import_engines_version = require("@prisma/engines-version");
83
84
  var import_internals = require("@prisma/internals");
84
85
  var require_bin = (0, import_chunk_WWAWV7DQ.__commonJS)({
85
86
  "src/bin.ts"(exports, module) {
86
87
  (0, import_chunk_6TE2RIPN.init_colors)();
87
- (0, import_chunk_JZ6FKTWG.init_CLI)();
88
- (0, import_chunk_NJUAN6V2.init_DbCommand)();
89
- (0, import_chunk_G66QFMM5.init_DbExecute)();
90
- (0, import_chunk_C6CQ3XNY.init_DbPull)();
91
- (0, import_chunk_JESW2ENL.init_DbPush)();
92
- (0, import_chunk_E2XKFV2C.init_DbSeed)();
93
- (0, import_chunk_CK5VLKFM.init_MigrateCommand)();
94
- (0, import_chunk_43RWRQLU.init_MigrateDeploy)();
95
- (0, import_chunk_CSUAUCRR.init_MigrateDev)();
96
- (0, import_chunk_OZ7KKAS7.init_MigrateDiff)();
97
- (0, import_chunk_7QAR4NT3.init_MigrateReset)();
98
- (0, import_chunk_I63N54YI.init_MigrateResolve)();
99
- (0, import_chunk_77RYI3ZW.init_MigrateStatus)();
88
+ (0, import_chunk_MWDR5RWF.init_CLI)();
89
+ (0, import_chunk_L5WSTNST.init_DbCommand)();
90
+ (0, import_chunk_COGVXKKS.init_DbExecute)();
91
+ (0, import_chunk_LEODRY55.init_DbPull)();
92
+ (0, import_chunk_OKNTDCKF.init_DbPush)();
93
+ (0, import_chunk_QV7SOU3V.init_DbSeed)();
94
+ (0, import_chunk_NGDFNKHZ.init_MigrateCommand)();
95
+ (0, import_chunk_LRSJQHJE.init_MigrateDeploy)();
96
+ (0, import_chunk_5Z62IFXC.init_MigrateDev)();
97
+ (0, import_chunk_WZSBTF6I.init_MigrateDiff)();
98
+ (0, import_chunk_62TCLCPV.init_MigrateReset)();
99
+ (0, import_chunk_RR4VDHNZ.init_MigrateResolve)();
100
+ (0, import_chunk_HK47ZTH2.init_MigrateStatus)();
100
101
  (0, import_chunk_JTNVQIRB.init_getDatabaseVersionSafe)();
101
102
  process.on("uncaughtException", (e) => {
102
103
  console.log(e);
@@ -108,26 +109,39 @@ var require_bin = (0, import_chunk_WWAWV7DQ.__commonJS)({
108
109
  process.exit(130);
109
110
  });
110
111
  var commandArray = process.argv.slice(2);
112
+ var args = (0, import_internals.arg)(
113
+ commandArray,
114
+ {
115
+ "--config": String
116
+ },
117
+ false,
118
+ true
119
+ );
111
120
  var packageJson = eval(`require('../package.json')`);
112
121
  async function main() {
113
- const cli = import_chunk_JZ6FKTWG.CLI.new({
114
- migrate: import_chunk_CK5VLKFM.MigrateCommand.new({
115
- dev: import_chunk_CSUAUCRR.MigrateDev.new(),
116
- status: import_chunk_77RYI3ZW.MigrateStatus.new(),
117
- resolve: import_chunk_I63N54YI.MigrateResolve.new(),
118
- reset: import_chunk_7QAR4NT3.MigrateReset.new(),
119
- deploy: import_chunk_43RWRQLU.MigrateDeploy.new(),
120
- diff: import_chunk_OZ7KKAS7.MigrateDiff.new()
122
+ const cli = import_chunk_MWDR5RWF.CLI.new({
123
+ migrate: import_chunk_NGDFNKHZ.MigrateCommand.new({
124
+ dev: import_chunk_5Z62IFXC.MigrateDev.new(),
125
+ status: import_chunk_HK47ZTH2.MigrateStatus.new(),
126
+ resolve: import_chunk_RR4VDHNZ.MigrateResolve.new(),
127
+ reset: import_chunk_62TCLCPV.MigrateReset.new(),
128
+ deploy: import_chunk_LRSJQHJE.MigrateDeploy.new(),
129
+ diff: import_chunk_WZSBTF6I.MigrateDiff.new()
121
130
  }),
122
- db: import_chunk_NJUAN6V2.DbCommand.new({
123
- execute: import_chunk_G66QFMM5.DbExecute.new(),
124
- pull: import_chunk_C6CQ3XNY.DbPull.new(),
125
- push: import_chunk_JESW2ENL.DbPush.new(),
131
+ db: import_chunk_L5WSTNST.DbCommand.new({
132
+ execute: import_chunk_COGVXKKS.DbExecute.new(),
133
+ pull: import_chunk_LEODRY55.DbPull.new(),
134
+ push: import_chunk_OKNTDCKF.DbPush.new(),
126
135
  // drop: DbDrop.new(),
127
- seed: import_chunk_E2XKFV2C.DbSeed.new()
136
+ seed: import_chunk_QV7SOU3V.DbSeed.new()
128
137
  })
129
138
  });
130
- const result = await cli.parse(commandArray);
139
+ const { config, error } = await (0, import_config.loadConfigFromFile)({ configFile: args["--config"] });
140
+ if (error) {
141
+ console.error(`Failed to load config file: ${error._tag}`);
142
+ return 1;
143
+ }
144
+ const result = await cli.parse(commandArray, { ...(0, import_config.defaultConfig)(), ...config });
131
145
  if (result instanceof import_internals.HelpError) {
132
146
  console.error(result);
133
147
  return 1;
@@ -26,12 +26,12 @@ 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_CSUAUCRR_exports = {};
30
- __export(chunk_CSUAUCRR_exports, {
29
+ var chunk_5Z62IFXC_exports = {};
30
+ __export(chunk_5Z62IFXC_exports, {
31
31
  MigrateDev: () => MigrateDev,
32
32
  init_MigrateDev: () => init_MigrateDev
33
33
  });
34
- module.exports = __toCommonJS(chunk_CSUAUCRR_exports);
34
+ module.exports = __toCommonJS(chunk_5Z62IFXC_exports);
35
35
  var import_chunk_IFCV5MY4 = require("./chunk-IFCV5MY4.js");
36
36
  var import_chunk_SGCF5OHF = require("./chunk-SGCF5OHF.js");
37
37
  var import_chunk_YKUZUAXA = require("./chunk-YKUZUAXA.js");
@@ -66,7 +66,7 @@ var init_MigrateDev = (0, import_chunk_WWAWV7DQ.__esm)({
66
66
  static new() {
67
67
  return new _MigrateDev2();
68
68
  }
69
- async parse(argv) {
69
+ async parse(argv, config) {
70
70
  const args = (0, import_internals.arg)(argv, {
71
71
  "--help": Boolean,
72
72
  "-h": "--help",
@@ -87,7 +87,7 @@ var init_MigrateDev = (0, import_chunk_WWAWV7DQ.__esm)({
87
87
  if (args["--help"]) {
88
88
  return this.help();
89
89
  }
90
- await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
90
+ await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
91
91
  const { schemaPath, schemas } = await (0, import_chunk_EYA6AFSF.getSchemaPathAndPrint)(args["--schema"]);
92
92
  const datasourceInfo = await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath });
93
93
  (0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo });
@@ -340,6 +340,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Usage")}
340
340
  ${(0, import_chunk_6TE2RIPN.bold)("Options")}
341
341
 
342
342
  -h, --help Display this help message
343
+ --config Custom path to your Prisma config file
343
344
  --schema Custom path to your Prisma schema
344
345
  -n, --name Name the migration
345
346
  --create-only Create a new migration but do not apply it
@@ -26,12 +26,12 @@ 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_7QAR4NT3_exports = {};
30
- __export(chunk_7QAR4NT3_exports, {
29
+ var chunk_62TCLCPV_exports = {};
30
+ __export(chunk_62TCLCPV_exports, {
31
31
  MigrateReset: () => MigrateReset,
32
32
  init_MigrateReset: () => init_MigrateReset
33
33
  });
34
- module.exports = __toCommonJS(chunk_7QAR4NT3_exports);
34
+ module.exports = __toCommonJS(chunk_62TCLCPV_exports);
35
35
  var import_chunk_YKUZUAXA = require("./chunk-YKUZUAXA.js");
36
36
  var import_chunk_WOOPRG54 = require("./chunk-WOOPRG54.js");
37
37
  var import_chunk_ZKWJDQMB = require("./chunk-ZKWJDQMB.js");
@@ -58,7 +58,7 @@ var init_MigrateReset = (0, import_chunk_WWAWV7DQ.__esm)({
58
58
  static new() {
59
59
  return new _MigrateReset2();
60
60
  }
61
- async parse(argv) {
61
+ async parse(argv, config) {
62
62
  const args = (0, import_internals.arg)(argv, {
63
63
  "--help": Boolean,
64
64
  "-h": "--help",
@@ -76,7 +76,7 @@ var init_MigrateReset = (0, import_chunk_WWAWV7DQ.__esm)({
76
76
  if (args["--help"]) {
77
77
  return this.help();
78
78
  }
79
- await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
79
+ await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
80
80
  const { schemaPath } = await (0, import_chunk_EYA6AFSF.getSchemaPathAndPrint)(args["--schema"]);
81
81
  const datasourceInfo = await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath });
82
82
  (0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo });
@@ -166,6 +166,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Usage")}
166
166
  ${(0, import_chunk_6TE2RIPN.bold)("Options")}
167
167
 
168
168
  -h, --help Display this help message
169
+ --config Custom path to your Prisma config file
169
170
  --schema Custom path to your Prisma schema
170
171
  --skip-generate Skip triggering generators (e.g. Prisma Client)
171
172
  --skip-seed Skip triggering seed
@@ -26,12 +26,12 @@ 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_G66QFMM5_exports = {};
30
- __export(chunk_G66QFMM5_exports, {
29
+ var chunk_COGVXKKS_exports = {};
30
+ __export(chunk_COGVXKKS_exports, {
31
31
  DbExecute: () => DbExecute,
32
32
  init_DbExecute: () => init_DbExecute
33
33
  });
34
- module.exports = __toCommonJS(chunk_G66QFMM5_exports);
34
+ module.exports = __toCommonJS(chunk_COGVXKKS_exports);
35
35
  var import_chunk_ZKWJDQMB = require("./chunk-ZKWJDQMB.js");
36
36
  var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
37
37
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
@@ -81,6 +81,7 @@ ${(0, import_chunk_6TE2RIPN.dim)("$")} prisma db execute [options]
81
81
  ${(0, import_chunk_6TE2RIPN.bold)("Options")}
82
82
 
83
83
  -h, --help Display this help message
84
+ --config Custom path to your Prisma config file
84
85
 
85
86
  ${(0, import_chunk_6TE2RIPN.italic)("Datasource input, only 1 must be provided:")}
86
87
  --url URL of the datasource to run the command on
@@ -97,7 +98,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
97
98
  static new() {
98
99
  return new _DbExecute2();
99
100
  }
100
- async parse(argv) {
101
+ async parse(argv, config) {
101
102
  const args = (0, import_internals.arg)(
102
103
  argv,
103
104
  {
@@ -118,7 +119,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
118
119
  if (args["--help"]) {
119
120
  return this.help();
120
121
  }
121
- await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: false });
122
+ await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: false, config });
122
123
  if (args["--stdin"] && args["--file"]) {
123
124
  throw new Error(
124
125
  `--stdin and --file cannot be used at the same time. Only 1 must be provided.
@@ -165,10 +166,10 @@ See \`${(0, import_chunk_6TE2RIPN.green)((0, import_internals.getCommandWithExec
165
166
  };
166
167
  } else {
167
168
  const schemaWithPath = await (0, import_internals.getSchemaWithPath)(args["--schema"]);
168
- const config = await (0, import_internals.getConfig)({ datamodel: schemaWithPath.schemas });
169
+ const config2 = await (0, import_internals.getConfig)({ datamodel: schemaWithPath.schemas });
169
170
  datasourceType = {
170
171
  tag: "schema",
171
- ...(0, import_internals.toSchemasWithConfigDir)(schemaWithPath, config)
172
+ ...(0, import_internals.toSchemasWithConfigDir)(schemaWithPath, config2)
172
173
  };
173
174
  }
174
175
  const migrate = new import_chunk_ZKWJDQMB.Migrate();
@@ -26,12 +26,12 @@ 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_77RYI3ZW_exports = {};
30
- __export(chunk_77RYI3ZW_exports, {
29
+ var chunk_HK47ZTH2_exports = {};
30
+ __export(chunk_HK47ZTH2_exports, {
31
31
  MigrateStatus: () => MigrateStatus,
32
32
  init_MigrateStatus: () => init_MigrateStatus
33
33
  });
34
- module.exports = __toCommonJS(chunk_77RYI3ZW_exports);
34
+ module.exports = __toCommonJS(chunk_HK47ZTH2_exports);
35
35
  var import_chunk_ZKWJDQMB = require("./chunk-ZKWJDQMB.js");
36
36
  var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
37
37
  var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
@@ -53,7 +53,7 @@ var init_MigrateStatus = (0, import_chunk_WWAWV7DQ.__esm)({
53
53
  static new() {
54
54
  return new _MigrateStatus2();
55
55
  }
56
- async parse(argv) {
56
+ async parse(argv, config) {
57
57
  const args = (0, import_internals.arg)(
58
58
  argv,
59
59
  {
@@ -71,7 +71,7 @@ var init_MigrateStatus = (0, import_chunk_WWAWV7DQ.__esm)({
71
71
  if (args["--help"]) {
72
72
  return this.help();
73
73
  }
74
- await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
74
+ await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
75
75
  const { schemaPath } = await (0, import_chunk_EYA6AFSF.getSchemaPathAndPrint)(args["--schema"]);
76
76
  (0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath }) });
77
77
  const migrate = new import_chunk_ZKWJDQMB.Migrate(schemaPath);
@@ -190,6 +190,7 @@ Check the status of your database migrations
190
190
  ${(0, import_chunk_6TE2RIPN.bold)("Options")}
191
191
 
192
192
  -h, --help Display this help message
193
+ --config Custom path to your Prisma config file
193
194
  --schema Custom path to your Prisma schema
194
195
 
195
196
  ${(0, import_chunk_6TE2RIPN.bold)("Examples")}
@@ -16,12 +16,12 @@ 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_NJUAN6V2_exports = {};
20
- __export(chunk_NJUAN6V2_exports, {
19
+ var chunk_L5WSTNST_exports = {};
20
+ __export(chunk_L5WSTNST_exports, {
21
21
  DbCommand: () => DbCommand,
22
22
  init_DbCommand: () => init_DbCommand
23
23
  });
24
- module.exports = __toCommonJS(chunk_NJUAN6V2_exports);
24
+ module.exports = __toCommonJS(chunk_L5WSTNST_exports);
25
25
  var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
26
26
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
27
27
  var import_internals = require("@prisma/internals");
@@ -36,8 +36,7 @@ var init_DbCommand = (0, import_chunk_WWAWV7DQ.__esm)({
36
36
  static new(cmds) {
37
37
  return new _DbCommand2(cmds);
38
38
  }
39
- /* eslint-disable-next-line @typescript-eslint/require-await */
40
- async parse(argv) {
39
+ async parse(argv, config) {
41
40
  const args = (0, import_internals.arg)(argv, {
42
41
  "--help": Boolean,
43
42
  "-h": "--help",
@@ -53,7 +52,7 @@ var init_DbCommand = (0, import_chunk_WWAWV7DQ.__esm)({
53
52
  const cmd = this.cmds[args._[0]];
54
53
  if (cmd) {
55
54
  const argsForCmd = args["--preview-feature"] ? [...args._.slice(1), `--preview-feature`] : args._.slice(1);
56
- return cmd.parse(argsForCmd);
55
+ return cmd.parse(argsForCmd, config);
57
56
  }
58
57
  return (0, import_internals.unknownCommand)(_DbCommand2.help, args._[0]);
59
58
  }
@@ -76,6 +75,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Usage")}
76
75
  ${(0, import_chunk_6TE2RIPN.bold)("Options")}
77
76
 
78
77
  -h, --help Display this help message
78
+ --config Custom path to your Prisma config file
79
79
  --schema Custom path to your Prisma schema
80
80
 
81
81
  ${(0, import_chunk_6TE2RIPN.bold)("Commands")}
@@ -26,12 +26,12 @@ 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_C6CQ3XNY_exports = {};
30
- __export(chunk_C6CQ3XNY_exports, {
29
+ var chunk_LEODRY55_exports = {};
30
+ __export(chunk_LEODRY55_exports, {
31
31
  DbPull: () => DbPull,
32
32
  init_DbPull: () => init_DbPull
33
33
  });
34
- module.exports = __toCommonJS(chunk_C6CQ3XNY_exports);
34
+ module.exports = __toCommonJS(chunk_LEODRY55_exports);
35
35
  var import_chunk_CUDKD32S = require("./chunk-CUDKD32S.js");
36
36
  var import_chunk_ILJRJJ3S = require("./chunk-ILJRJJ3S.js");
37
37
  var import_chunk_35LAJN5S = require("./chunk-35LAJN5S.js");
@@ -83,7 +83,7 @@ var init_DbPull = (0, import_chunk_WWAWV7DQ.__esm)({
83
83
  }
84
84
  ]);
85
85
  }
86
- async parse(argv) {
86
+ async parse(argv, config) {
87
87
  const args = (0, import_internals.arg)(argv, {
88
88
  "--help": Boolean,
89
89
  "-h": "--help",
@@ -112,10 +112,10 @@ var init_DbPull = (0, import_chunk_WWAWV7DQ.__esm)({
112
112
  debug("schemaPathResult", schemaPathResult);
113
113
  if (schemaPath && !args["--print"]) {
114
114
  process.stdout.write((0, import_chunk_6TE2RIPN.dim)(`Prisma schema loaded from ${import_path.default.relative(process.cwd(), schemaPath)}`) + "\n");
115
- await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
115
+ await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
116
116
  (0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath }) });
117
117
  } else {
118
- await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: false });
118
+ await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: false, config });
119
119
  }
120
120
  const fromD1 = Boolean(args["--local-d1"]);
121
121
  if (!url && !schemaPath && !fromD1) {
@@ -125,12 +125,12 @@ var init_DbPull = (0, import_chunk_WWAWV7DQ.__esm)({
125
125
  (input) => input.schemaPath !== null,
126
126
  async (input) => {
127
127
  const rawSchema = await (0, import_internals.getSchema)(input.schemaPath);
128
- const config = await (0, import_internals.getConfig)({
128
+ const config2 = await (0, import_internals.getConfig)({
129
129
  datamodel: rawSchema,
130
130
  ignoreEnvVarErrors: true
131
131
  });
132
- const previewFeatures = config.generators.find(({ name }) => name === "client")?.previewFeatures;
133
- const firstDatasource2 = config.datasources[0] ? config.datasources[0] : void 0;
132
+ const previewFeatures = config2.generators.find(({ name }) => name === "client")?.previewFeatures;
133
+ const firstDatasource2 = config2.datasources[0] ? config2.datasources[0] : void 0;
134
134
  if (input.url) {
135
135
  let providerFromSchema = firstDatasource2?.provider;
136
136
  if (providerFromSchema === "postgres") {
@@ -150,11 +150,11 @@ var init_DbPull = (0, import_chunk_WWAWV7DQ.__esm)({
150
150
  const schema2 = [
151
151
  ["schema.prisma", this.urlToDatasource(`file:${pathToSQLiteFile}`, "sqlite")]
152
152
  ];
153
- const config2 = await (0, import_internals.getConfig)({
153
+ const config3 = await (0, import_internals.getConfig)({
154
154
  datamodel: schema2,
155
155
  ignoreEnvVarErrors: true
156
156
  });
157
- const result = { firstDatasource: config2.datasources[0], schema: schema2, validationWarning: void 0 };
157
+ const result = { firstDatasource: config3.datasources[0], schema: schema2, validationWarning: void 0 };
158
158
  const hasDriverAdaptersPreviewFeature = (previewFeatures || []).includes("driverAdapters");
159
159
  const validationWarning2 = `Without the ${(0, import_chunk_6TE2RIPN.bold)(
160
160
  "driverAdapters"
@@ -185,22 +185,22 @@ var init_DbPull = (0, import_chunk_WWAWV7DQ.__esm)({
185
185
  }
186
186
  ${this.urlToDatasource(`file:${pathToSQLiteFile}`, "sqlite")}`;
187
187
  const schema2 = [["schema.prisma", schemaContent]];
188
- const config = await (0, import_internals.getConfig)({
188
+ const config2 = await (0, import_internals.getConfig)({
189
189
  datamodel: schema2,
190
190
  ignoreEnvVarErrors: true
191
191
  });
192
- return { firstDatasource: config.datasources[0], schema: schema2, validationWarning: void 0 };
192
+ return { firstDatasource: config2.datasources[0], schema: schema2, validationWarning: void 0 };
193
193
  }
194
194
  ).when(
195
195
  (input) => input.url !== void 0,
196
196
  async (input) => {
197
197
  (0, import_internals.protocolToConnectorType)(`${input.url.split(":")[0]}:`);
198
198
  const schema2 = [["schema.prisma", this.urlToDatasource(input.url)]];
199
- const config = await (0, import_internals.getConfig)({
199
+ const config2 = await (0, import_internals.getConfig)({
200
200
  datamodel: schema2,
201
201
  ignoreEnvVarErrors: true
202
202
  });
203
- return { firstDatasource: config.datasources[0], schema: schema2, validationWarning: void 0 };
203
+ return { firstDatasource: config2.datasources[0], schema: schema2, validationWarning: void 0 };
204
204
  }
205
205
  ).run();
206
206
  if (schemaPath) {
@@ -356,6 +356,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
356
356
 
357
357
  ${(0, import_chunk_6TE2RIPN.bold)("Options")}
358
358
 
359
+ --config Custom path to your Prisma config file
359
360
  --schema Custom path to your Prisma schema
360
361
  --composite-type-depth Specify the depth for introspecting composite types (e.g. Embedded Documents in MongoDB)
361
362
  Number, default is -1 for infinite depth, 0 = off
@@ -26,12 +26,12 @@ 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_43RWRQLU_exports = {};
30
- __export(chunk_43RWRQLU_exports, {
29
+ var chunk_LRSJQHJE_exports = {};
30
+ __export(chunk_LRSJQHJE_exports, {
31
31
  MigrateDeploy: () => MigrateDeploy,
32
32
  init_MigrateDeploy: () => init_MigrateDeploy
33
33
  });
34
- module.exports = __toCommonJS(chunk_43RWRQLU_exports);
34
+ module.exports = __toCommonJS(chunk_LRSJQHJE_exports);
35
35
  var import_chunk_WOOPRG54 = require("./chunk-WOOPRG54.js");
36
36
  var import_chunk_ZKWJDQMB = require("./chunk-ZKWJDQMB.js");
37
37
  var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
@@ -55,7 +55,7 @@ var init_MigrateDeploy = (0, import_chunk_WWAWV7DQ.__esm)({
55
55
  static new() {
56
56
  return new _MigrateDeploy2();
57
57
  }
58
- async parse(argv) {
58
+ async parse(argv, config) {
59
59
  const args = (0, import_internals.arg)(
60
60
  argv,
61
61
  {
@@ -73,7 +73,7 @@ var init_MigrateDeploy = (0, import_chunk_WWAWV7DQ.__esm)({
73
73
  if (args["--help"]) {
74
74
  return this.help();
75
75
  }
76
- await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
76
+ await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
77
77
  const { schemaPath } = await (0, import_chunk_EYA6AFSF.getSchemaPathAndPrint)(args["--schema"]);
78
78
  (0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath }) });
79
79
  const migrate = new import_chunk_ZKWJDQMB.Migrate(schemaPath);
@@ -143,6 +143,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Usage")}
143
143
  ${(0, import_chunk_6TE2RIPN.bold)("Options")}
144
144
 
145
145
  -h, --help Display this help message
146
+ --config Custom path to your Prisma config file
146
147
  --schema Custom path to your Prisma schema
147
148
 
148
149
  ${(0, import_chunk_6TE2RIPN.bold)("Examples")}
@@ -16,12 +16,12 @@ 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_JZ6FKTWG_exports = {};
20
- __export(chunk_JZ6FKTWG_exports, {
19
+ var chunk_MWDR5RWF_exports = {};
20
+ __export(chunk_MWDR5RWF_exports, {
21
21
  CLI: () => CLI,
22
22
  init_CLI: () => init_CLI
23
23
  });
24
- module.exports = __toCommonJS(chunk_JZ6FKTWG_exports);
24
+ module.exports = __toCommonJS(chunk_MWDR5RWF_exports);
25
25
  var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
26
26
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
27
27
  var import_internals = require("@prisma/internals");
@@ -36,8 +36,7 @@ var init_CLI = (0, import_chunk_WWAWV7DQ.__esm)({
36
36
  static new(cmds) {
37
37
  return new _CLI2(cmds);
38
38
  }
39
- // eslint-disable-next-line @typescript-eslint/require-await
40
- async parse(argv) {
39
+ async parse(argv, config) {
41
40
  const args = (0, import_internals.arg)(argv, {
42
41
  "--help": Boolean,
43
42
  "-h": "--help",
@@ -67,7 +66,7 @@ var init_CLI = (0, import_chunk_WWAWV7DQ.__esm)({
67
66
  } else {
68
67
  argsForCmd = args._.slice(1);
69
68
  }
70
- return cmd.parse(argsForCmd);
69
+ return cmd.parse(argsForCmd, config);
71
70
  }
72
71
  return (0, import_internals.unknownCommand)(this.help(), args._[0]);
73
72
  }
@@ -16,12 +16,12 @@ 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_CK5VLKFM_exports = {};
20
- __export(chunk_CK5VLKFM_exports, {
19
+ var chunk_NGDFNKHZ_exports = {};
20
+ __export(chunk_NGDFNKHZ_exports, {
21
21
  MigrateCommand: () => MigrateCommand,
22
22
  init_MigrateCommand: () => init_MigrateCommand
23
23
  });
24
- module.exports = __toCommonJS(chunk_CK5VLKFM_exports);
24
+ module.exports = __toCommonJS(chunk_NGDFNKHZ_exports);
25
25
  var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
26
26
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
27
27
  var import_internals = require("@prisma/internals");
@@ -36,8 +36,7 @@ var init_MigrateCommand = (0, import_chunk_WWAWV7DQ.__esm)({
36
36
  static new(cmds) {
37
37
  return new _MigrateCommand2(cmds);
38
38
  }
39
- /* eslint-disable-next-line @typescript-eslint/require-await */
40
- async parse(argv) {
39
+ async parse(argv, config) {
41
40
  const args = (0, import_internals.arg)(argv, {
42
41
  "--help": Boolean,
43
42
  "-h": "--help",
@@ -60,7 +59,7 @@ var init_MigrateCommand = (0, import_chunk_WWAWV7DQ.__esm)({
60
59
  const filteredArgs = args._.filter((item) => item !== "--preview-feature");
61
60
  argsForCmd = filteredArgs.slice(1);
62
61
  }
63
- return cmd.parse(argsForCmd);
62
+ return cmd.parse(argsForCmd, config);
64
63
  }
65
64
  return (0, import_internals.unknownCommand)(_MigrateCommand2.help, commandName);
66
65
  }
@@ -99,6 +98,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Command for any stage")}
99
98
  ${(0, import_chunk_6TE2RIPN.bold)("Options")}
100
99
 
101
100
  -h, --help Display this help message
101
+ --config Custom path to your Prisma config file
102
102
  --schema Custom path to your Prisma schema
103
103
 
104
104
  ${(0, import_chunk_6TE2RIPN.bold)("Examples")}
@@ -26,12 +26,12 @@ 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_JESW2ENL_exports = {};
30
- __export(chunk_JESW2ENL_exports, {
29
+ var chunk_OKNTDCKF_exports = {};
30
+ __export(chunk_OKNTDCKF_exports, {
31
31
  DbPush: () => DbPush,
32
32
  init_DbPush: () => init_DbPush
33
33
  });
34
- module.exports = __toCommonJS(chunk_JESW2ENL_exports);
34
+ module.exports = __toCommonJS(chunk_OKNTDCKF_exports);
35
35
  var import_chunk_ZKWJDQMB = require("./chunk-ZKWJDQMB.js");
36
36
  var import_chunk_U374EXYQ = require("./chunk-U374EXYQ.js");
37
37
  var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
@@ -54,7 +54,7 @@ var init_DbPush = (0, import_chunk_WWAWV7DQ.__esm)({
54
54
  static new() {
55
55
  return new _DbPush2();
56
56
  }
57
- async parse(argv) {
57
+ async parse(argv, config) {
58
58
  const args = (0, import_internals.arg)(
59
59
  argv,
60
60
  {
@@ -75,7 +75,7 @@ var init_DbPush = (0, import_chunk_WWAWV7DQ.__esm)({
75
75
  if (args["--help"]) {
76
76
  return this.help();
77
77
  }
78
- await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
78
+ await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
79
79
  const { schemaPath } = await (0, import_chunk_EYA6AFSF.getSchemaPathAndPrint)(args["--schema"]);
80
80
  const datasourceInfo = await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath });
81
81
  (0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo });
@@ -256,6 +256,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Usage")}
256
256
  ${(0, import_chunk_6TE2RIPN.bold)("Options")}
257
257
 
258
258
  -h, --help Display this help message
259
+ --config Custom path to your Prisma config file
259
260
  --schema Custom path to your Prisma schema
260
261
  --accept-data-loss Ignore data loss warnings
261
262
  --force-reset Force a reset of the database before push