termkit 2.4.1 → 2.4.2
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.map +1 -1
- package/dist/index.js +29 -26
- package/dist/index.mjs +29 -26
- package/dist/models/Bar.d.ts.map +1 -1
- package/dist/models/Log.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.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;AAO5H,UAAU,aAAa;IACrB,KAAK,EAAE,SAAS,CAAA;IAChB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,MAAM,EAAE,OAAO,CAAA;IACf,WAAW,EAAE,OAAO,CAAA;CACrB;AAED,eAAO,MAAM,MAAM,EAAE,aAKpB,CAAA;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,IAAI,CAK5D"}
|
package/dist/index.js
CHANGED
|
@@ -66,7 +66,9 @@ __export(index_exports, {
|
|
|
66
66
|
module.exports = __toCommonJS(index_exports);
|
|
67
67
|
|
|
68
68
|
// src/config.ts
|
|
69
|
-
var
|
|
69
|
+
var locale = process.env.LC_ALL ?? process.env.LANG ?? "";
|
|
70
|
+
var isNonUtf8Locale = locale !== "" && !/utf-?8/i.test(locale);
|
|
71
|
+
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";
|
|
70
72
|
var config = {
|
|
71
73
|
color: "cyan",
|
|
72
74
|
pulseColors: ["#06b6d4", "#67e8f9"],
|
|
@@ -1335,7 +1337,7 @@ var _Bar = class _Bar {
|
|
|
1335
1337
|
this._failColor = opts.failColor ?? RED;
|
|
1336
1338
|
this._warnColor = opts.warnColor ?? YELLOW;
|
|
1337
1339
|
this._infoColor = opts.infoColor ?? BLUE;
|
|
1338
|
-
this._glyphs = opts.glyphs ??
|
|
1340
|
+
this._glyphs = opts.glyphs ?? config.glyphs;
|
|
1339
1341
|
this._showRate = opts.showRate ?? false;
|
|
1340
1342
|
this._showEta = opts.showEta ?? false;
|
|
1341
1343
|
this._rateUnit = opts.rateUnit ?? "";
|
|
@@ -1487,9 +1489,9 @@ var _Bar = class _Bar {
|
|
|
1487
1489
|
succeed(string) {
|
|
1488
1490
|
this.running = false;
|
|
1489
1491
|
if (_Bar.current === this) _Bar.current = null;
|
|
1492
|
+
const g = this._glyphs ? "\u2714" : "+";
|
|
1490
1493
|
if (this._isManaged) {
|
|
1491
|
-
|
|
1492
|
-
this._managedFinalLine = `${glyph}${string ?? ""}`;
|
|
1494
|
+
this._managedFinalLine = `${colorText(this._successColor, g)}${string ? ` ${string}` : ""}`;
|
|
1493
1495
|
return this;
|
|
1494
1496
|
}
|
|
1495
1497
|
this._cleanupDeregister?.();
|
|
@@ -1500,10 +1502,10 @@ var _Bar = class _Bar {
|
|
|
1500
1502
|
this._resizeListener = null;
|
|
1501
1503
|
}
|
|
1502
1504
|
this.clear();
|
|
1503
|
-
process.stdout.write(`${SHOW_CURSOR}${colorText(this._successColor,
|
|
1505
|
+
process.stdout.write(`${SHOW_CURSOR}${colorText(this._successColor, g)}${string ? ` ${string}` : ""}
|
|
1504
1506
|
`);
|
|
1505
1507
|
} else {
|
|
1506
|
-
process.stdout.write(`${
|
|
1508
|
+
process.stdout.write(`${g}${string ? ` ${string}` : ""}
|
|
1507
1509
|
`);
|
|
1508
1510
|
}
|
|
1509
1511
|
return this;
|
|
@@ -1511,9 +1513,9 @@ var _Bar = class _Bar {
|
|
|
1511
1513
|
fail(string) {
|
|
1512
1514
|
this.running = false;
|
|
1513
1515
|
if (_Bar.current === this) _Bar.current = null;
|
|
1516
|
+
const g = this._glyphs ? "\u2716" : "X";
|
|
1514
1517
|
if (this._isManaged) {
|
|
1515
|
-
|
|
1516
|
-
this._managedFinalLine = `${glyph}${string ?? ""}`;
|
|
1518
|
+
this._managedFinalLine = `${colorText(this._failColor, g)}${string ? ` ${string}` : ""}`;
|
|
1517
1519
|
return this;
|
|
1518
1520
|
}
|
|
1519
1521
|
this._cleanupDeregister?.();
|
|
@@ -1524,10 +1526,10 @@ var _Bar = class _Bar {
|
|
|
1524
1526
|
this._resizeListener = null;
|
|
1525
1527
|
}
|
|
1526
1528
|
this.clear();
|
|
1527
|
-
process.stdout.write(`${SHOW_CURSOR}${colorText(this._failColor,
|
|
1529
|
+
process.stdout.write(`${SHOW_CURSOR}${colorText(this._failColor, g)}${string ? ` ${string}` : ""}
|
|
1528
1530
|
`);
|
|
1529
1531
|
} else {
|
|
1530
|
-
process.stdout.write(`${
|
|
1532
|
+
process.stdout.write(`${g}${string ? ` ${string}` : ""}
|
|
1531
1533
|
`);
|
|
1532
1534
|
}
|
|
1533
1535
|
return this;
|
|
@@ -1535,9 +1537,9 @@ var _Bar = class _Bar {
|
|
|
1535
1537
|
warn(string) {
|
|
1536
1538
|
this.running = false;
|
|
1537
1539
|
if (_Bar.current === this) _Bar.current = null;
|
|
1540
|
+
const g = this._glyphs ? "\u26A0" : "!";
|
|
1538
1541
|
if (this._isManaged) {
|
|
1539
|
-
|
|
1540
|
-
this._managedFinalLine = `${glyph}${string ?? ""}`;
|
|
1542
|
+
this._managedFinalLine = `${colorText(this._warnColor, g)}${string ? ` ${string}` : ""}`;
|
|
1541
1543
|
return this;
|
|
1542
1544
|
}
|
|
1543
1545
|
this._cleanupDeregister?.();
|
|
@@ -1548,10 +1550,10 @@ var _Bar = class _Bar {
|
|
|
1548
1550
|
this._resizeListener = null;
|
|
1549
1551
|
}
|
|
1550
1552
|
this.clear();
|
|
1551
|
-
process.stdout.write(`${SHOW_CURSOR}${colorText(this._warnColor,
|
|
1553
|
+
process.stdout.write(`${SHOW_CURSOR}${colorText(this._warnColor, g)}${string ? ` ${string}` : ""}
|
|
1552
1554
|
`);
|
|
1553
1555
|
} else {
|
|
1554
|
-
process.stdout.write(`${
|
|
1556
|
+
process.stdout.write(`${g}${string ? ` ${string}` : ""}
|
|
1555
1557
|
`);
|
|
1556
1558
|
}
|
|
1557
1559
|
return this;
|
|
@@ -1559,9 +1561,9 @@ var _Bar = class _Bar {
|
|
|
1559
1561
|
info(string) {
|
|
1560
1562
|
this.running = false;
|
|
1561
1563
|
if (_Bar.current === this) _Bar.current = null;
|
|
1564
|
+
const g = this._glyphs ? "\u2139" : "i";
|
|
1562
1565
|
if (this._isManaged) {
|
|
1563
|
-
|
|
1564
|
-
this._managedFinalLine = `${glyph}${string ?? ""}`;
|
|
1566
|
+
this._managedFinalLine = `${colorText(this._infoColor, g)}${string ? ` ${string}` : ""}`;
|
|
1565
1567
|
return this;
|
|
1566
1568
|
}
|
|
1567
1569
|
this._cleanupDeregister?.();
|
|
@@ -1572,10 +1574,10 @@ var _Bar = class _Bar {
|
|
|
1572
1574
|
this._resizeListener = null;
|
|
1573
1575
|
}
|
|
1574
1576
|
this.clear();
|
|
1575
|
-
process.stdout.write(`${SHOW_CURSOR}${colorText(this._infoColor,
|
|
1577
|
+
process.stdout.write(`${SHOW_CURSOR}${colorText(this._infoColor, g)}${string ? ` ${string}` : ""}
|
|
1576
1578
|
`);
|
|
1577
1579
|
} else {
|
|
1578
|
-
process.stdout.write(`${
|
|
1580
|
+
process.stdout.write(`${g}${string ? ` ${string}` : ""}
|
|
1579
1581
|
`);
|
|
1580
1582
|
}
|
|
1581
1583
|
return this;
|
|
@@ -2218,28 +2220,29 @@ var Log = class {
|
|
|
2218
2220
|
this._failColor = options.failColor ?? RED;
|
|
2219
2221
|
this._warnColor = options.warnColor ?? YELLOW;
|
|
2220
2222
|
this._infoColor = options.infoColor ?? BLUE;
|
|
2221
|
-
this._glyphs = options.glyphs ??
|
|
2223
|
+
this._glyphs = options.glyphs ?? config.glyphs;
|
|
2222
2224
|
}
|
|
2223
|
-
write(
|
|
2225
|
+
write(unicode, ascii, color, message) {
|
|
2226
|
+
const glyph = this._glyphs ? unicode : ascii;
|
|
2224
2227
|
if (process.stdout.isTTY) {
|
|
2225
2228
|
process.stdout.write(`${colorText(color, glyph)}${message ? ` ${message}` : ""}
|
|
2226
2229
|
`);
|
|
2227
2230
|
} else {
|
|
2228
|
-
process.stdout.write(`${
|
|
2231
|
+
process.stdout.write(`${glyph}${message ? ` ${message}` : ""}
|
|
2229
2232
|
`);
|
|
2230
2233
|
}
|
|
2231
2234
|
}
|
|
2232
2235
|
succeed(message) {
|
|
2233
|
-
this.write("\u2714", this._successColor, message);
|
|
2236
|
+
this.write("\u2714", "+", this._successColor, message);
|
|
2234
2237
|
}
|
|
2235
2238
|
fail(message) {
|
|
2236
|
-
this.write("\u2716", this._failColor, message);
|
|
2239
|
+
this.write("\u2716", "X", this._failColor, message);
|
|
2237
2240
|
}
|
|
2238
2241
|
warn(message) {
|
|
2239
|
-
this.write("\u26A0", this._warnColor, message);
|
|
2242
|
+
this.write("\u26A0", "!", this._warnColor, message);
|
|
2240
2243
|
}
|
|
2241
2244
|
info(message) {
|
|
2242
|
-
this.write("\u2139", this._infoColor, message);
|
|
2245
|
+
this.write("\u2139", "i", this._infoColor, message);
|
|
2243
2246
|
}
|
|
2244
2247
|
data(value, options) {
|
|
2245
2248
|
process.stdout.write(`${markup(value, options)}
|
|
@@ -2575,7 +2578,7 @@ async function multiSelect(prompt, items, options) {
|
|
|
2575
2578
|
// src/utils/truncate.ts
|
|
2576
2579
|
var ANSI_RE = /\x1b\[[0-9;]*[A-Za-z]/g;
|
|
2577
2580
|
var RESET2 = "\x1B[0m";
|
|
2578
|
-
function truncate(str, maxLength, suffix = "\u2026") {
|
|
2581
|
+
function truncate(str, maxLength, suffix = config.glyphs ? "\u2026" : "...") {
|
|
2579
2582
|
if (stringLength(str) <= maxLength) return str;
|
|
2580
2583
|
const hasAnsi = ANSI_RE.test(str);
|
|
2581
2584
|
ANSI_RE.lastIndex = 0;
|
package/dist/index.mjs
CHANGED
|
@@ -5,7 +5,9 @@ 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";
|
|
9
11
|
var config = {
|
|
10
12
|
color: "cyan",
|
|
11
13
|
pulseColors: ["#06b6d4", "#67e8f9"],
|
|
@@ -1274,7 +1276,7 @@ var _Bar = class _Bar {
|
|
|
1274
1276
|
this._failColor = opts.failColor ?? RED;
|
|
1275
1277
|
this._warnColor = opts.warnColor ?? YELLOW;
|
|
1276
1278
|
this._infoColor = opts.infoColor ?? BLUE;
|
|
1277
|
-
this._glyphs = opts.glyphs ??
|
|
1279
|
+
this._glyphs = opts.glyphs ?? config.glyphs;
|
|
1278
1280
|
this._showRate = opts.showRate ?? false;
|
|
1279
1281
|
this._showEta = opts.showEta ?? false;
|
|
1280
1282
|
this._rateUnit = opts.rateUnit ?? "";
|
|
@@ -1426,9 +1428,9 @@ var _Bar = class _Bar {
|
|
|
1426
1428
|
succeed(string) {
|
|
1427
1429
|
this.running = false;
|
|
1428
1430
|
if (_Bar.current === this) _Bar.current = null;
|
|
1431
|
+
const g = this._glyphs ? "\u2714" : "+";
|
|
1429
1432
|
if (this._isManaged) {
|
|
1430
|
-
|
|
1431
|
-
this._managedFinalLine = `${glyph}${string ?? ""}`;
|
|
1433
|
+
this._managedFinalLine = `${colorText(this._successColor, g)}${string ? ` ${string}` : ""}`;
|
|
1432
1434
|
return this;
|
|
1433
1435
|
}
|
|
1434
1436
|
this._cleanupDeregister?.();
|
|
@@ -1439,10 +1441,10 @@ var _Bar = class _Bar {
|
|
|
1439
1441
|
this._resizeListener = null;
|
|
1440
1442
|
}
|
|
1441
1443
|
this.clear();
|
|
1442
|
-
process.stdout.write(`${SHOW_CURSOR}${colorText(this._successColor,
|
|
1444
|
+
process.stdout.write(`${SHOW_CURSOR}${colorText(this._successColor, g)}${string ? ` ${string}` : ""}
|
|
1443
1445
|
`);
|
|
1444
1446
|
} else {
|
|
1445
|
-
process.stdout.write(`${
|
|
1447
|
+
process.stdout.write(`${g}${string ? ` ${string}` : ""}
|
|
1446
1448
|
`);
|
|
1447
1449
|
}
|
|
1448
1450
|
return this;
|
|
@@ -1450,9 +1452,9 @@ var _Bar = class _Bar {
|
|
|
1450
1452
|
fail(string) {
|
|
1451
1453
|
this.running = false;
|
|
1452
1454
|
if (_Bar.current === this) _Bar.current = null;
|
|
1455
|
+
const g = this._glyphs ? "\u2716" : "X";
|
|
1453
1456
|
if (this._isManaged) {
|
|
1454
|
-
|
|
1455
|
-
this._managedFinalLine = `${glyph}${string ?? ""}`;
|
|
1457
|
+
this._managedFinalLine = `${colorText(this._failColor, g)}${string ? ` ${string}` : ""}`;
|
|
1456
1458
|
return this;
|
|
1457
1459
|
}
|
|
1458
1460
|
this._cleanupDeregister?.();
|
|
@@ -1463,10 +1465,10 @@ var _Bar = class _Bar {
|
|
|
1463
1465
|
this._resizeListener = null;
|
|
1464
1466
|
}
|
|
1465
1467
|
this.clear();
|
|
1466
|
-
process.stdout.write(`${SHOW_CURSOR}${colorText(this._failColor,
|
|
1468
|
+
process.stdout.write(`${SHOW_CURSOR}${colorText(this._failColor, g)}${string ? ` ${string}` : ""}
|
|
1467
1469
|
`);
|
|
1468
1470
|
} else {
|
|
1469
|
-
process.stdout.write(`${
|
|
1471
|
+
process.stdout.write(`${g}${string ? ` ${string}` : ""}
|
|
1470
1472
|
`);
|
|
1471
1473
|
}
|
|
1472
1474
|
return this;
|
|
@@ -1474,9 +1476,9 @@ var _Bar = class _Bar {
|
|
|
1474
1476
|
warn(string) {
|
|
1475
1477
|
this.running = false;
|
|
1476
1478
|
if (_Bar.current === this) _Bar.current = null;
|
|
1479
|
+
const g = this._glyphs ? "\u26A0" : "!";
|
|
1477
1480
|
if (this._isManaged) {
|
|
1478
|
-
|
|
1479
|
-
this._managedFinalLine = `${glyph}${string ?? ""}`;
|
|
1481
|
+
this._managedFinalLine = `${colorText(this._warnColor, g)}${string ? ` ${string}` : ""}`;
|
|
1480
1482
|
return this;
|
|
1481
1483
|
}
|
|
1482
1484
|
this._cleanupDeregister?.();
|
|
@@ -1487,10 +1489,10 @@ var _Bar = class _Bar {
|
|
|
1487
1489
|
this._resizeListener = null;
|
|
1488
1490
|
}
|
|
1489
1491
|
this.clear();
|
|
1490
|
-
process.stdout.write(`${SHOW_CURSOR}${colorText(this._warnColor,
|
|
1492
|
+
process.stdout.write(`${SHOW_CURSOR}${colorText(this._warnColor, g)}${string ? ` ${string}` : ""}
|
|
1491
1493
|
`);
|
|
1492
1494
|
} else {
|
|
1493
|
-
process.stdout.write(`${
|
|
1495
|
+
process.stdout.write(`${g}${string ? ` ${string}` : ""}
|
|
1494
1496
|
`);
|
|
1495
1497
|
}
|
|
1496
1498
|
return this;
|
|
@@ -1498,9 +1500,9 @@ var _Bar = class _Bar {
|
|
|
1498
1500
|
info(string) {
|
|
1499
1501
|
this.running = false;
|
|
1500
1502
|
if (_Bar.current === this) _Bar.current = null;
|
|
1503
|
+
const g = this._glyphs ? "\u2139" : "i";
|
|
1501
1504
|
if (this._isManaged) {
|
|
1502
|
-
|
|
1503
|
-
this._managedFinalLine = `${glyph}${string ?? ""}`;
|
|
1505
|
+
this._managedFinalLine = `${colorText(this._infoColor, g)}${string ? ` ${string}` : ""}`;
|
|
1504
1506
|
return this;
|
|
1505
1507
|
}
|
|
1506
1508
|
this._cleanupDeregister?.();
|
|
@@ -1511,10 +1513,10 @@ var _Bar = class _Bar {
|
|
|
1511
1513
|
this._resizeListener = null;
|
|
1512
1514
|
}
|
|
1513
1515
|
this.clear();
|
|
1514
|
-
process.stdout.write(`${SHOW_CURSOR}${colorText(this._infoColor,
|
|
1516
|
+
process.stdout.write(`${SHOW_CURSOR}${colorText(this._infoColor, g)}${string ? ` ${string}` : ""}
|
|
1515
1517
|
`);
|
|
1516
1518
|
} else {
|
|
1517
|
-
process.stdout.write(`${
|
|
1519
|
+
process.stdout.write(`${g}${string ? ` ${string}` : ""}
|
|
1518
1520
|
`);
|
|
1519
1521
|
}
|
|
1520
1522
|
return this;
|
|
@@ -2157,28 +2159,29 @@ var Log = class {
|
|
|
2157
2159
|
this._failColor = options.failColor ?? RED;
|
|
2158
2160
|
this._warnColor = options.warnColor ?? YELLOW;
|
|
2159
2161
|
this._infoColor = options.infoColor ?? BLUE;
|
|
2160
|
-
this._glyphs = options.glyphs ??
|
|
2162
|
+
this._glyphs = options.glyphs ?? config.glyphs;
|
|
2161
2163
|
}
|
|
2162
|
-
write(
|
|
2164
|
+
write(unicode, ascii, color, message) {
|
|
2165
|
+
const glyph = this._glyphs ? unicode : ascii;
|
|
2163
2166
|
if (process.stdout.isTTY) {
|
|
2164
2167
|
process.stdout.write(`${colorText(color, glyph)}${message ? ` ${message}` : ""}
|
|
2165
2168
|
`);
|
|
2166
2169
|
} else {
|
|
2167
|
-
process.stdout.write(`${
|
|
2170
|
+
process.stdout.write(`${glyph}${message ? ` ${message}` : ""}
|
|
2168
2171
|
`);
|
|
2169
2172
|
}
|
|
2170
2173
|
}
|
|
2171
2174
|
succeed(message) {
|
|
2172
|
-
this.write("\u2714", this._successColor, message);
|
|
2175
|
+
this.write("\u2714", "+", this._successColor, message);
|
|
2173
2176
|
}
|
|
2174
2177
|
fail(message) {
|
|
2175
|
-
this.write("\u2716", this._failColor, message);
|
|
2178
|
+
this.write("\u2716", "X", this._failColor, message);
|
|
2176
2179
|
}
|
|
2177
2180
|
warn(message) {
|
|
2178
|
-
this.write("\u26A0", this._warnColor, message);
|
|
2181
|
+
this.write("\u26A0", "!", this._warnColor, message);
|
|
2179
2182
|
}
|
|
2180
2183
|
info(message) {
|
|
2181
|
-
this.write("\u2139", this._infoColor, message);
|
|
2184
|
+
this.write("\u2139", "i", this._infoColor, message);
|
|
2182
2185
|
}
|
|
2183
2186
|
data(value, options) {
|
|
2184
2187
|
process.stdout.write(`${markup(value, options)}
|
|
@@ -2514,7 +2517,7 @@ async function multiSelect(prompt, items, options) {
|
|
|
2514
2517
|
// src/utils/truncate.ts
|
|
2515
2518
|
var ANSI_RE = /\x1b\[[0-9;]*[A-Za-z]/g;
|
|
2516
2519
|
var RESET2 = "\x1B[0m";
|
|
2517
|
-
function truncate(str, maxLength, suffix = "\u2026") {
|
|
2520
|
+
function truncate(str, maxLength, suffix = config.glyphs ? "\u2026" : "...") {
|
|
2518
2521
|
if (stringLength(str) <= maxLength) return str;
|
|
2519
2522
|
const hasAnsi = ANSI_RE.test(str);
|
|
2520
2523
|
ANSI_RE.lastIndex = 0;
|
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,QA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AK;IAIb,OAAO,CAAC,UAAU;IAKlB,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,gBAAgB;IA0BxB,OAAO,CAAC,kBAAkB;IAqB1B,OAAO,CAAC,oBAAoB;IAsC5B,OAAO,CAAC,SAAS;IAkBjB,OAAO,CAAC,GAAG;CAOZ;AAGD,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
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":"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"}
|