@depup/vercel 50.32.5-depup.0
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/LICENSE +202 -0
- package/README.md +38 -0
- package/changes.json +38 -0
- package/dist/chunks/chunk-2DLBVZWU.js +197 -0
- package/dist/chunks/chunk-2HSQ7YUK.js +93 -0
- package/dist/chunks/chunk-2IQTNMUG.js +86 -0
- package/dist/chunks/chunk-3FRG2XGZ.js +466 -0
- package/dist/chunks/chunk-3KMKI2FP.js +34 -0
- package/dist/chunks/chunk-3XFFP2BA.js +110 -0
- package/dist/chunks/chunk-4S3Y3ATR.js +5383 -0
- package/dist/chunks/chunk-7EHTK7LP.js +359 -0
- package/dist/chunks/chunk-7YHZDJ4G.js +116 -0
- package/dist/chunks/chunk-A3NYPUKZ.js +17 -0
- package/dist/chunks/chunk-AA7QEJFB.js +5204 -0
- package/dist/chunks/chunk-AHU7WNL2.js +24 -0
- package/dist/chunks/chunk-AKQZ7KG3.js +4172 -0
- package/dist/chunks/chunk-AQLVWVEN.js +39155 -0
- package/dist/chunks/chunk-BQ3DXZNT.js +968 -0
- package/dist/chunks/chunk-E65JE2CC.js +102 -0
- package/dist/chunks/chunk-EKPSCRJZ.js +26 -0
- package/dist/chunks/chunk-EOZFDJSY.js +18 -0
- package/dist/chunks/chunk-FDJURQMQ.js +4676 -0
- package/dist/chunks/chunk-FLKHKWZV.js +1854 -0
- package/dist/chunks/chunk-G6BUEBF5.js +192 -0
- package/dist/chunks/chunk-GBNIO3KP.js +771 -0
- package/dist/chunks/chunk-GGP5R3FU.js +129 -0
- package/dist/chunks/chunk-H5XJSH37.js +91 -0
- package/dist/chunks/chunk-IB5L4LKZ.js +1082 -0
- package/dist/chunks/chunk-IE7MNZ56.js +149 -0
- package/dist/chunks/chunk-IK7DLK2T.js +16112 -0
- package/dist/chunks/chunk-IUGPWINM.js +104 -0
- package/dist/chunks/chunk-J7HDA5GH.js +54 -0
- package/dist/chunks/chunk-JLYZNGYY.js +293 -0
- package/dist/chunks/chunk-JQ4NA5MX.js +250 -0
- package/dist/chunks/chunk-LL26LVRR.js +81 -0
- package/dist/chunks/chunk-LW5ZNGW7.js +127 -0
- package/dist/chunks/chunk-LWBSOTJP.js +1772 -0
- package/dist/chunks/chunk-MBGJBHYD.js +388 -0
- package/dist/chunks/chunk-NUKAG3YM.js +168 -0
- package/dist/chunks/chunk-O7I4ZOCC.js +58 -0
- package/dist/chunks/chunk-OWR3XNE3.js +48 -0
- package/dist/chunks/chunk-P3SKP5WM.js +27 -0
- package/dist/chunks/chunk-P4I4DMEU.js +342 -0
- package/dist/chunks/chunk-P5Q6F5IA.js +107 -0
- package/dist/chunks/chunk-PMSMUMUO.js +30 -0
- package/dist/chunks/chunk-QXRJ52T4.js +2977 -0
- package/dist/chunks/chunk-RQXPRFRM.js +90 -0
- package/dist/chunks/chunk-S7KYDPEM.js +1564 -0
- package/dist/chunks/chunk-SGGLJFUZ.js +68 -0
- package/dist/chunks/chunk-SOTR4CXR.js +34 -0
- package/dist/chunks/chunk-TEVP63TU.js +1717 -0
- package/dist/chunks/chunk-TNBMKNET.js +323 -0
- package/dist/chunks/chunk-TZ2YI2VH.js +87 -0
- package/dist/chunks/chunk-U6XOC6E4.js +903 -0
- package/dist/chunks/chunk-V5P25P7F.js +22 -0
- package/dist/chunks/chunk-WQ5CUZWR.js +333 -0
- package/dist/chunks/chunk-WU2BPWRP.js +12237 -0
- package/dist/chunks/chunk-XPKWKPWA.js +44 -0
- package/dist/chunks/chunk-XR53KVJD.js +33 -0
- package/dist/chunks/chunk-Y4JJYHUG.js +16 -0
- package/dist/chunks/chunk-YPQSDAEW.js +29 -0
- package/dist/chunks/chunk-ZB2UO4V2.js +135 -0
- package/dist/chunks/chunk-ZLCMHY2G.js +1528 -0
- package/dist/chunks/compile-vercel-config-XU3YY2CZ.js +32 -0
- package/dist/chunks/delete-EJ2V7KQO.js +144 -0
- package/dist/chunks/disable-BKRFMX4U.js +122 -0
- package/dist/chunks/discard-4WF34DXK.js +118 -0
- package/dist/chunks/edit-FQE7JGU3.js +509 -0
- package/dist/chunks/emit-flags-datafiles-QYKPNWPX.js +17 -0
- package/dist/chunks/enable-VCNMX63U.js +122 -0
- package/dist/chunks/export-3KNVJCQR.js +133 -0
- package/dist/chunks/list-43XQCGKH.js +382 -0
- package/dist/chunks/list-DUL6PHUR.js +394 -0
- package/dist/chunks/publish-CF7GVZK3.js +128 -0
- package/dist/chunks/query-KWKO7VWO.js +954 -0
- package/dist/chunks/reorder-GU65YMIN.js +259 -0
- package/dist/chunks/restore-Q7ENGWVJ.js +158 -0
- package/dist/chunks/routes-Q5CWG44T.js +20 -0
- package/dist/chunks/schema-PJKLO2K2.js +176 -0
- package/dist/chunks/stamp-RTPE2EBB.js +15 -0
- package/dist/chunks/types-563KUQRV.js +108 -0
- package/dist/chunks/update-route-version-E3V47KNI.js +13 -0
- package/dist/commands/build/index.js +1597 -0
- package/dist/commands/deploy/index.js +1711 -0
- package/dist/commands/dev/builder-worker.cjs +95 -0
- package/dist/commands/dev/index.js +20810 -0
- package/dist/commands/env/index.js +2154 -0
- package/dist/commands/link/index.js +225 -0
- package/dist/commands/list/index.js +528 -0
- package/dist/commands-bulk.js +29627 -0
- package/dist/get-latest-worker.cjs +272 -0
- package/dist/help.js +14 -0
- package/dist/index.js +24274 -0
- package/dist/vc.js +36 -0
- package/dist/version.mjs +1 -0
- package/package.json +254 -0
|
@@ -0,0 +1,1772 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __dirname_(__filename);
|
|
7
|
+
import {
|
|
8
|
+
require_string_width
|
|
9
|
+
} from "./chunk-ZLCMHY2G.js";
|
|
10
|
+
import {
|
|
11
|
+
__commonJS,
|
|
12
|
+
__require,
|
|
13
|
+
__toESM
|
|
14
|
+
} from "./chunk-TZ2YI2VH.js";
|
|
15
|
+
|
|
16
|
+
// ../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/debug.js
|
|
17
|
+
var require_debug = __commonJS({
|
|
18
|
+
"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/debug.js"(exports, module) {
|
|
19
|
+
var messages = [];
|
|
20
|
+
var level = 0;
|
|
21
|
+
var debug = (msg, min) => {
|
|
22
|
+
if (level >= min) {
|
|
23
|
+
messages.push(msg);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
debug.WARN = 1;
|
|
27
|
+
debug.INFO = 2;
|
|
28
|
+
debug.DEBUG = 3;
|
|
29
|
+
debug.reset = () => {
|
|
30
|
+
messages = [];
|
|
31
|
+
};
|
|
32
|
+
debug.setDebugLevel = (v) => {
|
|
33
|
+
level = v;
|
|
34
|
+
};
|
|
35
|
+
debug.warn = (msg) => debug(msg, debug.WARN);
|
|
36
|
+
debug.info = (msg) => debug(msg, debug.INFO);
|
|
37
|
+
debug.debug = (msg) => debug(msg, debug.DEBUG);
|
|
38
|
+
debug.debugMessages = () => messages;
|
|
39
|
+
module.exports = debug;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// ../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/utils.js
|
|
44
|
+
var require_utils = __commonJS({
|
|
45
|
+
"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/utils.js"(exports, module) {
|
|
46
|
+
var stringWidth = require_string_width();
|
|
47
|
+
function codeRegex(capture) {
|
|
48
|
+
return capture ? /\u001b\[((?:\d*;){0,5}\d*)m/g : /\u001b\[(?:\d*;){0,5}\d*m/g;
|
|
49
|
+
}
|
|
50
|
+
function strlen(str) {
|
|
51
|
+
let code = codeRegex();
|
|
52
|
+
let stripped = ("" + str).replace(code, "");
|
|
53
|
+
let split = stripped.split("\n");
|
|
54
|
+
return split.reduce(function(memo, s) {
|
|
55
|
+
return stringWidth(s) > memo ? stringWidth(s) : memo;
|
|
56
|
+
}, 0);
|
|
57
|
+
}
|
|
58
|
+
function repeat(str, times) {
|
|
59
|
+
return Array(times + 1).join(str);
|
|
60
|
+
}
|
|
61
|
+
function pad(str, len, pad2, dir) {
|
|
62
|
+
let length = strlen(str);
|
|
63
|
+
if (len + 1 >= length) {
|
|
64
|
+
let padlen = len - length;
|
|
65
|
+
switch (dir) {
|
|
66
|
+
case "right": {
|
|
67
|
+
str = repeat(pad2, padlen) + str;
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
case "center": {
|
|
71
|
+
let right = Math.ceil(padlen / 2);
|
|
72
|
+
let left = padlen - right;
|
|
73
|
+
str = repeat(pad2, left) + str + repeat(pad2, right);
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
default: {
|
|
77
|
+
str = str + repeat(pad2, padlen);
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return str;
|
|
83
|
+
}
|
|
84
|
+
var codeCache = {};
|
|
85
|
+
function addToCodeCache(name, on, off) {
|
|
86
|
+
on = "\x1B[" + on + "m";
|
|
87
|
+
off = "\x1B[" + off + "m";
|
|
88
|
+
codeCache[on] = { set: name, to: true };
|
|
89
|
+
codeCache[off] = { set: name, to: false };
|
|
90
|
+
codeCache[name] = { on, off };
|
|
91
|
+
}
|
|
92
|
+
addToCodeCache("bold", 1, 22);
|
|
93
|
+
addToCodeCache("italics", 3, 23);
|
|
94
|
+
addToCodeCache("underline", 4, 24);
|
|
95
|
+
addToCodeCache("inverse", 7, 27);
|
|
96
|
+
addToCodeCache("strikethrough", 9, 29);
|
|
97
|
+
function updateState(state, controlChars) {
|
|
98
|
+
let controlCode = controlChars[1] ? parseInt(controlChars[1].split(";")[0]) : 0;
|
|
99
|
+
if (controlCode >= 30 && controlCode <= 39 || controlCode >= 90 && controlCode <= 97) {
|
|
100
|
+
state.lastForegroundAdded = controlChars[0];
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (controlCode >= 40 && controlCode <= 49 || controlCode >= 100 && controlCode <= 107) {
|
|
104
|
+
state.lastBackgroundAdded = controlChars[0];
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (controlCode === 0) {
|
|
108
|
+
for (let i in state) {
|
|
109
|
+
if (Object.prototype.hasOwnProperty.call(state, i)) {
|
|
110
|
+
delete state[i];
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
let info = codeCache[controlChars[0]];
|
|
116
|
+
if (info) {
|
|
117
|
+
state[info.set] = info.to;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
function readState(line) {
|
|
121
|
+
let code = codeRegex(true);
|
|
122
|
+
let controlChars = code.exec(line);
|
|
123
|
+
let state = {};
|
|
124
|
+
while (controlChars !== null) {
|
|
125
|
+
updateState(state, controlChars);
|
|
126
|
+
controlChars = code.exec(line);
|
|
127
|
+
}
|
|
128
|
+
return state;
|
|
129
|
+
}
|
|
130
|
+
function unwindState(state, ret) {
|
|
131
|
+
let lastBackgroundAdded = state.lastBackgroundAdded;
|
|
132
|
+
let lastForegroundAdded = state.lastForegroundAdded;
|
|
133
|
+
delete state.lastBackgroundAdded;
|
|
134
|
+
delete state.lastForegroundAdded;
|
|
135
|
+
Object.keys(state).forEach(function(key) {
|
|
136
|
+
if (state[key]) {
|
|
137
|
+
ret += codeCache[key].off;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") {
|
|
141
|
+
ret += "\x1B[49m";
|
|
142
|
+
}
|
|
143
|
+
if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") {
|
|
144
|
+
ret += "\x1B[39m";
|
|
145
|
+
}
|
|
146
|
+
return ret;
|
|
147
|
+
}
|
|
148
|
+
function rewindState(state, ret) {
|
|
149
|
+
let lastBackgroundAdded = state.lastBackgroundAdded;
|
|
150
|
+
let lastForegroundAdded = state.lastForegroundAdded;
|
|
151
|
+
delete state.lastBackgroundAdded;
|
|
152
|
+
delete state.lastForegroundAdded;
|
|
153
|
+
Object.keys(state).forEach(function(key) {
|
|
154
|
+
if (state[key]) {
|
|
155
|
+
ret = codeCache[key].on + ret;
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
if (lastBackgroundAdded && lastBackgroundAdded != "\x1B[49m") {
|
|
159
|
+
ret = lastBackgroundAdded + ret;
|
|
160
|
+
}
|
|
161
|
+
if (lastForegroundAdded && lastForegroundAdded != "\x1B[39m") {
|
|
162
|
+
ret = lastForegroundAdded + ret;
|
|
163
|
+
}
|
|
164
|
+
return ret;
|
|
165
|
+
}
|
|
166
|
+
function truncateWidth(str, desiredLength) {
|
|
167
|
+
if (str.length === strlen(str)) {
|
|
168
|
+
return str.substr(0, desiredLength);
|
|
169
|
+
}
|
|
170
|
+
while (strlen(str) > desiredLength) {
|
|
171
|
+
str = str.slice(0, -1);
|
|
172
|
+
}
|
|
173
|
+
return str;
|
|
174
|
+
}
|
|
175
|
+
function truncateWidthWithAnsi(str, desiredLength) {
|
|
176
|
+
let code = codeRegex(true);
|
|
177
|
+
let split = str.split(codeRegex());
|
|
178
|
+
let splitIndex = 0;
|
|
179
|
+
let retLen = 0;
|
|
180
|
+
let ret = "";
|
|
181
|
+
let myArray;
|
|
182
|
+
let state = {};
|
|
183
|
+
while (retLen < desiredLength) {
|
|
184
|
+
myArray = code.exec(str);
|
|
185
|
+
let toAdd = split[splitIndex];
|
|
186
|
+
splitIndex++;
|
|
187
|
+
if (retLen + strlen(toAdd) > desiredLength) {
|
|
188
|
+
toAdd = truncateWidth(toAdd, desiredLength - retLen);
|
|
189
|
+
}
|
|
190
|
+
ret += toAdd;
|
|
191
|
+
retLen += strlen(toAdd);
|
|
192
|
+
if (retLen < desiredLength) {
|
|
193
|
+
if (!myArray) {
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
ret += myArray[0];
|
|
197
|
+
updateState(state, myArray);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return unwindState(state, ret);
|
|
201
|
+
}
|
|
202
|
+
function truncate(str, desiredLength, truncateChar) {
|
|
203
|
+
truncateChar = truncateChar || "\u2026";
|
|
204
|
+
let lengthOfStr = strlen(str);
|
|
205
|
+
if (lengthOfStr <= desiredLength) {
|
|
206
|
+
return str;
|
|
207
|
+
}
|
|
208
|
+
desiredLength -= strlen(truncateChar);
|
|
209
|
+
let ret = truncateWidthWithAnsi(str, desiredLength);
|
|
210
|
+
return ret + truncateChar;
|
|
211
|
+
}
|
|
212
|
+
function defaultOptions() {
|
|
213
|
+
return {
|
|
214
|
+
chars: {
|
|
215
|
+
top: "\u2500",
|
|
216
|
+
"top-mid": "\u252C",
|
|
217
|
+
"top-left": "\u250C",
|
|
218
|
+
"top-right": "\u2510",
|
|
219
|
+
bottom: "\u2500",
|
|
220
|
+
"bottom-mid": "\u2534",
|
|
221
|
+
"bottom-left": "\u2514",
|
|
222
|
+
"bottom-right": "\u2518",
|
|
223
|
+
left: "\u2502",
|
|
224
|
+
"left-mid": "\u251C",
|
|
225
|
+
mid: "\u2500",
|
|
226
|
+
"mid-mid": "\u253C",
|
|
227
|
+
right: "\u2502",
|
|
228
|
+
"right-mid": "\u2524",
|
|
229
|
+
middle: "\u2502"
|
|
230
|
+
},
|
|
231
|
+
truncate: "\u2026",
|
|
232
|
+
colWidths: [],
|
|
233
|
+
rowHeights: [],
|
|
234
|
+
colAligns: [],
|
|
235
|
+
rowAligns: [],
|
|
236
|
+
style: {
|
|
237
|
+
"padding-left": 1,
|
|
238
|
+
"padding-right": 1,
|
|
239
|
+
head: ["red"],
|
|
240
|
+
border: ["grey"],
|
|
241
|
+
compact: false
|
|
242
|
+
},
|
|
243
|
+
head: []
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
function mergeOptions(options, defaults) {
|
|
247
|
+
options = options || {};
|
|
248
|
+
defaults = defaults || defaultOptions();
|
|
249
|
+
let ret = Object.assign({}, defaults, options);
|
|
250
|
+
ret.chars = Object.assign({}, defaults.chars, options.chars);
|
|
251
|
+
ret.style = Object.assign({}, defaults.style, options.style);
|
|
252
|
+
return ret;
|
|
253
|
+
}
|
|
254
|
+
function wordWrap(maxLength, input) {
|
|
255
|
+
let lines = [];
|
|
256
|
+
let split = input.split(/(\s+)/g);
|
|
257
|
+
let line = [];
|
|
258
|
+
let lineLength = 0;
|
|
259
|
+
let whitespace;
|
|
260
|
+
for (let i = 0; i < split.length; i += 2) {
|
|
261
|
+
let word = split[i];
|
|
262
|
+
let newLength = lineLength + strlen(word);
|
|
263
|
+
if (lineLength > 0 && whitespace) {
|
|
264
|
+
newLength += whitespace.length;
|
|
265
|
+
}
|
|
266
|
+
if (newLength > maxLength) {
|
|
267
|
+
if (lineLength !== 0) {
|
|
268
|
+
lines.push(line.join(""));
|
|
269
|
+
}
|
|
270
|
+
line = [word];
|
|
271
|
+
lineLength = strlen(word);
|
|
272
|
+
} else {
|
|
273
|
+
line.push(whitespace || "", word);
|
|
274
|
+
lineLength = newLength;
|
|
275
|
+
}
|
|
276
|
+
whitespace = split[i + 1];
|
|
277
|
+
}
|
|
278
|
+
if (lineLength) {
|
|
279
|
+
lines.push(line.join(""));
|
|
280
|
+
}
|
|
281
|
+
return lines;
|
|
282
|
+
}
|
|
283
|
+
function textWrap(maxLength, input) {
|
|
284
|
+
let lines = [];
|
|
285
|
+
let line = "";
|
|
286
|
+
function pushLine(str, ws) {
|
|
287
|
+
if (line.length && ws)
|
|
288
|
+
line += ws;
|
|
289
|
+
line += str;
|
|
290
|
+
while (line.length > maxLength) {
|
|
291
|
+
lines.push(line.slice(0, maxLength));
|
|
292
|
+
line = line.slice(maxLength);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
let split = input.split(/(\s+)/g);
|
|
296
|
+
for (let i = 0; i < split.length; i += 2) {
|
|
297
|
+
pushLine(split[i], i && split[i - 1]);
|
|
298
|
+
}
|
|
299
|
+
if (line.length)
|
|
300
|
+
lines.push(line);
|
|
301
|
+
return lines;
|
|
302
|
+
}
|
|
303
|
+
function multiLineWordWrap(maxLength, input, wrapOnWordBoundary = true) {
|
|
304
|
+
let output = [];
|
|
305
|
+
input = input.split("\n");
|
|
306
|
+
const handler = wrapOnWordBoundary ? wordWrap : textWrap;
|
|
307
|
+
for (let i = 0; i < input.length; i++) {
|
|
308
|
+
output.push.apply(output, handler(maxLength, input[i]));
|
|
309
|
+
}
|
|
310
|
+
return output;
|
|
311
|
+
}
|
|
312
|
+
function colorizeLines(input) {
|
|
313
|
+
let state = {};
|
|
314
|
+
let output = [];
|
|
315
|
+
for (let i = 0; i < input.length; i++) {
|
|
316
|
+
let line = rewindState(state, input[i]);
|
|
317
|
+
state = readState(line);
|
|
318
|
+
let temp = Object.assign({}, state);
|
|
319
|
+
output.push(unwindState(temp, line));
|
|
320
|
+
}
|
|
321
|
+
return output;
|
|
322
|
+
}
|
|
323
|
+
function hyperlink(url, text) {
|
|
324
|
+
const OSC = "\x1B]";
|
|
325
|
+
const BEL = "\x07";
|
|
326
|
+
const SEP = ";";
|
|
327
|
+
return [OSC, "8", SEP, SEP, url || text, BEL, text, OSC, "8", SEP, SEP, BEL].join("");
|
|
328
|
+
}
|
|
329
|
+
module.exports = {
|
|
330
|
+
strlen,
|
|
331
|
+
repeat,
|
|
332
|
+
pad,
|
|
333
|
+
truncate,
|
|
334
|
+
mergeOptions,
|
|
335
|
+
wordWrap: multiLineWordWrap,
|
|
336
|
+
colorizeLines,
|
|
337
|
+
hyperlink
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/styles.js
|
|
343
|
+
var require_styles = __commonJS({
|
|
344
|
+
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/styles.js"(exports, module) {
|
|
345
|
+
var styles = {};
|
|
346
|
+
module["exports"] = styles;
|
|
347
|
+
var codes = {
|
|
348
|
+
reset: [0, 0],
|
|
349
|
+
bold: [1, 22],
|
|
350
|
+
dim: [2, 22],
|
|
351
|
+
italic: [3, 23],
|
|
352
|
+
underline: [4, 24],
|
|
353
|
+
inverse: [7, 27],
|
|
354
|
+
hidden: [8, 28],
|
|
355
|
+
strikethrough: [9, 29],
|
|
356
|
+
black: [30, 39],
|
|
357
|
+
red: [31, 39],
|
|
358
|
+
green: [32, 39],
|
|
359
|
+
yellow: [33, 39],
|
|
360
|
+
blue: [34, 39],
|
|
361
|
+
magenta: [35, 39],
|
|
362
|
+
cyan: [36, 39],
|
|
363
|
+
white: [37, 39],
|
|
364
|
+
gray: [90, 39],
|
|
365
|
+
grey: [90, 39],
|
|
366
|
+
brightRed: [91, 39],
|
|
367
|
+
brightGreen: [92, 39],
|
|
368
|
+
brightYellow: [93, 39],
|
|
369
|
+
brightBlue: [94, 39],
|
|
370
|
+
brightMagenta: [95, 39],
|
|
371
|
+
brightCyan: [96, 39],
|
|
372
|
+
brightWhite: [97, 39],
|
|
373
|
+
bgBlack: [40, 49],
|
|
374
|
+
bgRed: [41, 49],
|
|
375
|
+
bgGreen: [42, 49],
|
|
376
|
+
bgYellow: [43, 49],
|
|
377
|
+
bgBlue: [44, 49],
|
|
378
|
+
bgMagenta: [45, 49],
|
|
379
|
+
bgCyan: [46, 49],
|
|
380
|
+
bgWhite: [47, 49],
|
|
381
|
+
bgGray: [100, 49],
|
|
382
|
+
bgGrey: [100, 49],
|
|
383
|
+
bgBrightRed: [101, 49],
|
|
384
|
+
bgBrightGreen: [102, 49],
|
|
385
|
+
bgBrightYellow: [103, 49],
|
|
386
|
+
bgBrightBlue: [104, 49],
|
|
387
|
+
bgBrightMagenta: [105, 49],
|
|
388
|
+
bgBrightCyan: [106, 49],
|
|
389
|
+
bgBrightWhite: [107, 49],
|
|
390
|
+
// legacy styles for colors pre v1.0.0
|
|
391
|
+
blackBG: [40, 49],
|
|
392
|
+
redBG: [41, 49],
|
|
393
|
+
greenBG: [42, 49],
|
|
394
|
+
yellowBG: [43, 49],
|
|
395
|
+
blueBG: [44, 49],
|
|
396
|
+
magentaBG: [45, 49],
|
|
397
|
+
cyanBG: [46, 49],
|
|
398
|
+
whiteBG: [47, 49]
|
|
399
|
+
};
|
|
400
|
+
Object.keys(codes).forEach(function(key) {
|
|
401
|
+
var val = codes[key];
|
|
402
|
+
var style = styles[key] = [];
|
|
403
|
+
style.open = "\x1B[" + val[0] + "m";
|
|
404
|
+
style.close = "\x1B[" + val[1] + "m";
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
|
|
409
|
+
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/has-flag.js
|
|
410
|
+
var require_has_flag = __commonJS({
|
|
411
|
+
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/has-flag.js"(exports, module) {
|
|
412
|
+
"use strict";
|
|
413
|
+
module.exports = function(flag, argv) {
|
|
414
|
+
argv = argv || process.argv;
|
|
415
|
+
var terminatorPos = argv.indexOf("--");
|
|
416
|
+
var prefix = /^-{1,2}/.test(flag) ? "" : "--";
|
|
417
|
+
var pos = argv.indexOf(prefix + flag);
|
|
418
|
+
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/supports-colors.js
|
|
424
|
+
var require_supports_colors = __commonJS({
|
|
425
|
+
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/system/supports-colors.js"(exports, module) {
|
|
426
|
+
"use strict";
|
|
427
|
+
var os = __require("os");
|
|
428
|
+
var hasFlag = require_has_flag();
|
|
429
|
+
var env = process.env;
|
|
430
|
+
var forceColor = void 0;
|
|
431
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false")) {
|
|
432
|
+
forceColor = false;
|
|
433
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
434
|
+
forceColor = true;
|
|
435
|
+
}
|
|
436
|
+
if ("FORCE_COLOR" in env) {
|
|
437
|
+
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
438
|
+
}
|
|
439
|
+
function translateLevel(level) {
|
|
440
|
+
if (level === 0) {
|
|
441
|
+
return false;
|
|
442
|
+
}
|
|
443
|
+
return {
|
|
444
|
+
level,
|
|
445
|
+
hasBasic: true,
|
|
446
|
+
has256: level >= 2,
|
|
447
|
+
has16m: level >= 3
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
function supportsColor(stream) {
|
|
451
|
+
if (forceColor === false) {
|
|
452
|
+
return 0;
|
|
453
|
+
}
|
|
454
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
455
|
+
return 3;
|
|
456
|
+
}
|
|
457
|
+
if (hasFlag("color=256")) {
|
|
458
|
+
return 2;
|
|
459
|
+
}
|
|
460
|
+
if (stream && !stream.isTTY && forceColor !== true) {
|
|
461
|
+
return 0;
|
|
462
|
+
}
|
|
463
|
+
var min = forceColor ? 1 : 0;
|
|
464
|
+
if (process.platform === "win32") {
|
|
465
|
+
var osRelease = os.release().split(".");
|
|
466
|
+
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
467
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
468
|
+
}
|
|
469
|
+
return 1;
|
|
470
|
+
}
|
|
471
|
+
if ("CI" in env) {
|
|
472
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some(function(sign) {
|
|
473
|
+
return sign in env;
|
|
474
|
+
}) || env.CI_NAME === "codeship") {
|
|
475
|
+
return 1;
|
|
476
|
+
}
|
|
477
|
+
return min;
|
|
478
|
+
}
|
|
479
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
480
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
481
|
+
}
|
|
482
|
+
if ("TERM_PROGRAM" in env) {
|
|
483
|
+
var version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
484
|
+
switch (env.TERM_PROGRAM) {
|
|
485
|
+
case "iTerm.app":
|
|
486
|
+
return version >= 3 ? 3 : 2;
|
|
487
|
+
case "Hyper":
|
|
488
|
+
return 3;
|
|
489
|
+
case "Apple_Terminal":
|
|
490
|
+
return 2;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
494
|
+
return 2;
|
|
495
|
+
}
|
|
496
|
+
if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
497
|
+
return 1;
|
|
498
|
+
}
|
|
499
|
+
if ("COLORTERM" in env) {
|
|
500
|
+
return 1;
|
|
501
|
+
}
|
|
502
|
+
if (env.TERM === "dumb") {
|
|
503
|
+
return min;
|
|
504
|
+
}
|
|
505
|
+
return min;
|
|
506
|
+
}
|
|
507
|
+
function getSupportLevel(stream) {
|
|
508
|
+
var level = supportsColor(stream);
|
|
509
|
+
return translateLevel(level);
|
|
510
|
+
}
|
|
511
|
+
module.exports = {
|
|
512
|
+
supportsColor: getSupportLevel,
|
|
513
|
+
stdout: getSupportLevel(process.stdout),
|
|
514
|
+
stderr: getSupportLevel(process.stderr)
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
|
|
519
|
+
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/trap.js
|
|
520
|
+
var require_trap = __commonJS({
|
|
521
|
+
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/trap.js"(exports, module) {
|
|
522
|
+
module["exports"] = function runTheTrap(text, options) {
|
|
523
|
+
var result = "";
|
|
524
|
+
text = text || "Run the trap, drop the bass";
|
|
525
|
+
text = text.split("");
|
|
526
|
+
var trap = {
|
|
527
|
+
a: ["@", "\u0104", "\u023A", "\u0245", "\u0394", "\u039B", "\u0414"],
|
|
528
|
+
b: ["\xDF", "\u0181", "\u0243", "\u026E", "\u03B2", "\u0E3F"],
|
|
529
|
+
c: ["\xA9", "\u023B", "\u03FE"],
|
|
530
|
+
d: ["\xD0", "\u018A", "\u0500", "\u0501", "\u0502", "\u0503"],
|
|
531
|
+
e: [
|
|
532
|
+
"\xCB",
|
|
533
|
+
"\u0115",
|
|
534
|
+
"\u018E",
|
|
535
|
+
"\u0258",
|
|
536
|
+
"\u03A3",
|
|
537
|
+
"\u03BE",
|
|
538
|
+
"\u04BC",
|
|
539
|
+
"\u0A6C"
|
|
540
|
+
],
|
|
541
|
+
f: ["\u04FA"],
|
|
542
|
+
g: ["\u0262"],
|
|
543
|
+
h: ["\u0126", "\u0195", "\u04A2", "\u04BA", "\u04C7", "\u050A"],
|
|
544
|
+
i: ["\u0F0F"],
|
|
545
|
+
j: ["\u0134"],
|
|
546
|
+
k: ["\u0138", "\u04A0", "\u04C3", "\u051E"],
|
|
547
|
+
l: ["\u0139"],
|
|
548
|
+
m: ["\u028D", "\u04CD", "\u04CE", "\u0520", "\u0521", "\u0D69"],
|
|
549
|
+
n: ["\xD1", "\u014B", "\u019D", "\u0376", "\u03A0", "\u048A"],
|
|
550
|
+
o: [
|
|
551
|
+
"\xD8",
|
|
552
|
+
"\xF5",
|
|
553
|
+
"\xF8",
|
|
554
|
+
"\u01FE",
|
|
555
|
+
"\u0298",
|
|
556
|
+
"\u047A",
|
|
557
|
+
"\u05DD",
|
|
558
|
+
"\u06DD",
|
|
559
|
+
"\u0E4F"
|
|
560
|
+
],
|
|
561
|
+
p: ["\u01F7", "\u048E"],
|
|
562
|
+
q: ["\u09CD"],
|
|
563
|
+
r: ["\xAE", "\u01A6", "\u0210", "\u024C", "\u0280", "\u042F"],
|
|
564
|
+
s: ["\xA7", "\u03DE", "\u03DF", "\u03E8"],
|
|
565
|
+
t: ["\u0141", "\u0166", "\u0373"],
|
|
566
|
+
u: ["\u01B1", "\u054D"],
|
|
567
|
+
v: ["\u05D8"],
|
|
568
|
+
w: ["\u0428", "\u0460", "\u047C", "\u0D70"],
|
|
569
|
+
x: ["\u04B2", "\u04FE", "\u04FC", "\u04FD"],
|
|
570
|
+
y: ["\xA5", "\u04B0", "\u04CB"],
|
|
571
|
+
z: ["\u01B5", "\u0240"]
|
|
572
|
+
};
|
|
573
|
+
text.forEach(function(c) {
|
|
574
|
+
c = c.toLowerCase();
|
|
575
|
+
var chars = trap[c] || [" "];
|
|
576
|
+
var rand = Math.floor(Math.random() * chars.length);
|
|
577
|
+
if (typeof trap[c] !== "undefined") {
|
|
578
|
+
result += trap[c][rand];
|
|
579
|
+
} else {
|
|
580
|
+
result += c;
|
|
581
|
+
}
|
|
582
|
+
});
|
|
583
|
+
return result;
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
});
|
|
587
|
+
|
|
588
|
+
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/zalgo.js
|
|
589
|
+
var require_zalgo = __commonJS({
|
|
590
|
+
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/custom/zalgo.js"(exports, module) {
|
|
591
|
+
module["exports"] = function zalgo(text, options) {
|
|
592
|
+
text = text || " he is here ";
|
|
593
|
+
var soul = {
|
|
594
|
+
"up": [
|
|
595
|
+
"\u030D",
|
|
596
|
+
"\u030E",
|
|
597
|
+
"\u0304",
|
|
598
|
+
"\u0305",
|
|
599
|
+
"\u033F",
|
|
600
|
+
"\u0311",
|
|
601
|
+
"\u0306",
|
|
602
|
+
"\u0310",
|
|
603
|
+
"\u0352",
|
|
604
|
+
"\u0357",
|
|
605
|
+
"\u0351",
|
|
606
|
+
"\u0307",
|
|
607
|
+
"\u0308",
|
|
608
|
+
"\u030A",
|
|
609
|
+
"\u0342",
|
|
610
|
+
"\u0313",
|
|
611
|
+
"\u0308",
|
|
612
|
+
"\u034A",
|
|
613
|
+
"\u034B",
|
|
614
|
+
"\u034C",
|
|
615
|
+
"\u0303",
|
|
616
|
+
"\u0302",
|
|
617
|
+
"\u030C",
|
|
618
|
+
"\u0350",
|
|
619
|
+
"\u0300",
|
|
620
|
+
"\u0301",
|
|
621
|
+
"\u030B",
|
|
622
|
+
"\u030F",
|
|
623
|
+
"\u0312",
|
|
624
|
+
"\u0313",
|
|
625
|
+
"\u0314",
|
|
626
|
+
"\u033D",
|
|
627
|
+
"\u0309",
|
|
628
|
+
"\u0363",
|
|
629
|
+
"\u0364",
|
|
630
|
+
"\u0365",
|
|
631
|
+
"\u0366",
|
|
632
|
+
"\u0367",
|
|
633
|
+
"\u0368",
|
|
634
|
+
"\u0369",
|
|
635
|
+
"\u036A",
|
|
636
|
+
"\u036B",
|
|
637
|
+
"\u036C",
|
|
638
|
+
"\u036D",
|
|
639
|
+
"\u036E",
|
|
640
|
+
"\u036F",
|
|
641
|
+
"\u033E",
|
|
642
|
+
"\u035B",
|
|
643
|
+
"\u0346",
|
|
644
|
+
"\u031A"
|
|
645
|
+
],
|
|
646
|
+
"down": [
|
|
647
|
+
"\u0316",
|
|
648
|
+
"\u0317",
|
|
649
|
+
"\u0318",
|
|
650
|
+
"\u0319",
|
|
651
|
+
"\u031C",
|
|
652
|
+
"\u031D",
|
|
653
|
+
"\u031E",
|
|
654
|
+
"\u031F",
|
|
655
|
+
"\u0320",
|
|
656
|
+
"\u0324",
|
|
657
|
+
"\u0325",
|
|
658
|
+
"\u0326",
|
|
659
|
+
"\u0329",
|
|
660
|
+
"\u032A",
|
|
661
|
+
"\u032B",
|
|
662
|
+
"\u032C",
|
|
663
|
+
"\u032D",
|
|
664
|
+
"\u032E",
|
|
665
|
+
"\u032F",
|
|
666
|
+
"\u0330",
|
|
667
|
+
"\u0331",
|
|
668
|
+
"\u0332",
|
|
669
|
+
"\u0333",
|
|
670
|
+
"\u0339",
|
|
671
|
+
"\u033A",
|
|
672
|
+
"\u033B",
|
|
673
|
+
"\u033C",
|
|
674
|
+
"\u0345",
|
|
675
|
+
"\u0347",
|
|
676
|
+
"\u0348",
|
|
677
|
+
"\u0349",
|
|
678
|
+
"\u034D",
|
|
679
|
+
"\u034E",
|
|
680
|
+
"\u0353",
|
|
681
|
+
"\u0354",
|
|
682
|
+
"\u0355",
|
|
683
|
+
"\u0356",
|
|
684
|
+
"\u0359",
|
|
685
|
+
"\u035A",
|
|
686
|
+
"\u0323"
|
|
687
|
+
],
|
|
688
|
+
"mid": [
|
|
689
|
+
"\u0315",
|
|
690
|
+
"\u031B",
|
|
691
|
+
"\u0300",
|
|
692
|
+
"\u0301",
|
|
693
|
+
"\u0358",
|
|
694
|
+
"\u0321",
|
|
695
|
+
"\u0322",
|
|
696
|
+
"\u0327",
|
|
697
|
+
"\u0328",
|
|
698
|
+
"\u0334",
|
|
699
|
+
"\u0335",
|
|
700
|
+
"\u0336",
|
|
701
|
+
"\u035C",
|
|
702
|
+
"\u035D",
|
|
703
|
+
"\u035E",
|
|
704
|
+
"\u035F",
|
|
705
|
+
"\u0360",
|
|
706
|
+
"\u0362",
|
|
707
|
+
"\u0338",
|
|
708
|
+
"\u0337",
|
|
709
|
+
"\u0361",
|
|
710
|
+
" \u0489"
|
|
711
|
+
]
|
|
712
|
+
};
|
|
713
|
+
var all = [].concat(soul.up, soul.down, soul.mid);
|
|
714
|
+
function randomNumber(range) {
|
|
715
|
+
var r = Math.floor(Math.random() * range);
|
|
716
|
+
return r;
|
|
717
|
+
}
|
|
718
|
+
function isChar(character) {
|
|
719
|
+
var bool = false;
|
|
720
|
+
all.filter(function(i) {
|
|
721
|
+
bool = i === character;
|
|
722
|
+
});
|
|
723
|
+
return bool;
|
|
724
|
+
}
|
|
725
|
+
function heComes(text2, options2) {
|
|
726
|
+
var result = "";
|
|
727
|
+
var counts;
|
|
728
|
+
var l;
|
|
729
|
+
options2 = options2 || {};
|
|
730
|
+
options2["up"] = typeof options2["up"] !== "undefined" ? options2["up"] : true;
|
|
731
|
+
options2["mid"] = typeof options2["mid"] !== "undefined" ? options2["mid"] : true;
|
|
732
|
+
options2["down"] = typeof options2["down"] !== "undefined" ? options2["down"] : true;
|
|
733
|
+
options2["size"] = typeof options2["size"] !== "undefined" ? options2["size"] : "maxi";
|
|
734
|
+
text2 = text2.split("");
|
|
735
|
+
for (l in text2) {
|
|
736
|
+
if (isChar(l)) {
|
|
737
|
+
continue;
|
|
738
|
+
}
|
|
739
|
+
result = result + text2[l];
|
|
740
|
+
counts = { "up": 0, "down": 0, "mid": 0 };
|
|
741
|
+
switch (options2.size) {
|
|
742
|
+
case "mini":
|
|
743
|
+
counts.up = randomNumber(8);
|
|
744
|
+
counts.mid = randomNumber(2);
|
|
745
|
+
counts.down = randomNumber(8);
|
|
746
|
+
break;
|
|
747
|
+
case "maxi":
|
|
748
|
+
counts.up = randomNumber(16) + 3;
|
|
749
|
+
counts.mid = randomNumber(4) + 1;
|
|
750
|
+
counts.down = randomNumber(64) + 3;
|
|
751
|
+
break;
|
|
752
|
+
default:
|
|
753
|
+
counts.up = randomNumber(8) + 1;
|
|
754
|
+
counts.mid = randomNumber(6) / 2;
|
|
755
|
+
counts.down = randomNumber(8) + 1;
|
|
756
|
+
break;
|
|
757
|
+
}
|
|
758
|
+
var arr = ["up", "mid", "down"];
|
|
759
|
+
for (var d in arr) {
|
|
760
|
+
var index = arr[d];
|
|
761
|
+
for (var i = 0; i <= counts[index]; i++) {
|
|
762
|
+
if (options2[index]) {
|
|
763
|
+
result = result + soul[index][randomNumber(soul[index].length)];
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
return result;
|
|
769
|
+
}
|
|
770
|
+
return heComes(text, options);
|
|
771
|
+
};
|
|
772
|
+
}
|
|
773
|
+
});
|
|
774
|
+
|
|
775
|
+
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/america.js
|
|
776
|
+
var require_america = __commonJS({
|
|
777
|
+
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/america.js"(exports, module) {
|
|
778
|
+
module["exports"] = function(colors) {
|
|
779
|
+
return function(letter, i, exploded) {
|
|
780
|
+
if (letter === " ")
|
|
781
|
+
return letter;
|
|
782
|
+
switch (i % 3) {
|
|
783
|
+
case 0:
|
|
784
|
+
return colors.red(letter);
|
|
785
|
+
case 1:
|
|
786
|
+
return colors.white(letter);
|
|
787
|
+
case 2:
|
|
788
|
+
return colors.blue(letter);
|
|
789
|
+
}
|
|
790
|
+
};
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
});
|
|
794
|
+
|
|
795
|
+
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/zebra.js
|
|
796
|
+
var require_zebra = __commonJS({
|
|
797
|
+
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/zebra.js"(exports, module) {
|
|
798
|
+
module["exports"] = function(colors) {
|
|
799
|
+
return function(letter, i, exploded) {
|
|
800
|
+
return i % 2 === 0 ? letter : colors.inverse(letter);
|
|
801
|
+
};
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
});
|
|
805
|
+
|
|
806
|
+
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/rainbow.js
|
|
807
|
+
var require_rainbow = __commonJS({
|
|
808
|
+
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/rainbow.js"(exports, module) {
|
|
809
|
+
module["exports"] = function(colors) {
|
|
810
|
+
var rainbowColors = ["red", "yellow", "green", "blue", "magenta"];
|
|
811
|
+
return function(letter, i, exploded) {
|
|
812
|
+
if (letter === " ") {
|
|
813
|
+
return letter;
|
|
814
|
+
} else {
|
|
815
|
+
return colors[rainbowColors[i++ % rainbowColors.length]](letter);
|
|
816
|
+
}
|
|
817
|
+
};
|
|
818
|
+
};
|
|
819
|
+
}
|
|
820
|
+
});
|
|
821
|
+
|
|
822
|
+
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/random.js
|
|
823
|
+
var require_random = __commonJS({
|
|
824
|
+
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/maps/random.js"(exports, module) {
|
|
825
|
+
module["exports"] = function(colors) {
|
|
826
|
+
var available = [
|
|
827
|
+
"underline",
|
|
828
|
+
"inverse",
|
|
829
|
+
"grey",
|
|
830
|
+
"yellow",
|
|
831
|
+
"red",
|
|
832
|
+
"green",
|
|
833
|
+
"blue",
|
|
834
|
+
"white",
|
|
835
|
+
"cyan",
|
|
836
|
+
"magenta",
|
|
837
|
+
"brightYellow",
|
|
838
|
+
"brightRed",
|
|
839
|
+
"brightGreen",
|
|
840
|
+
"brightBlue",
|
|
841
|
+
"brightWhite",
|
|
842
|
+
"brightCyan",
|
|
843
|
+
"brightMagenta"
|
|
844
|
+
];
|
|
845
|
+
return function(letter, i, exploded) {
|
|
846
|
+
return letter === " " ? letter : colors[available[Math.round(Math.random() * (available.length - 2))]](letter);
|
|
847
|
+
};
|
|
848
|
+
};
|
|
849
|
+
}
|
|
850
|
+
});
|
|
851
|
+
|
|
852
|
+
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/colors.js
|
|
853
|
+
var require_colors = __commonJS({
|
|
854
|
+
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/lib/colors.js"(exports, module) {
|
|
855
|
+
var colors = {};
|
|
856
|
+
module["exports"] = colors;
|
|
857
|
+
colors.themes = {};
|
|
858
|
+
var util = __require("util");
|
|
859
|
+
var ansiStyles = colors.styles = require_styles();
|
|
860
|
+
var defineProps = Object.defineProperties;
|
|
861
|
+
var newLineRegex = new RegExp(/[\r\n]+/g);
|
|
862
|
+
colors.supportsColor = require_supports_colors().supportsColor;
|
|
863
|
+
if (typeof colors.enabled === "undefined") {
|
|
864
|
+
colors.enabled = colors.supportsColor() !== false;
|
|
865
|
+
}
|
|
866
|
+
colors.enable = function() {
|
|
867
|
+
colors.enabled = true;
|
|
868
|
+
};
|
|
869
|
+
colors.disable = function() {
|
|
870
|
+
colors.enabled = false;
|
|
871
|
+
};
|
|
872
|
+
colors.stripColors = colors.strip = function(str) {
|
|
873
|
+
return ("" + str).replace(/\x1B\[\d+m/g, "");
|
|
874
|
+
};
|
|
875
|
+
var stylize = colors.stylize = function stylize2(str, style) {
|
|
876
|
+
if (!colors.enabled) {
|
|
877
|
+
return str + "";
|
|
878
|
+
}
|
|
879
|
+
var styleMap = ansiStyles[style];
|
|
880
|
+
if (!styleMap && style in colors) {
|
|
881
|
+
return colors[style](str);
|
|
882
|
+
}
|
|
883
|
+
return styleMap.open + str + styleMap.close;
|
|
884
|
+
};
|
|
885
|
+
var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g;
|
|
886
|
+
var escapeStringRegexp = function(str) {
|
|
887
|
+
if (typeof str !== "string") {
|
|
888
|
+
throw new TypeError("Expected a string");
|
|
889
|
+
}
|
|
890
|
+
return str.replace(matchOperatorsRe, "\\$&");
|
|
891
|
+
};
|
|
892
|
+
function build(_styles) {
|
|
893
|
+
var builder = function builder2() {
|
|
894
|
+
return applyStyle.apply(builder2, arguments);
|
|
895
|
+
};
|
|
896
|
+
builder._styles = _styles;
|
|
897
|
+
builder.__proto__ = proto;
|
|
898
|
+
return builder;
|
|
899
|
+
}
|
|
900
|
+
var styles = function() {
|
|
901
|
+
var ret = {};
|
|
902
|
+
ansiStyles.grey = ansiStyles.gray;
|
|
903
|
+
Object.keys(ansiStyles).forEach(function(key) {
|
|
904
|
+
ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), "g");
|
|
905
|
+
ret[key] = {
|
|
906
|
+
get: function() {
|
|
907
|
+
return build(this._styles.concat(key));
|
|
908
|
+
}
|
|
909
|
+
};
|
|
910
|
+
});
|
|
911
|
+
return ret;
|
|
912
|
+
}();
|
|
913
|
+
var proto = defineProps(function colors2() {
|
|
914
|
+
}, styles);
|
|
915
|
+
function applyStyle() {
|
|
916
|
+
var args = Array.prototype.slice.call(arguments);
|
|
917
|
+
var str = args.map(function(arg) {
|
|
918
|
+
if (arg != null && arg.constructor === String) {
|
|
919
|
+
return arg;
|
|
920
|
+
} else {
|
|
921
|
+
return util.inspect(arg);
|
|
922
|
+
}
|
|
923
|
+
}).join(" ");
|
|
924
|
+
if (!colors.enabled || !str) {
|
|
925
|
+
return str;
|
|
926
|
+
}
|
|
927
|
+
var newLinesPresent = str.indexOf("\n") != -1;
|
|
928
|
+
var nestedStyles = this._styles;
|
|
929
|
+
var i = nestedStyles.length;
|
|
930
|
+
while (i--) {
|
|
931
|
+
var code = ansiStyles[nestedStyles[i]];
|
|
932
|
+
str = code.open + str.replace(code.closeRe, code.open) + code.close;
|
|
933
|
+
if (newLinesPresent) {
|
|
934
|
+
str = str.replace(newLineRegex, function(match) {
|
|
935
|
+
return code.close + match + code.open;
|
|
936
|
+
});
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
return str;
|
|
940
|
+
}
|
|
941
|
+
colors.setTheme = function(theme) {
|
|
942
|
+
if (typeof theme === "string") {
|
|
943
|
+
console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");
|
|
944
|
+
return;
|
|
945
|
+
}
|
|
946
|
+
for (var style in theme) {
|
|
947
|
+
(function(style2) {
|
|
948
|
+
colors[style2] = function(str) {
|
|
949
|
+
if (typeof theme[style2] === "object") {
|
|
950
|
+
var out = str;
|
|
951
|
+
for (var i in theme[style2]) {
|
|
952
|
+
out = colors[theme[style2][i]](out);
|
|
953
|
+
}
|
|
954
|
+
return out;
|
|
955
|
+
}
|
|
956
|
+
return colors[theme[style2]](str);
|
|
957
|
+
};
|
|
958
|
+
})(style);
|
|
959
|
+
}
|
|
960
|
+
};
|
|
961
|
+
function init() {
|
|
962
|
+
var ret = {};
|
|
963
|
+
Object.keys(styles).forEach(function(name) {
|
|
964
|
+
ret[name] = {
|
|
965
|
+
get: function() {
|
|
966
|
+
return build([name]);
|
|
967
|
+
}
|
|
968
|
+
};
|
|
969
|
+
});
|
|
970
|
+
return ret;
|
|
971
|
+
}
|
|
972
|
+
var sequencer = function sequencer2(map2, str) {
|
|
973
|
+
var exploded = str.split("");
|
|
974
|
+
exploded = exploded.map(map2);
|
|
975
|
+
return exploded.join("");
|
|
976
|
+
};
|
|
977
|
+
colors.trap = require_trap();
|
|
978
|
+
colors.zalgo = require_zalgo();
|
|
979
|
+
colors.maps = {};
|
|
980
|
+
colors.maps.america = require_america()(colors);
|
|
981
|
+
colors.maps.zebra = require_zebra()(colors);
|
|
982
|
+
colors.maps.rainbow = require_rainbow()(colors);
|
|
983
|
+
colors.maps.random = require_random()(colors);
|
|
984
|
+
for (map in colors.maps) {
|
|
985
|
+
(function(map2) {
|
|
986
|
+
colors[map2] = function(str) {
|
|
987
|
+
return sequencer(colors.maps[map2], str);
|
|
988
|
+
};
|
|
989
|
+
})(map);
|
|
990
|
+
}
|
|
991
|
+
var map;
|
|
992
|
+
defineProps(colors, init());
|
|
993
|
+
}
|
|
994
|
+
});
|
|
995
|
+
|
|
996
|
+
// ../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/safe.js
|
|
997
|
+
var require_safe = __commonJS({
|
|
998
|
+
"../../node_modules/.pnpm/@colors+colors@1.5.0/node_modules/@colors/colors/safe.js"(exports, module) {
|
|
999
|
+
var colors = require_colors();
|
|
1000
|
+
module["exports"] = colors;
|
|
1001
|
+
}
|
|
1002
|
+
});
|
|
1003
|
+
|
|
1004
|
+
// ../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/cell.js
|
|
1005
|
+
var require_cell = __commonJS({
|
|
1006
|
+
"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/cell.js"(exports, module) {
|
|
1007
|
+
var { info, debug } = require_debug();
|
|
1008
|
+
var utils = require_utils();
|
|
1009
|
+
var Cell = class _Cell {
|
|
1010
|
+
/**
|
|
1011
|
+
* A representation of a cell within the table.
|
|
1012
|
+
* Implementations must have `init` and `draw` methods,
|
|
1013
|
+
* as well as `colSpan`, `rowSpan`, `desiredHeight` and `desiredWidth` properties.
|
|
1014
|
+
* @param options
|
|
1015
|
+
* @constructor
|
|
1016
|
+
*/
|
|
1017
|
+
constructor(options) {
|
|
1018
|
+
this.setOptions(options);
|
|
1019
|
+
this.x = null;
|
|
1020
|
+
this.y = null;
|
|
1021
|
+
}
|
|
1022
|
+
setOptions(options) {
|
|
1023
|
+
if (["boolean", "number", "string"].indexOf(typeof options) !== -1) {
|
|
1024
|
+
options = { content: "" + options };
|
|
1025
|
+
}
|
|
1026
|
+
options = options || {};
|
|
1027
|
+
this.options = options;
|
|
1028
|
+
let content = options.content;
|
|
1029
|
+
if (["boolean", "number", "string"].indexOf(typeof content) !== -1) {
|
|
1030
|
+
this.content = String(content);
|
|
1031
|
+
} else if (!content) {
|
|
1032
|
+
this.content = this.options.href || "";
|
|
1033
|
+
} else {
|
|
1034
|
+
throw new Error("Content needs to be a primitive, got: " + typeof content);
|
|
1035
|
+
}
|
|
1036
|
+
this.colSpan = options.colSpan || 1;
|
|
1037
|
+
this.rowSpan = options.rowSpan || 1;
|
|
1038
|
+
if (this.options.href) {
|
|
1039
|
+
Object.defineProperty(this, "href", {
|
|
1040
|
+
get() {
|
|
1041
|
+
return this.options.href;
|
|
1042
|
+
}
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
}
|
|
1046
|
+
mergeTableOptions(tableOptions, cells) {
|
|
1047
|
+
this.cells = cells;
|
|
1048
|
+
let optionsChars = this.options.chars || {};
|
|
1049
|
+
let tableChars = tableOptions.chars;
|
|
1050
|
+
let chars = this.chars = {};
|
|
1051
|
+
CHAR_NAMES.forEach(function(name) {
|
|
1052
|
+
setOption(optionsChars, tableChars, name, chars);
|
|
1053
|
+
});
|
|
1054
|
+
this.truncate = this.options.truncate || tableOptions.truncate;
|
|
1055
|
+
let style = this.options.style = this.options.style || {};
|
|
1056
|
+
let tableStyle = tableOptions.style;
|
|
1057
|
+
setOption(style, tableStyle, "padding-left", this);
|
|
1058
|
+
setOption(style, tableStyle, "padding-right", this);
|
|
1059
|
+
this.head = style.head || tableStyle.head;
|
|
1060
|
+
this.border = style.border || tableStyle.border;
|
|
1061
|
+
this.fixedWidth = tableOptions.colWidths[this.x];
|
|
1062
|
+
this.lines = this.computeLines(tableOptions);
|
|
1063
|
+
this.desiredWidth = utils.strlen(this.content) + this.paddingLeft + this.paddingRight;
|
|
1064
|
+
this.desiredHeight = this.lines.length;
|
|
1065
|
+
}
|
|
1066
|
+
computeLines(tableOptions) {
|
|
1067
|
+
const tableWordWrap = tableOptions.wordWrap || tableOptions.textWrap;
|
|
1068
|
+
const { wordWrap = tableWordWrap } = this.options;
|
|
1069
|
+
if (this.fixedWidth && wordWrap) {
|
|
1070
|
+
this.fixedWidth -= this.paddingLeft + this.paddingRight;
|
|
1071
|
+
if (this.colSpan) {
|
|
1072
|
+
let i = 1;
|
|
1073
|
+
while (i < this.colSpan) {
|
|
1074
|
+
this.fixedWidth += tableOptions.colWidths[this.x + i];
|
|
1075
|
+
i++;
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
const { wrapOnWordBoundary: tableWrapOnWordBoundary = true } = tableOptions;
|
|
1079
|
+
const { wrapOnWordBoundary = tableWrapOnWordBoundary } = this.options;
|
|
1080
|
+
return this.wrapLines(utils.wordWrap(this.fixedWidth, this.content, wrapOnWordBoundary));
|
|
1081
|
+
}
|
|
1082
|
+
return this.wrapLines(this.content.split("\n"));
|
|
1083
|
+
}
|
|
1084
|
+
wrapLines(computedLines) {
|
|
1085
|
+
const lines = utils.colorizeLines(computedLines);
|
|
1086
|
+
if (this.href) {
|
|
1087
|
+
return lines.map((line) => utils.hyperlink(this.href, line));
|
|
1088
|
+
}
|
|
1089
|
+
return lines;
|
|
1090
|
+
}
|
|
1091
|
+
/**
|
|
1092
|
+
* Initializes the Cells data structure.
|
|
1093
|
+
*
|
|
1094
|
+
* @param tableOptions - A fully populated set of tableOptions.
|
|
1095
|
+
* In addition to the standard default values, tableOptions must have fully populated the
|
|
1096
|
+
* `colWidths` and `rowWidths` arrays. Those arrays must have lengths equal to the number
|
|
1097
|
+
* of columns or rows (respectively) in this table, and each array item must be a Number.
|
|
1098
|
+
*
|
|
1099
|
+
*/
|
|
1100
|
+
init(tableOptions) {
|
|
1101
|
+
let x = this.x;
|
|
1102
|
+
let y = this.y;
|
|
1103
|
+
this.widths = tableOptions.colWidths.slice(x, x + this.colSpan);
|
|
1104
|
+
this.heights = tableOptions.rowHeights.slice(y, y + this.rowSpan);
|
|
1105
|
+
this.width = this.widths.reduce(sumPlusOne, -1);
|
|
1106
|
+
this.height = this.heights.reduce(sumPlusOne, -1);
|
|
1107
|
+
this.hAlign = this.options.hAlign || tableOptions.colAligns[x];
|
|
1108
|
+
this.vAlign = this.options.vAlign || tableOptions.rowAligns[y];
|
|
1109
|
+
this.drawRight = x + this.colSpan == tableOptions.colWidths.length;
|
|
1110
|
+
}
|
|
1111
|
+
/**
|
|
1112
|
+
* Draws the given line of the cell.
|
|
1113
|
+
* This default implementation defers to methods `drawTop`, `drawBottom`, `drawLine` and `drawEmpty`.
|
|
1114
|
+
* @param lineNum - can be `top`, `bottom` or a numerical line number.
|
|
1115
|
+
* @param spanningCell - will be a number if being called from a RowSpanCell, and will represent how
|
|
1116
|
+
* many rows below it's being called from. Otherwise it's undefined.
|
|
1117
|
+
* @returns {String} The representation of this line.
|
|
1118
|
+
*/
|
|
1119
|
+
draw(lineNum, spanningCell) {
|
|
1120
|
+
if (lineNum == "top")
|
|
1121
|
+
return this.drawTop(this.drawRight);
|
|
1122
|
+
if (lineNum == "bottom")
|
|
1123
|
+
return this.drawBottom(this.drawRight);
|
|
1124
|
+
let content = utils.truncate(this.content, 10, this.truncate);
|
|
1125
|
+
if (!lineNum) {
|
|
1126
|
+
info(`${this.y}-${this.x}: ${this.rowSpan - lineNum}x${this.colSpan} Cell ${content}`);
|
|
1127
|
+
} else {
|
|
1128
|
+
}
|
|
1129
|
+
let padLen = Math.max(this.height - this.lines.length, 0);
|
|
1130
|
+
let padTop;
|
|
1131
|
+
switch (this.vAlign) {
|
|
1132
|
+
case "center":
|
|
1133
|
+
padTop = Math.ceil(padLen / 2);
|
|
1134
|
+
break;
|
|
1135
|
+
case "bottom":
|
|
1136
|
+
padTop = padLen;
|
|
1137
|
+
break;
|
|
1138
|
+
default:
|
|
1139
|
+
padTop = 0;
|
|
1140
|
+
}
|
|
1141
|
+
if (lineNum < padTop || lineNum >= padTop + this.lines.length) {
|
|
1142
|
+
return this.drawEmpty(this.drawRight, spanningCell);
|
|
1143
|
+
}
|
|
1144
|
+
let forceTruncation = this.lines.length > this.height && lineNum + 1 >= this.height;
|
|
1145
|
+
return this.drawLine(lineNum - padTop, this.drawRight, forceTruncation, spanningCell);
|
|
1146
|
+
}
|
|
1147
|
+
/**
|
|
1148
|
+
* Renders the top line of the cell.
|
|
1149
|
+
* @param drawRight - true if this method should render the right edge of the cell.
|
|
1150
|
+
* @returns {String}
|
|
1151
|
+
*/
|
|
1152
|
+
drawTop(drawRight) {
|
|
1153
|
+
let content = [];
|
|
1154
|
+
if (this.cells) {
|
|
1155
|
+
this.widths.forEach(function(width, index) {
|
|
1156
|
+
content.push(this._topLeftChar(index));
|
|
1157
|
+
content.push(utils.repeat(this.chars[this.y == 0 ? "top" : "mid"], width));
|
|
1158
|
+
}, this);
|
|
1159
|
+
} else {
|
|
1160
|
+
content.push(this._topLeftChar(0));
|
|
1161
|
+
content.push(utils.repeat(this.chars[this.y == 0 ? "top" : "mid"], this.width));
|
|
1162
|
+
}
|
|
1163
|
+
if (drawRight) {
|
|
1164
|
+
content.push(this.chars[this.y == 0 ? "topRight" : "rightMid"]);
|
|
1165
|
+
}
|
|
1166
|
+
return this.wrapWithStyleColors("border", content.join(""));
|
|
1167
|
+
}
|
|
1168
|
+
_topLeftChar(offset) {
|
|
1169
|
+
let x = this.x + offset;
|
|
1170
|
+
let leftChar;
|
|
1171
|
+
if (this.y == 0) {
|
|
1172
|
+
leftChar = x == 0 ? "topLeft" : offset == 0 ? "topMid" : "top";
|
|
1173
|
+
} else {
|
|
1174
|
+
if (x == 0) {
|
|
1175
|
+
leftChar = "leftMid";
|
|
1176
|
+
} else {
|
|
1177
|
+
leftChar = offset == 0 ? "midMid" : "bottomMid";
|
|
1178
|
+
if (this.cells) {
|
|
1179
|
+
let spanAbove = this.cells[this.y - 1][x] instanceof _Cell.ColSpanCell;
|
|
1180
|
+
if (spanAbove) {
|
|
1181
|
+
leftChar = offset == 0 ? "topMid" : "mid";
|
|
1182
|
+
}
|
|
1183
|
+
if (offset == 0) {
|
|
1184
|
+
let i = 1;
|
|
1185
|
+
while (this.cells[this.y][x - i] instanceof _Cell.ColSpanCell) {
|
|
1186
|
+
i++;
|
|
1187
|
+
}
|
|
1188
|
+
if (this.cells[this.y][x - i] instanceof _Cell.RowSpanCell) {
|
|
1189
|
+
leftChar = "leftMid";
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
return this.chars[leftChar];
|
|
1196
|
+
}
|
|
1197
|
+
wrapWithStyleColors(styleProperty, content) {
|
|
1198
|
+
if (this[styleProperty] && this[styleProperty].length) {
|
|
1199
|
+
try {
|
|
1200
|
+
let colors = require_safe();
|
|
1201
|
+
for (let i = this[styleProperty].length - 1; i >= 0; i--) {
|
|
1202
|
+
colors = colors[this[styleProperty][i]];
|
|
1203
|
+
}
|
|
1204
|
+
return colors(content);
|
|
1205
|
+
} catch (e) {
|
|
1206
|
+
return content;
|
|
1207
|
+
}
|
|
1208
|
+
} else {
|
|
1209
|
+
return content;
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Renders a line of text.
|
|
1214
|
+
* @param lineNum - Which line of text to render. This is not necessarily the line within the cell.
|
|
1215
|
+
* There may be top-padding above the first line of text.
|
|
1216
|
+
* @param drawRight - true if this method should render the right edge of the cell.
|
|
1217
|
+
* @param forceTruncationSymbol - `true` if the rendered text should end with the truncation symbol even
|
|
1218
|
+
* if the text fits. This is used when the cell is vertically truncated. If `false` the text should
|
|
1219
|
+
* only include the truncation symbol if the text will not fit horizontally within the cell width.
|
|
1220
|
+
* @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
|
|
1221
|
+
* @returns {String}
|
|
1222
|
+
*/
|
|
1223
|
+
drawLine(lineNum, drawRight, forceTruncationSymbol, spanningCell) {
|
|
1224
|
+
let left = this.chars[this.x == 0 ? "left" : "middle"];
|
|
1225
|
+
if (this.x && spanningCell && this.cells) {
|
|
1226
|
+
let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
|
|
1227
|
+
while (cellLeft instanceof ColSpanCell) {
|
|
1228
|
+
cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
|
|
1229
|
+
}
|
|
1230
|
+
if (!(cellLeft instanceof RowSpanCell)) {
|
|
1231
|
+
left = this.chars["rightMid"];
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
let leftPadding = utils.repeat(" ", this.paddingLeft);
|
|
1235
|
+
let right = drawRight ? this.chars["right"] : "";
|
|
1236
|
+
let rightPadding = utils.repeat(" ", this.paddingRight);
|
|
1237
|
+
let line = this.lines[lineNum];
|
|
1238
|
+
let len = this.width - (this.paddingLeft + this.paddingRight);
|
|
1239
|
+
if (forceTruncationSymbol)
|
|
1240
|
+
line += this.truncate || "\u2026";
|
|
1241
|
+
let content = utils.truncate(line, len, this.truncate);
|
|
1242
|
+
content = utils.pad(content, len, " ", this.hAlign);
|
|
1243
|
+
content = leftPadding + content + rightPadding;
|
|
1244
|
+
return this.stylizeLine(left, content, right);
|
|
1245
|
+
}
|
|
1246
|
+
stylizeLine(left, content, right) {
|
|
1247
|
+
left = this.wrapWithStyleColors("border", left);
|
|
1248
|
+
right = this.wrapWithStyleColors("border", right);
|
|
1249
|
+
if (this.y === 0) {
|
|
1250
|
+
content = this.wrapWithStyleColors("head", content);
|
|
1251
|
+
}
|
|
1252
|
+
return left + content + right;
|
|
1253
|
+
}
|
|
1254
|
+
/**
|
|
1255
|
+
* Renders the bottom line of the cell.
|
|
1256
|
+
* @param drawRight - true if this method should render the right edge of the cell.
|
|
1257
|
+
* @returns {String}
|
|
1258
|
+
*/
|
|
1259
|
+
drawBottom(drawRight) {
|
|
1260
|
+
let left = this.chars[this.x == 0 ? "bottomLeft" : "bottomMid"];
|
|
1261
|
+
let content = utils.repeat(this.chars.bottom, this.width);
|
|
1262
|
+
let right = drawRight ? this.chars["bottomRight"] : "";
|
|
1263
|
+
return this.wrapWithStyleColors("border", left + content + right);
|
|
1264
|
+
}
|
|
1265
|
+
/**
|
|
1266
|
+
* Renders a blank line of text within the cell. Used for top and/or bottom padding.
|
|
1267
|
+
* @param drawRight - true if this method should render the right edge of the cell.
|
|
1268
|
+
* @param spanningCell - a number of if being called from a RowSpanCell. (how many rows below). otherwise undefined.
|
|
1269
|
+
* @returns {String}
|
|
1270
|
+
*/
|
|
1271
|
+
drawEmpty(drawRight, spanningCell) {
|
|
1272
|
+
let left = this.chars[this.x == 0 ? "left" : "middle"];
|
|
1273
|
+
if (this.x && spanningCell && this.cells) {
|
|
1274
|
+
let cellLeft = this.cells[this.y + spanningCell][this.x - 1];
|
|
1275
|
+
while (cellLeft instanceof ColSpanCell) {
|
|
1276
|
+
cellLeft = this.cells[cellLeft.y][cellLeft.x - 1];
|
|
1277
|
+
}
|
|
1278
|
+
if (!(cellLeft instanceof RowSpanCell)) {
|
|
1279
|
+
left = this.chars["rightMid"];
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
let right = drawRight ? this.chars["right"] : "";
|
|
1283
|
+
let content = utils.repeat(" ", this.width);
|
|
1284
|
+
return this.stylizeLine(left, content, right);
|
|
1285
|
+
}
|
|
1286
|
+
};
|
|
1287
|
+
var ColSpanCell = class {
|
|
1288
|
+
/**
|
|
1289
|
+
* A Cell that doesn't do anything. It just draws empty lines.
|
|
1290
|
+
* Used as a placeholder in column spanning.
|
|
1291
|
+
* @constructor
|
|
1292
|
+
*/
|
|
1293
|
+
constructor() {
|
|
1294
|
+
}
|
|
1295
|
+
draw(lineNum) {
|
|
1296
|
+
if (typeof lineNum === "number") {
|
|
1297
|
+
debug(`${this.y}-${this.x}: 1x1 ColSpanCell`);
|
|
1298
|
+
}
|
|
1299
|
+
return "";
|
|
1300
|
+
}
|
|
1301
|
+
init() {
|
|
1302
|
+
}
|
|
1303
|
+
mergeTableOptions() {
|
|
1304
|
+
}
|
|
1305
|
+
};
|
|
1306
|
+
var RowSpanCell = class {
|
|
1307
|
+
/**
|
|
1308
|
+
* A placeholder Cell for a Cell that spans multiple rows.
|
|
1309
|
+
* It delegates rendering to the original cell, but adds the appropriate offset.
|
|
1310
|
+
* @param originalCell
|
|
1311
|
+
* @constructor
|
|
1312
|
+
*/
|
|
1313
|
+
constructor(originalCell) {
|
|
1314
|
+
this.originalCell = originalCell;
|
|
1315
|
+
}
|
|
1316
|
+
init(tableOptions) {
|
|
1317
|
+
let y = this.y;
|
|
1318
|
+
let originalY = this.originalCell.y;
|
|
1319
|
+
this.cellOffset = y - originalY;
|
|
1320
|
+
this.offset = findDimension(tableOptions.rowHeights, originalY, this.cellOffset);
|
|
1321
|
+
}
|
|
1322
|
+
draw(lineNum) {
|
|
1323
|
+
if (lineNum == "top") {
|
|
1324
|
+
return this.originalCell.draw(this.offset, this.cellOffset);
|
|
1325
|
+
}
|
|
1326
|
+
if (lineNum == "bottom") {
|
|
1327
|
+
return this.originalCell.draw("bottom");
|
|
1328
|
+
}
|
|
1329
|
+
debug(`${this.y}-${this.x}: 1x${this.colSpan} RowSpanCell for ${this.originalCell.content}`);
|
|
1330
|
+
return this.originalCell.draw(this.offset + 1 + lineNum);
|
|
1331
|
+
}
|
|
1332
|
+
mergeTableOptions() {
|
|
1333
|
+
}
|
|
1334
|
+
};
|
|
1335
|
+
function firstDefined(...args) {
|
|
1336
|
+
return args.filter((v) => v !== void 0 && v !== null).shift();
|
|
1337
|
+
}
|
|
1338
|
+
function setOption(objA, objB, nameB, targetObj) {
|
|
1339
|
+
let nameA = nameB.split("-");
|
|
1340
|
+
if (nameA.length > 1) {
|
|
1341
|
+
nameA[1] = nameA[1].charAt(0).toUpperCase() + nameA[1].substr(1);
|
|
1342
|
+
nameA = nameA.join("");
|
|
1343
|
+
targetObj[nameA] = firstDefined(objA[nameA], objA[nameB], objB[nameA], objB[nameB]);
|
|
1344
|
+
} else {
|
|
1345
|
+
targetObj[nameB] = firstDefined(objA[nameB], objB[nameB]);
|
|
1346
|
+
}
|
|
1347
|
+
}
|
|
1348
|
+
function findDimension(dimensionTable, startingIndex, span) {
|
|
1349
|
+
let ret = dimensionTable[startingIndex];
|
|
1350
|
+
for (let i = 1; i < span; i++) {
|
|
1351
|
+
ret += 1 + dimensionTable[startingIndex + i];
|
|
1352
|
+
}
|
|
1353
|
+
return ret;
|
|
1354
|
+
}
|
|
1355
|
+
function sumPlusOne(a, b) {
|
|
1356
|
+
return a + b + 1;
|
|
1357
|
+
}
|
|
1358
|
+
var CHAR_NAMES = [
|
|
1359
|
+
"top",
|
|
1360
|
+
"top-mid",
|
|
1361
|
+
"top-left",
|
|
1362
|
+
"top-right",
|
|
1363
|
+
"bottom",
|
|
1364
|
+
"bottom-mid",
|
|
1365
|
+
"bottom-left",
|
|
1366
|
+
"bottom-right",
|
|
1367
|
+
"left",
|
|
1368
|
+
"left-mid",
|
|
1369
|
+
"mid",
|
|
1370
|
+
"mid-mid",
|
|
1371
|
+
"right",
|
|
1372
|
+
"right-mid",
|
|
1373
|
+
"middle"
|
|
1374
|
+
];
|
|
1375
|
+
module.exports = Cell;
|
|
1376
|
+
module.exports.ColSpanCell = ColSpanCell;
|
|
1377
|
+
module.exports.RowSpanCell = RowSpanCell;
|
|
1378
|
+
}
|
|
1379
|
+
});
|
|
1380
|
+
|
|
1381
|
+
// ../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/layout-manager.js
|
|
1382
|
+
var require_layout_manager = __commonJS({
|
|
1383
|
+
"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/layout-manager.js"(exports, module) {
|
|
1384
|
+
var { warn, debug } = require_debug();
|
|
1385
|
+
var Cell = require_cell();
|
|
1386
|
+
var { ColSpanCell, RowSpanCell } = Cell;
|
|
1387
|
+
(function() {
|
|
1388
|
+
function next(alloc, col) {
|
|
1389
|
+
if (alloc[col] > 0) {
|
|
1390
|
+
return next(alloc, col + 1);
|
|
1391
|
+
}
|
|
1392
|
+
return col;
|
|
1393
|
+
}
|
|
1394
|
+
function layoutTable(table2) {
|
|
1395
|
+
let alloc = {};
|
|
1396
|
+
table2.forEach(function(row, rowIndex) {
|
|
1397
|
+
let col = 0;
|
|
1398
|
+
row.forEach(function(cell) {
|
|
1399
|
+
cell.y = rowIndex;
|
|
1400
|
+
cell.x = rowIndex ? next(alloc, col) : col;
|
|
1401
|
+
const rowSpan = cell.rowSpan || 1;
|
|
1402
|
+
const colSpan = cell.colSpan || 1;
|
|
1403
|
+
if (rowSpan > 1) {
|
|
1404
|
+
for (let cs = 0; cs < colSpan; cs++) {
|
|
1405
|
+
alloc[cell.x + cs] = rowSpan;
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
col = cell.x + colSpan;
|
|
1409
|
+
});
|
|
1410
|
+
Object.keys(alloc).forEach((idx) => {
|
|
1411
|
+
alloc[idx]--;
|
|
1412
|
+
if (alloc[idx] < 1)
|
|
1413
|
+
delete alloc[idx];
|
|
1414
|
+
});
|
|
1415
|
+
});
|
|
1416
|
+
}
|
|
1417
|
+
function maxWidth(table2) {
|
|
1418
|
+
let mw = 0;
|
|
1419
|
+
table2.forEach(function(row) {
|
|
1420
|
+
row.forEach(function(cell) {
|
|
1421
|
+
mw = Math.max(mw, cell.x + (cell.colSpan || 1));
|
|
1422
|
+
});
|
|
1423
|
+
});
|
|
1424
|
+
return mw;
|
|
1425
|
+
}
|
|
1426
|
+
function maxHeight(table2) {
|
|
1427
|
+
return table2.length;
|
|
1428
|
+
}
|
|
1429
|
+
function cellsConflict(cell1, cell2) {
|
|
1430
|
+
let yMin1 = cell1.y;
|
|
1431
|
+
let yMax1 = cell1.y - 1 + (cell1.rowSpan || 1);
|
|
1432
|
+
let yMin2 = cell2.y;
|
|
1433
|
+
let yMax2 = cell2.y - 1 + (cell2.rowSpan || 1);
|
|
1434
|
+
let yConflict = !(yMin1 > yMax2 || yMin2 > yMax1);
|
|
1435
|
+
let xMin1 = cell1.x;
|
|
1436
|
+
let xMax1 = cell1.x - 1 + (cell1.colSpan || 1);
|
|
1437
|
+
let xMin2 = cell2.x;
|
|
1438
|
+
let xMax2 = cell2.x - 1 + (cell2.colSpan || 1);
|
|
1439
|
+
let xConflict = !(xMin1 > xMax2 || xMin2 > xMax1);
|
|
1440
|
+
return yConflict && xConflict;
|
|
1441
|
+
}
|
|
1442
|
+
function conflictExists(rows, x, y) {
|
|
1443
|
+
let i_max = Math.min(rows.length - 1, y);
|
|
1444
|
+
let cell = { x, y };
|
|
1445
|
+
for (let i = 0; i <= i_max; i++) {
|
|
1446
|
+
let row = rows[i];
|
|
1447
|
+
for (let j = 0; j < row.length; j++) {
|
|
1448
|
+
if (cellsConflict(cell, row[j])) {
|
|
1449
|
+
return true;
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
return false;
|
|
1454
|
+
}
|
|
1455
|
+
function allBlank(rows, y, xMin, xMax) {
|
|
1456
|
+
for (let x = xMin; x < xMax; x++) {
|
|
1457
|
+
if (conflictExists(rows, x, y)) {
|
|
1458
|
+
return false;
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
return true;
|
|
1462
|
+
}
|
|
1463
|
+
function addRowSpanCells(table2) {
|
|
1464
|
+
table2.forEach(function(row, rowIndex) {
|
|
1465
|
+
row.forEach(function(cell) {
|
|
1466
|
+
for (let i = 1; i < cell.rowSpan; i++) {
|
|
1467
|
+
let rowSpanCell = new RowSpanCell(cell);
|
|
1468
|
+
rowSpanCell.x = cell.x;
|
|
1469
|
+
rowSpanCell.y = cell.y + i;
|
|
1470
|
+
rowSpanCell.colSpan = cell.colSpan;
|
|
1471
|
+
insertCell(rowSpanCell, table2[rowIndex + i]);
|
|
1472
|
+
}
|
|
1473
|
+
});
|
|
1474
|
+
});
|
|
1475
|
+
}
|
|
1476
|
+
function addColSpanCells(cellRows) {
|
|
1477
|
+
for (let rowIndex = cellRows.length - 1; rowIndex >= 0; rowIndex--) {
|
|
1478
|
+
let cellColumns = cellRows[rowIndex];
|
|
1479
|
+
for (let columnIndex = 0; columnIndex < cellColumns.length; columnIndex++) {
|
|
1480
|
+
let cell = cellColumns[columnIndex];
|
|
1481
|
+
for (let k = 1; k < cell.colSpan; k++) {
|
|
1482
|
+
let colSpanCell = new ColSpanCell();
|
|
1483
|
+
colSpanCell.x = cell.x + k;
|
|
1484
|
+
colSpanCell.y = cell.y;
|
|
1485
|
+
cellColumns.splice(columnIndex + 1, 0, colSpanCell);
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
function insertCell(cell, row) {
|
|
1491
|
+
let x = 0;
|
|
1492
|
+
while (x < row.length && row[x].x < cell.x) {
|
|
1493
|
+
x++;
|
|
1494
|
+
}
|
|
1495
|
+
row.splice(x, 0, cell);
|
|
1496
|
+
}
|
|
1497
|
+
function fillInTable(table2) {
|
|
1498
|
+
let h_max = maxHeight(table2);
|
|
1499
|
+
let w_max = maxWidth(table2);
|
|
1500
|
+
debug(`Max rows: ${h_max}; Max cols: ${w_max}`);
|
|
1501
|
+
for (let y = 0; y < h_max; y++) {
|
|
1502
|
+
for (let x = 0; x < w_max; x++) {
|
|
1503
|
+
if (!conflictExists(table2, x, y)) {
|
|
1504
|
+
let opts = { x, y, colSpan: 1, rowSpan: 1 };
|
|
1505
|
+
x++;
|
|
1506
|
+
while (x < w_max && !conflictExists(table2, x, y)) {
|
|
1507
|
+
opts.colSpan++;
|
|
1508
|
+
x++;
|
|
1509
|
+
}
|
|
1510
|
+
let y2 = y + 1;
|
|
1511
|
+
while (y2 < h_max && allBlank(table2, y2, opts.x, opts.x + opts.colSpan)) {
|
|
1512
|
+
opts.rowSpan++;
|
|
1513
|
+
y2++;
|
|
1514
|
+
}
|
|
1515
|
+
let cell = new Cell(opts);
|
|
1516
|
+
cell.x = opts.x;
|
|
1517
|
+
cell.y = opts.y;
|
|
1518
|
+
warn(`Missing cell at ${cell.y}-${cell.x}.`);
|
|
1519
|
+
insertCell(cell, table2[y]);
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
function generateCells(rows) {
|
|
1525
|
+
return rows.map(function(row) {
|
|
1526
|
+
if (!Array.isArray(row)) {
|
|
1527
|
+
let key = Object.keys(row)[0];
|
|
1528
|
+
row = row[key];
|
|
1529
|
+
if (Array.isArray(row)) {
|
|
1530
|
+
row = row.slice();
|
|
1531
|
+
row.unshift(key);
|
|
1532
|
+
} else {
|
|
1533
|
+
row = [key, row];
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
return row.map(function(cell) {
|
|
1537
|
+
return new Cell(cell);
|
|
1538
|
+
});
|
|
1539
|
+
});
|
|
1540
|
+
}
|
|
1541
|
+
function makeTableLayout(rows) {
|
|
1542
|
+
let cellRows = generateCells(rows);
|
|
1543
|
+
layoutTable(cellRows);
|
|
1544
|
+
fillInTable(cellRows);
|
|
1545
|
+
addRowSpanCells(cellRows);
|
|
1546
|
+
addColSpanCells(cellRows);
|
|
1547
|
+
return cellRows;
|
|
1548
|
+
}
|
|
1549
|
+
module.exports = {
|
|
1550
|
+
makeTableLayout,
|
|
1551
|
+
layoutTable,
|
|
1552
|
+
addRowSpanCells,
|
|
1553
|
+
maxWidth,
|
|
1554
|
+
fillInTable,
|
|
1555
|
+
computeWidths: makeComputeWidths("colSpan", "desiredWidth", "x", 1),
|
|
1556
|
+
computeHeights: makeComputeWidths("rowSpan", "desiredHeight", "y", 1)
|
|
1557
|
+
};
|
|
1558
|
+
})();
|
|
1559
|
+
function makeComputeWidths(colSpan, desiredWidth, x, forcedMin) {
|
|
1560
|
+
return function(vals, table2) {
|
|
1561
|
+
let result = [];
|
|
1562
|
+
let spanners = [];
|
|
1563
|
+
let auto = {};
|
|
1564
|
+
table2.forEach(function(row) {
|
|
1565
|
+
row.forEach(function(cell) {
|
|
1566
|
+
if ((cell[colSpan] || 1) > 1) {
|
|
1567
|
+
spanners.push(cell);
|
|
1568
|
+
} else {
|
|
1569
|
+
result[cell[x]] = Math.max(result[cell[x]] || 0, cell[desiredWidth] || 0, forcedMin);
|
|
1570
|
+
}
|
|
1571
|
+
});
|
|
1572
|
+
});
|
|
1573
|
+
vals.forEach(function(val, index) {
|
|
1574
|
+
if (typeof val === "number") {
|
|
1575
|
+
result[index] = val;
|
|
1576
|
+
}
|
|
1577
|
+
});
|
|
1578
|
+
for (let k = spanners.length - 1; k >= 0; k--) {
|
|
1579
|
+
let cell = spanners[k];
|
|
1580
|
+
let span = cell[colSpan];
|
|
1581
|
+
let col = cell[x];
|
|
1582
|
+
let existingWidth = result[col];
|
|
1583
|
+
let editableCols = typeof vals[col] === "number" ? 0 : 1;
|
|
1584
|
+
if (typeof existingWidth === "number") {
|
|
1585
|
+
for (let i = 1; i < span; i++) {
|
|
1586
|
+
existingWidth += 1 + result[col + i];
|
|
1587
|
+
if (typeof vals[col + i] !== "number") {
|
|
1588
|
+
editableCols++;
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
} else {
|
|
1592
|
+
existingWidth = desiredWidth === "desiredWidth" ? cell.desiredWidth - 1 : 1;
|
|
1593
|
+
if (!auto[col] || auto[col] < existingWidth) {
|
|
1594
|
+
auto[col] = existingWidth;
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
if (cell[desiredWidth] > existingWidth) {
|
|
1598
|
+
let i = 0;
|
|
1599
|
+
while (editableCols > 0 && cell[desiredWidth] > existingWidth) {
|
|
1600
|
+
if (typeof vals[col + i] !== "number") {
|
|
1601
|
+
let dif = Math.round((cell[desiredWidth] - existingWidth) / editableCols);
|
|
1602
|
+
existingWidth += dif;
|
|
1603
|
+
result[col + i] += dif;
|
|
1604
|
+
editableCols--;
|
|
1605
|
+
}
|
|
1606
|
+
i++;
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
Object.assign(vals, result, auto);
|
|
1611
|
+
for (let j = 0; j < vals.length; j++) {
|
|
1612
|
+
vals[j] = Math.max(forcedMin, vals[j] || 0);
|
|
1613
|
+
}
|
|
1614
|
+
};
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
});
|
|
1618
|
+
|
|
1619
|
+
// ../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/table.js
|
|
1620
|
+
var require_table = __commonJS({
|
|
1621
|
+
"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/src/table.js"(exports, module) {
|
|
1622
|
+
var debug = require_debug();
|
|
1623
|
+
var utils = require_utils();
|
|
1624
|
+
var tableLayout = require_layout_manager();
|
|
1625
|
+
var Table2 = class extends Array {
|
|
1626
|
+
constructor(opts) {
|
|
1627
|
+
super();
|
|
1628
|
+
const options = utils.mergeOptions(opts);
|
|
1629
|
+
Object.defineProperty(this, "options", {
|
|
1630
|
+
value: options,
|
|
1631
|
+
enumerable: options.debug
|
|
1632
|
+
});
|
|
1633
|
+
if (options.debug) {
|
|
1634
|
+
switch (typeof options.debug) {
|
|
1635
|
+
case "boolean":
|
|
1636
|
+
debug.setDebugLevel(debug.WARN);
|
|
1637
|
+
break;
|
|
1638
|
+
case "number":
|
|
1639
|
+
debug.setDebugLevel(options.debug);
|
|
1640
|
+
break;
|
|
1641
|
+
case "string":
|
|
1642
|
+
debug.setDebugLevel(parseInt(options.debug, 10));
|
|
1643
|
+
break;
|
|
1644
|
+
default:
|
|
1645
|
+
debug.setDebugLevel(debug.WARN);
|
|
1646
|
+
debug.warn(`Debug option is expected to be boolean, number, or string. Received a ${typeof options.debug}`);
|
|
1647
|
+
}
|
|
1648
|
+
Object.defineProperty(this, "messages", {
|
|
1649
|
+
get() {
|
|
1650
|
+
return debug.debugMessages();
|
|
1651
|
+
}
|
|
1652
|
+
});
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
toString() {
|
|
1656
|
+
let array = this;
|
|
1657
|
+
let headersPresent = this.options.head && this.options.head.length;
|
|
1658
|
+
if (headersPresent) {
|
|
1659
|
+
array = [this.options.head];
|
|
1660
|
+
if (this.length) {
|
|
1661
|
+
array.push.apply(array, this);
|
|
1662
|
+
}
|
|
1663
|
+
} else {
|
|
1664
|
+
this.options.style.head = [];
|
|
1665
|
+
}
|
|
1666
|
+
let cells = tableLayout.makeTableLayout(array);
|
|
1667
|
+
cells.forEach(function(row) {
|
|
1668
|
+
row.forEach(function(cell) {
|
|
1669
|
+
cell.mergeTableOptions(this.options, cells);
|
|
1670
|
+
}, this);
|
|
1671
|
+
}, this);
|
|
1672
|
+
tableLayout.computeWidths(this.options.colWidths, cells);
|
|
1673
|
+
tableLayout.computeHeights(this.options.rowHeights, cells);
|
|
1674
|
+
cells.forEach(function(row) {
|
|
1675
|
+
row.forEach(function(cell) {
|
|
1676
|
+
cell.init(this.options);
|
|
1677
|
+
}, this);
|
|
1678
|
+
}, this);
|
|
1679
|
+
let result = [];
|
|
1680
|
+
for (let rowIndex = 0; rowIndex < cells.length; rowIndex++) {
|
|
1681
|
+
let row = cells[rowIndex];
|
|
1682
|
+
let heightOfRow = this.options.rowHeights[rowIndex];
|
|
1683
|
+
if (rowIndex === 0 || !this.options.style.compact || rowIndex == 1 && headersPresent) {
|
|
1684
|
+
doDraw(row, "top", result);
|
|
1685
|
+
}
|
|
1686
|
+
for (let lineNum = 0; lineNum < heightOfRow; lineNum++) {
|
|
1687
|
+
doDraw(row, lineNum, result);
|
|
1688
|
+
}
|
|
1689
|
+
if (rowIndex + 1 == cells.length) {
|
|
1690
|
+
doDraw(row, "bottom", result);
|
|
1691
|
+
}
|
|
1692
|
+
}
|
|
1693
|
+
return result.join("\n");
|
|
1694
|
+
}
|
|
1695
|
+
get width() {
|
|
1696
|
+
let str = this.toString().split("\n");
|
|
1697
|
+
return str[0].length;
|
|
1698
|
+
}
|
|
1699
|
+
};
|
|
1700
|
+
Table2.reset = () => debug.reset();
|
|
1701
|
+
function doDraw(row, lineNum, result) {
|
|
1702
|
+
let line = [];
|
|
1703
|
+
row.forEach(function(cell) {
|
|
1704
|
+
line.push(cell.draw(lineNum));
|
|
1705
|
+
});
|
|
1706
|
+
let str = line.join("");
|
|
1707
|
+
if (str.length)
|
|
1708
|
+
result.push(str);
|
|
1709
|
+
}
|
|
1710
|
+
module.exports = Table2;
|
|
1711
|
+
}
|
|
1712
|
+
});
|
|
1713
|
+
|
|
1714
|
+
// ../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/index.js
|
|
1715
|
+
var require_cli_table3 = __commonJS({
|
|
1716
|
+
"../../node_modules/.pnpm/cli-table3@0.6.3/node_modules/cli-table3/index.js"(exports, module) {
|
|
1717
|
+
module.exports = require_table();
|
|
1718
|
+
}
|
|
1719
|
+
});
|
|
1720
|
+
|
|
1721
|
+
// src/util/output/table.ts
|
|
1722
|
+
var import_cli_table3 = __toESM(require_cli_table3(), 1);
|
|
1723
|
+
var defaultStyle = {
|
|
1724
|
+
"padding-left": 0,
|
|
1725
|
+
"padding-right": 2
|
|
1726
|
+
};
|
|
1727
|
+
var noBorderChars = {
|
|
1728
|
+
top: "",
|
|
1729
|
+
"top-mid": "",
|
|
1730
|
+
"top-left": "",
|
|
1731
|
+
"top-right": "",
|
|
1732
|
+
bottom: "",
|
|
1733
|
+
"bottom-mid": "",
|
|
1734
|
+
"bottom-left": "",
|
|
1735
|
+
"bottom-right": "",
|
|
1736
|
+
left: "",
|
|
1737
|
+
"left-mid": "",
|
|
1738
|
+
mid: "",
|
|
1739
|
+
"mid-mid": "",
|
|
1740
|
+
right: "",
|
|
1741
|
+
"right-mid": "",
|
|
1742
|
+
middle: ""
|
|
1743
|
+
};
|
|
1744
|
+
var alignMap = {
|
|
1745
|
+
l: "left",
|
|
1746
|
+
c: "center",
|
|
1747
|
+
r: "right"
|
|
1748
|
+
};
|
|
1749
|
+
function table(rows, opts) {
|
|
1750
|
+
const table2 = new import_cli_table3.default({
|
|
1751
|
+
style: {
|
|
1752
|
+
...defaultStyle,
|
|
1753
|
+
"padding-right": opts?.hsep ?? defaultStyle["padding-right"]
|
|
1754
|
+
},
|
|
1755
|
+
chars: noBorderChars
|
|
1756
|
+
});
|
|
1757
|
+
table2.push(
|
|
1758
|
+
...rows.map(
|
|
1759
|
+
(row) => row.map((cell, i) => ({
|
|
1760
|
+
content: cell,
|
|
1761
|
+
hAlign: alignMap[opts?.align?.[i] ?? "l"]
|
|
1762
|
+
}))
|
|
1763
|
+
)
|
|
1764
|
+
);
|
|
1765
|
+
return table2.toString();
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
export {
|
|
1769
|
+
require_cli_table3,
|
|
1770
|
+
noBorderChars,
|
|
1771
|
+
table
|
|
1772
|
+
};
|