numux 2.14.0 → 2.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/man/numux.1 +1 -1
- package/dist/numux.js +38 -16
- package/package.json +1 -1
package/dist/man/numux.1
CHANGED
package/dist/numux.js
CHANGED
|
@@ -546,7 +546,7 @@ var init_help = __esm(() => {
|
|
|
546
546
|
var require_package = __commonJS((exports, module) => {
|
|
547
547
|
module.exports = {
|
|
548
548
|
name: "numux",
|
|
549
|
-
version: "2.14.
|
|
549
|
+
version: "2.14.1",
|
|
550
550
|
description: "Terminal multiplexer with dependency orchestration",
|
|
551
551
|
type: "module",
|
|
552
552
|
license: "MIT",
|
|
@@ -3022,6 +3022,19 @@ import {
|
|
|
3022
3022
|
ScrollBoxRenderable
|
|
3023
3023
|
} from "@opentui/core";
|
|
3024
3024
|
|
|
3025
|
+
// src/utils/timestamp.ts
|
|
3026
|
+
var DEFAULT_TIMESTAMP_FORMAT = "HH:mm:ss.SSS";
|
|
3027
|
+
function formatTimestamp(date, format) {
|
|
3028
|
+
const hours24 = date.getHours();
|
|
3029
|
+
const hours12 = hours24 % 12 || 12;
|
|
3030
|
+
return format.replace("YYYY", date.getFullYear().toString()).replace("MM", (date.getMonth() + 1).toString().padStart(2, "0")).replace("DD", date.getDate().toString().padStart(2, "0")).replace("HH", hours24.toString().padStart(2, "0")).replace("hh", hours12.toString().padStart(2, "0")).replace("mm", date.getMinutes().toString().padStart(2, "0")).replace("SSS", date.getMilliseconds().toString().padStart(3, "0")).replace("ss", date.getSeconds().toString().padStart(2, "0")).replace("A", hours24 < 12 ? "AM" : "PM");
|
|
3031
|
+
}
|
|
3032
|
+
function resolveTimestampFormat(timestamps) {
|
|
3033
|
+
if (!timestamps)
|
|
3034
|
+
return null;
|
|
3035
|
+
return typeof timestamps === "string" ? timestamps : DEFAULT_TIMESTAMP_FORMAT;
|
|
3036
|
+
}
|
|
3037
|
+
|
|
3025
3038
|
// node_modules/ghostty-opentui/src/terminal-buffer.ts
|
|
3026
3039
|
import {
|
|
3027
3040
|
TextBufferRenderable,
|
|
@@ -3430,17 +3443,24 @@ Object.defineProperty(GhosttyTerminalRenderable.prototype, "lineInfo", {
|
|
|
3430
3443
|
configurable: true
|
|
3431
3444
|
});
|
|
3432
3445
|
|
|
3433
|
-
// src/
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3446
|
+
// src/ui/tailing-terminal.ts
|
|
3447
|
+
class TailingTerminal extends GhosttyTerminalRenderable {
|
|
3448
|
+
constructor(ctx, options) {
|
|
3449
|
+
super(ctx, options);
|
|
3450
|
+
const self = this;
|
|
3451
|
+
const pt = self._persistentTerminal;
|
|
3452
|
+
if (!pt)
|
|
3453
|
+
return;
|
|
3454
|
+
const origGetJson = pt.getJson.bind(pt);
|
|
3455
|
+
pt.getJson = (opts = {}) => {
|
|
3456
|
+
if (opts.limit && opts.offset === undefined) {
|
|
3457
|
+
const peek = origGetJson({ limit: 1 });
|
|
3458
|
+
const offset = Math.max(0, peek.totalLines - opts.limit);
|
|
3459
|
+
return origGetJson({ offset, limit: opts.limit });
|
|
3460
|
+
}
|
|
3461
|
+
return origGetJson(opts);
|
|
3462
|
+
};
|
|
3463
|
+
}
|
|
3444
3464
|
}
|
|
3445
3465
|
|
|
3446
3466
|
// src/ui/url-handler.ts
|
|
@@ -3487,8 +3507,9 @@ function openLink(link) {
|
|
|
3487
3507
|
}
|
|
3488
3508
|
|
|
3489
3509
|
// src/ui/pane.ts
|
|
3490
|
-
var
|
|
3491
|
-
var
|
|
3510
|
+
var RENDER_LIMIT = 5000;
|
|
3511
|
+
var MAX_SCROLLBACK_LINES = 1e6;
|
|
3512
|
+
var MAX_BUFFER_BYTES = 500 * 1024 * 1024;
|
|
3492
3513
|
|
|
3493
3514
|
class Pane {
|
|
3494
3515
|
scrollBox;
|
|
@@ -3514,13 +3535,14 @@ class Pane {
|
|
|
3514
3535
|
visible: false,
|
|
3515
3536
|
onMouseScroll: () => this._onScroll?.()
|
|
3516
3537
|
});
|
|
3517
|
-
this.terminal = new
|
|
3538
|
+
this.terminal = new TailingTerminal(renderer, {
|
|
3518
3539
|
id: `term-${name}`,
|
|
3519
3540
|
cols,
|
|
3520
3541
|
rows,
|
|
3521
3542
|
persistent: true,
|
|
3522
3543
|
showCursor: interactive,
|
|
3523
3544
|
trimEnd: true,
|
|
3545
|
+
limit: RENDER_LIMIT,
|
|
3524
3546
|
flexGrow: 1
|
|
3525
3547
|
});
|
|
3526
3548
|
const origOnSelectionChanged = this.terminal.onSelectionChanged.bind(this.terminal);
|
|
@@ -3554,7 +3576,7 @@ class Pane {
|
|
|
3554
3576
|
}
|
|
3555
3577
|
feed(data) {
|
|
3556
3578
|
this.bytesFed += data.length;
|
|
3557
|
-
if (this.
|
|
3579
|
+
if (this.lineCounter > MAX_SCROLLBACK_LINES || this.bytesFed > MAX_BUFFER_BYTES) {
|
|
3558
3580
|
this.terminal.reset();
|
|
3559
3581
|
this.bytesFed = 0;
|
|
3560
3582
|
this.lineTimestamps = [];
|