@prisma/migrate 6.6.0-dev.1 → 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.
- package/dist/Migrate.js +2 -3
- package/dist/bin.js +21 -24
- package/dist/{chunk-Q7M5ANIE.js → chunk-2B4IAB6L.js} +8 -8
- package/dist/{chunk-POKX77OK.js → chunk-5GVIOOXU.js} +9 -9
- package/dist/{chunk-5VDXAE53.js → chunk-5PSO7BDO.js} +15 -5
- package/dist/{chunk-TPJISPJ5.js → chunk-CQZFVAXC.js} +5 -5
- package/dist/{chunk-ZQ3OWSVS.js → chunk-GG54LOYV.js} +5 -5
- package/dist/{chunk-EX2UWGES.js → chunk-HCBZB4XC.js} +6 -6
- package/dist/{chunk-6C7ESGWY.js → chunk-KOF4LGTS.js} +642 -9
- package/dist/{chunk-X6KW7BYP.js → chunk-KS7IEA6Z.js} +5 -5
- package/dist/chunk-MCWCB2AX.js +3038 -0
- package/dist/{chunk-E7OXHCDR.js → chunk-N3KYWSX2.js} +5 -5
- package/dist/{chunk-LZOZZRHB.js → chunk-N4XTKFY6.js} +5 -5
- package/dist/{chunk-A4BCLP6K.js → chunk-Q3ZLC44N.js} +5 -5
- package/dist/{chunk-X5N72JHI.js → chunk-WI2A2TQE.js} +5 -5
- package/dist/commands/DbExecute.js +3 -4
- package/dist/commands/DbPull.js +3 -7
- package/dist/commands/DbPush.js +3 -4
- package/dist/commands/MigrateDeploy.js +3 -4
- package/dist/commands/MigrateDev.js +3 -4
- package/dist/commands/MigrateDiff.js +3 -4
- package/dist/commands/MigrateReset.js +3 -4
- package/dist/commands/MigrateResolve.js +3 -4
- package/dist/commands/MigrateStatus.js +3 -4
- package/dist/index.js +21 -24
- package/dist/utils/setupMSSQL.js +123 -21
- package/dist/utils/setupMongo.js +6048 -5470
- package/dist/utils/spinner.js +2 -6
- package/package.json +10 -10
- package/dist/chunk-DIAO4W7O.js +0 -5774
- package/dist/chunk-KXMACMQC.js +0 -660
- package/dist/chunk-RM5LJIEV.js +0 -35
- package/dist/chunk-YUCPBDWV.js +0 -131
package/dist/chunk-KXMACMQC.js
DELETED
|
@@ -1,660 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
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
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var chunk_KXMACMQC_exports = {};
|
|
30
|
-
__export(chunk_KXMACMQC_exports, {
|
|
31
|
-
Migrate: () => Migrate
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(chunk_KXMACMQC_exports);
|
|
34
|
-
var import_chunk_6C7ESGWY = require("./chunk-6C7ESGWY.js");
|
|
35
|
-
var import_chunk_ZOEKRXDP = require("./chunk-ZOEKRXDP.js");
|
|
36
|
-
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
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
|
-
});
|
|
166
|
-
var require_is_fullwidth_code_point = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
167
|
-
"../../node_modules/.pnpm/is-fullwidth-code-point@3.0.0/node_modules/is-fullwidth-code-point/index.js"(exports, module2) {
|
|
168
|
-
"use strict";
|
|
169
|
-
var isFullwidthCodePoint = (codePoint) => {
|
|
170
|
-
if (Number.isNaN(codePoint)) {
|
|
171
|
-
return false;
|
|
172
|
-
}
|
|
173
|
-
if (codePoint >= 4352 && (codePoint <= 4447 || // Hangul Jamo
|
|
174
|
-
codePoint === 9001 || // LEFT-POINTING ANGLE BRACKET
|
|
175
|
-
codePoint === 9002 || // RIGHT-POINTING ANGLE BRACKET
|
|
176
|
-
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
|
|
177
|
-
11904 <= codePoint && codePoint <= 12871 && codePoint !== 12351 || // Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
|
|
178
|
-
12880 <= codePoint && codePoint <= 19903 || // CJK Unified Ideographs .. Yi Radicals
|
|
179
|
-
19968 <= codePoint && codePoint <= 42182 || // Hangul Jamo Extended-A
|
|
180
|
-
43360 <= codePoint && codePoint <= 43388 || // Hangul Syllables
|
|
181
|
-
44032 <= codePoint && codePoint <= 55203 || // CJK Compatibility Ideographs
|
|
182
|
-
63744 <= codePoint && codePoint <= 64255 || // Vertical Forms
|
|
183
|
-
65040 <= codePoint && codePoint <= 65049 || // CJK Compatibility Forms .. Small Form Variants
|
|
184
|
-
65072 <= codePoint && codePoint <= 65131 || // Halfwidth and Fullwidth Forms
|
|
185
|
-
65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 || // Kana Supplement
|
|
186
|
-
110592 <= codePoint && codePoint <= 110593 || // Enclosed Ideographic Supplement
|
|
187
|
-
127488 <= codePoint && codePoint <= 127569 || // CJK Unified Ideographs Extension B .. Tertiary Ideographic Plane
|
|
188
|
-
131072 <= codePoint && codePoint <= 262141)) {
|
|
189
|
-
return true;
|
|
190
|
-
}
|
|
191
|
-
return false;
|
|
192
|
-
};
|
|
193
|
-
module2.exports = isFullwidthCodePoint;
|
|
194
|
-
module2.exports.default = isFullwidthCodePoint;
|
|
195
|
-
}
|
|
196
|
-
});
|
|
197
|
-
var require_emoji_regex = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
198
|
-
"../../node_modules/.pnpm/emoji-regex@8.0.0/node_modules/emoji-regex/index.js"(exports, module2) {
|
|
199
|
-
"use strict";
|
|
200
|
-
module2.exports = function() {
|
|
201
|
-
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;
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
var require_string_width = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
206
|
-
"../../node_modules/.pnpm/string-width@4.2.3/node_modules/string-width/index.js"(exports, module2) {
|
|
207
|
-
"use strict";
|
|
208
|
-
var stripAnsi = (0, import_chunk_6C7ESGWY.require_strip_ansi)();
|
|
209
|
-
var isFullwidthCodePoint = require_is_fullwidth_code_point();
|
|
210
|
-
var emojiRegex = require_emoji_regex();
|
|
211
|
-
var stringWidth = (string) => {
|
|
212
|
-
if (typeof string !== "string" || string.length === 0) {
|
|
213
|
-
return 0;
|
|
214
|
-
}
|
|
215
|
-
string = stripAnsi(string);
|
|
216
|
-
if (string.length === 0) {
|
|
217
|
-
return 0;
|
|
218
|
-
}
|
|
219
|
-
string = string.replace(emojiRegex(), " ");
|
|
220
|
-
let width = 0;
|
|
221
|
-
for (let i = 0; i < string.length; i++) {
|
|
222
|
-
const code = string.codePointAt(i);
|
|
223
|
-
if (code <= 31 || code >= 127 && code <= 159) {
|
|
224
|
-
continue;
|
|
225
|
-
}
|
|
226
|
-
if (code >= 768 && code <= 879) {
|
|
227
|
-
continue;
|
|
228
|
-
}
|
|
229
|
-
if (code > 65535) {
|
|
230
|
-
i++;
|
|
231
|
-
}
|
|
232
|
-
width += isFullwidthCodePoint(code) ? 2 : 1;
|
|
233
|
-
}
|
|
234
|
-
return width;
|
|
235
|
-
};
|
|
236
|
-
module2.exports = stringWidth;
|
|
237
|
-
module2.exports.default = stringWidth;
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
var require_wrap_ansi = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
241
|
-
"../../node_modules/.pnpm/wrap-ansi@6.2.0/node_modules/wrap-ansi/index.js"(exports, module2) {
|
|
242
|
-
"use strict";
|
|
243
|
-
var stringWidth = require_string_width();
|
|
244
|
-
var stripAnsi = (0, import_chunk_6C7ESGWY.require_strip_ansi)();
|
|
245
|
-
var ansiStyles = (0, import_chunk_6C7ESGWY.require_ansi_styles)();
|
|
246
|
-
var ESCAPES = /* @__PURE__ */ new Set([
|
|
247
|
-
"\x1B",
|
|
248
|
-
"\x9B"
|
|
249
|
-
]);
|
|
250
|
-
var END_CODE = 39;
|
|
251
|
-
var wrapAnsi = (code) => `${ESCAPES.values().next().value}[${code}m`;
|
|
252
|
-
var wordLengths = (string) => string.split(" ").map((character) => stringWidth(character));
|
|
253
|
-
var wrapWord = (rows, word, columns) => {
|
|
254
|
-
const characters = [...word];
|
|
255
|
-
let isInsideEscape = false;
|
|
256
|
-
let visible = stringWidth(stripAnsi(rows[rows.length - 1]));
|
|
257
|
-
for (const [index, character] of characters.entries()) {
|
|
258
|
-
const characterLength = stringWidth(character);
|
|
259
|
-
if (visible + characterLength <= columns) {
|
|
260
|
-
rows[rows.length - 1] += character;
|
|
261
|
-
} else {
|
|
262
|
-
rows.push(character);
|
|
263
|
-
visible = 0;
|
|
264
|
-
}
|
|
265
|
-
if (ESCAPES.has(character)) {
|
|
266
|
-
isInsideEscape = true;
|
|
267
|
-
} else if (isInsideEscape && character === "m") {
|
|
268
|
-
isInsideEscape = false;
|
|
269
|
-
continue;
|
|
270
|
-
}
|
|
271
|
-
if (isInsideEscape) {
|
|
272
|
-
continue;
|
|
273
|
-
}
|
|
274
|
-
visible += characterLength;
|
|
275
|
-
if (visible === columns && index < characters.length - 1) {
|
|
276
|
-
rows.push("");
|
|
277
|
-
visible = 0;
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {
|
|
281
|
-
rows[rows.length - 2] += rows.pop();
|
|
282
|
-
}
|
|
283
|
-
};
|
|
284
|
-
var stringVisibleTrimSpacesRight = (str) => {
|
|
285
|
-
const words = str.split(" ");
|
|
286
|
-
let last = words.length;
|
|
287
|
-
while (last > 0) {
|
|
288
|
-
if (stringWidth(words[last - 1]) > 0) {
|
|
289
|
-
break;
|
|
290
|
-
}
|
|
291
|
-
last--;
|
|
292
|
-
}
|
|
293
|
-
if (last === words.length) {
|
|
294
|
-
return str;
|
|
295
|
-
}
|
|
296
|
-
return words.slice(0, last).join(" ") + words.slice(last).join("");
|
|
297
|
-
};
|
|
298
|
-
var exec = (string, columns, options = {}) => {
|
|
299
|
-
if (options.trim !== false && string.trim() === "") {
|
|
300
|
-
return "";
|
|
301
|
-
}
|
|
302
|
-
let pre = "";
|
|
303
|
-
let ret = "";
|
|
304
|
-
let escapeCode;
|
|
305
|
-
const lengths = wordLengths(string);
|
|
306
|
-
let rows = [""];
|
|
307
|
-
for (const [index, word] of string.split(" ").entries()) {
|
|
308
|
-
if (options.trim !== false) {
|
|
309
|
-
rows[rows.length - 1] = rows[rows.length - 1].trimLeft();
|
|
310
|
-
}
|
|
311
|
-
let rowLength = stringWidth(rows[rows.length - 1]);
|
|
312
|
-
if (index !== 0) {
|
|
313
|
-
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
|
|
314
|
-
rows.push("");
|
|
315
|
-
rowLength = 0;
|
|
316
|
-
}
|
|
317
|
-
if (rowLength > 0 || options.trim === false) {
|
|
318
|
-
rows[rows.length - 1] += " ";
|
|
319
|
-
rowLength++;
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
if (options.hard && lengths[index] > columns) {
|
|
323
|
-
const remainingColumns = columns - rowLength;
|
|
324
|
-
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
|
|
325
|
-
const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
|
|
326
|
-
if (breaksStartingNextLine < breaksStartingThisLine) {
|
|
327
|
-
rows.push("");
|
|
328
|
-
}
|
|
329
|
-
wrapWord(rows, word, columns);
|
|
330
|
-
continue;
|
|
331
|
-
}
|
|
332
|
-
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
|
|
333
|
-
if (options.wordWrap === false && rowLength < columns) {
|
|
334
|
-
wrapWord(rows, word, columns);
|
|
335
|
-
continue;
|
|
336
|
-
}
|
|
337
|
-
rows.push("");
|
|
338
|
-
}
|
|
339
|
-
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
|
|
340
|
-
wrapWord(rows, word, columns);
|
|
341
|
-
continue;
|
|
342
|
-
}
|
|
343
|
-
rows[rows.length - 1] += word;
|
|
344
|
-
}
|
|
345
|
-
if (options.trim !== false) {
|
|
346
|
-
rows = rows.map(stringVisibleTrimSpacesRight);
|
|
347
|
-
}
|
|
348
|
-
pre = rows.join("\n");
|
|
349
|
-
for (const [index, character] of [...pre].entries()) {
|
|
350
|
-
ret += character;
|
|
351
|
-
if (ESCAPES.has(character)) {
|
|
352
|
-
const code2 = parseFloat(/\d[^m]*/.exec(pre.slice(index, index + 4)));
|
|
353
|
-
escapeCode = code2 === END_CODE ? null : code2;
|
|
354
|
-
}
|
|
355
|
-
const code = ansiStyles.codes.get(Number(escapeCode));
|
|
356
|
-
if (escapeCode && code) {
|
|
357
|
-
if (pre[index + 1] === "\n") {
|
|
358
|
-
ret += wrapAnsi(code);
|
|
359
|
-
} else if (character === "\n") {
|
|
360
|
-
ret += wrapAnsi(escapeCode);
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
return ret;
|
|
365
|
-
};
|
|
366
|
-
module2.exports = (string, columns, options) => {
|
|
367
|
-
return String(string).normalize().replace(/\r\n/g, "\n").split("\n").map((line) => exec(line, columns, options)).join("\n");
|
|
368
|
-
};
|
|
369
|
-
}
|
|
370
|
-
});
|
|
371
|
-
var require_astral_regex = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
372
|
-
"../../node_modules/.pnpm/astral-regex@2.0.0/node_modules/astral-regex/index.js"(exports, module2) {
|
|
373
|
-
"use strict";
|
|
374
|
-
var regex = "[\uD800-\uDBFF][\uDC00-\uDFFF]";
|
|
375
|
-
var astralRegex = (options) => options && options.exact ? new RegExp(`^${regex}$`) : new RegExp(regex, "g");
|
|
376
|
-
module2.exports = astralRegex;
|
|
377
|
-
}
|
|
378
|
-
});
|
|
379
|
-
var require_slice_ansi = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
380
|
-
"../../node_modules/.pnpm/slice-ansi@4.0.0/node_modules/slice-ansi/index.js"(exports, module2) {
|
|
381
|
-
"use strict";
|
|
382
|
-
var isFullwidthCodePoint = require_is_fullwidth_code_point();
|
|
383
|
-
var astralRegex = require_astral_regex();
|
|
384
|
-
var ansiStyles = (0, import_chunk_6C7ESGWY.require_ansi_styles)();
|
|
385
|
-
var ESCAPES = [
|
|
386
|
-
"\x1B",
|
|
387
|
-
"\x9B"
|
|
388
|
-
];
|
|
389
|
-
var wrapAnsi = (code) => `${ESCAPES[0]}[${code}m`;
|
|
390
|
-
var checkAnsi = (ansiCodes, isEscapes, endAnsiCode) => {
|
|
391
|
-
let output = [];
|
|
392
|
-
ansiCodes = [...ansiCodes];
|
|
393
|
-
for (let ansiCode of ansiCodes) {
|
|
394
|
-
const ansiCodeOrigin = ansiCode;
|
|
395
|
-
if (ansiCode.includes(";")) {
|
|
396
|
-
ansiCode = ansiCode.split(";")[0][0] + "0";
|
|
397
|
-
}
|
|
398
|
-
const item = ansiStyles.codes.get(Number.parseInt(ansiCode, 10));
|
|
399
|
-
if (item) {
|
|
400
|
-
const indexEscape = ansiCodes.indexOf(item.toString());
|
|
401
|
-
if (indexEscape === -1) {
|
|
402
|
-
output.push(wrapAnsi(isEscapes ? item : ansiCodeOrigin));
|
|
403
|
-
} else {
|
|
404
|
-
ansiCodes.splice(indexEscape, 1);
|
|
405
|
-
}
|
|
406
|
-
} else if (isEscapes) {
|
|
407
|
-
output.push(wrapAnsi(0));
|
|
408
|
-
break;
|
|
409
|
-
} else {
|
|
410
|
-
output.push(wrapAnsi(ansiCodeOrigin));
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
if (isEscapes) {
|
|
414
|
-
output = output.filter((element, index) => output.indexOf(element) === index);
|
|
415
|
-
if (endAnsiCode !== void 0) {
|
|
416
|
-
const fistEscapeCode = wrapAnsi(ansiStyles.codes.get(Number.parseInt(endAnsiCode, 10)));
|
|
417
|
-
output = output.reduce((current, next) => next === fistEscapeCode ? [next, ...current] : [...current, next], []);
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
return output.join("");
|
|
421
|
-
};
|
|
422
|
-
module2.exports = (string, begin, end) => {
|
|
423
|
-
const characters = [...string];
|
|
424
|
-
const ansiCodes = [];
|
|
425
|
-
let stringEnd = typeof end === "number" ? end : characters.length;
|
|
426
|
-
let isInsideEscape = false;
|
|
427
|
-
let ansiCode;
|
|
428
|
-
let visible = 0;
|
|
429
|
-
let output = "";
|
|
430
|
-
for (const [index, character] of characters.entries()) {
|
|
431
|
-
let leftEscape = false;
|
|
432
|
-
if (ESCAPES.includes(character)) {
|
|
433
|
-
const code = /\d[^m]*/.exec(string.slice(index, index + 18));
|
|
434
|
-
ansiCode = code && code.length > 0 ? code[0] : void 0;
|
|
435
|
-
if (visible < stringEnd) {
|
|
436
|
-
isInsideEscape = true;
|
|
437
|
-
if (ansiCode !== void 0) {
|
|
438
|
-
ansiCodes.push(ansiCode);
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
} else if (isInsideEscape && character === "m") {
|
|
442
|
-
isInsideEscape = false;
|
|
443
|
-
leftEscape = true;
|
|
444
|
-
}
|
|
445
|
-
if (!isInsideEscape && !leftEscape) {
|
|
446
|
-
visible++;
|
|
447
|
-
}
|
|
448
|
-
if (!astralRegex({ exact: true }).test(character) && isFullwidthCodePoint(character.codePointAt())) {
|
|
449
|
-
visible++;
|
|
450
|
-
if (typeof end !== "number") {
|
|
451
|
-
stringEnd++;
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
if (visible > begin && visible <= stringEnd) {
|
|
455
|
-
output += character;
|
|
456
|
-
} else if (visible === begin && !isInsideEscape && ansiCode !== void 0) {
|
|
457
|
-
output = checkAnsi(ansiCodes);
|
|
458
|
-
} else if (visible >= stringEnd) {
|
|
459
|
-
output += checkAnsi(ansiCodes, true, ansiCode);
|
|
460
|
-
break;
|
|
461
|
-
}
|
|
462
|
-
}
|
|
463
|
-
return output;
|
|
464
|
-
};
|
|
465
|
-
}
|
|
466
|
-
});
|
|
467
|
-
var require_log_update = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
468
|
-
"../../node_modules/.pnpm/log-update@4.0.0/node_modules/log-update/index.js"(exports, module2) {
|
|
469
|
-
"use strict";
|
|
470
|
-
var ansiEscapes = require_ansi_escapes();
|
|
471
|
-
var cliCursor = (0, import_chunk_6C7ESGWY.require_cli_cursor)();
|
|
472
|
-
var wrapAnsi = require_wrap_ansi();
|
|
473
|
-
var sliceAnsi = require_slice_ansi();
|
|
474
|
-
var defaultTerminalHeight = 24;
|
|
475
|
-
var getWidth = (stream) => {
|
|
476
|
-
const { columns } = stream;
|
|
477
|
-
if (!columns) {
|
|
478
|
-
return 80;
|
|
479
|
-
}
|
|
480
|
-
return columns;
|
|
481
|
-
};
|
|
482
|
-
var fitToTerminalHeight = (stream, text) => {
|
|
483
|
-
const terminalHeight = stream.rows || defaultTerminalHeight;
|
|
484
|
-
const lines = text.split("\n");
|
|
485
|
-
const toRemove = lines.length - terminalHeight;
|
|
486
|
-
if (toRemove <= 0) {
|
|
487
|
-
return text;
|
|
488
|
-
}
|
|
489
|
-
return sliceAnsi(
|
|
490
|
-
text,
|
|
491
|
-
lines.slice(0, toRemove).join("\n").length + 1,
|
|
492
|
-
text.length
|
|
493
|
-
);
|
|
494
|
-
};
|
|
495
|
-
var main = (stream, { showCursor = false } = {}) => {
|
|
496
|
-
let previousLineCount = 0;
|
|
497
|
-
let previousWidth = getWidth(stream);
|
|
498
|
-
let previousOutput = "";
|
|
499
|
-
const render = (...args) => {
|
|
500
|
-
if (!showCursor) {
|
|
501
|
-
cliCursor.hide();
|
|
502
|
-
}
|
|
503
|
-
let output = args.join(" ") + "\n";
|
|
504
|
-
output = fitToTerminalHeight(stream, output);
|
|
505
|
-
const width = getWidth(stream);
|
|
506
|
-
if (output === previousOutput && previousWidth === width) {
|
|
507
|
-
return;
|
|
508
|
-
}
|
|
509
|
-
previousOutput = output;
|
|
510
|
-
previousWidth = width;
|
|
511
|
-
output = wrapAnsi(output, width, {
|
|
512
|
-
trim: false,
|
|
513
|
-
hard: true,
|
|
514
|
-
wordWrap: false
|
|
515
|
-
});
|
|
516
|
-
stream.write(ansiEscapes.eraseLines(previousLineCount) + output);
|
|
517
|
-
previousLineCount = output.split("\n").length;
|
|
518
|
-
};
|
|
519
|
-
render.clear = () => {
|
|
520
|
-
stream.write(ansiEscapes.eraseLines(previousLineCount));
|
|
521
|
-
previousOutput = "";
|
|
522
|
-
previousWidth = getWidth(stream);
|
|
523
|
-
previousLineCount = 0;
|
|
524
|
-
};
|
|
525
|
-
render.done = () => {
|
|
526
|
-
previousOutput = "";
|
|
527
|
-
previousWidth = getWidth(stream);
|
|
528
|
-
previousLineCount = 0;
|
|
529
|
-
if (!showCursor) {
|
|
530
|
-
cliCursor.show();
|
|
531
|
-
}
|
|
532
|
-
};
|
|
533
|
-
return render;
|
|
534
|
-
};
|
|
535
|
-
module2.exports = main(process.stdout);
|
|
536
|
-
module2.exports.stderr = main(process.stderr);
|
|
537
|
-
module2.exports.create = main;
|
|
538
|
-
}
|
|
539
|
-
});
|
|
540
|
-
var import_log_update = (0, import_chunk_WWAWV7DQ.__toESM)(require_log_update());
|
|
541
|
-
var packageJson = eval(`require('../package.json')`);
|
|
542
|
-
var Migrate = class {
|
|
543
|
-
constructor(schemaPath, enabledPreviewFeatures) {
|
|
544
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "engine");
|
|
545
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "schemaPath");
|
|
546
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "migrationsDirectoryPath");
|
|
547
|
-
if (schemaPath) {
|
|
548
|
-
this.schemaPath = import_path.default.resolve(process.cwd(), schemaPath);
|
|
549
|
-
this.migrationsDirectoryPath = import_path.default.join(import_path.default.dirname(this.schemaPath), "migrations");
|
|
550
|
-
this.engine = new import_chunk_ZOEKRXDP.SchemaEngine({
|
|
551
|
-
schemaPath: this.schemaPath,
|
|
552
|
-
enabledPreviewFeatures
|
|
553
|
-
});
|
|
554
|
-
} else {
|
|
555
|
-
this.engine = new import_chunk_ZOEKRXDP.SchemaEngine({
|
|
556
|
-
enabledPreviewFeatures
|
|
557
|
-
});
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
stop() {
|
|
561
|
-
this.engine.stop();
|
|
562
|
-
}
|
|
563
|
-
getPrismaSchema() {
|
|
564
|
-
if (!this.schemaPath) throw new Error("this.schemaPath is undefined");
|
|
565
|
-
return (0, import_internals.getSchemaWithPath)(this.schemaPath);
|
|
566
|
-
}
|
|
567
|
-
reset() {
|
|
568
|
-
return this.engine.reset();
|
|
569
|
-
}
|
|
570
|
-
createMigration(params) {
|
|
571
|
-
return this.engine.createMigration(params);
|
|
572
|
-
}
|
|
573
|
-
diagnoseMigrationHistory({
|
|
574
|
-
optInToShadowDatabase
|
|
575
|
-
}) {
|
|
576
|
-
if (!this.migrationsDirectoryPath) throw new Error("this.migrationsDirectoryPath is undefined");
|
|
577
|
-
return this.engine.diagnoseMigrationHistory({
|
|
578
|
-
migrationsDirectoryPath: this.migrationsDirectoryPath,
|
|
579
|
-
optInToShadowDatabase
|
|
580
|
-
});
|
|
581
|
-
}
|
|
582
|
-
listMigrationDirectories() {
|
|
583
|
-
if (!this.migrationsDirectoryPath) throw new Error("this.migrationsDirectoryPath is undefined");
|
|
584
|
-
return this.engine.listMigrationDirectories({
|
|
585
|
-
migrationsDirectoryPath: this.migrationsDirectoryPath
|
|
586
|
-
});
|
|
587
|
-
}
|
|
588
|
-
devDiagnostic() {
|
|
589
|
-
if (!this.migrationsDirectoryPath) throw new Error("this.migrationsDirectoryPath is undefined");
|
|
590
|
-
return this.engine.devDiagnostic({
|
|
591
|
-
migrationsDirectoryPath: this.migrationsDirectoryPath
|
|
592
|
-
});
|
|
593
|
-
}
|
|
594
|
-
async markMigrationApplied({ migrationId }) {
|
|
595
|
-
if (!this.migrationsDirectoryPath) throw new Error("this.migrationsDirectoryPath is undefined");
|
|
596
|
-
return await this.engine.markMigrationApplied({
|
|
597
|
-
migrationsDirectoryPath: this.migrationsDirectoryPath,
|
|
598
|
-
migrationName: migrationId
|
|
599
|
-
});
|
|
600
|
-
}
|
|
601
|
-
markMigrationRolledBack({ migrationId }) {
|
|
602
|
-
return this.engine.markMigrationRolledBack({
|
|
603
|
-
migrationName: migrationId
|
|
604
|
-
});
|
|
605
|
-
}
|
|
606
|
-
applyMigrations() {
|
|
607
|
-
if (!this.migrationsDirectoryPath) throw new Error("this.migrationsDirectoryPath is undefined");
|
|
608
|
-
return this.engine.applyMigrations({
|
|
609
|
-
migrationsDirectoryPath: this.migrationsDirectoryPath
|
|
610
|
-
});
|
|
611
|
-
}
|
|
612
|
-
async evaluateDataLoss() {
|
|
613
|
-
if (!this.migrationsDirectoryPath) throw new Error("this.migrationsDirectoryPath is undefined");
|
|
614
|
-
const schema = (0, import_internals.toSchemasContainer)((await this.getPrismaSchema()).schemas);
|
|
615
|
-
return this.engine.evaluateDataLoss({
|
|
616
|
-
migrationsDirectoryPath: this.migrationsDirectoryPath,
|
|
617
|
-
schema
|
|
618
|
-
});
|
|
619
|
-
}
|
|
620
|
-
async push({ force = false }) {
|
|
621
|
-
const schema = (0, import_internals.toSchemasContainer)((await this.getPrismaSchema()).schemas);
|
|
622
|
-
const { warnings, unexecutable, executedSteps } = await this.engine.schemaPush({
|
|
623
|
-
force,
|
|
624
|
-
schema
|
|
625
|
-
});
|
|
626
|
-
return {
|
|
627
|
-
executedSteps,
|
|
628
|
-
warnings,
|
|
629
|
-
unexecutable
|
|
630
|
-
};
|
|
631
|
-
}
|
|
632
|
-
async tryToRunGenerate(datasourceInfo) {
|
|
633
|
-
if (!this.schemaPath) throw new Error("this.schemaPath is undefined");
|
|
634
|
-
const skipEngines = (0, import_internals.isPrismaPostgres)(datasourceInfo.url);
|
|
635
|
-
const message = [];
|
|
636
|
-
process.stdout.write("\n");
|
|
637
|
-
(0, import_log_update.default)(`Running generate... ${(0, import_chunk_SKRR5WT4.dim)("(Use --skip-generate to skip the generators)")}`);
|
|
638
|
-
const generators = await (0, import_internals.getGenerators)({
|
|
639
|
-
schemaPath: this.schemaPath,
|
|
640
|
-
printDownloadProgress: true,
|
|
641
|
-
version: import_engines_version.enginesVersion,
|
|
642
|
-
cliVersion: packageJson.version,
|
|
643
|
-
noEngine: skipEngines
|
|
644
|
-
});
|
|
645
|
-
for (const generator of generators) {
|
|
646
|
-
(0, import_log_update.default)(`Running generate... - ${generator.getPrettyName()}`);
|
|
647
|
-
const before = Math.round(performance.now());
|
|
648
|
-
try {
|
|
649
|
-
await generator.generate();
|
|
650
|
-
const after = Math.round(performance.now());
|
|
651
|
-
message.push((0, import_internals.getGeneratorSuccessMessage)(generator, after - before));
|
|
652
|
-
generator.stop();
|
|
653
|
-
} catch (e) {
|
|
654
|
-
message.push(`${e.message}`);
|
|
655
|
-
generator.stop();
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
(0, import_log_update.default)(message.join("\n"));
|
|
659
|
-
}
|
|
660
|
-
};
|