@prisma/migrate 6.5.0 → 6.6.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 (33) hide show
  1. package/dist/Migrate.js +2 -3
  2. package/dist/bin.js +21 -24
  3. package/dist/{chunk-Q7M5ANIE.js → chunk-2B4IAB6L.js} +8 -8
  4. package/dist/{chunk-DH7C3NWH.js → chunk-5GVIOOXU.js} +9 -9
  5. package/dist/{chunk-5VDXAE53.js → chunk-5PSO7BDO.js} +15 -5
  6. package/dist/{chunk-TPJISPJ5.js → chunk-CQZFVAXC.js} +5 -5
  7. package/dist/{chunk-ZQ3OWSVS.js → chunk-GG54LOYV.js} +5 -5
  8. package/dist/{chunk-EX2UWGES.js → chunk-HCBZB4XC.js} +6 -6
  9. package/dist/{chunk-6C7ESGWY.js → chunk-KOF4LGTS.js} +642 -9
  10. package/dist/{chunk-X6KW7BYP.js → chunk-KS7IEA6Z.js} +5 -5
  11. package/dist/chunk-MCWCB2AX.js +3038 -0
  12. package/dist/{chunk-E7OXHCDR.js → chunk-N3KYWSX2.js} +5 -5
  13. package/dist/{chunk-LZOZZRHB.js → chunk-N4XTKFY6.js} +5 -5
  14. package/dist/{chunk-A4BCLP6K.js → chunk-Q3ZLC44N.js} +5 -5
  15. package/dist/{chunk-X5N72JHI.js → chunk-WI2A2TQE.js} +5 -5
  16. package/dist/commands/DbExecute.js +3 -4
  17. package/dist/commands/DbPull.js +3 -7
  18. package/dist/commands/DbPush.js +3 -4
  19. package/dist/commands/MigrateDeploy.js +3 -4
  20. package/dist/commands/MigrateDev.js +3 -4
  21. package/dist/commands/MigrateDiff.js +3 -4
  22. package/dist/commands/MigrateReset.js +3 -4
  23. package/dist/commands/MigrateResolve.js +3 -4
  24. package/dist/commands/MigrateStatus.js +3 -4
  25. package/dist/index.js +21 -24
  26. package/dist/utils/setupMSSQL.js +123 -21
  27. package/dist/utils/setupMongo.js +6048 -5470
  28. package/dist/utils/spinner.js +2 -6
  29. package/package.json +10 -10
  30. package/dist/chunk-DIAO4W7O.js +0 -5774
  31. package/dist/chunk-KXMACMQC.js +0 -660
  32. package/dist/chunk-RM5LJIEV.js +0 -35
  33. package/dist/chunk-YUCPBDWV.js +0 -131
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,16 +17,152 @@ var __copyProps = (to, from, except, desc) => {
15
17
  }
16
18
  return to;
17
19
  };
20
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_6C7ESGWY_exports = {};
20
- __export(chunk_6C7ESGWY_exports, {
21
- require_ansi_styles: () => require_ansi_styles,
22
- require_cli_cursor: () => require_cli_cursor,
23
- require_strip_ansi: () => require_strip_ansi
29
+ var chunk_KOF4LGTS_exports = {};
30
+ __export(chunk_KOF4LGTS_exports, {
31
+ Migrate: () => Migrate
24
32
  });
25
- module.exports = __toCommonJS(chunk_6C7ESGWY_exports);
33
+ module.exports = __toCommonJS(chunk_KOF4LGTS_exports);
26
34
  var import_chunk_J46BJQHT = require("./chunk-J46BJQHT.js");
35
+ var import_chunk_ZOEKRXDP = require("./chunk-ZOEKRXDP.js");
36
+ var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
27
37
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
38
+ var import_engines_version = require("@prisma/engines-version");
39
+ var import_internals = require("@prisma/internals");
40
+ var import_path = __toESM2(require("path"));
41
+ var require_ansi_escapes = (0, import_chunk_WWAWV7DQ.__commonJS)({
42
+ "../../node_modules/.pnpm/ansi-escapes@4.3.2/node_modules/ansi-escapes/index.js"(exports, module2) {
43
+ "use strict";
44
+ var ansiEscapes = module2.exports;
45
+ module2.exports.default = ansiEscapes;
46
+ var ESC = "\x1B[";
47
+ var OSC = "\x1B]";
48
+ var BEL = "\x07";
49
+ var SEP = ";";
50
+ var isTerminalApp = process.env.TERM_PROGRAM === "Apple_Terminal";
51
+ ansiEscapes.cursorTo = (x, y) => {
52
+ if (typeof x !== "number") {
53
+ throw new TypeError("The `x` argument is required");
54
+ }
55
+ if (typeof y !== "number") {
56
+ return ESC + (x + 1) + "G";
57
+ }
58
+ return ESC + (y + 1) + ";" + (x + 1) + "H";
59
+ };
60
+ ansiEscapes.cursorMove = (x, y) => {
61
+ if (typeof x !== "number") {
62
+ throw new TypeError("The `x` argument is required");
63
+ }
64
+ let ret = "";
65
+ if (x < 0) {
66
+ ret += ESC + -x + "D";
67
+ } else if (x > 0) {
68
+ ret += ESC + x + "C";
69
+ }
70
+ if (y < 0) {
71
+ ret += ESC + -y + "A";
72
+ } else if (y > 0) {
73
+ ret += ESC + y + "B";
74
+ }
75
+ return ret;
76
+ };
77
+ ansiEscapes.cursorUp = (count = 1) => ESC + count + "A";
78
+ ansiEscapes.cursorDown = (count = 1) => ESC + count + "B";
79
+ ansiEscapes.cursorForward = (count = 1) => ESC + count + "C";
80
+ ansiEscapes.cursorBackward = (count = 1) => ESC + count + "D";
81
+ ansiEscapes.cursorLeft = ESC + "G";
82
+ ansiEscapes.cursorSavePosition = isTerminalApp ? "\x1B7" : ESC + "s";
83
+ ansiEscapes.cursorRestorePosition = isTerminalApp ? "\x1B8" : ESC + "u";
84
+ ansiEscapes.cursorGetPosition = ESC + "6n";
85
+ ansiEscapes.cursorNextLine = ESC + "E";
86
+ ansiEscapes.cursorPrevLine = ESC + "F";
87
+ ansiEscapes.cursorHide = ESC + "?25l";
88
+ ansiEscapes.cursorShow = ESC + "?25h";
89
+ ansiEscapes.eraseLines = (count) => {
90
+ let clear = "";
91
+ for (let i = 0; i < count; i++) {
92
+ clear += ansiEscapes.eraseLine + (i < count - 1 ? ansiEscapes.cursorUp() : "");
93
+ }
94
+ if (count) {
95
+ clear += ansiEscapes.cursorLeft;
96
+ }
97
+ return clear;
98
+ };
99
+ ansiEscapes.eraseEndLine = ESC + "K";
100
+ ansiEscapes.eraseStartLine = ESC + "1K";
101
+ ansiEscapes.eraseLine = ESC + "2K";
102
+ ansiEscapes.eraseDown = ESC + "J";
103
+ ansiEscapes.eraseUp = ESC + "1J";
104
+ ansiEscapes.eraseScreen = ESC + "2J";
105
+ ansiEscapes.scrollUp = ESC + "S";
106
+ ansiEscapes.scrollDown = ESC + "T";
107
+ ansiEscapes.clearScreen = "\x1Bc";
108
+ ansiEscapes.clearTerminal = process.platform === "win32" ? `${ansiEscapes.eraseScreen}${ESC}0f` : (
109
+ // 1. Erases the screen (Only done in case `2` is not supported)
110
+ // 2. Erases the whole screen including scrollback buffer
111
+ // 3. Moves cursor to the top-left position
112
+ // More info: https://www.real-world-systems.com/docs/ANSIcode.html
113
+ `${ansiEscapes.eraseScreen}${ESC}3J${ESC}H`
114
+ );
115
+ ansiEscapes.beep = BEL;
116
+ ansiEscapes.link = (text, url) => {
117
+ return [
118
+ OSC,
119
+ "8",
120
+ SEP,
121
+ SEP,
122
+ url,
123
+ BEL,
124
+ text,
125
+ OSC,
126
+ "8",
127
+ SEP,
128
+ SEP,
129
+ BEL
130
+ ].join("");
131
+ };
132
+ ansiEscapes.image = (buffer, options = {}) => {
133
+ let ret = `${OSC}1337;File=inline=1`;
134
+ if (options.width) {
135
+ ret += `;width=${options.width}`;
136
+ }
137
+ if (options.height) {
138
+ ret += `;height=${options.height}`;
139
+ }
140
+ if (options.preserveAspectRatio === false) {
141
+ ret += ";preserveAspectRatio=0";
142
+ }
143
+ return ret + ":" + buffer.toString("base64") + BEL;
144
+ };
145
+ ansiEscapes.iTerm = {
146
+ setCwd: (cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
147
+ annotation: (message, options = {}) => {
148
+ let ret = `${OSC}1337;`;
149
+ const hasX = typeof options.x !== "undefined";
150
+ const hasY = typeof options.y !== "undefined";
151
+ if ((hasX || hasY) && !(hasX && hasY && typeof options.length !== "undefined")) {
152
+ throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");
153
+ }
154
+ message = message.replace(/\|/g, "");
155
+ ret += options.isHidden ? "AddHiddenAnnotation=" : "AddAnnotation=";
156
+ if (options.length > 0) {
157
+ ret += (hasX ? [message, options.length, options.x, options.y] : [options.length, message]).join("|");
158
+ } else {
159
+ ret += message;
160
+ }
161
+ return ret + BEL;
162
+ }
163
+ };
164
+ }
165
+ });
28
166
  var require_restore_cursor = (0, import_chunk_WWAWV7DQ.__commonJS)({
29
167
  "../../node_modules/.pnpm/restore-cursor@3.1.0/node_modules/restore-cursor/index.js"(exports, module2) {
30
168
  "use strict";
@@ -88,6 +226,80 @@ var require_strip_ansi = (0, import_chunk_WWAWV7DQ.__commonJS)({
88
226
  module2.exports = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
89
227
  }
90
228
  });
229
+ var require_is_fullwidth_code_point = (0, import_chunk_WWAWV7DQ.__commonJS)({
230
+ "../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(exports, module2) {
231
+ "use strict";
232
+ var isFullwidthCodePoint = (codePoint) => {
233
+ if (Number.isNaN(codePoint)) {
234
+ return false;
235
+ }
236
+ if (codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
237
+ codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
238
+ codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
239
+ // CJK Radicals Supplement .. Enclosed CJK Letters and Months
240
+ 11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
241
+ 12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
242
+ 19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
243
+ 43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
244
+ 44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
245
+ 63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
246
+ 65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
247
+ 65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
248
+ 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
249
+ 110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
250
+ 127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
251
+ 131072 <= codePoint && codePoint <= 262141)) {
252
+ return true;
253
+ }
254
+ return false;
255
+ };
256
+ module2.exports = isFullwidthCodePoint;
257
+ module2.exports.default = isFullwidthCodePoint;
258
+ }
259
+ });
260
+ var require_emoji_regex = (0, import_chunk_WWAWV7DQ.__commonJS)({
261
+ "../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(exports, module2) {
262
+ "use strict";
263
+ module2.exports = function() {
264
+ return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
265
+ };
266
+ }
267
+ });
268
+ var require_string_width = (0, import_chunk_WWAWV7DQ.__commonJS)({
269
+ "../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports, module2) {
270
+ "use strict";
271
+ var stripAnsi = require_strip_ansi();
272
+ var isFullwidthCodePoint = require_is_fullwidth_code_point();
273
+ var emojiRegex = require_emoji_regex();
274
+ var stringWidth = (string) => {
275
+ if (typeof string !== "string" || string.length === 0) {
276
+ return 0;
277
+ }
278
+ string = stripAnsi(string);
279
+ if (string.length === 0) {
280
+ return 0;
281
+ }
282
+ string = string.replace(emojiRegex(), " ");
283
+ let width = 0;
284
+ for (let i = 0; i < string.length; i++) {
285
+ const code = string.codePointAt(i);
286
+ if (code <= 31 || code >= 127 && code <= 159) {
287
+ continue;
288
+ }
289
+ if (code >= 768 && code <= 879) {
290
+ continue;
291
+ }
292
+ if (code > 65535) {
293
+ i++;
294
+ }
295
+ width += isFullwidthCodePoint(code) ? 2 : 1;
296
+ }
297
+ return width;
298
+ };
299
+ module2.exports = stringWidth;
300
+ module2.exports.default = stringWidth;
301
+ }
302
+ });
91
303
  var require_color_name = (0, import_chunk_WWAWV7DQ.__commonJS)({
92
304
  "../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js"(exports, module2) {
93
305
  "use strict";
@@ -955,15 +1167,15 @@ var require_route = (0, import_chunk_WWAWV7DQ.__commonJS)({
955
1167
  };
956
1168
  }
957
1169
  function wrapConversion(toModel, graph) {
958
- const path = [graph[toModel].parent, toModel];
1170
+ const path2 = [graph[toModel].parent, toModel];
959
1171
  let fn = conversions[graph[toModel].parent][toModel];
960
1172
  let cur = graph[toModel].parent;
961
1173
  while (graph[cur].parent) {
962
- path.unshift(graph[cur].parent);
1174
+ path2.unshift(graph[cur].parent);
963
1175
  fn = link(conversions[graph[cur].parent][cur], fn);
964
1176
  cur = graph[cur].parent;
965
1177
  }
966
- fn.conversion = path;
1178
+ fn.conversion = path2;
967
1179
  return fn;
968
1180
  }
969
1181
  module2.exports = function(fromModel) {
@@ -1182,3 +1394,424 @@ var require_ansi_styles = (0, import_chunk_WWAWV7DQ.__commonJS)({
1182
1394
  });
1183
1395
  }
1184
1396
  });
1397
+ var require_wrap_ansi = (0, import_chunk_WWAWV7DQ.__commonJS)({
1398
+ "../../node_modules/.pnpm/wrap-ansi@6.2.0/node_modules/wrap-ansi/index.js"(exports, module2) {
1399
+ "use strict";
1400
+ var stringWidth = require_string_width();
1401
+ var stripAnsi = require_strip_ansi();
1402
+ var ansiStyles = require_ansi_styles();
1403
+ var ESCAPES = /* @__PURE__ */ new Set([
1404
+ "\x1B",
1405
+ "\x9B"
1406
+ ]);
1407
+ var END_CODE = 39;
1408
+ var wrapAnsi = (code) => `${ESCAPES.values().next().value}[${code}m`;
1409
+ var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
1410
+ var wrapWord = (rows, word, columns) => {
1411
+ const characters = [...word];
1412
+ let isInsideEscape = false;
1413
+ let visible = stringWidth(stripAnsi(rows[rows.length - 1]));
1414
+ for (const [index, character] of characters.entries()) {
1415
+ const characterLength = stringWidth(character);
1416
+ if (visible + characterLength <= columns) {
1417
+ rows[rows.length - 1] += character;
1418
+ } else {
1419
+ rows.push(character);
1420
+ visible = 0;
1421
+ }
1422
+ if (ESCAPES.has(character)) {
1423
+ isInsideEscape = true;
1424
+ } else if (isInsideEscape && character === "m") {
1425
+ isInsideEscape = false;
1426
+ continue;
1427
+ }
1428
+ if (isInsideEscape) {
1429
+ continue;
1430
+ }
1431
+ visible += characterLength;
1432
+ if (visible === columns && index < characters.length - 1) {
1433
+ rows.push("");
1434
+ visible = 0;
1435
+ }
1436
+ }
1437
+ if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {
1438
+ rows[rows.length - 2] += rows.pop();
1439
+ }
1440
+ };
1441
+ var stringVisibleTrimSpacesRight = (str) => {
1442
+ const words = str.split(" ");
1443
+ let last = words.length;
1444
+ while (last > 0) {
1445
+ if (stringWidth(words[last - 1]) > 0) {
1446
+ break;
1447
+ }
1448
+ last--;
1449
+ }
1450
+ if (last === words.length) {
1451
+ return str;
1452
+ }
1453
+ return words.slice(0, last).join(" ") + words.slice(last).join("");
1454
+ };
1455
+ var exec = (string, columns, options = {}) => {
1456
+ if (options.trim !== false && string.trim() === "") {
1457
+ return "";
1458
+ }
1459
+ let pre = "";
1460
+ let ret = "";
1461
+ let escapeCode;
1462
+ const lengths = wordLengths(string);
1463
+ let rows = [""];
1464
+ for (const [index, word] of string.split(" ").entries()) {
1465
+ if (options.trim !== false) {
1466
+ rows[rows.length - 1] = rows[rows.length - 1].trimLeft();
1467
+ }
1468
+ let rowLength = stringWidth(rows[rows.length - 1]);
1469
+ if (index !== 0) {
1470
+ if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
1471
+ rows.push("");
1472
+ rowLength = 0;
1473
+ }
1474
+ if (rowLength > 0 || options.trim === false) {
1475
+ rows[rows.length - 1] += " ";
1476
+ rowLength++;
1477
+ }
1478
+ }
1479
+ if (options.hard && lengths[index] > columns) {
1480
+ const remainingColumns = columns - rowLength;
1481
+ const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
1482
+ const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
1483
+ if (breaksStartingNextLine < breaksStartingThisLine) {
1484
+ rows.push("");
1485
+ }
1486
+ wrapWord(rows, word, columns);
1487
+ continue;
1488
+ }
1489
+ if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
1490
+ if (options.wordWrap === false && rowLength < columns) {
1491
+ wrapWord(rows, word, columns);
1492
+ continue;
1493
+ }
1494
+ rows.push("");
1495
+ }
1496
+ if (rowLength + lengths[index] > columns && options.wordWrap === false) {
1497
+ wrapWord(rows, word, columns);
1498
+ continue;
1499
+ }
1500
+ rows[rows.length - 1] += word;
1501
+ }
1502
+ if (options.trim !== false) {
1503
+ rows = rows.map(stringVisibleTrimSpacesRight);
1504
+ }
1505
+ pre = rows.join("\n");
1506
+ for (const [index, character] of [...pre].entries()) {
1507
+ ret += character;
1508
+ if (ESCAPES.has(character)) {
1509
+ const code2 = parseFloat(/\d[^m]*/.exec(pre.slice(index, index + 4)));
1510
+ escapeCode = code2 === END_CODE ? null : code2;
1511
+ }
1512
+ const code = ansiStyles.codes.get(Number(escapeCode));
1513
+ if (escapeCode && code) {
1514
+ if (pre[index + 1] === "\n") {
1515
+ ret += wrapAnsi(code);
1516
+ } else if (character === "\n") {
1517
+ ret += wrapAnsi(escapeCode);
1518
+ }
1519
+ }
1520
+ }
1521
+ return ret;
1522
+ };
1523
+ module2.exports = (string, columns, options) => {
1524
+ return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
1525
+ };
1526
+ }
1527
+ });
1528
+ var require_astral_regex = (0, import_chunk_WWAWV7DQ.__commonJS)({
1529
+ "../../node_modules/.pnpm/astral-regex@2.0.0/node_modules/astral-regex/index.js"(exports, module2) {
1530
+ "use strict";
1531
+ var regex = "[\uD800-\uDBFF][\uDC00-\uDFFF]";
1532
+ var astralRegex = (options) => options && options.exact ? new RegExp(`^${regex}$`) : new RegExp(regex, "g");
1533
+ module2.exports = astralRegex;
1534
+ }
1535
+ });
1536
+ var require_slice_ansi = (0, import_chunk_WWAWV7DQ.__commonJS)({
1537
+ "../../node_modules/.pnpm/slice-ansi@4.0.0/node_modules/slice-ansi/index.js"(exports, module2) {
1538
+ "use strict";
1539
+ var isFullwidthCodePoint = require_is_fullwidth_code_point();
1540
+ var astralRegex = require_astral_regex();
1541
+ var ansiStyles = require_ansi_styles();
1542
+ var ESCAPES = [
1543
+ "\x1B",
1544
+ "\x9B"
1545
+ ];
1546
+ var wrapAnsi = (code) => `${ESCAPES[0]}[${code}m`;
1547
+ var checkAnsi = (ansiCodes, isEscapes, endAnsiCode) => {
1548
+ let output = [];
1549
+ ansiCodes = [...ansiCodes];
1550
+ for (let ansiCode of ansiCodes) {
1551
+ const ansiCodeOrigin = ansiCode;
1552
+ if (ansiCode.includes(";")) {
1553
+ ansiCode = ansiCode.split(";")[0][0] + "0";
1554
+ }
1555
+ const item = ansiStyles.codes.get(Number.parseInt(ansiCode, 10));
1556
+ if (item) {
1557
+ const indexEscape = ansiCodes.indexOf(item.toString());
1558
+ if (indexEscape === -1) {
1559
+ output.push(wrapAnsi(isEscapes ? item : ansiCodeOrigin));
1560
+ } else {
1561
+ ansiCodes.splice(indexEscape, 1);
1562
+ }
1563
+ } else if (isEscapes) {
1564
+ output.push(wrapAnsi(0));
1565
+ break;
1566
+ } else {
1567
+ output.push(wrapAnsi(ansiCodeOrigin));
1568
+ }
1569
+ }
1570
+ if (isEscapes) {
1571
+ output = output.filter((element, index) => output.indexOf(element) === index);
1572
+ if (endAnsiCode !== void 0) {
1573
+ const fistEscapeCode = wrapAnsi(ansiStyles.codes.get(Number.parseInt(endAnsiCode, 10)));
1574
+ output = output.reduce((current, next) => next === fistEscapeCode ? [next, ...current] : [...current, next], []);
1575
+ }
1576
+ }
1577
+ return output.join("");
1578
+ };
1579
+ module2.exports = (string, begin, end) => {
1580
+ const characters = [...string];
1581
+ const ansiCodes = [];
1582
+ let stringEnd = typeof end === "number" ? end : characters.length;
1583
+ let isInsideEscape = false;
1584
+ let ansiCode;
1585
+ let visible = 0;
1586
+ let output = "";
1587
+ for (const [index, character] of characters.entries()) {
1588
+ let leftEscape = false;
1589
+ if (ESCAPES.includes(character)) {
1590
+ const code = /\d[^m]*/.exec(string.slice(index, index + 18));
1591
+ ansiCode = code && code.length > 0 ? code[0] : void 0;
1592
+ if (visible < stringEnd) {
1593
+ isInsideEscape = true;
1594
+ if (ansiCode !== void 0) {
1595
+ ansiCodes.push(ansiCode);
1596
+ }
1597
+ }
1598
+ } else if (isInsideEscape && character === "m") {
1599
+ isInsideEscape = false;
1600
+ leftEscape = true;
1601
+ }
1602
+ if (!isInsideEscape && !leftEscape) {
1603
+ visible++;
1604
+ }
1605
+ if (!astralRegex({ exact: true }).test(character) && isFullwidthCodePoint(character.codePointAt())) {
1606
+ visible++;
1607
+ if (typeof end !== "number") {
1608
+ stringEnd++;
1609
+ }
1610
+ }
1611
+ if (visible > begin && visible <= stringEnd) {
1612
+ output += character;
1613
+ } else if (visible === begin && !isInsideEscape && ansiCode !== void 0) {
1614
+ output = checkAnsi(ansiCodes);
1615
+ } else if (visible >= stringEnd) {
1616
+ output += checkAnsi(ansiCodes, true, ansiCode);
1617
+ break;
1618
+ }
1619
+ }
1620
+ return output;
1621
+ };
1622
+ }
1623
+ });
1624
+ var require_log_update = (0, import_chunk_WWAWV7DQ.__commonJS)({
1625
+ "../../node_modules/.pnpm/log-update@4.0.0/node_modules/log-update/index.js"(exports, module2) {
1626
+ "use strict";
1627
+ var ansiEscapes = require_ansi_escapes();
1628
+ var cliCursor = require_cli_cursor();
1629
+ var wrapAnsi = require_wrap_ansi();
1630
+ var sliceAnsi = require_slice_ansi();
1631
+ var defaultTerminalHeight = 24;
1632
+ var getWidth = (stream) => {
1633
+ const { columns } = stream;
1634
+ if (!columns) {
1635
+ return 80;
1636
+ }
1637
+ return columns;
1638
+ };
1639
+ var fitToTerminalHeight = (stream, text) => {
1640
+ const terminalHeight = stream.rows || defaultTerminalHeight;
1641
+ const lines = text.split("\n");
1642
+ const toRemove = lines.length - terminalHeight;
1643
+ if (toRemove <= 0) {
1644
+ return text;
1645
+ }
1646
+ return sliceAnsi(
1647
+ text,
1648
+ lines.slice(0, toRemove).join("\n").length + 1,
1649
+ text.length
1650
+ );
1651
+ };
1652
+ var main = (stream, { showCursor = false } = {}) => {
1653
+ let previousLineCount = 0;
1654
+ let previousWidth = getWidth(stream);
1655
+ let previousOutput = "";
1656
+ const render = (...args) => {
1657
+ if (!showCursor) {
1658
+ cliCursor.hide();
1659
+ }
1660
+ let output = args.join(" ") + "\n";
1661
+ output = fitToTerminalHeight(stream, output);
1662
+ const width = getWidth(stream);
1663
+ if (output === previousOutput && previousWidth === width) {
1664
+ return;
1665
+ }
1666
+ previousOutput = output;
1667
+ previousWidth = width;
1668
+ output = wrapAnsi(output, width, {
1669
+ trim: false,
1670
+ hard: true,
1671
+ wordWrap: false
1672
+ });
1673
+ stream.write(ansiEscapes.eraseLines(previousLineCount) + output);
1674
+ previousLineCount = output.split("\n").length;
1675
+ };
1676
+ render.clear = () => {
1677
+ stream.write(ansiEscapes.eraseLines(previousLineCount));
1678
+ previousOutput = "";
1679
+ previousWidth = getWidth(stream);
1680
+ previousLineCount = 0;
1681
+ };
1682
+ render.done = () => {
1683
+ previousOutput = "";
1684
+ previousWidth = getWidth(stream);
1685
+ previousLineCount = 0;
1686
+ if (!showCursor) {
1687
+ cliCursor.show();
1688
+ }
1689
+ };
1690
+ return render;
1691
+ };
1692
+ module2.exports = main(process.stdout);
1693
+ module2.exports.stderr = main(process.stderr);
1694
+ module2.exports.create = main;
1695
+ }
1696
+ });
1697
+ var import_log_update = (0, import_chunk_WWAWV7DQ.__toESM)(require_log_update());
1698
+ var packageJson = eval(`require('../package.json')`);
1699
+ var Migrate = class {
1700
+ constructor(schemaPath, enabledPreviewFeatures) {
1701
+ (0, import_chunk_WWAWV7DQ.__publicField)(this, "engine");
1702
+ (0, import_chunk_WWAWV7DQ.__publicField)(this, "schemaPath");
1703
+ (0, import_chunk_WWAWV7DQ.__publicField)(this, "migrationsDirectoryPath");
1704
+ if (schemaPath) {
1705
+ this.schemaPath = import_path.default.resolve(process.cwd(), schemaPath);
1706
+ this.migrationsDirectoryPath = import_path.default.join(import_path.default.dirname(this.schemaPath), "migrations");
1707
+ this.engine = new import_chunk_ZOEKRXDP.SchemaEngine({
1708
+ schemaPath: this.schemaPath,
1709
+ enabledPreviewFeatures
1710
+ });
1711
+ } else {
1712
+ this.engine = new import_chunk_ZOEKRXDP.SchemaEngine({
1713
+ enabledPreviewFeatures
1714
+ });
1715
+ }
1716
+ }
1717
+ stop() {
1718
+ this.engine.stop();
1719
+ }
1720
+ getPrismaSchema() {
1721
+ if (!this.schemaPath) throw new Error("this.schemaPath is undefined");
1722
+ return (0, import_internals.getSchemaWithPath)(this.schemaPath);
1723
+ }
1724
+ reset() {
1725
+ return this.engine.reset();
1726
+ }
1727
+ createMigration(params) {
1728
+ return this.engine.createMigration(params);
1729
+ }
1730
+ diagnoseMigrationHistory({
1731
+ optInToShadowDatabase
1732
+ }) {
1733
+ if (!this.migrationsDirectoryPath) throw new Error("this.migrationsDirectoryPath is undefined");
1734
+ return this.engine.diagnoseMigrationHistory({
1735
+ migrationsDirectoryPath: this.migrationsDirectoryPath,
1736
+ optInToShadowDatabase
1737
+ });
1738
+ }
1739
+ listMigrationDirectories() {
1740
+ if (!this.migrationsDirectoryPath) throw new Error("this.migrationsDirectoryPath is undefined");
1741
+ return this.engine.listMigrationDirectories({
1742
+ migrationsDirectoryPath: this.migrationsDirectoryPath
1743
+ });
1744
+ }
1745
+ devDiagnostic() {
1746
+ if (!this.migrationsDirectoryPath) throw new Error("this.migrationsDirectoryPath is undefined");
1747
+ return this.engine.devDiagnostic({
1748
+ migrationsDirectoryPath: this.migrationsDirectoryPath
1749
+ });
1750
+ }
1751
+ async markMigrationApplied({ migrationId }) {
1752
+ if (!this.migrationsDirectoryPath) throw new Error("this.migrationsDirectoryPath is undefined");
1753
+ return await this.engine.markMigrationApplied({
1754
+ migrationsDirectoryPath: this.migrationsDirectoryPath,
1755
+ migrationName: migrationId
1756
+ });
1757
+ }
1758
+ markMigrationRolledBack({ migrationId }) {
1759
+ return this.engine.markMigrationRolledBack({
1760
+ migrationName: migrationId
1761
+ });
1762
+ }
1763
+ applyMigrations() {
1764
+ if (!this.migrationsDirectoryPath) throw new Error("this.migrationsDirectoryPath is undefined");
1765
+ return this.engine.applyMigrations({
1766
+ migrationsDirectoryPath: this.migrationsDirectoryPath
1767
+ });
1768
+ }
1769
+ async evaluateDataLoss() {
1770
+ if (!this.migrationsDirectoryPath) throw new Error("this.migrationsDirectoryPath is undefined");
1771
+ const schema = (0, import_internals.toSchemasContainer)((await this.getPrismaSchema()).schemas);
1772
+ return this.engine.evaluateDataLoss({
1773
+ migrationsDirectoryPath: this.migrationsDirectoryPath,
1774
+ schema
1775
+ });
1776
+ }
1777
+ async push({ force = false }) {
1778
+ const schema = (0, import_internals.toSchemasContainer)((await this.getPrismaSchema()).schemas);
1779
+ const { warnings, unexecutable, executedSteps } = await this.engine.schemaPush({
1780
+ force,
1781
+ schema
1782
+ });
1783
+ return {
1784
+ executedSteps,
1785
+ warnings,
1786
+ unexecutable
1787
+ };
1788
+ }
1789
+ async tryToRunGenerate(datasourceInfo) {
1790
+ if (!this.schemaPath) throw new Error("this.schemaPath is undefined");
1791
+ const skipEngines = (0, import_internals.isPrismaPostgres)(datasourceInfo.url);
1792
+ const message = [];
1793
+ process.stdout.write("\n");
1794
+ (0, import_log_update.default)(`Running generate... ${(0, import_chunk_SKRR5WT4.dim)("(Use --skip-generate to skip the generators)")}`);
1795
+ const generators = await (0, import_internals.getGenerators)({
1796
+ schemaPath: this.schemaPath,
1797
+ printDownloadProgress: true,
1798
+ version: import_engines_version.enginesVersion,
1799
+ cliVersion: packageJson.version,
1800
+ noEngine: skipEngines
1801
+ });
1802
+ for (const generator of generators) {
1803
+ (0, import_log_update.default)(`Running generate... - ${generator.getPrettyName()}`);
1804
+ const before = Math.round(performance.now());
1805
+ try {
1806
+ await generator.generate();
1807
+ const after = Math.round(performance.now());
1808
+ message.push((0, import_internals.getGeneratorSuccessMessage)(generator, after - before));
1809
+ generator.stop();
1810
+ } catch (e) {
1811
+ message.push(`${e.message}`);
1812
+ generator.stop();
1813
+ }
1814
+ }
1815
+ (0, import_log_update.default)(message.join("\n"));
1816
+ }
1817
+ };