termkit 2.4.1 → 2.4.3
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/README.md +5 -1
- package/dist/config.d.ts +2 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +37 -28
- package/dist/index.mjs +36 -28
- package/dist/models/Bar.d.ts.map +1 -1
- package/dist/models/Command.d.ts.map +1 -1
- package/dist/models/Log.d.ts.map +1 -1
- package/dist/utils/color.d.ts.map +1 -1
- package/dist/utils/truncate.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -176,6 +176,8 @@ configure({
|
|
|
176
176
|
})
|
|
177
177
|
```
|
|
178
178
|
|
|
179
|
+
`glyphs` is auto-detected at startup. TermKit disables Unicode glyphs and falls back to ASCII alternatives on legacy terminals: `TERM=dumb`, non-UTF-8 locales (`LANG`/`LC_ALL`), and Windows consoles that are not Windows Terminal, VS Code, or Hyper. Set `TERMKIT_ASCII=1` to force ASCII mode regardless of terminal detection.
|
|
180
|
+
|
|
179
181
|
### Input
|
|
180
182
|
|
|
181
183
|
Interactive text prompt. Supports string, number, integer, boolean, and enum types with validation.
|
|
@@ -764,11 +766,13 @@ ANSI-aware string truncation. Measures visible length ignoring escape codes, and
|
|
|
764
766
|
import { truncate } from 'termkit'
|
|
765
767
|
|
|
766
768
|
truncate('The quick brown fox jumps over the lazy dog', 20)
|
|
767
|
-
// 'The quick brown fox…'
|
|
769
|
+
// 'The quick brown fox…' (or '...' on legacy terminals)
|
|
768
770
|
|
|
769
771
|
truncate(coloredString, 40, ' [more]')
|
|
770
772
|
```
|
|
771
773
|
|
|
774
|
+
The default suffix is `…` when glyphs are enabled and `...` on legacy terminals. Pass an explicit suffix to override.
|
|
775
|
+
|
|
772
776
|
### wrap
|
|
773
777
|
|
|
774
778
|
ANSI-aware word wrap. Breaks at spaces to keep each line within a given column width.
|
package/dist/config.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export type HelpColor = 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | number | `#${string}`;
|
|
2
|
-
interface TermKitConfig {
|
|
2
|
+
export interface TermKitConfig {
|
|
3
3
|
color: HelpColor;
|
|
4
4
|
pulseColors: string[];
|
|
5
5
|
glyphs: boolean;
|
|
6
|
+
colors: boolean;
|
|
6
7
|
interactive: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const config: TermKitConfig;
|
|
9
10
|
export declare function configure(opts: Partial<TermKitConfig>): void;
|
|
10
|
-
export {};
|
|
11
11
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,MAAM,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,MAAM,EAAE,CAAA;AAS5H,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,SAAS,CAAA;IAChB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,EAAE,OAAO,CAAA;IACf,WAAW,EAAE,OAAO,CAAA;CACrB;AAED,eAAO,MAAM,MAAM,EAAE,aAMpB,CAAA;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CAM5D"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { Command } from '@/models/Command';
|
|
|
2
2
|
import { Option } from '@/models/Option';
|
|
3
3
|
import type { ShellOptions } from '@/models/Shell';
|
|
4
4
|
import type { MiddlewareFn } from '@/types';
|
|
5
|
-
export type { HelpColor } from '@/config';
|
|
6
|
-
export { configure } from '@/config';
|
|
5
|
+
export type { HelpColor, TermKitConfig } from '@/config';
|
|
6
|
+
export { config, configure } from '@/config';
|
|
7
7
|
export type { BarMode, BarOptions } from '@/models/Bar';
|
|
8
8
|
export { Bar } from '@/models/Bar';
|
|
9
9
|
export * as Chart from '@/models/Chart';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAE3C,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAC5C,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wBAevB,eAAe,KAAG,IAAI;sBAIlB,YAAY,KAAG,OAAO,CAAC,IAAI,CAAC;CAIrD,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -48,6 +48,7 @@ __export(index_exports, {
|
|
|
48
48
|
Table: () => Table,
|
|
49
49
|
TermKit: () => TermKit,
|
|
50
50
|
Variable: () => Variable,
|
|
51
|
+
config: () => config,
|
|
51
52
|
configure: () => configure,
|
|
52
53
|
confirm: () => confirm,
|
|
53
54
|
input: () => input,
|
|
@@ -66,17 +67,22 @@ __export(index_exports, {
|
|
|
66
67
|
module.exports = __toCommonJS(index_exports);
|
|
67
68
|
|
|
68
69
|
// src/config.ts
|
|
69
|
-
var
|
|
70
|
+
var locale = process.env.LC_ALL ?? process.env.LANG ?? "";
|
|
71
|
+
var isNonUtf8Locale = locale !== "" && !/utf-?8/i.test(locale);
|
|
72
|
+
var isLegacyTerminal = !!process.env.TERMKIT_ASCII || process.env.TERM === "dumb" || isNonUtf8Locale || process.platform === "win32" && !process.env.WT_SESSION && process.env.TERM_PROGRAM !== "vscode" && process.env.TERM_PROGRAM !== "Hyper";
|
|
73
|
+
var isColorEnabled = !process.env.NO_COLOR && (!!process.env.FORCE_COLOR || !!process.stdout.isTTY);
|
|
70
74
|
var config = {
|
|
71
75
|
color: "cyan",
|
|
72
76
|
pulseColors: ["#06b6d4", "#67e8f9"],
|
|
73
77
|
glyphs: !isLegacyTerminal,
|
|
78
|
+
colors: isColorEnabled,
|
|
74
79
|
interactive: false
|
|
75
80
|
};
|
|
76
81
|
function configure(opts) {
|
|
77
82
|
if (opts.color) config.color = opts.color;
|
|
78
83
|
if (opts.pulseColors) config.pulseColors = opts.pulseColors;
|
|
79
84
|
if (opts.glyphs !== void 0) config.glyphs = opts.glyphs;
|
|
85
|
+
if (opts.colors !== void 0) config.colors = opts.colors;
|
|
80
86
|
if (opts.interactive !== void 0) config.interactive = opts.interactive;
|
|
81
87
|
}
|
|
82
88
|
|
|
@@ -227,11 +233,11 @@ function interpolateColor(colors, t) {
|
|
|
227
233
|
return lerpColor(colors[i], colors[i + 1], scaled - i);
|
|
228
234
|
}
|
|
229
235
|
function formatColor(code, color) {
|
|
230
|
-
if (!
|
|
236
|
+
if (!config.colors) return "";
|
|
231
237
|
return `\x1B[${code};2;${color.r};${color.g};${color.b}m`;
|
|
232
238
|
}
|
|
233
239
|
function colorText(colorOrAnsi, text) {
|
|
234
|
-
if (!
|
|
240
|
+
if (!config.colors) return text;
|
|
235
241
|
if (colorOrAnsi.startsWith("#")) {
|
|
236
242
|
const c = parseHex(colorOrAnsi);
|
|
237
243
|
return `\x1B[38;2;${c.r};${c.g};${c.b}m${text}${RESET}`;
|
|
@@ -1044,6 +1050,7 @@ var Command = class {
|
|
|
1044
1050
|
const next = findCommand(array, command.commandsArray);
|
|
1045
1051
|
if (!next && array[0] === "help") return command.help(options._source);
|
|
1046
1052
|
if (!next && array[0] === "version") return this.printVersion();
|
|
1053
|
+
if (!next && array.includes("help")) return command.help(options._source);
|
|
1047
1054
|
if (!next) throw new SyntaxError(`Unknown command: ${array[0]}`);
|
|
1048
1055
|
const name = command.name ?? "_base";
|
|
1049
1056
|
if (!options._parents) options._parents = {};
|
|
@@ -1335,7 +1342,7 @@ var _Bar = class _Bar {
|
|
|
1335
1342
|
this._failColor = opts.failColor ?? RED;
|
|
1336
1343
|
this._warnColor = opts.warnColor ?? YELLOW;
|
|
1337
1344
|
this._infoColor = opts.infoColor ?? BLUE;
|
|
1338
|
-
this._glyphs = opts.glyphs ??
|
|
1345
|
+
this._glyphs = opts.glyphs ?? config.glyphs;
|
|
1339
1346
|
this._showRate = opts.showRate ?? false;
|
|
1340
1347
|
this._showEta = opts.showEta ?? false;
|
|
1341
1348
|
this._rateUnit = opts.rateUnit ?? "";
|
|
@@ -1487,9 +1494,9 @@ var _Bar = class _Bar {
|
|
|
1487
1494
|
succeed(string) {
|
|
1488
1495
|
this.running = false;
|
|
1489
1496
|
if (_Bar.current === this) _Bar.current = null;
|
|
1497
|
+
const g = this._glyphs ? "\u2714" : "+";
|
|
1490
1498
|
if (this._isManaged) {
|
|
1491
|
-
|
|
1492
|
-
this._managedFinalLine = `${glyph}${string ?? ""}`;
|
|
1499
|
+
this._managedFinalLine = `${colorText(this._successColor, g)}${string ? ` ${string}` : ""}`;
|
|
1493
1500
|
return this;
|
|
1494
1501
|
}
|
|
1495
1502
|
this._cleanupDeregister?.();
|
|
@@ -1500,10 +1507,10 @@ var _Bar = class _Bar {
|
|
|
1500
1507
|
this._resizeListener = null;
|
|
1501
1508
|
}
|
|
1502
1509
|
this.clear();
|
|
1503
|
-
process.stdout.write(`${SHOW_CURSOR}${colorText(this._successColor,
|
|
1510
|
+
process.stdout.write(`${SHOW_CURSOR}${colorText(this._successColor, g)}${string ? ` ${string}` : ""}
|
|
1504
1511
|
`);
|
|
1505
1512
|
} else {
|
|
1506
|
-
process.stdout.write(`${
|
|
1513
|
+
process.stdout.write(`${g}${string ? ` ${string}` : ""}
|
|
1507
1514
|
`);
|
|
1508
1515
|
}
|
|
1509
1516
|
return this;
|
|
@@ -1511,9 +1518,9 @@ var _Bar = class _Bar {
|
|
|
1511
1518
|
fail(string) {
|
|
1512
1519
|
this.running = false;
|
|
1513
1520
|
if (_Bar.current === this) _Bar.current = null;
|
|
1521
|
+
const g = this._glyphs ? "\u2716" : "X";
|
|
1514
1522
|
if (this._isManaged) {
|
|
1515
|
-
|
|
1516
|
-
this._managedFinalLine = `${glyph}${string ?? ""}`;
|
|
1523
|
+
this._managedFinalLine = `${colorText(this._failColor, g)}${string ? ` ${string}` : ""}`;
|
|
1517
1524
|
return this;
|
|
1518
1525
|
}
|
|
1519
1526
|
this._cleanupDeregister?.();
|
|
@@ -1524,10 +1531,10 @@ var _Bar = class _Bar {
|
|
|
1524
1531
|
this._resizeListener = null;
|
|
1525
1532
|
}
|
|
1526
1533
|
this.clear();
|
|
1527
|
-
process.stdout.write(`${SHOW_CURSOR}${colorText(this._failColor,
|
|
1534
|
+
process.stdout.write(`${SHOW_CURSOR}${colorText(this._failColor, g)}${string ? ` ${string}` : ""}
|
|
1528
1535
|
`);
|
|
1529
1536
|
} else {
|
|
1530
|
-
process.stdout.write(`${
|
|
1537
|
+
process.stdout.write(`${g}${string ? ` ${string}` : ""}
|
|
1531
1538
|
`);
|
|
1532
1539
|
}
|
|
1533
1540
|
return this;
|
|
@@ -1535,9 +1542,9 @@ var _Bar = class _Bar {
|
|
|
1535
1542
|
warn(string) {
|
|
1536
1543
|
this.running = false;
|
|
1537
1544
|
if (_Bar.current === this) _Bar.current = null;
|
|
1545
|
+
const g = this._glyphs ? "\u26A0" : "!";
|
|
1538
1546
|
if (this._isManaged) {
|
|
1539
|
-
|
|
1540
|
-
this._managedFinalLine = `${glyph}${string ?? ""}`;
|
|
1547
|
+
this._managedFinalLine = `${colorText(this._warnColor, g)}${string ? ` ${string}` : ""}`;
|
|
1541
1548
|
return this;
|
|
1542
1549
|
}
|
|
1543
1550
|
this._cleanupDeregister?.();
|
|
@@ -1548,10 +1555,10 @@ var _Bar = class _Bar {
|
|
|
1548
1555
|
this._resizeListener = null;
|
|
1549
1556
|
}
|
|
1550
1557
|
this.clear();
|
|
1551
|
-
process.stdout.write(`${SHOW_CURSOR}${colorText(this._warnColor,
|
|
1558
|
+
process.stdout.write(`${SHOW_CURSOR}${colorText(this._warnColor, g)}${string ? ` ${string}` : ""}
|
|
1552
1559
|
`);
|
|
1553
1560
|
} else {
|
|
1554
|
-
process.stdout.write(`${
|
|
1561
|
+
process.stdout.write(`${g}${string ? ` ${string}` : ""}
|
|
1555
1562
|
`);
|
|
1556
1563
|
}
|
|
1557
1564
|
return this;
|
|
@@ -1559,9 +1566,9 @@ var _Bar = class _Bar {
|
|
|
1559
1566
|
info(string) {
|
|
1560
1567
|
this.running = false;
|
|
1561
1568
|
if (_Bar.current === this) _Bar.current = null;
|
|
1569
|
+
const g = this._glyphs ? "\u2139" : "i";
|
|
1562
1570
|
if (this._isManaged) {
|
|
1563
|
-
|
|
1564
|
-
this._managedFinalLine = `${glyph}${string ?? ""}`;
|
|
1571
|
+
this._managedFinalLine = `${colorText(this._infoColor, g)}${string ? ` ${string}` : ""}`;
|
|
1565
1572
|
return this;
|
|
1566
1573
|
}
|
|
1567
1574
|
this._cleanupDeregister?.();
|
|
@@ -1572,10 +1579,10 @@ var _Bar = class _Bar {
|
|
|
1572
1579
|
this._resizeListener = null;
|
|
1573
1580
|
}
|
|
1574
1581
|
this.clear();
|
|
1575
|
-
process.stdout.write(`${SHOW_CURSOR}${colorText(this._infoColor,
|
|
1582
|
+
process.stdout.write(`${SHOW_CURSOR}${colorText(this._infoColor, g)}${string ? ` ${string}` : ""}
|
|
1576
1583
|
`);
|
|
1577
1584
|
} else {
|
|
1578
|
-
process.stdout.write(`${
|
|
1585
|
+
process.stdout.write(`${g}${string ? ` ${string}` : ""}
|
|
1579
1586
|
`);
|
|
1580
1587
|
}
|
|
1581
1588
|
return this;
|
|
@@ -2218,28 +2225,29 @@ var Log = class {
|
|
|
2218
2225
|
this._failColor = options.failColor ?? RED;
|
|
2219
2226
|
this._warnColor = options.warnColor ?? YELLOW;
|
|
2220
2227
|
this._infoColor = options.infoColor ?? BLUE;
|
|
2221
|
-
this._glyphs = options.glyphs ??
|
|
2228
|
+
this._glyphs = options.glyphs ?? config.glyphs;
|
|
2222
2229
|
}
|
|
2223
|
-
write(
|
|
2230
|
+
write(unicode, ascii, color, message) {
|
|
2231
|
+
const glyph = this._glyphs ? unicode : ascii;
|
|
2224
2232
|
if (process.stdout.isTTY) {
|
|
2225
2233
|
process.stdout.write(`${colorText(color, glyph)}${message ? ` ${message}` : ""}
|
|
2226
2234
|
`);
|
|
2227
2235
|
} else {
|
|
2228
|
-
process.stdout.write(`${
|
|
2236
|
+
process.stdout.write(`${glyph}${message ? ` ${message}` : ""}
|
|
2229
2237
|
`);
|
|
2230
2238
|
}
|
|
2231
2239
|
}
|
|
2232
2240
|
succeed(message) {
|
|
2233
|
-
this.write("\u2714", this._successColor, message);
|
|
2241
|
+
this.write("\u2714", "+", this._successColor, message);
|
|
2234
2242
|
}
|
|
2235
2243
|
fail(message) {
|
|
2236
|
-
this.write("\u2716", this._failColor, message);
|
|
2244
|
+
this.write("\u2716", "X", this._failColor, message);
|
|
2237
2245
|
}
|
|
2238
2246
|
warn(message) {
|
|
2239
|
-
this.write("\u26A0", this._warnColor, message);
|
|
2247
|
+
this.write("\u26A0", "!", this._warnColor, message);
|
|
2240
2248
|
}
|
|
2241
2249
|
info(message) {
|
|
2242
|
-
this.write("\u2139", this._infoColor, message);
|
|
2250
|
+
this.write("\u2139", "i", this._infoColor, message);
|
|
2243
2251
|
}
|
|
2244
2252
|
data(value, options) {
|
|
2245
2253
|
process.stdout.write(`${markup(value, options)}
|
|
@@ -2575,7 +2583,7 @@ async function multiSelect(prompt, items, options) {
|
|
|
2575
2583
|
// src/utils/truncate.ts
|
|
2576
2584
|
var ANSI_RE = /\x1b\[[0-9;]*[A-Za-z]/g;
|
|
2577
2585
|
var RESET2 = "\x1B[0m";
|
|
2578
|
-
function truncate(str, maxLength, suffix = "\u2026") {
|
|
2586
|
+
function truncate(str, maxLength, suffix = config.glyphs ? "\u2026" : "...") {
|
|
2579
2587
|
if (stringLength(str) <= maxLength) return str;
|
|
2580
2588
|
const hasAnsi = ANSI_RE.test(str);
|
|
2581
2589
|
ANSI_RE.lastIndex = 0;
|
|
@@ -3135,6 +3143,7 @@ var Program = {
|
|
|
3135
3143
|
Table,
|
|
3136
3144
|
TermKit,
|
|
3137
3145
|
Variable,
|
|
3146
|
+
config,
|
|
3138
3147
|
configure,
|
|
3139
3148
|
confirm,
|
|
3140
3149
|
input,
|
package/dist/index.mjs
CHANGED
|
@@ -5,17 +5,22 @@ var __export = (target, all) => {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
// src/config.ts
|
|
8
|
-
var
|
|
8
|
+
var locale = process.env.LC_ALL ?? process.env.LANG ?? "";
|
|
9
|
+
var isNonUtf8Locale = locale !== "" && !/utf-?8/i.test(locale);
|
|
10
|
+
var isLegacyTerminal = !!process.env.TERMKIT_ASCII || process.env.TERM === "dumb" || isNonUtf8Locale || process.platform === "win32" && !process.env.WT_SESSION && process.env.TERM_PROGRAM !== "vscode" && process.env.TERM_PROGRAM !== "Hyper";
|
|
11
|
+
var isColorEnabled = !process.env.NO_COLOR && (!!process.env.FORCE_COLOR || !!process.stdout.isTTY);
|
|
9
12
|
var config = {
|
|
10
13
|
color: "cyan",
|
|
11
14
|
pulseColors: ["#06b6d4", "#67e8f9"],
|
|
12
15
|
glyphs: !isLegacyTerminal,
|
|
16
|
+
colors: isColorEnabled,
|
|
13
17
|
interactive: false
|
|
14
18
|
};
|
|
15
19
|
function configure(opts) {
|
|
16
20
|
if (opts.color) config.color = opts.color;
|
|
17
21
|
if (opts.pulseColors) config.pulseColors = opts.pulseColors;
|
|
18
22
|
if (opts.glyphs !== void 0) config.glyphs = opts.glyphs;
|
|
23
|
+
if (opts.colors !== void 0) config.colors = opts.colors;
|
|
19
24
|
if (opts.interactive !== void 0) config.interactive = opts.interactive;
|
|
20
25
|
}
|
|
21
26
|
|
|
@@ -166,11 +171,11 @@ function interpolateColor(colors, t) {
|
|
|
166
171
|
return lerpColor(colors[i], colors[i + 1], scaled - i);
|
|
167
172
|
}
|
|
168
173
|
function formatColor(code, color) {
|
|
169
|
-
if (!
|
|
174
|
+
if (!config.colors) return "";
|
|
170
175
|
return `\x1B[${code};2;${color.r};${color.g};${color.b}m`;
|
|
171
176
|
}
|
|
172
177
|
function colorText(colorOrAnsi, text) {
|
|
173
|
-
if (!
|
|
178
|
+
if (!config.colors) return text;
|
|
174
179
|
if (colorOrAnsi.startsWith("#")) {
|
|
175
180
|
const c = parseHex(colorOrAnsi);
|
|
176
181
|
return `\x1B[38;2;${c.r};${c.g};${c.b}m${text}${RESET}`;
|
|
@@ -983,6 +988,7 @@ var Command = class {
|
|
|
983
988
|
const next = findCommand(array, command.commandsArray);
|
|
984
989
|
if (!next && array[0] === "help") return command.help(options._source);
|
|
985
990
|
if (!next && array[0] === "version") return this.printVersion();
|
|
991
|
+
if (!next && array.includes("help")) return command.help(options._source);
|
|
986
992
|
if (!next) throw new SyntaxError(`Unknown command: ${array[0]}`);
|
|
987
993
|
const name = command.name ?? "_base";
|
|
988
994
|
if (!options._parents) options._parents = {};
|
|
@@ -1274,7 +1280,7 @@ var _Bar = class _Bar {
|
|
|
1274
1280
|
this._failColor = opts.failColor ?? RED;
|
|
1275
1281
|
this._warnColor = opts.warnColor ?? YELLOW;
|
|
1276
1282
|
this._infoColor = opts.infoColor ?? BLUE;
|
|
1277
|
-
this._glyphs = opts.glyphs ??
|
|
1283
|
+
this._glyphs = opts.glyphs ?? config.glyphs;
|
|
1278
1284
|
this._showRate = opts.showRate ?? false;
|
|
1279
1285
|
this._showEta = opts.showEta ?? false;
|
|
1280
1286
|
this._rateUnit = opts.rateUnit ?? "";
|
|
@@ -1426,9 +1432,9 @@ var _Bar = class _Bar {
|
|
|
1426
1432
|
succeed(string) {
|
|
1427
1433
|
this.running = false;
|
|
1428
1434
|
if (_Bar.current === this) _Bar.current = null;
|
|
1435
|
+
const g = this._glyphs ? "\u2714" : "+";
|
|
1429
1436
|
if (this._isManaged) {
|
|
1430
|
-
|
|
1431
|
-
this._managedFinalLine = `${glyph}${string ?? ""}`;
|
|
1437
|
+
this._managedFinalLine = `${colorText(this._successColor, g)}${string ? ` ${string}` : ""}`;
|
|
1432
1438
|
return this;
|
|
1433
1439
|
}
|
|
1434
1440
|
this._cleanupDeregister?.();
|
|
@@ -1439,10 +1445,10 @@ var _Bar = class _Bar {
|
|
|
1439
1445
|
this._resizeListener = null;
|
|
1440
1446
|
}
|
|
1441
1447
|
this.clear();
|
|
1442
|
-
process.stdout.write(`${SHOW_CURSOR}${colorText(this._successColor,
|
|
1448
|
+
process.stdout.write(`${SHOW_CURSOR}${colorText(this._successColor, g)}${string ? ` ${string}` : ""}
|
|
1443
1449
|
`);
|
|
1444
1450
|
} else {
|
|
1445
|
-
process.stdout.write(`${
|
|
1451
|
+
process.stdout.write(`${g}${string ? ` ${string}` : ""}
|
|
1446
1452
|
`);
|
|
1447
1453
|
}
|
|
1448
1454
|
return this;
|
|
@@ -1450,9 +1456,9 @@ var _Bar = class _Bar {
|
|
|
1450
1456
|
fail(string) {
|
|
1451
1457
|
this.running = false;
|
|
1452
1458
|
if (_Bar.current === this) _Bar.current = null;
|
|
1459
|
+
const g = this._glyphs ? "\u2716" : "X";
|
|
1453
1460
|
if (this._isManaged) {
|
|
1454
|
-
|
|
1455
|
-
this._managedFinalLine = `${glyph}${string ?? ""}`;
|
|
1461
|
+
this._managedFinalLine = `${colorText(this._failColor, g)}${string ? ` ${string}` : ""}`;
|
|
1456
1462
|
return this;
|
|
1457
1463
|
}
|
|
1458
1464
|
this._cleanupDeregister?.();
|
|
@@ -1463,10 +1469,10 @@ var _Bar = class _Bar {
|
|
|
1463
1469
|
this._resizeListener = null;
|
|
1464
1470
|
}
|
|
1465
1471
|
this.clear();
|
|
1466
|
-
process.stdout.write(`${SHOW_CURSOR}${colorText(this._failColor,
|
|
1472
|
+
process.stdout.write(`${SHOW_CURSOR}${colorText(this._failColor, g)}${string ? ` ${string}` : ""}
|
|
1467
1473
|
`);
|
|
1468
1474
|
} else {
|
|
1469
|
-
process.stdout.write(`${
|
|
1475
|
+
process.stdout.write(`${g}${string ? ` ${string}` : ""}
|
|
1470
1476
|
`);
|
|
1471
1477
|
}
|
|
1472
1478
|
return this;
|
|
@@ -1474,9 +1480,9 @@ var _Bar = class _Bar {
|
|
|
1474
1480
|
warn(string) {
|
|
1475
1481
|
this.running = false;
|
|
1476
1482
|
if (_Bar.current === this) _Bar.current = null;
|
|
1483
|
+
const g = this._glyphs ? "\u26A0" : "!";
|
|
1477
1484
|
if (this._isManaged) {
|
|
1478
|
-
|
|
1479
|
-
this._managedFinalLine = `${glyph}${string ?? ""}`;
|
|
1485
|
+
this._managedFinalLine = `${colorText(this._warnColor, g)}${string ? ` ${string}` : ""}`;
|
|
1480
1486
|
return this;
|
|
1481
1487
|
}
|
|
1482
1488
|
this._cleanupDeregister?.();
|
|
@@ -1487,10 +1493,10 @@ var _Bar = class _Bar {
|
|
|
1487
1493
|
this._resizeListener = null;
|
|
1488
1494
|
}
|
|
1489
1495
|
this.clear();
|
|
1490
|
-
process.stdout.write(`${SHOW_CURSOR}${colorText(this._warnColor,
|
|
1496
|
+
process.stdout.write(`${SHOW_CURSOR}${colorText(this._warnColor, g)}${string ? ` ${string}` : ""}
|
|
1491
1497
|
`);
|
|
1492
1498
|
} else {
|
|
1493
|
-
process.stdout.write(`${
|
|
1499
|
+
process.stdout.write(`${g}${string ? ` ${string}` : ""}
|
|
1494
1500
|
`);
|
|
1495
1501
|
}
|
|
1496
1502
|
return this;
|
|
@@ -1498,9 +1504,9 @@ var _Bar = class _Bar {
|
|
|
1498
1504
|
info(string) {
|
|
1499
1505
|
this.running = false;
|
|
1500
1506
|
if (_Bar.current === this) _Bar.current = null;
|
|
1507
|
+
const g = this._glyphs ? "\u2139" : "i";
|
|
1501
1508
|
if (this._isManaged) {
|
|
1502
|
-
|
|
1503
|
-
this._managedFinalLine = `${glyph}${string ?? ""}`;
|
|
1509
|
+
this._managedFinalLine = `${colorText(this._infoColor, g)}${string ? ` ${string}` : ""}`;
|
|
1504
1510
|
return this;
|
|
1505
1511
|
}
|
|
1506
1512
|
this._cleanupDeregister?.();
|
|
@@ -1511,10 +1517,10 @@ var _Bar = class _Bar {
|
|
|
1511
1517
|
this._resizeListener = null;
|
|
1512
1518
|
}
|
|
1513
1519
|
this.clear();
|
|
1514
|
-
process.stdout.write(`${SHOW_CURSOR}${colorText(this._infoColor,
|
|
1520
|
+
process.stdout.write(`${SHOW_CURSOR}${colorText(this._infoColor, g)}${string ? ` ${string}` : ""}
|
|
1515
1521
|
`);
|
|
1516
1522
|
} else {
|
|
1517
|
-
process.stdout.write(`${
|
|
1523
|
+
process.stdout.write(`${g}${string ? ` ${string}` : ""}
|
|
1518
1524
|
`);
|
|
1519
1525
|
}
|
|
1520
1526
|
return this;
|
|
@@ -2157,28 +2163,29 @@ var Log = class {
|
|
|
2157
2163
|
this._failColor = options.failColor ?? RED;
|
|
2158
2164
|
this._warnColor = options.warnColor ?? YELLOW;
|
|
2159
2165
|
this._infoColor = options.infoColor ?? BLUE;
|
|
2160
|
-
this._glyphs = options.glyphs ??
|
|
2166
|
+
this._glyphs = options.glyphs ?? config.glyphs;
|
|
2161
2167
|
}
|
|
2162
|
-
write(
|
|
2168
|
+
write(unicode, ascii, color, message) {
|
|
2169
|
+
const glyph = this._glyphs ? unicode : ascii;
|
|
2163
2170
|
if (process.stdout.isTTY) {
|
|
2164
2171
|
process.stdout.write(`${colorText(color, glyph)}${message ? ` ${message}` : ""}
|
|
2165
2172
|
`);
|
|
2166
2173
|
} else {
|
|
2167
|
-
process.stdout.write(`${
|
|
2174
|
+
process.stdout.write(`${glyph}${message ? ` ${message}` : ""}
|
|
2168
2175
|
`);
|
|
2169
2176
|
}
|
|
2170
2177
|
}
|
|
2171
2178
|
succeed(message) {
|
|
2172
|
-
this.write("\u2714", this._successColor, message);
|
|
2179
|
+
this.write("\u2714", "+", this._successColor, message);
|
|
2173
2180
|
}
|
|
2174
2181
|
fail(message) {
|
|
2175
|
-
this.write("\u2716", this._failColor, message);
|
|
2182
|
+
this.write("\u2716", "X", this._failColor, message);
|
|
2176
2183
|
}
|
|
2177
2184
|
warn(message) {
|
|
2178
|
-
this.write("\u26A0", this._warnColor, message);
|
|
2185
|
+
this.write("\u26A0", "!", this._warnColor, message);
|
|
2179
2186
|
}
|
|
2180
2187
|
info(message) {
|
|
2181
|
-
this.write("\u2139", this._infoColor, message);
|
|
2188
|
+
this.write("\u2139", "i", this._infoColor, message);
|
|
2182
2189
|
}
|
|
2183
2190
|
data(value, options) {
|
|
2184
2191
|
process.stdout.write(`${markup(value, options)}
|
|
@@ -2514,7 +2521,7 @@ async function multiSelect(prompt, items, options) {
|
|
|
2514
2521
|
// src/utils/truncate.ts
|
|
2515
2522
|
var ANSI_RE = /\x1b\[[0-9;]*[A-Za-z]/g;
|
|
2516
2523
|
var RESET2 = "\x1B[0m";
|
|
2517
|
-
function truncate(str, maxLength, suffix = "\u2026") {
|
|
2524
|
+
function truncate(str, maxLength, suffix = config.glyphs ? "\u2026" : "...") {
|
|
2518
2525
|
if (stringLength(str) <= maxLength) return str;
|
|
2519
2526
|
const hasAnsi = ANSI_RE.test(str);
|
|
2520
2527
|
ANSI_RE.lastIndex = 0;
|
|
@@ -3073,6 +3080,7 @@ export {
|
|
|
3073
3080
|
Table,
|
|
3074
3081
|
TermKit,
|
|
3075
3082
|
Variable,
|
|
3083
|
+
config,
|
|
3076
3084
|
configure,
|
|
3077
3085
|
confirm,
|
|
3078
3086
|
input,
|
package/dist/models/Bar.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bar.d.ts","sourceRoot":"","sources":["../../src/models/Bar.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Bar.d.ts","sourceRoot":"","sources":["../../src/models/Bar.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAA8K,MAAM,eAAe,CAAA;AAGrN,MAAM,MAAM,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,cAAc,CAAA;AAExD,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,CAAC,EAAE,MAA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AM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;CAG/C"}
|
package/dist/models/Log.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Log.d.ts","sourceRoot":"","sources":["../../src/models/Log.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Log.d.ts","sourceRoot":"","sources":["../../src/models/Log.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAG5D,MAAM,WAAW,UAAU;IACzB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,qBAAa,GAAG;IACd,OAAO,CAAC,aAAa,CAAQ;IAC7B,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,GAAE,UAAe;IAQpC,OAAO,CAAC,KAAK;IASb,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAI/B,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAI5B,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAI5B,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAI5B,IAAI,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI;CAGrD;AAED,eAAO,MAAM,GAAG,KAAY,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/utils/color.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"color.d.ts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AE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAE9E;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAE9C;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAGjF;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAc3D;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,QAAQ,CAQnG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"truncate.d.ts","sourceRoot":"","sources":["../../src/utils/truncate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"truncate.d.ts","sourceRoot":"","sources":["../../src/utils/truncate.ts"],"names":[],"mappings":"AAOA,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,SAA8B,GAAG,MAAM,CAsBrG"}
|