@prisma/migrate 6.5.0-dev.2 → 6.5.0-dev.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.js CHANGED
@@ -39,18 +39,18 @@ var import_chunk_JZ75RIMZ = require("./chunk-JZ75RIMZ.js");
39
39
  var import_chunk_RR6BKMNO = require("./chunk-RR6BKMNO.js");
40
40
  var import_chunk_JFKDSUIE = require("./chunk-JFKDSUIE.js");
41
41
  var import_chunk_LGYRZ6CV = require("./chunk-LGYRZ6CV.js");
42
- var import_chunk_C2PR6JQR = require("./chunk-C2PR6JQR.js");
42
+ var import_chunk_J5FHVALZ = require("./chunk-J5FHVALZ.js");
43
43
  var import_chunk_FRTPDRF2 = require("./chunk-FRTPDRF2.js");
44
44
  var import_chunk_WNH2ACJS = require("./chunk-WNH2ACJS.js");
45
45
  var import_chunk_LVLRGTYH = require("./chunk-LVLRGTYH.js");
46
- var import_chunk_XSNOKQTD = require("./chunk-XSNOKQTD.js");
46
+ var import_chunk_PSYS5XVH = require("./chunk-PSYS5XVH.js");
47
47
  var import_chunk_OCQGHQED = require("./chunk-OCQGHQED.js");
48
48
  var import_chunk_7CQBDP4H = require("./chunk-7CQBDP4H.js");
49
49
  var import_chunk_V3ZMNXZC = require("./chunk-V3ZMNXZC.js");
50
50
  var import_chunk_255BRND3 = require("./chunk-255BRND3.js");
51
51
  var import_chunk_UP6FVCDK = require("./chunk-UP6FVCDK.js");
52
52
  var import_chunk_LKTTJWFT = require("./chunk-LKTTJWFT.js");
53
- var import_chunk_IIBRYI63 = require("./chunk-IIBRYI63.js");
53
+ var import_chunk_U5JDTUOW = require("./chunk-U5JDTUOW.js");
54
54
  var import_chunk_A6PMXMMT = require("./chunk-A6PMXMMT.js");
55
55
  var import_chunk_XRTNIFND = require("./chunk-XRTNIFND.js");
56
56
  var import_chunk_CTPONE6G = require("./chunk-CTPONE6G.js");
@@ -72,7 +72,7 @@ var import_config = require("@prisma/config");
72
72
  var import_debug = __toESM(require("@prisma/debug"));
73
73
  var import_engines_version = require("@prisma/engines-version");
74
74
  var import_internals = require("@prisma/internals");
75
- var version = "6.5.0-dev.2";
75
+ var version = "6.5.0-dev.4";
76
76
  process.on("uncaughtException", (e) => {
77
77
  console.log(e);
78
78
  });
@@ -94,17 +94,17 @@ var args = (0, import_internals.arg)(
94
94
  async function main() {
95
95
  const cli = import_chunk_QTAIWPLH.CLI.new({
96
96
  migrate: import_chunk_WNH2ACJS.MigrateCommand.new({
97
- dev: import_chunk_XSNOKQTD.MigrateDev.new(),
97
+ dev: import_chunk_PSYS5XVH.MigrateDev.new(),
98
98
  status: import_chunk_I4EY55DC.MigrateStatus.new(),
99
99
  resolve: import_chunk_TM3ETZES.MigrateResolve.new(),
100
100
  reset: import_chunk_RQFGRXJI.MigrateReset.new(),
101
101
  deploy: import_chunk_LVLRGTYH.MigrateDeploy.new(),
102
- diff: import_chunk_IIBRYI63.MigrateDiff.new()
102
+ diff: import_chunk_U5JDTUOW.MigrateDiff.new()
103
103
  }),
104
104
  db: import_chunk_HIFVDK2U.DbCommand.new({
105
105
  execute: import_chunk_4EV2RVXY.DbExecute.new(),
106
106
  pull: import_chunk_WLPX3672.DbPull.new(),
107
- push: import_chunk_C2PR6JQR.DbPush.new(),
107
+ push: import_chunk_J5FHVALZ.DbPush.new(),
108
108
  // drop: DbDrop.new(),
109
109
  seed: import_chunk_FRTPDRF2.DbSeed.new()
110
110
  })
@@ -26,11 +26,11 @@ 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_C2PR6JQR_exports = {};
30
- __export(chunk_C2PR6JQR_exports, {
29
+ var chunk_J5FHVALZ_exports = {};
30
+ __export(chunk_J5FHVALZ_exports, {
31
31
  DbPush: () => DbPush
32
32
  });
33
- module.exports = __toCommonJS(chunk_C2PR6JQR_exports);
33
+ module.exports = __toCommonJS(chunk_J5FHVALZ_exports);
34
34
  var import_chunk_DDHPSYC4 = require("./chunk-DDHPSYC4.js");
35
35
  var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
36
36
  var import_chunk_6DFJIBJX = require("./chunk-6DFJIBJX.js");
@@ -123,50 +123,14 @@ var _DbPush = class _DbPush2 {
123
123
  messages.push(` \u2022 ${item}`);
124
124
  }
125
125
  process.stdout.write("\n");
126
- if (!(0, import_internals.canPrompt)()) {
127
- migrate.stop();
128
- throw new Error(`${messages.join("\n")}
126
+ migrate.stop();
127
+ throw new Error(`${messages.join("\n")}
129
128
 
130
- Use the --force-reset flag to drop the database before push like ${(0, import_chunk_SKRR5WT4.bold)(
131
- (0, import_chunk_SKRR5WT4.green)((0, import_internals.getCommandWithExecutor)("prisma db push --force-reset"))
132
- )}
129
+ You may use the --force-reset flag to drop the database before push like ${(0, import_chunk_SKRR5WT4.bold)(
130
+ (0, import_chunk_SKRR5WT4.green)((0, import_internals.getCommandWithExecutor)("prisma db push --force-reset"))
131
+ )}
133
132
  ${(0, import_chunk_SKRR5WT4.bold)((0, import_chunk_SKRR5WT4.red)("All data will be lost."))}
134
- `);
135
- } else {
136
- process.stdout.write(`${messages.join("\n")}
137
-
138
- `);
139
- }
140
- process.stdout.write("\n");
141
- const confirmation = await (0, import_prompts.default)({
142
- type: "confirm",
143
- name: "value",
144
- message: `To apply this change we need to reset the database, do you want to continue? ${(0, import_chunk_SKRR5WT4.red)(
145
- "All data will be lost"
146
- )}.`
147
- });
148
- if (!confirmation.value) {
149
- process.stdout.write("Reset cancelled.\n");
150
- migrate.stop();
151
- process.exit(130);
152
- }
153
- try {
154
- await migrate.reset();
155
- if (datasourceInfo.dbName && datasourceInfo.dbLocation) {
156
- process.stdout.write(
157
- `The ${datasourceInfo.prettyProvider} database "${datasourceInfo.dbName}" from "${datasourceInfo.dbLocation}" was successfully reset.
158
- `
159
- );
160
- } else {
161
- process.stdout.write(`The ${datasourceInfo.prettyProvider} database was successfully reset.
162
- `);
163
- }
164
- wasDatabaseReset = true;
165
- await migrate.push({});
166
- } catch (e) {
167
- migrate.stop();
168
- throw e;
169
- }
133
+ `);
170
134
  }
171
135
  if (migration.warnings && migration.warnings.length > 0) {
172
136
  process.stdout.write((0, import_chunk_SKRR5WT4.bold)((0, import_chunk_SKRR5WT4.yellow)(`
@@ -26,11 +26,11 @@ 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_XSNOKQTD_exports = {};
30
- __export(chunk_XSNOKQTD_exports, {
29
+ var chunk_PSYS5XVH_exports = {};
30
+ __export(chunk_PSYS5XVH_exports, {
31
31
  MigrateDev: () => MigrateDev
32
32
  });
33
- module.exports = __toCommonJS(chunk_XSNOKQTD_exports);
33
+ module.exports = __toCommonJS(chunk_PSYS5XVH_exports);
34
34
  var import_chunk_OCQGHQED = require("./chunk-OCQGHQED.js");
35
35
  var import_chunk_7CQBDP4H = require("./chunk-7CQBDP4H.js");
36
36
  var import_chunk_V3ZMNXZC = require("./chunk-V3ZMNXZC.js");
@@ -63,7 +63,8 @@ var _MigrateDev = class _MigrateDev2 {
63
63
  "--config": String,
64
64
  "--skip-generate": Boolean,
65
65
  "--skip-seed": Boolean,
66
- "--telemetry-information": String
66
+ "--telemetry-information": String,
67
+ "--allow-reset": Boolean
67
68
  });
68
69
  if ((0, import_internals.isError)(args)) {
69
70
  return this.help(args.message);
@@ -99,22 +100,20 @@ var _MigrateDev = class _MigrateDev2 {
99
100
  }
100
101
  const migrationIdsApplied = [];
101
102
  if (devDiagnostic.action.tag === "reset") {
102
- if (!args["--force"]) {
103
- if (!(0, import_internals.canPrompt)()) {
104
- migrate.stop();
105
- throw new import_chunk_3WC4XD74.MigrateDevEnvNonInteractiveError();
106
- }
107
- const confirmedReset = await this.confirmReset({
108
- datasourceInfo,
109
- reason: devDiagnostic.action.reason
110
- });
111
- process.stdout.write("\n");
112
- if (!confirmedReset) {
113
- process.stdout.write("Reset cancelled.\n");
114
- migrate.stop();
115
- process.exit(130);
116
- }
103
+ this.logResetReason({
104
+ datasourceInfo,
105
+ reason: devDiagnostic.action.reason
106
+ });
107
+ if (!args["--allow-reset"]) {
108
+ process.stdout.write(
109
+ `
110
+ You may use --allow-reset to drop the database. ${(0, import_chunk_SKRR5WT4.bold)((0, import_chunk_SKRR5WT4.red)("All data will be lost."))}
111
+ `
112
+ );
113
+ migrate.stop();
114
+ process.exit(130);
117
115
  }
116
+ process.stdout.write("\nReceived --allow-reset, dropping the database. All data is lost.\n\n");
118
117
  try {
119
118
  await migrate.reset();
120
119
  } catch (e) {
@@ -161,6 +160,10 @@ ${(0, import_chunk_255BRND3.printFilesFromMigrationIds)(
161
160
  throw new Error(unexecutableStepsError);
162
161
  }
163
162
  if (evaluateDataLossResult.warnings && evaluateDataLossResult.warnings.length > 0) {
163
+ if (!(0, import_internals.canPrompt)()) {
164
+ migrate.stop();
165
+ throw new import_chunk_3WC4XD74.MigrateDevEnvNonInteractiveError();
166
+ }
164
167
  process.stdout.write((0, import_chunk_SKRR5WT4.bold)(`
165
168
  \u26A0\uFE0F Warnings for the current datasource:
166
169
 
@@ -171,10 +174,6 @@ ${(0, import_chunk_255BRND3.printFilesFromMigrationIds)(
171
174
  }
172
175
  process.stdout.write("\n");
173
176
  if (!args["--force"]) {
174
- if (!(0, import_internals.canPrompt)()) {
175
- migrate.stop();
176
- throw new import_chunk_3WC4XD74.MigrateDevEnvNonInteractiveError();
177
- }
178
177
  const message = args["--create-only"] ? "Are you sure you want to create this migration?" : "Are you sure you want to create and apply this migration?";
179
178
  const confirmation = await (0, import_prompts.default)({
180
179
  type: "confirm",
@@ -274,37 +273,25 @@ ${process.platform === "win32" ? "" : "\u{1F331} "}The seed command has been ex
274
273
  }
275
274
  return "";
276
275
  }
277
- async confirmReset({
278
- datasourceInfo,
279
- reason
280
- }) {
276
+ logResetReason({ datasourceInfo, reason }) {
281
277
  process.stdout.write(reason + "\n");
282
- let messageFirstLine = "";
278
+ let message;
283
279
  if (["PostgreSQL", "SQL Server"].includes(datasourceInfo.prettyProvider)) {
284
280
  if (datasourceInfo.schemas?.length) {
285
- messageFirstLine = `We need to reset the following schemas: "${datasourceInfo.schemas.join(", ")}"`;
281
+ message = `We need to reset the following schemas: "${datasourceInfo.schemas.join(", ")}"`;
286
282
  } else if (datasourceInfo.schema) {
287
- messageFirstLine = `We need to reset the "${datasourceInfo.schema}" schema`;
283
+ message = `We need to reset the "${datasourceInfo.schema}" schema`;
288
284
  } else {
289
- messageFirstLine = `We need to reset the database schema`;
285
+ message = `We need to reset the database schema`;
290
286
  }
291
287
  } else {
292
- messageFirstLine = `We need to reset the ${datasourceInfo.prettyProvider} database "${datasourceInfo.dbName}"`;
288
+ message = `We need to reset the ${datasourceInfo.prettyProvider} database "${datasourceInfo.dbName}"`;
293
289
  }
294
290
  if (datasourceInfo.dbLocation) {
295
- messageFirstLine += ` at "${datasourceInfo.dbLocation}"`;
296
- }
297
- const messageForPrompt = `${messageFirstLine}
298
- Do you want to continue? ${(0, import_chunk_SKRR5WT4.red)("All data will be lost")}.`;
299
- if (Boolean(import_prompts.default._injected?.length) === true) {
300
- process.stdout.write(messageForPrompt + "\n");
291
+ message += ` at "${datasourceInfo.dbLocation}"`;
301
292
  }
302
- const confirmation = await (0, import_prompts.default)({
303
- type: "confirm",
304
- name: "value",
305
- message: messageForPrompt
306
- });
307
- return confirmation.value;
293
+ process.stdout.write(`${message}
294
+ `);
308
295
  }
309
296
  help(error) {
310
297
  if (error) {
@@ -332,6 +319,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Options")}
332
319
  The migration will be empty if there are no changes in Prisma schema
333
320
  --skip-generate Skip triggering generators (e.g. Prisma Client)
334
321
  --skip-seed Skip triggering seed
322
+ --allow-reset Allow resetting the database on incompatible schema change (accept data loss)
335
323
 
336
324
  ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
337
325
 
@@ -26,11 +26,11 @@ 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_IIBRYI63_exports = {};
30
- __export(chunk_IIBRYI63_exports, {
29
+ var chunk_U5JDTUOW_exports = {};
30
+ __export(chunk_U5JDTUOW_exports, {
31
31
  MigrateDiff: () => MigrateDiff
32
32
  });
33
- module.exports = __toCommonJS(chunk_IIBRYI63_exports);
33
+ module.exports = __toCommonJS(chunk_U5JDTUOW_exports);
34
34
  var import_chunk_A6PMXMMT = require("./chunk-A6PMXMMT.js");
35
35
  var import_chunk_XRTNIFND = require("./chunk-XRTNIFND.js");
36
36
  var import_chunk_CTPONE6G = require("./chunk-CTPONE6G.js");
@@ -11135,7 +11135,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
11135
11135
  "../internals/package.json"(exports, module2) {
11136
11136
  module2.exports = {
11137
11137
  name: "@prisma/internals",
11138
- version: "6.5.0-dev.2",
11138
+ version: "6.5.0-dev.4",
11139
11139
  description: "This package is intended for Prisma's internal use",
11140
11140
  main: "dist/index.js",
11141
11141
  types: "dist/index.d.ts",
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var DbPush_exports = {};
20
20
  __export(DbPush_exports, {
21
- DbPush: () => import_chunk_C2PR6JQR.DbPush
21
+ DbPush: () => import_chunk_J5FHVALZ.DbPush
22
22
  });
23
23
  module.exports = __toCommonJS(DbPush_exports);
24
- var import_chunk_C2PR6JQR = require("../chunk-C2PR6JQR.js");
24
+ var import_chunk_J5FHVALZ = require("../chunk-J5FHVALZ.js");
25
25
  var import_chunk_DDHPSYC4 = require("../chunk-DDHPSYC4.js");
26
26
  var import_chunk_6C7ESGWY = require("../chunk-6C7ESGWY.js");
27
27
  var import_chunk_J46BJQHT = require("../chunk-J46BJQHT.js");
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var MigrateDev_exports = {};
20
20
  __export(MigrateDev_exports, {
21
- MigrateDev: () => import_chunk_XSNOKQTD.MigrateDev
21
+ MigrateDev: () => import_chunk_PSYS5XVH.MigrateDev
22
22
  });
23
23
  module.exports = __toCommonJS(MigrateDev_exports);
24
- var import_chunk_XSNOKQTD = require("../chunk-XSNOKQTD.js");
24
+ var import_chunk_PSYS5XVH = require("../chunk-PSYS5XVH.js");
25
25
  var import_chunk_OCQGHQED = require("../chunk-OCQGHQED.js");
26
26
  var import_chunk_7CQBDP4H = require("../chunk-7CQBDP4H.js");
27
27
  var import_chunk_V3ZMNXZC = require("../chunk-V3ZMNXZC.js");
@@ -18,10 +18,10 @@ 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_IIBRYI63.MigrateDiff
21
+ MigrateDiff: () => import_chunk_U5JDTUOW.MigrateDiff
22
22
  });
23
23
  module.exports = __toCommonJS(MigrateDiff_exports);
24
- var import_chunk_IIBRYI63 = require("../chunk-IIBRYI63.js");
24
+ var import_chunk_U5JDTUOW = require("../chunk-U5JDTUOW.js");
25
25
  var import_chunk_A6PMXMMT = require("../chunk-A6PMXMMT.js");
26
26
  var import_chunk_XRTNIFND = require("../chunk-XRTNIFND.js");
27
27
  var import_chunk_CTPONE6G = require("../chunk-CTPONE6G.js");
package/dist/index.js CHANGED
@@ -22,14 +22,14 @@ __export(index_exports, {
22
22
  DbDrop: () => import_chunk_YZVZCC3I.DbDrop,
23
23
  DbExecute: () => import_chunk_4EV2RVXY.DbExecute,
24
24
  DbPull: () => import_chunk_WLPX3672.DbPull,
25
- DbPush: () => import_chunk_C2PR6JQR.DbPush,
25
+ DbPush: () => import_chunk_J5FHVALZ.DbPush,
26
26
  DbSeed: () => import_chunk_FRTPDRF2.DbSeed,
27
27
  EngineResults: () => import_chunk_LVR7W5DD.EngineResults,
28
28
  Migrate: () => import_chunk_DDHPSYC4.Migrate,
29
29
  MigrateCommand: () => import_chunk_WNH2ACJS.MigrateCommand,
30
30
  MigrateDeploy: () => import_chunk_LVLRGTYH.MigrateDeploy,
31
- MigrateDev: () => import_chunk_XSNOKQTD.MigrateDev,
32
- MigrateDiff: () => import_chunk_IIBRYI63.MigrateDiff,
31
+ MigrateDev: () => import_chunk_PSYS5XVH.MigrateDev,
32
+ MigrateDiff: () => import_chunk_U5JDTUOW.MigrateDiff,
33
33
  MigrateReset: () => import_chunk_RQFGRXJI.MigrateReset,
34
34
  MigrateResolve: () => import_chunk_TM3ETZES.MigrateResolve,
35
35
  MigrateStatus: () => import_chunk_I4EY55DC.MigrateStatus,
@@ -58,18 +58,18 @@ var import_chunk_JZ75RIMZ = require("./chunk-JZ75RIMZ.js");
58
58
  var import_chunk_RR6BKMNO = require("./chunk-RR6BKMNO.js");
59
59
  var import_chunk_JFKDSUIE = require("./chunk-JFKDSUIE.js");
60
60
  var import_chunk_LGYRZ6CV = require("./chunk-LGYRZ6CV.js");
61
- var import_chunk_C2PR6JQR = require("./chunk-C2PR6JQR.js");
61
+ var import_chunk_J5FHVALZ = require("./chunk-J5FHVALZ.js");
62
62
  var import_chunk_FRTPDRF2 = require("./chunk-FRTPDRF2.js");
63
63
  var import_chunk_WNH2ACJS = require("./chunk-WNH2ACJS.js");
64
64
  var import_chunk_LVLRGTYH = require("./chunk-LVLRGTYH.js");
65
- var import_chunk_XSNOKQTD = require("./chunk-XSNOKQTD.js");
65
+ var import_chunk_PSYS5XVH = require("./chunk-PSYS5XVH.js");
66
66
  var import_chunk_OCQGHQED = require("./chunk-OCQGHQED.js");
67
67
  var import_chunk_7CQBDP4H = require("./chunk-7CQBDP4H.js");
68
68
  var import_chunk_V3ZMNXZC = require("./chunk-V3ZMNXZC.js");
69
69
  var import_chunk_255BRND3 = require("./chunk-255BRND3.js");
70
70
  var import_chunk_UP6FVCDK = require("./chunk-UP6FVCDK.js");
71
71
  var import_chunk_LKTTJWFT = require("./chunk-LKTTJWFT.js");
72
- var import_chunk_IIBRYI63 = require("./chunk-IIBRYI63.js");
72
+ var import_chunk_U5JDTUOW = require("./chunk-U5JDTUOW.js");
73
73
  var import_chunk_A6PMXMMT = require("./chunk-A6PMXMMT.js");
74
74
  var import_chunk_XRTNIFND = require("./chunk-XRTNIFND.js");
75
75
  var import_chunk_CTPONE6G = require("./chunk-CTPONE6G.js");
@@ -55,6 +55,8 @@ export { handlePanic } from './utils/handlePanic';
55
55
  export { hasOwnProperty } from './utils/hasOwnProperty';
56
56
  export { isCi } from './utils/isCi';
57
57
  export { isCurrentBinInstalledGlobally } from './utils/isCurrentBinInstalledGlobally';
58
+ export { isInContainer } from './utils/isInContainer';
59
+ export { isInNpmLifecycleHook } from './utils/isInNpmLifecycleHook';
58
60
  export { isInteractive } from './utils/isInteractive';
59
61
  export { isPromiseLike } from './utils/isPromiseLike';
60
62
  export { isValidJsIdentifier } from './utils/isValidJsIdentifier';
@@ -65,6 +67,7 @@ export { loadEnvFile } from './utils/loadEnvFile';
65
67
  export { mapObjectValues } from './utils/mapObjectValues';
66
68
  export { maskSchema } from './utils/maskSchema';
67
69
  export { maxBy, maxWithComparator } from './utils/max';
70
+ export { maybeInGitHook } from './utils/maybeInGitHook';
68
71
  export { missingGeneratorMessage } from './utils/missingGeneratorMessage';
69
72
  export { parseAWSNodejsRuntimeEnvVarVersion } from './utils/parseAWSNodejsRuntimeEnvVarVersion';
70
73
  export { parseBinaryTargetsEnvValue, parseEnvValue } from './utils/parseEnvValue';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Check if we're running inside a container.
3
+ * Checks for common signs of Docker, Podman, and Kubernetes.
4
+ */
5
+ export declare function isInContainer(): boolean;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Checks if the current process is running in an npm lifecycle hook, excluding custom npm scripts.
3
+ */
4
+ export declare function isInNpmLifecycleHook(): boolean;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Checks if we may be running inside a git hook (such as pre-commit).
3
+ *
4
+ * It can give false positives in edge cases, if user has `GIT_EXEC_PATH`,
5
+ * `GIT_DIR`, `GIT_INDEX_FILE`, or `GIT_PREFIX` environment variable set in
6
+ * their shell before running the git command (which is rare but possible).
7
+ * This function should only be used where such false positives are acceptable.
8
+ */
9
+ export declare function maybeInGitHook(): boolean;
@@ -4,6 +4,6 @@ export declare class MigrateDev implements Command {
4
4
  static new(): MigrateDev;
5
5
  private static help;
6
6
  parse(argv: string[], config: PrismaConfigInternal): Promise<string | Error>;
7
- private confirmReset;
7
+ private logResetReason;
8
8
  help(error?: string): string | HelpError;
9
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/migrate",
3
- "version": "6.5.0-dev.2",
3
+ "version": "6.5.0-dev.4",
4
4
  "description": "This package is intended for Prisma's internal use",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/migrate/src/index.d.ts",
@@ -57,11 +57,11 @@
57
57
  "dependencies": {
58
58
  "@prisma/engines-version": "6.4.0-29.a9055b89e58b4b5bfb59600785423b1db3d0e75d",
59
59
  "prompts": "2.4.2",
60
- "@prisma/config": "6.5.0-dev.2",
61
- "@prisma/generator-helper": "6.5.0-dev.2",
62
- "@prisma/debug": "6.5.0-dev.2",
63
- "@prisma/get-platform": "6.5.0-dev.2",
64
- "@prisma/internals": "6.5.0-dev.2"
60
+ "@prisma/config": "6.5.0-dev.4",
61
+ "@prisma/generator-helper": "6.5.0-dev.4",
62
+ "@prisma/internals": "6.5.0-dev.4",
63
+ "@prisma/get-platform": "6.5.0-dev.4",
64
+ "@prisma/debug": "6.5.0-dev.4"
65
65
  },
66
66
  "files": [
67
67
  "README.md",