@prisma/migrate 6.5.0-dev.1 → 6.5.0-dev.10

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 (110) hide show
  1. package/dist/CLI.js +3 -4
  2. package/dist/Migrate.js +6 -7
  3. package/dist/SchemaEngine.js +6 -7
  4. package/dist/bin.js +116 -146
  5. package/dist/{chunk-WOOPRG54.js → chunk-255BRND3.js} +7 -14
  6. package/dist/{chunk-75EIHNAH.js → chunk-2NMFKGXM.js} +5 -6
  7. package/dist/chunk-3WC4XD74.js +98 -0
  8. package/dist/chunk-4EV2RVXY.js +226 -0
  9. package/dist/{chunk-YWWOSXMY.js → chunk-4JQIX6O7.js} +7 -15
  10. package/dist/{chunk-J77IRNPE.js → chunk-5VDXAE53.js} +45 -31
  11. package/dist/{chunk-M5YNQ2NP.js → chunk-6DFJIBJX.js} +5 -12
  12. package/dist/{chunk-SGCF5OHF.js → chunk-7CQBDP4H.js} +6 -13
  13. package/dist/{chunk-7IT2ZO3D.js → chunk-AHJ2N6BJ.js} +3 -9
  14. package/dist/chunk-CTPONE6G.js +65 -0
  15. package/dist/{chunk-DUCG3NRP.js → chunk-D74DU52C.js} +633 -806
  16. package/dist/{chunk-UVNSK22K.js → chunk-DDHPSYC4.js} +122 -130
  17. package/dist/{chunk-CUDKD32S.js → chunk-DIAO4W7O.js} +11 -17
  18. package/dist/{chunk-XJQP3B4W.js → chunk-DJMFXNR4.js} +7 -15
  19. package/dist/{chunk-YD7GG4WS.js → chunk-FRTPDRF2.js} +66 -74
  20. package/dist/chunk-HIFVDK2U.js +96 -0
  21. package/dist/chunk-I4EY55DC.js +195 -0
  22. package/dist/{chunk-WLJHGKMK.js → chunk-IHDN3L3R.js} +7 -8
  23. package/dist/chunk-J5FHVALZ.js +230 -0
  24. package/dist/{chunk-INC2OACE.js → chunk-JFKDSUIE.js} +3 -9
  25. package/dist/{chunk-V7DE6JTG.js → chunk-JZ75RIMZ.js} +3 -9
  26. package/dist/{chunk-AAATUOV6.js → chunk-L6KOIJJ5.js} +53 -59
  27. package/dist/{chunk-GN5BY5N2.js → chunk-LGYRZ6CV.js} +4 -10
  28. package/dist/chunk-LVLRGTYH.js +148 -0
  29. package/dist/{chunk-CQQQ436N.js → chunk-MATFO4ZW.js} +186 -200
  30. package/dist/{chunk-V5LEZ5BX.js → chunk-NB4NJGMY.js} +634 -807
  31. package/dist/{chunk-IFCV5MY4.js → chunk-OCQGHQED.js} +5 -11
  32. package/dist/chunk-ORL3LJOT.js +470 -0
  33. package/dist/chunk-PSYS5XVH.js +335 -0
  34. package/dist/{chunk-Q7ACZDDT.js → chunk-QOPTDDIH.js} +5 -12
  35. package/dist/chunk-QTAIWPLH.js +78 -0
  36. package/dist/{chunk-35LAJN5S.js → chunk-RP2N6UXA.js} +23 -29
  37. package/dist/chunk-RQFGRXJI.js +174 -0
  38. package/dist/{chunk-QBK5XTJE.js → chunk-RR6BKMNO.js} +3 -9
  39. package/dist/{chunk-ILJRJJ3S.js → chunk-RTGQXNX6.js} +3 -9
  40. package/dist/chunk-SKRR5WT4.js +76 -0
  41. package/dist/chunk-TM3ETZES.js +153 -0
  42. package/dist/{chunk-KPUNMK5W.js → chunk-TWPTG4XS.js} +5 -12
  43. package/dist/{chunk-6QFE3AWR.js → chunk-UP6FVCDK.js} +6 -13
  44. package/dist/{chunk-YKUZUAXA.js → chunk-V3ZMNXZC.js} +16 -23
  45. package/dist/chunk-WLPX3672.js +365 -0
  46. package/dist/chunk-WNH2ACJS.js +122 -0
  47. package/dist/{chunk-X6XGFLEF.js → chunk-YZVZCC3I.js} +25 -30
  48. package/dist/commands/DbCommand.js +3 -4
  49. package/dist/commands/DbDrop.js +9 -9
  50. package/dist/commands/DbExecute.js +7 -8
  51. package/dist/commands/DbPull.js +18 -19
  52. package/dist/commands/DbPush.js +12 -13
  53. package/dist/commands/DbSeed.js +4 -5
  54. package/dist/commands/MigrateCommand.js +3 -4
  55. package/dist/commands/MigrateDeploy.js +13 -14
  56. package/dist/commands/MigrateDev.js +17 -18
  57. package/dist/commands/MigrateDiff.js +8 -9
  58. package/dist/commands/MigrateReset.js +15 -16
  59. package/dist/commands/MigrateResolve.js +11 -12
  60. package/dist/commands/MigrateStatus.js +11 -12
  61. package/dist/index.js +60 -77
  62. package/dist/internals/src/index.d.ts +3 -0
  63. package/dist/internals/src/utils/isInContainer.d.ts +5 -0
  64. package/dist/internals/src/utils/isInNpmLifecycleHook.d.ts +4 -0
  65. package/dist/internals/src/utils/maybeInGitHook.d.ts +9 -0
  66. package/dist/migrate/src/commands/MigrateDev.d.ts +1 -1
  67. package/dist/{multipart-parser-73VM3J4A.js → multipart-parser-NDLECNMN.js} +527 -561
  68. package/dist/utils/byline.js +5 -6
  69. package/dist/utils/captureStdout.js +2 -3
  70. package/dist/utils/countModelsAndTypes.js +2 -3
  71. package/dist/utils/ensureDatabaseExists.js +8 -9
  72. package/dist/utils/errors.js +8 -9
  73. package/dist/utils/flagErrors.js +5 -5
  74. package/dist/utils/getDatabaseVersionSafe.js +6 -7
  75. package/dist/utils/getSchemaPathAndPrint.js +4 -5
  76. package/dist/utils/handleEvaluateDataloss.js +3 -4
  77. package/dist/utils/introspectSql.js +6 -6
  78. package/dist/utils/isSchemaEmpty.js +2 -3
  79. package/dist/utils/printDatasource.js +3 -4
  80. package/dist/utils/printDatasources.js +3 -4
  81. package/dist/utils/printFiles.js +5 -6
  82. package/dist/utils/printIntrospectedSchema.js +2 -3
  83. package/dist/utils/printMigrationId.js +4 -5
  84. package/dist/utils/promptForMigrationName.js +2 -3
  85. package/dist/utils/removeSchemaFiles.js +2 -3
  86. package/dist/utils/replaceOrAddDatasource.js +2 -3
  87. package/dist/utils/replaceOrAddDatasource.test.js +7 -8
  88. package/dist/utils/saveSchemaFiles.js +2 -3
  89. package/dist/utils/seed.js +6 -7
  90. package/dist/utils/setupMSSQL.js +13 -13
  91. package/dist/utils/setupMongo.js +3 -3
  92. package/dist/utils/spinner.js +2 -3
  93. package/dist/utils/unixSocket.js +2 -3
  94. package/dist/views/handleViewsIO.js +2 -3
  95. package/package.json +7 -7
  96. package/dist/chunk-26XQQ4AG.js +0 -386
  97. package/dist/chunk-2RSEPJFX.js +0 -165
  98. package/dist/chunk-4B2LXK4R.js +0 -207
  99. package/dist/chunk-4UJBOCZJ.js +0 -130
  100. package/dist/chunk-5HZLCY6X.js +0 -161
  101. package/dist/chunk-6TE2RIPN.js +0 -80
  102. package/dist/chunk-7S3Q4MCN.js +0 -480
  103. package/dist/chunk-AOX7CJAS.js +0 -234
  104. package/dist/chunk-FF3526PX.js +0 -279
  105. package/dist/chunk-FUSFURVP.js +0 -86
  106. package/dist/chunk-GCTCQLOF.js +0 -365
  107. package/dist/chunk-K44VNAFW.js +0 -189
  108. package/dist/chunk-O4BT6W33.js +0 -104
  109. package/dist/chunk-TKAGMA5K.js +0 -72
  110. package/dist/chunk-U374EXYQ.js +0 -106
@@ -1,72 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_TKAGMA5K_exports = {};
20
- __export(chunk_TKAGMA5K_exports, {
21
- CaptureStdout: () => CaptureStdout,
22
- init_captureStdout: () => init_captureStdout
23
- });
24
- module.exports = __toCommonJS(chunk_TKAGMA5K_exports);
25
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
26
- var CaptureStdout;
27
- var init_captureStdout = (0, import_chunk_WWAWV7DQ.__esm)({
28
- "src/utils/captureStdout.ts"() {
29
- CaptureStdout = class {
30
- constructor() {
31
- this._capturedText = [];
32
- this._orig_stdout_write = null;
33
- }
34
- /**
35
- * Starts capturing the writes to process.stdout
36
- */
37
- startCapture() {
38
- this._orig_stdout_write = process.stdout.write;
39
- process.stdout.write = this._writeCapture.bind(this);
40
- }
41
- /**
42
- * Stops capturing the writes to process.stdout.
43
- */
44
- stopCapture() {
45
- if (this._orig_stdout_write) {
46
- process.stdout.write = this._orig_stdout_write;
47
- }
48
- }
49
- /**
50
- * Private method that is used as the replacement write function for process.stdout
51
- * @param string
52
- * @private
53
- */
54
- _writeCapture(string) {
55
- this._capturedText.push(string);
56
- }
57
- /**
58
- * Retrieve the text that has been captured since creation or since the last clear call
59
- * @returns {Array} of Strings
60
- */
61
- getCapturedText() {
62
- return this._capturedText;
63
- }
64
- /**
65
- * Clears all of the captured text
66
- */
67
- clearCaptureText() {
68
- this._capturedText = [];
69
- }
70
- };
71
- }
72
- });
@@ -1,106 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_U374EXYQ_exports = {};
20
- __export(chunk_U374EXYQ_exports, {
21
- DbDropNeedsForceError: () => DbDropNeedsForceError,
22
- DbPushIgnoreWarningsWithFlagError: () => DbPushIgnoreWarningsWithFlagError,
23
- MigrateDevEnvNonInteractiveError: () => MigrateDevEnvNonInteractiveError,
24
- MigrateNeedsForceError: () => MigrateNeedsForceError,
25
- MigrateResetEnvNonInteractiveError: () => MigrateResetEnvNonInteractiveError,
26
- NoSchemaFoundError: () => NoSchemaFoundError,
27
- init_errors: () => init_errors
28
- });
29
- module.exports = __toCommonJS(chunk_U374EXYQ_exports);
30
- var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
31
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
32
- var import_internals = require("@prisma/internals");
33
- var NoSchemaFoundError, DbPushIgnoreWarningsWithFlagError, MigrateNeedsForceError, MigrateResetEnvNonInteractiveError, MigrateDevEnvNonInteractiveError, DbDropNeedsForceError;
34
- var init_errors = (0, import_chunk_WWAWV7DQ.__esm)({
35
- "src/utils/errors.ts"() {
36
- (0, import_chunk_6TE2RIPN.init_colors)();
37
- NoSchemaFoundError = class extends Error {
38
- constructor() {
39
- super(
40
- `Could not find a ${(0, import_chunk_6TE2RIPN.bold)(
41
- "schema.prisma"
42
- )} file that is required for this command.
43
- You can either provide it with ${(0, import_chunk_6TE2RIPN.green)(
44
- "--schema"
45
- )}, set it as \`prisma.schema\` in your package.json or put it into the default location ${(0, import_chunk_6TE2RIPN.green)(
46
- "./prisma/schema.prisma"
47
- )} ${(0, import_internals.link)("https://pris.ly/d/prisma-schema-location")}`
48
- );
49
- }
50
- };
51
- (0, import_internals.setClassName)(NoSchemaFoundError, "NoSchemaFoundError");
52
- DbPushIgnoreWarningsWithFlagError = class extends Error {
53
- constructor() {
54
- super(
55
- `Use the --accept-data-loss flag to ignore the data loss warnings like ${(0, import_chunk_6TE2RIPN.bold)(
56
- (0, import_chunk_6TE2RIPN.green)((0, import_internals.getCommandWithExecutor)("prisma db push --accept-data-loss"))
57
- )}`
58
- );
59
- }
60
- };
61
- (0, import_internals.setClassName)(DbPushIgnoreWarningsWithFlagError, "DbPushIgnoreWarningsWithFlagError");
62
- MigrateNeedsForceError = class extends Error {
63
- constructor(subcommand) {
64
- super(
65
- `Use the --force flag to use the ${subcommand} command in an unattended environment like ${(0, import_chunk_6TE2RIPN.bold)(
66
- (0, import_chunk_6TE2RIPN.green)((0, import_internals.getCommandWithExecutor)(`prisma migrate ${subcommand} --force`))
67
- )}`
68
- );
69
- }
70
- };
71
- (0, import_internals.setClassName)(MigrateNeedsForceError, "MigrateNeedsForceError");
72
- MigrateResetEnvNonInteractiveError = class extends Error {
73
- constructor() {
74
- super(
75
- `Prisma Migrate has detected that the environment is non-interactive. It is recommended to run this command in an interactive environment.
76
-
77
- Use ${(0, import_chunk_6TE2RIPN.bold)((0, import_chunk_6TE2RIPN.green)(`--force`))} to run this command without user interaction.
78
- See ${(0, import_internals.link)("https://www.prisma.io/docs/reference/api-reference/command-reference#migrate-reset")}`
79
- );
80
- }
81
- };
82
- (0, import_internals.setClassName)(MigrateResetEnvNonInteractiveError, "MigrateResetEnvNonInteractiveError");
83
- MigrateDevEnvNonInteractiveError = class extends Error {
84
- constructor() {
85
- super(
86
- `Prisma Migrate has detected that the environment is non-interactive, which is not supported.
87
-
88
- \`prisma migrate dev\` is an interactive command designed to create new migrations and evolve the database in development.
89
- To apply existing migrations in deployments, use ${(0, import_chunk_6TE2RIPN.bold)((0, import_chunk_6TE2RIPN.green)(`prisma migrate deploy`))}.
90
- See ${(0, import_internals.link)("https://www.prisma.io/docs/reference/api-reference/command-reference#migrate-deploy")}`
91
- );
92
- }
93
- };
94
- (0, import_internals.setClassName)(MigrateDevEnvNonInteractiveError, "MigrateDevEnvNonInteractiveError");
95
- DbDropNeedsForceError = class extends Error {
96
- constructor(subcommand) {
97
- super(
98
- `Use the --force flag to use the ${subcommand} command in an unattended environment like ${(0, import_chunk_6TE2RIPN.bold)(
99
- (0, import_chunk_6TE2RIPN.green)((0, import_internals.getCommandWithExecutor)(`prisma db ${subcommand} --force --preview-feature`))
100
- )}`
101
- );
102
- }
103
- };
104
- (0, import_internals.setClassName)(DbDropNeedsForceError, "DbDropNeedsForceError");
105
- }
106
- });